diff --git a/play/app.js b/play/app.js index 786b7dab..2133c2c6 100644 --- a/play/app.js +++ b/play/app.js @@ -1,44 +1,44 @@ -var Bmt=Object.create;var HL=Object.defineProperty;var Vmt=Object.getOwnPropertyDescriptor;var Wmt=Object.getOwnPropertyNames;var Umt=Object.getPrototypeOf,$mt=Object.prototype.hasOwnProperty;var jmt=(i,e,t)=>e in i?HL(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var P=(i,e)=>()=>(i&&(e=i(i=0)),e);var ot=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),Ai=(i,e)=>{for(var t in e)HL(i,t,{get:e[t],enumerable:!0})},cNe=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Wmt(e))!$mt.call(i,o)&&o!==t&&HL(i,o,{get:()=>e[o],enumerable:!(n=Vmt(e,o))||n.enumerable});return i};var vt=(i,e,t)=>(t=i!=null?Bmt(Umt(i)):{},cNe(e||!i||!i.__esModule?HL(t,"default",{value:i,enumerable:!0}):t,i)),BL=i=>cNe(HL({},"__esModule",{value:!0}),i);var PO=(i,e,t)=>(jmt(i,typeof e!="symbol"?e+"":e,t),t),dNe=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var c_=(i,e,t)=>(dNe(i,e,"read from private field"),t?t.call(i):e.get(i)),yne=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Cne=(i,e,t,n)=>(dNe(i,e,"write to private field"),n?n.call(i,t):e.set(i,t),t);var wNe=ot(Xo=>{"use strict";var VL=Symbol.for("react.element"),qmt=Symbol.for("react.portal"),Gmt=Symbol.for("react.fragment"),Kmt=Symbol.for("react.strict_mode"),Ymt=Symbol.for("react.profiler"),Zmt=Symbol.for("react.provider"),Xmt=Symbol.for("react.context"),Qmt=Symbol.for("react.forward_ref"),Jmt=Symbol.for("react.suspense"),egt=Symbol.for("react.memo"),tgt=Symbol.for("react.lazy"),uNe=Symbol.iterator;function igt(i){return i===null||typeof i!="object"?null:(i=uNe&&i[uNe]||i["@@iterator"],typeof i=="function"?i:null)}var pNe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},mNe=Object.assign,gNe={};function M9(i,e,t){this.props=i,this.context=e,this.refs=gNe,this.updater=t||pNe}M9.prototype.isReactComponent={};M9.prototype.setState=function(i,e){if(typeof i!="object"&&typeof i!="function"&&i!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,i,e,"setState")};M9.prototype.forceUpdate=function(i){this.updater.enqueueForceUpdate(this,i,"forceUpdate")};function vNe(){}vNe.prototype=M9.prototype;function xne(i,e,t){this.props=i,this.context=e,this.refs=gNe,this.updater=t||pNe}var Sne=xne.prototype=new vNe;Sne.constructor=xne;mNe(Sne,M9.prototype);Sne.isPureReactComponent=!0;var hNe=Array.isArray,_Ne=Object.prototype.hasOwnProperty,kne={current:null},bNe={key:!0,ref:!0,__self:!0,__source:!0};function yNe(i,e,t){var n,o={},r=null,s=null;if(e!=null)for(n in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(r=""+e.key),e)_Ne.call(e,n)&&!bNe.hasOwnProperty(n)&&(o[n]=e[n]);var a=arguments.length-2;if(a===1)o.children=t;else if(1{"use strict";xNe.exports=wNe()});var ANe=ot(Us=>{"use strict";function Ine(i,e){var t=i.length;i.push(e);e:for(;0>>1,o=i[n];if(0>>1;nHO(a,t))lHO(c,a)?(i[n]=c,i[l]=t,n=l):(i[n]=a,i[s]=t,n=s);else if(lHO(c,t))i[n]=c,i[l]=t,n=l;else break e}}return e}function HO(i,e){var t=i.sortIndex-e.sortIndex;return t!==0?t:i.id-e.id}typeof performance=="object"&&typeof performance.now=="function"?(SNe=performance,Us.unstable_now=function(){return SNe.now()}):(Ene=Date,kNe=Ene.now(),Us.unstable_now=function(){return Ene.now()-kNe});var SNe,Ene,kNe,cg=[],M6=[],agt=1,E1=null,qd=3,WO=!1,d_=!1,UL=!1,DNe=typeof setTimeout=="function"?setTimeout:null,TNe=typeof clearTimeout=="function"?clearTimeout:null,LNe=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Mne(i){for(var e=Bp(M6);e!==null;){if(e.callback===null)VO(M6);else if(e.startTime<=i)VO(M6),e.sortIndex=e.expirationTime,Ine(cg,e);else break;e=Bp(M6)}}function Nne(i){if(UL=!1,Mne(i),!d_)if(Bp(cg)!==null)d_=!0,Rne(Ane);else{var e=Bp(M6);e!==null&&Pne(Nne,e.startTime-i)}}function Ane(i,e){d_=!1,UL&&(UL=!1,TNe($L),$L=-1),WO=!0;var t=qd;try{for(Mne(e),E1=Bp(cg);E1!==null&&(!(E1.expirationTime>e)||i&&!NNe());){var n=E1.callback;if(typeof n=="function"){E1.callback=null,qd=E1.priorityLevel;var o=n(E1.expirationTime<=e);e=Us.unstable_now(),typeof o=="function"?E1.callback=o:E1===Bp(cg)&&VO(cg),Mne(e)}else VO(cg);E1=Bp(cg)}if(E1!==null)var r=!0;else{var s=Bp(M6);s!==null&&Pne(Nne,s.startTime-e),r=!1}return r}finally{E1=null,qd=t,WO=!1}}var UO=!1,BO=null,$L=-1,INe=5,MNe=-1;function NNe(){return!(Us.unstable_now()-MNei||125n?(i.sortIndex=t,Ine(M6,i),Bp(cg)===null&&i===Bp(M6)&&(UL?(TNe($L),$L=-1):UL=!0,Pne(Nne,t-n))):(i.sortIndex=o,Ine(cg,i),d_||WO||(d_=!0,Rne(Ane))),i};Us.unstable_shouldYield=NNe;Us.unstable_wrapCallback=function(i){var e=qd;return function(){var t=qd;qd=e;try{return i.apply(this,arguments)}finally{qd=t}}}});var PNe=ot((Qqt,RNe)=>{"use strict";RNe.exports=ANe()});var HPe=ot(Lf=>{"use strict";var lgt=xi(),Sf=PNe();function Di(i){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+i,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ooe=Object.prototype.hasOwnProperty,cgt=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ONe={},zNe={};function dgt(i){return ooe.call(zNe,i)?!0:ooe.call(ONe,i)?!1:cgt.test(i)?zNe[i]=!0:(ONe[i]=!0,!1)}function ugt(i,e,t,n){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:t!==null?!t.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function hgt(i,e,t,n){if(e===null||typeof e>"u"||ugt(i,e,t,n))return!0;if(n)return!1;if(t!==null)switch(t.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Fu(i,e,t,n,o,r,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=t,this.propertyName=i,this.type=e,this.sanitizeURL=r,this.removeEmptyString=s}var vd={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){vd[i]=new Fu(i,0,!1,i,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var e=i[0];vd[e]=new Fu(e,1,!1,i[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(i){vd[i]=new Fu(i,2,!1,i.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){vd[i]=new Fu(i,2,!1,i,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){vd[i]=new Fu(i,3,!1,i.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(i){vd[i]=new Fu(i,3,!0,i,null,!1,!1)});["capture","download"].forEach(function(i){vd[i]=new Fu(i,4,!1,i,null,!1,!1)});["cols","rows","size","span"].forEach(function(i){vd[i]=new Fu(i,6,!1,i,null,!1,!1)});["rowSpan","start"].forEach(function(i){vd[i]=new Fu(i,5,!1,i.toLowerCase(),null,!1,!1)});var Zoe=/[\-:]([a-z])/g;function Xoe(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var e=i.replace(Zoe,Xoe);vd[e]=new Fu(e,1,!1,i,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var e=i.replace(Zoe,Xoe);vd[e]=new Fu(e,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(i){var e=i.replace(Zoe,Xoe);vd[e]=new Fu(e,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(i){vd[i]=new Fu(i,1,!1,i.toLowerCase(),null,!1,!1)});vd.xlinkHref=new Fu("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(i){vd[i]=new Fu(i,1,!1,i.toLowerCase(),null,!0,!0)});function Qoe(i,e,t,n){var o=vd.hasOwnProperty(e)?vd[e]:null;(o!==null?o.type!==0:n||!(2e in i?HL(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var P=(i,e)=>()=>(i&&(e=i(i=0)),e);var ot=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),Ai=(i,e)=>{for(var t in e)HL(i,t,{get:e[t],enumerable:!0})},cNe=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Wmt(e))!$mt.call(i,o)&&o!==t&&HL(i,o,{get:()=>e[o],enumerable:!(n=Vmt(e,o))||n.enumerable});return i};var vt=(i,e,t)=>(t=i!=null?Bmt(Umt(i)):{},cNe(e||!i||!i.__esModule?HL(t,"default",{value:i,enumerable:!0}):t,i)),BL=i=>cNe(HL({},"__esModule",{value:!0}),i);var FO=(i,e,t)=>(jmt(i,typeof e!="symbol"?e+"":e,t),t),dNe=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var c_=(i,e,t)=>(dNe(i,e,"read from private field"),t?t.call(i):e.get(i)),yne=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Cne=(i,e,t,n)=>(dNe(i,e,"write to private field"),n?n.call(i,t):e.set(i,t),t);var wNe=ot(Xo=>{"use strict";var VL=Symbol.for("react.element"),qmt=Symbol.for("react.portal"),Gmt=Symbol.for("react.fragment"),Kmt=Symbol.for("react.strict_mode"),Ymt=Symbol.for("react.profiler"),Zmt=Symbol.for("react.provider"),Xmt=Symbol.for("react.context"),Qmt=Symbol.for("react.forward_ref"),Jmt=Symbol.for("react.suspense"),egt=Symbol.for("react.memo"),tgt=Symbol.for("react.lazy"),uNe=Symbol.iterator;function igt(i){return i===null||typeof i!="object"?null:(i=uNe&&i[uNe]||i["@@iterator"],typeof i=="function"?i:null)}var pNe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},mNe=Object.assign,gNe={};function M9(i,e,t){this.props=i,this.context=e,this.refs=gNe,this.updater=t||pNe}M9.prototype.isReactComponent={};M9.prototype.setState=function(i,e){if(typeof i!="object"&&typeof i!="function"&&i!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,i,e,"setState")};M9.prototype.forceUpdate=function(i){this.updater.enqueueForceUpdate(this,i,"forceUpdate")};function vNe(){}vNe.prototype=M9.prototype;function xne(i,e,t){this.props=i,this.context=e,this.refs=gNe,this.updater=t||pNe}var Sne=xne.prototype=new vNe;Sne.constructor=xne;mNe(Sne,M9.prototype);Sne.isPureReactComponent=!0;var hNe=Array.isArray,_Ne=Object.prototype.hasOwnProperty,kne={current:null},bNe={key:!0,ref:!0,__self:!0,__source:!0};function yNe(i,e,t){var n,o={},r=null,s=null;if(e!=null)for(n in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(r=""+e.key),e)_Ne.call(e,n)&&!bNe.hasOwnProperty(n)&&(o[n]=e[n]);var a=arguments.length-2;if(a===1)o.children=t;else if(1{"use strict";xNe.exports=wNe()});var ANe=ot(Us=>{"use strict";function Ine(i,e){var t=i.length;i.push(e);e:for(;0>>1,o=i[n];if(0>>1;nWO(a,t))lWO(c,a)?(i[n]=c,i[l]=t,n=l):(i[n]=a,i[s]=t,n=s);else if(lWO(c,t))i[n]=c,i[l]=t,n=l;else break e}}return e}function WO(i,e){var t=i.sortIndex-e.sortIndex;return t!==0?t:i.id-e.id}typeof performance=="object"&&typeof performance.now=="function"?(SNe=performance,Us.unstable_now=function(){return SNe.now()}):(Ene=Date,kNe=Ene.now(),Us.unstable_now=function(){return Ene.now()-kNe});var SNe,Ene,kNe,cg=[],N6=[],agt=1,E1=null,qd=3,jO=!1,d_=!1,UL=!1,DNe=typeof setTimeout=="function"?setTimeout:null,TNe=typeof clearTimeout=="function"?clearTimeout:null,LNe=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Mne(i){for(var e=Bp(N6);e!==null;){if(e.callback===null)$O(N6);else if(e.startTime<=i)$O(N6),e.sortIndex=e.expirationTime,Ine(cg,e);else break;e=Bp(N6)}}function Nne(i){if(UL=!1,Mne(i),!d_)if(Bp(cg)!==null)d_=!0,Rne(Ane);else{var e=Bp(N6);e!==null&&Pne(Nne,e.startTime-i)}}function Ane(i,e){d_=!1,UL&&(UL=!1,TNe($L),$L=-1),jO=!0;var t=qd;try{for(Mne(e),E1=Bp(cg);E1!==null&&(!(E1.expirationTime>e)||i&&!NNe());){var n=E1.callback;if(typeof n=="function"){E1.callback=null,qd=E1.priorityLevel;var o=n(E1.expirationTime<=e);e=Us.unstable_now(),typeof o=="function"?E1.callback=o:E1===Bp(cg)&&$O(cg),Mne(e)}else $O(cg);E1=Bp(cg)}if(E1!==null)var r=!0;else{var s=Bp(N6);s!==null&&Pne(Nne,s.startTime-e),r=!1}return r}finally{E1=null,qd=t,jO=!1}}var qO=!1,UO=null,$L=-1,INe=5,MNe=-1;function NNe(){return!(Us.unstable_now()-MNei||125n?(i.sortIndex=t,Ine(N6,i),Bp(cg)===null&&i===Bp(N6)&&(UL?(TNe($L),$L=-1):UL=!0,Pne(Nne,t-n))):(i.sortIndex=o,Ine(cg,i),d_||jO||(d_=!0,Rne(Ane))),i};Us.unstable_shouldYield=NNe;Us.unstable_wrapCallback=function(i){var e=qd;return function(){var t=qd;qd=e;try{return i.apply(this,arguments)}finally{qd=t}}}});var PNe=ot((Jqt,RNe)=>{"use strict";RNe.exports=ANe()});var HPe=ot(Lf=>{"use strict";var lgt=xi(),Sf=PNe();function Di(i){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+i,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ooe=Object.prototype.hasOwnProperty,cgt=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ONe={},zNe={};function dgt(i){return ooe.call(zNe,i)?!0:ooe.call(ONe,i)?!1:cgt.test(i)?zNe[i]=!0:(ONe[i]=!0,!1)}function ugt(i,e,t,n){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:t!==null?!t.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function hgt(i,e,t,n){if(e===null||typeof e>"u"||ugt(i,e,t,n))return!0;if(n)return!1;if(t!==null)switch(t.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Fu(i,e,t,n,o,r,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=t,this.propertyName=i,this.type=e,this.sanitizeURL=r,this.removeEmptyString=s}var vd={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){vd[i]=new Fu(i,0,!1,i,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var e=i[0];vd[e]=new Fu(e,1,!1,i[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(i){vd[i]=new Fu(i,2,!1,i.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){vd[i]=new Fu(i,2,!1,i,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){vd[i]=new Fu(i,3,!1,i.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(i){vd[i]=new Fu(i,3,!0,i,null,!1,!1)});["capture","download"].forEach(function(i){vd[i]=new Fu(i,4,!1,i,null,!1,!1)});["cols","rows","size","span"].forEach(function(i){vd[i]=new Fu(i,6,!1,i,null,!1,!1)});["rowSpan","start"].forEach(function(i){vd[i]=new Fu(i,5,!1,i.toLowerCase(),null,!1,!1)});var Zoe=/[\-:]([a-z])/g;function Xoe(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var e=i.replace(Zoe,Xoe);vd[e]=new Fu(e,1,!1,i,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var e=i.replace(Zoe,Xoe);vd[e]=new Fu(e,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(i){var e=i.replace(Zoe,Xoe);vd[e]=new Fu(e,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(i){vd[i]=new Fu(i,1,!1,i.toLowerCase(),null,!1,!1)});vd.xlinkHref=new Fu("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(i){vd[i]=new Fu(i,1,!1,i.toLowerCase(),null,!0,!0)});function Qoe(i,e,t,n){var o=vd.hasOwnProperty(e)?vd[e]:null;(o!==null?o.type!==0:n||!(2a||o[s]!==r[a]){var l=` -`+o[s].replace(" at new "," at ");return i.displayName&&l.includes("")&&(l=l.replace("",i.displayName)),l}while(1<=s&&0<=a);break}}}finally{zne=!1,Error.prepareStackTrace=t}return(i=i?i.displayName||i.name:"")?JL(i):""}function fgt(i){switch(i.tag){case 5:return JL(i.type);case 16:return JL("Lazy");case 13:return JL("Suspense");case 19:return JL("SuspenseList");case 0:case 2:case 15:return i=Fne(i.type,!1),i;case 11:return i=Fne(i.type.render,!1),i;case 1:return i=Fne(i.type,!0),i;default:return""}}function loe(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case P9:return"Fragment";case R9:return"Portal";case roe:return"Profiler";case Joe:return"StrictMode";case soe:return"Suspense";case aoe:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case $Ae:return(i.displayName||"Context")+".Consumer";case UAe:return(i._context.displayName||"Context")+".Provider";case ere:var e=i.render;return i=i.displayName,i||(i=e.displayName||e.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case tre:return e=i.displayName||null,e!==null?e:loe(i.type)||"Memo";case A6:e=i._payload,i=i._init;try{return loe(i(e))}catch{}}return null}function pgt(i){var e=i.type;switch(i.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=e.render,i=i.displayName||i.name||"",e.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return loe(e);case 8:return e===Joe?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function G6(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function qAe(i){var e=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function mgt(i){var e=qAe(i)?"checked":"value",t=Object.getOwnPropertyDescriptor(i.constructor.prototype,e),n=""+i[e];if(!i.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var o=t.get,r=t.set;return Object.defineProperty(i,e,{configurable:!0,get:function(){return o.call(this)},set:function(s){n=""+s,r.call(this,s)}}),Object.defineProperty(i,e,{enumerable:t.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){i._valueTracker=null,delete i[e]}}}}function jO(i){i._valueTracker||(i._valueTracker=mgt(i))}function GAe(i){if(!i)return!1;var e=i._valueTracker;if(!e)return!0;var t=e.getValue(),n="";return i&&(n=qAe(i)?i.checked?"true":"false":i.value),i=n,i!==t?(e.setValue(i),!0):!1}function bz(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function coe(i,e){var t=e.checked;return Ea({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??i._wrapperState.initialChecked})}function HNe(i,e){var t=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;t=G6(e.value!=null?e.value:t),i._wrapperState={initialChecked:n,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function KAe(i,e){e=e.checked,e!=null&&Qoe(i,"checked",e,!1)}function doe(i,e){KAe(i,e);var t=G6(e.value),n=e.type;if(t!=null)n==="number"?(t===0&&i.value===""||i.value!=t)&&(i.value=""+t):i.value!==""+t&&(i.value=""+t);else if(n==="submit"||n==="reset"){i.removeAttribute("value");return}e.hasOwnProperty("value")?uoe(i,e.type,t):e.hasOwnProperty("defaultValue")&&uoe(i,e.type,G6(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(i.defaultChecked=!!e.defaultChecked)}function BNe(i,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+i._wrapperState.initialValue,t||e===i.value||(i.value=e),i.defaultValue=e}t=i.name,t!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,t!==""&&(i.name=t)}function uoe(i,e,t){(e!=="number"||bz(i.ownerDocument)!==i)&&(t==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+t&&(i.defaultValue=""+t))}var eE=Array.isArray;function q9(i,e,t,n){if(i=i.options,e){e={};for(var o=0;o"+e.valueOf().toString()+"",e=qO.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;e.firstChild;)i.appendChild(e.firstChild)}});function fE(i,e){if(e){var t=i.firstChild;if(t&&t===i.lastChild&&t.nodeType===3){t.nodeValue=e;return}}i.textContent=e}var nE={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ggt=["Webkit","ms","Moz","O"];Object.keys(nE).forEach(function(i){ggt.forEach(function(e){e=e+i.charAt(0).toUpperCase()+i.substring(1),nE[e]=nE[i]})});function QAe(i,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||nE.hasOwnProperty(i)&&nE[i]?(""+e).trim():e+"px"}function JAe(i,e){i=i.style;for(var t in e)if(e.hasOwnProperty(t)){var n=t.indexOf("--")===0,o=QAe(t,e[t],n);t==="float"&&(t="cssFloat"),n?i.setProperty(t,o):i[t]=o}}var vgt=Ea({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function poe(i,e){if(e){if(vgt[i]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Di(137,i));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Di(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Di(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Di(62))}}function moe(i,e){if(i.indexOf("-")===-1)return typeof e.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var goe=null;function ire(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var voe=null,G9=null,K9=null;function UNe(i){if(i=ME(i)){if(typeof voe!="function")throw Error(Di(280));var e=i.stateNode;e&&(e=Gz(e),voe(i.stateNode,i.type,e))}}function eRe(i){G9?K9?K9.push(i):K9=[i]:G9=i}function tRe(){if(G9){var i=G9,e=K9;if(K9=G9=null,UNe(i),e)for(i=0;i>>=0,i===0?32:31-(Dgt(i)/Tgt|0)|0}var GO=64,KO=4194304;function tE(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function xz(i,e){var t=i.pendingLanes;if(t===0)return 0;var n=0,o=i.suspendedLanes,r=i.pingedLanes,s=t&268435455;if(s!==0){var a=s&~o;a!==0?n=tE(a):(r&=s,r!==0&&(n=tE(r)))}else s=t&~o,s!==0?n=tE(s):r!==0&&(n=tE(r));if(n===0)return 0;if(e!==0&&e!==n&&!(e&o)&&(o=n&-n,r=e&-e,o>=r||o===16&&(r&4194240)!==0))return e;if(n&4&&(n|=t&16),e=i.entangledLanes,e!==0)for(i=i.entanglements,e&=n;0t;t++)e.push(i);return e}function TE(i,e,t){i.pendingLanes|=e,e!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,e=31-jp(e),i[e]=t}function Agt(i,e){var t=i.pendingLanes&~e;i.pendingLanes=e,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=e,i.mutableReadLanes&=e,i.entangledLanes&=e,e=i.entanglements;var n=i.eventTimes;for(i=i.expirationTimes;0=rE),QNe=" ",JNe=!1;function CRe(i,e){switch(i){case"keyup":return a2t.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wRe(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var O9=!1;function c2t(i,e){switch(i){case"compositionend":return wRe(e);case"keypress":return e.which!==32?null:(JNe=!0,QNe);case"textInput":return i=e.data,i===QNe&&JNe?null:i;default:return null}}function d2t(i,e){if(O9)return i==="compositionend"||!dre&&CRe(i,e)?(i=bRe(),dz=are=z6=null,O9=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:t,offset:e-i};i=n}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=iAe(t)}}function LRe(i,e){return i&&e?i===e?!0:i&&i.nodeType===3?!1:e&&e.nodeType===3?LRe(i,e.parentNode):"contains"in i?i.contains(e):i.compareDocumentPosition?!!(i.compareDocumentPosition(e)&16):!1:!1}function ERe(){for(var i=window,e=bz();e instanceof i.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)i=e.contentWindow;else break;e=bz(i.document)}return e}function ure(i){var e=i&&i.nodeName&&i.nodeName.toLowerCase();return e&&(e==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||e==="textarea"||i.contentEditable==="true")}function b2t(i){var e=ERe(),t=i.focusedElem,n=i.selectionRange;if(e!==t&&t&&t.ownerDocument&&LRe(t.ownerDocument.documentElement,t)){if(n!==null&&ure(t)){if(e=n.start,i=n.end,i===void 0&&(i=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(i,t.value.length);else if(i=(e=t.ownerDocument||document)&&e.defaultView||window,i.getSelection){i=i.getSelection();var o=t.textContent.length,r=Math.min(n.start,o);n=n.end===void 0?r:Math.min(n.end,o),!i.extend&&r>n&&(o=n,n=r,r=o),o=nAe(t,r);var s=nAe(t,n);o&&s&&(i.rangeCount!==1||i.anchorNode!==o.node||i.anchorOffset!==o.offset||i.focusNode!==s.node||i.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(o.node,o.offset),i.removeAllRanges(),r>n?(i.addRange(e),i.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),i.addRange(e)))}}for(e=[],i=t;i=i.parentNode;)i.nodeType===1&&e.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,z9=null,xoe=null,aE=null,Soe=!1;function oAe(i,e,t){var n=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;Soe||z9==null||z9!==bz(n)||(n=z9,"selectionStart"in n&&ure(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),aE&&bE(aE,n)||(aE=n,n=Lz(xoe,"onSelect"),0B9||(i.current=Ioe[B9],Ioe[B9]=null,B9--)}function $s(i,e){B9++,Ioe[B9]=i.current,i.current=e}var K6={},Zd=Z6(K6),Dh=Z6(!1),__=K6;function J9(i,e){var t=i.type.contextTypes;if(!t)return K6;var n=i.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var o={},r;for(r in t)o[r]=e[r];return n&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=e,i.__reactInternalMemoizedMaskedChildContext=o),o}function Th(i){return i=i.childContextTypes,i!=null}function Dz(){na(Dh),na(Zd)}function fAe(i,e,t){if(Zd.current!==K6)throw Error(Di(168));$s(Zd,e),$s(Dh,t)}function ORe(i,e,t){var n=i.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return t;n=n.getChildContext();for(var o in n)if(!(o in e))throw Error(Di(108,pgt(i)||"Unknown",o));return Ea({},t,n)}function Tz(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||K6,__=Zd.current,$s(Zd,i),$s(Dh,Dh.current),!0}function pAe(i,e,t){var n=i.stateNode;if(!n)throw Error(Di(169));t?(i=ORe(i,e,__),n.__reactInternalMemoizedMergedChildContext=i,na(Dh),na(Zd),$s(Zd,i)):na(Dh),$s(Dh,t)}var p0=null,Kz=!1,Yne=!1;function zRe(i){p0===null?p0=[i]:p0.push(i)}function T2t(i){Kz=!0,zRe(i)}function X6(){if(!Yne&&p0!==null){Yne=!0;var i=0,e=_s;try{var t=p0;for(_s=1;i>=s,o-=s,m0=1<<32-jp(e)+o|t<k?(D=x,x=null):D=x.sibling;var E=h(_,x,b[k],C);if(E===null){x===null&&(x=D);break}i&&x&&E.alternate===null&&e(_,x),v=r(E,v,k),S===null?w=E:S.sibling=E,S=E,x=D}if(k===b.length)return t(_,x),pa&&u_(_,k),w;if(x===null){for(;kk?(D=x,x=null):D=x.sibling;var A=h(_,x,E.value,C);if(A===null){x===null&&(x=D);break}i&&x&&A.alternate===null&&e(_,x),v=r(A,v,k),S===null?w=A:S.sibling=A,S=A,x=D}if(E.done)return t(_,x),pa&&u_(_,k),w;if(x===null){for(;!E.done;k++,E=b.next())E=u(_,E.value,C),E!==null&&(v=r(E,v,k),S===null?w=E:S.sibling=E,S=E);return pa&&u_(_,k),w}for(x=n(_,x);!E.done;k++,E=b.next())E=f(x,_,k,E.value,C),E!==null&&(i&&E.alternate!==null&&x.delete(E.key===null?k:E.key),v=r(E,v,k),S===null?w=E:S.sibling=E,S=E);return i&&x.forEach(function(T){return e(_,T)}),pa&&u_(_,k),w}function y(_,v,b,C){if(typeof b=="object"&&b!==null&&b.type===P9&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case $O:e:{for(var w=b.key,S=v;S!==null;){if(S.key===w){if(w=b.type,w===P9){if(S.tag===7){t(_,S.sibling),v=o(S,b.props.children),v.return=_,_=v;break e}}else if(S.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===A6&&vAe(w)===S.type){t(_,S.sibling),v=o(S,b.props),v.ref=YL(_,S,b),v.return=_,_=v;break e}t(_,S);break}else e(_,S);S=S.sibling}b.type===P9?(v=v_(b.props.children,_.mode,C,b.key),v.return=_,_=v):(C=_z(b.type,b.key,b.props,null,_.mode,C),C.ref=YL(_,v,b),C.return=_,_=C)}return s(_);case R9:e:{for(S=b.key;v!==null;){if(v.key===S)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){t(_,v.sibling),v=o(v,b.children||[]),v.return=_,_=v;break e}else{t(_,v);break}else e(_,v);v=v.sibling}v=noe(b,_.mode,C),v.return=_,_=v}return s(_);case A6:return S=b._init,y(_,v,S(b._payload),C)}if(eE(b))return p(_,v,b,C);if(jL(b))return m(_,v,b,C);rz(_,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(t(_,v.sibling),v=o(v,b),v.return=_,_=v):(t(_,v),v=ioe(b,_.mode,C),v.return=_,_=v),s(_)):t(_,v)}return y}var ty=VRe(!0),WRe=VRe(!1),Nz=Z6(null),Az=null,U9=null,mre=null;function gre(){mre=U9=Az=null}function vre(i){var e=Nz.current;na(Nz),i._currentValue=e}function Aoe(i,e,t){for(;i!==null;){var n=i.alternate;if((i.childLanes&e)!==e?(i.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),i===t)break;i=i.return}}function Z9(i,e){Az=i,mre=U9=null,i=i.dependencies,i!==null&&i.firstContext!==null&&(i.lanes&e&&(Eh=!0),i.firstContext=null)}function N1(i){var e=i._currentValue;if(mre!==i)if(i={context:i,memoizedValue:e,next:null},U9===null){if(Az===null)throw Error(Di(308));U9=i,Az.dependencies={lanes:0,firstContext:i}}else U9=U9.next=i;return e}var p_=null;function _re(i){p_===null?p_=[i]:p_.push(i)}function URe(i,e,t,n){var o=e.interleaved;return o===null?(t.next=t,_re(e)):(t.next=o.next,o.next=t),e.interleaved=t,y0(i,n)}function y0(i,e){i.lanes|=e;var t=i.alternate;for(t!==null&&(t.lanes|=e),t=i,i=i.return;i!==null;)i.childLanes|=e,t=i.alternate,t!==null&&(t.childLanes|=e),t=i,i=i.return;return t.tag===3?t.stateNode:null}var R6=!1;function bre(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $Re(i,e){i=i.updateQueue,e.updateQueue===i&&(e.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function v0(i,e){return{eventTime:i,lane:e,tag:0,payload:null,callback:null,next:null}}function U6(i,e,t){var n=i.updateQueue;if(n===null)return null;if(n=n.shared,Mr&2){var o=n.pending;return o===null?e.next=e:(e.next=o.next,o.next=e),n.pending=e,y0(i,t)}return o=n.interleaved,o===null?(e.next=e,_re(n)):(e.next=o.next,o.next=e),n.interleaved=e,y0(i,t)}function hz(i,e,t){if(e=e.updateQueue,e!==null&&(e=e.shared,(t&4194240)!==0)){var n=e.lanes;n&=i.pendingLanes,t|=n,e.lanes=t,ore(i,t)}}function _Ae(i,e){var t=i.updateQueue,n=i.alternate;if(n!==null&&(n=n.updateQueue,t===n)){var o=null,r=null;if(t=t.firstBaseUpdate,t!==null){do{var s={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};r===null?o=r=s:r=r.next=s,t=t.next}while(t!==null);r===null?o=r=e:r=r.next=e}else o=r=e;t={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:r,shared:n.shared,effects:n.effects},i.updateQueue=t;return}i=t.lastBaseUpdate,i===null?t.firstBaseUpdate=e:i.next=e,t.lastBaseUpdate=e}function Rz(i,e,t,n){var o=i.updateQueue;R6=!1;var r=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?r=c:s.next=c,s=l;var d=i.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==s&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(r!==null){var u=o.baseState;s=0,d=c=l=null,a=r;do{var h=a.lane,f=a.eventTime;if((n&h)===h){d!==null&&(d=d.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=i,m=a;switch(h=e,f=t,m.tag){case 1:if(p=m.payload,typeof p=="function"){u=p.call(f,u,h);break e}u=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,h=typeof p=="function"?p.call(f,u,h):p,h==null)break e;u=Ea({},u,h);break e;case 2:R6=!0}}a.callback!==null&&a.lane!==0&&(i.flags|=64,h=o.effects,h===null?o.effects=[a]:h.push(a))}else f={eventTime:f,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=f,l=u):d=d.next=f,s|=h;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;h=a,a=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);if(d===null&&(l=u),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=d,e=o.shared.interleaved,e!==null){o=e;do s|=o.lane,o=o.next;while(o!==e)}else r===null&&(o.shared.lanes=0);C_|=s,i.lanes=s,i.memoizedState=u}}function bAe(i,e,t){if(i=e.effects,e.effects=null,i!==null)for(e=0;et?t:4,i(!0);var n=Xne.transition;Xne.transition={};try{i(!1),e()}finally{_s=t,Xne.transition=n}}function aPe(){return A1().memoizedState}function A2t(i,e,t){var n=j6(i);if(t={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null},lPe(i))cPe(e,t);else if(t=URe(i,e,t,n),t!==null){var o=zu();qp(t,i,n,o),dPe(t,e,n)}}function R2t(i,e,t){var n=j6(i),o={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null};if(lPe(i))cPe(e,o);else{var r=i.alternate;if(i.lanes===0&&(r===null||r.lanes===0)&&(r=e.lastRenderedReducer,r!==null))try{var s=e.lastRenderedState,a=r(s,t);if(o.hasEagerState=!0,o.eagerState=a,Gp(a,s)){var l=e.interleaved;l===null?(o.next=o,_re(e)):(o.next=l.next,l.next=o),e.interleaved=o;return}}catch{}finally{}t=URe(i,e,o,n),t!==null&&(o=zu(),qp(t,i,n,o),dPe(t,e,n))}}function lPe(i){var e=i.alternate;return i===La||e!==null&&e===La}function cPe(i,e){lE=Oz=!0;var t=i.pending;t===null?e.next=e:(e.next=t.next,t.next=e),i.pending=e}function dPe(i,e,t){if(t&4194240){var n=e.lanes;n&=i.pendingLanes,t|=n,e.lanes=t,ore(i,t)}}var zz={readContext:N1,useCallback:Gd,useContext:Gd,useEffect:Gd,useImperativeHandle:Gd,useInsertionEffect:Gd,useLayoutEffect:Gd,useMemo:Gd,useReducer:Gd,useRef:Gd,useState:Gd,useDebugValue:Gd,useDeferredValue:Gd,useTransition:Gd,useMutableSource:Gd,useSyncExternalStore:Gd,useId:Gd,unstable_isNewReconciler:!1},P2t={readContext:N1,useCallback:function(i,e){return ug().memoizedState=[i,e===void 0?null:e],i},useContext:N1,useEffect:CAe,useImperativeHandle:function(i,e,t){return t=t!=null?t.concat([i]):null,pz(4194308,4,iPe.bind(null,e,i),t)},useLayoutEffect:function(i,e){return pz(4194308,4,i,e)},useInsertionEffect:function(i,e){return pz(4,2,i,e)},useMemo:function(i,e){var t=ug();return e=e===void 0?null:e,i=i(),t.memoizedState=[i,e],i},useReducer:function(i,e,t){var n=ug();return e=t!==void 0?t(e):e,n.memoizedState=n.baseState=e,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:e},n.queue=i,i=i.dispatch=A2t.bind(null,La,i),[n.memoizedState,i]},useRef:function(i){var e=ug();return i={current:i},e.memoizedState=i},useState:yAe,useDebugValue:Ere,useDeferredValue:function(i){return ug().memoizedState=i},useTransition:function(){var i=yAe(!1),e=i[0];return i=N2t.bind(null,i[1]),ug().memoizedState=i,[e,i]},useMutableSource:function(){},useSyncExternalStore:function(i,e,t){var n=La,o=ug();if(pa){if(t===void 0)throw Error(Di(407));t=t()}else{if(t=e(),Vc===null)throw Error(Di(349));y_&30||KRe(n,e,t)}o.memoizedState=t;var r={value:t,getSnapshot:e};return o.queue=r,CAe(ZRe.bind(null,n,r,i),[i]),n.flags|=2048,EE(9,YRe.bind(null,n,r,t,e),void 0,null),t},useId:function(){var i=ug(),e=Vc.identifierPrefix;if(pa){var t=g0,n=m0;t=(n&~(1<<32-jp(n)-1)).toString(32)+t,e=":"+e+"R"+t,t=kE++,0")&&(l=l.replace("",i.displayName)),l}while(1<=s&&0<=a);break}}}finally{zne=!1,Error.prepareStackTrace=t}return(i=i?i.displayName||i.name:"")?JL(i):""}function fgt(i){switch(i.tag){case 5:return JL(i.type);case 16:return JL("Lazy");case 13:return JL("Suspense");case 19:return JL("SuspenseList");case 0:case 2:case 15:return i=Fne(i.type,!1),i;case 11:return i=Fne(i.type.render,!1),i;case 1:return i=Fne(i.type,!0),i;default:return""}}function loe(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case P9:return"Fragment";case R9:return"Portal";case roe:return"Profiler";case Joe:return"StrictMode";case soe:return"Suspense";case aoe:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case $Ae:return(i.displayName||"Context")+".Consumer";case UAe:return(i._context.displayName||"Context")+".Provider";case ere:var e=i.render;return i=i.displayName,i||(i=e.displayName||e.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case tre:return e=i.displayName||null,e!==null?e:loe(i.type)||"Memo";case R6:e=i._payload,i=i._init;try{return loe(i(e))}catch{}}return null}function pgt(i){var e=i.type;switch(i.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=e.render,i=i.displayName||i.name||"",e.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return loe(e);case 8:return e===Joe?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function K6(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function qAe(i){var e=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function mgt(i){var e=qAe(i)?"checked":"value",t=Object.getOwnPropertyDescriptor(i.constructor.prototype,e),n=""+i[e];if(!i.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var o=t.get,r=t.set;return Object.defineProperty(i,e,{configurable:!0,get:function(){return o.call(this)},set:function(s){n=""+s,r.call(this,s)}}),Object.defineProperty(i,e,{enumerable:t.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){i._valueTracker=null,delete i[e]}}}}function KO(i){i._valueTracker||(i._valueTracker=mgt(i))}function GAe(i){if(!i)return!1;var e=i._valueTracker;if(!e)return!0;var t=e.getValue(),n="";return i&&(n=qAe(i)?i.checked?"true":"false":i.value),i=n,i!==t?(e.setValue(i),!0):!1}function wz(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function coe(i,e){var t=e.checked;return Ea({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??i._wrapperState.initialChecked})}function HNe(i,e){var t=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;t=K6(e.value!=null?e.value:t),i._wrapperState={initialChecked:n,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function KAe(i,e){e=e.checked,e!=null&&Qoe(i,"checked",e,!1)}function doe(i,e){KAe(i,e);var t=K6(e.value),n=e.type;if(t!=null)n==="number"?(t===0&&i.value===""||i.value!=t)&&(i.value=""+t):i.value!==""+t&&(i.value=""+t);else if(n==="submit"||n==="reset"){i.removeAttribute("value");return}e.hasOwnProperty("value")?uoe(i,e.type,t):e.hasOwnProperty("defaultValue")&&uoe(i,e.type,K6(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(i.defaultChecked=!!e.defaultChecked)}function BNe(i,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+i._wrapperState.initialValue,t||e===i.value||(i.value=e),i.defaultValue=e}t=i.name,t!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,t!==""&&(i.name=t)}function uoe(i,e,t){(e!=="number"||wz(i.ownerDocument)!==i)&&(t==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+t&&(i.defaultValue=""+t))}var eE=Array.isArray;function q9(i,e,t,n){if(i=i.options,e){e={};for(var o=0;o"+e.valueOf().toString()+"",e=YO.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;e.firstChild;)i.appendChild(e.firstChild)}});function fE(i,e){if(e){var t=i.firstChild;if(t&&t===i.lastChild&&t.nodeType===3){t.nodeValue=e;return}}i.textContent=e}var nE={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ggt=["Webkit","ms","Moz","O"];Object.keys(nE).forEach(function(i){ggt.forEach(function(e){e=e+i.charAt(0).toUpperCase()+i.substring(1),nE[e]=nE[i]})});function QAe(i,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||nE.hasOwnProperty(i)&&nE[i]?(""+e).trim():e+"px"}function JAe(i,e){i=i.style;for(var t in e)if(e.hasOwnProperty(t)){var n=t.indexOf("--")===0,o=QAe(t,e[t],n);t==="float"&&(t="cssFloat"),n?i.setProperty(t,o):i[t]=o}}var vgt=Ea({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function poe(i,e){if(e){if(vgt[i]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Di(137,i));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Di(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Di(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Di(62))}}function moe(i,e){if(i.indexOf("-")===-1)return typeof e.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var goe=null;function ire(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var voe=null,G9=null,K9=null;function UNe(i){if(i=ME(i)){if(typeof voe!="function")throw Error(Di(280));var e=i.stateNode;e&&(e=Zz(e),voe(i.stateNode,i.type,e))}}function eRe(i){G9?K9?K9.push(i):K9=[i]:G9=i}function tRe(){if(G9){var i=G9,e=K9;if(K9=G9=null,UNe(i),e)for(i=0;i>>=0,i===0?32:31-(Dgt(i)/Tgt|0)|0}var ZO=64,XO=4194304;function tE(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Lz(i,e){var t=i.pendingLanes;if(t===0)return 0;var n=0,o=i.suspendedLanes,r=i.pingedLanes,s=t&268435455;if(s!==0){var a=s&~o;a!==0?n=tE(a):(r&=s,r!==0&&(n=tE(r)))}else s=t&~o,s!==0?n=tE(s):r!==0&&(n=tE(r));if(n===0)return 0;if(e!==0&&e!==n&&!(e&o)&&(o=n&-n,r=e&-e,o>=r||o===16&&(r&4194240)!==0))return e;if(n&4&&(n|=t&16),e=i.entangledLanes,e!==0)for(i=i.entanglements,e&=n;0t;t++)e.push(i);return e}function TE(i,e,t){i.pendingLanes|=e,e!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,e=31-jp(e),i[e]=t}function Agt(i,e){var t=i.pendingLanes&~e;i.pendingLanes=e,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=e,i.mutableReadLanes&=e,i.entangledLanes&=e,e=i.entanglements;var n=i.eventTimes;for(i=i.expirationTimes;0=rE),QNe=" ",JNe=!1;function CRe(i,e){switch(i){case"keyup":return a2t.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wRe(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var O9=!1;function c2t(i,e){switch(i){case"compositionend":return wRe(e);case"keypress":return e.which!==32?null:(JNe=!0,QNe);case"textInput":return i=e.data,i===QNe&&JNe?null:i;default:return null}}function d2t(i,e){if(O9)return i==="compositionend"||!dre&&CRe(i,e)?(i=bRe(),fz=are=F6=null,O9=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:t,offset:e-i};i=n}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=iAe(t)}}function LRe(i,e){return i&&e?i===e?!0:i&&i.nodeType===3?!1:e&&e.nodeType===3?LRe(i,e.parentNode):"contains"in i?i.contains(e):i.compareDocumentPosition?!!(i.compareDocumentPosition(e)&16):!1:!1}function ERe(){for(var i=window,e=wz();e instanceof i.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)i=e.contentWindow;else break;e=wz(i.document)}return e}function ure(i){var e=i&&i.nodeName&&i.nodeName.toLowerCase();return e&&(e==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||e==="textarea"||i.contentEditable==="true")}function b2t(i){var e=ERe(),t=i.focusedElem,n=i.selectionRange;if(e!==t&&t&&t.ownerDocument&&LRe(t.ownerDocument.documentElement,t)){if(n!==null&&ure(t)){if(e=n.start,i=n.end,i===void 0&&(i=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(i,t.value.length);else if(i=(e=t.ownerDocument||document)&&e.defaultView||window,i.getSelection){i=i.getSelection();var o=t.textContent.length,r=Math.min(n.start,o);n=n.end===void 0?r:Math.min(n.end,o),!i.extend&&r>n&&(o=n,n=r,r=o),o=nAe(t,r);var s=nAe(t,n);o&&s&&(i.rangeCount!==1||i.anchorNode!==o.node||i.anchorOffset!==o.offset||i.focusNode!==s.node||i.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(o.node,o.offset),i.removeAllRanges(),r>n?(i.addRange(e),i.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),i.addRange(e)))}}for(e=[],i=t;i=i.parentNode;)i.nodeType===1&&e.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,z9=null,xoe=null,aE=null,Soe=!1;function oAe(i,e,t){var n=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;Soe||z9==null||z9!==wz(n)||(n=z9,"selectionStart"in n&&ure(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),aE&&bE(aE,n)||(aE=n,n=Tz(xoe,"onSelect"),0B9||(i.current=Ioe[B9],Ioe[B9]=null,B9--)}function $s(i,e){B9++,Ioe[B9]=i.current,i.current=e}var Y6={},Zd=X6(Y6),Dh=X6(!1),__=Y6;function J9(i,e){var t=i.type.contextTypes;if(!t)return Y6;var n=i.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var o={},r;for(r in t)o[r]=e[r];return n&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=e,i.__reactInternalMemoizedMaskedChildContext=o),o}function Th(i){return i=i.childContextTypes,i!=null}function Mz(){na(Dh),na(Zd)}function fAe(i,e,t){if(Zd.current!==Y6)throw Error(Di(168));$s(Zd,e),$s(Dh,t)}function ORe(i,e,t){var n=i.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return t;n=n.getChildContext();for(var o in n)if(!(o in e))throw Error(Di(108,pgt(i)||"Unknown",o));return Ea({},t,n)}function Nz(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Y6,__=Zd.current,$s(Zd,i),$s(Dh,Dh.current),!0}function pAe(i,e,t){var n=i.stateNode;if(!n)throw Error(Di(169));t?(i=ORe(i,e,__),n.__reactInternalMemoizedMergedChildContext=i,na(Dh),na(Zd),$s(Zd,i)):na(Dh),$s(Dh,t)}var p0=null,Xz=!1,Yne=!1;function zRe(i){p0===null?p0=[i]:p0.push(i)}function T2t(i){Xz=!0,zRe(i)}function Q6(){if(!Yne&&p0!==null){Yne=!0;var i=0,e=_s;try{var t=p0;for(_s=1;i>=s,o-=s,m0=1<<32-jp(e)+o|t<k?(D=x,x=null):D=x.sibling;var E=h(_,x,b[k],C);if(E===null){x===null&&(x=D);break}i&&x&&E.alternate===null&&e(_,x),v=r(E,v,k),S===null?w=E:S.sibling=E,S=E,x=D}if(k===b.length)return t(_,x),pa&&u_(_,k),w;if(x===null){for(;kk?(D=x,x=null):D=x.sibling;var A=h(_,x,E.value,C);if(A===null){x===null&&(x=D);break}i&&x&&A.alternate===null&&e(_,x),v=r(A,v,k),S===null?w=A:S.sibling=A,S=A,x=D}if(E.done)return t(_,x),pa&&u_(_,k),w;if(x===null){for(;!E.done;k++,E=b.next())E=u(_,E.value,C),E!==null&&(v=r(E,v,k),S===null?w=E:S.sibling=E,S=E);return pa&&u_(_,k),w}for(x=n(_,x);!E.done;k++,E=b.next())E=f(x,_,k,E.value,C),E!==null&&(i&&E.alternate!==null&&x.delete(E.key===null?k:E.key),v=r(E,v,k),S===null?w=E:S.sibling=E,S=E);return i&&x.forEach(function(T){return e(_,T)}),pa&&u_(_,k),w}function y(_,v,b,C){if(typeof b=="object"&&b!==null&&b.type===P9&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case GO:e:{for(var w=b.key,S=v;S!==null;){if(S.key===w){if(w=b.type,w===P9){if(S.tag===7){t(_,S.sibling),v=o(S,b.props.children),v.return=_,_=v;break e}}else if(S.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===R6&&vAe(w)===S.type){t(_,S.sibling),v=o(S,b.props),v.ref=YL(_,S,b),v.return=_,_=v;break e}t(_,S);break}else e(_,S);S=S.sibling}b.type===P9?(v=v_(b.props.children,_.mode,C,b.key),v.return=_,_=v):(C=Cz(b.type,b.key,b.props,null,_.mode,C),C.ref=YL(_,v,b),C.return=_,_=C)}return s(_);case R9:e:{for(S=b.key;v!==null;){if(v.key===S)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){t(_,v.sibling),v=o(v,b.children||[]),v.return=_,_=v;break e}else{t(_,v);break}else e(_,v);v=v.sibling}v=noe(b,_.mode,C),v.return=_,_=v}return s(_);case R6:return S=b._init,y(_,v,S(b._payload),C)}if(eE(b))return p(_,v,b,C);if(jL(b))return m(_,v,b,C);lz(_,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(t(_,v.sibling),v=o(v,b),v.return=_,_=v):(t(_,v),v=ioe(b,_.mode,C),v.return=_,_=v),s(_)):t(_,v)}return y}var ty=VRe(!0),WRe=VRe(!1),Pz=X6(null),Oz=null,U9=null,mre=null;function gre(){mre=U9=Oz=null}function vre(i){var e=Pz.current;na(Pz),i._currentValue=e}function Aoe(i,e,t){for(;i!==null;){var n=i.alternate;if((i.childLanes&e)!==e?(i.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),i===t)break;i=i.return}}function Z9(i,e){Oz=i,mre=U9=null,i=i.dependencies,i!==null&&i.firstContext!==null&&(i.lanes&e&&(Eh=!0),i.firstContext=null)}function N1(i){var e=i._currentValue;if(mre!==i)if(i={context:i,memoizedValue:e,next:null},U9===null){if(Oz===null)throw Error(Di(308));U9=i,Oz.dependencies={lanes:0,firstContext:i}}else U9=U9.next=i;return e}var p_=null;function _re(i){p_===null?p_=[i]:p_.push(i)}function URe(i,e,t,n){var o=e.interleaved;return o===null?(t.next=t,_re(e)):(t.next=o.next,o.next=t),e.interleaved=t,y0(i,n)}function y0(i,e){i.lanes|=e;var t=i.alternate;for(t!==null&&(t.lanes|=e),t=i,i=i.return;i!==null;)i.childLanes|=e,t=i.alternate,t!==null&&(t.childLanes|=e),t=i,i=i.return;return t.tag===3?t.stateNode:null}var P6=!1;function bre(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $Re(i,e){i=i.updateQueue,e.updateQueue===i&&(e.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function v0(i,e){return{eventTime:i,lane:e,tag:0,payload:null,callback:null,next:null}}function $6(i,e,t){var n=i.updateQueue;if(n===null)return null;if(n=n.shared,Mr&2){var o=n.pending;return o===null?e.next=e:(e.next=o.next,o.next=e),n.pending=e,y0(i,t)}return o=n.interleaved,o===null?(e.next=e,_re(n)):(e.next=o.next,o.next=e),n.interleaved=e,y0(i,t)}function mz(i,e,t){if(e=e.updateQueue,e!==null&&(e=e.shared,(t&4194240)!==0)){var n=e.lanes;n&=i.pendingLanes,t|=n,e.lanes=t,ore(i,t)}}function _Ae(i,e){var t=i.updateQueue,n=i.alternate;if(n!==null&&(n=n.updateQueue,t===n)){var o=null,r=null;if(t=t.firstBaseUpdate,t!==null){do{var s={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};r===null?o=r=s:r=r.next=s,t=t.next}while(t!==null);r===null?o=r=e:r=r.next=e}else o=r=e;t={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:r,shared:n.shared,effects:n.effects},i.updateQueue=t;return}i=t.lastBaseUpdate,i===null?t.firstBaseUpdate=e:i.next=e,t.lastBaseUpdate=e}function zz(i,e,t,n){var o=i.updateQueue;P6=!1;var r=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?r=c:s.next=c,s=l;var d=i.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==s&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(r!==null){var u=o.baseState;s=0,d=c=l=null,a=r;do{var h=a.lane,f=a.eventTime;if((n&h)===h){d!==null&&(d=d.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=i,m=a;switch(h=e,f=t,m.tag){case 1:if(p=m.payload,typeof p=="function"){u=p.call(f,u,h);break e}u=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,h=typeof p=="function"?p.call(f,u,h):p,h==null)break e;u=Ea({},u,h);break e;case 2:P6=!0}}a.callback!==null&&a.lane!==0&&(i.flags|=64,h=o.effects,h===null?o.effects=[a]:h.push(a))}else f={eventTime:f,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=f,l=u):d=d.next=f,s|=h;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;h=a,a=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);if(d===null&&(l=u),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=d,e=o.shared.interleaved,e!==null){o=e;do s|=o.lane,o=o.next;while(o!==e)}else r===null&&(o.shared.lanes=0);C_|=s,i.lanes=s,i.memoizedState=u}}function bAe(i,e,t){if(i=e.effects,e.effects=null,i!==null)for(e=0;et?t:4,i(!0);var n=Xne.transition;Xne.transition={};try{i(!1),e()}finally{_s=t,Xne.transition=n}}function aPe(){return A1().memoizedState}function A2t(i,e,t){var n=q6(i);if(t={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null},lPe(i))cPe(e,t);else if(t=URe(i,e,t,n),t!==null){var o=zu();qp(t,i,n,o),dPe(t,e,n)}}function R2t(i,e,t){var n=q6(i),o={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null};if(lPe(i))cPe(e,o);else{var r=i.alternate;if(i.lanes===0&&(r===null||r.lanes===0)&&(r=e.lastRenderedReducer,r!==null))try{var s=e.lastRenderedState,a=r(s,t);if(o.hasEagerState=!0,o.eagerState=a,Gp(a,s)){var l=e.interleaved;l===null?(o.next=o,_re(e)):(o.next=l.next,l.next=o),e.interleaved=o;return}}catch{}finally{}t=URe(i,e,o,n),t!==null&&(o=zu(),qp(t,i,n,o),dPe(t,e,n))}}function lPe(i){var e=i.alternate;return i===La||e!==null&&e===La}function cPe(i,e){lE=Hz=!0;var t=i.pending;t===null?e.next=e:(e.next=t.next,t.next=e),i.pending=e}function dPe(i,e,t){if(t&4194240){var n=e.lanes;n&=i.pendingLanes,t|=n,e.lanes=t,ore(i,t)}}var Bz={readContext:N1,useCallback:Gd,useContext:Gd,useEffect:Gd,useImperativeHandle:Gd,useInsertionEffect:Gd,useLayoutEffect:Gd,useMemo:Gd,useReducer:Gd,useRef:Gd,useState:Gd,useDebugValue:Gd,useDeferredValue:Gd,useTransition:Gd,useMutableSource:Gd,useSyncExternalStore:Gd,useId:Gd,unstable_isNewReconciler:!1},P2t={readContext:N1,useCallback:function(i,e){return ug().memoizedState=[i,e===void 0?null:e],i},useContext:N1,useEffect:CAe,useImperativeHandle:function(i,e,t){return t=t!=null?t.concat([i]):null,vz(4194308,4,iPe.bind(null,e,i),t)},useLayoutEffect:function(i,e){return vz(4194308,4,i,e)},useInsertionEffect:function(i,e){return vz(4,2,i,e)},useMemo:function(i,e){var t=ug();return e=e===void 0?null:e,i=i(),t.memoizedState=[i,e],i},useReducer:function(i,e,t){var n=ug();return e=t!==void 0?t(e):e,n.memoizedState=n.baseState=e,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:e},n.queue=i,i=i.dispatch=A2t.bind(null,La,i),[n.memoizedState,i]},useRef:function(i){var e=ug();return i={current:i},e.memoizedState=i},useState:yAe,useDebugValue:Ere,useDeferredValue:function(i){return ug().memoizedState=i},useTransition:function(){var i=yAe(!1),e=i[0];return i=N2t.bind(null,i[1]),ug().memoizedState=i,[e,i]},useMutableSource:function(){},useSyncExternalStore:function(i,e,t){var n=La,o=ug();if(pa){if(t===void 0)throw Error(Di(407));t=t()}else{if(t=e(),Vc===null)throw Error(Di(349));y_&30||KRe(n,e,t)}o.memoizedState=t;var r={value:t,getSnapshot:e};return o.queue=r,CAe(ZRe.bind(null,n,r,i),[i]),n.flags|=2048,EE(9,YRe.bind(null,n,r,t,e),void 0,null),t},useId:function(){var i=ug(),e=Vc.identifierPrefix;if(pa){var t=g0,n=m0;t=(n&~(1<<32-jp(n)-1)).toString(32)+t,e=":"+e+"R"+t,t=kE++,0<\/script>",i=i.removeChild(i.firstChild)):typeof n.is=="string"?i=s.createElement(t,{is:n.is}):(i=s.createElement(t),t==="select"&&(s=i,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):i=s.createElementNS(i,t),i[hg]=e,i[wE]=n,yPe(i,e,!1,!1),e.stateNode=i;e:{switch(s=moe(t,n),t){case"dialog":ia("cancel",i),ia("close",i),o=n;break;case"iframe":case"object":case"embed":ia("load",i),o=n;break;case"video":case"audio":for(o=0;ooy&&(e.flags|=128,n=!0,ZL(r,!1),e.lanes=4194304)}else{if(!n)if(i=Pz(s),i!==null){if(e.flags|=128,n=!0,t=i.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),ZL(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!pa)return Kd(e),null}else 2*cl()-r.renderingStartTime>oy&&t!==1073741824&&(e.flags|=128,n=!0,ZL(r,!1),e.lanes=4194304);r.isBackwards?(s.sibling=e.child,e.child=s):(t=r.last,t!==null?t.sibling=s:e.child=s,r.last=s)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=cl(),e.sibling=null,t=ka.current,$s(ka,n?t&1|2:t&1),e):(Kd(e),null);case 22:case 23:return Are(),n=e.memoizedState!==null,i!==null&&i.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Cf&1073741824&&(Kd(e),e.subtreeFlags&6&&(e.flags|=8192)):Kd(e),null;case 24:return null;case 25:return null}throw Error(Di(156,e.tag))}function U2t(i,e){switch(fre(e),e.tag){case 1:return Th(e.type)&&Dz(),i=e.flags,i&65536?(e.flags=i&-65537|128,e):null;case 3:return iy(),na(Dh),na(Zd),wre(),i=e.flags,i&65536&&!(i&128)?(e.flags=i&-65537|128,e):null;case 5:return Cre(e),null;case 13:if(na(ka),i=e.memoizedState,i!==null&&i.dehydrated!==null){if(e.alternate===null)throw Error(Di(340));ey()}return i=e.flags,i&65536?(e.flags=i&-65537|128,e):null;case 19:return na(ka),null;case 4:return iy(),null;case 10:return vre(e.type._context),null;case 22:case 23:return Are(),null;case 24:return null;default:return null}}var az=!1,Yd=!1,$2t=typeof WeakSet=="function"?WeakSet:Set,yn=null;function $9(i,e){var t=i.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){ja(i,e,n)}else t.current=null}function Woe(i,e,t){try{t()}catch(n){ja(i,e,n)}}var NAe=!1;function j2t(i,e){if(koe=Sz,i=ERe(),ure(i)){if("selectionStart"in i)var t={start:i.selectionStart,end:i.selectionEnd};else e:{t=(t=i.ownerDocument)&&t.defaultView||window;var n=t.getSelection&&t.getSelection();if(n&&n.rangeCount!==0){t=n.anchorNode;var o=n.anchorOffset,r=n.focusNode;n=n.focusOffset;try{t.nodeType,r.nodeType}catch{t=null;break e}var s=0,a=-1,l=-1,c=0,d=0,u=i,h=null;t:for(;;){for(var f;u!==t||o!==0&&u.nodeType!==3||(a=s+o),u!==r||n!==0&&u.nodeType!==3||(l=s+n),u.nodeType===3&&(s+=u.nodeValue.length),(f=u.firstChild)!==null;)h=u,u=f;for(;;){if(u===i)break t;if(h===t&&++c===o&&(a=s),h===r&&++d===n&&(l=s),(f=u.nextSibling)!==null)break;u=h,h=u.parentNode}u=f}t=a===-1||l===-1?null:{start:a,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(Loe={focusedElem:i,selectionRange:t},Sz=!1,yn=e;yn!==null;)if(e=yn,i=e.child,(e.subtreeFlags&1028)!==0&&i!==null)i.return=e,yn=i;else for(;yn!==null;){e=yn;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,y=p.memoizedState,_=e.stateNode,v=_.getSnapshotBeforeUpdate(e.elementType===e.type?m:Wp(e.type,m),y);_.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Di(163))}}catch(C){ja(e,e.return,C)}if(i=e.sibling,i!==null){i.return=e.return,yn=i;break}yn=e.return}return p=NAe,NAe=!1,p}function cE(i,e,t){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&i)===i){var r=o.destroy;o.destroy=void 0,r!==void 0&&Woe(e,t,r)}o=o.next}while(o!==n)}}function Xz(i,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&i)===i){var n=t.create;t.destroy=n()}t=t.next}while(t!==e)}}function Uoe(i){var e=i.ref;if(e!==null){var t=i.stateNode;switch(i.tag){case 5:i=t;break;default:i=t}typeof e=="function"?e(i):e.current=i}}function xPe(i){var e=i.alternate;e!==null&&(i.alternate=null,xPe(e)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(e=i.stateNode,e!==null&&(delete e[hg],delete e[wE],delete e[Toe],delete e[E2t],delete e[D2t])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function SPe(i){return i.tag===5||i.tag===3||i.tag===4}function AAe(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||SPe(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function $oe(i,e,t){var n=i.tag;if(n===5||n===6)i=i.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(i,e):t.insertBefore(i,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(i,t)):(e=t,e.appendChild(i)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=Ez));else if(n!==4&&(i=i.child,i!==null))for($oe(i,e,t),i=i.sibling;i!==null;)$oe(i,e,t),i=i.sibling}function joe(i,e,t){var n=i.tag;if(n===5||n===6)i=i.stateNode,e?t.insertBefore(i,e):t.appendChild(i);else if(n!==4&&(i=i.child,i!==null))for(joe(i,e,t),i=i.sibling;i!==null;)joe(i,e,t),i=i.sibling}var md=null,Up=!1;function N6(i,e,t){for(t=t.child;t!==null;)kPe(i,e,t),t=t.sibling}function kPe(i,e,t){if(fg&&typeof fg.onCommitFiberUnmount=="function")try{fg.onCommitFiberUnmount(Uz,t)}catch{}switch(t.tag){case 5:Yd||$9(t,e);case 6:var n=md,o=Up;md=null,N6(i,e,t),md=n,Up=o,md!==null&&(Up?(i=md,t=t.stateNode,i.nodeType===8?i.parentNode.removeChild(t):i.removeChild(t)):md.removeChild(t.stateNode));break;case 18:md!==null&&(Up?(i=md,t=t.stateNode,i.nodeType===8?Kne(i.parentNode,t):i.nodeType===1&&Kne(i,t),vE(i)):Kne(md,t.stateNode));break;case 4:n=md,o=Up,md=t.stateNode.containerInfo,Up=!0,N6(i,e,t),md=n,Up=o;break;case 0:case 11:case 14:case 15:if(!Yd&&(n=t.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var r=o,s=r.destroy;r=r.tag,s!==void 0&&(r&2||r&4)&&Woe(t,e,s),o=o.next}while(o!==n)}N6(i,e,t);break;case 1:if(!Yd&&($9(t,e),n=t.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=t.memoizedProps,n.state=t.memoizedState,n.componentWillUnmount()}catch(a){ja(t,e,a)}N6(i,e,t);break;case 21:N6(i,e,t);break;case 22:t.mode&1?(Yd=(n=Yd)||t.memoizedState!==null,N6(i,e,t),Yd=n):N6(i,e,t);break;default:N6(i,e,t)}}function RAe(i){var e=i.updateQueue;if(e!==null){i.updateQueue=null;var t=i.stateNode;t===null&&(t=i.stateNode=new $2t),e.forEach(function(n){var o=e0t.bind(null,i,n);t.has(n)||(t.add(n),n.then(o,o))})}}function Vp(i,e){var t=e.deletions;if(t!==null)for(var n=0;no&&(o=s),n&=~r}if(n=o,n=cl()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*G2t(n/1960))-n,10i?16:i,F6===null)var n=!1;else{if(i=F6,F6=null,Bz=0,Mr&6)throw Error(Di(331));var o=Mr;for(Mr|=4,yn=i.current;yn!==null;){var r=yn,s=r.child;if(yn.flags&16){var a=r.deletions;if(a!==null){for(var l=0;lcl()-Mre?g_(i,0):Ire|=t),Ih(i,e)}function APe(i,e){e===0&&(i.mode&1?(e=KO,KO<<=1,!(KO&130023424)&&(KO=4194304)):e=1);var t=zu();i=y0(i,e),i!==null&&(TE(i,e,t),Ih(i,t))}function J2t(i){var e=i.memoizedState,t=0;e!==null&&(t=e.retryLane),APe(i,t)}function e0t(i,e){var t=0;switch(i.tag){case 13:var n=i.stateNode,o=i.memoizedState;o!==null&&(t=o.retryLane);break;case 19:n=i.stateNode;break;default:throw Error(Di(314))}n!==null&&n.delete(e),APe(i,t)}var RPe;RPe=function(i,e,t){if(i!==null)if(i.memoizedProps!==e.pendingProps||Dh.current)Eh=!0;else{if(!(i.lanes&t)&&!(e.flags&128))return Eh=!1,V2t(i,e,t);Eh=!!(i.flags&131072)}else Eh=!1,pa&&e.flags&1048576&&FRe(e,Mz,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;mz(i,e),i=e.pendingProps;var o=J9(e,Zd.current);Z9(e,t),o=Sre(null,e,n,i,o,t);var r=kre();return e.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Th(n)?(r=!0,Tz(e)):r=!1,e.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,bre(e),o.updater=Zz,e.stateNode=o,o._reactInternals=e,Poe(e,n,i,t),e=Foe(null,e,n,!0,r,t)):(e.tag=0,pa&&r&&hre(e),Ou(null,e,o,t),e=e.child),e;case 16:n=e.elementType;e:{switch(mz(i,e),i=e.pendingProps,o=n._init,n=o(n._payload),e.type=n,o=e.tag=i0t(n),i=Wp(n,i),o){case 0:e=zoe(null,e,n,i,t);break e;case 1:e=TAe(null,e,n,i,t);break e;case 11:e=EAe(null,e,n,i,t);break e;case 14:e=DAe(null,e,n,Wp(n.type,i),t);break e}throw Error(Di(306,n,""))}return e;case 0:return n=e.type,o=e.pendingProps,o=e.elementType===n?o:Wp(n,o),zoe(i,e,n,o,t);case 1:return n=e.type,o=e.pendingProps,o=e.elementType===n?o:Wp(n,o),TAe(i,e,n,o,t);case 3:e:{if(vPe(e),i===null)throw Error(Di(387));n=e.pendingProps,r=e.memoizedState,o=r.element,$Re(i,e),Rz(e,n,null,t);var s=e.memoizedState;if(n=s.element,r.isDehydrated)if(r={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=r,e.memoizedState=r,e.flags&256){o=ny(Error(Di(423)),e),e=IAe(i,e,n,t,o);break e}else if(n!==o){o=ny(Error(Di(424)),e),e=IAe(i,e,n,t,o);break e}else for(wf=W6(e.stateNode.containerInfo.firstChild),xf=e,pa=!0,$p=null,t=WRe(e,null,n,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(ey(),n===o){e=C0(i,e,t);break e}Ou(i,e,n,t)}e=e.child}return e;case 5:return jRe(e),i===null&&Noe(e),n=e.type,o=e.pendingProps,r=i!==null?i.memoizedProps:null,s=o.children,Eoe(n,o)?s=null:r!==null&&Eoe(n,r)&&(e.flags|=32),gPe(i,e),Ou(i,e,s,t),e.child;case 6:return i===null&&Noe(e),null;case 13:return _Pe(i,e,t);case 4:return yre(e,e.stateNode.containerInfo),n=e.pendingProps,i===null?e.child=ty(e,null,n,t):Ou(i,e,n,t),e.child;case 11:return n=e.type,o=e.pendingProps,o=e.elementType===n?o:Wp(n,o),EAe(i,e,n,o,t);case 7:return Ou(i,e,e.pendingProps,t),e.child;case 8:return Ou(i,e,e.pendingProps.children,t),e.child;case 12:return Ou(i,e,e.pendingProps.children,t),e.child;case 10:e:{if(n=e.type._context,o=e.pendingProps,r=e.memoizedProps,s=o.value,$s(Nz,n._currentValue),n._currentValue=s,r!==null)if(Gp(r.value,s)){if(r.children===o.children&&!Dh.current){e=C0(i,e,t);break e}}else for(r=e.child,r!==null&&(r.return=e);r!==null;){var a=r.dependencies;if(a!==null){s=r.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(r.tag===1){l=v0(-1,t&-t),l.tag=2;var c=r.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}r.lanes|=t,l=r.alternate,l!==null&&(l.lanes|=t),Aoe(r.return,t,e),a.lanes|=t;break}l=l.next}}else if(r.tag===10)s=r.type===e.type?null:r.child;else if(r.tag===18){if(s=r.return,s===null)throw Error(Di(341));s.lanes|=t,a=s.alternate,a!==null&&(a.lanes|=t),Aoe(s,t,e),s=r.sibling}else s=r.child;if(s!==null)s.return=r;else for(s=r;s!==null;){if(s===e){s=null;break}if(r=s.sibling,r!==null){r.return=s.return,s=r;break}s=s.return}r=s}Ou(i,e,o.children,t),e=e.child}return e;case 9:return o=e.type,n=e.pendingProps.children,Z9(e,t),o=N1(o),n=n(o),e.flags|=1,Ou(i,e,n,t),e.child;case 14:return n=e.type,o=Wp(n,e.pendingProps),o=Wp(n.type,o),DAe(i,e,n,o,t);case 15:return pPe(i,e,e.type,e.pendingProps,t);case 17:return n=e.type,o=e.pendingProps,o=e.elementType===n?o:Wp(n,o),mz(i,e),e.tag=1,Th(n)?(i=!0,Tz(e)):i=!1,Z9(e,t),uPe(e,n,o),Poe(e,n,o,t),Foe(null,e,n,!0,i,t);case 19:return bPe(i,e,t);case 22:return mPe(i,e,t)}throw Error(Di(156,e.tag))};function PPe(i,e){return lRe(i,e)}function t0t(i,e,t,n){this.tag=i,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function I1(i,e,t,n){return new t0t(i,e,t,n)}function Pre(i){return i=i.prototype,!(!i||!i.isReactComponent)}function i0t(i){if(typeof i=="function")return Pre(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ere)return 11;if(i===tre)return 14}return 2}function q6(i,e){var t=i.alternate;return t===null?(t=I1(i.tag,e,i.key,i.mode),t.elementType=i.elementType,t.type=i.type,t.stateNode=i.stateNode,t.alternate=i,i.alternate=t):(t.pendingProps=e,t.type=i.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=i.flags&14680064,t.childLanes=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,e=i.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=i.sibling,t.index=i.index,t.ref=i.ref,t}function _z(i,e,t,n,o,r){var s=2;if(n=i,typeof i=="function")Pre(i)&&(s=1);else if(typeof i=="string")s=5;else e:switch(i){case P9:return v_(t.children,o,r,e);case Joe:s=8,o|=8;break;case roe:return i=I1(12,t,e,o|2),i.elementType=roe,i.lanes=r,i;case soe:return i=I1(13,t,e,o),i.elementType=soe,i.lanes=r,i;case aoe:return i=I1(19,t,e,o),i.elementType=aoe,i.lanes=r,i;case jAe:return Jz(t,o,r,e);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case UAe:s=10;break e;case $Ae:s=9;break e;case ere:s=11;break e;case tre:s=14;break e;case A6:s=16,n=null;break e}throw Error(Di(130,i==null?i:typeof i,""))}return e=I1(s,t,e,o),e.elementType=i,e.type=n,e.lanes=r,e}function v_(i,e,t,n){return i=I1(7,i,n,e),i.lanes=t,i}function Jz(i,e,t,n){return i=I1(22,i,n,e),i.elementType=jAe,i.lanes=t,i.stateNode={isHidden:!1},i}function ioe(i,e,t){return i=I1(6,i,null,e),i.lanes=t,i}function noe(i,e,t){return e=I1(4,i.children!==null?i.children:[],i.key,e),e.lanes=t,e.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},e}function n0t(i,e,t,n,o){this.tag=e,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bne(0),this.expirationTimes=Bne(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bne(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Ore(i,e,t,n,o,r,s,a,l){return i=new n0t(i,e,t,a,l),e===1?(e=1,r===!0&&(e|=8)):e=0,r=I1(3,null,null,e),i.current=r,r.stateNode=i,r.memoizedState={element:n,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},bre(r),i}function o0t(i,e,t){var n=3{"use strict";function BPe(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(BPe)}catch(i){console.error(i)}}BPe(),VPe.exports=HPe()});var UPe=ot(Vre=>{"use strict";var WPe=Bre();Vre.createRoot=WPe.createRoot,Vre.hydrateRoot=WPe.hydrateRoot;var tGt});var di=ot((oGt,AE)=>{function c0t(i){return i&&i.__esModule?i:{default:i}}AE.exports=c0t,AE.exports.__esModule=!0,AE.exports.default=AE.exports});var $Pe=ot(Wre=>{"use strict";Object.defineProperty(Wre,"__esModule",{value:!0});Wre.default=d0t;function d0t(i){let e="https://mui.com/production-error/?code="+i;for(let t=1;t{"use strict";var u0t=di();Object.defineProperty(Ure,"__esModule",{value:!0});Object.defineProperty(Ure,"default",{enumerable:!0,get:function(){return h0t.default}});var h0t=u0t($Pe())});function Fe(){return Fe=Object.assign?Object.assign.bind():function(i){for(var e=1;e{});function oF(i){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=i(t)),e[t]}}var rF=P(()=>{});var f0t,jPe,$re=P(()=>{rF();f0t=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,jPe=oF(function(i){return f0t.test(i)||i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&i.charCodeAt(2)<91})});function m0t(i){if(i.sheet)return i.sheet;for(var e=0;e{p0t=!1;qPe=function(){function i(t){var n=this;this._insertTag=function(o){var r;n.tags.length===0?n.insertionPoint?r=n.insertionPoint.nextSibling:n.prepend?r=n.container.firstChild:r=n.before:r=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,r),n.tags.push(o)},this.isSpeedy=t.speedy===void 0?!p0t:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var e=i.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(g0t(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var r=m0t(o);try{r.insertRule(n,r.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},i}()});var _d,RE,Br,sF,ay,ly,KPe,aF,YPe,lF=P(()=>{_d="-ms-",RE="-moz-",Br="-webkit-",sF="comm",ay="rule",ly="decl",KPe="@import",aF="@keyframes",YPe="@layer"});function QPe(i,e){return dl(i,0)^45?(((e<<2^dl(i,0))<<2^dl(i,1))<<2^dl(i,2))<<2^dl(i,3):0}function cF(i){return i.trim()}function jre(i,e){return(i=e.exec(i))?i[0]:i}function kr(i,e,t){return i.replace(e,t)}function PE(i,e){return i.indexOf(e)}function dl(i,e){return i.charCodeAt(e)|0}function J6(i,e,t){return i.slice(e,t)}function Hu(i){return i.length}function cy(i){return i.length}function dy(i,e){return e.push(i),i}function qre(i,e){return i.map(e).join("")}var ZPe,k_,XPe,uy=P(()=>{ZPe=Math.abs,k_=String.fromCharCode,XPe=Object.assign});function OE(i,e,t,n,o,r,s){return{value:i,root:e,parent:t,type:n,props:o,children:r,line:dF,column:hy,length:s,return:""}}function my(i,e){return XPe(OE("",null,null,"",null,null,0),i,{length:-i.length},e)}function eOe(){return Bl}function tOe(){return Bl=Bu>0?dl(py,--Bu):0,hy--,Bl===10&&(hy=1,dF--),Bl}function Vu(){return Bl=Bu2||fy(Bl)>3?"":" "}function nOe(i,e){for(;--e&&Vu()&&!(Bl<48||Bl>102||Bl>57&&Bl<65||Bl>70&&Bl<97););return gy(i,zE()+(e<6&&R1()==32&&Vu()==32))}function Gre(i){for(;Vu();)switch(Bl){case i:return Bu;case 34:case 39:i!==34&&i!==39&&Gre(Bl);break;case 40:i===41&&Gre(i);break;case 92:Vu();break}return Bu}function oOe(i,e){for(;Vu()&&i+Bl!==57;)if(i+Bl===84&&R1()===47)break;return"/*"+gy(e,Bu-1)+"*"+k_(i===47?i:Vu())}function rOe(i){for(;!fy(R1());)Vu();return gy(i,Bu)}var dF,hy,JPe,Bu,Bl,py,Kre=P(()=>{uy();dF=1,hy=1,JPe=0,Bu=0,Bl=0,py=""});function lOe(i){return hF(fF("",null,null,null,[""],i=uF(i),0,[0],i))}function fF(i,e,t,n,o,r,s,a,l){for(var c=0,d=0,u=s,h=0,f=0,p=0,m=1,y=1,_=1,v=0,b="",C=o,w=r,S=n,x=b;y;)switch(p=v,v=Vu()){case 40:if(p!=108&&dl(x,u-1)==58){PE(x+=kr(vy(v),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:x+=vy(v);break;case 9:case 10:case 13:case 32:x+=iOe(p);break;case 92:x+=nOe(zE()-1,7);continue;case 47:switch(R1()){case 42:case 47:dy(v0t(oOe(Vu(),zE()),e,t),l);break;default:x+="/"}break;case 123*m:a[c++]=Hu(x)*_;case 125*m:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+d:_==-1&&(x=kr(x,/\f/g,"")),f>0&&Hu(x)-u&&dy(f>32?aOe(x+";",n,t,u-1):aOe(kr(x," ","")+";",n,t,u-2),l);break;case 59:x+=";";default:if(dy(S=sOe(x,e,t,c,d,o,a,b,C=[],w=[],u),r),v===123)if(d===0)fF(x,e,S,S,C,r,u,a,w);else switch(h===99&&dl(x,3)===110?100:h){case 100:case 108:case 109:case 115:fF(i,S,S,n&&dy(sOe(i,S,S,0,0,o,a,b,o,C=[],u),w),o,w,u,a,n?C:w);break;default:fF(x,S,S,S,[""],w,0,a,w)}}c=d=f=0,m=_=1,b=x="",u=s;break;case 58:u=1+Hu(x),f=p;default:if(m<1){if(v==123)--m;else if(v==125&&m++==0&&tOe()==125)continue}switch(x+=k_(v),v*m){case 38:_=d>0?1:(x+="\f",-1);break;case 44:a[c++]=(Hu(x)-1)*_,_=1;break;case 64:R1()===45&&(x+=vy(Vu())),h=R1(),d=u=Hu(b=x+=rOe(zE())),v++;break;case 45:p===45&&Hu(x)==2&&(m=0)}}return r}function sOe(i,e,t,n,o,r,s,a,l,c,d){for(var u=o-1,h=o===0?r:[""],f=cy(h),p=0,m=0,y=0;p0?h[_]+" "+v:kr(v,/&\f/g,h[_])))&&(l[y++]=b);return OE(i,e,t,o===0?ay:a,l,c,d)}function v0t(i,e,t){return OE(i,e,t,sF,k_(eOe()),J6(i,2,-2),0)}function aOe(i,e,t,n){return OE(i,e,t,ly,J6(i,0,n),J6(i,n+1,-1),n)}var cOe=P(()=>{lF();uy();Kre()});var dOe=P(()=>{});function L_(i,e){for(var t="",n=cy(i),o=0;o{lF();uy()});function fOe(i){var e=cy(i);return function(t,n,o,r){for(var s="",a=0;a{uy()});var gOe=P(()=>{lF();uy();cOe();dOe();Kre();hOe();mOe()});var Yre,pF=P(()=>{Yre=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var o=e(n);return t.set(n,o),o}}});var bOe={};Ai(bOe,{default:()=>Zre});function _Oe(i,e){switch(QPe(i,e)){case 5103:return Br+"print-"+i+i;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Br+i+i;case 5349:case 4246:case 4810:case 6968:case 2756:return Br+i+RE+i+_d+i+i;case 6828:case 4268:return Br+i+_d+i+i;case 6165:return Br+i+_d+"flex-"+i+i;case 5187:return Br+i+kr(i,/(\w+).+(:[^]+)/,Br+"box-$1$2"+_d+"flex-$1$2")+i;case 5443:return Br+i+_d+"flex-item-"+kr(i,/flex-|-self/,"")+i;case 4675:return Br+i+_d+"flex-line-pack"+kr(i,/align-content|flex-|-self/,"")+i;case 5548:return Br+i+_d+kr(i,"shrink","negative")+i;case 5292:return Br+i+_d+kr(i,"basis","preferred-size")+i;case 6060:return Br+"box-"+kr(i,"-grow","")+Br+i+_d+kr(i,"grow","positive")+i;case 4554:return Br+kr(i,/([^-])(transform)/g,"$1"+Br+"$2")+i;case 6187:return kr(kr(kr(i,/(zoom-|grab)/,Br+"$1"),/(image-set)/,Br+"$1"),i,"")+i;case 5495:case 3959:return kr(i,/(image-set\([^]*)/,Br+"$1$`$1");case 4968:return kr(kr(i,/(.+:)(flex-)?(.*)/,Br+"box-pack:$3"+_d+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Br+i+i;case 4095:case 3583:case 4068:case 2532:return kr(i,/(.+)-inline(.+)/,Br+"$1$2")+i;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Hu(i)-1-e>6)switch(dl(i,e+1)){case 109:if(dl(i,e+4)!==45)break;case 102:return kr(i,/(.+:)(.+)-([^]+)/,"$1"+Br+"$2-$3$1"+RE+(dl(i,e+3)==108?"$3":"$2-$3"))+i;case 115:return~PE(i,"stretch")?_Oe(kr(i,"stretch","fill-available"),e)+i:i}break;case 4949:if(dl(i,e+1)!==115)break;case 6444:switch(dl(i,Hu(i)-3-(~PE(i,"!important")&&10))){case 107:return kr(i,":",":"+Br)+i;case 101:return kr(i,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Br+(dl(i,14)===45?"inline-":"")+"box$3$1"+Br+"$2$3$1"+_d+"$2box$3")+i}break;case 5936:switch(dl(i,e+11)){case 114:return Br+i+_d+kr(i,/[svh]\w+-[tblr]{2}/,"tb")+i;case 108:return Br+i+_d+kr(i,/[svh]\w+-[tblr]{2}/,"tb-rl")+i;case 45:return Br+i+_d+kr(i,/[svh]\w+-[tblr]{2}/,"lr")+i}return Br+i+_d+i+i}return i}var _0t,b0t,y0t,vOe,C0t,w0t,x0t,S0t,Zre,mF=P(()=>{GPe();gOe();pF();rF();_0t=function(e,t,n){for(var o=0,r=0;o=r,r=R1(),o===38&&r===12&&(t[n]=1),!fy(r);)Vu();return gy(e,Bu)},b0t=function(e,t){var n=-1,o=44;do switch(fy(o)){case 0:o===38&&R1()===12&&(t[n]=1),e[n]+=_0t(Bu-1,t,n);break;case 2:e[n]+=vy(o);break;case 4:if(o===44){e[++n]=R1()===58?"&\f":"",t[n]=e[n].length;break}default:e[n]+=k_(o)}while(o=Vu());return e},y0t=function(e,t){return hF(b0t(uF(e),t))},vOe=new WeakMap,C0t=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!vOe.get(n))&&!o){vOe.set(e,!0);for(var r=[],s=y0t(t,r),a=n.props,l=0,c=0;l-1&&!e.return)switch(e.type){case ly:e.return=_Oe(e.value,e.length);break;case aF:return L_([my(e,{value:kr(e.value,"@","@"+Br)})],o);case ay:if(e.length)return qre(e.props,function(r){switch(jre(r,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return L_([my(e,{props:[kr(r,/:(read-\w+)/,":"+RE+"$1")]})],o);case"::placeholder":return L_([my(e,{props:[kr(r,/:(plac\w+)/,":"+Br+"input-$1")]}),my(e,{props:[kr(r,/:(plac\w+)/,":"+RE+"$1")]}),my(e,{props:[kr(r,/:(plac\w+)/,_d+"input-$1")]})],o)}return""})}},S0t=[x0t],Zre=function(e){var t=e.key;if(t==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(m){var y=m.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var o=e.stylisPlugins||S0t,r={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(m){for(var y=m.getAttribute("data-emotion").split(" "),_=1;_{"use strict";var Wc=typeof Symbol=="function"&&Symbol.for,Xre=Wc?Symbol.for("react.element"):60103,Qre=Wc?Symbol.for("react.portal"):60106,gF=Wc?Symbol.for("react.fragment"):60107,vF=Wc?Symbol.for("react.strict_mode"):60108,_F=Wc?Symbol.for("react.profiler"):60114,bF=Wc?Symbol.for("react.provider"):60109,yF=Wc?Symbol.for("react.context"):60110,Jre=Wc?Symbol.for("react.async_mode"):60111,CF=Wc?Symbol.for("react.concurrent_mode"):60111,wF=Wc?Symbol.for("react.forward_ref"):60112,xF=Wc?Symbol.for("react.suspense"):60113,k0t=Wc?Symbol.for("react.suspense_list"):60120,SF=Wc?Symbol.for("react.memo"):60115,kF=Wc?Symbol.for("react.lazy"):60116,L0t=Wc?Symbol.for("react.block"):60121,E0t=Wc?Symbol.for("react.fundamental"):60117,D0t=Wc?Symbol.for("react.responder"):60118,T0t=Wc?Symbol.for("react.scope"):60119;function Ef(i){if(typeof i=="object"&&i!==null){var e=i.$$typeof;switch(e){case Xre:switch(i=i.type,i){case Jre:case CF:case gF:case _F:case vF:case xF:return i;default:switch(i=i&&i.$$typeof,i){case yF:case wF:case kF:case SF:case bF:return i;default:return e}}case Qre:return e}}}function yOe(i){return Ef(i)===CF}bs.AsyncMode=Jre;bs.ConcurrentMode=CF;bs.ContextConsumer=yF;bs.ContextProvider=bF;bs.Element=Xre;bs.ForwardRef=wF;bs.Fragment=gF;bs.Lazy=kF;bs.Memo=SF;bs.Portal=Qre;bs.Profiler=_F;bs.StrictMode=vF;bs.Suspense=xF;bs.isAsyncMode=function(i){return yOe(i)||Ef(i)===Jre};bs.isConcurrentMode=yOe;bs.isContextConsumer=function(i){return Ef(i)===yF};bs.isContextProvider=function(i){return Ef(i)===bF};bs.isElement=function(i){return typeof i=="object"&&i!==null&&i.$$typeof===Xre};bs.isForwardRef=function(i){return Ef(i)===wF};bs.isFragment=function(i){return Ef(i)===gF};bs.isLazy=function(i){return Ef(i)===kF};bs.isMemo=function(i){return Ef(i)===SF};bs.isPortal=function(i){return Ef(i)===Qre};bs.isProfiler=function(i){return Ef(i)===_F};bs.isStrictMode=function(i){return Ef(i)===vF};bs.isSuspense=function(i){return Ef(i)===xF};bs.isValidElementType=function(i){return typeof i=="string"||typeof i=="function"||i===gF||i===CF||i===_F||i===vF||i===xF||i===k0t||typeof i=="object"&&i!==null&&(i.$$typeof===kF||i.$$typeof===SF||i.$$typeof===bF||i.$$typeof===yF||i.$$typeof===wF||i.$$typeof===E0t||i.$$typeof===D0t||i.$$typeof===T0t||i.$$typeof===L0t)};bs.typeOf=Ef});var xOe=ot((BGt,wOe)=>{"use strict";wOe.exports=COe()});var ise=ot((VGt,TOe)=>{"use strict";var ese=xOe(),I0t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},M0t={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},N0t={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},EOe={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},tse={};tse[ese.ForwardRef]=N0t;tse[ese.Memo]=EOe;function SOe(i){return ese.isMemo(i)?EOe:tse[i.$$typeof]||I0t}var A0t=Object.defineProperty,R0t=Object.getOwnPropertyNames,kOe=Object.getOwnPropertySymbols,P0t=Object.getOwnPropertyDescriptor,O0t=Object.getPrototypeOf,LOe=Object.prototype;function DOe(i,e,t){if(typeof e!="string"){if(LOe){var n=O0t(e);n&&n!==LOe&&DOe(i,n,t)}var o=R0t(e);kOe&&(o=o.concat(kOe(e)));for(var r=SOe(i),s=SOe(e),a=0;a{IOe=vt(ise()),MOe=function(i,e){return(0,IOe.default)(i,e)}});function _y(i,e,t){var n="";return t.split(" ").forEach(function(o){i[o]!==void 0?e.push(i[o]+";"):n+=o+" "}),n}var z0t,E_,D_,FE=P(()=>{z0t=!0;E_=function(e,t,n){var o=e.key+"-"+t.name;(n===!1||z0t===!1)&&e.registered[o]===void 0&&(e.registered[o]=t.styles)},D_=function(e,t,n){E_(e,t,n);var o=e.key+"-"+t.name;if(e.inserted[t.name]===void 0){var r=t;do e.insert(t===r?"."+o:"",r,e.sheet,!0),r=r.next;while(r!==void 0)}}});function AOe(i){for(var e=0,t,n=0,o=i.length;o>=4;++n,o-=4)t=i.charCodeAt(n)&255|(i.charCodeAt(++n)&255)<<8|(i.charCodeAt(++n)&255)<<16|(i.charCodeAt(++n)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,e=(t&65535)*1540483477+((t>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(i.charCodeAt(n+2)&255)<<16;case 2:e^=(i.charCodeAt(n+1)&255)<<8;case 1:e^=i.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var ROe=P(()=>{});var POe,OOe=P(()=>{POe={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}});function HE(i,e,t){if(t==null)return"";var n=t;if(n.__emotion_styles!==void 0)return n;switch(typeof t){case"boolean":return"";case"object":{var o=t;if(o.anim===1)return gg={name:o.name,styles:o.styles,next:gg},o.name;var r=t;if(r.styles!==void 0){var s=r.next;if(s!==void 0)for(;s!==void 0;)gg={name:s.name,styles:s.styles,next:gg},s=s.next;var a=r.styles+";";return a}return W0t(i,e,t)}case"function":{if(i!==void 0){var l=gg,c=t(i);return gg=l,HE(i,e,c)}break}}var d=t;if(e==null)return d;var u=e[d];return u!==void 0?u:d}function W0t(i,e,t){var n="";if(Array.isArray(t))for(var o=0;o{ROe();OOe();rF();F0t=!1,H0t=/[A-Z]|^ms/g,B0t=/_EMO_([^_]+?)_([^]*?)_EMO_/g,BOe=function(e){return e.charCodeAt(1)===45},zOe=function(e){return e!=null&&typeof e!="boolean"},nse=oF(function(i){return BOe(i)?i:i.replace(H0t,"-$&").toLowerCase()}),FOe=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(B0t,function(n,o,r){return gg={name:o,styles:r,next:gg},o})}return POe[e]!==1&&!BOe(e)&&typeof t=="number"&&t!==0?t+"px":t},V0t="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";HOe=/label:\s*([^\s;\n{]+)\s*(;|$)/g});var VE,U0t,VOe,by,ose,WE=P(()=>{VE=vt(xi()),U0t=function(e){return e()},VOe=VE.useInsertionEffect?VE.useInsertionEffect:!1,by=VOe||U0t,ose=VOe||VE.useLayoutEffect});function qOe(i){var e=i.displayName||i.name||"Component",t=function(r,s){var a=Uc.useContext(P1);return Uc.createElement(i,Fe({theme:a,ref:s},r))},n=Uc.forwardRef(t);return n.displayName="WithTheme("+e+")",MOe(n,i)}var Uc,UE,LF,sse,WOe,UOe,t3,P1,$Oe,$0t,j0t,jOe,EF,rse,GOe,q0t,G0t,KOe,ase=P(()=>{Uc=vt(xi()),UE=vt(xi());mF();In();pF();NOe();FE();BE();WE();LF=!1,sse=Uc.createContext(typeof HTMLElement<"u"?Zre({key:"css"}):null),WOe=sse.Provider,UOe=function(){return(0,UE.useContext)(sse)},t3=function(e){return(0,UE.forwardRef)(function(t,n){var o=(0,UE.useContext)(sse);return e(t,o,n)})},P1=Uc.createContext({}),$Oe=function(){return Uc.useContext(P1)},$0t=function(e,t){if(typeof t=="function"){var n=t(e);return n}return Fe({},e,t)},j0t=Yre(function(i){return Yre(function(e){return $0t(i,e)})}),jOe=function(e){var t=Uc.useContext(P1);return e.theme!==t&&(t=j0t(t)(e.theme)),Uc.createElement(P1.Provider,{value:t},e.children)};EF={}.hasOwnProperty,rse="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",GOe=function(e,t){var n={};for(var o in t)EF.call(t,o)&&(n[o]=t[o]);return n[rse]=e,n},q0t=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;return E_(t,n,o),by(function(){return D_(t,n,o)}),null},G0t=t3(function(i,e,t){var n=i.css;typeof n=="string"&&e.registered[n]!==void 0&&(n=e.registered[n]);var o=i[rse],r=[n],s="";typeof i.className=="string"?s=_y(e.registered,r,i.className):i.className!=null&&(s=i.className+" ");var a=e3(r,void 0,Uc.useContext(P1));s+=e.key+"-"+a.name;var l={};for(var c in i)EF.call(i,c)&&c!=="css"&&c!==rse&&!LF&&(l[c]=i[c]);return l.className=s,t&&(l.ref=t),Uc.createElement(Uc.Fragment,null,Uc.createElement(q0t,{cache:e,serialized:a,isStringTag:typeof o=="string"}),Uc.createElement(o,l))}),KOe=G0t});var DF={};Ai(DF,{CacheProvider:()=>WOe,ClassNames:()=>e4t,Global:()=>Y0t,ThemeContext:()=>P1,ThemeProvider:()=>jOe,__unsafe_useEmotionCache:()=>UOe,createElement:()=>K0t,css:()=>YOe,jsx:()=>K0t,keyframes:()=>Z0t,useTheme:()=>$Oe,withEmotionCache:()=>t3,withTheme:()=>qOe});function YOe(){for(var i=arguments.length,e=new Array(i),t=0;t{ase();ase();O1=vt(xi());FE();WE();BE();mF();In();pF();hKt=vt(ise()),K0t=function(e,t){var n=arguments;if(t==null||!EF.call(t,"css"))return O1.createElement.apply(void 0,n);var o=n.length,r=new Array(o);r[0]=KOe,r[1]=GOe(e,t);for(var s=2;s{In();i3=vt(xi());$re();$E();FE();BE();WE();t4t=jPe,i4t=function(e){return e!=="theme"},ZOe=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?t4t:i4t},XOe=function(e,t,n){var o;if(t){var r=t.shouldForwardProp;o=e.__emotion_forwardProp&&r?function(s){return e.__emotion_forwardProp(s)&&r(s)}:r}return typeof o!="function"&&n&&(o=e.__emotion_forwardProp),o},n4t=!1,o4t=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;return E_(t,n,o),by(function(){return D_(t,n,o)}),null},QOe=function i(e,t){var n=e.__emotion_real===e,o=n&&e.__emotion_base||e,r,s;t!==void 0&&(r=t.label,s=t.target);var a=XOe(e,t,n),l=a||ZOe(o),c=!l("as");return function(){var d=arguments,u=n&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(r!==void 0&&u.push("label:"+r+";"),d[0]==null||d[0].raw===void 0)u.push.apply(u,d);else{u.push(d[0][0]);for(var h=d.length,f=1;flse});var xKt,r4t,lse,tze=P(()=>{JOe();In();xKt=vt(xi());$re();FE();BE();WE();r4t=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],lse=QOe.bind();r4t.forEach(function(i){lse[i]=lse(i)})});var nze=ot((DKt,ize)=>{"use strict";var s4t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";ize.exports=s4t});var aze=ot((TKt,sze)=>{"use strict";var a4t=nze();function oze(){}function rze(){}rze.resetWarningCache=oze;sze.exports=function(){function i(n,o,r,s,a,l){if(l!==a4t){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}i.isRequired=i;function e(){return i}var t={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:e,element:i,elementType:i,instanceOf:e,node:i,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:rze,resetWarningCache:oze};return t.PropTypes=t,t}});var Kp=ot((NKt,lze)=>{lze.exports=aze()();var IKt,MKt});var dze=ot(TF=>{"use strict";var l4t=xi(),c4t=Symbol.for("react.element"),d4t=Symbol.for("react.fragment"),u4t=Object.prototype.hasOwnProperty,h4t=l4t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f4t={key:!0,ref:!0,__self:!0,__source:!0};function cze(i,e,t){var n,o={},r=null,s=null;t!==void 0&&(r=""+t),e.key!==void 0&&(r=""+e.key),e.ref!==void 0&&(s=e.ref);for(n in e)u4t.call(e,n)&&!f4t.hasOwnProperty(n)&&(o[n]=e[n]);if(i&&i.defaultProps)for(n in e=i.defaultProps,e)o[n]===void 0&&(o[n]=e[n]);return{$$typeof:c4t,type:i,key:r,ref:s,props:o,_owner:h4t.current}}TF.Fragment=d4t;TF.jsx=cze;TF.jsxs=cze});var zn=ot((RKt,uze)=>{"use strict";uze.exports=dze()});var pze=ot(dse=>{"use strict";"use client";var hze=di();Object.defineProperty(dse,"__esModule",{value:!0});dse.default=_4t;var PKt=v4t(xi()),OKt=hze(Kp()),p4t=($E(),BL(DF)),m4t=hze((mF(),BL(bOe))),g4t=zn();function fze(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(fze=function(n){return n?t:e})(i)}function v4t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=fze(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var cse;typeof document=="object"&&(cse=(0,m4t.default)({key:"css",prepend:!0}));function _4t(i){let{injectFirst:e,children:t}=i;return e&&cse?(0,g4t.jsx)(p4t.CacheProvider,{value:cse,children:t}):t}});var mze=ot(use=>{"use strict";"use client";var b4t=di();Object.defineProperty(use,"__esModule",{value:!0});Object.defineProperty(use,"default",{enumerable:!0,get:function(){return y4t.default}});var y4t=b4t(pze())});var vze=ot(hse=>{"use strict";"use client";var C4t=di();Object.defineProperty(hse,"__esModule",{value:!0});hse.default=L4t;var HKt=S4t(xi()),BKt=C4t(Kp()),w4t=($E(),BL(DF)),x4t=zn();function gze(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(gze=function(n){return n?t:e})(i)}function S4t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=gze(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function k4t(i){return i==null||Object.keys(i).length===0}function L4t(i){let{styles:e,defaultTheme:t={}}=i,n=typeof e=="function"?o=>e(k4t(o)?t:o):e;return(0,x4t.jsx)(w4t.Global,{styles:n})}});var _ze=ot(fse=>{"use strict";"use client";var E4t=di();Object.defineProperty(fse,"__esModule",{value:!0});Object.defineProperty(fse,"default",{enumerable:!0,get:function(){return D4t.default}});var D4t=E4t(vze())});var x0=ot(vg=>{"use strict";"use client";var pse=di();Object.defineProperty(vg,"__esModule",{value:!0});Object.defineProperty(vg,"GlobalStyles",{enumerable:!0,get:function(){return M4t.default}});Object.defineProperty(vg,"StyledEngineProvider",{enumerable:!0,get:function(){return I4t.default}});Object.defineProperty(vg,"ThemeContext",{enumerable:!0,get:function(){return mse.ThemeContext}});Object.defineProperty(vg,"css",{enumerable:!0,get:function(){return mse.css}});vg.default=N4t;vg.internal_processStyles=void 0;Object.defineProperty(vg,"keyframes",{enumerable:!0,get:function(){return mse.keyframes}});var T4t=pse((tze(),BL(eze))),mse=($E(),BL(DF)),I4t=pse(mze()),M4t=pse(_ze());function N4t(i,e){return(0,T4t.default)(i,e)}var A4t=(i,e)=>{Array.isArray(i.__emotion_styles)&&(i.__emotion_styles=e(i.__emotion_styles))};vg.internal_processStyles=A4t});var ul=ot((jKt,S0)=>{function gse(){return S0.exports=gse=Object.assign?Object.assign.bind():function(i){for(var e=1;e{"use strict";var R4t=di();Object.defineProperty(IF,"__esModule",{value:!0});IF.default=yze;IF.isPlainObject=T_;var P4t=R4t(ul());function T_(i){if(typeof i!="object"||i===null)return!1;let e=Object.getPrototypeOf(i);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)}function bze(i){if(!T_(i))return i;let e={};return Object.keys(i).forEach(t=>{e[t]=bze(i[t])}),e}function yze(i,e,t={clone:!0}){let n=t.clone?(0,P4t.default)({},i):i;return T_(i)&&T_(e)&&Object.keys(e).forEach(o=>{T_(e[o])&&Object.prototype.hasOwnProperty.call(i,o)&&T_(i[o])?n[o]=yze(i[o],e[o],t):t.clone?n[o]=T_(e[o])?bze(e[o]):e[o]:n[o]=e[o]}),n}});var Xd=ot(yy=>{"use strict";Object.defineProperty(yy,"__esModule",{value:!0});var O4t={};Object.defineProperty(yy,"default",{enumerable:!0,get:function(){return MF.default}});var MF=z4t(Cze());Object.keys(MF).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(O4t,i)||i in yy&&yy[i]===MF[i]||Object.defineProperty(yy,i,{enumerable:!0,get:function(){return MF[i]}})});function wze(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(wze=function(n){return n?t:e})(i)}function z4t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=wze(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var Dze=ot(vse=>{"use strict";var W4t=di();Object.defineProperty(vse,"__esModule",{value:!0});vse.default=$4t;var U4t=W4t(Q6());function $4t(i){if(typeof i!="string")throw new Error((0,U4t.default)(7));return i.charAt(0).toUpperCase()+i.slice(1)}});var o3=ot(_se=>{"use strict";var j4t=di();Object.defineProperty(_se,"__esModule",{value:!0});Object.defineProperty(_se,"default",{enumerable:!0,get:function(){return q4t.default}});var q4t=j4t(Dze())});var Wze=ot(OF=>{"use strict";Object.defineProperty(OF,"__esModule",{value:!0});OF.default=void 0;var Vze=i=>i,W6t=()=>{let i=Vze;return{configure(e){i=e},generate(e){return i(e)},reset(){i=Vze}}},U6t=W6t(),kZt=OF.default=U6t});var Ese=ot(Lse=>{"use strict";var $6t=di();Object.defineProperty(Lse,"__esModule",{value:!0});Object.defineProperty(Lse,"default",{enumerable:!0,get:function(){return j6t.default}});var j6t=$6t(Wze())});var Kze=ot(ky=>{"use strict";var K6t=di();Object.defineProperty(ky,"__esModule",{value:!0});ky.default=Z6t;ky.globalStateClasses=void 0;ky.isGlobalState=X6t;var Y6t=K6t(Ese()),Gze=ky.globalStateClasses={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Z6t(i,e,t="Mui"){let n=Gze[e];return n?`${t}-${n}`:`${Y6t.default.generate(i)}-${e}`}function X6t(i){return Gze[i]!==void 0}});var Ey=ot(Ly=>{"use strict";Object.defineProperty(Ly,"__esModule",{value:!0});var Q6t={};Object.defineProperty(Ly,"default",{enumerable:!0,get:function(){return FF.default}});var FF=J6t(Kze());Object.keys(FF).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(Q6t,i)||i in Ly&&Ly[i]===FF[i]||Object.defineProperty(Ly,i,{enumerable:!0,get:function(){return FF[i]}})});function Yze(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(Yze=function(n){return n?t:e})(i)}function J6t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=Yze(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var Zze=ot(Dse=>{"use strict";var e3t=di();Object.defineProperty(Dse,"__esModule",{value:!0});Dse.default=i3t;var t3t=e3t(Ey());function i3t(i,e,t="Mui"){let n={};return e.forEach(o=>{n[o]=(0,t3t.default)(i,o,t)}),n}});var Ise=ot(Tse=>{"use strict";var n3t=di();Object.defineProperty(Tse,"__esModule",{value:!0});Object.defineProperty(Tse,"default",{enumerable:!0,get:function(){return o3t.default}});var o3t=n3t(Zze())});var Qze=ot(ys=>{"use strict";var Mse=Symbol.for("react.element"),Nse=Symbol.for("react.portal"),HF=Symbol.for("react.fragment"),BF=Symbol.for("react.strict_mode"),VF=Symbol.for("react.profiler"),WF=Symbol.for("react.provider"),UF=Symbol.for("react.context"),r3t=Symbol.for("react.server_context"),$F=Symbol.for("react.forward_ref"),jF=Symbol.for("react.suspense"),qF=Symbol.for("react.suspense_list"),GF=Symbol.for("react.memo"),KF=Symbol.for("react.lazy"),s3t=Symbol.for("react.offscreen"),Xze;Xze=Symbol.for("react.module.reference");function F1(i){if(typeof i=="object"&&i!==null){var e=i.$$typeof;switch(e){case Mse:switch(i=i.type,i){case HF:case VF:case BF:case jF:case qF:return i;default:switch(i=i&&i.$$typeof,i){case r3t:case UF:case $F:case KF:case GF:case WF:return i;default:return e}}case Nse:return e}}}ys.ContextConsumer=UF;ys.ContextProvider=WF;ys.Element=Mse;ys.ForwardRef=$F;ys.Fragment=HF;ys.Lazy=KF;ys.Memo=GF;ys.Portal=Nse;ys.Profiler=VF;ys.StrictMode=BF;ys.Suspense=jF;ys.SuspenseList=qF;ys.isAsyncMode=function(){return!1};ys.isConcurrentMode=function(){return!1};ys.isContextConsumer=function(i){return F1(i)===UF};ys.isContextProvider=function(i){return F1(i)===WF};ys.isElement=function(i){return typeof i=="object"&&i!==null&&i.$$typeof===Mse};ys.isForwardRef=function(i){return F1(i)===$F};ys.isFragment=function(i){return F1(i)===HF};ys.isLazy=function(i){return F1(i)===KF};ys.isMemo=function(i){return F1(i)===GF};ys.isPortal=function(i){return F1(i)===Nse};ys.isProfiler=function(i){return F1(i)===VF};ys.isStrictMode=function(i){return F1(i)===BF};ys.isSuspense=function(i){return F1(i)===jF};ys.isSuspenseList=function(i){return F1(i)===qF};ys.isValidElementType=function(i){return typeof i=="string"||typeof i=="function"||i===HF||i===VF||i===BF||i===jF||i===qF||i===s3t||typeof i=="object"&&i!==null&&(i.$$typeof===KF||i.$$typeof===GF||i.$$typeof===WF||i.$$typeof===UF||i.$$typeof===$F||i.$$typeof===Xze||i.getModuleId!==void 0)};ys.typeOf=F1});var eFe=ot((BZt,Jze)=>{"use strict";Jze.exports=Qze()});var rFe=ot(YF=>{"use strict";Object.defineProperty(YF,"__esModule",{value:!0});YF.default=l3t;YF.getFunctionName=nFe;var tFe=eFe(),a3t=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function nFe(i){let e=`${i}`.match(a3t);return e&&e[1]||""}function oFe(i,e=""){return i.displayName||i.name||nFe(i)||e}function iFe(i,e,t){let n=oFe(e);return i.displayName||(n!==""?`${t}(${n})`:t)}function l3t(i){if(i!=null){if(typeof i=="string")return i;if(typeof i=="function")return oFe(i,"Component");if(typeof i=="object")switch(i.$$typeof){case tFe.ForwardRef:return iFe(i,i.render,"ForwardRef");case tFe.Memo:return iFe(i,i.type,"memo");default:return}}}});var Ase=ot(Dy=>{"use strict";Object.defineProperty(Dy,"__esModule",{value:!0});var c3t={};Object.defineProperty(Dy,"default",{enumerable:!0,get:function(){return ZF.default}});var ZF=d3t(rFe());Object.keys(ZF).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(c3t,i)||i in Dy&&Dy[i]===ZF[i]||Object.defineProperty(Dy,i,{enumerable:!0,get:function(){return ZF[i]}})});function sFe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(sFe=function(n){return n?t:e})(i)}function d3t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=sFe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var cFe=ot(Ose=>{"use strict";var b3t=di();Object.defineProperty(Ose,"__esModule",{value:!0});Ose.default=lFe;var Pse=b3t(ul());function lFe(i,e){let t=(0,Pse.default)({},e);return Object.keys(i).forEach(n=>{if(n.toString().match(/^(components|slots)$/))t[n]=(0,Pse.default)({},i[n],t[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){let o=i[n]||{},r=e[n];t[n]={},!r||!Object.keys(r)?t[n]=o:!o||!Object.keys(o)?t[n]=r:(t[n]=(0,Pse.default)({},r),Object.keys(o).forEach(s=>{t[n][s]=lFe(o[s],r[s])}))}else t[n]===void 0&&(t[n]=i[n])}),t}});var tH=ot(zse=>{"use strict";var y3t=di();Object.defineProperty(zse,"__esModule",{value:!0});Object.defineProperty(zse,"default",{enumerable:!0,get:function(){return C3t.default}});var C3t=y3t(cFe())});var fFe=ot(nH=>{"use strict";"use client";Object.defineProperty(nH,"__esModule",{value:!0});nH.default=void 0;var uFe=w3t(xi());function hFe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(hFe=function(n){return n?t:e})(i)}function w3t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=hFe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var x3t=typeof window<"u"?uFe.useLayoutEffect:uFe.useEffect,iXt=nH.default=x3t});var oH=ot(Fse=>{"use strict";var S3t=di();Object.defineProperty(Fse,"__esModule",{value:!0});Object.defineProperty(Fse,"default",{enumerable:!0,get:function(){return k3t.default}});var k3t=S3t(fFe())});var pFe=ot(rH=>{"use strict";Object.defineProperty(rH,"__esModule",{value:!0});rH.default=void 0;function L3t(i,e=Number.MIN_SAFE_INTEGER,t=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(i,t))}var rXt=rH.default=L3t});var Bse=ot(Hse=>{"use strict";var E3t=di();Object.defineProperty(Hse,"__esModule",{value:!0});Object.defineProperty(Hse,"default",{enumerable:!0,get:function(){return D3t.default}});var D3t=E3t(pFe())});var gFe=ot(Wse=>{"use strict";Object.defineProperty(Wse,"__esModule",{value:!0});Wse.default=I3t;function I3t(i,e){return()=>null}});var sH=ot(Use=>{"use strict";var M3t=di();Object.defineProperty(Use,"__esModule",{value:!0});Object.defineProperty(Use,"default",{enumerable:!0,get:function(){return N3t.default}});var N3t=M3t(gFe())});var wFe=ot(aH=>{"use strict";var vFe=di();Object.defineProperty(aH,"__esModule",{value:!0});aH.default=void 0;var _Fe=vFe(Kp()),bFe=vFe(sH());function A3t(i){let{prototype:e={}}=i;return!!e.isReactComponent}function yFe(i,e,t,n,o){let r=i[e],s=o||e;if(r==null||typeof window>"u")return null;let a,l=r.type;return typeof l=="function"&&!A3t(l)&&(a="Did you accidentally use a plain function component for an element instead?"),a!==void 0?new Error(`Invalid ${n} \`${s}\` supplied to \`${t}\`. Expected an element that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}var CFe=(0,bFe.default)(_Fe.default.element,yFe);CFe.isRequired=(0,bFe.default)(_Fe.default.element.isRequired,yFe);var uXt=aH.default=CFe});var xFe=ot($se=>{"use strict";var R3t=di();Object.defineProperty($se,"__esModule",{value:!0});Object.defineProperty($se,"default",{enumerable:!0,get:function(){return P3t.default}});var P3t=R3t(wFe())});var kFe=ot(lH=>{"use strict";var SFe=di();Object.defineProperty(lH,"__esModule",{value:!0});lH.default=void 0;var O3t=SFe(Kp()),z3t=SFe(sH());function F3t(i){let{prototype:e={}}=i;return!!e.isReactComponent}function H3t(i,e,t,n,o){let r=i[e],s=o||e;if(r==null||typeof window>"u")return null;let a;return typeof r=="function"&&!F3t(r)&&(a="Did you accidentally provide a plain function component instead?"),a!==void 0?new Error(`Invalid ${n} \`${s}\` supplied to \`${t}\`. Expected an element type that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}var pXt=lH.default=(0,z3t.default)(O3t.default.elementType,H3t)});var LFe=ot(jse=>{"use strict";var B3t=di();Object.defineProperty(jse,"__esModule",{value:!0});Object.defineProperty(jse,"default",{enumerable:!0,get:function(){return V3t.default}});var V3t=B3t(kFe())});var EFe=ot(qse=>{"use strict";var W3t=di();Object.defineProperty(qse,"__esModule",{value:!0});qse.default=j3t;var U3t=W3t(ul()),$3t="exact-prop: \u200B";function j3t(i){return i}});var DFe=ot(Gse=>{"use strict";var q3t=di();Object.defineProperty(Gse,"__esModule",{value:!0});Object.defineProperty(Gse,"default",{enumerable:!0,get:function(){return G3t.default}});var G3t=q3t(EFe())});var TFe=ot(Kse=>{"use strict";Object.defineProperty(Kse,"__esModule",{value:!0});Kse.default=K3t;function K3t(i,e,t,n,o){return null}});var IFe=ot(Yse=>{"use strict";var Y3t=di();Object.defineProperty(Yse,"__esModule",{value:!0});Object.defineProperty(Yse,"default",{enumerable:!0,get:function(){return Z3t.default}});var Z3t=Y3t(TFe())});var MFe=ot(cH=>{"use strict";Object.defineProperty(cH,"__esModule",{value:!0});cH.default=void 0;var CXt=cH.default=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")()});var NFe=ot(Zse=>{"use strict";var X3t=di();Object.defineProperty(Zse,"__esModule",{value:!0});Object.defineProperty(Zse,"default",{enumerable:!0,get:function(){return Q3t.default}});var Q3t=X3t(MFe())});var AFe=ot(dH=>{"use strict";var J3t=di();Object.defineProperty(dH,"__esModule",{value:!0});dH.default=void 0;var Xse=J3t(Kp()),evt=Xse.default.oneOfType([Xse.default.func,Xse.default.object]),SXt=dH.default=evt});var RFe=ot(Qse=>{"use strict";var tvt=di();Object.defineProperty(Qse,"__esModule",{value:!0});Object.defineProperty(Qse,"default",{enumerable:!0,get:function(){return ivt.default}});var ivt=tvt(AFe())});var PFe=ot(Jse=>{"use strict";Object.defineProperty(Jse,"__esModule",{value:!0});Jse.default=nvt;function nvt(...i){return i.reduce((e,t)=>t==null?e:function(...o){e.apply(this,o),t.apply(this,o)},()=>{})}});var tae=ot(eae=>{"use strict";var ovt=di();Object.defineProperty(eae,"__esModule",{value:!0});Object.defineProperty(eae,"default",{enumerable:!0,get:function(){return rvt.default}});var rvt=ovt(PFe())});var OFe=ot(iae=>{"use strict";Object.defineProperty(iae,"__esModule",{value:!0});iae.default=svt;function svt(i,e=166){let t;function n(...o){let r=()=>{i.apply(this,o)};clearTimeout(t),t=setTimeout(r,e)}return n.clear=()=>{clearTimeout(t)},n}});var nae=ot(Ty=>{"use strict";Object.defineProperty(Ty,"__esModule",{value:!0});var avt={};Object.defineProperty(Ty,"default",{enumerable:!0,get:function(){return uH.default}});var uH=lvt(OFe());Object.keys(uH).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(avt,i)||i in Ty&&Ty[i]===uH[i]||Object.defineProperty(Ty,i,{enumerable:!0,get:function(){return uH[i]}})});function zFe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(zFe=function(n){return n?t:e})(i)}function lvt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=zFe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var FFe=ot(oae=>{"use strict";Object.defineProperty(oae,"__esModule",{value:!0});oae.default=cvt;function cvt(i,e){return()=>null}});var sae=ot(rae=>{"use strict";var dvt=di();Object.defineProperty(rae,"__esModule",{value:!0});Object.defineProperty(rae,"default",{enumerable:!0,get:function(){return uvt.default}});var uvt=dvt(FFe())});var BFe=ot(aae=>{"use strict";Object.defineProperty(aae,"__esModule",{value:!0});aae.default=pvt;var hvt=fvt(xi());function HFe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(HFe=function(n){return n?t:e})(i)}function fvt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=HFe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function pvt(i,e){var t,n;return hvt.isValidElement(i)&&e.indexOf((t=i.type.muiName)!=null?t:(n=i.type)==null||(n=n._payload)==null||(n=n.value)==null?void 0:n.muiName)!==-1}});var cae=ot(lae=>{"use strict";var mvt=di();Object.defineProperty(lae,"__esModule",{value:!0});Object.defineProperty(lae,"default",{enumerable:!0,get:function(){return gvt.default}});var gvt=mvt(BFe())});var VFe=ot(dae=>{"use strict";Object.defineProperty(dae,"__esModule",{value:!0});dae.default=vvt;function vvt(i){return i&&i.ownerDocument||document}});var hH=ot(uae=>{"use strict";var _vt=di();Object.defineProperty(uae,"__esModule",{value:!0});Object.defineProperty(uae,"default",{enumerable:!0,get:function(){return bvt.default}});var bvt=_vt(VFe())});var WFe=ot(hae=>{"use strict";var yvt=di();Object.defineProperty(hae,"__esModule",{value:!0});hae.default=wvt;var Cvt=yvt(hH());function wvt(i){return(0,Cvt.default)(i).defaultView||window}});var pae=ot(fae=>{"use strict";var xvt=di();Object.defineProperty(fae,"__esModule",{value:!0});Object.defineProperty(fae,"default",{enumerable:!0,get:function(){return Svt.default}});var Svt=xvt(WFe())});var UFe=ot(mae=>{"use strict";var kvt=di();Object.defineProperty(mae,"__esModule",{value:!0});mae.default=Evt;var Lvt=kvt(ul());function Evt(i,e){return()=>null}});var vae=ot(gae=>{"use strict";var Dvt=di();Object.defineProperty(gae,"__esModule",{value:!0});Object.defineProperty(gae,"default",{enumerable:!0,get:function(){return Tvt.default}});var Tvt=Dvt(UFe())});var $Fe=ot(_ae=>{"use strict";Object.defineProperty(_ae,"__esModule",{value:!0});_ae.default=Ivt;function Ivt(i,e){typeof i=="function"?i(e):i&&(i.current=e)}});var fH=ot(bae=>{"use strict";var Mvt=di();Object.defineProperty(bae,"__esModule",{value:!0});Object.defineProperty(bae,"default",{enumerable:!0,get:function(){return Nvt.default}});var Nvt=Mvt($Fe())});var KFe=ot(Cae=>{"use strict";"use client";Object.defineProperty(Cae,"__esModule",{value:!0});Cae.default=Pvt;var yae=Avt(xi());function GFe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(GFe=function(n){return n?t:e})(i)}function Avt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=GFe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var jFe=0;function Rvt(i){let[e,t]=yae.useState(i),n=i||e;return yae.useEffect(()=>{e==null&&(jFe+=1,t(`mui-${jFe}`))},[e]),n}var qFe=yae.useId;function Pvt(i){if(qFe!==void 0){let e=qFe();return i??e}return Rvt(i)}});var xae=ot(wae=>{"use strict";var Ovt=di();Object.defineProperty(wae,"__esModule",{value:!0});Object.defineProperty(wae,"default",{enumerable:!0,get:function(){return zvt.default}});var zvt=Ovt(KFe())});var YFe=ot(Sae=>{"use strict";Object.defineProperty(Sae,"__esModule",{value:!0});Sae.default=Fvt;function Fvt(i,e,t,n,o){return null}});var Lae=ot(kae=>{"use strict";var Hvt=di();Object.defineProperty(kae,"__esModule",{value:!0});Object.defineProperty(kae,"default",{enumerable:!0,get:function(){return Bvt.default}});var Bvt=Hvt(YFe())});var XFe=ot(Dae=>{"use strict";"use client";Object.defineProperty(Dae,"__esModule",{value:!0});Dae.default=Wvt;var Eae=Vvt(xi());function ZFe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(ZFe=function(n){return n?t:e})(i)}function Vvt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=ZFe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function Wvt({controlled:i,default:e,name:t,state:n="value"}){let{current:o}=Eae.useRef(i!==void 0),[r,s]=Eae.useState(e),a=o?i:r,l=Eae.useCallback(c=>{o||s(c)},[]);return[a,l]}});var Iae=ot(Tae=>{"use strict";var Uvt=di();Object.defineProperty(Tae,"__esModule",{value:!0});Object.defineProperty(Tae,"default",{enumerable:!0,get:function(){return $vt.default}});var $vt=Uvt(XFe())});var eHe=ot(pH=>{"use strict";"use client";var jvt=di();Object.defineProperty(pH,"__esModule",{value:!0});pH.default=void 0;var QFe=Gvt(xi()),qvt=jvt(oH());function JFe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(JFe=function(n){return n?t:e})(i)}function Gvt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=JFe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function Kvt(i){let e=QFe.useRef(i);return(0,qvt.default)(()=>{e.current=i}),QFe.useRef((...t)=>(0,e.current)(...t)).current}var YXt=pH.default=Kvt});var Nae=ot(Mae=>{"use strict";var Yvt=di();Object.defineProperty(Mae,"__esModule",{value:!0});Object.defineProperty(Mae,"default",{enumerable:!0,get:function(){return Zvt.default}});var Zvt=Yvt(eHe())});var iHe=ot(Aae=>{"use strict";"use client";var Xvt=di();Object.defineProperty(Aae,"__esModule",{value:!0});Aae.default=t8t;var Qvt=e8t(xi()),Jvt=Xvt(fH());function tHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(tHe=function(n){return n?t:e})(i)}function e8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=tHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function t8t(...i){return Qvt.useMemo(()=>i.every(e=>e==null)?null:e=>{i.forEach(t=>{(0,Jvt.default)(t,e)})},i)}});var mH=ot(Rae=>{"use strict";var i8t=di();Object.defineProperty(Rae,"__esModule",{value:!0});Object.defineProperty(Rae,"default",{enumerable:!0,get:function(){return n8t.default}});var n8t=i8t(iHe())});var Oae=ot(Pae=>{"use strict";"use client";Object.defineProperty(Pae,"__esModule",{value:!0});Pae.default=s8t;var o8t=r8t(xi());function oHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(oHe=function(n){return n?t:e})(i)}function r8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=oHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var nHe={};function s8t(i,e){let t=o8t.useRef(nHe);return t.current===nHe&&(t.current=i(e)),t}});var rHe=ot(zae=>{"use strict";var a8t=di();Object.defineProperty(zae,"__esModule",{value:!0});Object.defineProperty(zae,"default",{enumerable:!0,get:function(){return l8t.default}});var l8t=a8t(Oae())});var Hae=ot(Fae=>{"use strict";"use client";Object.defineProperty(Fae,"__esModule",{value:!0});Fae.default=h8t;var c8t=d8t(xi());function sHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(sHe=function(n){return n?t:e})(i)}function d8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=sHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var u8t=[];function h8t(i){c8t.useEffect(i,u8t)}});var Bae=ot(XE=>{"use strict";"use client";var aHe=di();Object.defineProperty(XE,"__esModule",{value:!0});XE.Timeout=void 0;XE.default=m8t;var f8t=aHe(Oae()),p8t=aHe(Hae()),gH=class i{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new i}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}};XE.Timeout=gH;function m8t(){let i=(0,f8t.default)(gH.create).current;return(0,p8t.default)(i.disposeEffect),i}});var dHe=ot(vH=>{"use strict";Object.defineProperty(vH,"__esModule",{value:!0});Object.defineProperty(vH,"Timeout",{enumerable:!0,get:function(){return lHe.Timeout}});Object.defineProperty(vH,"default",{enumerable:!0,get:function(){return lHe.default}});var lHe=g8t(Bae());function cHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(cHe=function(n){return n?t:e})(i)}function g8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=cHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var uHe=ot(Vae=>{"use strict";var v8t=di();Object.defineProperty(Vae,"__esModule",{value:!0});Object.defineProperty(Vae,"default",{enumerable:!0,get:function(){return _8t.default}});var _8t=v8t(Hae())});var gHe=ot(bH=>{"use strict";"use client";Object.defineProperty(bH,"__esModule",{value:!0});bH.default=E8t;bH.teardown=k8t;var hHe=y8t(xi()),b8t=Bae();function fHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(fHe=function(n){return n?t:e})(i)}function y8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=fHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var _H=!0,Wae=!1,C8t=new b8t.Timeout,w8t={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function x8t(i){let{type:e,tagName:t}=i;return!!(t==="INPUT"&&w8t[e]&&!i.readOnly||t==="TEXTAREA"&&!i.readOnly||i.isContentEditable)}function pHe(i){i.metaKey||i.altKey||i.ctrlKey||(_H=!0)}function Iy(){_H=!1}function mHe(){this.visibilityState==="hidden"&&Wae&&(_H=!0)}function S8t(i){i.addEventListener("keydown",pHe,!0),i.addEventListener("mousedown",Iy,!0),i.addEventListener("pointerdown",Iy,!0),i.addEventListener("touchstart",Iy,!0),i.addEventListener("visibilitychange",mHe,!0)}function k8t(i){i.removeEventListener("keydown",pHe,!0),i.removeEventListener("mousedown",Iy,!0),i.removeEventListener("pointerdown",Iy,!0),i.removeEventListener("touchstart",Iy,!0),i.removeEventListener("visibilitychange",mHe,!0)}function L8t(i){let{target:e}=i;try{return e.matches(":focus-visible")}catch{}return _H||x8t(e)}function E8t(){let i=hHe.useCallback(o=>{o!=null&&S8t(o.ownerDocument)},[]),e=hHe.useRef(!1);function t(){return e.current?(Wae=!0,C8t.start(100,()=>{Wae=!1}),e.current=!1,!0):!1}function n(o){return L8t(o)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:n,onBlur:t,ref:i}}});var Uae=ot(My=>{"use strict";Object.defineProperty(My,"__esModule",{value:!0});var D8t={};Object.defineProperty(My,"default",{enumerable:!0,get:function(){return yH.default}});var yH=T8t(gHe());Object.keys(yH).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(D8t,i)||i in My&&My[i]===yH[i]||Object.defineProperty(My,i,{enumerable:!0,get:function(){return yH[i]}})});function vHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(vHe=function(n){return n?t:e})(i)}function T8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=vHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var _He=ot($ae=>{"use strict";Object.defineProperty($ae,"__esModule",{value:!0});$ae.default=I8t;function I8t(i){let e=i.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}});var bHe=ot(jae=>{"use strict";var M8t=di();Object.defineProperty(jae,"__esModule",{value:!0});Object.defineProperty(jae,"default",{enumerable:!0,get:function(){return N8t.default}});var N8t=M8t(_He())});var CHe=ot(CH=>{"use strict";Object.defineProperty(CH,"__esModule",{value:!0});CH.detectScrollType=yHe;CH.getNormalizedScrollLeft=A8t;var Ny;function yHe(){if(Ny)return Ny;let i=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",i.appendChild(e),i.dir="rtl",i.style.fontSize="14px",i.style.width="4px",i.style.height="1px",i.style.position="absolute",i.style.top="-1000px",i.style.overflow="scroll",document.body.appendChild(i),Ny="reverse",i.scrollLeft>0?Ny="default":(i.scrollLeft=1,i.scrollLeft===0&&(Ny="negative")),document.body.removeChild(i),Ny}function A8t(i,e){let t=i.scrollLeft;if(e!=="rtl")return t;switch(yHe()){case"negative":return i.scrollWidth-i.clientWidth+t;case"reverse":return i.scrollWidth-i.clientWidth-t;default:return t}}});var wHe=ot(QE=>{"use strict";Object.defineProperty(QE,"__esModule",{value:!0});var qae=CHe();Object.keys(qae).forEach(function(i){i==="default"||i==="__esModule"||i in QE&&QE[i]===qae[i]||Object.defineProperty(QE,i,{enumerable:!0,get:function(){return qae[i]}})})});var kHe=ot(wH=>{"use strict";"use client";Object.defineProperty(wH,"__esModule",{value:!0});wH.default=void 0;var xHe=R8t(xi());function SHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(SHe=function(n){return n?t:e})(i)}function R8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=SHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var P8t=i=>{let e=xHe.useRef({});return xHe.useEffect(()=>{e.current=i}),e.current},hQt=wH.default=P8t});var LHe=ot(Gae=>{"use strict";var O8t=di();Object.defineProperty(Gae,"__esModule",{value:!0});Object.defineProperty(Gae,"default",{enumerable:!0,get:function(){return z8t.default}});var z8t=O8t(kHe())});var THe=ot(Kae=>{"use strict";Object.defineProperty(Kae,"__esModule",{value:!0});Kae.default=H8t;var EHe=F8t(xi());function DHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(DHe=function(n){return n?t:e})(i)}function F8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=DHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function H8t(i){return EHe.Children.toArray(i).filter(e=>EHe.isValidElement(e))}});var IHe=ot(Yae=>{"use strict";var B8t=di();Object.defineProperty(Yae,"__esModule",{value:!0});Object.defineProperty(Yae,"default",{enumerable:!0,get:function(){return V8t.default}});var V8t=B8t(THe())});var MHe=ot(xH=>{"use strict";Object.defineProperty(xH,"__esModule",{value:!0});xH.default=void 0;var W8t={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},vQt=xH.default=W8t});var NHe=ot(Zae=>{"use strict";var U8t=di();Object.defineProperty(Zae,"__esModule",{value:!0});Object.defineProperty(Zae,"default",{enumerable:!0,get:function(){return $8t.default}});var $8t=U8t(MHe())});var PHe=ot(JE=>{"use strict";Object.defineProperty(JE,"__esModule",{value:!0});JE.default=void 0;JE.getTypeByValue=AHe;function AHe(i){let e=typeof i;switch(e){case"number":return Number.isNaN(i)?"NaN":Number.isFinite(i)?i!==Math.floor(i)?"float":"number":"Infinity";case"object":return i===null?"null":i.constructor.name;default:return e}}function j8t(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i}var q8t=Number.isInteger||j8t;function RHe(i,e,t,n){let o=i[e];if(o==null||!q8t(o)){let r=AHe(o);return new RangeError(`Invalid ${n} \`${e}\` of type \`${r}\` supplied to \`${t}\`, expected \`integer\`.`)}return null}function G8t(i,e,...t){return i[e]===void 0?null:RHe(i,e,...t)}function Xae(){return null}G8t.isRequired=RHe;Xae.isRequired=Xae;var yQt=JE.default=Xae});var zHe=ot(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});var K8t={};Object.defineProperty(Ay,"default",{enumerable:!0,get:function(){return SH.default}});var SH=Y8t(PHe());Object.keys(SH).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(K8t,i)||i in Ay&&Ay[i]===SH[i]||Object.defineProperty(Ay,i,{enumerable:!0,get:function(){return SH[i]}})});function OHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(OHe=function(n){return n?t:e})(i)}function Y8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=OHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var FHe=ot(Qae=>{"use strict";Object.defineProperty(Qae,"__esModule",{value:!0});Qae.default=Z8t;function Z8t(i,e,t=void 0){let n={};return Object.keys(i).forEach(o=>{n[o]=i[o].reduce((r,s)=>{if(s){let a=e(s);a!==""&&r.push(a),t&&t[s]&&r.push(t[s])}return r},[]).join(" ")}),n}});var ele=ot(Jae=>{"use strict";var X8t=di();Object.defineProperty(Jae,"__esModule",{value:!0});Object.defineProperty(Jae,"default",{enumerable:!0,get:function(){return Q8t.default}});var Q8t=X8t(FHe())});var Yp=ot((kQt,eD)=>{function J8t(i,e){if(i==null)return{};var t={};for(var n in i)if({}.hasOwnProperty.call(i,n)){if(e.includes(n))continue;t[n]=i[n]}return t}eD.exports=J8t,eD.exports.__esModule=!0,eD.exports.default=eD.exports});var HHe=ot(kH=>{"use strict";Object.defineProperty(kH,"__esModule",{value:!0});kH.default=void 0;function e_t(i){return typeof i=="string"}var LQt=kH.default=e_t});var BHe=ot(tle=>{"use strict";var t_t=di();Object.defineProperty(tle,"__esModule",{value:!0});Object.defineProperty(tle,"default",{enumerable:!0,get:function(){return i_t.default}});var i_t=t_t(HHe())});var UHe=ot(LH=>{"use strict";var WHe=di();Object.defineProperty(LH,"__esModule",{value:!0});LH.default=void 0;var VHe=WHe(ul()),n_t=WHe(BHe());function o_t(i,e,t){return i===void 0||(0,n_t.default)(i)?e:(0,VHe.default)({},e,{ownerState:(0,VHe.default)({},e.ownerState,t)})}var TQt=LH.default=o_t});var $He=ot(ile=>{"use strict";var r_t=di();Object.defineProperty(ile,"__esModule",{value:!0});Object.defineProperty(ile,"default",{enumerable:!0,get:function(){return s_t.default}});var s_t=r_t(UHe())});var ole=ot((NQt,nle)=>{function qHe(i){var e,t,n="";if(typeof i=="string"||typeof i=="number")n+=i;else if(typeof i=="object")if(Array.isArray(i)){var o=i.length;for(e=0;e{"use strict";Object.defineProperty(EH,"__esModule",{value:!0});EH.default=void 0;function a_t(i,e=[]){if(i===void 0)return{};let t={};return Object.keys(i).filter(n=>n.match(/^on[A-Z]/)&&typeof i[n]=="function"&&!e.includes(n)).forEach(n=>{t[n]=i[n]}),t}var AQt=EH.default=a_t});var sle=ot(rle=>{"use strict";var l_t=di();Object.defineProperty(rle,"__esModule",{value:!0});Object.defineProperty(rle,"default",{enumerable:!0,get:function(){return c_t.default}});var c_t=l_t(GHe())});var KHe=ot(DH=>{"use strict";Object.defineProperty(DH,"__esModule",{value:!0});DH.default=void 0;function d_t(i){if(i===void 0)return{};let e={};return Object.keys(i).filter(t=>!(t.match(/^on[A-Z]/)&&typeof i[t]=="function")).forEach(t=>{e[t]=i[t]}),e}var OQt=DH.default=d_t});var YHe=ot(ale=>{"use strict";var u_t=di();Object.defineProperty(ale,"__esModule",{value:!0});Object.defineProperty(ale,"default",{enumerable:!0,get:function(){return h_t.default}});var h_t=u_t(KHe())});var QHe=ot(IH=>{"use strict";var TH=di();Object.defineProperty(IH,"__esModule",{value:!0});IH.default=void 0;var tD=TH(ul()),ZHe=TH(ole()),f_t=TH(sle()),XHe=TH(YHe());function p_t(i){let{getSlotProps:e,additionalProps:t,externalSlotProps:n,externalForwardedProps:o,className:r}=i;if(!e){let f=(0,ZHe.default)(t?.className,r,o?.className,n?.className),p=(0,tD.default)({},t?.style,o?.style,n?.style),m=(0,tD.default)({},t,o,n);return f.length>0&&(m.className=f),Object.keys(p).length>0&&(m.style=p),{props:m,internalRef:void 0}}let s=(0,f_t.default)((0,tD.default)({},o,n)),a=(0,XHe.default)(n),l=(0,XHe.default)(o),c=e(s),d=(0,ZHe.default)(c?.className,t?.className,r,o?.className,n?.className),u=(0,tD.default)({},c?.style,t?.style,o?.style,n?.style),h=(0,tD.default)({},c,t,l,a);return d.length>0&&(h.className=d),Object.keys(u).length>0&&(h.style=u),{props:h,internalRef:c.ref}}var HQt=IH.default=p_t});var JHe=ot(lle=>{"use strict";var m_t=di();Object.defineProperty(lle,"__esModule",{value:!0});Object.defineProperty(lle,"default",{enumerable:!0,get:function(){return g_t.default}});var g_t=m_t(QHe())});var eBe=ot(MH=>{"use strict";Object.defineProperty(MH,"__esModule",{value:!0});MH.default=void 0;function v_t(i,e,t){return typeof i=="function"?i(e,t):i}var WQt=MH.default=v_t});var dle=ot(cle=>{"use strict";var __t=di();Object.defineProperty(cle,"__esModule",{value:!0});Object.defineProperty(cle,"default",{enumerable:!0,get:function(){return b_t.default}});var b_t=__t(eBe())});var iBe=ot(NH=>{"use strict";"use client";var Ry=di();Object.defineProperty(NH,"__esModule",{value:!0});NH.default=void 0;var tBe=Ry(ul()),y_t=Ry(Yp()),C_t=Ry(mH()),w_t=Ry($He()),x_t=Ry(JHe()),S_t=Ry(dle()),k_t=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function L_t(i){var e;let{elementType:t,externalSlotProps:n,ownerState:o,skipResolvingSlotProps:r=!1}=i,s=(0,y_t.default)(i,k_t),a=r?{}:(0,S_t.default)(n,o),{props:l,internalRef:c}=(0,x_t.default)((0,tBe.default)({},s,{externalSlotProps:a})),d=(0,C_t.default)(c,a?.ref,(e=i.additionalProps)==null?void 0:e.ref);return(0,w_t.default)(t,(0,tBe.default)({},l,{ref:d}),o)}var jQt=NH.default=L_t});var nBe=ot(ule=>{"use strict";var E_t=di();Object.defineProperty(ule,"__esModule",{value:!0});Object.defineProperty(ule,"default",{enumerable:!0,get:function(){return D_t.default}});var D_t=E_t(iBe())});var rBe=ot(oBe=>{"use strict";Object.defineProperty(oBe,"__esModule",{value:!0})});var ur=ot(Un=>{"use strict";var Bo=di();Object.defineProperty(Un,"__esModule",{value:!0});var sBe={chainPropTypes:!0,deepmerge:!0,isPlainObject:!0,elementAcceptingRef:!0,elementTypeAcceptingRef:!0,exactProp:!0,formatMuiErrorMessage:!0,getDisplayName:!0,HTMLElementType:!0,ponyfillGlobal:!0,refType:!0,unstable_capitalize:!0,unstable_createChainedFunction:!0,unstable_debounce:!0,unstable_deprecatedPropType:!0,unstable_isMuiElement:!0,unstable_ownerDocument:!0,unstable_ownerWindow:!0,unstable_requirePropFactory:!0,unstable_setRef:!0,unstable_useEnhancedEffect:!0,unstable_useId:!0,unstable_unsupportedProp:!0,unstable_useControlled:!0,unstable_useEventCallback:!0,unstable_useForkRef:!0,unstable_useLazyRef:!0,unstable_useTimeout:!0,unstable_Timeout:!0,unstable_useOnMount:!0,unstable_useIsFocusVisible:!0,unstable_getScrollbarSize:!0,unstable_detectScrollType:!0,unstable_getNormalizedScrollLeft:!0,usePreviousProps:!0,getValidReactChildren:!0,visuallyHidden:!0,integerPropType:!0,internal_resolveProps:!0,unstable_composeClasses:!0,unstable_generateUtilityClass:!0,unstable_isGlobalState:!0,unstable_generateUtilityClasses:!0,unstable_ClassNameGenerator:!0,clamp:!0,unstable_useSlotProps:!0,unstable_resolveComponentProps:!0,unstable_extractEventHandlers:!0};Object.defineProperty(Un,"HTMLElementType",{enumerable:!0,get:function(){return P_t.default}});Object.defineProperty(Un,"chainPropTypes",{enumerable:!0,get:function(){return T_t.default}});Object.defineProperty(Un,"clamp",{enumerable:!0,get:function(){return u5t.default}});Object.defineProperty(Un,"deepmerge",{enumerable:!0,get:function(){return aBe.default}});Object.defineProperty(Un,"elementAcceptingRef",{enumerable:!0,get:function(){return I_t.default}});Object.defineProperty(Un,"elementTypeAcceptingRef",{enumerable:!0,get:function(){return M_t.default}});Object.defineProperty(Un,"exactProp",{enumerable:!0,get:function(){return N_t.default}});Object.defineProperty(Un,"formatMuiErrorMessage",{enumerable:!0,get:function(){return A_t.default}});Object.defineProperty(Un,"getDisplayName",{enumerable:!0,get:function(){return R_t.default}});Object.defineProperty(Un,"getValidReactChildren",{enumerable:!0,get:function(){return o5t.default}});Object.defineProperty(Un,"integerPropType",{enumerable:!0,get:function(){return s5t.default}});Object.defineProperty(Un,"internal_resolveProps",{enumerable:!0,get:function(){return a5t.default}});Object.defineProperty(Un,"isPlainObject",{enumerable:!0,get:function(){return aBe.isPlainObject}});Object.defineProperty(Un,"ponyfillGlobal",{enumerable:!0,get:function(){return O_t.default}});Object.defineProperty(Un,"refType",{enumerable:!0,get:function(){return z_t.default}});Object.defineProperty(Un,"unstable_ClassNameGenerator",{enumerable:!0,get:function(){return d5t.default}});Object.defineProperty(Un,"unstable_Timeout",{enumerable:!0,get:function(){return lBe.Timeout}});Object.defineProperty(Un,"unstable_capitalize",{enumerable:!0,get:function(){return F_t.default}});Object.defineProperty(Un,"unstable_composeClasses",{enumerable:!0,get:function(){return l5t.default}});Object.defineProperty(Un,"unstable_createChainedFunction",{enumerable:!0,get:function(){return H_t.default}});Object.defineProperty(Un,"unstable_debounce",{enumerable:!0,get:function(){return B_t.default}});Object.defineProperty(Un,"unstable_deprecatedPropType",{enumerable:!0,get:function(){return V_t.default}});Object.defineProperty(Un,"unstable_detectScrollType",{enumerable:!0,get:function(){return cBe.detectScrollType}});Object.defineProperty(Un,"unstable_extractEventHandlers",{enumerable:!0,get:function(){return p5t.default}});Object.defineProperty(Un,"unstable_generateUtilityClass",{enumerable:!0,get:function(){return iD.default}});Object.defineProperty(Un,"unstable_generateUtilityClasses",{enumerable:!0,get:function(){return c5t.default}});Object.defineProperty(Un,"unstable_getNormalizedScrollLeft",{enumerable:!0,get:function(){return cBe.getNormalizedScrollLeft}});Object.defineProperty(Un,"unstable_getScrollbarSize",{enumerable:!0,get:function(){return i5t.default}});Object.defineProperty(Un,"unstable_isGlobalState",{enumerable:!0,get:function(){return iD.isGlobalState}});Object.defineProperty(Un,"unstable_isMuiElement",{enumerable:!0,get:function(){return W_t.default}});Object.defineProperty(Un,"unstable_ownerDocument",{enumerable:!0,get:function(){return U_t.default}});Object.defineProperty(Un,"unstable_ownerWindow",{enumerable:!0,get:function(){return $_t.default}});Object.defineProperty(Un,"unstable_requirePropFactory",{enumerable:!0,get:function(){return j_t.default}});Object.defineProperty(Un,"unstable_resolveComponentProps",{enumerable:!0,get:function(){return f5t.default}});Object.defineProperty(Un,"unstable_setRef",{enumerable:!0,get:function(){return q_t.default}});Object.defineProperty(Un,"unstable_unsupportedProp",{enumerable:!0,get:function(){return Y_t.default}});Object.defineProperty(Un,"unstable_useControlled",{enumerable:!0,get:function(){return Z_t.default}});Object.defineProperty(Un,"unstable_useEnhancedEffect",{enumerable:!0,get:function(){return G_t.default}});Object.defineProperty(Un,"unstable_useEventCallback",{enumerable:!0,get:function(){return X_t.default}});Object.defineProperty(Un,"unstable_useForkRef",{enumerable:!0,get:function(){return Q_t.default}});Object.defineProperty(Un,"unstable_useId",{enumerable:!0,get:function(){return K_t.default}});Object.defineProperty(Un,"unstable_useIsFocusVisible",{enumerable:!0,get:function(){return t5t.default}});Object.defineProperty(Un,"unstable_useLazyRef",{enumerable:!0,get:function(){return J_t.default}});Object.defineProperty(Un,"unstable_useOnMount",{enumerable:!0,get:function(){return e5t.default}});Object.defineProperty(Un,"unstable_useSlotProps",{enumerable:!0,get:function(){return h5t.default}});Object.defineProperty(Un,"unstable_useTimeout",{enumerable:!0,get:function(){return lBe.default}});Object.defineProperty(Un,"usePreviousProps",{enumerable:!0,get:function(){return n5t.default}});Object.defineProperty(Un,"visuallyHidden",{enumerable:!0,get:function(){return r5t.default}});var T_t=Bo(sH()),aBe=fle(Xd()),I_t=Bo(xFe()),M_t=Bo(LFe()),N_t=Bo(DFe()),A_t=Bo(Q6()),R_t=Bo(Ase()),P_t=Bo(IFe()),O_t=Bo(NFe()),z_t=Bo(RFe()),F_t=Bo(o3()),H_t=Bo(tae()),B_t=Bo(nae()),V_t=Bo(sae()),W_t=Bo(cae()),U_t=Bo(hH()),$_t=Bo(pae()),j_t=Bo(vae()),q_t=Bo(fH()),G_t=Bo(oH()),K_t=Bo(xae()),Y_t=Bo(Lae()),Z_t=Bo(Iae()),X_t=Bo(Nae()),Q_t=Bo(mH()),J_t=Bo(rHe()),lBe=fle(dHe()),e5t=Bo(uHe()),t5t=Bo(Uae()),i5t=Bo(bHe()),cBe=wHe(),n5t=Bo(LHe()),o5t=Bo(IHe()),r5t=Bo(NHe()),s5t=Bo(zHe()),a5t=Bo(tH()),l5t=Bo(ele()),iD=fle(Ey());Object.keys(iD).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(sBe,i)||i in Un&&Un[i]===iD[i]||Object.defineProperty(Un,i,{enumerable:!0,get:function(){return iD[i]}})});var c5t=Bo(Ise()),d5t=Bo(Ese()),u5t=Bo(Bse()),h5t=Bo(nBe()),f5t=Bo(dle()),p5t=Bo(sle()),hle=rBe();Object.keys(hle).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(sBe,i)||i in Un&&Un[i]===hle[i]||Object.defineProperty(Un,i,{enumerable:!0,get:function(){return hle[i]}})});function dBe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(dBe=function(n){return n?t:e})(i)}function fle(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=dBe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var Ele=ot(aD=>{"use strict";var TBe=di();Object.defineProperty(aD,"__esModule",{value:!0});aD.breakpointKeys=void 0;aD.default=P5t;var N5t=TBe(Yp()),IBe=TBe(ul()),A5t=["values","unit","step"],kei=aD.breakpointKeys=["xs","sm","md","lg","xl"],R5t=i=>{let e=Object.keys(i).map(t=>({key:t,val:i[t]}))||[];return e.sort((t,n)=>t.val-n.val),e.reduce((t,n)=>(0,IBe.default)({},t,{[n.key]:n.val}),{})};function P5t(i){let{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:t="px",step:n=5}=i,o=(0,N5t.default)(i,A5t),r=R5t(e),s=Object.keys(r);function a(h){return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${t})`}function l(h){return`@media (max-width:${(typeof e[h]=="number"?e[h]:h)-n/100}${t})`}function c(h,f){let p=s.indexOf(f);return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${t}) and (max-width:${(p!==-1&&typeof e[s[p]]=="number"?e[s[p]]:f)-n/100}${t})`}function d(h){return s.indexOf(h)+1{"use strict";Object.defineProperty(zH,"__esModule",{value:!0});zH.default=void 0;var O5t={borderRadius:4},Eei=zH.default=O5t});var lD=ot(FH=>{"use strict";var z5t=di();Object.defineProperty(FH,"__esModule",{value:!0});FH.default=void 0;var Tei=z5t(Kp()),F5t={},Iei=FH.default=F5t});var cD=ot(HH=>{"use strict";var H5t=di();Object.defineProperty(HH,"__esModule",{value:!0});HH.default=void 0;var B5t=H5t(Xd());function V5t(i,e){return e?(0,B5t.default)(i,e,{clone:!1}):i}var Nei=HH.default=V5t});var P_=ot(H1=>{"use strict";var BH=di();Object.defineProperty(H1,"__esModule",{value:!0});H1.computeBreakpointsBase=PBe;H1.createEmptyBreakpointObject=ABe;H1.default=void 0;H1.handleBreakpoints=j5t;H1.mergeBreakpointsInOrder=G5t;H1.removeUnusedBreakpoints=RBe;H1.resolveBreakpointValues=K5t;H1.values=void 0;var W5t=BH(ul()),Rei=BH(Kp()),U5t=BH(Xd()),$5t=BH(cD()),NBe=H1.values={xs:0,sm:600,md:900,lg:1200,xl:1536},Dle={keys:["xs","sm","md","lg","xl"],up:i=>`@media (min-width:${NBe[i]}px)`};function j5t(i,e,t){let n=i.theme||{};if(Array.isArray(e)){let r=n.breakpoints||Dle;return e.reduce((s,a,l)=>(s[r.up(r.keys[l])]=t(e[l]),s),{})}if(typeof e=="object"){let r=n.breakpoints||Dle;return Object.keys(e).reduce((s,a)=>{if(Object.keys(r.values||NBe).indexOf(a)!==-1){let l=r.up(a);s[l]=t(e[a],a)}else{let l=a;s[l]=e[l]}return s},{})}return t(e)}function q5t(i){let e=t=>{let n=t.theme||{},o=i(t),r=n.breakpoints||Dle,s=r.keys.reduce((a,l)=>(t[l]&&(a=a||{},a[r.up(l)]=i((0,W5t.default)({theme:n},t[l]))),a),null);return(0,$5t.default)(o,s)};return e.propTypes={},e.filterProps=["xs","sm","md","lg","xl",...i.filterProps],e}function ABe(i={}){var e;return((e=i.keys)==null?void 0:e.reduce((n,o)=>{let r=i.up(o);return n[r]={},n},{}))||{}}function RBe(i,e){return i.reduce((t,n)=>{let o=t[n];return(!o||Object.keys(o).length===0)&&delete t[n],t},e)}function G5t(i,...e){let t=ABe(i),n=[t,...e].reduce((o,r)=>(0,U5t.default)(o,r),{});return RBe(Object.keys(t),n)}function PBe(i,e){if(typeof i!="object")return{};let t={},n=Object.keys(e);return Array.isArray(i)?n.forEach((o,r)=>{r{i[o]!=null&&(t[o]=!0)}),t}function K5t({values:i,breakpoints:e,base:t}){let n=t||PBe(i,e),o=Object.keys(n);if(o.length===0)return i;let r;return o.reduce((s,a,l)=>(Array.isArray(i)?(s[a]=i[l]!=null?i[l]:i[r],r=l):typeof i=="object"?(s[a]=i[a]!=null?i[a]:i[r],r=a):s[a]=i,s),{})}var Pei=H1.default=q5t});var O_=ot(Oy=>{"use strict";var OBe=di();Object.defineProperty(Oy,"__esModule",{value:!0});Oy.default=void 0;Oy.getPath=Ile;Oy.getStyleValue=Tle;var Y5t=OBe(o3()),zei=OBe(lD()),Z5t=P_();function Ile(i,e,t=!0){if(!e||typeof e!="string")return null;if(i&&i.vars&&t){let n=`vars.${e}`.split(".").reduce((o,r)=>o&&o[r]?o[r]:null,i);if(n!=null)return n}return e.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,i)}function Tle(i,e,t,n=t){let o;return typeof i=="function"?o=i(t):Array.isArray(i)?o=i[t]||n:o=Ile(i,t)||n,e&&(o=e(o,n,i)),o}function X5t(i){let{prop:e,cssProperty:t=i.prop,themeKey:n,transform:o}=i,r=s=>{if(s[e]==null)return null;let a=s[e],l=s.theme,c=Ile(l,n)||{},d=u=>{let h=Tle(c,o,u);return u===h&&typeof u=="string"&&(h=Tle(c,o,`${e}${u==="default"?"":(0,Y5t.default)(u)}`,u)),t===!1?h:{[t]:h}};return(0,Z5t.handleBreakpoints)(s,a,d)};return r.propTypes={},r.filterProps=[e],r}var Fei=Oy.default=X5t});var zBe=ot(Mle=>{"use strict";Object.defineProperty(Mle,"__esModule",{value:!0});Mle.default=Q5t;function Q5t(i){let e={};return t=>(e[t]===void 0&&(e[t]=i(t)),e[t])}});var dD=ot(Nh=>{"use strict";var Nle=di();Object.defineProperty(Nh,"__esModule",{value:!0});Nh.createUnarySpacing=VBe;Nh.createUnaryUnit=BBe;Nh.default=void 0;Nh.getStyleFromPropValue=UBe;Nh.getValue=WBe;Nh.margin=Ole;Nh.marginKeys=void 0;Nh.padding=zle;Nh.paddingKeys=void 0;var Vei=Nle(lD()),J5t=P_(),ebt=O_(),tbt=Nle(cD()),ibt=Nle(zBe()),nbt={m:"margin",p:"padding"},obt={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},FBe={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},rbt=(0,ibt.default)(i=>{if(i.length>2)if(FBe[i])i=FBe[i];else return[i];let[e,t]=i.split(""),n=nbt[e],o=obt[t]||"";return Array.isArray(o)?o.map(r=>n+r):[n+o]}),Ale=Nh.marginKeys=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Rle=Nh.paddingKeys=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],HBe=[...Ale,...Rle];function BBe(i,e,t,n){var o;let r=(o=(0,ebt.getPath)(i,e,!1))!=null?o:t;return typeof r=="number"?s=>typeof s=="string"?s:r*s:Array.isArray(r)?s=>typeof s=="string"?s:r[s]:typeof r=="function"?r:()=>{}}function VBe(i){return BBe(i,"spacing",8,"spacing")}function WBe(i,e){if(typeof e=="string"||e==null)return e;let t=Math.abs(e),n=i(t);return e>=0?n:typeof n=="number"?-n:`-${n}`}function UBe(i,e){return t=>i.reduce((n,o)=>(n[o]=WBe(e,t),n),{})}function sbt(i,e,t,n){if(e.indexOf(t)===-1)return null;let o=rbt(t),r=UBe(o,n),s=i[t];return(0,J5t.handleBreakpoints)(i,s,r)}function Ple(i,e){let t=VBe(i.theme);return Object.keys(i).map(n=>sbt(i,e,n,t)).reduce(tbt.default,{})}function Ole(i){return Ple(i,Ale)}Ole.propTypes={};Ole.filterProps=Ale;function zle(i){return Ple(i,Rle)}zle.propTypes={};zle.filterProps=Rle;function Fle(i){return Ple(i,HBe)}Fle.propTypes={};Fle.filterProps=HBe;var Wei=Nh.default=Fle});var $Be=ot(Hle=>{"use strict";Object.defineProperty(Hle,"__esModule",{value:!0});Hle.default=lbt;var abt=dD();function lbt(i=8){if(i.mui)return i;let e=(0,abt.createUnarySpacing)({spacing:i}),t=(...n)=>(n.length===0?[1]:n).map(r=>{let s=e(r);return typeof s=="number"?`${s}px`:s}).join(" ");return t.mui=!0,t}});var uD=ot(VH=>{"use strict";var cbt=di();Object.defineProperty(VH,"__esModule",{value:!0});VH.default=void 0;var dbt=cbt(cD());function ubt(...i){let e=i.reduce((n,o)=>(o.filterProps.forEach(r=>{n[r]=o}),n),{}),t=n=>Object.keys(n).reduce((o,r)=>e[r]?(0,dbt.default)(o,e[r](n)):o,{});return t.propTypes={},t.filterProps=i.reduce((n,o)=>n.concat(o.filterProps),[]),t}var jei=VH.default=ubt});var qBe=ot(es=>{"use strict";var Ble=di();Object.defineProperty(es,"__esModule",{value:!0});es.borderTopColor=es.borderTop=es.borderRightColor=es.borderRight=es.borderRadius=es.borderLeftColor=es.borderLeft=es.borderColor=es.borderBottomColor=es.borderBottom=es.border=void 0;es.borderTransform=z_;es.outlineColor=es.outline=es.default=void 0;var Gei=Ble(lD()),hbt=Ble(O_()),fbt=Ble(uD()),jBe=dD(),pbt=P_();function z_(i){return typeof i!="number"?i:`${i}px solid`}function B1(i,e){return(0,hbt.default)({prop:i,themeKey:"borders",transform:e})}var mbt=es.border=B1("border",z_),gbt=es.borderTop=B1("borderTop",z_),vbt=es.borderRight=B1("borderRight",z_),_bt=es.borderBottom=B1("borderBottom",z_),bbt=es.borderLeft=B1("borderLeft",z_),ybt=es.borderColor=B1("borderColor"),Cbt=es.borderTopColor=B1("borderTopColor"),wbt=es.borderRightColor=B1("borderRightColor"),xbt=es.borderBottomColor=B1("borderBottomColor"),Sbt=es.borderLeftColor=B1("borderLeftColor"),kbt=es.outline=B1("outline",z_),Lbt=es.outlineColor=B1("outlineColor"),WH=i=>{if(i.borderRadius!==void 0&&i.borderRadius!==null){let e=(0,jBe.createUnaryUnit)(i.theme,"shape.borderRadius",4,"borderRadius"),t=n=>({borderRadius:(0,jBe.getValue)(e,n)});return(0,pbt.handleBreakpoints)(i,i.borderRadius,t)}return null};es.borderRadius=WH;WH.propTypes={};WH.filterProps=["borderRadius"];var Ebt=(0,fbt.default)(mbt,gbt,vbt,_bt,bbt,ybt,Cbt,wbt,xbt,Sbt,WH,kbt,Lbt),Kei=es.default=Ebt});var GBe=ot(Ss=>{"use strict";var Vle=di();Object.defineProperty(Ss,"__esModule",{value:!0});Ss.rowGap=Ss.gridTemplateRows=Ss.gridTemplateColumns=Ss.gridTemplateAreas=Ss.gridRow=Ss.gridColumn=Ss.gridAutoRows=Ss.gridAutoFlow=Ss.gridAutoColumns=Ss.gridArea=Ss.gap=Ss.default=Ss.columnGap=void 0;var E0=Vle(O_()),Dbt=Vle(uD()),zy=dD(),Wle=P_(),Zei=Vle(lD()),UH=i=>{if(i.gap!==void 0&&i.gap!==null){let e=(0,zy.createUnaryUnit)(i.theme,"spacing",8,"gap"),t=n=>({gap:(0,zy.getValue)(e,n)});return(0,Wle.handleBreakpoints)(i,i.gap,t)}return null};Ss.gap=UH;UH.propTypes={};UH.filterProps=["gap"];var $H=i=>{if(i.columnGap!==void 0&&i.columnGap!==null){let e=(0,zy.createUnaryUnit)(i.theme,"spacing",8,"columnGap"),t=n=>({columnGap:(0,zy.getValue)(e,n)});return(0,Wle.handleBreakpoints)(i,i.columnGap,t)}return null};Ss.columnGap=$H;$H.propTypes={};$H.filterProps=["columnGap"];var jH=i=>{if(i.rowGap!==void 0&&i.rowGap!==null){let e=(0,zy.createUnaryUnit)(i.theme,"spacing",8,"rowGap"),t=n=>({rowGap:(0,zy.getValue)(e,n)});return(0,Wle.handleBreakpoints)(i,i.rowGap,t)}return null};Ss.rowGap=jH;jH.propTypes={};jH.filterProps=["rowGap"];var Tbt=Ss.gridColumn=(0,E0.default)({prop:"gridColumn"}),Ibt=Ss.gridRow=(0,E0.default)({prop:"gridRow"}),Mbt=Ss.gridAutoFlow=(0,E0.default)({prop:"gridAutoFlow"}),Nbt=Ss.gridAutoColumns=(0,E0.default)({prop:"gridAutoColumns"}),Abt=Ss.gridAutoRows=(0,E0.default)({prop:"gridAutoRows"}),Rbt=Ss.gridTemplateColumns=(0,E0.default)({prop:"gridTemplateColumns"}),Pbt=Ss.gridTemplateRows=(0,E0.default)({prop:"gridTemplateRows"}),Obt=Ss.gridTemplateAreas=(0,E0.default)({prop:"gridTemplateAreas"}),zbt=Ss.gridArea=(0,E0.default)({prop:"gridArea"}),Fbt=(0,Dbt.default)(UH,$H,jH,Tbt,Ibt,Mbt,Nbt,Abt,Rbt,Pbt,Obt,zbt),Xei=Ss.default=Fbt});var YBe=ot(Xp=>{"use strict";var KBe=di();Object.defineProperty(Xp,"__esModule",{value:!0});Xp.default=Xp.color=Xp.bgcolor=Xp.backgroundColor=void 0;Xp.paletteTransform=qH;var Ule=KBe(O_()),Hbt=KBe(uD());function qH(i,e){return e==="grey"?e:i}var Bbt=Xp.color=(0,Ule.default)({prop:"color",themeKey:"palette",transform:qH}),Vbt=Xp.bgcolor=(0,Ule.default)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:qH}),Wbt=Xp.backgroundColor=(0,Ule.default)({prop:"backgroundColor",themeKey:"palette",transform:qH}),Ubt=(0,Hbt.default)(Bbt,Vbt,Wbt),Jei=Xp.default=Ubt});var QBe=ot(Ia=>{"use strict";var XBe=di();Object.defineProperty(Ia,"__esModule",{value:!0});Ia.sizeWidth=Ia.sizeHeight=Ia.minWidth=Ia.minHeight=Ia.maxWidth=Ia.maxHeight=Ia.height=Ia.default=Ia.boxSizing=void 0;Ia.sizingTransform=D0;Ia.width=void 0;var a3=XBe(O_()),$bt=XBe(uD()),ZBe=P_();function D0(i){return i<=1&&i!==0?`${i*100}%`:i}var jbt=Ia.width=(0,a3.default)({prop:"width",transform:D0}),$le=i=>{if(i.maxWidth!==void 0&&i.maxWidth!==null){let e=t=>{var n,o;let r=((n=i.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[t])||ZBe.values[t];return r?((o=i.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${r}${i.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:D0(t)}};return(0,ZBe.handleBreakpoints)(i,i.maxWidth,e)}return null};Ia.maxWidth=$le;$le.filterProps=["maxWidth"];var qbt=Ia.minWidth=(0,a3.default)({prop:"minWidth",transform:D0}),Gbt=Ia.height=(0,a3.default)({prop:"height",transform:D0}),Kbt=Ia.maxHeight=(0,a3.default)({prop:"maxHeight",transform:D0}),Ybt=Ia.minHeight=(0,a3.default)({prop:"minHeight",transform:D0}),tti=Ia.sizeWidth=(0,a3.default)({prop:"size",cssProperty:"width",transform:D0}),iti=Ia.sizeHeight=(0,a3.default)({prop:"size",cssProperty:"height",transform:D0}),Zbt=Ia.boxSizing=(0,a3.default)({prop:"boxSizing"}),Xbt=(0,$bt.default)(jbt,$le,qbt,Gbt,Kbt,Ybt,Zbt),nti=Ia.default=Xbt});var hD=ot(GH=>{"use strict";Object.defineProperty(GH,"__esModule",{value:!0});GH.default=void 0;var Vo=dD(),F_=qBe(),jle=GBe(),qle=YBe(),Fy=QBe(),Qbt={border:{themeKey:"borders",transform:F_.borderTransform},borderTop:{themeKey:"borders",transform:F_.borderTransform},borderRight:{themeKey:"borders",transform:F_.borderTransform},borderBottom:{themeKey:"borders",transform:F_.borderTransform},borderLeft:{themeKey:"borders",transform:F_.borderTransform},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:F_.borderTransform},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:F_.borderRadius},color:{themeKey:"palette",transform:qle.paletteTransform},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:qle.paletteTransform},backgroundColor:{themeKey:"palette",transform:qle.paletteTransform},p:{style:Vo.padding},pt:{style:Vo.padding},pr:{style:Vo.padding},pb:{style:Vo.padding},pl:{style:Vo.padding},px:{style:Vo.padding},py:{style:Vo.padding},padding:{style:Vo.padding},paddingTop:{style:Vo.padding},paddingRight:{style:Vo.padding},paddingBottom:{style:Vo.padding},paddingLeft:{style:Vo.padding},paddingX:{style:Vo.padding},paddingY:{style:Vo.padding},paddingInline:{style:Vo.padding},paddingInlineStart:{style:Vo.padding},paddingInlineEnd:{style:Vo.padding},paddingBlock:{style:Vo.padding},paddingBlockStart:{style:Vo.padding},paddingBlockEnd:{style:Vo.padding},m:{style:Vo.margin},mt:{style:Vo.margin},mr:{style:Vo.margin},mb:{style:Vo.margin},ml:{style:Vo.margin},mx:{style:Vo.margin},my:{style:Vo.margin},margin:{style:Vo.margin},marginTop:{style:Vo.margin},marginRight:{style:Vo.margin},marginBottom:{style:Vo.margin},marginLeft:{style:Vo.margin},marginX:{style:Vo.margin},marginY:{style:Vo.margin},marginInline:{style:Vo.margin},marginInlineStart:{style:Vo.margin},marginInlineEnd:{style:Vo.margin},marginBlock:{style:Vo.margin},marginBlockStart:{style:Vo.margin},marginBlockEnd:{style:Vo.margin},displayPrint:{cssProperty:!1,transform:i=>({"@media print":{display:i}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:jle.gap},rowGap:{style:jle.rowGap},columnGap:{style:jle.columnGap},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Fy.sizingTransform},maxWidth:{style:Fy.maxWidth},minWidth:{transform:Fy.sizingTransform},height:{transform:Fy.sizingTransform},maxHeight:{transform:Fy.sizingTransform},minHeight:{transform:Fy.sizingTransform},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},rti=GH.default=Qbt});var Zle=ot(fD=>{"use strict";var Yle=di();Object.defineProperty(fD,"__esModule",{value:!0});fD.default=void 0;fD.unstable_createStyleFunctionSx=JBe;var Jbt=Yle(o3()),Gle=Yle(cD()),Kle=O_(),KH=P_(),e7t=Yle(hD());function t7t(...i){let e=i.reduce((n,o)=>n.concat(Object.keys(o)),[]),t=new Set(e);return i.every(n=>t.size===Object.keys(n).length)}function i7t(i,e){return typeof i=="function"?i(e):i}function JBe(){function i(t,n,o,r){let s={[t]:n,theme:o},a=r[t];if(!a)return{[t]:n};let{cssProperty:l=t,themeKey:c,transform:d,style:u}=a;if(n==null)return null;if(c==="typography"&&n==="inherit")return{[t]:n};let h=(0,Kle.getPath)(o,c)||{};if(u)return u(s);let f=p=>{let m=(0,Kle.getStyleValue)(h,d,p);return p===m&&typeof p=="string"&&(m=(0,Kle.getStyleValue)(h,d,`${t}${p==="default"?"":(0,Jbt.default)(p)}`,p)),l===!1?m:{[l]:m}};return(0,KH.handleBreakpoints)(s,n,f)}function e(t){var n;let{sx:o,theme:r={}}=t||{};if(!o)return null;let s=(n=r.unstable_sxConfig)!=null?n:e7t.default;function a(l){let c=l;if(typeof l=="function")c=l(r);else if(typeof l!="object")return l;if(!c)return null;let d=(0,KH.createEmptyBreakpointObject)(r.breakpoints),u=Object.keys(d),h=d;return Object.keys(c).forEach(f=>{let p=i7t(c[f],r);if(p!=null)if(typeof p=="object")if(s[f])h=(0,Gle.default)(h,i(f,p,r,s));else{let m=(0,KH.handleBreakpoints)({theme:r},p,y=>({[f]:y}));t7t(m,p)?h[f]=e({sx:p,theme:r}):h=(0,Gle.default)(h,m)}else h=(0,Gle.default)(h,i(f,p,r,s))}),(0,KH.removeUnusedBreakpoints)(u,h)}return Array.isArray(o)?o.map(a):a(o)}return e}var eVe=JBe();eVe.filterProps=["sx"];var ati=fD.default=eVe});var Qle=ot(Xle=>{"use strict";Object.defineProperty(Xle,"__esModule",{value:!0});Xle.default=n7t;function n7t(i,e){let t=this;return t.vars&&typeof t.getColorSchemeSelector=="function"?{[t.getColorSchemeSelector(i).replace(/(\[[^\]]+\])/,"*:where($1)")]:e}:t.palette.mode===i?e:{}}});var iVe=ot(YH=>{"use strict";var T0=di();Object.defineProperty(YH,"__esModule",{value:!0});YH.default=void 0;var Jle=T0(ul()),o7t=T0(Yp()),tVe=T0(Xd()),r7t=T0(Ele()),s7t=T0(MBe()),a7t=T0($Be()),l7t=T0(Zle()),c7t=T0(hD()),d7t=T0(Qle()),u7t=["breakpoints","palette","spacing","shape"];function h7t(i={},...e){let{breakpoints:t={},palette:n={},spacing:o,shape:r={}}=i,s=(0,o7t.default)(i,u7t),a=(0,r7t.default)(t),l=(0,a7t.default)(o),c=(0,tVe.default)({breakpoints:a,direction:"ltr",components:{},palette:(0,Jle.default)({mode:"light"},n),spacing:l,shape:(0,Jle.default)({},s7t.default,r)},s);return c.applyStyles=d7t.default,c=e.reduce((d,u)=>(0,tVe.default)(d,u),c),c.unstable_sxConfig=(0,Jle.default)({},c7t.default,s?.unstable_sxConfig),c.unstable_sx=function(u){return(0,l7t.default)({sx:u,theme:this})},c}var dti=YH.default=h7t});var ZH=ot(pD=>{"use strict";var ece=di();Object.defineProperty(pD,"__esModule",{value:!0});Object.defineProperty(pD,"default",{enumerable:!0,get:function(){return f7t.default}});Object.defineProperty(pD,"private_createBreakpoints",{enumerable:!0,get:function(){return p7t.default}});Object.defineProperty(pD,"unstable_applyStyles",{enumerable:!0,get:function(){return m7t.default}});var f7t=ece(iVe()),p7t=ece(Ele()),m7t=ece(Qle())});var cde=ot(jB=>{"use strict";var KCt=di();Object.defineProperty(jB,"__esModule",{value:!0});jB.default=void 0;var YCt=KCt(o3()),kpi=jB.default=YCt.default});var vUe=ot(qB=>{"use strict";var ZCt=di();Object.defineProperty(qB,"__esModule",{value:!0});qB.default=void 0;var XCt=ZCt(tae()),Epi=qB.default=XCt.default});var xUe=ot(VD=>{"use strict";"use client";var bUe=di();Object.defineProperty(VD,"__esModule",{value:!0});VD.default=void 0;VD.useDefaultProps=iwt;var yUe=JCt(xi()),Tpi=bUe(Kp()),_Ue=bUe(tH()),QCt=zn();function CUe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(CUe=function(n){return n?t:e})(i)}function JCt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=CUe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var wUe=yUe.createContext(void 0);function ewt({value:i,children:e}){return(0,QCt.jsx)(wUe.Provider,{value:i,children:e})}function twt(i){let{theme:e,name:t,props:n}=i;if(!e||!e.components||!e.components[t])return n;let o=e.components[t];return o.defaultProps?(0,_Ue.default)(o.defaultProps,n):!o.styleOverrides&&!o.variants?(0,_Ue.default)(o,n):n}function iwt({props:i,name:e}){let t=yUe.useContext(wUe);return twt({props:i,name:e,theme:{components:t}})}var Ipi=VD.default=ewt});var LUe=ot(GB=>{"use strict";Object.defineProperty(GB,"__esModule",{value:!0});Object.defineProperty(GB,"default",{enumerable:!0,get:function(){return SUe.default}});Object.defineProperty(GB,"useDefaultProps",{enumerable:!0,get:function(){return SUe.useDefaultProps}});var SUe=nwt(xUe());function kUe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(kUe=function(n){return n?t:e})(i)}function nwt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=kUe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var MUe=ot(WD=>{"use strict";"use client";var EUe=di();Object.defineProperty(WD,"__esModule",{value:!0});WD.default=void 0;WD.useDefaultProps=awt;var owt=EUe(ul()),Api=IUe(xi()),Rpi=EUe(Kp()),DUe=IUe(LUe()),rwt=zn();function TUe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(TUe=function(n){return n?t:e})(i)}function IUe(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=TUe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function swt(i){return(0,rwt.jsx)(DUe.default,(0,owt.default)({},i))}var Ppi=WD.default=swt;function awt(i){return(0,DUe.useDefaultProps)(i)}});var RUe=ot(KB=>{"use strict";Object.defineProperty(KB,"__esModule",{value:!0});Object.defineProperty(KB,"default",{enumerable:!0,get:function(){return NUe.default}});Object.defineProperty(KB,"useDefaultProps",{enumerable:!0,get:function(){return NUe.useDefaultProps}});var NUe=lwt(MUe());function AUe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(AUe=function(n){return n?t:e})(i)}function lwt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=AUe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var PUe=ot(hde=>{"use strict";var ude=di();Object.defineProperty(hde,"__esModule",{value:!0});hde.default=pwt;var dde=ude(ul()),cwt=ude(Yp()),dwt=Xd(),uwt=ude(hD()),hwt=["sx"],fwt=i=>{var e,t;let n={systemProps:{},otherProps:{}},o=(e=i==null||(t=i.theme)==null?void 0:t.unstable_sxConfig)!=null?e:uwt.default;return Object.keys(i).forEach(r=>{o[r]?n.systemProps[r]=i[r]:n.otherProps[r]=i[r]}),n};function pwt(i){let{sx:e}=i,t=(0,cwt.default)(i,hwt),{systemProps:n,otherProps:o}=fwt(t),r;return Array.isArray(e)?r=[n,...e]:typeof e=="function"?r=(...s)=>{let a=e(...s);return(0,dwt.isPlainObject)(a)?(0,dde.default)({},n,a):n}:r=(0,dde.default)({},n,e),(0,dde.default)({},o,{sx:r})}});var fde=ot(rC=>{"use strict";var OUe=di();Object.defineProperty(rC,"__esModule",{value:!0});Object.defineProperty(rC,"default",{enumerable:!0,get:function(){return zUe.default}});Object.defineProperty(rC,"extendSxProp",{enumerable:!0,get:function(){return mwt.default}});Object.defineProperty(rC,"unstable_createStyleFunctionSx",{enumerable:!0,get:function(){return zUe.unstable_createStyleFunctionSx}});Object.defineProperty(rC,"unstable_defaultSxConfig",{enumerable:!0,get:function(){return gwt.default}});var zUe=vwt(Zle()),mwt=OUe(PUe()),gwt=OUe(hD());function FUe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(FUe=function(n){return n?t:e})(i)}function vwt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=FUe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var VUe=ot(aC=>{"use strict";var sC=di();Object.defineProperty(aC,"__esModule",{value:!0});aC.default=Iwt;aC.shouldForwardProp=ZB;aC.systemDefaultTheme=void 0;var G1=sC(ul()),pde=sC(Yp()),HUe=Swt(x0()),_wt=Xd(),Bpi=sC(o3()),Vpi=sC(Ase()),bwt=sC(ZH()),ywt=sC(fde()),Cwt=["ownerState"],wwt=["variants"],xwt=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function BUe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(BUe=function(n){return n?t:e})(i)}function Swt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=BUe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function kwt(i){return Object.keys(i).length===0}function Lwt(i){return typeof i=="string"&&i.charCodeAt(0)>96}function ZB(i){return i!=="ownerState"&&i!=="theme"&&i!=="sx"&&i!=="as"}var Ewt=aC.systemDefaultTheme=(0,bwt.default)(),Dwt=i=>i&&i.charAt(0).toLowerCase()+i.slice(1);function YB({defaultTheme:i,theme:e,themeId:t}){return kwt(e)?i:e[t]||e}function Twt(i){return i?(e,t)=>t[i]:null}function XB(i,e){let{ownerState:t}=e,n=(0,pde.default)(e,Cwt),o=typeof i=="function"?i((0,G1.default)({ownerState:t},n)):i;if(Array.isArray(o))return o.flatMap(r=>XB(r,(0,G1.default)({ownerState:t},n)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){let{variants:r=[]}=o,a=(0,pde.default)(o,wwt);return r.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,G1.default)({ownerState:t},n,t)):Object.keys(l.props).forEach(d=>{t?.[d]!==l.props[d]&&n[d]!==l.props[d]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,G1.default)({ownerState:t},n,t)):l.style))}),a}return o}function Iwt(i={}){let{themeId:e,defaultTheme:t=Ewt,rootShouldForwardProp:n=ZB,slotShouldForwardProp:o=ZB}=i,r=s=>(0,ywt.default)((0,G1.default)({},s,{theme:YB((0,G1.default)({},s,{defaultTheme:t,themeId:e}))}));return r.__mui_systemSx=!0,(s,a={})=>{(0,HUe.internal_processStyles)(s,w=>w.filter(S=>!(S!=null&&S.__mui_systemSx)));let{name:l,slot:c,skipVariantsResolver:d,skipSx:u,overridesResolver:h=Twt(Dwt(c))}=a,f=(0,pde.default)(a,xwt),p=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,m=u||!1,y,_=ZB;c==="Root"||c==="root"?_=n:c?_=o:Lwt(s)&&(_=void 0);let v=(0,HUe.default)(s,(0,G1.default)({shouldForwardProp:_,label:y},f)),b=w=>typeof w=="function"&&w.__emotion_real!==w||(0,_wt.isPlainObject)(w)?S=>XB(w,(0,G1.default)({},S,{theme:YB({theme:S.theme,defaultTheme:t,themeId:e})})):w,C=(w,...S)=>{let x=b(w),k=S?S.map(b):[];l&&h&&k.push(A=>{let T=YB((0,G1.default)({},A,{defaultTheme:t,themeId:e}));if(!T.components||!T.components[l]||!T.components[l].styleOverrides)return null;let L=T.components[l].styleOverrides,I={};return Object.entries(L).forEach(([M,N])=>{I[M]=XB(N,(0,G1.default)({},A,{theme:T}))}),h(A,I)}),l&&!p&&k.push(A=>{var T;let L=YB((0,G1.default)({},A,{defaultTheme:t,themeId:e})),I=L==null||(T=L.components)==null||(T=T[l])==null?void 0:T.variants;return XB({variants:I},(0,G1.default)({},A,{theme:L}))}),m||k.push(r);let D=k.length-S.length;if(Array.isArray(w)&&D>0){let A=new Array(D).fill("");x=[...w,...A],x.raw=[...w.raw,...A]}let E=v(x,...k);return s.muiName&&(E.muiName=s.muiName),E};return v.withConfig&&(C.withConfig=v.withConfig),C}}});var WUe=ot(mde=>{"use strict";var Mwt=di();Object.defineProperty(mde,"__esModule",{value:!0});mde.default=Awt;var Nwt=Mwt(ul());function Awt(i,e){return(0,Nwt.default)({toolbar:{minHeight:56,[i.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[i.up("sm")]:{minHeight:64}}},e)}});var ZUe=ot(Ka=>{"use strict";var $Ue=di();Object.defineProperty(Ka,"__esModule",{value:!0});Ka.alpha=KUe;Ka.blend=Uwt;Ka.colorChannel=void 0;Ka.darken=vde;Ka.decomposeColor=K1;Ka.emphasize=YUe;Ka.getContrastRatio=Fwt;Ka.getLuminance=QB;Ka.hexToRgb=jUe;Ka.hslToRgb=GUe;Ka.lighten=_de;Ka.private_safeAlpha=Hwt;Ka.private_safeColorChannel=void 0;Ka.private_safeDarken=Bwt;Ka.private_safeEmphasize=Wwt;Ka.private_safeLighten=Vwt;Ka.recomposeColor=lC;Ka.rgbToHex=zwt;var UUe=$Ue(Q6()),Rwt=$Ue(Bse());function gde(i,e=0,t=1){return(0,Rwt.default)(i,e,t)}function jUe(i){i=i.slice(1);let e=new RegExp(`.{1,${i.length>=6?2:1}}`,"g"),t=i.match(e);return t&&t[0].length===1&&(t=t.map(n=>n+n)),t?`rgb${t.length===4?"a":""}(${t.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function Pwt(i){let e=i.toString(16);return e.length===1?`0${e}`:e}function K1(i){if(i.type)return i;if(i.charAt(0)==="#")return K1(jUe(i));let e=i.indexOf("("),t=i.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(t)===-1)throw new Error((0,UUe.default)(9,i));let n=i.substring(e+1,i.length-1),o;if(t==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error((0,UUe.default)(10,o))}else n=n.split(",");return n=n.map(r=>parseFloat(r)),{type:t,values:n,colorSpace:o}}var qUe=i=>{let e=K1(i);return e.values.slice(0,3).map((t,n)=>e.type.indexOf("hsl")!==-1&&n!==0?`${t}%`:t).join(" ")};Ka.colorChannel=qUe;var Owt=(i,e)=>{try{return qUe(i)}catch{return i}};Ka.private_safeColorChannel=Owt;function lC(i){let{type:e,colorSpace:t}=i,{values:n}=i;return e.indexOf("rgb")!==-1?n=n.map((o,r)=>r<3?parseInt(o,10):o):e.indexOf("hsl")!==-1&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),e.indexOf("color")!==-1?n=`${t} ${n.join(" ")}`:n=`${n.join(", ")}`,`${e}(${n})`}function zwt(i){if(i.indexOf("#")===0)return i;let{values:e}=K1(i);return`#${e.map((t,n)=>Pwt(n===3?Math.round(255*t):t)).join("")}`}function GUe(i){i=K1(i);let{values:e}=i,t=e[0],n=e[1]/100,o=e[2]/100,r=n*Math.min(o,1-o),s=(c,d=(c+t/30)%12)=>o-r*Math.max(Math.min(d-3,9-d,1),-1),a="rgb",l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return i.type==="hsla"&&(a+="a",l.push(e[3])),lC({type:a,values:l})}function QB(i){i=K1(i);let e=i.type==="hsl"||i.type==="hsla"?K1(GUe(i)).values:i.values;return e=e.map(t=>(i.type!=="color"&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function Fwt(i,e){let t=QB(i),n=QB(e);return(Math.max(t,n)+.05)/(Math.min(t,n)+.05)}function KUe(i,e){return i=K1(i),e=gde(e),(i.type==="rgb"||i.type==="hsl")&&(i.type+="a"),i.type==="color"?i.values[3]=`/${e}`:i.values[3]=e,lC(i)}function Hwt(i,e,t){try{return KUe(i,e)}catch{return i}}function vde(i,e){if(i=K1(i),e=gde(e),i.type.indexOf("hsl")!==-1)i.values[2]*=1-e;else if(i.type.indexOf("rgb")!==-1||i.type.indexOf("color")!==-1)for(let t=0;t<3;t+=1)i.values[t]*=1-e;return lC(i)}function Bwt(i,e,t){try{return vde(i,e)}catch{return i}}function _de(i,e){if(i=K1(i),e=gde(e),i.type.indexOf("hsl")!==-1)i.values[2]+=(100-i.values[2])*e;else if(i.type.indexOf("rgb")!==-1)for(let t=0;t<3;t+=1)i.values[t]+=(255-i.values[t])*e;else if(i.type.indexOf("color")!==-1)for(let t=0;t<3;t+=1)i.values[t]+=(1-i.values[t])*e;return lC(i)}function Vwt(i,e,t){try{return _de(i,e)}catch{return i}}function YUe(i,e=.15){return QB(i)>.5?vde(i,e):_de(i,e)}function Wwt(i,e,t){try{return YUe(i,e)}catch{return i}}function Uwt(i,e,t,n=1){let o=(l,c)=>Math.round((l**(1/n)*(1-t)+c**(1/n)*t)**n),r=K1(i),s=K1(e),a=[o(r.values[0],s.values[0]),o(r.values[1],s.values[1]),o(r.values[2],s.values[2])];return lC({type:"rgb",values:a})}});var XUe=ot(JB=>{"use strict";Object.defineProperty(JB,"__esModule",{value:!0});JB.default=void 0;var $wt={black:"#000",white:"#fff"},jpi=JB.default=$wt});var QUe=ot(eV=>{"use strict";Object.defineProperty(eV,"__esModule",{value:!0});eV.default=void 0;var jwt={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Gpi=eV.default=jwt});var JUe=ot(tV=>{"use strict";Object.defineProperty(tV,"__esModule",{value:!0});tV.default=void 0;var qwt={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ypi=tV.default=qwt});var e$e=ot(iV=>{"use strict";Object.defineProperty(iV,"__esModule",{value:!0});iV.default=void 0;var Gwt={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Xpi=iV.default=Gwt});var t$e=ot(nV=>{"use strict";Object.defineProperty(nV,"__esModule",{value:!0});nV.default=void 0;var Kwt={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Jpi=nV.default=Kwt});var i$e=ot(oV=>{"use strict";Object.defineProperty(oV,"__esModule",{value:!0});oV.default=void 0;var Ywt={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},tmi=oV.default=Ywt});var n$e=ot(rV=>{"use strict";Object.defineProperty(rV,"__esModule",{value:!0});rV.default=void 0;var Zwt={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},nmi=rV.default=Zwt});var o$e=ot(sV=>{"use strict";Object.defineProperty(sV,"__esModule",{value:!0});sV.default=void 0;var Xwt={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},rmi=sV.default=Xwt});var l$e=ot(Q_=>{"use strict";var Y1=di();Object.defineProperty(Q_,"__esModule",{value:!0});Q_.dark=void 0;Q_.default=lxt;Q_.light=void 0;var bde=Y1(ul()),Qwt=Y1(Yp()),r$e=Y1(Q6()),Jwt=Y1(Xd()),Cde=ZUe(),$D=Y1(XUe()),ext=Y1(QUe()),cC=Y1(JUe()),dC=Y1(e$e()),UD=Y1(t$e()),uC=Y1(i$e()),hC=Y1(n$e()),fC=Y1(o$e()),txt=["mode","contrastThreshold","tonalOffset"],s$e=Q_.light={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:$D.default.white,default:$D.default.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},yde=Q_.dark={text:{primary:$D.default.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:$D.default.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function a$e(i,e,t,n){let o=n.light||n,r=n.dark||n*1.5;i[e]||(i.hasOwnProperty(t)?i[e]=i[t]:e==="light"?i.light=(0,Cde.lighten)(i.main,o):e==="dark"&&(i.dark=(0,Cde.darken)(i.main,r)))}function ixt(i="light"){return i==="dark"?{main:uC.default[200],light:uC.default[50],dark:uC.default[400]}:{main:uC.default[700],light:uC.default[400],dark:uC.default[800]}}function nxt(i="light"){return i==="dark"?{main:cC.default[200],light:cC.default[50],dark:cC.default[400]}:{main:cC.default[500],light:cC.default[300],dark:cC.default[700]}}function oxt(i="light"){return i==="dark"?{main:dC.default[500],light:dC.default[300],dark:dC.default[700]}:{main:dC.default[700],light:dC.default[400],dark:dC.default[800]}}function rxt(i="light"){return i==="dark"?{main:hC.default[400],light:hC.default[300],dark:hC.default[700]}:{main:hC.default[700],light:hC.default[500],dark:hC.default[900]}}function sxt(i="light"){return i==="dark"?{main:fC.default[400],light:fC.default[300],dark:fC.default[700]}:{main:fC.default[800],light:fC.default[500],dark:fC.default[900]}}function axt(i="light"){return i==="dark"?{main:UD.default[400],light:UD.default[300],dark:UD.default[700]}:{main:"#ed6c02",light:UD.default[500],dark:UD.default[900]}}function lxt(i){let{mode:e="light",contrastThreshold:t=3,tonalOffset:n=.2}=i,o=(0,Qwt.default)(i,txt),r=i.primary||ixt(e),s=i.secondary||nxt(e),a=i.error||oxt(e),l=i.info||rxt(e),c=i.success||sxt(e),d=i.warning||axt(e);function u(m){return(0,Cde.getContrastRatio)(m,yde.text.primary)>=t?yde.text.primary:s$e.text.primary}let h=({color:m,name:y,mainShade:_=500,lightShade:v=300,darkShade:b=700})=>{if(m=(0,bde.default)({},m),!m.main&&m[_]&&(m.main=m[_]),!m.hasOwnProperty("main"))throw new Error((0,r$e.default)(11,y?` (${y})`:"",_));if(typeof m.main!="string")throw new Error((0,r$e.default)(12,y?` (${y})`:"",JSON.stringify(m.main)));return a$e(m,"light",v,n),a$e(m,"dark",b,n),m.contrastText||(m.contrastText=u(m.main)),m},f={dark:yde,light:s$e};return(0,Jwt.default)((0,bde.default)({common:(0,bde.default)({},$D.default),mode:e,primary:h({color:r,name:"primary"}),secondary:h({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:a,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:ext.default,contrastThreshold:t,getContrastText:u,augmentColor:h,tonalOffset:n},f[e]),o)}});var h$e=ot(xde=>{"use strict";var wde=di();Object.defineProperty(xde,"__esModule",{value:!0});xde.default=fxt;var c$e=wde(ul()),cxt=wde(Yp()),dxt=wde(Xd()),uxt=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function hxt(i){return Math.round(i*1e5)/1e5}var d$e={textTransform:"uppercase"},u$e='"Roboto", "Helvetica", "Arial", sans-serif';function fxt(i,e){let t=typeof e=="function"?e(i):e,{fontFamily:n=u$e,fontSize:o=14,fontWeightLight:r=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:d,pxToRem:u}=t,h=(0,cxt.default)(t,uxt),f=o/14,p=u||(_=>`${_/c*f}rem`),m=(_,v,b,C,w)=>(0,c$e.default)({fontFamily:n,fontWeight:_,fontSize:p(v),lineHeight:b},n===u$e?{letterSpacing:`${hxt(C/v)}em`}:{},w,d),y={h1:m(r,96,1.167,-1.5),h2:m(r,60,1.2,-.5),h3:m(s,48,1.167,0),h4:m(s,34,1.235,.25),h5:m(s,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(s,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(s,16,1.5,.15),body2:m(s,14,1.43,.15),button:m(a,14,1.75,.4,d$e),caption:m(s,12,1.66,.4),overline:m(s,12,2.66,1,d$e),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,dxt.default)((0,c$e.default)({htmlFontSize:c,pxToRem:p,fontFamily:n,fontSize:o,fontWeightLight:r,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},y),h,{clone:!1})}});var f$e=ot(aV=>{"use strict";Object.defineProperty(aV,"__esModule",{value:!0});aV.default=void 0;var pxt=.2,mxt=.14,gxt=.12;function ga(...i){return[`${i[0]}px ${i[1]}px ${i[2]}px ${i[3]}px rgba(0,0,0,${pxt})`,`${i[4]}px ${i[5]}px ${i[6]}px ${i[7]}px rgba(0,0,0,${mxt})`,`${i[8]}px ${i[9]}px ${i[10]}px ${i[11]}px rgba(0,0,0,${gxt})`].join(",")}var vxt=["none",ga(0,2,1,-1,0,1,1,0,0,1,3,0),ga(0,3,1,-2,0,2,2,0,0,1,5,0),ga(0,3,3,-2,0,3,4,0,0,1,8,0),ga(0,2,4,-1,0,4,5,0,0,1,10,0),ga(0,3,5,-1,0,5,8,0,0,1,14,0),ga(0,3,5,-1,0,6,10,0,0,1,18,0),ga(0,4,5,-2,0,7,10,1,0,2,16,1),ga(0,5,5,-3,0,8,10,1,0,3,14,2),ga(0,5,6,-3,0,9,12,1,0,3,16,2),ga(0,6,6,-3,0,10,14,1,0,4,18,3),ga(0,6,7,-4,0,11,15,1,0,4,20,3),ga(0,7,8,-4,0,12,17,2,0,5,22,4),ga(0,7,8,-4,0,13,19,2,0,5,24,4),ga(0,7,9,-4,0,14,21,2,0,5,26,4),ga(0,8,9,-5,0,15,22,2,0,6,28,5),ga(0,8,10,-5,0,16,24,2,0,6,30,5),ga(0,8,11,-5,0,17,26,2,0,6,32,5),ga(0,9,11,-5,0,18,28,2,0,7,34,6),ga(0,9,12,-6,0,19,29,2,0,7,36,6),ga(0,10,13,-6,0,20,31,3,0,8,38,7),ga(0,10,13,-6,0,21,33,3,0,8,40,7),ga(0,10,14,-6,0,22,35,3,0,8,42,7),ga(0,11,14,-7,0,23,36,3,0,9,44,8),ga(0,11,15,-7,0,24,38,3,0,9,46,8)],cmi=aV.default=vxt});var g$e=ot(J_=>{"use strict";var m$e=di();Object.defineProperty(J_,"__esModule",{value:!0});J_.default=xxt;J_.easing=J_.duration=void 0;var _xt=m$e(Yp()),Sde=m$e(ul()),bxt=["duration","easing","delay"],yxt=J_.easing={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Cxt=J_.duration={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function p$e(i){return`${Math.round(i)}ms`}function wxt(i){if(!i)return 0;let e=i/36;return Math.round((4+15*e**.25+e/5)*10)}function xxt(i){let e=(0,Sde.default)({},yxt,i.easing),t=(0,Sde.default)({},Cxt,i.duration),n=(o=["all"],r={})=>{let{duration:s=t.standard,easing:a=e.easeInOut,delay:l=0}=r,c=(0,_xt.default)(r,bxt);return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof s=="string"?s:p$e(s)} ${a} ${typeof l=="string"?l:p$e(l)}`).join(",")};return(0,Sde.default)({getAutoHeightDuration:wxt,create:n},i,{easing:e,duration:t})}});var v$e=ot(lV=>{"use strict";Object.defineProperty(lV,"__esModule",{value:!0});lV.default=void 0;var Sxt={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},hmi=lV.default=Sxt});var w$e=ot(jD=>{"use strict";var Z1=di();Object.defineProperty(jD,"__esModule",{value:!0});jD.createMuiTheme=Oxt;jD.default=void 0;var _$e=Z1(ul()),kxt=Z1(Yp()),Lxt=Z1(Q6()),kde=Z1(Xd()),b$e=Pxt(fde()),Ext=Z1(ZH()),pmi=Z1(Ey()),Dxt=Z1(WUe()),Txt=Z1(l$e()),Ixt=Z1(h$e()),Mxt=Z1(f$e()),Nxt=Z1(g$e()),Axt=Z1(v$e()),Rxt=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function y$e(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(y$e=function(n){return n?t:e})(i)}function Pxt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=y$e(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function C$e(i={},...e){let{mixins:t={},palette:n={},transitions:o={},typography:r={}}=i,s=(0,kxt.default)(i,Rxt);if(i.vars)throw new Error((0,Lxt.default)(18));let a=(0,Txt.default)(n),l=(0,Ext.default)(i),c=(0,kde.default)(l,{mixins:(0,Dxt.default)(l.breakpoints,t),palette:a,shadows:Mxt.default.slice(),typography:(0,Ixt.default)(a,r),transitions:(0,Nxt.default)(o),zIndex:(0,_$e.default)({},Axt.default)});return c=(0,kde.default)(c,s),c=e.reduce((d,u)=>(0,kde.default)(d,u),c),c.unstable_sxConfig=(0,_$e.default)({},b$e.unstable_defaultSxConfig,s?.unstable_sxConfig),c.unstable_sx=function(u){return(0,b$e.default)({sx:u,theme:this})},c}function Oxt(...i){return C$e(...i)}var mmi=jD.default=C$e});var x$e=ot(cV=>{"use strict";"use client";var zxt=di();Object.defineProperty(cV,"__esModule",{value:!0});cV.default=void 0;var Fxt=zxt(w$e()),Hxt=(0,Fxt.default)(),vmi=cV.default=Hxt});var S$e=ot(dV=>{"use strict";Object.defineProperty(dV,"__esModule",{value:!0});dV.default=void 0;var bmi=dV.default="$$material"});var Lde=ot(uV=>{"use strict";Object.defineProperty(uV,"__esModule",{value:!0});uV.default=void 0;function Bxt(i){return i!=="ownerState"&&i!=="theme"&&i!=="sx"&&i!=="as"}var Cmi=uV.default=Bxt});var k$e=ot(hV=>{"use strict";var Vxt=di();Object.defineProperty(hV,"__esModule",{value:!0});hV.default=void 0;var Wxt=Vxt(Lde()),Uxt=i=>(0,Wxt.default)(i)&&i!=="classes",xmi=hV.default=Uxt});var E$e=ot(pC=>{"use strict";"use client";var qD=di();Object.defineProperty(pC,"__esModule",{value:!0});pC.default=void 0;Object.defineProperty(pC,"rootShouldForwardProp",{enumerable:!0,get:function(){return L$e.default}});Object.defineProperty(pC,"slotShouldForwardProp",{enumerable:!0,get:function(){return Gxt.default}});var $xt=qD(VUe()),jxt=qD(x$e()),qxt=qD(S$e()),L$e=qD(k$e()),Gxt=qD(Lde()),Kxt=(0,$xt.default)({themeId:qxt.default,defaultTheme:jxt.default,rootShouldForwardProp:L$e.default}),kmi=pC.default=Kxt});var Ede=ot(GD=>{"use strict";var D$e=di();Object.defineProperty(GD,"__esModule",{value:!0});GD.default=void 0;GD.getSvgIconUtilityClass=Xxt;var Yxt=D$e(Ise()),Zxt=D$e(Ey());function Xxt(i){return(0,Zxt.default)("MuiSvgIcon",i)}var Qxt=(0,Yxt.default)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]),Emi=GD.default=Qxt});var R$e=ot(pV=>{"use strict";"use client";var e5=di();Object.defineProperty(pV,"__esModule",{value:!0});pV.default=void 0;var T$e=e5(ul()),Jxt=e5(Yp()),I$e=sSt(xi()),Tmi=e5(Kp()),eSt=e5(ole()),tSt=e5(ele()),fV=e5(cde()),iSt=RUe(),nSt=e5(E$e()),oSt=Ede(),M$e=zn(),rSt=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"];function N$e(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(N$e=function(n){return n?t:e})(i)}function sSt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=N$e(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var aSt=i=>{let{color:e,fontSize:t,classes:n}=i,o={root:["root",e!=="inherit"&&`color${(0,fV.default)(e)}`,`fontSize${(0,fV.default)(t)}`]};return(0,tSt.default)(o,oSt.getSvgIconUtilityClass,n)},lSt=(0,nSt.default)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(i,e)=>{let{ownerState:t}=i;return[e.root,t.color!=="inherit"&&e[`color${(0,fV.default)(t.color)}`],e[`fontSize${(0,fV.default)(t.fontSize)}`]]}})(({theme:i,ownerState:e})=>{var t,n,o,r,s,a,l,c,d,u,h,f,p;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(t=i.transitions)==null||(n=t.create)==null?void 0:n.call(t,"fill",{duration:(o=i.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((r=i.typography)==null||(s=r.pxToRem)==null?void 0:s.call(r,20))||"1.25rem",medium:((a=i.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((c=i.typography)==null||(d=c.pxToRem)==null?void 0:d.call(c,35))||"2.1875rem"}[e.fontSize],color:(u=(h=(i.vars||i).palette)==null||(h=h[e.color])==null?void 0:h.main)!=null?u:{action:(f=(i.vars||i).palette)==null||(f=f.action)==null?void 0:f.active,disabled:(p=(i.vars||i).palette)==null||(p=p.action)==null?void 0:p.disabled,inherit:void 0}[e.color]}}),A$e=I$e.forwardRef(function(e,t){let n=(0,iSt.useDefaultProps)({props:e,name:"MuiSvgIcon"}),{children:o,className:r,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:u,viewBox:h="0 0 24 24"}=n,f=(0,Jxt.default)(n,rSt),p=I$e.isValidElement(o)&&o.type==="svg",m=(0,T$e.default)({},n,{color:s,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:p}),y={};d||(y.viewBox=h);let _=aSt(m);return(0,M$e.jsxs)(lSt,(0,T$e.default)({as:a,className:(0,eSt.default)(_.root,r),focusable:"false",color:c,"aria-hidden":u?void 0:!0,role:u?"img":void 0,ref:t},y,f,p&&o.props,{ownerState:m,children:[p?o.props.children:o,u?(0,M$e.jsx)("title",{children:u}):null]}))});A$e.muiName="SvgIcon";var Imi=pV.default=A$e});var O$e=ot(t5=>{"use strict";"use client";var cSt=di();Object.defineProperty(t5,"__esModule",{value:!0});var dSt={svgIconClasses:!0};Object.defineProperty(t5,"default",{enumerable:!0,get:function(){return uSt.default}});Object.defineProperty(t5,"svgIconClasses",{enumerable:!0,get:function(){return mV.default}});var uSt=cSt(R$e()),mV=hSt(Ede());Object.keys(mV).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(dSt,i)||i in t5&&t5[i]===mV[i]||Object.defineProperty(t5,i,{enumerable:!0,get:function(){return mV[i]}})});function P$e(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(P$e=function(n){return n?t:e})(i)}function hSt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=P$e(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var V$e=ot(Dde=>{"use strict";"use client";var H$e=di();Object.defineProperty(Dde,"__esModule",{value:!0});Dde.default=gSt;var fSt=H$e(ul()),z$e=mSt(xi()),F$e=H$e(O$e()),pSt=zn();function B$e(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(B$e=function(n){return n?t:e})(i)}function mSt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=B$e(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function gSt(i,e){function t(n,o){return(0,pSt.jsx)(F$e.default,(0,fSt.default)({"data-testid":`${e}Icon`,ref:o},n,{children:i}))}return t.muiName=F$e.default.muiName,z$e.memo(z$e.forwardRef(t))}});var W$e=ot(gV=>{"use strict";var vSt=di();Object.defineProperty(gV,"__esModule",{value:!0});gV.default=void 0;var _St=vSt(nae()),Rmi=gV.default=_St.default});var U$e=ot(vV=>{"use strict";var bSt=di();Object.defineProperty(vV,"__esModule",{value:!0});vV.default=void 0;var ySt=bSt(sae()),Omi=vV.default=ySt.default});var $$e=ot(_V=>{"use strict";var CSt=di();Object.defineProperty(_V,"__esModule",{value:!0});_V.default=void 0;var wSt=CSt(cae()),Fmi=_V.default=wSt.default});var j$e=ot(bV=>{"use strict";var xSt=di();Object.defineProperty(bV,"__esModule",{value:!0});bV.default=void 0;var SSt=xSt(hH()),Bmi=bV.default=SSt.default});var q$e=ot(yV=>{"use strict";var kSt=di();Object.defineProperty(yV,"__esModule",{value:!0});yV.default=void 0;var LSt=kSt(pae()),Wmi=yV.default=LSt.default});var G$e=ot(CV=>{"use strict";var ESt=di();Object.defineProperty(CV,"__esModule",{value:!0});CV.default=void 0;var DSt=ESt(vae()),$mi=CV.default=DSt.default});var K$e=ot(wV=>{"use strict";var TSt=di();Object.defineProperty(wV,"__esModule",{value:!0});wV.default=void 0;var ISt=TSt(fH()),qmi=wV.default=ISt.default});var Y$e=ot(xV=>{"use strict";"use client";var MSt=di();Object.defineProperty(xV,"__esModule",{value:!0});xV.default=void 0;var NSt=MSt(oH()),Kmi=xV.default=NSt.default});var Z$e=ot(SV=>{"use strict";"use client";var ASt=di();Object.defineProperty(SV,"__esModule",{value:!0});SV.default=void 0;var RSt=ASt(xae()),Zmi=SV.default=RSt.default});var X$e=ot(kV=>{"use strict";var PSt=di();Object.defineProperty(kV,"__esModule",{value:!0});kV.default=void 0;var OSt=PSt(Lae()),Qmi=kV.default=OSt.default});var Q$e=ot(LV=>{"use strict";"use client";var zSt=di();Object.defineProperty(LV,"__esModule",{value:!0});LV.default=void 0;var FSt=zSt(Iae()),egi=LV.default=FSt.default});var J$e=ot(EV=>{"use strict";"use client";var HSt=di();Object.defineProperty(EV,"__esModule",{value:!0});EV.default=void 0;var BSt=HSt(Nae()),igi=EV.default=BSt.default});var eje=ot(DV=>{"use strict";"use client";var VSt=di();Object.defineProperty(DV,"__esModule",{value:!0});DV.default=void 0;var WSt=VSt(mH()),ogi=DV.default=WSt.default});var tje=ot(TV=>{"use strict";"use client";var USt=di();Object.defineProperty(TV,"__esModule",{value:!0});TV.default=void 0;var $St=USt(Uae()),sgi=TV.default=$St.default});var ije=ot(fl=>{"use strict";"use client";var wd=di();Object.defineProperty(fl,"__esModule",{value:!0});Object.defineProperty(fl,"capitalize",{enumerable:!0,get:function(){return qSt.default}});Object.defineProperty(fl,"createChainedFunction",{enumerable:!0,get:function(){return GSt.default}});Object.defineProperty(fl,"createSvgIcon",{enumerable:!0,get:function(){return KSt.default}});Object.defineProperty(fl,"debounce",{enumerable:!0,get:function(){return YSt.default}});Object.defineProperty(fl,"deprecatedPropType",{enumerable:!0,get:function(){return ZSt.default}});Object.defineProperty(fl,"isMuiElement",{enumerable:!0,get:function(){return XSt.default}});Object.defineProperty(fl,"ownerDocument",{enumerable:!0,get:function(){return QSt.default}});Object.defineProperty(fl,"ownerWindow",{enumerable:!0,get:function(){return JSt.default}});Object.defineProperty(fl,"requirePropFactory",{enumerable:!0,get:function(){return ekt.default}});Object.defineProperty(fl,"setRef",{enumerable:!0,get:function(){return tkt.default}});fl.unstable_ClassNameGenerator=void 0;Object.defineProperty(fl,"unstable_useEnhancedEffect",{enumerable:!0,get:function(){return ikt.default}});Object.defineProperty(fl,"unstable_useId",{enumerable:!0,get:function(){return nkt.default}});Object.defineProperty(fl,"unsupportedProp",{enumerable:!0,get:function(){return okt.default}});Object.defineProperty(fl,"useControlled",{enumerable:!0,get:function(){return rkt.default}});Object.defineProperty(fl,"useEventCallback",{enumerable:!0,get:function(){return skt.default}});Object.defineProperty(fl,"useForkRef",{enumerable:!0,get:function(){return akt.default}});Object.defineProperty(fl,"useIsFocusVisible",{enumerable:!0,get:function(){return lkt.default}});var jSt=ur(),qSt=wd(cde()),GSt=wd(vUe()),KSt=wd(V$e()),YSt=wd(W$e()),ZSt=wd(U$e()),XSt=wd($$e()),QSt=wd(j$e()),JSt=wd(q$e()),ekt=wd(G$e()),tkt=wd(K$e()),ikt=wd(Y$e()),nkt=wd(Z$e()),okt=wd(X$e()),rkt=wd(Q$e()),skt=wd(J$e()),akt=wd(eje()),lkt=wd(tje()),lgi=fl.unstable_ClassNameGenerator={configure:i=>{jSt.unstable_ClassNameGenerator.configure(i)}}});var mC=ot(Tde=>{"use strict";"use client";Object.defineProperty(Tde,"__esModule",{value:!0});Object.defineProperty(Tde,"default",{enumerable:!0,get:function(){return ckt.createSvgIcon}});var ckt=ije()});var nje=ot(IV=>{"use strict";"use client";var dkt=di();Object.defineProperty(IV,"__esModule",{value:!0});IV.default=void 0;var ukt=dkt(mC()),hkt=zn(),ugi=IV.default=(0,ukt.default)((0,hkt.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow")});var oje=ot(MV=>{"use strict";"use client";var fkt=di();Object.defineProperty(MV,"__esModule",{value:!0});MV.default=void 0;var pkt=fkt(mC()),mkt=zn(),fgi=MV.default=(0,pkt.default)((0,mkt.jsx)("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92"}),"Share")});var rje=ot(NV=>{"use strict";"use client";var gkt=di();Object.defineProperty(NV,"__esModule",{value:!0});NV.default=void 0;var vkt=gkt(mC()),_kt=zn(),mgi=NV.default=(0,vkt.default)((0,_kt.jsx)("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkMode")});var sje=ot(AV=>{"use strict";"use client";var bkt=di();Object.defineProperty(AV,"__esModule",{value:!0});AV.default=void 0;var ykt=bkt(mC()),Ckt=zn(),vgi=AV.default=(0,ykt.default)((0,Ckt.jsx)("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightMode")});var aje=ot(RV=>{"use strict";"use client";var wkt=di();Object.defineProperty(RV,"__esModule",{value:!0});RV.default=void 0;var xkt=wkt(mC()),Skt=zn(),bgi=RV.default=(0,xkt.default)((0,Skt.jsx)("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMark")});function Ph(i,e=0){return i[i.length-(1+e)]}function lje(i){if(i.length===0)throw new Error("Invalid tail call");return[i.slice(0,i.length-1),i[i.length-1]]}function uo(i,e,t=(n,o)=>n===o){if(i===e)return!0;if(!i||!e||i.length!==e.length)return!1;for(let n=0,o=i.length;nt(i[n],e))}function kkt(i,e){let t=0,n=i-1;for(;t<=n;){let o=(t+n)/2|0,r=e(o);if(r<0)t=o+1;else if(r>0)n=o-1;else return o}return-(t+1)}function PV(i,e,t){if(i=i|0,i>=e.length)throw new TypeError("invalid index");let n=e[Math.floor(e.length*Math.random())],o=[],r=[],s=[];for(let a of e){let l=t(a,n);l<0?o.push(a):l>0?r.push(a):s.push(a)}return i!!e)}function Mde(i){let e=0;for(let t=0;t0}function Oh(i,e=t=>t){let t=new Set;return i.filter(n=>{let o=e(n);return t.has(o)?!1:(t.add(o),!0)})}function vC(i,e){return i.length>0?i[0]:e}function Ya(i,e){let t=typeof e=="number"?i:0;typeof e=="number"?t=i:(t=0,e=i);let n=[];if(t<=e)for(let o=t;oe;o--)n.push(o);return n}function g3(i,e,t){let n=i.slice(0,e),o=i.slice(e);return n.concat(t,o)}function FV(i,e){let t=i.indexOf(e);t>-1&&(i.splice(t,1),i.unshift(e))}function YD(i,e){let t=i.indexOf(e);t>-1&&(i.splice(t,1),i.push(e))}function ZD(i,e){for(let t of e)i.push(t)}function _C(i){return Array.isArray(i)?i:[i]}function Lkt(i,e,t){let n=uje(i,e),o=i.length,r=t.length;i.length=o+r;for(let s=o-1;s>=n;s--)i[s+r]=i[s];for(let s=0;se(i(t),i(n))}function hje(...i){return(e,t)=>{for(let n of i){let o=n(e,t);if(!KD.isNeitherLessOrGreaterThan(o))return o}return KD.neitherLessOrGreaterThan}}function HV(i){return(e,t)=>-i(e,t)}var KD,Nf,fje,qc,nm,Vi=P(()=>{(function(i){function e(r){return r<0}i.isLessThan=e;function t(r){return r<=0}i.isLessThanOrEqual=t;function n(r){return r>0}i.isGreaterThan=n;function o(r){return r===0}i.isNeitherLessOrGreaterThan=o,i.greaterThan=1,i.lessThan=-1,i.neitherLessOrGreaterThan=0})(KD||(KD={}));Nf=(i,e)=>i-e,fje=(i,e)=>Nf(i?1:0,e?1:0);qc=class{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;let n=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,n}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){let e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){let t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}},nm=class i{constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new i(t=>this.iterate(n=>e(n)?t(n):!0))}map(e){return new i(t=>this.iterate(n=>t(e(n))))}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(o=>((n||KD.isGreaterThan(e(o,t)))&&(n=!1,t=o),!0)),t}};nm.empty=new nm(i=>{})});function qs(i){return typeof i=="string"}function Gs(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)&&!(i instanceof RegExp)&&!(i instanceof Date)}function pje(i){let e=Object.getPrototypeOf(Uint8Array);return typeof i=="object"&&i instanceof e}function zh(i){return typeof i=="number"&&!isNaN(i)}function Ade(i){return!!i&&typeof i[Symbol.iterator]=="function"}function BV(i){return i===!0||i===!1}function $l(i){return typeof i>"u"}function om(i){return!kc(i)}function kc(i){return $l(i)||i===null}function Bn(i,e){if(!i)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function X1(i){if(kc(i))throw new Error("Assertion Failed: argument is undefined or null");return i}function v3(i){return typeof i=="function"}function mje(i,e){let t=Math.min(i.length,e.length);for(let n=0;n{});function Q1(i){if(!i||typeof i!="object"||i instanceof RegExp)return i;let e=Array.isArray(i)?[]:{};return Object.entries(i).forEach(([t,n])=>{e[t]=n&&typeof n=="object"?Q1(n):n}),e}function gje(i){if(!i||typeof i!="object")return i;let e=[i];for(;e.length>0;){let t=e.shift();Object.freeze(t);for(let n in t)if(vje.call(t,n)){let o=t[n];typeof o=="object"&&!Object.isFrozen(o)&&!pje(o)&&e.push(o)}}return i}function VV(i,e){return Rde(i,e,new Set)}function Rde(i,e,t){if(kc(i))return i;let n=e(i);if(typeof n<"u")return n;if(Array.isArray(i)){let o=[];for(let r of i)o.push(Rde(r,e,t));return o}if(Gs(i)){if(t.has(i))throw new Error("Cannot clone recursive data-structure");t.add(i);let o={};for(let r in i)vje.call(i,r)&&(o[r]=Rde(i[r],e,t));return t.delete(i),o}return i}function i5(i,e,t=!0){return Gs(i)?(Gs(e)&&Object.keys(e).forEach(n=>{n in i?t&&(Gs(i[n])&&Gs(e[n])?i5(i[n],e[n],t):i[n]=e[n]):i[n]=e[n]}),i):e}function Za(i,e){if(i===e)return!0;if(i==null||e===null||e===void 0||typeof i!=typeof e||typeof i!="object"||Array.isArray(i)!==Array.isArray(e))return!1;let t,n;if(Array.isArray(i)){if(i.length!==e.length)return!1;for(t=0;tfunction(){let r=Array.prototype.slice.call(arguments,0);return e(o,r)},n={};for(let o of i)n[o]=t(o);return n}var vje,Gc=P(()=>{ho();vje=Object.prototype.hasOwnProperty});function bje(i,e){let t;return e.length===0?t=i:t=i.replace(/\{(\d+)\}/g,(n,o)=>{let r=o[0],s=e[r],a=n;return typeof s=="string"?a=s:(typeof s=="number"||typeof s=="boolean"||s===void 0||s===null)&&(a=String(s)),a}),Tkt&&(t="\uFF3B"+t.replace(/[aouei]/g,"$&$&")+"\uFF3D"),t}function g(i,e,...t){return bje(e,t)}function Kc(i,e,...t){let n=bje(e,t);return{value:n,original:n}}var Tkt,Wt=P(()=>{Tkt=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0});function qV(){if(!wje){wje=!0;let i=new Uint8Array(2);i[0]=1,i[1]=2,Cje=new Uint16Array(i.buffer)[0]===513}return Cje}var Pde,yC,QD,JD,XD,Ikt,xje,zde,Mkt,Fde,Nkt,Sje,WV,UV,yje,Akt,rm,V0,xd,kje,Rkt,Ode,hr,Wi,Ar,tu,Fh,Pkt,Lje,Lc,$V,Eg,Eje,Okt,jV,Xa,Cje,wje,Hde,Dje,Tje,Ije,Mje,Mn=P(()=>{Wt();yC="en",QD=!1,JD=!1,XD=!1,Ikt=!1,xje=!1,zde=!1,Mkt=!1,Fde=!1,Nkt=!1,Sje=!1,UV=yC,yje=yC,V0=globalThis;typeof V0.vscode<"u"&&typeof V0.vscode.process<"u"?xd=V0.vscode.process:typeof process<"u"&&(xd=process);kje=typeof((Pde=xd?.versions)===null||Pde===void 0?void 0:Pde.electron)=="string",Rkt=kje&&xd?.type==="renderer";if(typeof xd=="object"){QD=xd.platform==="win32",JD=xd.platform==="darwin",XD=xd.platform==="linux",Ikt=XD&&!!xd.env.SNAP&&!!xd.env.SNAP_REVISION,Mkt=kje,Nkt=!!xd.env.CI||!!xd.env.BUILD_ARTIFACTSTAGINGDIRECTORY,WV=yC,UV=yC;let i=xd.env.VSCODE_NLS_CONFIG;if(i)try{let e=JSON.parse(i),t=e.availableLanguages["*"];WV=e.locale,yje=e.osLocale,UV=t||yC,Akt=e._translationsConfigFile}catch{}xje=!0}else typeof navigator=="object"&&!Rkt?(rm=navigator.userAgent,QD=rm.indexOf("Windows")>=0,JD=rm.indexOf("Macintosh")>=0,Fde=(rm.indexOf("Macintosh")>=0||rm.indexOf("iPad")>=0||rm.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,XD=rm.indexOf("Linux")>=0,Sje=rm?.indexOf("Mobi")>=0,zde=!0,WV=(g({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"),void 0)||yC,UV=WV,yje=navigator.language):console.error("Unable to resolve platform.");Ode=0;JD?Ode=1:QD?Ode=3:XD&&(Ode=2);hr=QD,Wi=JD,Ar=XD,tu=xje,Fh=zde,Pkt=zde&&typeof V0.importScripts=="function",Lje=Pkt?V0.origin:void 0,Lc=Fde,$V=Sje,Eg=rm,Eje=UV,Okt=typeof V0.postMessage=="function"&&!V0.importScripts,jV=(()=>{if(Okt){let i=[];V0.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,o=i.length;n{let n=++e;i.push({id:n,callback:t}),V0.postMessage({vscodeScheduleAsyncWork:n},"*")}}return i=>setTimeout(i)})(),Xa=JD||Fde?2:QD?1:3,Cje=!0,wje=!1;Hde=!!(Eg&&Eg.indexOf("Chrome")>=0),Dje=!!(Eg&&Eg.indexOf("Firefox")>=0),Tje=!!(!Hde&&Eg&&Eg.indexOf("Safari")>=0),Ije=!!(Eg&&Eg.indexOf("Edg/")>=0),Mje=!!(Eg&&Eg.indexOf("Android")>=0)});var Ma,eT=P(()=>{Ma={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}});var un,Yc=P(()=>{(function(i){function e(b){return b&&typeof b=="object"&&typeof b[Symbol.iterator]=="function"}i.is=e;let t=Object.freeze([]);function n(){return t}i.empty=n;function*o(b){yield b}i.single=o;function r(b){return e(b)?b:o(b)}i.wrap=r;function s(b){return b||t}i.from=s;function*a(b){for(let C=b.length-1;C>=0;C--)yield b[C]}i.reverse=a;function l(b){return!b||b[Symbol.iterator]().next().done===!0}i.isEmpty=l;function c(b){return b[Symbol.iterator]().next().value}i.first=c;function d(b,C){for(let w of b)if(C(w))return!0;return!1}i.some=d;function u(b,C){for(let w of b)if(C(w))return w}i.find=u;function*h(b,C){for(let w of b)C(w)&&(yield w)}i.filter=h;function*f(b,C){let w=0;for(let S of b)yield C(S,w++)}i.map=f;function*p(...b){for(let C of b)yield*C}i.concat=p;function m(b,C,w){let S=w;for(let x of b)S=C(S,x);return S}i.reduce=m;function*y(b,C,w=b.length){for(C<0&&(C+=b.length),w<0?w+=b.length:w>b.length&&(w=b.length);C{Ps=class i{constructor(e){this.element=e,this.next=i.Undefined,this.prev=i.Undefined}};Ps.Undefined=new Ps(void 0);$r=class{constructor(){this._first=Ps.Undefined,this._last=Ps.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Ps.Undefined}clear(){let e=this._first;for(;e!==Ps.Undefined;){let t=e.next;e.prev=Ps.Undefined,e.next=Ps.Undefined,e=t}this._first=Ps.Undefined,this._last=Ps.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let n=new Ps(e);if(this._first===Ps.Undefined)this._first=n,this._last=n;else if(t){let r=this._last;this._last=n,n.prev=r,r.next=n}else{let r=this._first;this._first=n,n.next=r,r.prev=n}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(n))}}shift(){if(this._first!==Ps.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Ps.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Ps.Undefined&&e.next!==Ps.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Ps.Undefined&&e.next===Ps.Undefined?(this._first=Ps.Undefined,this._last=Ps.Undefined):e.next===Ps.Undefined?(this._last=this._last.prev,this._last.next=Ps.Undefined):e.prev===Ps.Undefined&&(this._first=this._first.next,this._first.prev=Ps.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Ps.Undefined;)yield e.element,e=e.next}}});function zkt(i=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let t of Bde)i.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}function iT(i){let e=tT;if(i&&i instanceof RegExp)if(i.global)e=i;else{let t="g";i.ignoreCase&&(t+="i"),i.multiline&&(t+="m"),i.unicode&&(t+="u"),e=new RegExp(i.source,t)}return e.lastIndex=0,e}function _3(i,e,t,n,o){if(e=iT(e),o||(o=un.first(Nje)),t.length>o.maxLen){let c=i-o.maxLen/2;return c<0?c=0:n+=c,t=t.substring(c,i+o.maxLen/2),_3(i,e,t,n,o)}let r=Date.now(),s=i-1-n,a=-1,l=null;for(let c=1;!(Date.now()-r>=o.timeBudget);c++){let d=s-o.windowSize*c;e.lastIndex=Math.max(0,d);let u=Fkt(e,t,s,a);if(!u&&l||(l=u,d<=0))break;a=d}if(l){let c={word:l[0],startColumn:n+1+l.index,endColumn:n+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function Fkt(i,e,t,n){let o;for(;o=i.exec(e);){let r=o.index||0;if(r<=t&&i.lastIndex>=t)return o;if(n>0&&r>n)return null}return null}var Bde,tT,Nje,CC=P(()=>{Yc();Hh();Bde="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";tT=zkt();Nje=new $r;Nje.unshift({maxLen:1e3,windowSize:15,timeBudget:150})});function GV(i,e){if(typeof i!="object"||typeof e!="object"||!i||!e)return new b3(e,i!==e);if(Array.isArray(i)||Array.isArray(e)){let n=Array.isArray(i)&&Array.isArray(e)&&uo(i,e);return new b3(e,!n)}let t=!1;for(let n in e)if(e.hasOwnProperty(n)){let o=GV(i[n],e[n]);o.didChange&&(i[n]=o.newValue,t=!0)}return new b3(i,t)}function Ti(i,e){return typeof i>"u"?e:i==="false"?!1:!!i}function w3(i,e,t,n){if(typeof i>"u")return e;let o=parseInt(i,10);return isNaN(o)?e:(o=Math.max(t,o),o=Math.min(n,o),o|0)}function Rje(i,e,t,n){if(typeof i>"u")return e;let o=J1.float(i,e);return J1.clamp(o,t,n)}function ws(i,e,t,n){return typeof i!="string"?e:n&&i in n?n[i]:t.indexOf(i)===-1?e:i}function Hkt(i){switch(i){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}function Bkt(i){switch(i){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}function Vkt(i){switch(i){case"line":return Na.Line;case"block":return Na.Block;case"underline":return Na.Underline;case"line-thin":return Na.LineThin;case"block-outline":return Na.BlockOutline;case"underline-thin":return Na.UnderlineThin}}function Wkt(i){return i==="ctrlCmd"?Wi?"metaKey":"ctrlKey":"altKey"}function r5(i){let e=i.get(97);return e==="editable"?i.get(90):e!=="on"}function Aje(i,e){if(typeof i!="string")return e;switch(i){case"hidden":return 2;case"visible":return 3;default:return 1}}function xC(i,e,t){let n=t.indexOf(i);return n===-1?e:t[n]}function Vt(i){return x3[i.id]=i,i}var W0,SC,nT,Rr,b3,o5,y3,Qn,Qo,J1,iu,jr,wC,Vde,Wde,Na,Ude,$de,jde,qu,C3,qde,Gde,kC,Kde,Yde,oT,Zde,Af,Xde,Qde,Jde,eue,tue,iue,nue,oue,rue,sue,aue,lue,cue,due,ju,Sd,uue,hue,fue,pue,mue,gue,vue,_ue,bue,yue,Ukt,$kt,jkt,ml,x3,nu,Ks=P(()=>{Vi();Gc();Mn();eT();CC();Wt();W0=8,SC=class{constructor(e){this._values=e}hasChanged(e){return this._values[e]}},nT=class{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}},Rr=class{constructor(e,t,n,o){this.id=e,this.name=t,this.defaultValue=n,this.schema=o}applyUpdate(e,t){return GV(e,t)}compute(e,t,n){return n}},b3=class{constructor(e,t){this.newValue=e,this.didChange=t}};o5=class{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return GV(e,t)}validate(e){return this.defaultValue}},y3=class{constructor(e,t,n,o){this.id=e,this.name=t,this.defaultValue=n,this.schema=o}applyUpdate(e,t){return GV(e,t)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,n){return n}};Qn=class extends y3{constructor(e,t,n,o=void 0){typeof o<"u"&&(o.type="boolean",o.default=n),super(e,t,n,o)}validate(e){return Ti(e,this.defaultValue)}};Qo=class i extends y3{static clampedInt(e,t,n,o){return w3(e,t,n,o)}constructor(e,t,n,o,r,s=void 0){typeof s<"u"&&(s.type="integer",s.default=n,s.minimum=o,s.maximum=r),super(e,t,n,s),this.minimum=o,this.maximum=r}validate(e){return i.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}};J1=class i extends y3{static clamp(e,t,n){return en?n:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;let n=parseFloat(e);return isNaN(n)?t:n}constructor(e,t,n,o,r){typeof r<"u"&&(r.type="number",r.default=n),super(e,t,n,r),this.validationFn=o}validate(e){return this.validationFn(i.float(e,this.defaultValue))}},iu=class i extends y3{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,n,o=void 0){typeof o<"u"&&(o.type="string",o.default=n),super(e,t,n,o)}validate(e){return i.string(e,this.defaultValue)}};jr=class extends y3{constructor(e,t,n,o,r=void 0){typeof r<"u"&&(r.type="string",r.enum=o,r.default=n),super(e,t,n,r),this._allowedValues=o}validate(e){return ws(e,this.defaultValue,this._allowedValues)}},wC=class extends Rr{constructor(e,t,n,o,r,s,a=void 0){typeof a<"u"&&(a.type="string",a.enum=r,a.default=o),super(e,t,n,a),this._allowedValues=r,this._convert=s}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}};Vde=class extends Rr{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[g("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),g("accessibilitySupport.on","Optimize for usage with a Screen Reader."),g("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:g("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,n){return n===0?e.accessibilitySupport:n}},Wde=class extends Rr{constructor(){let e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:g("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:g("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;let t=e;return{insertSpace:Ti(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:Ti(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}};(function(i){i[i.Line=1]="Line",i[i.Block=2]="Block",i[i.Underline=3]="Underline",i[i.LineThin=4]="LineThin",i[i.BlockOutline=5]="BlockOutline",i[i.UnderlineThin=6]="UnderlineThin"})(Na||(Na={}));Ude=class extends o5{constructor(){super(140)}compute(e,t,n){let o=["monaco-editor"];return t.get(39)&&o.push(t.get(39)),e.extraEditorClassName&&o.push(e.extraEditorClassName),t.get(73)==="default"?o.push("mouse-default"):t.get(73)==="copy"&&o.push("mouse-copy"),t.get(110)&&o.push("showUnused"),t.get(138)&&o.push("showDeprecated"),o.join(" ")}},$de=class extends Qn{constructor(){super(37,"emptySelectionClipboard",!0,{description:g("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,n){return n&&e.emptySelectionClipboard}},jde=class extends Rr{constructor(){let e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:g("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:[g("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),g("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),g("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:g("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:[g("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),g("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),g("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:g("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:g("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:Wi},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:g("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:g("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;let t=e;return{cursorMoveOnType:Ti(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":ws(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":ws(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:Ti(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:Ti(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:Ti(t.loop,this.defaultValue.loop)}}},qu=class i extends Rr{constructor(){super(51,"fontLigatures",i.OFF,{anyOf:[{type:"boolean",description:g("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:g("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:g("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"||e.length===0?i.OFF:e==="true"?i.ON:e:e?i.ON:i.OFF}};qu.OFF='"liga" off, "calt" off';qu.ON='"liga" on, "calt" on';C3=class i extends Rr{constructor(){super(54,"fontVariations",i.OFF,{anyOf:[{type:"boolean",description:g("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:g("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:g("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"?i.OFF:e==="true"?i.TRANSLATE:e:e?i.TRANSLATE:i.OFF}compute(e,t,n){return e.fontInfo.fontVariationSettings}};C3.OFF="normal";C3.TRANSLATE="translate";qde=class extends o5{constructor(){super(50)}compute(e,t,n){return e.fontInfo}},Gde=class extends y3{constructor(){super(52,"fontSize",ml.fontSize,{type:"number",minimum:6,maximum:100,default:ml.fontSize,description:g("fontSize","Controls the font size in pixels.")})}validate(e){let t=J1.float(e,this.defaultValue);return t===0?ml.fontSize:J1.clamp(t,6,100)}compute(e,t,n){return e.fontInfo.fontSize}},kC=class i extends Rr{constructor(){super(53,"fontWeight",ml.fontWeight,{anyOf:[{type:"number",minimum:i.MINIMUM_VALUE,maximum:i.MAXIMUM_VALUE,errorMessage:g("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:i.SUGGESTION_VALUES}],default:ml.fontWeight,description:g("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(Qo.clampedInt(e,ml.fontWeight,i.MINIMUM_VALUE,i.MAXIMUM_VALUE))}};kC.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];kC.MINIMUM_VALUE=1;kC.MAXIMUM_VALUE=1e3;Kde=class extends Rr{constructor(){let 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:[g("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),g("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),g("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},n=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:g("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:g("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:g("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:g("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:g("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:g("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:n,description:g("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:n,description:g("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:n,description:g("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:n,description:g("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:n,description:g("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,n,o,r,s;if(!e||typeof e!="object")return this.defaultValue;let a=e;return{multiple:ws(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:ws(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(n=a.multipleTypeDefinitions)!==null&&n!==void 0?n:ws(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(o=a.multipleDeclarations)!==null&&o!==void 0?o:ws(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(r=a.multipleImplementations)!==null&&r!==void 0?r:ws(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(s=a.multipleReferences)!==null&&s!==void 0?s:ws(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:iu.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:iu.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:iu.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:iu.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:iu.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}},Yde=class extends Rr{constructor(){let e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:g("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:g("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:g("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:g("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:g("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Ti(t.enabled,this.defaultValue.enabled),delay:Qo.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:Ti(t.sticky,this.defaultValue.sticky),hidingDelay:Qo.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:Ti(t.above,this.defaultValue.above)}}},oT=class i extends o5{constructor(){super(143)}compute(e,t,n){return i.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){let t=e.height/e.lineHeight,n=Math.floor(e.paddingTop/e.lineHeight),o=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(o=Math.max(o,t-1));let r=(n+e.viewLineCount+o)/(e.pixelRatio*e.height),s=Math.floor(e.viewLineCount/r);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:n,extraLinesBeyondLastLine:o,desiredRatio:r,minimapLineCount:s}}static _computeMinimapLayout(e,t){let n=e.outerWidth,o=e.outerHeight,r=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(r*o),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:o};let s=t.stableMinimapLayoutInput,a=s&&e.outerHeight===s.outerHeight&&e.lineHeight===s.lineHeight&&e.typicalHalfwidthCharacterWidth===s.typicalHalfwidthCharacterWidth&&e.pixelRatio===s.pixelRatio&&e.scrollBeyondLastLine===s.scrollBeyondLastLine&&e.paddingTop===s.paddingTop&&e.paddingBottom===s.paddingBottom&&e.minimap.enabled===s.minimap.enabled&&e.minimap.side===s.minimap.side&&e.minimap.size===s.minimap.size&&e.minimap.showSlider===s.minimap.showSlider&&e.minimap.renderCharacters===s.minimap.renderCharacters&&e.minimap.maxColumn===s.minimap.maxColumn&&e.minimap.scale===s.minimap.scale&&e.verticalScrollbarWidth===s.verticalScrollbarWidth&&e.isViewportWrapping===s.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,d=e.scrollBeyondLastLine,u=e.minimap.renderCharacters,h=r>=2?Math.round(e.minimap.scale*2):e.minimap.scale,f=e.minimap.maxColumn,p=e.minimap.size,m=e.minimap.side,y=e.verticalScrollbarWidth,_=e.viewLineCount,v=e.remainingWidth,b=e.isViewportWrapping,C=u?2:3,w=Math.floor(r*o),S=w/r,x=!1,k=!1,D=C*h,E=h/r,A=1;if(p==="fill"||p==="fit"){let{typicalViewportLineCount:F,extraLinesBeforeFirstLine:V,extraLinesBeyondLastLine:ie,desiredRatio:fe,minimapLineCount:K}=i.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:d,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:o,lineHeight:l,pixelRatio:r});if(_/K>1)x=!0,k=!0,h=1,D=1,E=h/r;else{let je=!1,Ae=h+1;if(p==="fit"){let Be=Math.ceil((V+_+ie)*D);b&&a&&v<=t.stableFitRemainingWidth?(je=!0,Ae=t.stableFitMaxMinimapScale):je=Be>w}if(p==="fill"||je){x=!0;let Be=h;D=Math.min(l*r,Math.max(1,Math.floor(1/fe))),b&&a&&v<=t.stableFitRemainingWidth&&(Ae=t.stableFitMaxMinimapScale),h=Math.min(Ae,Math.max(1,Math.floor(D/C))),h>Be&&(A=Math.min(2,h/Be)),E=h/r/A,w=Math.ceil(Math.max(F,V+_+ie)*D),b?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=v,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}let T=Math.floor(f*E),L=Math.min(T,Math.max(0,Math.floor((v-y-2)*E/(c+E)))+W0),I=Math.floor(r*L),M=I/r;I=Math.floor(I*A);let N=u?1:2,z=m==="left"?0:n-L-y;return{renderMinimap:N,minimapLeft:z,minimapWidth:L,minimapHeightIsEditorHeight:x,minimapIsSampling:k,minimapScale:h,minimapLineHeight:D,minimapCanvasInnerWidth:I,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:M,minimapCanvasOuterHeight:S}}static computeLayout(e,t){let n=t.outerWidth|0,o=t.outerHeight|0,r=t.lineHeight|0,s=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,c=t.pixelRatio,d=t.viewLineCount,u=e.get(135),h=u==="inherit"?e.get(134):u,f=h==="inherit"?e.get(130):h,p=e.get(133),m=t.isDominatedByLongLines,y=e.get(57),_=e.get(67).renderType!==0,v=e.get(68),b=e.get(104),C=e.get(83),w=e.get(72),S=e.get(102),x=S.verticalScrollbarSize,k=S.verticalHasArrows,D=S.arrowSize,E=S.horizontalScrollbarSize,A=e.get(43),T=e.get(109)!=="never",L=e.get(65);A&&T&&(L+=16);let I=0;if(_){let ee=Math.max(s,v);I=Math.round(ee*l)}let M=0;y&&(M=r*t.glyphMarginDecorationLaneCount);let N=0,z=N+M,F=z+I,V=F+L,ie=n-M-I-L,fe=!1,K=!1,oe=-1;h==="inherit"&&m?(fe=!0,K=!0):f==="on"||f==="bounded"?K=!0:f==="wordWrapColumn"&&(oe=p);let je=i._computeMinimapLayout({outerWidth:n,outerHeight:o,lineHeight:r,typicalHalfwidthCharacterWidth:a,pixelRatio:c,scrollBeyondLastLine:b,paddingTop:C.top,paddingBottom:C.bottom,minimap:w,verticalScrollbarWidth:x,viewLineCount:d,remainingWidth:ie,isViewportWrapping:K},t.memory||new nT);je.renderMinimap!==0&&je.minimapLeft===0&&(N+=je.minimapWidth,z+=je.minimapWidth,F+=je.minimapWidth,V+=je.minimapWidth);let Ae=ie-je.minimapWidth,Be=Math.max(1,Math.floor((Ae-x-2)/a)),Ie=k?D:0;return K&&(oe=Math.max(1,Be),f==="bounded"&&(oe=Math.min(oe,p))),{width:n,height:o,glyphMarginLeft:N,glyphMarginWidth:M,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:z,lineNumbersWidth:I,decorationsLeft:F,decorationsWidth:L,contentLeft:V,contentWidth:Ae,minimap:je,viewportColumn:Be,isWordWrapMinified:fe,isViewportWrapping:K,wrappingColumn:oe,verticalScrollbarWidth:x,horizontalScrollbarHeight:E,overviewRuler:{top:Ie,width:x,height:o-2*Ie,right:0}}}},Zde=class extends Rr{constructor(){super(137,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[g("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."),g("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:g("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 ws(e,"simple",["simple","advanced"])}compute(e,t,n){return t.get(2)===2?"advanced":n}};(function(i){i.Off="off",i.OnCode="onCode",i.On="on"})(Af||(Af={}));Xde=class extends Rr{constructor(){let e={enabled:Af.OnCode};super(64,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[Af.Off,Af.OnCode,Af.On],default:e.enabled,enumDescriptions:[g("editor.lightbulb.enabled.off","Disable the code action menu."),g("editor.lightbulb.enabled.onCode","Show the code action menu when the cursor is on lines with code."),g("editor.lightbulb.enabled.on","Show the code action menu when the cursor is on lines with code or on empty lines.")],description:g("enabled","Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:ws(e.enabled,this.defaultValue.enabled,[Af.Off,Af.OnCode,Af.On])}}},Qde=class extends Rr{constructor(){let e={enabled:!1,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(114,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:g("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:10,description:g("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:g("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:g("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Ti(t.enabled,this.defaultValue.enabled),maxLineCount:Qo.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:ws(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:Ti(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}},Jde=class extends Rr{constructor(){let e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(139,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:g("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[g("editor.inlayHints.on","Inlay hints are enabled"),g("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",Wi?"Ctrl+Option":"Ctrl+Alt"),g("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",Wi?"Ctrl+Option":"Ctrl+Alt"),g("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:g("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:g("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:g("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:ws(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Qo.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:iu.string(t.fontFamily,this.defaultValue.fontFamily),padding:Ti(t.padding,this.defaultValue.padding)}}},eue=class extends Rr{constructor(){super(65,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):Qo.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,n){return n<0?Qo.clampedInt(-n*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):n}},tue=class extends J1{constructor(){super(66,"lineHeight",ml.lineHeight,e=>J1.clamp(e,0,150),{markdownDescription:g("lineHeight",`Controls the line height. +`+r.stack}return{value:i,source:e,stack:o,digest:null}}function eoe(i,e,t){return{value:i,source:null,stack:t??null,digest:e??null}}function Ooe(i,e){try{console.error(e.value)}catch(t){setTimeout(function(){throw t})}}var F2t=typeof WeakMap=="function"?WeakMap:Map;function hPe(i,e,t){t=v0(-1,t),t.tag=3,t.payload={element:null};var n=e.value;return t.callback=function(){Wz||(Wz=!0,qoe=n),Ooe(i,e)},t}function fPe(i,e,t){t=v0(-1,t),t.tag=3;var n=i.type.getDerivedStateFromError;if(typeof n=="function"){var o=e.value;t.payload=function(){return n(o)},t.callback=function(){Ooe(i,e)}}var r=i.stateNode;return r!==null&&typeof r.componentDidCatch=="function"&&(t.callback=function(){Ooe(i,e),typeof n!="function"&&(j6===null?j6=new Set([this]):j6.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),t}function SAe(i,e,t){var n=i.pingCache;if(n===null){n=i.pingCache=new F2t;var o=new Set;n.set(e,o)}else o=n.get(e),o===void 0&&(o=new Set,n.set(e,o));o.has(t)||(o.add(t),i=Q2t.bind(null,i,e,t),e.then(i,i))}function kAe(i){do{var e;if((e=i.tag===13)&&(e=i.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return i;i=i.return}while(i!==null);return null}function LAe(i,e,t,n,o){return i.mode&1?(i.flags|=65536,i.lanes=o,i):(i===e?i.flags|=65536:(i.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(e=v0(-1,1),e.tag=2,$6(t,e,1))),t.lanes|=1),i)}var H2t=w0.ReactCurrentOwner,Eh=!1;function Ou(i,e,t,n){e.child=i===null?WRe(e,null,t,n):ty(e,i.child,t,n)}function EAe(i,e,t,n,o){t=t.render;var r=e.ref;return Z9(e,o),n=Sre(i,e,t,n,r,o),t=kre(),i!==null&&!Eh?(e.updateQueue=i.updateQueue,e.flags&=-2053,i.lanes&=~o,C0(i,e,o)):(pa&&t&&hre(e),e.flags|=1,Ou(i,e,n,o),e.child)}function DAe(i,e,t,n,o){if(i===null){var r=t.type;return typeof r=="function"&&!Pre(r)&&r.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(e.tag=15,e.type=r,pPe(i,e,r,n,o)):(i=Cz(t.type,null,n,e,e.mode,o),i.ref=e.ref,i.return=e,e.child=i)}if(r=i.child,!(i.lanes&o)){var s=r.memoizedProps;if(t=t.compare,t=t!==null?t:bE,t(s,n)&&i.ref===e.ref)return C0(i,e,o)}return e.flags|=1,i=G6(r,n),i.ref=e.ref,i.return=e,e.child=i}function pPe(i,e,t,n,o){if(i!==null){var r=i.memoizedProps;if(bE(r,n)&&i.ref===e.ref)if(Eh=!1,e.pendingProps=n=r,(i.lanes&o)!==0)i.flags&131072&&(Eh=!0);else return e.lanes=i.lanes,C0(i,e,o)}return zoe(i,e,t,n,o)}function mPe(i,e,t){var n=e.pendingProps,o=n.children,r=i!==null?i.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},$s(j9,Cf),Cf|=t;else{if(!(t&1073741824))return i=r!==null?r.baseLanes|t:t,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:i,cachePool:null,transitions:null},e.updateQueue=null,$s(j9,Cf),Cf|=i,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=r!==null?r.baseLanes:t,$s(j9,Cf),Cf|=n}else r!==null?(n=r.baseLanes|t,e.memoizedState=null):n=t,$s(j9,Cf),Cf|=n;return Ou(i,e,o,t),e.child}function gPe(i,e){var t=e.ref;(i===null&&t!==null||i!==null&&i.ref!==t)&&(e.flags|=512,e.flags|=2097152)}function zoe(i,e,t,n,o){var r=Th(t)?__:Zd.current;return r=J9(e,r),Z9(e,o),t=Sre(i,e,t,n,r,o),n=kre(),i!==null&&!Eh?(e.updateQueue=i.updateQueue,e.flags&=-2053,i.lanes&=~o,C0(i,e,o)):(pa&&n&&hre(e),e.flags|=1,Ou(i,e,t,o),e.child)}function TAe(i,e,t,n,o){if(Th(t)){var r=!0;Nz(e)}else r=!1;if(Z9(e,o),e.stateNode===null)_z(i,e),uPe(e,t,n),Poe(e,t,n,o),n=!0;else if(i===null){var s=e.stateNode,a=e.memoizedProps;s.props=a;var l=s.context,c=t.contextType;typeof c=="object"&&c!==null?c=N1(c):(c=Th(t)?__:Zd.current,c=J9(e,c));var d=t.getDerivedStateFromProps,u=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";u||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==n||l!==c)&&xAe(e,s,n,c),P6=!1;var h=e.memoizedState;s.state=h,zz(e,n,s,o),l=e.memoizedState,a!==n||h!==l||Dh.current||P6?(typeof d=="function"&&(Roe(e,t,d,n),l=e.memoizedState),(a=P6||wAe(e,t,a,n,h,l,c))?(u||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),s.props=n,s.state=l,s.context=c,n=a):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{s=e.stateNode,$Re(i,e),a=e.memoizedProps,c=e.type===e.elementType?a:Wp(e.type,a),s.props=c,u=e.pendingProps,h=s.context,l=t.contextType,typeof l=="object"&&l!==null?l=N1(l):(l=Th(t)?__:Zd.current,l=J9(e,l));var f=t.getDerivedStateFromProps;(d=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==u||h!==l)&&xAe(e,s,n,l),P6=!1,h=e.memoizedState,s.state=h,zz(e,n,s,o);var p=e.memoizedState;a!==u||h!==p||Dh.current||P6?(typeof f=="function"&&(Roe(e,t,f,n),p=e.memoizedState),(c=P6||wAe(e,t,c,n,h,p,l)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,p,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,p,l)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===i.memoizedProps&&h===i.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===i.memoizedProps&&h===i.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=p),s.props=n,s.state=p,s.context=l,n=c):(typeof s.componentDidUpdate!="function"||a===i.memoizedProps&&h===i.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===i.memoizedProps&&h===i.memoizedState||(e.flags|=1024),n=!1)}return Foe(i,e,t,n,r,o)}function Foe(i,e,t,n,o,r){gPe(i,e);var s=(e.flags&128)!==0;if(!n&&!s)return o&&pAe(e,t,!1),C0(i,e,r);n=e.stateNode,H2t.current=e;var a=s&&typeof t.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,i!==null&&s?(e.child=ty(e,i.child,null,r),e.child=ty(e,null,a,r)):Ou(i,e,a,r),e.memoizedState=n.state,o&&pAe(e,t,!0),e.child}function vPe(i){var e=i.stateNode;e.pendingContext?fAe(i,e.pendingContext,e.pendingContext!==e.context):e.context&&fAe(i,e.context,!1),yre(i,e.containerInfo)}function IAe(i,e,t,n,o){return ey(),pre(o),e.flags|=256,Ou(i,e,t,n),e.child}var Hoe={dehydrated:null,treeContext:null,retryLane:0};function Boe(i){return{baseLanes:i,cachePool:null,transitions:null}}function _Pe(i,e,t){var n=e.pendingProps,o=ka.current,r=!1,s=(e.flags&128)!==0,a;if((a=s)||(a=i!==null&&i.memoizedState===null?!1:(o&2)!==0),a?(r=!0,e.flags&=-129):(i===null||i.memoizedState!==null)&&(o|=1),$s(ka,o&1),i===null)return Noe(e),i=e.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?(e.mode&1?i.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(s=n.children,i=n.fallback,r?(n=e.mode,r=e.child,s={mode:"hidden",children:s},!(n&1)&&r!==null?(r.childLanes=0,r.pendingProps=s):r=iF(s,n,0,null),i=v_(i,n,t,null),r.return=e,i.return=e,r.sibling=i,e.child=r,e.child.memoizedState=Boe(t),e.memoizedState=Hoe,i):Dre(e,s));if(o=i.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return B2t(i,e,s,n,a,o,t);if(r){r=n.fallback,s=e.mode,o=i.child,a=o.sibling;var l={mode:"hidden",children:n.children};return!(s&1)&&e.child!==o?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=G6(o,l),n.subtreeFlags=o.subtreeFlags&14680064),a!==null?r=G6(a,r):(r=v_(r,s,t,null),r.flags|=2),r.return=e,n.return=e,n.sibling=r,e.child=n,n=r,r=e.child,s=i.child.memoizedState,s=s===null?Boe(t):{baseLanes:s.baseLanes|t,cachePool:null,transitions:s.transitions},r.memoizedState=s,r.childLanes=i.childLanes&~t,e.memoizedState=Hoe,n}return r=i.child,i=r.sibling,n=G6(r,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=t),n.return=e,n.sibling=null,i!==null&&(t=e.deletions,t===null?(e.deletions=[i],e.flags|=16):t.push(i)),e.child=n,e.memoizedState=null,n}function Dre(i,e){return e=iF({mode:"visible",children:e},i.mode,0,null),e.return=i,i.child=e}function cz(i,e,t,n){return n!==null&&pre(n),ty(e,i.child,null,t),i=Dre(e,e.pendingProps.children),i.flags|=2,e.memoizedState=null,i}function B2t(i,e,t,n,o,r,s){if(t)return e.flags&256?(e.flags&=-257,n=eoe(Error(Di(422))),cz(i,e,s,n)):e.memoizedState!==null?(e.child=i.child,e.flags|=128,null):(r=n.fallback,o=e.mode,n=iF({mode:"visible",children:n.children},o,0,null),r=v_(r,o,s,null),r.flags|=2,n.return=e,r.return=e,n.sibling=r,e.child=n,e.mode&1&&ty(e,i.child,null,s),e.child.memoizedState=Boe(s),e.memoizedState=Hoe,r);if(!(e.mode&1))return cz(i,e,s,null);if(o.data==="$!"){if(n=o.nextSibling&&o.nextSibling.dataset,n)var a=n.dgst;return n=a,r=Error(Di(419)),n=eoe(r,n,void 0),cz(i,e,s,n)}if(a=(s&i.childLanes)!==0,Eh||a){if(n=Vc,n!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(n.suspendedLanes|s)?0:o,o!==0&&o!==r.retryLane&&(r.retryLane=o,y0(i,o),qp(n,i,o,-1))}return Rre(),n=eoe(Error(Di(421))),cz(i,e,s,n)}return o.data==="$?"?(e.flags|=128,e.child=i.child,e=J2t.bind(null,i),o._reactRetry=e,null):(i=r.treeContext,wf=U6(o.nextSibling),xf=e,pa=!0,$p=null,i!==null&&(D1[T1++]=m0,D1[T1++]=g0,D1[T1++]=b_,m0=i.id,g0=i.overflow,b_=e),e=Dre(e,n.children),e.flags|=4096,e)}function MAe(i,e,t){i.lanes|=e;var n=i.alternate;n!==null&&(n.lanes|=e),Aoe(i.return,e,t)}function toe(i,e,t,n,o){var r=i.memoizedState;r===null?i.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:t,tailMode:o}:(r.isBackwards=e,r.rendering=null,r.renderingStartTime=0,r.last=n,r.tail=t,r.tailMode=o)}function bPe(i,e,t){var n=e.pendingProps,o=n.revealOrder,r=n.tail;if(Ou(i,e,n.children,t),n=ka.current,n&2)n=n&1|2,e.flags|=128;else{if(i!==null&&i.flags&128)e:for(i=e.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&MAe(i,t,e);else if(i.tag===19)MAe(i,t,e);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break e;for(;i.sibling===null;){if(i.return===null||i.return===e)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}n&=1}if($s(ka,n),!(e.mode&1))e.memoizedState=null;else switch(o){case"forwards":for(t=e.child,o=null;t!==null;)i=t.alternate,i!==null&&Fz(i)===null&&(o=t),t=t.sibling;t=o,t===null?(o=e.child,e.child=null):(o=t.sibling,t.sibling=null),toe(e,!1,o,t,r);break;case"backwards":for(t=null,o=e.child,e.child=null;o!==null;){if(i=o.alternate,i!==null&&Fz(i)===null){e.child=o;break}i=o.sibling,o.sibling=t,t=o,o=i}toe(e,!0,t,null,r);break;case"together":toe(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function _z(i,e){!(e.mode&1)&&i!==null&&(i.alternate=null,e.alternate=null,e.flags|=2)}function C0(i,e,t){if(i!==null&&(e.dependencies=i.dependencies),C_|=e.lanes,!(t&e.childLanes))return null;if(i!==null&&e.child!==i.child)throw Error(Di(153));if(e.child!==null){for(i=e.child,t=G6(i,i.pendingProps),e.child=t,t.return=e;i.sibling!==null;)i=i.sibling,t=t.sibling=G6(i,i.pendingProps),t.return=e;t.sibling=null}return e.child}function V2t(i,e,t){switch(e.tag){case 3:vPe(e),ey();break;case 5:jRe(e);break;case 1:Th(e.type)&&Nz(e);break;case 4:yre(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,o=e.memoizedProps.value;$s(Pz,n._currentValue),n._currentValue=o;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?($s(ka,ka.current&1),e.flags|=128,null):t&e.child.childLanes?_Pe(i,e,t):($s(ka,ka.current&1),i=C0(i,e,t),i!==null?i.sibling:null);$s(ka,ka.current&1);break;case 19:if(n=(t&e.childLanes)!==0,i.flags&128){if(n)return bPe(i,e,t);e.flags|=128}if(o=e.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),$s(ka,ka.current),n)break;return null;case 22:case 23:return e.lanes=0,mPe(i,e,t)}return C0(i,e,t)}var yPe,Voe,CPe,wPe;yPe=function(i,e){for(var t=e.child;t!==null;){if(t.tag===5||t.tag===6)i.appendChild(t.stateNode);else if(t.tag!==4&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}};Voe=function(){};CPe=function(i,e,t,n){var o=i.memoizedProps;if(o!==n){i=e.stateNode,m_(pg.current);var r=null;switch(t){case"input":o=coe(i,o),n=coe(i,n),r=[];break;case"select":o=Ea({},o,{value:void 0}),n=Ea({},n,{value:void 0}),r=[];break;case"textarea":o=hoe(i,o),n=hoe(i,n),r=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(i.onclick=Iz)}poe(t,n);var s;t=null;for(c in o)if(!n.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(s in a)a.hasOwnProperty(s)&&(t||(t={}),t[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(hE.hasOwnProperty(c)?r||(r=[]):(r=r||[]).push(c,null));for(c in n){var l=n[c];if(a=o?.[c],n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(t||(t={}),t[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(t||(t={}),t[s]=l[s])}else t||(r||(r=[]),r.push(c,t)),t=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(r=r||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(r=r||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(hE.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&ia("scroll",i),r||a===l||(r=[])):(r=r||[]).push(c,l))}t&&(r=r||[]).push("style",t);var c=r;(e.updateQueue=c)&&(e.flags|=4)}};wPe=function(i,e,t,n){t!==n&&(e.flags|=4)};function ZL(i,e){if(!pa)switch(i.tailMode){case"hidden":e=i.tail;for(var t=null;e!==null;)e.alternate!==null&&(t=e),e=e.sibling;t===null?i.tail=null:t.sibling=null;break;case"collapsed":t=i.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e||i.tail===null?i.tail=null:i.tail.sibling=null:n.sibling=null}}function Kd(i){var e=i.alternate!==null&&i.alternate.child===i.child,t=0,n=0;if(e)for(var o=i.child;o!==null;)t|=o.lanes|o.childLanes,n|=o.subtreeFlags&14680064,n|=o.flags&14680064,o.return=i,o=o.sibling;else for(o=i.child;o!==null;)t|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=i,o=o.sibling;return i.subtreeFlags|=n,i.childLanes=t,e}function W2t(i,e,t){var n=e.pendingProps;switch(fre(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kd(e),null;case 1:return Th(e.type)&&Mz(),Kd(e),null;case 3:return n=e.stateNode,iy(),na(Dh),na(Zd),wre(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(i===null||i.child===null)&&(az(e)?e.flags|=4:i===null||i.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,$p!==null&&(Yoe($p),$p=null))),Voe(i,e),Kd(e),null;case 5:Cre(e);var o=m_(SE.current);if(t=e.type,i!==null&&e.stateNode!=null)CPe(i,e,t,n,o),i.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(Di(166));return Kd(e),null}if(i=m_(pg.current),az(e)){n=e.stateNode,t=e.type;var r=e.memoizedProps;switch(n[hg]=e,n[wE]=r,i=(e.mode&1)!==0,t){case"dialog":ia("cancel",n),ia("close",n);break;case"iframe":case"object":case"embed":ia("load",n);break;case"video":case"audio":for(o=0;o<\/script>",i=i.removeChild(i.firstChild)):typeof n.is=="string"?i=s.createElement(t,{is:n.is}):(i=s.createElement(t),t==="select"&&(s=i,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):i=s.createElementNS(i,t),i[hg]=e,i[wE]=n,yPe(i,e,!1,!1),e.stateNode=i;e:{switch(s=moe(t,n),t){case"dialog":ia("cancel",i),ia("close",i),o=n;break;case"iframe":case"object":case"embed":ia("load",i),o=n;break;case"video":case"audio":for(o=0;ooy&&(e.flags|=128,n=!0,ZL(r,!1),e.lanes=4194304)}else{if(!n)if(i=Fz(s),i!==null){if(e.flags|=128,n=!0,t=i.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),ZL(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!pa)return Kd(e),null}else 2*cl()-r.renderingStartTime>oy&&t!==1073741824&&(e.flags|=128,n=!0,ZL(r,!1),e.lanes=4194304);r.isBackwards?(s.sibling=e.child,e.child=s):(t=r.last,t!==null?t.sibling=s:e.child=s,r.last=s)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=cl(),e.sibling=null,t=ka.current,$s(ka,n?t&1|2:t&1),e):(Kd(e),null);case 22:case 23:return Are(),n=e.memoizedState!==null,i!==null&&i.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Cf&1073741824&&(Kd(e),e.subtreeFlags&6&&(e.flags|=8192)):Kd(e),null;case 24:return null;case 25:return null}throw Error(Di(156,e.tag))}function U2t(i,e){switch(fre(e),e.tag){case 1:return Th(e.type)&&Mz(),i=e.flags,i&65536?(e.flags=i&-65537|128,e):null;case 3:return iy(),na(Dh),na(Zd),wre(),i=e.flags,i&65536&&!(i&128)?(e.flags=i&-65537|128,e):null;case 5:return Cre(e),null;case 13:if(na(ka),i=e.memoizedState,i!==null&&i.dehydrated!==null){if(e.alternate===null)throw Error(Di(340));ey()}return i=e.flags,i&65536?(e.flags=i&-65537|128,e):null;case 19:return na(ka),null;case 4:return iy(),null;case 10:return vre(e.type._context),null;case 22:case 23:return Are(),null;case 24:return null;default:return null}}var dz=!1,Yd=!1,$2t=typeof WeakSet=="function"?WeakSet:Set,yn=null;function $9(i,e){var t=i.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){ja(i,e,n)}else t.current=null}function Woe(i,e,t){try{t()}catch(n){ja(i,e,n)}}var NAe=!1;function j2t(i,e){if(koe=Ez,i=ERe(),ure(i)){if("selectionStart"in i)var t={start:i.selectionStart,end:i.selectionEnd};else e:{t=(t=i.ownerDocument)&&t.defaultView||window;var n=t.getSelection&&t.getSelection();if(n&&n.rangeCount!==0){t=n.anchorNode;var o=n.anchorOffset,r=n.focusNode;n=n.focusOffset;try{t.nodeType,r.nodeType}catch{t=null;break e}var s=0,a=-1,l=-1,c=0,d=0,u=i,h=null;t:for(;;){for(var f;u!==t||o!==0&&u.nodeType!==3||(a=s+o),u!==r||n!==0&&u.nodeType!==3||(l=s+n),u.nodeType===3&&(s+=u.nodeValue.length),(f=u.firstChild)!==null;)h=u,u=f;for(;;){if(u===i)break t;if(h===t&&++c===o&&(a=s),h===r&&++d===n&&(l=s),(f=u.nextSibling)!==null)break;u=h,h=u.parentNode}u=f}t=a===-1||l===-1?null:{start:a,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(Loe={focusedElem:i,selectionRange:t},Ez=!1,yn=e;yn!==null;)if(e=yn,i=e.child,(e.subtreeFlags&1028)!==0&&i!==null)i.return=e,yn=i;else for(;yn!==null;){e=yn;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,y=p.memoizedState,_=e.stateNode,v=_.getSnapshotBeforeUpdate(e.elementType===e.type?m:Wp(e.type,m),y);_.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Di(163))}}catch(C){ja(e,e.return,C)}if(i=e.sibling,i!==null){i.return=e.return,yn=i;break}yn=e.return}return p=NAe,NAe=!1,p}function cE(i,e,t){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&i)===i){var r=o.destroy;o.destroy=void 0,r!==void 0&&Woe(e,t,r)}o=o.next}while(o!==n)}}function eF(i,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&i)===i){var n=t.create;t.destroy=n()}t=t.next}while(t!==e)}}function Uoe(i){var e=i.ref;if(e!==null){var t=i.stateNode;switch(i.tag){case 5:i=t;break;default:i=t}typeof e=="function"?e(i):e.current=i}}function xPe(i){var e=i.alternate;e!==null&&(i.alternate=null,xPe(e)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(e=i.stateNode,e!==null&&(delete e[hg],delete e[wE],delete e[Toe],delete e[E2t],delete e[D2t])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function SPe(i){return i.tag===5||i.tag===3||i.tag===4}function AAe(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||SPe(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function $oe(i,e,t){var n=i.tag;if(n===5||n===6)i=i.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(i,e):t.insertBefore(i,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(i,t)):(e=t,e.appendChild(i)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=Iz));else if(n!==4&&(i=i.child,i!==null))for($oe(i,e,t),i=i.sibling;i!==null;)$oe(i,e,t),i=i.sibling}function joe(i,e,t){var n=i.tag;if(n===5||n===6)i=i.stateNode,e?t.insertBefore(i,e):t.appendChild(i);else if(n!==4&&(i=i.child,i!==null))for(joe(i,e,t),i=i.sibling;i!==null;)joe(i,e,t),i=i.sibling}var md=null,Up=!1;function A6(i,e,t){for(t=t.child;t!==null;)kPe(i,e,t),t=t.sibling}function kPe(i,e,t){if(fg&&typeof fg.onCommitFiberUnmount=="function")try{fg.onCommitFiberUnmount(qz,t)}catch{}switch(t.tag){case 5:Yd||$9(t,e);case 6:var n=md,o=Up;md=null,A6(i,e,t),md=n,Up=o,md!==null&&(Up?(i=md,t=t.stateNode,i.nodeType===8?i.parentNode.removeChild(t):i.removeChild(t)):md.removeChild(t.stateNode));break;case 18:md!==null&&(Up?(i=md,t=t.stateNode,i.nodeType===8?Kne(i.parentNode,t):i.nodeType===1&&Kne(i,t),vE(i)):Kne(md,t.stateNode));break;case 4:n=md,o=Up,md=t.stateNode.containerInfo,Up=!0,A6(i,e,t),md=n,Up=o;break;case 0:case 11:case 14:case 15:if(!Yd&&(n=t.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var r=o,s=r.destroy;r=r.tag,s!==void 0&&(r&2||r&4)&&Woe(t,e,s),o=o.next}while(o!==n)}A6(i,e,t);break;case 1:if(!Yd&&($9(t,e),n=t.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=t.memoizedProps,n.state=t.memoizedState,n.componentWillUnmount()}catch(a){ja(t,e,a)}A6(i,e,t);break;case 21:A6(i,e,t);break;case 22:t.mode&1?(Yd=(n=Yd)||t.memoizedState!==null,A6(i,e,t),Yd=n):A6(i,e,t);break;default:A6(i,e,t)}}function RAe(i){var e=i.updateQueue;if(e!==null){i.updateQueue=null;var t=i.stateNode;t===null&&(t=i.stateNode=new $2t),e.forEach(function(n){var o=e0t.bind(null,i,n);t.has(n)||(t.add(n),n.then(o,o))})}}function Vp(i,e){var t=e.deletions;if(t!==null)for(var n=0;no&&(o=s),n&=~r}if(n=o,n=cl()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*G2t(n/1960))-n,10i?16:i,H6===null)var n=!1;else{if(i=H6,H6=null,Uz=0,Mr&6)throw Error(Di(331));var o=Mr;for(Mr|=4,yn=i.current;yn!==null;){var r=yn,s=r.child;if(yn.flags&16){var a=r.deletions;if(a!==null){for(var l=0;lcl()-Mre?g_(i,0):Ire|=t),Ih(i,e)}function APe(i,e){e===0&&(i.mode&1?(e=XO,XO<<=1,!(XO&130023424)&&(XO=4194304)):e=1);var t=zu();i=y0(i,e),i!==null&&(TE(i,e,t),Ih(i,t))}function J2t(i){var e=i.memoizedState,t=0;e!==null&&(t=e.retryLane),APe(i,t)}function e0t(i,e){var t=0;switch(i.tag){case 13:var n=i.stateNode,o=i.memoizedState;o!==null&&(t=o.retryLane);break;case 19:n=i.stateNode;break;default:throw Error(Di(314))}n!==null&&n.delete(e),APe(i,t)}var RPe;RPe=function(i,e,t){if(i!==null)if(i.memoizedProps!==e.pendingProps||Dh.current)Eh=!0;else{if(!(i.lanes&t)&&!(e.flags&128))return Eh=!1,V2t(i,e,t);Eh=!!(i.flags&131072)}else Eh=!1,pa&&e.flags&1048576&&FRe(e,Rz,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;_z(i,e),i=e.pendingProps;var o=J9(e,Zd.current);Z9(e,t),o=Sre(null,e,n,i,o,t);var r=kre();return e.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Th(n)?(r=!0,Nz(e)):r=!1,e.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,bre(e),o.updater=Jz,e.stateNode=o,o._reactInternals=e,Poe(e,n,i,t),e=Foe(null,e,n,!0,r,t)):(e.tag=0,pa&&r&&hre(e),Ou(null,e,o,t),e=e.child),e;case 16:n=e.elementType;e:{switch(_z(i,e),i=e.pendingProps,o=n._init,n=o(n._payload),e.type=n,o=e.tag=i0t(n),i=Wp(n,i),o){case 0:e=zoe(null,e,n,i,t);break e;case 1:e=TAe(null,e,n,i,t);break e;case 11:e=EAe(null,e,n,i,t);break e;case 14:e=DAe(null,e,n,Wp(n.type,i),t);break e}throw Error(Di(306,n,""))}return e;case 0:return n=e.type,o=e.pendingProps,o=e.elementType===n?o:Wp(n,o),zoe(i,e,n,o,t);case 1:return n=e.type,o=e.pendingProps,o=e.elementType===n?o:Wp(n,o),TAe(i,e,n,o,t);case 3:e:{if(vPe(e),i===null)throw Error(Di(387));n=e.pendingProps,r=e.memoizedState,o=r.element,$Re(i,e),zz(e,n,null,t);var s=e.memoizedState;if(n=s.element,r.isDehydrated)if(r={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=r,e.memoizedState=r,e.flags&256){o=ny(Error(Di(423)),e),e=IAe(i,e,n,t,o);break e}else if(n!==o){o=ny(Error(Di(424)),e),e=IAe(i,e,n,t,o);break e}else for(wf=U6(e.stateNode.containerInfo.firstChild),xf=e,pa=!0,$p=null,t=WRe(e,null,n,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(ey(),n===o){e=C0(i,e,t);break e}Ou(i,e,n,t)}e=e.child}return e;case 5:return jRe(e),i===null&&Noe(e),n=e.type,o=e.pendingProps,r=i!==null?i.memoizedProps:null,s=o.children,Eoe(n,o)?s=null:r!==null&&Eoe(n,r)&&(e.flags|=32),gPe(i,e),Ou(i,e,s,t),e.child;case 6:return i===null&&Noe(e),null;case 13:return _Pe(i,e,t);case 4:return yre(e,e.stateNode.containerInfo),n=e.pendingProps,i===null?e.child=ty(e,null,n,t):Ou(i,e,n,t),e.child;case 11:return n=e.type,o=e.pendingProps,o=e.elementType===n?o:Wp(n,o),EAe(i,e,n,o,t);case 7:return Ou(i,e,e.pendingProps,t),e.child;case 8:return Ou(i,e,e.pendingProps.children,t),e.child;case 12:return Ou(i,e,e.pendingProps.children,t),e.child;case 10:e:{if(n=e.type._context,o=e.pendingProps,r=e.memoizedProps,s=o.value,$s(Pz,n._currentValue),n._currentValue=s,r!==null)if(Gp(r.value,s)){if(r.children===o.children&&!Dh.current){e=C0(i,e,t);break e}}else for(r=e.child,r!==null&&(r.return=e);r!==null;){var a=r.dependencies;if(a!==null){s=r.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(r.tag===1){l=v0(-1,t&-t),l.tag=2;var c=r.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}r.lanes|=t,l=r.alternate,l!==null&&(l.lanes|=t),Aoe(r.return,t,e),a.lanes|=t;break}l=l.next}}else if(r.tag===10)s=r.type===e.type?null:r.child;else if(r.tag===18){if(s=r.return,s===null)throw Error(Di(341));s.lanes|=t,a=s.alternate,a!==null&&(a.lanes|=t),Aoe(s,t,e),s=r.sibling}else s=r.child;if(s!==null)s.return=r;else for(s=r;s!==null;){if(s===e){s=null;break}if(r=s.sibling,r!==null){r.return=s.return,s=r;break}s=s.return}r=s}Ou(i,e,o.children,t),e=e.child}return e;case 9:return o=e.type,n=e.pendingProps.children,Z9(e,t),o=N1(o),n=n(o),e.flags|=1,Ou(i,e,n,t),e.child;case 14:return n=e.type,o=Wp(n,e.pendingProps),o=Wp(n.type,o),DAe(i,e,n,o,t);case 15:return pPe(i,e,e.type,e.pendingProps,t);case 17:return n=e.type,o=e.pendingProps,o=e.elementType===n?o:Wp(n,o),_z(i,e),e.tag=1,Th(n)?(i=!0,Nz(e)):i=!1,Z9(e,t),uPe(e,n,o),Poe(e,n,o,t),Foe(null,e,n,!0,i,t);case 19:return bPe(i,e,t);case 22:return mPe(i,e,t)}throw Error(Di(156,e.tag))};function PPe(i,e){return lRe(i,e)}function t0t(i,e,t,n){this.tag=i,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function I1(i,e,t,n){return new t0t(i,e,t,n)}function Pre(i){return i=i.prototype,!(!i||!i.isReactComponent)}function i0t(i){if(typeof i=="function")return Pre(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ere)return 11;if(i===tre)return 14}return 2}function G6(i,e){var t=i.alternate;return t===null?(t=I1(i.tag,e,i.key,i.mode),t.elementType=i.elementType,t.type=i.type,t.stateNode=i.stateNode,t.alternate=i,i.alternate=t):(t.pendingProps=e,t.type=i.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=i.flags&14680064,t.childLanes=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,e=i.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=i.sibling,t.index=i.index,t.ref=i.ref,t}function Cz(i,e,t,n,o,r){var s=2;if(n=i,typeof i=="function")Pre(i)&&(s=1);else if(typeof i=="string")s=5;else e:switch(i){case P9:return v_(t.children,o,r,e);case Joe:s=8,o|=8;break;case roe:return i=I1(12,t,e,o|2),i.elementType=roe,i.lanes=r,i;case soe:return i=I1(13,t,e,o),i.elementType=soe,i.lanes=r,i;case aoe:return i=I1(19,t,e,o),i.elementType=aoe,i.lanes=r,i;case jAe:return iF(t,o,r,e);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case UAe:s=10;break e;case $Ae:s=9;break e;case ere:s=11;break e;case tre:s=14;break e;case R6:s=16,n=null;break e}throw Error(Di(130,i==null?i:typeof i,""))}return e=I1(s,t,e,o),e.elementType=i,e.type=n,e.lanes=r,e}function v_(i,e,t,n){return i=I1(7,i,n,e),i.lanes=t,i}function iF(i,e,t,n){return i=I1(22,i,n,e),i.elementType=jAe,i.lanes=t,i.stateNode={isHidden:!1},i}function ioe(i,e,t){return i=I1(6,i,null,e),i.lanes=t,i}function noe(i,e,t){return e=I1(4,i.children!==null?i.children:[],i.key,e),e.lanes=t,e.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},e}function n0t(i,e,t,n,o){this.tag=e,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bne(0),this.expirationTimes=Bne(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bne(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Ore(i,e,t,n,o,r,s,a,l){return i=new n0t(i,e,t,a,l),e===1?(e=1,r===!0&&(e|=8)):e=0,r=I1(3,null,null,e),i.current=r,r.stateNode=i,r.memoizedState={element:n,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},bre(r),i}function o0t(i,e,t){var n=3{"use strict";function BPe(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(BPe)}catch(i){console.error(i)}}BPe(),VPe.exports=HPe()});var UPe=ot(Vre=>{"use strict";var WPe=Bre();Vre.createRoot=WPe.createRoot,Vre.hydrateRoot=WPe.hydrateRoot;var iGt});var di=ot((rGt,AE)=>{function c0t(i){return i&&i.__esModule?i:{default:i}}AE.exports=c0t,AE.exports.__esModule=!0,AE.exports.default=AE.exports});var $Pe=ot(Wre=>{"use strict";Object.defineProperty(Wre,"__esModule",{value:!0});Wre.default=d0t;function d0t(i){let e="https://mui.com/production-error/?code="+i;for(let t=1;t{"use strict";var u0t=di();Object.defineProperty(Ure,"__esModule",{value:!0});Object.defineProperty(Ure,"default",{enumerable:!0,get:function(){return h0t.default}});var h0t=u0t($Pe())});function Fe(){return Fe=Object.assign?Object.assign.bind():function(i){for(var e=1;e{});function aF(i){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=i(t)),e[t]}}var lF=P(()=>{});var f0t,jPe,$re=P(()=>{lF();f0t=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,jPe=aF(function(i){return f0t.test(i)||i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&i.charCodeAt(2)<91})});function m0t(i){if(i.sheet)return i.sheet;for(var e=0;e{p0t=!1;qPe=function(){function i(t){var n=this;this._insertTag=function(o){var r;n.tags.length===0?n.insertionPoint?r=n.insertionPoint.nextSibling:n.prepend?r=n.container.firstChild:r=n.before:r=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,r),n.tags.push(o)},this.isSpeedy=t.speedy===void 0?!p0t:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var e=i.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(g0t(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var r=m0t(o);try{r.insertRule(n,r.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},i}()});var _d,RE,Br,cF,ay,ly,KPe,dF,YPe,uF=P(()=>{_d="-ms-",RE="-moz-",Br="-webkit-",cF="comm",ay="rule",ly="decl",KPe="@import",dF="@keyframes",YPe="@layer"});function QPe(i,e){return dl(i,0)^45?(((e<<2^dl(i,0))<<2^dl(i,1))<<2^dl(i,2))<<2^dl(i,3):0}function hF(i){return i.trim()}function jre(i,e){return(i=e.exec(i))?i[0]:i}function kr(i,e,t){return i.replace(e,t)}function PE(i,e){return i.indexOf(e)}function dl(i,e){return i.charCodeAt(e)|0}function e3(i,e,t){return i.slice(e,t)}function Hu(i){return i.length}function cy(i){return i.length}function dy(i,e){return e.push(i),i}function qre(i,e){return i.map(e).join("")}var ZPe,k_,XPe,uy=P(()=>{ZPe=Math.abs,k_=String.fromCharCode,XPe=Object.assign});function OE(i,e,t,n,o,r,s){return{value:i,root:e,parent:t,type:n,props:o,children:r,line:fF,column:hy,length:s,return:""}}function my(i,e){return XPe(OE("",null,null,"",null,null,0),i,{length:-i.length},e)}function eOe(){return Bl}function tOe(){return Bl=Bu>0?dl(py,--Bu):0,hy--,Bl===10&&(hy=1,fF--),Bl}function Vu(){return Bl=Bu2||fy(Bl)>3?"":" "}function nOe(i,e){for(;--e&&Vu()&&!(Bl<48||Bl>102||Bl>57&&Bl<65||Bl>70&&Bl<97););return gy(i,zE()+(e<6&&R1()==32&&Vu()==32))}function Gre(i){for(;Vu();)switch(Bl){case i:return Bu;case 34:case 39:i!==34&&i!==39&&Gre(Bl);break;case 40:i===41&&Gre(i);break;case 92:Vu();break}return Bu}function oOe(i,e){for(;Vu()&&i+Bl!==57;)if(i+Bl===84&&R1()===47)break;return"/*"+gy(e,Bu-1)+"*"+k_(i===47?i:Vu())}function rOe(i){for(;!fy(R1());)Vu();return gy(i,Bu)}var fF,hy,JPe,Bu,Bl,py,Kre=P(()=>{uy();fF=1,hy=1,JPe=0,Bu=0,Bl=0,py=""});function lOe(i){return mF(gF("",null,null,null,[""],i=pF(i),0,[0],i))}function gF(i,e,t,n,o,r,s,a,l){for(var c=0,d=0,u=s,h=0,f=0,p=0,m=1,y=1,_=1,v=0,b="",C=o,w=r,S=n,x=b;y;)switch(p=v,v=Vu()){case 40:if(p!=108&&dl(x,u-1)==58){PE(x+=kr(vy(v),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:x+=vy(v);break;case 9:case 10:case 13:case 32:x+=iOe(p);break;case 92:x+=nOe(zE()-1,7);continue;case 47:switch(R1()){case 42:case 47:dy(v0t(oOe(Vu(),zE()),e,t),l);break;default:x+="/"}break;case 123*m:a[c++]=Hu(x)*_;case 125*m:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+d:_==-1&&(x=kr(x,/\f/g,"")),f>0&&Hu(x)-u&&dy(f>32?aOe(x+";",n,t,u-1):aOe(kr(x," ","")+";",n,t,u-2),l);break;case 59:x+=";";default:if(dy(S=sOe(x,e,t,c,d,o,a,b,C=[],w=[],u),r),v===123)if(d===0)gF(x,e,S,S,C,r,u,a,w);else switch(h===99&&dl(x,3)===110?100:h){case 100:case 108:case 109:case 115:gF(i,S,S,n&&dy(sOe(i,S,S,0,0,o,a,b,o,C=[],u),w),o,w,u,a,n?C:w);break;default:gF(x,S,S,S,[""],w,0,a,w)}}c=d=f=0,m=_=1,b=x="",u=s;break;case 58:u=1+Hu(x),f=p;default:if(m<1){if(v==123)--m;else if(v==125&&m++==0&&tOe()==125)continue}switch(x+=k_(v),v*m){case 38:_=d>0?1:(x+="\f",-1);break;case 44:a[c++]=(Hu(x)-1)*_,_=1;break;case 64:R1()===45&&(x+=vy(Vu())),h=R1(),d=u=Hu(b=x+=rOe(zE())),v++;break;case 45:p===45&&Hu(x)==2&&(m=0)}}return r}function sOe(i,e,t,n,o,r,s,a,l,c,d){for(var u=o-1,h=o===0?r:[""],f=cy(h),p=0,m=0,y=0;p0?h[_]+" "+v:kr(v,/&\f/g,h[_])))&&(l[y++]=b);return OE(i,e,t,o===0?ay:a,l,c,d)}function v0t(i,e,t){return OE(i,e,t,cF,k_(eOe()),e3(i,2,-2),0)}function aOe(i,e,t,n){return OE(i,e,t,ly,e3(i,0,n),e3(i,n+1,-1),n)}var cOe=P(()=>{uF();uy();Kre()});var dOe=P(()=>{});function L_(i,e){for(var t="",n=cy(i),o=0;o{uF();uy()});function fOe(i){var e=cy(i);return function(t,n,o,r){for(var s="",a=0;a{uy()});var gOe=P(()=>{uF();uy();cOe();dOe();Kre();hOe();mOe()});var Yre,vF=P(()=>{Yre=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var o=e(n);return t.set(n,o),o}}});var bOe={};Ai(bOe,{default:()=>Zre});function _Oe(i,e){switch(QPe(i,e)){case 5103:return Br+"print-"+i+i;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Br+i+i;case 5349:case 4246:case 4810:case 6968:case 2756:return Br+i+RE+i+_d+i+i;case 6828:case 4268:return Br+i+_d+i+i;case 6165:return Br+i+_d+"flex-"+i+i;case 5187:return Br+i+kr(i,/(\w+).+(:[^]+)/,Br+"box-$1$2"+_d+"flex-$1$2")+i;case 5443:return Br+i+_d+"flex-item-"+kr(i,/flex-|-self/,"")+i;case 4675:return Br+i+_d+"flex-line-pack"+kr(i,/align-content|flex-|-self/,"")+i;case 5548:return Br+i+_d+kr(i,"shrink","negative")+i;case 5292:return Br+i+_d+kr(i,"basis","preferred-size")+i;case 6060:return Br+"box-"+kr(i,"-grow","")+Br+i+_d+kr(i,"grow","positive")+i;case 4554:return Br+kr(i,/([^-])(transform)/g,"$1"+Br+"$2")+i;case 6187:return kr(kr(kr(i,/(zoom-|grab)/,Br+"$1"),/(image-set)/,Br+"$1"),i,"")+i;case 5495:case 3959:return kr(i,/(image-set\([^]*)/,Br+"$1$`$1");case 4968:return kr(kr(i,/(.+:)(flex-)?(.*)/,Br+"box-pack:$3"+_d+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Br+i+i;case 4095:case 3583:case 4068:case 2532:return kr(i,/(.+)-inline(.+)/,Br+"$1$2")+i;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Hu(i)-1-e>6)switch(dl(i,e+1)){case 109:if(dl(i,e+4)!==45)break;case 102:return kr(i,/(.+:)(.+)-([^]+)/,"$1"+Br+"$2-$3$1"+RE+(dl(i,e+3)==108?"$3":"$2-$3"))+i;case 115:return~PE(i,"stretch")?_Oe(kr(i,"stretch","fill-available"),e)+i:i}break;case 4949:if(dl(i,e+1)!==115)break;case 6444:switch(dl(i,Hu(i)-3-(~PE(i,"!important")&&10))){case 107:return kr(i,":",":"+Br)+i;case 101:return kr(i,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Br+(dl(i,14)===45?"inline-":"")+"box$3$1"+Br+"$2$3$1"+_d+"$2box$3")+i}break;case 5936:switch(dl(i,e+11)){case 114:return Br+i+_d+kr(i,/[svh]\w+-[tblr]{2}/,"tb")+i;case 108:return Br+i+_d+kr(i,/[svh]\w+-[tblr]{2}/,"tb-rl")+i;case 45:return Br+i+_d+kr(i,/[svh]\w+-[tblr]{2}/,"lr")+i}return Br+i+_d+i+i}return i}var _0t,b0t,y0t,vOe,C0t,w0t,x0t,S0t,Zre,_F=P(()=>{GPe();gOe();vF();lF();_0t=function(e,t,n){for(var o=0,r=0;o=r,r=R1(),o===38&&r===12&&(t[n]=1),!fy(r);)Vu();return gy(e,Bu)},b0t=function(e,t){var n=-1,o=44;do switch(fy(o)){case 0:o===38&&R1()===12&&(t[n]=1),e[n]+=_0t(Bu-1,t,n);break;case 2:e[n]+=vy(o);break;case 4:if(o===44){e[++n]=R1()===58?"&\f":"",t[n]=e[n].length;break}default:e[n]+=k_(o)}while(o=Vu());return e},y0t=function(e,t){return mF(b0t(pF(e),t))},vOe=new WeakMap,C0t=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!vOe.get(n))&&!o){vOe.set(e,!0);for(var r=[],s=y0t(t,r),a=n.props,l=0,c=0;l-1&&!e.return)switch(e.type){case ly:e.return=_Oe(e.value,e.length);break;case dF:return L_([my(e,{value:kr(e.value,"@","@"+Br)})],o);case ay:if(e.length)return qre(e.props,function(r){switch(jre(r,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return L_([my(e,{props:[kr(r,/:(read-\w+)/,":"+RE+"$1")]})],o);case"::placeholder":return L_([my(e,{props:[kr(r,/:(plac\w+)/,":"+Br+"input-$1")]}),my(e,{props:[kr(r,/:(plac\w+)/,":"+RE+"$1")]}),my(e,{props:[kr(r,/:(plac\w+)/,_d+"input-$1")]})],o)}return""})}},S0t=[x0t],Zre=function(e){var t=e.key;if(t==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(m){var y=m.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var o=e.stylisPlugins||S0t,r={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(m){for(var y=m.getAttribute("data-emotion").split(" "),_=1;_{"use strict";var Wc=typeof Symbol=="function"&&Symbol.for,Xre=Wc?Symbol.for("react.element"):60103,Qre=Wc?Symbol.for("react.portal"):60106,bF=Wc?Symbol.for("react.fragment"):60107,yF=Wc?Symbol.for("react.strict_mode"):60108,CF=Wc?Symbol.for("react.profiler"):60114,wF=Wc?Symbol.for("react.provider"):60109,xF=Wc?Symbol.for("react.context"):60110,Jre=Wc?Symbol.for("react.async_mode"):60111,SF=Wc?Symbol.for("react.concurrent_mode"):60111,kF=Wc?Symbol.for("react.forward_ref"):60112,LF=Wc?Symbol.for("react.suspense"):60113,k0t=Wc?Symbol.for("react.suspense_list"):60120,EF=Wc?Symbol.for("react.memo"):60115,DF=Wc?Symbol.for("react.lazy"):60116,L0t=Wc?Symbol.for("react.block"):60121,E0t=Wc?Symbol.for("react.fundamental"):60117,D0t=Wc?Symbol.for("react.responder"):60118,T0t=Wc?Symbol.for("react.scope"):60119;function Ef(i){if(typeof i=="object"&&i!==null){var e=i.$$typeof;switch(e){case Xre:switch(i=i.type,i){case Jre:case SF:case bF:case CF:case yF:case LF:return i;default:switch(i=i&&i.$$typeof,i){case xF:case kF:case DF:case EF:case wF:return i;default:return e}}case Qre:return e}}}function yOe(i){return Ef(i)===SF}bs.AsyncMode=Jre;bs.ConcurrentMode=SF;bs.ContextConsumer=xF;bs.ContextProvider=wF;bs.Element=Xre;bs.ForwardRef=kF;bs.Fragment=bF;bs.Lazy=DF;bs.Memo=EF;bs.Portal=Qre;bs.Profiler=CF;bs.StrictMode=yF;bs.Suspense=LF;bs.isAsyncMode=function(i){return yOe(i)||Ef(i)===Jre};bs.isConcurrentMode=yOe;bs.isContextConsumer=function(i){return Ef(i)===xF};bs.isContextProvider=function(i){return Ef(i)===wF};bs.isElement=function(i){return typeof i=="object"&&i!==null&&i.$$typeof===Xre};bs.isForwardRef=function(i){return Ef(i)===kF};bs.isFragment=function(i){return Ef(i)===bF};bs.isLazy=function(i){return Ef(i)===DF};bs.isMemo=function(i){return Ef(i)===EF};bs.isPortal=function(i){return Ef(i)===Qre};bs.isProfiler=function(i){return Ef(i)===CF};bs.isStrictMode=function(i){return Ef(i)===yF};bs.isSuspense=function(i){return Ef(i)===LF};bs.isValidElementType=function(i){return typeof i=="string"||typeof i=="function"||i===bF||i===SF||i===CF||i===yF||i===LF||i===k0t||typeof i=="object"&&i!==null&&(i.$$typeof===DF||i.$$typeof===EF||i.$$typeof===wF||i.$$typeof===xF||i.$$typeof===kF||i.$$typeof===E0t||i.$$typeof===D0t||i.$$typeof===T0t||i.$$typeof===L0t)};bs.typeOf=Ef});var xOe=ot((VGt,wOe)=>{"use strict";wOe.exports=COe()});var ise=ot((WGt,TOe)=>{"use strict";var ese=xOe(),I0t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},M0t={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},N0t={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},EOe={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},tse={};tse[ese.ForwardRef]=N0t;tse[ese.Memo]=EOe;function SOe(i){return ese.isMemo(i)?EOe:tse[i.$$typeof]||I0t}var A0t=Object.defineProperty,R0t=Object.getOwnPropertyNames,kOe=Object.getOwnPropertySymbols,P0t=Object.getOwnPropertyDescriptor,O0t=Object.getPrototypeOf,LOe=Object.prototype;function DOe(i,e,t){if(typeof e!="string"){if(LOe){var n=O0t(e);n&&n!==LOe&&DOe(i,n,t)}var o=R0t(e);kOe&&(o=o.concat(kOe(e)));for(var r=SOe(i),s=SOe(e),a=0;a{IOe=vt(ise()),MOe=function(i,e){return(0,IOe.default)(i,e)}});function _y(i,e,t){var n="";return t.split(" ").forEach(function(o){i[o]!==void 0?e.push(i[o]+";"):n+=o+" "}),n}var z0t,E_,D_,FE=P(()=>{z0t=!0;E_=function(e,t,n){var o=e.key+"-"+t.name;(n===!1||z0t===!1)&&e.registered[o]===void 0&&(e.registered[o]=t.styles)},D_=function(e,t,n){E_(e,t,n);var o=e.key+"-"+t.name;if(e.inserted[t.name]===void 0){var r=t;do e.insert(t===r?"."+o:"",r,e.sheet,!0),r=r.next;while(r!==void 0)}}});function AOe(i){for(var e=0,t,n=0,o=i.length;o>=4;++n,o-=4)t=i.charCodeAt(n)&255|(i.charCodeAt(++n)&255)<<8|(i.charCodeAt(++n)&255)<<16|(i.charCodeAt(++n)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,e=(t&65535)*1540483477+((t>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(i.charCodeAt(n+2)&255)<<16;case 2:e^=(i.charCodeAt(n+1)&255)<<8;case 1:e^=i.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var ROe=P(()=>{});var POe,OOe=P(()=>{POe={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}});function HE(i,e,t){if(t==null)return"";var n=t;if(n.__emotion_styles!==void 0)return n;switch(typeof t){case"boolean":return"";case"object":{var o=t;if(o.anim===1)return gg={name:o.name,styles:o.styles,next:gg},o.name;var r=t;if(r.styles!==void 0){var s=r.next;if(s!==void 0)for(;s!==void 0;)gg={name:s.name,styles:s.styles,next:gg},s=s.next;var a=r.styles+";";return a}return W0t(i,e,t)}case"function":{if(i!==void 0){var l=gg,c=t(i);return gg=l,HE(i,e,c)}break}}var d=t;if(e==null)return d;var u=e[d];return u!==void 0?u:d}function W0t(i,e,t){var n="";if(Array.isArray(t))for(var o=0;o{ROe();OOe();lF();F0t=!1,H0t=/[A-Z]|^ms/g,B0t=/_EMO_([^_]+?)_([^]*?)_EMO_/g,BOe=function(e){return e.charCodeAt(1)===45},zOe=function(e){return e!=null&&typeof e!="boolean"},nse=aF(function(i){return BOe(i)?i:i.replace(H0t,"-$&").toLowerCase()}),FOe=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(B0t,function(n,o,r){return gg={name:o,styles:r,next:gg},o})}return POe[e]!==1&&!BOe(e)&&typeof t=="number"&&t!==0?t+"px":t},V0t="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";HOe=/label:\s*([^\s;\n{]+)\s*(;|$)/g});var VE,U0t,VOe,by,ose,WE=P(()=>{VE=vt(xi()),U0t=function(e){return e()},VOe=VE.useInsertionEffect?VE.useInsertionEffect:!1,by=VOe||U0t,ose=VOe||VE.useLayoutEffect});function qOe(i){var e=i.displayName||i.name||"Component",t=function(r,s){var a=Uc.useContext(P1);return Uc.createElement(i,Fe({theme:a,ref:s},r))},n=Uc.forwardRef(t);return n.displayName="WithTheme("+e+")",MOe(n,i)}var Uc,UE,TF,sse,WOe,UOe,i3,P1,$Oe,$0t,j0t,jOe,IF,rse,GOe,q0t,G0t,KOe,ase=P(()=>{Uc=vt(xi()),UE=vt(xi());_F();In();vF();NOe();FE();BE();WE();TF=!1,sse=Uc.createContext(typeof HTMLElement<"u"?Zre({key:"css"}):null),WOe=sse.Provider,UOe=function(){return(0,UE.useContext)(sse)},i3=function(e){return(0,UE.forwardRef)(function(t,n){var o=(0,UE.useContext)(sse);return e(t,o,n)})},P1=Uc.createContext({}),$Oe=function(){return Uc.useContext(P1)},$0t=function(e,t){if(typeof t=="function"){var n=t(e);return n}return Fe({},e,t)},j0t=Yre(function(i){return Yre(function(e){return $0t(i,e)})}),jOe=function(e){var t=Uc.useContext(P1);return e.theme!==t&&(t=j0t(t)(e.theme)),Uc.createElement(P1.Provider,{value:t},e.children)};IF={}.hasOwnProperty,rse="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",GOe=function(e,t){var n={};for(var o in t)IF.call(t,o)&&(n[o]=t[o]);return n[rse]=e,n},q0t=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;return E_(t,n,o),by(function(){return D_(t,n,o)}),null},G0t=i3(function(i,e,t){var n=i.css;typeof n=="string"&&e.registered[n]!==void 0&&(n=e.registered[n]);var o=i[rse],r=[n],s="";typeof i.className=="string"?s=_y(e.registered,r,i.className):i.className!=null&&(s=i.className+" ");var a=t3(r,void 0,Uc.useContext(P1));s+=e.key+"-"+a.name;var l={};for(var c in i)IF.call(i,c)&&c!=="css"&&c!==rse&&!TF&&(l[c]=i[c]);return l.className=s,t&&(l.ref=t),Uc.createElement(Uc.Fragment,null,Uc.createElement(q0t,{cache:e,serialized:a,isStringTag:typeof o=="string"}),Uc.createElement(o,l))}),KOe=G0t});var MF={};Ai(MF,{CacheProvider:()=>WOe,ClassNames:()=>e4t,Global:()=>Y0t,ThemeContext:()=>P1,ThemeProvider:()=>jOe,__unsafe_useEmotionCache:()=>UOe,createElement:()=>K0t,css:()=>YOe,jsx:()=>K0t,keyframes:()=>Z0t,useTheme:()=>$Oe,withEmotionCache:()=>i3,withTheme:()=>qOe});function YOe(){for(var i=arguments.length,e=new Array(i),t=0;t{ase();ase();O1=vt(xi());FE();WE();BE();_F();In();vF();fKt=vt(ise()),K0t=function(e,t){var n=arguments;if(t==null||!IF.call(t,"css"))return O1.createElement.apply(void 0,n);var o=n.length,r=new Array(o);r[0]=KOe,r[1]=GOe(e,t);for(var s=2;s{In();n3=vt(xi());$re();$E();FE();BE();WE();t4t=jPe,i4t=function(e){return e!=="theme"},ZOe=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?t4t:i4t},XOe=function(e,t,n){var o;if(t){var r=t.shouldForwardProp;o=e.__emotion_forwardProp&&r?function(s){return e.__emotion_forwardProp(s)&&r(s)}:r}return typeof o!="function"&&n&&(o=e.__emotion_forwardProp),o},n4t=!1,o4t=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;return E_(t,n,o),by(function(){return D_(t,n,o)}),null},QOe=function i(e,t){var n=e.__emotion_real===e,o=n&&e.__emotion_base||e,r,s;t!==void 0&&(r=t.label,s=t.target);var a=XOe(e,t,n),l=a||ZOe(o),c=!l("as");return function(){var d=arguments,u=n&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(r!==void 0&&u.push("label:"+r+";"),d[0]==null||d[0].raw===void 0)u.push.apply(u,d);else{u.push(d[0][0]);for(var h=d.length,f=1;flse});var SKt,r4t,lse,tze=P(()=>{JOe();In();SKt=vt(xi());$re();FE();BE();WE();r4t=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],lse=QOe.bind();r4t.forEach(function(i){lse[i]=lse(i)})});var nze=ot((TKt,ize)=>{"use strict";var s4t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";ize.exports=s4t});var aze=ot((IKt,sze)=>{"use strict";var a4t=nze();function oze(){}function rze(){}rze.resetWarningCache=oze;sze.exports=function(){function i(n,o,r,s,a,l){if(l!==a4t){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}i.isRequired=i;function e(){return i}var t={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:e,element:i,elementType:i,instanceOf:e,node:i,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:rze,resetWarningCache:oze};return t.PropTypes=t,t}});var Kp=ot((AKt,lze)=>{lze.exports=aze()();var MKt,NKt});var dze=ot(NF=>{"use strict";var l4t=xi(),c4t=Symbol.for("react.element"),d4t=Symbol.for("react.fragment"),u4t=Object.prototype.hasOwnProperty,h4t=l4t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f4t={key:!0,ref:!0,__self:!0,__source:!0};function cze(i,e,t){var n,o={},r=null,s=null;t!==void 0&&(r=""+t),e.key!==void 0&&(r=""+e.key),e.ref!==void 0&&(s=e.ref);for(n in e)u4t.call(e,n)&&!f4t.hasOwnProperty(n)&&(o[n]=e[n]);if(i&&i.defaultProps)for(n in e=i.defaultProps,e)o[n]===void 0&&(o[n]=e[n]);return{$$typeof:c4t,type:i,key:r,ref:s,props:o,_owner:h4t.current}}NF.Fragment=d4t;NF.jsx=cze;NF.jsxs=cze});var zn=ot((PKt,uze)=>{"use strict";uze.exports=dze()});var pze=ot(dse=>{"use strict";"use client";var hze=di();Object.defineProperty(dse,"__esModule",{value:!0});dse.default=_4t;var OKt=v4t(xi()),zKt=hze(Kp()),p4t=($E(),BL(MF)),m4t=hze((_F(),BL(bOe))),g4t=zn();function fze(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(fze=function(n){return n?t:e})(i)}function v4t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=fze(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var cse;typeof document=="object"&&(cse=(0,m4t.default)({key:"css",prepend:!0}));function _4t(i){let{injectFirst:e,children:t}=i;return e&&cse?(0,g4t.jsx)(p4t.CacheProvider,{value:cse,children:t}):t}});var mze=ot(use=>{"use strict";"use client";var b4t=di();Object.defineProperty(use,"__esModule",{value:!0});Object.defineProperty(use,"default",{enumerable:!0,get:function(){return y4t.default}});var y4t=b4t(pze())});var vze=ot(hse=>{"use strict";"use client";var C4t=di();Object.defineProperty(hse,"__esModule",{value:!0});hse.default=L4t;var BKt=S4t(xi()),VKt=C4t(Kp()),w4t=($E(),BL(MF)),x4t=zn();function gze(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(gze=function(n){return n?t:e})(i)}function S4t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=gze(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function k4t(i){return i==null||Object.keys(i).length===0}function L4t(i){let{styles:e,defaultTheme:t={}}=i,n=typeof e=="function"?o=>e(k4t(o)?t:o):e;return(0,x4t.jsx)(w4t.Global,{styles:n})}});var _ze=ot(fse=>{"use strict";"use client";var E4t=di();Object.defineProperty(fse,"__esModule",{value:!0});Object.defineProperty(fse,"default",{enumerable:!0,get:function(){return D4t.default}});var D4t=E4t(vze())});var x0=ot(vg=>{"use strict";"use client";var pse=di();Object.defineProperty(vg,"__esModule",{value:!0});Object.defineProperty(vg,"GlobalStyles",{enumerable:!0,get:function(){return M4t.default}});Object.defineProperty(vg,"StyledEngineProvider",{enumerable:!0,get:function(){return I4t.default}});Object.defineProperty(vg,"ThemeContext",{enumerable:!0,get:function(){return mse.ThemeContext}});Object.defineProperty(vg,"css",{enumerable:!0,get:function(){return mse.css}});vg.default=N4t;vg.internal_processStyles=void 0;Object.defineProperty(vg,"keyframes",{enumerable:!0,get:function(){return mse.keyframes}});var T4t=pse((tze(),BL(eze))),mse=($E(),BL(MF)),I4t=pse(mze()),M4t=pse(_ze());function N4t(i,e){return(0,T4t.default)(i,e)}var A4t=(i,e)=>{Array.isArray(i.__emotion_styles)&&(i.__emotion_styles=e(i.__emotion_styles))};vg.internal_processStyles=A4t});var ul=ot((qKt,S0)=>{function gse(){return S0.exports=gse=Object.assign?Object.assign.bind():function(i){for(var e=1;e{"use strict";var R4t=di();Object.defineProperty(AF,"__esModule",{value:!0});AF.default=yze;AF.isPlainObject=T_;var P4t=R4t(ul());function T_(i){if(typeof i!="object"||i===null)return!1;let e=Object.getPrototypeOf(i);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)}function bze(i){if(!T_(i))return i;let e={};return Object.keys(i).forEach(t=>{e[t]=bze(i[t])}),e}function yze(i,e,t={clone:!0}){let n=t.clone?(0,P4t.default)({},i):i;return T_(i)&&T_(e)&&Object.keys(e).forEach(o=>{T_(e[o])&&Object.prototype.hasOwnProperty.call(i,o)&&T_(i[o])?n[o]=yze(i[o],e[o],t):t.clone?n[o]=T_(e[o])?bze(e[o]):e[o]:n[o]=e[o]}),n}});var Xd=ot(yy=>{"use strict";Object.defineProperty(yy,"__esModule",{value:!0});var O4t={};Object.defineProperty(yy,"default",{enumerable:!0,get:function(){return RF.default}});var RF=z4t(Cze());Object.keys(RF).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(O4t,i)||i in yy&&yy[i]===RF[i]||Object.defineProperty(yy,i,{enumerable:!0,get:function(){return RF[i]}})});function wze(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(wze=function(n){return n?t:e})(i)}function z4t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=wze(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var Dze=ot(vse=>{"use strict";var W4t=di();Object.defineProperty(vse,"__esModule",{value:!0});vse.default=$4t;var U4t=W4t(J6());function $4t(i){if(typeof i!="string")throw new Error((0,U4t.default)(7));return i.charAt(0).toUpperCase()+i.slice(1)}});var r3=ot(_se=>{"use strict";var j4t=di();Object.defineProperty(_se,"__esModule",{value:!0});Object.defineProperty(_se,"default",{enumerable:!0,get:function(){return q4t.default}});var q4t=j4t(Dze())});var Wze=ot(HF=>{"use strict";Object.defineProperty(HF,"__esModule",{value:!0});HF.default=void 0;var Vze=i=>i,W6t=()=>{let i=Vze;return{configure(e){i=e},generate(e){return i(e)},reset(){i=Vze}}},U6t=W6t(),LZt=HF.default=U6t});var Ese=ot(Lse=>{"use strict";var $6t=di();Object.defineProperty(Lse,"__esModule",{value:!0});Object.defineProperty(Lse,"default",{enumerable:!0,get:function(){return j6t.default}});var j6t=$6t(Wze())});var Kze=ot(ky=>{"use strict";var K6t=di();Object.defineProperty(ky,"__esModule",{value:!0});ky.default=Z6t;ky.globalStateClasses=void 0;ky.isGlobalState=X6t;var Y6t=K6t(Ese()),Gze=ky.globalStateClasses={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Z6t(i,e,t="Mui"){let n=Gze[e];return n?`${t}-${n}`:`${Y6t.default.generate(i)}-${e}`}function X6t(i){return Gze[i]!==void 0}});var Ey=ot(Ly=>{"use strict";Object.defineProperty(Ly,"__esModule",{value:!0});var Q6t={};Object.defineProperty(Ly,"default",{enumerable:!0,get:function(){return VF.default}});var VF=J6t(Kze());Object.keys(VF).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(Q6t,i)||i in Ly&&Ly[i]===VF[i]||Object.defineProperty(Ly,i,{enumerable:!0,get:function(){return VF[i]}})});function Yze(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(Yze=function(n){return n?t:e})(i)}function J6t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=Yze(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var Zze=ot(Dse=>{"use strict";var e3t=di();Object.defineProperty(Dse,"__esModule",{value:!0});Dse.default=i3t;var t3t=e3t(Ey());function i3t(i,e,t="Mui"){let n={};return e.forEach(o=>{n[o]=(0,t3t.default)(i,o,t)}),n}});var Ise=ot(Tse=>{"use strict";var n3t=di();Object.defineProperty(Tse,"__esModule",{value:!0});Object.defineProperty(Tse,"default",{enumerable:!0,get:function(){return o3t.default}});var o3t=n3t(Zze())});var Qze=ot(ys=>{"use strict";var Mse=Symbol.for("react.element"),Nse=Symbol.for("react.portal"),WF=Symbol.for("react.fragment"),UF=Symbol.for("react.strict_mode"),$F=Symbol.for("react.profiler"),jF=Symbol.for("react.provider"),qF=Symbol.for("react.context"),r3t=Symbol.for("react.server_context"),GF=Symbol.for("react.forward_ref"),KF=Symbol.for("react.suspense"),YF=Symbol.for("react.suspense_list"),ZF=Symbol.for("react.memo"),XF=Symbol.for("react.lazy"),s3t=Symbol.for("react.offscreen"),Xze;Xze=Symbol.for("react.module.reference");function F1(i){if(typeof i=="object"&&i!==null){var e=i.$$typeof;switch(e){case Mse:switch(i=i.type,i){case WF:case $F:case UF:case KF:case YF:return i;default:switch(i=i&&i.$$typeof,i){case r3t:case qF:case GF:case XF:case ZF:case jF:return i;default:return e}}case Nse:return e}}}ys.ContextConsumer=qF;ys.ContextProvider=jF;ys.Element=Mse;ys.ForwardRef=GF;ys.Fragment=WF;ys.Lazy=XF;ys.Memo=ZF;ys.Portal=Nse;ys.Profiler=$F;ys.StrictMode=UF;ys.Suspense=KF;ys.SuspenseList=YF;ys.isAsyncMode=function(){return!1};ys.isConcurrentMode=function(){return!1};ys.isContextConsumer=function(i){return F1(i)===qF};ys.isContextProvider=function(i){return F1(i)===jF};ys.isElement=function(i){return typeof i=="object"&&i!==null&&i.$$typeof===Mse};ys.isForwardRef=function(i){return F1(i)===GF};ys.isFragment=function(i){return F1(i)===WF};ys.isLazy=function(i){return F1(i)===XF};ys.isMemo=function(i){return F1(i)===ZF};ys.isPortal=function(i){return F1(i)===Nse};ys.isProfiler=function(i){return F1(i)===$F};ys.isStrictMode=function(i){return F1(i)===UF};ys.isSuspense=function(i){return F1(i)===KF};ys.isSuspenseList=function(i){return F1(i)===YF};ys.isValidElementType=function(i){return typeof i=="string"||typeof i=="function"||i===WF||i===$F||i===UF||i===KF||i===YF||i===s3t||typeof i=="object"&&i!==null&&(i.$$typeof===XF||i.$$typeof===ZF||i.$$typeof===jF||i.$$typeof===qF||i.$$typeof===GF||i.$$typeof===Xze||i.getModuleId!==void 0)};ys.typeOf=F1});var eFe=ot((VZt,Jze)=>{"use strict";Jze.exports=Qze()});var rFe=ot(QF=>{"use strict";Object.defineProperty(QF,"__esModule",{value:!0});QF.default=l3t;QF.getFunctionName=nFe;var tFe=eFe(),a3t=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function nFe(i){let e=`${i}`.match(a3t);return e&&e[1]||""}function oFe(i,e=""){return i.displayName||i.name||nFe(i)||e}function iFe(i,e,t){let n=oFe(e);return i.displayName||(n!==""?`${t}(${n})`:t)}function l3t(i){if(i!=null){if(typeof i=="string")return i;if(typeof i=="function")return oFe(i,"Component");if(typeof i=="object")switch(i.$$typeof){case tFe.ForwardRef:return iFe(i,i.render,"ForwardRef");case tFe.Memo:return iFe(i,i.type,"memo");default:return}}}});var Ase=ot(Dy=>{"use strict";Object.defineProperty(Dy,"__esModule",{value:!0});var c3t={};Object.defineProperty(Dy,"default",{enumerable:!0,get:function(){return JF.default}});var JF=d3t(rFe());Object.keys(JF).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(c3t,i)||i in Dy&&Dy[i]===JF[i]||Object.defineProperty(Dy,i,{enumerable:!0,get:function(){return JF[i]}})});function sFe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(sFe=function(n){return n?t:e})(i)}function d3t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=sFe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var cFe=ot(Ose=>{"use strict";var b3t=di();Object.defineProperty(Ose,"__esModule",{value:!0});Ose.default=lFe;var Pse=b3t(ul());function lFe(i,e){let t=(0,Pse.default)({},e);return Object.keys(i).forEach(n=>{if(n.toString().match(/^(components|slots)$/))t[n]=(0,Pse.default)({},i[n],t[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){let o=i[n]||{},r=e[n];t[n]={},!r||!Object.keys(r)?t[n]=o:!o||!Object.keys(o)?t[n]=r:(t[n]=(0,Pse.default)({},r),Object.keys(o).forEach(s=>{t[n][s]=lFe(o[s],r[s])}))}else t[n]===void 0&&(t[n]=i[n])}),t}});var oH=ot(zse=>{"use strict";var y3t=di();Object.defineProperty(zse,"__esModule",{value:!0});Object.defineProperty(zse,"default",{enumerable:!0,get:function(){return C3t.default}});var C3t=y3t(cFe())});var fFe=ot(sH=>{"use strict";"use client";Object.defineProperty(sH,"__esModule",{value:!0});sH.default=void 0;var uFe=w3t(xi());function hFe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(hFe=function(n){return n?t:e})(i)}function w3t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=hFe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var x3t=typeof window<"u"?uFe.useLayoutEffect:uFe.useEffect,nXt=sH.default=x3t});var aH=ot(Fse=>{"use strict";var S3t=di();Object.defineProperty(Fse,"__esModule",{value:!0});Object.defineProperty(Fse,"default",{enumerable:!0,get:function(){return k3t.default}});var k3t=S3t(fFe())});var pFe=ot(lH=>{"use strict";Object.defineProperty(lH,"__esModule",{value:!0});lH.default=void 0;function L3t(i,e=Number.MIN_SAFE_INTEGER,t=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(i,t))}var sXt=lH.default=L3t});var Bse=ot(Hse=>{"use strict";var E3t=di();Object.defineProperty(Hse,"__esModule",{value:!0});Object.defineProperty(Hse,"default",{enumerable:!0,get:function(){return D3t.default}});var D3t=E3t(pFe())});var gFe=ot(Wse=>{"use strict";Object.defineProperty(Wse,"__esModule",{value:!0});Wse.default=I3t;function I3t(i,e){return()=>null}});var cH=ot(Use=>{"use strict";var M3t=di();Object.defineProperty(Use,"__esModule",{value:!0});Object.defineProperty(Use,"default",{enumerable:!0,get:function(){return N3t.default}});var N3t=M3t(gFe())});var wFe=ot(dH=>{"use strict";var vFe=di();Object.defineProperty(dH,"__esModule",{value:!0});dH.default=void 0;var _Fe=vFe(Kp()),bFe=vFe(cH());function A3t(i){let{prototype:e={}}=i;return!!e.isReactComponent}function yFe(i,e,t,n,o){let r=i[e],s=o||e;if(r==null||typeof window>"u")return null;let a,l=r.type;return typeof l=="function"&&!A3t(l)&&(a="Did you accidentally use a plain function component for an element instead?"),a!==void 0?new Error(`Invalid ${n} \`${s}\` supplied to \`${t}\`. Expected an element that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}var CFe=(0,bFe.default)(_Fe.default.element,yFe);CFe.isRequired=(0,bFe.default)(_Fe.default.element.isRequired,yFe);var hXt=dH.default=CFe});var xFe=ot($se=>{"use strict";var R3t=di();Object.defineProperty($se,"__esModule",{value:!0});Object.defineProperty($se,"default",{enumerable:!0,get:function(){return P3t.default}});var P3t=R3t(wFe())});var kFe=ot(uH=>{"use strict";var SFe=di();Object.defineProperty(uH,"__esModule",{value:!0});uH.default=void 0;var O3t=SFe(Kp()),z3t=SFe(cH());function F3t(i){let{prototype:e={}}=i;return!!e.isReactComponent}function H3t(i,e,t,n,o){let r=i[e],s=o||e;if(r==null||typeof window>"u")return null;let a;return typeof r=="function"&&!F3t(r)&&(a="Did you accidentally provide a plain function component instead?"),a!==void 0?new Error(`Invalid ${n} \`${s}\` supplied to \`${t}\`. Expected an element type that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}var mXt=uH.default=(0,z3t.default)(O3t.default.elementType,H3t)});var LFe=ot(jse=>{"use strict";var B3t=di();Object.defineProperty(jse,"__esModule",{value:!0});Object.defineProperty(jse,"default",{enumerable:!0,get:function(){return V3t.default}});var V3t=B3t(kFe())});var EFe=ot(qse=>{"use strict";var W3t=di();Object.defineProperty(qse,"__esModule",{value:!0});qse.default=j3t;var U3t=W3t(ul()),$3t="exact-prop: \u200B";function j3t(i){return i}});var DFe=ot(Gse=>{"use strict";var q3t=di();Object.defineProperty(Gse,"__esModule",{value:!0});Object.defineProperty(Gse,"default",{enumerable:!0,get:function(){return G3t.default}});var G3t=q3t(EFe())});var TFe=ot(Kse=>{"use strict";Object.defineProperty(Kse,"__esModule",{value:!0});Kse.default=K3t;function K3t(i,e,t,n,o){return null}});var IFe=ot(Yse=>{"use strict";var Y3t=di();Object.defineProperty(Yse,"__esModule",{value:!0});Object.defineProperty(Yse,"default",{enumerable:!0,get:function(){return Z3t.default}});var Z3t=Y3t(TFe())});var MFe=ot(hH=>{"use strict";Object.defineProperty(hH,"__esModule",{value:!0});hH.default=void 0;var wXt=hH.default=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")()});var NFe=ot(Zse=>{"use strict";var X3t=di();Object.defineProperty(Zse,"__esModule",{value:!0});Object.defineProperty(Zse,"default",{enumerable:!0,get:function(){return Q3t.default}});var Q3t=X3t(MFe())});var AFe=ot(fH=>{"use strict";var J3t=di();Object.defineProperty(fH,"__esModule",{value:!0});fH.default=void 0;var Xse=J3t(Kp()),evt=Xse.default.oneOfType([Xse.default.func,Xse.default.object]),kXt=fH.default=evt});var RFe=ot(Qse=>{"use strict";var tvt=di();Object.defineProperty(Qse,"__esModule",{value:!0});Object.defineProperty(Qse,"default",{enumerable:!0,get:function(){return ivt.default}});var ivt=tvt(AFe())});var PFe=ot(Jse=>{"use strict";Object.defineProperty(Jse,"__esModule",{value:!0});Jse.default=nvt;function nvt(...i){return i.reduce((e,t)=>t==null?e:function(...o){e.apply(this,o),t.apply(this,o)},()=>{})}});var tae=ot(eae=>{"use strict";var ovt=di();Object.defineProperty(eae,"__esModule",{value:!0});Object.defineProperty(eae,"default",{enumerable:!0,get:function(){return rvt.default}});var rvt=ovt(PFe())});var OFe=ot(iae=>{"use strict";Object.defineProperty(iae,"__esModule",{value:!0});iae.default=svt;function svt(i,e=166){let t;function n(...o){let r=()=>{i.apply(this,o)};clearTimeout(t),t=setTimeout(r,e)}return n.clear=()=>{clearTimeout(t)},n}});var nae=ot(Ty=>{"use strict";Object.defineProperty(Ty,"__esModule",{value:!0});var avt={};Object.defineProperty(Ty,"default",{enumerable:!0,get:function(){return pH.default}});var pH=lvt(OFe());Object.keys(pH).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(avt,i)||i in Ty&&Ty[i]===pH[i]||Object.defineProperty(Ty,i,{enumerable:!0,get:function(){return pH[i]}})});function zFe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(zFe=function(n){return n?t:e})(i)}function lvt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=zFe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var FFe=ot(oae=>{"use strict";Object.defineProperty(oae,"__esModule",{value:!0});oae.default=cvt;function cvt(i,e){return()=>null}});var sae=ot(rae=>{"use strict";var dvt=di();Object.defineProperty(rae,"__esModule",{value:!0});Object.defineProperty(rae,"default",{enumerable:!0,get:function(){return uvt.default}});var uvt=dvt(FFe())});var BFe=ot(aae=>{"use strict";Object.defineProperty(aae,"__esModule",{value:!0});aae.default=pvt;var hvt=fvt(xi());function HFe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(HFe=function(n){return n?t:e})(i)}function fvt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=HFe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function pvt(i,e){var t,n;return hvt.isValidElement(i)&&e.indexOf((t=i.type.muiName)!=null?t:(n=i.type)==null||(n=n._payload)==null||(n=n.value)==null?void 0:n.muiName)!==-1}});var cae=ot(lae=>{"use strict";var mvt=di();Object.defineProperty(lae,"__esModule",{value:!0});Object.defineProperty(lae,"default",{enumerable:!0,get:function(){return gvt.default}});var gvt=mvt(BFe())});var VFe=ot(dae=>{"use strict";Object.defineProperty(dae,"__esModule",{value:!0});dae.default=vvt;function vvt(i){return i&&i.ownerDocument||document}});var mH=ot(uae=>{"use strict";var _vt=di();Object.defineProperty(uae,"__esModule",{value:!0});Object.defineProperty(uae,"default",{enumerable:!0,get:function(){return bvt.default}});var bvt=_vt(VFe())});var WFe=ot(hae=>{"use strict";var yvt=di();Object.defineProperty(hae,"__esModule",{value:!0});hae.default=wvt;var Cvt=yvt(mH());function wvt(i){return(0,Cvt.default)(i).defaultView||window}});var pae=ot(fae=>{"use strict";var xvt=di();Object.defineProperty(fae,"__esModule",{value:!0});Object.defineProperty(fae,"default",{enumerable:!0,get:function(){return Svt.default}});var Svt=xvt(WFe())});var UFe=ot(mae=>{"use strict";var kvt=di();Object.defineProperty(mae,"__esModule",{value:!0});mae.default=Evt;var Lvt=kvt(ul());function Evt(i,e){return()=>null}});var vae=ot(gae=>{"use strict";var Dvt=di();Object.defineProperty(gae,"__esModule",{value:!0});Object.defineProperty(gae,"default",{enumerable:!0,get:function(){return Tvt.default}});var Tvt=Dvt(UFe())});var $Fe=ot(_ae=>{"use strict";Object.defineProperty(_ae,"__esModule",{value:!0});_ae.default=Ivt;function Ivt(i,e){typeof i=="function"?i(e):i&&(i.current=e)}});var gH=ot(bae=>{"use strict";var Mvt=di();Object.defineProperty(bae,"__esModule",{value:!0});Object.defineProperty(bae,"default",{enumerable:!0,get:function(){return Nvt.default}});var Nvt=Mvt($Fe())});var KFe=ot(Cae=>{"use strict";"use client";Object.defineProperty(Cae,"__esModule",{value:!0});Cae.default=Pvt;var yae=Avt(xi());function GFe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(GFe=function(n){return n?t:e})(i)}function Avt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=GFe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var jFe=0;function Rvt(i){let[e,t]=yae.useState(i),n=i||e;return yae.useEffect(()=>{e==null&&(jFe+=1,t(`mui-${jFe}`))},[e]),n}var qFe=yae.useId;function Pvt(i){if(qFe!==void 0){let e=qFe();return i??e}return Rvt(i)}});var xae=ot(wae=>{"use strict";var Ovt=di();Object.defineProperty(wae,"__esModule",{value:!0});Object.defineProperty(wae,"default",{enumerable:!0,get:function(){return zvt.default}});var zvt=Ovt(KFe())});var YFe=ot(Sae=>{"use strict";Object.defineProperty(Sae,"__esModule",{value:!0});Sae.default=Fvt;function Fvt(i,e,t,n,o){return null}});var Lae=ot(kae=>{"use strict";var Hvt=di();Object.defineProperty(kae,"__esModule",{value:!0});Object.defineProperty(kae,"default",{enumerable:!0,get:function(){return Bvt.default}});var Bvt=Hvt(YFe())});var XFe=ot(Dae=>{"use strict";"use client";Object.defineProperty(Dae,"__esModule",{value:!0});Dae.default=Wvt;var Eae=Vvt(xi());function ZFe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(ZFe=function(n){return n?t:e})(i)}function Vvt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=ZFe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function Wvt({controlled:i,default:e,name:t,state:n="value"}){let{current:o}=Eae.useRef(i!==void 0),[r,s]=Eae.useState(e),a=o?i:r,l=Eae.useCallback(c=>{o||s(c)},[]);return[a,l]}});var Iae=ot(Tae=>{"use strict";var Uvt=di();Object.defineProperty(Tae,"__esModule",{value:!0});Object.defineProperty(Tae,"default",{enumerable:!0,get:function(){return $vt.default}});var $vt=Uvt(XFe())});var eHe=ot(vH=>{"use strict";"use client";var jvt=di();Object.defineProperty(vH,"__esModule",{value:!0});vH.default=void 0;var QFe=Gvt(xi()),qvt=jvt(aH());function JFe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(JFe=function(n){return n?t:e})(i)}function Gvt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=JFe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function Kvt(i){let e=QFe.useRef(i);return(0,qvt.default)(()=>{e.current=i}),QFe.useRef((...t)=>(0,e.current)(...t)).current}var ZXt=vH.default=Kvt});var Nae=ot(Mae=>{"use strict";var Yvt=di();Object.defineProperty(Mae,"__esModule",{value:!0});Object.defineProperty(Mae,"default",{enumerable:!0,get:function(){return Zvt.default}});var Zvt=Yvt(eHe())});var iHe=ot(Aae=>{"use strict";"use client";var Xvt=di();Object.defineProperty(Aae,"__esModule",{value:!0});Aae.default=t8t;var Qvt=e8t(xi()),Jvt=Xvt(gH());function tHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(tHe=function(n){return n?t:e})(i)}function e8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=tHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function t8t(...i){return Qvt.useMemo(()=>i.every(e=>e==null)?null:e=>{i.forEach(t=>{(0,Jvt.default)(t,e)})},i)}});var _H=ot(Rae=>{"use strict";var i8t=di();Object.defineProperty(Rae,"__esModule",{value:!0});Object.defineProperty(Rae,"default",{enumerable:!0,get:function(){return n8t.default}});var n8t=i8t(iHe())});var Oae=ot(Pae=>{"use strict";"use client";Object.defineProperty(Pae,"__esModule",{value:!0});Pae.default=s8t;var o8t=r8t(xi());function oHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(oHe=function(n){return n?t:e})(i)}function r8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=oHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var nHe={};function s8t(i,e){let t=o8t.useRef(nHe);return t.current===nHe&&(t.current=i(e)),t}});var rHe=ot(zae=>{"use strict";var a8t=di();Object.defineProperty(zae,"__esModule",{value:!0});Object.defineProperty(zae,"default",{enumerable:!0,get:function(){return l8t.default}});var l8t=a8t(Oae())});var Hae=ot(Fae=>{"use strict";"use client";Object.defineProperty(Fae,"__esModule",{value:!0});Fae.default=h8t;var c8t=d8t(xi());function sHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(sHe=function(n){return n?t:e})(i)}function d8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=sHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var u8t=[];function h8t(i){c8t.useEffect(i,u8t)}});var Bae=ot(XE=>{"use strict";"use client";var aHe=di();Object.defineProperty(XE,"__esModule",{value:!0});XE.Timeout=void 0;XE.default=m8t;var f8t=aHe(Oae()),p8t=aHe(Hae()),bH=class i{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new i}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}};XE.Timeout=bH;function m8t(){let i=(0,f8t.default)(bH.create).current;return(0,p8t.default)(i.disposeEffect),i}});var dHe=ot(yH=>{"use strict";Object.defineProperty(yH,"__esModule",{value:!0});Object.defineProperty(yH,"Timeout",{enumerable:!0,get:function(){return lHe.Timeout}});Object.defineProperty(yH,"default",{enumerable:!0,get:function(){return lHe.default}});var lHe=g8t(Bae());function cHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(cHe=function(n){return n?t:e})(i)}function g8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=cHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var uHe=ot(Vae=>{"use strict";var v8t=di();Object.defineProperty(Vae,"__esModule",{value:!0});Object.defineProperty(Vae,"default",{enumerable:!0,get:function(){return _8t.default}});var _8t=v8t(Hae())});var gHe=ot(wH=>{"use strict";"use client";Object.defineProperty(wH,"__esModule",{value:!0});wH.default=E8t;wH.teardown=k8t;var hHe=y8t(xi()),b8t=Bae();function fHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(fHe=function(n){return n?t:e})(i)}function y8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=fHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var CH=!0,Wae=!1,C8t=new b8t.Timeout,w8t={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function x8t(i){let{type:e,tagName:t}=i;return!!(t==="INPUT"&&w8t[e]&&!i.readOnly||t==="TEXTAREA"&&!i.readOnly||i.isContentEditable)}function pHe(i){i.metaKey||i.altKey||i.ctrlKey||(CH=!0)}function Iy(){CH=!1}function mHe(){this.visibilityState==="hidden"&&Wae&&(CH=!0)}function S8t(i){i.addEventListener("keydown",pHe,!0),i.addEventListener("mousedown",Iy,!0),i.addEventListener("pointerdown",Iy,!0),i.addEventListener("touchstart",Iy,!0),i.addEventListener("visibilitychange",mHe,!0)}function k8t(i){i.removeEventListener("keydown",pHe,!0),i.removeEventListener("mousedown",Iy,!0),i.removeEventListener("pointerdown",Iy,!0),i.removeEventListener("touchstart",Iy,!0),i.removeEventListener("visibilitychange",mHe,!0)}function L8t(i){let{target:e}=i;try{return e.matches(":focus-visible")}catch{}return CH||x8t(e)}function E8t(){let i=hHe.useCallback(o=>{o!=null&&S8t(o.ownerDocument)},[]),e=hHe.useRef(!1);function t(){return e.current?(Wae=!0,C8t.start(100,()=>{Wae=!1}),e.current=!1,!0):!1}function n(o){return L8t(o)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:n,onBlur:t,ref:i}}});var Uae=ot(My=>{"use strict";Object.defineProperty(My,"__esModule",{value:!0});var D8t={};Object.defineProperty(My,"default",{enumerable:!0,get:function(){return xH.default}});var xH=T8t(gHe());Object.keys(xH).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(D8t,i)||i in My&&My[i]===xH[i]||Object.defineProperty(My,i,{enumerable:!0,get:function(){return xH[i]}})});function vHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(vHe=function(n){return n?t:e})(i)}function T8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=vHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var _He=ot($ae=>{"use strict";Object.defineProperty($ae,"__esModule",{value:!0});$ae.default=I8t;function I8t(i){let e=i.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}});var bHe=ot(jae=>{"use strict";var M8t=di();Object.defineProperty(jae,"__esModule",{value:!0});Object.defineProperty(jae,"default",{enumerable:!0,get:function(){return N8t.default}});var N8t=M8t(_He())});var CHe=ot(SH=>{"use strict";Object.defineProperty(SH,"__esModule",{value:!0});SH.detectScrollType=yHe;SH.getNormalizedScrollLeft=A8t;var Ny;function yHe(){if(Ny)return Ny;let i=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",i.appendChild(e),i.dir="rtl",i.style.fontSize="14px",i.style.width="4px",i.style.height="1px",i.style.position="absolute",i.style.top="-1000px",i.style.overflow="scroll",document.body.appendChild(i),Ny="reverse",i.scrollLeft>0?Ny="default":(i.scrollLeft=1,i.scrollLeft===0&&(Ny="negative")),document.body.removeChild(i),Ny}function A8t(i,e){let t=i.scrollLeft;if(e!=="rtl")return t;switch(yHe()){case"negative":return i.scrollWidth-i.clientWidth+t;case"reverse":return i.scrollWidth-i.clientWidth-t;default:return t}}});var wHe=ot(QE=>{"use strict";Object.defineProperty(QE,"__esModule",{value:!0});var qae=CHe();Object.keys(qae).forEach(function(i){i==="default"||i==="__esModule"||i in QE&&QE[i]===qae[i]||Object.defineProperty(QE,i,{enumerable:!0,get:function(){return qae[i]}})})});var kHe=ot(kH=>{"use strict";"use client";Object.defineProperty(kH,"__esModule",{value:!0});kH.default=void 0;var xHe=R8t(xi());function SHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(SHe=function(n){return n?t:e})(i)}function R8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=SHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var P8t=i=>{let e=xHe.useRef({});return xHe.useEffect(()=>{e.current=i}),e.current},fQt=kH.default=P8t});var LHe=ot(Gae=>{"use strict";var O8t=di();Object.defineProperty(Gae,"__esModule",{value:!0});Object.defineProperty(Gae,"default",{enumerable:!0,get:function(){return z8t.default}});var z8t=O8t(kHe())});var THe=ot(Kae=>{"use strict";Object.defineProperty(Kae,"__esModule",{value:!0});Kae.default=H8t;var EHe=F8t(xi());function DHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(DHe=function(n){return n?t:e})(i)}function F8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=DHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function H8t(i){return EHe.Children.toArray(i).filter(e=>EHe.isValidElement(e))}});var IHe=ot(Yae=>{"use strict";var B8t=di();Object.defineProperty(Yae,"__esModule",{value:!0});Object.defineProperty(Yae,"default",{enumerable:!0,get:function(){return V8t.default}});var V8t=B8t(THe())});var MHe=ot(LH=>{"use strict";Object.defineProperty(LH,"__esModule",{value:!0});LH.default=void 0;var W8t={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},_Qt=LH.default=W8t});var NHe=ot(Zae=>{"use strict";var U8t=di();Object.defineProperty(Zae,"__esModule",{value:!0});Object.defineProperty(Zae,"default",{enumerable:!0,get:function(){return $8t.default}});var $8t=U8t(MHe())});var PHe=ot(JE=>{"use strict";Object.defineProperty(JE,"__esModule",{value:!0});JE.default=void 0;JE.getTypeByValue=AHe;function AHe(i){let e=typeof i;switch(e){case"number":return Number.isNaN(i)?"NaN":Number.isFinite(i)?i!==Math.floor(i)?"float":"number":"Infinity";case"object":return i===null?"null":i.constructor.name;default:return e}}function j8t(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i}var q8t=Number.isInteger||j8t;function RHe(i,e,t,n){let o=i[e];if(o==null||!q8t(o)){let r=AHe(o);return new RangeError(`Invalid ${n} \`${e}\` of type \`${r}\` supplied to \`${t}\`, expected \`integer\`.`)}return null}function G8t(i,e,...t){return i[e]===void 0?null:RHe(i,e,...t)}function Xae(){return null}G8t.isRequired=RHe;Xae.isRequired=Xae;var CQt=JE.default=Xae});var zHe=ot(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});var K8t={};Object.defineProperty(Ay,"default",{enumerable:!0,get:function(){return EH.default}});var EH=Y8t(PHe());Object.keys(EH).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(K8t,i)||i in Ay&&Ay[i]===EH[i]||Object.defineProperty(Ay,i,{enumerable:!0,get:function(){return EH[i]}})});function OHe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(OHe=function(n){return n?t:e})(i)}function Y8t(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=OHe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var FHe=ot(Qae=>{"use strict";Object.defineProperty(Qae,"__esModule",{value:!0});Qae.default=Z8t;function Z8t(i,e,t=void 0){let n={};return Object.keys(i).forEach(o=>{n[o]=i[o].reduce((r,s)=>{if(s){let a=e(s);a!==""&&r.push(a),t&&t[s]&&r.push(t[s])}return r},[]).join(" ")}),n}});var ele=ot(Jae=>{"use strict";var X8t=di();Object.defineProperty(Jae,"__esModule",{value:!0});Object.defineProperty(Jae,"default",{enumerable:!0,get:function(){return Q8t.default}});var Q8t=X8t(FHe())});var Yp=ot((LQt,eD)=>{function J8t(i,e){if(i==null)return{};var t={};for(var n in i)if({}.hasOwnProperty.call(i,n)){if(e.includes(n))continue;t[n]=i[n]}return t}eD.exports=J8t,eD.exports.__esModule=!0,eD.exports.default=eD.exports});var HHe=ot(DH=>{"use strict";Object.defineProperty(DH,"__esModule",{value:!0});DH.default=void 0;function e_t(i){return typeof i=="string"}var EQt=DH.default=e_t});var BHe=ot(tle=>{"use strict";var t_t=di();Object.defineProperty(tle,"__esModule",{value:!0});Object.defineProperty(tle,"default",{enumerable:!0,get:function(){return i_t.default}});var i_t=t_t(HHe())});var UHe=ot(TH=>{"use strict";var WHe=di();Object.defineProperty(TH,"__esModule",{value:!0});TH.default=void 0;var VHe=WHe(ul()),n_t=WHe(BHe());function o_t(i,e,t){return i===void 0||(0,n_t.default)(i)?e:(0,VHe.default)({},e,{ownerState:(0,VHe.default)({},e.ownerState,t)})}var IQt=TH.default=o_t});var $He=ot(ile=>{"use strict";var r_t=di();Object.defineProperty(ile,"__esModule",{value:!0});Object.defineProperty(ile,"default",{enumerable:!0,get:function(){return s_t.default}});var s_t=r_t(UHe())});var ole=ot((AQt,nle)=>{function qHe(i){var e,t,n="";if(typeof i=="string"||typeof i=="number")n+=i;else if(typeof i=="object")if(Array.isArray(i)){var o=i.length;for(e=0;e{"use strict";Object.defineProperty(IH,"__esModule",{value:!0});IH.default=void 0;function a_t(i,e=[]){if(i===void 0)return{};let t={};return Object.keys(i).filter(n=>n.match(/^on[A-Z]/)&&typeof i[n]=="function"&&!e.includes(n)).forEach(n=>{t[n]=i[n]}),t}var RQt=IH.default=a_t});var sle=ot(rle=>{"use strict";var l_t=di();Object.defineProperty(rle,"__esModule",{value:!0});Object.defineProperty(rle,"default",{enumerable:!0,get:function(){return c_t.default}});var c_t=l_t(GHe())});var KHe=ot(MH=>{"use strict";Object.defineProperty(MH,"__esModule",{value:!0});MH.default=void 0;function d_t(i){if(i===void 0)return{};let e={};return Object.keys(i).filter(t=>!(t.match(/^on[A-Z]/)&&typeof i[t]=="function")).forEach(t=>{e[t]=i[t]}),e}var zQt=MH.default=d_t});var YHe=ot(ale=>{"use strict";var u_t=di();Object.defineProperty(ale,"__esModule",{value:!0});Object.defineProperty(ale,"default",{enumerable:!0,get:function(){return h_t.default}});var h_t=u_t(KHe())});var QHe=ot(AH=>{"use strict";var NH=di();Object.defineProperty(AH,"__esModule",{value:!0});AH.default=void 0;var tD=NH(ul()),ZHe=NH(ole()),f_t=NH(sle()),XHe=NH(YHe());function p_t(i){let{getSlotProps:e,additionalProps:t,externalSlotProps:n,externalForwardedProps:o,className:r}=i;if(!e){let f=(0,ZHe.default)(t?.className,r,o?.className,n?.className),p=(0,tD.default)({},t?.style,o?.style,n?.style),m=(0,tD.default)({},t,o,n);return f.length>0&&(m.className=f),Object.keys(p).length>0&&(m.style=p),{props:m,internalRef:void 0}}let s=(0,f_t.default)((0,tD.default)({},o,n)),a=(0,XHe.default)(n),l=(0,XHe.default)(o),c=e(s),d=(0,ZHe.default)(c?.className,t?.className,r,o?.className,n?.className),u=(0,tD.default)({},c?.style,t?.style,o?.style,n?.style),h=(0,tD.default)({},c,t,l,a);return d.length>0&&(h.className=d),Object.keys(u).length>0&&(h.style=u),{props:h,internalRef:c.ref}}var BQt=AH.default=p_t});var JHe=ot(lle=>{"use strict";var m_t=di();Object.defineProperty(lle,"__esModule",{value:!0});Object.defineProperty(lle,"default",{enumerable:!0,get:function(){return g_t.default}});var g_t=m_t(QHe())});var eBe=ot(RH=>{"use strict";Object.defineProperty(RH,"__esModule",{value:!0});RH.default=void 0;function v_t(i,e,t){return typeof i=="function"?i(e,t):i}var UQt=RH.default=v_t});var dle=ot(cle=>{"use strict";var __t=di();Object.defineProperty(cle,"__esModule",{value:!0});Object.defineProperty(cle,"default",{enumerable:!0,get:function(){return b_t.default}});var b_t=__t(eBe())});var iBe=ot(PH=>{"use strict";"use client";var Ry=di();Object.defineProperty(PH,"__esModule",{value:!0});PH.default=void 0;var tBe=Ry(ul()),y_t=Ry(Yp()),C_t=Ry(_H()),w_t=Ry($He()),x_t=Ry(JHe()),S_t=Ry(dle()),k_t=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function L_t(i){var e;let{elementType:t,externalSlotProps:n,ownerState:o,skipResolvingSlotProps:r=!1}=i,s=(0,y_t.default)(i,k_t),a=r?{}:(0,S_t.default)(n,o),{props:l,internalRef:c}=(0,x_t.default)((0,tBe.default)({},s,{externalSlotProps:a})),d=(0,C_t.default)(c,a?.ref,(e=i.additionalProps)==null?void 0:e.ref);return(0,w_t.default)(t,(0,tBe.default)({},l,{ref:d}),o)}var qQt=PH.default=L_t});var nBe=ot(ule=>{"use strict";var E_t=di();Object.defineProperty(ule,"__esModule",{value:!0});Object.defineProperty(ule,"default",{enumerable:!0,get:function(){return D_t.default}});var D_t=E_t(iBe())});var rBe=ot(oBe=>{"use strict";Object.defineProperty(oBe,"__esModule",{value:!0})});var ur=ot(Un=>{"use strict";var Bo=di();Object.defineProperty(Un,"__esModule",{value:!0});var sBe={chainPropTypes:!0,deepmerge:!0,isPlainObject:!0,elementAcceptingRef:!0,elementTypeAcceptingRef:!0,exactProp:!0,formatMuiErrorMessage:!0,getDisplayName:!0,HTMLElementType:!0,ponyfillGlobal:!0,refType:!0,unstable_capitalize:!0,unstable_createChainedFunction:!0,unstable_debounce:!0,unstable_deprecatedPropType:!0,unstable_isMuiElement:!0,unstable_ownerDocument:!0,unstable_ownerWindow:!0,unstable_requirePropFactory:!0,unstable_setRef:!0,unstable_useEnhancedEffect:!0,unstable_useId:!0,unstable_unsupportedProp:!0,unstable_useControlled:!0,unstable_useEventCallback:!0,unstable_useForkRef:!0,unstable_useLazyRef:!0,unstable_useTimeout:!0,unstable_Timeout:!0,unstable_useOnMount:!0,unstable_useIsFocusVisible:!0,unstable_getScrollbarSize:!0,unstable_detectScrollType:!0,unstable_getNormalizedScrollLeft:!0,usePreviousProps:!0,getValidReactChildren:!0,visuallyHidden:!0,integerPropType:!0,internal_resolveProps:!0,unstable_composeClasses:!0,unstable_generateUtilityClass:!0,unstable_isGlobalState:!0,unstable_generateUtilityClasses:!0,unstable_ClassNameGenerator:!0,clamp:!0,unstable_useSlotProps:!0,unstable_resolveComponentProps:!0,unstable_extractEventHandlers:!0};Object.defineProperty(Un,"HTMLElementType",{enumerable:!0,get:function(){return P_t.default}});Object.defineProperty(Un,"chainPropTypes",{enumerable:!0,get:function(){return T_t.default}});Object.defineProperty(Un,"clamp",{enumerable:!0,get:function(){return u5t.default}});Object.defineProperty(Un,"deepmerge",{enumerable:!0,get:function(){return aBe.default}});Object.defineProperty(Un,"elementAcceptingRef",{enumerable:!0,get:function(){return I_t.default}});Object.defineProperty(Un,"elementTypeAcceptingRef",{enumerable:!0,get:function(){return M_t.default}});Object.defineProperty(Un,"exactProp",{enumerable:!0,get:function(){return N_t.default}});Object.defineProperty(Un,"formatMuiErrorMessage",{enumerable:!0,get:function(){return A_t.default}});Object.defineProperty(Un,"getDisplayName",{enumerable:!0,get:function(){return R_t.default}});Object.defineProperty(Un,"getValidReactChildren",{enumerable:!0,get:function(){return o5t.default}});Object.defineProperty(Un,"integerPropType",{enumerable:!0,get:function(){return s5t.default}});Object.defineProperty(Un,"internal_resolveProps",{enumerable:!0,get:function(){return a5t.default}});Object.defineProperty(Un,"isPlainObject",{enumerable:!0,get:function(){return aBe.isPlainObject}});Object.defineProperty(Un,"ponyfillGlobal",{enumerable:!0,get:function(){return O_t.default}});Object.defineProperty(Un,"refType",{enumerable:!0,get:function(){return z_t.default}});Object.defineProperty(Un,"unstable_ClassNameGenerator",{enumerable:!0,get:function(){return d5t.default}});Object.defineProperty(Un,"unstable_Timeout",{enumerable:!0,get:function(){return lBe.Timeout}});Object.defineProperty(Un,"unstable_capitalize",{enumerable:!0,get:function(){return F_t.default}});Object.defineProperty(Un,"unstable_composeClasses",{enumerable:!0,get:function(){return l5t.default}});Object.defineProperty(Un,"unstable_createChainedFunction",{enumerable:!0,get:function(){return H_t.default}});Object.defineProperty(Un,"unstable_debounce",{enumerable:!0,get:function(){return B_t.default}});Object.defineProperty(Un,"unstable_deprecatedPropType",{enumerable:!0,get:function(){return V_t.default}});Object.defineProperty(Un,"unstable_detectScrollType",{enumerable:!0,get:function(){return cBe.detectScrollType}});Object.defineProperty(Un,"unstable_extractEventHandlers",{enumerable:!0,get:function(){return p5t.default}});Object.defineProperty(Un,"unstable_generateUtilityClass",{enumerable:!0,get:function(){return iD.default}});Object.defineProperty(Un,"unstable_generateUtilityClasses",{enumerable:!0,get:function(){return c5t.default}});Object.defineProperty(Un,"unstable_getNormalizedScrollLeft",{enumerable:!0,get:function(){return cBe.getNormalizedScrollLeft}});Object.defineProperty(Un,"unstable_getScrollbarSize",{enumerable:!0,get:function(){return i5t.default}});Object.defineProperty(Un,"unstable_isGlobalState",{enumerable:!0,get:function(){return iD.isGlobalState}});Object.defineProperty(Un,"unstable_isMuiElement",{enumerable:!0,get:function(){return W_t.default}});Object.defineProperty(Un,"unstable_ownerDocument",{enumerable:!0,get:function(){return U_t.default}});Object.defineProperty(Un,"unstable_ownerWindow",{enumerable:!0,get:function(){return $_t.default}});Object.defineProperty(Un,"unstable_requirePropFactory",{enumerable:!0,get:function(){return j_t.default}});Object.defineProperty(Un,"unstable_resolveComponentProps",{enumerable:!0,get:function(){return f5t.default}});Object.defineProperty(Un,"unstable_setRef",{enumerable:!0,get:function(){return q_t.default}});Object.defineProperty(Un,"unstable_unsupportedProp",{enumerable:!0,get:function(){return Y_t.default}});Object.defineProperty(Un,"unstable_useControlled",{enumerable:!0,get:function(){return Z_t.default}});Object.defineProperty(Un,"unstable_useEnhancedEffect",{enumerable:!0,get:function(){return G_t.default}});Object.defineProperty(Un,"unstable_useEventCallback",{enumerable:!0,get:function(){return X_t.default}});Object.defineProperty(Un,"unstable_useForkRef",{enumerable:!0,get:function(){return Q_t.default}});Object.defineProperty(Un,"unstable_useId",{enumerable:!0,get:function(){return K_t.default}});Object.defineProperty(Un,"unstable_useIsFocusVisible",{enumerable:!0,get:function(){return t5t.default}});Object.defineProperty(Un,"unstable_useLazyRef",{enumerable:!0,get:function(){return J_t.default}});Object.defineProperty(Un,"unstable_useOnMount",{enumerable:!0,get:function(){return e5t.default}});Object.defineProperty(Un,"unstable_useSlotProps",{enumerable:!0,get:function(){return h5t.default}});Object.defineProperty(Un,"unstable_useTimeout",{enumerable:!0,get:function(){return lBe.default}});Object.defineProperty(Un,"usePreviousProps",{enumerable:!0,get:function(){return n5t.default}});Object.defineProperty(Un,"visuallyHidden",{enumerable:!0,get:function(){return r5t.default}});var T_t=Bo(cH()),aBe=fle(Xd()),I_t=Bo(xFe()),M_t=Bo(LFe()),N_t=Bo(DFe()),A_t=Bo(J6()),R_t=Bo(Ase()),P_t=Bo(IFe()),O_t=Bo(NFe()),z_t=Bo(RFe()),F_t=Bo(r3()),H_t=Bo(tae()),B_t=Bo(nae()),V_t=Bo(sae()),W_t=Bo(cae()),U_t=Bo(mH()),$_t=Bo(pae()),j_t=Bo(vae()),q_t=Bo(gH()),G_t=Bo(aH()),K_t=Bo(xae()),Y_t=Bo(Lae()),Z_t=Bo(Iae()),X_t=Bo(Nae()),Q_t=Bo(_H()),J_t=Bo(rHe()),lBe=fle(dHe()),e5t=Bo(uHe()),t5t=Bo(Uae()),i5t=Bo(bHe()),cBe=wHe(),n5t=Bo(LHe()),o5t=Bo(IHe()),r5t=Bo(NHe()),s5t=Bo(zHe()),a5t=Bo(oH()),l5t=Bo(ele()),iD=fle(Ey());Object.keys(iD).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(sBe,i)||i in Un&&Un[i]===iD[i]||Object.defineProperty(Un,i,{enumerable:!0,get:function(){return iD[i]}})});var c5t=Bo(Ise()),d5t=Bo(Ese()),u5t=Bo(Bse()),h5t=Bo(nBe()),f5t=Bo(dle()),p5t=Bo(sle()),hle=rBe();Object.keys(hle).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(sBe,i)||i in Un&&Un[i]===hle[i]||Object.defineProperty(Un,i,{enumerable:!0,get:function(){return hle[i]}})});function dBe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(dBe=function(n){return n?t:e})(i)}function fle(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=dBe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var Ele=ot(aD=>{"use strict";var TBe=di();Object.defineProperty(aD,"__esModule",{value:!0});aD.breakpointKeys=void 0;aD.default=P5t;var N5t=TBe(Yp()),IBe=TBe(ul()),A5t=["values","unit","step"],Lei=aD.breakpointKeys=["xs","sm","md","lg","xl"],R5t=i=>{let e=Object.keys(i).map(t=>({key:t,val:i[t]}))||[];return e.sort((t,n)=>t.val-n.val),e.reduce((t,n)=>(0,IBe.default)({},t,{[n.key]:n.val}),{})};function P5t(i){let{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:t="px",step:n=5}=i,o=(0,N5t.default)(i,A5t),r=R5t(e),s=Object.keys(r);function a(h){return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${t})`}function l(h){return`@media (max-width:${(typeof e[h]=="number"?e[h]:h)-n/100}${t})`}function c(h,f){let p=s.indexOf(f);return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${t}) and (max-width:${(p!==-1&&typeof e[s[p]]=="number"?e[s[p]]:f)-n/100}${t})`}function d(h){return s.indexOf(h)+1{"use strict";Object.defineProperty(BH,"__esModule",{value:!0});BH.default=void 0;var O5t={borderRadius:4},Dei=BH.default=O5t});var lD=ot(VH=>{"use strict";var z5t=di();Object.defineProperty(VH,"__esModule",{value:!0});VH.default=void 0;var Iei=z5t(Kp()),F5t={},Mei=VH.default=F5t});var cD=ot(WH=>{"use strict";var H5t=di();Object.defineProperty(WH,"__esModule",{value:!0});WH.default=void 0;var B5t=H5t(Xd());function V5t(i,e){return e?(0,B5t.default)(i,e,{clone:!1}):i}var Aei=WH.default=V5t});var P_=ot(H1=>{"use strict";var UH=di();Object.defineProperty(H1,"__esModule",{value:!0});H1.computeBreakpointsBase=PBe;H1.createEmptyBreakpointObject=ABe;H1.default=void 0;H1.handleBreakpoints=j5t;H1.mergeBreakpointsInOrder=G5t;H1.removeUnusedBreakpoints=RBe;H1.resolveBreakpointValues=K5t;H1.values=void 0;var W5t=UH(ul()),Pei=UH(Kp()),U5t=UH(Xd()),$5t=UH(cD()),NBe=H1.values={xs:0,sm:600,md:900,lg:1200,xl:1536},Dle={keys:["xs","sm","md","lg","xl"],up:i=>`@media (min-width:${NBe[i]}px)`};function j5t(i,e,t){let n=i.theme||{};if(Array.isArray(e)){let r=n.breakpoints||Dle;return e.reduce((s,a,l)=>(s[r.up(r.keys[l])]=t(e[l]),s),{})}if(typeof e=="object"){let r=n.breakpoints||Dle;return Object.keys(e).reduce((s,a)=>{if(Object.keys(r.values||NBe).indexOf(a)!==-1){let l=r.up(a);s[l]=t(e[a],a)}else{let l=a;s[l]=e[l]}return s},{})}return t(e)}function q5t(i){let e=t=>{let n=t.theme||{},o=i(t),r=n.breakpoints||Dle,s=r.keys.reduce((a,l)=>(t[l]&&(a=a||{},a[r.up(l)]=i((0,W5t.default)({theme:n},t[l]))),a),null);return(0,$5t.default)(o,s)};return e.propTypes={},e.filterProps=["xs","sm","md","lg","xl",...i.filterProps],e}function ABe(i={}){var e;return((e=i.keys)==null?void 0:e.reduce((n,o)=>{let r=i.up(o);return n[r]={},n},{}))||{}}function RBe(i,e){return i.reduce((t,n)=>{let o=t[n];return(!o||Object.keys(o).length===0)&&delete t[n],t},e)}function G5t(i,...e){let t=ABe(i),n=[t,...e].reduce((o,r)=>(0,U5t.default)(o,r),{});return RBe(Object.keys(t),n)}function PBe(i,e){if(typeof i!="object")return{};let t={},n=Object.keys(e);return Array.isArray(i)?n.forEach((o,r)=>{r{i[o]!=null&&(t[o]=!0)}),t}function K5t({values:i,breakpoints:e,base:t}){let n=t||PBe(i,e),o=Object.keys(n);if(o.length===0)return i;let r;return o.reduce((s,a,l)=>(Array.isArray(i)?(s[a]=i[l]!=null?i[l]:i[r],r=l):typeof i=="object"?(s[a]=i[a]!=null?i[a]:i[r],r=a):s[a]=i,s),{})}var Oei=H1.default=q5t});var O_=ot(Oy=>{"use strict";var OBe=di();Object.defineProperty(Oy,"__esModule",{value:!0});Oy.default=void 0;Oy.getPath=Ile;Oy.getStyleValue=Tle;var Y5t=OBe(r3()),Fei=OBe(lD()),Z5t=P_();function Ile(i,e,t=!0){if(!e||typeof e!="string")return null;if(i&&i.vars&&t){let n=`vars.${e}`.split(".").reduce((o,r)=>o&&o[r]?o[r]:null,i);if(n!=null)return n}return e.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,i)}function Tle(i,e,t,n=t){let o;return typeof i=="function"?o=i(t):Array.isArray(i)?o=i[t]||n:o=Ile(i,t)||n,e&&(o=e(o,n,i)),o}function X5t(i){let{prop:e,cssProperty:t=i.prop,themeKey:n,transform:o}=i,r=s=>{if(s[e]==null)return null;let a=s[e],l=s.theme,c=Ile(l,n)||{},d=u=>{let h=Tle(c,o,u);return u===h&&typeof u=="string"&&(h=Tle(c,o,`${e}${u==="default"?"":(0,Y5t.default)(u)}`,u)),t===!1?h:{[t]:h}};return(0,Z5t.handleBreakpoints)(s,a,d)};return r.propTypes={},r.filterProps=[e],r}var Hei=Oy.default=X5t});var zBe=ot(Mle=>{"use strict";Object.defineProperty(Mle,"__esModule",{value:!0});Mle.default=Q5t;function Q5t(i){let e={};return t=>(e[t]===void 0&&(e[t]=i(t)),e[t])}});var dD=ot(Nh=>{"use strict";var Nle=di();Object.defineProperty(Nh,"__esModule",{value:!0});Nh.createUnarySpacing=VBe;Nh.createUnaryUnit=BBe;Nh.default=void 0;Nh.getStyleFromPropValue=UBe;Nh.getValue=WBe;Nh.margin=Ole;Nh.marginKeys=void 0;Nh.padding=zle;Nh.paddingKeys=void 0;var Wei=Nle(lD()),J5t=P_(),ebt=O_(),tbt=Nle(cD()),ibt=Nle(zBe()),nbt={m:"margin",p:"padding"},obt={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},FBe={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},rbt=(0,ibt.default)(i=>{if(i.length>2)if(FBe[i])i=FBe[i];else return[i];let[e,t]=i.split(""),n=nbt[e],o=obt[t]||"";return Array.isArray(o)?o.map(r=>n+r):[n+o]}),Ale=Nh.marginKeys=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Rle=Nh.paddingKeys=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],HBe=[...Ale,...Rle];function BBe(i,e,t,n){var o;let r=(o=(0,ebt.getPath)(i,e,!1))!=null?o:t;return typeof r=="number"?s=>typeof s=="string"?s:r*s:Array.isArray(r)?s=>typeof s=="string"?s:r[s]:typeof r=="function"?r:()=>{}}function VBe(i){return BBe(i,"spacing",8,"spacing")}function WBe(i,e){if(typeof e=="string"||e==null)return e;let t=Math.abs(e),n=i(t);return e>=0?n:typeof n=="number"?-n:`-${n}`}function UBe(i,e){return t=>i.reduce((n,o)=>(n[o]=WBe(e,t),n),{})}function sbt(i,e,t,n){if(e.indexOf(t)===-1)return null;let o=rbt(t),r=UBe(o,n),s=i[t];return(0,J5t.handleBreakpoints)(i,s,r)}function Ple(i,e){let t=VBe(i.theme);return Object.keys(i).map(n=>sbt(i,e,n,t)).reduce(tbt.default,{})}function Ole(i){return Ple(i,Ale)}Ole.propTypes={};Ole.filterProps=Ale;function zle(i){return Ple(i,Rle)}zle.propTypes={};zle.filterProps=Rle;function Fle(i){return Ple(i,HBe)}Fle.propTypes={};Fle.filterProps=HBe;var Uei=Nh.default=Fle});var $Be=ot(Hle=>{"use strict";Object.defineProperty(Hle,"__esModule",{value:!0});Hle.default=lbt;var abt=dD();function lbt(i=8){if(i.mui)return i;let e=(0,abt.createUnarySpacing)({spacing:i}),t=(...n)=>(n.length===0?[1]:n).map(r=>{let s=e(r);return typeof s=="number"?`${s}px`:s}).join(" ");return t.mui=!0,t}});var uD=ot($H=>{"use strict";var cbt=di();Object.defineProperty($H,"__esModule",{value:!0});$H.default=void 0;var dbt=cbt(cD());function ubt(...i){let e=i.reduce((n,o)=>(o.filterProps.forEach(r=>{n[r]=o}),n),{}),t=n=>Object.keys(n).reduce((o,r)=>e[r]?(0,dbt.default)(o,e[r](n)):o,{});return t.propTypes={},t.filterProps=i.reduce((n,o)=>n.concat(o.filterProps),[]),t}var qei=$H.default=ubt});var qBe=ot(es=>{"use strict";var Ble=di();Object.defineProperty(es,"__esModule",{value:!0});es.borderTopColor=es.borderTop=es.borderRightColor=es.borderRight=es.borderRadius=es.borderLeftColor=es.borderLeft=es.borderColor=es.borderBottomColor=es.borderBottom=es.border=void 0;es.borderTransform=z_;es.outlineColor=es.outline=es.default=void 0;var Kei=Ble(lD()),hbt=Ble(O_()),fbt=Ble(uD()),jBe=dD(),pbt=P_();function z_(i){return typeof i!="number"?i:`${i}px solid`}function B1(i,e){return(0,hbt.default)({prop:i,themeKey:"borders",transform:e})}var mbt=es.border=B1("border",z_),gbt=es.borderTop=B1("borderTop",z_),vbt=es.borderRight=B1("borderRight",z_),_bt=es.borderBottom=B1("borderBottom",z_),bbt=es.borderLeft=B1("borderLeft",z_),ybt=es.borderColor=B1("borderColor"),Cbt=es.borderTopColor=B1("borderTopColor"),wbt=es.borderRightColor=B1("borderRightColor"),xbt=es.borderBottomColor=B1("borderBottomColor"),Sbt=es.borderLeftColor=B1("borderLeftColor"),kbt=es.outline=B1("outline",z_),Lbt=es.outlineColor=B1("outlineColor"),jH=i=>{if(i.borderRadius!==void 0&&i.borderRadius!==null){let e=(0,jBe.createUnaryUnit)(i.theme,"shape.borderRadius",4,"borderRadius"),t=n=>({borderRadius:(0,jBe.getValue)(e,n)});return(0,pbt.handleBreakpoints)(i,i.borderRadius,t)}return null};es.borderRadius=jH;jH.propTypes={};jH.filterProps=["borderRadius"];var Ebt=(0,fbt.default)(mbt,gbt,vbt,_bt,bbt,ybt,Cbt,wbt,xbt,Sbt,jH,kbt,Lbt),Yei=es.default=Ebt});var GBe=ot(Ss=>{"use strict";var Vle=di();Object.defineProperty(Ss,"__esModule",{value:!0});Ss.rowGap=Ss.gridTemplateRows=Ss.gridTemplateColumns=Ss.gridTemplateAreas=Ss.gridRow=Ss.gridColumn=Ss.gridAutoRows=Ss.gridAutoFlow=Ss.gridAutoColumns=Ss.gridArea=Ss.gap=Ss.default=Ss.columnGap=void 0;var E0=Vle(O_()),Dbt=Vle(uD()),zy=dD(),Wle=P_(),Xei=Vle(lD()),qH=i=>{if(i.gap!==void 0&&i.gap!==null){let e=(0,zy.createUnaryUnit)(i.theme,"spacing",8,"gap"),t=n=>({gap:(0,zy.getValue)(e,n)});return(0,Wle.handleBreakpoints)(i,i.gap,t)}return null};Ss.gap=qH;qH.propTypes={};qH.filterProps=["gap"];var GH=i=>{if(i.columnGap!==void 0&&i.columnGap!==null){let e=(0,zy.createUnaryUnit)(i.theme,"spacing",8,"columnGap"),t=n=>({columnGap:(0,zy.getValue)(e,n)});return(0,Wle.handleBreakpoints)(i,i.columnGap,t)}return null};Ss.columnGap=GH;GH.propTypes={};GH.filterProps=["columnGap"];var KH=i=>{if(i.rowGap!==void 0&&i.rowGap!==null){let e=(0,zy.createUnaryUnit)(i.theme,"spacing",8,"rowGap"),t=n=>({rowGap:(0,zy.getValue)(e,n)});return(0,Wle.handleBreakpoints)(i,i.rowGap,t)}return null};Ss.rowGap=KH;KH.propTypes={};KH.filterProps=["rowGap"];var Tbt=Ss.gridColumn=(0,E0.default)({prop:"gridColumn"}),Ibt=Ss.gridRow=(0,E0.default)({prop:"gridRow"}),Mbt=Ss.gridAutoFlow=(0,E0.default)({prop:"gridAutoFlow"}),Nbt=Ss.gridAutoColumns=(0,E0.default)({prop:"gridAutoColumns"}),Abt=Ss.gridAutoRows=(0,E0.default)({prop:"gridAutoRows"}),Rbt=Ss.gridTemplateColumns=(0,E0.default)({prop:"gridTemplateColumns"}),Pbt=Ss.gridTemplateRows=(0,E0.default)({prop:"gridTemplateRows"}),Obt=Ss.gridTemplateAreas=(0,E0.default)({prop:"gridTemplateAreas"}),zbt=Ss.gridArea=(0,E0.default)({prop:"gridArea"}),Fbt=(0,Dbt.default)(qH,GH,KH,Tbt,Ibt,Mbt,Nbt,Abt,Rbt,Pbt,Obt,zbt),Qei=Ss.default=Fbt});var YBe=ot(Xp=>{"use strict";var KBe=di();Object.defineProperty(Xp,"__esModule",{value:!0});Xp.default=Xp.color=Xp.bgcolor=Xp.backgroundColor=void 0;Xp.paletteTransform=YH;var Ule=KBe(O_()),Hbt=KBe(uD());function YH(i,e){return e==="grey"?e:i}var Bbt=Xp.color=(0,Ule.default)({prop:"color",themeKey:"palette",transform:YH}),Vbt=Xp.bgcolor=(0,Ule.default)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:YH}),Wbt=Xp.backgroundColor=(0,Ule.default)({prop:"backgroundColor",themeKey:"palette",transform:YH}),Ubt=(0,Hbt.default)(Bbt,Vbt,Wbt),eti=Xp.default=Ubt});var QBe=ot(Ia=>{"use strict";var XBe=di();Object.defineProperty(Ia,"__esModule",{value:!0});Ia.sizeWidth=Ia.sizeHeight=Ia.minWidth=Ia.minHeight=Ia.maxWidth=Ia.maxHeight=Ia.height=Ia.default=Ia.boxSizing=void 0;Ia.sizingTransform=D0;Ia.width=void 0;var l3=XBe(O_()),$bt=XBe(uD()),ZBe=P_();function D0(i){return i<=1&&i!==0?`${i*100}%`:i}var jbt=Ia.width=(0,l3.default)({prop:"width",transform:D0}),$le=i=>{if(i.maxWidth!==void 0&&i.maxWidth!==null){let e=t=>{var n,o;let r=((n=i.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[t])||ZBe.values[t];return r?((o=i.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${r}${i.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:D0(t)}};return(0,ZBe.handleBreakpoints)(i,i.maxWidth,e)}return null};Ia.maxWidth=$le;$le.filterProps=["maxWidth"];var qbt=Ia.minWidth=(0,l3.default)({prop:"minWidth",transform:D0}),Gbt=Ia.height=(0,l3.default)({prop:"height",transform:D0}),Kbt=Ia.maxHeight=(0,l3.default)({prop:"maxHeight",transform:D0}),Ybt=Ia.minHeight=(0,l3.default)({prop:"minHeight",transform:D0}),iti=Ia.sizeWidth=(0,l3.default)({prop:"size",cssProperty:"width",transform:D0}),nti=Ia.sizeHeight=(0,l3.default)({prop:"size",cssProperty:"height",transform:D0}),Zbt=Ia.boxSizing=(0,l3.default)({prop:"boxSizing"}),Xbt=(0,$bt.default)(jbt,$le,qbt,Gbt,Kbt,Ybt,Zbt),oti=Ia.default=Xbt});var hD=ot(ZH=>{"use strict";Object.defineProperty(ZH,"__esModule",{value:!0});ZH.default=void 0;var Vo=dD(),F_=qBe(),jle=GBe(),qle=YBe(),Fy=QBe(),Qbt={border:{themeKey:"borders",transform:F_.borderTransform},borderTop:{themeKey:"borders",transform:F_.borderTransform},borderRight:{themeKey:"borders",transform:F_.borderTransform},borderBottom:{themeKey:"borders",transform:F_.borderTransform},borderLeft:{themeKey:"borders",transform:F_.borderTransform},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:F_.borderTransform},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:F_.borderRadius},color:{themeKey:"palette",transform:qle.paletteTransform},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:qle.paletteTransform},backgroundColor:{themeKey:"palette",transform:qle.paletteTransform},p:{style:Vo.padding},pt:{style:Vo.padding},pr:{style:Vo.padding},pb:{style:Vo.padding},pl:{style:Vo.padding},px:{style:Vo.padding},py:{style:Vo.padding},padding:{style:Vo.padding},paddingTop:{style:Vo.padding},paddingRight:{style:Vo.padding},paddingBottom:{style:Vo.padding},paddingLeft:{style:Vo.padding},paddingX:{style:Vo.padding},paddingY:{style:Vo.padding},paddingInline:{style:Vo.padding},paddingInlineStart:{style:Vo.padding},paddingInlineEnd:{style:Vo.padding},paddingBlock:{style:Vo.padding},paddingBlockStart:{style:Vo.padding},paddingBlockEnd:{style:Vo.padding},m:{style:Vo.margin},mt:{style:Vo.margin},mr:{style:Vo.margin},mb:{style:Vo.margin},ml:{style:Vo.margin},mx:{style:Vo.margin},my:{style:Vo.margin},margin:{style:Vo.margin},marginTop:{style:Vo.margin},marginRight:{style:Vo.margin},marginBottom:{style:Vo.margin},marginLeft:{style:Vo.margin},marginX:{style:Vo.margin},marginY:{style:Vo.margin},marginInline:{style:Vo.margin},marginInlineStart:{style:Vo.margin},marginInlineEnd:{style:Vo.margin},marginBlock:{style:Vo.margin},marginBlockStart:{style:Vo.margin},marginBlockEnd:{style:Vo.margin},displayPrint:{cssProperty:!1,transform:i=>({"@media print":{display:i}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:jle.gap},rowGap:{style:jle.rowGap},columnGap:{style:jle.columnGap},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Fy.sizingTransform},maxWidth:{style:Fy.maxWidth},minWidth:{transform:Fy.sizingTransform},height:{transform:Fy.sizingTransform},maxHeight:{transform:Fy.sizingTransform},minHeight:{transform:Fy.sizingTransform},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},sti=ZH.default=Qbt});var Zle=ot(fD=>{"use strict";var Yle=di();Object.defineProperty(fD,"__esModule",{value:!0});fD.default=void 0;fD.unstable_createStyleFunctionSx=JBe;var Jbt=Yle(r3()),Gle=Yle(cD()),Kle=O_(),XH=P_(),e7t=Yle(hD());function t7t(...i){let e=i.reduce((n,o)=>n.concat(Object.keys(o)),[]),t=new Set(e);return i.every(n=>t.size===Object.keys(n).length)}function i7t(i,e){return typeof i=="function"?i(e):i}function JBe(){function i(t,n,o,r){let s={[t]:n,theme:o},a=r[t];if(!a)return{[t]:n};let{cssProperty:l=t,themeKey:c,transform:d,style:u}=a;if(n==null)return null;if(c==="typography"&&n==="inherit")return{[t]:n};let h=(0,Kle.getPath)(o,c)||{};if(u)return u(s);let f=p=>{let m=(0,Kle.getStyleValue)(h,d,p);return p===m&&typeof p=="string"&&(m=(0,Kle.getStyleValue)(h,d,`${t}${p==="default"?"":(0,Jbt.default)(p)}`,p)),l===!1?m:{[l]:m}};return(0,XH.handleBreakpoints)(s,n,f)}function e(t){var n;let{sx:o,theme:r={}}=t||{};if(!o)return null;let s=(n=r.unstable_sxConfig)!=null?n:e7t.default;function a(l){let c=l;if(typeof l=="function")c=l(r);else if(typeof l!="object")return l;if(!c)return null;let d=(0,XH.createEmptyBreakpointObject)(r.breakpoints),u=Object.keys(d),h=d;return Object.keys(c).forEach(f=>{let p=i7t(c[f],r);if(p!=null)if(typeof p=="object")if(s[f])h=(0,Gle.default)(h,i(f,p,r,s));else{let m=(0,XH.handleBreakpoints)({theme:r},p,y=>({[f]:y}));t7t(m,p)?h[f]=e({sx:p,theme:r}):h=(0,Gle.default)(h,m)}else h=(0,Gle.default)(h,i(f,p,r,s))}),(0,XH.removeUnusedBreakpoints)(u,h)}return Array.isArray(o)?o.map(a):a(o)}return e}var eVe=JBe();eVe.filterProps=["sx"];var lti=fD.default=eVe});var Qle=ot(Xle=>{"use strict";Object.defineProperty(Xle,"__esModule",{value:!0});Xle.default=n7t;function n7t(i,e){let t=this;return t.vars&&typeof t.getColorSchemeSelector=="function"?{[t.getColorSchemeSelector(i).replace(/(\[[^\]]+\])/,"*:where($1)")]:e}:t.palette.mode===i?e:{}}});var iVe=ot(QH=>{"use strict";var T0=di();Object.defineProperty(QH,"__esModule",{value:!0});QH.default=void 0;var Jle=T0(ul()),o7t=T0(Yp()),tVe=T0(Xd()),r7t=T0(Ele()),s7t=T0(MBe()),a7t=T0($Be()),l7t=T0(Zle()),c7t=T0(hD()),d7t=T0(Qle()),u7t=["breakpoints","palette","spacing","shape"];function h7t(i={},...e){let{breakpoints:t={},palette:n={},spacing:o,shape:r={}}=i,s=(0,o7t.default)(i,u7t),a=(0,r7t.default)(t),l=(0,a7t.default)(o),c=(0,tVe.default)({breakpoints:a,direction:"ltr",components:{},palette:(0,Jle.default)({mode:"light"},n),spacing:l,shape:(0,Jle.default)({},s7t.default,r)},s);return c.applyStyles=d7t.default,c=e.reduce((d,u)=>(0,tVe.default)(d,u),c),c.unstable_sxConfig=(0,Jle.default)({},c7t.default,s?.unstable_sxConfig),c.unstable_sx=function(u){return(0,l7t.default)({sx:u,theme:this})},c}var uti=QH.default=h7t});var JH=ot(pD=>{"use strict";var ece=di();Object.defineProperty(pD,"__esModule",{value:!0});Object.defineProperty(pD,"default",{enumerable:!0,get:function(){return f7t.default}});Object.defineProperty(pD,"private_createBreakpoints",{enumerable:!0,get:function(){return p7t.default}});Object.defineProperty(pD,"unstable_applyStyles",{enumerable:!0,get:function(){return m7t.default}});var f7t=ece(iVe()),p7t=ece(Ele()),m7t=ece(Qle())});var cde=ot(KB=>{"use strict";var KCt=di();Object.defineProperty(KB,"__esModule",{value:!0});KB.default=void 0;var YCt=KCt(r3()),Lpi=KB.default=YCt.default});var vUe=ot(YB=>{"use strict";var ZCt=di();Object.defineProperty(YB,"__esModule",{value:!0});YB.default=void 0;var XCt=ZCt(tae()),Dpi=YB.default=XCt.default});var xUe=ot(VD=>{"use strict";"use client";var bUe=di();Object.defineProperty(VD,"__esModule",{value:!0});VD.default=void 0;VD.useDefaultProps=iwt;var yUe=JCt(xi()),Ipi=bUe(Kp()),_Ue=bUe(oH()),QCt=zn();function CUe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(CUe=function(n){return n?t:e})(i)}function JCt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=CUe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var wUe=yUe.createContext(void 0);function ewt({value:i,children:e}){return(0,QCt.jsx)(wUe.Provider,{value:i,children:e})}function twt(i){let{theme:e,name:t,props:n}=i;if(!e||!e.components||!e.components[t])return n;let o=e.components[t];return o.defaultProps?(0,_Ue.default)(o.defaultProps,n):!o.styleOverrides&&!o.variants?(0,_Ue.default)(o,n):n}function iwt({props:i,name:e}){let t=yUe.useContext(wUe);return twt({props:i,name:e,theme:{components:t}})}var Mpi=VD.default=ewt});var LUe=ot(ZB=>{"use strict";Object.defineProperty(ZB,"__esModule",{value:!0});Object.defineProperty(ZB,"default",{enumerable:!0,get:function(){return SUe.default}});Object.defineProperty(ZB,"useDefaultProps",{enumerable:!0,get:function(){return SUe.useDefaultProps}});var SUe=nwt(xUe());function kUe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(kUe=function(n){return n?t:e})(i)}function nwt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=kUe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var MUe=ot(WD=>{"use strict";"use client";var EUe=di();Object.defineProperty(WD,"__esModule",{value:!0});WD.default=void 0;WD.useDefaultProps=awt;var owt=EUe(ul()),Rpi=IUe(xi()),Ppi=EUe(Kp()),DUe=IUe(LUe()),rwt=zn();function TUe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(TUe=function(n){return n?t:e})(i)}function IUe(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=TUe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function swt(i){return(0,rwt.jsx)(DUe.default,(0,owt.default)({},i))}var Opi=WD.default=swt;function awt(i){return(0,DUe.useDefaultProps)(i)}});var RUe=ot(XB=>{"use strict";Object.defineProperty(XB,"__esModule",{value:!0});Object.defineProperty(XB,"default",{enumerable:!0,get:function(){return NUe.default}});Object.defineProperty(XB,"useDefaultProps",{enumerable:!0,get:function(){return NUe.useDefaultProps}});var NUe=lwt(MUe());function AUe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(AUe=function(n){return n?t:e})(i)}function lwt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=AUe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var PUe=ot(hde=>{"use strict";var ude=di();Object.defineProperty(hde,"__esModule",{value:!0});hde.default=pwt;var dde=ude(ul()),cwt=ude(Yp()),dwt=Xd(),uwt=ude(hD()),hwt=["sx"],fwt=i=>{var e,t;let n={systemProps:{},otherProps:{}},o=(e=i==null||(t=i.theme)==null?void 0:t.unstable_sxConfig)!=null?e:uwt.default;return Object.keys(i).forEach(r=>{o[r]?n.systemProps[r]=i[r]:n.otherProps[r]=i[r]}),n};function pwt(i){let{sx:e}=i,t=(0,cwt.default)(i,hwt),{systemProps:n,otherProps:o}=fwt(t),r;return Array.isArray(e)?r=[n,...e]:typeof e=="function"?r=(...s)=>{let a=e(...s);return(0,dwt.isPlainObject)(a)?(0,dde.default)({},n,a):n}:r=(0,dde.default)({},n,e),(0,dde.default)({},o,{sx:r})}});var fde=ot(rC=>{"use strict";var OUe=di();Object.defineProperty(rC,"__esModule",{value:!0});Object.defineProperty(rC,"default",{enumerable:!0,get:function(){return zUe.default}});Object.defineProperty(rC,"extendSxProp",{enumerable:!0,get:function(){return mwt.default}});Object.defineProperty(rC,"unstable_createStyleFunctionSx",{enumerable:!0,get:function(){return zUe.unstable_createStyleFunctionSx}});Object.defineProperty(rC,"unstable_defaultSxConfig",{enumerable:!0,get:function(){return gwt.default}});var zUe=vwt(Zle()),mwt=OUe(PUe()),gwt=OUe(hD());function FUe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(FUe=function(n){return n?t:e})(i)}function vwt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=FUe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var VUe=ot(aC=>{"use strict";var sC=di();Object.defineProperty(aC,"__esModule",{value:!0});aC.default=Iwt;aC.shouldForwardProp=JB;aC.systemDefaultTheme=void 0;var G1=sC(ul()),pde=sC(Yp()),HUe=Swt(x0()),_wt=Xd(),Vpi=sC(r3()),Wpi=sC(Ase()),bwt=sC(JH()),ywt=sC(fde()),Cwt=["ownerState"],wwt=["variants"],xwt=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function BUe(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(BUe=function(n){return n?t:e})(i)}function Swt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=BUe(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function kwt(i){return Object.keys(i).length===0}function Lwt(i){return typeof i=="string"&&i.charCodeAt(0)>96}function JB(i){return i!=="ownerState"&&i!=="theme"&&i!=="sx"&&i!=="as"}var Ewt=aC.systemDefaultTheme=(0,bwt.default)(),Dwt=i=>i&&i.charAt(0).toLowerCase()+i.slice(1);function QB({defaultTheme:i,theme:e,themeId:t}){return kwt(e)?i:e[t]||e}function Twt(i){return i?(e,t)=>t[i]:null}function eV(i,e){let{ownerState:t}=e,n=(0,pde.default)(e,Cwt),o=typeof i=="function"?i((0,G1.default)({ownerState:t},n)):i;if(Array.isArray(o))return o.flatMap(r=>eV(r,(0,G1.default)({ownerState:t},n)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){let{variants:r=[]}=o,a=(0,pde.default)(o,wwt);return r.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,G1.default)({ownerState:t},n,t)):Object.keys(l.props).forEach(d=>{t?.[d]!==l.props[d]&&n[d]!==l.props[d]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,G1.default)({ownerState:t},n,t)):l.style))}),a}return o}function Iwt(i={}){let{themeId:e,defaultTheme:t=Ewt,rootShouldForwardProp:n=JB,slotShouldForwardProp:o=JB}=i,r=s=>(0,ywt.default)((0,G1.default)({},s,{theme:QB((0,G1.default)({},s,{defaultTheme:t,themeId:e}))}));return r.__mui_systemSx=!0,(s,a={})=>{(0,HUe.internal_processStyles)(s,w=>w.filter(S=>!(S!=null&&S.__mui_systemSx)));let{name:l,slot:c,skipVariantsResolver:d,skipSx:u,overridesResolver:h=Twt(Dwt(c))}=a,f=(0,pde.default)(a,xwt),p=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,m=u||!1,y,_=JB;c==="Root"||c==="root"?_=n:c?_=o:Lwt(s)&&(_=void 0);let v=(0,HUe.default)(s,(0,G1.default)({shouldForwardProp:_,label:y},f)),b=w=>typeof w=="function"&&w.__emotion_real!==w||(0,_wt.isPlainObject)(w)?S=>eV(w,(0,G1.default)({},S,{theme:QB({theme:S.theme,defaultTheme:t,themeId:e})})):w,C=(w,...S)=>{let x=b(w),k=S?S.map(b):[];l&&h&&k.push(A=>{let T=QB((0,G1.default)({},A,{defaultTheme:t,themeId:e}));if(!T.components||!T.components[l]||!T.components[l].styleOverrides)return null;let L=T.components[l].styleOverrides,I={};return Object.entries(L).forEach(([M,N])=>{I[M]=eV(N,(0,G1.default)({},A,{theme:T}))}),h(A,I)}),l&&!p&&k.push(A=>{var T;let L=QB((0,G1.default)({},A,{defaultTheme:t,themeId:e})),I=L==null||(T=L.components)==null||(T=T[l])==null?void 0:T.variants;return eV({variants:I},(0,G1.default)({},A,{theme:L}))}),m||k.push(r);let D=k.length-S.length;if(Array.isArray(w)&&D>0){let A=new Array(D).fill("");x=[...w,...A],x.raw=[...w.raw,...A]}let E=v(x,...k);return s.muiName&&(E.muiName=s.muiName),E};return v.withConfig&&(C.withConfig=v.withConfig),C}}});var WUe=ot(mde=>{"use strict";var Mwt=di();Object.defineProperty(mde,"__esModule",{value:!0});mde.default=Awt;var Nwt=Mwt(ul());function Awt(i,e){return(0,Nwt.default)({toolbar:{minHeight:56,[i.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[i.up("sm")]:{minHeight:64}}},e)}});var ZUe=ot(Ka=>{"use strict";var $Ue=di();Object.defineProperty(Ka,"__esModule",{value:!0});Ka.alpha=KUe;Ka.blend=Uwt;Ka.colorChannel=void 0;Ka.darken=vde;Ka.decomposeColor=K1;Ka.emphasize=YUe;Ka.getContrastRatio=Fwt;Ka.getLuminance=tV;Ka.hexToRgb=jUe;Ka.hslToRgb=GUe;Ka.lighten=_de;Ka.private_safeAlpha=Hwt;Ka.private_safeColorChannel=void 0;Ka.private_safeDarken=Bwt;Ka.private_safeEmphasize=Wwt;Ka.private_safeLighten=Vwt;Ka.recomposeColor=lC;Ka.rgbToHex=zwt;var UUe=$Ue(J6()),Rwt=$Ue(Bse());function gde(i,e=0,t=1){return(0,Rwt.default)(i,e,t)}function jUe(i){i=i.slice(1);let e=new RegExp(`.{1,${i.length>=6?2:1}}`,"g"),t=i.match(e);return t&&t[0].length===1&&(t=t.map(n=>n+n)),t?`rgb${t.length===4?"a":""}(${t.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function Pwt(i){let e=i.toString(16);return e.length===1?`0${e}`:e}function K1(i){if(i.type)return i;if(i.charAt(0)==="#")return K1(jUe(i));let e=i.indexOf("("),t=i.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(t)===-1)throw new Error((0,UUe.default)(9,i));let n=i.substring(e+1,i.length-1),o;if(t==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error((0,UUe.default)(10,o))}else n=n.split(",");return n=n.map(r=>parseFloat(r)),{type:t,values:n,colorSpace:o}}var qUe=i=>{let e=K1(i);return e.values.slice(0,3).map((t,n)=>e.type.indexOf("hsl")!==-1&&n!==0?`${t}%`:t).join(" ")};Ka.colorChannel=qUe;var Owt=(i,e)=>{try{return qUe(i)}catch{return i}};Ka.private_safeColorChannel=Owt;function lC(i){let{type:e,colorSpace:t}=i,{values:n}=i;return e.indexOf("rgb")!==-1?n=n.map((o,r)=>r<3?parseInt(o,10):o):e.indexOf("hsl")!==-1&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),e.indexOf("color")!==-1?n=`${t} ${n.join(" ")}`:n=`${n.join(", ")}`,`${e}(${n})`}function zwt(i){if(i.indexOf("#")===0)return i;let{values:e}=K1(i);return`#${e.map((t,n)=>Pwt(n===3?Math.round(255*t):t)).join("")}`}function GUe(i){i=K1(i);let{values:e}=i,t=e[0],n=e[1]/100,o=e[2]/100,r=n*Math.min(o,1-o),s=(c,d=(c+t/30)%12)=>o-r*Math.max(Math.min(d-3,9-d,1),-1),a="rgb",l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return i.type==="hsla"&&(a+="a",l.push(e[3])),lC({type:a,values:l})}function tV(i){i=K1(i);let e=i.type==="hsl"||i.type==="hsla"?K1(GUe(i)).values:i.values;return e=e.map(t=>(i.type!=="color"&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function Fwt(i,e){let t=tV(i),n=tV(e);return(Math.max(t,n)+.05)/(Math.min(t,n)+.05)}function KUe(i,e){return i=K1(i),e=gde(e),(i.type==="rgb"||i.type==="hsl")&&(i.type+="a"),i.type==="color"?i.values[3]=`/${e}`:i.values[3]=e,lC(i)}function Hwt(i,e,t){try{return KUe(i,e)}catch{return i}}function vde(i,e){if(i=K1(i),e=gde(e),i.type.indexOf("hsl")!==-1)i.values[2]*=1-e;else if(i.type.indexOf("rgb")!==-1||i.type.indexOf("color")!==-1)for(let t=0;t<3;t+=1)i.values[t]*=1-e;return lC(i)}function Bwt(i,e,t){try{return vde(i,e)}catch{return i}}function _de(i,e){if(i=K1(i),e=gde(e),i.type.indexOf("hsl")!==-1)i.values[2]+=(100-i.values[2])*e;else if(i.type.indexOf("rgb")!==-1)for(let t=0;t<3;t+=1)i.values[t]+=(255-i.values[t])*e;else if(i.type.indexOf("color")!==-1)for(let t=0;t<3;t+=1)i.values[t]+=(1-i.values[t])*e;return lC(i)}function Vwt(i,e,t){try{return _de(i,e)}catch{return i}}function YUe(i,e=.15){return tV(i)>.5?vde(i,e):_de(i,e)}function Wwt(i,e,t){try{return YUe(i,e)}catch{return i}}function Uwt(i,e,t,n=1){let o=(l,c)=>Math.round((l**(1/n)*(1-t)+c**(1/n)*t)**n),r=K1(i),s=K1(e),a=[o(r.values[0],s.values[0]),o(r.values[1],s.values[1]),o(r.values[2],s.values[2])];return lC({type:"rgb",values:a})}});var XUe=ot(iV=>{"use strict";Object.defineProperty(iV,"__esModule",{value:!0});iV.default=void 0;var $wt={black:"#000",white:"#fff"},qpi=iV.default=$wt});var QUe=ot(nV=>{"use strict";Object.defineProperty(nV,"__esModule",{value:!0});nV.default=void 0;var jwt={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Kpi=nV.default=jwt});var JUe=ot(oV=>{"use strict";Object.defineProperty(oV,"__esModule",{value:!0});oV.default=void 0;var qwt={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Zpi=oV.default=qwt});var e$e=ot(rV=>{"use strict";Object.defineProperty(rV,"__esModule",{value:!0});rV.default=void 0;var Gwt={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Qpi=rV.default=Gwt});var t$e=ot(sV=>{"use strict";Object.defineProperty(sV,"__esModule",{value:!0});sV.default=void 0;var Kwt={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},emi=sV.default=Kwt});var i$e=ot(aV=>{"use strict";Object.defineProperty(aV,"__esModule",{value:!0});aV.default=void 0;var Ywt={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},imi=aV.default=Ywt});var n$e=ot(lV=>{"use strict";Object.defineProperty(lV,"__esModule",{value:!0});lV.default=void 0;var Zwt={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},omi=lV.default=Zwt});var o$e=ot(cV=>{"use strict";Object.defineProperty(cV,"__esModule",{value:!0});cV.default=void 0;var Xwt={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},smi=cV.default=Xwt});var l$e=ot(Q_=>{"use strict";var Y1=di();Object.defineProperty(Q_,"__esModule",{value:!0});Q_.dark=void 0;Q_.default=lxt;Q_.light=void 0;var bde=Y1(ul()),Qwt=Y1(Yp()),r$e=Y1(J6()),Jwt=Y1(Xd()),Cde=ZUe(),$D=Y1(XUe()),ext=Y1(QUe()),cC=Y1(JUe()),dC=Y1(e$e()),UD=Y1(t$e()),uC=Y1(i$e()),hC=Y1(n$e()),fC=Y1(o$e()),txt=["mode","contrastThreshold","tonalOffset"],s$e=Q_.light={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:$D.default.white,default:$D.default.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},yde=Q_.dark={text:{primary:$D.default.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:$D.default.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function a$e(i,e,t,n){let o=n.light||n,r=n.dark||n*1.5;i[e]||(i.hasOwnProperty(t)?i[e]=i[t]:e==="light"?i.light=(0,Cde.lighten)(i.main,o):e==="dark"&&(i.dark=(0,Cde.darken)(i.main,r)))}function ixt(i="light"){return i==="dark"?{main:uC.default[200],light:uC.default[50],dark:uC.default[400]}:{main:uC.default[700],light:uC.default[400],dark:uC.default[800]}}function nxt(i="light"){return i==="dark"?{main:cC.default[200],light:cC.default[50],dark:cC.default[400]}:{main:cC.default[500],light:cC.default[300],dark:cC.default[700]}}function oxt(i="light"){return i==="dark"?{main:dC.default[500],light:dC.default[300],dark:dC.default[700]}:{main:dC.default[700],light:dC.default[400],dark:dC.default[800]}}function rxt(i="light"){return i==="dark"?{main:hC.default[400],light:hC.default[300],dark:hC.default[700]}:{main:hC.default[700],light:hC.default[500],dark:hC.default[900]}}function sxt(i="light"){return i==="dark"?{main:fC.default[400],light:fC.default[300],dark:fC.default[700]}:{main:fC.default[800],light:fC.default[500],dark:fC.default[900]}}function axt(i="light"){return i==="dark"?{main:UD.default[400],light:UD.default[300],dark:UD.default[700]}:{main:"#ed6c02",light:UD.default[500],dark:UD.default[900]}}function lxt(i){let{mode:e="light",contrastThreshold:t=3,tonalOffset:n=.2}=i,o=(0,Qwt.default)(i,txt),r=i.primary||ixt(e),s=i.secondary||nxt(e),a=i.error||oxt(e),l=i.info||rxt(e),c=i.success||sxt(e),d=i.warning||axt(e);function u(m){return(0,Cde.getContrastRatio)(m,yde.text.primary)>=t?yde.text.primary:s$e.text.primary}let h=({color:m,name:y,mainShade:_=500,lightShade:v=300,darkShade:b=700})=>{if(m=(0,bde.default)({},m),!m.main&&m[_]&&(m.main=m[_]),!m.hasOwnProperty("main"))throw new Error((0,r$e.default)(11,y?` (${y})`:"",_));if(typeof m.main!="string")throw new Error((0,r$e.default)(12,y?` (${y})`:"",JSON.stringify(m.main)));return a$e(m,"light",v,n),a$e(m,"dark",b,n),m.contrastText||(m.contrastText=u(m.main)),m},f={dark:yde,light:s$e};return(0,Jwt.default)((0,bde.default)({common:(0,bde.default)({},$D.default),mode:e,primary:h({color:r,name:"primary"}),secondary:h({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:a,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:ext.default,contrastThreshold:t,getContrastText:u,augmentColor:h,tonalOffset:n},f[e]),o)}});var h$e=ot(xde=>{"use strict";var wde=di();Object.defineProperty(xde,"__esModule",{value:!0});xde.default=fxt;var c$e=wde(ul()),cxt=wde(Yp()),dxt=wde(Xd()),uxt=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function hxt(i){return Math.round(i*1e5)/1e5}var d$e={textTransform:"uppercase"},u$e='"Roboto", "Helvetica", "Arial", sans-serif';function fxt(i,e){let t=typeof e=="function"?e(i):e,{fontFamily:n=u$e,fontSize:o=14,fontWeightLight:r=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:d,pxToRem:u}=t,h=(0,cxt.default)(t,uxt),f=o/14,p=u||(_=>`${_/c*f}rem`),m=(_,v,b,C,w)=>(0,c$e.default)({fontFamily:n,fontWeight:_,fontSize:p(v),lineHeight:b},n===u$e?{letterSpacing:`${hxt(C/v)}em`}:{},w,d),y={h1:m(r,96,1.167,-1.5),h2:m(r,60,1.2,-.5),h3:m(s,48,1.167,0),h4:m(s,34,1.235,.25),h5:m(s,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(s,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(s,16,1.5,.15),body2:m(s,14,1.43,.15),button:m(a,14,1.75,.4,d$e),caption:m(s,12,1.66,.4),overline:m(s,12,2.66,1,d$e),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,dxt.default)((0,c$e.default)({htmlFontSize:c,pxToRem:p,fontFamily:n,fontSize:o,fontWeightLight:r,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},y),h,{clone:!1})}});var f$e=ot(dV=>{"use strict";Object.defineProperty(dV,"__esModule",{value:!0});dV.default=void 0;var pxt=.2,mxt=.14,gxt=.12;function ga(...i){return[`${i[0]}px ${i[1]}px ${i[2]}px ${i[3]}px rgba(0,0,0,${pxt})`,`${i[4]}px ${i[5]}px ${i[6]}px ${i[7]}px rgba(0,0,0,${mxt})`,`${i[8]}px ${i[9]}px ${i[10]}px ${i[11]}px rgba(0,0,0,${gxt})`].join(",")}var vxt=["none",ga(0,2,1,-1,0,1,1,0,0,1,3,0),ga(0,3,1,-2,0,2,2,0,0,1,5,0),ga(0,3,3,-2,0,3,4,0,0,1,8,0),ga(0,2,4,-1,0,4,5,0,0,1,10,0),ga(0,3,5,-1,0,5,8,0,0,1,14,0),ga(0,3,5,-1,0,6,10,0,0,1,18,0),ga(0,4,5,-2,0,7,10,1,0,2,16,1),ga(0,5,5,-3,0,8,10,1,0,3,14,2),ga(0,5,6,-3,0,9,12,1,0,3,16,2),ga(0,6,6,-3,0,10,14,1,0,4,18,3),ga(0,6,7,-4,0,11,15,1,0,4,20,3),ga(0,7,8,-4,0,12,17,2,0,5,22,4),ga(0,7,8,-4,0,13,19,2,0,5,24,4),ga(0,7,9,-4,0,14,21,2,0,5,26,4),ga(0,8,9,-5,0,15,22,2,0,6,28,5),ga(0,8,10,-5,0,16,24,2,0,6,30,5),ga(0,8,11,-5,0,17,26,2,0,6,32,5),ga(0,9,11,-5,0,18,28,2,0,7,34,6),ga(0,9,12,-6,0,19,29,2,0,7,36,6),ga(0,10,13,-6,0,20,31,3,0,8,38,7),ga(0,10,13,-6,0,21,33,3,0,8,40,7),ga(0,10,14,-6,0,22,35,3,0,8,42,7),ga(0,11,14,-7,0,23,36,3,0,9,44,8),ga(0,11,15,-7,0,24,38,3,0,9,46,8)],dmi=dV.default=vxt});var g$e=ot(J_=>{"use strict";var m$e=di();Object.defineProperty(J_,"__esModule",{value:!0});J_.default=xxt;J_.easing=J_.duration=void 0;var _xt=m$e(Yp()),Sde=m$e(ul()),bxt=["duration","easing","delay"],yxt=J_.easing={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Cxt=J_.duration={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function p$e(i){return`${Math.round(i)}ms`}function wxt(i){if(!i)return 0;let e=i/36;return Math.round((4+15*e**.25+e/5)*10)}function xxt(i){let e=(0,Sde.default)({},yxt,i.easing),t=(0,Sde.default)({},Cxt,i.duration),n=(o=["all"],r={})=>{let{duration:s=t.standard,easing:a=e.easeInOut,delay:l=0}=r,c=(0,_xt.default)(r,bxt);return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof s=="string"?s:p$e(s)} ${a} ${typeof l=="string"?l:p$e(l)}`).join(",")};return(0,Sde.default)({getAutoHeightDuration:wxt,create:n},i,{easing:e,duration:t})}});var v$e=ot(uV=>{"use strict";Object.defineProperty(uV,"__esModule",{value:!0});uV.default=void 0;var Sxt={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},fmi=uV.default=Sxt});var w$e=ot(jD=>{"use strict";var Z1=di();Object.defineProperty(jD,"__esModule",{value:!0});jD.createMuiTheme=Oxt;jD.default=void 0;var _$e=Z1(ul()),kxt=Z1(Yp()),Lxt=Z1(J6()),kde=Z1(Xd()),b$e=Pxt(fde()),Ext=Z1(JH()),mmi=Z1(Ey()),Dxt=Z1(WUe()),Txt=Z1(l$e()),Ixt=Z1(h$e()),Mxt=Z1(f$e()),Nxt=Z1(g$e()),Axt=Z1(v$e()),Rxt=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function y$e(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(y$e=function(n){return n?t:e})(i)}function Pxt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=y$e(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function C$e(i={},...e){let{mixins:t={},palette:n={},transitions:o={},typography:r={}}=i,s=(0,kxt.default)(i,Rxt);if(i.vars)throw new Error((0,Lxt.default)(18));let a=(0,Txt.default)(n),l=(0,Ext.default)(i),c=(0,kde.default)(l,{mixins:(0,Dxt.default)(l.breakpoints,t),palette:a,shadows:Mxt.default.slice(),typography:(0,Ixt.default)(a,r),transitions:(0,Nxt.default)(o),zIndex:(0,_$e.default)({},Axt.default)});return c=(0,kde.default)(c,s),c=e.reduce((d,u)=>(0,kde.default)(d,u),c),c.unstable_sxConfig=(0,_$e.default)({},b$e.unstable_defaultSxConfig,s?.unstable_sxConfig),c.unstable_sx=function(u){return(0,b$e.default)({sx:u,theme:this})},c}function Oxt(...i){return C$e(...i)}var gmi=jD.default=C$e});var x$e=ot(hV=>{"use strict";"use client";var zxt=di();Object.defineProperty(hV,"__esModule",{value:!0});hV.default=void 0;var Fxt=zxt(w$e()),Hxt=(0,Fxt.default)(),_mi=hV.default=Hxt});var S$e=ot(fV=>{"use strict";Object.defineProperty(fV,"__esModule",{value:!0});fV.default=void 0;var ymi=fV.default="$$material"});var Lde=ot(pV=>{"use strict";Object.defineProperty(pV,"__esModule",{value:!0});pV.default=void 0;function Bxt(i){return i!=="ownerState"&&i!=="theme"&&i!=="sx"&&i!=="as"}var wmi=pV.default=Bxt});var k$e=ot(mV=>{"use strict";var Vxt=di();Object.defineProperty(mV,"__esModule",{value:!0});mV.default=void 0;var Wxt=Vxt(Lde()),Uxt=i=>(0,Wxt.default)(i)&&i!=="classes",Smi=mV.default=Uxt});var E$e=ot(pC=>{"use strict";"use client";var qD=di();Object.defineProperty(pC,"__esModule",{value:!0});pC.default=void 0;Object.defineProperty(pC,"rootShouldForwardProp",{enumerable:!0,get:function(){return L$e.default}});Object.defineProperty(pC,"slotShouldForwardProp",{enumerable:!0,get:function(){return Gxt.default}});var $xt=qD(VUe()),jxt=qD(x$e()),qxt=qD(S$e()),L$e=qD(k$e()),Gxt=qD(Lde()),Kxt=(0,$xt.default)({themeId:qxt.default,defaultTheme:jxt.default,rootShouldForwardProp:L$e.default}),Lmi=pC.default=Kxt});var Ede=ot(GD=>{"use strict";var D$e=di();Object.defineProperty(GD,"__esModule",{value:!0});GD.default=void 0;GD.getSvgIconUtilityClass=Xxt;var Yxt=D$e(Ise()),Zxt=D$e(Ey());function Xxt(i){return(0,Zxt.default)("MuiSvgIcon",i)}var Qxt=(0,Yxt.default)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]),Dmi=GD.default=Qxt});var R$e=ot(vV=>{"use strict";"use client";var e5=di();Object.defineProperty(vV,"__esModule",{value:!0});vV.default=void 0;var T$e=e5(ul()),Jxt=e5(Yp()),I$e=sSt(xi()),Imi=e5(Kp()),eSt=e5(ole()),tSt=e5(ele()),gV=e5(cde()),iSt=RUe(),nSt=e5(E$e()),oSt=Ede(),M$e=zn(),rSt=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"];function N$e(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(N$e=function(n){return n?t:e})(i)}function sSt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=N$e(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}var aSt=i=>{let{color:e,fontSize:t,classes:n}=i,o={root:["root",e!=="inherit"&&`color${(0,gV.default)(e)}`,`fontSize${(0,gV.default)(t)}`]};return(0,tSt.default)(o,oSt.getSvgIconUtilityClass,n)},lSt=(0,nSt.default)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(i,e)=>{let{ownerState:t}=i;return[e.root,t.color!=="inherit"&&e[`color${(0,gV.default)(t.color)}`],e[`fontSize${(0,gV.default)(t.fontSize)}`]]}})(({theme:i,ownerState:e})=>{var t,n,o,r,s,a,l,c,d,u,h,f,p;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(t=i.transitions)==null||(n=t.create)==null?void 0:n.call(t,"fill",{duration:(o=i.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((r=i.typography)==null||(s=r.pxToRem)==null?void 0:s.call(r,20))||"1.25rem",medium:((a=i.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((c=i.typography)==null||(d=c.pxToRem)==null?void 0:d.call(c,35))||"2.1875rem"}[e.fontSize],color:(u=(h=(i.vars||i).palette)==null||(h=h[e.color])==null?void 0:h.main)!=null?u:{action:(f=(i.vars||i).palette)==null||(f=f.action)==null?void 0:f.active,disabled:(p=(i.vars||i).palette)==null||(p=p.action)==null?void 0:p.disabled,inherit:void 0}[e.color]}}),A$e=I$e.forwardRef(function(e,t){let n=(0,iSt.useDefaultProps)({props:e,name:"MuiSvgIcon"}),{children:o,className:r,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:u,viewBox:h="0 0 24 24"}=n,f=(0,Jxt.default)(n,rSt),p=I$e.isValidElement(o)&&o.type==="svg",m=(0,T$e.default)({},n,{color:s,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:p}),y={};d||(y.viewBox=h);let _=aSt(m);return(0,M$e.jsxs)(lSt,(0,T$e.default)({as:a,className:(0,eSt.default)(_.root,r),focusable:"false",color:c,"aria-hidden":u?void 0:!0,role:u?"img":void 0,ref:t},y,f,p&&o.props,{ownerState:m,children:[p?o.props.children:o,u?(0,M$e.jsx)("title",{children:u}):null]}))});A$e.muiName="SvgIcon";var Mmi=vV.default=A$e});var O$e=ot(t5=>{"use strict";"use client";var cSt=di();Object.defineProperty(t5,"__esModule",{value:!0});var dSt={svgIconClasses:!0};Object.defineProperty(t5,"default",{enumerable:!0,get:function(){return uSt.default}});Object.defineProperty(t5,"svgIconClasses",{enumerable:!0,get:function(){return _V.default}});var uSt=cSt(R$e()),_V=hSt(Ede());Object.keys(_V).forEach(function(i){i==="default"||i==="__esModule"||Object.prototype.hasOwnProperty.call(dSt,i)||i in t5&&t5[i]===_V[i]||Object.defineProperty(t5,i,{enumerable:!0,get:function(){return _V[i]}})});function P$e(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(P$e=function(n){return n?t:e})(i)}function hSt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=P$e(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}});var V$e=ot(Dde=>{"use strict";"use client";var H$e=di();Object.defineProperty(Dde,"__esModule",{value:!0});Dde.default=gSt;var fSt=H$e(ul()),z$e=mSt(xi()),F$e=H$e(O$e()),pSt=zn();function B$e(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(B$e=function(n){return n?t:e})(i)}function mSt(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=B$e(e);if(t&&t.has(i))return t.get(i);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in i)if(r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)){var s=o?Object.getOwnPropertyDescriptor(i,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=i[r]}return n.default=i,t&&t.set(i,n),n}function gSt(i,e){function t(n,o){return(0,pSt.jsx)(F$e.default,(0,fSt.default)({"data-testid":`${e}Icon`,ref:o},n,{children:i}))}return t.muiName=F$e.default.muiName,z$e.memo(z$e.forwardRef(t))}});var W$e=ot(bV=>{"use strict";var vSt=di();Object.defineProperty(bV,"__esModule",{value:!0});bV.default=void 0;var _St=vSt(nae()),Pmi=bV.default=_St.default});var U$e=ot(yV=>{"use strict";var bSt=di();Object.defineProperty(yV,"__esModule",{value:!0});yV.default=void 0;var ySt=bSt(sae()),zmi=yV.default=ySt.default});var $$e=ot(CV=>{"use strict";var CSt=di();Object.defineProperty(CV,"__esModule",{value:!0});CV.default=void 0;var wSt=CSt(cae()),Hmi=CV.default=wSt.default});var j$e=ot(wV=>{"use strict";var xSt=di();Object.defineProperty(wV,"__esModule",{value:!0});wV.default=void 0;var SSt=xSt(mH()),Vmi=wV.default=SSt.default});var q$e=ot(xV=>{"use strict";var kSt=di();Object.defineProperty(xV,"__esModule",{value:!0});xV.default=void 0;var LSt=kSt(pae()),Umi=xV.default=LSt.default});var G$e=ot(SV=>{"use strict";var ESt=di();Object.defineProperty(SV,"__esModule",{value:!0});SV.default=void 0;var DSt=ESt(vae()),jmi=SV.default=DSt.default});var K$e=ot(kV=>{"use strict";var TSt=di();Object.defineProperty(kV,"__esModule",{value:!0});kV.default=void 0;var ISt=TSt(gH()),Gmi=kV.default=ISt.default});var Y$e=ot(LV=>{"use strict";"use client";var MSt=di();Object.defineProperty(LV,"__esModule",{value:!0});LV.default=void 0;var NSt=MSt(aH()),Ymi=LV.default=NSt.default});var Z$e=ot(EV=>{"use strict";"use client";var ASt=di();Object.defineProperty(EV,"__esModule",{value:!0});EV.default=void 0;var RSt=ASt(xae()),Xmi=EV.default=RSt.default});var X$e=ot(DV=>{"use strict";var PSt=di();Object.defineProperty(DV,"__esModule",{value:!0});DV.default=void 0;var OSt=PSt(Lae()),Jmi=DV.default=OSt.default});var Q$e=ot(TV=>{"use strict";"use client";var zSt=di();Object.defineProperty(TV,"__esModule",{value:!0});TV.default=void 0;var FSt=zSt(Iae()),tgi=TV.default=FSt.default});var J$e=ot(IV=>{"use strict";"use client";var HSt=di();Object.defineProperty(IV,"__esModule",{value:!0});IV.default=void 0;var BSt=HSt(Nae()),ngi=IV.default=BSt.default});var eje=ot(MV=>{"use strict";"use client";var VSt=di();Object.defineProperty(MV,"__esModule",{value:!0});MV.default=void 0;var WSt=VSt(_H()),rgi=MV.default=WSt.default});var tje=ot(NV=>{"use strict";"use client";var USt=di();Object.defineProperty(NV,"__esModule",{value:!0});NV.default=void 0;var $St=USt(Uae()),agi=NV.default=$St.default});var ije=ot(fl=>{"use strict";"use client";var wd=di();Object.defineProperty(fl,"__esModule",{value:!0});Object.defineProperty(fl,"capitalize",{enumerable:!0,get:function(){return qSt.default}});Object.defineProperty(fl,"createChainedFunction",{enumerable:!0,get:function(){return GSt.default}});Object.defineProperty(fl,"createSvgIcon",{enumerable:!0,get:function(){return KSt.default}});Object.defineProperty(fl,"debounce",{enumerable:!0,get:function(){return YSt.default}});Object.defineProperty(fl,"deprecatedPropType",{enumerable:!0,get:function(){return ZSt.default}});Object.defineProperty(fl,"isMuiElement",{enumerable:!0,get:function(){return XSt.default}});Object.defineProperty(fl,"ownerDocument",{enumerable:!0,get:function(){return QSt.default}});Object.defineProperty(fl,"ownerWindow",{enumerable:!0,get:function(){return JSt.default}});Object.defineProperty(fl,"requirePropFactory",{enumerable:!0,get:function(){return ekt.default}});Object.defineProperty(fl,"setRef",{enumerable:!0,get:function(){return tkt.default}});fl.unstable_ClassNameGenerator=void 0;Object.defineProperty(fl,"unstable_useEnhancedEffect",{enumerable:!0,get:function(){return ikt.default}});Object.defineProperty(fl,"unstable_useId",{enumerable:!0,get:function(){return nkt.default}});Object.defineProperty(fl,"unsupportedProp",{enumerable:!0,get:function(){return okt.default}});Object.defineProperty(fl,"useControlled",{enumerable:!0,get:function(){return rkt.default}});Object.defineProperty(fl,"useEventCallback",{enumerable:!0,get:function(){return skt.default}});Object.defineProperty(fl,"useForkRef",{enumerable:!0,get:function(){return akt.default}});Object.defineProperty(fl,"useIsFocusVisible",{enumerable:!0,get:function(){return lkt.default}});var jSt=ur(),qSt=wd(cde()),GSt=wd(vUe()),KSt=wd(V$e()),YSt=wd(W$e()),ZSt=wd(U$e()),XSt=wd($$e()),QSt=wd(j$e()),JSt=wd(q$e()),ekt=wd(G$e()),tkt=wd(K$e()),ikt=wd(Y$e()),nkt=wd(Z$e()),okt=wd(X$e()),rkt=wd(Q$e()),skt=wd(J$e()),akt=wd(eje()),lkt=wd(tje()),cgi=fl.unstable_ClassNameGenerator={configure:i=>{jSt.unstable_ClassNameGenerator.configure(i)}}});var mC=ot(Tde=>{"use strict";"use client";Object.defineProperty(Tde,"__esModule",{value:!0});Object.defineProperty(Tde,"default",{enumerable:!0,get:function(){return ckt.createSvgIcon}});var ckt=ije()});var nje=ot(AV=>{"use strict";"use client";var dkt=di();Object.defineProperty(AV,"__esModule",{value:!0});AV.default=void 0;var ukt=dkt(mC()),hkt=zn(),hgi=AV.default=(0,ukt.default)((0,hkt.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow")});var oje=ot(RV=>{"use strict";"use client";var fkt=di();Object.defineProperty(RV,"__esModule",{value:!0});RV.default=void 0;var pkt=fkt(mC()),mkt=zn(),pgi=RV.default=(0,pkt.default)((0,mkt.jsx)("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92"}),"Share")});var rje=ot(PV=>{"use strict";"use client";var gkt=di();Object.defineProperty(PV,"__esModule",{value:!0});PV.default=void 0;var vkt=gkt(mC()),_kt=zn(),ggi=PV.default=(0,vkt.default)((0,_kt.jsx)("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkMode")});var sje=ot(OV=>{"use strict";"use client";var bkt=di();Object.defineProperty(OV,"__esModule",{value:!0});OV.default=void 0;var ykt=bkt(mC()),Ckt=zn(),_gi=OV.default=(0,ykt.default)((0,Ckt.jsx)("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightMode")});var aje=ot(zV=>{"use strict";"use client";var wkt=di();Object.defineProperty(zV,"__esModule",{value:!0});zV.default=void 0;var xkt=wkt(mC()),Skt=zn(),ygi=zV.default=(0,xkt.default)((0,Skt.jsx)("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMark")});function Ph(i,e=0){return i[i.length-(1+e)]}function lje(i){if(i.length===0)throw new Error("Invalid tail call");return[i.slice(0,i.length-1),i[i.length-1]]}function uo(i,e,t=(n,o)=>n===o){if(i===e)return!0;if(!i||!e||i.length!==e.length)return!1;for(let n=0,o=i.length;nt(i[n],e))}function kkt(i,e){let t=0,n=i-1;for(;t<=n;){let o=(t+n)/2|0,r=e(o);if(r<0)t=o+1;else if(r>0)n=o-1;else return o}return-(t+1)}function FV(i,e,t){if(i=i|0,i>=e.length)throw new TypeError("invalid index");let n=e[Math.floor(e.length*Math.random())],o=[],r=[],s=[];for(let a of e){let l=t(a,n);l<0?o.push(a):l>0?r.push(a):s.push(a)}return i!!e)}function Mde(i){let e=0;for(let t=0;t0}function Oh(i,e=t=>t){let t=new Set;return i.filter(n=>{let o=e(n);return t.has(o)?!1:(t.add(o),!0)})}function vC(i,e){return i.length>0?i[0]:e}function Ya(i,e){let t=typeof e=="number"?i:0;typeof e=="number"?t=i:(t=0,e=i);let n=[];if(t<=e)for(let o=t;oe;o--)n.push(o);return n}function v3(i,e,t){let n=i.slice(0,e),o=i.slice(e);return n.concat(t,o)}function VV(i,e){let t=i.indexOf(e);t>-1&&(i.splice(t,1),i.unshift(e))}function YD(i,e){let t=i.indexOf(e);t>-1&&(i.splice(t,1),i.push(e))}function ZD(i,e){for(let t of e)i.push(t)}function _C(i){return Array.isArray(i)?i:[i]}function Lkt(i,e,t){let n=uje(i,e),o=i.length,r=t.length;i.length=o+r;for(let s=o-1;s>=n;s--)i[s+r]=i[s];for(let s=0;se(i(t),i(n))}function hje(...i){return(e,t)=>{for(let n of i){let o=n(e,t);if(!KD.isNeitherLessOrGreaterThan(o))return o}return KD.neitherLessOrGreaterThan}}function WV(i){return(e,t)=>-i(e,t)}var KD,Nf,fje,qc,nm,Vi=P(()=>{(function(i){function e(r){return r<0}i.isLessThan=e;function t(r){return r<=0}i.isLessThanOrEqual=t;function n(r){return r>0}i.isGreaterThan=n;function o(r){return r===0}i.isNeitherLessOrGreaterThan=o,i.greaterThan=1,i.lessThan=-1,i.neitherLessOrGreaterThan=0})(KD||(KD={}));Nf=(i,e)=>i-e,fje=(i,e)=>Nf(i?1:0,e?1:0);qc=class{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;let n=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,n}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){let e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){let t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}},nm=class i{constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new i(t=>this.iterate(n=>e(n)?t(n):!0))}map(e){return new i(t=>this.iterate(n=>t(e(n))))}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(o=>((n||KD.isGreaterThan(e(o,t)))&&(n=!1,t=o),!0)),t}};nm.empty=new nm(i=>{})});function qs(i){return typeof i=="string"}function Gs(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)&&!(i instanceof RegExp)&&!(i instanceof Date)}function pje(i){let e=Object.getPrototypeOf(Uint8Array);return typeof i=="object"&&i instanceof e}function zh(i){return typeof i=="number"&&!isNaN(i)}function Ade(i){return!!i&&typeof i[Symbol.iterator]=="function"}function UV(i){return i===!0||i===!1}function $l(i){return typeof i>"u"}function om(i){return!kc(i)}function kc(i){return $l(i)||i===null}function Bn(i,e){if(!i)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function X1(i){if(kc(i))throw new Error("Assertion Failed: argument is undefined or null");return i}function _3(i){return typeof i=="function"}function mje(i,e){let t=Math.min(i.length,e.length);for(let n=0;n{});function Q1(i){if(!i||typeof i!="object"||i instanceof RegExp)return i;let e=Array.isArray(i)?[]:{};return Object.entries(i).forEach(([t,n])=>{e[t]=n&&typeof n=="object"?Q1(n):n}),e}function gje(i){if(!i||typeof i!="object")return i;let e=[i];for(;e.length>0;){let t=e.shift();Object.freeze(t);for(let n in t)if(vje.call(t,n)){let o=t[n];typeof o=="object"&&!Object.isFrozen(o)&&!pje(o)&&e.push(o)}}return i}function $V(i,e){return Rde(i,e,new Set)}function Rde(i,e,t){if(kc(i))return i;let n=e(i);if(typeof n<"u")return n;if(Array.isArray(i)){let o=[];for(let r of i)o.push(Rde(r,e,t));return o}if(Gs(i)){if(t.has(i))throw new Error("Cannot clone recursive data-structure");t.add(i);let o={};for(let r in i)vje.call(i,r)&&(o[r]=Rde(i[r],e,t));return t.delete(i),o}return i}function i5(i,e,t=!0){return Gs(i)?(Gs(e)&&Object.keys(e).forEach(n=>{n in i?t&&(Gs(i[n])&&Gs(e[n])?i5(i[n],e[n],t):i[n]=e[n]):i[n]=e[n]}),i):e}function Za(i,e){if(i===e)return!0;if(i==null||e===null||e===void 0||typeof i!=typeof e||typeof i!="object"||Array.isArray(i)!==Array.isArray(e))return!1;let t,n;if(Array.isArray(i)){if(i.length!==e.length)return!1;for(t=0;tfunction(){let r=Array.prototype.slice.call(arguments,0);return e(o,r)},n={};for(let o of i)n[o]=t(o);return n}var vje,Gc=P(()=>{ho();vje=Object.prototype.hasOwnProperty});function bje(i,e){let t;return e.length===0?t=i:t=i.replace(/\{(\d+)\}/g,(n,o)=>{let r=o[0],s=e[r],a=n;return typeof s=="string"?a=s:(typeof s=="number"||typeof s=="boolean"||s===void 0||s===null)&&(a=String(s)),a}),Tkt&&(t="\uFF3B"+t.replace(/[aouei]/g,"$&$&")+"\uFF3D"),t}function g(i,e,...t){return bje(e,t)}function Kc(i,e,...t){let n=bje(e,t);return{value:n,original:n}}var Tkt,Wt=P(()=>{Tkt=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0});function YV(){if(!wje){wje=!0;let i=new Uint8Array(2);i[0]=1,i[1]=2,Cje=new Uint16Array(i.buffer)[0]===513}return Cje}var Pde,yC,QD,JD,XD,Ikt,xje,zde,Mkt,Fde,Nkt,Sje,jV,qV,yje,Akt,rm,V0,xd,kje,Rkt,Ode,hr,Wi,Ar,tu,Fh,Pkt,Lje,Lc,GV,Eg,Eje,Okt,KV,Xa,Cje,wje,Hde,Dje,Tje,Ije,Mje,Mn=P(()=>{Wt();yC="en",QD=!1,JD=!1,XD=!1,Ikt=!1,xje=!1,zde=!1,Mkt=!1,Fde=!1,Nkt=!1,Sje=!1,qV=yC,yje=yC,V0=globalThis;typeof V0.vscode<"u"&&typeof V0.vscode.process<"u"?xd=V0.vscode.process:typeof process<"u"&&(xd=process);kje=typeof((Pde=xd?.versions)===null||Pde===void 0?void 0:Pde.electron)=="string",Rkt=kje&&xd?.type==="renderer";if(typeof xd=="object"){QD=xd.platform==="win32",JD=xd.platform==="darwin",XD=xd.platform==="linux",Ikt=XD&&!!xd.env.SNAP&&!!xd.env.SNAP_REVISION,Mkt=kje,Nkt=!!xd.env.CI||!!xd.env.BUILD_ARTIFACTSTAGINGDIRECTORY,jV=yC,qV=yC;let i=xd.env.VSCODE_NLS_CONFIG;if(i)try{let e=JSON.parse(i),t=e.availableLanguages["*"];jV=e.locale,yje=e.osLocale,qV=t||yC,Akt=e._translationsConfigFile}catch{}xje=!0}else typeof navigator=="object"&&!Rkt?(rm=navigator.userAgent,QD=rm.indexOf("Windows")>=0,JD=rm.indexOf("Macintosh")>=0,Fde=(rm.indexOf("Macintosh")>=0||rm.indexOf("iPad")>=0||rm.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,XD=rm.indexOf("Linux")>=0,Sje=rm?.indexOf("Mobi")>=0,zde=!0,jV=(g({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"),void 0)||yC,qV=jV,yje=navigator.language):console.error("Unable to resolve platform.");Ode=0;JD?Ode=1:QD?Ode=3:XD&&(Ode=2);hr=QD,Wi=JD,Ar=XD,tu=xje,Fh=zde,Pkt=zde&&typeof V0.importScripts=="function",Lje=Pkt?V0.origin:void 0,Lc=Fde,GV=Sje,Eg=rm,Eje=qV,Okt=typeof V0.postMessage=="function"&&!V0.importScripts,KV=(()=>{if(Okt){let i=[];V0.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,o=i.length;n{let n=++e;i.push({id:n,callback:t}),V0.postMessage({vscodeScheduleAsyncWork:n},"*")}}return i=>setTimeout(i)})(),Xa=JD||Fde?2:QD?1:3,Cje=!0,wje=!1;Hde=!!(Eg&&Eg.indexOf("Chrome")>=0),Dje=!!(Eg&&Eg.indexOf("Firefox")>=0),Tje=!!(!Hde&&Eg&&Eg.indexOf("Safari")>=0),Ije=!!(Eg&&Eg.indexOf("Edg/")>=0),Mje=!!(Eg&&Eg.indexOf("Android")>=0)});var Ma,eT=P(()=>{Ma={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}});var un,Yc=P(()=>{(function(i){function e(b){return b&&typeof b=="object"&&typeof b[Symbol.iterator]=="function"}i.is=e;let t=Object.freeze([]);function n(){return t}i.empty=n;function*o(b){yield b}i.single=o;function r(b){return e(b)?b:o(b)}i.wrap=r;function s(b){return b||t}i.from=s;function*a(b){for(let C=b.length-1;C>=0;C--)yield b[C]}i.reverse=a;function l(b){return!b||b[Symbol.iterator]().next().done===!0}i.isEmpty=l;function c(b){return b[Symbol.iterator]().next().value}i.first=c;function d(b,C){for(let w of b)if(C(w))return!0;return!1}i.some=d;function u(b,C){for(let w of b)if(C(w))return w}i.find=u;function*h(b,C){for(let w of b)C(w)&&(yield w)}i.filter=h;function*f(b,C){let w=0;for(let S of b)yield C(S,w++)}i.map=f;function*p(...b){for(let C of b)yield*C}i.concat=p;function m(b,C,w){let S=w;for(let x of b)S=C(S,x);return S}i.reduce=m;function*y(b,C,w=b.length){for(C<0&&(C+=b.length),w<0?w+=b.length:w>b.length&&(w=b.length);C{Ps=class i{constructor(e){this.element=e,this.next=i.Undefined,this.prev=i.Undefined}};Ps.Undefined=new Ps(void 0);$r=class{constructor(){this._first=Ps.Undefined,this._last=Ps.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Ps.Undefined}clear(){let e=this._first;for(;e!==Ps.Undefined;){let t=e.next;e.prev=Ps.Undefined,e.next=Ps.Undefined,e=t}this._first=Ps.Undefined,this._last=Ps.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let n=new Ps(e);if(this._first===Ps.Undefined)this._first=n,this._last=n;else if(t){let r=this._last;this._last=n,n.prev=r,r.next=n}else{let r=this._first;this._first=n,n.next=r,r.prev=n}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(n))}}shift(){if(this._first!==Ps.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Ps.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Ps.Undefined&&e.next!==Ps.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Ps.Undefined&&e.next===Ps.Undefined?(this._first=Ps.Undefined,this._last=Ps.Undefined):e.next===Ps.Undefined?(this._last=this._last.prev,this._last.next=Ps.Undefined):e.prev===Ps.Undefined&&(this._first=this._first.next,this._first.prev=Ps.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Ps.Undefined;)yield e.element,e=e.next}}});function zkt(i=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let t of Bde)i.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}function iT(i){let e=tT;if(i&&i instanceof RegExp)if(i.global)e=i;else{let t="g";i.ignoreCase&&(t+="i"),i.multiline&&(t+="m"),i.unicode&&(t+="u"),e=new RegExp(i.source,t)}return e.lastIndex=0,e}function b3(i,e,t,n,o){if(e=iT(e),o||(o=un.first(Nje)),t.length>o.maxLen){let c=i-o.maxLen/2;return c<0?c=0:n+=c,t=t.substring(c,i+o.maxLen/2),b3(i,e,t,n,o)}let r=Date.now(),s=i-1-n,a=-1,l=null;for(let c=1;!(Date.now()-r>=o.timeBudget);c++){let d=s-o.windowSize*c;e.lastIndex=Math.max(0,d);let u=Fkt(e,t,s,a);if(!u&&l||(l=u,d<=0))break;a=d}if(l){let c={word:l[0],startColumn:n+1+l.index,endColumn:n+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function Fkt(i,e,t,n){let o;for(;o=i.exec(e);){let r=o.index||0;if(r<=t&&i.lastIndex>=t)return o;if(n>0&&r>n)return null}return null}var Bde,tT,Nje,CC=P(()=>{Yc();Hh();Bde="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";tT=zkt();Nje=new $r;Nje.unshift({maxLen:1e3,windowSize:15,timeBudget:150})});function ZV(i,e){if(typeof i!="object"||typeof e!="object"||!i||!e)return new y3(e,i!==e);if(Array.isArray(i)||Array.isArray(e)){let n=Array.isArray(i)&&Array.isArray(e)&&uo(i,e);return new y3(e,!n)}let t=!1;for(let n in e)if(e.hasOwnProperty(n)){let o=ZV(i[n],e[n]);o.didChange&&(i[n]=o.newValue,t=!0)}return new y3(i,t)}function Ti(i,e){return typeof i>"u"?e:i==="false"?!1:!!i}function x3(i,e,t,n){if(typeof i>"u")return e;let o=parseInt(i,10);return isNaN(o)?e:(o=Math.max(t,o),o=Math.min(n,o),o|0)}function Rje(i,e,t,n){if(typeof i>"u")return e;let o=J1.float(i,e);return J1.clamp(o,t,n)}function ws(i,e,t,n){return typeof i!="string"?e:n&&i in n?n[i]:t.indexOf(i)===-1?e:i}function Hkt(i){switch(i){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}function Bkt(i){switch(i){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}function Vkt(i){switch(i){case"line":return Na.Line;case"block":return Na.Block;case"underline":return Na.Underline;case"line-thin":return Na.LineThin;case"block-outline":return Na.BlockOutline;case"underline-thin":return Na.UnderlineThin}}function Wkt(i){return i==="ctrlCmd"?Wi?"metaKey":"ctrlKey":"altKey"}function r5(i){let e=i.get(97);return e==="editable"?i.get(90):e!=="on"}function Aje(i,e){if(typeof i!="string")return e;switch(i){case"hidden":return 2;case"visible":return 3;default:return 1}}function xC(i,e,t){let n=t.indexOf(i);return n===-1?e:t[n]}function Vt(i){return S3[i.id]=i,i}var W0,SC,nT,Rr,y3,o5,C3,Qn,Qo,J1,iu,jr,wC,Vde,Wde,Na,Ude,$de,jde,qu,w3,qde,Gde,kC,Kde,Yde,oT,Zde,Af,Xde,Qde,Jde,eue,tue,iue,nue,oue,rue,sue,aue,lue,cue,due,ju,Sd,uue,hue,fue,pue,mue,gue,vue,_ue,bue,yue,Ukt,$kt,jkt,ml,S3,nu,Ks=P(()=>{Vi();Gc();Mn();eT();CC();Wt();W0=8,SC=class{constructor(e){this._values=e}hasChanged(e){return this._values[e]}},nT=class{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}},Rr=class{constructor(e,t,n,o){this.id=e,this.name=t,this.defaultValue=n,this.schema=o}applyUpdate(e,t){return ZV(e,t)}compute(e,t,n){return n}},y3=class{constructor(e,t){this.newValue=e,this.didChange=t}};o5=class{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return ZV(e,t)}validate(e){return this.defaultValue}},C3=class{constructor(e,t,n,o){this.id=e,this.name=t,this.defaultValue=n,this.schema=o}applyUpdate(e,t){return ZV(e,t)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,n){return n}};Qn=class extends C3{constructor(e,t,n,o=void 0){typeof o<"u"&&(o.type="boolean",o.default=n),super(e,t,n,o)}validate(e){return Ti(e,this.defaultValue)}};Qo=class i extends C3{static clampedInt(e,t,n,o){return x3(e,t,n,o)}constructor(e,t,n,o,r,s=void 0){typeof s<"u"&&(s.type="integer",s.default=n,s.minimum=o,s.maximum=r),super(e,t,n,s),this.minimum=o,this.maximum=r}validate(e){return i.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}};J1=class i extends C3{static clamp(e,t,n){return en?n:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;let n=parseFloat(e);return isNaN(n)?t:n}constructor(e,t,n,o,r){typeof r<"u"&&(r.type="number",r.default=n),super(e,t,n,r),this.validationFn=o}validate(e){return this.validationFn(i.float(e,this.defaultValue))}},iu=class i extends C3{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,n,o=void 0){typeof o<"u"&&(o.type="string",o.default=n),super(e,t,n,o)}validate(e){return i.string(e,this.defaultValue)}};jr=class extends C3{constructor(e,t,n,o,r=void 0){typeof r<"u"&&(r.type="string",r.enum=o,r.default=n),super(e,t,n,r),this._allowedValues=o}validate(e){return ws(e,this.defaultValue,this._allowedValues)}},wC=class extends Rr{constructor(e,t,n,o,r,s,a=void 0){typeof a<"u"&&(a.type="string",a.enum=r,a.default=o),super(e,t,n,a),this._allowedValues=r,this._convert=s}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}};Vde=class extends Rr{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[g("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),g("accessibilitySupport.on","Optimize for usage with a Screen Reader."),g("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:g("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,n){return n===0?e.accessibilitySupport:n}},Wde=class extends Rr{constructor(){let e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:g("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:g("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;let t=e;return{insertSpace:Ti(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:Ti(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}};(function(i){i[i.Line=1]="Line",i[i.Block=2]="Block",i[i.Underline=3]="Underline",i[i.LineThin=4]="LineThin",i[i.BlockOutline=5]="BlockOutline",i[i.UnderlineThin=6]="UnderlineThin"})(Na||(Na={}));Ude=class extends o5{constructor(){super(140)}compute(e,t,n){let o=["monaco-editor"];return t.get(39)&&o.push(t.get(39)),e.extraEditorClassName&&o.push(e.extraEditorClassName),t.get(73)==="default"?o.push("mouse-default"):t.get(73)==="copy"&&o.push("mouse-copy"),t.get(110)&&o.push("showUnused"),t.get(138)&&o.push("showDeprecated"),o.join(" ")}},$de=class extends Qn{constructor(){super(37,"emptySelectionClipboard",!0,{description:g("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,n){return n&&e.emptySelectionClipboard}},jde=class extends Rr{constructor(){let e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:g("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:[g("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),g("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),g("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:g("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:[g("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),g("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),g("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:g("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:g("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:Wi},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:g("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:g("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;let t=e;return{cursorMoveOnType:Ti(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":ws(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":ws(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:Ti(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:Ti(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:Ti(t.loop,this.defaultValue.loop)}}},qu=class i extends Rr{constructor(){super(51,"fontLigatures",i.OFF,{anyOf:[{type:"boolean",description:g("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:g("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:g("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"||e.length===0?i.OFF:e==="true"?i.ON:e:e?i.ON:i.OFF}};qu.OFF='"liga" off, "calt" off';qu.ON='"liga" on, "calt" on';w3=class i extends Rr{constructor(){super(54,"fontVariations",i.OFF,{anyOf:[{type:"boolean",description:g("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:g("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:g("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"?i.OFF:e==="true"?i.TRANSLATE:e:e?i.TRANSLATE:i.OFF}compute(e,t,n){return e.fontInfo.fontVariationSettings}};w3.OFF="normal";w3.TRANSLATE="translate";qde=class extends o5{constructor(){super(50)}compute(e,t,n){return e.fontInfo}},Gde=class extends C3{constructor(){super(52,"fontSize",ml.fontSize,{type:"number",minimum:6,maximum:100,default:ml.fontSize,description:g("fontSize","Controls the font size in pixels.")})}validate(e){let t=J1.float(e,this.defaultValue);return t===0?ml.fontSize:J1.clamp(t,6,100)}compute(e,t,n){return e.fontInfo.fontSize}},kC=class i extends Rr{constructor(){super(53,"fontWeight",ml.fontWeight,{anyOf:[{type:"number",minimum:i.MINIMUM_VALUE,maximum:i.MAXIMUM_VALUE,errorMessage:g("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:i.SUGGESTION_VALUES}],default:ml.fontWeight,description:g("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(Qo.clampedInt(e,ml.fontWeight,i.MINIMUM_VALUE,i.MAXIMUM_VALUE))}};kC.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];kC.MINIMUM_VALUE=1;kC.MAXIMUM_VALUE=1e3;Kde=class extends Rr{constructor(){let 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:[g("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),g("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),g("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},n=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:g("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:g("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:g("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:g("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:g("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:g("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:n,description:g("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:n,description:g("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:n,description:g("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:n,description:g("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:n,description:g("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,n,o,r,s;if(!e||typeof e!="object")return this.defaultValue;let a=e;return{multiple:ws(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:ws(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(n=a.multipleTypeDefinitions)!==null&&n!==void 0?n:ws(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(o=a.multipleDeclarations)!==null&&o!==void 0?o:ws(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(r=a.multipleImplementations)!==null&&r!==void 0?r:ws(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(s=a.multipleReferences)!==null&&s!==void 0?s:ws(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:iu.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:iu.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:iu.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:iu.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:iu.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}},Yde=class extends Rr{constructor(){let e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:g("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:g("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:g("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:g("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:g("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Ti(t.enabled,this.defaultValue.enabled),delay:Qo.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:Ti(t.sticky,this.defaultValue.sticky),hidingDelay:Qo.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:Ti(t.above,this.defaultValue.above)}}},oT=class i extends o5{constructor(){super(143)}compute(e,t,n){return i.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){let t=e.height/e.lineHeight,n=Math.floor(e.paddingTop/e.lineHeight),o=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(o=Math.max(o,t-1));let r=(n+e.viewLineCount+o)/(e.pixelRatio*e.height),s=Math.floor(e.viewLineCount/r);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:n,extraLinesBeyondLastLine:o,desiredRatio:r,minimapLineCount:s}}static _computeMinimapLayout(e,t){let n=e.outerWidth,o=e.outerHeight,r=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(r*o),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:o};let s=t.stableMinimapLayoutInput,a=s&&e.outerHeight===s.outerHeight&&e.lineHeight===s.lineHeight&&e.typicalHalfwidthCharacterWidth===s.typicalHalfwidthCharacterWidth&&e.pixelRatio===s.pixelRatio&&e.scrollBeyondLastLine===s.scrollBeyondLastLine&&e.paddingTop===s.paddingTop&&e.paddingBottom===s.paddingBottom&&e.minimap.enabled===s.minimap.enabled&&e.minimap.side===s.minimap.side&&e.minimap.size===s.minimap.size&&e.minimap.showSlider===s.minimap.showSlider&&e.minimap.renderCharacters===s.minimap.renderCharacters&&e.minimap.maxColumn===s.minimap.maxColumn&&e.minimap.scale===s.minimap.scale&&e.verticalScrollbarWidth===s.verticalScrollbarWidth&&e.isViewportWrapping===s.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,d=e.scrollBeyondLastLine,u=e.minimap.renderCharacters,h=r>=2?Math.round(e.minimap.scale*2):e.minimap.scale,f=e.minimap.maxColumn,p=e.minimap.size,m=e.minimap.side,y=e.verticalScrollbarWidth,_=e.viewLineCount,v=e.remainingWidth,b=e.isViewportWrapping,C=u?2:3,w=Math.floor(r*o),S=w/r,x=!1,k=!1,D=C*h,E=h/r,A=1;if(p==="fill"||p==="fit"){let{typicalViewportLineCount:F,extraLinesBeforeFirstLine:V,extraLinesBeyondLastLine:ie,desiredRatio:fe,minimapLineCount:K}=i.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:d,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:o,lineHeight:l,pixelRatio:r});if(_/K>1)x=!0,k=!0,h=1,D=1,E=h/r;else{let je=!1,Ae=h+1;if(p==="fit"){let Be=Math.ceil((V+_+ie)*D);b&&a&&v<=t.stableFitRemainingWidth?(je=!0,Ae=t.stableFitMaxMinimapScale):je=Be>w}if(p==="fill"||je){x=!0;let Be=h;D=Math.min(l*r,Math.max(1,Math.floor(1/fe))),b&&a&&v<=t.stableFitRemainingWidth&&(Ae=t.stableFitMaxMinimapScale),h=Math.min(Ae,Math.max(1,Math.floor(D/C))),h>Be&&(A=Math.min(2,h/Be)),E=h/r/A,w=Math.ceil(Math.max(F,V+_+ie)*D),b?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=v,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}let T=Math.floor(f*E),L=Math.min(T,Math.max(0,Math.floor((v-y-2)*E/(c+E)))+W0),I=Math.floor(r*L),M=I/r;I=Math.floor(I*A);let N=u?1:2,z=m==="left"?0:n-L-y;return{renderMinimap:N,minimapLeft:z,minimapWidth:L,minimapHeightIsEditorHeight:x,minimapIsSampling:k,minimapScale:h,minimapLineHeight:D,minimapCanvasInnerWidth:I,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:M,minimapCanvasOuterHeight:S}}static computeLayout(e,t){let n=t.outerWidth|0,o=t.outerHeight|0,r=t.lineHeight|0,s=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,c=t.pixelRatio,d=t.viewLineCount,u=e.get(135),h=u==="inherit"?e.get(134):u,f=h==="inherit"?e.get(130):h,p=e.get(133),m=t.isDominatedByLongLines,y=e.get(57),_=e.get(67).renderType!==0,v=e.get(68),b=e.get(104),C=e.get(83),w=e.get(72),S=e.get(102),x=S.verticalScrollbarSize,k=S.verticalHasArrows,D=S.arrowSize,E=S.horizontalScrollbarSize,A=e.get(43),T=e.get(109)!=="never",L=e.get(65);A&&T&&(L+=16);let I=0;if(_){let ee=Math.max(s,v);I=Math.round(ee*l)}let M=0;y&&(M=r*t.glyphMarginDecorationLaneCount);let N=0,z=N+M,F=z+I,V=F+L,ie=n-M-I-L,fe=!1,K=!1,oe=-1;h==="inherit"&&m?(fe=!0,K=!0):f==="on"||f==="bounded"?K=!0:f==="wordWrapColumn"&&(oe=p);let je=i._computeMinimapLayout({outerWidth:n,outerHeight:o,lineHeight:r,typicalHalfwidthCharacterWidth:a,pixelRatio:c,scrollBeyondLastLine:b,paddingTop:C.top,paddingBottom:C.bottom,minimap:w,verticalScrollbarWidth:x,viewLineCount:d,remainingWidth:ie,isViewportWrapping:K},t.memory||new nT);je.renderMinimap!==0&&je.minimapLeft===0&&(N+=je.minimapWidth,z+=je.minimapWidth,F+=je.minimapWidth,V+=je.minimapWidth);let Ae=ie-je.minimapWidth,Be=Math.max(1,Math.floor((Ae-x-2)/a)),Ie=k?D:0;return K&&(oe=Math.max(1,Be),f==="bounded"&&(oe=Math.min(oe,p))),{width:n,height:o,glyphMarginLeft:N,glyphMarginWidth:M,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:z,lineNumbersWidth:I,decorationsLeft:F,decorationsWidth:L,contentLeft:V,contentWidth:Ae,minimap:je,viewportColumn:Be,isWordWrapMinified:fe,isViewportWrapping:K,wrappingColumn:oe,verticalScrollbarWidth:x,horizontalScrollbarHeight:E,overviewRuler:{top:Ie,width:x,height:o-2*Ie,right:0}}}},Zde=class extends Rr{constructor(){super(137,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[g("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."),g("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:g("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 ws(e,"simple",["simple","advanced"])}compute(e,t,n){return t.get(2)===2?"advanced":n}};(function(i){i.Off="off",i.OnCode="onCode",i.On="on"})(Af||(Af={}));Xde=class extends Rr{constructor(){let e={enabled:Af.OnCode};super(64,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[Af.Off,Af.OnCode,Af.On],default:e.enabled,enumDescriptions:[g("editor.lightbulb.enabled.off","Disable the code action menu."),g("editor.lightbulb.enabled.onCode","Show the code action menu when the cursor is on lines with code."),g("editor.lightbulb.enabled.on","Show the code action menu when the cursor is on lines with code or on empty lines.")],description:g("enabled","Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:ws(e.enabled,this.defaultValue.enabled,[Af.Off,Af.OnCode,Af.On])}}},Qde=class extends Rr{constructor(){let e={enabled:!1,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(114,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:g("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:10,description:g("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:g("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:g("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Ti(t.enabled,this.defaultValue.enabled),maxLineCount:Qo.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:ws(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:Ti(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}},Jde=class extends Rr{constructor(){let e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(139,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:g("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[g("editor.inlayHints.on","Inlay hints are enabled"),g("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",Wi?"Ctrl+Option":"Ctrl+Alt"),g("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",Wi?"Ctrl+Option":"Ctrl+Alt"),g("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:g("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:g("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:g("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:ws(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Qo.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:iu.string(t.fontFamily,this.defaultValue.fontFamily),padding:Ti(t.padding,this.defaultValue.padding)}}},eue=class extends Rr{constructor(){super(65,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):Qo.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,n){return n<0?Qo.clampedInt(-n*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):n}},tue=class extends J1{constructor(){super(66,"lineHeight",ml.lineHeight,e=>J1.clamp(e,0,150),{markdownDescription:g("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,n){return e.fontInfo.lineHeight}},iue=class extends Rr{constructor(){let e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(72,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:g("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:g("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[g("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),g("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),g("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:g("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:g("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:g("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:g("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:g("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:g("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;let t=e;return{enabled:Ti(t.enabled,this.defaultValue.enabled),autohide:Ti(t.autohide,this.defaultValue.autohide),size:ws(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:ws(t.side,this.defaultValue.side,["right","left"]),showSlider:ws(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:Ti(t.renderCharacters,this.defaultValue.renderCharacters),scale:Qo.clampedInt(t.scale,1,1,3),maxColumn:Qo.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}};nue=class extends Rr{constructor(){super(83,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:g("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:g("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;let t=e;return{top:Qo.clampedInt(t.top,0,0,1e3),bottom:Qo.clampedInt(t.bottom,0,0,1e3)}}},oue=class extends Rr{constructor(){let e={enabled:!0,cycle:!0};super(85,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:g("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:g("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;let t=e;return{enabled:Ti(t.enabled,this.defaultValue.enabled),cycle:Ti(t.cycle,this.defaultValue.cycle)}}},rue=class extends o5{constructor(){super(141)}compute(e,t,n){return e.pixelRatio}},sue=class extends Rr{constructor(){let e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[g("on","Quick suggestions show inside the suggest widget"),g("inline","Quick suggestions show as ghost text"),g("off","Quick suggestions are disabled")]}];super(88,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:g("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:g("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:g("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:g("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"){let c=e?"on":"off";return{comments:c,strings:c,other:c}}if(!e||typeof e!="object")return this.defaultValue;let{other:t,comments:n,strings:o}=e,r=["on","inline","off"],s,a,l;return typeof t=="boolean"?s=t?"on":"off":s=ws(t,this.defaultValue.other,r),typeof n=="boolean"?a=n?"on":"off":a=ws(n,this.defaultValue.comments,r),typeof o=="boolean"?l=o?"on":"off":l=ws(o,this.defaultValue.strings,r),{other:s,comments:a,strings:l}}},aue=class extends Rr{constructor(){super(67,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[g("lineNumbers.off","Line numbers are not rendered."),g("lineNumbers.on","Line numbers are rendered as absolute number."),g("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),g("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:g("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,n=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(t=4,n=e):e==="interval"?t=3:e==="relative"?t=2:e==="on"?t=1:t=0),{renderType:t,renderFn:n}}};lue=class extends Rr{constructor(){let e=[],t={type:"number",description:g("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(101,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:g("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:g("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)){let t=[];for(let n of e)if(typeof n=="number")t.push({column:Qo.clampedInt(n,0,0,1e4),color:null});else if(n&&typeof n=="object"){let o=n;t.push({column:Qo.clampedInt(o.column,0,0,1e4),color:o.color})}return t.sort((n,o)=>n.column-o.column),t}return this.defaultValue}},cue=class extends Rr{constructor(){super(91,"readOnlyMessage",void 0)}validate(e){return!e||typeof e!="object"?this.defaultValue:e}};due=class extends Rr{constructor(){let e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(102,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[g("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),g("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),g("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:g("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[g("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),g("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),g("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:g("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:g("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:g("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:g("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:e.ignoreHorizontalScrollbarInContentHeight,description:g("scrollbar.ignoreHorizontalScrollbarInContentHeight","When set, the horizontal scrollbar will not increase the size of the editor's content.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e,n=Qo.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),o=Qo.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Qo.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Aje(t.vertical,this.defaultValue.vertical),horizontal:Aje(t.horizontal,this.defaultValue.horizontal),useShadows:Ti(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:Ti(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:Ti(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:Ti(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:Ti(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:n,horizontalSliderSize:Qo.clampedInt(t.horizontalSliderSize,n,0,1e3),verticalScrollbarSize:o,verticalSliderSize:Qo.clampedInt(t.verticalSliderSize,o,0,1e3),scrollByPage:Ti(t.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:Ti(t.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}},ju="inUntrustedWorkspace",Sd={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"},uue=class extends Rr{constructor(){let e={nonBasicASCII:ju,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:ju,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(124,"unicodeHighlight",e,{[Sd.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,ju],default:e.nonBasicASCII,description:g("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.")},[Sd.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:g("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[Sd.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:g("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.")},[Sd.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,ju],default:e.includeComments,description:g("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[Sd.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,ju],default:e.includeStrings,description:g("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[Sd.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:g("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[Sd.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:g("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let n=!1;t.allowedCharacters&&e&&(Za(e.allowedCharacters,t.allowedCharacters)||(e={...e,allowedCharacters:t.allowedCharacters},n=!0)),t.allowedLocales&&e&&(Za(e.allowedLocales,t.allowedLocales)||(e={...e,allowedLocales:t.allowedLocales},n=!0));let o=super.applyUpdate(e,t);return n?new b3(o.newValue,!0):o}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{nonBasicASCII:xC(t.nonBasicASCII,ju,[!0,!1,ju]),invisibleCharacters:Ti(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:Ti(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:xC(t.includeComments,ju,[!0,!1,ju]),includeStrings:xC(t.includeStrings,ju,[!0,!1,ju]),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;let n={};for(let[o,r]of Object.entries(e))r===!0&&(n[o]=!0);return n}},hue=class extends Rr{constructor(){let e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1,fontFamily:"default"};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:g("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[g("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),g("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),g("inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:g("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:g("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")},"editor.inlineSuggest.fontFamily":{type:"string",default:e.fontFamily,description:g("inlineSuggest.fontFamily","Controls the font family of the inline suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Ti(t.enabled,this.defaultValue.enabled),mode:ws(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:ws(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:Ti(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:Ti(t.keepOnBlur,this.defaultValue.keepOnBlur),fontFamily:iu.string(t.fontFamily,this.defaultValue.fontFamily)}}},fue=class extends Rr{constructor(){let e={enabled:Ma.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:Ma.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:g("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:g("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Ti(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:Ti(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}},pue=class extends Rr{constructor(){let e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[g("editor.guides.bracketPairs.true","Enables bracket pair guides."),g("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),g("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:g("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[g("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),g("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),g("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:g("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:g("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:g("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[g("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),g("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),g("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:g("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{bracketPairs:xC(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:xC(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:Ti(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:Ti(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:xC(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}};mue=class extends Rr{constructor(){let e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(117,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[g("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),g("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:g("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:g("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:g("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:g("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:[g("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),g("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),g("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),g("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:g("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:g("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:g("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:g("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:g("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:g("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:g("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:g("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:g("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:g("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:g("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{insertMode:ws(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:Ti(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:Ti(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:Ti(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:Ti(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:ws(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:Ti(t.showIcons,this.defaultValue.showIcons),showStatusBar:Ti(t.showStatusBar,this.defaultValue.showStatusBar),preview:Ti(t.preview,this.defaultValue.preview),previewMode:ws(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:Ti(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:Ti(t.showMethods,this.defaultValue.showMethods),showFunctions:Ti(t.showFunctions,this.defaultValue.showFunctions),showConstructors:Ti(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:Ti(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:Ti(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:Ti(t.showFields,this.defaultValue.showFields),showVariables:Ti(t.showVariables,this.defaultValue.showVariables),showClasses:Ti(t.showClasses,this.defaultValue.showClasses),showStructs:Ti(t.showStructs,this.defaultValue.showStructs),showInterfaces:Ti(t.showInterfaces,this.defaultValue.showInterfaces),showModules:Ti(t.showModules,this.defaultValue.showModules),showProperties:Ti(t.showProperties,this.defaultValue.showProperties),showEvents:Ti(t.showEvents,this.defaultValue.showEvents),showOperators:Ti(t.showOperators,this.defaultValue.showOperators),showUnits:Ti(t.showUnits,this.defaultValue.showUnits),showValues:Ti(t.showValues,this.defaultValue.showValues),showConstants:Ti(t.showConstants,this.defaultValue.showConstants),showEnums:Ti(t.showEnums,this.defaultValue.showEnums),showEnumMembers:Ti(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:Ti(t.showKeywords,this.defaultValue.showKeywords),showWords:Ti(t.showWords,this.defaultValue.showWords),showColors:Ti(t.showColors,this.defaultValue.showColors),showFiles:Ti(t.showFiles,this.defaultValue.showFiles),showReferences:Ti(t.showReferences,this.defaultValue.showReferences),showFolders:Ti(t.showFolders,this.defaultValue.showFolders),showTypeParameters:Ti(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:Ti(t.showSnippets,this.defaultValue.showSnippets),showUsers:Ti(t.showUsers,this.defaultValue.showUsers),showIssues:Ti(t.showIssues,this.defaultValue.showIssues)}}},gue=class extends Rr{constructor(){super(112,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:g("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:g("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:Ti(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:Ti(e.selectSubwords,this.defaultValue.selectSubwords)}}},vue=class extends Rr{constructor(){super(136,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[g("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),g("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),g("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),g("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:g("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,n){return t.get(2)===2?0:n}},_ue=class extends o5{constructor(){super(144)}compute(e,t,n){let o=t.get(143);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:o.isWordWrapMinified,isViewportWrapping:o.isViewportWrapping,wrappingColumn:o.wrappingColumn}}},bue=class extends Rr{constructor(){let e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:g("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down the `Shift` key (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:g("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[g("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),g("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Ti(t.enabled,this.defaultValue.enabled),showDropSelector:ws(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}},yue=class extends Rr{constructor(){let e={enabled:!0,showPasteSelector:"afterPaste"};super(84,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:g("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:g("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[g("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),g("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Ti(t.enabled,this.defaultValue.enabled),showPasteSelector:ws(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}},Ukt="Consolas, 'Courier New', monospace",$kt="Menlo, Monaco, 'Courier New', monospace",jkt="'Droid Sans Mono', 'monospace', monospace",ml={fontFamily:Wi?$kt:Ar?jkt:Ukt,fontWeight:"normal",fontSize:Wi?12:14,lineHeight:0,letterSpacing:0},x3=[];nu={acceptSuggestionOnCommitCharacter:Vt(new Qn(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:g("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:Vt(new jr(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",g("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:g("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:Vt(new Vde),accessibilityPageSize:Vt(new Qo(3,"accessibilityPageSize",10,1,1073741824,{description:g("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:Vt(new iu(4,"ariaLabel",g("editorViewAccessibleLabel","Editor content"))),ariaRequired:Vt(new Qn(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:Vt(new Qn(8,"screenReaderAnnounceInlineSuggestion",!0,{description:g("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:Vt(new jr(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",g("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),g("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:g("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:Vt(new jr(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",g("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),g("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:g("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:Vt(new jr(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",g("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:g("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:Vt(new jr(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",g("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:g("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:Vt(new jr(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",g("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),g("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:g("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:Vt(new wC(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],Hkt,{enumDescriptions:[g("editor.autoIndent.none","The editor will not insert indentation automatically."),g("editor.autoIndent.keep","The editor will keep the current line's indentation."),g("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),g("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),g("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:g("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:Vt(new Qn(13,"automaticLayout",!1)),autoSurround:Vt(new jr(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[g("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),g("editor.autoSurround.quotes","Surround with quotes but not brackets."),g("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:g("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:Vt(new fue),bracketPairGuides:Vt(new pue),stickyTabStops:Vt(new Qn(115,"stickyTabStops",!1,{description:g("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:Vt(new Qn(17,"codeLens",!0,{description:g("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:Vt(new iu(18,"codeLensFontFamily","",{description:g("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:Vt(new Qo(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:g("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:Vt(new Qn(20,"colorDecorators",!0,{description:g("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:Vt(new jr(146,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[g("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),g("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),g("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:g("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:Vt(new Qo(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:g("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:Vt(new Qn(22,"columnSelection",!1,{description:g("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:Vt(new Wde),contextmenu:Vt(new Qn(24,"contextmenu",!0)),copyWithSyntaxHighlighting:Vt(new Qn(25,"copyWithSyntaxHighlighting",!0,{description:g("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:Vt(new wC(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],Bkt,{description:g("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:Vt(new jr(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[g("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),g("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),g("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:g("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:Vt(new wC(28,"cursorStyle",Na.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],Vkt,{description:g("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:Vt(new Qo(29,"cursorSurroundingLines",0,0,1073741824,{description:g("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:Vt(new jr(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[g("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),g("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:g("cursorSurroundingLinesStyle","Controls when `#cursorSurroundingLines#` should be enforced.")})),cursorWidth:Vt(new Qo(31,"cursorWidth",0,0,1073741824,{markdownDescription:g("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:Vt(new Qn(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:Vt(new Qn(33,"disableMonospaceOptimizations",!1)),domReadOnly:Vt(new Qn(34,"domReadOnly",!1)),dragAndDrop:Vt(new Qn(35,"dragAndDrop",!0,{description:g("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:Vt(new $de),dropIntoEditor:Vt(new bue),stickyScroll:Vt(new Qde),experimentalWhitespaceRendering:Vt(new jr(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[g("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),g("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),g("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:g("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:Vt(new iu(39,"extraEditorClassName","")),fastScrollSensitivity:Vt(new J1(40,"fastScrollSensitivity",5,i=>i<=0?5:i,{markdownDescription:g("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:Vt(new jde),fixedOverflowWidgets:Vt(new Qn(42,"fixedOverflowWidgets",!1)),folding:Vt(new Qn(43,"folding",!0,{description:g("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:Vt(new jr(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[g("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),g("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:g("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:Vt(new Qn(45,"foldingHighlight",!0,{description:g("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:Vt(new Qn(46,"foldingImportsByDefault",!1,{description:g("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:Vt(new Qo(47,"foldingMaximumRegions",5e3,10,65e3,{description:g("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:Vt(new Qn(48,"unfoldOnClickAfterEndOfLine",!1,{description:g("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:Vt(new iu(49,"fontFamily",ml.fontFamily,{description:g("fontFamily","Controls the font family.")})),fontInfo:Vt(new qde),fontLigatures2:Vt(new qu),fontSize:Vt(new Gde),fontWeight:Vt(new kC),fontVariations:Vt(new C3),formatOnPaste:Vt(new Qn(55,"formatOnPaste",!1,{description:g("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:Vt(new Qn(56,"formatOnType",!1,{description:g("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:Vt(new Qn(57,"glyphMargin",!0,{description:g("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:Vt(new Kde),hideCursorInOverviewRuler:Vt(new Qn(59,"hideCursorInOverviewRuler",!1,{description:g("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:Vt(new Yde),inDiffEditor:Vt(new Qn(61,"inDiffEditor",!1)),letterSpacing:Vt(new J1(63,"letterSpacing",ml.letterSpacing,i=>J1.clamp(i,-5,20),{description:g("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:Vt(new Xde),lineDecorationsWidth:Vt(new eue),lineHeight:Vt(new tue),lineNumbers:Vt(new aue),lineNumbersMinChars:Vt(new Qo(68,"lineNumbersMinChars",5,1,300)),linkedEditing:Vt(new Qn(69,"linkedEditing",!1,{description:g("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:Vt(new Qn(70,"links",!0,{description:g("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:Vt(new jr(71,"matchBrackets","always",["always","near","never"],{description:g("matchBrackets","Highlight matching brackets.")})),minimap:Vt(new iue),mouseStyle:Vt(new jr(73,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Vt(new J1(74,"mouseWheelScrollSensitivity",1,i=>i===0?1:i,{markdownDescription:g("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:Vt(new Qn(75,"mouseWheelZoom",!1,{markdownDescription:Wi?g("mouseWheelZoom.mac","Zoom the font of the editor when using mouse wheel and holding `Cmd`."):g("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:Vt(new Qn(76,"multiCursorMergeOverlapping",!0,{description:g("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:Vt(new wC(77,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],Wkt,{markdownEnumDescriptions:[g("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),g("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:g({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:Vt(new jr(78,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[g("multiCursorPaste.spread","Each cursor pastes a single line of the text."),g("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:g("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:Vt(new Qo(79,"multiCursorLimit",1e4,1,1e5,{markdownDescription:g("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:Vt(new jr(80,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[g("occurrencesHighlight.off","Does not highlight occurrences."),g("occurrencesHighlight.singleFile","Highlights occurrences only in the current file."),g("occurrencesHighlight.multiFile","Experimental: Highlights occurrences across all valid open files.")],markdownDescription:g("occurrencesHighlight","Controls whether occurrences should be highlighted across open files.")})),overviewRulerBorder:Vt(new Qn(81,"overviewRulerBorder",!0,{description:g("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:Vt(new Qo(82,"overviewRulerLanes",3,0,3)),padding:Vt(new nue),pasteAs:Vt(new yue),parameterHints:Vt(new oue),peekWidgetDefaultFocus:Vt(new jr(86,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[g("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),g("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:g("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:Vt(new Qn(87,"definitionLinkOpensInPeek",!1,{description:g("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:Vt(new sue),quickSuggestionsDelay:Vt(new Qo(89,"quickSuggestionsDelay",10,0,1073741824,{description:g("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:Vt(new Qn(90,"readOnly",!1)),readOnlyMessage:Vt(new cue),renameOnType:Vt(new Qn(92,"renameOnType",!1,{description:g("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:g("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:Vt(new Qn(93,"renderControlCharacters",!0,{description:g("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:Vt(new jr(94,"renderFinalNewline",Ar?"dimmed":"on",["off","on","dimmed"],{description:g("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:Vt(new jr(95,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",g("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:g("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:Vt(new Qn(96,"renderLineHighlightOnlyWhenFocus",!1,{description:g("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:Vt(new jr(97,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Vt(new jr(98,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",g("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),g("renderWhitespace.selection","Render whitespace characters only on selected text."),g("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:g("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:Vt(new Qo(99,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:Vt(new Qn(100,"roundedSelection",!0,{description:g("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:Vt(new lue),scrollbar:Vt(new due),scrollBeyondLastColumn:Vt(new Qo(103,"scrollBeyondLastColumn",4,0,1073741824,{description:g("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:Vt(new Qn(104,"scrollBeyondLastLine",!0,{description:g("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:Vt(new Qn(105,"scrollPredominantAxis",!0,{description:g("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:Vt(new Qn(106,"selectionClipboard",!0,{description:g("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:Ar})),selectionHighlight:Vt(new Qn(107,"selectionHighlight",!0,{description:g("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:Vt(new Qn(108,"selectOnLineNumbers",!0)),showFoldingControls:Vt(new jr(109,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[g("showFoldingControls.always","Always show the folding controls."),g("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),g("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:g("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:Vt(new Qn(110,"showUnused",!0,{description:g("showUnused","Controls fading out of unused code.")})),showDeprecated:Vt(new Qn(138,"showDeprecated",!0,{description:g("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:Vt(new Jde),snippetSuggestions:Vt(new jr(111,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[g("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),g("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),g("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),g("snippetSuggestions.none","Do not show snippet suggestions.")],description:g("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:Vt(new gue),smoothScrolling:Vt(new Qn(113,"smoothScrolling",!1,{description:g("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:Vt(new Qo(116,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Vt(new mue),inlineSuggest:Vt(new hue),inlineCompletionsAccessibilityVerbose:Vt(new Qn(147,"inlineCompletionsAccessibilityVerbose",!1,{description:g("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:Vt(new Qo(118,"suggestFontSize",0,0,1e3,{markdownDescription:g("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:Vt(new Qo(119,"suggestLineHeight",0,0,1e3,{markdownDescription:g("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:Vt(new Qn(120,"suggestOnTriggerCharacters",!0,{description:g("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:Vt(new jr(121,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[g("suggestSelection.first","Always select the first suggestion."),g("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),g("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:g("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:Vt(new jr(122,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[g("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),g("tabCompletion.off","Disable tab completions."),g("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:g("tabCompletion","Enables tab completions.")})),tabIndex:Vt(new Qo(123,"tabIndex",0,-1,1073741824)),unicodeHighlight:Vt(new uue),unusualLineTerminators:Vt(new jr(125,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[g("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),g("unusualLineTerminators.off","Unusual line terminators are ignored."),g("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:g("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:Vt(new Qn(126,"useShadowDOM",!0)),useTabStops:Vt(new Qn(127,"useTabStops",!0,{description:g("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordBreak:Vt(new jr(128,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[g("wordBreak.normal","Use the default line break rule."),g("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:g("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSeparators:Vt(new iu(129,"wordSeparators",Bde,{description:g("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:Vt(new jr(130,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[g("wordWrap.off","Lines will never wrap."),g("wordWrap.on","Lines will wrap at the viewport width."),g({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),g({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:g({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:Vt(new iu(131,"wordWrapBreakAfterCharacters"," })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63")),wordWrapBreakBeforeCharacters:Vt(new iu(132,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:Vt(new Qo(133,"wordWrapColumn",80,1,1073741824,{markdownDescription:g({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:Vt(new jr(134,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Vt(new jr(135,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:Vt(new Ude),defaultColorDecorators:Vt(new Qn(145,"defaultColorDecorators",!1,{markdownDescription:g("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:Vt(new rue),tabFocusMode:Vt(new Qn(142,"tabFocusMode",!1,{markdownDescription:g("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:Vt(new oT),wrappingInfo:Vt(new _ue),wrappingIndent:Vt(new vue),wrappingStrategy:Vt(new Zde)}});function hi(i){jl(i)||Pje.onUnexpectedError(i)}function po(i){jl(i)||Pje.onUnexpectedExternalError(i)}function wue(i){if(i instanceof Error){let{name:e,message:t}=i,n=i.stacktrace||i.stack;return{$isError:!0,name:e,message:t,stack:n,noTelemetry:rT.isErrorNoTelemetry(i)}}return i}function jl(i){return i instanceof Rf?!0:i instanceof Error&&i.name===KV&&i.message===KV}function Oje(){let i=new Error(KV);return i.name=i.message,i}function gl(i){return i?new Error(`Illegal argument: ${i}`):new Error("Illegal argument")}function LC(i){return i?new Error(`Illegal state: ${i}`):new Error("Illegal state")}var Cue,Pje,KV,Rf,YV,rT,fo,Pi=P(()=>{Cue=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?rT.isErrorNoTelemetry(e)?new rT(e.message+` + - Values greater than or equal to 8 will be used as effective values.`)})}compute(e,t,n){return e.fontInfo.lineHeight}},iue=class extends Rr{constructor(){let e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(72,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:g("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:g("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[g("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),g("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),g("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:g("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:g("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:g("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:g("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:g("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:g("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;let t=e;return{enabled:Ti(t.enabled,this.defaultValue.enabled),autohide:Ti(t.autohide,this.defaultValue.autohide),size:ws(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:ws(t.side,this.defaultValue.side,["right","left"]),showSlider:ws(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:Ti(t.renderCharacters,this.defaultValue.renderCharacters),scale:Qo.clampedInt(t.scale,1,1,3),maxColumn:Qo.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}};nue=class extends Rr{constructor(){super(83,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:g("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:g("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;let t=e;return{top:Qo.clampedInt(t.top,0,0,1e3),bottom:Qo.clampedInt(t.bottom,0,0,1e3)}}},oue=class extends Rr{constructor(){let e={enabled:!0,cycle:!0};super(85,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:g("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:g("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;let t=e;return{enabled:Ti(t.enabled,this.defaultValue.enabled),cycle:Ti(t.cycle,this.defaultValue.cycle)}}},rue=class extends o5{constructor(){super(141)}compute(e,t,n){return e.pixelRatio}},sue=class extends Rr{constructor(){let e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[g("on","Quick suggestions show inside the suggest widget"),g("inline","Quick suggestions show as ghost text"),g("off","Quick suggestions are disabled")]}];super(88,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:g("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:g("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:g("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:g("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"){let c=e?"on":"off";return{comments:c,strings:c,other:c}}if(!e||typeof e!="object")return this.defaultValue;let{other:t,comments:n,strings:o}=e,r=["on","inline","off"],s,a,l;return typeof t=="boolean"?s=t?"on":"off":s=ws(t,this.defaultValue.other,r),typeof n=="boolean"?a=n?"on":"off":a=ws(n,this.defaultValue.comments,r),typeof o=="boolean"?l=o?"on":"off":l=ws(o,this.defaultValue.strings,r),{other:s,comments:a,strings:l}}},aue=class extends Rr{constructor(){super(67,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[g("lineNumbers.off","Line numbers are not rendered."),g("lineNumbers.on","Line numbers are rendered as absolute number."),g("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),g("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:g("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,n=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(t=4,n=e):e==="interval"?t=3:e==="relative"?t=2:e==="on"?t=1:t=0),{renderType:t,renderFn:n}}};lue=class extends Rr{constructor(){let e=[],t={type:"number",description:g("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(101,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:g("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:g("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)){let t=[];for(let n of e)if(typeof n=="number")t.push({column:Qo.clampedInt(n,0,0,1e4),color:null});else if(n&&typeof n=="object"){let o=n;t.push({column:Qo.clampedInt(o.column,0,0,1e4),color:o.color})}return t.sort((n,o)=>n.column-o.column),t}return this.defaultValue}},cue=class extends Rr{constructor(){super(91,"readOnlyMessage",void 0)}validate(e){return!e||typeof e!="object"?this.defaultValue:e}};due=class extends Rr{constructor(){let e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(102,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[g("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),g("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),g("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:g("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[g("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),g("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),g("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:g("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:g("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:g("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:g("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:e.ignoreHorizontalScrollbarInContentHeight,description:g("scrollbar.ignoreHorizontalScrollbarInContentHeight","When set, the horizontal scrollbar will not increase the size of the editor's content.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e,n=Qo.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),o=Qo.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Qo.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Aje(t.vertical,this.defaultValue.vertical),horizontal:Aje(t.horizontal,this.defaultValue.horizontal),useShadows:Ti(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:Ti(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:Ti(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:Ti(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:Ti(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:n,horizontalSliderSize:Qo.clampedInt(t.horizontalSliderSize,n,0,1e3),verticalScrollbarSize:o,verticalSliderSize:Qo.clampedInt(t.verticalSliderSize,o,0,1e3),scrollByPage:Ti(t.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:Ti(t.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}},ju="inUntrustedWorkspace",Sd={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"},uue=class extends Rr{constructor(){let e={nonBasicASCII:ju,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:ju,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(124,"unicodeHighlight",e,{[Sd.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,ju],default:e.nonBasicASCII,description:g("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.")},[Sd.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:g("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[Sd.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:g("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.")},[Sd.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,ju],default:e.includeComments,description:g("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[Sd.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,ju],default:e.includeStrings,description:g("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[Sd.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:g("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[Sd.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:g("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let n=!1;t.allowedCharacters&&e&&(Za(e.allowedCharacters,t.allowedCharacters)||(e={...e,allowedCharacters:t.allowedCharacters},n=!0)),t.allowedLocales&&e&&(Za(e.allowedLocales,t.allowedLocales)||(e={...e,allowedLocales:t.allowedLocales},n=!0));let o=super.applyUpdate(e,t);return n?new y3(o.newValue,!0):o}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{nonBasicASCII:xC(t.nonBasicASCII,ju,[!0,!1,ju]),invisibleCharacters:Ti(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:Ti(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:xC(t.includeComments,ju,[!0,!1,ju]),includeStrings:xC(t.includeStrings,ju,[!0,!1,ju]),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;let n={};for(let[o,r]of Object.entries(e))r===!0&&(n[o]=!0);return n}},hue=class extends Rr{constructor(){let e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1,fontFamily:"default"};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:g("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[g("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),g("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),g("inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:g("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:g("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")},"editor.inlineSuggest.fontFamily":{type:"string",default:e.fontFamily,description:g("inlineSuggest.fontFamily","Controls the font family of the inline suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Ti(t.enabled,this.defaultValue.enabled),mode:ws(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:ws(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:Ti(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:Ti(t.keepOnBlur,this.defaultValue.keepOnBlur),fontFamily:iu.string(t.fontFamily,this.defaultValue.fontFamily)}}},fue=class extends Rr{constructor(){let e={enabled:Ma.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:Ma.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:g("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:g("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Ti(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:Ti(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}},pue=class extends Rr{constructor(){let e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[g("editor.guides.bracketPairs.true","Enables bracket pair guides."),g("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),g("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:g("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[g("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),g("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),g("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:g("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:g("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:g("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[g("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),g("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),g("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:g("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{bracketPairs:xC(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:xC(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:Ti(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:Ti(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:xC(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}};mue=class extends Rr{constructor(){let e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(117,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[g("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),g("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:g("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:g("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:g("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:g("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:[g("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),g("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),g("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),g("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:g("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:g("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:g("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:g("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:g("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:g("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:g("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:g("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:g("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:g("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:g("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{insertMode:ws(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:Ti(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:Ti(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:Ti(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:Ti(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:ws(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:Ti(t.showIcons,this.defaultValue.showIcons),showStatusBar:Ti(t.showStatusBar,this.defaultValue.showStatusBar),preview:Ti(t.preview,this.defaultValue.preview),previewMode:ws(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:Ti(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:Ti(t.showMethods,this.defaultValue.showMethods),showFunctions:Ti(t.showFunctions,this.defaultValue.showFunctions),showConstructors:Ti(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:Ti(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:Ti(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:Ti(t.showFields,this.defaultValue.showFields),showVariables:Ti(t.showVariables,this.defaultValue.showVariables),showClasses:Ti(t.showClasses,this.defaultValue.showClasses),showStructs:Ti(t.showStructs,this.defaultValue.showStructs),showInterfaces:Ti(t.showInterfaces,this.defaultValue.showInterfaces),showModules:Ti(t.showModules,this.defaultValue.showModules),showProperties:Ti(t.showProperties,this.defaultValue.showProperties),showEvents:Ti(t.showEvents,this.defaultValue.showEvents),showOperators:Ti(t.showOperators,this.defaultValue.showOperators),showUnits:Ti(t.showUnits,this.defaultValue.showUnits),showValues:Ti(t.showValues,this.defaultValue.showValues),showConstants:Ti(t.showConstants,this.defaultValue.showConstants),showEnums:Ti(t.showEnums,this.defaultValue.showEnums),showEnumMembers:Ti(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:Ti(t.showKeywords,this.defaultValue.showKeywords),showWords:Ti(t.showWords,this.defaultValue.showWords),showColors:Ti(t.showColors,this.defaultValue.showColors),showFiles:Ti(t.showFiles,this.defaultValue.showFiles),showReferences:Ti(t.showReferences,this.defaultValue.showReferences),showFolders:Ti(t.showFolders,this.defaultValue.showFolders),showTypeParameters:Ti(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:Ti(t.showSnippets,this.defaultValue.showSnippets),showUsers:Ti(t.showUsers,this.defaultValue.showUsers),showIssues:Ti(t.showIssues,this.defaultValue.showIssues)}}},gue=class extends Rr{constructor(){super(112,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:g("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:g("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:Ti(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:Ti(e.selectSubwords,this.defaultValue.selectSubwords)}}},vue=class extends Rr{constructor(){super(136,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[g("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),g("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),g("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),g("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:g("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,n){return t.get(2)===2?0:n}},_ue=class extends o5{constructor(){super(144)}compute(e,t,n){let o=t.get(143);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:o.isWordWrapMinified,isViewportWrapping:o.isViewportWrapping,wrappingColumn:o.wrappingColumn}}},bue=class extends Rr{constructor(){let e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:g("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down the `Shift` key (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:g("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[g("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),g("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Ti(t.enabled,this.defaultValue.enabled),showDropSelector:ws(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}},yue=class extends Rr{constructor(){let e={enabled:!0,showPasteSelector:"afterPaste"};super(84,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:g("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:g("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[g("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),g("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:Ti(t.enabled,this.defaultValue.enabled),showPasteSelector:ws(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}},Ukt="Consolas, 'Courier New', monospace",$kt="Menlo, Monaco, 'Courier New', monospace",jkt="'Droid Sans Mono', 'monospace', monospace",ml={fontFamily:Wi?$kt:Ar?jkt:Ukt,fontWeight:"normal",fontSize:Wi?12:14,lineHeight:0,letterSpacing:0},S3=[];nu={acceptSuggestionOnCommitCharacter:Vt(new Qn(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:g("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:Vt(new jr(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",g("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:g("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:Vt(new Vde),accessibilityPageSize:Vt(new Qo(3,"accessibilityPageSize",10,1,1073741824,{description:g("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:Vt(new iu(4,"ariaLabel",g("editorViewAccessibleLabel","Editor content"))),ariaRequired:Vt(new Qn(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:Vt(new Qn(8,"screenReaderAnnounceInlineSuggestion",!0,{description:g("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:Vt(new jr(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",g("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),g("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:g("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:Vt(new jr(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",g("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),g("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:g("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:Vt(new jr(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",g("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:g("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:Vt(new jr(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",g("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:g("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:Vt(new jr(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",g("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),g("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:g("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:Vt(new wC(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],Hkt,{enumDescriptions:[g("editor.autoIndent.none","The editor will not insert indentation automatically."),g("editor.autoIndent.keep","The editor will keep the current line's indentation."),g("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),g("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),g("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:g("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:Vt(new Qn(13,"automaticLayout",!1)),autoSurround:Vt(new jr(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[g("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),g("editor.autoSurround.quotes","Surround with quotes but not brackets."),g("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:g("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:Vt(new fue),bracketPairGuides:Vt(new pue),stickyTabStops:Vt(new Qn(115,"stickyTabStops",!1,{description:g("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:Vt(new Qn(17,"codeLens",!0,{description:g("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:Vt(new iu(18,"codeLensFontFamily","",{description:g("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:Vt(new Qo(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:g("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:Vt(new Qn(20,"colorDecorators",!0,{description:g("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:Vt(new jr(146,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[g("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),g("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),g("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:g("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:Vt(new Qo(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:g("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:Vt(new Qn(22,"columnSelection",!1,{description:g("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:Vt(new Wde),contextmenu:Vt(new Qn(24,"contextmenu",!0)),copyWithSyntaxHighlighting:Vt(new Qn(25,"copyWithSyntaxHighlighting",!0,{description:g("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:Vt(new wC(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],Bkt,{description:g("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:Vt(new jr(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[g("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),g("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),g("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:g("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:Vt(new wC(28,"cursorStyle",Na.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],Vkt,{description:g("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:Vt(new Qo(29,"cursorSurroundingLines",0,0,1073741824,{description:g("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:Vt(new jr(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[g("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),g("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:g("cursorSurroundingLinesStyle","Controls when `#cursorSurroundingLines#` should be enforced.")})),cursorWidth:Vt(new Qo(31,"cursorWidth",0,0,1073741824,{markdownDescription:g("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:Vt(new Qn(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:Vt(new Qn(33,"disableMonospaceOptimizations",!1)),domReadOnly:Vt(new Qn(34,"domReadOnly",!1)),dragAndDrop:Vt(new Qn(35,"dragAndDrop",!0,{description:g("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:Vt(new $de),dropIntoEditor:Vt(new bue),stickyScroll:Vt(new Qde),experimentalWhitespaceRendering:Vt(new jr(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[g("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),g("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),g("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:g("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:Vt(new iu(39,"extraEditorClassName","")),fastScrollSensitivity:Vt(new J1(40,"fastScrollSensitivity",5,i=>i<=0?5:i,{markdownDescription:g("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:Vt(new jde),fixedOverflowWidgets:Vt(new Qn(42,"fixedOverflowWidgets",!1)),folding:Vt(new Qn(43,"folding",!0,{description:g("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:Vt(new jr(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[g("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),g("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:g("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:Vt(new Qn(45,"foldingHighlight",!0,{description:g("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:Vt(new Qn(46,"foldingImportsByDefault",!1,{description:g("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:Vt(new Qo(47,"foldingMaximumRegions",5e3,10,65e3,{description:g("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:Vt(new Qn(48,"unfoldOnClickAfterEndOfLine",!1,{description:g("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:Vt(new iu(49,"fontFamily",ml.fontFamily,{description:g("fontFamily","Controls the font family.")})),fontInfo:Vt(new qde),fontLigatures2:Vt(new qu),fontSize:Vt(new Gde),fontWeight:Vt(new kC),fontVariations:Vt(new w3),formatOnPaste:Vt(new Qn(55,"formatOnPaste",!1,{description:g("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:Vt(new Qn(56,"formatOnType",!1,{description:g("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:Vt(new Qn(57,"glyphMargin",!0,{description:g("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:Vt(new Kde),hideCursorInOverviewRuler:Vt(new Qn(59,"hideCursorInOverviewRuler",!1,{description:g("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:Vt(new Yde),inDiffEditor:Vt(new Qn(61,"inDiffEditor",!1)),letterSpacing:Vt(new J1(63,"letterSpacing",ml.letterSpacing,i=>J1.clamp(i,-5,20),{description:g("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:Vt(new Xde),lineDecorationsWidth:Vt(new eue),lineHeight:Vt(new tue),lineNumbers:Vt(new aue),lineNumbersMinChars:Vt(new Qo(68,"lineNumbersMinChars",5,1,300)),linkedEditing:Vt(new Qn(69,"linkedEditing",!1,{description:g("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:Vt(new Qn(70,"links",!0,{description:g("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:Vt(new jr(71,"matchBrackets","always",["always","near","never"],{description:g("matchBrackets","Highlight matching brackets.")})),minimap:Vt(new iue),mouseStyle:Vt(new jr(73,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Vt(new J1(74,"mouseWheelScrollSensitivity",1,i=>i===0?1:i,{markdownDescription:g("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:Vt(new Qn(75,"mouseWheelZoom",!1,{markdownDescription:Wi?g("mouseWheelZoom.mac","Zoom the font of the editor when using mouse wheel and holding `Cmd`."):g("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:Vt(new Qn(76,"multiCursorMergeOverlapping",!0,{description:g("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:Vt(new wC(77,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],Wkt,{markdownEnumDescriptions:[g("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),g("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:g({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:Vt(new jr(78,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[g("multiCursorPaste.spread","Each cursor pastes a single line of the text."),g("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:g("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:Vt(new Qo(79,"multiCursorLimit",1e4,1,1e5,{markdownDescription:g("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:Vt(new jr(80,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[g("occurrencesHighlight.off","Does not highlight occurrences."),g("occurrencesHighlight.singleFile","Highlights occurrences only in the current file."),g("occurrencesHighlight.multiFile","Experimental: Highlights occurrences across all valid open files.")],markdownDescription:g("occurrencesHighlight","Controls whether occurrences should be highlighted across open files.")})),overviewRulerBorder:Vt(new Qn(81,"overviewRulerBorder",!0,{description:g("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:Vt(new Qo(82,"overviewRulerLanes",3,0,3)),padding:Vt(new nue),pasteAs:Vt(new yue),parameterHints:Vt(new oue),peekWidgetDefaultFocus:Vt(new jr(86,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[g("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),g("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:g("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:Vt(new Qn(87,"definitionLinkOpensInPeek",!1,{description:g("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:Vt(new sue),quickSuggestionsDelay:Vt(new Qo(89,"quickSuggestionsDelay",10,0,1073741824,{description:g("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:Vt(new Qn(90,"readOnly",!1)),readOnlyMessage:Vt(new cue),renameOnType:Vt(new Qn(92,"renameOnType",!1,{description:g("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:g("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:Vt(new Qn(93,"renderControlCharacters",!0,{description:g("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:Vt(new jr(94,"renderFinalNewline",Ar?"dimmed":"on",["off","on","dimmed"],{description:g("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:Vt(new jr(95,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",g("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:g("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:Vt(new Qn(96,"renderLineHighlightOnlyWhenFocus",!1,{description:g("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:Vt(new jr(97,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Vt(new jr(98,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",g("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),g("renderWhitespace.selection","Render whitespace characters only on selected text."),g("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:g("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:Vt(new Qo(99,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:Vt(new Qn(100,"roundedSelection",!0,{description:g("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:Vt(new lue),scrollbar:Vt(new due),scrollBeyondLastColumn:Vt(new Qo(103,"scrollBeyondLastColumn",4,0,1073741824,{description:g("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:Vt(new Qn(104,"scrollBeyondLastLine",!0,{description:g("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:Vt(new Qn(105,"scrollPredominantAxis",!0,{description:g("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:Vt(new Qn(106,"selectionClipboard",!0,{description:g("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:Ar})),selectionHighlight:Vt(new Qn(107,"selectionHighlight",!0,{description:g("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:Vt(new Qn(108,"selectOnLineNumbers",!0)),showFoldingControls:Vt(new jr(109,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[g("showFoldingControls.always","Always show the folding controls."),g("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),g("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:g("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:Vt(new Qn(110,"showUnused",!0,{description:g("showUnused","Controls fading out of unused code.")})),showDeprecated:Vt(new Qn(138,"showDeprecated",!0,{description:g("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:Vt(new Jde),snippetSuggestions:Vt(new jr(111,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[g("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),g("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),g("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),g("snippetSuggestions.none","Do not show snippet suggestions.")],description:g("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:Vt(new gue),smoothScrolling:Vt(new Qn(113,"smoothScrolling",!1,{description:g("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:Vt(new Qo(116,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Vt(new mue),inlineSuggest:Vt(new hue),inlineCompletionsAccessibilityVerbose:Vt(new Qn(147,"inlineCompletionsAccessibilityVerbose",!1,{description:g("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:Vt(new Qo(118,"suggestFontSize",0,0,1e3,{markdownDescription:g("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:Vt(new Qo(119,"suggestLineHeight",0,0,1e3,{markdownDescription:g("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:Vt(new Qn(120,"suggestOnTriggerCharacters",!0,{description:g("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:Vt(new jr(121,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[g("suggestSelection.first","Always select the first suggestion."),g("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),g("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:g("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:Vt(new jr(122,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[g("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),g("tabCompletion.off","Disable tab completions."),g("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:g("tabCompletion","Enables tab completions.")})),tabIndex:Vt(new Qo(123,"tabIndex",0,-1,1073741824)),unicodeHighlight:Vt(new uue),unusualLineTerminators:Vt(new jr(125,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[g("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),g("unusualLineTerminators.off","Unusual line terminators are ignored."),g("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:g("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:Vt(new Qn(126,"useShadowDOM",!0)),useTabStops:Vt(new Qn(127,"useTabStops",!0,{description:g("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordBreak:Vt(new jr(128,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[g("wordBreak.normal","Use the default line break rule."),g("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:g("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSeparators:Vt(new iu(129,"wordSeparators",Bde,{description:g("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:Vt(new jr(130,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[g("wordWrap.off","Lines will never wrap."),g("wordWrap.on","Lines will wrap at the viewport width."),g({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),g({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:g({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:Vt(new iu(131,"wordWrapBreakAfterCharacters"," })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63")),wordWrapBreakBeforeCharacters:Vt(new iu(132,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:Vt(new Qo(133,"wordWrapColumn",80,1,1073741824,{markdownDescription:g({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:Vt(new jr(134,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Vt(new jr(135,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:Vt(new Ude),defaultColorDecorators:Vt(new Qn(145,"defaultColorDecorators",!1,{markdownDescription:g("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:Vt(new rue),tabFocusMode:Vt(new Qn(142,"tabFocusMode",!1,{markdownDescription:g("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:Vt(new oT),wrappingInfo:Vt(new _ue),wrappingIndent:Vt(new vue),wrappingStrategy:Vt(new Zde)}});function hi(i){jl(i)||Pje.onUnexpectedError(i)}function po(i){jl(i)||Pje.onUnexpectedExternalError(i)}function wue(i){if(i instanceof Error){let{name:e,message:t}=i,n=i.stacktrace||i.stack;return{$isError:!0,name:e,message:t,stack:n,noTelemetry:rT.isErrorNoTelemetry(i)}}return i}function jl(i){return i instanceof Rf?!0:i instanceof Error&&i.name===XV&&i.message===XV}function Oje(){let i=new Error(XV);return i.name=i.message,i}function gl(i){return i?new Error(`Illegal argument: ${i}`):new Error("Illegal argument")}function LC(i){return i?new Error(`Illegal state: ${i}`):new Error("Illegal state")}var Cue,Pje,XV,Rf,QV,rT,fo,Pi=P(()=>{Cue=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?rT.isErrorNoTelemetry(e)?new rT(e.message+` `+e.stack):new Error(e.message+` -`+e.stack):e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},Pje=new Cue;KV="Canceled";Rf=class extends Error{constructor(){super(KV),this.name=this.message}};YV=class extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}},rT=class i extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof i)return e;let t=new i;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}},fo=class i extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,i.prototype)}}});function Gu(i,e){let t=this,n=!1,o;return function(){if(n)return o;if(n=!0,e)try{o=i.apply(t,arguments)}finally{e()}else o=i.apply(t,arguments);return o}}var S3=P(()=>{});function Gkt(i){Ku=i}function s5(i){return Ku?.trackDisposable(i),i}function a5(i){Ku?.markAsDisposed(i)}function ZV(i,e){Ku?.setParent(i,e)}function Kkt(i,e){if(Ku)for(let t of i)Ku.setParent(t,e)}function l5(i){return Ku?.markAsSingleton(i),i}function EC(i){return typeof i.dispose=="function"&&i.dispose.length===0}function Nn(i){if(un.is(i)){let e=[];for(let t of i)if(t)try{t.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(i)?[]:i}else if(i)return i.dispose(),i}function vl(...i){let e=Yt(()=>Nn(i));return Kkt(i,e),e}function Yt(i){let e=s5({dispose:Gu(()=>{a5(e),i()})});return e}var qkt,Ku,Ye,ue,To,XV,QV,k3,nt=P(()=>{S3();Yc();qkt=!1,Ku=null;if(qkt){let i="__is_disposable_tracked__";Gkt(new class{trackDisposable(e){let t=new Error("Potentially leaked disposable").stack;setTimeout(()=>{e[i]||console.log(t)},3e3)}setParent(e,t){if(e&&e!==ue.None)try{e[i]=!0}catch{}}markAsDisposed(e){if(e&&e!==ue.None)try{e[i]=!0}catch{}}markAsSingleton(e){}})}Ye=class i{constructor(){this._toDispose=new Set,this._isDisposed=!1,s5(this)}dispose(){this._isDisposed||(a5(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Nn(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return ZV(e,this),this._isDisposed?i.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),ZV(e,null))}};Ye.DISABLE_DISPOSED_WARNING=!1;ue=class{constructor(){this._store=new Ye,s5(this),ZV(this._store,this)}dispose(){a5(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};ue.None=Object.freeze({dispose(){}});To=class{constructor(){this._isDisposed=!1,s5(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)===null||t===void 0||t.dispose(),e&&ZV(e,this),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,a5(this),(e=this._value)===null||e===void 0||e.dispose(),this._value=void 0}},XV=class{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}},QV=class{constructor(e){this.object=e}dispose(){}},k3=class{constructor(){this._store=new Map,this._isDisposed=!1,s5(this)}dispose(){a5(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{Nn(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,n=!1){var o;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),n||(o=this._store.get(e))===null||o===void 0||o.dispose(),this._store.set(e,t)}deleteAndDispose(e){var t;(t=this._store.get(e))===null||t===void 0||t.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}});var Ykt,Er,Yu=P(()=>{Ykt=globalThis.performance&&typeof globalThis.performance.now=="function",Er=class i{static create(e){return new i(e)}constructor(e){this._now=Ykt&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}});var Fje,Zkt,Et,sT,Hje,xue,aT,DC,Xkt,Qkt,ge,Bje,JV,Pf,TC,eW,tW,L3,lT,Xt=P(()=>{Pi();S3();nt();Hh();Yu();Fje=!1,Zkt=!1;(function(i){i.None=()=>ue.None;function e(T){if(Zkt){let{onDidAddListener:L}=T,I=aT.create(),M=0;T.onDidAddListener=()=>{++M===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),I.print()),L?.()}}}function t(T,L){return h(T,()=>{},0,void 0,!0,void 0,L)}i.defer=t;function n(T){return(L,I=null,M)=>{let N=!1,z;return z=T(F=>{if(!N)return z?z.dispose():N=!0,L.call(I,F)},null,M),N&&z.dispose(),z}}i.once=n;function o(T,L,I){return d((M,N=null,z)=>T(F=>M.call(N,L(F)),null,z),I)}i.map=o;function r(T,L,I){return d((M,N=null,z)=>T(F=>{L(F),M.call(N,F)},null,z),I)}i.forEach=r;function s(T,L,I){return d((M,N=null,z)=>T(F=>L(F)&&M.call(N,F),null,z),I)}i.filter=s;function a(T){return T}i.signal=a;function l(...T){return(L,I=null,M)=>{let N=vl(...T.map(z=>z(F=>L.call(I,F))));return u(N,M)}}i.any=l;function c(T,L,I,M){let N=I;return o(T,z=>(N=L(N,z),N),M)}i.reduce=c;function d(T,L){let I,M={onWillAddFirstListener(){I=T(N.fire,N)},onDidRemoveLastListener(){I?.dispose()}};L||e(M);let N=new ge(M);return L?.add(N),N.event}function u(T,L){return L instanceof Array?L.push(T):L&&L.add(T),T}function h(T,L,I=100,M=!1,N=!1,z,F){let V,ie,fe,K=0,oe,je={leakWarningThreshold:z,onWillAddFirstListener(){V=T(Be=>{K++,ie=L(ie,Be),M&&!fe&&(Ae.fire(ie),ie=void 0),oe=()=>{let Ie=ie;ie=void 0,fe=void 0,(!M||K>1)&&Ae.fire(Ie),K=0},typeof I=="number"?(clearTimeout(fe),fe=setTimeout(oe,I)):fe===void 0&&(fe=0,queueMicrotask(oe))})},onWillRemoveListener(){N&&K>0&&oe?.()},onDidRemoveLastListener(){oe=void 0,V.dispose()}};F||e(je);let Ae=new ge(je);return F?.add(Ae),Ae.event}i.debounce=h;function f(T,L=0,I){return i.debounce(T,(M,N)=>M?(M.push(N),M):[N],L,void 0,!0,void 0,I)}i.accumulate=f;function p(T,L=(M,N)=>M===N,I){let M=!0,N;return s(T,z=>{let F=M||!L(z,N);return M=!1,N=z,F},I)}i.latch=p;function m(T,L,I){return[i.filter(T,L,I),i.filter(T,M=>!L(M),I)]}i.split=m;function y(T,L=!1,I=[],M){let N=I.slice(),z=T(ie=>{N?N.push(ie):V.fire(ie)});M&&M.add(z);let F=()=>{N?.forEach(ie=>V.fire(ie)),N=null},V=new ge({onWillAddFirstListener(){z||(z=T(ie=>V.fire(ie)),M&&M.add(z))},onDidAddFirstListener(){N&&(L?setTimeout(F):F())},onDidRemoveLastListener(){z&&z.dispose(),z=null}});return M&&M.add(V),V.event}i.buffer=y;function _(T,L){return(M,N,z)=>{let F=L(new b);return T(function(V){let ie=F.evaluate(V);ie!==v&&M.call(N,ie)},void 0,z)}}i.chain=_;let v=Symbol("HaltChainable");class b{constructor(){this.steps=[]}map(L){return this.steps.push(L),this}forEach(L){return this.steps.push(I=>(L(I),I)),this}filter(L){return this.steps.push(I=>L(I)?I:v),this}reduce(L,I){let M=I;return this.steps.push(N=>(M=L(M,N),M)),this}latch(L=(I,M)=>I===M){let I=!0,M;return this.steps.push(N=>{let z=I||!L(N,M);return I=!1,M=N,z?N:v}),this}evaluate(L){for(let I of this.steps)if(L=I(L),L===v)break;return L}}function C(T,L,I=M=>M){let M=(...V)=>F.fire(I(...V)),N=()=>T.on(L,M),z=()=>T.removeListener(L,M),F=new ge({onWillAddFirstListener:N,onDidRemoveLastListener:z});return F.event}i.fromNodeEventEmitter=C;function w(T,L,I=M=>M){let M=(...V)=>F.fire(I(...V)),N=()=>T.addEventListener(L,M),z=()=>T.removeEventListener(L,M),F=new ge({onWillAddFirstListener:N,onDidRemoveLastListener:z});return F.event}i.fromDOMEventEmitter=w;function S(T){return new Promise(L=>n(T)(L))}i.toPromise=S;function x(T){let L=new ge;return T.then(I=>{L.fire(I)},()=>{L.fire(void 0)}).finally(()=>{L.dispose()}),L.event}i.fromPromise=x;function k(T,L,I){return L(I),T(M=>L(M))}i.runAndSubscribe=k;class D{constructor(L,I){this._observable=L,this._counter=0,this._hasChanged=!1;let M={onWillAddFirstListener:()=>{L.addObserver(this)},onDidRemoveLastListener:()=>{L.removeObserver(this)}};I||e(M),this.emitter=new ge(M),I&&I.add(this.emitter)}beginUpdate(L){this._counter++}handlePossibleChange(L){}handleChange(L,I){this._hasChanged=!0}endUpdate(L){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function E(T,L){return new D(T,L).emitter.event}i.fromObservable=E;function A(T){return(L,I,M)=>{let N=0,z=!1,F={beginUpdate(){N++},endUpdate(){N--,N===0&&(T.reportChanges(),z&&(z=!1,L.call(I)))},handlePossibleChange(){},handleChange(){z=!0}};T.addObserver(F),T.reportChanges();let V={dispose(){T.removeObserver(F)}};return M instanceof Ye?M.add(V):Array.isArray(M)&&M.push(V),V}}i.fromObservableLight=A})(Et||(Et={}));sT=class i{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${i._idPool++}`,i.all.add(this)}start(e){this._stopWatch=new Er,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};sT.all=new Set;sT._idPool=0;Hje=-1,xue=class{constructor(e,t=Math.random().toString(18).slice(2,5)){this.threshold=e,this.name=t,this._warnCountdown=0}dispose(){var e;(e=this._stacks)===null||e===void 0||e.clear()}check(e,t){let n=this.threshold;if(n<=0||t{let r=this._stacks.get(e.value)||0;this._stacks.set(e.value,r-1)}}},aT=class i{static create(){var e;return new i((e=new Error().stack)!==null&&e!==void 0?e:"")}constructor(e){this.value=e}print(){console.warn(this.value.split(` +`+e.stack):e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},Pje=new Cue;XV="Canceled";Rf=class extends Error{constructor(){super(XV),this.name=this.message}};QV=class extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}},rT=class i extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof i)return e;let t=new i;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}},fo=class i extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,i.prototype)}}});function Gu(i,e){let t=this,n=!1,o;return function(){if(n)return o;if(n=!0,e)try{o=i.apply(t,arguments)}finally{e()}else o=i.apply(t,arguments);return o}}var k3=P(()=>{});function Gkt(i){Ku=i}function s5(i){return Ku?.trackDisposable(i),i}function a5(i){Ku?.markAsDisposed(i)}function JV(i,e){Ku?.setParent(i,e)}function Kkt(i,e){if(Ku)for(let t of i)Ku.setParent(t,e)}function l5(i){return Ku?.markAsSingleton(i),i}function EC(i){return typeof i.dispose=="function"&&i.dispose.length===0}function Nn(i){if(un.is(i)){let e=[];for(let t of i)if(t)try{t.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(i)?[]:i}else if(i)return i.dispose(),i}function vl(...i){let e=Yt(()=>Nn(i));return Kkt(i,e),e}function Yt(i){let e=s5({dispose:Gu(()=>{a5(e),i()})});return e}var qkt,Ku,Ye,ue,To,eW,tW,L3,nt=P(()=>{k3();Yc();qkt=!1,Ku=null;if(qkt){let i="__is_disposable_tracked__";Gkt(new class{trackDisposable(e){let t=new Error("Potentially leaked disposable").stack;setTimeout(()=>{e[i]||console.log(t)},3e3)}setParent(e,t){if(e&&e!==ue.None)try{e[i]=!0}catch{}}markAsDisposed(e){if(e&&e!==ue.None)try{e[i]=!0}catch{}}markAsSingleton(e){}})}Ye=class i{constructor(){this._toDispose=new Set,this._isDisposed=!1,s5(this)}dispose(){this._isDisposed||(a5(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Nn(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return JV(e,this),this._isDisposed?i.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),JV(e,null))}};Ye.DISABLE_DISPOSED_WARNING=!1;ue=class{constructor(){this._store=new Ye,s5(this),JV(this._store,this)}dispose(){a5(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};ue.None=Object.freeze({dispose(){}});To=class{constructor(){this._isDisposed=!1,s5(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)===null||t===void 0||t.dispose(),e&&JV(e,this),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,a5(this),(e=this._value)===null||e===void 0||e.dispose(),this._value=void 0}},eW=class{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}},tW=class{constructor(e){this.object=e}dispose(){}},L3=class{constructor(){this._store=new Map,this._isDisposed=!1,s5(this)}dispose(){a5(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{Nn(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,n=!1){var o;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),n||(o=this._store.get(e))===null||o===void 0||o.dispose(),this._store.set(e,t)}deleteAndDispose(e){var t;(t=this._store.get(e))===null||t===void 0||t.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}});var Ykt,Er,Yu=P(()=>{Ykt=globalThis.performance&&typeof globalThis.performance.now=="function",Er=class i{static create(e){return new i(e)}constructor(e){this._now=Ykt&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}});var Fje,Zkt,Et,sT,Hje,xue,aT,DC,Xkt,Qkt,ge,Bje,iW,Pf,TC,nW,oW,E3,lT,Xt=P(()=>{Pi();k3();nt();Hh();Yu();Fje=!1,Zkt=!1;(function(i){i.None=()=>ue.None;function e(T){if(Zkt){let{onDidAddListener:L}=T,I=aT.create(),M=0;T.onDidAddListener=()=>{++M===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),I.print()),L?.()}}}function t(T,L){return h(T,()=>{},0,void 0,!0,void 0,L)}i.defer=t;function n(T){return(L,I=null,M)=>{let N=!1,z;return z=T(F=>{if(!N)return z?z.dispose():N=!0,L.call(I,F)},null,M),N&&z.dispose(),z}}i.once=n;function o(T,L,I){return d((M,N=null,z)=>T(F=>M.call(N,L(F)),null,z),I)}i.map=o;function r(T,L,I){return d((M,N=null,z)=>T(F=>{L(F),M.call(N,F)},null,z),I)}i.forEach=r;function s(T,L,I){return d((M,N=null,z)=>T(F=>L(F)&&M.call(N,F),null,z),I)}i.filter=s;function a(T){return T}i.signal=a;function l(...T){return(L,I=null,M)=>{let N=vl(...T.map(z=>z(F=>L.call(I,F))));return u(N,M)}}i.any=l;function c(T,L,I,M){let N=I;return o(T,z=>(N=L(N,z),N),M)}i.reduce=c;function d(T,L){let I,M={onWillAddFirstListener(){I=T(N.fire,N)},onDidRemoveLastListener(){I?.dispose()}};L||e(M);let N=new ge(M);return L?.add(N),N.event}function u(T,L){return L instanceof Array?L.push(T):L&&L.add(T),T}function h(T,L,I=100,M=!1,N=!1,z,F){let V,ie,fe,K=0,oe,je={leakWarningThreshold:z,onWillAddFirstListener(){V=T(Be=>{K++,ie=L(ie,Be),M&&!fe&&(Ae.fire(ie),ie=void 0),oe=()=>{let Ie=ie;ie=void 0,fe=void 0,(!M||K>1)&&Ae.fire(Ie),K=0},typeof I=="number"?(clearTimeout(fe),fe=setTimeout(oe,I)):fe===void 0&&(fe=0,queueMicrotask(oe))})},onWillRemoveListener(){N&&K>0&&oe?.()},onDidRemoveLastListener(){oe=void 0,V.dispose()}};F||e(je);let Ae=new ge(je);return F?.add(Ae),Ae.event}i.debounce=h;function f(T,L=0,I){return i.debounce(T,(M,N)=>M?(M.push(N),M):[N],L,void 0,!0,void 0,I)}i.accumulate=f;function p(T,L=(M,N)=>M===N,I){let M=!0,N;return s(T,z=>{let F=M||!L(z,N);return M=!1,N=z,F},I)}i.latch=p;function m(T,L,I){return[i.filter(T,L,I),i.filter(T,M=>!L(M),I)]}i.split=m;function y(T,L=!1,I=[],M){let N=I.slice(),z=T(ie=>{N?N.push(ie):V.fire(ie)});M&&M.add(z);let F=()=>{N?.forEach(ie=>V.fire(ie)),N=null},V=new ge({onWillAddFirstListener(){z||(z=T(ie=>V.fire(ie)),M&&M.add(z))},onDidAddFirstListener(){N&&(L?setTimeout(F):F())},onDidRemoveLastListener(){z&&z.dispose(),z=null}});return M&&M.add(V),V.event}i.buffer=y;function _(T,L){return(M,N,z)=>{let F=L(new b);return T(function(V){let ie=F.evaluate(V);ie!==v&&M.call(N,ie)},void 0,z)}}i.chain=_;let v=Symbol("HaltChainable");class b{constructor(){this.steps=[]}map(L){return this.steps.push(L),this}forEach(L){return this.steps.push(I=>(L(I),I)),this}filter(L){return this.steps.push(I=>L(I)?I:v),this}reduce(L,I){let M=I;return this.steps.push(N=>(M=L(M,N),M)),this}latch(L=(I,M)=>I===M){let I=!0,M;return this.steps.push(N=>{let z=I||!L(N,M);return I=!1,M=N,z?N:v}),this}evaluate(L){for(let I of this.steps)if(L=I(L),L===v)break;return L}}function C(T,L,I=M=>M){let M=(...V)=>F.fire(I(...V)),N=()=>T.on(L,M),z=()=>T.removeListener(L,M),F=new ge({onWillAddFirstListener:N,onDidRemoveLastListener:z});return F.event}i.fromNodeEventEmitter=C;function w(T,L,I=M=>M){let M=(...V)=>F.fire(I(...V)),N=()=>T.addEventListener(L,M),z=()=>T.removeEventListener(L,M),F=new ge({onWillAddFirstListener:N,onDidRemoveLastListener:z});return F.event}i.fromDOMEventEmitter=w;function S(T){return new Promise(L=>n(T)(L))}i.toPromise=S;function x(T){let L=new ge;return T.then(I=>{L.fire(I)},()=>{L.fire(void 0)}).finally(()=>{L.dispose()}),L.event}i.fromPromise=x;function k(T,L,I){return L(I),T(M=>L(M))}i.runAndSubscribe=k;class D{constructor(L,I){this._observable=L,this._counter=0,this._hasChanged=!1;let M={onWillAddFirstListener:()=>{L.addObserver(this)},onDidRemoveLastListener:()=>{L.removeObserver(this)}};I||e(M),this.emitter=new ge(M),I&&I.add(this.emitter)}beginUpdate(L){this._counter++}handlePossibleChange(L){}handleChange(L,I){this._hasChanged=!0}endUpdate(L){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function E(T,L){return new D(T,L).emitter.event}i.fromObservable=E;function A(T){return(L,I,M)=>{let N=0,z=!1,F={beginUpdate(){N++},endUpdate(){N--,N===0&&(T.reportChanges(),z&&(z=!1,L.call(I)))},handlePossibleChange(){},handleChange(){z=!0}};T.addObserver(F),T.reportChanges();let V={dispose(){T.removeObserver(F)}};return M instanceof Ye?M.add(V):Array.isArray(M)&&M.push(V),V}}i.fromObservableLight=A})(Et||(Et={}));sT=class i{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${i._idPool++}`,i.all.add(this)}start(e){this._stopWatch=new Er,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};sT.all=new Set;sT._idPool=0;Hje=-1,xue=class{constructor(e,t=Math.random().toString(18).slice(2,5)){this.threshold=e,this.name=t,this._warnCountdown=0}dispose(){var e;(e=this._stacks)===null||e===void 0||e.clear()}check(e,t){let n=this.threshold;if(n<=0||t{let r=this._stacks.get(e.value)||0;this._stacks.set(e.value,r-1)}}},aT=class i{static create(){var e;return new i((e=new Error().stack)!==null&&e!==void 0?e:"")}constructor(e){this.value=e}print(){console.warn(this.value.split(` `).slice(2).join(` -`))}},DC=class{constructor(e){this.value=e}},Xkt=2,Qkt=(i,e)=>{if(i instanceof DC)e(i);else for(let t=0;t0||!((t=this._options)===null||t===void 0)&&t.leakWarningThreshold?new xue((o=(n=this._options)===null||n===void 0?void 0:n.leakWarningThreshold)!==null&&o!==void 0?o:Hje):void 0,this._perfMon=!((r=this._options)===null||r===void 0)&&r._profName?new sT(this._options._profName):void 0,this._deliveryQueue=(s=this._options)===null||s===void 0?void 0:s.deliveryQueue}dispose(){var e,t,n,o;if(!this._disposed){if(this._disposed=!0,((e=this._deliveryQueue)===null||e===void 0?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners){if(Fje){let r=this._listeners;queueMicrotask(()=>{Qkt(r,s=>{var a;return(a=s.stack)===null||a===void 0?void 0:a.print()})})}this._listeners=void 0,this._size=0}(n=(t=this._options)===null||t===void 0?void 0:t.onDidRemoveLastListener)===null||n===void 0||n.call(t),(o=this._leakageMon)===null||o===void 0||o.dispose()}}get event(){var e;return(e=this._event)!==null&&e!==void 0||(this._event=(t,n,o)=>{var r,s,a,l,c;if(this._leakageMon&&this._size>this._leakageMon.threshold*3)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),ue.None;if(this._disposed)return ue.None;n&&(t=t.bind(n));let d=new DC(t),u,h;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(d.stack=aT.create(),u=this._leakageMon.check(d.stack,this._size+1)),Fje&&(d.stack=h??aT.create()),this._listeners?this._listeners instanceof DC?((c=this._deliveryQueue)!==null&&c!==void 0||(this._deliveryQueue=new JV),this._listeners=[this._listeners,d]):this._listeners.push(d):((s=(r=this._options)===null||r===void 0?void 0:r.onWillAddFirstListener)===null||s===void 0||s.call(r,this),this._listeners=d,(l=(a=this._options)===null||a===void 0?void 0:a.onDidAddFirstListener)===null||l===void 0||l.call(a,this)),this._size++;let f=Yt(()=>{u?.(),this._removeListener(d)});return o instanceof Ye?o.add(f):Array.isArray(o)&&o.push(f),f}),this._event}_removeListener(e){var t,n,o,r;if((n=(t=this._options)===null||t===void 0?void 0:t.onWillRemoveListener)===null||n===void 0||n.call(t,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(r=(o=this._options)===null||o===void 0?void 0:o.onDidRemoveLastListener)===null||r===void 0||r.call(o,this),this._size=0;return}let s=this._listeners,a=s.indexOf(e);if(a===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,s[a]=void 0;let l=this._deliveryQueue.current===this;if(this._size*Xkt<=s.length){let c=0;for(let d=0;d0}},Bje=()=>new JV,JV=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Pf=class extends ge{constructor(e){super(e),this._isPaused=0,this._eventQueue=new $r,this._mergeFn=e?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){let e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}},TC=class extends Pf{constructor(e){var t;super(e),this._delay=(t=e.delay)!==null&&t!==void 0?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}},eW=class extends ge{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e?.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(t=>super.fire(t)),this._queuedEvents=[]}))}},tW=class{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new ge({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){let t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),Yt(Gu(()=>{this.hasListeners&&this.unhook(t);let o=this.events.indexOf(t);this.events.splice(o,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(t=>this.emitter.fire(t))}unhook(e){e.listener&&e.listener.dispose(),e.listener=null}dispose(){this.emitter.dispose()}},L3=class{constructor(){this.buffers=[]}wrapEvent(e){return(t,n,o)=>e(r=>{let s=this.buffers[this.buffers.length-1];s?s.push(()=>t.call(n,r)):t.call(n,r)},void 0,o)}bufferEvents(e){let t=[];this.buffers.push(t);let n=e();return this.buffers.pop(),t.forEach(o=>o()),n}},lT=class{constructor(){this.listening=!1,this.inputEvent=Et.None,this.inputEventListener=ue.None,this.emitter=new ge({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}});var Vje,Fi,IC,Jn,mo=P(()=>{Xt();Vje=Object.freeze(function(i,e){let t=setTimeout(i.bind(e),0);return{dispose(){clearTimeout(t)}}});(function(i){function e(t){return t===i.None||t===i.Cancelled||t instanceof IC?!0:!t||typeof t!="object"?!1:typeof t.isCancellationRequested=="boolean"&&typeof t.onCancellationRequested=="function"}i.isCancellationToken=e,i.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Et.None}),i.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Vje})})(Fi||(Fi={}));IC=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Vje:(this._emitter||(this._emitter=new ge),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Jn=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new IC),this._token}cancel(){this._token?this._token instanceof IC&&this._token.cancel():this._token=Fi.Cancelled}dispose(e=!1){var t;e&&this.cancel(),(t=this._parentListener)===null||t===void 0||t.dispose(),this._token?this._token instanceof IC&&this._token.dispose():this._token=Fi.None}}});function fr(i,e){let t=(e&65535)<<16>>>0;return(i|t)>>>0}var cT,iW,Sue,kue,Eue,eLt,tLt,iLt,nLt,nW,Lue,ep,Bh=P(()=>{cT=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},iW=new cT,Sue=new cT,kue=new cT,Eue=new Array(230),eLt={},tLt=[],iLt=Object.create(null),nLt=Object.create(null),nW=[],Lue=[];for(let i=0;i<=193;i++)nW[i]=-1;for(let i=0;i<=132;i++)Lue[i]=-1;(function(){let i="",e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",i,i],[1,1,"Hyper",0,i,0,i,i,i],[1,2,"Super",0,i,0,i,i,i],[1,3,"Fn",0,i,0,i,i,i],[1,4,"FnLock",0,i,0,i,i,i],[1,5,"Suspend",0,i,0,i,i,i],[1,6,"Resume",0,i,0,i,i,i],[1,7,"Turbo",0,i,0,i,i,i],[1,8,"Sleep",0,i,0,"VK_SLEEP",i,i],[1,9,"WakeUp",0,i,0,i,i,i],[0,10,"KeyA",31,"A",65,"VK_A",i,i],[0,11,"KeyB",32,"B",66,"VK_B",i,i],[0,12,"KeyC",33,"C",67,"VK_C",i,i],[0,13,"KeyD",34,"D",68,"VK_D",i,i],[0,14,"KeyE",35,"E",69,"VK_E",i,i],[0,15,"KeyF",36,"F",70,"VK_F",i,i],[0,16,"KeyG",37,"G",71,"VK_G",i,i],[0,17,"KeyH",38,"H",72,"VK_H",i,i],[0,18,"KeyI",39,"I",73,"VK_I",i,i],[0,19,"KeyJ",40,"J",74,"VK_J",i,i],[0,20,"KeyK",41,"K",75,"VK_K",i,i],[0,21,"KeyL",42,"L",76,"VK_L",i,i],[0,22,"KeyM",43,"M",77,"VK_M",i,i],[0,23,"KeyN",44,"N",78,"VK_N",i,i],[0,24,"KeyO",45,"O",79,"VK_O",i,i],[0,25,"KeyP",46,"P",80,"VK_P",i,i],[0,26,"KeyQ",47,"Q",81,"VK_Q",i,i],[0,27,"KeyR",48,"R",82,"VK_R",i,i],[0,28,"KeyS",49,"S",83,"VK_S",i,i],[0,29,"KeyT",50,"T",84,"VK_T",i,i],[0,30,"KeyU",51,"U",85,"VK_U",i,i],[0,31,"KeyV",52,"V",86,"VK_V",i,i],[0,32,"KeyW",53,"W",87,"VK_W",i,i],[0,33,"KeyX",54,"X",88,"VK_X",i,i],[0,34,"KeyY",55,"Y",89,"VK_Y",i,i],[0,35,"KeyZ",56,"Z",90,"VK_Z",i,i],[0,36,"Digit1",22,"1",49,"VK_1",i,i],[0,37,"Digit2",23,"2",50,"VK_2",i,i],[0,38,"Digit3",24,"3",51,"VK_3",i,i],[0,39,"Digit4",25,"4",52,"VK_4",i,i],[0,40,"Digit5",26,"5",53,"VK_5",i,i],[0,41,"Digit6",27,"6",54,"VK_6",i,i],[0,42,"Digit7",28,"7",55,"VK_7",i,i],[0,43,"Digit8",29,"8",56,"VK_8",i,i],[0,44,"Digit9",30,"9",57,"VK_9",i,i],[0,45,"Digit0",21,"0",48,"VK_0",i,i],[1,46,"Enter",3,"Enter",13,"VK_RETURN",i,i],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",i,i],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",i,i],[1,49,"Tab",2,"Tab",9,"VK_TAB",i,i],[1,50,"Space",10,"Space",32,"VK_SPACE",i,i],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,i,0,i,i,i],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",i,i],[1,64,"F1",59,"F1",112,"VK_F1",i,i],[1,65,"F2",60,"F2",113,"VK_F2",i,i],[1,66,"F3",61,"F3",114,"VK_F3",i,i],[1,67,"F4",62,"F4",115,"VK_F4",i,i],[1,68,"F5",63,"F5",116,"VK_F5",i,i],[1,69,"F6",64,"F6",117,"VK_F6",i,i],[1,70,"F7",65,"F7",118,"VK_F7",i,i],[1,71,"F8",66,"F8",119,"VK_F8",i,i],[1,72,"F9",67,"F9",120,"VK_F9",i,i],[1,73,"F10",68,"F10",121,"VK_F10",i,i],[1,74,"F11",69,"F11",122,"VK_F11",i,i],[1,75,"F12",70,"F12",123,"VK_F12",i,i],[1,76,"PrintScreen",0,i,0,i,i,i],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",i,i],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",i,i],[1,79,"Insert",19,"Insert",45,"VK_INSERT",i,i],[1,80,"Home",14,"Home",36,"VK_HOME",i,i],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",i,i],[1,82,"Delete",20,"Delete",46,"VK_DELETE",i,i],[1,83,"End",13,"End",35,"VK_END",i,i],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",i,i],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",i],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",i],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",i],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",i],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",i,i],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",i,i],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",i,i],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",i,i],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",i,i],[1,94,"NumpadEnter",3,i,0,i,i,i],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",i,i],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",i,i],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",i,i],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",i,i],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",i,i],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",i,i],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",i,i],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",i,i],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",i,i],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",i,i],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",i,i],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",i,i],[1,107,"ContextMenu",58,"ContextMenu",93,i,i,i],[1,108,"Power",0,i,0,i,i,i],[1,109,"NumpadEqual",0,i,0,i,i,i],[1,110,"F13",71,"F13",124,"VK_F13",i,i],[1,111,"F14",72,"F14",125,"VK_F14",i,i],[1,112,"F15",73,"F15",126,"VK_F15",i,i],[1,113,"F16",74,"F16",127,"VK_F16",i,i],[1,114,"F17",75,"F17",128,"VK_F17",i,i],[1,115,"F18",76,"F18",129,"VK_F18",i,i],[1,116,"F19",77,"F19",130,"VK_F19",i,i],[1,117,"F20",78,"F20",131,"VK_F20",i,i],[1,118,"F21",79,"F21",132,"VK_F21",i,i],[1,119,"F22",80,"F22",133,"VK_F22",i,i],[1,120,"F23",81,"F23",134,"VK_F23",i,i],[1,121,"F24",82,"F24",135,"VK_F24",i,i],[1,122,"Open",0,i,0,i,i,i],[1,123,"Help",0,i,0,i,i,i],[1,124,"Select",0,i,0,i,i,i],[1,125,"Again",0,i,0,i,i,i],[1,126,"Undo",0,i,0,i,i,i],[1,127,"Cut",0,i,0,i,i,i],[1,128,"Copy",0,i,0,i,i,i],[1,129,"Paste",0,i,0,i,i,i],[1,130,"Find",0,i,0,i,i,i],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",i,i],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",i,i],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",i,i],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",i,i],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",i,i],[1,136,"KanaMode",0,i,0,i,i,i],[0,137,"IntlYen",0,i,0,i,i,i],[1,138,"Convert",0,i,0,i,i,i],[1,139,"NonConvert",0,i,0,i,i,i],[1,140,"Lang1",0,i,0,i,i,i],[1,141,"Lang2",0,i,0,i,i,i],[1,142,"Lang3",0,i,0,i,i,i],[1,143,"Lang4",0,i,0,i,i,i],[1,144,"Lang5",0,i,0,i,i,i],[1,145,"Abort",0,i,0,i,i,i],[1,146,"Props",0,i,0,i,i,i],[1,147,"NumpadParenLeft",0,i,0,i,i,i],[1,148,"NumpadParenRight",0,i,0,i,i,i],[1,149,"NumpadBackspace",0,i,0,i,i,i],[1,150,"NumpadMemoryStore",0,i,0,i,i,i],[1,151,"NumpadMemoryRecall",0,i,0,i,i,i],[1,152,"NumpadMemoryClear",0,i,0,i,i,i],[1,153,"NumpadMemoryAdd",0,i,0,i,i,i],[1,154,"NumpadMemorySubtract",0,i,0,i,i,i],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",i,i],[1,156,"NumpadClearEntry",0,i,0,i,i,i],[1,0,i,5,"Ctrl",17,"VK_CONTROL",i,i],[1,0,i,4,"Shift",16,"VK_SHIFT",i,i],[1,0,i,6,"Alt",18,"VK_MENU",i,i],[1,0,i,57,"Meta",91,"VK_COMMAND",i,i],[1,157,"ControlLeft",5,i,0,"VK_LCONTROL",i,i],[1,158,"ShiftLeft",4,i,0,"VK_LSHIFT",i,i],[1,159,"AltLeft",6,i,0,"VK_LMENU",i,i],[1,160,"MetaLeft",57,i,0,"VK_LWIN",i,i],[1,161,"ControlRight",5,i,0,"VK_RCONTROL",i,i],[1,162,"ShiftRight",4,i,0,"VK_RSHIFT",i,i],[1,163,"AltRight",6,i,0,"VK_RMENU",i,i],[1,164,"MetaRight",57,i,0,"VK_RWIN",i,i],[1,165,"BrightnessUp",0,i,0,i,i,i],[1,166,"BrightnessDown",0,i,0,i,i,i],[1,167,"MediaPlay",0,i,0,i,i,i],[1,168,"MediaRecord",0,i,0,i,i,i],[1,169,"MediaFastForward",0,i,0,i,i,i],[1,170,"MediaRewind",0,i,0,i,i,i],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",i,i],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",i,i],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",i,i],[1,174,"Eject",0,i,0,i,i,i],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",i,i],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",i,i],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",i,i],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",i,i],[1,179,"LaunchApp1",0,i,0,"VK_MEDIA_LAUNCH_APP1",i,i],[1,180,"SelectTask",0,i,0,i,i,i],[1,181,"LaunchScreenSaver",0,i,0,i,i,i],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",i,i],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",i,i],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",i,i],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",i,i],[1,186,"BrowserStop",0,i,0,"VK_BROWSER_STOP",i,i],[1,187,"BrowserRefresh",0,i,0,"VK_BROWSER_REFRESH",i,i],[1,188,"BrowserFavorites",0,i,0,"VK_BROWSER_FAVORITES",i,i],[1,189,"ZoomToggle",0,i,0,i,i,i],[1,190,"MailReply",0,i,0,i,i,i],[1,191,"MailForward",0,i,0,i,i,i],[1,192,"MailSend",0,i,0,i,i,i],[1,0,i,114,"KeyInComposition",229,i,i,i],[1,0,i,116,"ABNT_C2",194,"VK_ABNT_C2",i,i],[1,0,i,96,"OEM_8",223,"VK_OEM_8",i,i],[1,0,i,0,i,0,"VK_KANA",i,i],[1,0,i,0,i,0,"VK_HANGUL",i,i],[1,0,i,0,i,0,"VK_JUNJA",i,i],[1,0,i,0,i,0,"VK_FINAL",i,i],[1,0,i,0,i,0,"VK_HANJA",i,i],[1,0,i,0,i,0,"VK_KANJI",i,i],[1,0,i,0,i,0,"VK_CONVERT",i,i],[1,0,i,0,i,0,"VK_NONCONVERT",i,i],[1,0,i,0,i,0,"VK_ACCEPT",i,i],[1,0,i,0,i,0,"VK_MODECHANGE",i,i],[1,0,i,0,i,0,"VK_SELECT",i,i],[1,0,i,0,i,0,"VK_PRINT",i,i],[1,0,i,0,i,0,"VK_EXECUTE",i,i],[1,0,i,0,i,0,"VK_SNAPSHOT",i,i],[1,0,i,0,i,0,"VK_HELP",i,i],[1,0,i,0,i,0,"VK_APPS",i,i],[1,0,i,0,i,0,"VK_PROCESSKEY",i,i],[1,0,i,0,i,0,"VK_PACKET",i,i],[1,0,i,0,i,0,"VK_DBE_SBCSCHAR",i,i],[1,0,i,0,i,0,"VK_DBE_DBCSCHAR",i,i],[1,0,i,0,i,0,"VK_ATTN",i,i],[1,0,i,0,i,0,"VK_CRSEL",i,i],[1,0,i,0,i,0,"VK_EXSEL",i,i],[1,0,i,0,i,0,"VK_EREOF",i,i],[1,0,i,0,i,0,"VK_PLAY",i,i],[1,0,i,0,i,0,"VK_ZOOM",i,i],[1,0,i,0,i,0,"VK_NONAME",i,i],[1,0,i,0,i,0,"VK_PA1",i,i],[1,0,i,0,i,0,"VK_OEM_CLEAR",i,i]],t=[],n=[];for(let o of e){let[r,s,a,l,c,d,u,h,f]=o;if(n[s]||(n[s]=!0,tLt[s]=a,iLt[a]=s,nLt[a.toLowerCase()]=s,r&&(nW[s]=l,l!==0&&l!==3&&l!==5&&l!==4&&l!==6&&l!==57&&(Lue[l]=s))),!t[l]){if(t[l]=!0,!c)throw new Error(`String representation missing for key code ${l} around scan code ${a}`);iW.define(l,c),Sue.define(l,h||c),kue.define(l,f||h||c)}d&&(Eue[d]=l),u&&(eLt[u]=l)}Lue[3]=46})();(function(i){function e(a){return iW.keyCodeToStr(a)}i.toString=e;function t(a){return iW.strToKeyCode(a)}i.fromString=t;function n(a){return Sue.keyCodeToStr(a)}i.toUserSettingsUS=n;function o(a){return kue.keyCodeToStr(a)}i.toUserSettingsGeneral=o;function r(a){return Sue.strToKeyCode(a)||kue.strToKeyCode(a)}i.fromUserSettings=r;function s(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return iW.keyCodeToStr(a)}i.toElectronAccelerator=s})(ep||(ep={}))});var MC,Due,dT,uT,Wje,Tue=P(()=>{Mn();Due=globalThis.vscode;if(typeof Due<"u"&&typeof Due.process<"u"){let i=Due.process;MC={get platform(){return i.platform},get arch(){return i.arch},get env(){return i.env},cwd(){return i.cwd()}}}else typeof process<"u"?MC={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:MC={get platform(){return hr?"win32":Wi?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};dT=MC.cwd,uT=MC.env,Wje=MC.platform});function dLt(i,e){if(i===null||typeof i!="object")throw new oW(e,"Object",i)}function Qa(i,e){if(typeof i!="string")throw new oW(e,"string",i)}function Oo(i){return i===Zc||i===Vh}function Iue(i){return i===Zc}function D3(i){return i>=rLt&&i<=aLt||i>=sLt&&i<=lLt}function rW(i,e,t,n){let o="",r=0,s=-1,a=0,l=0;for(let c=0;c<=i.length;++c){if(c2){let d=o.lastIndexOf(t);d===-1?(o="",r=0):(o=o.slice(0,d),r=o.length-1-o.lastIndexOf(t)),s=c,a=0;continue}else if(o.length!==0){o="",r=0,s=c,a=0;continue}}e&&(o+=o.length>0?`${t}..`:"..",r=2)}else o.length>0?o+=`${t}${i.slice(s+1,c)}`:o=i.slice(s+1,c),r=c-s-1;s=c,a=0}else l===T3&&a!==-1?++a:a=-1}return o}function Uje(i,e){dLt(e,"pathObject");let t=e.dir||e.root,n=e.base||`${e.name||""}${e.ext||""}`;return t?t===e.root?`${t}${n}`:`${t}${i}${n}`:n}var rLt,sLt,aLt,lLt,T3,Zc,Vh,E3,cLt,oW,I3,ou,uLt,hs,sW,$je,jje,aW,tp,qje,Zu,Dg=P(()=>{Tue();rLt=65,sLt=97,aLt=90,lLt=122,T3=46,Zc=47,Vh=92,E3=58,cLt=63,oW=class extends Error{constructor(e,t,n){let o;typeof t=="string"&&t.indexOf("not ")===0?(o="must not be",t=t.replace(/^not /,"")):o="must be";let r=e.indexOf(".")!==-1?"property":"argument",s=`The "${e}" ${r} ${o} of type ${t}`;s+=`. Received type ${typeof n}`,super(s),this.code="ERR_INVALID_ARG_TYPE"}};I3=Wje==="win32";ou={resolve(...i){let e="",t="",n=!1;for(let o=i.length-1;o>=-1;o--){let r;if(o>=0){if(r=i[o],Qa(r,"path"),r.length===0)continue}else e.length===0?r=dT():(r=uT[`=${e}`]||dT(),(r===void 0||r.slice(0,2).toLowerCase()!==e.toLowerCase()&&r.charCodeAt(2)===Vh)&&(r=`${e}\\`));let s=r.length,a=0,l="",c=!1,d=r.charCodeAt(0);if(s===1)Oo(d)&&(a=1,c=!0);else if(Oo(d))if(c=!0,Oo(r.charCodeAt(1))){let u=2,h=u;for(;u2&&Oo(r.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(n){if(e.length>0)break}else if(t=`${r.slice(a)}\\${t}`,n=c,c&&e.length>0)break}return t=rW(t,!n,"\\",Oo),n?`${e}\\${t}`:`${e}${t}`||"."},normalize(i){Qa(i,"path");let e=i.length;if(e===0)return".";let t=0,n,o=!1,r=i.charCodeAt(0);if(e===1)return Iue(r)?"\\":i;if(Oo(r))if(o=!0,Oo(i.charCodeAt(1))){let a=2,l=a;for(;a2&&Oo(i.charCodeAt(2))&&(o=!0,t=3));let s=t0&&Oo(i.charCodeAt(e-1))&&(s+="\\"),n===void 0?o?`\\${s}`:s:o?`${n}\\${s}`:`${n}${s}`},isAbsolute(i){Qa(i,"path");let e=i.length;if(e===0)return!1;let t=i.charCodeAt(0);return Oo(t)||e>2&&D3(t)&&i.charCodeAt(1)===E3&&Oo(i.charCodeAt(2))},join(...i){if(i.length===0)return".";let e,t;for(let r=0;r0&&(e===void 0?e=t=s:e+=`\\${s}`)}if(e===void 0)return".";let n=!0,o=0;if(typeof t=="string"&&Oo(t.charCodeAt(0))){++o;let r=t.length;r>1&&Oo(t.charCodeAt(1))&&(++o,r>2&&(Oo(t.charCodeAt(2))?++o:n=!1))}if(n){for(;o=2&&(e=`\\${e.slice(o)}`)}return ou.normalize(e)},relative(i,e){if(Qa(i,"from"),Qa(e,"to"),i===e)return"";let t=ou.resolve(i),n=ou.resolve(e);if(t===n||(i=t.toLowerCase(),e=n.toLowerCase(),i===e))return"";let o=0;for(;oo&&i.charCodeAt(r-1)===Vh;)r--;let s=r-o,a=0;for(;aa&&e.charCodeAt(l-1)===Vh;)l--;let c=l-a,d=sd){if(e.charCodeAt(a+h)===Vh)return n.slice(a+h+1);if(h===2)return n.slice(a+h)}s>d&&(i.charCodeAt(o+h)===Vh?u=h:h===2&&(u=3)),u===-1&&(u=0)}let f="";for(h=o+u+1;h<=r;++h)(h===r||i.charCodeAt(h)===Vh)&&(f+=f.length===0?"..":"\\..");return a+=u,f.length>0?`${f}${n.slice(a,l)}`:(n.charCodeAt(a)===Vh&&++a,n.slice(a,l))},toNamespacedPath(i){if(typeof i!="string"||i.length===0)return i;let e=ou.resolve(i);if(e.length<=2)return i;if(e.charCodeAt(0)===Vh){if(e.charCodeAt(1)===Vh){let t=e.charCodeAt(2);if(t!==cLt&&t!==T3)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(D3(e.charCodeAt(0))&&e.charCodeAt(1)===E3&&e.charCodeAt(2)===Vh)return`\\\\?\\${e}`;return i},dirname(i){Qa(i,"path");let e=i.length;if(e===0)return".";let t=-1,n=0,o=i.charCodeAt(0);if(e===1)return Oo(o)?i:".";if(Oo(o)){if(t=n=1,Oo(i.charCodeAt(1))){let a=2,l=a;for(;a2&&Oo(i.charCodeAt(2))?3:2,n=t);let r=-1,s=!0;for(let a=e-1;a>=n;--a)if(Oo(i.charCodeAt(a))){if(!s){r=a;break}}else s=!1;if(r===-1){if(t===-1)return".";r=t}return i.slice(0,r)},basename(i,e){e!==void 0&&Qa(e,"ext"),Qa(i,"path");let t=0,n=-1,o=!0,r;if(i.length>=2&&D3(i.charCodeAt(0))&&i.charCodeAt(1)===E3&&(t=2),e!==void 0&&e.length>0&&e.length<=i.length){if(e===i)return"";let s=e.length-1,a=-1;for(r=i.length-1;r>=t;--r){let l=i.charCodeAt(r);if(Oo(l)){if(!o){t=r+1;break}}else a===-1&&(o=!1,a=r+1),s>=0&&(l===e.charCodeAt(s)?--s===-1&&(n=r):(s=-1,n=a))}return t===n?n=a:n===-1&&(n=i.length),i.slice(t,n)}for(r=i.length-1;r>=t;--r)if(Oo(i.charCodeAt(r))){if(!o){t=r+1;break}}else n===-1&&(o=!1,n=r+1);return n===-1?"":i.slice(t,n)},extname(i){Qa(i,"path");let e=0,t=-1,n=0,o=-1,r=!0,s=0;i.length>=2&&i.charCodeAt(1)===E3&&D3(i.charCodeAt(0))&&(e=n=2);for(let a=i.length-1;a>=e;--a){let l=i.charCodeAt(a);if(Oo(l)){if(!r){n=a+1;break}continue}o===-1&&(r=!1,o=a+1),l===T3?t===-1?t=a:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||o===-1||s===0||s===1&&t===o-1&&t===n+1?"":i.slice(t,o)},format:Uje.bind(null,"\\"),parse(i){Qa(i,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return e;let t=i.length,n=0,o=i.charCodeAt(0);if(t===1)return Oo(o)?(e.root=e.dir=i,e):(e.base=e.name=i,e);if(Oo(o)){if(n=1,Oo(i.charCodeAt(1))){let u=2,h=u;for(;u0&&(e.root=i.slice(0,n));let r=-1,s=n,a=-1,l=!0,c=i.length-1,d=0;for(;c>=n;--c){if(o=i.charCodeAt(c),Oo(o)){if(!l){s=c+1;break}continue}a===-1&&(l=!1,a=c+1),o===T3?r===-1?r=c:d!==1&&(d=1):r!==-1&&(d=-1)}return a!==-1&&(r===-1||d===0||d===1&&r===a-1&&r===s+1?e.base=e.name=i.slice(s,a):(e.name=i.slice(s,r),e.base=i.slice(s,a),e.ext=i.slice(r,a))),s>0&&s!==n?e.dir=i.slice(0,s-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},uLt=(()=>{if(I3){let i=/\\/g;return()=>{let e=dT().replace(i,"/");return e.slice(e.indexOf("/"))}}return()=>dT()})(),hs={resolve(...i){let e="",t=!1;for(let n=i.length-1;n>=-1&&!t;n--){let o=n>=0?i[n]:uLt();Qa(o,"path"),o.length!==0&&(e=`${o}/${e}`,t=o.charCodeAt(0)===Zc)}return e=rW(e,!t,"/",Iue),t?`/${e}`:e.length>0?e:"."},normalize(i){if(Qa(i,"path"),i.length===0)return".";let e=i.charCodeAt(0)===Zc,t=i.charCodeAt(i.length-1)===Zc;return i=rW(i,!e,"/",Iue),i.length===0?e?"/":t?"./":".":(t&&(i+="/"),e?`/${i}`:i)},isAbsolute(i){return Qa(i,"path"),i.length>0&&i.charCodeAt(0)===Zc},join(...i){if(i.length===0)return".";let e;for(let t=0;t0&&(e===void 0?e=n:e+=`/${n}`)}return e===void 0?".":hs.normalize(e)},relative(i,e){if(Qa(i,"from"),Qa(e,"to"),i===e||(i=hs.resolve(i),e=hs.resolve(e),i===e))return"";let t=1,n=i.length,o=n-t,r=1,s=e.length-r,a=oa){if(e.charCodeAt(r+c)===Zc)return e.slice(r+c+1);if(c===0)return e.slice(r+c)}else o>a&&(i.charCodeAt(t+c)===Zc?l=c:c===0&&(l=0));let d="";for(c=t+l+1;c<=n;++c)(c===n||i.charCodeAt(c)===Zc)&&(d+=d.length===0?"..":"/..");return`${d}${e.slice(r+l)}`},toNamespacedPath(i){return i},dirname(i){if(Qa(i,"path"),i.length===0)return".";let e=i.charCodeAt(0)===Zc,t=-1,n=!0;for(let o=i.length-1;o>=1;--o)if(i.charCodeAt(o)===Zc){if(!n){t=o;break}}else n=!1;return t===-1?e?"/":".":e&&t===1?"//":i.slice(0,t)},basename(i,e){e!==void 0&&Qa(e,"ext"),Qa(i,"path");let t=0,n=-1,o=!0,r;if(e!==void 0&&e.length>0&&e.length<=i.length){if(e===i)return"";let s=e.length-1,a=-1;for(r=i.length-1;r>=0;--r){let l=i.charCodeAt(r);if(l===Zc){if(!o){t=r+1;break}}else a===-1&&(o=!1,a=r+1),s>=0&&(l===e.charCodeAt(s)?--s===-1&&(n=r):(s=-1,n=a))}return t===n?n=a:n===-1&&(n=i.length),i.slice(t,n)}for(r=i.length-1;r>=0;--r)if(i.charCodeAt(r)===Zc){if(!o){t=r+1;break}}else n===-1&&(o=!1,n=r+1);return n===-1?"":i.slice(t,n)},extname(i){Qa(i,"path");let e=-1,t=0,n=-1,o=!0,r=0;for(let s=i.length-1;s>=0;--s){let a=i.charCodeAt(s);if(a===Zc){if(!o){t=s+1;break}continue}n===-1&&(o=!1,n=s+1),a===T3?e===-1?e=s:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||n===-1||r===0||r===1&&e===n-1&&e===t+1?"":i.slice(e,n)},format:Uje.bind(null,"/"),parse(i){Qa(i,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return e;let t=i.charCodeAt(0)===Zc,n;t?(e.root="/",n=1):n=0;let o=-1,r=0,s=-1,a=!0,l=i.length-1,c=0;for(;l>=n;--l){let d=i.charCodeAt(l);if(d===Zc){if(!a){r=l+1;break}continue}s===-1&&(a=!1,s=l+1),d===T3?o===-1?o=l:c!==1&&(c=1):o!==-1&&(c=-1)}if(s!==-1){let d=r===0&&t?1:r;o===-1||c===0||c===1&&o===s-1&&o===r+1?e.base=e.name=i.slice(d,s):(e.name=i.slice(d,o),e.base=i.slice(d,s),e.ext=i.slice(o,s))}return r>0?e.dir=i.slice(0,r-1):t&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};hs.win32=ou.win32=ou;hs.posix=ou.posix=hs;sW=I3?ou.normalize:hs.normalize,$je=I3?ou.resolve:hs.resolve,jje=I3?ou.relative:hs.relative,aW=I3?ou.dirname:hs.dirname,tp=I3?ou.basename:hs.basename,qje=I3?ou.extname:hs.extname,Zu=I3?ou.sep:hs.sep});function mLt(i,e){if(!i.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${i.authority}", path: "${i.path}", query: "${i.query}", fragment: "${i.fragment}"}`);if(i.scheme&&!hLt.test(i.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(i.path){if(i.authority){if(!fLt.test(i.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(pLt.test(i.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function gLt(i,e){return!i&&!e?"file":i}function vLt(i,e){switch(i){case"https":case"http":case"file":e?e[0]!==sm&&(e=sm+e):e=sm;break}return e}function Gje(i,e,t){let n,o=-1;for(let r=0;r=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===45||s===46||s===95||s===126||e&&s===47||t&&s===91||t&&s===93||t&&s===58)o!==-1&&(n+=encodeURIComponent(i.substring(o,r)),o=-1),n!==void 0&&(n+=i.charAt(r));else{n===void 0&&(n=i.substr(0,r));let a=Zje[s];a!==void 0?(o!==-1&&(n+=encodeURIComponent(i.substring(o,r)),o=-1),n+=a):o===-1&&(o=r)}}return o!==-1&&(n+=encodeURIComponent(i.substring(o))),n!==void 0?n:i}function bLt(i){let e;for(let t=0;t1&&i.scheme==="file"?t=`//${i.authority}${i.path}`:i.path.charCodeAt(0)===47&&(i.path.charCodeAt(1)>=65&&i.path.charCodeAt(1)<=90||i.path.charCodeAt(1)>=97&&i.path.charCodeAt(1)<=122)&&i.path.charCodeAt(2)===58?e?t=i.path.substr(1):t=i.path[1].toLowerCase()+i.path.substr(2):t=i.path,hr&&(t=t.replace(/\//g,"\\")),t}function Nue(i,e){let t=e?bLt:Gje,n="",{scheme:o,authority:r,path:s,query:a,fragment:l}=i;if(o&&(n+=o,n+=":"),(r||o==="file")&&(n+=sm,n+=sm),r){let c=r.indexOf("@");if(c!==-1){let d=r.substr(0,c);r=r.substr(c+1),c=d.lastIndexOf(":"),c===-1?n+=t(d,!1,!1):(n+=t(d.substr(0,c),!1,!1),n+=":",n+=t(d.substr(c+1),!1,!0)),n+="@"}r=r.toLowerCase(),c=r.lastIndexOf(":"),c===-1?n+=t(r,!1,!0):(n+=t(r.substr(0,c),!1,!0),n+=r.substr(c))}if(s){if(s.length>=3&&s.charCodeAt(0)===47&&s.charCodeAt(2)===58){let c=s.charCodeAt(1);c>=65&&c<=90&&(s=`/${String.fromCharCode(c+32)}:${s.substr(3)}`)}else if(s.length>=2&&s.charCodeAt(1)===58){let c=s.charCodeAt(0);c>=65&&c<=90&&(s=`${String.fromCharCode(c+32)}:${s.substr(2)}`)}n+=t(s,!0,!1)}return a&&(n+="?",n+=t(a,!1,!1)),l&&(n+="#",n+=e?l:Gje(l,!1,!1)),n}function Xje(i){try{return decodeURIComponent(i)}catch{return i.length>3?i.substr(0,3)+Xje(i.substr(3)):i}}function lW(i){return i.match(Kje)?i.replace(Kje,e=>Xje(e)):i}var hLt,fLt,pLt,Os,sm,_Lt,li,Yje,M3,Zje,Kje,Io=P(()=>{Dg();Mn();hLt=/^\w[\w\d+.-]*$/,fLt=/^\//,pLt=/^\/\//;Os="",sm="/",_Lt=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,li=class i{static isUri(e){return e instanceof i?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}constructor(e,t,n,o,r,s=!1){typeof e=="object"?(this.scheme=e.scheme||Os,this.authority=e.authority||Os,this.path=e.path||Os,this.query=e.query||Os,this.fragment=e.fragment||Os):(this.scheme=gLt(e,s),this.authority=t||Os,this.path=vLt(this.scheme,n||Os),this.query=o||Os,this.fragment=r||Os,mLt(this,s))}get fsPath(){return hT(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:o,query:r,fragment:s}=e;return t===void 0?t=this.scheme:t===null&&(t=Os),n===void 0?n=this.authority:n===null&&(n=Os),o===void 0?o=this.path:o===null&&(o=Os),r===void 0?r=this.query:r===null&&(r=Os),s===void 0?s=this.fragment:s===null&&(s=Os),t===this.scheme&&n===this.authority&&o===this.path&&r===this.query&&s===this.fragment?this:new M3(t,n,o,r,s)}static parse(e,t=!1){let n=_Lt.exec(e);return n?new M3(n[2]||Os,lW(n[4]||Os),lW(n[5]||Os),lW(n[7]||Os),lW(n[9]||Os),t):new M3(Os,Os,Os,Os,Os)}static file(e){let t=Os;if(hr&&(e=e.replace(/\\/g,sm)),e[0]===sm&&e[1]===sm){let n=e.indexOf(sm,2);n===-1?(t=e.substring(2),e=sm):(t=e.substring(2,n),e=e.substring(n)||sm)}return new M3("file",t,e,Os,Os)}static from(e,t){return new M3(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return hr&&e.scheme==="file"?n=i.file(ou.join(hT(e,!0),...t)).path:n=hs.join(e.path,...t),e.with({path:n})}toString(e=!1){return Nue(this,e)}toJSON(){return this}static revive(e){var t,n;if(e){if(e instanceof i)return e;{let o=new M3(e);return o._formatted=(t=e.external)!==null&&t!==void 0?t:null,o._fsPath=e._sep===Yje&&(n=e.fsPath)!==null&&n!==void 0?n:null,o}}else return e}},Yje=hr?1:void 0,M3=class extends li{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=hT(this,!1)),this._fsPath}toString(e=!1){return e?Nue(this,!0):(this._formatted||(this._formatted=Nue(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Yje),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}},Zje={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};Kje=/(%[0-9A-Za-z][0-9A-Za-z])+/g});var ke,Mi=P(()=>{ke=class i{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new i(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return i.equals(this,e)}static equals(e,t){return!e&&!t?!0:!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return i.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{Mi();O=class i{constructor(e,t,n,o){e>n||e===n&&t>o?(this.startLineNumber=n,this.startColumn=o,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=o)}isEmpty(){return i.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return i.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return i.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return i.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return i.plusRange(this,e)}static plusRange(e,t){let n,o,r,s;return t.startLineNumbere.endLineNumber?(r=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(r=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(r=e.endLineNumber,s=e.endColumn),new i(n,o,r,s)}intersectRanges(e){return i.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,o=e.startColumn,r=e.endLineNumber,s=e.endColumn,a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,d=t.endColumn;return nc?(r=c,s=d):r===c&&(s=Math.min(s,d)),n>r||n===r&&o>s?null:new i(n,o,r,s)}equalsRange(e){return i.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t?!0:!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return i.getEndPosition(this)}static getEndPosition(e){return new ke(e.endLineNumber,e.endColumn)}getStartPosition(){return i.getStartPosition(this)}static getStartPosition(e){return new ke(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new i(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new i(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return i.collapseToStart(this)}static collapseToStart(e){return new i(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return i.collapseToEnd(this)}static collapseToEnd(e){return new i(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new i(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new i(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new i(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}});var jt,zo=P(()=>{Mi();Kt();jt=class i extends O{constructor(e,t,n,o){super(e,t,n,o),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=o}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return i.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return this.getDirection()===0?new i(this.startLineNumber,this.startColumn,e,t):new i(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new ke(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new ke(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return this.getDirection()===0?new i(e,t,this.endLineNumber,this.endColumn):new i(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new i(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return t===0?new i(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new i(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new i(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n{ho();Aue=Object.create(null);kt={add:U("add",6e4),plus:U("plus",6e4),gistNew:U("gist-new",6e4),repoCreate:U("repo-create",6e4),lightbulb:U("lightbulb",60001),lightBulb:U("light-bulb",60001),repo:U("repo",60002),repoDelete:U("repo-delete",60002),gistFork:U("gist-fork",60003),repoForked:U("repo-forked",60003),gitPullRequest:U("git-pull-request",60004),gitPullRequestAbandoned:U("git-pull-request-abandoned",60004),recordKeys:U("record-keys",60005),keyboard:U("keyboard",60005),tag:U("tag",60006),tagAdd:U("tag-add",60006),tagRemove:U("tag-remove",60006),gitPullRequestLabel:U("git-pull-request-label",60006),person:U("person",60007),personFollow:U("person-follow",60007),personOutline:U("person-outline",60007),personFilled:U("person-filled",60007),gitBranch:U("git-branch",60008),gitBranchCreate:U("git-branch-create",60008),gitBranchDelete:U("git-branch-delete",60008),sourceControl:U("source-control",60008),mirror:U("mirror",60009),mirrorPublic:U("mirror-public",60009),star:U("star",60010),starAdd:U("star-add",60010),starDelete:U("star-delete",60010),starEmpty:U("star-empty",60010),comment:U("comment",60011),commentAdd:U("comment-add",60011),alert:U("alert",60012),warning:U("warning",60012),search:U("search",60013),searchSave:U("search-save",60013),logOut:U("log-out",60014),signOut:U("sign-out",60014),logIn:U("log-in",60015),signIn:U("sign-in",60015),eye:U("eye",60016),eyeUnwatch:U("eye-unwatch",60016),eyeWatch:U("eye-watch",60016),circleFilled:U("circle-filled",60017),primitiveDot:U("primitive-dot",60017),closeDirty:U("close-dirty",60017),debugBreakpoint:U("debug-breakpoint",60017),debugBreakpointDisabled:U("debug-breakpoint-disabled",60017),debugBreakpointPending:U("debug-breakpoint-pending",60377),debugHint:U("debug-hint",60017),primitiveSquare:U("primitive-square",60018),edit:U("edit",60019),pencil:U("pencil",60019),info:U("info",60020),issueOpened:U("issue-opened",60020),gistPrivate:U("gist-private",60021),gitForkPrivate:U("git-fork-private",60021),lock:U("lock",60021),mirrorPrivate:U("mirror-private",60021),close:U("close",60022),removeClose:U("remove-close",60022),x:U("x",60022),repoSync:U("repo-sync",60023),sync:U("sync",60023),clone:U("clone",60024),desktopDownload:U("desktop-download",60024),beaker:U("beaker",60025),microscope:U("microscope",60025),vm:U("vm",60026),deviceDesktop:U("device-desktop",60026),file:U("file",60027),fileText:U("file-text",60027),more:U("more",60028),ellipsis:U("ellipsis",60028),kebabHorizontal:U("kebab-horizontal",60028),mailReply:U("mail-reply",60029),reply:U("reply",60029),organization:U("organization",60030),organizationFilled:U("organization-filled",60030),organizationOutline:U("organization-outline",60030),newFile:U("new-file",60031),fileAdd:U("file-add",60031),newFolder:U("new-folder",60032),fileDirectoryCreate:U("file-directory-create",60032),trash:U("trash",60033),trashcan:U("trashcan",60033),history:U("history",60034),clock:U("clock",60034),folder:U("folder",60035),fileDirectory:U("file-directory",60035),symbolFolder:U("symbol-folder",60035),logoGithub:U("logo-github",60036),markGithub:U("mark-github",60036),github:U("github",60036),terminal:U("terminal",60037),console:U("console",60037),repl:U("repl",60037),zap:U("zap",60038),symbolEvent:U("symbol-event",60038),error:U("error",60039),stop:U("stop",60039),variable:U("variable",60040),symbolVariable:U("symbol-variable",60040),array:U("array",60042),symbolArray:U("symbol-array",60042),symbolModule:U("symbol-module",60043),symbolPackage:U("symbol-package",60043),symbolNamespace:U("symbol-namespace",60043),symbolObject:U("symbol-object",60043),symbolMethod:U("symbol-method",60044),symbolFunction:U("symbol-function",60044),symbolConstructor:U("symbol-constructor",60044),symbolBoolean:U("symbol-boolean",60047),symbolNull:U("symbol-null",60047),symbolNumeric:U("symbol-numeric",60048),symbolNumber:U("symbol-number",60048),symbolStructure:U("symbol-structure",60049),symbolStruct:U("symbol-struct",60049),symbolParameter:U("symbol-parameter",60050),symbolTypeParameter:U("symbol-type-parameter",60050),symbolKey:U("symbol-key",60051),symbolText:U("symbol-text",60051),symbolReference:U("symbol-reference",60052),goToFile:U("go-to-file",60052),symbolEnum:U("symbol-enum",60053),symbolValue:U("symbol-value",60053),symbolRuler:U("symbol-ruler",60054),symbolUnit:U("symbol-unit",60054),activateBreakpoints:U("activate-breakpoints",60055),archive:U("archive",60056),arrowBoth:U("arrow-both",60057),arrowDown:U("arrow-down",60058),arrowLeft:U("arrow-left",60059),arrowRight:U("arrow-right",60060),arrowSmallDown:U("arrow-small-down",60061),arrowSmallLeft:U("arrow-small-left",60062),arrowSmallRight:U("arrow-small-right",60063),arrowSmallUp:U("arrow-small-up",60064),arrowUp:U("arrow-up",60065),bell:U("bell",60066),bold:U("bold",60067),book:U("book",60068),bookmark:U("bookmark",60069),debugBreakpointConditionalUnverified:U("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:U("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:U("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:U("debug-breakpoint-data-unverified",60072),debugBreakpointData:U("debug-breakpoint-data",60073),debugBreakpointDataDisabled:U("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:U("debug-breakpoint-log-unverified",60074),debugBreakpointLog:U("debug-breakpoint-log",60075),debugBreakpointLogDisabled:U("debug-breakpoint-log-disabled",60075),briefcase:U("briefcase",60076),broadcast:U("broadcast",60077),browser:U("browser",60078),bug:U("bug",60079),calendar:U("calendar",60080),caseSensitive:U("case-sensitive",60081),check:U("check",60082),checklist:U("checklist",60083),chevronDown:U("chevron-down",60084),dropDownButton:U("drop-down-button",60084),chevronLeft:U("chevron-left",60085),chevronRight:U("chevron-right",60086),chevronUp:U("chevron-up",60087),chromeClose:U("chrome-close",60088),chromeMaximize:U("chrome-maximize",60089),chromeMinimize:U("chrome-minimize",60090),chromeRestore:U("chrome-restore",60091),circle:U("circle",60092),circleOutline:U("circle-outline",60092),debugBreakpointUnverified:U("debug-breakpoint-unverified",60092),circleSlash:U("circle-slash",60093),circuitBoard:U("circuit-board",60094),clearAll:U("clear-all",60095),clippy:U("clippy",60096),closeAll:U("close-all",60097),cloudDownload:U("cloud-download",60098),cloudUpload:U("cloud-upload",60099),code:U("code",60100),collapseAll:U("collapse-all",60101),colorMode:U("color-mode",60102),commentDiscussion:U("comment-discussion",60103),compareChanges:U("compare-changes",60157),creditCard:U("credit-card",60105),dash:U("dash",60108),dashboard:U("dashboard",60109),database:U("database",60110),debugContinue:U("debug-continue",60111),debugDisconnect:U("debug-disconnect",60112),debugPause:U("debug-pause",60113),debugRestart:U("debug-restart",60114),debugStart:U("debug-start",60115),debugStepInto:U("debug-step-into",60116),debugStepOut:U("debug-step-out",60117),debugStepOver:U("debug-step-over",60118),debugStop:U("debug-stop",60119),debug:U("debug",60120),deviceCameraVideo:U("device-camera-video",60121),deviceCamera:U("device-camera",60122),deviceMobile:U("device-mobile",60123),diffAdded:U("diff-added",60124),diffIgnored:U("diff-ignored",60125),diffModified:U("diff-modified",60126),diffRemoved:U("diff-removed",60127),diffRenamed:U("diff-renamed",60128),diff:U("diff",60129),discard:U("discard",60130),editorLayout:U("editor-layout",60131),emptyWindow:U("empty-window",60132),exclude:U("exclude",60133),extensions:U("extensions",60134),eyeClosed:U("eye-closed",60135),fileBinary:U("file-binary",60136),fileCode:U("file-code",60137),fileMedia:U("file-media",60138),filePdf:U("file-pdf",60139),fileSubmodule:U("file-submodule",60140),fileSymlinkDirectory:U("file-symlink-directory",60141),fileSymlinkFile:U("file-symlink-file",60142),fileZip:U("file-zip",60143),files:U("files",60144),filter:U("filter",60145),flame:U("flame",60146),foldDown:U("fold-down",60147),foldUp:U("fold-up",60148),fold:U("fold",60149),folderActive:U("folder-active",60150),folderOpened:U("folder-opened",60151),gear:U("gear",60152),gift:U("gift",60153),gistSecret:U("gist-secret",60154),gist:U("gist",60155),gitCommit:U("git-commit",60156),gitCompare:U("git-compare",60157),gitMerge:U("git-merge",60158),githubAction:U("github-action",60159),githubAlt:U("github-alt",60160),globe:U("globe",60161),grabber:U("grabber",60162),graph:U("graph",60163),gripper:U("gripper",60164),heart:U("heart",60165),home:U("home",60166),horizontalRule:U("horizontal-rule",60167),hubot:U("hubot",60168),inbox:U("inbox",60169),issueClosed:U("issue-closed",60324),issueReopened:U("issue-reopened",60171),issues:U("issues",60172),italic:U("italic",60173),jersey:U("jersey",60174),json:U("json",60175),bracket:U("bracket",60175),kebabVertical:U("kebab-vertical",60176),key:U("key",60177),law:U("law",60178),lightbulbAutofix:U("lightbulb-autofix",60179),linkExternal:U("link-external",60180),link:U("link",60181),listOrdered:U("list-ordered",60182),listUnordered:U("list-unordered",60183),liveShare:U("live-share",60184),loading:U("loading",60185),location:U("location",60186),mailRead:U("mail-read",60187),mail:U("mail",60188),markdown:U("markdown",60189),megaphone:U("megaphone",60190),mention:U("mention",60191),milestone:U("milestone",60192),gitPullRequestMilestone:U("git-pull-request-milestone",60192),mortarBoard:U("mortar-board",60193),move:U("move",60194),multipleWindows:U("multiple-windows",60195),mute:U("mute",60196),noNewline:U("no-newline",60197),note:U("note",60198),octoface:U("octoface",60199),openPreview:U("open-preview",60200),package:U("package",60201),paintcan:U("paintcan",60202),pin:U("pin",60203),play:U("play",60204),run:U("run",60204),plug:U("plug",60205),preserveCase:U("preserve-case",60206),preview:U("preview",60207),project:U("project",60208),pulse:U("pulse",60209),question:U("question",60210),quote:U("quote",60211),radioTower:U("radio-tower",60212),reactions:U("reactions",60213),references:U("references",60214),refresh:U("refresh",60215),regex:U("regex",60216),remoteExplorer:U("remote-explorer",60217),remote:U("remote",60218),remove:U("remove",60219),replaceAll:U("replace-all",60220),replace:U("replace",60221),repoClone:U("repo-clone",60222),repoForcePush:U("repo-force-push",60223),repoPull:U("repo-pull",60224),repoPush:U("repo-push",60225),report:U("report",60226),requestChanges:U("request-changes",60227),rocket:U("rocket",60228),rootFolderOpened:U("root-folder-opened",60229),rootFolder:U("root-folder",60230),rss:U("rss",60231),ruby:U("ruby",60232),saveAll:U("save-all",60233),saveAs:U("save-as",60234),save:U("save",60235),screenFull:U("screen-full",60236),screenNormal:U("screen-normal",60237),searchStop:U("search-stop",60238),server:U("server",60240),settingsGear:U("settings-gear",60241),settings:U("settings",60242),shield:U("shield",60243),smiley:U("smiley",60244),sortPrecedence:U("sort-precedence",60245),splitHorizontal:U("split-horizontal",60246),splitVertical:U("split-vertical",60247),squirrel:U("squirrel",60248),starFull:U("star-full",60249),starHalf:U("star-half",60250),symbolClass:U("symbol-class",60251),symbolColor:U("symbol-color",60252),symbolCustomColor:U("symbol-customcolor",60252),symbolConstant:U("symbol-constant",60253),symbolEnumMember:U("symbol-enum-member",60254),symbolField:U("symbol-field",60255),symbolFile:U("symbol-file",60256),symbolInterface:U("symbol-interface",60257),symbolKeyword:U("symbol-keyword",60258),symbolMisc:U("symbol-misc",60259),symbolOperator:U("symbol-operator",60260),symbolProperty:U("symbol-property",60261),wrench:U("wrench",60261),wrenchSubaction:U("wrench-subaction",60261),symbolSnippet:U("symbol-snippet",60262),tasklist:U("tasklist",60263),telescope:U("telescope",60264),textSize:U("text-size",60265),threeBars:U("three-bars",60266),thumbsdown:U("thumbsdown",60267),thumbsup:U("thumbsup",60268),tools:U("tools",60269),triangleDown:U("triangle-down",60270),triangleLeft:U("triangle-left",60271),triangleRight:U("triangle-right",60272),triangleUp:U("triangle-up",60273),twitter:U("twitter",60274),unfold:U("unfold",60275),unlock:U("unlock",60276),unmute:U("unmute",60277),unverified:U("unverified",60278),verified:U("verified",60279),versions:U("versions",60280),vmActive:U("vm-active",60281),vmOutline:U("vm-outline",60282),vmRunning:U("vm-running",60283),watch:U("watch",60284),whitespace:U("whitespace",60285),wholeWord:U("whole-word",60286),window:U("window",60287),wordWrap:U("word-wrap",60288),zoomIn:U("zoom-in",60289),zoomOut:U("zoom-out",60290),listFilter:U("list-filter",60291),listFlat:U("list-flat",60292),listSelection:U("list-selection",60293),selection:U("selection",60293),listTree:U("list-tree",60294),debugBreakpointFunctionUnverified:U("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:U("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:U("debug-breakpoint-function-disabled",60296),debugStackframeActive:U("debug-stackframe-active",60297),circleSmallFilled:U("circle-small-filled",60298),debugStackframeDot:U("debug-stackframe-dot",60298),debugStackframe:U("debug-stackframe",60299),debugStackframeFocused:U("debug-stackframe-focused",60299),debugBreakpointUnsupported:U("debug-breakpoint-unsupported",60300),symbolString:U("symbol-string",60301),debugReverseContinue:U("debug-reverse-continue",60302),debugStepBack:U("debug-step-back",60303),debugRestartFrame:U("debug-restart-frame",60304),callIncoming:U("call-incoming",60306),callOutgoing:U("call-outgoing",60307),menu:U("menu",60308),expandAll:U("expand-all",60309),feedback:U("feedback",60310),gitPullRequestReviewer:U("git-pull-request-reviewer",60310),groupByRefType:U("group-by-ref-type",60311),ungroupByRefType:U("ungroup-by-ref-type",60312),account:U("account",60313),gitPullRequestAssignee:U("git-pull-request-assignee",60313),bellDot:U("bell-dot",60314),debugConsole:U("debug-console",60315),library:U("library",60316),output:U("output",60317),runAll:U("run-all",60318),syncIgnored:U("sync-ignored",60319),pinned:U("pinned",60320),githubInverted:U("github-inverted",60321),debugAlt:U("debug-alt",60305),serverProcess:U("server-process",60322),serverEnvironment:U("server-environment",60323),pass:U("pass",60324),stopCircle:U("stop-circle",60325),playCircle:U("play-circle",60326),record:U("record",60327),debugAltSmall:U("debug-alt-small",60328),vmConnect:U("vm-connect",60329),cloud:U("cloud",60330),merge:U("merge",60331),exportIcon:U("export",60332),graphLeft:U("graph-left",60333),magnet:U("magnet",60334),notebook:U("notebook",60335),redo:U("redo",60336),checkAll:U("check-all",60337),pinnedDirty:U("pinned-dirty",60338),passFilled:U("pass-filled",60339),circleLargeFilled:U("circle-large-filled",60340),circleLarge:U("circle-large",60341),circleLargeOutline:U("circle-large-outline",60341),combine:U("combine",60342),gather:U("gather",60342),table:U("table",60343),variableGroup:U("variable-group",60344),typeHierarchy:U("type-hierarchy",60345),typeHierarchySub:U("type-hierarchy-sub",60346),typeHierarchySuper:U("type-hierarchy-super",60347),gitPullRequestCreate:U("git-pull-request-create",60348),runAbove:U("run-above",60349),runBelow:U("run-below",60350),notebookTemplate:U("notebook-template",60351),debugRerun:U("debug-rerun",60352),workspaceTrusted:U("workspace-trusted",60353),workspaceUntrusted:U("workspace-untrusted",60354),workspaceUnspecified:U("workspace-unspecified",60355),terminalCmd:U("terminal-cmd",60356),terminalDebian:U("terminal-debian",60357),terminalLinux:U("terminal-linux",60358),terminalPowershell:U("terminal-powershell",60359),terminalTmux:U("terminal-tmux",60360),terminalUbuntu:U("terminal-ubuntu",60361),terminalBash:U("terminal-bash",60362),arrowSwap:U("arrow-swap",60363),copy:U("copy",60364),personAdd:U("person-add",60365),filterFilled:U("filter-filled",60366),wand:U("wand",60367),debugLineByLine:U("debug-line-by-line",60368),inspect:U("inspect",60369),layers:U("layers",60370),layersDot:U("layers-dot",60371),layersActive:U("layers-active",60372),compass:U("compass",60373),compassDot:U("compass-dot",60374),compassActive:U("compass-active",60375),azure:U("azure",60376),issueDraft:U("issue-draft",60377),gitPullRequestClosed:U("git-pull-request-closed",60378),gitPullRequestDraft:U("git-pull-request-draft",60379),debugAll:U("debug-all",60380),debugCoverage:U("debug-coverage",60381),runErrors:U("run-errors",60382),folderLibrary:U("folder-library",60383),debugContinueSmall:U("debug-continue-small",60384),beakerStop:U("beaker-stop",60385),graphLine:U("graph-line",60386),graphScatter:U("graph-scatter",60387),pieChart:U("pie-chart",60388),bracketDot:U("bracket-dot",60389),bracketError:U("bracket-error",60390),lockSmall:U("lock-small",60391),azureDevops:U("azure-devops",60392),verifiedFilled:U("verified-filled",60393),newLine:U("newline",60394),layout:U("layout",60395),layoutActivitybarLeft:U("layout-activitybar-left",60396),layoutActivitybarRight:U("layout-activitybar-right",60397),layoutPanelLeft:U("layout-panel-left",60398),layoutPanelCenter:U("layout-panel-center",60399),layoutPanelJustify:U("layout-panel-justify",60400),layoutPanelRight:U("layout-panel-right",60401),layoutPanel:U("layout-panel",60402),layoutSidebarLeft:U("layout-sidebar-left",60403),layoutSidebarRight:U("layout-sidebar-right",60404),layoutStatusbar:U("layout-statusbar",60405),layoutMenubar:U("layout-menubar",60406),layoutCentered:U("layout-centered",60407),layoutSidebarRightOff:U("layout-sidebar-right-off",60416),layoutPanelOff:U("layout-panel-off",60417),layoutSidebarLeftOff:U("layout-sidebar-left-off",60418),target:U("target",60408),indent:U("indent",60409),recordSmall:U("record-small",60410),errorSmall:U("error-small",60411),arrowCircleDown:U("arrow-circle-down",60412),arrowCircleLeft:U("arrow-circle-left",60413),arrowCircleRight:U("arrow-circle-right",60414),arrowCircleUp:U("arrow-circle-up",60415),heartFilled:U("heart-filled",60420),map:U("map",60421),mapFilled:U("map-filled",60422),circleSmall:U("circle-small",60423),bellSlash:U("bell-slash",60424),bellSlashDot:U("bell-slash-dot",60425),commentUnresolved:U("comment-unresolved",60426),gitPullRequestGoToChanges:U("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:U("git-pull-request-new-changes",60428),searchFuzzy:U("search-fuzzy",60429),commentDraft:U("comment-draft",60430),send:U("send",60431),sparkle:U("sparkle",60432),insert:U("insert",60433),mic:U("mic",60434),thumbsDownFilled:U("thumbsdown-filled",60435),thumbsUpFilled:U("thumbsup-filled",60436),coffee:U("coffee",60437),snake:U("snake",60438),game:U("game",60439),vr:U("vr",60440),chip:U("chip",60441),piano:U("piano",60442),music:U("music",60443),micFilled:U("mic-filled",60444),gitFetch:U("git-fetch",60445),copilot:U("copilot",60446),lightbulbSparkle:U("lightbulb-sparkle",60447),lightbulbSparkleAutofix:U("lightbulb-sparkle-autofix",60447),robot:U("robot",60448),sparkleFilled:U("sparkle-filled",60449),diffSingle:U("diff-single",60450),diffMultiple:U("diff-multiple",60451),surroundWith:U("surround-with",60452),gitStash:U("git-stash",60454),gitStashApply:U("git-stash-apply",60455),gitStashPop:U("git-stash-pop",60456),dialogError:U("dialog-error","error"),dialogWarning:U("dialog-warning","warning"),dialogInfo:U("dialog-info","info"),dialogClose:U("dialog-close","close"),treeItemExpanded:U("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:U("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:U("tree-filter-on-type-off","list-selection"),treeFilterClear:U("tree-filter-clear","close"),treeItemLoading:U("tree-item-loading","loading"),menuSelection:U("menu-selection","check"),menuSubmenu:U("menu-submenu","chevron-right"),menuBarMore:U("menubar-more","more"),scrollbarButtonLeft:U("scrollbar-button-left","triangle-left"),scrollbarButtonRight:U("scrollbar-button-right","triangle-right"),scrollbarButtonUp:U("scrollbar-button-up","triangle-up"),scrollbarButtonDown:U("scrollbar-button-down","triangle-down"),toolBarMore:U("toolbar-more","more"),quickInputBack:U("quick-input-back","arrow-left")}});var dW,Rue,Qje=P(()=>{Xt();nt();dW=class{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new ge,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),Yt(()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){var n;(n=this._factories.get(e))===null||n===void 0||n.dispose();let o=new Rue(this,e,t);return this._factories.set(e,o),Yt(()=>{let r=this._factories.get(e);!r||r!==o||(this._factories.delete(e),r.dispose())})}async getOrCreate(e){let t=this.get(e);if(t)return t;let n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;let n=this._factories.get(e);return!!(!n||n.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},Rue=class extends ue{get isResolved(){return this._isResolved}constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){let e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}});function Jje(i){return i&&li.isUri(i.uri)&&O.isIRange(i.range)&&(O.isIRange(i.originSelectionRange)||O.isIRange(i.targetSelectionRange))}function eqe(i,e){return g("symbolAriaLabel","{0} ({1})",i,CLt[e])}var am,N3,U0,c5,ip,NC,Of,d5,CLt,AC,ru,uW,fT,hW,Eo,Pr=P(()=>{Go();Io();Kt();Qje();Wt();am=class{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}},N3=class{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}},U0=class{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}};(function(i){let e=new Map;e.set(0,kt.symbolMethod),e.set(1,kt.symbolFunction),e.set(2,kt.symbolConstructor),e.set(3,kt.symbolField),e.set(4,kt.symbolVariable),e.set(5,kt.symbolClass),e.set(6,kt.symbolStruct),e.set(7,kt.symbolInterface),e.set(8,kt.symbolModule),e.set(9,kt.symbolProperty),e.set(10,kt.symbolEvent),e.set(11,kt.symbolOperator),e.set(12,kt.symbolUnit),e.set(13,kt.symbolValue),e.set(15,kt.symbolEnum),e.set(14,kt.symbolConstant),e.set(15,kt.symbolEnum),e.set(16,kt.symbolEnumMember),e.set(17,kt.symbolKeyword),e.set(27,kt.symbolSnippet),e.set(18,kt.symbolText),e.set(19,kt.symbolColor),e.set(20,kt.symbolFile),e.set(21,kt.symbolReference),e.set(22,kt.symbolCustomColor),e.set(23,kt.symbolFolder),e.set(24,kt.symbolTypeParameter),e.set(25,kt.account),e.set(26,kt.issues);function t(r){let s=e.get(r);return s||(console.info("No codicon found for CompletionItemKind "+r),s=kt.symbolProperty),s}i.toIcon=t;let n=new Map;n.set("method",0),n.set("function",1),n.set("constructor",2),n.set("field",3),n.set("variable",4),n.set("class",5),n.set("struct",6),n.set("interface",7),n.set("module",8),n.set("property",9),n.set("event",10),n.set("operator",11),n.set("unit",12),n.set("value",13),n.set("constant",14),n.set("enum",15),n.set("enum-member",16),n.set("enumMember",16),n.set("keyword",17),n.set("snippet",27),n.set("text",18),n.set("color",19),n.set("file",20),n.set("reference",21),n.set("customcolor",22),n.set("folder",23),n.set("type-parameter",24),n.set("typeParameter",24),n.set("account",25),n.set("issue",26);function o(r,s){let a=n.get(r);return typeof a>"u"&&!s&&(a=9),a}i.fromString=o})(c5||(c5={}));(function(i){i[i.Automatic=0]="Automatic",i[i.Explicit=1]="Explicit"})(ip||(ip={}));NC=class{constructor(e,t,n,o){this.range=e,this.text=t,this.completionKind=n,this.isSnippetText=o}equals(e){return O.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}};(function(i){i[i.Invoke=1]="Invoke",i[i.TriggerCharacter=2]="TriggerCharacter",i[i.ContentChange=3]="ContentChange"})(Of||(Of={}));(function(i){i[i.Text=0]="Text",i[i.Read=1]="Read",i[i.Write=2]="Write"})(d5||(d5={}));CLt={17:g("Array","array"),16:g("Boolean","boolean"),4:g("Class","class"),13:g("Constant","constant"),8:g("Constructor","constructor"),9:g("Enum","enumeration"),21:g("EnumMember","enumeration member"),23:g("Event","event"),7:g("Field","field"),0:g("File","file"),11:g("Function","function"),10:g("Interface","interface"),19:g("Key","key"),5:g("Method","method"),1:g("Module","module"),2:g("Namespace","namespace"),20:g("Null","null"),15:g("Number","number"),18:g("Object","object"),24:g("Operator","operator"),3:g("Package","package"),6:g("Property","property"),14:g("String","string"),22:g("Struct","struct"),25:g("TypeParameter","type parameter"),12:g("Variable","variable")};(function(i){let e=new Map;e.set(0,kt.symbolFile),e.set(1,kt.symbolModule),e.set(2,kt.symbolNamespace),e.set(3,kt.symbolPackage),e.set(4,kt.symbolClass),e.set(5,kt.symbolMethod),e.set(6,kt.symbolProperty),e.set(7,kt.symbolField),e.set(8,kt.symbolConstructor),e.set(9,kt.symbolEnum),e.set(10,kt.symbolInterface),e.set(11,kt.symbolFunction),e.set(12,kt.symbolVariable),e.set(13,kt.symbolConstant),e.set(14,kt.symbolString),e.set(15,kt.symbolNumber),e.set(16,kt.symbolBoolean),e.set(17,kt.symbolArray),e.set(18,kt.symbolObject),e.set(19,kt.symbolKey),e.set(20,kt.symbolNull),e.set(21,kt.symbolEnumMember),e.set(22,kt.symbolStruct),e.set(23,kt.symbolEvent),e.set(24,kt.symbolOperator),e.set(25,kt.symbolTypeParameter);function t(n){let o=e.get(n);return o||(console.info("No codicon found for SymbolKind "+n),o=kt.symbolProperty),o}i.toIcon=t})(AC||(AC={}));ru=class i{static fromValue(e){switch(e){case"comment":return i.Comment;case"imports":return i.Imports;case"region":return i.Region}return new i(e)}constructor(e){this.value=e}};ru.Comment=new ru("comment");ru.Imports=new ru("imports");ru.Region=new ru("region");(function(i){function e(t){return!t||typeof t!="object"?!1:typeof t.id=="string"&&typeof t.title=="string"}i.is=e})(uW||(uW={}));(function(i){i[i.Type=1]="Type",i[i.Parameter=2]="Parameter"})(fT||(fT={}));hW=class{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(e=>{e&&e.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}},Eo=new dW});var fW,pW,mW,gW,vW,_W,bW,yW,CW,wW,xW,SW,kW,LW,EW,DW,TW,IW,MW,NW,AW,RW,PW,OW,zW,FW,HW,BW,VW,WW,UW,$W,jW,qW,GW,KW,YW,ZW,XW,QW,JW=P(()=>{(function(i){i[i.Unknown=0]="Unknown",i[i.Disabled=1]="Disabled",i[i.Enabled=2]="Enabled"})(fW||(fW={}));(function(i){i[i.Invoke=1]="Invoke",i[i.Auto=2]="Auto"})(pW||(pW={}));(function(i){i[i.None=0]="None",i[i.KeepWhitespace=1]="KeepWhitespace",i[i.InsertAsSnippet=4]="InsertAsSnippet"})(mW||(mW={}));(function(i){i[i.Method=0]="Method",i[i.Function=1]="Function",i[i.Constructor=2]="Constructor",i[i.Field=3]="Field",i[i.Variable=4]="Variable",i[i.Class=5]="Class",i[i.Struct=6]="Struct",i[i.Interface=7]="Interface",i[i.Module=8]="Module",i[i.Property=9]="Property",i[i.Event=10]="Event",i[i.Operator=11]="Operator",i[i.Unit=12]="Unit",i[i.Value=13]="Value",i[i.Constant=14]="Constant",i[i.Enum=15]="Enum",i[i.EnumMember=16]="EnumMember",i[i.Keyword=17]="Keyword",i[i.Text=18]="Text",i[i.Color=19]="Color",i[i.File=20]="File",i[i.Reference=21]="Reference",i[i.Customcolor=22]="Customcolor",i[i.Folder=23]="Folder",i[i.TypeParameter=24]="TypeParameter",i[i.User=25]="User",i[i.Issue=26]="Issue",i[i.Snippet=27]="Snippet"})(gW||(gW={}));(function(i){i[i.Deprecated=1]="Deprecated"})(vW||(vW={}));(function(i){i[i.Invoke=0]="Invoke",i[i.TriggerCharacter=1]="TriggerCharacter",i[i.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(_W||(_W={}));(function(i){i[i.EXACT=0]="EXACT",i[i.ABOVE=1]="ABOVE",i[i.BELOW=2]="BELOW"})(bW||(bW={}));(function(i){i[i.NotSet=0]="NotSet",i[i.ContentFlush=1]="ContentFlush",i[i.RecoverFromMarkers=2]="RecoverFromMarkers",i[i.Explicit=3]="Explicit",i[i.Paste=4]="Paste",i[i.Undo=5]="Undo",i[i.Redo=6]="Redo"})(yW||(yW={}));(function(i){i[i.LF=1]="LF",i[i.CRLF=2]="CRLF"})(CW||(CW={}));(function(i){i[i.Text=0]="Text",i[i.Read=1]="Read",i[i.Write=2]="Write"})(wW||(wW={}));(function(i){i[i.None=0]="None",i[i.Keep=1]="Keep",i[i.Brackets=2]="Brackets",i[i.Advanced=3]="Advanced",i[i.Full=4]="Full"})(xW||(xW={}));(function(i){i[i.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",i[i.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",i[i.accessibilitySupport=2]="accessibilitySupport",i[i.accessibilityPageSize=3]="accessibilityPageSize",i[i.ariaLabel=4]="ariaLabel",i[i.ariaRequired=5]="ariaRequired",i[i.autoClosingBrackets=6]="autoClosingBrackets",i[i.autoClosingComments=7]="autoClosingComments",i[i.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",i[i.autoClosingDelete=9]="autoClosingDelete",i[i.autoClosingOvertype=10]="autoClosingOvertype",i[i.autoClosingQuotes=11]="autoClosingQuotes",i[i.autoIndent=12]="autoIndent",i[i.automaticLayout=13]="automaticLayout",i[i.autoSurround=14]="autoSurround",i[i.bracketPairColorization=15]="bracketPairColorization",i[i.guides=16]="guides",i[i.codeLens=17]="codeLens",i[i.codeLensFontFamily=18]="codeLensFontFamily",i[i.codeLensFontSize=19]="codeLensFontSize",i[i.colorDecorators=20]="colorDecorators",i[i.colorDecoratorsLimit=21]="colorDecoratorsLimit",i[i.columnSelection=22]="columnSelection",i[i.comments=23]="comments",i[i.contextmenu=24]="contextmenu",i[i.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",i[i.cursorBlinking=26]="cursorBlinking",i[i.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",i[i.cursorStyle=28]="cursorStyle",i[i.cursorSurroundingLines=29]="cursorSurroundingLines",i[i.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",i[i.cursorWidth=31]="cursorWidth",i[i.disableLayerHinting=32]="disableLayerHinting",i[i.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",i[i.domReadOnly=34]="domReadOnly",i[i.dragAndDrop=35]="dragAndDrop",i[i.dropIntoEditor=36]="dropIntoEditor",i[i.emptySelectionClipboard=37]="emptySelectionClipboard",i[i.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",i[i.extraEditorClassName=39]="extraEditorClassName",i[i.fastScrollSensitivity=40]="fastScrollSensitivity",i[i.find=41]="find",i[i.fixedOverflowWidgets=42]="fixedOverflowWidgets",i[i.folding=43]="folding",i[i.foldingStrategy=44]="foldingStrategy",i[i.foldingHighlight=45]="foldingHighlight",i[i.foldingImportsByDefault=46]="foldingImportsByDefault",i[i.foldingMaximumRegions=47]="foldingMaximumRegions",i[i.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",i[i.fontFamily=49]="fontFamily",i[i.fontInfo=50]="fontInfo",i[i.fontLigatures=51]="fontLigatures",i[i.fontSize=52]="fontSize",i[i.fontWeight=53]="fontWeight",i[i.fontVariations=54]="fontVariations",i[i.formatOnPaste=55]="formatOnPaste",i[i.formatOnType=56]="formatOnType",i[i.glyphMargin=57]="glyphMargin",i[i.gotoLocation=58]="gotoLocation",i[i.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",i[i.hover=60]="hover",i[i.inDiffEditor=61]="inDiffEditor",i[i.inlineSuggest=62]="inlineSuggest",i[i.letterSpacing=63]="letterSpacing",i[i.lightbulb=64]="lightbulb",i[i.lineDecorationsWidth=65]="lineDecorationsWidth",i[i.lineHeight=66]="lineHeight",i[i.lineNumbers=67]="lineNumbers",i[i.lineNumbersMinChars=68]="lineNumbersMinChars",i[i.linkedEditing=69]="linkedEditing",i[i.links=70]="links",i[i.matchBrackets=71]="matchBrackets",i[i.minimap=72]="minimap",i[i.mouseStyle=73]="mouseStyle",i[i.mouseWheelScrollSensitivity=74]="mouseWheelScrollSensitivity",i[i.mouseWheelZoom=75]="mouseWheelZoom",i[i.multiCursorMergeOverlapping=76]="multiCursorMergeOverlapping",i[i.multiCursorModifier=77]="multiCursorModifier",i[i.multiCursorPaste=78]="multiCursorPaste",i[i.multiCursorLimit=79]="multiCursorLimit",i[i.occurrencesHighlight=80]="occurrencesHighlight",i[i.overviewRulerBorder=81]="overviewRulerBorder",i[i.overviewRulerLanes=82]="overviewRulerLanes",i[i.padding=83]="padding",i[i.pasteAs=84]="pasteAs",i[i.parameterHints=85]="parameterHints",i[i.peekWidgetDefaultFocus=86]="peekWidgetDefaultFocus",i[i.definitionLinkOpensInPeek=87]="definitionLinkOpensInPeek",i[i.quickSuggestions=88]="quickSuggestions",i[i.quickSuggestionsDelay=89]="quickSuggestionsDelay",i[i.readOnly=90]="readOnly",i[i.readOnlyMessage=91]="readOnlyMessage",i[i.renameOnType=92]="renameOnType",i[i.renderControlCharacters=93]="renderControlCharacters",i[i.renderFinalNewline=94]="renderFinalNewline",i[i.renderLineHighlight=95]="renderLineHighlight",i[i.renderLineHighlightOnlyWhenFocus=96]="renderLineHighlightOnlyWhenFocus",i[i.renderValidationDecorations=97]="renderValidationDecorations",i[i.renderWhitespace=98]="renderWhitespace",i[i.revealHorizontalRightPadding=99]="revealHorizontalRightPadding",i[i.roundedSelection=100]="roundedSelection",i[i.rulers=101]="rulers",i[i.scrollbar=102]="scrollbar",i[i.scrollBeyondLastColumn=103]="scrollBeyondLastColumn",i[i.scrollBeyondLastLine=104]="scrollBeyondLastLine",i[i.scrollPredominantAxis=105]="scrollPredominantAxis",i[i.selectionClipboard=106]="selectionClipboard",i[i.selectionHighlight=107]="selectionHighlight",i[i.selectOnLineNumbers=108]="selectOnLineNumbers",i[i.showFoldingControls=109]="showFoldingControls",i[i.showUnused=110]="showUnused",i[i.snippetSuggestions=111]="snippetSuggestions",i[i.smartSelect=112]="smartSelect",i[i.smoothScrolling=113]="smoothScrolling",i[i.stickyScroll=114]="stickyScroll",i[i.stickyTabStops=115]="stickyTabStops",i[i.stopRenderingLineAfter=116]="stopRenderingLineAfter",i[i.suggest=117]="suggest",i[i.suggestFontSize=118]="suggestFontSize",i[i.suggestLineHeight=119]="suggestLineHeight",i[i.suggestOnTriggerCharacters=120]="suggestOnTriggerCharacters",i[i.suggestSelection=121]="suggestSelection",i[i.tabCompletion=122]="tabCompletion",i[i.tabIndex=123]="tabIndex",i[i.unicodeHighlighting=124]="unicodeHighlighting",i[i.unusualLineTerminators=125]="unusualLineTerminators",i[i.useShadowDOM=126]="useShadowDOM",i[i.useTabStops=127]="useTabStops",i[i.wordBreak=128]="wordBreak",i[i.wordSeparators=129]="wordSeparators",i[i.wordWrap=130]="wordWrap",i[i.wordWrapBreakAfterCharacters=131]="wordWrapBreakAfterCharacters",i[i.wordWrapBreakBeforeCharacters=132]="wordWrapBreakBeforeCharacters",i[i.wordWrapColumn=133]="wordWrapColumn",i[i.wordWrapOverride1=134]="wordWrapOverride1",i[i.wordWrapOverride2=135]="wordWrapOverride2",i[i.wrappingIndent=136]="wrappingIndent",i[i.wrappingStrategy=137]="wrappingStrategy",i[i.showDeprecated=138]="showDeprecated",i[i.inlayHints=139]="inlayHints",i[i.editorClassName=140]="editorClassName",i[i.pixelRatio=141]="pixelRatio",i[i.tabFocusMode=142]="tabFocusMode",i[i.layoutInfo=143]="layoutInfo",i[i.wrappingInfo=144]="wrappingInfo",i[i.defaultColorDecorators=145]="defaultColorDecorators",i[i.colorDecoratorsActivatedOn=146]="colorDecoratorsActivatedOn",i[i.inlineCompletionsAccessibilityVerbose=147]="inlineCompletionsAccessibilityVerbose"})(SW||(SW={}));(function(i){i[i.TextDefined=0]="TextDefined",i[i.LF=1]="LF",i[i.CRLF=2]="CRLF"})(kW||(kW={}));(function(i){i[i.LF=0]="LF",i[i.CRLF=1]="CRLF"})(LW||(LW={}));(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=3]="Right"})(EW||(EW={}));(function(i){i[i.None=0]="None",i[i.Indent=1]="Indent",i[i.IndentOutdent=2]="IndentOutdent",i[i.Outdent=3]="Outdent"})(DW||(DW={}));(function(i){i[i.Both=0]="Both",i[i.Right=1]="Right",i[i.Left=2]="Left",i[i.None=3]="None"})(TW||(TW={}));(function(i){i[i.Type=1]="Type",i[i.Parameter=2]="Parameter"})(IW||(IW={}));(function(i){i[i.Automatic=0]="Automatic",i[i.Explicit=1]="Explicit"})(MW||(MW={}));(function(i){i[i.DependsOnKbLayout=-1]="DependsOnKbLayout",i[i.Unknown=0]="Unknown",i[i.Backspace=1]="Backspace",i[i.Tab=2]="Tab",i[i.Enter=3]="Enter",i[i.Shift=4]="Shift",i[i.Ctrl=5]="Ctrl",i[i.Alt=6]="Alt",i[i.PauseBreak=7]="PauseBreak",i[i.CapsLock=8]="CapsLock",i[i.Escape=9]="Escape",i[i.Space=10]="Space",i[i.PageUp=11]="PageUp",i[i.PageDown=12]="PageDown",i[i.End=13]="End",i[i.Home=14]="Home",i[i.LeftArrow=15]="LeftArrow",i[i.UpArrow=16]="UpArrow",i[i.RightArrow=17]="RightArrow",i[i.DownArrow=18]="DownArrow",i[i.Insert=19]="Insert",i[i.Delete=20]="Delete",i[i.Digit0=21]="Digit0",i[i.Digit1=22]="Digit1",i[i.Digit2=23]="Digit2",i[i.Digit3=24]="Digit3",i[i.Digit4=25]="Digit4",i[i.Digit5=26]="Digit5",i[i.Digit6=27]="Digit6",i[i.Digit7=28]="Digit7",i[i.Digit8=29]="Digit8",i[i.Digit9=30]="Digit9",i[i.KeyA=31]="KeyA",i[i.KeyB=32]="KeyB",i[i.KeyC=33]="KeyC",i[i.KeyD=34]="KeyD",i[i.KeyE=35]="KeyE",i[i.KeyF=36]="KeyF",i[i.KeyG=37]="KeyG",i[i.KeyH=38]="KeyH",i[i.KeyI=39]="KeyI",i[i.KeyJ=40]="KeyJ",i[i.KeyK=41]="KeyK",i[i.KeyL=42]="KeyL",i[i.KeyM=43]="KeyM",i[i.KeyN=44]="KeyN",i[i.KeyO=45]="KeyO",i[i.KeyP=46]="KeyP",i[i.KeyQ=47]="KeyQ",i[i.KeyR=48]="KeyR",i[i.KeyS=49]="KeyS",i[i.KeyT=50]="KeyT",i[i.KeyU=51]="KeyU",i[i.KeyV=52]="KeyV",i[i.KeyW=53]="KeyW",i[i.KeyX=54]="KeyX",i[i.KeyY=55]="KeyY",i[i.KeyZ=56]="KeyZ",i[i.Meta=57]="Meta",i[i.ContextMenu=58]="ContextMenu",i[i.F1=59]="F1",i[i.F2=60]="F2",i[i.F3=61]="F3",i[i.F4=62]="F4",i[i.F5=63]="F5",i[i.F6=64]="F6",i[i.F7=65]="F7",i[i.F8=66]="F8",i[i.F9=67]="F9",i[i.F10=68]="F10",i[i.F11=69]="F11",i[i.F12=70]="F12",i[i.F13=71]="F13",i[i.F14=72]="F14",i[i.F15=73]="F15",i[i.F16=74]="F16",i[i.F17=75]="F17",i[i.F18=76]="F18",i[i.F19=77]="F19",i[i.F20=78]="F20",i[i.F21=79]="F21",i[i.F22=80]="F22",i[i.F23=81]="F23",i[i.F24=82]="F24",i[i.NumLock=83]="NumLock",i[i.ScrollLock=84]="ScrollLock",i[i.Semicolon=85]="Semicolon",i[i.Equal=86]="Equal",i[i.Comma=87]="Comma",i[i.Minus=88]="Minus",i[i.Period=89]="Period",i[i.Slash=90]="Slash",i[i.Backquote=91]="Backquote",i[i.BracketLeft=92]="BracketLeft",i[i.Backslash=93]="Backslash",i[i.BracketRight=94]="BracketRight",i[i.Quote=95]="Quote",i[i.OEM_8=96]="OEM_8",i[i.IntlBackslash=97]="IntlBackslash",i[i.Numpad0=98]="Numpad0",i[i.Numpad1=99]="Numpad1",i[i.Numpad2=100]="Numpad2",i[i.Numpad3=101]="Numpad3",i[i.Numpad4=102]="Numpad4",i[i.Numpad5=103]="Numpad5",i[i.Numpad6=104]="Numpad6",i[i.Numpad7=105]="Numpad7",i[i.Numpad8=106]="Numpad8",i[i.Numpad9=107]="Numpad9",i[i.NumpadMultiply=108]="NumpadMultiply",i[i.NumpadAdd=109]="NumpadAdd",i[i.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",i[i.NumpadSubtract=111]="NumpadSubtract",i[i.NumpadDecimal=112]="NumpadDecimal",i[i.NumpadDivide=113]="NumpadDivide",i[i.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",i[i.ABNT_C1=115]="ABNT_C1",i[i.ABNT_C2=116]="ABNT_C2",i[i.AudioVolumeMute=117]="AudioVolumeMute",i[i.AudioVolumeUp=118]="AudioVolumeUp",i[i.AudioVolumeDown=119]="AudioVolumeDown",i[i.BrowserSearch=120]="BrowserSearch",i[i.BrowserHome=121]="BrowserHome",i[i.BrowserBack=122]="BrowserBack",i[i.BrowserForward=123]="BrowserForward",i[i.MediaTrackNext=124]="MediaTrackNext",i[i.MediaTrackPrevious=125]="MediaTrackPrevious",i[i.MediaStop=126]="MediaStop",i[i.MediaPlayPause=127]="MediaPlayPause",i[i.LaunchMediaPlayer=128]="LaunchMediaPlayer",i[i.LaunchMail=129]="LaunchMail",i[i.LaunchApp2=130]="LaunchApp2",i[i.Clear=131]="Clear",i[i.MAX_VALUE=132]="MAX_VALUE"})(NW||(NW={}));(function(i){i[i.Hint=1]="Hint",i[i.Info=2]="Info",i[i.Warning=4]="Warning",i[i.Error=8]="Error"})(AW||(AW={}));(function(i){i[i.Unnecessary=1]="Unnecessary",i[i.Deprecated=2]="Deprecated"})(RW||(RW={}));(function(i){i[i.Inline=1]="Inline",i[i.Gutter=2]="Gutter"})(PW||(PW={}));(function(i){i[i.UNKNOWN=0]="UNKNOWN",i[i.TEXTAREA=1]="TEXTAREA",i[i.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",i[i.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",i[i.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",i[i.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",i[i.CONTENT_TEXT=6]="CONTENT_TEXT",i[i.CONTENT_EMPTY=7]="CONTENT_EMPTY",i[i.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",i[i.CONTENT_WIDGET=9]="CONTENT_WIDGET",i[i.OVERVIEW_RULER=10]="OVERVIEW_RULER",i[i.SCROLLBAR=11]="SCROLLBAR",i[i.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",i[i.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(OW||(OW={}));(function(i){i[i.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",i[i.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",i[i.TOP_CENTER=2]="TOP_CENTER"})(zW||(zW={}));(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=4]="Right",i[i.Full=7]="Full"})(FW||(FW={}));(function(i){i[i.Left=0]="Left",i[i.Right=1]="Right",i[i.None=2]="None",i[i.LeftOfInjectedText=3]="LeftOfInjectedText",i[i.RightOfInjectedText=4]="RightOfInjectedText"})(HW||(HW={}));(function(i){i[i.Off=0]="Off",i[i.On=1]="On",i[i.Relative=2]="Relative",i[i.Interval=3]="Interval",i[i.Custom=4]="Custom"})(BW||(BW={}));(function(i){i[i.None=0]="None",i[i.Text=1]="Text",i[i.Blocks=2]="Blocks"})(VW||(VW={}));(function(i){i[i.Smooth=0]="Smooth",i[i.Immediate=1]="Immediate"})(WW||(WW={}));(function(i){i[i.Auto=1]="Auto",i[i.Hidden=2]="Hidden",i[i.Visible=3]="Visible"})(UW||(UW={}));(function(i){i[i.LTR=0]="LTR",i[i.RTL=1]="RTL"})($W||($W={}));(function(i){i.Off="off",i.OnCode="onCode",i.On="on"})(jW||(jW={}));(function(i){i[i.Invoke=1]="Invoke",i[i.TriggerCharacter=2]="TriggerCharacter",i[i.ContentChange=3]="ContentChange"})(qW||(qW={}));(function(i){i[i.File=0]="File",i[i.Module=1]="Module",i[i.Namespace=2]="Namespace",i[i.Package=3]="Package",i[i.Class=4]="Class",i[i.Method=5]="Method",i[i.Property=6]="Property",i[i.Field=7]="Field",i[i.Constructor=8]="Constructor",i[i.Enum=9]="Enum",i[i.Interface=10]="Interface",i[i.Function=11]="Function",i[i.Variable=12]="Variable",i[i.Constant=13]="Constant",i[i.String=14]="String",i[i.Number=15]="Number",i[i.Boolean=16]="Boolean",i[i.Array=17]="Array",i[i.Object=18]="Object",i[i.Key=19]="Key",i[i.Null=20]="Null",i[i.EnumMember=21]="EnumMember",i[i.Struct=22]="Struct",i[i.Event=23]="Event",i[i.Operator=24]="Operator",i[i.TypeParameter=25]="TypeParameter"})(GW||(GW={}));(function(i){i[i.Deprecated=1]="Deprecated"})(KW||(KW={}));(function(i){i[i.Hidden=0]="Hidden",i[i.Blink=1]="Blink",i[i.Smooth=2]="Smooth",i[i.Phase=3]="Phase",i[i.Expand=4]="Expand",i[i.Solid=5]="Solid"})(YW||(YW={}));(function(i){i[i.Line=1]="Line",i[i.Block=2]="Block",i[i.Underline=3]="Underline",i[i.LineThin=4]="LineThin",i[i.BlockOutline=5]="BlockOutline",i[i.UnderlineThin=6]="UnderlineThin"})(ZW||(ZW={}));(function(i){i[i.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",i[i.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",i[i.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",i[i.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(XW||(XW={}));(function(i){i[i.None=0]="None",i[i.Same=1]="Same",i[i.Indent=2]="Indent",i[i.DeepIndent=3]="DeepIndent"})(QW||(QW={}))});function eU(){return{editor:void 0,languages:void 0,CancellationTokenSource:Jn,Emitter:ge,KeyCode:NW,KeyMod:h5,Position:ke,Range:O,Selection:jt,SelectionDirection:$W,MarkerSeverity:AW,MarkerTag:RW,Uri:li,Token:am}}var h5,Oue=P(()=>{mo();Xt();Bh();Io();Mi();Kt();zo();Pr();JW();h5=class{static chord(e,t){return fr(e,t)}};h5.CtrlCmd=2048;h5.Shift=1024;h5.Alt=512;h5.WinCtrl=256});function tqe(i,e){let t=i;typeof t.vscodeWindowId!="number"&&Object.defineProperty(t,"vscodeWindowId",{get:()=>e})}var Hn,$0,_l=P(()=>{Hn=window,$0=Hn});var tU,pT,zue=P(()=>{tU=class{constructor(e){this.fn=e,this.lastCache=void 0,this.lastArgKey=void 0}get(e){let t=JSON.stringify(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this.fn(e)),this.lastCache}},pT=class{get cachedValues(){return this._map}constructor(e){this.fn=e,this._map=new Map}get(e){if(this._map.has(e))return this._map.get(e);let t=this.fn(e);return this._map.set(e,t),t}}});var bl,j0=P(()=>{bl=class{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}});function iU(i){return!i||typeof i!="string"?!0:i.trim().length===0}function zf(i,...e){return e.length===0?i:i.replace(wLt,function(t,n){let o=parseInt(n,10);return isNaN(o)||o<0||o>=e.length?t:e[o]})}function nqe(i){return i.replace(/[<>"'&]/g,e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e})}function p5(i){return i.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function va(i){return i.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function oqe(i,e=" "){let t=q0(i,e);return Hue(t,e)}function q0(i,e){if(!i||!e)return i;let t=e.length;if(t===0||i.length===0)return i;let n=0;for(;i.indexOf(e,n)===n;)n=n+t;return i.substring(n)}function Hue(i,e){if(!i||!e)return i;let t=e.length,n=i.length;if(t===0||n===0)return i;let o=n,r=-1;for(;r=i.lastIndexOf(e,o-1),!(r===-1||r+t!==o);){if(r===0)return"";o=r}return i.substring(0,o)}function rqe(i){return i.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function sqe(i){return i.replace(/\*/g,"")}function nU(i,e,t={}){if(!i)throw new Error("Cannot create regex from empty string");e||(i=va(i)),t.wholeWord&&(/\B/.test(i.charAt(0))||(i="\\b"+i),/\B/.test(i.charAt(i.length-1))||(i=i+"\\b"));let n="";return t.global&&(n+="g"),t.matchCase||(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),new RegExp(i,n)}function aqe(i){return i.source==="^"||i.source==="^$"||i.source==="$"||i.source==="^\\s*$"?!1:!!(i.exec("")&&i.lastIndex===0)}function Ec(i){return i.split(/\r\n|\r|\n/)}function qr(i){for(let e=0,t=i.length;e=0;t--){let n=i.charCodeAt(t);if(n!==32&&n!==9)return t}return-1}function A3(i,e){return ie?1:0}function oU(i,e,t=0,n=i.length,o=0,r=e.length){for(;tc)return 1}let s=n-t,a=r-o;return sa?1:0}function vT(i,e){return PC(i,e,0,i.length,0,e.length)}function PC(i,e,t=0,n=i.length,o=0,r=e.length){for(;t=128||c>=128)return oU(i.toLowerCase(),e.toLowerCase(),t,n,o,r);Tg(l)&&(l-=32),Tg(c)&&(c-=32);let d=l-c;if(d!==0)return d}let s=n-t,a=r-o;return sa?1:0}function _T(i){return i>=48&&i<=57}function Tg(i){return i>=97&&i<=122}function Ff(i){return i>=65&&i<=90}function G0(i,e){return i.length===e.length&&PC(i,e)===0}function OC(i,e){let t=e.length;return e.length>i.length?!1:PC(i,e,0,t)===0}function Hf(i,e){let t=Math.min(i.length,e.length),n;for(n=0;n1){let n=i.charCodeAt(e-2);if(Or(n))return rU(n,t)}return t}function bT(i,e){return new f5(i,e).nextGraphemeLength()}function Bue(i,e){return new f5(i,e).prevGraphemeLength()}function lqe(i,e){e>0&&Ng(i.charCodeAt(e))&&e--;let t=e+bT(i,e);return[t-Bue(i,t),t]}function SLt(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function lm(i){return Fue||(Fue=SLt()),Fue.test(i)}function Ag(i){return kLt.test(i)}function sU(i){return Vue.test(i)}function Bf(i){return i>=11904&&i<=55215||i>=63744&&i<=64255||i>=65281&&i<=65374}function yT(i){return i>=127462&&i<=127487||i===8986||i===8987||i===9200||i===9203||i>=9728&&i<=10175||i===11088||i===11093||i>=127744&&i<=128591||i>=128640&&i<=128764||i>=128992&&i<=129008||i>=129280&&i<=129535||i>=129648&&i<=129782}function FC(i){return!!(i&&i.length>0&&i.charCodeAt(0)===65279)}function dqe(i,e=!1){return i?(e&&(i=i.replace(/\\./g,"")),i.toLowerCase()!==i):!1}function aU(i){return i=i%(2*26),i<26?String.fromCharCode(97+i):String.fromCharCode(65+i-26)}function iqe(i,e){return i===0?e!==5&&e!==7:i===2&&e===3?!1:i===4||i===2||i===3||e===4||e===2||e===3?!0:!(i===8&&(e===8||e===9||e===11||e===12)||(i===11||i===9)&&(e===9||e===10)||(i===12||i===10)&&e===10||e===5||e===13||e===7||i===1||i===13&&e===14||i===6&&e===6)}function LLt(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function uqe(i,e){if(i===0)return 0;let t=ELt(i,e);if(t!==void 0)return t;let n=new mT(e,i);return n.prevCodePoint(),n.offset}function ELt(i,e){let t=new mT(e,i),n=t.prevCodePoint();for(;DLt(n)||n===65039||n===8419;){if(t.offset===0)return;n=t.prevCodePoint()}if(!yT(n))return;let o=t.offset;return o>0&&t.prevCodePoint()===8205&&(o=t.offset),o}function DLt(i){return 127995<=i&&i<=127999}var RC,wLt,mT,f5,Fue,kLt,Vue,cqe,gT,lU,Ig,Mg,Ri=P(()=>{zue();j0();wLt=/{(\d+)}/g;mT=class{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){let e=xLt(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){let e=zC(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}},f5=class{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new mT(e,t)}nextGraphemeLength(){let e=gT.getInstance(),t=this._iterator,n=t.offset,o=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){let r=t.offset,s=e.getGraphemeBreakType(t.nextCodePoint());if(iqe(o,s)){t.setOffset(r);break}o=s}return t.offset-n}prevGraphemeLength(){let e=gT.getInstance(),t=this._iterator,n=t.offset,o=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){let r=t.offset,s=e.getGraphemeBreakType(t.prevCodePoint());if(iqe(s,o)){t.setOffset(r);break}o=s}return n-t.offset}eol(){return this._iterator.eol()}};kLt=/^[\t\n\r\x20-\x7E]*$/;Vue=/[\u2028\u2029]/;cqe="\uFEFF";gT=class i{static getInstance(){return i._INSTANCE||(i._INSTANCE=new i),i._INSTANCE}constructor(){this._data=LLt()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;let t=this._data,n=t.length/3,o=1;for(;o<=n;)if(et[3*o+1])o=2*o+1;else return t[3*o+2];return 0}};gT._INSTANCE=null;lU="\xA0",Ig=class{static getInstance(e){return RC.cache.get(Array.from(e))}static getLocales(){return RC._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}};RC=Ig;Ig.ambiguousCharacterData=new bl(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'));Ig.cache=new tU(i=>{function e(c){let d=new Map;for(let u=0;u!c.startsWith("_")&&c in o);r.length===0&&(r=["_default"]);let s;for(let c of r){let d=e(o[c]);s=n(s,d)}let a=e(o._common),l=t(a,s);return new RC(l)});Ig._locales=new bl(()=>Object.keys(RC.ambiguousCharacterData.value).filter(i=>!i.startsWith("_")));Mg=class i{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(i.getRawData())),this._data}static isInvisibleCharacter(e){return i.getData().has(e)}static get codePoints(){return i.getData()}};Mg._data=void 0});var hqe=P(()=>{});function jue(i,e,t){typeof e=="string"&&(e=i.matchMedia(e)),e.addEventListener("change",t)}function fqe(i){return CT.INSTANCE.getZoomFactor(i)}function pqe(){return cU}var CT,Wue,Uue,$ue,R3,HC,Aa,cm,Rg,Xu,dU,T2i,que,cU,Xc=P(()=>{_l();Xt();nt();CT=class{constructor(){this.mapWindowIdToZoomFactor=new Map}getZoomFactor(e){var t;return(t=this.mapWindowIdToZoomFactor.get(this.getWindowId(e)))!==null&&t!==void 0?t:1}getWindowId(e){return e.vscodeWindowId}};CT.INSTANCE=new CT;Wue=class extends ue{constructor(){super(),this._onDidChange=this._register(new ge),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=$0.matchMedia(`(resolution: ${$0.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),e&&this._onDidChange.fire()}},Uue=class extends ue{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new ge),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();let e=this._register(new Wue);this._register(e.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}_getPixelRatio(){let e=document.createElement("canvas").getContext("2d"),t=$0.devicePixelRatio||1,n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/n}},$ue=class{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=l5(new Uue)),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}};R3=new $ue;HC=navigator.userAgent,Aa=HC.indexOf("Firefox")>=0,cm=HC.indexOf("AppleWebKit")>=0,Rg=HC.indexOf("Chrome")>=0,Xu=!Rg&&HC.indexOf("Safari")>=0,dU=!Rg&&!Xu&&cm,T2i=HC.indexOf("Electron/")>=0,que=HC.indexOf("Android")>=0,cU=!1;if(typeof Hn.matchMedia=="function"){let i=Hn.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=Hn.matchMedia("(display-mode: fullscreen)");cU=i.matches,jue(Hn,i,({matches:t})=>{cU&&e.matches||(cU=t)})}});function dm(i){return typeof i=="number"?`${i}px`:i}function vn(i){return new wT(i)}var wT,_a=P(()=>{wT=class{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){let t=dm(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=dm(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=dm(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=dm(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=dm(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=dm(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=dm(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){let t=dm(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){let t=dm(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){let t=dm(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=dm(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 Gr(i,e){i instanceof wT?(i.setFontFamily(e.getMassagedFontFamily()),i.setFontWeight(e.fontWeight),i.setFontSize(e.fontSize),i.setFontFeatureSettings(e.fontFeatureSettings),i.setFontVariationSettings(e.fontVariationSettings),i.setLineHeight(e.lineHeight),i.setLetterSpacing(e.letterSpacing)):(i.style.fontFamily=e.getMassagedFontFamily(),i.style.fontWeight=e.fontWeight,i.style.fontSize=e.fontSize+"px",i.style.fontFeatureSettings=e.fontFeatureSettings,i.style.fontVariationSettings=e.fontVariationSettings,i.style.lineHeight=e.lineHeight+"px",i.style.letterSpacing=e.letterSpacing+"px")}var Vf=P(()=>{_a()});function mqe(i,e){new Gue(i,e).read()}var uU,Gue,gqe=P(()=>{_l();Vf();uU=class{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}},Gue=class i{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),$0.document.body.appendChild(this._container),this._readFromDomElements(),$0.document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){let e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";let t=document.createElement("div");Gr(t,this._bareFontInfo),e.appendChild(t);let n=document.createElement("div");Gr(n,this._bareFontInfo),n.style.fontWeight="bold",e.appendChild(n);let o=document.createElement("div");Gr(o,this._bareFontInfo),o.style.fontStyle="italic",e.appendChild(o);let r=[];for(let s of this._requests){let a;s.type===0&&(a=t),s.type===2&&(a=n),s.type===1&&(a=o),a.appendChild(document.createElement("br"));let l=document.createElement("span");i._render(l,s),a.appendChild(l),r.push(l)}this._container=e,this._testElements=r}static _render(e,t){if(t.chr===" "){let n="\xA0";for(let o=0;o<8;o++)n+=n;e.innerText=n}else{let n=t.chr;for(let o=0;o<8;o++)n+=n;e.textContent=n}}_readFromDomElements(){for(let e=0,t=this._requests.length;e{Xt();Qc=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new ge,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(i){i=Math.min(Math.max(-5,i),20),this._zoomLevel!==i&&(this._zoomLevel=i,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}});var TLt,Kue,g5,ILt,v5,hU=P(()=>{Mn();Ks();BC();TLt=Wi?1.5:1.35,Kue=8,g5=class i{static createFromValidatedSettings(e,t,n){let o=e.get(49),r=e.get(53),s=e.get(52),a=e.get(51),l=e.get(54),c=e.get(66),d=e.get(63);return i._create(o,r,s,a,l,c,d,t,n)}static _create(e,t,n,o,r,s,a,l,c){s===0?s=TLt*n:s{Xc();_l();Xt();nt();gqe();Ks();hU();Yue=class extends ue{constructor(){super(),this._onDidChange=this._register(new ge),this.onDidChange=this._onDidChange.event,this._cache=new fU,this._evictUntrustedReadingsTimeout=-1}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new fU,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),!t.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=Hn.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){let e=this._cache.getValues(),t=!1;for(let n of e)n.isTrusted||(t=!0,this._cache.remove(n));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 v5({pixelRatio:R3.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,n,o){let r=new uU(e,t);return n.push(r),o?.push(r),r}_actualReadFontInfo(e){let t=[],n=[],o=this._createRequest("n",0,t,n),r=this._createRequest("\uFF4D",0,t,null),s=this._createRequest(" ",0,t,n),a=this._createRequest("0",0,t,n),l=this._createRequest("1",0,t,n),c=this._createRequest("2",0,t,n),d=this._createRequest("3",0,t,n),u=this._createRequest("4",0,t,n),h=this._createRequest("5",0,t,n),f=this._createRequest("6",0,t,n),p=this._createRequest("7",0,t,n),m=this._createRequest("8",0,t,n),y=this._createRequest("9",0,t,n),_=this._createRequest("\u2192",0,t,n),v=this._createRequest("\uFFEB",0,t,null),b=this._createRequest("\xB7",0,t,n),C=this._createRequest("\u2E31",0,t,null),w="|/-_ilm%";for(let E=0,A=w.length;E.001){x=!1;break}}let D=!0;return x&&v.width!==k&&(D=!1),v.width>_.width&&(D=!1),new v5({pixelRatio:R3.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,fontVariationSettings:e.fontVariationSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:x,typicalHalfwidthCharacterWidth:o.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:D,spaceWidth:s.width,middotWidth:b.width,wsmiddotWidth:C.width,maxDigitWidth:S},!0)}},fU=class{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){let t=e.getId();return!!this._values[t]}get(e){let t=e.getId();return this._values[t]}put(e,t){let n=e.getId();this._keys[n]=e,this._values[n]=t}remove(e){let t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}},xT=new Yue});function MLt(i,e,t){e[np.DI_TARGET]===e?e[np.DI_DEPENDENCIES].push({id:i,index:t}):(e[np.DI_DEPENDENCIES]=[{id:i,index:t}],e[np.DI_TARGET]=e)}function vi(i){if(np.serviceIds.has(i))return np.serviceIds.get(i);let e=function(t,n,o){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");MLt(e,t,o)};return e.toString=()=>i,np.serviceIds.set(i,e),e}var np,qt,_i=P(()=>{(function(i){i.serviceIds=new Map,i.DI_TARGET="$di$target",i.DI_DEPENDENCIES="$di$dependencies";function e(t){return t[i.DI_DEPENDENCIES]||[]}i.getServiceDependencies=e})(np||(np={}));qt=vi("instantiationService")});var tn,fs=P(()=>{_i();tn=vi("codeEditorService")});var no,Dc=P(()=>{_i();no=vi("modelService")});var xs,Wh=P(()=>{_i();xs=vi("textModelService")});function K0(i){var e,t;return{id:i.id,label:i.label,class:i.class,enabled:(e=i.enabled)!==null&&e!==void 0?e:!0,checked:(t=i.checked)!==null&&t!==void 0?t:!1,run:async(...n)=>i.run(...n),tooltip:i.label}}var zs,Qu,zr,Wf,ST,Ra=P(()=>{Xt();nt();Wt();zs=class extends ue{constructor(e,t="",n="",o=!0,r){super(),this._onDidChange=this._register(new ge),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=n,this._enabled=o,this._actionCallback=r}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}async run(e,t){this._actionCallback&&await this._actionCallback(e)}},Qu=class extends ue{constructor(){super(...arguments),this._onWillRun=this._register(new ge),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new ge),this.onDidRun=this._onDidRun.event}async run(e,t){if(!e.enabled)return;this._onWillRun.fire({action:e});let n;try{await this.runAction(e,t)}catch(o){n=o}this._onDidRun.fire({action:e,error:n})}async runAction(e,t){await e.run(t)}},zr=class i{constructor(){this.id=i.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let t=[];for(let n of e)n.length&&(t.length?t=[...t,new i,...n]:t=n);return t}async run(){}};zr.ID="vs.actions.separator";Wf=class{get actions(){return this._actions}constructor(e,t,n,o){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=o,this._actions=n}async run(){}},ST=class i extends zs{constructor(){super(i.ID,g("submenu.empty","(empty)"),void 0,!1)}};ST.ID="vs.actions.empty"});var Xue,ui,or=P(()=>{Go();(function(i){function e(t){return t&&typeof t=="object"&&typeof t.id=="string"}i.isThemeColor=e})(Xue||(Xue={}));(function(i){i.iconNameSegment="[A-Za-z0-9]+",i.iconNameExpression="[A-Za-z0-9-]+",i.iconModifierExpression="~[A-Za-z]+",i.iconNameCharacter="[A-Za-z0-9~-]";let e=new RegExp(`^(${i.iconNameExpression})(${i.iconModifierExpression})?$`);function t(h){let f=e.exec(h.id);if(!f)return t(kt.error);let[,p,m]=f,y=["codicon","codicon-"+p];return m&&y.push("codicon-modifier-"+m.substring(1)),y}i.asClassNameArray=t;function n(h){return t(h).join(" ")}i.asClassName=n;function o(h){return"."+t(h).join(".")}i.asCSSSelector=o;function r(h){return h&&typeof h=="object"&&typeof h.id=="string"&&(typeof h.color>"u"||Xue.isThemeColor(h.color))}i.isThemeIcon=r;let s=new RegExp(`^\\$\\((${i.iconNameExpression}(?:${i.iconModifierExpression})?)\\)$`);function a(h){let f=s.exec(h);if(!f)return;let[,p]=f;return{id:p}}i.fromString=a;function l(h){return{id:h}}i.fromId=l;function c(h,f){let p=h.id,m=p.lastIndexOf("~");return m!==-1&&(p=p.substring(0,m)),f&&(p=`${p}~${f}`),{id:p}}i.modify=c;function d(h){let f=h.id.lastIndexOf("~");if(f!==-1)return h.id.substring(f+1)}i.getModifier=d;function u(h,f){var p,m;return h.id===f.id&&((p=h.color)===null||p===void 0?void 0:p.id)===((m=f.color)===null||m===void 0?void 0:m.id)}i.isEqual=u})(ui||(ui={}))});var eo,Zi,$o=P(()=>{Xt();Yc();nt();Hh();ho();_i();eo=vi("commandService"),Zi=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new ge,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(i,e){if(!i)throw new Error("invalid command");if(typeof i=="string"){if(!e)throw new Error("invalid command");return this.registerCommand({id:i,handler:e})}if(i.metadata&&Array.isArray(i.metadata.args)){let s=[];for(let l of i.metadata.args)s.push(l.constraint);let a=i.handler;i.handler=function(l,...c){return mje(c,s),a(l,...c)}}let{id:t}=i,n=this._commands.get(t);n||(n=new $r,this._commands.set(t,n));let o=n.unshift(i),r=Yt(()=>{o();let s=this._commands.get(t);s?.isEmpty()&&this._commands.delete(t)});return this._onDidRegisterCommand.fire(t),r}registerCommandAlias(i,e){return Zi.registerCommand(i,(t,...n)=>t.get(eo).executeCommand(e,...n))}getCommand(i){let e=this._commands.get(i);if(!(!e||e.isEmpty()))return un.first(e)}getCommands(){let i=new Map;for(let e of this._commands.keys()){let t=this.getCommand(e);t&&i.set(e,t)}return i}};Zi.registerCommand("noop",()=>{})});function Que(...i){switch(i.length){case 1:return g("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",i[0]);case 2:return g("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",i[0],i[1]);case 3:return g("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",i[0],i[1],i[2]);default:return}}var NLt,ALt,Og,vqe=P(()=>{Pi();Wt();NLt=g("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),ALt=g("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'."),Og=class i{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw LC(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){let t=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:t})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){let t=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:t})}else this._match(126)?this._addToken(9):this._error(Que("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(Que("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(Que("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return this._isAtEnd()||this._input.charCodeAt(this._current)!==e?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){let t=this._start,n=this._input.substring(this._start,this._current),o={type:19,offset:this._start,lexeme:n};this._errors.push({offset:t,lexeme:n,additionalInfo:e}),this._tokens.push(o)}_string(){this.stringRe.lastIndex=this._start;let e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;let t=this._input.substring(this._start,this._current),n=i._keywords.get(t);n?this._addToken(n):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(NLt);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let e=this._current,t=!1,n=!1;for(;;){if(e>=this._input.length){this._current=e,this._error(ALt);return}let r=this._input.charCodeAt(e);if(t)t=!1;else if(r===47&&!n){e++;break}else r===91?n=!0:r===92?t=!0:r===93&&(n=!1);e++}for(;e=this._input.length}};Og._regexFlags=new Set(["i","g","s","m","y","u"].map(i=>i.charCodeAt(0)));Og._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])});function Cqe(i,e){let t=i?i.substituteConstants():void 0,n=e?e.substituteConstants():void 0;return!t&&!n?!0:!t||!n?!1:t.equals(n)}function kT(i,e){return i.cmp(e)}function SU(i,e){if(typeof i=="string"){let t=parseFloat(i);isNaN(t)||(i=t)}return typeof i=="string"||typeof i=="number"?e(i):Ic.INSTANCE}function wqe(i){let e=null;for(let t=0,n=i.length;te?1:0}function C5(i,e,t,n){return it?1:en?1:0}function xU(i,e){if(i.type===0||e.type===1)return!0;if(i.type===9)return e.type===9?bqe(i.expr,e.expr):!1;if(e.type===9){for(let t of e.expr)if(xU(i,t))return!0;return!1}if(i.type===6){if(e.type===6)return bqe(e.expr,i.expr);for(let t of i.expr)if(xU(t,e))return!0;return!1}return i.equals(e)}function bqe(i,e){let t=0,n=0;for(;t{Mn();Ri();vqe();_i();Wt();Tc=new Map;Tc.set("false",!1);Tc.set("true",!0);Tc.set("isMac",Wi);Tc.set("isLinux",Ar);Tc.set("isWindows",hr);Tc.set("isWeb",Fh);Tc.set("isMacNative",Wi&&!Fh);Tc.set("isEdge",Ije);Tc.set("isFirefox",Dje);Tc.set("isChrome",Hde);Tc.set("isSafari",Tje);RLt=Object.prototype.hasOwnProperty,PLt={regexParsingWithErrorRecovery:!0},OLt=g("contextkey.parser.error.emptyString","Empty context key expression"),zLt=g("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),FLt=g("contextkey.parser.error.noInAfterNot","'in' after 'not'."),_qe=g("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),HLt=g("contextkey.parser.error.unexpectedToken","Unexpected token"),BLt=g("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),VLt=g("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),WLt=g("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?"),pU=class i{constructor(e=PLt){this._config=e,this._scanner=new Og,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(e===""){this._parsingErrors.push({message:OLt,offset:0,lexeme:"",additionalInfo:zLt});return}this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{let t=this._expr();if(!this._isAtEnd()){let n=this._peek(),o=n.type===17?BLt:void 0;throw this._parsingErrors.push({message:HLt,offset:n.offset,lexeme:Og.getLexeme(n),additionalInfo:o}),i._parseError}return t}catch(t){if(t!==i._parseError)throw t;return}}_expr(){return this._or()}_or(){let e=[this._and()];for(;this._matchOne(16);){let t=this._and();e.push(t)}return e.length===1?e[0]:mt.or(...e)}_and(){let e=[this._term()];for(;this._matchOne(15);){let t=this._term();e.push(t)}return e.length===1?e[0]:mt.and(...e)}_term(){if(this._matchOne(2)){let e=this._peek();switch(e.type){case 11:return this._advance(),Ic.INSTANCE;case 12:return this._advance(),Jc.INSTANCE;case 0:{this._advance();let t=this._expr();return this._consume(1,_qe),t?.negate()}case 17:return this._advance(),y5.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){let e=this._peek();switch(e.type){case 11:return this._advance(),mt.true();case 12:return this._advance(),mt.false();case 0:{this._advance();let t=this._expr();return this._consume(1,_qe),t}case 17:{let t=e.lexeme;if(this._advance(),this._matchOne(9)){let o=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),o.type!==10)throw this._errExpectedButGot("REGEX",o);let r=o.lexeme,s=r.lastIndexOf("/"),a=s===r.length-1?void 0:this._removeFlagsGY(r.substring(s+1)),l;try{l=new RegExp(r.substring(1,s),a)}catch{throw this._errExpectedButGot("REGEX",o)}return LT.create(t,l)}switch(o.type){case 10:case 19:{let r=[o.lexeme];this._advance();let s=this._peek(),a=0;for(let h=0;h=0){let c=r.slice(a+1,l),d=r[l+1]==="i"?"i":"";try{s=new RegExp(c,d)}catch{throw this._errExpectedButGot("REGEX",o)}}}if(s===null)throw this._errExpectedButGot("REGEX",o);return LT.create(t,s)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,FLt);let o=this._value();return mt.notIn(t,o)}switch(this._peek().type){case 3:{this._advance();let o=this._value();if(this._previous().type===18)return mt.equals(t,o);switch(o){case"true":return mt.has(t);case"false":return mt.not(t);default:return mt.equals(t,o)}}case 4:{this._advance();let o=this._value();if(this._previous().type===18)return mt.notEquals(t,o);switch(o){case"true":return mt.not(t);case"false":return mt.has(t);default:return mt.notEquals(t,o)}}case 5:return this._advance(),yU.create(t,this._value());case 6:return this._advance(),CU.create(t,this._value());case 7:return this._advance(),_U.create(t,this._value());case 8:return this._advance(),bU.create(t,this._value());case 13:return this._advance(),mt.in(t,this._value());default:return mt.has(t)}}case 20:throw this._parsingErrors.push({message:VLt,offset:e.offset,lexeme:"",additionalInfo:WLt}),i._parseError;default:throw this._errExpectedButGot(`true | false | KEY +`))}},DC=class{constructor(e){this.value=e}},Xkt=2,Qkt=(i,e)=>{if(i instanceof DC)e(i);else for(let t=0;t0||!((t=this._options)===null||t===void 0)&&t.leakWarningThreshold?new xue((o=(n=this._options)===null||n===void 0?void 0:n.leakWarningThreshold)!==null&&o!==void 0?o:Hje):void 0,this._perfMon=!((r=this._options)===null||r===void 0)&&r._profName?new sT(this._options._profName):void 0,this._deliveryQueue=(s=this._options)===null||s===void 0?void 0:s.deliveryQueue}dispose(){var e,t,n,o;if(!this._disposed){if(this._disposed=!0,((e=this._deliveryQueue)===null||e===void 0?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners){if(Fje){let r=this._listeners;queueMicrotask(()=>{Qkt(r,s=>{var a;return(a=s.stack)===null||a===void 0?void 0:a.print()})})}this._listeners=void 0,this._size=0}(n=(t=this._options)===null||t===void 0?void 0:t.onDidRemoveLastListener)===null||n===void 0||n.call(t),(o=this._leakageMon)===null||o===void 0||o.dispose()}}get event(){var e;return(e=this._event)!==null&&e!==void 0||(this._event=(t,n,o)=>{var r,s,a,l,c;if(this._leakageMon&&this._size>this._leakageMon.threshold*3)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),ue.None;if(this._disposed)return ue.None;n&&(t=t.bind(n));let d=new DC(t),u,h;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(d.stack=aT.create(),u=this._leakageMon.check(d.stack,this._size+1)),Fje&&(d.stack=h??aT.create()),this._listeners?this._listeners instanceof DC?((c=this._deliveryQueue)!==null&&c!==void 0||(this._deliveryQueue=new iW),this._listeners=[this._listeners,d]):this._listeners.push(d):((s=(r=this._options)===null||r===void 0?void 0:r.onWillAddFirstListener)===null||s===void 0||s.call(r,this),this._listeners=d,(l=(a=this._options)===null||a===void 0?void 0:a.onDidAddFirstListener)===null||l===void 0||l.call(a,this)),this._size++;let f=Yt(()=>{u?.(),this._removeListener(d)});return o instanceof Ye?o.add(f):Array.isArray(o)&&o.push(f),f}),this._event}_removeListener(e){var t,n,o,r;if((n=(t=this._options)===null||t===void 0?void 0:t.onWillRemoveListener)===null||n===void 0||n.call(t,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(r=(o=this._options)===null||o===void 0?void 0:o.onDidRemoveLastListener)===null||r===void 0||r.call(o,this),this._size=0;return}let s=this._listeners,a=s.indexOf(e);if(a===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,s[a]=void 0;let l=this._deliveryQueue.current===this;if(this._size*Xkt<=s.length){let c=0;for(let d=0;d0}},Bje=()=>new iW,iW=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Pf=class extends ge{constructor(e){super(e),this._isPaused=0,this._eventQueue=new $r,this._mergeFn=e?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){let e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}},TC=class extends Pf{constructor(e){var t;super(e),this._delay=(t=e.delay)!==null&&t!==void 0?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}},nW=class extends ge{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e?.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(t=>super.fire(t)),this._queuedEvents=[]}))}},oW=class{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new ge({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){let t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),Yt(Gu(()=>{this.hasListeners&&this.unhook(t);let o=this.events.indexOf(t);this.events.splice(o,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(t=>this.emitter.fire(t))}unhook(e){e.listener&&e.listener.dispose(),e.listener=null}dispose(){this.emitter.dispose()}},E3=class{constructor(){this.buffers=[]}wrapEvent(e){return(t,n,o)=>e(r=>{let s=this.buffers[this.buffers.length-1];s?s.push(()=>t.call(n,r)):t.call(n,r)},void 0,o)}bufferEvents(e){let t=[];this.buffers.push(t);let n=e();return this.buffers.pop(),t.forEach(o=>o()),n}},lT=class{constructor(){this.listening=!1,this.inputEvent=Et.None,this.inputEventListener=ue.None,this.emitter=new ge({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}});var Vje,Fi,IC,Jn,mo=P(()=>{Xt();Vje=Object.freeze(function(i,e){let t=setTimeout(i.bind(e),0);return{dispose(){clearTimeout(t)}}});(function(i){function e(t){return t===i.None||t===i.Cancelled||t instanceof IC?!0:!t||typeof t!="object"?!1:typeof t.isCancellationRequested=="boolean"&&typeof t.onCancellationRequested=="function"}i.isCancellationToken=e,i.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Et.None}),i.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Vje})})(Fi||(Fi={}));IC=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Vje:(this._emitter||(this._emitter=new ge),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Jn=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new IC),this._token}cancel(){this._token?this._token instanceof IC&&this._token.cancel():this._token=Fi.Cancelled}dispose(e=!1){var t;e&&this.cancel(),(t=this._parentListener)===null||t===void 0||t.dispose(),this._token?this._token instanceof IC&&this._token.dispose():this._token=Fi.None}}});function fr(i,e){let t=(e&65535)<<16>>>0;return(i|t)>>>0}var cT,rW,Sue,kue,Eue,eLt,tLt,iLt,nLt,sW,Lue,ep,Bh=P(()=>{cT=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},rW=new cT,Sue=new cT,kue=new cT,Eue=new Array(230),eLt={},tLt=[],iLt=Object.create(null),nLt=Object.create(null),sW=[],Lue=[];for(let i=0;i<=193;i++)sW[i]=-1;for(let i=0;i<=132;i++)Lue[i]=-1;(function(){let i="",e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",i,i],[1,1,"Hyper",0,i,0,i,i,i],[1,2,"Super",0,i,0,i,i,i],[1,3,"Fn",0,i,0,i,i,i],[1,4,"FnLock",0,i,0,i,i,i],[1,5,"Suspend",0,i,0,i,i,i],[1,6,"Resume",0,i,0,i,i,i],[1,7,"Turbo",0,i,0,i,i,i],[1,8,"Sleep",0,i,0,"VK_SLEEP",i,i],[1,9,"WakeUp",0,i,0,i,i,i],[0,10,"KeyA",31,"A",65,"VK_A",i,i],[0,11,"KeyB",32,"B",66,"VK_B",i,i],[0,12,"KeyC",33,"C",67,"VK_C",i,i],[0,13,"KeyD",34,"D",68,"VK_D",i,i],[0,14,"KeyE",35,"E",69,"VK_E",i,i],[0,15,"KeyF",36,"F",70,"VK_F",i,i],[0,16,"KeyG",37,"G",71,"VK_G",i,i],[0,17,"KeyH",38,"H",72,"VK_H",i,i],[0,18,"KeyI",39,"I",73,"VK_I",i,i],[0,19,"KeyJ",40,"J",74,"VK_J",i,i],[0,20,"KeyK",41,"K",75,"VK_K",i,i],[0,21,"KeyL",42,"L",76,"VK_L",i,i],[0,22,"KeyM",43,"M",77,"VK_M",i,i],[0,23,"KeyN",44,"N",78,"VK_N",i,i],[0,24,"KeyO",45,"O",79,"VK_O",i,i],[0,25,"KeyP",46,"P",80,"VK_P",i,i],[0,26,"KeyQ",47,"Q",81,"VK_Q",i,i],[0,27,"KeyR",48,"R",82,"VK_R",i,i],[0,28,"KeyS",49,"S",83,"VK_S",i,i],[0,29,"KeyT",50,"T",84,"VK_T",i,i],[0,30,"KeyU",51,"U",85,"VK_U",i,i],[0,31,"KeyV",52,"V",86,"VK_V",i,i],[0,32,"KeyW",53,"W",87,"VK_W",i,i],[0,33,"KeyX",54,"X",88,"VK_X",i,i],[0,34,"KeyY",55,"Y",89,"VK_Y",i,i],[0,35,"KeyZ",56,"Z",90,"VK_Z",i,i],[0,36,"Digit1",22,"1",49,"VK_1",i,i],[0,37,"Digit2",23,"2",50,"VK_2",i,i],[0,38,"Digit3",24,"3",51,"VK_3",i,i],[0,39,"Digit4",25,"4",52,"VK_4",i,i],[0,40,"Digit5",26,"5",53,"VK_5",i,i],[0,41,"Digit6",27,"6",54,"VK_6",i,i],[0,42,"Digit7",28,"7",55,"VK_7",i,i],[0,43,"Digit8",29,"8",56,"VK_8",i,i],[0,44,"Digit9",30,"9",57,"VK_9",i,i],[0,45,"Digit0",21,"0",48,"VK_0",i,i],[1,46,"Enter",3,"Enter",13,"VK_RETURN",i,i],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",i,i],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",i,i],[1,49,"Tab",2,"Tab",9,"VK_TAB",i,i],[1,50,"Space",10,"Space",32,"VK_SPACE",i,i],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,i,0,i,i,i],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",i,i],[1,64,"F1",59,"F1",112,"VK_F1",i,i],[1,65,"F2",60,"F2",113,"VK_F2",i,i],[1,66,"F3",61,"F3",114,"VK_F3",i,i],[1,67,"F4",62,"F4",115,"VK_F4",i,i],[1,68,"F5",63,"F5",116,"VK_F5",i,i],[1,69,"F6",64,"F6",117,"VK_F6",i,i],[1,70,"F7",65,"F7",118,"VK_F7",i,i],[1,71,"F8",66,"F8",119,"VK_F8",i,i],[1,72,"F9",67,"F9",120,"VK_F9",i,i],[1,73,"F10",68,"F10",121,"VK_F10",i,i],[1,74,"F11",69,"F11",122,"VK_F11",i,i],[1,75,"F12",70,"F12",123,"VK_F12",i,i],[1,76,"PrintScreen",0,i,0,i,i,i],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",i,i],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",i,i],[1,79,"Insert",19,"Insert",45,"VK_INSERT",i,i],[1,80,"Home",14,"Home",36,"VK_HOME",i,i],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",i,i],[1,82,"Delete",20,"Delete",46,"VK_DELETE",i,i],[1,83,"End",13,"End",35,"VK_END",i,i],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",i,i],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",i],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",i],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",i],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",i],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",i,i],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",i,i],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",i,i],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",i,i],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",i,i],[1,94,"NumpadEnter",3,i,0,i,i,i],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",i,i],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",i,i],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",i,i],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",i,i],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",i,i],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",i,i],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",i,i],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",i,i],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",i,i],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",i,i],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",i,i],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",i,i],[1,107,"ContextMenu",58,"ContextMenu",93,i,i,i],[1,108,"Power",0,i,0,i,i,i],[1,109,"NumpadEqual",0,i,0,i,i,i],[1,110,"F13",71,"F13",124,"VK_F13",i,i],[1,111,"F14",72,"F14",125,"VK_F14",i,i],[1,112,"F15",73,"F15",126,"VK_F15",i,i],[1,113,"F16",74,"F16",127,"VK_F16",i,i],[1,114,"F17",75,"F17",128,"VK_F17",i,i],[1,115,"F18",76,"F18",129,"VK_F18",i,i],[1,116,"F19",77,"F19",130,"VK_F19",i,i],[1,117,"F20",78,"F20",131,"VK_F20",i,i],[1,118,"F21",79,"F21",132,"VK_F21",i,i],[1,119,"F22",80,"F22",133,"VK_F22",i,i],[1,120,"F23",81,"F23",134,"VK_F23",i,i],[1,121,"F24",82,"F24",135,"VK_F24",i,i],[1,122,"Open",0,i,0,i,i,i],[1,123,"Help",0,i,0,i,i,i],[1,124,"Select",0,i,0,i,i,i],[1,125,"Again",0,i,0,i,i,i],[1,126,"Undo",0,i,0,i,i,i],[1,127,"Cut",0,i,0,i,i,i],[1,128,"Copy",0,i,0,i,i,i],[1,129,"Paste",0,i,0,i,i,i],[1,130,"Find",0,i,0,i,i,i],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",i,i],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",i,i],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",i,i],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",i,i],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",i,i],[1,136,"KanaMode",0,i,0,i,i,i],[0,137,"IntlYen",0,i,0,i,i,i],[1,138,"Convert",0,i,0,i,i,i],[1,139,"NonConvert",0,i,0,i,i,i],[1,140,"Lang1",0,i,0,i,i,i],[1,141,"Lang2",0,i,0,i,i,i],[1,142,"Lang3",0,i,0,i,i,i],[1,143,"Lang4",0,i,0,i,i,i],[1,144,"Lang5",0,i,0,i,i,i],[1,145,"Abort",0,i,0,i,i,i],[1,146,"Props",0,i,0,i,i,i],[1,147,"NumpadParenLeft",0,i,0,i,i,i],[1,148,"NumpadParenRight",0,i,0,i,i,i],[1,149,"NumpadBackspace",0,i,0,i,i,i],[1,150,"NumpadMemoryStore",0,i,0,i,i,i],[1,151,"NumpadMemoryRecall",0,i,0,i,i,i],[1,152,"NumpadMemoryClear",0,i,0,i,i,i],[1,153,"NumpadMemoryAdd",0,i,0,i,i,i],[1,154,"NumpadMemorySubtract",0,i,0,i,i,i],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",i,i],[1,156,"NumpadClearEntry",0,i,0,i,i,i],[1,0,i,5,"Ctrl",17,"VK_CONTROL",i,i],[1,0,i,4,"Shift",16,"VK_SHIFT",i,i],[1,0,i,6,"Alt",18,"VK_MENU",i,i],[1,0,i,57,"Meta",91,"VK_COMMAND",i,i],[1,157,"ControlLeft",5,i,0,"VK_LCONTROL",i,i],[1,158,"ShiftLeft",4,i,0,"VK_LSHIFT",i,i],[1,159,"AltLeft",6,i,0,"VK_LMENU",i,i],[1,160,"MetaLeft",57,i,0,"VK_LWIN",i,i],[1,161,"ControlRight",5,i,0,"VK_RCONTROL",i,i],[1,162,"ShiftRight",4,i,0,"VK_RSHIFT",i,i],[1,163,"AltRight",6,i,0,"VK_RMENU",i,i],[1,164,"MetaRight",57,i,0,"VK_RWIN",i,i],[1,165,"BrightnessUp",0,i,0,i,i,i],[1,166,"BrightnessDown",0,i,0,i,i,i],[1,167,"MediaPlay",0,i,0,i,i,i],[1,168,"MediaRecord",0,i,0,i,i,i],[1,169,"MediaFastForward",0,i,0,i,i,i],[1,170,"MediaRewind",0,i,0,i,i,i],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",i,i],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",i,i],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",i,i],[1,174,"Eject",0,i,0,i,i,i],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",i,i],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",i,i],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",i,i],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",i,i],[1,179,"LaunchApp1",0,i,0,"VK_MEDIA_LAUNCH_APP1",i,i],[1,180,"SelectTask",0,i,0,i,i,i],[1,181,"LaunchScreenSaver",0,i,0,i,i,i],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",i,i],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",i,i],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",i,i],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",i,i],[1,186,"BrowserStop",0,i,0,"VK_BROWSER_STOP",i,i],[1,187,"BrowserRefresh",0,i,0,"VK_BROWSER_REFRESH",i,i],[1,188,"BrowserFavorites",0,i,0,"VK_BROWSER_FAVORITES",i,i],[1,189,"ZoomToggle",0,i,0,i,i,i],[1,190,"MailReply",0,i,0,i,i,i],[1,191,"MailForward",0,i,0,i,i,i],[1,192,"MailSend",0,i,0,i,i,i],[1,0,i,114,"KeyInComposition",229,i,i,i],[1,0,i,116,"ABNT_C2",194,"VK_ABNT_C2",i,i],[1,0,i,96,"OEM_8",223,"VK_OEM_8",i,i],[1,0,i,0,i,0,"VK_KANA",i,i],[1,0,i,0,i,0,"VK_HANGUL",i,i],[1,0,i,0,i,0,"VK_JUNJA",i,i],[1,0,i,0,i,0,"VK_FINAL",i,i],[1,0,i,0,i,0,"VK_HANJA",i,i],[1,0,i,0,i,0,"VK_KANJI",i,i],[1,0,i,0,i,0,"VK_CONVERT",i,i],[1,0,i,0,i,0,"VK_NONCONVERT",i,i],[1,0,i,0,i,0,"VK_ACCEPT",i,i],[1,0,i,0,i,0,"VK_MODECHANGE",i,i],[1,0,i,0,i,0,"VK_SELECT",i,i],[1,0,i,0,i,0,"VK_PRINT",i,i],[1,0,i,0,i,0,"VK_EXECUTE",i,i],[1,0,i,0,i,0,"VK_SNAPSHOT",i,i],[1,0,i,0,i,0,"VK_HELP",i,i],[1,0,i,0,i,0,"VK_APPS",i,i],[1,0,i,0,i,0,"VK_PROCESSKEY",i,i],[1,0,i,0,i,0,"VK_PACKET",i,i],[1,0,i,0,i,0,"VK_DBE_SBCSCHAR",i,i],[1,0,i,0,i,0,"VK_DBE_DBCSCHAR",i,i],[1,0,i,0,i,0,"VK_ATTN",i,i],[1,0,i,0,i,0,"VK_CRSEL",i,i],[1,0,i,0,i,0,"VK_EXSEL",i,i],[1,0,i,0,i,0,"VK_EREOF",i,i],[1,0,i,0,i,0,"VK_PLAY",i,i],[1,0,i,0,i,0,"VK_ZOOM",i,i],[1,0,i,0,i,0,"VK_NONAME",i,i],[1,0,i,0,i,0,"VK_PA1",i,i],[1,0,i,0,i,0,"VK_OEM_CLEAR",i,i]],t=[],n=[];for(let o of e){let[r,s,a,l,c,d,u,h,f]=o;if(n[s]||(n[s]=!0,tLt[s]=a,iLt[a]=s,nLt[a.toLowerCase()]=s,r&&(sW[s]=l,l!==0&&l!==3&&l!==5&&l!==4&&l!==6&&l!==57&&(Lue[l]=s))),!t[l]){if(t[l]=!0,!c)throw new Error(`String representation missing for key code ${l} around scan code ${a}`);rW.define(l,c),Sue.define(l,h||c),kue.define(l,f||h||c)}d&&(Eue[d]=l),u&&(eLt[u]=l)}Lue[3]=46})();(function(i){function e(a){return rW.keyCodeToStr(a)}i.toString=e;function t(a){return rW.strToKeyCode(a)}i.fromString=t;function n(a){return Sue.keyCodeToStr(a)}i.toUserSettingsUS=n;function o(a){return kue.keyCodeToStr(a)}i.toUserSettingsGeneral=o;function r(a){return Sue.strToKeyCode(a)||kue.strToKeyCode(a)}i.fromUserSettings=r;function s(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return rW.keyCodeToStr(a)}i.toElectronAccelerator=s})(ep||(ep={}))});var MC,Due,dT,uT,Wje,Tue=P(()=>{Mn();Due=globalThis.vscode;if(typeof Due<"u"&&typeof Due.process<"u"){let i=Due.process;MC={get platform(){return i.platform},get arch(){return i.arch},get env(){return i.env},cwd(){return i.cwd()}}}else typeof process<"u"?MC={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:MC={get platform(){return hr?"win32":Wi?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};dT=MC.cwd,uT=MC.env,Wje=MC.platform});function dLt(i,e){if(i===null||typeof i!="object")throw new aW(e,"Object",i)}function Qa(i,e){if(typeof i!="string")throw new aW(e,"string",i)}function Oo(i){return i===Zc||i===Vh}function Iue(i){return i===Zc}function T3(i){return i>=rLt&&i<=aLt||i>=sLt&&i<=lLt}function lW(i,e,t,n){let o="",r=0,s=-1,a=0,l=0;for(let c=0;c<=i.length;++c){if(c2){let d=o.lastIndexOf(t);d===-1?(o="",r=0):(o=o.slice(0,d),r=o.length-1-o.lastIndexOf(t)),s=c,a=0;continue}else if(o.length!==0){o="",r=0,s=c,a=0;continue}}e&&(o+=o.length>0?`${t}..`:"..",r=2)}else o.length>0?o+=`${t}${i.slice(s+1,c)}`:o=i.slice(s+1,c),r=c-s-1;s=c,a=0}else l===I3&&a!==-1?++a:a=-1}return o}function Uje(i,e){dLt(e,"pathObject");let t=e.dir||e.root,n=e.base||`${e.name||""}${e.ext||""}`;return t?t===e.root?`${t}${n}`:`${t}${i}${n}`:n}var rLt,sLt,aLt,lLt,I3,Zc,Vh,D3,cLt,aW,M3,ou,uLt,hs,cW,$je,jje,dW,tp,qje,Zu,Dg=P(()=>{Tue();rLt=65,sLt=97,aLt=90,lLt=122,I3=46,Zc=47,Vh=92,D3=58,cLt=63,aW=class extends Error{constructor(e,t,n){let o;typeof t=="string"&&t.indexOf("not ")===0?(o="must not be",t=t.replace(/^not /,"")):o="must be";let r=e.indexOf(".")!==-1?"property":"argument",s=`The "${e}" ${r} ${o} of type ${t}`;s+=`. Received type ${typeof n}`,super(s),this.code="ERR_INVALID_ARG_TYPE"}};M3=Wje==="win32";ou={resolve(...i){let e="",t="",n=!1;for(let o=i.length-1;o>=-1;o--){let r;if(o>=0){if(r=i[o],Qa(r,"path"),r.length===0)continue}else e.length===0?r=dT():(r=uT[`=${e}`]||dT(),(r===void 0||r.slice(0,2).toLowerCase()!==e.toLowerCase()&&r.charCodeAt(2)===Vh)&&(r=`${e}\\`));let s=r.length,a=0,l="",c=!1,d=r.charCodeAt(0);if(s===1)Oo(d)&&(a=1,c=!0);else if(Oo(d))if(c=!0,Oo(r.charCodeAt(1))){let u=2,h=u;for(;u2&&Oo(r.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(n){if(e.length>0)break}else if(t=`${r.slice(a)}\\${t}`,n=c,c&&e.length>0)break}return t=lW(t,!n,"\\",Oo),n?`${e}\\${t}`:`${e}${t}`||"."},normalize(i){Qa(i,"path");let e=i.length;if(e===0)return".";let t=0,n,o=!1,r=i.charCodeAt(0);if(e===1)return Iue(r)?"\\":i;if(Oo(r))if(o=!0,Oo(i.charCodeAt(1))){let a=2,l=a;for(;a2&&Oo(i.charCodeAt(2))&&(o=!0,t=3));let s=t0&&Oo(i.charCodeAt(e-1))&&(s+="\\"),n===void 0?o?`\\${s}`:s:o?`${n}\\${s}`:`${n}${s}`},isAbsolute(i){Qa(i,"path");let e=i.length;if(e===0)return!1;let t=i.charCodeAt(0);return Oo(t)||e>2&&T3(t)&&i.charCodeAt(1)===D3&&Oo(i.charCodeAt(2))},join(...i){if(i.length===0)return".";let e,t;for(let r=0;r0&&(e===void 0?e=t=s:e+=`\\${s}`)}if(e===void 0)return".";let n=!0,o=0;if(typeof t=="string"&&Oo(t.charCodeAt(0))){++o;let r=t.length;r>1&&Oo(t.charCodeAt(1))&&(++o,r>2&&(Oo(t.charCodeAt(2))?++o:n=!1))}if(n){for(;o=2&&(e=`\\${e.slice(o)}`)}return ou.normalize(e)},relative(i,e){if(Qa(i,"from"),Qa(e,"to"),i===e)return"";let t=ou.resolve(i),n=ou.resolve(e);if(t===n||(i=t.toLowerCase(),e=n.toLowerCase(),i===e))return"";let o=0;for(;oo&&i.charCodeAt(r-1)===Vh;)r--;let s=r-o,a=0;for(;aa&&e.charCodeAt(l-1)===Vh;)l--;let c=l-a,d=sd){if(e.charCodeAt(a+h)===Vh)return n.slice(a+h+1);if(h===2)return n.slice(a+h)}s>d&&(i.charCodeAt(o+h)===Vh?u=h:h===2&&(u=3)),u===-1&&(u=0)}let f="";for(h=o+u+1;h<=r;++h)(h===r||i.charCodeAt(h)===Vh)&&(f+=f.length===0?"..":"\\..");return a+=u,f.length>0?`${f}${n.slice(a,l)}`:(n.charCodeAt(a)===Vh&&++a,n.slice(a,l))},toNamespacedPath(i){if(typeof i!="string"||i.length===0)return i;let e=ou.resolve(i);if(e.length<=2)return i;if(e.charCodeAt(0)===Vh){if(e.charCodeAt(1)===Vh){let t=e.charCodeAt(2);if(t!==cLt&&t!==I3)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(T3(e.charCodeAt(0))&&e.charCodeAt(1)===D3&&e.charCodeAt(2)===Vh)return`\\\\?\\${e}`;return i},dirname(i){Qa(i,"path");let e=i.length;if(e===0)return".";let t=-1,n=0,o=i.charCodeAt(0);if(e===1)return Oo(o)?i:".";if(Oo(o)){if(t=n=1,Oo(i.charCodeAt(1))){let a=2,l=a;for(;a2&&Oo(i.charCodeAt(2))?3:2,n=t);let r=-1,s=!0;for(let a=e-1;a>=n;--a)if(Oo(i.charCodeAt(a))){if(!s){r=a;break}}else s=!1;if(r===-1){if(t===-1)return".";r=t}return i.slice(0,r)},basename(i,e){e!==void 0&&Qa(e,"ext"),Qa(i,"path");let t=0,n=-1,o=!0,r;if(i.length>=2&&T3(i.charCodeAt(0))&&i.charCodeAt(1)===D3&&(t=2),e!==void 0&&e.length>0&&e.length<=i.length){if(e===i)return"";let s=e.length-1,a=-1;for(r=i.length-1;r>=t;--r){let l=i.charCodeAt(r);if(Oo(l)){if(!o){t=r+1;break}}else a===-1&&(o=!1,a=r+1),s>=0&&(l===e.charCodeAt(s)?--s===-1&&(n=r):(s=-1,n=a))}return t===n?n=a:n===-1&&(n=i.length),i.slice(t,n)}for(r=i.length-1;r>=t;--r)if(Oo(i.charCodeAt(r))){if(!o){t=r+1;break}}else n===-1&&(o=!1,n=r+1);return n===-1?"":i.slice(t,n)},extname(i){Qa(i,"path");let e=0,t=-1,n=0,o=-1,r=!0,s=0;i.length>=2&&i.charCodeAt(1)===D3&&T3(i.charCodeAt(0))&&(e=n=2);for(let a=i.length-1;a>=e;--a){let l=i.charCodeAt(a);if(Oo(l)){if(!r){n=a+1;break}continue}o===-1&&(r=!1,o=a+1),l===I3?t===-1?t=a:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||o===-1||s===0||s===1&&t===o-1&&t===n+1?"":i.slice(t,o)},format:Uje.bind(null,"\\"),parse(i){Qa(i,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return e;let t=i.length,n=0,o=i.charCodeAt(0);if(t===1)return Oo(o)?(e.root=e.dir=i,e):(e.base=e.name=i,e);if(Oo(o)){if(n=1,Oo(i.charCodeAt(1))){let u=2,h=u;for(;u0&&(e.root=i.slice(0,n));let r=-1,s=n,a=-1,l=!0,c=i.length-1,d=0;for(;c>=n;--c){if(o=i.charCodeAt(c),Oo(o)){if(!l){s=c+1;break}continue}a===-1&&(l=!1,a=c+1),o===I3?r===-1?r=c:d!==1&&(d=1):r!==-1&&(d=-1)}return a!==-1&&(r===-1||d===0||d===1&&r===a-1&&r===s+1?e.base=e.name=i.slice(s,a):(e.name=i.slice(s,r),e.base=i.slice(s,a),e.ext=i.slice(r,a))),s>0&&s!==n?e.dir=i.slice(0,s-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},uLt=(()=>{if(M3){let i=/\\/g;return()=>{let e=dT().replace(i,"/");return e.slice(e.indexOf("/"))}}return()=>dT()})(),hs={resolve(...i){let e="",t=!1;for(let n=i.length-1;n>=-1&&!t;n--){let o=n>=0?i[n]:uLt();Qa(o,"path"),o.length!==0&&(e=`${o}/${e}`,t=o.charCodeAt(0)===Zc)}return e=lW(e,!t,"/",Iue),t?`/${e}`:e.length>0?e:"."},normalize(i){if(Qa(i,"path"),i.length===0)return".";let e=i.charCodeAt(0)===Zc,t=i.charCodeAt(i.length-1)===Zc;return i=lW(i,!e,"/",Iue),i.length===0?e?"/":t?"./":".":(t&&(i+="/"),e?`/${i}`:i)},isAbsolute(i){return Qa(i,"path"),i.length>0&&i.charCodeAt(0)===Zc},join(...i){if(i.length===0)return".";let e;for(let t=0;t0&&(e===void 0?e=n:e+=`/${n}`)}return e===void 0?".":hs.normalize(e)},relative(i,e){if(Qa(i,"from"),Qa(e,"to"),i===e||(i=hs.resolve(i),e=hs.resolve(e),i===e))return"";let t=1,n=i.length,o=n-t,r=1,s=e.length-r,a=oa){if(e.charCodeAt(r+c)===Zc)return e.slice(r+c+1);if(c===0)return e.slice(r+c)}else o>a&&(i.charCodeAt(t+c)===Zc?l=c:c===0&&(l=0));let d="";for(c=t+l+1;c<=n;++c)(c===n||i.charCodeAt(c)===Zc)&&(d+=d.length===0?"..":"/..");return`${d}${e.slice(r+l)}`},toNamespacedPath(i){return i},dirname(i){if(Qa(i,"path"),i.length===0)return".";let e=i.charCodeAt(0)===Zc,t=-1,n=!0;for(let o=i.length-1;o>=1;--o)if(i.charCodeAt(o)===Zc){if(!n){t=o;break}}else n=!1;return t===-1?e?"/":".":e&&t===1?"//":i.slice(0,t)},basename(i,e){e!==void 0&&Qa(e,"ext"),Qa(i,"path");let t=0,n=-1,o=!0,r;if(e!==void 0&&e.length>0&&e.length<=i.length){if(e===i)return"";let s=e.length-1,a=-1;for(r=i.length-1;r>=0;--r){let l=i.charCodeAt(r);if(l===Zc){if(!o){t=r+1;break}}else a===-1&&(o=!1,a=r+1),s>=0&&(l===e.charCodeAt(s)?--s===-1&&(n=r):(s=-1,n=a))}return t===n?n=a:n===-1&&(n=i.length),i.slice(t,n)}for(r=i.length-1;r>=0;--r)if(i.charCodeAt(r)===Zc){if(!o){t=r+1;break}}else n===-1&&(o=!1,n=r+1);return n===-1?"":i.slice(t,n)},extname(i){Qa(i,"path");let e=-1,t=0,n=-1,o=!0,r=0;for(let s=i.length-1;s>=0;--s){let a=i.charCodeAt(s);if(a===Zc){if(!o){t=s+1;break}continue}n===-1&&(o=!1,n=s+1),a===I3?e===-1?e=s:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||n===-1||r===0||r===1&&e===n-1&&e===t+1?"":i.slice(e,n)},format:Uje.bind(null,"/"),parse(i){Qa(i,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return e;let t=i.charCodeAt(0)===Zc,n;t?(e.root="/",n=1):n=0;let o=-1,r=0,s=-1,a=!0,l=i.length-1,c=0;for(;l>=n;--l){let d=i.charCodeAt(l);if(d===Zc){if(!a){r=l+1;break}continue}s===-1&&(a=!1,s=l+1),d===I3?o===-1?o=l:c!==1&&(c=1):o!==-1&&(c=-1)}if(s!==-1){let d=r===0&&t?1:r;o===-1||c===0||c===1&&o===s-1&&o===r+1?e.base=e.name=i.slice(d,s):(e.name=i.slice(d,o),e.base=i.slice(d,s),e.ext=i.slice(o,s))}return r>0?e.dir=i.slice(0,r-1):t&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};hs.win32=ou.win32=ou;hs.posix=ou.posix=hs;cW=M3?ou.normalize:hs.normalize,$je=M3?ou.resolve:hs.resolve,jje=M3?ou.relative:hs.relative,dW=M3?ou.dirname:hs.dirname,tp=M3?ou.basename:hs.basename,qje=M3?ou.extname:hs.extname,Zu=M3?ou.sep:hs.sep});function mLt(i,e){if(!i.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${i.authority}", path: "${i.path}", query: "${i.query}", fragment: "${i.fragment}"}`);if(i.scheme&&!hLt.test(i.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(i.path){if(i.authority){if(!fLt.test(i.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(pLt.test(i.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function gLt(i,e){return!i&&!e?"file":i}function vLt(i,e){switch(i){case"https":case"http":case"file":e?e[0]!==sm&&(e=sm+e):e=sm;break}return e}function Gje(i,e,t){let n,o=-1;for(let r=0;r=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===45||s===46||s===95||s===126||e&&s===47||t&&s===91||t&&s===93||t&&s===58)o!==-1&&(n+=encodeURIComponent(i.substring(o,r)),o=-1),n!==void 0&&(n+=i.charAt(r));else{n===void 0&&(n=i.substr(0,r));let a=Zje[s];a!==void 0?(o!==-1&&(n+=encodeURIComponent(i.substring(o,r)),o=-1),n+=a):o===-1&&(o=r)}}return o!==-1&&(n+=encodeURIComponent(i.substring(o))),n!==void 0?n:i}function bLt(i){let e;for(let t=0;t1&&i.scheme==="file"?t=`//${i.authority}${i.path}`:i.path.charCodeAt(0)===47&&(i.path.charCodeAt(1)>=65&&i.path.charCodeAt(1)<=90||i.path.charCodeAt(1)>=97&&i.path.charCodeAt(1)<=122)&&i.path.charCodeAt(2)===58?e?t=i.path.substr(1):t=i.path[1].toLowerCase()+i.path.substr(2):t=i.path,hr&&(t=t.replace(/\//g,"\\")),t}function Nue(i,e){let t=e?bLt:Gje,n="",{scheme:o,authority:r,path:s,query:a,fragment:l}=i;if(o&&(n+=o,n+=":"),(r||o==="file")&&(n+=sm,n+=sm),r){let c=r.indexOf("@");if(c!==-1){let d=r.substr(0,c);r=r.substr(c+1),c=d.lastIndexOf(":"),c===-1?n+=t(d,!1,!1):(n+=t(d.substr(0,c),!1,!1),n+=":",n+=t(d.substr(c+1),!1,!0)),n+="@"}r=r.toLowerCase(),c=r.lastIndexOf(":"),c===-1?n+=t(r,!1,!0):(n+=t(r.substr(0,c),!1,!0),n+=r.substr(c))}if(s){if(s.length>=3&&s.charCodeAt(0)===47&&s.charCodeAt(2)===58){let c=s.charCodeAt(1);c>=65&&c<=90&&(s=`/${String.fromCharCode(c+32)}:${s.substr(3)}`)}else if(s.length>=2&&s.charCodeAt(1)===58){let c=s.charCodeAt(0);c>=65&&c<=90&&(s=`${String.fromCharCode(c+32)}:${s.substr(2)}`)}n+=t(s,!0,!1)}return a&&(n+="?",n+=t(a,!1,!1)),l&&(n+="#",n+=e?l:Gje(l,!1,!1)),n}function Xje(i){try{return decodeURIComponent(i)}catch{return i.length>3?i.substr(0,3)+Xje(i.substr(3)):i}}function uW(i){return i.match(Kje)?i.replace(Kje,e=>Xje(e)):i}var hLt,fLt,pLt,Os,sm,_Lt,li,Yje,N3,Zje,Kje,Io=P(()=>{Dg();Mn();hLt=/^\w[\w\d+.-]*$/,fLt=/^\//,pLt=/^\/\//;Os="",sm="/",_Lt=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,li=class i{static isUri(e){return e instanceof i?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}constructor(e,t,n,o,r,s=!1){typeof e=="object"?(this.scheme=e.scheme||Os,this.authority=e.authority||Os,this.path=e.path||Os,this.query=e.query||Os,this.fragment=e.fragment||Os):(this.scheme=gLt(e,s),this.authority=t||Os,this.path=vLt(this.scheme,n||Os),this.query=o||Os,this.fragment=r||Os,mLt(this,s))}get fsPath(){return hT(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:o,query:r,fragment:s}=e;return t===void 0?t=this.scheme:t===null&&(t=Os),n===void 0?n=this.authority:n===null&&(n=Os),o===void 0?o=this.path:o===null&&(o=Os),r===void 0?r=this.query:r===null&&(r=Os),s===void 0?s=this.fragment:s===null&&(s=Os),t===this.scheme&&n===this.authority&&o===this.path&&r===this.query&&s===this.fragment?this:new N3(t,n,o,r,s)}static parse(e,t=!1){let n=_Lt.exec(e);return n?new N3(n[2]||Os,uW(n[4]||Os),uW(n[5]||Os),uW(n[7]||Os),uW(n[9]||Os),t):new N3(Os,Os,Os,Os,Os)}static file(e){let t=Os;if(hr&&(e=e.replace(/\\/g,sm)),e[0]===sm&&e[1]===sm){let n=e.indexOf(sm,2);n===-1?(t=e.substring(2),e=sm):(t=e.substring(2,n),e=e.substring(n)||sm)}return new N3("file",t,e,Os,Os)}static from(e,t){return new N3(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return hr&&e.scheme==="file"?n=i.file(ou.join(hT(e,!0),...t)).path:n=hs.join(e.path,...t),e.with({path:n})}toString(e=!1){return Nue(this,e)}toJSON(){return this}static revive(e){var t,n;if(e){if(e instanceof i)return e;{let o=new N3(e);return o._formatted=(t=e.external)!==null&&t!==void 0?t:null,o._fsPath=e._sep===Yje&&(n=e.fsPath)!==null&&n!==void 0?n:null,o}}else return e}},Yje=hr?1:void 0,N3=class extends li{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=hT(this,!1)),this._fsPath}toString(e=!1){return e?Nue(this,!0):(this._formatted||(this._formatted=Nue(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Yje),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}},Zje={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};Kje=/(%[0-9A-Za-z][0-9A-Za-z])+/g});var ke,Mi=P(()=>{ke=class i{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new i(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return i.equals(this,e)}static equals(e,t){return!e&&!t?!0:!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return i.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{Mi();O=class i{constructor(e,t,n,o){e>n||e===n&&t>o?(this.startLineNumber=n,this.startColumn=o,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=o)}isEmpty(){return i.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return i.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return i.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return i.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return i.plusRange(this,e)}static plusRange(e,t){let n,o,r,s;return t.startLineNumbere.endLineNumber?(r=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(r=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(r=e.endLineNumber,s=e.endColumn),new i(n,o,r,s)}intersectRanges(e){return i.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,o=e.startColumn,r=e.endLineNumber,s=e.endColumn,a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,d=t.endColumn;return nc?(r=c,s=d):r===c&&(s=Math.min(s,d)),n>r||n===r&&o>s?null:new i(n,o,r,s)}equalsRange(e){return i.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t?!0:!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return i.getEndPosition(this)}static getEndPosition(e){return new ke(e.endLineNumber,e.endColumn)}getStartPosition(){return i.getStartPosition(this)}static getStartPosition(e){return new ke(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new i(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new i(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return i.collapseToStart(this)}static collapseToStart(e){return new i(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return i.collapseToEnd(this)}static collapseToEnd(e){return new i(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new i(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new i(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new i(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}});var jt,zo=P(()=>{Mi();Kt();jt=class i extends O{constructor(e,t,n,o){super(e,t,n,o),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=o}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return i.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return this.getDirection()===0?new i(this.startLineNumber,this.startColumn,e,t):new i(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new ke(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new ke(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return this.getDirection()===0?new i(e,t,this.endLineNumber,this.endColumn):new i(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new i(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return t===0?new i(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new i(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new i(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n{ho();Aue=Object.create(null);kt={add:U("add",6e4),plus:U("plus",6e4),gistNew:U("gist-new",6e4),repoCreate:U("repo-create",6e4),lightbulb:U("lightbulb",60001),lightBulb:U("light-bulb",60001),repo:U("repo",60002),repoDelete:U("repo-delete",60002),gistFork:U("gist-fork",60003),repoForked:U("repo-forked",60003),gitPullRequest:U("git-pull-request",60004),gitPullRequestAbandoned:U("git-pull-request-abandoned",60004),recordKeys:U("record-keys",60005),keyboard:U("keyboard",60005),tag:U("tag",60006),tagAdd:U("tag-add",60006),tagRemove:U("tag-remove",60006),gitPullRequestLabel:U("git-pull-request-label",60006),person:U("person",60007),personFollow:U("person-follow",60007),personOutline:U("person-outline",60007),personFilled:U("person-filled",60007),gitBranch:U("git-branch",60008),gitBranchCreate:U("git-branch-create",60008),gitBranchDelete:U("git-branch-delete",60008),sourceControl:U("source-control",60008),mirror:U("mirror",60009),mirrorPublic:U("mirror-public",60009),star:U("star",60010),starAdd:U("star-add",60010),starDelete:U("star-delete",60010),starEmpty:U("star-empty",60010),comment:U("comment",60011),commentAdd:U("comment-add",60011),alert:U("alert",60012),warning:U("warning",60012),search:U("search",60013),searchSave:U("search-save",60013),logOut:U("log-out",60014),signOut:U("sign-out",60014),logIn:U("log-in",60015),signIn:U("sign-in",60015),eye:U("eye",60016),eyeUnwatch:U("eye-unwatch",60016),eyeWatch:U("eye-watch",60016),circleFilled:U("circle-filled",60017),primitiveDot:U("primitive-dot",60017),closeDirty:U("close-dirty",60017),debugBreakpoint:U("debug-breakpoint",60017),debugBreakpointDisabled:U("debug-breakpoint-disabled",60017),debugBreakpointPending:U("debug-breakpoint-pending",60377),debugHint:U("debug-hint",60017),primitiveSquare:U("primitive-square",60018),edit:U("edit",60019),pencil:U("pencil",60019),info:U("info",60020),issueOpened:U("issue-opened",60020),gistPrivate:U("gist-private",60021),gitForkPrivate:U("git-fork-private",60021),lock:U("lock",60021),mirrorPrivate:U("mirror-private",60021),close:U("close",60022),removeClose:U("remove-close",60022),x:U("x",60022),repoSync:U("repo-sync",60023),sync:U("sync",60023),clone:U("clone",60024),desktopDownload:U("desktop-download",60024),beaker:U("beaker",60025),microscope:U("microscope",60025),vm:U("vm",60026),deviceDesktop:U("device-desktop",60026),file:U("file",60027),fileText:U("file-text",60027),more:U("more",60028),ellipsis:U("ellipsis",60028),kebabHorizontal:U("kebab-horizontal",60028),mailReply:U("mail-reply",60029),reply:U("reply",60029),organization:U("organization",60030),organizationFilled:U("organization-filled",60030),organizationOutline:U("organization-outline",60030),newFile:U("new-file",60031),fileAdd:U("file-add",60031),newFolder:U("new-folder",60032),fileDirectoryCreate:U("file-directory-create",60032),trash:U("trash",60033),trashcan:U("trashcan",60033),history:U("history",60034),clock:U("clock",60034),folder:U("folder",60035),fileDirectory:U("file-directory",60035),symbolFolder:U("symbol-folder",60035),logoGithub:U("logo-github",60036),markGithub:U("mark-github",60036),github:U("github",60036),terminal:U("terminal",60037),console:U("console",60037),repl:U("repl",60037),zap:U("zap",60038),symbolEvent:U("symbol-event",60038),error:U("error",60039),stop:U("stop",60039),variable:U("variable",60040),symbolVariable:U("symbol-variable",60040),array:U("array",60042),symbolArray:U("symbol-array",60042),symbolModule:U("symbol-module",60043),symbolPackage:U("symbol-package",60043),symbolNamespace:U("symbol-namespace",60043),symbolObject:U("symbol-object",60043),symbolMethod:U("symbol-method",60044),symbolFunction:U("symbol-function",60044),symbolConstructor:U("symbol-constructor",60044),symbolBoolean:U("symbol-boolean",60047),symbolNull:U("symbol-null",60047),symbolNumeric:U("symbol-numeric",60048),symbolNumber:U("symbol-number",60048),symbolStructure:U("symbol-structure",60049),symbolStruct:U("symbol-struct",60049),symbolParameter:U("symbol-parameter",60050),symbolTypeParameter:U("symbol-type-parameter",60050),symbolKey:U("symbol-key",60051),symbolText:U("symbol-text",60051),symbolReference:U("symbol-reference",60052),goToFile:U("go-to-file",60052),symbolEnum:U("symbol-enum",60053),symbolValue:U("symbol-value",60053),symbolRuler:U("symbol-ruler",60054),symbolUnit:U("symbol-unit",60054),activateBreakpoints:U("activate-breakpoints",60055),archive:U("archive",60056),arrowBoth:U("arrow-both",60057),arrowDown:U("arrow-down",60058),arrowLeft:U("arrow-left",60059),arrowRight:U("arrow-right",60060),arrowSmallDown:U("arrow-small-down",60061),arrowSmallLeft:U("arrow-small-left",60062),arrowSmallRight:U("arrow-small-right",60063),arrowSmallUp:U("arrow-small-up",60064),arrowUp:U("arrow-up",60065),bell:U("bell",60066),bold:U("bold",60067),book:U("book",60068),bookmark:U("bookmark",60069),debugBreakpointConditionalUnverified:U("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:U("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:U("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:U("debug-breakpoint-data-unverified",60072),debugBreakpointData:U("debug-breakpoint-data",60073),debugBreakpointDataDisabled:U("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:U("debug-breakpoint-log-unverified",60074),debugBreakpointLog:U("debug-breakpoint-log",60075),debugBreakpointLogDisabled:U("debug-breakpoint-log-disabled",60075),briefcase:U("briefcase",60076),broadcast:U("broadcast",60077),browser:U("browser",60078),bug:U("bug",60079),calendar:U("calendar",60080),caseSensitive:U("case-sensitive",60081),check:U("check",60082),checklist:U("checklist",60083),chevronDown:U("chevron-down",60084),dropDownButton:U("drop-down-button",60084),chevronLeft:U("chevron-left",60085),chevronRight:U("chevron-right",60086),chevronUp:U("chevron-up",60087),chromeClose:U("chrome-close",60088),chromeMaximize:U("chrome-maximize",60089),chromeMinimize:U("chrome-minimize",60090),chromeRestore:U("chrome-restore",60091),circle:U("circle",60092),circleOutline:U("circle-outline",60092),debugBreakpointUnverified:U("debug-breakpoint-unverified",60092),circleSlash:U("circle-slash",60093),circuitBoard:U("circuit-board",60094),clearAll:U("clear-all",60095),clippy:U("clippy",60096),closeAll:U("close-all",60097),cloudDownload:U("cloud-download",60098),cloudUpload:U("cloud-upload",60099),code:U("code",60100),collapseAll:U("collapse-all",60101),colorMode:U("color-mode",60102),commentDiscussion:U("comment-discussion",60103),compareChanges:U("compare-changes",60157),creditCard:U("credit-card",60105),dash:U("dash",60108),dashboard:U("dashboard",60109),database:U("database",60110),debugContinue:U("debug-continue",60111),debugDisconnect:U("debug-disconnect",60112),debugPause:U("debug-pause",60113),debugRestart:U("debug-restart",60114),debugStart:U("debug-start",60115),debugStepInto:U("debug-step-into",60116),debugStepOut:U("debug-step-out",60117),debugStepOver:U("debug-step-over",60118),debugStop:U("debug-stop",60119),debug:U("debug",60120),deviceCameraVideo:U("device-camera-video",60121),deviceCamera:U("device-camera",60122),deviceMobile:U("device-mobile",60123),diffAdded:U("diff-added",60124),diffIgnored:U("diff-ignored",60125),diffModified:U("diff-modified",60126),diffRemoved:U("diff-removed",60127),diffRenamed:U("diff-renamed",60128),diff:U("diff",60129),discard:U("discard",60130),editorLayout:U("editor-layout",60131),emptyWindow:U("empty-window",60132),exclude:U("exclude",60133),extensions:U("extensions",60134),eyeClosed:U("eye-closed",60135),fileBinary:U("file-binary",60136),fileCode:U("file-code",60137),fileMedia:U("file-media",60138),filePdf:U("file-pdf",60139),fileSubmodule:U("file-submodule",60140),fileSymlinkDirectory:U("file-symlink-directory",60141),fileSymlinkFile:U("file-symlink-file",60142),fileZip:U("file-zip",60143),files:U("files",60144),filter:U("filter",60145),flame:U("flame",60146),foldDown:U("fold-down",60147),foldUp:U("fold-up",60148),fold:U("fold",60149),folderActive:U("folder-active",60150),folderOpened:U("folder-opened",60151),gear:U("gear",60152),gift:U("gift",60153),gistSecret:U("gist-secret",60154),gist:U("gist",60155),gitCommit:U("git-commit",60156),gitCompare:U("git-compare",60157),gitMerge:U("git-merge",60158),githubAction:U("github-action",60159),githubAlt:U("github-alt",60160),globe:U("globe",60161),grabber:U("grabber",60162),graph:U("graph",60163),gripper:U("gripper",60164),heart:U("heart",60165),home:U("home",60166),horizontalRule:U("horizontal-rule",60167),hubot:U("hubot",60168),inbox:U("inbox",60169),issueClosed:U("issue-closed",60324),issueReopened:U("issue-reopened",60171),issues:U("issues",60172),italic:U("italic",60173),jersey:U("jersey",60174),json:U("json",60175),bracket:U("bracket",60175),kebabVertical:U("kebab-vertical",60176),key:U("key",60177),law:U("law",60178),lightbulbAutofix:U("lightbulb-autofix",60179),linkExternal:U("link-external",60180),link:U("link",60181),listOrdered:U("list-ordered",60182),listUnordered:U("list-unordered",60183),liveShare:U("live-share",60184),loading:U("loading",60185),location:U("location",60186),mailRead:U("mail-read",60187),mail:U("mail",60188),markdown:U("markdown",60189),megaphone:U("megaphone",60190),mention:U("mention",60191),milestone:U("milestone",60192),gitPullRequestMilestone:U("git-pull-request-milestone",60192),mortarBoard:U("mortar-board",60193),move:U("move",60194),multipleWindows:U("multiple-windows",60195),mute:U("mute",60196),noNewline:U("no-newline",60197),note:U("note",60198),octoface:U("octoface",60199),openPreview:U("open-preview",60200),package:U("package",60201),paintcan:U("paintcan",60202),pin:U("pin",60203),play:U("play",60204),run:U("run",60204),plug:U("plug",60205),preserveCase:U("preserve-case",60206),preview:U("preview",60207),project:U("project",60208),pulse:U("pulse",60209),question:U("question",60210),quote:U("quote",60211),radioTower:U("radio-tower",60212),reactions:U("reactions",60213),references:U("references",60214),refresh:U("refresh",60215),regex:U("regex",60216),remoteExplorer:U("remote-explorer",60217),remote:U("remote",60218),remove:U("remove",60219),replaceAll:U("replace-all",60220),replace:U("replace",60221),repoClone:U("repo-clone",60222),repoForcePush:U("repo-force-push",60223),repoPull:U("repo-pull",60224),repoPush:U("repo-push",60225),report:U("report",60226),requestChanges:U("request-changes",60227),rocket:U("rocket",60228),rootFolderOpened:U("root-folder-opened",60229),rootFolder:U("root-folder",60230),rss:U("rss",60231),ruby:U("ruby",60232),saveAll:U("save-all",60233),saveAs:U("save-as",60234),save:U("save",60235),screenFull:U("screen-full",60236),screenNormal:U("screen-normal",60237),searchStop:U("search-stop",60238),server:U("server",60240),settingsGear:U("settings-gear",60241),settings:U("settings",60242),shield:U("shield",60243),smiley:U("smiley",60244),sortPrecedence:U("sort-precedence",60245),splitHorizontal:U("split-horizontal",60246),splitVertical:U("split-vertical",60247),squirrel:U("squirrel",60248),starFull:U("star-full",60249),starHalf:U("star-half",60250),symbolClass:U("symbol-class",60251),symbolColor:U("symbol-color",60252),symbolCustomColor:U("symbol-customcolor",60252),symbolConstant:U("symbol-constant",60253),symbolEnumMember:U("symbol-enum-member",60254),symbolField:U("symbol-field",60255),symbolFile:U("symbol-file",60256),symbolInterface:U("symbol-interface",60257),symbolKeyword:U("symbol-keyword",60258),symbolMisc:U("symbol-misc",60259),symbolOperator:U("symbol-operator",60260),symbolProperty:U("symbol-property",60261),wrench:U("wrench",60261),wrenchSubaction:U("wrench-subaction",60261),symbolSnippet:U("symbol-snippet",60262),tasklist:U("tasklist",60263),telescope:U("telescope",60264),textSize:U("text-size",60265),threeBars:U("three-bars",60266),thumbsdown:U("thumbsdown",60267),thumbsup:U("thumbsup",60268),tools:U("tools",60269),triangleDown:U("triangle-down",60270),triangleLeft:U("triangle-left",60271),triangleRight:U("triangle-right",60272),triangleUp:U("triangle-up",60273),twitter:U("twitter",60274),unfold:U("unfold",60275),unlock:U("unlock",60276),unmute:U("unmute",60277),unverified:U("unverified",60278),verified:U("verified",60279),versions:U("versions",60280),vmActive:U("vm-active",60281),vmOutline:U("vm-outline",60282),vmRunning:U("vm-running",60283),watch:U("watch",60284),whitespace:U("whitespace",60285),wholeWord:U("whole-word",60286),window:U("window",60287),wordWrap:U("word-wrap",60288),zoomIn:U("zoom-in",60289),zoomOut:U("zoom-out",60290),listFilter:U("list-filter",60291),listFlat:U("list-flat",60292),listSelection:U("list-selection",60293),selection:U("selection",60293),listTree:U("list-tree",60294),debugBreakpointFunctionUnverified:U("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:U("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:U("debug-breakpoint-function-disabled",60296),debugStackframeActive:U("debug-stackframe-active",60297),circleSmallFilled:U("circle-small-filled",60298),debugStackframeDot:U("debug-stackframe-dot",60298),debugStackframe:U("debug-stackframe",60299),debugStackframeFocused:U("debug-stackframe-focused",60299),debugBreakpointUnsupported:U("debug-breakpoint-unsupported",60300),symbolString:U("symbol-string",60301),debugReverseContinue:U("debug-reverse-continue",60302),debugStepBack:U("debug-step-back",60303),debugRestartFrame:U("debug-restart-frame",60304),callIncoming:U("call-incoming",60306),callOutgoing:U("call-outgoing",60307),menu:U("menu",60308),expandAll:U("expand-all",60309),feedback:U("feedback",60310),gitPullRequestReviewer:U("git-pull-request-reviewer",60310),groupByRefType:U("group-by-ref-type",60311),ungroupByRefType:U("ungroup-by-ref-type",60312),account:U("account",60313),gitPullRequestAssignee:U("git-pull-request-assignee",60313),bellDot:U("bell-dot",60314),debugConsole:U("debug-console",60315),library:U("library",60316),output:U("output",60317),runAll:U("run-all",60318),syncIgnored:U("sync-ignored",60319),pinned:U("pinned",60320),githubInverted:U("github-inverted",60321),debugAlt:U("debug-alt",60305),serverProcess:U("server-process",60322),serverEnvironment:U("server-environment",60323),pass:U("pass",60324),stopCircle:U("stop-circle",60325),playCircle:U("play-circle",60326),record:U("record",60327),debugAltSmall:U("debug-alt-small",60328),vmConnect:U("vm-connect",60329),cloud:U("cloud",60330),merge:U("merge",60331),exportIcon:U("export",60332),graphLeft:U("graph-left",60333),magnet:U("magnet",60334),notebook:U("notebook",60335),redo:U("redo",60336),checkAll:U("check-all",60337),pinnedDirty:U("pinned-dirty",60338),passFilled:U("pass-filled",60339),circleLargeFilled:U("circle-large-filled",60340),circleLarge:U("circle-large",60341),circleLargeOutline:U("circle-large-outline",60341),combine:U("combine",60342),gather:U("gather",60342),table:U("table",60343),variableGroup:U("variable-group",60344),typeHierarchy:U("type-hierarchy",60345),typeHierarchySub:U("type-hierarchy-sub",60346),typeHierarchySuper:U("type-hierarchy-super",60347),gitPullRequestCreate:U("git-pull-request-create",60348),runAbove:U("run-above",60349),runBelow:U("run-below",60350),notebookTemplate:U("notebook-template",60351),debugRerun:U("debug-rerun",60352),workspaceTrusted:U("workspace-trusted",60353),workspaceUntrusted:U("workspace-untrusted",60354),workspaceUnspecified:U("workspace-unspecified",60355),terminalCmd:U("terminal-cmd",60356),terminalDebian:U("terminal-debian",60357),terminalLinux:U("terminal-linux",60358),terminalPowershell:U("terminal-powershell",60359),terminalTmux:U("terminal-tmux",60360),terminalUbuntu:U("terminal-ubuntu",60361),terminalBash:U("terminal-bash",60362),arrowSwap:U("arrow-swap",60363),copy:U("copy",60364),personAdd:U("person-add",60365),filterFilled:U("filter-filled",60366),wand:U("wand",60367),debugLineByLine:U("debug-line-by-line",60368),inspect:U("inspect",60369),layers:U("layers",60370),layersDot:U("layers-dot",60371),layersActive:U("layers-active",60372),compass:U("compass",60373),compassDot:U("compass-dot",60374),compassActive:U("compass-active",60375),azure:U("azure",60376),issueDraft:U("issue-draft",60377),gitPullRequestClosed:U("git-pull-request-closed",60378),gitPullRequestDraft:U("git-pull-request-draft",60379),debugAll:U("debug-all",60380),debugCoverage:U("debug-coverage",60381),runErrors:U("run-errors",60382),folderLibrary:U("folder-library",60383),debugContinueSmall:U("debug-continue-small",60384),beakerStop:U("beaker-stop",60385),graphLine:U("graph-line",60386),graphScatter:U("graph-scatter",60387),pieChart:U("pie-chart",60388),bracketDot:U("bracket-dot",60389),bracketError:U("bracket-error",60390),lockSmall:U("lock-small",60391),azureDevops:U("azure-devops",60392),verifiedFilled:U("verified-filled",60393),newLine:U("newline",60394),layout:U("layout",60395),layoutActivitybarLeft:U("layout-activitybar-left",60396),layoutActivitybarRight:U("layout-activitybar-right",60397),layoutPanelLeft:U("layout-panel-left",60398),layoutPanelCenter:U("layout-panel-center",60399),layoutPanelJustify:U("layout-panel-justify",60400),layoutPanelRight:U("layout-panel-right",60401),layoutPanel:U("layout-panel",60402),layoutSidebarLeft:U("layout-sidebar-left",60403),layoutSidebarRight:U("layout-sidebar-right",60404),layoutStatusbar:U("layout-statusbar",60405),layoutMenubar:U("layout-menubar",60406),layoutCentered:U("layout-centered",60407),layoutSidebarRightOff:U("layout-sidebar-right-off",60416),layoutPanelOff:U("layout-panel-off",60417),layoutSidebarLeftOff:U("layout-sidebar-left-off",60418),target:U("target",60408),indent:U("indent",60409),recordSmall:U("record-small",60410),errorSmall:U("error-small",60411),arrowCircleDown:U("arrow-circle-down",60412),arrowCircleLeft:U("arrow-circle-left",60413),arrowCircleRight:U("arrow-circle-right",60414),arrowCircleUp:U("arrow-circle-up",60415),heartFilled:U("heart-filled",60420),map:U("map",60421),mapFilled:U("map-filled",60422),circleSmall:U("circle-small",60423),bellSlash:U("bell-slash",60424),bellSlashDot:U("bell-slash-dot",60425),commentUnresolved:U("comment-unresolved",60426),gitPullRequestGoToChanges:U("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:U("git-pull-request-new-changes",60428),searchFuzzy:U("search-fuzzy",60429),commentDraft:U("comment-draft",60430),send:U("send",60431),sparkle:U("sparkle",60432),insert:U("insert",60433),mic:U("mic",60434),thumbsDownFilled:U("thumbsdown-filled",60435),thumbsUpFilled:U("thumbsup-filled",60436),coffee:U("coffee",60437),snake:U("snake",60438),game:U("game",60439),vr:U("vr",60440),chip:U("chip",60441),piano:U("piano",60442),music:U("music",60443),micFilled:U("mic-filled",60444),gitFetch:U("git-fetch",60445),copilot:U("copilot",60446),lightbulbSparkle:U("lightbulb-sparkle",60447),lightbulbSparkleAutofix:U("lightbulb-sparkle-autofix",60447),robot:U("robot",60448),sparkleFilled:U("sparkle-filled",60449),diffSingle:U("diff-single",60450),diffMultiple:U("diff-multiple",60451),surroundWith:U("surround-with",60452),gitStash:U("git-stash",60454),gitStashApply:U("git-stash-apply",60455),gitStashPop:U("git-stash-pop",60456),dialogError:U("dialog-error","error"),dialogWarning:U("dialog-warning","warning"),dialogInfo:U("dialog-info","info"),dialogClose:U("dialog-close","close"),treeItemExpanded:U("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:U("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:U("tree-filter-on-type-off","list-selection"),treeFilterClear:U("tree-filter-clear","close"),treeItemLoading:U("tree-item-loading","loading"),menuSelection:U("menu-selection","check"),menuSubmenu:U("menu-submenu","chevron-right"),menuBarMore:U("menubar-more","more"),scrollbarButtonLeft:U("scrollbar-button-left","triangle-left"),scrollbarButtonRight:U("scrollbar-button-right","triangle-right"),scrollbarButtonUp:U("scrollbar-button-up","triangle-up"),scrollbarButtonDown:U("scrollbar-button-down","triangle-down"),toolBarMore:U("toolbar-more","more"),quickInputBack:U("quick-input-back","arrow-left")}});var fW,Rue,Qje=P(()=>{Xt();nt();fW=class{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new ge,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),Yt(()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){var n;(n=this._factories.get(e))===null||n===void 0||n.dispose();let o=new Rue(this,e,t);return this._factories.set(e,o),Yt(()=>{let r=this._factories.get(e);!r||r!==o||(this._factories.delete(e),r.dispose())})}async getOrCreate(e){let t=this.get(e);if(t)return t;let n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;let n=this._factories.get(e);return!!(!n||n.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},Rue=class extends ue{get isResolved(){return this._isResolved}constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){let e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}});function Jje(i){return i&&li.isUri(i.uri)&&O.isIRange(i.range)&&(O.isIRange(i.originSelectionRange)||O.isIRange(i.targetSelectionRange))}function eqe(i,e){return g("symbolAriaLabel","{0} ({1})",i,CLt[e])}var am,A3,U0,c5,ip,NC,Of,d5,CLt,AC,ru,pW,fT,mW,Eo,Pr=P(()=>{Go();Io();Kt();Qje();Wt();am=class{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}},A3=class{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}},U0=class{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}};(function(i){let e=new Map;e.set(0,kt.symbolMethod),e.set(1,kt.symbolFunction),e.set(2,kt.symbolConstructor),e.set(3,kt.symbolField),e.set(4,kt.symbolVariable),e.set(5,kt.symbolClass),e.set(6,kt.symbolStruct),e.set(7,kt.symbolInterface),e.set(8,kt.symbolModule),e.set(9,kt.symbolProperty),e.set(10,kt.symbolEvent),e.set(11,kt.symbolOperator),e.set(12,kt.symbolUnit),e.set(13,kt.symbolValue),e.set(15,kt.symbolEnum),e.set(14,kt.symbolConstant),e.set(15,kt.symbolEnum),e.set(16,kt.symbolEnumMember),e.set(17,kt.symbolKeyword),e.set(27,kt.symbolSnippet),e.set(18,kt.symbolText),e.set(19,kt.symbolColor),e.set(20,kt.symbolFile),e.set(21,kt.symbolReference),e.set(22,kt.symbolCustomColor),e.set(23,kt.symbolFolder),e.set(24,kt.symbolTypeParameter),e.set(25,kt.account),e.set(26,kt.issues);function t(r){let s=e.get(r);return s||(console.info("No codicon found for CompletionItemKind "+r),s=kt.symbolProperty),s}i.toIcon=t;let n=new Map;n.set("method",0),n.set("function",1),n.set("constructor",2),n.set("field",3),n.set("variable",4),n.set("class",5),n.set("struct",6),n.set("interface",7),n.set("module",8),n.set("property",9),n.set("event",10),n.set("operator",11),n.set("unit",12),n.set("value",13),n.set("constant",14),n.set("enum",15),n.set("enum-member",16),n.set("enumMember",16),n.set("keyword",17),n.set("snippet",27),n.set("text",18),n.set("color",19),n.set("file",20),n.set("reference",21),n.set("customcolor",22),n.set("folder",23),n.set("type-parameter",24),n.set("typeParameter",24),n.set("account",25),n.set("issue",26);function o(r,s){let a=n.get(r);return typeof a>"u"&&!s&&(a=9),a}i.fromString=o})(c5||(c5={}));(function(i){i[i.Automatic=0]="Automatic",i[i.Explicit=1]="Explicit"})(ip||(ip={}));NC=class{constructor(e,t,n,o){this.range=e,this.text=t,this.completionKind=n,this.isSnippetText=o}equals(e){return O.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}};(function(i){i[i.Invoke=1]="Invoke",i[i.TriggerCharacter=2]="TriggerCharacter",i[i.ContentChange=3]="ContentChange"})(Of||(Of={}));(function(i){i[i.Text=0]="Text",i[i.Read=1]="Read",i[i.Write=2]="Write"})(d5||(d5={}));CLt={17:g("Array","array"),16:g("Boolean","boolean"),4:g("Class","class"),13:g("Constant","constant"),8:g("Constructor","constructor"),9:g("Enum","enumeration"),21:g("EnumMember","enumeration member"),23:g("Event","event"),7:g("Field","field"),0:g("File","file"),11:g("Function","function"),10:g("Interface","interface"),19:g("Key","key"),5:g("Method","method"),1:g("Module","module"),2:g("Namespace","namespace"),20:g("Null","null"),15:g("Number","number"),18:g("Object","object"),24:g("Operator","operator"),3:g("Package","package"),6:g("Property","property"),14:g("String","string"),22:g("Struct","struct"),25:g("TypeParameter","type parameter"),12:g("Variable","variable")};(function(i){let e=new Map;e.set(0,kt.symbolFile),e.set(1,kt.symbolModule),e.set(2,kt.symbolNamespace),e.set(3,kt.symbolPackage),e.set(4,kt.symbolClass),e.set(5,kt.symbolMethod),e.set(6,kt.symbolProperty),e.set(7,kt.symbolField),e.set(8,kt.symbolConstructor),e.set(9,kt.symbolEnum),e.set(10,kt.symbolInterface),e.set(11,kt.symbolFunction),e.set(12,kt.symbolVariable),e.set(13,kt.symbolConstant),e.set(14,kt.symbolString),e.set(15,kt.symbolNumber),e.set(16,kt.symbolBoolean),e.set(17,kt.symbolArray),e.set(18,kt.symbolObject),e.set(19,kt.symbolKey),e.set(20,kt.symbolNull),e.set(21,kt.symbolEnumMember),e.set(22,kt.symbolStruct),e.set(23,kt.symbolEvent),e.set(24,kt.symbolOperator),e.set(25,kt.symbolTypeParameter);function t(n){let o=e.get(n);return o||(console.info("No codicon found for SymbolKind "+n),o=kt.symbolProperty),o}i.toIcon=t})(AC||(AC={}));ru=class i{static fromValue(e){switch(e){case"comment":return i.Comment;case"imports":return i.Imports;case"region":return i.Region}return new i(e)}constructor(e){this.value=e}};ru.Comment=new ru("comment");ru.Imports=new ru("imports");ru.Region=new ru("region");(function(i){function e(t){return!t||typeof t!="object"?!1:typeof t.id=="string"&&typeof t.title=="string"}i.is=e})(pW||(pW={}));(function(i){i[i.Type=1]="Type",i[i.Parameter=2]="Parameter"})(fT||(fT={}));mW=class{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(e=>{e&&e.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}},Eo=new fW});var gW,vW,_W,bW,yW,CW,wW,xW,SW,kW,LW,EW,DW,TW,IW,MW,NW,AW,RW,PW,OW,zW,FW,HW,BW,VW,WW,UW,$W,jW,qW,GW,KW,YW,ZW,XW,QW,JW,eU,tU,iU=P(()=>{(function(i){i[i.Unknown=0]="Unknown",i[i.Disabled=1]="Disabled",i[i.Enabled=2]="Enabled"})(gW||(gW={}));(function(i){i[i.Invoke=1]="Invoke",i[i.Auto=2]="Auto"})(vW||(vW={}));(function(i){i[i.None=0]="None",i[i.KeepWhitespace=1]="KeepWhitespace",i[i.InsertAsSnippet=4]="InsertAsSnippet"})(_W||(_W={}));(function(i){i[i.Method=0]="Method",i[i.Function=1]="Function",i[i.Constructor=2]="Constructor",i[i.Field=3]="Field",i[i.Variable=4]="Variable",i[i.Class=5]="Class",i[i.Struct=6]="Struct",i[i.Interface=7]="Interface",i[i.Module=8]="Module",i[i.Property=9]="Property",i[i.Event=10]="Event",i[i.Operator=11]="Operator",i[i.Unit=12]="Unit",i[i.Value=13]="Value",i[i.Constant=14]="Constant",i[i.Enum=15]="Enum",i[i.EnumMember=16]="EnumMember",i[i.Keyword=17]="Keyword",i[i.Text=18]="Text",i[i.Color=19]="Color",i[i.File=20]="File",i[i.Reference=21]="Reference",i[i.Customcolor=22]="Customcolor",i[i.Folder=23]="Folder",i[i.TypeParameter=24]="TypeParameter",i[i.User=25]="User",i[i.Issue=26]="Issue",i[i.Snippet=27]="Snippet"})(bW||(bW={}));(function(i){i[i.Deprecated=1]="Deprecated"})(yW||(yW={}));(function(i){i[i.Invoke=0]="Invoke",i[i.TriggerCharacter=1]="TriggerCharacter",i[i.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(CW||(CW={}));(function(i){i[i.EXACT=0]="EXACT",i[i.ABOVE=1]="ABOVE",i[i.BELOW=2]="BELOW"})(wW||(wW={}));(function(i){i[i.NotSet=0]="NotSet",i[i.ContentFlush=1]="ContentFlush",i[i.RecoverFromMarkers=2]="RecoverFromMarkers",i[i.Explicit=3]="Explicit",i[i.Paste=4]="Paste",i[i.Undo=5]="Undo",i[i.Redo=6]="Redo"})(xW||(xW={}));(function(i){i[i.LF=1]="LF",i[i.CRLF=2]="CRLF"})(SW||(SW={}));(function(i){i[i.Text=0]="Text",i[i.Read=1]="Read",i[i.Write=2]="Write"})(kW||(kW={}));(function(i){i[i.None=0]="None",i[i.Keep=1]="Keep",i[i.Brackets=2]="Brackets",i[i.Advanced=3]="Advanced",i[i.Full=4]="Full"})(LW||(LW={}));(function(i){i[i.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",i[i.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",i[i.accessibilitySupport=2]="accessibilitySupport",i[i.accessibilityPageSize=3]="accessibilityPageSize",i[i.ariaLabel=4]="ariaLabel",i[i.ariaRequired=5]="ariaRequired",i[i.autoClosingBrackets=6]="autoClosingBrackets",i[i.autoClosingComments=7]="autoClosingComments",i[i.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",i[i.autoClosingDelete=9]="autoClosingDelete",i[i.autoClosingOvertype=10]="autoClosingOvertype",i[i.autoClosingQuotes=11]="autoClosingQuotes",i[i.autoIndent=12]="autoIndent",i[i.automaticLayout=13]="automaticLayout",i[i.autoSurround=14]="autoSurround",i[i.bracketPairColorization=15]="bracketPairColorization",i[i.guides=16]="guides",i[i.codeLens=17]="codeLens",i[i.codeLensFontFamily=18]="codeLensFontFamily",i[i.codeLensFontSize=19]="codeLensFontSize",i[i.colorDecorators=20]="colorDecorators",i[i.colorDecoratorsLimit=21]="colorDecoratorsLimit",i[i.columnSelection=22]="columnSelection",i[i.comments=23]="comments",i[i.contextmenu=24]="contextmenu",i[i.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",i[i.cursorBlinking=26]="cursorBlinking",i[i.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",i[i.cursorStyle=28]="cursorStyle",i[i.cursorSurroundingLines=29]="cursorSurroundingLines",i[i.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",i[i.cursorWidth=31]="cursorWidth",i[i.disableLayerHinting=32]="disableLayerHinting",i[i.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",i[i.domReadOnly=34]="domReadOnly",i[i.dragAndDrop=35]="dragAndDrop",i[i.dropIntoEditor=36]="dropIntoEditor",i[i.emptySelectionClipboard=37]="emptySelectionClipboard",i[i.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",i[i.extraEditorClassName=39]="extraEditorClassName",i[i.fastScrollSensitivity=40]="fastScrollSensitivity",i[i.find=41]="find",i[i.fixedOverflowWidgets=42]="fixedOverflowWidgets",i[i.folding=43]="folding",i[i.foldingStrategy=44]="foldingStrategy",i[i.foldingHighlight=45]="foldingHighlight",i[i.foldingImportsByDefault=46]="foldingImportsByDefault",i[i.foldingMaximumRegions=47]="foldingMaximumRegions",i[i.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",i[i.fontFamily=49]="fontFamily",i[i.fontInfo=50]="fontInfo",i[i.fontLigatures=51]="fontLigatures",i[i.fontSize=52]="fontSize",i[i.fontWeight=53]="fontWeight",i[i.fontVariations=54]="fontVariations",i[i.formatOnPaste=55]="formatOnPaste",i[i.formatOnType=56]="formatOnType",i[i.glyphMargin=57]="glyphMargin",i[i.gotoLocation=58]="gotoLocation",i[i.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",i[i.hover=60]="hover",i[i.inDiffEditor=61]="inDiffEditor",i[i.inlineSuggest=62]="inlineSuggest",i[i.letterSpacing=63]="letterSpacing",i[i.lightbulb=64]="lightbulb",i[i.lineDecorationsWidth=65]="lineDecorationsWidth",i[i.lineHeight=66]="lineHeight",i[i.lineNumbers=67]="lineNumbers",i[i.lineNumbersMinChars=68]="lineNumbersMinChars",i[i.linkedEditing=69]="linkedEditing",i[i.links=70]="links",i[i.matchBrackets=71]="matchBrackets",i[i.minimap=72]="minimap",i[i.mouseStyle=73]="mouseStyle",i[i.mouseWheelScrollSensitivity=74]="mouseWheelScrollSensitivity",i[i.mouseWheelZoom=75]="mouseWheelZoom",i[i.multiCursorMergeOverlapping=76]="multiCursorMergeOverlapping",i[i.multiCursorModifier=77]="multiCursorModifier",i[i.multiCursorPaste=78]="multiCursorPaste",i[i.multiCursorLimit=79]="multiCursorLimit",i[i.occurrencesHighlight=80]="occurrencesHighlight",i[i.overviewRulerBorder=81]="overviewRulerBorder",i[i.overviewRulerLanes=82]="overviewRulerLanes",i[i.padding=83]="padding",i[i.pasteAs=84]="pasteAs",i[i.parameterHints=85]="parameterHints",i[i.peekWidgetDefaultFocus=86]="peekWidgetDefaultFocus",i[i.definitionLinkOpensInPeek=87]="definitionLinkOpensInPeek",i[i.quickSuggestions=88]="quickSuggestions",i[i.quickSuggestionsDelay=89]="quickSuggestionsDelay",i[i.readOnly=90]="readOnly",i[i.readOnlyMessage=91]="readOnlyMessage",i[i.renameOnType=92]="renameOnType",i[i.renderControlCharacters=93]="renderControlCharacters",i[i.renderFinalNewline=94]="renderFinalNewline",i[i.renderLineHighlight=95]="renderLineHighlight",i[i.renderLineHighlightOnlyWhenFocus=96]="renderLineHighlightOnlyWhenFocus",i[i.renderValidationDecorations=97]="renderValidationDecorations",i[i.renderWhitespace=98]="renderWhitespace",i[i.revealHorizontalRightPadding=99]="revealHorizontalRightPadding",i[i.roundedSelection=100]="roundedSelection",i[i.rulers=101]="rulers",i[i.scrollbar=102]="scrollbar",i[i.scrollBeyondLastColumn=103]="scrollBeyondLastColumn",i[i.scrollBeyondLastLine=104]="scrollBeyondLastLine",i[i.scrollPredominantAxis=105]="scrollPredominantAxis",i[i.selectionClipboard=106]="selectionClipboard",i[i.selectionHighlight=107]="selectionHighlight",i[i.selectOnLineNumbers=108]="selectOnLineNumbers",i[i.showFoldingControls=109]="showFoldingControls",i[i.showUnused=110]="showUnused",i[i.snippetSuggestions=111]="snippetSuggestions",i[i.smartSelect=112]="smartSelect",i[i.smoothScrolling=113]="smoothScrolling",i[i.stickyScroll=114]="stickyScroll",i[i.stickyTabStops=115]="stickyTabStops",i[i.stopRenderingLineAfter=116]="stopRenderingLineAfter",i[i.suggest=117]="suggest",i[i.suggestFontSize=118]="suggestFontSize",i[i.suggestLineHeight=119]="suggestLineHeight",i[i.suggestOnTriggerCharacters=120]="suggestOnTriggerCharacters",i[i.suggestSelection=121]="suggestSelection",i[i.tabCompletion=122]="tabCompletion",i[i.tabIndex=123]="tabIndex",i[i.unicodeHighlighting=124]="unicodeHighlighting",i[i.unusualLineTerminators=125]="unusualLineTerminators",i[i.useShadowDOM=126]="useShadowDOM",i[i.useTabStops=127]="useTabStops",i[i.wordBreak=128]="wordBreak",i[i.wordSeparators=129]="wordSeparators",i[i.wordWrap=130]="wordWrap",i[i.wordWrapBreakAfterCharacters=131]="wordWrapBreakAfterCharacters",i[i.wordWrapBreakBeforeCharacters=132]="wordWrapBreakBeforeCharacters",i[i.wordWrapColumn=133]="wordWrapColumn",i[i.wordWrapOverride1=134]="wordWrapOverride1",i[i.wordWrapOverride2=135]="wordWrapOverride2",i[i.wrappingIndent=136]="wrappingIndent",i[i.wrappingStrategy=137]="wrappingStrategy",i[i.showDeprecated=138]="showDeprecated",i[i.inlayHints=139]="inlayHints",i[i.editorClassName=140]="editorClassName",i[i.pixelRatio=141]="pixelRatio",i[i.tabFocusMode=142]="tabFocusMode",i[i.layoutInfo=143]="layoutInfo",i[i.wrappingInfo=144]="wrappingInfo",i[i.defaultColorDecorators=145]="defaultColorDecorators",i[i.colorDecoratorsActivatedOn=146]="colorDecoratorsActivatedOn",i[i.inlineCompletionsAccessibilityVerbose=147]="inlineCompletionsAccessibilityVerbose"})(EW||(EW={}));(function(i){i[i.TextDefined=0]="TextDefined",i[i.LF=1]="LF",i[i.CRLF=2]="CRLF"})(DW||(DW={}));(function(i){i[i.LF=0]="LF",i[i.CRLF=1]="CRLF"})(TW||(TW={}));(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=3]="Right"})(IW||(IW={}));(function(i){i[i.None=0]="None",i[i.Indent=1]="Indent",i[i.IndentOutdent=2]="IndentOutdent",i[i.Outdent=3]="Outdent"})(MW||(MW={}));(function(i){i[i.Both=0]="Both",i[i.Right=1]="Right",i[i.Left=2]="Left",i[i.None=3]="None"})(NW||(NW={}));(function(i){i[i.Type=1]="Type",i[i.Parameter=2]="Parameter"})(AW||(AW={}));(function(i){i[i.Automatic=0]="Automatic",i[i.Explicit=1]="Explicit"})(RW||(RW={}));(function(i){i[i.DependsOnKbLayout=-1]="DependsOnKbLayout",i[i.Unknown=0]="Unknown",i[i.Backspace=1]="Backspace",i[i.Tab=2]="Tab",i[i.Enter=3]="Enter",i[i.Shift=4]="Shift",i[i.Ctrl=5]="Ctrl",i[i.Alt=6]="Alt",i[i.PauseBreak=7]="PauseBreak",i[i.CapsLock=8]="CapsLock",i[i.Escape=9]="Escape",i[i.Space=10]="Space",i[i.PageUp=11]="PageUp",i[i.PageDown=12]="PageDown",i[i.End=13]="End",i[i.Home=14]="Home",i[i.LeftArrow=15]="LeftArrow",i[i.UpArrow=16]="UpArrow",i[i.RightArrow=17]="RightArrow",i[i.DownArrow=18]="DownArrow",i[i.Insert=19]="Insert",i[i.Delete=20]="Delete",i[i.Digit0=21]="Digit0",i[i.Digit1=22]="Digit1",i[i.Digit2=23]="Digit2",i[i.Digit3=24]="Digit3",i[i.Digit4=25]="Digit4",i[i.Digit5=26]="Digit5",i[i.Digit6=27]="Digit6",i[i.Digit7=28]="Digit7",i[i.Digit8=29]="Digit8",i[i.Digit9=30]="Digit9",i[i.KeyA=31]="KeyA",i[i.KeyB=32]="KeyB",i[i.KeyC=33]="KeyC",i[i.KeyD=34]="KeyD",i[i.KeyE=35]="KeyE",i[i.KeyF=36]="KeyF",i[i.KeyG=37]="KeyG",i[i.KeyH=38]="KeyH",i[i.KeyI=39]="KeyI",i[i.KeyJ=40]="KeyJ",i[i.KeyK=41]="KeyK",i[i.KeyL=42]="KeyL",i[i.KeyM=43]="KeyM",i[i.KeyN=44]="KeyN",i[i.KeyO=45]="KeyO",i[i.KeyP=46]="KeyP",i[i.KeyQ=47]="KeyQ",i[i.KeyR=48]="KeyR",i[i.KeyS=49]="KeyS",i[i.KeyT=50]="KeyT",i[i.KeyU=51]="KeyU",i[i.KeyV=52]="KeyV",i[i.KeyW=53]="KeyW",i[i.KeyX=54]="KeyX",i[i.KeyY=55]="KeyY",i[i.KeyZ=56]="KeyZ",i[i.Meta=57]="Meta",i[i.ContextMenu=58]="ContextMenu",i[i.F1=59]="F1",i[i.F2=60]="F2",i[i.F3=61]="F3",i[i.F4=62]="F4",i[i.F5=63]="F5",i[i.F6=64]="F6",i[i.F7=65]="F7",i[i.F8=66]="F8",i[i.F9=67]="F9",i[i.F10=68]="F10",i[i.F11=69]="F11",i[i.F12=70]="F12",i[i.F13=71]="F13",i[i.F14=72]="F14",i[i.F15=73]="F15",i[i.F16=74]="F16",i[i.F17=75]="F17",i[i.F18=76]="F18",i[i.F19=77]="F19",i[i.F20=78]="F20",i[i.F21=79]="F21",i[i.F22=80]="F22",i[i.F23=81]="F23",i[i.F24=82]="F24",i[i.NumLock=83]="NumLock",i[i.ScrollLock=84]="ScrollLock",i[i.Semicolon=85]="Semicolon",i[i.Equal=86]="Equal",i[i.Comma=87]="Comma",i[i.Minus=88]="Minus",i[i.Period=89]="Period",i[i.Slash=90]="Slash",i[i.Backquote=91]="Backquote",i[i.BracketLeft=92]="BracketLeft",i[i.Backslash=93]="Backslash",i[i.BracketRight=94]="BracketRight",i[i.Quote=95]="Quote",i[i.OEM_8=96]="OEM_8",i[i.IntlBackslash=97]="IntlBackslash",i[i.Numpad0=98]="Numpad0",i[i.Numpad1=99]="Numpad1",i[i.Numpad2=100]="Numpad2",i[i.Numpad3=101]="Numpad3",i[i.Numpad4=102]="Numpad4",i[i.Numpad5=103]="Numpad5",i[i.Numpad6=104]="Numpad6",i[i.Numpad7=105]="Numpad7",i[i.Numpad8=106]="Numpad8",i[i.Numpad9=107]="Numpad9",i[i.NumpadMultiply=108]="NumpadMultiply",i[i.NumpadAdd=109]="NumpadAdd",i[i.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",i[i.NumpadSubtract=111]="NumpadSubtract",i[i.NumpadDecimal=112]="NumpadDecimal",i[i.NumpadDivide=113]="NumpadDivide",i[i.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",i[i.ABNT_C1=115]="ABNT_C1",i[i.ABNT_C2=116]="ABNT_C2",i[i.AudioVolumeMute=117]="AudioVolumeMute",i[i.AudioVolumeUp=118]="AudioVolumeUp",i[i.AudioVolumeDown=119]="AudioVolumeDown",i[i.BrowserSearch=120]="BrowserSearch",i[i.BrowserHome=121]="BrowserHome",i[i.BrowserBack=122]="BrowserBack",i[i.BrowserForward=123]="BrowserForward",i[i.MediaTrackNext=124]="MediaTrackNext",i[i.MediaTrackPrevious=125]="MediaTrackPrevious",i[i.MediaStop=126]="MediaStop",i[i.MediaPlayPause=127]="MediaPlayPause",i[i.LaunchMediaPlayer=128]="LaunchMediaPlayer",i[i.LaunchMail=129]="LaunchMail",i[i.LaunchApp2=130]="LaunchApp2",i[i.Clear=131]="Clear",i[i.MAX_VALUE=132]="MAX_VALUE"})(PW||(PW={}));(function(i){i[i.Hint=1]="Hint",i[i.Info=2]="Info",i[i.Warning=4]="Warning",i[i.Error=8]="Error"})(OW||(OW={}));(function(i){i[i.Unnecessary=1]="Unnecessary",i[i.Deprecated=2]="Deprecated"})(zW||(zW={}));(function(i){i[i.Inline=1]="Inline",i[i.Gutter=2]="Gutter"})(FW||(FW={}));(function(i){i[i.UNKNOWN=0]="UNKNOWN",i[i.TEXTAREA=1]="TEXTAREA",i[i.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",i[i.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",i[i.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",i[i.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",i[i.CONTENT_TEXT=6]="CONTENT_TEXT",i[i.CONTENT_EMPTY=7]="CONTENT_EMPTY",i[i.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",i[i.CONTENT_WIDGET=9]="CONTENT_WIDGET",i[i.OVERVIEW_RULER=10]="OVERVIEW_RULER",i[i.SCROLLBAR=11]="SCROLLBAR",i[i.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",i[i.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(HW||(HW={}));(function(i){i[i.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",i[i.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",i[i.TOP_CENTER=2]="TOP_CENTER"})(BW||(BW={}));(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=4]="Right",i[i.Full=7]="Full"})(VW||(VW={}));(function(i){i[i.Left=0]="Left",i[i.Right=1]="Right",i[i.None=2]="None",i[i.LeftOfInjectedText=3]="LeftOfInjectedText",i[i.RightOfInjectedText=4]="RightOfInjectedText"})(WW||(WW={}));(function(i){i[i.Off=0]="Off",i[i.On=1]="On",i[i.Relative=2]="Relative",i[i.Interval=3]="Interval",i[i.Custom=4]="Custom"})(UW||(UW={}));(function(i){i[i.None=0]="None",i[i.Text=1]="Text",i[i.Blocks=2]="Blocks"})($W||($W={}));(function(i){i[i.Smooth=0]="Smooth",i[i.Immediate=1]="Immediate"})(jW||(jW={}));(function(i){i[i.Auto=1]="Auto",i[i.Hidden=2]="Hidden",i[i.Visible=3]="Visible"})(qW||(qW={}));(function(i){i[i.LTR=0]="LTR",i[i.RTL=1]="RTL"})(GW||(GW={}));(function(i){i.Off="off",i.OnCode="onCode",i.On="on"})(KW||(KW={}));(function(i){i[i.Invoke=1]="Invoke",i[i.TriggerCharacter=2]="TriggerCharacter",i[i.ContentChange=3]="ContentChange"})(YW||(YW={}));(function(i){i[i.File=0]="File",i[i.Module=1]="Module",i[i.Namespace=2]="Namespace",i[i.Package=3]="Package",i[i.Class=4]="Class",i[i.Method=5]="Method",i[i.Property=6]="Property",i[i.Field=7]="Field",i[i.Constructor=8]="Constructor",i[i.Enum=9]="Enum",i[i.Interface=10]="Interface",i[i.Function=11]="Function",i[i.Variable=12]="Variable",i[i.Constant=13]="Constant",i[i.String=14]="String",i[i.Number=15]="Number",i[i.Boolean=16]="Boolean",i[i.Array=17]="Array",i[i.Object=18]="Object",i[i.Key=19]="Key",i[i.Null=20]="Null",i[i.EnumMember=21]="EnumMember",i[i.Struct=22]="Struct",i[i.Event=23]="Event",i[i.Operator=24]="Operator",i[i.TypeParameter=25]="TypeParameter"})(ZW||(ZW={}));(function(i){i[i.Deprecated=1]="Deprecated"})(XW||(XW={}));(function(i){i[i.Hidden=0]="Hidden",i[i.Blink=1]="Blink",i[i.Smooth=2]="Smooth",i[i.Phase=3]="Phase",i[i.Expand=4]="Expand",i[i.Solid=5]="Solid"})(QW||(QW={}));(function(i){i[i.Line=1]="Line",i[i.Block=2]="Block",i[i.Underline=3]="Underline",i[i.LineThin=4]="LineThin",i[i.BlockOutline=5]="BlockOutline",i[i.UnderlineThin=6]="UnderlineThin"})(JW||(JW={}));(function(i){i[i.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",i[i.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",i[i.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",i[i.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(eU||(eU={}));(function(i){i[i.None=0]="None",i[i.Same=1]="Same",i[i.Indent=2]="Indent",i[i.DeepIndent=3]="DeepIndent"})(tU||(tU={}))});function nU(){return{editor:void 0,languages:void 0,CancellationTokenSource:Jn,Emitter:ge,KeyCode:PW,KeyMod:h5,Position:ke,Range:O,Selection:jt,SelectionDirection:GW,MarkerSeverity:OW,MarkerTag:zW,Uri:li,Token:am}}var h5,Oue=P(()=>{mo();Xt();Bh();Io();Mi();Kt();zo();Pr();iU();h5=class{static chord(e,t){return fr(e,t)}};h5.CtrlCmd=2048;h5.Shift=1024;h5.Alt=512;h5.WinCtrl=256});function tqe(i,e){let t=i;typeof t.vscodeWindowId!="number"&&Object.defineProperty(t,"vscodeWindowId",{get:()=>e})}var Hn,$0,_l=P(()=>{Hn=window,$0=Hn});var oU,pT,zue=P(()=>{oU=class{constructor(e){this.fn=e,this.lastCache=void 0,this.lastArgKey=void 0}get(e){let t=JSON.stringify(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this.fn(e)),this.lastCache}},pT=class{get cachedValues(){return this._map}constructor(e){this.fn=e,this._map=new Map}get(e){if(this._map.has(e))return this._map.get(e);let t=this.fn(e);return this._map.set(e,t),t}}});var bl,j0=P(()=>{bl=class{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}});function rU(i){return!i||typeof i!="string"?!0:i.trim().length===0}function zf(i,...e){return e.length===0?i:i.replace(wLt,function(t,n){let o=parseInt(n,10);return isNaN(o)||o<0||o>=e.length?t:e[o]})}function nqe(i){return i.replace(/[<>"'&]/g,e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e})}function p5(i){return i.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function va(i){return i.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function oqe(i,e=" "){let t=q0(i,e);return Hue(t,e)}function q0(i,e){if(!i||!e)return i;let t=e.length;if(t===0||i.length===0)return i;let n=0;for(;i.indexOf(e,n)===n;)n=n+t;return i.substring(n)}function Hue(i,e){if(!i||!e)return i;let t=e.length,n=i.length;if(t===0||n===0)return i;let o=n,r=-1;for(;r=i.lastIndexOf(e,o-1),!(r===-1||r+t!==o);){if(r===0)return"";o=r}return i.substring(0,o)}function rqe(i){return i.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function sqe(i){return i.replace(/\*/g,"")}function sU(i,e,t={}){if(!i)throw new Error("Cannot create regex from empty string");e||(i=va(i)),t.wholeWord&&(/\B/.test(i.charAt(0))||(i="\\b"+i),/\B/.test(i.charAt(i.length-1))||(i=i+"\\b"));let n="";return t.global&&(n+="g"),t.matchCase||(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),new RegExp(i,n)}function aqe(i){return i.source==="^"||i.source==="^$"||i.source==="$"||i.source==="^\\s*$"?!1:!!(i.exec("")&&i.lastIndex===0)}function Ec(i){return i.split(/\r\n|\r|\n/)}function qr(i){for(let e=0,t=i.length;e=0;t--){let n=i.charCodeAt(t);if(n!==32&&n!==9)return t}return-1}function R3(i,e){return ie?1:0}function aU(i,e,t=0,n=i.length,o=0,r=e.length){for(;tc)return 1}let s=n-t,a=r-o;return sa?1:0}function vT(i,e){return PC(i,e,0,i.length,0,e.length)}function PC(i,e,t=0,n=i.length,o=0,r=e.length){for(;t=128||c>=128)return aU(i.toLowerCase(),e.toLowerCase(),t,n,o,r);Tg(l)&&(l-=32),Tg(c)&&(c-=32);let d=l-c;if(d!==0)return d}let s=n-t,a=r-o;return sa?1:0}function _T(i){return i>=48&&i<=57}function Tg(i){return i>=97&&i<=122}function Ff(i){return i>=65&&i<=90}function G0(i,e){return i.length===e.length&&PC(i,e)===0}function OC(i,e){let t=e.length;return e.length>i.length?!1:PC(i,e,0,t)===0}function Hf(i,e){let t=Math.min(i.length,e.length),n;for(n=0;n1){let n=i.charCodeAt(e-2);if(Or(n))return lU(n,t)}return t}function bT(i,e){return new f5(i,e).nextGraphemeLength()}function Bue(i,e){return new f5(i,e).prevGraphemeLength()}function lqe(i,e){e>0&&Ng(i.charCodeAt(e))&&e--;let t=e+bT(i,e);return[t-Bue(i,t),t]}function SLt(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function lm(i){return Fue||(Fue=SLt()),Fue.test(i)}function Ag(i){return kLt.test(i)}function cU(i){return Vue.test(i)}function Bf(i){return i>=11904&&i<=55215||i>=63744&&i<=64255||i>=65281&&i<=65374}function yT(i){return i>=127462&&i<=127487||i===8986||i===8987||i===9200||i===9203||i>=9728&&i<=10175||i===11088||i===11093||i>=127744&&i<=128591||i>=128640&&i<=128764||i>=128992&&i<=129008||i>=129280&&i<=129535||i>=129648&&i<=129782}function FC(i){return!!(i&&i.length>0&&i.charCodeAt(0)===65279)}function dqe(i,e=!1){return i?(e&&(i=i.replace(/\\./g,"")),i.toLowerCase()!==i):!1}function dU(i){return i=i%(2*26),i<26?String.fromCharCode(97+i):String.fromCharCode(65+i-26)}function iqe(i,e){return i===0?e!==5&&e!==7:i===2&&e===3?!1:i===4||i===2||i===3||e===4||e===2||e===3?!0:!(i===8&&(e===8||e===9||e===11||e===12)||(i===11||i===9)&&(e===9||e===10)||(i===12||i===10)&&e===10||e===5||e===13||e===7||i===1||i===13&&e===14||i===6&&e===6)}function LLt(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function uqe(i,e){if(i===0)return 0;let t=ELt(i,e);if(t!==void 0)return t;let n=new mT(e,i);return n.prevCodePoint(),n.offset}function ELt(i,e){let t=new mT(e,i),n=t.prevCodePoint();for(;DLt(n)||n===65039||n===8419;){if(t.offset===0)return;n=t.prevCodePoint()}if(!yT(n))return;let o=t.offset;return o>0&&t.prevCodePoint()===8205&&(o=t.offset),o}function DLt(i){return 127995<=i&&i<=127999}var RC,wLt,mT,f5,Fue,kLt,Vue,cqe,gT,uU,Ig,Mg,Ri=P(()=>{zue();j0();wLt=/{(\d+)}/g;mT=class{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){let e=xLt(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){let e=zC(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}},f5=class{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new mT(e,t)}nextGraphemeLength(){let e=gT.getInstance(),t=this._iterator,n=t.offset,o=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){let r=t.offset,s=e.getGraphemeBreakType(t.nextCodePoint());if(iqe(o,s)){t.setOffset(r);break}o=s}return t.offset-n}prevGraphemeLength(){let e=gT.getInstance(),t=this._iterator,n=t.offset,o=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){let r=t.offset,s=e.getGraphemeBreakType(t.prevCodePoint());if(iqe(s,o)){t.setOffset(r);break}o=s}return n-t.offset}eol(){return this._iterator.eol()}};kLt=/^[\t\n\r\x20-\x7E]*$/;Vue=/[\u2028\u2029]/;cqe="\uFEFF";gT=class i{static getInstance(){return i._INSTANCE||(i._INSTANCE=new i),i._INSTANCE}constructor(){this._data=LLt()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;let t=this._data,n=t.length/3,o=1;for(;o<=n;)if(et[3*o+1])o=2*o+1;else return t[3*o+2];return 0}};gT._INSTANCE=null;uU="\xA0",Ig=class{static getInstance(e){return RC.cache.get(Array.from(e))}static getLocales(){return RC._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}};RC=Ig;Ig.ambiguousCharacterData=new bl(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'));Ig.cache=new oU(i=>{function e(c){let d=new Map;for(let u=0;u!c.startsWith("_")&&c in o);r.length===0&&(r=["_default"]);let s;for(let c of r){let d=e(o[c]);s=n(s,d)}let a=e(o._common),l=t(a,s);return new RC(l)});Ig._locales=new bl(()=>Object.keys(RC.ambiguousCharacterData.value).filter(i=>!i.startsWith("_")));Mg=class i{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(i.getRawData())),this._data}static isInvisibleCharacter(e){return i.getData().has(e)}static get codePoints(){return i.getData()}};Mg._data=void 0});var hqe=P(()=>{});function jue(i,e,t){typeof e=="string"&&(e=i.matchMedia(e)),e.addEventListener("change",t)}function fqe(i){return CT.INSTANCE.getZoomFactor(i)}function pqe(){return hU}var CT,Wue,Uue,$ue,P3,HC,Aa,cm,Rg,Xu,fU,I2i,que,hU,Xc=P(()=>{_l();Xt();nt();CT=class{constructor(){this.mapWindowIdToZoomFactor=new Map}getZoomFactor(e){var t;return(t=this.mapWindowIdToZoomFactor.get(this.getWindowId(e)))!==null&&t!==void 0?t:1}getWindowId(e){return e.vscodeWindowId}};CT.INSTANCE=new CT;Wue=class extends ue{constructor(){super(),this._onDidChange=this._register(new ge),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=$0.matchMedia(`(resolution: ${$0.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),e&&this._onDidChange.fire()}},Uue=class extends ue{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new ge),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();let e=this._register(new Wue);this._register(e.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}_getPixelRatio(){let e=document.createElement("canvas").getContext("2d"),t=$0.devicePixelRatio||1,n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/n}},$ue=class{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=l5(new Uue)),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}};P3=new $ue;HC=navigator.userAgent,Aa=HC.indexOf("Firefox")>=0,cm=HC.indexOf("AppleWebKit")>=0,Rg=HC.indexOf("Chrome")>=0,Xu=!Rg&&HC.indexOf("Safari")>=0,fU=!Rg&&!Xu&&cm,I2i=HC.indexOf("Electron/")>=0,que=HC.indexOf("Android")>=0,hU=!1;if(typeof Hn.matchMedia=="function"){let i=Hn.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=Hn.matchMedia("(display-mode: fullscreen)");hU=i.matches,jue(Hn,i,({matches:t})=>{hU&&e.matches||(hU=t)})}});function dm(i){return typeof i=="number"?`${i}px`:i}function vn(i){return new wT(i)}var wT,_a=P(()=>{wT=class{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){let t=dm(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=dm(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=dm(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=dm(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=dm(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=dm(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=dm(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){let t=dm(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){let t=dm(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){let t=dm(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=dm(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 Gr(i,e){i instanceof wT?(i.setFontFamily(e.getMassagedFontFamily()),i.setFontWeight(e.fontWeight),i.setFontSize(e.fontSize),i.setFontFeatureSettings(e.fontFeatureSettings),i.setFontVariationSettings(e.fontVariationSettings),i.setLineHeight(e.lineHeight),i.setLetterSpacing(e.letterSpacing)):(i.style.fontFamily=e.getMassagedFontFamily(),i.style.fontWeight=e.fontWeight,i.style.fontSize=e.fontSize+"px",i.style.fontFeatureSettings=e.fontFeatureSettings,i.style.fontVariationSettings=e.fontVariationSettings,i.style.lineHeight=e.lineHeight+"px",i.style.letterSpacing=e.letterSpacing+"px")}var Vf=P(()=>{_a()});function mqe(i,e){new Gue(i,e).read()}var pU,Gue,gqe=P(()=>{_l();Vf();pU=class{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}},Gue=class i{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),$0.document.body.appendChild(this._container),this._readFromDomElements(),$0.document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){let e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";let t=document.createElement("div");Gr(t,this._bareFontInfo),e.appendChild(t);let n=document.createElement("div");Gr(n,this._bareFontInfo),n.style.fontWeight="bold",e.appendChild(n);let o=document.createElement("div");Gr(o,this._bareFontInfo),o.style.fontStyle="italic",e.appendChild(o);let r=[];for(let s of this._requests){let a;s.type===0&&(a=t),s.type===2&&(a=n),s.type===1&&(a=o),a.appendChild(document.createElement("br"));let l=document.createElement("span");i._render(l,s),a.appendChild(l),r.push(l)}this._container=e,this._testElements=r}static _render(e,t){if(t.chr===" "){let n="\xA0";for(let o=0;o<8;o++)n+=n;e.innerText=n}else{let n=t.chr;for(let o=0;o<8;o++)n+=n;e.textContent=n}}_readFromDomElements(){for(let e=0,t=this._requests.length;e{Xt();Qc=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new ge,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(i){i=Math.min(Math.max(-5,i),20),this._zoomLevel!==i&&(this._zoomLevel=i,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}});var TLt,Kue,g5,ILt,v5,mU=P(()=>{Mn();Ks();BC();TLt=Wi?1.5:1.35,Kue=8,g5=class i{static createFromValidatedSettings(e,t,n){let o=e.get(49),r=e.get(53),s=e.get(52),a=e.get(51),l=e.get(54),c=e.get(66),d=e.get(63);return i._create(o,r,s,a,l,c,d,t,n)}static _create(e,t,n,o,r,s,a,l,c){s===0?s=TLt*n:s{Xc();_l();Xt();nt();gqe();Ks();mU();Yue=class extends ue{constructor(){super(),this._onDidChange=this._register(new ge),this.onDidChange=this._onDidChange.event,this._cache=new gU,this._evictUntrustedReadingsTimeout=-1}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new gU,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),!t.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=Hn.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){let e=this._cache.getValues(),t=!1;for(let n of e)n.isTrusted||(t=!0,this._cache.remove(n));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 v5({pixelRatio:P3.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,n,o){let r=new pU(e,t);return n.push(r),o?.push(r),r}_actualReadFontInfo(e){let t=[],n=[],o=this._createRequest("n",0,t,n),r=this._createRequest("\uFF4D",0,t,null),s=this._createRequest(" ",0,t,n),a=this._createRequest("0",0,t,n),l=this._createRequest("1",0,t,n),c=this._createRequest("2",0,t,n),d=this._createRequest("3",0,t,n),u=this._createRequest("4",0,t,n),h=this._createRequest("5",0,t,n),f=this._createRequest("6",0,t,n),p=this._createRequest("7",0,t,n),m=this._createRequest("8",0,t,n),y=this._createRequest("9",0,t,n),_=this._createRequest("\u2192",0,t,n),v=this._createRequest("\uFFEB",0,t,null),b=this._createRequest("\xB7",0,t,n),C=this._createRequest("\u2E31",0,t,null),w="|/-_ilm%";for(let E=0,A=w.length;E.001){x=!1;break}}let D=!0;return x&&v.width!==k&&(D=!1),v.width>_.width&&(D=!1),new v5({pixelRatio:P3.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,fontVariationSettings:e.fontVariationSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:x,typicalHalfwidthCharacterWidth:o.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:D,spaceWidth:s.width,middotWidth:b.width,wsmiddotWidth:C.width,maxDigitWidth:S},!0)}},gU=class{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){let t=e.getId();return!!this._values[t]}get(e){let t=e.getId();return this._values[t]}put(e,t){let n=e.getId();this._keys[n]=e,this._values[n]=t}remove(e){let t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}},xT=new Yue});function MLt(i,e,t){e[np.DI_TARGET]===e?e[np.DI_DEPENDENCIES].push({id:i,index:t}):(e[np.DI_DEPENDENCIES]=[{id:i,index:t}],e[np.DI_TARGET]=e)}function vi(i){if(np.serviceIds.has(i))return np.serviceIds.get(i);let e=function(t,n,o){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");MLt(e,t,o)};return e.toString=()=>i,np.serviceIds.set(i,e),e}var np,qt,_i=P(()=>{(function(i){i.serviceIds=new Map,i.DI_TARGET="$di$target",i.DI_DEPENDENCIES="$di$dependencies";function e(t){return t[i.DI_DEPENDENCIES]||[]}i.getServiceDependencies=e})(np||(np={}));qt=vi("instantiationService")});var tn,fs=P(()=>{_i();tn=vi("codeEditorService")});var no,Dc=P(()=>{_i();no=vi("modelService")});var xs,Wh=P(()=>{_i();xs=vi("textModelService")});function K0(i){var e,t;return{id:i.id,label:i.label,class:i.class,enabled:(e=i.enabled)!==null&&e!==void 0?e:!0,checked:(t=i.checked)!==null&&t!==void 0?t:!1,run:async(...n)=>i.run(...n),tooltip:i.label}}var zs,Qu,zr,Wf,ST,Ra=P(()=>{Xt();nt();Wt();zs=class extends ue{constructor(e,t="",n="",o=!0,r){super(),this._onDidChange=this._register(new ge),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=n,this._enabled=o,this._actionCallback=r}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}async run(e,t){this._actionCallback&&await this._actionCallback(e)}},Qu=class extends ue{constructor(){super(...arguments),this._onWillRun=this._register(new ge),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new ge),this.onDidRun=this._onDidRun.event}async run(e,t){if(!e.enabled)return;this._onWillRun.fire({action:e});let n;try{await this.runAction(e,t)}catch(o){n=o}this._onDidRun.fire({action:e,error:n})}async runAction(e,t){await e.run(t)}},zr=class i{constructor(){this.id=i.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let t=[];for(let n of e)n.length&&(t.length?t=[...t,new i,...n]:t=n);return t}async run(){}};zr.ID="vs.actions.separator";Wf=class{get actions(){return this._actions}constructor(e,t,n,o){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=o,this._actions=n}async run(){}},ST=class i extends zs{constructor(){super(i.ID,g("submenu.empty","(empty)"),void 0,!1)}};ST.ID="vs.actions.empty"});var Xue,ui,or=P(()=>{Go();(function(i){function e(t){return t&&typeof t=="object"&&typeof t.id=="string"}i.isThemeColor=e})(Xue||(Xue={}));(function(i){i.iconNameSegment="[A-Za-z0-9]+",i.iconNameExpression="[A-Za-z0-9-]+",i.iconModifierExpression="~[A-Za-z]+",i.iconNameCharacter="[A-Za-z0-9~-]";let e=new RegExp(`^(${i.iconNameExpression})(${i.iconModifierExpression})?$`);function t(h){let f=e.exec(h.id);if(!f)return t(kt.error);let[,p,m]=f,y=["codicon","codicon-"+p];return m&&y.push("codicon-modifier-"+m.substring(1)),y}i.asClassNameArray=t;function n(h){return t(h).join(" ")}i.asClassName=n;function o(h){return"."+t(h).join(".")}i.asCSSSelector=o;function r(h){return h&&typeof h=="object"&&typeof h.id=="string"&&(typeof h.color>"u"||Xue.isThemeColor(h.color))}i.isThemeIcon=r;let s=new RegExp(`^\\$\\((${i.iconNameExpression}(?:${i.iconModifierExpression})?)\\)$`);function a(h){let f=s.exec(h);if(!f)return;let[,p]=f;return{id:p}}i.fromString=a;function l(h){return{id:h}}i.fromId=l;function c(h,f){let p=h.id,m=p.lastIndexOf("~");return m!==-1&&(p=p.substring(0,m)),f&&(p=`${p}~${f}`),{id:p}}i.modify=c;function d(h){let f=h.id.lastIndexOf("~");if(f!==-1)return h.id.substring(f+1)}i.getModifier=d;function u(h,f){var p,m;return h.id===f.id&&((p=h.color)===null||p===void 0?void 0:p.id)===((m=f.color)===null||m===void 0?void 0:m.id)}i.isEqual=u})(ui||(ui={}))});var eo,Zi,$o=P(()=>{Xt();Yc();nt();Hh();ho();_i();eo=vi("commandService"),Zi=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new ge,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(i,e){if(!i)throw new Error("invalid command");if(typeof i=="string"){if(!e)throw new Error("invalid command");return this.registerCommand({id:i,handler:e})}if(i.metadata&&Array.isArray(i.metadata.args)){let s=[];for(let l of i.metadata.args)s.push(l.constraint);let a=i.handler;i.handler=function(l,...c){return mje(c,s),a(l,...c)}}let{id:t}=i,n=this._commands.get(t);n||(n=new $r,this._commands.set(t,n));let o=n.unshift(i),r=Yt(()=>{o();let s=this._commands.get(t);s?.isEmpty()&&this._commands.delete(t)});return this._onDidRegisterCommand.fire(t),r}registerCommandAlias(i,e){return Zi.registerCommand(i,(t,...n)=>t.get(eo).executeCommand(e,...n))}getCommand(i){let e=this._commands.get(i);if(!(!e||e.isEmpty()))return un.first(e)}getCommands(){let i=new Map;for(let e of this._commands.keys()){let t=this.getCommand(e);t&&i.set(e,t)}return i}};Zi.registerCommand("noop",()=>{})});function Que(...i){switch(i.length){case 1:return g("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",i[0]);case 2:return g("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",i[0],i[1]);case 3:return g("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",i[0],i[1],i[2]);default:return}}var NLt,ALt,Og,vqe=P(()=>{Pi();Wt();NLt=g("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),ALt=g("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'."),Og=class i{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw LC(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){let t=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:t})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){let t=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:t})}else this._match(126)?this._addToken(9):this._error(Que("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(Que("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(Que("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return this._isAtEnd()||this._input.charCodeAt(this._current)!==e?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){let t=this._start,n=this._input.substring(this._start,this._current),o={type:19,offset:this._start,lexeme:n};this._errors.push({offset:t,lexeme:n,additionalInfo:e}),this._tokens.push(o)}_string(){this.stringRe.lastIndex=this._start;let e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;let t=this._input.substring(this._start,this._current),n=i._keywords.get(t);n?this._addToken(n):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(NLt);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let e=this._current,t=!1,n=!1;for(;;){if(e>=this._input.length){this._current=e,this._error(ALt);return}let r=this._input.charCodeAt(e);if(t)t=!1;else if(r===47&&!n){e++;break}else r===91?n=!0:r===92?t=!0:r===93&&(n=!1);e++}for(;e=this._input.length}};Og._regexFlags=new Set(["i","g","s","m","y","u"].map(i=>i.charCodeAt(0)));Og._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])});function Cqe(i,e){let t=i?i.substituteConstants():void 0,n=e?e.substituteConstants():void 0;return!t&&!n?!0:!t||!n?!1:t.equals(n)}function kT(i,e){return i.cmp(e)}function EU(i,e){if(typeof i=="string"){let t=parseFloat(i);isNaN(t)||(i=t)}return typeof i=="string"||typeof i=="number"?e(i):Ic.INSTANCE}function wqe(i){let e=null;for(let t=0,n=i.length;te?1:0}function C5(i,e,t,n){return it?1:en?1:0}function LU(i,e){if(i.type===0||e.type===1)return!0;if(i.type===9)return e.type===9?bqe(i.expr,e.expr):!1;if(e.type===9){for(let t of e.expr)if(LU(i,t))return!0;return!1}if(i.type===6){if(e.type===6)return bqe(e.expr,i.expr);for(let t of i.expr)if(LU(t,e))return!0;return!1}return i.equals(e)}function bqe(i,e){let t=0,n=0;for(;t{Mn();Ri();vqe();_i();Wt();Tc=new Map;Tc.set("false",!1);Tc.set("true",!0);Tc.set("isMac",Wi);Tc.set("isLinux",Ar);Tc.set("isWindows",hr);Tc.set("isWeb",Fh);Tc.set("isMacNative",Wi&&!Fh);Tc.set("isEdge",Ije);Tc.set("isFirefox",Dje);Tc.set("isChrome",Hde);Tc.set("isSafari",Tje);RLt=Object.prototype.hasOwnProperty,PLt={regexParsingWithErrorRecovery:!0},OLt=g("contextkey.parser.error.emptyString","Empty context key expression"),zLt=g("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),FLt=g("contextkey.parser.error.noInAfterNot","'in' after 'not'."),_qe=g("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),HLt=g("contextkey.parser.error.unexpectedToken","Unexpected token"),BLt=g("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),VLt=g("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),WLt=g("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?"),vU=class i{constructor(e=PLt){this._config=e,this._scanner=new Og,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(e===""){this._parsingErrors.push({message:OLt,offset:0,lexeme:"",additionalInfo:zLt});return}this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{let t=this._expr();if(!this._isAtEnd()){let n=this._peek(),o=n.type===17?BLt:void 0;throw this._parsingErrors.push({message:HLt,offset:n.offset,lexeme:Og.getLexeme(n),additionalInfo:o}),i._parseError}return t}catch(t){if(t!==i._parseError)throw t;return}}_expr(){return this._or()}_or(){let e=[this._and()];for(;this._matchOne(16);){let t=this._and();e.push(t)}return e.length===1?e[0]:mt.or(...e)}_and(){let e=[this._term()];for(;this._matchOne(15);){let t=this._term();e.push(t)}return e.length===1?e[0]:mt.and(...e)}_term(){if(this._matchOne(2)){let e=this._peek();switch(e.type){case 11:return this._advance(),Ic.INSTANCE;case 12:return this._advance(),Jc.INSTANCE;case 0:{this._advance();let t=this._expr();return this._consume(1,_qe),t?.negate()}case 17:return this._advance(),y5.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){let e=this._peek();switch(e.type){case 11:return this._advance(),mt.true();case 12:return this._advance(),mt.false();case 0:{this._advance();let t=this._expr();return this._consume(1,_qe),t}case 17:{let t=e.lexeme;if(this._advance(),this._matchOne(9)){let o=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),o.type!==10)throw this._errExpectedButGot("REGEX",o);let r=o.lexeme,s=r.lastIndexOf("/"),a=s===r.length-1?void 0:this._removeFlagsGY(r.substring(s+1)),l;try{l=new RegExp(r.substring(1,s),a)}catch{throw this._errExpectedButGot("REGEX",o)}return LT.create(t,l)}switch(o.type){case 10:case 19:{let r=[o.lexeme];this._advance();let s=this._peek(),a=0;for(let h=0;h=0){let c=r.slice(a+1,l),d=r[l+1]==="i"?"i":"";try{s=new RegExp(c,d)}catch{throw this._errExpectedButGot("REGEX",o)}}}if(s===null)throw this._errExpectedButGot("REGEX",o);return LT.create(t,s)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,FLt);let o=this._value();return mt.notIn(t,o)}switch(this._peek().type){case 3:{this._advance();let o=this._value();if(this._previous().type===18)return mt.equals(t,o);switch(o){case"true":return mt.has(t);case"false":return mt.not(t);default:return mt.equals(t,o)}}case 4:{this._advance();let o=this._value();if(this._previous().type===18)return mt.notEquals(t,o);switch(o){case"true":return mt.not(t);case"false":return mt.has(t);default:return mt.notEquals(t,o)}}case 5:return this._advance(),xU.create(t,this._value());case 6:return this._advance(),SU.create(t,this._value());case 7:return this._advance(),CU.create(t,this._value());case 8:return this._advance(),wU.create(t,this._value());case 13:return this._advance(),mt.in(t,this._value());default:return mt.has(t)}}case 20:throw this._parsingErrors.push({message:VLt,offset:e.offset,lexeme:"",additionalInfo:WLt}),i._parseError;default:throw this._errExpectedButGot(`true | false | KEY | KEY '=~' REGEX | KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){let e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return this._check(e)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,n){let o=g("contextkey.parser.error.expectedButGot",`Expected: {0} -Received: '{1}'.`,e,Og.getLexeme(t)),r=t.offset,s=Og.getLexeme(t);return this._parsingErrors.push({message:o,offset:r,lexeme:s,additionalInfo:n}),i._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}};pU._parseError=new Error;mt=class{static false(){return Ic.INSTANCE}static true(){return Jc.INSTANCE}static has(e){return _5.create(e)}static equals(e,t){return b5.create(e,t)}static notEquals(e,t){return vU.create(e,t)}static regex(e,t){return LT.create(e,t)}static in(e,t){return mU.create(e,t)}static notIn(e,t){return gU.create(e,t)}static not(e){return y5.create(e)}static and(...e){return wU.create(e,null,!0)}static or(...e){return ET.create(e,null,!0)}static deserialize(e){return e==null?void 0:this._parser.parse(e)}};mt._parser=new pU({regexParsingWithErrorRecovery:!1});Ic=class{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 Jc.INSTANCE}};Ic.INSTANCE=new Ic;Jc=class{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 Ic.INSTANCE}};Jc.INSTANCE=new Jc;_5=class i{static create(e,t=null){let n=Tc.get(e);return typeof n=="boolean"?n?Jc.INSTANCE:Ic.INSTANCE:new i(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:xqe(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){let e=Tc.get(this.key);return typeof e=="boolean"?e?Jc.INSTANCE:Ic.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=y5.create(this.key,this)),this.negated}},b5=class i{static create(e,t,n=null){if(typeof t=="boolean")return t?_5.create(e,n):y5.create(e,n);let o=Tc.get(e);return typeof o=="boolean"?t===(o?"true":"false")?Jc.INSTANCE:Ic.INSTANCE:new i(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:C5(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(){let e=Tc.get(this.key);if(typeof e=="boolean"){let t=e?"true":"false";return this.value===t?Jc.INSTANCE:Ic.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=vU.create(this.key,this.value,this)),this.negated}},mU=class i{static create(e,t){return new i(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:C5(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){let t=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(t)?t.includes(n):typeof n=="string"&&typeof t=="object"&&t!==null?RLt.call(t,n):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=gU.create(this.key,this.valueKey)),this.negated}},gU=class i{static create(e,t){return new i(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=mU.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}},vU=class i{static create(e,t,n=null){if(typeof t=="boolean")return t?y5.create(e,n):_5.create(e,n);let o=Tc.get(e);return typeof o=="boolean"?t===(o?"true":"false")?Ic.INSTANCE:Jc.INSTANCE:new i(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:C5(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(){let e=Tc.get(this.key);if(typeof e=="boolean"){let t=e?"true":"false";return this.value===t?Ic.INSTANCE:Jc.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=b5.create(this.key,this.value,this)),this.negated}},y5=class i{static create(e,t=null){let n=Tc.get(e);return typeof n=="boolean"?n?Ic.INSTANCE:Jc.INSTANCE:new i(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:xqe(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){let e=Tc.get(this.key);return typeof e=="boolean"?e?Ic.INSTANCE:Jc.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_5.create(this.key,this)),this.negated}};_U=class i{static create(e,t,n=null){return SU(t,o=>new i(e,o,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:C5(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=CU.create(this.key,this.value,this)),this.negated}},bU=class i{static create(e,t,n=null){return SU(t,o=>new i(e,o,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:C5(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=yU.create(this.key,this.value,this)),this.negated}},yU=class i{static create(e,t,n=null){return SU(t,o=>new i(e,o,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:C5(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 i(e,o,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:C5(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=_U.create(this.key,this.value,this)),this.negated}},LT=class i{static create(e,t){return new i(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;let t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return tn?1:0}equals(e){if(e.type===this.type){let t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&t===n}return!1}substituteConstants(){return this}evaluate(e){let t=e.getValue(this.key);return this.regexp?this.regexp.test(t):!1}serialize(){let e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Jue.create(this)),this.negated}},Jue=class i{static create(e){return new i(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(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}};wU=class i{static create(e,t,n){return i._normalizeArr(e,t,n)}constructor(e,t){this.expr=e,this.negated=t,this.type=6}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,n=this.expr.length;t1;){let s=o[o.length-1];if(s.type!==9)break;o.pop();let a=o.pop(),l=o.length===0,c=ET.create(s.expr.map(d=>i.create([d,a],null,n)),null,l);c&&(o.push(c),o.sort(kT))}if(o.length===1)return o[0];if(n){for(let s=0;se.serialize()).join(" && ")}keys(){let e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());this.negated=ET.create(e,this,!0)}return this.negated}},ET=class i{static create(e,t,n){return i._normalizeArr(e,t,n)}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,n=this.expr.length;te.serialize()).join(" || ")}keys(){let e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());for(;e.length>1;){let t=e.shift(),n=e.shift(),o=[];for(let r of yqe(t))for(let s of yqe(n))o.push(wU.create([r,s],null,!1));e.unshift(i.create(o,null,!1))}this.negated=i.create(e,this,!0)}return this.negated}},Bt=class i extends _5{static all(){return i._info.values()}constructor(e,t,n){super(e,null),this._defaultValue=t,typeof n=="object"?i._info.push({...n,key:e}):n!==!0&&i._info.push({key:e,description:n,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 b5.create(this.key,e)}};Bt._info=[];ri=vi("contextKeyService")});function TT(i,e){if(typeof i=="number"){if(i===0)return null;let t=(i&65535)>>>0,n=(i&4294901760)>>>16;return n!==0?new DT([kU(t,e),kU(n,e)]):new DT([kU(t,e)])}else{let t=[];for(let n=0;n{Pi();Uf=class i{constructor(e,t,n,o,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=o,this.keyCode=r}equals(e){return e instanceof i&&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}},DT=class{constructor(e){if(e.length===0)throw gl("chords");this.chords=e}},LU=class{constructor(e,t,n,o,r,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=o,this.keyLabel=r,this.keyAriaLabel=s}},EU=class{}});function DU(i,e){if(!i)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}function P3(i,e="Unreachable"){throw new Error(e)}function ehe(i){i||hi(new fo("Assertion Failed"))}function zg(i){if(!i()){debugger;i(),hi(new fo("Assertion Failed"))}}function TU(i,e){let t=0;for(;t{Pi()});var the,jn,Ys=P(()=>{um();ho();the=class{constructor(){this.data=new Map}add(e,t){DU(qs(e)),DU(Gs(t)),DU(!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}},jn=new the});function jLt(i,e){if(i.weight1!==e.weight1)return i.weight1-e.weight1;if(i.command&&e.command){if(i.commande.command)return 1}return i.weight2-e.weight2}var ihe,Pa,$Lt,O3=P(()=>{w5();Mn();$o();Ys();nt();Hh();ihe=class i{constructor(){this._coreKeybindings=new $r,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(Xa===1){if(e&&e.win)return e.win}else if(Xa===2){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){let t=i.bindToCurrentPlatform(e),n=new Ye;if(t&&t.primary){let o=TT(t.primary,Xa);o&&n.add(this._registerDefaultKeybinding(o,e.id,e.args,e.weight,0,e.when))}if(t&&Array.isArray(t.secondary))for(let o=0,r=t.secondary.length;o{a(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(jLt)),this._cachedMergedKeybindings.slice(0)}},Pa=new ihe,$Lt={EditorModes:"platform.keybindingsRegistry"};jn.add($Lt.EditorModes,Pa)});function F3(i){return i.command!==void 0}function kqe(i){return i.submenu!==void 0}function Fo(i){let e=new Ye,t=new i,{f1:n,menu:o,keybinding:r,...s}=t.desc;if(Zi.getCommand(s.id))throw new Error(`Cannot register two commands with the same id: ${s.id}`);if(e.add(Zi.registerCommand({id:s.id,handler:(a,...l)=>t.run(a,...l),metadata:s.metadata})),Array.isArray(o))for(let a of o)e.add(ps.appendMenuItem(a.id,{command:{...s,precondition:a.precondition===null?void 0:s.precondition},...a}));else o&&e.add(ps.appendMenuItem(o.id,{command:{...s,precondition:o.precondition===null?void 0:s.precondition},...o}));if(n&&(e.add(ps.appendMenuItem(ne.CommandPalette,{command:s,when:s.precondition})),e.add(ps.addCommand(s))),Array.isArray(r))for(let a of r)e.add(Pa.registerKeybindingRule({...a,id:s.id,when:s.precondition?mt.and(s.precondition,a.when):a.when}));else r&&e.add(Pa.registerKeybindingRule({...r,id:s.id,when:s.precondition?mt.and(s.precondition,r.when):r.when}));return e}var qLt,Sqe,MU,ne,Mc,z3,ps,hm,ed,Ja,Dr=P(()=>{Ra();or();Xt();nt();Hh();$o();Xi();_i();O3();qLt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Sqe=function(i,e){return function(t,n){e(t,n,i)}};ne=class i{constructor(e){if(i._instances.has(e))throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);i._instances.set(e,this),this.id=e}};ne._instances=new Map;ne.CommandPalette=new ne("CommandPalette");ne.DebugBreakpointsContext=new ne("DebugBreakpointsContext");ne.DebugCallStackContext=new ne("DebugCallStackContext");ne.DebugConsoleContext=new ne("DebugConsoleContext");ne.DebugVariablesContext=new ne("DebugVariablesContext");ne.DebugHoverContext=new ne("DebugHoverContext");ne.DebugWatchContext=new ne("DebugWatchContext");ne.DebugToolBar=new ne("DebugToolBar");ne.DebugToolBarStop=new ne("DebugToolBarStop");ne.EditorContext=new ne("EditorContext");ne.SimpleEditorContext=new ne("SimpleEditorContext");ne.EditorContent=new ne("EditorContent");ne.EditorLineNumberContext=new ne("EditorLineNumberContext");ne.EditorContextCopy=new ne("EditorContextCopy");ne.EditorContextPeek=new ne("EditorContextPeek");ne.EditorContextShare=new ne("EditorContextShare");ne.EditorTitle=new ne("EditorTitle");ne.EditorTitleRun=new ne("EditorTitleRun");ne.EditorTitleContext=new ne("EditorTitleContext");ne.EditorTitleContextShare=new ne("EditorTitleContextShare");ne.EmptyEditorGroup=new ne("EmptyEditorGroup");ne.EmptyEditorGroupContext=new ne("EmptyEditorGroupContext");ne.EditorTabsBarContext=new ne("EditorTabsBarContext");ne.EditorTabsBarShowTabsSubmenu=new ne("EditorTabsBarShowTabsSubmenu");ne.EditorTabsBarShowTabsZenModeSubmenu=new ne("EditorTabsBarShowTabsZenModeSubmenu");ne.EditorActionsPositionSubmenu=new ne("EditorActionsPositionSubmenu");ne.ExplorerContext=new ne("ExplorerContext");ne.ExplorerContextShare=new ne("ExplorerContextShare");ne.ExtensionContext=new ne("ExtensionContext");ne.GlobalActivity=new ne("GlobalActivity");ne.CommandCenter=new ne("CommandCenter");ne.CommandCenterCenter=new ne("CommandCenterCenter");ne.LayoutControlMenuSubmenu=new ne("LayoutControlMenuSubmenu");ne.LayoutControlMenu=new ne("LayoutControlMenu");ne.MenubarMainMenu=new ne("MenubarMainMenu");ne.MenubarAppearanceMenu=new ne("MenubarAppearanceMenu");ne.MenubarDebugMenu=new ne("MenubarDebugMenu");ne.MenubarEditMenu=new ne("MenubarEditMenu");ne.MenubarCopy=new ne("MenubarCopy");ne.MenubarFileMenu=new ne("MenubarFileMenu");ne.MenubarGoMenu=new ne("MenubarGoMenu");ne.MenubarHelpMenu=new ne("MenubarHelpMenu");ne.MenubarLayoutMenu=new ne("MenubarLayoutMenu");ne.MenubarNewBreakpointMenu=new ne("MenubarNewBreakpointMenu");ne.PanelAlignmentMenu=new ne("PanelAlignmentMenu");ne.PanelPositionMenu=new ne("PanelPositionMenu");ne.ActivityBarPositionMenu=new ne("ActivityBarPositionMenu");ne.MenubarPreferencesMenu=new ne("MenubarPreferencesMenu");ne.MenubarRecentMenu=new ne("MenubarRecentMenu");ne.MenubarSelectionMenu=new ne("MenubarSelectionMenu");ne.MenubarShare=new ne("MenubarShare");ne.MenubarSwitchEditorMenu=new ne("MenubarSwitchEditorMenu");ne.MenubarSwitchGroupMenu=new ne("MenubarSwitchGroupMenu");ne.MenubarTerminalMenu=new ne("MenubarTerminalMenu");ne.MenubarViewMenu=new ne("MenubarViewMenu");ne.MenubarHomeMenu=new ne("MenubarHomeMenu");ne.OpenEditorsContext=new ne("OpenEditorsContext");ne.OpenEditorsContextShare=new ne("OpenEditorsContextShare");ne.ProblemsPanelContext=new ne("ProblemsPanelContext");ne.SCMInputBox=new ne("SCMInputBox");ne.SCMIncomingChanges=new ne("SCMIncomingChanges");ne.SCMOutgoingChanges=new ne("SCMOutgoingChanges");ne.SCMIncomingChangesAllChangesContext=new ne("SCMIncomingChangesAllChangesContext");ne.SCMIncomingChangesHistoryItemContext=new ne("SCMIncomingChangesHistoryItemContext");ne.SCMOutgoingChangesAllChangesContext=new ne("SCMOutgoingChangesAllChangesContext");ne.SCMOutgoingChangesHistoryItemContext=new ne("SCMOutgoingChangesHistoryItemContext");ne.SCMChangeContext=new ne("SCMChangeContext");ne.SCMResourceContext=new ne("SCMResourceContext");ne.SCMResourceContextShare=new ne("SCMResourceContextShare");ne.SCMResourceFolderContext=new ne("SCMResourceFolderContext");ne.SCMResourceGroupContext=new ne("SCMResourceGroupContext");ne.SCMSourceControl=new ne("SCMSourceControl");ne.SCMSourceControlInline=new ne("SCMSourceControlInline");ne.SCMTitle=new ne("SCMTitle");ne.SearchContext=new ne("SearchContext");ne.SearchActionMenu=new ne("SearchActionContext");ne.StatusBarWindowIndicatorMenu=new ne("StatusBarWindowIndicatorMenu");ne.StatusBarRemoteIndicatorMenu=new ne("StatusBarRemoteIndicatorMenu");ne.StickyScrollContext=new ne("StickyScrollContext");ne.TestItem=new ne("TestItem");ne.TestItemGutter=new ne("TestItemGutter");ne.TestMessageContext=new ne("TestMessageContext");ne.TestMessageContent=new ne("TestMessageContent");ne.TestPeekElement=new ne("TestPeekElement");ne.TestPeekTitle=new ne("TestPeekTitle");ne.TouchBarContext=new ne("TouchBarContext");ne.TitleBarContext=new ne("TitleBarContext");ne.TitleBarTitleContext=new ne("TitleBarTitleContext");ne.TunnelContext=new ne("TunnelContext");ne.TunnelPrivacy=new ne("TunnelPrivacy");ne.TunnelProtocol=new ne("TunnelProtocol");ne.TunnelPortInline=new ne("TunnelInline");ne.TunnelTitle=new ne("TunnelTitle");ne.TunnelLocalAddressInline=new ne("TunnelLocalAddressInline");ne.TunnelOriginInline=new ne("TunnelOriginInline");ne.ViewItemContext=new ne("ViewItemContext");ne.ViewContainerTitle=new ne("ViewContainerTitle");ne.ViewContainerTitleContext=new ne("ViewContainerTitleContext");ne.ViewTitle=new ne("ViewTitle");ne.ViewTitleContext=new ne("ViewTitleContext");ne.CommentEditorActions=new ne("CommentEditorActions");ne.CommentThreadTitle=new ne("CommentThreadTitle");ne.CommentThreadActions=new ne("CommentThreadActions");ne.CommentThreadAdditionalActions=new ne("CommentThreadAdditionalActions");ne.CommentThreadTitleContext=new ne("CommentThreadTitleContext");ne.CommentThreadCommentContext=new ne("CommentThreadCommentContext");ne.CommentTitle=new ne("CommentTitle");ne.CommentActions=new ne("CommentActions");ne.InteractiveToolbar=new ne("InteractiveToolbar");ne.InteractiveCellTitle=new ne("InteractiveCellTitle");ne.InteractiveCellDelete=new ne("InteractiveCellDelete");ne.InteractiveCellExecute=new ne("InteractiveCellExecute");ne.InteractiveInputExecute=new ne("InteractiveInputExecute");ne.NotebookToolbar=new ne("NotebookToolbar");ne.NotebookStickyScrollContext=new ne("NotebookStickyScrollContext");ne.NotebookCellTitle=new ne("NotebookCellTitle");ne.NotebookCellDelete=new ne("NotebookCellDelete");ne.NotebookCellInsert=new ne("NotebookCellInsert");ne.NotebookCellBetween=new ne("NotebookCellBetween");ne.NotebookCellListTop=new ne("NotebookCellTop");ne.NotebookCellExecute=new ne("NotebookCellExecute");ne.NotebookCellExecutePrimary=new ne("NotebookCellExecutePrimary");ne.NotebookDiffCellInputTitle=new ne("NotebookDiffCellInputTitle");ne.NotebookDiffCellMetadataTitle=new ne("NotebookDiffCellMetadataTitle");ne.NotebookDiffCellOutputsTitle=new ne("NotebookDiffCellOutputsTitle");ne.NotebookOutputToolbar=new ne("NotebookOutputToolbar");ne.NotebookEditorLayoutConfigure=new ne("NotebookEditorLayoutConfigure");ne.NotebookKernelSource=new ne("NotebookKernelSource");ne.BulkEditTitle=new ne("BulkEditTitle");ne.BulkEditContext=new ne("BulkEditContext");ne.TimelineItemContext=new ne("TimelineItemContext");ne.TimelineTitle=new ne("TimelineTitle");ne.TimelineTitleContext=new ne("TimelineTitleContext");ne.TimelineFilterSubMenu=new ne("TimelineFilterSubMenu");ne.AccountsContext=new ne("AccountsContext");ne.SidebarTitle=new ne("SidebarTitle");ne.PanelTitle=new ne("PanelTitle");ne.AuxiliaryBarTitle=new ne("AuxiliaryBarTitle");ne.TerminalInstanceContext=new ne("TerminalInstanceContext");ne.TerminalEditorInstanceContext=new ne("TerminalEditorInstanceContext");ne.TerminalNewDropdownContext=new ne("TerminalNewDropdownContext");ne.TerminalTabContext=new ne("TerminalTabContext");ne.TerminalTabEmptyAreaContext=new ne("TerminalTabEmptyAreaContext");ne.TerminalStickyScrollContext=new ne("TerminalStickyScrollContext");ne.WebviewContext=new ne("WebviewContext");ne.InlineCompletionsActions=new ne("InlineCompletionsActions");ne.NewFile=new ne("NewFile");ne.MergeInput1Toolbar=new ne("MergeToolbar1Toolbar");ne.MergeInput2Toolbar=new ne("MergeToolbar2Toolbar");ne.MergeBaseToolbar=new ne("MergeBaseToolbar");ne.MergeInputResultToolbar=new ne("MergeToolbarResultToolbar");ne.InlineSuggestionToolbar=new ne("InlineSuggestionToolbar");ne.ChatContext=new ne("ChatContext");ne.ChatCodeBlock=new ne("ChatCodeblock");ne.ChatMessageTitle=new ne("ChatMessageTitle");ne.ChatExecute=new ne("ChatExecute");ne.ChatInputSide=new ne("ChatInputSide");ne.AccessibleView=new ne("AccessibleView");ne.MultiDiffEditorFileToolbar=new ne("MultiDiffEditorFileToolbar");Mc=vi("menuService"),z3=class i{static for(e){let t=this._all.get(e);return t||(t=new i(e),this._all.set(e,t)),t}static merge(e){let t=new Set;for(let n of e)n instanceof i&&t.add(n.id);return t}constructor(e){this.id=e,this.has=t=>t===e}};z3._all=new Map;ps=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new eW({merge:z3.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(i){return this._commands.set(i.id,i),this._onDidChangeMenu.fire(z3.for(ne.CommandPalette)),Yt(()=>{this._commands.delete(i.id)&&this._onDidChangeMenu.fire(z3.for(ne.CommandPalette))})}getCommand(i){return this._commands.get(i)}getCommands(){let i=new Map;return this._commands.forEach((e,t)=>i.set(t,e)),i}appendMenuItem(i,e){let t=this._menuItems.get(i);t||(t=new $r,this._menuItems.set(i,t));let n=t.push(e);return this._onDidChangeMenu.fire(z3.for(i)),Yt(()=>{n(),this._onDidChangeMenu.fire(z3.for(i))})}appendMenuItems(i){let e=new Ye;for(let{id:t,item:n}of i)e.add(this.appendMenuItem(t,n));return e}getMenuItems(i){let e;return this._menuItems.has(i)?e=[...this._menuItems.get(i)]:e=[],i===ne.CommandPalette&&this._appendImplicitItems(e),e}_appendImplicitItems(i){let e=new Set;for(let t of i)F3(t)&&(e.add(t.command.id),t.alt&&e.add(t.alt.id));this._commands.forEach((t,n)=>{e.has(n)||i.push({command:t})})}},hm=class extends Wf{constructor(e,t,n){super(`submenuitem.${e.submenu.id}`,typeof e.title=="string"?e.title:e.title.value,n,"submenu"),this.item=e,this.hideActions=t}},ed=MU=class{static label(e,t){return t?.renderShortTitle&&e.shortTitle?typeof e.shortTitle=="string"?e.shortTitle:e.shortTitle.value:typeof e.title=="string"?e.title:e.title.value}constructor(e,t,n,o,r,s){var a,l;this.hideActions=o,this._commandService=s,this.id=e.id,this.label=MU.label(e,n),this.tooltip=(l=typeof e.tooltip=="string"?e.tooltip:(a=e.tooltip)===null||a===void 0?void 0:a.value)!==null&&l!==void 0?l:"",this.enabled=!e.precondition||r.contextMatchesRules(e.precondition),this.checked=void 0;let c;if(e.toggled){let d=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=r.contextMatchesRules(d.condition),this.checked&&d.tooltip&&(this.tooltip=typeof d.tooltip=="string"?d.tooltip:d.tooltip.value),this.checked&&ui.isThemeIcon(d.icon)&&(c=d.icon),this.checked&&d.title&&(this.label=typeof d.title=="string"?d.title:d.title.value)}c||(c=ui.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new MU(t,void 0,n,o,r,s):void 0,this._options=n,this.class=c&&ui.asClassName(c)}run(...e){var t,n;let o=[];return!((t=this._options)===null||t===void 0)&&t.arg&&(o=[...o,this._options.arg]),!((n=this._options)===null||n===void 0)&&n.shouldForwardArgs&&(o=[...o,...e]),this._commandService.executeCommand(this.id,...o)}};ed=MU=qLt([Sqe(4,ri),Sqe(5,eo)],ed);Ja=class{constructor(e){this.desc=e}}});var Fs,$f=P(()=>{_i();Fs=vi("telemetryService")});function GLt(i){switch(i){case yl.Trace:return"trace";case yl.Debug:return"debug";case yl.Info:return"info";case yl.Warning:return"warn";case yl.Error:return"error";case yl.Off:return"off"}}var ks,yl,Lqe,NU,AU,RU,Q0i,Ju=P(()=>{Xt();nt();Xi();_i();ks=vi("logService");(function(i){i[i.Off=0]="Off",i[i.Trace=1]="Trace",i[i.Debug=2]="Debug",i[i.Info=3]="Info",i[i.Warning=4]="Warning",i[i.Error=5]="Error"})(yl||(yl={}));Lqe=yl.Info,NU=class extends ue{constructor(){super(...arguments),this.level=Lqe,this._onDidChangeLogLevel=this._register(new ge),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!==yl.Off&&this.level<=e}},AU=class extends NU{constructor(e=Lqe,t=!0){super(),this.useColors=t,this.setLevel(e)}trace(e,...t){this.checkLogLevel(yl.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...t):console.log(e,...t))}debug(e,...t){this.checkLogLevel(yl.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...t):console.log(e,...t))}info(e,...t){this.checkLogLevel(yl.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...t):console.log(e,...t))}warn(e,...t){this.checkLogLevel(yl.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...t):console.log(e,...t))}error(e,...t){this.checkLogLevel(yl.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...t):console.error(e,...t))}},RU=class extends NU{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(let t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(let n of this.loggers)n.trace(e,...t)}debug(e,...t){for(let n of this.loggers)n.debug(e,...t)}info(e,...t){for(let n of this.loggers)n.info(e,...t)}warn(e,...t){for(let n of this.loggers)n.warn(e,...t)}error(e,...t){for(let n of this.loggers)n.error(e,...t)}dispose(){for(let e of this.loggers)e.dispose();super.dispose()}};Q0i=new Bt("logLevel",GLt(yl.Info))});var VC,PU=P(()=>{Xc();_l();Mn();VC={clipboard:{writeText:tu||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:tu||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:tu||pqe()?0:navigator.keyboard||Xu?1:2,touch:"ontouchstart"in Hn||navigator.maxTouchPoints>0,pointerEvents:Hn.PointerEvent&&("ontouchstart"in Hn||navigator.maxTouchPoints>0)}});function KLt(i){if(i.charCode){let t=String.fromCharCode(i.charCode).toUpperCase();return ep.fromString(t)}let e=i.keyCode;if(e===3)return 7;if(Aa)switch(e){case 59:return 85;case 60:if(Ar)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(Wi)return 57;break}else if(cm){if(Wi&&e===93)return 57;if(!Wi&&e===92)return 57}return Eue[e]||0}var YLt,ZLt,XLt,QLt,qn,Gl=P(()=>{Xc();Bh();w5();Mn();YLt=Wi?256:2048,ZLt=512,XLt=1024,QLt=Wi?2048:256,qn=class{constructor(e){this._standardKeyboardEventBrand=!0;let 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=KLt(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|=YLt),this.altKey&&(t|=ZLt),this.shiftKey&&(t|=XLt),this.metaKey&&(t|=QLt),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new Uf(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}});function JLt(i){if(!i.parent||i.parent===i)return null;try{let e=i.location,t=i.parent.location;if(e.origin!=="null"&&t.origin!=="null"&&e.origin!==t.origin)return null}catch{return null}return i.parent}var Eqe,OU,Dqe=P(()=>{Eqe=new WeakMap;OU=class{static getSameOriginWindowChain(e){let t=Eqe.get(e);if(!t){t=[],Eqe.set(e,t);let n=e,o;do o=JLt(n),o?t.push({window:new WeakRef(n),iframeElement:n.frameElement||null}):t.push({window:new WeakRef(n),iframeElement:null}),n=o;while(n)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){var n,o;if(!t||e===t)return{top:0,left:0};let r=0,s=0,a=this.getSameOriginWindowChain(e);for(let l of a){let c=l.window.deref();if(r+=(n=c?.scrollY)!==null&&n!==void 0?n:0,s+=(o=c?.scrollX)!==null&&o!==void 0?o:0,c===t||!l.iframeElement)break;let d=l.iframeElement.getBoundingClientRect();r+=d.top,s+=d.left}return{top:r,left:s}}}});var Oa,jf,Uh=P(()=>{Xc();Dqe();Mn();Oa=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let n=OU.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=n.left,this.posy-=n.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},jf=class{constructor(e,t=0,n=0){var o;if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=t,e){let r=e,s=e,a=((o=e.view)===null||o===void 0?void 0:o.devicePixelRatio)||1;if(typeof r.wheelDeltaY<"u")Rg?this.deltaY=r.wheelDeltaY/(120*a):this.deltaY=r.wheelDeltaY/120;else if(typeof s.VERTICAL_AXIS<"u"&&s.axis===s.VERTICAL_AXIS)this.deltaY=-s.detail/3;else if(e.type==="wheel"){let l=e;l.deltaMode===l.DOM_DELTA_LINE?Aa&&!Wi?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof r.wheelDeltaX<"u")Xu&&hr?this.deltaX=-(r.wheelDeltaX/120):Rg?this.deltaX=r.wheelDeltaX/(120*a):this.deltaX=r.wheelDeltaX/120;else if(typeof s.HORIZONTAL_AXIS<"u"&&s.axis===s.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let l=e;l.deltaMode===l.DOM_DELTA_LINE?Aa&&!Wi?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(Rg?this.deltaY=e.wheelDelta/(120*a):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()}}});var zU,nhe=P(()=>{zU=Symbol("MicrotaskDelay")});function BU(i){return!!i&&typeof i.then=="function"}function Ho(i){let e=new Jn,t=i(e.token),n=new Promise((o,r)=>{let s=e.token.onCancellationRequested(()=>{s.dispose(),r(new Rf)});Promise.resolve(t).then(a=>{s.dispose(),e.dispose(),o(a)},a=>{s.dispose(),e.dispose(),r(a)})});return new class{cancel(){e.cancel(),e.dispose()}then(o,r){return n.then(o,r)}catch(o){return this.then(void 0,o)}finally(o){return n.finally(o)}}}function B3(i,e,t){return new Promise((n,o)=>{let r=e.onCancellationRequested(()=>{r.dispose(),n(t)});i.then(n,o).finally(()=>r.dispose())})}function eh(i,e){return e?new Promise((t,n)=>{let o=setTimeout(()=>{r.dispose(),t()},i),r=e.onCancellationRequested(()=>{clearTimeout(o),r.dispose(),n(new Rf)})}):Ho(t=>eh(i,t))}function $h(i,e=0,t){let n=setTimeout(()=>{i(),t&&o.dispose()},e),o=Yt(()=>{clearTimeout(n),t?.deleteAndLeak(o)});return t?.add(o),o}function MT(i,e=n=>!!n,t=null){let n=0,o=i.length,r=()=>{if(n>=o)return Promise.resolve(t);let s=i[n++];return Promise.resolve(s()).then(l=>e(l)?Promise.resolve(l):r())};return r()}function Tqe(i){let e=new Jn,t=i(e.token);return new rhe(e,async n=>{let o=e.token.onCancellationRequested(()=>{o.dispose(),e.dispose(),n.reject(new Rf)});try{for await(let r of t){if(e.token.isCancellationRequested)return;n.emitOne(r)}o.dispose(),e.dispose()}catch(r){o.dispose(),e.dispose(),n.reject(r)}})}var ohe,eEt,tEt,ba,UC,Zs,H3,hn,she,WC,IT,FU,Fg,HU,Cl,rhe,Qi=P(()=>{mo();Pi();Xt();nt();Mn();nhe();ohe=class{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){let t=()=>{if(this.queuedPromise=null,this.isDisposed)return;let n=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,n};this.queuedPromise=new Promise(n=>{this.activePromise.then(t,t).then(n)})}return new Promise((t,n)=>{this.queuedPromise.then(t,n)})}return this.activePromise=e(),new Promise((t,n)=>{this.activePromise.then(o=>{this.activePromise=null,t(o)},o=>{this.activePromise=null,n(o)})})}dispose(){this.isDisposed=!0}},eEt=(i,e)=>{let t=!0,n=setTimeout(()=>{t=!1,e()},i);return{isTriggered:()=>t,dispose:()=>{clearTimeout(n),t=!1}}},tEt=i=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,i())}),{isTriggered:()=>e,dispose:()=>{e=!1}}},ba=class{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((o,r)=>{this.doResolve=o,this.doReject=r}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){let o=this.task;return this.task=null,o()}}));let n=()=>{var o;this.deferred=null,(o=this.doResolve)===null||o===void 0||o.call(this,null)};return this.deferred=t===zU?tEt(n):eEt(t,n),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 Rf),this.completionPromise=null)}cancelTimeout(){var e;(e=this.deferred)===null||e===void 0||e.dispose(),this.deferred=null}dispose(){this.cancel()}},UC=class{constructor(e){this.delayer=new ba(e),this.throttler=new ohe}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}};Zs=class{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))}},H3=class{constructor(){this.disposable=void 0}cancel(){var e;(e=this.disposable)===null||e===void 0||e.dispose(),this.disposable=void 0}cancelAndSet(e,t,n=globalThis){this.cancel();let o=n.setInterval(()=>{e()},t);this.disposable=Yt(()=>{n.clearInterval(o),this.disposable=void 0})}dispose(){this.cancel()}},hn=class{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)}};(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?WC=(i,e)=>{jV(()=>{if(t)return;let n=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,n-Date.now())}}))});let t=!1;return{dispose(){t||(t=!0)}}}:WC=(i,e,t)=>{let n=i.requestIdleCallback(e,typeof t=="number"?{timeout:t}:void 0),o=!1;return{dispose(){o||(o=!0,i.cancelIdleCallback(n))}}},she=i=>WC(globalThis,i)})();IT=class{constructor(e,t){this._didRun=!1,this._executor=()=>{try{this._value=t()}catch(n){this._error=n}finally{this._didRun=!0}},this._handle=WC(e,()=>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}},FU=class extends IT{constructor(e){super(globalThis,e)}},Fg=class{get isRejected(){var e;return((e=this.outcome)===null||e===void 0?void 0:e.outcome)===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,t)=>{this.completeCallback=e,this.errorCallback=t})}complete(e){return new Promise(t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()})}error(e){return new Promise(t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()})}cancel(){return this.error(new Rf)}};(function(i){async function e(n){let o,r=await Promise.all(n.map(s=>s.then(a=>a,a=>{o||(o=a)})));if(typeof o<"u")throw o;return r}i.settled=e;function t(n){return new Promise(async(o,r)=>{try{await n(o,r)}catch(s){r(s)}})}i.withAsyncBody=t})(HU||(HU={}));Cl=class i{static fromArray(e){return new i(t=>{t.emitMany(e)})}static fromPromise(e){return new i(async t=>{t.emitMany(await e)})}static fromPromises(e){return new i(async t=>{await Promise.all(e.map(async n=>t.emitOne(await n)))})}static merge(e){return new i(async t=>{await Promise.all(e.map(async n=>{for await(let o of n)t.emitOne(o)}))})}constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new ge,queueMicrotask(async()=>{let t={emitOne:n=>this.emitOne(n),emitMany:n=>this.emitMany(n),reject:n=>this.reject(n)};try{await Promise.resolve(e(t)),this.resolve()}catch(n){this.reject(n)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e{for await(let o of e)n.emitOne(t(o))})}map(e){return i.map(this,e)}static filter(e,t){return new i(async n=>{for await(let o of e)t(o)&&n.emitOne(o)})}filter(e){return i.filter(this,e)}static coalesce(e){return i.filter(e,t=>!!t)}coalesce(){return i.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return i.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())}};Cl.EMPTY=Cl.fromArray([]);rhe=class extends Cl{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}});function op(i){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o0&&arguments[0]!==void 0?arguments[0]:yEt(),e=we=>Bqe(we);if(e.version="3.0.5",e.removed=[],!i||!i.document||i.document.nodeType!==9)return e.isSupported=!1,e;let t=i.document,n=t.currentScript,{document:o}=i,{DocumentFragment:r,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:c,NamedNodeMap:d=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:u,DOMParser:h,trustedTypes:f}=i,p=l.prototype,m=VU(p,"cloneNode"),y=VU(p,"nextSibling"),_=VU(p,"childNodes"),v=VU(p,"parentNode");if(typeof s=="function"){let we=o.createElement("template");we.content&&we.content.ownerDocument&&(o=we.content.ownerDocument)}let b,C="",{implementation:w,createNodeIterator:S,createDocumentFragment:x,getElementsByTagName:k}=o,{importNode:D}=t,E={};e.isSupported=typeof zqe=="function"&&typeof v=="function"&&w&&w.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:A,ERB_EXPR:T,TMPLIT_EXPR:L,DATA_ATTR:I,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:N,ATTR_WHITESPACE:z}=Oqe,{IS_ALLOWED_URI:F}=Oqe,V=null,ie=Wo({},[...Nqe,...lhe,...che,...dhe,...Aqe]),fe=null,K=Wo({},[...Rqe,...uhe,...Pqe,...WU]),oe=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),je=null,Ae=null,Be=!0,Ie=!0,ee=!1,Z=!0,te=!1,W=!1,Le=!1,rt=!1,ae=!1,Ze=!1,Oe=!1,tt=!0,ze=!1,Ge="user-content-",_e=!0,$=!1,j={},B=null,q=Wo({},["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"]),le=null,ce=Wo({},["audio","video","img","source","image","track"]),Pe=null,Ue=Wo({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ht="http://www.w3.org/1998/Math/MathML",_t="http://www.w3.org/2000/svg",Dt="http://www.w3.org/1999/xhtml",X=Dt,We=!1,at=null,be=Wo({},[ht,_t,Dt],ahe),lt,oi=["application/xhtml+xml","text/html"],pe="text/html",Ke,Qe=null,st=o.createElement("form"),xt=function(Q){return Q instanceof RegExp||Q instanceof Function},Ct=function(Q){if(!(Qe&&Qe===Q)){if((!Q||typeof Q!="object")&&(Q={}),Q=$C(Q),lt=oi.indexOf(Q.PARSER_MEDIA_TYPE)===-1?lt=pe:lt=Q.PARSER_MEDIA_TYPE,Ke=lt==="application/xhtml+xml"?ahe:UU,V="ALLOWED_TAGS"in Q?Wo({},Q.ALLOWED_TAGS,Ke):ie,fe="ALLOWED_ATTR"in Q?Wo({},Q.ALLOWED_ATTR,Ke):K,at="ALLOWED_NAMESPACES"in Q?Wo({},Q.ALLOWED_NAMESPACES,ahe):be,Pe="ADD_URI_SAFE_ATTR"in Q?Wo($C(Ue),Q.ADD_URI_SAFE_ATTR,Ke):Ue,le="ADD_DATA_URI_TAGS"in Q?Wo($C(ce),Q.ADD_DATA_URI_TAGS,Ke):ce,B="FORBID_CONTENTS"in Q?Wo({},Q.FORBID_CONTENTS,Ke):q,je="FORBID_TAGS"in Q?Wo({},Q.FORBID_TAGS,Ke):{},Ae="FORBID_ATTR"in Q?Wo({},Q.FORBID_ATTR,Ke):{},j="USE_PROFILES"in Q?Q.USE_PROFILES:!1,Be=Q.ALLOW_ARIA_ATTR!==!1,Ie=Q.ALLOW_DATA_ATTR!==!1,ee=Q.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=Q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,te=Q.SAFE_FOR_TEMPLATES||!1,W=Q.WHOLE_DOCUMENT||!1,ae=Q.RETURN_DOM||!1,Ze=Q.RETURN_DOM_FRAGMENT||!1,Oe=Q.RETURN_TRUSTED_TYPE||!1,rt=Q.FORCE_BODY||!1,tt=Q.SANITIZE_DOM!==!1,ze=Q.SANITIZE_NAMED_PROPS||!1,_e=Q.KEEP_CONTENT!==!1,$=Q.IN_PLACE||!1,F=Q.ALLOWED_URI_REGEXP||Fqe,X=Q.NAMESPACE||Dt,oe=Q.CUSTOM_ELEMENT_HANDLING||{},Q.CUSTOM_ELEMENT_HANDLING&&xt(Q.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(oe.tagNameCheck=Q.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Q.CUSTOM_ELEMENT_HANDLING&&xt(Q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(oe.attributeNameCheck=Q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Q.CUSTOM_ELEMENT_HANDLING&&typeof Q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(oe.allowCustomizedBuiltInElements=Q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),te&&(Ie=!1),Ze&&(ae=!0),j&&(V=Wo({},[...Aqe]),fe=[],j.html===!0&&(Wo(V,Nqe),Wo(fe,Rqe)),j.svg===!0&&(Wo(V,lhe),Wo(fe,uhe),Wo(fe,WU)),j.svgFilters===!0&&(Wo(V,che),Wo(fe,uhe),Wo(fe,WU)),j.mathMl===!0&&(Wo(V,dhe),Wo(fe,Pqe),Wo(fe,WU))),Q.ADD_TAGS&&(V===ie&&(V=$C(V)),Wo(V,Q.ADD_TAGS,Ke)),Q.ADD_ATTR&&(fe===K&&(fe=$C(fe)),Wo(fe,Q.ADD_ATTR,Ke)),Q.ADD_URI_SAFE_ATTR&&Wo(Pe,Q.ADD_URI_SAFE_ATTR,Ke),Q.FORBID_CONTENTS&&(B===q&&(B=$C(B)),Wo(B,Q.FORBID_CONTENTS,Ke)),_e&&(V["#text"]=!0),W&&Wo(V,["html","head","body"]),V.table&&(Wo(V,["tbody"]),delete je.tbody),Q.TRUSTED_TYPES_POLICY){if(typeof Q.TRUSTED_TYPES_POLICY.createHTML!="function")throw AT('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw AT('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');b=Q.TRUSTED_TYPES_POLICY,C=b.createHTML("")}else b===void 0&&(b=CEt(f,n)),b!==null&&typeof C=="string"&&(C=b.createHTML(""));th&&th(Q),Qe=Q}},At=Wo({},["mi","mo","mn","ms","mtext"]),Gt=Wo({},["foreignobject","desc","title","annotation-xml"]),de=Wo({},["title","style","font","a","script"]),Ce=Wo({},lhe);Wo(Ce,che),Wo(Ce,uEt);let G=Wo({},dhe);Wo(G,hEt);let J=function(Q){let Ne=v(Q);(!Ne||!Ne.tagName)&&(Ne={namespaceURI:X,tagName:"template"});let ct=UU(Q.tagName),Jt=UU(Ne.tagName);return at[Q.namespaceURI]?Q.namespaceURI===_t?Ne.namespaceURI===Dt?ct==="svg":Ne.namespaceURI===ht?ct==="svg"&&(Jt==="annotation-xml"||At[Jt]):!!Ce[ct]:Q.namespaceURI===ht?Ne.namespaceURI===Dt?ct==="math":Ne.namespaceURI===_t?ct==="math"&&Gt[Jt]:!!G[ct]:Q.namespaceURI===Dt?Ne.namespaceURI===_t&&!Gt[Jt]||Ne.namespaceURI===ht&&!At[Jt]?!1:!G[ct]&&(de[ct]||!Ce[ct]):!!(lt==="application/xhtml+xml"&&at[Q.namespaceURI]):!1},Se=function(Q){NT(e.removed,{element:Q});try{Q.parentNode.removeChild(Q)}catch{Q.remove()}},$e=function(Q,Ne){try{NT(e.removed,{attribute:Ne.getAttributeNode(Q),from:Ne})}catch{NT(e.removed,{attribute:null,from:Ne})}if(Ne.removeAttribute(Q),Q==="is"&&!fe[Q])if(ae||Ze)try{Se(Ne)}catch{}else try{Ne.setAttribute(Q,"")}catch{}},xe=function(Q){let Ne,ct;if(rt)Q=""+Q;else{let Ci=aEt(Q,/^[\r\n\t ]+/);ct=Ci&&Ci[0]}lt==="application/xhtml+xml"&&X===Dt&&(Q=''+Q+"");let Jt=b?b.createHTML(Q):Q;if(X===Dt)try{Ne=new h().parseFromString(Jt,lt)}catch{}if(!Ne||!Ne.documentElement){Ne=w.createDocument(X,"template",null);try{Ne.documentElement.innerHTML=We?C:Jt}catch{}}let fi=Ne.body||Ne.documentElement;return Q&&ct&&fi.insertBefore(o.createTextNode(ct),fi.childNodes[0]||null),X===Dt?k.call(Ne,W?"html":"body")[0]:W?Ne.documentElement:fi},Te=function(Q){return S.call(Q.ownerDocument||Q,Q,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},He=function(Q){return Q instanceof u&&(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"||typeof Q.hasChildNodes!="function")},Me=function(Q){return typeof a=="object"?Q instanceof a:Q&&typeof Q=="object"&&typeof Q.nodeType=="number"&&typeof Q.nodeName=="string"},et=function(Q,Ne,ct){E[Q]&&sEt(E[Q],Jt=>{Jt.call(e,Ne,ct,Qe)})},Tt=function(Q){let Ne;if(et("beforeSanitizeElements",Q,null),He(Q))return Se(Q),!0;let ct=Ke(Q.nodeName);if(et("uponSanitizeElement",Q,{tagName:ct,allowedTags:V}),Q.hasChildNodes()&&!Me(Q.firstElementChild)&&(!Me(Q.content)||!Me(Q.content.firstElementChild))&&qf(/<[/\w]/g,Q.innerHTML)&&qf(/<[/\w]/g,Q.textContent))return Se(Q),!0;if(!V[ct]||je[ct]){if(!je[ct]&&se(ct)&&(oe.tagNameCheck instanceof RegExp&&qf(oe.tagNameCheck,ct)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ct)))return!1;if(_e&&!B[ct]){let Jt=v(Q)||Q.parentNode,fi=_(Q)||Q.childNodes;if(fi&&Jt){let Ci=fi.length;for(let Gi=Ci-1;Gi>=0;--Gi)Jt.insertBefore(m(fi[Gi],!0),y(Q))}}return Se(Q),!0}return Q instanceof l&&!J(Q)||(ct==="noscript"||ct==="noembed"||ct==="noframes")&&qf(/<\/no(script|embed|frames)/i,Q.innerHTML)?(Se(Q),!0):(te&&Q.nodeType===3&&(Ne=Q.textContent,Ne=fm(Ne,A," "),Ne=fm(Ne,T," "),Ne=fm(Ne,L," "),Q.textContent!==Ne&&(NT(e.removed,{element:Q.cloneNode()}),Q.textContent=Ne)),et("afterSanitizeElements",Q,null),!1)},Je=function(Q,Ne,ct){if(tt&&(Ne==="id"||Ne==="name")&&(ct in o||ct in st))return!1;if(!(Ie&&!Ae[Ne]&&qf(I,Ne))){if(!(Be&&qf(M,Ne))){if(!fe[Ne]||Ae[Ne]){if(!(se(Q)&&(oe.tagNameCheck instanceof RegExp&&qf(oe.tagNameCheck,Q)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(Q))&&(oe.attributeNameCheck instanceof RegExp&&qf(oe.attributeNameCheck,Ne)||oe.attributeNameCheck instanceof Function&&oe.attributeNameCheck(Ne))||Ne==="is"&&oe.allowCustomizedBuiltInElements&&(oe.tagNameCheck instanceof RegExp&&qf(oe.tagNameCheck,ct)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ct))))return!1}else if(!Pe[Ne]){if(!qf(F,fm(ct,z,""))){if(!((Ne==="src"||Ne==="xlink:href"||Ne==="href")&&Q!=="script"&&lEt(ct,"data:")===0&&le[Q])){if(!(ee&&!qf(N,fm(ct,z,"")))){if(ct)return!1}}}}}}return!0},se=function(Q){return Q.indexOf("-")>0},he=function(Q){let Ne,ct,Jt,fi;et("beforeSanitizeAttributes",Q,null);let{attributes:Ci}=Q;if(!Ci)return;let Gi={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:fe};for(fi=Ci.length;fi--;){Ne=Ci[fi];let{name:pn,namespaceURI:ro}=Ne;if(ct=pn==="value"?Ne.value:cEt(Ne.value),Jt=Ke(pn),Gi.attrName=Jt,Gi.attrValue=ct,Gi.keepAttr=!0,Gi.forceKeepAttr=void 0,et("uponSanitizeAttribute",Q,Gi),ct=Gi.attrValue,Gi.forceKeepAttr||($e(pn,Q),!Gi.keepAttr))continue;if(!Z&&qf(/\/>/i,ct)){$e(pn,Q);continue}te&&(ct=fm(ct,A," "),ct=fm(ct,T," "),ct=fm(ct,L," "));let yr=Ke(Q.nodeName);if(Je(yr,Jt,ct)){if(ze&&(Jt==="id"||Jt==="name")&&($e(pn,Q),ct=Ge+ct),b&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!ro)switch(f.getAttributeType(yr,Jt)){case"TrustedHTML":{ct=b.createHTML(ct);break}case"TrustedScriptURL":{ct=b.createScriptURL(ct);break}}try{ro?Q.setAttributeNS(ro,pn,ct):Q.setAttribute(pn,ct),Mqe(e.removed)}catch{}}}et("afterSanitizeAttributes",Q,null)},Ee=function we(Q){let Ne,ct=Te(Q);for(et("beforeSanitizeShadowDOM",Q,null);Ne=ct.nextNode();)et("uponSanitizeShadowNode",Ne,null),!Tt(Ne)&&(Ne.content instanceof r&&we(Ne.content),he(Ne));et("afterSanitizeShadowDOM",Q,null)};return e.sanitize=function(we){let Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ne,ct,Jt,fi;if(We=!we,We&&(we=""),typeof we!="string"&&!Me(we))if(typeof we.toString=="function"){if(we=we.toString(),typeof we!="string")throw AT("dirty is not a string, aborting")}else throw AT("toString is not a function");if(!e.isSupported)return we;if(Le||Ct(Q),e.removed=[],typeof we=="string"&&($=!1),$){if(we.nodeName){let pn=Ke(we.nodeName);if(!V[pn]||je[pn])throw AT("root node is forbidden and cannot be sanitized in-place")}}else if(we instanceof a)Ne=xe(""),ct=Ne.ownerDocument.importNode(we,!0),ct.nodeType===1&&ct.nodeName==="BODY"||ct.nodeName==="HTML"?Ne=ct:Ne.appendChild(ct);else{if(!ae&&!te&&!W&&we.indexOf("<")===-1)return b&&Oe?b.createHTML(we):we;if(Ne=xe(we),!Ne)return ae?null:Oe?C:""}Ne&&rt&&Se(Ne.firstChild);let Ci=Te($?we:Ne);for(;Jt=Ci.nextNode();)Tt(Jt)||(Jt.content instanceof r&&Ee(Jt.content),he(Jt));if($)return we;if(ae){if(Ze)for(fi=x.call(Ne.ownerDocument);Ne.firstChild;)fi.appendChild(Ne.firstChild);else fi=Ne;return(fe.shadowroot||fe.shadowrootmode)&&(fi=D.call(t,fi,!0)),fi}let Gi=W?Ne.outerHTML:Ne.innerHTML;return W&&V["!doctype"]&&Ne.ownerDocument&&Ne.ownerDocument.doctype&&Ne.ownerDocument.doctype.name&&qf(Hqe,Ne.ownerDocument.doctype.name)&&(Gi=" -`+Gi),te&&(Gi=fm(Gi,A," "),Gi=fm(Gi,T," "),Gi=fm(Gi,L," ")),b&&Oe?b.createHTML(Gi):Gi},e.setConfig=function(we){Ct(we),Le=!0},e.clearConfig=function(){Qe=null,Le=!1},e.isValidAttribute=function(we,Q,Ne){Qe||Ct({});let ct=Ke(we),Jt=Ke(Q);return Je(ct,Jt,Ne)},e.addHook=function(we,Q){typeof Q=="function"&&(E[we]=E[we]||[],NT(E[we],Q))},e.removeHook=function(we){if(E[we])return Mqe(E[we])},e.removeHooks=function(we){E[we]&&(E[we]=[])},e.removeAllHooks=function(){E={}},e}var zqe,Iqe,iEt,nEt,oEt,th,pm,rEt,hhe,fhe,sEt,Mqe,NT,UU,ahe,aEt,fm,lEt,cEt,qf,AT,Nqe,lhe,che,uEt,dhe,hEt,Aqe,Rqe,uhe,Pqe,WU,fEt,pEt,mEt,gEt,vEt,Fqe,_Et,bEt,Hqe,Oqe,yEt,CEt,Hg,v4i,_4i,$U,b4i,y4i,C4i,RT,jU,w4i,x4i,qU=P(()=>{({entries:zqe,setPrototypeOf:Iqe,isFrozen:iEt,getPrototypeOf:nEt,getOwnPropertyDescriptor:oEt}=Object),{freeze:th,seal:pm,create:rEt}=Object,{apply:hhe,construct:fhe}=typeof Reflect<"u"&&Reflect;hhe||(hhe=function(e,t,n){return e.apply(t,n)});th||(th=function(e){return e});pm||(pm=function(e){return e});fhe||(fhe=function(e,t){return new e(...t)});sEt=op(Array.prototype.forEach),Mqe=op(Array.prototype.pop),NT=op(Array.prototype.push),UU=op(String.prototype.toLowerCase),ahe=op(String.prototype.toString),aEt=op(String.prototype.match),fm=op(String.prototype.replace),lEt=op(String.prototype.indexOf),cEt=op(String.prototype.trim),qf=op(RegExp.prototype.test),AT=dEt(TypeError);Nqe=th(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),lhe=th(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),che=th(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),uEt=th(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),dhe=th(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),hEt=th(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Aqe=th(["#text"]),Rqe=th(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),uhe=th(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Pqe=th(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),WU=th(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),fEt=pm(/\{\{[\w\W]*|[\w\W]*\}\}/gm),pEt=pm(/<%[\w\W]*|[\w\W]*%>/gm),mEt=pm(/\${[\w\W]*}/gm),gEt=pm(/^data-[\-\w.\u00B7-\uFFFF]/),vEt=pm(/^aria-[\-\w]+$/),Fqe=pm(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_Et=pm(/^(?:\w+script|data):/i),bEt=pm(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Hqe=pm(/^html$/i),Oqe=Object.freeze({__proto__:null,MUSTACHE_EXPR:fEt,ERB_EXPR:pEt,TMPLIT_EXPR:mEt,DATA_ATTR:gEt,ARIA_ATTR:vEt,IS_ALLOWED_URI:Fqe,IS_SCRIPT_OR_DATA:_Et,ATTR_WHITESPACE:bEt,DOCTYPE_NAME:Hqe}),yEt=()=>typeof window>"u"?null:window,CEt=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));let r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}};Hg=Bqe(),v4i=Hg.version,_4i=Hg.isSupported,$U=Hg.sanitize,b4i=Hg.setConfig,y4i=Hg.clearConfig,C4i=Hg.isValidAttribute,RT=Hg.addHook,jU=Hg.removeHook,w4i=Hg.removeHooks,x4i=Hg.removeAllHooks});function PT(i,e){return li.isUri(i)?G0(i.scheme,e):OC(i,e+":")}function mhe(i,...e){return e.some(t=>PT(i,t))}var $i,wEt,phe,ghe,xEt,GU,KU,Wqe,Nc=P(()=>{Pi();Mn();Ri();Io();(function(i){i.inMemory="inmemory",i.vscode="vscode",i.internal="private",i.walkThrough="walkThrough",i.walkThroughSnippet="walkThroughSnippet",i.http="http",i.https="https",i.file="file",i.mailto="mailto",i.untitled="untitled",i.data="data",i.command="command",i.vscodeRemote="vscode-remote",i.vscodeRemoteResource="vscode-remote-resource",i.vscodeManagedRemoteResource="vscode-managed-remote-resource",i.vscodeUserData="vscode-userdata",i.vscodeCustomEditor="vscode-custom-editor",i.vscodeNotebookCell="vscode-notebook-cell",i.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",i.vscodeNotebookCellOutput="vscode-notebook-cell-output",i.vscodeInteractiveInput="vscode-interactive-input",i.vscodeSettings="vscode-settings",i.vscodeWorkspaceTrust="vscode-workspace-trust",i.vscodeTerminal="vscode-terminal",i.vscodeChatSesssion="vscode-chat-editor",i.webviewPanel="webview-panel",i.vscodeWebview="vscode-webview",i.extension="extension",i.vscodeFileResource="vscode-file",i.tmp="tmp",i.vsls="vsls",i.vscodeSourceControl="vscode-scm"})($i||($i={}));wEt="tkn",phe=class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${$i.vscodeRemoteResource}`}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(a){return hi(a),e}let t=e.authority,n=this._hosts[t];n&&n.indexOf(":")!==-1&&n.indexOf("[")===-1&&(n=`[${n}]`);let o=this._ports[t],r=this._connectionTokens[t],s=`path=${encodeURIComponent(e.path)}`;return typeof r=="string"&&(s+=`&${wEt}=${encodeURIComponent(r)}`),li.from({scheme:Fh?this._preferredWebSchema:$i.vscodeRemoteResource,authority:`${n}:${o}`,path:this._remoteResourcesPath,query:s})}},ghe=new phe,xEt="vscode-app",GU=class i{uriToBrowserUri(e){return e.scheme===$i.vscodeRemote?ghe.rewrite(e):e.scheme===$i.file&&(tu||Lje===`${$i.vscodeFileResource}://${i.FALLBACK_AUTHORITY}`)?e.with({scheme:$i.vscodeFileResource,authority:e.authority||i.FALLBACK_AUTHORITY,query:null,fragment:null}):e}};GU.FALLBACK_AUTHORITY=xEt;KU=new GU;(function(i){let e=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);i.CoopAndCoep=Object.freeze(e.get("3"));let t="vscode-coi";function n(r){let s;typeof r=="string"?s=new URL(r).searchParams:r instanceof URL?s=r.searchParams:li.isUri(r)&&(s=new URL(r.toString(!0)).searchParams);let a=s?.get(t);if(a)return e.get(a)}i.getHeadersFromQuery=n;function o(r,s,a){if(!globalThis.crossOriginIsolated)return;let l=s&&a?"3":a?"2":"1";r instanceof URLSearchParams?r.set(t,l):r[t]=l}i.addSearchParam=o})(Wqe||(Wqe={}))});function V3(i){return FT(i,0)}function FT(i,e){switch(typeof i){case"object":return i===null?Y0(349,e):Array.isArray(i)?kEt(i,e):LEt(i,e);case"string":return YU(i,e);case"boolean":return SEt(i,e);case"number":return Y0(i,e);case"undefined":return Y0(937,e);default:return Y0(617,e)}}function Y0(i,e){return(e<<5)-e+i|0}function SEt(i,e){return Y0(i?433:863,e)}function YU(i,e){e=Y0(149417,e);for(let t=0,n=i.length;tFT(n,t),e)}function LEt(i,e){return e=Y0(181387,e),Object.keys(i).sort().reduce((t,n)=>(t=YU(n,t),FT(i[n],t)),e)}function vhe(i,e,t=32){let n=t-e,o=~((1<>>n)>>>0}function Uqe(i,e=0,t=i.byteLength,n=0){for(let o=0;ot.toString(16).padStart(2,"0")).join(""):EEt((i>>>0).toString(16),e/4)}var zT,W3=P(()=>{Ri();zT=class i{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){let t=e.length;if(t===0)return;let n=this._buff,o=this._buffLen,r=this._leftoverHighSurrogate,s,a;for(r!==0?(s=r,a=-1,r=0):(s=e.charCodeAt(0),a=0);;){let l=s;if(Or(s))if(a+1>>6,e[t++]=128|(n&63)>>>0):n<65536?(e[t++]=224|(n&61440)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0):(e[t++]=240|(n&1835008)>>>18,e[t++]=128|(n&258048)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),OT(this._h0)+OT(this._h1)+OT(this._h2)+OT(this._h3)+OT(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,Uqe(this._buff,this._buffLen),this._buffLen>56&&(this._step(),Uqe(this._buff));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){let e=i._bigBlock32,t=this._buffDV;for(let u=0;u<64;u+=4)e.setUint32(u,t.getUint32(u,!1),!1);for(let u=64;u<320;u+=4)e.setUint32(u,vhe(e.getUint32(u-12,!1)^e.getUint32(u-32,!1)^e.getUint32(u-56,!1)^e.getUint32(u-64,!1),1),!1);let n=this._h0,o=this._h1,r=this._h2,s=this._h3,a=this._h4,l,c,d;for(let u=0;u<80;u++)u<20?(l=o&r|~o&s,c=1518500249):u<40?(l=o^r^s,c=1859775393):u<60?(l=o&r|o&s|r&s,c=2400959708):(l=o^r^s,c=3395469782),d=vhe(n,5)+l+a+c+e.getUint32(u*4,!1)&4294967295,a=s,s=r,r=vhe(o,30),o=n,n=d;this._h0=this._h0+n&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+r&4294967295,this._h3=this._h3+s&4294967295,this._h4=this._h4+a&4294967295}};zT._bigBlock32=new DataView(new ArrayBuffer(320))});function is(i){for(;i.firstChild;)i.firstChild.remove()}function Xe(i,e,t,n){return new bhe(i,e,t,n)}function Kqe(i,e){return function(t){return e(new Oa(i,t))}}function TEt(i){return function(e){return i(new qn(e))}}function IEt(i,e,t){return Xe(i,Lc&&VC.pointerEvents?Lt.POINTER_DOWN:Lt.MOUSE_DOWN,e,t)}function S5(i,e,t){return WC(i,e,t)}function VT(i){return pi(i).getComputedStyle(i,null)}function jh(i,e){let t=pi(i),n=t.document;if(i!==n.body)return new Xn(i.clientWidth,i.clientHeight);if(Lc&&t?.visualViewport)return new Xn(t.visualViewport.width,t.visualViewport.height);if(t?.innerWidth&&t.innerHeight)return new Xn(t.innerWidth,t.innerHeight);if(n.body&&n.body.clientWidth&&n.body.clientHeight)return new Xn(n.body.clientWidth,n.body.clientHeight);if(n.documentElement&&n.documentElement.clientWidth&&n.documentElement.clientHeight)return new Xn(n.documentElement.clientWidth,n.documentElement.clientHeight);if(e)return jh(e);throw new Error("Unable to figure out browser width and height")}function XU(i){let e=i.offsetParent,t=i.offsetTop,n=i.offsetLeft;for(;(i=i.parentNode)!==null&&i!==i.ownerDocument.body&&i!==i.ownerDocument.documentElement;){t-=i.scrollTop;let o=Qqe(i)?null:VT(i);o&&(n-=o.direction!=="rtl"?i.scrollLeft:-i.scrollLeft),i===e&&(n+=su.getBorderLeftWidth(i),t+=su.getBorderTopWidth(i),t+=i.offsetTop,n+=i.offsetLeft,e=i.offsetParent)}return{left:n,top:t}}function Zqe(i,e,t){typeof e=="number"&&(i.style.width=`${e}px`),typeof t=="number"&&(i.style.height=`${t}px`)}function Lo(i){let e=i.getBoundingClientRect(),t=pi(i);return{left:e.left+t.scrollX,top:e.top+t.scrollY,width:e.width,height:e.height}}function QU(i){let e=i,t=1;do{let n=VT(e).zoom;n!=null&&n!=="1"&&(t*=n),e=e.parentElement}while(e!==null&&e!==e.ownerDocument.documentElement);return t}function wl(i){let e=su.getMarginLeft(i)+su.getMarginRight(i);return i.offsetWidth+e}function JU(i){let e=su.getBorderLeftWidth(i)+su.getBorderRightWidth(i),t=su.getPaddingLeft(i)+su.getPaddingRight(i);return i.offsetWidth-e-t}function Xqe(i){let e=su.getBorderTopWidth(i)+su.getBorderBottomWidth(i),t=su.getPaddingTop(i)+su.getPaddingBottom(i);return i.offsetHeight-e-t}function Bg(i){let e=su.getMarginTop(i)+su.getMarginBottom(i);return i.offsetHeight+e}function ms(i,e){return!!e?.contains(i)}function MEt(i,e,t){for(;i&&i.nodeType===i.ELEMENT_NODE;){if(i.classList.contains(e))return i;if(t){if(typeof t=="string"){if(i.classList.contains(t))return null}else if(i===t)return null}i=i.parentNode}return null}function e$(i,e,t){return!!MEt(i,e,t)}function Qqe(i){return i&&!!i.host&&!!i.mode}function k5(i){return!!mm(i)}function mm(i){for(var e;i.parentNode;){if(i===((e=i.ownerDocument)===null||e===void 0?void 0:e.body))return null;i=i.parentNode}return Qqe(i)?i:null}function gs(){let i=X0().activeElement;for(;i?.shadowRoot;)i=i.shadowRoot.activeElement;return i}function L5(i){return gs()===i}function t$(i){return ms(gs(),i)}function X0(){var i;return DEt()<=1?Hn.document:(i=Array.from(qqe()).map(({window:t})=>t.document).find(t=>t.hasFocus()))!==null&&i!==void 0?i:Hn.document}function Jqe(){var i,e;return(e=(i=X0().defaultView)===null||i===void 0?void 0:i.window)!==null&&e!==void 0?e:Hn}function eGe(){return new yhe}function ya(i=Hn.document.head,e,t){let n=document.createElement("style");if(n.type="text/css",n.media="screen",e?.(n),i.appendChild(n),t&&t.add(Yt(()=>i.removeChild(n))),i===Hn.document.head){let o=new Set;whe.set(n,o);for(let{window:r,disposables:s}of qqe()){if(r===Hn)continue;let a=s.add(NEt(n,o,r));t?.add(a)}}return n}function NEt(i,e,t){var n,o;let r=new Ye,s=i.cloneNode(!0);t.document.head.appendChild(s),r.add(Yt(()=>t.document.head.removeChild(s)));for(let a of iGe(i))(n=s.sheet)===null||n===void 0||n.insertRule(a.cssText,(o=s.sheet)===null||o===void 0?void 0:o.cssRules.length);return r.add(AEt.observe(i,r,{childList:!0})(()=>{s.textContent=i.textContent})),e.add(s),r.add(Yt(()=>e.delete(s))),r}function tGe(){return _he||(_he=ya()),_he}function iGe(i){var e,t;return!((e=i?.sheet)===null||e===void 0)&&e.rules?i.sheet.rules:!((t=i?.sheet)===null||t===void 0)&&t.cssRules?i.sheet.cssRules:[]}function GC(i,e,t=tGe()){var n,o;if(!(!t||!e)){(n=t.sheet)===null||n===void 0||n.insertRule(`${i} {${e}}`,0);for(let r of(o=whe.get(t))!==null&&o!==void 0?o:[])GC(i,e,r)}}function i$(i,e=tGe()){var t,n;if(!e)return;let o=iGe(e),r=[];for(let s=0;s=0;s--)(t=e.sheet)===null||t===void 0||t.deleteRule(r[s]);for(let s of(n=whe.get(e))!==null&&n!==void 0?n:[])i$(i,s)}function REt(i){return typeof i.selectorText=="string"}function KC(i){return i instanceof MouseEvent||i instanceof pi(i).MouseEvent}function YC(i){return i instanceof KeyboardEvent||i instanceof pi(i).KeyboardEvent}function nGe(i){let e=i;return!!(e&&typeof e.preventDefault=="function"&&typeof e.stopPropagation=="function")}function oGe(i){let e=[];for(let t=0;i&&i.nodeType===i.ELEMENT_NODE;t++)e[t]=i.scrollTop,i=i.parentNode;return e}function rGe(i,e){for(let t=0;i&&i.nodeType===i.ELEMENT_NODE;t++)i.scrollTop!==e[t]&&(i.scrollTop=e[t]),i=i.parentNode}function Kl(i){return new Che(i)}function sGe(i,e){return i.after(e),e}function ut(i,...e){if(i.append(...e),e.length===1&&typeof e[0]!="string")return e[0]}function ZC(i,e){return i.insertBefore(e,i.firstChild),e}function ns(i,...e){i.innerText="",ut(i,...e)}function aGe(i,e,t,...n){let o=PEt.exec(e);if(!o)throw new Error("Bad use of emmet");let r=o[1]||"div",s;return i!==BT.HTML?s=document.createElementNS(i,r):s=document.createElement(r),o[3]&&(s.id=o[3]),o[4]&&(s.className=o[4].replace(/\./g," ").trim()),t&&Object.entries(t).forEach(([a,l])=>{typeof l>"u"||(/^on\w+$/.test(a)?s[a]=l:a==="selected"?l&&s.setAttribute(a,"true"):s.setAttribute(a,l))}),s.append(...n),s}function pt(i,e,...t){return aGe(BT.HTML,i,e,...t)}function lGe(i,...e){i?el(...e):Fa(...e)}function el(...i){for(let e of i)e.style.display="",e.removeAttribute("aria-hidden")}function Fa(...i){for(let e of i)e.style.display="none",e.setAttribute("aria-hidden","true")}function xhe(i,e){let t=i.devicePixelRatio*e;return Math.max(1,Math.floor(t))/i.devicePixelRatio}function n$(i){Hn.open(i,"_blank","noopener")}function cGe(i,e){let t=()=>{e(),n=za(i,t)},n=za(i,t);return Yt(()=>n.dispose())}function rp(i){return i?`url('${KU.uriToBrowserUri(i).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function She(i){return`'${i.replace(/'/g,"%27")}'`}function Gf(i,e){if(i!==void 0){let t=i.match(/^\s*var\((.+)\)$/);if(t){let n=t[1].split(",",2);return n.length===2&&(e=Gf(n[1].trim(),e)),`var(${n[0]}, ${e})`}return i}return e}function dGe(i,e=!1){let t=document.createElement("a");return RT("afterSanitizeAttributes",n=>{for(let o of["href","src"])if(n.hasAttribute(o)){let r=n.getAttribute(o);if(o==="href"&&r.startsWith("#"))continue;if(t.href=r,!i.includes(t.protocol.replace(/:$/,""))){if(e&&o==="src"&&t.href.startsWith("data:"))continue;n.removeAttribute(o)}}}),Yt(()=>{jU("afterSanitizeAttributes")})}function Do(i,...e){let t,n;Array.isArray(e[0])?(t={},n=e[0]):(t=e[0]||{},n=e[1]);let o=OEt.exec(i);if(!o||!o.groups)throw new Error("Bad use of h");let r=o.groups.tag||"div",s=document.createElement(r);o.groups.id&&(s.id=o.groups.id);let a=[];if(o.groups.class)for(let c of o.groups.class.split("."))c!==""&&a.push(c);if(t.className!==void 0)for(let c of t.className.split("."))c!==""&&a.push(c);a.length>0&&(s.className=a.join(" "));let l={};if(o.groups.name&&(l[o.groups.name]=s),n)for(let c of n)c instanceof HTMLElement?s.appendChild(c):typeof c=="string"?s.append(c):"root"in c&&(Object.assign(l,c),s.appendChild(c.root));for(let[c,d]of Object.entries(t))if(c!=="className")if(c==="style")for(let[u,h]of Object.entries(d))s.style.setProperty(jqe(u),typeof h=="number"?h+"px":""+h);else c==="tabIndex"?s.tabIndex=d:s.setAttribute(jqe(c),d.toString());return l.root=s,l}function jqe(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}var z4i,pi,F4i,qqe,DEt,$qe,H4i,B4i,x5,Gqe,V4i,bhe,go,Yqe,jC,qC,za,U3,HT,su,Xn,whe,yhe,AEt,_he,Lt,nn,Che,PEt,BT,uGe,W4i,Z0,ZU,OEt,Qt=P(()=>{Xc();PU();Gl();Uh();Qi();Pi();Xt();qU();nt();Nc();Mn();W3();_l();({registerWindow:z4i,getWindow:pi,getDocument:F4i,getWindows:qqe,getWindowsCount:DEt,getWindowId:$qe,getWindowById:H4i,hasWindow:B4i,onDidRegisterWindow:x5,onWillUnregisterWindow:Gqe,onDidUnregisterWindow:V4i}=function(){let i=new Map;tqe(Hn,1),i.set(Hn.vscodeWindowId,{window:Hn,disposables:new Ye});let e=new ge,t=new ge,n=new ge;return{onDidRegisterWindow:e.event,onWillUnregisterWindow:n.event,onDidUnregisterWindow:t.event,registerWindow(o){if(i.has(o.vscodeWindowId))return ue.None;let r=new Ye,s={window:o,disposables:r.add(new Ye)};return i.set(o.vscodeWindowId,s),r.add(Yt(()=>{i.delete(o.vscodeWindowId),t.fire(o)})),r.add(Xe(o,Lt.BEFORE_UNLOAD,()=>{n.fire(o)})),e.fire(s),r},getWindows(){return i.values()},getWindowsCount(){return i.size},getWindowId(o){return o.vscodeWindowId},hasWindow(o){return i.has(o)},getWindowById(o){return i.get(o)},getWindow(o){var r;let s=o;if(!((r=s?.ownerDocument)===null||r===void 0)&&r.defaultView)return s.ownerDocument.defaultView.window;let a=o;return a?.view?a.view.window:Hn},getDocument(o){return pi(o).document}}}());bhe=class{constructor(e,t,n,o){this._node=e,this._type=t,this._handler=n,this._options=o||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};go=function(e,t,n,o){let r=n;return t==="click"||t==="mousedown"?r=Kqe(pi(e),n):(t==="keydown"||t==="keypress"||t==="keyup")&&(r=TEt(n)),Xe(e,t,r,o)},Yqe=function(e,t,n){let o=Kqe(pi(e),t);return IEt(e,o,n)};jC=class extends IT{constructor(e,t){super(e,t)}},U3=class extends H3{constructor(e){super(),this.defaultTarget=e&&pi(e)}cancelAndSet(e,t,n){return super.cancelAndSet(e,t,n??this.defaultTarget)}},HT=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){hi(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let i=new Map,e=new Map,t=new Map,n=new Map,o=r=>{var s;t.set(r,!1);let a=(s=i.get(r))!==null&&s!==void 0?s:[];for(e.set(r,a),i.set(r,[]),n.set(r,!0);a.length>0;)a.sort(HT.sort),a.shift().execute();n.set(r,!1)};za=(r,s,a=0)=>{let l=$qe(r),c=new HT(s,a),d=i.get(l);return d||(d=[],i.set(l,d)),d.push(c),t.get(l)||(t.set(l,!0),r.requestAnimationFrame(()=>o(l))),c},qC=(r,s,a)=>{let l=$qe(r);if(n.get(l)){let c=new HT(s,a),d=e.get(l);return d||(d=[],e.set(l,d)),d.push(c),c}else return za(r,s,a)}})();su=class i{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,n){let o=VT(e),r=o?o.getPropertyValue(t):"0";return i.convertToPixels(e,r)}static getBorderLeftWidth(e){return i.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return i.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return i.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return i.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return i.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return i.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return i.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return i.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return i.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return i.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return i.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return i.getDimension(e,"margin-bottom","marginBottom")}},Xn=class i{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new i(e,t):this}static is(e){return typeof e=="object"&&typeof e.height=="number"&&typeof e.width=="number"}static lift(e){return e instanceof i?e:new i(e.width,e.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}};Xn.None=new Xn(0,0);whe=new Map;yhe=class{constructor(){this._currentCssStyle="",this._styleSheet=void 0}setStyle(e){e!==this._currentCssStyle&&(this._currentCssStyle=e,this._styleSheet?this._styleSheet.innerText=e:this._styleSheet=ya(Hn.document.head,t=>t.innerText=e))}dispose(){this._styleSheet&&(is(this._styleSheet),this._styleSheet=void 0)}};AEt=new class{constructor(){this.mutationObservers=new Map}observe(i,e,t){let n=this.mutationObservers.get(i);n||(n=new Map,this.mutationObservers.set(i,n));let o=V3(t),r=n.get(o);if(r)r.users+=1;else{let s=new ge,a=new MutationObserver(c=>s.fire(c));a.observe(i,t);let l=r={users:1,observer:a,onDidMutate:s.event};e.add(Yt(()=>{l.users-=1,l.users===0&&(s.dispose(),a.disconnect(),n?.delete(o),n?.size===0&&this.mutationObservers.delete(i))})),n.set(o,r)}return r.onDidMutate}},_he=null;Lt={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:cm?"webkitAnimationStart":"animationstart",ANIMATION_END:cm?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:cm?"webkitAnimationIteration":"animationiteration"};nn={stop:(i,e)=>(i.preventDefault(),e&&i.stopPropagation(),i)};Che=class i extends ue{static hasFocusWithin(e){if(e instanceof HTMLElement){let t=mm(e),n=t?t.activeElement:e.ownerDocument.activeElement;return ms(n,e)}else{let t=e;return ms(t.document.activeElement,t.document)}}constructor(e){super(),this._onDidFocus=this._register(new ge),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new ge),this.onDidBlur=this._onDidBlur.event;let t=i.hasFocusWithin(e),n=!1,o=()=>{n=!1,t||(t=!0,this._onDidFocus.fire())},r=()=>{t&&(n=!0,(e instanceof HTMLElement?pi(e):e).setTimeout(()=>{n&&(n=!1,t=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{i.hasFocusWithin(e)!==t&&(t?r():o())},this._register(Xe(e,Lt.FOCUS,o,!0)),this._register(Xe(e,Lt.BLUR,r,!0)),e instanceof HTMLElement&&(this._register(Xe(e,Lt.FOCUS_IN,()=>this._refreshStateHandler())),this._register(Xe(e,Lt.FOCUS_OUT,()=>this._refreshStateHandler())))}};PEt=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;(function(i){i.HTML="http://www.w3.org/1999/xhtml",i.SVG="http://www.w3.org/2000/svg"})(BT||(BT={}));pt.SVG=function(i,e,...t){return aGe(BT.SVG,i,e,...t)};ghe.setPreferredWebSchema(/^https:/.test(Hn.location.href)?"https":"http");uGe=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]),W4i=Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type","start"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0}),Z0=class i extends ge{constructor(){super(),this._subscriptions=new Ye,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(Et.runAndSubscribe(x5,({window:e,disposables:t})=>this.registerListeners(e,t),{window:Hn,disposables:this._subscriptions}))}registerListeners(e,t){t.add(Xe(e,"keydown",n=>{if(n.defaultPrevented)return;let o=new qn(n);if(!(o.keyCode===6&&n.repeat)){if(n.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(n.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(n.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(n.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(o.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=n.altKey,this._keyStatus.ctrlKey=n.ctrlKey,this._keyStatus.metaKey=n.metaKey,this._keyStatus.shiftKey=n.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=n,this.fire(this._keyStatus))}},!0)),t.add(Xe(e,"keyup",n=>{n.defaultPrevented||(!n.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!n.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!n.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!n.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=n.altKey,this._keyStatus.ctrlKey=n.ctrlKey,this._keyStatus.metaKey=n.metaKey,this._keyStatus.shiftKey=n.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=n,this.fire(this._keyStatus)))},!0)),t.add(Xe(e.document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),t.add(Xe(e.document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),t.add(Xe(e.document.body,"mousemove",n=>{n.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),t.add(Xe(e,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return i.instance||(i.instance=new i),i.instance}dispose(){super.dispose(),this._subscriptions.dispose()}},ZU=class extends ue{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this.callbacks.onDragStart&&this._register(Xe(this.element,Lt.DRAG_START,e=>{var t,n;(n=(t=this.callbacks).onDragStart)===null||n===void 0||n.call(t,e)})),this.callbacks.onDrag&&this._register(Xe(this.element,Lt.DRAG,e=>{var t,n;(n=(t=this.callbacks).onDrag)===null||n===void 0||n.call(t,e)})),this._register(Xe(this.element,Lt.DRAG_ENTER,e=>{var t,n;this.counter++,this.dragStartTime=e.timeStamp,(n=(t=this.callbacks).onDragEnter)===null||n===void 0||n.call(t,e)})),this._register(Xe(this.element,Lt.DRAG_OVER,e=>{var t,n;e.preventDefault(),(n=(t=this.callbacks).onDragOver)===null||n===void 0||n.call(t,e,e.timeStamp-this.dragStartTime)})),this._register(Xe(this.element,Lt.DRAG_LEAVE,e=>{var t,n;this.counter--,this.counter===0&&(this.dragStartTime=0,(n=(t=this.callbacks).onDragLeave)===null||n===void 0||n.call(t,e))})),this._register(Xe(this.element,Lt.DRAG_END,e=>{var t,n;this.counter=0,this.dragStartTime=0,(n=(t=this.callbacks).onDragEnd)===null||n===void 0||n.call(t,e)})),this._register(Xe(this.element,Lt.DROP,e=>{var t,n;this.counter=0,this.dragStartTime=0,(n=(t=this.callbacks).onDrop)===null||n===void 0||n.call(t,e)}))}},OEt=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/});function nh(i,e){Zi.registerCommand(i,function(t,...n){let o=t.get(qt),[r,s]=n;Bn(li.isUri(r)),Bn(ke.isIPosition(s));let a=t.get(no).getModel(r);if(a){let l=ke.lift(s);return o.invokeFunction(e,a,l,...n.slice(2))}return t.get(xs).createModelReference(r).then(l=>new Promise((c,d)=>{try{let u=o.invokeFunction(e,l.object.textEditorModel,ke.lift(s),n.slice(2));c(u)}catch(u){d(u)}}).finally(()=>{l.dispose()}))})}function zt(i){return ih.INSTANCE.registerEditorCommand(i),i}function yt(i){let e=new i;return ih.INSTANCE.registerEditorAction(e),e}function khe(i){return ih.INSTANCE.registerEditorAction(i),i}function hGe(i){ih.INSTANCE.registerEditorAction(i)}function Ii(i,e,t){ih.INSTANCE.registerEditorContribution(i,e,t)}function UT(i){return i.register(),i}var E5,Q0,o$,Jo,Ot,WT,kd,$3,zEt,ih,Lhe,Ehe,fGe,an=P(()=>{Wt();Io();fs();Mi();Dc();Wh();Dr();$o();Xi();_i();O3();Ys();$f();ho();Ju();Qt();E5=class{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this.metadata=e.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){let e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(let t of e){let n=t.kbExpr;this.precondition&&(n?n=mt.and(n,this.precondition):n=this.precondition);let o={id:this.id,weight:t.weight,args:t.args,when:n,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};Pa.registerKeybindingRule(o)}}Zi.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),metadata:this.metadata})}_registerMenuItem(e){ps.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}},Q0=class extends E5{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,n,o){return this._implementations.push({priority:e,name:t,implementation:n,when:o}),this._implementations.sort((r,s)=>s.priority-r.priority),{dispose:()=>{for(let r=0;r{if(a.get(ri).contextMatchesRules(n??void 0))return o(a,s,t)})}runCommand(e,t){return i.runEditorCommand(e,t,this.precondition,(n,o,r)=>this.runEditorCommand(n,o,r))}},Ot=class i extends Jo{static convertOptions(e){let t;Array.isArray(e.menuOpts)?t=e.menuOpts:e.menuOpts?t=[e.menuOpts]:t=[];function n(o){return o.menuId||(o.menuId=ne.EditorContext),o.title||(o.title=e.label),o.when=mt.and(e.precondition,o.when),o}return Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(n)):e.contextMenuOpts&&t.push(n(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super(i.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,n){return this.reportTelemetry(e,t),this.run(e,t,n||{})}reportTelemetry(e,t){e.get(Fs).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}},WT=class extends Ot{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort((n,o)=>o[0]-n[0]),{dispose:()=>{for(let n=0;n{var s,a;let l=r.get(ri),c=r.get(ks);if(!l.contextMatchesRules((s=this.desc.precondition)!==null&&s!==void 0?s:void 0)){c.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,(a=this.desc.precondition)===null||a===void 0?void 0:a.serialize());return}return this.runEditorCommand(r,o,...t)})}};(function(i){function e(s){return ih.INSTANCE.getEditorCommand(s)}i.getEditorCommand=e;function t(){return ih.INSTANCE.getEditorActions()}i.getEditorActions=t;function n(){return ih.INSTANCE.getEditorContributions()}i.getEditorContributions=n;function o(s){return ih.INSTANCE.getEditorContributions().filter(a=>s.indexOf(a.id)>=0)}i.getSomeEditorContributions=o;function r(){return ih.INSTANCE.getDiffEditorContributions()}i.getDiffEditorContributions=r})($3||($3={}));zEt={EditorCommonContributions:"editor.contributions"},ih=class{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,n){this.editorContributions.push({id:e,ctor:t,instantiation:n})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}};ih.INSTANCE=new ih;jn.add(zEt.EditorCommonContributions,ih.INSTANCE);Lhe=UT(new Q0({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:ne.MenubarEditMenu,group:"1_do",title:g({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:ne.CommandPalette,group:"",title:g("undo","Undo"),order:1}]}));UT(new o$(Lhe,{id:"default:undo",precondition:void 0}));Ehe=UT(new Q0({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:ne.MenubarEditMenu,group:"1_do",title:g({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:ne.CommandPalette,group:"",title:g("redo","Redo"),order:1}]}));UT(new o$(Ehe,{id:"default:redo",precondition:void 0}));fGe=UT(new Q0({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:ne.MenubarSelectionMenu,group:"1_basic",title:g({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:ne.CommandPalette,group:"",title:g("selectAll","Select All"),order:1}]}))});function $T(i){Fh&&(pGe||(pGe=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(i.message))}function mGe(i){return i[0]==="o"&&i[1]==="n"&&Ff(i.charCodeAt(2))}function gGe(i){return/^onDynamic/.test(i)&&Ff(i.charCodeAt(9))}function HEt(i,e,t){let n=s=>function(){let a=Array.prototype.slice.call(arguments,0);return e(s,a)},o=s=>function(a){return t(s,a)},r={};for(let s of i){if(gGe(s)){r[s]=o(s);continue}if(mGe(s)){r[s]=t(s,void 0);continue}r[s]=n(s)}return r}var FEt,pGe,Dhe,r$,The,Ihe,Mhe,Nhe,s$,Ahe=P(()=>{Pi();Xt();nt();Gc();Mn();Ri();FEt="$initialize",pGe=!1;Dhe=class{constructor(e,t,n,o){this.vsWorker=e,this.req=t,this.method=n,this.args=o,this.type=0}},r$=class{constructor(e,t,n,o){this.vsWorker=e,this.seq=t,this.res=n,this.err=o,this.type=1}},The=class{constructor(e,t,n,o){this.vsWorker=e,this.req=t,this.eventName=n,this.arg=o,this.type=2}},Ihe=class{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}},Mhe=class{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}},Nhe=class{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t){let n=String(++this._lastSentReq);return new Promise((o,r)=>{this._pendingReplies[n]={resolve:o,reject:r},this._send(new Dhe(this._workerId,n,e,t))})}listen(e,t){let n=null,o=new ge({onWillAddFirstListener:()=>{n=String(++this._lastSentReq),this._pendingEmitters.set(n,o),this._send(new The(this._workerId,n,e,t))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(n),this._send(new Mhe(this._workerId,n)),n=null}});return o.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}let t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),t.reject(n);return}t.resolve(e.res)}_handleRequestMessage(e){let t=e.req;this._handler.handleMessage(e.method,e.args).then(o=>{this._send(new r$(this._workerId,t,o,void 0))},o=>{o.detail instanceof Error&&(o.detail=wue(o.detail)),this._send(new r$(this._workerId,t,void 0,wue(o)))})}_handleSubscribeEventMessage(e){let t=e.req,n=this._handler.handleEvent(e.eventName,e.arg)(o=>{this._send(new Ihe(this._workerId,t,o))});this._pendingEvents.set(t,n)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){let t=[];if(e.type===0)for(let n=0;n{this._protocol.handleMessage(d)},d=>{o?.(d)})),this._protocol=new Nhe({sendMessage:(d,u)=>{this._worker.postMessage(d,u)},handleMessage:(d,u)=>{if(typeof n[d]!="function")return Promise.reject(new Error("Missing method "+d+" on main thread host."));try{return Promise.resolve(n[d].apply(n,u))}catch(h){return Promise.reject(h)}},handleEvent:(d,u)=>{if(gGe(d)){let h=n[d].call(n,u);if(typeof h!="function")throw new Error(`Missing dynamic event ${d} on main thread host.`);return h}if(mGe(d)){let h=n[d];if(typeof h!="function")throw new Error(`Missing event ${d} on main thread host.`);return h}throw new Error(`Malformed event name ${d}`)}}),this._protocol.setWorkerId(this._worker.getId());let r=null,s=globalThis.require;typeof s<"u"&&typeof s.getConfig=="function"?r=s.getConfig():typeof globalThis.requirejs<"u"&&(r=globalThis.requirejs.s.contexts._.config);let a=bC(n);this._onModuleLoaded=this._protocol.sendMessage(FEt,[this._worker.getId(),JSON.parse(JSON.stringify(r)),t,a]);let l=(d,u)=>this._request(d,u),c=(d,u)=>this._protocol.listen(d,u);this._lazyProxy=new Promise((d,u)=>{o=u,this._onModuleLoaded.then(h=>{d(HEt(h,l,c))},h=>{u(h),this._onError("Worker failed to load "+t,h)})})}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise((n,o)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(e,t).then(n,o)},o)})}_onError(e,t){console.error(e),console.info(t)}}});function td(i,e){var t;let n=globalThis.MonacoEnvironment;if(n?.createTrustedTypesPolicy)try{return n.createTrustedTypesPolicy(i,e)}catch(o){hi(o);return}try{return(t=Hn.trustedTypes)===null||t===void 0?void 0:t.createPolicy(i,e)}catch(o){hi(o);return}}var Vg=P(()=>{_l();Pi()});function BEt(i){let e=globalThis.MonacoEnvironment;if(e){if(typeof e.getWorker=="function")return e.getWorker("workerMain.js",i);if(typeof e.getWorkerUrl=="function"){let t=e.getWorkerUrl("workerMain.js",i);return new Worker(vGe?vGe.createScriptURL(t):t,{name:i})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function VEt(i){return typeof i.then=="function"}var vGe,Rhe,jT,_Ge=P(()=>{Vg();Pi();Ahe();nt();vGe=td("defaultWorkerFactory",{createScriptURL:i=>i});Rhe=class extends ue{constructor(e,t,n,o,r){super(),this.id=t,this.label=n;let s=BEt(n);VEt(s)?this.worker=s:this.worker=Promise.resolve(s),this.postMessage(e,[]),this.worker.then(a=>{a.onmessage=function(l){o(l.data)},a.onmessageerror=r,typeof a.addEventListener=="function"&&a.addEventListener("error",r)}),this._register(Yt(()=>{var a;(a=this.worker)===null||a===void 0||a.then(l=>{l.onmessage=null,l.onmessageerror=null,l.removeEventListener("error",r),l.terminate()}),this.worker=null}))}getId(){return this.id}postMessage(e,t){var n;(n=this.worker)===null||n===void 0||n.then(o=>{try{o.postMessage(e,t)}catch(r){hi(r),hi(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:r}))}})}},jT=class i{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,n){let o=++i.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new Rhe(e,o,this._label||"anonymous"+o,t,r=>{$T(r),this._webWorkerFailedBeforeError=r,n(r)})}};jT.LAST_WORKER_ID=0});function qT(i,e,t){i.has(e)?i.get(e).push(t):i.set(e,[t])}var os,XC,a$,j3=P(()=>{(function(i){i[i.None=0]="None",i[i.Indent=1]="Indent",i[i.IndentOutdent=2]="IndentOutdent",i[i.Outdent=3]="Outdent"})(os||(os={}));XC=class{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,n=e.notIn.length;t0&&i.getLanguageId(s-1)===o;)s--;return new Phe(i,o,s,r+1,i.getStartOffset(s),i.getEndOffset(r))}function sp(i){return(i&3)!==0}var Phe,D5=P(()=>{Phe=class{constructor(e,t,n,o,r,s){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=o,this.firstCharOffset=r,this._lastCharOffset=s}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)}}});var QC,bGe=P(()=>{j3();QC=class i{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(t=>new XC(t)):e.brackets?this._autoClosingPairs=e.brackets.map(t=>new XC({open:t[0],close:t[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){let t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new XC({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:i.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:i.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}};QC.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])> +Received: '{1}'.`,e,Og.getLexeme(t)),r=t.offset,s=Og.getLexeme(t);return this._parsingErrors.push({message:o,offset:r,lexeme:s,additionalInfo:n}),i._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}};vU._parseError=new Error;mt=class{static false(){return Ic.INSTANCE}static true(){return Jc.INSTANCE}static has(e){return _5.create(e)}static equals(e,t){return b5.create(e,t)}static notEquals(e,t){return yU.create(e,t)}static regex(e,t){return LT.create(e,t)}static in(e,t){return _U.create(e,t)}static notIn(e,t){return bU.create(e,t)}static not(e){return y5.create(e)}static and(...e){return kU.create(e,null,!0)}static or(...e){return ET.create(e,null,!0)}static deserialize(e){return e==null?void 0:this._parser.parse(e)}};mt._parser=new vU({regexParsingWithErrorRecovery:!1});Ic=class{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 Jc.INSTANCE}};Ic.INSTANCE=new Ic;Jc=class{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 Ic.INSTANCE}};Jc.INSTANCE=new Jc;_5=class i{static create(e,t=null){let n=Tc.get(e);return typeof n=="boolean"?n?Jc.INSTANCE:Ic.INSTANCE:new i(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:xqe(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){let e=Tc.get(this.key);return typeof e=="boolean"?e?Jc.INSTANCE:Ic.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=y5.create(this.key,this)),this.negated}},b5=class i{static create(e,t,n=null){if(typeof t=="boolean")return t?_5.create(e,n):y5.create(e,n);let o=Tc.get(e);return typeof o=="boolean"?t===(o?"true":"false")?Jc.INSTANCE:Ic.INSTANCE:new i(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:C5(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(){let e=Tc.get(this.key);if(typeof e=="boolean"){let t=e?"true":"false";return this.value===t?Jc.INSTANCE:Ic.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=yU.create(this.key,this.value,this)),this.negated}},_U=class i{static create(e,t){return new i(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:C5(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){let t=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(t)?t.includes(n):typeof n=="string"&&typeof t=="object"&&t!==null?RLt.call(t,n):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=bU.create(this.key,this.valueKey)),this.negated}},bU=class i{static create(e,t){return new i(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=_U.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}},yU=class i{static create(e,t,n=null){if(typeof t=="boolean")return t?y5.create(e,n):_5.create(e,n);let o=Tc.get(e);return typeof o=="boolean"?t===(o?"true":"false")?Ic.INSTANCE:Jc.INSTANCE:new i(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:C5(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(){let e=Tc.get(this.key);if(typeof e=="boolean"){let t=e?"true":"false";return this.value===t?Ic.INSTANCE:Jc.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=b5.create(this.key,this.value,this)),this.negated}},y5=class i{static create(e,t=null){let n=Tc.get(e);return typeof n=="boolean"?n?Ic.INSTANCE:Jc.INSTANCE:new i(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:xqe(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){let e=Tc.get(this.key);return typeof e=="boolean"?e?Ic.INSTANCE:Jc.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_5.create(this.key,this)),this.negated}};CU=class i{static create(e,t,n=null){return EU(t,o=>new i(e,o,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:C5(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=SU.create(this.key,this.value,this)),this.negated}},wU=class i{static create(e,t,n=null){return EU(t,o=>new i(e,o,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:C5(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=xU.create(this.key,this.value,this)),this.negated}},xU=class i{static create(e,t,n=null){return EU(t,o=>new i(e,o,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:C5(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 i(e,o,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:C5(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=CU.create(this.key,this.value,this)),this.negated}},LT=class i{static create(e,t){return new i(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;let t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return tn?1:0}equals(e){if(e.type===this.type){let t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&t===n}return!1}substituteConstants(){return this}evaluate(e){let t=e.getValue(this.key);return this.regexp?this.regexp.test(t):!1}serialize(){let e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Jue.create(this)),this.negated}},Jue=class i{static create(e){return new i(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(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}};kU=class i{static create(e,t,n){return i._normalizeArr(e,t,n)}constructor(e,t){this.expr=e,this.negated=t,this.type=6}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,n=this.expr.length;t1;){let s=o[o.length-1];if(s.type!==9)break;o.pop();let a=o.pop(),l=o.length===0,c=ET.create(s.expr.map(d=>i.create([d,a],null,n)),null,l);c&&(o.push(c),o.sort(kT))}if(o.length===1)return o[0];if(n){for(let s=0;se.serialize()).join(" && ")}keys(){let e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());this.negated=ET.create(e,this,!0)}return this.negated}},ET=class i{static create(e,t,n){return i._normalizeArr(e,t,n)}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,n=this.expr.length;te.serialize()).join(" || ")}keys(){let e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());for(;e.length>1;){let t=e.shift(),n=e.shift(),o=[];for(let r of yqe(t))for(let s of yqe(n))o.push(kU.create([r,s],null,!1));e.unshift(i.create(o,null,!1))}this.negated=i.create(e,this,!0)}return this.negated}},Bt=class i extends _5{static all(){return i._info.values()}constructor(e,t,n){super(e,null),this._defaultValue=t,typeof n=="object"?i._info.push({...n,key:e}):n!==!0&&i._info.push({key:e,description:n,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 b5.create(this.key,e)}};Bt._info=[];ri=vi("contextKeyService")});function TT(i,e){if(typeof i=="number"){if(i===0)return null;let t=(i&65535)>>>0,n=(i&4294901760)>>>16;return n!==0?new DT([DU(t,e),DU(n,e)]):new DT([DU(t,e)])}else{let t=[];for(let n=0;n{Pi();Uf=class i{constructor(e,t,n,o,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=o,this.keyCode=r}equals(e){return e instanceof i&&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}},DT=class{constructor(e){if(e.length===0)throw gl("chords");this.chords=e}},TU=class{constructor(e,t,n,o,r,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=o,this.keyLabel=r,this.keyAriaLabel=s}},IU=class{}});function MU(i,e){if(!i)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}function O3(i,e="Unreachable"){throw new Error(e)}function ehe(i){i||hi(new fo("Assertion Failed"))}function zg(i){if(!i()){debugger;i(),hi(new fo("Assertion Failed"))}}function NU(i,e){let t=0;for(;t{Pi()});var the,jn,Ys=P(()=>{um();ho();the=class{constructor(){this.data=new Map}add(e,t){MU(qs(e)),MU(Gs(t)),MU(!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}},jn=new the});function jLt(i,e){if(i.weight1!==e.weight1)return i.weight1-e.weight1;if(i.command&&e.command){if(i.commande.command)return 1}return i.weight2-e.weight2}var ihe,Pa,$Lt,z3=P(()=>{w5();Mn();$o();Ys();nt();Hh();ihe=class i{constructor(){this._coreKeybindings=new $r,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(Xa===1){if(e&&e.win)return e.win}else if(Xa===2){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){let t=i.bindToCurrentPlatform(e),n=new Ye;if(t&&t.primary){let o=TT(t.primary,Xa);o&&n.add(this._registerDefaultKeybinding(o,e.id,e.args,e.weight,0,e.when))}if(t&&Array.isArray(t.secondary))for(let o=0,r=t.secondary.length;o{a(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(jLt)),this._cachedMergedKeybindings.slice(0)}},Pa=new ihe,$Lt={EditorModes:"platform.keybindingsRegistry"};jn.add($Lt.EditorModes,Pa)});function H3(i){return i.command!==void 0}function kqe(i){return i.submenu!==void 0}function Fo(i){let e=new Ye,t=new i,{f1:n,menu:o,keybinding:r,...s}=t.desc;if(Zi.getCommand(s.id))throw new Error(`Cannot register two commands with the same id: ${s.id}`);if(e.add(Zi.registerCommand({id:s.id,handler:(a,...l)=>t.run(a,...l),metadata:s.metadata})),Array.isArray(o))for(let a of o)e.add(ps.appendMenuItem(a.id,{command:{...s,precondition:a.precondition===null?void 0:s.precondition},...a}));else o&&e.add(ps.appendMenuItem(o.id,{command:{...s,precondition:o.precondition===null?void 0:s.precondition},...o}));if(n&&(e.add(ps.appendMenuItem(ne.CommandPalette,{command:s,when:s.precondition})),e.add(ps.addCommand(s))),Array.isArray(r))for(let a of r)e.add(Pa.registerKeybindingRule({...a,id:s.id,when:s.precondition?mt.and(s.precondition,a.when):a.when}));else r&&e.add(Pa.registerKeybindingRule({...r,id:s.id,when:s.precondition?mt.and(s.precondition,r.when):r.when}));return e}var qLt,Sqe,RU,ne,Mc,F3,ps,hm,ed,Ja,Dr=P(()=>{Ra();or();Xt();nt();Hh();$o();Xi();_i();z3();qLt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Sqe=function(i,e){return function(t,n){e(t,n,i)}};ne=class i{constructor(e){if(i._instances.has(e))throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);i._instances.set(e,this),this.id=e}};ne._instances=new Map;ne.CommandPalette=new ne("CommandPalette");ne.DebugBreakpointsContext=new ne("DebugBreakpointsContext");ne.DebugCallStackContext=new ne("DebugCallStackContext");ne.DebugConsoleContext=new ne("DebugConsoleContext");ne.DebugVariablesContext=new ne("DebugVariablesContext");ne.DebugHoverContext=new ne("DebugHoverContext");ne.DebugWatchContext=new ne("DebugWatchContext");ne.DebugToolBar=new ne("DebugToolBar");ne.DebugToolBarStop=new ne("DebugToolBarStop");ne.EditorContext=new ne("EditorContext");ne.SimpleEditorContext=new ne("SimpleEditorContext");ne.EditorContent=new ne("EditorContent");ne.EditorLineNumberContext=new ne("EditorLineNumberContext");ne.EditorContextCopy=new ne("EditorContextCopy");ne.EditorContextPeek=new ne("EditorContextPeek");ne.EditorContextShare=new ne("EditorContextShare");ne.EditorTitle=new ne("EditorTitle");ne.EditorTitleRun=new ne("EditorTitleRun");ne.EditorTitleContext=new ne("EditorTitleContext");ne.EditorTitleContextShare=new ne("EditorTitleContextShare");ne.EmptyEditorGroup=new ne("EmptyEditorGroup");ne.EmptyEditorGroupContext=new ne("EmptyEditorGroupContext");ne.EditorTabsBarContext=new ne("EditorTabsBarContext");ne.EditorTabsBarShowTabsSubmenu=new ne("EditorTabsBarShowTabsSubmenu");ne.EditorTabsBarShowTabsZenModeSubmenu=new ne("EditorTabsBarShowTabsZenModeSubmenu");ne.EditorActionsPositionSubmenu=new ne("EditorActionsPositionSubmenu");ne.ExplorerContext=new ne("ExplorerContext");ne.ExplorerContextShare=new ne("ExplorerContextShare");ne.ExtensionContext=new ne("ExtensionContext");ne.GlobalActivity=new ne("GlobalActivity");ne.CommandCenter=new ne("CommandCenter");ne.CommandCenterCenter=new ne("CommandCenterCenter");ne.LayoutControlMenuSubmenu=new ne("LayoutControlMenuSubmenu");ne.LayoutControlMenu=new ne("LayoutControlMenu");ne.MenubarMainMenu=new ne("MenubarMainMenu");ne.MenubarAppearanceMenu=new ne("MenubarAppearanceMenu");ne.MenubarDebugMenu=new ne("MenubarDebugMenu");ne.MenubarEditMenu=new ne("MenubarEditMenu");ne.MenubarCopy=new ne("MenubarCopy");ne.MenubarFileMenu=new ne("MenubarFileMenu");ne.MenubarGoMenu=new ne("MenubarGoMenu");ne.MenubarHelpMenu=new ne("MenubarHelpMenu");ne.MenubarLayoutMenu=new ne("MenubarLayoutMenu");ne.MenubarNewBreakpointMenu=new ne("MenubarNewBreakpointMenu");ne.PanelAlignmentMenu=new ne("PanelAlignmentMenu");ne.PanelPositionMenu=new ne("PanelPositionMenu");ne.ActivityBarPositionMenu=new ne("ActivityBarPositionMenu");ne.MenubarPreferencesMenu=new ne("MenubarPreferencesMenu");ne.MenubarRecentMenu=new ne("MenubarRecentMenu");ne.MenubarSelectionMenu=new ne("MenubarSelectionMenu");ne.MenubarShare=new ne("MenubarShare");ne.MenubarSwitchEditorMenu=new ne("MenubarSwitchEditorMenu");ne.MenubarSwitchGroupMenu=new ne("MenubarSwitchGroupMenu");ne.MenubarTerminalMenu=new ne("MenubarTerminalMenu");ne.MenubarViewMenu=new ne("MenubarViewMenu");ne.MenubarHomeMenu=new ne("MenubarHomeMenu");ne.OpenEditorsContext=new ne("OpenEditorsContext");ne.OpenEditorsContextShare=new ne("OpenEditorsContextShare");ne.ProblemsPanelContext=new ne("ProblemsPanelContext");ne.SCMInputBox=new ne("SCMInputBox");ne.SCMIncomingChanges=new ne("SCMIncomingChanges");ne.SCMOutgoingChanges=new ne("SCMOutgoingChanges");ne.SCMIncomingChangesAllChangesContext=new ne("SCMIncomingChangesAllChangesContext");ne.SCMIncomingChangesHistoryItemContext=new ne("SCMIncomingChangesHistoryItemContext");ne.SCMOutgoingChangesAllChangesContext=new ne("SCMOutgoingChangesAllChangesContext");ne.SCMOutgoingChangesHistoryItemContext=new ne("SCMOutgoingChangesHistoryItemContext");ne.SCMChangeContext=new ne("SCMChangeContext");ne.SCMResourceContext=new ne("SCMResourceContext");ne.SCMResourceContextShare=new ne("SCMResourceContextShare");ne.SCMResourceFolderContext=new ne("SCMResourceFolderContext");ne.SCMResourceGroupContext=new ne("SCMResourceGroupContext");ne.SCMSourceControl=new ne("SCMSourceControl");ne.SCMSourceControlInline=new ne("SCMSourceControlInline");ne.SCMTitle=new ne("SCMTitle");ne.SearchContext=new ne("SearchContext");ne.SearchActionMenu=new ne("SearchActionContext");ne.StatusBarWindowIndicatorMenu=new ne("StatusBarWindowIndicatorMenu");ne.StatusBarRemoteIndicatorMenu=new ne("StatusBarRemoteIndicatorMenu");ne.StickyScrollContext=new ne("StickyScrollContext");ne.TestItem=new ne("TestItem");ne.TestItemGutter=new ne("TestItemGutter");ne.TestMessageContext=new ne("TestMessageContext");ne.TestMessageContent=new ne("TestMessageContent");ne.TestPeekElement=new ne("TestPeekElement");ne.TestPeekTitle=new ne("TestPeekTitle");ne.TouchBarContext=new ne("TouchBarContext");ne.TitleBarContext=new ne("TitleBarContext");ne.TitleBarTitleContext=new ne("TitleBarTitleContext");ne.TunnelContext=new ne("TunnelContext");ne.TunnelPrivacy=new ne("TunnelPrivacy");ne.TunnelProtocol=new ne("TunnelProtocol");ne.TunnelPortInline=new ne("TunnelInline");ne.TunnelTitle=new ne("TunnelTitle");ne.TunnelLocalAddressInline=new ne("TunnelLocalAddressInline");ne.TunnelOriginInline=new ne("TunnelOriginInline");ne.ViewItemContext=new ne("ViewItemContext");ne.ViewContainerTitle=new ne("ViewContainerTitle");ne.ViewContainerTitleContext=new ne("ViewContainerTitleContext");ne.ViewTitle=new ne("ViewTitle");ne.ViewTitleContext=new ne("ViewTitleContext");ne.CommentEditorActions=new ne("CommentEditorActions");ne.CommentThreadTitle=new ne("CommentThreadTitle");ne.CommentThreadActions=new ne("CommentThreadActions");ne.CommentThreadAdditionalActions=new ne("CommentThreadAdditionalActions");ne.CommentThreadTitleContext=new ne("CommentThreadTitleContext");ne.CommentThreadCommentContext=new ne("CommentThreadCommentContext");ne.CommentTitle=new ne("CommentTitle");ne.CommentActions=new ne("CommentActions");ne.InteractiveToolbar=new ne("InteractiveToolbar");ne.InteractiveCellTitle=new ne("InteractiveCellTitle");ne.InteractiveCellDelete=new ne("InteractiveCellDelete");ne.InteractiveCellExecute=new ne("InteractiveCellExecute");ne.InteractiveInputExecute=new ne("InteractiveInputExecute");ne.NotebookToolbar=new ne("NotebookToolbar");ne.NotebookStickyScrollContext=new ne("NotebookStickyScrollContext");ne.NotebookCellTitle=new ne("NotebookCellTitle");ne.NotebookCellDelete=new ne("NotebookCellDelete");ne.NotebookCellInsert=new ne("NotebookCellInsert");ne.NotebookCellBetween=new ne("NotebookCellBetween");ne.NotebookCellListTop=new ne("NotebookCellTop");ne.NotebookCellExecute=new ne("NotebookCellExecute");ne.NotebookCellExecutePrimary=new ne("NotebookCellExecutePrimary");ne.NotebookDiffCellInputTitle=new ne("NotebookDiffCellInputTitle");ne.NotebookDiffCellMetadataTitle=new ne("NotebookDiffCellMetadataTitle");ne.NotebookDiffCellOutputsTitle=new ne("NotebookDiffCellOutputsTitle");ne.NotebookOutputToolbar=new ne("NotebookOutputToolbar");ne.NotebookEditorLayoutConfigure=new ne("NotebookEditorLayoutConfigure");ne.NotebookKernelSource=new ne("NotebookKernelSource");ne.BulkEditTitle=new ne("BulkEditTitle");ne.BulkEditContext=new ne("BulkEditContext");ne.TimelineItemContext=new ne("TimelineItemContext");ne.TimelineTitle=new ne("TimelineTitle");ne.TimelineTitleContext=new ne("TimelineTitleContext");ne.TimelineFilterSubMenu=new ne("TimelineFilterSubMenu");ne.AccountsContext=new ne("AccountsContext");ne.SidebarTitle=new ne("SidebarTitle");ne.PanelTitle=new ne("PanelTitle");ne.AuxiliaryBarTitle=new ne("AuxiliaryBarTitle");ne.TerminalInstanceContext=new ne("TerminalInstanceContext");ne.TerminalEditorInstanceContext=new ne("TerminalEditorInstanceContext");ne.TerminalNewDropdownContext=new ne("TerminalNewDropdownContext");ne.TerminalTabContext=new ne("TerminalTabContext");ne.TerminalTabEmptyAreaContext=new ne("TerminalTabEmptyAreaContext");ne.TerminalStickyScrollContext=new ne("TerminalStickyScrollContext");ne.WebviewContext=new ne("WebviewContext");ne.InlineCompletionsActions=new ne("InlineCompletionsActions");ne.NewFile=new ne("NewFile");ne.MergeInput1Toolbar=new ne("MergeToolbar1Toolbar");ne.MergeInput2Toolbar=new ne("MergeToolbar2Toolbar");ne.MergeBaseToolbar=new ne("MergeBaseToolbar");ne.MergeInputResultToolbar=new ne("MergeToolbarResultToolbar");ne.InlineSuggestionToolbar=new ne("InlineSuggestionToolbar");ne.ChatContext=new ne("ChatContext");ne.ChatCodeBlock=new ne("ChatCodeblock");ne.ChatMessageTitle=new ne("ChatMessageTitle");ne.ChatExecute=new ne("ChatExecute");ne.ChatInputSide=new ne("ChatInputSide");ne.AccessibleView=new ne("AccessibleView");ne.MultiDiffEditorFileToolbar=new ne("MultiDiffEditorFileToolbar");Mc=vi("menuService"),F3=class i{static for(e){let t=this._all.get(e);return t||(t=new i(e),this._all.set(e,t)),t}static merge(e){let t=new Set;for(let n of e)n instanceof i&&t.add(n.id);return t}constructor(e){this.id=e,this.has=t=>t===e}};F3._all=new Map;ps=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new nW({merge:F3.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(i){return this._commands.set(i.id,i),this._onDidChangeMenu.fire(F3.for(ne.CommandPalette)),Yt(()=>{this._commands.delete(i.id)&&this._onDidChangeMenu.fire(F3.for(ne.CommandPalette))})}getCommand(i){return this._commands.get(i)}getCommands(){let i=new Map;return this._commands.forEach((e,t)=>i.set(t,e)),i}appendMenuItem(i,e){let t=this._menuItems.get(i);t||(t=new $r,this._menuItems.set(i,t));let n=t.push(e);return this._onDidChangeMenu.fire(F3.for(i)),Yt(()=>{n(),this._onDidChangeMenu.fire(F3.for(i))})}appendMenuItems(i){let e=new Ye;for(let{id:t,item:n}of i)e.add(this.appendMenuItem(t,n));return e}getMenuItems(i){let e;return this._menuItems.has(i)?e=[...this._menuItems.get(i)]:e=[],i===ne.CommandPalette&&this._appendImplicitItems(e),e}_appendImplicitItems(i){let e=new Set;for(let t of i)H3(t)&&(e.add(t.command.id),t.alt&&e.add(t.alt.id));this._commands.forEach((t,n)=>{e.has(n)||i.push({command:t})})}},hm=class extends Wf{constructor(e,t,n){super(`submenuitem.${e.submenu.id}`,typeof e.title=="string"?e.title:e.title.value,n,"submenu"),this.item=e,this.hideActions=t}},ed=RU=class{static label(e,t){return t?.renderShortTitle&&e.shortTitle?typeof e.shortTitle=="string"?e.shortTitle:e.shortTitle.value:typeof e.title=="string"?e.title:e.title.value}constructor(e,t,n,o,r,s){var a,l;this.hideActions=o,this._commandService=s,this.id=e.id,this.label=RU.label(e,n),this.tooltip=(l=typeof e.tooltip=="string"?e.tooltip:(a=e.tooltip)===null||a===void 0?void 0:a.value)!==null&&l!==void 0?l:"",this.enabled=!e.precondition||r.contextMatchesRules(e.precondition),this.checked=void 0;let c;if(e.toggled){let d=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=r.contextMatchesRules(d.condition),this.checked&&d.tooltip&&(this.tooltip=typeof d.tooltip=="string"?d.tooltip:d.tooltip.value),this.checked&&ui.isThemeIcon(d.icon)&&(c=d.icon),this.checked&&d.title&&(this.label=typeof d.title=="string"?d.title:d.title.value)}c||(c=ui.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new RU(t,void 0,n,o,r,s):void 0,this._options=n,this.class=c&&ui.asClassName(c)}run(...e){var t,n;let o=[];return!((t=this._options)===null||t===void 0)&&t.arg&&(o=[...o,this._options.arg]),!((n=this._options)===null||n===void 0)&&n.shouldForwardArgs&&(o=[...o,...e]),this._commandService.executeCommand(this.id,...o)}};ed=RU=qLt([Sqe(4,ri),Sqe(5,eo)],ed);Ja=class{constructor(e){this.desc=e}}});var Fs,$f=P(()=>{_i();Fs=vi("telemetryService")});function GLt(i){switch(i){case yl.Trace:return"trace";case yl.Debug:return"debug";case yl.Info:return"info";case yl.Warning:return"warn";case yl.Error:return"error";case yl.Off:return"off"}}var ks,yl,Lqe,PU,OU,zU,J0i,Ju=P(()=>{Xt();nt();Xi();_i();ks=vi("logService");(function(i){i[i.Off=0]="Off",i[i.Trace=1]="Trace",i[i.Debug=2]="Debug",i[i.Info=3]="Info",i[i.Warning=4]="Warning",i[i.Error=5]="Error"})(yl||(yl={}));Lqe=yl.Info,PU=class extends ue{constructor(){super(...arguments),this.level=Lqe,this._onDidChangeLogLevel=this._register(new ge),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!==yl.Off&&this.level<=e}},OU=class extends PU{constructor(e=Lqe,t=!0){super(),this.useColors=t,this.setLevel(e)}trace(e,...t){this.checkLogLevel(yl.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...t):console.log(e,...t))}debug(e,...t){this.checkLogLevel(yl.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...t):console.log(e,...t))}info(e,...t){this.checkLogLevel(yl.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...t):console.log(e,...t))}warn(e,...t){this.checkLogLevel(yl.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...t):console.log(e,...t))}error(e,...t){this.checkLogLevel(yl.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...t):console.error(e,...t))}},zU=class extends PU{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(let t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(let n of this.loggers)n.trace(e,...t)}debug(e,...t){for(let n of this.loggers)n.debug(e,...t)}info(e,...t){for(let n of this.loggers)n.info(e,...t)}warn(e,...t){for(let n of this.loggers)n.warn(e,...t)}error(e,...t){for(let n of this.loggers)n.error(e,...t)}dispose(){for(let e of this.loggers)e.dispose();super.dispose()}};J0i=new Bt("logLevel",GLt(yl.Info))});var VC,FU=P(()=>{Xc();_l();Mn();VC={clipboard:{writeText:tu||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:tu||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:tu||pqe()?0:navigator.keyboard||Xu?1:2,touch:"ontouchstart"in Hn||navigator.maxTouchPoints>0,pointerEvents:Hn.PointerEvent&&("ontouchstart"in Hn||navigator.maxTouchPoints>0)}});function KLt(i){if(i.charCode){let t=String.fromCharCode(i.charCode).toUpperCase();return ep.fromString(t)}let e=i.keyCode;if(e===3)return 7;if(Aa)switch(e){case 59:return 85;case 60:if(Ar)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(Wi)return 57;break}else if(cm){if(Wi&&e===93)return 57;if(!Wi&&e===92)return 57}return Eue[e]||0}var YLt,ZLt,XLt,QLt,qn,Gl=P(()=>{Xc();Bh();w5();Mn();YLt=Wi?256:2048,ZLt=512,XLt=1024,QLt=Wi?2048:256,qn=class{constructor(e){this._standardKeyboardEventBrand=!0;let 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=KLt(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|=YLt),this.altKey&&(t|=ZLt),this.shiftKey&&(t|=XLt),this.metaKey&&(t|=QLt),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new Uf(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}});function JLt(i){if(!i.parent||i.parent===i)return null;try{let e=i.location,t=i.parent.location;if(e.origin!=="null"&&t.origin!=="null"&&e.origin!==t.origin)return null}catch{return null}return i.parent}var Eqe,HU,Dqe=P(()=>{Eqe=new WeakMap;HU=class{static getSameOriginWindowChain(e){let t=Eqe.get(e);if(!t){t=[],Eqe.set(e,t);let n=e,o;do o=JLt(n),o?t.push({window:new WeakRef(n),iframeElement:n.frameElement||null}):t.push({window:new WeakRef(n),iframeElement:null}),n=o;while(n)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){var n,o;if(!t||e===t)return{top:0,left:0};let r=0,s=0,a=this.getSameOriginWindowChain(e);for(let l of a){let c=l.window.deref();if(r+=(n=c?.scrollY)!==null&&n!==void 0?n:0,s+=(o=c?.scrollX)!==null&&o!==void 0?o:0,c===t||!l.iframeElement)break;let d=l.iframeElement.getBoundingClientRect();r+=d.top,s+=d.left}return{top:r,left:s}}}});var Oa,jf,Uh=P(()=>{Xc();Dqe();Mn();Oa=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let n=HU.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=n.left,this.posy-=n.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},jf=class{constructor(e,t=0,n=0){var o;if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=t,e){let r=e,s=e,a=((o=e.view)===null||o===void 0?void 0:o.devicePixelRatio)||1;if(typeof r.wheelDeltaY<"u")Rg?this.deltaY=r.wheelDeltaY/(120*a):this.deltaY=r.wheelDeltaY/120;else if(typeof s.VERTICAL_AXIS<"u"&&s.axis===s.VERTICAL_AXIS)this.deltaY=-s.detail/3;else if(e.type==="wheel"){let l=e;l.deltaMode===l.DOM_DELTA_LINE?Aa&&!Wi?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof r.wheelDeltaX<"u")Xu&&hr?this.deltaX=-(r.wheelDeltaX/120):Rg?this.deltaX=r.wheelDeltaX/(120*a):this.deltaX=r.wheelDeltaX/120;else if(typeof s.HORIZONTAL_AXIS<"u"&&s.axis===s.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let l=e;l.deltaMode===l.DOM_DELTA_LINE?Aa&&!Wi?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(Rg?this.deltaY=e.wheelDelta/(120*a):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()}}});var BU,nhe=P(()=>{BU=Symbol("MicrotaskDelay")});function UU(i){return!!i&&typeof i.then=="function"}function Ho(i){let e=new Jn,t=i(e.token),n=new Promise((o,r)=>{let s=e.token.onCancellationRequested(()=>{s.dispose(),r(new Rf)});Promise.resolve(t).then(a=>{s.dispose(),e.dispose(),o(a)},a=>{s.dispose(),e.dispose(),r(a)})});return new class{cancel(){e.cancel(),e.dispose()}then(o,r){return n.then(o,r)}catch(o){return this.then(void 0,o)}finally(o){return n.finally(o)}}}function V3(i,e,t){return new Promise((n,o)=>{let r=e.onCancellationRequested(()=>{r.dispose(),n(t)});i.then(n,o).finally(()=>r.dispose())})}function eh(i,e){return e?new Promise((t,n)=>{let o=setTimeout(()=>{r.dispose(),t()},i),r=e.onCancellationRequested(()=>{clearTimeout(o),r.dispose(),n(new Rf)})}):Ho(t=>eh(i,t))}function $h(i,e=0,t){let n=setTimeout(()=>{i(),t&&o.dispose()},e),o=Yt(()=>{clearTimeout(n),t?.deleteAndLeak(o)});return t?.add(o),o}function MT(i,e=n=>!!n,t=null){let n=0,o=i.length,r=()=>{if(n>=o)return Promise.resolve(t);let s=i[n++];return Promise.resolve(s()).then(l=>e(l)?Promise.resolve(l):r())};return r()}function Tqe(i){let e=new Jn,t=i(e.token);return new rhe(e,async n=>{let o=e.token.onCancellationRequested(()=>{o.dispose(),e.dispose(),n.reject(new Rf)});try{for await(let r of t){if(e.token.isCancellationRequested)return;n.emitOne(r)}o.dispose(),e.dispose()}catch(r){o.dispose(),e.dispose(),n.reject(r)}})}var ohe,eEt,tEt,ba,UC,Zs,B3,hn,she,WC,IT,VU,Fg,WU,Cl,rhe,Qi=P(()=>{mo();Pi();Xt();nt();Mn();nhe();ohe=class{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){let t=()=>{if(this.queuedPromise=null,this.isDisposed)return;let n=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,n};this.queuedPromise=new Promise(n=>{this.activePromise.then(t,t).then(n)})}return new Promise((t,n)=>{this.queuedPromise.then(t,n)})}return this.activePromise=e(),new Promise((t,n)=>{this.activePromise.then(o=>{this.activePromise=null,t(o)},o=>{this.activePromise=null,n(o)})})}dispose(){this.isDisposed=!0}},eEt=(i,e)=>{let t=!0,n=setTimeout(()=>{t=!1,e()},i);return{isTriggered:()=>t,dispose:()=>{clearTimeout(n),t=!1}}},tEt=i=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,i())}),{isTriggered:()=>e,dispose:()=>{e=!1}}},ba=class{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((o,r)=>{this.doResolve=o,this.doReject=r}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){let o=this.task;return this.task=null,o()}}));let n=()=>{var o;this.deferred=null,(o=this.doResolve)===null||o===void 0||o.call(this,null)};return this.deferred=t===BU?tEt(n):eEt(t,n),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 Rf),this.completionPromise=null)}cancelTimeout(){var e;(e=this.deferred)===null||e===void 0||e.dispose(),this.deferred=null}dispose(){this.cancel()}},UC=class{constructor(e){this.delayer=new ba(e),this.throttler=new ohe}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}};Zs=class{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))}},B3=class{constructor(){this.disposable=void 0}cancel(){var e;(e=this.disposable)===null||e===void 0||e.dispose(),this.disposable=void 0}cancelAndSet(e,t,n=globalThis){this.cancel();let o=n.setInterval(()=>{e()},t);this.disposable=Yt(()=>{n.clearInterval(o),this.disposable=void 0})}dispose(){this.cancel()}},hn=class{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)}};(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?WC=(i,e)=>{KV(()=>{if(t)return;let n=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,n-Date.now())}}))});let t=!1;return{dispose(){t||(t=!0)}}}:WC=(i,e,t)=>{let n=i.requestIdleCallback(e,typeof t=="number"?{timeout:t}:void 0),o=!1;return{dispose(){o||(o=!0,i.cancelIdleCallback(n))}}},she=i=>WC(globalThis,i)})();IT=class{constructor(e,t){this._didRun=!1,this._executor=()=>{try{this._value=t()}catch(n){this._error=n}finally{this._didRun=!0}},this._handle=WC(e,()=>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}},VU=class extends IT{constructor(e){super(globalThis,e)}},Fg=class{get isRejected(){var e;return((e=this.outcome)===null||e===void 0?void 0:e.outcome)===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,t)=>{this.completeCallback=e,this.errorCallback=t})}complete(e){return new Promise(t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()})}error(e){return new Promise(t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()})}cancel(){return this.error(new Rf)}};(function(i){async function e(n){let o,r=await Promise.all(n.map(s=>s.then(a=>a,a=>{o||(o=a)})));if(typeof o<"u")throw o;return r}i.settled=e;function t(n){return new Promise(async(o,r)=>{try{await n(o,r)}catch(s){r(s)}})}i.withAsyncBody=t})(WU||(WU={}));Cl=class i{static fromArray(e){return new i(t=>{t.emitMany(e)})}static fromPromise(e){return new i(async t=>{t.emitMany(await e)})}static fromPromises(e){return new i(async t=>{await Promise.all(e.map(async n=>t.emitOne(await n)))})}static merge(e){return new i(async t=>{await Promise.all(e.map(async n=>{for await(let o of n)t.emitOne(o)}))})}constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new ge,queueMicrotask(async()=>{let t={emitOne:n=>this.emitOne(n),emitMany:n=>this.emitMany(n),reject:n=>this.reject(n)};try{await Promise.resolve(e(t)),this.resolve()}catch(n){this.reject(n)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e{for await(let o of e)n.emitOne(t(o))})}map(e){return i.map(this,e)}static filter(e,t){return new i(async n=>{for await(let o of e)t(o)&&n.emitOne(o)})}filter(e){return i.filter(this,e)}static coalesce(e){return i.filter(e,t=>!!t)}coalesce(){return i.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return i.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())}};Cl.EMPTY=Cl.fromArray([]);rhe=class extends Cl{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}});function op(i){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o0&&arguments[0]!==void 0?arguments[0]:yEt(),e=we=>Bqe(we);if(e.version="3.0.5",e.removed=[],!i||!i.document||i.document.nodeType!==9)return e.isSupported=!1,e;let t=i.document,n=t.currentScript,{document:o}=i,{DocumentFragment:r,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:c,NamedNodeMap:d=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:u,DOMParser:h,trustedTypes:f}=i,p=l.prototype,m=$U(p,"cloneNode"),y=$U(p,"nextSibling"),_=$U(p,"childNodes"),v=$U(p,"parentNode");if(typeof s=="function"){let we=o.createElement("template");we.content&&we.content.ownerDocument&&(o=we.content.ownerDocument)}let b,C="",{implementation:w,createNodeIterator:S,createDocumentFragment:x,getElementsByTagName:k}=o,{importNode:D}=t,E={};e.isSupported=typeof zqe=="function"&&typeof v=="function"&&w&&w.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:A,ERB_EXPR:T,TMPLIT_EXPR:L,DATA_ATTR:I,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:N,ATTR_WHITESPACE:z}=Oqe,{IS_ALLOWED_URI:F}=Oqe,V=null,ie=Wo({},[...Nqe,...lhe,...che,...dhe,...Aqe]),fe=null,K=Wo({},[...Rqe,...uhe,...Pqe,...jU]),oe=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),je=null,Ae=null,Be=!0,Ie=!0,ee=!1,Z=!0,te=!1,W=!1,Le=!1,rt=!1,ae=!1,Ze=!1,Oe=!1,tt=!0,ze=!1,Ge="user-content-",_e=!0,$=!1,j={},B=null,q=Wo({},["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"]),le=null,ce=Wo({},["audio","video","img","source","image","track"]),Pe=null,Ue=Wo({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ht="http://www.w3.org/1998/Math/MathML",_t="http://www.w3.org/2000/svg",Dt="http://www.w3.org/1999/xhtml",X=Dt,We=!1,at=null,be=Wo({},[ht,_t,Dt],ahe),lt,oi=["application/xhtml+xml","text/html"],pe="text/html",Ke,Qe=null,st=o.createElement("form"),xt=function(Q){return Q instanceof RegExp||Q instanceof Function},Ct=function(Q){if(!(Qe&&Qe===Q)){if((!Q||typeof Q!="object")&&(Q={}),Q=$C(Q),lt=oi.indexOf(Q.PARSER_MEDIA_TYPE)===-1?lt=pe:lt=Q.PARSER_MEDIA_TYPE,Ke=lt==="application/xhtml+xml"?ahe:qU,V="ALLOWED_TAGS"in Q?Wo({},Q.ALLOWED_TAGS,Ke):ie,fe="ALLOWED_ATTR"in Q?Wo({},Q.ALLOWED_ATTR,Ke):K,at="ALLOWED_NAMESPACES"in Q?Wo({},Q.ALLOWED_NAMESPACES,ahe):be,Pe="ADD_URI_SAFE_ATTR"in Q?Wo($C(Ue),Q.ADD_URI_SAFE_ATTR,Ke):Ue,le="ADD_DATA_URI_TAGS"in Q?Wo($C(ce),Q.ADD_DATA_URI_TAGS,Ke):ce,B="FORBID_CONTENTS"in Q?Wo({},Q.FORBID_CONTENTS,Ke):q,je="FORBID_TAGS"in Q?Wo({},Q.FORBID_TAGS,Ke):{},Ae="FORBID_ATTR"in Q?Wo({},Q.FORBID_ATTR,Ke):{},j="USE_PROFILES"in Q?Q.USE_PROFILES:!1,Be=Q.ALLOW_ARIA_ATTR!==!1,Ie=Q.ALLOW_DATA_ATTR!==!1,ee=Q.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=Q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,te=Q.SAFE_FOR_TEMPLATES||!1,W=Q.WHOLE_DOCUMENT||!1,ae=Q.RETURN_DOM||!1,Ze=Q.RETURN_DOM_FRAGMENT||!1,Oe=Q.RETURN_TRUSTED_TYPE||!1,rt=Q.FORCE_BODY||!1,tt=Q.SANITIZE_DOM!==!1,ze=Q.SANITIZE_NAMED_PROPS||!1,_e=Q.KEEP_CONTENT!==!1,$=Q.IN_PLACE||!1,F=Q.ALLOWED_URI_REGEXP||Fqe,X=Q.NAMESPACE||Dt,oe=Q.CUSTOM_ELEMENT_HANDLING||{},Q.CUSTOM_ELEMENT_HANDLING&&xt(Q.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(oe.tagNameCheck=Q.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Q.CUSTOM_ELEMENT_HANDLING&&xt(Q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(oe.attributeNameCheck=Q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Q.CUSTOM_ELEMENT_HANDLING&&typeof Q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(oe.allowCustomizedBuiltInElements=Q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),te&&(Ie=!1),Ze&&(ae=!0),j&&(V=Wo({},[...Aqe]),fe=[],j.html===!0&&(Wo(V,Nqe),Wo(fe,Rqe)),j.svg===!0&&(Wo(V,lhe),Wo(fe,uhe),Wo(fe,jU)),j.svgFilters===!0&&(Wo(V,che),Wo(fe,uhe),Wo(fe,jU)),j.mathMl===!0&&(Wo(V,dhe),Wo(fe,Pqe),Wo(fe,jU))),Q.ADD_TAGS&&(V===ie&&(V=$C(V)),Wo(V,Q.ADD_TAGS,Ke)),Q.ADD_ATTR&&(fe===K&&(fe=$C(fe)),Wo(fe,Q.ADD_ATTR,Ke)),Q.ADD_URI_SAFE_ATTR&&Wo(Pe,Q.ADD_URI_SAFE_ATTR,Ke),Q.FORBID_CONTENTS&&(B===q&&(B=$C(B)),Wo(B,Q.FORBID_CONTENTS,Ke)),_e&&(V["#text"]=!0),W&&Wo(V,["html","head","body"]),V.table&&(Wo(V,["tbody"]),delete je.tbody),Q.TRUSTED_TYPES_POLICY){if(typeof Q.TRUSTED_TYPES_POLICY.createHTML!="function")throw AT('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw AT('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');b=Q.TRUSTED_TYPES_POLICY,C=b.createHTML("")}else b===void 0&&(b=CEt(f,n)),b!==null&&typeof C=="string"&&(C=b.createHTML(""));th&&th(Q),Qe=Q}},At=Wo({},["mi","mo","mn","ms","mtext"]),Gt=Wo({},["foreignobject","desc","title","annotation-xml"]),de=Wo({},["title","style","font","a","script"]),Ce=Wo({},lhe);Wo(Ce,che),Wo(Ce,uEt);let G=Wo({},dhe);Wo(G,hEt);let J=function(Q){let Ne=v(Q);(!Ne||!Ne.tagName)&&(Ne={namespaceURI:X,tagName:"template"});let ct=qU(Q.tagName),Jt=qU(Ne.tagName);return at[Q.namespaceURI]?Q.namespaceURI===_t?Ne.namespaceURI===Dt?ct==="svg":Ne.namespaceURI===ht?ct==="svg"&&(Jt==="annotation-xml"||At[Jt]):!!Ce[ct]:Q.namespaceURI===ht?Ne.namespaceURI===Dt?ct==="math":Ne.namespaceURI===_t?ct==="math"&&Gt[Jt]:!!G[ct]:Q.namespaceURI===Dt?Ne.namespaceURI===_t&&!Gt[Jt]||Ne.namespaceURI===ht&&!At[Jt]?!1:!G[ct]&&(de[ct]||!Ce[ct]):!!(lt==="application/xhtml+xml"&&at[Q.namespaceURI]):!1},Se=function(Q){NT(e.removed,{element:Q});try{Q.parentNode.removeChild(Q)}catch{Q.remove()}},$e=function(Q,Ne){try{NT(e.removed,{attribute:Ne.getAttributeNode(Q),from:Ne})}catch{NT(e.removed,{attribute:null,from:Ne})}if(Ne.removeAttribute(Q),Q==="is"&&!fe[Q])if(ae||Ze)try{Se(Ne)}catch{}else try{Ne.setAttribute(Q,"")}catch{}},xe=function(Q){let Ne,ct;if(rt)Q=""+Q;else{let Ci=aEt(Q,/^[\r\n\t ]+/);ct=Ci&&Ci[0]}lt==="application/xhtml+xml"&&X===Dt&&(Q=''+Q+"");let Jt=b?b.createHTML(Q):Q;if(X===Dt)try{Ne=new h().parseFromString(Jt,lt)}catch{}if(!Ne||!Ne.documentElement){Ne=w.createDocument(X,"template",null);try{Ne.documentElement.innerHTML=We?C:Jt}catch{}}let fi=Ne.body||Ne.documentElement;return Q&&ct&&fi.insertBefore(o.createTextNode(ct),fi.childNodes[0]||null),X===Dt?k.call(Ne,W?"html":"body")[0]:W?Ne.documentElement:fi},Te=function(Q){return S.call(Q.ownerDocument||Q,Q,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},He=function(Q){return Q instanceof u&&(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"||typeof Q.hasChildNodes!="function")},Me=function(Q){return typeof a=="object"?Q instanceof a:Q&&typeof Q=="object"&&typeof Q.nodeType=="number"&&typeof Q.nodeName=="string"},et=function(Q,Ne,ct){E[Q]&&sEt(E[Q],Jt=>{Jt.call(e,Ne,ct,Qe)})},Tt=function(Q){let Ne;if(et("beforeSanitizeElements",Q,null),He(Q))return Se(Q),!0;let ct=Ke(Q.nodeName);if(et("uponSanitizeElement",Q,{tagName:ct,allowedTags:V}),Q.hasChildNodes()&&!Me(Q.firstElementChild)&&(!Me(Q.content)||!Me(Q.content.firstElementChild))&&qf(/<[/\w]/g,Q.innerHTML)&&qf(/<[/\w]/g,Q.textContent))return Se(Q),!0;if(!V[ct]||je[ct]){if(!je[ct]&&se(ct)&&(oe.tagNameCheck instanceof RegExp&&qf(oe.tagNameCheck,ct)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ct)))return!1;if(_e&&!B[ct]){let Jt=v(Q)||Q.parentNode,fi=_(Q)||Q.childNodes;if(fi&&Jt){let Ci=fi.length;for(let Gi=Ci-1;Gi>=0;--Gi)Jt.insertBefore(m(fi[Gi],!0),y(Q))}}return Se(Q),!0}return Q instanceof l&&!J(Q)||(ct==="noscript"||ct==="noembed"||ct==="noframes")&&qf(/<\/no(script|embed|frames)/i,Q.innerHTML)?(Se(Q),!0):(te&&Q.nodeType===3&&(Ne=Q.textContent,Ne=fm(Ne,A," "),Ne=fm(Ne,T," "),Ne=fm(Ne,L," "),Q.textContent!==Ne&&(NT(e.removed,{element:Q.cloneNode()}),Q.textContent=Ne)),et("afterSanitizeElements",Q,null),!1)},Je=function(Q,Ne,ct){if(tt&&(Ne==="id"||Ne==="name")&&(ct in o||ct in st))return!1;if(!(Ie&&!Ae[Ne]&&qf(I,Ne))){if(!(Be&&qf(M,Ne))){if(!fe[Ne]||Ae[Ne]){if(!(se(Q)&&(oe.tagNameCheck instanceof RegExp&&qf(oe.tagNameCheck,Q)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(Q))&&(oe.attributeNameCheck instanceof RegExp&&qf(oe.attributeNameCheck,Ne)||oe.attributeNameCheck instanceof Function&&oe.attributeNameCheck(Ne))||Ne==="is"&&oe.allowCustomizedBuiltInElements&&(oe.tagNameCheck instanceof RegExp&&qf(oe.tagNameCheck,ct)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ct))))return!1}else if(!Pe[Ne]){if(!qf(F,fm(ct,z,""))){if(!((Ne==="src"||Ne==="xlink:href"||Ne==="href")&&Q!=="script"&&lEt(ct,"data:")===0&&le[Q])){if(!(ee&&!qf(N,fm(ct,z,"")))){if(ct)return!1}}}}}}return!0},se=function(Q){return Q.indexOf("-")>0},he=function(Q){let Ne,ct,Jt,fi;et("beforeSanitizeAttributes",Q,null);let{attributes:Ci}=Q;if(!Ci)return;let Gi={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:fe};for(fi=Ci.length;fi--;){Ne=Ci[fi];let{name:pn,namespaceURI:ro}=Ne;if(ct=pn==="value"?Ne.value:cEt(Ne.value),Jt=Ke(pn),Gi.attrName=Jt,Gi.attrValue=ct,Gi.keepAttr=!0,Gi.forceKeepAttr=void 0,et("uponSanitizeAttribute",Q,Gi),ct=Gi.attrValue,Gi.forceKeepAttr||($e(pn,Q),!Gi.keepAttr))continue;if(!Z&&qf(/\/>/i,ct)){$e(pn,Q);continue}te&&(ct=fm(ct,A," "),ct=fm(ct,T," "),ct=fm(ct,L," "));let yr=Ke(Q.nodeName);if(Je(yr,Jt,ct)){if(ze&&(Jt==="id"||Jt==="name")&&($e(pn,Q),ct=Ge+ct),b&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!ro)switch(f.getAttributeType(yr,Jt)){case"TrustedHTML":{ct=b.createHTML(ct);break}case"TrustedScriptURL":{ct=b.createScriptURL(ct);break}}try{ro?Q.setAttributeNS(ro,pn,ct):Q.setAttribute(pn,ct),Mqe(e.removed)}catch{}}}et("afterSanitizeAttributes",Q,null)},Ee=function we(Q){let Ne,ct=Te(Q);for(et("beforeSanitizeShadowDOM",Q,null);Ne=ct.nextNode();)et("uponSanitizeShadowNode",Ne,null),!Tt(Ne)&&(Ne.content instanceof r&&we(Ne.content),he(Ne));et("afterSanitizeShadowDOM",Q,null)};return e.sanitize=function(we){let Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ne,ct,Jt,fi;if(We=!we,We&&(we=""),typeof we!="string"&&!Me(we))if(typeof we.toString=="function"){if(we=we.toString(),typeof we!="string")throw AT("dirty is not a string, aborting")}else throw AT("toString is not a function");if(!e.isSupported)return we;if(Le||Ct(Q),e.removed=[],typeof we=="string"&&($=!1),$){if(we.nodeName){let pn=Ke(we.nodeName);if(!V[pn]||je[pn])throw AT("root node is forbidden and cannot be sanitized in-place")}}else if(we instanceof a)Ne=xe(""),ct=Ne.ownerDocument.importNode(we,!0),ct.nodeType===1&&ct.nodeName==="BODY"||ct.nodeName==="HTML"?Ne=ct:Ne.appendChild(ct);else{if(!ae&&!te&&!W&&we.indexOf("<")===-1)return b&&Oe?b.createHTML(we):we;if(Ne=xe(we),!Ne)return ae?null:Oe?C:""}Ne&&rt&&Se(Ne.firstChild);let Ci=Te($?we:Ne);for(;Jt=Ci.nextNode();)Tt(Jt)||(Jt.content instanceof r&&Ee(Jt.content),he(Jt));if($)return we;if(ae){if(Ze)for(fi=x.call(Ne.ownerDocument);Ne.firstChild;)fi.appendChild(Ne.firstChild);else fi=Ne;return(fe.shadowroot||fe.shadowrootmode)&&(fi=D.call(t,fi,!0)),fi}let Gi=W?Ne.outerHTML:Ne.innerHTML;return W&&V["!doctype"]&&Ne.ownerDocument&&Ne.ownerDocument.doctype&&Ne.ownerDocument.doctype.name&&qf(Hqe,Ne.ownerDocument.doctype.name)&&(Gi=" +`+Gi),te&&(Gi=fm(Gi,A," "),Gi=fm(Gi,T," "),Gi=fm(Gi,L," ")),b&&Oe?b.createHTML(Gi):Gi},e.setConfig=function(we){Ct(we),Le=!0},e.clearConfig=function(){Qe=null,Le=!1},e.isValidAttribute=function(we,Q,Ne){Qe||Ct({});let ct=Ke(we),Jt=Ke(Q);return Je(ct,Jt,Ne)},e.addHook=function(we,Q){typeof Q=="function"&&(E[we]=E[we]||[],NT(E[we],Q))},e.removeHook=function(we){if(E[we])return Mqe(E[we])},e.removeHooks=function(we){E[we]&&(E[we]=[])},e.removeAllHooks=function(){E={}},e}var zqe,Iqe,iEt,nEt,oEt,th,pm,rEt,hhe,fhe,sEt,Mqe,NT,qU,ahe,aEt,fm,lEt,cEt,qf,AT,Nqe,lhe,che,uEt,dhe,hEt,Aqe,Rqe,uhe,Pqe,jU,fEt,pEt,mEt,gEt,vEt,Fqe,_Et,bEt,Hqe,Oqe,yEt,CEt,Hg,_4i,b4i,GU,y4i,C4i,w4i,RT,KU,x4i,S4i,YU=P(()=>{({entries:zqe,setPrototypeOf:Iqe,isFrozen:iEt,getPrototypeOf:nEt,getOwnPropertyDescriptor:oEt}=Object),{freeze:th,seal:pm,create:rEt}=Object,{apply:hhe,construct:fhe}=typeof Reflect<"u"&&Reflect;hhe||(hhe=function(e,t,n){return e.apply(t,n)});th||(th=function(e){return e});pm||(pm=function(e){return e});fhe||(fhe=function(e,t){return new e(...t)});sEt=op(Array.prototype.forEach),Mqe=op(Array.prototype.pop),NT=op(Array.prototype.push),qU=op(String.prototype.toLowerCase),ahe=op(String.prototype.toString),aEt=op(String.prototype.match),fm=op(String.prototype.replace),lEt=op(String.prototype.indexOf),cEt=op(String.prototype.trim),qf=op(RegExp.prototype.test),AT=dEt(TypeError);Nqe=th(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),lhe=th(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),che=th(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),uEt=th(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),dhe=th(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),hEt=th(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Aqe=th(["#text"]),Rqe=th(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),uhe=th(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Pqe=th(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),jU=th(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),fEt=pm(/\{\{[\w\W]*|[\w\W]*\}\}/gm),pEt=pm(/<%[\w\W]*|[\w\W]*%>/gm),mEt=pm(/\${[\w\W]*}/gm),gEt=pm(/^data-[\-\w.\u00B7-\uFFFF]/),vEt=pm(/^aria-[\-\w]+$/),Fqe=pm(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_Et=pm(/^(?:\w+script|data):/i),bEt=pm(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Hqe=pm(/^html$/i),Oqe=Object.freeze({__proto__:null,MUSTACHE_EXPR:fEt,ERB_EXPR:pEt,TMPLIT_EXPR:mEt,DATA_ATTR:gEt,ARIA_ATTR:vEt,IS_ALLOWED_URI:Fqe,IS_SCRIPT_OR_DATA:_Et,ATTR_WHITESPACE:bEt,DOCTYPE_NAME:Hqe}),yEt=()=>typeof window>"u"?null:window,CEt=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));let r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}};Hg=Bqe(),_4i=Hg.version,b4i=Hg.isSupported,GU=Hg.sanitize,y4i=Hg.setConfig,C4i=Hg.clearConfig,w4i=Hg.isValidAttribute,RT=Hg.addHook,KU=Hg.removeHook,x4i=Hg.removeHooks,S4i=Hg.removeAllHooks});function PT(i,e){return li.isUri(i)?G0(i.scheme,e):OC(i,e+":")}function mhe(i,...e){return e.some(t=>PT(i,t))}var $i,wEt,phe,ghe,xEt,ZU,XU,Wqe,Nc=P(()=>{Pi();Mn();Ri();Io();(function(i){i.inMemory="inmemory",i.vscode="vscode",i.internal="private",i.walkThrough="walkThrough",i.walkThroughSnippet="walkThroughSnippet",i.http="http",i.https="https",i.file="file",i.mailto="mailto",i.untitled="untitled",i.data="data",i.command="command",i.vscodeRemote="vscode-remote",i.vscodeRemoteResource="vscode-remote-resource",i.vscodeManagedRemoteResource="vscode-managed-remote-resource",i.vscodeUserData="vscode-userdata",i.vscodeCustomEditor="vscode-custom-editor",i.vscodeNotebookCell="vscode-notebook-cell",i.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",i.vscodeNotebookCellOutput="vscode-notebook-cell-output",i.vscodeInteractiveInput="vscode-interactive-input",i.vscodeSettings="vscode-settings",i.vscodeWorkspaceTrust="vscode-workspace-trust",i.vscodeTerminal="vscode-terminal",i.vscodeChatSesssion="vscode-chat-editor",i.webviewPanel="webview-panel",i.vscodeWebview="vscode-webview",i.extension="extension",i.vscodeFileResource="vscode-file",i.tmp="tmp",i.vsls="vsls",i.vscodeSourceControl="vscode-scm"})($i||($i={}));wEt="tkn",phe=class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${$i.vscodeRemoteResource}`}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(a){return hi(a),e}let t=e.authority,n=this._hosts[t];n&&n.indexOf(":")!==-1&&n.indexOf("[")===-1&&(n=`[${n}]`);let o=this._ports[t],r=this._connectionTokens[t],s=`path=${encodeURIComponent(e.path)}`;return typeof r=="string"&&(s+=`&${wEt}=${encodeURIComponent(r)}`),li.from({scheme:Fh?this._preferredWebSchema:$i.vscodeRemoteResource,authority:`${n}:${o}`,path:this._remoteResourcesPath,query:s})}},ghe=new phe,xEt="vscode-app",ZU=class i{uriToBrowserUri(e){return e.scheme===$i.vscodeRemote?ghe.rewrite(e):e.scheme===$i.file&&(tu||Lje===`${$i.vscodeFileResource}://${i.FALLBACK_AUTHORITY}`)?e.with({scheme:$i.vscodeFileResource,authority:e.authority||i.FALLBACK_AUTHORITY,query:null,fragment:null}):e}};ZU.FALLBACK_AUTHORITY=xEt;XU=new ZU;(function(i){let e=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);i.CoopAndCoep=Object.freeze(e.get("3"));let t="vscode-coi";function n(r){let s;typeof r=="string"?s=new URL(r).searchParams:r instanceof URL?s=r.searchParams:li.isUri(r)&&(s=new URL(r.toString(!0)).searchParams);let a=s?.get(t);if(a)return e.get(a)}i.getHeadersFromQuery=n;function o(r,s,a){if(!globalThis.crossOriginIsolated)return;let l=s&&a?"3":a?"2":"1";r instanceof URLSearchParams?r.set(t,l):r[t]=l}i.addSearchParam=o})(Wqe||(Wqe={}))});function W3(i){return FT(i,0)}function FT(i,e){switch(typeof i){case"object":return i===null?Y0(349,e):Array.isArray(i)?kEt(i,e):LEt(i,e);case"string":return QU(i,e);case"boolean":return SEt(i,e);case"number":return Y0(i,e);case"undefined":return Y0(937,e);default:return Y0(617,e)}}function Y0(i,e){return(e<<5)-e+i|0}function SEt(i,e){return Y0(i?433:863,e)}function QU(i,e){e=Y0(149417,e);for(let t=0,n=i.length;tFT(n,t),e)}function LEt(i,e){return e=Y0(181387,e),Object.keys(i).sort().reduce((t,n)=>(t=QU(n,t),FT(i[n],t)),e)}function vhe(i,e,t=32){let n=t-e,o=~((1<>>n)>>>0}function Uqe(i,e=0,t=i.byteLength,n=0){for(let o=0;ot.toString(16).padStart(2,"0")).join(""):EEt((i>>>0).toString(16),e/4)}var zT,U3=P(()=>{Ri();zT=class i{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){let t=e.length;if(t===0)return;let n=this._buff,o=this._buffLen,r=this._leftoverHighSurrogate,s,a;for(r!==0?(s=r,a=-1,r=0):(s=e.charCodeAt(0),a=0);;){let l=s;if(Or(s))if(a+1>>6,e[t++]=128|(n&63)>>>0):n<65536?(e[t++]=224|(n&61440)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0):(e[t++]=240|(n&1835008)>>>18,e[t++]=128|(n&258048)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),OT(this._h0)+OT(this._h1)+OT(this._h2)+OT(this._h3)+OT(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,Uqe(this._buff,this._buffLen),this._buffLen>56&&(this._step(),Uqe(this._buff));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){let e=i._bigBlock32,t=this._buffDV;for(let u=0;u<64;u+=4)e.setUint32(u,t.getUint32(u,!1),!1);for(let u=64;u<320;u+=4)e.setUint32(u,vhe(e.getUint32(u-12,!1)^e.getUint32(u-32,!1)^e.getUint32(u-56,!1)^e.getUint32(u-64,!1),1),!1);let n=this._h0,o=this._h1,r=this._h2,s=this._h3,a=this._h4,l,c,d;for(let u=0;u<80;u++)u<20?(l=o&r|~o&s,c=1518500249):u<40?(l=o^r^s,c=1859775393):u<60?(l=o&r|o&s|r&s,c=2400959708):(l=o^r^s,c=3395469782),d=vhe(n,5)+l+a+c+e.getUint32(u*4,!1)&4294967295,a=s,s=r,r=vhe(o,30),o=n,n=d;this._h0=this._h0+n&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+r&4294967295,this._h3=this._h3+s&4294967295,this._h4=this._h4+a&4294967295}};zT._bigBlock32=new DataView(new ArrayBuffer(320))});function is(i){for(;i.firstChild;)i.firstChild.remove()}function Xe(i,e,t,n){return new bhe(i,e,t,n)}function Kqe(i,e){return function(t){return e(new Oa(i,t))}}function TEt(i){return function(e){return i(new qn(e))}}function IEt(i,e,t){return Xe(i,Lc&&VC.pointerEvents?Lt.POINTER_DOWN:Lt.MOUSE_DOWN,e,t)}function S5(i,e,t){return WC(i,e,t)}function VT(i){return pi(i).getComputedStyle(i,null)}function jh(i,e){let t=pi(i),n=t.document;if(i!==n.body)return new Xn(i.clientWidth,i.clientHeight);if(Lc&&t?.visualViewport)return new Xn(t.visualViewport.width,t.visualViewport.height);if(t?.innerWidth&&t.innerHeight)return new Xn(t.innerWidth,t.innerHeight);if(n.body&&n.body.clientWidth&&n.body.clientHeight)return new Xn(n.body.clientWidth,n.body.clientHeight);if(n.documentElement&&n.documentElement.clientWidth&&n.documentElement.clientHeight)return new Xn(n.documentElement.clientWidth,n.documentElement.clientHeight);if(e)return jh(e);throw new Error("Unable to figure out browser width and height")}function e$(i){let e=i.offsetParent,t=i.offsetTop,n=i.offsetLeft;for(;(i=i.parentNode)!==null&&i!==i.ownerDocument.body&&i!==i.ownerDocument.documentElement;){t-=i.scrollTop;let o=Qqe(i)?null:VT(i);o&&(n-=o.direction!=="rtl"?i.scrollLeft:-i.scrollLeft),i===e&&(n+=su.getBorderLeftWidth(i),t+=su.getBorderTopWidth(i),t+=i.offsetTop,n+=i.offsetLeft,e=i.offsetParent)}return{left:n,top:t}}function Zqe(i,e,t){typeof e=="number"&&(i.style.width=`${e}px`),typeof t=="number"&&(i.style.height=`${t}px`)}function Lo(i){let e=i.getBoundingClientRect(),t=pi(i);return{left:e.left+t.scrollX,top:e.top+t.scrollY,width:e.width,height:e.height}}function t$(i){let e=i,t=1;do{let n=VT(e).zoom;n!=null&&n!=="1"&&(t*=n),e=e.parentElement}while(e!==null&&e!==e.ownerDocument.documentElement);return t}function wl(i){let e=su.getMarginLeft(i)+su.getMarginRight(i);return i.offsetWidth+e}function i$(i){let e=su.getBorderLeftWidth(i)+su.getBorderRightWidth(i),t=su.getPaddingLeft(i)+su.getPaddingRight(i);return i.offsetWidth-e-t}function Xqe(i){let e=su.getBorderTopWidth(i)+su.getBorderBottomWidth(i),t=su.getPaddingTop(i)+su.getPaddingBottom(i);return i.offsetHeight-e-t}function Bg(i){let e=su.getMarginTop(i)+su.getMarginBottom(i);return i.offsetHeight+e}function ms(i,e){return!!e?.contains(i)}function MEt(i,e,t){for(;i&&i.nodeType===i.ELEMENT_NODE;){if(i.classList.contains(e))return i;if(t){if(typeof t=="string"){if(i.classList.contains(t))return null}else if(i===t)return null}i=i.parentNode}return null}function n$(i,e,t){return!!MEt(i,e,t)}function Qqe(i){return i&&!!i.host&&!!i.mode}function k5(i){return!!mm(i)}function mm(i){for(var e;i.parentNode;){if(i===((e=i.ownerDocument)===null||e===void 0?void 0:e.body))return null;i=i.parentNode}return Qqe(i)?i:null}function gs(){let i=X0().activeElement;for(;i?.shadowRoot;)i=i.shadowRoot.activeElement;return i}function L5(i){return gs()===i}function o$(i){return ms(gs(),i)}function X0(){var i;return DEt()<=1?Hn.document:(i=Array.from(qqe()).map(({window:t})=>t.document).find(t=>t.hasFocus()))!==null&&i!==void 0?i:Hn.document}function Jqe(){var i,e;return(e=(i=X0().defaultView)===null||i===void 0?void 0:i.window)!==null&&e!==void 0?e:Hn}function eGe(){return new yhe}function ya(i=Hn.document.head,e,t){let n=document.createElement("style");if(n.type="text/css",n.media="screen",e?.(n),i.appendChild(n),t&&t.add(Yt(()=>i.removeChild(n))),i===Hn.document.head){let o=new Set;whe.set(n,o);for(let{window:r,disposables:s}of qqe()){if(r===Hn)continue;let a=s.add(NEt(n,o,r));t?.add(a)}}return n}function NEt(i,e,t){var n,o;let r=new Ye,s=i.cloneNode(!0);t.document.head.appendChild(s),r.add(Yt(()=>t.document.head.removeChild(s)));for(let a of iGe(i))(n=s.sheet)===null||n===void 0||n.insertRule(a.cssText,(o=s.sheet)===null||o===void 0?void 0:o.cssRules.length);return r.add(AEt.observe(i,r,{childList:!0})(()=>{s.textContent=i.textContent})),e.add(s),r.add(Yt(()=>e.delete(s))),r}function tGe(){return _he||(_he=ya()),_he}function iGe(i){var e,t;return!((e=i?.sheet)===null||e===void 0)&&e.rules?i.sheet.rules:!((t=i?.sheet)===null||t===void 0)&&t.cssRules?i.sheet.cssRules:[]}function GC(i,e,t=tGe()){var n,o;if(!(!t||!e)){(n=t.sheet)===null||n===void 0||n.insertRule(`${i} {${e}}`,0);for(let r of(o=whe.get(t))!==null&&o!==void 0?o:[])GC(i,e,r)}}function r$(i,e=tGe()){var t,n;if(!e)return;let o=iGe(e),r=[];for(let s=0;s=0;s--)(t=e.sheet)===null||t===void 0||t.deleteRule(r[s]);for(let s of(n=whe.get(e))!==null&&n!==void 0?n:[])r$(i,s)}function REt(i){return typeof i.selectorText=="string"}function KC(i){return i instanceof MouseEvent||i instanceof pi(i).MouseEvent}function YC(i){return i instanceof KeyboardEvent||i instanceof pi(i).KeyboardEvent}function nGe(i){let e=i;return!!(e&&typeof e.preventDefault=="function"&&typeof e.stopPropagation=="function")}function oGe(i){let e=[];for(let t=0;i&&i.nodeType===i.ELEMENT_NODE;t++)e[t]=i.scrollTop,i=i.parentNode;return e}function rGe(i,e){for(let t=0;i&&i.nodeType===i.ELEMENT_NODE;t++)i.scrollTop!==e[t]&&(i.scrollTop=e[t]),i=i.parentNode}function Kl(i){return new Che(i)}function sGe(i,e){return i.after(e),e}function ut(i,...e){if(i.append(...e),e.length===1&&typeof e[0]!="string")return e[0]}function ZC(i,e){return i.insertBefore(e,i.firstChild),e}function ns(i,...e){i.innerText="",ut(i,...e)}function aGe(i,e,t,...n){let o=PEt.exec(e);if(!o)throw new Error("Bad use of emmet");let r=o[1]||"div",s;return i!==BT.HTML?s=document.createElementNS(i,r):s=document.createElement(r),o[3]&&(s.id=o[3]),o[4]&&(s.className=o[4].replace(/\./g," ").trim()),t&&Object.entries(t).forEach(([a,l])=>{typeof l>"u"||(/^on\w+$/.test(a)?s[a]=l:a==="selected"?l&&s.setAttribute(a,"true"):s.setAttribute(a,l))}),s.append(...n),s}function pt(i,e,...t){return aGe(BT.HTML,i,e,...t)}function lGe(i,...e){i?el(...e):Fa(...e)}function el(...i){for(let e of i)e.style.display="",e.removeAttribute("aria-hidden")}function Fa(...i){for(let e of i)e.style.display="none",e.setAttribute("aria-hidden","true")}function xhe(i,e){let t=i.devicePixelRatio*e;return Math.max(1,Math.floor(t))/i.devicePixelRatio}function s$(i){Hn.open(i,"_blank","noopener")}function cGe(i,e){let t=()=>{e(),n=za(i,t)},n=za(i,t);return Yt(()=>n.dispose())}function rp(i){return i?`url('${XU.uriToBrowserUri(i).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function She(i){return`'${i.replace(/'/g,"%27")}'`}function Gf(i,e){if(i!==void 0){let t=i.match(/^\s*var\((.+)\)$/);if(t){let n=t[1].split(",",2);return n.length===2&&(e=Gf(n[1].trim(),e)),`var(${n[0]}, ${e})`}return i}return e}function dGe(i,e=!1){let t=document.createElement("a");return RT("afterSanitizeAttributes",n=>{for(let o of["href","src"])if(n.hasAttribute(o)){let r=n.getAttribute(o);if(o==="href"&&r.startsWith("#"))continue;if(t.href=r,!i.includes(t.protocol.replace(/:$/,""))){if(e&&o==="src"&&t.href.startsWith("data:"))continue;n.removeAttribute(o)}}}),Yt(()=>{KU("afterSanitizeAttributes")})}function Do(i,...e){let t,n;Array.isArray(e[0])?(t={},n=e[0]):(t=e[0]||{},n=e[1]);let o=OEt.exec(i);if(!o||!o.groups)throw new Error("Bad use of h");let r=o.groups.tag||"div",s=document.createElement(r);o.groups.id&&(s.id=o.groups.id);let a=[];if(o.groups.class)for(let c of o.groups.class.split("."))c!==""&&a.push(c);if(t.className!==void 0)for(let c of t.className.split("."))c!==""&&a.push(c);a.length>0&&(s.className=a.join(" "));let l={};if(o.groups.name&&(l[o.groups.name]=s),n)for(let c of n)c instanceof HTMLElement?s.appendChild(c):typeof c=="string"?s.append(c):"root"in c&&(Object.assign(l,c),s.appendChild(c.root));for(let[c,d]of Object.entries(t))if(c!=="className")if(c==="style")for(let[u,h]of Object.entries(d))s.style.setProperty(jqe(u),typeof h=="number"?h+"px":""+h);else c==="tabIndex"?s.tabIndex=d:s.setAttribute(jqe(c),d.toString());return l.root=s,l}function jqe(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}var F4i,pi,H4i,qqe,DEt,$qe,B4i,V4i,x5,Gqe,W4i,bhe,go,Yqe,jC,qC,za,$3,HT,su,Xn,whe,yhe,AEt,_he,Lt,nn,Che,PEt,BT,uGe,U4i,Z0,JU,OEt,Qt=P(()=>{Xc();FU();Gl();Uh();Qi();Pi();Xt();YU();nt();Nc();Mn();U3();_l();({registerWindow:F4i,getWindow:pi,getDocument:H4i,getWindows:qqe,getWindowsCount:DEt,getWindowId:$qe,getWindowById:B4i,hasWindow:V4i,onDidRegisterWindow:x5,onWillUnregisterWindow:Gqe,onDidUnregisterWindow:W4i}=function(){let i=new Map;tqe(Hn,1),i.set(Hn.vscodeWindowId,{window:Hn,disposables:new Ye});let e=new ge,t=new ge,n=new ge;return{onDidRegisterWindow:e.event,onWillUnregisterWindow:n.event,onDidUnregisterWindow:t.event,registerWindow(o){if(i.has(o.vscodeWindowId))return ue.None;let r=new Ye,s={window:o,disposables:r.add(new Ye)};return i.set(o.vscodeWindowId,s),r.add(Yt(()=>{i.delete(o.vscodeWindowId),t.fire(o)})),r.add(Xe(o,Lt.BEFORE_UNLOAD,()=>{n.fire(o)})),e.fire(s),r},getWindows(){return i.values()},getWindowsCount(){return i.size},getWindowId(o){return o.vscodeWindowId},hasWindow(o){return i.has(o)},getWindowById(o){return i.get(o)},getWindow(o){var r;let s=o;if(!((r=s?.ownerDocument)===null||r===void 0)&&r.defaultView)return s.ownerDocument.defaultView.window;let a=o;return a?.view?a.view.window:Hn},getDocument(o){return pi(o).document}}}());bhe=class{constructor(e,t,n,o){this._node=e,this._type=t,this._handler=n,this._options=o||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};go=function(e,t,n,o){let r=n;return t==="click"||t==="mousedown"?r=Kqe(pi(e),n):(t==="keydown"||t==="keypress"||t==="keyup")&&(r=TEt(n)),Xe(e,t,r,o)},Yqe=function(e,t,n){let o=Kqe(pi(e),t);return IEt(e,o,n)};jC=class extends IT{constructor(e,t){super(e,t)}},$3=class extends B3{constructor(e){super(),this.defaultTarget=e&&pi(e)}cancelAndSet(e,t,n){return super.cancelAndSet(e,t,n??this.defaultTarget)}},HT=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){hi(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let i=new Map,e=new Map,t=new Map,n=new Map,o=r=>{var s;t.set(r,!1);let a=(s=i.get(r))!==null&&s!==void 0?s:[];for(e.set(r,a),i.set(r,[]),n.set(r,!0);a.length>0;)a.sort(HT.sort),a.shift().execute();n.set(r,!1)};za=(r,s,a=0)=>{let l=$qe(r),c=new HT(s,a),d=i.get(l);return d||(d=[],i.set(l,d)),d.push(c),t.get(l)||(t.set(l,!0),r.requestAnimationFrame(()=>o(l))),c},qC=(r,s,a)=>{let l=$qe(r);if(n.get(l)){let c=new HT(s,a),d=e.get(l);return d||(d=[],e.set(l,d)),d.push(c),c}else return za(r,s,a)}})();su=class i{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,n){let o=VT(e),r=o?o.getPropertyValue(t):"0";return i.convertToPixels(e,r)}static getBorderLeftWidth(e){return i.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return i.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return i.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return i.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return i.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return i.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return i.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return i.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return i.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return i.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return i.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return i.getDimension(e,"margin-bottom","marginBottom")}},Xn=class i{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new i(e,t):this}static is(e){return typeof e=="object"&&typeof e.height=="number"&&typeof e.width=="number"}static lift(e){return e instanceof i?e:new i(e.width,e.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}};Xn.None=new Xn(0,0);whe=new Map;yhe=class{constructor(){this._currentCssStyle="",this._styleSheet=void 0}setStyle(e){e!==this._currentCssStyle&&(this._currentCssStyle=e,this._styleSheet?this._styleSheet.innerText=e:this._styleSheet=ya(Hn.document.head,t=>t.innerText=e))}dispose(){this._styleSheet&&(is(this._styleSheet),this._styleSheet=void 0)}};AEt=new class{constructor(){this.mutationObservers=new Map}observe(i,e,t){let n=this.mutationObservers.get(i);n||(n=new Map,this.mutationObservers.set(i,n));let o=W3(t),r=n.get(o);if(r)r.users+=1;else{let s=new ge,a=new MutationObserver(c=>s.fire(c));a.observe(i,t);let l=r={users:1,observer:a,onDidMutate:s.event};e.add(Yt(()=>{l.users-=1,l.users===0&&(s.dispose(),a.disconnect(),n?.delete(o),n?.size===0&&this.mutationObservers.delete(i))})),n.set(o,r)}return r.onDidMutate}},_he=null;Lt={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:cm?"webkitAnimationStart":"animationstart",ANIMATION_END:cm?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:cm?"webkitAnimationIteration":"animationiteration"};nn={stop:(i,e)=>(i.preventDefault(),e&&i.stopPropagation(),i)};Che=class i extends ue{static hasFocusWithin(e){if(e instanceof HTMLElement){let t=mm(e),n=t?t.activeElement:e.ownerDocument.activeElement;return ms(n,e)}else{let t=e;return ms(t.document.activeElement,t.document)}}constructor(e){super(),this._onDidFocus=this._register(new ge),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new ge),this.onDidBlur=this._onDidBlur.event;let t=i.hasFocusWithin(e),n=!1,o=()=>{n=!1,t||(t=!0,this._onDidFocus.fire())},r=()=>{t&&(n=!0,(e instanceof HTMLElement?pi(e):e).setTimeout(()=>{n&&(n=!1,t=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{i.hasFocusWithin(e)!==t&&(t?r():o())},this._register(Xe(e,Lt.FOCUS,o,!0)),this._register(Xe(e,Lt.BLUR,r,!0)),e instanceof HTMLElement&&(this._register(Xe(e,Lt.FOCUS_IN,()=>this._refreshStateHandler())),this._register(Xe(e,Lt.FOCUS_OUT,()=>this._refreshStateHandler())))}};PEt=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;(function(i){i.HTML="http://www.w3.org/1999/xhtml",i.SVG="http://www.w3.org/2000/svg"})(BT||(BT={}));pt.SVG=function(i,e,...t){return aGe(BT.SVG,i,e,...t)};ghe.setPreferredWebSchema(/^https:/.test(Hn.location.href)?"https":"http");uGe=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]),U4i=Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type","start"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0}),Z0=class i extends ge{constructor(){super(),this._subscriptions=new Ye,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(Et.runAndSubscribe(x5,({window:e,disposables:t})=>this.registerListeners(e,t),{window:Hn,disposables:this._subscriptions}))}registerListeners(e,t){t.add(Xe(e,"keydown",n=>{if(n.defaultPrevented)return;let o=new qn(n);if(!(o.keyCode===6&&n.repeat)){if(n.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(n.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(n.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(n.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(o.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=n.altKey,this._keyStatus.ctrlKey=n.ctrlKey,this._keyStatus.metaKey=n.metaKey,this._keyStatus.shiftKey=n.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=n,this.fire(this._keyStatus))}},!0)),t.add(Xe(e,"keyup",n=>{n.defaultPrevented||(!n.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!n.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!n.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!n.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=n.altKey,this._keyStatus.ctrlKey=n.ctrlKey,this._keyStatus.metaKey=n.metaKey,this._keyStatus.shiftKey=n.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=n,this.fire(this._keyStatus)))},!0)),t.add(Xe(e.document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),t.add(Xe(e.document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),t.add(Xe(e.document.body,"mousemove",n=>{n.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),t.add(Xe(e,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return i.instance||(i.instance=new i),i.instance}dispose(){super.dispose(),this._subscriptions.dispose()}},JU=class extends ue{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this.callbacks.onDragStart&&this._register(Xe(this.element,Lt.DRAG_START,e=>{var t,n;(n=(t=this.callbacks).onDragStart)===null||n===void 0||n.call(t,e)})),this.callbacks.onDrag&&this._register(Xe(this.element,Lt.DRAG,e=>{var t,n;(n=(t=this.callbacks).onDrag)===null||n===void 0||n.call(t,e)})),this._register(Xe(this.element,Lt.DRAG_ENTER,e=>{var t,n;this.counter++,this.dragStartTime=e.timeStamp,(n=(t=this.callbacks).onDragEnter)===null||n===void 0||n.call(t,e)})),this._register(Xe(this.element,Lt.DRAG_OVER,e=>{var t,n;e.preventDefault(),(n=(t=this.callbacks).onDragOver)===null||n===void 0||n.call(t,e,e.timeStamp-this.dragStartTime)})),this._register(Xe(this.element,Lt.DRAG_LEAVE,e=>{var t,n;this.counter--,this.counter===0&&(this.dragStartTime=0,(n=(t=this.callbacks).onDragLeave)===null||n===void 0||n.call(t,e))})),this._register(Xe(this.element,Lt.DRAG_END,e=>{var t,n;this.counter=0,this.dragStartTime=0,(n=(t=this.callbacks).onDragEnd)===null||n===void 0||n.call(t,e)})),this._register(Xe(this.element,Lt.DROP,e=>{var t,n;this.counter=0,this.dragStartTime=0,(n=(t=this.callbacks).onDrop)===null||n===void 0||n.call(t,e)}))}},OEt=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/});function nh(i,e){Zi.registerCommand(i,function(t,...n){let o=t.get(qt),[r,s]=n;Bn(li.isUri(r)),Bn(ke.isIPosition(s));let a=t.get(no).getModel(r);if(a){let l=ke.lift(s);return o.invokeFunction(e,a,l,...n.slice(2))}return t.get(xs).createModelReference(r).then(l=>new Promise((c,d)=>{try{let u=o.invokeFunction(e,l.object.textEditorModel,ke.lift(s),n.slice(2));c(u)}catch(u){d(u)}}).finally(()=>{l.dispose()}))})}function zt(i){return ih.INSTANCE.registerEditorCommand(i),i}function yt(i){let e=new i;return ih.INSTANCE.registerEditorAction(e),e}function khe(i){return ih.INSTANCE.registerEditorAction(i),i}function hGe(i){ih.INSTANCE.registerEditorAction(i)}function Ii(i,e,t){ih.INSTANCE.registerEditorContribution(i,e,t)}function UT(i){return i.register(),i}var E5,Q0,a$,Jo,Ot,WT,kd,j3,zEt,ih,Lhe,Ehe,fGe,an=P(()=>{Wt();Io();fs();Mi();Dc();Wh();Dr();$o();Xi();_i();z3();Ys();$f();ho();Ju();Qt();E5=class{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this.metadata=e.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){let e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(let t of e){let n=t.kbExpr;this.precondition&&(n?n=mt.and(n,this.precondition):n=this.precondition);let o={id:this.id,weight:t.weight,args:t.args,when:n,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};Pa.registerKeybindingRule(o)}}Zi.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),metadata:this.metadata})}_registerMenuItem(e){ps.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}},Q0=class extends E5{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,n,o){return this._implementations.push({priority:e,name:t,implementation:n,when:o}),this._implementations.sort((r,s)=>s.priority-r.priority),{dispose:()=>{for(let r=0;r{if(a.get(ri).contextMatchesRules(n??void 0))return o(a,s,t)})}runCommand(e,t){return i.runEditorCommand(e,t,this.precondition,(n,o,r)=>this.runEditorCommand(n,o,r))}},Ot=class i extends Jo{static convertOptions(e){let t;Array.isArray(e.menuOpts)?t=e.menuOpts:e.menuOpts?t=[e.menuOpts]:t=[];function n(o){return o.menuId||(o.menuId=ne.EditorContext),o.title||(o.title=e.label),o.when=mt.and(e.precondition,o.when),o}return Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(n)):e.contextMenuOpts&&t.push(n(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super(i.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,n){return this.reportTelemetry(e,t),this.run(e,t,n||{})}reportTelemetry(e,t){e.get(Fs).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}},WT=class extends Ot{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort((n,o)=>o[0]-n[0]),{dispose:()=>{for(let n=0;n{var s,a;let l=r.get(ri),c=r.get(ks);if(!l.contextMatchesRules((s=this.desc.precondition)!==null&&s!==void 0?s:void 0)){c.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,(a=this.desc.precondition)===null||a===void 0?void 0:a.serialize());return}return this.runEditorCommand(r,o,...t)})}};(function(i){function e(s){return ih.INSTANCE.getEditorCommand(s)}i.getEditorCommand=e;function t(){return ih.INSTANCE.getEditorActions()}i.getEditorActions=t;function n(){return ih.INSTANCE.getEditorContributions()}i.getEditorContributions=n;function o(s){return ih.INSTANCE.getEditorContributions().filter(a=>s.indexOf(a.id)>=0)}i.getSomeEditorContributions=o;function r(){return ih.INSTANCE.getDiffEditorContributions()}i.getDiffEditorContributions=r})(j3||(j3={}));zEt={EditorCommonContributions:"editor.contributions"},ih=class{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,n){this.editorContributions.push({id:e,ctor:t,instantiation:n})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}};ih.INSTANCE=new ih;jn.add(zEt.EditorCommonContributions,ih.INSTANCE);Lhe=UT(new Q0({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:ne.MenubarEditMenu,group:"1_do",title:g({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:ne.CommandPalette,group:"",title:g("undo","Undo"),order:1}]}));UT(new a$(Lhe,{id:"default:undo",precondition:void 0}));Ehe=UT(new Q0({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:ne.MenubarEditMenu,group:"1_do",title:g({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:ne.CommandPalette,group:"",title:g("redo","Redo"),order:1}]}));UT(new a$(Ehe,{id:"default:redo",precondition:void 0}));fGe=UT(new Q0({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:ne.MenubarSelectionMenu,group:"1_basic",title:g({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:ne.CommandPalette,group:"",title:g("selectAll","Select All"),order:1}]}))});function $T(i){Fh&&(pGe||(pGe=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(i.message))}function mGe(i){return i[0]==="o"&&i[1]==="n"&&Ff(i.charCodeAt(2))}function gGe(i){return/^onDynamic/.test(i)&&Ff(i.charCodeAt(9))}function HEt(i,e,t){let n=s=>function(){let a=Array.prototype.slice.call(arguments,0);return e(s,a)},o=s=>function(a){return t(s,a)},r={};for(let s of i){if(gGe(s)){r[s]=o(s);continue}if(mGe(s)){r[s]=t(s,void 0);continue}r[s]=n(s)}return r}var FEt,pGe,Dhe,l$,The,Ihe,Mhe,Nhe,c$,Ahe=P(()=>{Pi();Xt();nt();Gc();Mn();Ri();FEt="$initialize",pGe=!1;Dhe=class{constructor(e,t,n,o){this.vsWorker=e,this.req=t,this.method=n,this.args=o,this.type=0}},l$=class{constructor(e,t,n,o){this.vsWorker=e,this.seq=t,this.res=n,this.err=o,this.type=1}},The=class{constructor(e,t,n,o){this.vsWorker=e,this.req=t,this.eventName=n,this.arg=o,this.type=2}},Ihe=class{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}},Mhe=class{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}},Nhe=class{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t){let n=String(++this._lastSentReq);return new Promise((o,r)=>{this._pendingReplies[n]={resolve:o,reject:r},this._send(new Dhe(this._workerId,n,e,t))})}listen(e,t){let n=null,o=new ge({onWillAddFirstListener:()=>{n=String(++this._lastSentReq),this._pendingEmitters.set(n,o),this._send(new The(this._workerId,n,e,t))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(n),this._send(new Mhe(this._workerId,n)),n=null}});return o.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}let t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),t.reject(n);return}t.resolve(e.res)}_handleRequestMessage(e){let t=e.req;this._handler.handleMessage(e.method,e.args).then(o=>{this._send(new l$(this._workerId,t,o,void 0))},o=>{o.detail instanceof Error&&(o.detail=wue(o.detail)),this._send(new l$(this._workerId,t,void 0,wue(o)))})}_handleSubscribeEventMessage(e){let t=e.req,n=this._handler.handleEvent(e.eventName,e.arg)(o=>{this._send(new Ihe(this._workerId,t,o))});this._pendingEvents.set(t,n)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){let t=[];if(e.type===0)for(let n=0;n{this._protocol.handleMessage(d)},d=>{o?.(d)})),this._protocol=new Nhe({sendMessage:(d,u)=>{this._worker.postMessage(d,u)},handleMessage:(d,u)=>{if(typeof n[d]!="function")return Promise.reject(new Error("Missing method "+d+" on main thread host."));try{return Promise.resolve(n[d].apply(n,u))}catch(h){return Promise.reject(h)}},handleEvent:(d,u)=>{if(gGe(d)){let h=n[d].call(n,u);if(typeof h!="function")throw new Error(`Missing dynamic event ${d} on main thread host.`);return h}if(mGe(d)){let h=n[d];if(typeof h!="function")throw new Error(`Missing event ${d} on main thread host.`);return h}throw new Error(`Malformed event name ${d}`)}}),this._protocol.setWorkerId(this._worker.getId());let r=null,s=globalThis.require;typeof s<"u"&&typeof s.getConfig=="function"?r=s.getConfig():typeof globalThis.requirejs<"u"&&(r=globalThis.requirejs.s.contexts._.config);let a=bC(n);this._onModuleLoaded=this._protocol.sendMessage(FEt,[this._worker.getId(),JSON.parse(JSON.stringify(r)),t,a]);let l=(d,u)=>this._request(d,u),c=(d,u)=>this._protocol.listen(d,u);this._lazyProxy=new Promise((d,u)=>{o=u,this._onModuleLoaded.then(h=>{d(HEt(h,l,c))},h=>{u(h),this._onError("Worker failed to load "+t,h)})})}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise((n,o)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(e,t).then(n,o)},o)})}_onError(e,t){console.error(e),console.info(t)}}});function td(i,e){var t;let n=globalThis.MonacoEnvironment;if(n?.createTrustedTypesPolicy)try{return n.createTrustedTypesPolicy(i,e)}catch(o){hi(o);return}try{return(t=Hn.trustedTypes)===null||t===void 0?void 0:t.createPolicy(i,e)}catch(o){hi(o);return}}var Vg=P(()=>{_l();Pi()});function BEt(i){let e=globalThis.MonacoEnvironment;if(e){if(typeof e.getWorker=="function")return e.getWorker("workerMain.js",i);if(typeof e.getWorkerUrl=="function"){let t=e.getWorkerUrl("workerMain.js",i);return new Worker(vGe?vGe.createScriptURL(t):t,{name:i})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function VEt(i){return typeof i.then=="function"}var vGe,Rhe,jT,_Ge=P(()=>{Vg();Pi();Ahe();nt();vGe=td("defaultWorkerFactory",{createScriptURL:i=>i});Rhe=class extends ue{constructor(e,t,n,o,r){super(),this.id=t,this.label=n;let s=BEt(n);VEt(s)?this.worker=s:this.worker=Promise.resolve(s),this.postMessage(e,[]),this.worker.then(a=>{a.onmessage=function(l){o(l.data)},a.onmessageerror=r,typeof a.addEventListener=="function"&&a.addEventListener("error",r)}),this._register(Yt(()=>{var a;(a=this.worker)===null||a===void 0||a.then(l=>{l.onmessage=null,l.onmessageerror=null,l.removeEventListener("error",r),l.terminate()}),this.worker=null}))}getId(){return this.id}postMessage(e,t){var n;(n=this.worker)===null||n===void 0||n.then(o=>{try{o.postMessage(e,t)}catch(r){hi(r),hi(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:r}))}})}},jT=class i{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,n){let o=++i.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new Rhe(e,o,this._label||"anonymous"+o,t,r=>{$T(r),this._webWorkerFailedBeforeError=r,n(r)})}};jT.LAST_WORKER_ID=0});function qT(i,e,t){i.has(e)?i.get(e).push(t):i.set(e,[t])}var os,XC,d$,q3=P(()=>{(function(i){i[i.None=0]="None",i[i.Indent=1]="Indent",i[i.IndentOutdent=2]="IndentOutdent",i[i.Outdent=3]="Outdent"})(os||(os={}));XC=class{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,n=e.notIn.length;t0&&i.getLanguageId(s-1)===o;)s--;return new Phe(i,o,s,r+1,i.getStartOffset(s),i.getEndOffset(r))}function sp(i){return(i&3)!==0}var Phe,D5=P(()=>{Phe=class{constructor(e,t,n,o,r,s){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=o,this.firstCharOffset=r,this._lastCharOffset=s}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)}}});var QC,bGe=P(()=>{q3();QC=class i{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(t=>new XC(t)):e.brackets?this._autoClosingPairs=e.brackets.map(t=>new XC({open:t[0],close:t[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){let t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new XC({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:i.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:i.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}};QC.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])> `;QC.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS=`'"\`;:.,=}])> - `});function CGe(i,e){return i[e+0]<<0>>>0|i[e+1]<<8>>>0}function wGe(i,e,t){i[t+0]=e&255,e=e>>>8,i[t+1]=e&255}function Kf(i,e){return i[e]*2**24+i[e+1]*2**16+i[e+2]*2**8+i[e+3]}function Yf(i,e,t){i[t+3]=e,e=e>>>8,i[t+2]=e,e=e>>>8,i[t+1]=e,e=e>>>8,i[t]=e}function zhe(i,e){return i[e]}function Fhe(i,e,t){i[t]=e}var yGe,L6i,Ohe,JC,ew=P(()=>{j0();yGe=typeof Buffer<"u",L6i=new bl(()=>new Uint8Array(256)),JC=class i{static wrap(e){return yGe&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new i(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return yGe?this.buffer.toString():(Ohe||(Ohe=new TextDecoder),Ohe.decode(this.buffer))}}});function xGe(){return Bhe||(Bhe=new TextDecoder("UTF-16LE")),Bhe}function WEt(){return Vhe||(Vhe=new TextDecoder("UTF-16BE")),Vhe}function Uhe(){return Whe||(Whe=qV()?xGe():WEt()),Whe}function SGe(i,e,t){let n=new Uint16Array(i.buffer,e,t);return t>0&&(n[0]===65279||n[0]===65534)?UEt(i,e,t):xGe().decode(n)}function UEt(i,e,t){let n=[],o=0;for(let r=0;r{Ri();Mn();ew();qh=class{constructor(e){this._capacity=e|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";let e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return Uhe().decode(e)}_flushBuffer(){let e=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}appendCharCode(e){let t=this._capacity-this._bufferLength;t<=1&&(t===0||Or(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIICharCode(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendString(e){let t=e.length;if(this._bufferLength+t>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let n=0;n[s[0].toLowerCase(),s[1].toLowerCase()]);let t=[];for(let s=0;s{let[l,c]=s,[d,u]=a;return l===d||l===u||c===d||c===u},o=(s,a)=>{let l=Math.min(s,a),c=Math.max(s,a);for(let d=0;d0&&r.push({open:a,close:l})}return r}function kGe(i,e,t,n){for(let o=0,r=e.length;o=0&&n.push(a);for(let a of s.close)a.indexOf(i)>=0&&n.push(a)}}function LGe(i,e){return i.length-e.length}function c$(i){if(i.length<=1)return i;let e=[],t=new Set;for(let n of i)t.has(n)||(e.push(n),t.add(n));return e}function qEt(i,e,t,n){let o=[];o=o.concat(i),o=o.concat(e);for(let r=0,s=o.length;r{Ri();J0();Kt();$he=class i{constructor(e,t,n,o,r,s){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=n,this.close=o,this.forwardRegex=r,this.reversedRegex=s,this._openSet=i._toSet(this.open),this._closeSet=i._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){let t=new Set;for(let n of e)t.add(n);return t}};l$=class{constructor(e,t){this._richEditBracketsBrand=void 0;let n=jEt(t);this.brackets=n.map((o,r)=>new $he(e,r,o.open,o.close,qEt(o.open,o.close,n,r),GEt(o.open,o.close,n,r))),this.forwardRegex=KEt(this.brackets),this.reversedRegex=YEt(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(let o of this.brackets){for(let r of o.open)this.textIsBracket[r]=o,this.textIsOpenBracket[r]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,r.length);for(let r of o.close)this.textIsBracket[r]=o,this.textIsOpenBracket[r]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,r.length)}}};jhe=function(){function i(n){let o=new Uint16Array(n.length),r=0;for(let s=n.length-1;s>=0;s--)o[r++]=n.charCodeAt(s);return Uhe().decode(o)}let e=null,t=null;return function(o){return e!==o&&(e=o,t=i(e)),t}}(),au=class{static _findPrevBracketInText(e,t,n,o){let r=n.match(e);if(!r)return null;let s=n.length-(r.index||0),a=r[0].length,l=o+s;return new O(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,n,o,r){let a=jhe(n).substring(n.length-r,n.length-o);return this._findPrevBracketInText(e,t,a,o)}static findNextBracketInText(e,t,n,o){let r=n.match(e);if(!r)return null;let s=r.index||0,a=r[0].length;if(a===0)return null;let l=o+s;return new O(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,n,o,r){let s=n.substring(o,r);return this.findNextBracketInText(e,t,s,o)}}});var h$,EGe=P(()=>{Vi();D5();u$();h$=class{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(let t of this._richEditBrackets.brackets)for(let n of t.close){let o=n.charAt(n.length-1);e.push(o)}return Oh(e)}onElectricCharacter(e,t,n){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;let o=t.findTokenIndexAtOffset(n-1);if(sp(t.getStandardTokenType(o)))return null;let r=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,n-1)+e,a=au.findPrevBracketInRange(r,1,s,0,s.length);if(!a)return null;let l=s.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[l])return null;let d=t.getActualLineContentBefore(a.startColumn-1);return/^\s*$/.test(d)?{matchOpenBracket:l}:null}}});function f$(i){return i.global&&(i.lastIndex=0),!0}var p$,DGe=P(()=>{p$=class{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&f$(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&f$(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&f$(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&f$(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}}});var m$,TGe=P(()=>{Pi();Ri();j3();m$=class i{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(t=>{let n=i._createOpenBracketRegExp(t[0]),o=i._createCloseBracketRegExp(t[1]);n&&o&&this._brackets.push({open:t[0],openRegExp:n,close:t[1],closeRegExp:o})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,n,o){if(e>=3)for(let r=0,s=this._regExpRules.length;rc.reg?(c.reg.lastIndex=0,c.reg.test(c.text)):!0))return a.action}if(e>=2&&n.length>0&&o.length>0)for(let r=0,s=this._brackets.length;r=2&&n.length>0){for(let r=0,s=this._brackets.length;r"u"?t:r}function NGe(i){return i.replace(/[\[\]]/g,"")}var Ni,er=P(()=>{_i();Ni=vi("configurationService")});var Kn,Ha=P(()=>{_i();Kn=vi("languageService")});var oh,v$=P(()=>{oh=class{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}});function ln(i,e,t){e instanceof oh||(e=new oh(e,[],!!t)),AGe.push([i,e])}function Khe(){return AGe}var AGe,xl=P(()=>{v$();AGe=[]});var rr,G3=P(()=>{rr=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})});function XEt(i){return i.length>0&&i.charAt(i.length-1)==="#"?i.substring(0,i.length-1):i}var T5,Yhe,QEt,_$=P(()=>{Xt();Ys();T5={JSONContribution:"base.contributions.json"};Yhe=class{constructor(){this._onDidChangeSchema=new ge,this.schemasById={}}registerSchema(e,t){this.schemasById[XEt(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}},QEt=new Yhe;jn.add(T5.JSONContribution,QEt)});function KT(i){let e=[];if(e4.test(i)){let t=PGe.exec(i);for(;t?.length;){let n=t[1].trim();n&&e.push(n),t=PGe.exec(i)}}return Oh(e)}function JEt(i){switch(Array.isArray(i)?i[0]:i){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}function eDt(i,e){var t,n,o,r;return i.trim()?e4.test(i)?g("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",i):y$.getConfigurationProperties()[i]!==void 0?g("config.property.duplicate","Cannot register '{0}'. This property is already registered.",i):!((t=e.policy)===null||t===void 0)&&t.name&&y$.getPolicyConfigurations().get((n=e.policy)===null||n===void 0?void 0:n.name)!==void 0?g("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",i,(o=e.policy)===null||o===void 0?void 0:o.name,y$.getPolicyConfigurations().get((r=e.policy)===null||r===void 0?void 0:r.name)):null:g("config.property.empty","Cannot register an empty property")}var Yl,Zhe,Xhe,Qhe,Jhe,efe,b$,GT,RGe,tfe,OGe,PGe,I5,e4,y$,Wg=P(()=>{Vi();Xt();ho();Wt();er();_$();Ys();Yl={Configuration:"base.contributions.configuration"},Zhe={properties:{},patternProperties:{}},Xhe={properties:{},patternProperties:{}},Qhe={properties:{},patternProperties:{}},Jhe={properties:{},patternProperties:{}},efe={properties:{},patternProperties:{}},b$={properties:{},patternProperties:{}},GT="vscode://schemas/settings/resourceLanguage",RGe=jn.as(T5.JSONContribution),tfe=class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new ge,this._onDidUpdateConfiguration=new ge,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:g("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={},RGe.registerSchema(GT,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){let n=new Set;this.doRegisterConfigurations(e,t,n),RGe.registerSchema(GT,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}registerDefaultConfigurations(e){let t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){var n;let o=[];for(let{overrides:r,source:s}of e)for(let a in r)if(t.add(a),e4.test(a)){let l=this.configurationDefaultsOverrides.get(a),c=(n=l?.valuesSources)!==null&&n!==void 0?n:new Map;if(s)for(let f of Object.keys(r[a]))c.set(f,s);let d={...l?.value||{},...r[a]};this.configurationDefaultsOverrides.set(a,{source:s,value:d,valuesSources:c});let u=NGe(a),h={type:"object",default:d,description:g("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",u),$ref:GT,defaultDefaultValue:d,source:qs(s)?void 0:s,defaultValueSource:s};o.push(...KT(a)),this.configurationProperties[a]=h,this.defaultLanguageConfigurationOverridesNode.properties[a]=h}else{this.configurationDefaultsOverrides.set(a,{value:r[a],source:s});let l=this.configurationProperties[a];l&&(this.updatePropertyDefaultValue(a,l),this.updateSchema(a,l))}this.doRegisterOverrideIdentifiers(o)}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(let t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,n){e.forEach(o=>{this.validateAndRegisterProperties(o,t,o.extensionInfo,o.restrictedProperties,void 0,n),this.configurationContributors.push(o),this.registerJSONConfiguration(o)})}validateAndRegisterProperties(e,t=!0,n,o,r=3,s){var a;r=kc(e.scope)?r:e.scope;let l=e.properties;if(l)for(let d in l){let u=l[d];if(t&&eDt(d,u)){delete l[d];continue}if(u.source=n,u.defaultDefaultValue=l[d].default,this.updatePropertyDefaultValue(d,u),e4.test(d)?u.scope=void 0:(u.scope=kc(u.scope)?r:u.scope,u.restricted=kc(u.restricted)?!!o?.includes(d):u.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),s.add(d)}let c=e.allOf;if(c)for(let d of c)this.validateAndRegisterProperties(d,t,n,o,r,s)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){let t=n=>{let o=n.properties;if(o)for(let s in o)this.updateSchema(s,o[s]);let r=n.allOf;r?.forEach(t)};t(e)}updateSchema(e,t){switch(Zhe.properties[e]=t,t.scope){case 1:Xhe.properties[e]=t;break;case 2:Qhe.properties[e]=t;break;case 6:Jhe.properties[e]=t;break;case 3:efe.properties[e]=t;break;case 4:b$.properties[e]=t;break;case 5:b$.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(let e of this.overrideIdentifiers.values()){let t=`[${e}]`,n={type:"object",description:g("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:g("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:GT};this.updatePropertyDefaultValue(t,n),Zhe.properties[t]=n,Xhe.properties[t]=n,Qhe.properties[t]=n,Jhe.properties[t]=n,efe.properties[t]=n,b$.properties[t]=n}}registerOverridePropertyPatternKey(){let e={type:"object",description:g("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:g("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:GT};Zhe.patternProperties[I5]=e,Xhe.patternProperties[I5]=e,Qhe.patternProperties[I5]=e,Jhe.patternProperties[I5]=e,efe.patternProperties[I5]=e,b$.patternProperties[I5]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let n=this.configurationDefaultsOverrides.get(e),o=n?.value,r=n?.source;$l(o)&&(o=t.defaultDefaultValue,r=void 0),$l(o)&&(o=JEt(t.type)),t.default=o,t.defaultValueSource=r}},OGe="\\[([^\\]]+)\\]",PGe=new RegExp(OGe,"g"),I5=`^(${OGe})+$`,e4=new RegExp(I5);y$=new tfe;jn.add(Yl.Configuration,y$)});var tDt,ife,K3,ra,iDt,Zf=P(()=>{Wt();Xt();Ys();G3();Wg();tDt={ModesRegistry:"editor.modesRegistry"},ife=class{constructor(){this._onDidChangeLanguages=new ge,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,n=this._languages.length;te!==""&&t!=="")}var C$,w$,nfe,ofe,FGe=P(()=>{zue();C$=class{constructor(e,t){this.languageId=e;let n=t.brackets?zGe(t.brackets):[],o=new pT(a=>{let l=new Set;return{info:new nfe(this,a,l),closing:l}}),r=new pT(a=>{let l=new Set,c=new Set;return{info:new ofe(this,a,l,c),opening:l,openingColorized:c}});for(let[a,l]of n){let c=o.get(a),d=r.get(l);c.closing.add(d.info),d.opening.add(c.info)}let s=t.colorizedBracketPairs?zGe(t.colorizedBracketPairs):n.filter(a=>!(a[0]==="<"&&a[1]===">"));for(let[a,l]of s){let c=o.get(a),d=r.get(l);c.closing.add(d.info),d.openingColorized.add(c.info),d.opening.add(c.info)}this._openingBrackets=new Map([...o.cachedValues].map(([a,l])=>[a,l.info])),this._closingBrackets=new Map([...r.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)}};w$=class{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}},nfe=class extends w${constructor(e,t,n){super(e,t),this.openedBrackets=n,this.isOpeningBracket=!0}},ofe=class extends w${constructor(e,t,n,o){super(e,t),this.openingBrackets=n,this.openingColorizedBrackets=o,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]}}});function oDt(i,e,t,n){let o=e.getLanguageConfiguration(i);if(!o){if(!n.isRegisteredLanguageId(i))return new tw(i,{});o=new tw(i,{})}let r=rDt(o.languageId,t),s=VGe([o.underlyingConfig,r]);return new tw(o.languageId,s)}function rDt(i,e){let t=e.getValue(sfe.brackets,{overrideIdentifier:i}),n=e.getValue(sfe.colorizedBracketPairs,{overrideIdentifier:i});return{brackets:BGe(t),colorizedBracketPairs:BGe(n)}}function BGe(i){if(Array.isArray(i))return i.map(e=>{if(!(!Array.isArray(e)||e.length!==2))return[e[0],e[1]]}).filter(e=>!!e)}function k$(i,e,t){let n=i.getLineContent(e),o=yo(n);return o.length>t-1&&(o=o.substring(0,t-1)),o}function Y3(i,e,t){i.tokenization.forceTokenization(e);let n=i.tokenization.getLineTokens(e),o=typeof t>"u"?i.getLineMaxColumn(e)-1:t-1;return q3(n,o)}function VGe(i){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(let t of i)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}var nDt,HGe,YT,An,rfe,sfe,afe,x$,S$,lfe,tw,Kr=P(()=>{Xt();nt();Ri();CC();j3();D5();bGe();EGe();DGe();TGe();u$();_i();er();Ha();xl();Zf();FGe();nDt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},HGe=function(i,e){return function(t,n){e(t,n,i)}},YT=class{constructor(e){this.languageId=e}affects(e){return this.languageId?this.languageId===e:!0}},An=vi("languageConfigurationService"),rfe=class extends ue{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new lfe),this.onDidChangeEmitter=this._register(new ge),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;let n=new Set(Object.values(sfe));this._register(this.configurationService.onDidChangeConfiguration(o=>{let r=o.change.keys.some(a=>n.has(a)),s=o.change.overrides.filter(([a,l])=>l.some(c=>n.has(c))).map(([a])=>a);if(r)this.configurations.clear(),this.onDidChangeEmitter.fire(new YT(void 0));else for(let a of s)this.languageService.isRegisteredLanguageId(a)&&(this.configurations.delete(a),this.onDidChangeEmitter.fire(new YT(a)))})),this._register(this._registry.onDidChange(o=>{this.configurations.delete(o.languageId),this.onDidChangeEmitter.fire(new YT(o.languageId))}))}register(e,t,n){return this._registry.register(e,t,n)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=oDt(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};rfe=nDt([HGe(0,Ni),HGe(1,Kn)],rfe);sfe={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};afe=class{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){let n=new x$(e,t,++this._order);return this._entries.push(n),this._resolved=null,Yt(()=>{for(let o=0;oe.configuration)))}};x$=class{constructor(e,t,n){this.configuration=e,this.priority=t,this.order=n}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}},S$=class{constructor(e){this.languageId=e}},lfe=class extends ue{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new ge),this.onDidChange=this._onDidChange.event,this._register(this.register(ra,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,n=0){let o=this._entries.get(e);o||(o=new afe(e),this._entries.set(e,o));let r=o.register(t,n);return this._onDidChange.fire(new S$(e)),Yt(()=>{r.dispose(),this._onDidChange.fire(new S$(e))})}getLanguageConfiguration(e){let t=this._entries.get(e);return t?.getResolvedConfiguration()||null}},tw=class i{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 m$(this.underlyingConfig):null,this.comments=i._handleComments(this.underlyingConfig),this.characterPair=new QC(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||tT,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new p$(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new C$(e,this.underlyingConfig)}getWordDefinition(){return iT(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new l$(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new h$(this.brackets)),this._electricCharacter}onEnter(e,t,n,o){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,n,o):null}getAutoClosingPairs(){return new a$(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){let t=e.comments;if(!t)return null;let n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){let[o,r]=t.blockComment;n.blockCommentStartToken=o,n.blockCommentEndToken=r}return n}};ln(An,rfe,1)});var gm,WGe=P(()=>{gm=class{constructor(e,t,n,o){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=o}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}});function UGe(i,e,t){return new t4(new L$(i),new L$(e)).ComputeDiff(t).changes}var L$,Z3,X3,E$,t4,ZT=P(()=>{WGe();W3();L$=class{constructor(e){this.source=e}getElements(){let e=this.source,t=new Int32Array(e.length);for(let n=0,o=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new gm(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}},t4=class i{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;let[o,r,s]=i._getElements(e),[a,l,c]=i._getElements(t);this._hasStrings=s&&c,this._originalStringElements=o,this._originalElementsOrHash=r,this._modifiedStringElements=a,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){let t=e.getElements();if(i._isStringArray(t)){let n=new Int32Array(t.length);for(let o=0,r=t.length;o=e&&o>=n&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||n>o){let u;return n<=o?(Z3.Assert(e===t+1,"originalStart should only be one more than originalEnd"),u=[new gm(e,0,n,o-n+1)]):e<=t?(Z3.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),u=[new gm(e,t-e+1,n,0)]):(Z3.Assert(e===t+1,"originalStart should only be one more than originalEnd"),Z3.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u}let s=[0],a=[0],l=this.ComputeRecursionPoint(e,t,n,o,s,a,r),c=s[0],d=a[0];if(l!==null)return l;if(!r[0]){let u=this.ComputeDiffRecursive(e,c,n,d,r),h=[];return r[0]?h=[new gm(c+1,t-(c+1)+1,d+1,o-(d+1)+1)]:h=this.ComputeDiffRecursive(c+1,t,d+1,o,r),this.ConcatenateChanges(u,h)}return[new gm(e,t-e+1,n,o-n+1)]}WALKTRACE(e,t,n,o,r,s,a,l,c,d,u,h,f,p,m,y,_,v){let b=null,C=null,w=new E$,S=t,x=n,k=f[0]-y[0]-o,D=-1073741824,E=this.m_forwardHistory.length-1;do{let A=k+e;A===S||A=0&&(c=this.m_forwardHistory[E],e=c[0],S=1,x=c.length-1)}while(--E>=-1);if(b=w.getReverseChanges(),v[0]){let A=f[0]+1,T=y[0]+1;if(b!==null&&b.length>0){let L=b[b.length-1];A=Math.max(A,L.getOriginalEnd()),T=Math.max(T,L.getModifiedEnd())}C=[new gm(A,h-A+1,T,m-T+1)]}else{w=new E$,S=s,x=a,k=f[0]-y[0]-l,D=1073741824,E=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{let A=k+r;A===S||A=d[A+1]?(u=d[A+1]-1,p=u-k-l,u>D&&w.MarkNextChange(),D=u+1,w.AddOriginalElement(u+1,p+1),k=A+1-r):(u=d[A-1],p=u-k-l,u>D&&w.MarkNextChange(),D=u,w.AddModifiedElement(u+1,p+1),k=A-1-r),E>=0&&(d=this.m_reverseHistory[E],r=d[0],S=1,x=d.length-1)}while(--E>=-1);C=w.getChanges()}return this.ConcatenateChanges(b,C)}ComputeRecursionPoint(e,t,n,o,r,s,a){let l=0,c=0,d=0,u=0,h=0,f=0;e--,n--,r[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];let p=t-e+(o-n),m=p+1,y=new Int32Array(m),_=new Int32Array(m),v=o-n,b=t-e,C=e-n,w=t-o,x=(b-v)%2===0;y[v]=e,_[b]=t,a[0]=!1;for(let k=1;k<=p/2+1;k++){let D=0,E=0;d=this.ClipDiagonalBound(v-k,k,v,m),u=this.ClipDiagonalBound(v+k,k,v,m);for(let T=d;T<=u;T+=2){T===d||TD+E&&(D=l,E=c),!x&&Math.abs(T-b)<=k-1&&l>=_[T])return r[0]=l,s[0]=c,L<=_[T]&&k<=1448?this.WALKTRACE(v,d,u,C,b,h,f,w,y,_,l,t,r,c,o,s,x,a):null}let A=(D-e+(E-n)-k)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(D,A))return a[0]=!0,r[0]=D,s[0]=E,A>0&&k<=1448?this.WALKTRACE(v,d,u,C,b,h,f,w,y,_,l,t,r,c,o,s,x,a):(e++,n++,[new gm(e,t-e+1,n,o-n+1)]);h=this.ClipDiagonalBound(b-k,k,b,m),f=this.ClipDiagonalBound(b+k,k,b,m);for(let T=h;T<=f;T+=2){T===h||T=_[T+1]?l=_[T+1]-1:l=_[T-1],c=l-(T-b)-w;let L=l;for(;l>e&&c>n&&this.ElementsAreEqual(l,c);)l--,c--;if(_[T]=l,x&&Math.abs(T-v)<=k&&l<=y[T])return r[0]=l,s[0]=c,L>=y[T]&&k<=1448?this.WALKTRACE(v,d,u,C,b,h,f,w,y,_,l,t,r,c,o,s,x,a):null}if(k<=1447){let T=new Int32Array(u-d+2);T[0]=v-d+1,X3.Copy2(y,d,T,1,u-d+1),this.m_forwardHistory.push(T),T=new Int32Array(f-h+2),T[0]=b-h+1,X3.Copy2(_,h,T,1,f-h+1),this.m_reverseHistory.push(T)}}return this.WALKTRACE(v,d,u,C,b,h,f,w,y,_,l,t,r,c,o,s,x,a)}PrettifyChanges(e){for(let t=0;t0,a=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;t--){let n=e[t],o=0,r=0;if(t>0){let u=e[t-1];o=u.originalStart+u.originalLength,r=u.modifiedStart+u.modifiedLength}let s=n.originalLength>0,a=n.modifiedLength>0,l=0,c=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let u=1;;u++){let h=n.originalStart-u,f=n.modifiedStart-u;if(hc&&(c=m,l=u)}n.originalStart-=l,n.modifiedStart-=l;let d=[null];if(t>0&&this.ChangesOverlap(e[t-1],e[t],d)){e[t-1]=d[0],e.splice(t,1),t++;continue}}if(this._hasStrings)for(let t=1,n=e.length;t0&&f>l&&(l=f,c=u,d=h)}return l>0?[c,d]:null}_contiguousSequenceScore(e,t,n){let o=0;for(let r=0;r=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){let n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){let n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,o){let r=this._OriginalRegionIsBoundary(e,t)?1:0,s=this._ModifiedRegionIsBoundary(n,o)?1:0;return r+s}ConcatenateChanges(e,t){let n=[];if(e.length===0||t.length===0)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){let o=new Array(e.length+t.length-1);return X3.Copy(e,0,o,0,e.length-1),o[e.length-1]=n[0],X3.Copy(t,1,o,e.length,t.length-1),o}else{let o=new Array(e.length+t.length);return X3.Copy(e,0,o,0,e.length),X3.Copy(t,0,o,e.length,t.length),o}}ChangesOverlap(e,t,n){if(Z3.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),Z3.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){let o=e.originalStart,r=e.originalLength,s=e.modifiedStart,a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new gm(o,r,s,a),!0}else return n[0]=null,!1}ClipDiagonalBound(e,t,n,o){if(e>=0&&e255?255:i|0}function N5(i){return i<0?0:i>4294967295?4294967295:i|0}var XT=P(()=>{});var D$,T$,I$,cfe=P(()=>{Vi();XT();D$=class{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=N5(e);let n=this.values,o=this.prefixSum,r=t.length;return r===0?!1:(this.values=new Uint32Array(n.length+r),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=N5(e),t=N5(t),this.values[e]===t?!1:(this.values[e]=t,e-1=n.length)return!1;let r=n.length-e;return t>=r&&(t=r),t===0?!1:(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=N5(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,o=0,r=0,s=0;for(;t<=n;)if(o=t+(n-t)/2|0,r=this.prefixSum[o],s=r-this.values[o],e=r)t=o+1;else break;return new I$(o,e-s)}},T$=class{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),e===0?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();let t=this._indexBySum[e],n=t>0?this._prefixSum[t-1]:0;return new I$(t,e-n)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=g3(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=o+n;for(let r=0;r{Ri();Mi();cfe();M$=class{constructor(e,t,n,o){this._uri=e,this._lines=t,this._eol=n,this._versionId=o,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);let t=e.changes;for(let n of t)this._acceptDeleteRange(n.range),this._acceptInsertText(new ke(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){let e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let o=0;o{XT();i4=class i{constructor(e){let t=M5(e);this._defaultValue=t,this._asciiMap=i._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);return t.fill(e),t}set(e,t){let n=M5(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}},n4=class{constructor(){this._actual=new i4(0)}add(e){this._actual.set(e,1)}has(e){return this._actual.get(e)===1}clear(){return this._actual.clear()}}});function sDt(){return dfe===null&&(dfe=new hfe([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),dfe}function aDt(){if(QT===null){QT=new i4(0);let i=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let t=0;t{A5();ufe=class{constructor(e,t,n){let o=new Uint8Array(e*t);for(let r=0,s=e*t;rt&&(t=l),a>n&&(n=a),c>n&&(n=c)}t++,n++;let o=new ufe(n,t,0);for(let r=0,s=e.length;r=this._maxCharCode?0:this._states.get(e,t)}},dfe=null;QT=null;ffe=class i{static _createLink(e,t,n,o,r){let s=r-1;do{let a=t.charCodeAt(s);if(e.get(a)!==2)break;s--}while(s>o);if(o>0){let a=t.charCodeAt(o-1),l=t.charCodeAt(s);(a===40&&l===41||a===91&&l===93||a===123&&l===125)&&s--}return{range:{startLineNumber:n,startColumn:o+1,endLineNumber:n,endColumn:s+2},url:t.substring(o,s+1)}}static computeLinks(e,t=sDt()){let n=aDt(),o=[];for(let r=1,s=e.getLineCount();r<=s;r++){let a=e.getLineContent(r),l=a.length,c=0,d=0,u=0,h=1,f=!1,p=!1,m=!1,y=!1;for(;c{iw=class{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(e,t,n,o,r){if(e&&t){let s=this.doNavigateValueSet(t,r);if(s)return{range:e,value:s}}if(n&&o){let s=this.doNavigateValueSet(o,r);if(s)return{range:n,value:s}}return null}doNavigateValueSet(e,t){let n=this.numberReplace(e,t);return n!==null?n:this.textReplace(e,t)}numberReplace(e,t){let n=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),o=Number(e),r=parseFloat(e);return!isNaN(o)&&!isNaN(r)&&o===r?o===0&&!t?null:(o=Math.floor(o*n),o+=t?n:-n,String(o/n)):null}textReplace(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)}valueSetsReplace(e,t,n){let o=null;for(let r=0,s=e.length;o===null&&r=0?(o+=n?1:-1,o<0?o=e.length-1:o%=e.length,e[o]):null}};iw.INSTANCE=new iw});function lDt(i){let e={};return t=>(e.hasOwnProperty(t)||(e[t]=i(t)),e[t])}var pfe,id,nw=P(()=>{A5();pfe=class extends i4{constructor(e){super(0);for(let t=0,n=e.length;tnew pfe(i))});function KGe(i){return i&&typeof i.read=="function"}function R$(i){return!i.isTooLargeForSyncing()&&!i.isForSimpleWidget}var Sl,lu,Zl,Gh,Q3,Ug,ow,N$,A$,Ca=P(()=>{Gc();(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=4]="Right",i[i.Full=7]="Full"})(Sl||(Sl={}));(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=3]="Right"})(lu||(lu={}));(function(i){i[i.Inline=1]="Inline",i[i.Gutter=2]="Gutter"})(Zl||(Zl={}));(function(i){i[i.Both=0]="Both",i[i.Right=1]="Right",i[i.Left=2]="Left",i[i.None=3]="None"})(Gh||(Gh={}));Q3=class{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,e.tabSize|0),e.indentSize==="tabSize"?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,e.indentSize|0),this._indentSizeIsTabSize=!1),this.insertSpaces=!!e.insertSpaces,this.defaultEOL=e.defaultEOL|0,this.trimAutoWhitespace=!!e.trimAutoWhitespace,this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&Za(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}},Ug=class{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}};ow=class{constructor(e,t,n,o,r,s){this.identifier=e,this.range=t,this.text=n,this.forceMoveMarkers=o,this.isAutoWhitespaceEdit=r,this._isTracked=s}},N$=class{constructor(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}},A$=class{constructor(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}}});function uDt(i){if(!i||i.length===0)return!1;for(let e=0,t=i.length;e=t)break;let o=i.charCodeAt(e);if(o===110||o===114||o===87)return!0}}return!1}function J3(i,e,t){if(!t)return new Ug(i,null);let n=[];for(let o=0,r=e.length;o0){let s=e.charCodeAt(n);if(i.get(s)!==0)return!0}return!1}function fDt(i,e,t,n,o){if(n+o===t)return!0;let r=e.charCodeAt(n+o);if(i.get(r)!==0||r===13||r===10)return!0;if(o>0){let s=e.charCodeAt(n+o-1);if(i.get(s)!==0)return!0}return!1}function O$(i,e,t,n,o){return hDt(i,e,t,n,o)&&fDt(i,e,t,n,o)}var dDt,vm,P$,R5,$g,JT=P(()=>{Ri();nw();Mi();Kt();Ca();dDt=999,vm=class{constructor(e,t,n,o){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=o}parseSearchRequest(){if(this.searchString==="")return null;let e;this.isRegex?e=uDt(this.searchString):e=this.searchString.indexOf(` -`)>=0;let t=null;try{t=nU(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!t)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new N$(t,this.wordSeparators?id(this.wordSeparators):null,n?this.searchString:null)}};P$=class{constructor(e){let t=[],n=0;for(let o=0,r=e.length;o>0);t[r]>=e?o=r-1:t[r+1]>=e?(n=r,o=r):n=r+1}return n+1}},R5=class{static findMatches(e,t,n,o,r){let s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,n,new $g(s.wordSeparators,s.regex),o,r):this._doFindMatchesLineByLine(e,n,s,o,r):[]}static _getMultilineMatchRange(e,t,n,o,r,s){let a,l=0;o?(l=o.findLineFeedCountBeforeOffset(r),a=t+r+l):a=t+r;let c;if(o){let f=o.findLineFeedCountBeforeOffset(r+s.length)-l;c=a+s.length+f}else c=a+s.length;let d=e.getPositionAt(a),u=e.getPositionAt(c);return new O(d.lineNumber,d.column,u.lineNumber,u.column)}static _doFindMatchesMultiline(e,t,n,o,r){let s=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l=e.getEOL()===`\r -`?new P$(a):null,c=[],d=0,u;for(n.reset(0);u=n.next(a);)if(c[d++]=J3(this._getMultilineMatchRange(e,s,a,l,u.index,u[0]),u,o),d>=r)return c;return c}static _doFindMatchesLineByLine(e,t,n,o,r){let s=[],a=0;if(t.startLineNumber===t.endLineNumber){let c=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return a=this._findMatchesInLine(n,c,t.startLineNumber,t.startColumn-1,a,s,o,r),s}let l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);a=this._findMatchesInLine(n,l,t.startLineNumber,t.startColumn-1,a,s,o,r);for(let c=t.startLineNumber+1;c=l))return r;return r}let d=new $g(e.wordSeparators,e.regex),u;d.reset(0);do if(u=d.next(t),u&&(s[r++]=J3(new O(n,u.index+1+o,n,u.index+1+u[0].length+o),u,a),r>=l))return r;while(u);return r}static findNextMatch(e,t,n,o){let r=t.parseSearchRequest();if(!r)return null;let s=new $g(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindNextMatchMultiline(e,n,s,o):this._doFindNextMatchLineByLine(e,n,s,o)}static _doFindNextMatchMultiline(e,t,n,o){let r=new ke(t.lineNumber,1),s=e.getOffsetAt(r),a=e.getLineCount(),l=e.getValueInRange(new O(r.lineNumber,r.column,a,e.getLineMaxColumn(a)),1),c=e.getEOL()===`\r -`?new P$(l):null;n.reset(t.column-1);let d=n.next(l);return d?J3(this._getMultilineMatchRange(e,s,l,c,d.index,d[0]),d,o):t.lineNumber!==1||t.column!==1?this._doFindNextMatchMultiline(e,new ke(1,1),n,o):null}static _doFindNextMatchLineByLine(e,t,n,o){let r=e.getLineCount(),s=t.lineNumber,a=e.getLineContent(s),l=this._findFirstMatchInLine(n,a,s,t.column,o);if(l)return l;for(let c=1;c<=r;c++){let d=(s+c-1)%r,u=e.getLineContent(d+1),h=this._findFirstMatchInLine(n,u,d+1,1,o);if(h)return h}return null}static _findFirstMatchInLine(e,t,n,o,r){e.reset(o-1);let s=e.next(t);return s?J3(new O(n,s.index+1,n,s.index+1+s[0].length),s,r):null}static findPreviousMatch(e,t,n,o){let r=t.parseSearchRequest();if(!r)return null;let s=new $g(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindPreviousMatchMultiline(e,n,s,o):this._doFindPreviousMatchLineByLine(e,n,s,o)}static _doFindPreviousMatchMultiline(e,t,n,o){let r=this._doFindMatchesMultiline(e,new O(1,1,t.lineNumber,t.column),n,o,10*dDt);if(r.length>0)return r[r.length-1];let s=e.getLineCount();return t.lineNumber!==s||t.column!==e.getLineMaxColumn(s)?this._doFindPreviousMatchMultiline(e,new ke(s,e.getLineMaxColumn(s)),n,o):null}static _doFindPreviousMatchLineByLine(e,t,n,o){let r=e.getLineCount(),s=t.lineNumber,a=e.getLineContent(s).substring(0,t.column-1),l=this._findLastMatchInLine(n,a,s,o);if(l)return l;for(let c=1;c<=r;c++){let d=(r+s-c-1)%r,u=e.getLineContent(d+1),h=this._findLastMatchInLine(n,u,d+1,o);if(h)return h}return null}static _findLastMatchInLine(e,t,n,o){let r=null,s;for(e.reset(0);s=e.next(t);)r=J3(new O(n,s.index+1,n,s.index+1+s[0].length),s,o);return r}};$g=class{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){let t=e.length,n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t||(n=this._searchRegex.exec(e),!n))return null;let o=n.index,r=n[0].length;if(o===this._prevMatchStartIndex&&r===this._prevMatchLength){if(r===0){zC(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=o,this._prevMatchLength=r,!this._wordSeparators||O$(this._wordSeparators,e,t,o,r))return n}while(n);return null}}});function pDt(i,e){return`[${va(i.map(n=>String.fromCodePoint(n)).join(""))}]`}function YGe(i){return i===" "||i===` -`||i===" "}var P5,z$,mfe=P(()=>{Kt();JT();Ri();um();CC();P5=class{static computeUnicodeHighlights(e,t,n){let o=n?n.startLineNumber:1,r=n?n.endLineNumber:e.getLineCount(),s=new z$(t),a=s.getCandidateCodePoints(),l;a==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${pDt(Array.from(a))}`,"g");let c=new $g(null,l),d=[],u=!1,h,f=0,p=0,m=0;e:for(let y=o,_=r;y<=_;y++){let v=e.getLineContent(y),b=v.length;c.reset(0);do if(h=c.next(v),h){let C=h.index,w=h.index+h[0].length;if(C>0){let D=v.charCodeAt(C-1);Or(D)&&C--}if(w+1=1e3){u=!0;break e}d.push(new O(y,C+1,y,w+1))}}while(h)}return{ranges:d,hasMore:u,ambiguousCharacterCount:f,invisibleCharacterCount:p,nonBasicAsciiCharacterCount:m}}static computeUnicodeHighlightReason(e,t){let n=new z$(t);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{let r=e.codePointAt(0),s=n.ambiguousCharacters.getPrimaryConfusable(r),a=Ig.getLocales().filter(l=>!Ig.getInstance(new Set([...t.allowedLocales,l])).isAmbiguous(r));return{kind:0,confusableWith:String.fromCodePoint(s),notAmbiguousInLocales:a}}case 1:return{kind:2}}}};z$=class{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=Ig.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";let e=new Set;if(this.options.invisibleCharacters)for(let t of Mg.codePoints)YGe(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(let t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(let t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){let n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let o=!1,r=!1;if(t)for(let s of t){let a=s.codePointAt(0),l=Ag(s);o=o||l,!l&&!this.ambiguousCharacters.isAmbiguous(a)&&!Mg.isInvisibleCharacter(a)&&(r=!0)}return!o&&r?0:this.options.invisibleCharacters&&!YGe(e)&&Mg.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}});var ev,rw,F$=P(()=>{ev=class{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}},rw=class{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}});var Pn,H$,Xf=P(()=>{Pi();Pn=class i{static addRange(e,t){let n=0;for(;nt)throw new fo(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new i(this.start+e,this.endExclusive+e)}deltaStart(e){return new i(this.start+e,this.endExclusive)}deltaEnd(e){return new i(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new fo(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new fo(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;te.toString()).join(", ")}intersectsStrict(e){let t=0;for(;te+t.length,0)}}});function o4(i,e,t){let n=mDt(i,e);if(n!==-1)return i[n]}function mDt(i,e,t=i.length-1){for(let n=t;n>=0;n--){let o=i[n];if(e(o))return n}return-1}function r4(i,e){let t=O5(i,e);return t===-1?void 0:i[t]}function O5(i,e,t=0,n=i.length){let o=t,r=n;for(;o0&&(t=o)}return t}function XGe(i,e){if(i.length===0)return;let t=i[0];for(let n=1;n=0&&(t=o)}return t}function QGe(i,e){return eI(i,(t,n)=>-e(t,n))}function JGe(i,e){if(i.length===0)return-1;let t=0;for(let n=1;n0&&(t=n)}return t}function eKe(i,e){for(let t of i){let n=e(t);if(n!==void 0)return n}}var sw,rh=P(()=>{sw=class i{constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(i.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!e(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}let t=O5(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=t+1,t===-1?void 0:this._array[t]}};sw.assertInvariants=!1});var rn,_m,sh=P(()=>{Pi();Xf();Kt();rh();rn=class i{static fromRangeInclusive(e){return new i(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(e.length===0)return[];let t=new _m(e[0].slice());for(let n=1;nt)throw new fo(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&eo.endLineNumberExclusive>=e.startLineNumber),n=O5(this._normalizedRanges,o=>o.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){let o=this._normalizedRanges[t];this._normalizedRanges[t]=o.join(e)}else{let o=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,o)}}contains(e){let t=r4(this._normalizedRanges,n=>n.startLineNumber<=e);return!!t&&t.endLineNumberExclusive>e}intersects(e){let t=r4(this._normalizedRanges,n=>n.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;let t=[],n=0,o=0,r=null;for(;n=s.startLineNumber?r=new rn(r.startLineNumber,Math.max(r.endLineNumberExclusive,s.endLineNumberExclusive)):(t.push(r),r=s)}return r!==null&&t.push(r),new i(t)}subtractFrom(e){let t=tv(this._normalizedRanges,s=>s.endLineNumberExclusive>=e.startLineNumber),n=O5(this._normalizedRanges,s=>s.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)return new i([e]);let o=[],r=e.startLineNumber;for(let s=t;sr&&o.push(new rn(r,a.startLineNumber)),r=a.endLineNumberExclusive}return re.toString()).join(", ")}getIntersection(e){let t=[],n=0,o=0;for(;nt.delta(e)))}}});var cu,du,Qf,iv=P(()=>{sh();cu=class i{static inverse(e,t,n){let o=[],r=1,s=1;for(let l of e){let c=new i(new rn(r,l.original.startLineNumber),new rn(s,l.modified.startLineNumber));c.modified.isEmpty||o.push(c),r=l.original.endLineNumberExclusive,s=l.modified.endLineNumberExclusive}let a=new i(new rn(r,t+1),new rn(s,n+1));return a.modified.isEmpty||o.push(a),o}static clip(e,t,n){let o=[];for(let r of e){let s=r.original.intersect(t),a=r.modified.intersect(n);s&&!s.isEmpty&&a&&!a.isEmpty&&o.push(new i(s,a))}return o}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new i(this.modified,this.original)}join(e){return new i(this.original.join(e.original),this.modified.join(e.modified))}},du=class i extends cu{constructor(e,t,n){super(e,t),this.innerChanges=n}flip(){var e;return new i(this.modified,this.original,(e=this.innerChanges)===null||e===void 0?void 0:e.map(t=>t.flip()))}},Qf=class i{constructor(e,t){this.originalRange=e,this.modifiedRange=t}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new i(this.modifiedRange,this.originalRange)}}});function iKe(i,e,t,n){return new t4(i,e,t).ComputeDiff(n)}function vDt(i){if(i.length<=1)return i;let e=[i[0]],t=e[0];for(let n=1,o=i.length;n!0;let e=Date.now();return()=>Date.now()-e{ZT();F$();iv();Ri();Kt();um();sh();gDt=3,B$=class{computeDiff(e,t,n){var o;let s=new vfe(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),a=[],l=null;for(let c of s.changes){let d;c.originalEndLineNumber===0?d=new rn(c.originalStartLineNumber+1,c.originalStartLineNumber+1):d=new rn(c.originalStartLineNumber,c.originalEndLineNumber+1);let u;c.modifiedEndLineNumber===0?u=new rn(c.modifiedStartLineNumber+1,c.modifiedStartLineNumber+1):u=new rn(c.modifiedStartLineNumber,c.modifiedEndLineNumber+1);let h=new du(d,u,(o=c.charChanges)===null||o===void 0?void 0:o.map(f=>new Qf(new O(f.originalStartLineNumber,f.originalStartColumn,f.originalEndLineNumber,f.originalEndColumn),new O(f.modifiedStartLineNumber,f.modifiedStartColumn,f.modifiedEndLineNumber,f.modifiedEndColumn))));l&&(l.modified.endLineNumberExclusive===h.modified.startLineNumber||l.original.endLineNumberExclusive===h.original.startLineNumber)&&(h=new du(l.original.join(h.original),l.modified.join(h.modified),l.innerChanges&&h.innerChanges?l.innerChanges.concat(h.innerChanges):void 0),a.pop()),a.push(h),l=h}return zg(()=>TU(a,(c,d)=>d.original.startLineNumber-c.original.endLineNumberExclusive===d.modified.startLineNumber-c.modified.endLineNumberExclusive&&c.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}},aw=class i{constructor(e,t,n,o,r,s,a,l){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=o,this.modifiedStartLineNumber=r,this.modifiedStartColumn=s,this.modifiedEndLineNumber=a,this.modifiedEndColumn=l}static createFromDiffChange(e,t,n){let o=t.getStartLineNumber(e.originalStart),r=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),a=t.getEndColumn(e.originalStart+e.originalLength-1),l=n.getStartLineNumber(e.modifiedStart),c=n.getStartColumn(e.modifiedStart),d=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),u=n.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new i(o,r,s,a,l,c,d,u)}};tI=class i{constructor(e,t,n,o,r){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=o,this.charChanges=r}static createFromDiffResult(e,t,n,o,r,s,a){let l,c,d,u,h;if(t.originalLength===0?(l=n.getStartLineNumber(t.originalStart)-1,c=0):(l=n.getStartLineNumber(t.originalStart),c=n.getEndLineNumber(t.originalStart+t.originalLength-1)),t.modifiedLength===0?(d=o.getStartLineNumber(t.modifiedStart)-1,u=0):(d=o.getStartLineNumber(t.modifiedStart),u=o.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),s&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&r()){let f=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),p=o.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(f.getElements().length>0&&p.getElements().length>0){let m=iKe(f,p,r,!0).changes;a&&(m=vDt(m)),h=[];for(let y=0,_=m.length;y<_;y++)h.push(aw.createFromDiffChange(m[y],f,p))}}return new i(l,c,d,u,h)}},vfe=class{constructor(e,t,n){this.shouldComputeCharChanges=n.shouldComputeCharChanges,this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=n.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new V$(e),this.modified=new V$(t),this.continueLineDiff=tKe(n.maxComputationTime),this.continueCharDiff=tKe(n.maxComputationTime===0?0:Math.min(n.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:void 0}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:void 0}]};let e=iKe(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,n=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){let a=[];for(let l=0,c=t.length;l1&&m>1;){let y=h.charCodeAt(p-2),_=f.charCodeAt(m-2);if(y!==_)break;p--,m--}(p>1||m>1)&&this._pushTrimWhitespaceCharChange(o,r+1,1,p,s+1,1,m)}{let p=bfe(h,1),m=bfe(f,1),y=h.length+1,_=f.length+1;for(;p{Vi();Pi();Xf();jg=class i{static trivial(e,t){return new i([new kl(Pn.ofLength(e.length),Pn.ofLength(t.length))],!1)}static trivialTimedOut(e,t){return new i([new kl(Pn.ofLength(e.length),Pn.ofLength(t.length))],!0)}constructor(e,t){this.diffs=e,this.hitTimeout=t}},kl=class i{static invert(e,t){let n=[];return OV(e,(o,r)=>{n.push(i.fromOffsetPairs(o?o.getEndExclusives():Kh.zero,r?r.getStarts():new Kh(t,(o?o.seq2Range.endExclusive-o.seq1Range.endExclusive:0)+t)))}),n}static fromOffsetPairs(e,t){return new i(new Pn(e.offset1,t.offset1),new Pn(e.offset2,t.offset2))}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new i(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new i(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new i(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new i(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new i(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){let t=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(!(!t||!n))return new i(t,n)}getStarts(){return new Kh(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new Kh(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}},Kh=class i{constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return e===0?this:new i(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}};Kh.zero=new Kh(0,0);Kh.max=new Kh(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);qg=class{isValid(){return!0}};qg.instance=new qg;W$=class{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new fo("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime{cw=class{constructor(e,t){this.width=e,this.height=t,this.array=[],this.array=new Array(e*t)}get(e,t){return this.array[e+t*this.width]}set(e,t,n){this.array[e+t*this.width]=n}};dw=class i{static getKey(e){let t=this.chrKeys.get(e);return t===void 0&&(t=this.chrKeys.size,this.chrKeys.set(e,t)),t}constructor(e,t,n){this.range=e,this.lines=t,this.source=n,this.histogram=[];let o=0;for(let r=e.startLineNumber-1;r{Xf();lw();U$();$$=class{compute(e,t,n=qg.instance,o){if(e.length===0||t.length===0)return jg.trivial(e,t);let r=new cw(e.length,t.length),s=new cw(e.length,t.length),a=new cw(e.length,t.length);for(let p=0;p0&&m>0&&s.get(p-1,m-1)===3&&(v+=a.get(p-1,m-1)),v+=o?o(p,m):1):v=-1;let b=Math.max(y,_,v);if(b===v){let C=p>0&&m>0?a.get(p-1,m-1):0;a.set(p,m,C+1),s.set(p,m,3)}else b===y?(a.set(p,m,0),s.set(p,m,1)):b===_&&(a.set(p,m,0),s.set(p,m,2));r.set(p,m,b)}let l=[],c=e.length,d=t.length;function u(p,m){(p+1!==c||m+1!==d)&&l.push(new kl(new Pn(p+1,c),new Pn(m+1,d))),c=p,d=m}let h=e.length-1,f=t.length-1;for(;h>=0&&f>=0;)s.get(h,f)===3?(u(h,f),h--,f--):s.get(h,f)===1?h--:f--;return u(-1,-1),l.reverse(),new jg(l,!1)}}});var uw,j$,yfe,Cfe,wfe=P(()=>{Xf();lw();uw=class{compute(e,t,n=qg.instance){if(e.length===0||t.length===0)return jg.trivial(e,t);let o=e,r=t;function s(m,y){for(;mo.length||w>r.length)continue;let S=s(C,w);l.set(d,S);let x=C===v?c.get(d+1):c.get(d-1);if(c.set(d,S!==C?new j$(x,C,w,S-C):x),l.get(d)===o.length&&l.get(d)-d===r.length)break e}}let u=c.get(d),h=[],f=o.length,p=r.length;for(;;){let m=u?u.x+u.length:0,y=u?u.y+u.length:0;if((m!==f||y!==p)&&h.push(new kl(new Pn(m,f),new Pn(y,p))),!u)break;f=u.x,p=u.y,u=u.prev}return h.reverse(),new jg(h,!1)}},j$=class{constructor(e,t,n,o){this.prev=e,this.x=t,this.y=n,this.length=o}},yfe=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){let n=this.negativeArr;this.negativeArr=new Int32Array(n.length*2),this.negativeArr.set(n)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){let n=this.positiveArr;this.positiveArr=new Int32Array(n.length*2),this.positiveArr.set(n)}this.positiveArr[e]=t}}},Cfe=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}});function _Dt(i){return Array.isArray(i)}var rKe,sKe,xfe,rs,Sfe,nd,q$,nv,od=P(()=>{xfe=class{constructor(e,t){this.uri=e,this.value=t}};rs=class i{constructor(e,t){if(this[rKe]="ResourceMap",e instanceof i)this.map=new Map(e.map),this.toKey=t??i.defaultToKey;else if(_Dt(e)){this.map=new Map,this.toKey=t??i.defaultToKey;for(let[n,o]of e)this.set(n,o)}else this.map=new Map,this.toKey=e??i.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new xfe(e,t)),this}get(e){var t;return(t=this.map.get(this.toKey(e)))===null||t===void 0?void 0:t.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){typeof t<"u"&&(e=e.bind(t));for(let[n,o]of this.map)e(o.value,o.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(rKe=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}};rs.defaultToKey=i=>i.toString();Sfe=class{constructor(){this[sKe]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return(e=this._head)===null||e===void 0?void 0:e.value}get last(){var e;return(e=this._tail)===null||e===void 0?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){let n=this._map.get(e);if(n)return t!==0&&this.touch(n,t),n.value}set(e,t,n=0){let o=this._map.get(e);if(o)o.value=t,n!==0&&this.touch(o,n);else{switch(o={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(o);break;case 1:this.addItemFirst(o);break;case 2:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._state,o=this._head;for(;o;){if(t?e.bind(t)(o.value,o.key,this):e(o.value,o.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let e=this,t=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let r={value:n.key,done:!1};return n=n.next,r}else return{value:void 0,done:!0}}};return o}values(){let e=this,t=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let r={value:n.value,done:!1};return n=n.next,r}else return{value:void 0,done:!0}}};return o}entries(){let e=this,t=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let r={value:[n.key,n.value],done:!1};return n=n.next,r}else return{value:void 0,done:!0}}};return o}[(sKe=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==1&&t!==2)){if(t===1){if(e===this._head)return;let n=e.next,o=e.previous;e===this._tail?(o.next=void 0,this._tail=o):(n.previous=o,o.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===2){if(e===this._tail)return;let n=e.next,o=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=o,o.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(let[t,n]of e)this.set(t,n)}},nd=class extends Sfe{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}},q$=class{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(let[t,n]of e)this.set(t,n)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){let t=this._m1.get(e);return t===void 0?!1:(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}},nv=class{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){let n=this.map.get(e);n&&(n.delete(t),n.size===0&&this.map.delete(e))}forEach(e,t){let n=this.map.get(e);n&&n.forEach(t)}get(e){let t=this.map.get(e);return t||new Set}}});function kfe(i){return i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57}function aKe(i){return bDt[i]}function lKe(i){return i===10?8:i===13?7:iI(i)?6:i>=97&&i<=122?0:i>=65&&i<=90?1:i>=48&&i<=57?2:i===-1?3:i===44||i===59?5:4}var ov,bDt,Lfe=P(()=>{rh();Xf();Mi();Kt();U$();ov=class{constructor(e,t,n){this.lines=e,this.considerWhitespaceChanges=n,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let o=!1;t.start>0&&t.endExclusive>=e.length&&(t=new Pn(t.start-1,t.endExclusive),o=!0),this.lineRange=t,this.firstCharOffsetByLine[0]=0;for(let r=this.lineRange.start;rString.fromCharCode(t)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){let t=lKe(e>0?this.elements[e-1]:-1),n=lKe(en<=e);return new ke(this.lineRange.start+t+1,e-this.firstCharOffsetByLine[t]+this.additionalOffsetByLine[t]+1)}translateRange(e){return O.fromPositions(this.translateOffset(e.start),this.translateOffset(e.endExclusive))}findWordContaining(e){if(e<0||e>=this.elements.length||!kfe(this.elements[e]))return;let t=e;for(;t>0&&kfe(this.elements[t-1]);)t--;let n=e;for(;ns<=e.start))!==null&&t!==void 0?t:0,r=(n=ZGe(this.firstCharOffsetByLine,s=>e.endExclusive<=s))!==null&&n!==void 0?n:this.elements.length;return new Pn(o,r)}};bDt={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10}});function dKe(i,e,t,n,o,r){let{moves:s,excludedChanges:a}=CDt(i,e,t,r);if(!r.isValid())return[];let l=i.filter(d=>!a.has(d)),c=wDt(l,n,o,e,t,r);return ZD(s,c),s=xDt(s),s=s.filter(d=>{let u=d.original.toOffsetRange().slice(e).map(f=>f.trim());return u.join(` -`).length>=15&&yDt(u,f=>f.length>=2)>=2}),s=SDt(i,s),s}function yDt(i,e){let t=0;for(let n of i)e(n)&&t++;return t}function CDt(i,e,t,n){let o=[],r=i.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new dw(l.original,e,l)),s=new Set(i.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new dw(l.modified,t,l))),a=new Set;for(let l of r){let c=-1,d;for(let u of s){let h=l.computeSimilarity(u);h>c&&(c=h,d=u)}if(c>.9&&d&&(s.delete(d),o.push(new cu(l.range,d.range)),a.add(l.source),a.add(d.source)),!n.isValid())return{moves:o,excludedChanges:a}}return{moves:o,excludedChanges:a}}function wDt(i,e,t,n,o,r){let s=[],a=new nv;for(let h of i)for(let f=h.original.startLineNumber;fh.modified.startLineNumber,Nf));for(let h of i){let f=[];for(let p=h.modified.startLineNumber;p{for(let C of f)if(C.originalLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive&&C.modifiedLineRange.endLineNumberExclusive+1===y.endLineNumberExclusive){C.originalLineRange=new rn(C.originalLineRange.startLineNumber,v.endLineNumberExclusive),C.modifiedLineRange=new rn(C.modifiedLineRange.startLineNumber,y.endLineNumberExclusive),_.push(C);return}let b={modifiedLineRange:y,originalLineRange:v};l.push(b),_.push(b)}),f=_}if(!r.isValid())return[]}l.sort(HV(Sc(h=>h.modifiedLineRange.length,Nf)));let c=new _m,d=new _m;for(let h of l){let f=h.modifiedLineRange.startLineNumber-h.originalLineRange.startLineNumber,p=c.subtractFrom(h.modifiedLineRange),m=d.subtractFrom(h.originalLineRange).getWithDelta(f),y=p.getIntersection(m);for(let _ of y.ranges){if(_.length<3)continue;let v=_,b=_.delta(-f);s.push(new cu(b,v)),c.addRange(v),d.addRange(b)}}s.sort(Sc(h=>h.original.startLineNumber,Nf));let u=new sw(i);for(let h=0;hS.original.startLineNumber<=f.original.startLineNumber),m=r4(i,S=>S.modified.startLineNumber<=f.modified.startLineNumber),y=Math.max(f.original.startLineNumber-p.original.startLineNumber,f.modified.startLineNumber-m.modified.startLineNumber),_=u.findLastMonotonous(S=>S.original.startLineNumberS.modified.startLineNumbern.length||x>o.length||c.contains(x)||d.contains(S)||!cKe(n[S-1],o[x-1],r))break}C>0&&(d.addRange(new rn(f.original.startLineNumber-C,f.original.startLineNumber)),c.addRange(new rn(f.modified.startLineNumber-C,f.modified.startLineNumber)));let w;for(w=0;wn.length||x>o.length||c.contains(x)||d.contains(S)||!cKe(n[S-1],o[x-1],r))break}w>0&&(d.addRange(new rn(f.original.endLineNumberExclusive,f.original.endLineNumberExclusive+w)),c.addRange(new rn(f.modified.endLineNumberExclusive,f.modified.endLineNumberExclusive+w))),(C>0||w>0)&&(s[h]=new cu(new rn(f.original.startLineNumber-C,f.original.endLineNumberExclusive+w),new rn(f.modified.startLineNumber-C,f.modified.endLineNumberExclusive+w)))}return s}function cKe(i,e,t){if(i.trim()===e.trim())return!0;if(i.length>300&&e.length>300)return!1;let o=new uw().compute(new ov([i],new Pn(0,1),!1),new ov([e],new Pn(0,1),!1),t),r=0,s=kl.invert(o.diffs,i.length);for(let d of s)d.seq1Range.forEach(u=>{iI(i.charCodeAt(u))||r++});function a(d){let u=0;for(let h=0;he.length?i:e);return r/l>.6&&l>10}function xDt(i){if(i.length===0)return i;i.sort(Sc(t=>t.original.startLineNumber,Nf));let e=[i[0]];for(let t=1;t=0&&s>=0&&r+s<=2){e[e.length-1]=n.join(o);continue}e.push(o)}return e}function SDt(i,e){let t=new sw(i);return e=e.filter(n=>{let o=t.findLastMonotonous(a=>a.original.startLineNumbera.modified.startLineNumber{lw();iv();Vi();rh();od();sh();Xf();Lfe();U$();wfe()});function nI(i,e,t){let n=t;return n=hKe(i,e,n),n=hKe(i,e,n),n=kDt(i,e,n),n}function hKe(i,e,t){if(t.length===0)return t;let n=[];n.push(t[0]);for(let r=1;r0&&(a=a.delta(c))}o.push(a)}return n.length>0&&o.push(n[n.length-1]),o}function kDt(i,e,t){if(!i.getBoundaryScore||!e.getBoundaryScore)return t;for(let n=0;n0?t[n-1]:void 0,r=t[n],s=n+1=n.start&&i.seq2Range.start-s>=o.start&&t.isStronglyEqual(i.seq2Range.start-s,i.seq2Range.endExclusive-s)&&s<100;)s++;s--;let a=0;for(;i.seq1Range.start+ac&&(c=p,l=d)}return i.delta(l)}function pKe(i,e,t){let n=[];for(let o of t){let r=n[n.length-1];if(!r){n.push(o);continue}o.seq1Range.start-r.seq1Range.endExclusive<=2||o.seq2Range.start-r.seq2Range.endExclusive<=2?n[n.length-1]=new kl(r.seq1Range.join(o.seq1Range),r.seq2Range.join(o.seq2Range)):n.push(o)}return n}function mKe(i,e,t){let n=kl.invert(t,i.length),o=[],r=new Kh(0,0);function s(l,c){if(l.offset10;){let y=n[0];if(!(y.seq1Range.intersects(d)||y.seq2Range.intersects(u)))break;let v=i.findWordContaining(y.seq1Range.start),b=e.findWordContaining(y.seq2Range.start),C=new kl(v,b),w=C.intersect(y);if(p+=w.seq1Range.length,m+=w.seq2Range.length,h=h.join(C),h.seq1Range.endExclusive>=y.seq1Range.endExclusive)n.shift();else break}p+m<(h.seq1Range.length+h.seq2Range.length)*2/3&&o.push(h),r=h.getEndExclusives()}for(;n.length>0;){let l=n.shift();l.seq1Range.isEmpty||(s(l.getStarts(),l),s(l.getEndExclusives().delta(-1),l))}return LDt(t,o)}function LDt(i,e){let t=[];for(;i.length>0||e.length>0;){let n=i[0],o=e[0],r;n&&(!o||n.seq1Range.start0&&t[t.length-1].seq1Range.endExclusive>=r.seq1Range.start?t[t.length-1]=t[t.length-1].join(r):t.push(r)}return t}function gKe(i,e,t){let n=t;if(n.length===0)return n;let o=0,r;do{r=!1;let s=[n[0]];for(let a=1;a5||f.seq1Range.length+f.seq2Range.length>5)},l=n[a],c=s[s.length-1];d(c,l)?(r=!0,s[s.length-1]=s[s.length-1].join(l)):s.push(l)}n=s}while(o++<10&&r);return n}function vKe(i,e,t){let n=t;if(n.length===0)return n;let o=0,r;do{r=!1;let a=[n[0]];for(let l=1;l5||m.length>500)return!1;let _=i.getText(m).trim();if(_.length>20||_.split(/\r\n|\r|\n/).length>1)return!1;let v=i.countLinesIn(f.seq1Range),b=f.seq1Range.length,C=e.countLinesIn(f.seq2Range),w=f.seq2Range.length,S=i.countLinesIn(p.seq1Range),x=p.seq1Range.length,k=e.countLinesIn(p.seq2Range),D=p.seq2Range.length,E=2*40+50;function A(T){return Math.min(T,E)}return Math.pow(Math.pow(A(v*40+b),1.5)+Math.pow(A(C*40+w),1.5),1.5)+Math.pow(Math.pow(A(S*40+x),1.5)+Math.pow(A(k*40+D),1.5),1.5)>(E**1.5)**1.5*1.3},c=n[l],d=a[a.length-1];u(d,c)?(r=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}n=a}while(o++<10&&r);let s=[];return dje(n,(a,l,c)=>{let d=l;function u(_){return _.length>0&&_.trim().length<=3&&l.seq1Range.length+l.seq2Range.length>100}let h=i.extendToFullLines(l.seq1Range),f=i.getText(new Pn(h.start,l.seq1Range.start));u(f)&&(d=d.deltaStart(-f.length));let p=i.getText(new Pn(l.seq1Range.endExclusive,h.endExclusive));u(p)&&(d=d.deltaEnd(p.length));let m=kl.fromOffsetPairs(a?a.getEndExclusives():Kh.zero,c?c.getStarts():Kh.max),y=d.intersect(m);s.length>0&&y.getStarts().equals(s[s.length-1].getEndExclusives())?s[s.length-1]=s[s.length-1].join(y):s.push(y)}),s}var Efe=P(()=>{Vi();Xf();lw()});function _Ke(i){let e=0;for(;e{oI=class{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){let t=e===0?0:_Ke(this.lines[e-1]),n=e===this.lines.length?0:_Ke(this.lines[e]);return 1e3-(t+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` -`)}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}});function yKe(i,e,t,n=!1){let o=[];for(let r of gC(i.map(s=>EDt(s,e,t)),(s,a)=>s.original.overlapOrTouch(a.original)||s.modified.overlapOrTouch(a.modified))){let s=r[0],a=r[r.length-1];o.push(new du(s.original.join(a.original),s.modified.join(a.modified),r.map(l=>l.innerChanges[0])))}return zg(()=>!n&&o.length>0&&o[0].original.startLineNumber!==o[0].modified.startLineNumber?!1:TU(o,(r,s)=>s.original.startLineNumber-r.original.endLineNumberExclusive===s.modified.startLineNumber-r.modified.endLineNumberExclusive&&r.original.endLineNumberExclusive=t[i.modifiedRange.startLineNumber-1].length&&i.originalRange.startColumn-1>=e[i.originalRange.startLineNumber-1].length&&i.originalRange.startLineNumber<=i.originalRange.endLineNumber+o&&i.modifiedRange.startLineNumber<=i.modifiedRange.endLineNumber+o&&(n=1);let r=new rn(i.originalRange.startLineNumber+n,i.originalRange.endLineNumber+1+o),s=new rn(i.modifiedRange.startLineNumber+n,i.modifiedRange.endLineNumber+1+o);return new du(r,s,[i])}var hw,Dfe=P(()=>{Vi();um();sh();Xf();Kt();lw();oKe();wfe();uKe();Efe();F$();iv();Lfe();bKe();hw=class{constructor(){this.dynamicProgrammingDiffing=new $$,this.myersDiffingAlgorithm=new uw}computeDiff(e,t,n){if(e.length<=1&&uo(e,t,(w,S)=>w===S))return new ev([],[],!1);if(e.length===1&&e[0].length===0||t.length===1&&t[0].length===0)return new ev([new du(new rn(1,e.length+1),new rn(1,t.length+1),[new Qf(new O(1,1,e.length,e[0].length+1),new O(1,1,t.length,t[0].length+1))])],[],!1);let o=n.maxComputationTimeMs===0?qg.instance:new W$(n.maxComputationTimeMs),r=!n.ignoreTrimWhitespace,s=new Map;function a(w){let S=s.get(w);return S===void 0&&(S=s.size,s.set(w,S)),S}let l=e.map(w=>a(w.trim())),c=t.map(w=>a(w.trim())),d=new oI(l,e),u=new oI(c,t),h=d.length+u.length<1700?this.dynamicProgrammingDiffing.compute(d,u,o,(w,S)=>e[w]===t[S]?t[S].length===0?.1:1+Math.log(1+t[S].length):.99):this.myersDiffingAlgorithm.compute(d,u),f=h.diffs,p=h.hitTimeout;f=nI(d,u,f),f=gKe(d,u,f);let m=[],y=w=>{if(r)for(let S=0;Sw.seq1Range.start-_===w.seq2Range.start-v);let S=w.seq1Range.start-_;y(S),_=w.seq1Range.endExclusive,v=w.seq2Range.endExclusive;let x=this.refineDiff(e,t,w,o,r);x.hitTimeout&&(p=!0);for(let k of x.mappings)m.push(k)}y(e.length-_);let b=yKe(m,e,t),C=[];return n.computeMoves&&(C=this.computeMoves(b,e,t,l,c,o,r)),zg(()=>{function w(x,k){if(x.lineNumber<1||x.lineNumber>k.length)return!1;let D=k[x.lineNumber-1];return!(x.column<1||x.column>D.length+1)}function S(x,k){return!(x.startLineNumber<1||x.startLineNumber>k.length+1||x.endLineNumberExclusive<1||x.endLineNumberExclusive>k.length+1)}for(let x of b){if(!x.innerChanges)return!1;for(let k of x.innerChanges)if(!(w(k.modifiedRange.getStartPosition(),t)&&w(k.modifiedRange.getEndPosition(),t)&&w(k.originalRange.getStartPosition(),e)&&w(k.originalRange.getEndPosition(),e)))return!1;if(!S(x.modified,t)||!S(x.original,e))return!1}return!0}),new ev(b,C,p)}computeMoves(e,t,n,o,r,s,a){return dKe(e,t,n,o,r,s).map(d=>{let u=this.refineDiff(t,n,new kl(d.original.toOffsetRange(),d.modified.toOffsetRange()),s,a),h=yKe(u.mappings,t,n,!0);return new rw(d,h)})}refineDiff(e,t,n,o,r){let s=new ov(e,n.seq1Range,r),a=new ov(t,n.seq2Range,r),l=s.length+a.length<500?this.dynamicProgrammingDiffing.compute(s,a,o):this.myersDiffingAlgorithm.compute(s,a,o),c=l.diffs;return c=nI(s,a,c),c=mKe(s,a,c),c=pKe(s,a,c),c=vKe(s,a,c),{mappings:c.map(u=>new Qf(s.translateRange(u.seq1Range),a.translateRange(u.seq2Range))),hitTimeout:l.hitTimeout}}}});var Tfe,CKe=P(()=>{nKe();Dfe();Tfe={getLegacy:()=>new B$,getDefault:()=>new hw}});function rv(i,e){let t=Math.pow(10,e);return Math.round(i*t)/t}var On,Gg,bm,it,sa=P(()=>{On=class{constructor(e,t,n,o=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,t))|0,this.b=Math.min(255,Math.max(0,n))|0,this.a=rv(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}},Gg=class i{constructor(e,t,n,o){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=rv(Math.max(Math.min(1,t),0),3),this.l=rv(Math.max(Math.min(1,n),0),3),this.a=rv(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){let t=e.r/255,n=e.g/255,o=e.b/255,r=e.a,s=Math.max(t,n,o),a=Math.min(t,n,o),l=0,c=0,d=(a+s)/2,u=s-a;if(u>0){switch(c=Math.min(d<=.5?u/(2*d):u/(2-2*d),1),s){case t:l=(n-o)/u+(n1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(e){let t=e.h/360,{s:n,l:o,a:r}=e,s,a,l;if(n===0)s=a=l=o;else{let c=o<.5?o*(1+n):o+n-o*n,d=2*o-c;s=i._hue2rgb(d,c,t+1/3),a=i._hue2rgb(d,c,t),l=i._hue2rgb(d,c,t-1/3)}return new On(Math.round(s*255),Math.round(a*255),Math.round(l*255),r)}},bm=class i{constructor(e,t,n,o){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=rv(Math.max(Math.min(1,t),0),3),this.v=rv(Math.max(Math.min(1,n),0),3),this.a=rv(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){let t=e.r/255,n=e.g/255,o=e.b/255,r=Math.max(t,n,o),s=Math.min(t,n,o),a=r-s,l=r===0?0:a/r,c;return a===0?c=0:r===t?c=((n-o)/a%6+6)%6:r===n?c=(o-t)/a+2:c=(t-n)/a+4,new i(Math.round(c*60),l,r,e.a)}static toRGBA(e){let{h:t,s:n,v:o,a:r}=e,s=o*n,a=s*(1-Math.abs(t/60%2-1)),l=o-s,[c,d,u]=[0,0,0];return t<60?(c=s,d=a):t<120?(c=a,d=s):t<180?(d=s,u=a):t<240?(d=a,u=s):t<300?(c=a,u=s):t<=360&&(c=s,u=a),c=Math.round((c+l)*255),d=Math.round((d+l)*255),u=Math.round((u+l)*255),new On(c,d,u,r)}},it=class i{static fromHex(e){return i.Format.CSS.parseHex(e)||i.red}static equals(e,t){return!e&&!t?!0:!e||!t?!1:e.equals(t)}get hsla(){return this._hsla?this._hsla:Gg.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:bm.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof On)this.rgba=e;else if(e instanceof Gg)this._hsla=e,this.rgba=Gg.toRGBA(e);else if(e instanceof bm)this._hsva=e,this.rgba=bm.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&On.equals(this.rgba,e.rgba)&&Gg.equals(this.hsla,e.hsla)&&bm.equals(this.hsva,e.hsva)}getRelativeLuminance(){let e=i._relativeLuminanceForComponent(this.rgba.r),t=i._relativeLuminanceForComponent(this.rgba.g),n=i._relativeLuminanceForComponent(this.rgba.b),o=.2126*e+.7152*t+.0722*n;return rv(o,4)}static _relativeLuminanceForComponent(e){let t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){let t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t>n}isDarkerThan(e){let t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t0)for(let o of n){let r=o.filter(c=>c!==void 0),s=r[1],a=r[2];if(!a)continue;let l;if(s==="rgb"){let c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;l=wKe(rI(i,o),sI(a,c),!1)}else if(s==="rgba"){let c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=wKe(rI(i,o),sI(a,c),!0)}else if(s==="hsl"){let c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;l=xKe(rI(i,o),sI(a,c),!1)}else if(s==="hsla"){let c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=xKe(rI(i,o),sI(a,c),!0)}else s==="#"&&(l=DDt(rI(i,o),s+a));l&&e.push(l)}return e}function kKe(i){return!i||typeof i.getValue!="function"||typeof i.positionAt!="function"?[]:TDt(i)}var LKe=P(()=>{sa()});var Mfe,z5,EKe=P(()=>{ZT();Io();Mi();Kt();$Ge();CC();qGe();GGe();Oue();Yu();mfe();CKe();Gc();LKe();Mfe=class extends M${get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){let t=[];for(let n=0;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,o=!0;else{let r=this._lines[t-1].length+1;n<1?(n=1,o=!0):n>r&&(n=r,o=!0)}return o?{lineNumber:t,column:n}:e}},z5=class i{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){let e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}acceptNewModel(e){this._models[e.url]=new Mfe(li.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}async computeUnicodeHighlights(e,t,n){let o=this._getModel(e);return o?P5.computeUnicodeHighlights(o,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async computeDiff(e,t,n,o){let r=this._getModel(e),s=this._getModel(t);return!r||!s?null:i.computeDiff(r,s,n,o)}static computeDiff(e,t,n,o){let r=o==="advanced"?Tfe.getDefault():Tfe.getLegacy(),s=e.getLinesContent(),a=t.getLinesContent(),l=r.computeDiff(s,a,n),c=l.changes.length>0?!1:this._modelsAreIdentical(e,t);function d(u){return u.map(h=>{var f;return[h.original.startLineNumber,h.original.endLineNumberExclusive,h.modified.startLineNumber,h.modified.endLineNumberExclusive,(f=h.innerChanges)===null||f===void 0?void 0:f.map(p=>[p.originalRange.startLineNumber,p.originalRange.startColumn,p.originalRange.endLineNumber,p.originalRange.endColumn,p.modifiedRange.startLineNumber,p.modifiedRange.startColumn,p.modifiedRange.endLineNumber,p.modifiedRange.endColumn])]})}return{identical:c,quitEarly:l.hitTimeout,changes:d(l.changes),moves:l.moves.map(u=>[u.lineRangeMapping.original.startLineNumber,u.lineRangeMapping.original.endLineNumberExclusive,u.lineRangeMapping.modified.startLineNumber,u.lineRangeMapping.modified.endLineNumberExclusive,d(u.changes)])}}static _modelsAreIdentical(e,t){let n=e.getLineCount(),o=t.getLineCount();if(n!==o)return!1;for(let r=1;r<=n;r++){let s=e.getLineContent(r),a=t.getLineContent(r);if(s!==a)return!1}return!0}async computeMoreMinimalEdits(e,t,n){let o=this._getModel(e);if(!o)return t;let r=[],s;t=t.slice(0).sort((l,c)=>{if(l.range&&c.range)return O.compareRangesUsingStarts(l.range,c.range);let d=l.range?0:1,u=c.range?0:1;return d-u});let a=0;for(let l=1;li._diffLimit){r.push({range:l,text:c});continue}let h=UGe(u,c,n),f=o.offsetAt(O.lift(l).getStartPosition());for(let p of h){let m=o.positionAt(f+p.originalStart),y=o.positionAt(f+p.originalStart+p.originalLength),_={text:c.substr(p.modifiedStart,p.modifiedLength),range:{startLineNumber:m.lineNumber,startColumn:m.column,endLineNumber:y.lineNumber,endColumn:y.column}};o.getValueInRange(_.range)!==_.text&&r.push(_)}}return typeof s=="number"&&r.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r}async computeLinks(e){let t=this._getModel(e);return t?jGe(t):null}async computeDefaultDocumentColors(e){let t=this._getModel(e);return t?kKe(t):null}async textualSuggest(e,t,n,o){let r=new Er,s=new RegExp(n,o),a=new Set;e:for(let l of e){let c=this._getModel(l);if(c){for(let d of c.words(s))if(!(d===t||!isNaN(Number(d)))&&(a.add(d),a.size>i._suggestionsLimit))break e}}return{words:Array.from(a),duration:r.elapsed()}}async computeWordRanges(e,t,n,o){let r=this._getModel(e);if(!r)return Object.create(null);let s=new RegExp(n,o),a=Object.create(null);for(let l=t.startLineNumber;lthis._host.fhr(a,l)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(s,t),Promise.resolve(bC(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(n){return Promise.reject(n)}}};z5._diffLimit=1e5;z5._suggestionsLimit=1e4;typeof importScripts=="function"&&(globalThis.monaco=eU())});var fw,G$,aI=P(()=>{_i();fw=vi("textResourceConfigurationService"),G$=vi("textResourcePropertiesService")});var Rt,Yn=P(()=>{_i();Rt=vi("ILanguageFeaturesService")});function F5(i,e){let t=i.getModel(e);return!(!t||t.isTooLargeForSyncing())}var IDt,lI,DKe,TKe,K$,Nfe,Afe,Rfe,Y$,cI,H5,Z$=P(()=>{Qi();nt();Ahe();_Ge();Kt();Kr();EKe();Dc();aI();Vi();Ju();Yu();Pi();Yn();F$();iv();sh();_l();Qt();IDt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},lI=function(i,e){return function(t,n){e(t,n,i)}},DKe=60*1e3,TKe=5*60*1e3;K$=class extends ue{constructor(e,t,n,o,r){super(),this._modelService=e,this._workerManager=this._register(new Afe(this._modelService,o)),this._logService=n,this._register(r.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(s,a)=>F5(this._modelService,s.uri)?this._workerManager.withWorker().then(l=>l.computeLinks(s.uri)).then(l=>l&&{links:l}):Promise.resolve({links:[]})})),this._register(r.completionProvider.register("*",new Nfe(this._workerManager,t,this._modelService,o)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return F5(this._modelService,e)}computedUnicodeHighlights(e,t,n){return this._workerManager.withWorker().then(o=>o.computedUnicodeHighlights(e,t,n))}async computeDiff(e,t,n,o){let r=await this._workerManager.withWorker().then(l=>l.computeDiff(e,t,n,o));if(!r)return null;return{identical:r.identical,quitEarly:r.quitEarly,changes:a(r.changes),moves:r.moves.map(l=>new rw(new cu(new rn(l[0],l[1]),new rn(l[2],l[3])),a(l[4])))};function a(l){return l.map(c=>{var d;return new du(new rn(c[0],c[1]),new rn(c[2],c[3]),(d=c[4])===null||d===void 0?void 0:d.map(u=>new Qf(new O(u[0],u[1],u[2],u[3]),new O(u[4],u[5],u[6],u[7]))))})}}computeMoreMinimalEdits(e,t,n=!1){if(Nr(t)){if(!F5(this._modelService,e))return Promise.resolve(t);let o=Er.create(),r=this._workerManager.withWorker().then(s=>s.computeMoreMinimalEdits(e,t,n));return r.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),o.elapsed())),Promise.race([r,eh(1e3).then(()=>t)])}else return Promise.resolve(void 0)}canNavigateValueSet(e){return F5(this._modelService,e)}navigateValueSet(e,t,n){return this._workerManager.withWorker().then(o=>o.navigateValueSet(e,t,n))}canComputeWordRanges(e){return F5(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then(n=>n.computeWordRanges(e,t))}};K$=IDt([lI(0,no),lI(1,fw),lI(2,ks),lI(3,An),lI(4,Rt)],K$);Nfe=class{constructor(e,t,n,o){this.languageConfigurationService=o,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=n}async provideCompletionItems(e,t){let n=this._configurationService.getValue(e.uri,t,"editor");if(n.wordBasedSuggestions==="off")return;let o=[];if(n.wordBasedSuggestions==="currentDocument")F5(this._modelService,e.uri)&&o.push(e.uri);else for(let u of this._modelService.getModels())F5(this._modelService,u.uri)&&(u===e?o.unshift(u.uri):(n.wordBasedSuggestions==="allDocuments"||u.getLanguageId()===e.getLanguageId())&&o.push(u.uri));if(o.length===0)return;let r=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),s=e.getWordAtPosition(t),a=s?new O(t.lineNumber,s.startColumn,t.lineNumber,s.endColumn):O.fromPositions(t),l=a.setEndPosition(t.lineNumber,t.column),d=await(await this._workerManager.withWorker()).textualSuggest(o,s?.word,r);if(d)return{duration:d.duration,suggestions:d.words.map(u=>({kind:18,label:u,insertText:u,range:{insert:l,replace:a}}))}}},Afe=class extends ue{constructor(e,t){super(),this.languageConfigurationService=t,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new U3).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(TKe/2),$0),this._register(this._modelService.onModelRemoved(o=>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>TKe&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new H5(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}},Rfe=class extends ue{constructor(e,t,n){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!n){let o=new H3;o.cancelAndSet(()=>this._checkStopModelSync(),Math.round(DKe/2)),this._register(o)}}dispose(){for(let e in this._syncedModels)Nn(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(let n of e){let o=n.toString();this._syncedModels[o]||this._beginModelSync(n,t),this._syncedModels[o]&&(this._syncedModelsLastUsedTime[o]=new Date().getTime())}}_checkStopModelSync(){let e=new Date().getTime(),t=[];for(let n in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[n]>DKe&&t.push(n);for(let n of t)this._stopModelSync(n)}_beginModelSync(e,t){let n=this._modelService.getModel(e);if(!n||!t&&n.isTooLargeForSyncing())return;let o=e.toString();this._proxy.acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});let r=new Ye;r.add(n.onDidChangeContent(s=>{this._proxy.acceptModelChanged(o.toString(),s)})),r.add(n.onWillDispose(()=>{this._stopModelSync(o)})),r.add(Yt(()=>{this._proxy.acceptRemovedModel(o)})),this._syncedModels[o]=r}_stopModelSync(e){let t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],Nn(t)}},Y$=class{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}},cI=class{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}},H5=class extends ue{constructor(e,t,n,o){super(),this.languageConfigurationService=o,this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new jT(n),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new s$(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new cI(this)))}catch(e){$T(e),this._worker=new Y$(new z5(new cI(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>($T(e),this._worker=new Y$(new z5(new cI(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new Rfe(e,this._modelService,this._keepIdleModels))),this._modelManager}async _withSyncedResources(e,t=!1){return this._disposed?Promise.reject(Oje()):this._getProxy().then(n=>(this._getOrCreateModelManager(n).ensureSyncedResources(e,t),n))}computedUnicodeHighlights(e,t,n){return this._withSyncedResources([e]).then(o=>o.computeUnicodeHighlights(e.toString(),t,n))}computeDiff(e,t,n,o){return this._withSyncedResources([e,t],!0).then(r=>r.computeDiff(e.toString(),t.toString(),n,o))}computeMoreMinimalEdits(e,t,n){return this._withSyncedResources([e]).then(o=>o.computeMoreMinimalEdits(e.toString(),t,n))}computeLinks(e){return this._withSyncedResources([e]).then(t=>t.computeLinks(e.toString()))}computeDefaultDocumentColors(e){return this._withSyncedResources([e]).then(t=>t.computeDefaultDocumentColors(e.toString()))}async textualSuggest(e,t,n){let o=await this._withSyncedResources(e),r=n.source,s=n.flags;return o.textualSuggest(e.map(a=>a.toString()),t,r,s)}computeWordRanges(e,t){return this._withSyncedResources([e]).then(n=>{let o=this._modelService.getModel(e);if(!o)return Promise.resolve(null);let r=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId()).getWordDefinition(),s=r.source,a=r.flags;return n.computeWordRanges(e.toString(),t,s,a)})}navigateValueSet(e,t,n){return this._withSyncedResources([e]).then(o=>{let r=this._modelService.getModel(e);if(!r)return null;let s=this.languageConfigurationService.getLanguageConfiguration(r.getLanguageId()).getWordDefinition(),a=s.source,l=s.flags;return o.navigateValueSet(e.toString(),t,n,a,l)})}dispose(){super.dispose(),this._disposed=!0}}});function IKe(i,e,t){return new Pfe(i,e,t)}var Pfe,MKe=P(()=>{Gc();Z$();Pfe=class extends H5{constructor(e,t,n){super(e,n.keepIdleModels||!1,n.label,t),this._foreignModuleId=n.moduleId,this._foreignModuleCreateData=n.createData||null,this._foreignModuleHost=n.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(n){return Promise.reject(n)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{let t=this._foreignModuleHost?bC(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then(n=>{this._foreignModuleCreateData=null;let o=(a,l)=>e.fmr(a,l),r=(a,l)=>function(){let c=Array.prototype.slice.call(arguments,0);return l(a,c)},s={};for(let a of n)s[a]=r(a,o);return s})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(t=>this.getProxy())}}});var s4,dI=P(()=>{s4={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}});function pw(i,e){return new N3([new am(0,"",i)],e)}function sv(i,e){let t=new Uint32Array(2);return t[0]=0,t[1]=(i<<0|0|0|32768|2<<24)>>>0,new U0(t,e===null?Kg:e)}var Kg,mw=P(()=>{Pr();Kg=new class{clone(){return this}equals(i){return this===i}}});var Ls,B5=P(()=>{Ls=class{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 n="mtk"+this.getForeground(e),o=this.getFontStyle(e);return o&1&&(n+=" mtki"),o&2&&(n+=" mtkb"),o&4&&(n+=" mtku"),o&8&&(n+=" mtks"),n}static getInlineStyleFromMetadata(e,t){let n=this.getForeground(e),o=this.getFontStyle(e),r=`color: ${t[n]};`;o&1&&(r+="font-style: italic;"),o&2&&(r+="font-weight: bold;");let s="";return o&4&&(s+=" underline"),o&8&&(s+=" line-through"),s&&(r+=`text-decoration:${s};`),r}static getPresentationFromMetadata(e){let t=this.getForeground(e),n=this.getFontStyle(e);return{foreground:t,italic:!!(n&1),bold:!!(n&2),underline:!!(n&4),strikethrough:!!(n&8)}}}});var Es,Ofe,Yg=P(()=>{B5();Es=class i{static createEmpty(e,t){let n=i.defaultTokenMetadata,o=new Uint32Array(2);return o[0]=e.length,o[1]=n,new i(o,e,t)}constructor(e,t,n){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=n}equals(e){return e instanceof i?this.slicedEquals(e,0,this._tokensCount):!1}slicedEquals(e,t,n){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;let o=t<<1,r=o+(n<<1);for(let s=o;s0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){let t=this._tokens[(e<<1)+1],n=Ls.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(n)}getStandardTokenType(e){let t=this._tokens[(e<<1)+1];return Ls.getTokenType(t)}getForeground(e){let t=this._tokens[(e<<1)+1];return Ls.getForeground(t)}getClassName(e){let t=this._tokens[(e<<1)+1];return Ls.getClassNameFromMetadata(t)}getInlineStyle(e,t){let n=this._tokens[(e<<1)+1];return Ls.getInlineStyleFromMetadata(n,t)}getPresentation(e){let t=this._tokens[(e<<1)+1];return Ls.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return i.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,n){return new Ofe(this,e,t,n)}static convertToEndOffset(e,t){let o=(e.length>>>1)-1;for(let r=0;r>>1)-1;for(;nt&&(o=r)}return n}withInserted(e){if(e.length===0)return this;let t=0,n=0,o="",r=new Array,s=0;for(;;){let a=ts){o+=this._text.substring(s,l.offset);let c=this._tokens[(t<<1)+1];r.push(o.length,c),s=l.offset}o+=l.text,r.push(o.length,l.tokenMetadata),n++}else break}return new i(new Uint32Array(r),o,this._languageIdCodec)}};Es.defaultTokenMetadata=(32768|2<<24)>>>0;Ofe=class i{constructor(e,t,n,o){this._source=e,this._startOffset=t,this._endOffset=n,this._deltaOffset=o,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let r=this._firstTokenIndex,s=e.getCount();r=n);r++)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 i?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){let 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}}});var Ld,X$,zfe,Q$,gw=P(()=>{Ri();Ld=class i{constructor(e,t,n,o){this.startColumn=e,this.endColumn=t,this.className=n,this.type=o,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){let n=e.length,o=t.length;if(n!==o)return!1;for(let r=0;r=r||(a[l++]=new i(Math.max(1,c.startColumn-o+1),Math.min(s+1,c.endColumn-o+1),c.className,c.type));return a}static filter(e,t,n,o){if(e.length===0)return[];let r=[],s=0;for(let a=0,l=e.length;at||d.isEmpty()&&(c.type===0||c.type===3))continue;let u=d.startLineNumber===t?d.startColumn:n,h=d.endLineNumber===t?d.endColumn:o;r[s++]=new i(u,h,c.inlineClassName,c.type)}return r}static _typeCompare(e,t){let n=[2,0,1,3];return n[e]-n[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;let n=i._typeCompare(e.type,t.type);return n!==0?n:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(o,0,e),this.classNames.splice(o,0,t),this.metadata.splice(o,0,n);break}this.count++}},Q$=class{static normalize(e,t){if(t.length===0)return[];let n=[],o=new zfe,r=0;for(let s=0,a=t.length;s1){let m=e.charCodeAt(c-2);Or(m)&&c--}if(d>1){let m=e.charCodeAt(d-2);Or(m)&&d--}let f=c-1,p=d-2;r=o.consumeLowerThan(f,r,n),o.count===0&&(r=f),o.insert(p,u,h)}return o.consumeLowerThan(1073741824,r,n),n}}});var aa,AKe=P(()=>{aa=class{constructor(e,t,n,o){this.endIndex=e,this.type=t,this.metadata=n,this.containsRTL=o,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}});function a4(i,e){if(i.lineContent.length===0){if(i.lineDecorations.length>0){e.appendString("");let t=0,n=0,o=0;for(let s of i.lineDecorations)(s.type===1||s.type===2)&&(e.appendString(''),s.type===1&&(o|=1,t++),s.type===2&&(o|=2,n++));e.appendString("");let r=new hI(1,t+n);return r.setColumnInfo(1,t,0,0),new fI(r,!1,o)}return e.appendString(""),new fI(new hI(0,0),!1,0)}return zDt(MDt(i),e)}function _w(i){let e=new qh(1e4),t=a4(i,e);return new Ffe(t.characterMapping,e.build(),t.containsRTL,t.containsForeignElements)}function MDt(i){let e=i.lineContent,t,n,o;i.stopRenderingLineAfter!==-1&&i.stopRenderingLineAfter0){for(let a=0,l=i.lineDecorations.length;a0&&(r[s++]=new aa(n,"",0,!1));let a=n;for(let l=0,c=t.getCount();l=o){let f=e?lm(i.substring(a,o)):!1;r[s++]=new aa(o,u,0,f);break}let h=e?lm(i.substring(a,d)):!1;r[s++]=new aa(d,u,0,h),a=d}return r}function ADt(i,e,t){let n=0,o=[],r=0;if(t)for(let s=0,a=e.length;s=50&&(o[r++]=new aa(f+1,d,u,h),p=f+1,f=-1);p!==c&&(o[r++]=new aa(c,d,u,h))}else o[r++]=l;n=c}else for(let s=0,a=e.length;s50){let u=l.type,h=l.metadata,f=l.containsRTL,p=Math.ceil(d/50);for(let m=1;m=8234&&i<=8238||i>=8294&&i<=8297||i>=8206&&i<=8207||i===1564}function RDt(i,e){let t=[],n=new aa(0,"",0,!1),o=0;for(let r of e){let s=r.endIndex;for(;on.endIndex&&(n=new aa(o,r.type,r.metadata,r.containsRTL),t.push(n)),n=new aa(o+1,"mtkcontrol",r.metadata,!1),t.push(n))}o>n.endIndex&&(n=new aa(s,r.type,r.metadata,r.containsRTL),t.push(n))}return t}function PDt(i,e,t,n){let o=i.continuesWithWrappedLine,r=i.fauxIndentLength,s=i.tabSize,a=i.startVisibleColumn,l=i.useMonospaceOptimizations,c=i.selectionsOnLine,d=i.renderWhitespace===1,u=i.renderWhitespace===3,h=i.renderSpaceWidth!==i.spaceWidth,f=[],p=0,m=0,y=n[m].type,_=n[m].containsRTL,v=n[m].endIndex,b=n.length,C=!1,w=qr(e),S;w===-1?(C=!0,w=t,S=t):S=ql(e);let x=!1,k=0,D=c&&c[k],E=a%s;for(let T=r;T=D.endOffset&&(k++,D=c&&c[k]);let I;if(TS)I=!0;else if(L===9)I=!0;else if(L===32)if(d)if(x)I=!0;else{let M=T+1T),I&&u&&(I=C||T>S),I&&_&&T>=w&&T<=S&&(I=!1),x){if(!I||!l&&E>=s){if(h){let M=p>0?f[p-1].endIndex:r;for(let N=M+1;N<=T;N++)f[p++]=new aa(N,"mtkw",1,!1)}else f[p++]=new aa(T,"mtkw",1,!1);E=E%s}}else(T===v||I&&T>r)&&(f[p++]=new aa(T,y,0,_),E=E%s);for(L===9?E=s:Bf(L)?E+=2:E++,x=I;T===v&&(m++,m0?e.charCodeAt(t-1):0,L=t>1?e.charCodeAt(t-2):0;T===32&&L!==32&&L!==9||(A=!0)}else A=!0;if(A)if(h){let T=p>0?f[p-1].endIndex:r;for(let L=T+1;L<=t;L++)f[p++]=new aa(L,"mtkw",1,!1)}else f[p++]=new aa(t,"mtkw",1,!1);else f[p++]=new aa(t,y,0,_);return f}function ODt(i,e,t,n){n.sort(Ld.compare);let o=Q$.normalize(i,n),r=o.length,s=0,a=[],l=0,c=0;for(let u=0,h=t.length;uc&&(c=v.startOffset,a[l++]=new aa(c,m,y,_)),v.endOffset+1<=p)c=v.endOffset+1,a[l++]=new aa(c,m+" "+v.className,y|v.metadata,_),s++;else{c=p,a[l++]=new aa(c,m+" "+v.className,y|v.metadata,_);break}}p>c&&(c=p,a[l++]=new aa(c,m,y,_))}let d=t[t.length-1].endIndex;if(s'):e.appendString("");for(let D=0,E=c.length;D=d&&(ie+=K)}}for(N&&(e.appendString(' style="width:'),e.appendString(String(p*F)),e.appendString('px"')),e.appendASCIICharCode(62);C1?e.appendCharCode(8594):e.appendCharCode(65515);for(let K=2;K<=fe;K++)e.appendCharCode(160)}else ie=2,fe=1,e.appendCharCode(m),e.appendCharCode(8204);S+=ie,x+=fe,C>=d&&(w+=fe)}}else for(e.appendASCIICharCode(62);C=d&&(w+=ie)}z?k++:k=0,C>=s&&!b&&A.isPseudoAfter()&&(b=!0,v.setColumnInfo(C+1,D,S,x)),e.appendString("")}return b||v.setColumnInfo(s+1,c.length-1,S,x),a&&(e.appendString(''),e.appendString(g("showMore","Show more ({0})",HDt(l))),e.appendString("")),e.appendString(""),new fI(v,f,o)}function FDt(i){return i.toString(16).toUpperCase().padStart(4,"0")}function HDt(i){return i<1024?g("overflow.chars","{0} chars",i):i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/1024/1024).toFixed(1)} MB`}var vw,uu,uI,hI,fI,Ffe,Hfe,av=P(()=>{Wt();Ri();J0();gw();AKe();vw=class{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}},uu=class{constructor(e,t,n,o,r,s,a,l,c,d,u,h,f,p,m,y,_,v,b){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.continuesWithWrappedLine=o,this.isBasicASCII=r,this.containsRTL=s,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=c.sort(Ld.compare),this.tabSize=d,this.startVisibleColumn=u,this.spaceWidth=h,this.stopRenderingLineAfter=m,this.renderWhitespace=y==="all"?4:y==="boundary"?1:y==="selection"?2:y==="trailing"?3:0,this.renderControlCharacters=_,this.fontLigatures=v,this.selectionsOnLine=b&&b.sort((S,x)=>S.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,n,o){let r=(t<<16|n<<0)>>>0;this._data[e-1]=r,this._horizontalOffset[e-1]=o}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){let t=this.charOffsetToPartData(e-1),n=i.getPartIndex(t),o=i.getCharIndex(t);return new uI(n,o)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,n){if(this.length===0)return 0;let o=(e<<16|n<<0)>>>0,r=0,s=this.length-1;for(;r+1>>1,y=this._data[m];if(y===o)return m;y>o?s=m:r=m}if(r===s)return r;let a=this._data[r],l=this._data[s];if(a===o)return r;if(l===o)return s;let c=i.getPartIndex(a),d=i.getCharIndex(a),u=i.getPartIndex(l),h;c!==u?h=t:h=i.getCharIndex(l);let f=n-d,p=h-n;return f<=p?r:s}},fI=class{constructor(e,t,n){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n}};Ffe=class{constructor(e,t,n,o){this.characterMapping=e,this.html=t,this.containsRTL=n,this.containsForeignElements=o}};Hfe=class{constructor(e,t,n,o,r,s,a,l,c,d,u,h,f,p,m,y){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.len=o,this.isOverflowing=r,this.overflowingCharCount=s,this.parts=a,this.containsForeignElements=l,this.fauxIndentLength=c,this.tabSize=d,this.startVisibleColumn=u,this.containsRTL=h,this.spaceWidth=f,this.renderSpaceCharCode=p,this.renderWhitespace=m,this.renderControlCharacters=y}}});var pI,J$,V5,Ed,l4,ej,bw,W5,ap=P(()=>{Vi();Ri();Kt();pI=class{constructor(e,t,n,o){this._viewportBrand=void 0,this.top=e|0,this.left=t|0,this.width=n|0,this.height=o|0}},J$=class{constructor(e,t){this.tabSize=e,this.data=t}},V5=class{constructor(e,t,n,o,r,s,a){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=n,this.maxColumn=o,this.startVisibleColumn=r,this.tokens=s,this.inlineDecorations=a}},Ed=class i{constructor(e,t,n,o,r,s,a,l,c,d){this.minColumn=e,this.maxColumn=t,this.content=n,this.continuesWithWrappedLine=o,this.isBasicASCII=i.isBasicASCII(n,s),this.containsRTL=i.containsRTL(n,this.isBasicASCII,r),this.tokens=a,this.inlineDecorations=l,this.tabSize=c,this.startVisibleColumn=d}static isBasicASCII(e,t){return t?Ag(e):!0}static containsRTL(e,t,n){return!t&&n?lm(e):!1}},l4=class{constructor(e,t,n){this.range=e,this.inlineClassName=t,this.type=n}},ej=class{constructor(e,t,n,o){this.startOffset=e,this.endOffset=t,this.inlineClassName=n,this.inlineClassNameAffectsLetterSpacing=o}toInlineDecoration(e){return new l4(new O(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}},bw=class{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}},W5=class i{constructor(e,t,n){this.color=e,this.zIndex=t,this.data=n}static compareByRenderingProps(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&uo(e.data,t.data)}static equalsArr(e,t){return uo(e,t,i.equals)}}});function BDt(i){return Array.isArray(i)}function PKe(i){return!BDt(i)}function Bfe(i){return typeof i=="string"}function Vfe(i){return!Bfe(i)}function U5(i){return!i}function Zg(i,e){return i.ignoreCase&&e?e.toLowerCase():e}function Wfe(i){return i.replace(/[&<>'"_]/g,"-")}function OKe(i,e){console.log(`${i.languageId}: ${e}`)}function sr(i,e){return new Error(`${i.languageId}: ${e}`)}function Xg(i,e,t,n,o){let r=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,s=null;return e.replace(r,function(a,l,c,d,u,h,f,p,m){return U5(c)?U5(d)?!U5(u)&&u0;){let n=i.tokenizer[t];if(n)return n;let o=t.lastIndexOf(".");o<0?t=null:t=t.substr(0,o)}return null}function zKe(i,e){let t=e;for(;t&&t.length>0;){if(i.stateNames[t])return!0;let o=t.lastIndexOf(".");o<0?t=null:t=t.substr(0,o)}return!1}var Ufe=P(()=>{});function UDt(i,e){if(!e)return null;e=Zg(i,e);let t=i.brackets;for(let n of t){if(n.open===e)return{token:n.token,bracketType:1};if(n.close===e)return{token:n.token,bracketType:-1}}return null}var VDt,WDt,$fe,HKe,$5,Cw,yw,Qg,gI,jfe,qfe,j5,Gfe=P(()=>{nt();Pr();mw();Ufe();er();VDt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},WDt=function(i,e){return function(t,n){e(t,n,i)}},HKe=5,$5=class{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 Cw(e,t);let n=Cw.getStackElementId(e);n.length>0&&(n+="|"),n+=t;let o=this._entries[n];return o||(o=new Cw(e,t),this._entries[n]=o,o)}};$5._INSTANCE=new $5(HKe);Cw=class i{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 i._equals(this,e)}push(e){return $5.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return $5.create(this.parent,e)}},yw=class i{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 i(this.languageId,this.state)}},Qg=class{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 gI(e,t);if(e!==null&&e.depth>=this._maxCacheDepth)return new gI(e,t);let n=Cw.getStackElementId(e),o=this._entries[n];return o||(o=new gI(e,null),this._entries[n]=o,o)}};Qg._INSTANCE=new Qg(HKe);gI=class i{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:Qg.create(this.stack,this.embeddedLanguageData)}equals(e){return!(e instanceof i)||!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)}},jfe=class{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 am(e,t,this._languageId)))}nestedLanguageTokenize(e,t,n,o){let r=n.languageId,s=n.state,a=Eo.get(r);if(!a)return this.enterLanguage(r),this.emit(o,""),s;let l=a.tokenize(e,t,s);if(o!==0)for(let c of l.tokens)this._tokens.push(new am(c.offset+o,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 N3(this._tokens,e)}},qfe=class i{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){let n=this._theme.match(this._currentLanguageId,t)|1024;this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))}static _merge(e,t,n){let o=e!==null?e.length:0,r=t.length,s=n!==null?n.length:0;if(o===0&&r===0&&s===0)return new Uint32Array(0);if(o===0&&r===0)return n;if(r===0&&s===0)return e;let a=new Uint32Array(o+r+s);e!==null&&a.set(e);for(let l=0;l{if(s)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}))}))}getLoadStatus(){let e=[];for(let t in this._embeddedLanguages){let n=Eo.get(t);if(n){if(n instanceof $fe){let o=n.getLoadStatus();o.loaded===!1&&e.push(o.promise)}continue}Eo.isResolved(t)||e.push(Eo.getOrCreate(t))}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(t=>{})}}getInitialState(){let e=$5.create(null,this._lexer.start);return Qg.create(e,null)}tokenize(e,t,n){if(e.length>=this._maxTokenizationLineLength)return pw(this._languageId,n);let o=new jfe,r=this._tokenize(e,t,n,o);return o.finalize(r)}tokenizeEncoded(e,t,n){if(e.length>=this._maxTokenizationLineLength)return sv(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),n);let o=new qfe(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),r=this._tokenize(e,t,n,o);return o.finalize(r)}_tokenize(e,t,n,o){return n.embeddedLanguageData?this._nestedTokenize(e,t,n,0,o):this._myTokenize(e,t,n,0,o)}_findLeavingNestedLanguageOffset(e,t){let n=this._lexer.tokenizer[t.stack.state];if(!n&&(n=mI(this._lexer,t.stack.state),!n))throw sr(this._lexer,"tokenizer state is not defined: "+t.stack.state);let o=-1,r=!1;for(let s of n){if(!Vfe(s.action)||s.action.nextEmbedded!=="@pop")continue;r=!0;let a=s.regex,l=s.regex.source;if(l.substr(0,4)==="^(?:"&&l.substr(l.length-1,1)===")"){let d=(a.ignoreCase?"i":"")+(a.unicode?"u":"");a=new RegExp(l.substr(4,l.length-5),d)}let c=e.search(a);c===-1||c!==0&&s.matchOnlyAtLineStart||(o===-1||c0&&r.nestedLanguageTokenize(a,!1,n.embeddedLanguageData,o);let l=e.substring(s);return this._myTokenize(l,t,n,o+s,r)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,n,o,r){r.enterLanguage(this._languageId);let s=e.length,a=t&&this._lexer.includeLF?e+` -`:e,l=a.length,c=n.embeddedLanguageData,d=n.stack,u=0,h=null,f=!0;for(;f||u=l)break;f=!1;let D=this._lexer.tokenizer[_];if(!D&&(D=mI(this._lexer,_),!D))throw sr(this._lexer,"tokenizer state is not defined: "+_);let E=a.substr(u);for(let A of D)if((u===0||!A.matchOnlyAtLineStart)&&(v=E.match(A.regex),v)){b=v[0],C=A.action;break}}if(v||(v=[""],b=""),C||(u=this._lexer.maxStack)throw sr(this._lexer,"maximum tokenizer stack size reached: ["+d.state+","+d.parent.state+",...]");d=d.push(_)}else if(C.next==="@pop"){if(d.depth<=1)throw sr(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(w));d=d.pop()}else if(C.next==="@popall")d=d.popall();else{let D=Xg(this._lexer,C.next,b,v,_);if(D[0]==="@"&&(D=D.substr(1)),mI(this._lexer,D))d=d.push(D);else throw sr(this._lexer,"trying to set a next state '"+D+"' that is undefined in rule: "+this._safeRuleName(w))}}C.log&&typeof C.log=="string"&&OKe(this._lexer,this._lexer.languageId+": "+Xg(this._lexer,C.log,b,v,_))}if(x===null)throw sr(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(w));let k=D=>{let E=this._languageService.getLanguageIdByLanguageName(D)||this._languageService.getLanguageIdByMimeType(D)||D,A=this._getNestedEmbeddedLanguageData(E);if(u0)throw sr(this._lexer,"groups cannot be nested: "+this._safeRuleName(w));if(v.length!==x.length+1)throw sr(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(w));let D=0;for(let E=1;E{let s=()=>{let a=jDt(i,e,t,n);if(t instanceof j5){let l=t.getLoadStatus();if(l.loaded===!1){l.promise.then(s,r);return}}o(a)};s()})}function BKe(i,e,t){let n=[],r=new Uint32Array(2);r[0]=0,r[1]=33587200;for(let s=0,a=i.length;s")}return n.join("")}function jDt(i,e,t,n){let o=[],r=t.getInitialState();for(let s=0,a=i.length;s"),r=c.endState}return o.join("")}var Kfe,ww,VKe=P(()=>{Vg();Ri();Pr();Yg();av();ap();Gfe();Kfe=td("standaloneColorizer",{createHTML:i=>i}),ww=class{static colorizeElement(e,t,n,o){o=o||{};let r=o.theme||"vs",s=o.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(!s)return console.error("Mode not detected"),Promise.resolve();let a=t.getLanguageIdByMimeType(s)||s;e.setTheme(r);let l=n.firstChild?n.firstChild.nodeValue:"";n.className+=" "+r;let c=d=>{var u;let h=(u=Kfe?.createHTML(d))!==null&&u!==void 0?u:d;n.innerHTML=h};return this.colorize(t,l||"",a,o).then(c,d=>console.error(d))}static async colorize(e,t,n,o){let r=e.languageIdCodec,s=4;o&&typeof o.tabSize=="number"&&(s=o.tabSize),FC(t)&&(t=t.substr(1));let a=Ec(t);if(!e.isRegisteredLanguageId(n))return BKe(a,s,r);let l=await Eo.getOrCreate(n);return l?$Dt(a,s,l,r):BKe(a,s,r)}static colorizeLine(e,t,n,o,r=4){let s=Ed.isBasicASCII(e,t),a=Ed.containsRTL(e,s,n);return _w(new uu(!1,!0,e,!1,s,a,0,o,[],r,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,n=4){let o=e.getLineContent(t);e.tokenization.forceTokenization(t);let s=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(o,e.mightContainNonBasicASCII(),e.mightContainRTL(),s,n)}}});var WKe=P(()=>{});function $Ke(i){q5=document.createElement("div"),q5.className="monaco-aria-container";let e=()=>{let n=document.createElement("div");return n.className="monaco-alert",n.setAttribute("role","alert"),n.setAttribute("aria-atomic","true"),q5.appendChild(n),n};tj=e(),Yfe=e();let t=()=>{let n=document.createElement("div");return n.className="monaco-status",n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),q5.appendChild(n),n};ij=t(),Zfe=t(),i.appendChild(q5)}function Hs(i){q5&&(tj.textContent!==i?(is(Yfe),nj(tj,i)):(is(tj),nj(Yfe,i)))}function hu(i){q5&&(ij.textContent!==i?(is(Zfe),nj(ij,i)):(is(ij),nj(Zfe,i)))}function nj(i,e){is(i),e.length>UKe&&(e=e.substr(0,UKe)),i.textContent=e,i.style.visibility="hidden",i.style.visibility="visible"}var UKe,q5,tj,Yfe,ij,Zfe,Xl=P(()=>{Qt();WKe();UKe=2e4});var xw,rj=P(()=>{_i();xw=vi("markerDecorationsService")});var qDt,GDt,vI,jKe=P(()=>{rj();an();qDt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},GDt=function(i,e){return function(t,n){e(t,n,i)}},vI=class{constructor(e,t){}dispose(){}};vI.ID="editor.contrib.markerDecorations";vI=qDt([GDt(1,xw)],vI);Ii(vI.ID,vI,0)});var qKe=P(()=>{});var Sw,Xfe=P(()=>{nt();Xt();Qt();Sw=class extends ue{constructor(e,t){super(),this._onDidChange=this._register(new ge),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null,t=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()},n=!1,o=!1,r=()=>{if(n&&!o)try{n=!1,o=!0,t()}finally{za(pi(this._referenceDomElement),()=>{o=!1,r()})}};this._resizeObserver=new ResizeObserver(s=>{s&&s[0]&&s[0].contentRect?e={width:s[0].contentRect.width,height:s[0].contentRect.height}:e=null,n=!0,r()}),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let n=0,o=0;t?(n=t.width,o=t.height):this._referenceDomElement&&(n=this._referenceDomElement.clientWidth,o=this._referenceDomElement.clientHeight),n=Math.max(5,n),o=Math.max(5,o),(this._width!==n||this._height!==o)&&(this._width=n,this._height=o,e&&this._onDidChange.fire())}}});function ym(i,e){kw.items.push(new kw(i,e))}function ah(i,e){ym(i,(t,n,o)=>{if(typeof t<"u"){for(let[r,s]of e)if(t===r){o(i,s);return}}})}function GKe(i){kw.items.forEach(e=>e.apply(i))}var kw,KDt,KKe=P(()=>{kw=class i{constructor(e,t){this.key=e,this.migrate=t}apply(e){let t=i._read(e,this.key),n=r=>i._read(e,r),o=(r,s)=>i._write(e,r,s);this.migrate(t,n,o)}static _read(e,t){if(typeof e>"u")return;let n=t.indexOf(".");if(n>=0){let o=t.substring(0,n);return this._read(e[o],t.substring(n+1))}return e[t]}static _write(e,t,n){let o=t.indexOf(".");if(o>=0){let r=t.substring(0,o);e[r]=e[r]||{},this._write(e[r],t.substring(o+1),n);return}e[t]=n}};kw.items=[];ah("wordWrap",[[!0,"on"],[!1,"off"]]);ah("lineNumbers",[[!0,"on"],[!1,"off"]]);ah("cursorBlinking",[["visible","solid"]]);ah("renderWhitespace",[[!0,"boundary"],[!1,"none"]]);ah("renderLineHighlight",[[!0,"line"],[!1,"none"]]);ah("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]);ah("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]);ah("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);ah("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);ah("autoIndent",[[!1,"advanced"],[!0,"full"]]);ah("matchBrackets",[[!0,"always"],[!1,"never"]]);ah("renderFinalNewline",[[!0,"on"],[!1,"off"]]);ah("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]);ah("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]);ah("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]);ym("autoClosingBrackets",(i,e,t)=>{i===!1&&(t("autoClosingBrackets","never"),typeof e("autoClosingQuotes")>"u"&&t("autoClosingQuotes","never"),typeof e("autoSurround")>"u"&&t("autoSurround","never"))});ym("renderIndentGuides",(i,e,t)=>{typeof i<"u"&&(t("renderIndentGuides",void 0),typeof e("guides.indentation")>"u"&&t("guides.indentation",!!i))});ym("highlightActiveIndentGuide",(i,e,t)=>{typeof i<"u"&&(t("highlightActiveIndentGuide",void 0),typeof e("guides.highlightActiveIndentation")>"u"&&t("guides.highlightActiveIndentation",!!i))});KDt={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};ym("suggest.filteredTypes",(i,e,t)=>{if(i&&typeof i=="object"){for(let n of Object.entries(KDt))i[n[0]]===!1&&typeof e(`suggest.${n[1]}`)>"u"&&t(`suggest.${n[1]}`,!1);t("suggest.filteredTypes",void 0)}});ym("quickSuggestions",(i,e,t)=>{if(typeof i=="boolean"){let n=i?"on":"off";t("quickSuggestions",{comments:n,strings:n,other:n})}});ym("experimental.stickyScroll.enabled",(i,e,t)=>{typeof i=="boolean"&&(t("experimental.stickyScroll.enabled",void 0),typeof e("stickyScroll.enabled")>"u"&&t("stickyScroll.enabled",i))});ym("experimental.stickyScroll.maxLineCount",(i,e,t)=>{typeof i=="number"&&(t("experimental.stickyScroll.maxLineCount",void 0),typeof e("stickyScroll.maxLineCount")>"u"&&t("stickyScroll.maxLineCount",i))});ym("codeActionsOnSave",(i,e,t)=>{if(i&&typeof i=="object"){let n=!1,o={};for(let r of Object.entries(i))typeof r[1]=="boolean"?(n=!0,o[r[0]]=r[1]?"explicit":"never"):o[r[0]]=r[1];n&&t("codeActionsOnSave",o)}});ym("codeActionWidget.includeNearbyQuickfixes",(i,e,t)=>{typeof i=="boolean"&&(t("codeActionWidget.includeNearbyQuickfixes",void 0),typeof e("codeActionWidget.includeNearbyQuickFixes")>"u"&&t("codeActionWidget.includeNearbyQuickFixes",i))});ym("lightbulb.enabled",(i,e,t)=>{typeof i=="boolean"&&t("lightbulb.enabled",i?void 0:"off")})});var Qfe,c4,sj=P(()=>{Xt();Qfe=class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new ge,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}},c4=new Qfe});var Ba,G5,Yh=P(()=>{Xi();_i();Ba=vi("accessibilityService"),G5=new Bt("accessibilityModeEnabled",!1)});function XDt(i){let e=0;for(;i;)i=Math.floor(i/10),e++;return e||1}function QDt(){let i="";return!Xu&&!dU&&(i+="no-user-select "),Xu&&(i+="no-minimap-shadow ",i+="enable-user-select "),Wi&&(i+="mac "),i}function YKe(i){let e=Q1(i);return GKe(e),e}var YDt,ZDt,aj,Jfe,e1e,K5,ZKe=P(()=>{Xc();Vi();Xt();nt();Gc();Mn();Xfe();Zue();KKe();sj();Ks();BC();hU();Yh();YDt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},ZDt=function(i,e){return function(t,n){e(t,n,i)}},aj=class extends ue{constructor(e,t,n,o){super(),this._accessibilityService=o,this._onDidChange=this._register(new ge),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new ge),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new nT,this.isSimpleWidget=e,this._containerObserver=this._register(new Sw(n,t.dimension)),this._rawOptions=YKe(t),this._validatedOptions=K5.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(Qc.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(c4.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(xT.onDidChange(()=>this._recomputeOptions())),this._register(R3.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){let e=this._computeOptions(),t=K5.checkEquals(this.options,e);t!==null&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){let e=this._readEnvConfiguration(),t=g5.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),n=this._readFontInfo(t),o={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:n,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:c4.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return K5.computeOptions(this._validatedOptions,o)}_readEnvConfiguration(){return{extraEditorClassName:QDt(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:cm||Aa,pixelRatio:R3.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return xT.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){let t=YKe(e);K5.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=K5.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){let t=XDt(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};aj=YDt([ZDt(3,Ba)],aj);Jfe=class{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}},e1e=class{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}},K5=class i{static validateOptions(e){let t=new Jfe;for(let n of x3){let o=n.name==="_never_"?void 0:e[n.name];t._write(n.id,n.validate(o))}return t}static computeOptions(e,t){let n=new e1e;for(let o of x3)n._write(o.id,o.compute(t,n,e._read(o.id)));return n}static _deepEquals(e,t){if(typeof e!="object"||typeof t!="object"||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)?uo(e,t):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(!i._deepEquals(e[n],t[n]))return!1;return!0}static checkEquals(e,t){let n=[],o=!1;for(let r of x3){let s=!i._deepEquals(e._read(r.id),t._read(r.id));n[r.id]=s,s&&(o=!0)}return o?new SC(n):null}static applyUpdate(e,t){let n=!1;for(let o of x3)if(t.hasOwnProperty(o.name)){let r=o.applyUpdate(e[o.name],t[o.name]);e[o.name]=r.newValue,n=n||r.didChange}return n}}});var Jg,t1e=P(()=>{(function(i){let e={total:0,min:Number.MAX_VALUE,max:0},t={...e},n={...e},o={...e},r=0,s={keydown:0,input:0,render:0};function a(){_(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),s.keydown=1,queueMicrotask(l)}i.onKeyDown=a;function l(){s.keydown===1&&(performance.mark("keydown/end"),s.keydown=2)}function c(){performance.mark("input/start"),s.input=1,y()}i.onBeforeInput=c;function d(){s.input===0&&c(),queueMicrotask(u)}i.onInput=d;function u(){s.input===1&&(performance.mark("input/end"),s.input=2)}function h(){_()}i.onKeyUp=h;function f(){_()}i.onSelectionChange=f;function p(){s.keydown===2&&s.input===2&&s.render===0&&(performance.mark("render/start"),s.render=1,queueMicrotask(m),y())}i.onRenderStart=p;function m(){s.render===1&&(performance.mark("render/end"),s.render=2)}function y(){setTimeout(_)}function _(){s.keydown===2&&s.input===2&&s.render===2&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),v("keydown",e),v("input",t),v("render",n),v("inputlatency",o),r++,b())}function v(x,k){let D=performance.getEntriesByName(x)[0].duration;k.total+=D,k.min=Math.min(k.min,D),k.max=Math.max(k.max,D)}function b(){performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),s.keydown=0,s.input=0,s.render=0}function C(){if(r===0)return;let x={keydown:w(e),input:w(t),render:w(n),total:w(o),sampleCount:r};return S(e),S(t),S(n),S(o),r=0,x}i.getAndClearMeasurements=C;function w(x){return{average:x.total/r,max:x.max,min:x.min}}function S(x){x.total=0,x.min=Number.MAX_VALUE,x.max=0}})(Jg||(Jg={}))});var Jf,Lw=P(()=>{Qt();nt();Jf=class{constructor(){this._hooks=new Ye,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,n,o,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=o,this._onStopCallback=r;let s=e;try{e.setPointerCapture(t),this._hooks.add(Yt(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{s=pi(e)}this._hooks.add(Xe(s,Lt.POINTER_MOVE,a=>{if(a.buttons!==n){this.stopMonitoring(!0);return}a.preventDefault(),this._pointerMoveCallback(a)})),this._hooks.add(Xe(s,Lt.POINTER_UP,a=>this.stopMonitoring(!0)))}}});function fj(i){return`--vscode-${i.replace(/\./g,"-")}`}function ai(i){return`var(${fj(i)})`}function nYe(i,e){return`var(${fj(i)}, ${e})`}function me(i,e,t,n,o){return pj.registerColor(i,e,t,n,o)}function JDt(i,e){var t,n,o,r;switch(i.op){case 0:return(t=Cm(i.value,e))===null||t===void 0?void 0:t.darken(i.factor);case 1:return(n=Cm(i.value,e))===null||n===void 0?void 0:n.lighten(i.factor);case 2:return(o=Cm(i.value,e))===null||o===void 0?void 0:o.transparent(i.factor);case 3:{let s=Cm(i.background,e);return s?(r=Cm(i.value,e))===null||r===void 0?void 0:r.makeOpaque(s):Cm(i.value,e)}case 4:for(let s of i.values){let a=Cm(s,e);if(a)return a}return;case 6:return Cm(e.defines(i.if)?i.then:i.else,e);case 5:{let s=Cm(i.value,e);if(!s)return;let a=Cm(i.background,e);return a?s.isDarkerThan(a)?it.getLighterColor(s,a,i.factor).transparent(i.transparency):it.getDarkerColor(s,a,i.factor).transparent(i.transparency):s.transparent(i.factor*i.transparency)}default:throw P3(i)}}function Q5(i,e){return{op:0,value:i,factor:e}}function km(i,e){return{op:1,value:i,factor:e}}function Ei(i,e){return{op:2,value:i,factor:e}}function Bw(...i){return{op:4,values:i}}function eTt(i,e,t){return{op:6,if:i,then:e,else:t}}function tYe(i,e,t,n){return{op:5,value:i,background:e,factor:t,transparency:n}}function Cm(i,e){if(i!==null){if(typeof i=="string")return i[0]==="#"?it.fromHex(i):e.getColor(i);if(i instanceof it)return i;if(typeof i=="object")return JDt(i,e)}}var n1e,i1e,pj,Ut,w5i,oYe,x5i,wm,fu,Fn,Uo,S5i,k5i,rYe,L5i,E5i,D5i,T5i,I5i,M5i,Zh,Vw,mj,gj,vj,Ww,N5i,Lm,Uw,A5i,sYe,aYe,lYe,cYe,dYe,uYe,hYe,fYe,pYe,xm,mYe,e2,lv,Ew,gYe,Dw,vYe,_Ye,bYe,cj,yYe,_I,CYe,Tw,Iw,Mw,Nw,wYe,R5i,lp,xYe,yI,Ll,Z5,P5i,Ql,X5,SYe,O5i,z5i,Xs,lh,F5i,H5i,B5i,V5i,Fr,cp,e1,kYe,o1e,LYe,EYe,_j,DYe,TYe,IYe,MYe,NYe,d4,AYe,r1e,CI,W5i,RYe,t1,PYe,OYe,t2,zYe,U5i,$5i,j5i,q5i,bI,G5i,bj,K5i,FYe,i2,n2,HYe,BYe,VYe,WYe,lj,Y5i,Z5i,dj,uj,UYe,$Ye,X5i,Q5i,J5i,ebi,jYe,qYe,tbi,ibi,nbi,obi,rbi,sbi,abi,GYe,KYe,YYe,ZYe,o2,Sm,Aw,XYe,QYe,JYe,eZe,tZe,s1e,a1e,iZe,nZe,Xh,wI,lbi,cbi,dbi,oZe,rZe,sZe,aZe,ubi,hbi,Rw,lZe,cZe,dZe,fbi,uZe,pbi,hZe,fZe,mbi,XKe,r2,u4,s2,pZe,mZe,gZe,vZe,_Ze,bZe,yZe,hj,gbi,vbi,_bi,bbi,ybi,Cbi,CZe,wZe,l1e,xZe,wbi,SZe,QKe,JKe,eYe,dp,Fw,Pw,xbi,Ow,Sbi,zw,kbi,Hw,Lbi,Ebi,Dbi,yj,$w,Y5,xI,c1e,kZe,LZe,EZe,DZe,TZe,Tbi,Ibi,Mbi,IZe,MZe,NZe,Nbi,Abi,Rbi,Pbi,Obi,zbi,Fbi,Hbi,AZe,RZe,iYe,pr=P(()=>{um();Qi();sa();Xt();Wt();_$();Ys();n1e={ColorContribution:"base.contributions.colors"},i1e=class{constructor(){this._onDidChangeSchema=new ge,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,n,o=!1,r){let s={id:e,description:n,defaults:t,needsTransparency:o,deprecationMessage:r};this.colorsById[e]=s;let a={type:"string",description:n,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return r&&(a.deprecationMessage=r),o&&(a.pattern="^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",a.patternErrorMessage="This color must be transparent or it will obscure content"),this.colorSchema.properties[e]=a,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map(e=>this.colorsById[e])}resolveDefaultColor(e,t){let n=this.colorsById[e];if(n&&n.defaults){let o=n.defaults[t.type];return Cm(o,t)}}getColorSchema(){return this.colorSchema}toString(){let e=(t,n)=>{let o=t.indexOf(".")===-1?0:1,r=n.indexOf(".")===-1?0:1;return o!==r?o-r:t.localeCompare(n)};return Object.keys(this.colorsById).sort(e).map(t=>`- \`${t}\`: ${this.colorsById[t].description}`).join(` -`)}},pj=new i1e;jn.add(n1e.ColorContribution,pj);Ut=me("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},g("foreground","Overall foreground color. This color is only used if not overridden by a component.")),w5i=me("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},g("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),oYe=me("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},g("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),x5i=me("descriptionForeground",{light:"#717171",dark:Ei(Ut,.7),hcDark:Ei(Ut,.7),hcLight:Ei(Ut,.7)},g("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),wm=me("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},g("iconForeground","The default color for icons in the workbench.")),fu=me("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},g("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),Fn=me("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},g("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),Uo=me("contrastActiveBorder",{light:null,dark:null,hcDark:fu,hcLight:fu},g("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),S5i=me("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},g("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),k5i=me("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:it.black,hcLight:"#292929"},g("textSeparatorForeground","Color for text separators.")),rYe=me("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},g("textLinkForeground","Foreground color for links in text.")),L5i=me("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},g("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),E5i=me("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},g("textPreformatForeground","Foreground color for preformatted text segments.")),D5i=me("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},g("textPreformatBackground","Background color for preformatted text segments.")),T5i=me("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},g("textBlockQuoteBackground","Background color for block quotes in text.")),I5i=me("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:it.white,hcLight:"#292929"},g("textBlockQuoteBorder","Border color for block quotes in text.")),M5i=me("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:it.black,hcLight:"#F2F2F2"},g("textCodeBlockBackground","Background color for code blocks in text.")),Zh=me("widget.shadow",{dark:Ei(it.black,.36),light:Ei(it.black,.16),hcDark:null,hcLight:null},g("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),Vw=me("widget.border",{dark:null,light:null,hcDark:Fn,hcLight:Fn},g("widgetBorder","Border color of widgets such as find/replace inside the editor.")),mj=me("input.background",{dark:"#3C3C3C",light:it.white,hcDark:it.black,hcLight:it.white},g("inputBoxBackground","Input box background.")),gj=me("input.foreground",{dark:Ut,light:Ut,hcDark:Ut,hcLight:Ut},g("inputBoxForeground","Input box foreground.")),vj=me("input.border",{dark:null,light:null,hcDark:Fn,hcLight:Fn},g("inputBoxBorder","Input box border.")),Ww=me("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:Fn,hcLight:Fn},g("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),N5i=me("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},g("inputOption.hoverBackground","Background color of activated options in input fields.")),Lm=me("inputOption.activeBackground",{dark:Ei(fu,.4),light:Ei(fu,.2),hcDark:it.transparent,hcLight:it.transparent},g("inputOption.activeBackground","Background hover color of options in input fields.")),Uw=me("inputOption.activeForeground",{dark:it.white,light:it.black,hcDark:Ut,hcLight:Ut},g("inputOption.activeForeground","Foreground color of activated options in input fields.")),A5i=me("input.placeholderForeground",{light:Ei(Ut,.5),dark:Ei(Ut,.5),hcDark:Ei(Ut,.7),hcLight:Ei(Ut,.7)},g("inputPlaceholderForeground","Input box foreground color for placeholder text.")),sYe=me("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:it.black,hcLight:it.white},g("inputValidationInfoBackground","Input validation background color for information severity.")),aYe=me("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:Ut},g("inputValidationInfoForeground","Input validation foreground color for information severity.")),lYe=me("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:Fn,hcLight:Fn},g("inputValidationInfoBorder","Input validation border color for information severity.")),cYe=me("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:it.black,hcLight:it.white},g("inputValidationWarningBackground","Input validation background color for warning severity.")),dYe=me("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:Ut},g("inputValidationWarningForeground","Input validation foreground color for warning severity.")),uYe=me("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:Fn,hcLight:Fn},g("inputValidationWarningBorder","Input validation border color for warning severity.")),hYe=me("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:it.black,hcLight:it.white},g("inputValidationErrorBackground","Input validation background color for error severity.")),fYe=me("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:Ut},g("inputValidationErrorForeground","Input validation foreground color for error severity.")),pYe=me("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:Fn,hcLight:Fn},g("inputValidationErrorBorder","Input validation border color for error severity.")),xm=me("dropdown.background",{dark:"#3C3C3C",light:it.white,hcDark:it.black,hcLight:it.white},g("dropdownBackground","Dropdown background.")),mYe=me("dropdown.listBackground",{dark:null,light:null,hcDark:it.black,hcLight:it.white},g("dropdownListBackground","Dropdown list background.")),e2=me("dropdown.foreground",{dark:"#F0F0F0",light:Ut,hcDark:it.white,hcLight:Ut},g("dropdownForeground","Dropdown foreground.")),lv=me("dropdown.border",{dark:xm,light:"#CECECE",hcDark:Fn,hcLight:Fn},g("dropdownBorder","Dropdown border.")),Ew=me("button.foreground",{dark:it.white,light:it.white,hcDark:it.white,hcLight:it.white},g("buttonForeground","Button foreground color.")),gYe=me("button.separator",{dark:Ei(Ew,.4),light:Ei(Ew,.4),hcDark:Ei(Ew,.4),hcLight:Ei(Ew,.4)},g("buttonSeparator","Button separator color.")),Dw=me("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},g("buttonBackground","Button background color.")),vYe=me("button.hoverBackground",{dark:km(Dw,.2),light:Q5(Dw,.2),hcDark:Dw,hcLight:Dw},g("buttonHoverBackground","Button background color when hovering.")),_Ye=me("button.border",{dark:Fn,light:Fn,hcDark:Fn,hcLight:Fn},g("buttonBorder","Button border color.")),bYe=me("button.secondaryForeground",{dark:it.white,light:it.white,hcDark:it.white,hcLight:Ut},g("buttonSecondaryForeground","Secondary button foreground color.")),cj=me("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:it.white},g("buttonSecondaryBackground","Secondary button background color.")),yYe=me("button.secondaryHoverBackground",{dark:km(cj,.2),light:Q5(cj,.2),hcDark:null,hcLight:null},g("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),_I=me("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:it.black,hcLight:"#0F4A85"},g("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),CYe=me("badge.foreground",{dark:it.white,light:"#333",hcDark:it.white,hcLight:it.white},g("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),Tw=me("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},g("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),Iw=me("scrollbarSlider.background",{dark:it.fromHex("#797979").transparent(.4),light:it.fromHex("#646464").transparent(.4),hcDark:Ei(Fn,.6),hcLight:Ei(Fn,.4)},g("scrollbarSliderBackground","Scrollbar slider background color.")),Mw=me("scrollbarSlider.hoverBackground",{dark:it.fromHex("#646464").transparent(.7),light:it.fromHex("#646464").transparent(.7),hcDark:Ei(Fn,.8),hcLight:Ei(Fn,.8)},g("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),Nw=me("scrollbarSlider.activeBackground",{dark:it.fromHex("#BFBFBF").transparent(.4),light:it.fromHex("#000000").transparent(.6),hcDark:Fn,hcLight:Fn},g("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),wYe=me("progressBar.background",{dark:it.fromHex("#0E70C0"),light:it.fromHex("#0E70C0"),hcDark:Fn,hcLight:Fn},g("progressBarBackground","Background color of the progress bar that can show for long running operations.")),R5i=me("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},g("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),lp=me("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},g("editorError.foreground","Foreground color of error squigglies in the editor.")),xYe=me("editorError.border",{dark:null,light:null,hcDark:it.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},g("errorBorder","If set, color of double underlines for errors in the editor.")),yI=me("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},g("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Ll=me("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},g("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),Z5=me("editorWarning.border",{dark:null,light:null,hcDark:it.fromHex("#FFCC00").transparent(.8),hcLight:it.fromHex("#FFCC00").transparent(.8)},g("warningBorder","If set, color of double underlines for warnings in the editor.")),P5i=me("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},g("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Ql=me("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},g("editorInfo.foreground","Foreground color of info squigglies in the editor.")),X5=me("editorInfo.border",{dark:null,light:null,hcDark:it.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},g("infoBorder","If set, color of double underlines for infos in the editor.")),SYe=me("editorHint.foreground",{dark:it.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},g("editorHint.foreground","Foreground color of hint squigglies in the editor.")),O5i=me("editorHint.border",{dark:null,light:null,hcDark:it.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},g("hintBorder","If set, color of double underlines for hints in the editor.")),z5i=me("sash.hoverBorder",{dark:fu,light:fu,hcDark:fu,hcLight:fu},g("sashActiveBorder","Border color of active sashes.")),Xs=me("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:it.black,hcLight:it.white},g("editorBackground","Editor background color.")),lh=me("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:it.white,hcLight:Ut},g("editorForeground","Editor default foreground color.")),F5i=me("editorStickyScroll.background",{light:Xs,dark:Xs,hcDark:Xs,hcLight:Xs},g("editorStickyScrollBackground","Background color of sticky scroll in the editor")),H5i=me("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:it.fromHex("#0F4A85").transparent(.1)},g("editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor")),B5i=me("editorStickyScroll.border",{dark:null,light:null,hcDark:Fn,hcLight:Fn},g("editorStickyScrollBorder","Border color of sticky scroll in the editor")),V5i=me("editorStickyScroll.shadow",{dark:Tw,light:Tw,hcDark:Tw,hcLight:Tw},g("editorStickyScrollShadow"," Shadow color of sticky scroll in the editor")),Fr=me("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:it.white},g("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),cp=me("editorWidget.foreground",{dark:Ut,light:Ut,hcDark:Ut,hcLight:Ut},g("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),e1=me("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:Fn,hcLight:Fn},g("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),kYe=me("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},g("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),o1e=me("quickInput.background",{dark:Fr,light:Fr,hcDark:Fr,hcLight:Fr},g("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),LYe=me("quickInput.foreground",{dark:cp,light:cp,hcDark:cp,hcLight:cp},g("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),EYe=me("quickInputTitle.background",{dark:new it(new On(255,255,255,.105)),light:new it(new On(0,0,0,.06)),hcDark:"#000000",hcLight:it.white},g("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),_j=me("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:it.white,hcLight:"#0F4A85"},g("pickerGroupForeground","Quick picker color for grouping labels.")),DYe=me("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:it.white,hcLight:"#0F4A85"},g("pickerGroupBorder","Quick picker color for grouping borders.")),TYe=me("keybindingLabel.background",{dark:new it(new On(128,128,128,.17)),light:new it(new On(221,221,221,.4)),hcDark:it.transparent,hcLight:it.transparent},g("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),IYe=me("keybindingLabel.foreground",{dark:it.fromHex("#CCCCCC"),light:it.fromHex("#555555"),hcDark:it.white,hcLight:Ut},g("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),MYe=me("keybindingLabel.border",{dark:new it(new On(51,51,51,.6)),light:new it(new On(204,204,204,.4)),hcDark:new it(new On(111,195,223)),hcLight:Fn},g("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),NYe=me("keybindingLabel.bottomBorder",{dark:new it(new On(68,68,68,.6)),light:new it(new On(187,187,187,.4)),hcDark:new it(new On(111,195,223)),hcLight:Ut},g("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),d4=me("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},g("editorSelectionBackground","Color of the editor selection.")),AYe=me("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:it.white},g("editorSelectionForeground","Color of the selected text for high contrast.")),r1e=me("editor.inactiveSelectionBackground",{light:Ei(d4,.5),dark:Ei(d4,.5),hcDark:Ei(d4,.7),hcLight:Ei(d4,.5)},g("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),CI=me("editor.selectionHighlightBackground",{light:tYe(d4,Xs,.3,.6),dark:tYe(d4,Xs,.3,.6),hcDark:null,hcLight:null},g("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),W5i=me("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:Uo,hcLight:Uo},g("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),RYe=me("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},g("editorFindMatch","Color of the current search match.")),t1=me("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},g("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),PYe=me("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},g("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),OYe=me("editor.findMatchBorder",{light:null,dark:null,hcDark:Uo,hcLight:Uo},g("editorFindMatchBorder","Border color of the current search match.")),t2=me("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:Uo,hcLight:Uo},g("findMatchHighlightBorder","Border color of the other search matches.")),zYe=me("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:Ei(Uo,.4),hcLight:Ei(Uo,.4)},g("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),U5i=me("searchEditor.findMatchBackground",{light:Ei(t1,.66),dark:Ei(t1,.66),hcDark:t1,hcLight:t1},g("searchEditor.queryMatch","Color of the Search Editor query matches.")),$5i=me("searchEditor.findMatchBorder",{light:Ei(t2,.66),dark:Ei(t2,.66),hcDark:t2,hcLight:t2},g("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches.")),j5i=me("search.resultsInfoForeground",{light:Ut,dark:Ei(Ut,.65),hcDark:Ut,hcLight:Ut},g("search.resultsInfoForeground","Color of the text in the search viewlet's completion message.")),q5i=me("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},g("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),bI=me("editorHoverWidget.background",{light:Fr,dark:Fr,hcDark:Fr,hcLight:Fr},g("hoverBackground","Background color of the editor hover.")),G5i=me("editorHoverWidget.foreground",{light:cp,dark:cp,hcDark:cp,hcLight:cp},g("hoverForeground","Foreground color of the editor hover.")),bj=me("editorHoverWidget.border",{light:e1,dark:e1,hcDark:e1,hcLight:e1},g("hoverBorder","Border color of the editor hover.")),K5i=me("editorHoverWidget.statusBarBackground",{dark:km(bI,.2),light:Q5(bI,.05),hcDark:Fr,hcLight:Fr},g("statusBarBackground","Background color of the editor hover status bar.")),FYe=me("editorLink.activeForeground",{dark:"#4E94CE",light:it.blue,hcDark:it.cyan,hcLight:"#292929"},g("activeLinkForeground","Color of active links.")),i2=me("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:it.white,hcLight:it.black},g("editorInlayHintForeground","Foreground color of inline hints")),n2=me("editorInlayHint.background",{dark:Ei(_I,.1),light:Ei(_I,.1),hcDark:Ei(it.white,.1),hcLight:Ei(_I,.1)},g("editorInlayHintBackground","Background color of inline hints")),HYe=me("editorInlayHint.typeForeground",{dark:i2,light:i2,hcDark:i2,hcLight:i2},g("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),BYe=me("editorInlayHint.typeBackground",{dark:n2,light:n2,hcDark:n2,hcLight:n2},g("editorInlayHintBackgroundTypes","Background color of inline hints for types")),VYe=me("editorInlayHint.parameterForeground",{dark:i2,light:i2,hcDark:i2,hcLight:i2},g("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),WYe=me("editorInlayHint.parameterBackground",{dark:n2,light:n2,hcDark:n2,hcLight:n2},g("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),lj=me("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},g("editorLightBulbForeground","The color used for the lightbulb actions icon.")),Y5i=me("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),Z5i=me("editorLightBulbAi.foreground",{dark:lj,light:lj,hcDark:lj,hcLight:lj},g("editorLightBulbAiForeground","The color used for the lightbulb AI icon.")),dj=new it(new On(155,185,85,.2)),uj=new it(new On(255,0,0,.2)),UYe=me("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},g("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),$Ye=me("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},g("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),X5i=me("diffEditor.insertedLineBackground",{dark:dj,light:dj,hcDark:null,hcLight:null},g("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),Q5i=me("diffEditor.removedLineBackground",{dark:uj,light:uj,hcDark:null,hcLight:null},g("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),J5i=me("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},g("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),ebi=me("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},g("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),jYe=me("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},g("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),qYe=me("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},g("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),tbi=me("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},g("diffEditorInsertedOutline","Outline color for the text that got inserted.")),ibi=me("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},g("diffEditorRemovedOutline","Outline color for text that got removed.")),nbi=me("diffEditor.border",{dark:null,light:null,hcDark:Fn,hcLight:Fn},g("diffEditorBorder","Border color between the two text editors.")),obi=me("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},g("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),rbi=me("diffEditor.unchangedRegionBackground",{dark:"sideBar.background",light:"sideBar.background",hcDark:"sideBar.background",hcLight:"sideBar.background"},g("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor.")),sbi=me("diffEditor.unchangedRegionForeground",{dark:"foreground",light:"foreground",hcDark:"foreground",hcLight:"foreground"},g("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor.")),abi=me("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},g("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor.")),GYe=me("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},g("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),KYe=me("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},g("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),YYe=me("list.focusOutline",{dark:fu,light:fu,hcDark:Uo,hcLight:Uo},g("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),ZYe=me("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},g("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),o2=me("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:it.fromHex("#0F4A85").transparent(.1)},g("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Sm=me("list.activeSelectionForeground",{dark:it.white,light:it.white,hcDark:null,hcLight:null},g("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Aw=me("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},g("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),XYe=me("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:it.fromHex("#0F4A85").transparent(.1)},g("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),QYe=me("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},g("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),JYe=me("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},g("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),eZe=me("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},g("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tZe=me("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},g("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),s1e=me("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:it.white.transparent(.1),hcLight:it.fromHex("#0F4A85").transparent(.1)},g("listHoverBackground","List/Tree background when hovering over items using the mouse.")),a1e=me("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},g("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),iZe=me("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},g("listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),nZe=me("list.dropBetweenBackground",{dark:wm,light:wm,hcDark:null,hcLight:null},g("listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),Xh=me("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:fu,hcLight:fu},g("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),wI=me("list.focusHighlightForeground",{dark:Xh,light:eTt(o2,Xh,"#BBE7FF"),hcDark:Xh,hcLight:Xh},g("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),lbi=me("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},g("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),cbi=me("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},g("listErrorForeground","Foreground color of list items containing errors.")),dbi=me("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},g("listWarningForeground","Foreground color of list items containing warnings.")),oZe=me("listFilterWidget.background",{light:Q5(Fr,0),dark:km(Fr,0),hcDark:Fr,hcLight:Fr},g("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),rZe=me("listFilterWidget.outline",{dark:it.transparent,light:it.transparent,hcDark:"#f38518",hcLight:"#007ACC"},g("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),sZe=me("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:Fn,hcLight:Fn},g("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),aZe=me("listFilterWidget.shadow",{dark:Zh,light:Zh,hcDark:Zh,hcLight:Zh},g("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees.")),ubi=me("list.filterMatchBackground",{dark:t1,light:t1,hcDark:null,hcLight:null},g("listFilterMatchHighlight","Background color of the filtered match.")),hbi=me("list.filterMatchBorder",{dark:t2,light:t2,hcDark:Fn,hcLight:Uo},g("listFilterMatchHighlightBorder","Border color of the filtered match.")),Rw=me("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},g("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),lZe=me("tree.inactiveIndentGuidesStroke",{dark:Ei(Rw,.4),light:Ei(Rw,.4),hcDark:Ei(Rw,.4),hcLight:Ei(Rw,.4)},g("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),cZe=me("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},g("tableColumnsBorder","Table border color between columns.")),dZe=me("tree.tableOddRowsBackground",{dark:Ei(Ut,.04),light:Ei(Ut,.04),hcDark:null,hcLight:null},g("tableOddRowsBackgroundColor","Background color for odd table rows.")),fbi=me("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},g("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized. ")),uZe=me("checkbox.background",{dark:xm,light:xm,hcDark:xm,hcLight:xm},g("checkbox.background","Background color of checkbox widget.")),pbi=me("checkbox.selectBackground",{dark:Fr,light:Fr,hcDark:Fr,hcLight:Fr},g("checkbox.select.background","Background color of checkbox widget when the element it's in is selected.")),hZe=me("checkbox.foreground",{dark:e2,light:e2,hcDark:e2,hcLight:e2},g("checkbox.foreground","Foreground color of checkbox widget.")),fZe=me("checkbox.border",{dark:lv,light:lv,hcDark:lv,hcLight:lv},g("checkbox.border","Border color of checkbox widget.")),mbi=me("checkbox.selectBorder",{dark:wm,light:wm,hcDark:wm,hcLight:wm},g("checkbox.select.border","Border color of checkbox widget when the element it's in is selected.")),XKe=me("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,g("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),r2=me("quickInputList.focusForeground",{dark:Sm,light:Sm,hcDark:Sm,hcLight:Sm},g("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),u4=me("quickInputList.focusIconForeground",{dark:Aw,light:Aw,hcDark:Aw,hcLight:Aw},g("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),s2=me("quickInputList.focusBackground",{dark:Bw(XKe,o2),light:Bw(XKe,o2),hcDark:null,hcLight:null},g("quickInput.listFocusBackground","Quick picker background color for the focused item.")),pZe=me("menu.border",{dark:null,light:null,hcDark:Fn,hcLight:Fn},g("menuBorder","Border color of menus.")),mZe=me("menu.foreground",{dark:e2,light:e2,hcDark:e2,hcLight:e2},g("menuForeground","Foreground color of menu items.")),gZe=me("menu.background",{dark:xm,light:xm,hcDark:xm,hcLight:xm},g("menuBackground","Background color of menu items.")),vZe=me("menu.selectionForeground",{dark:Sm,light:Sm,hcDark:Sm,hcLight:Sm},g("menuSelectionForeground","Foreground color of the selected menu item in menus.")),_Ze=me("menu.selectionBackground",{dark:o2,light:o2,hcDark:o2,hcLight:o2},g("menuSelectionBackground","Background color of the selected menu item in menus.")),bZe=me("menu.selectionBorder",{dark:null,light:null,hcDark:Uo,hcLight:Uo},g("menuSelectionBorder","Border color of the selected menu item in menus.")),yZe=me("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:Fn,hcLight:Fn},g("menuSeparatorBackground","Color of a separator menu item in menus.")),hj=me("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},g("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),gbi=me("toolbar.hoverOutline",{dark:null,light:null,hcDark:Uo,hcLight:Uo},g("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),vbi=me("toolbar.activeBackground",{dark:km(hj,.1),light:Q5(hj,.1),hcDark:null,hcLight:null},g("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),_bi=me("editor.snippetTabstopHighlightBackground",{dark:new it(new On(124,124,124,.3)),light:new it(new On(10,50,100,.2)),hcDark:new it(new On(124,124,124,.3)),hcLight:new it(new On(10,50,100,.2))},g("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),bbi=me("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},g("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),ybi=me("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},g("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),Cbi=me("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new it(new On(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},g("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),CZe=me("breadcrumb.foreground",{light:Ei(Ut,.8),dark:Ei(Ut,.8),hcDark:Ei(Ut,.8),hcLight:Ei(Ut,.8)},g("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),wZe=me("breadcrumb.background",{light:Xs,dark:Xs,hcDark:Xs,hcLight:Xs},g("breadcrumbsBackground","Background color of breadcrumb items.")),l1e=me("breadcrumb.focusForeground",{light:Q5(Ut,.2),dark:km(Ut,.1),hcDark:km(Ut,.1),hcLight:km(Ut,.1)},g("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),xZe=me("breadcrumb.activeSelectionForeground",{light:Q5(Ut,.2),dark:km(Ut,.1),hcDark:km(Ut,.1),hcLight:km(Ut,.1)},g("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),wbi=me("breadcrumbPicker.background",{light:Fr,dark:Fr,hcDark:Fr,hcLight:Fr},g("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),SZe=.5,QKe=it.fromHex("#40C8AE").transparent(SZe),JKe=it.fromHex("#40A6FF").transparent(SZe),eYe=it.fromHex("#606060").transparent(.4),dp=.4,Fw=1,Pw=me("merge.currentHeaderBackground",{dark:QKe,light:QKe,hcDark:null,hcLight:null},g("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),xbi=me("merge.currentContentBackground",{dark:Ei(Pw,dp),light:Ei(Pw,dp),hcDark:Ei(Pw,dp),hcLight:Ei(Pw,dp)},g("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Ow=me("merge.incomingHeaderBackground",{dark:JKe,light:JKe,hcDark:null,hcLight:null},g("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Sbi=me("merge.incomingContentBackground",{dark:Ei(Ow,dp),light:Ei(Ow,dp),hcDark:Ei(Ow,dp),hcLight:Ei(Ow,dp)},g("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),zw=me("merge.commonHeaderBackground",{dark:eYe,light:eYe,hcDark:null,hcLight:null},g("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),kbi=me("merge.commonContentBackground",{dark:Ei(zw,dp),light:Ei(zw,dp),hcDark:Ei(zw,dp),hcLight:Ei(zw,dp)},g("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Hw=me("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},g("mergeBorder","Border color on headers and the splitter in inline merge-conflicts.")),Lbi=me("editorOverviewRuler.currentContentForeground",{dark:Ei(Pw,Fw),light:Ei(Pw,Fw),hcDark:Hw,hcLight:Hw},g("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),Ebi=me("editorOverviewRuler.incomingContentForeground",{dark:Ei(Ow,Fw),light:Ei(Ow,Fw),hcDark:Hw,hcLight:Hw},g("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),Dbi=me("editorOverviewRuler.commonContentForeground",{dark:Ei(zw,Fw),light:Ei(zw,Fw),hcDark:Hw,hcLight:Hw},g("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),yj=me("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},g("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),$w=me("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},g("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Y5=me("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},g("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),xI=me("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},g("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),c1e=me("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},g("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),kZe=me("minimap.infoHighlight",{dark:Ql,light:Ql,hcDark:X5,hcLight:X5},g("minimapInfo","Minimap marker color for infos.")),LZe=me("minimap.warningHighlight",{dark:Ll,light:Ll,hcDark:Z5,hcLight:Z5},g("overviewRuleWarning","Minimap marker color for warnings.")),EZe=me("minimap.errorHighlight",{dark:new it(new On(255,18,18,.7)),light:new it(new On(255,18,18,.7)),hcDark:new it(new On(255,50,50,1)),hcLight:"#B5200D"},g("minimapError","Minimap marker color for errors.")),DZe=me("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},g("minimapBackground","Minimap background color.")),TZe=me("minimap.foregroundOpacity",{dark:it.fromHex("#000f"),light:it.fromHex("#000f"),hcDark:it.fromHex("#000f"),hcLight:it.fromHex("#000f")},g("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),Tbi=me("minimapSlider.background",{light:Ei(Iw,.5),dark:Ei(Iw,.5),hcDark:Ei(Iw,.5),hcLight:Ei(Iw,.5)},g("minimapSliderBackground","Minimap slider background color.")),Ibi=me("minimapSlider.hoverBackground",{light:Ei(Mw,.5),dark:Ei(Mw,.5),hcDark:Ei(Mw,.5),hcLight:Ei(Mw,.5)},g("minimapSliderHoverBackground","Minimap slider background color when hovering.")),Mbi=me("minimapSlider.activeBackground",{light:Ei(Nw,.5),dark:Ei(Nw,.5),hcDark:Ei(Nw,.5),hcLight:Ei(Nw,.5)},g("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),IZe=me("problemsErrorIcon.foreground",{dark:lp,light:lp,hcDark:lp,hcLight:lp},g("problemsErrorIconForeground","The color used for the problems error icon.")),MZe=me("problemsWarningIcon.foreground",{dark:Ll,light:Ll,hcDark:Ll,hcLight:Ll},g("problemsWarningIconForeground","The color used for the problems warning icon.")),NZe=me("problemsInfoIcon.foreground",{dark:Ql,light:Ql,hcDark:Ql,hcLight:Ql},g("problemsInfoIconForeground","The color used for the problems info icon.")),Nbi=me("charts.foreground",{dark:Ut,light:Ut,hcDark:Ut,hcLight:Ut},g("chartsForeground","The foreground color used in charts.")),Abi=me("charts.lines",{dark:Ei(Ut,.5),light:Ei(Ut,.5),hcDark:Ei(Ut,.5),hcLight:Ei(Ut,.5)},g("chartsLines","The color used for horizontal lines in charts.")),Rbi=me("charts.red",{dark:lp,light:lp,hcDark:lp,hcLight:lp},g("chartsRed","The red color used in chart visualizations.")),Pbi=me("charts.blue",{dark:Ql,light:Ql,hcDark:Ql,hcLight:Ql},g("chartsBlue","The blue color used in chart visualizations.")),Obi=me("charts.yellow",{dark:Ll,light:Ll,hcDark:Ll,hcLight:Ll},g("chartsYellow","The yellow color used in chart visualizations.")),zbi=me("charts.orange",{dark:Y5,light:Y5,hcDark:Y5,hcLight:Y5},g("chartsOrange","The orange color used in chart visualizations.")),Fbi=me("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},g("chartsGreen","The green color used in chart visualizations.")),Hbi=me("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},g("chartsPurple","The purple color used in chart visualizations."));AZe="vscode://schemas/workbench-colors",RZe=jn.as(T5.JSONContribution);RZe.registerSchema(AZe,pj.getColorSchema());iYe=new hn(()=>RZe.notifySchemaChanged(AZe),200);pj.onDidChangeSchema(()=>{iYe.isScheduled()||iYe.schedule()})});function Sj(i){let e=Lo(i);return new d1e(e.left,e.top,e.width,e.height)}function kj(i,e,t){let n=e.width/i.offsetWidth,o=e.height/i.offsetHeight,r=(t.x-e.x)/n,s=(t.y-e.y)/o;return new u1e(r,s)}function iTt(i){return i.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}var cv,SI,d1e,u1e,up,Cj,wj,xj,J5,h1e,jw=P(()=>{Qt();Lw();Uh();Qi();nt();pr();cv=class{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(e){return new SI(this.x-e.scrollX,this.y-e.scrollY)}},SI=class{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(e){return new cv(this.clientX+e.scrollX,this.clientY+e.scrollY)}},d1e=class{constructor(e,t,n,o){this.x=e,this.y=t,this.width=n,this.height=o,this._editorPagePositionBrand=void 0}},u1e=class{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}};up=class extends Oa{constructor(e,t,n){super(pi(n),e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new cv(this.posx,this.posy),this.editorPos=Sj(n),this.relativePos=kj(n,this.editorPos,this.pos)}},Cj=class{constructor(e){this._editorViewDomNode=e}_create(e){return new up(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return Xe(e,"contextmenu",n=>{t(this._create(n))})}onMouseUp(e,t){return Xe(e,"mouseup",n=>{t(this._create(n))})}onMouseDown(e,t){return Xe(e,Lt.MOUSE_DOWN,n=>{t(this._create(n))})}onPointerDown(e,t){return Xe(e,Lt.POINTER_DOWN,n=>{t(this._create(n),n.pointerId)})}onMouseLeave(e,t){return Xe(e,Lt.MOUSE_LEAVE,n=>{t(this._create(n))})}onMouseMove(e,t){return Xe(e,"mousemove",n=>t(this._create(n)))}},wj=class{constructor(e){this._editorViewDomNode=e}_create(e){return new up(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return Xe(e,"pointerup",n=>{t(this._create(n))})}onPointerDown(e,t){return Xe(e,Lt.POINTER_DOWN,n=>{t(this._create(n),n.pointerId)})}onPointerLeave(e,t){return Xe(e,Lt.POINTER_LEAVE,n=>{t(this._create(n))})}onPointerMove(e,t){return Xe(e,"pointermove",n=>t(this._create(n)))}},xj=class extends ue{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new Jf),this._keydownListener=null}startMonitoring(e,t,n,o,r){this._keydownListener=go(e.ownerDocument,"keydown",s=>{s.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,s.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(e,t,n,s=>{o(new up(s,!0,this._editorViewDomNode))},s=>{this._keydownListener.dispose(),r(s)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}},J5=class i{constructor(e){this._editor=e,this._instanceId=++i._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new hn(()=>this.garbageCollect(),1e3)}createClassNameRef(e){let t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){let t=this.computeUniqueKey(e),n=this._rules.get(t);if(!n){let o=this._counter++;n=new h1e(t,`dyn-rule-${this._instanceId}-${o}`,k5(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,n)}return n}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(let e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}};J5._idPool=0;h1e=class{constructor(e,t,n,o){this.key=e,this.className=t,this.properties=o,this._referenceCount=0,this._styleElementDisposables=new Ye,this._styleElement=ya(n,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let n=`.${e} {`;for(let o in t){let r=t[o],s;typeof r=="object"?s=ai(r.id):s=r;let a=iTt(o);n+=` + `});function CGe(i,e){return i[e+0]<<0>>>0|i[e+1]<<8>>>0}function wGe(i,e,t){i[t+0]=e&255,e=e>>>8,i[t+1]=e&255}function Kf(i,e){return i[e]*2**24+i[e+1]*2**16+i[e+2]*2**8+i[e+3]}function Yf(i,e,t){i[t+3]=e,e=e>>>8,i[t+2]=e,e=e>>>8,i[t+1]=e,e=e>>>8,i[t]=e}function zhe(i,e){return i[e]}function Fhe(i,e,t){i[t]=e}var yGe,E6i,Ohe,JC,ew=P(()=>{j0();yGe=typeof Buffer<"u",E6i=new bl(()=>new Uint8Array(256)),JC=class i{static wrap(e){return yGe&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new i(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return yGe?this.buffer.toString():(Ohe||(Ohe=new TextDecoder),Ohe.decode(this.buffer))}}});function xGe(){return Bhe||(Bhe=new TextDecoder("UTF-16LE")),Bhe}function WEt(){return Vhe||(Vhe=new TextDecoder("UTF-16BE")),Vhe}function Uhe(){return Whe||(Whe=YV()?xGe():WEt()),Whe}function SGe(i,e,t){let n=new Uint16Array(i.buffer,e,t);return t>0&&(n[0]===65279||n[0]===65534)?UEt(i,e,t):xGe().decode(n)}function UEt(i,e,t){let n=[],o=0;for(let r=0;r{Ri();Mn();ew();qh=class{constructor(e){this._capacity=e|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";let e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return Uhe().decode(e)}_flushBuffer(){let e=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}appendCharCode(e){let t=this._capacity-this._bufferLength;t<=1&&(t===0||Or(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIICharCode(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendString(e){let t=e.length;if(this._bufferLength+t>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let n=0;n[s[0].toLowerCase(),s[1].toLowerCase()]);let t=[];for(let s=0;s{let[l,c]=s,[d,u]=a;return l===d||l===u||c===d||c===u},o=(s,a)=>{let l=Math.min(s,a),c=Math.max(s,a);for(let d=0;d0&&r.push({open:a,close:l})}return r}function kGe(i,e,t,n){for(let o=0,r=e.length;o=0&&n.push(a);for(let a of s.close)a.indexOf(i)>=0&&n.push(a)}}function LGe(i,e){return i.length-e.length}function h$(i){if(i.length<=1)return i;let e=[],t=new Set;for(let n of i)t.has(n)||(e.push(n),t.add(n));return e}function qEt(i,e,t,n){let o=[];o=o.concat(i),o=o.concat(e);for(let r=0,s=o.length;r{Ri();J0();Kt();$he=class i{constructor(e,t,n,o,r,s){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=n,this.close=o,this.forwardRegex=r,this.reversedRegex=s,this._openSet=i._toSet(this.open),this._closeSet=i._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){let t=new Set;for(let n of e)t.add(n);return t}};u$=class{constructor(e,t){this._richEditBracketsBrand=void 0;let n=jEt(t);this.brackets=n.map((o,r)=>new $he(e,r,o.open,o.close,qEt(o.open,o.close,n,r),GEt(o.open,o.close,n,r))),this.forwardRegex=KEt(this.brackets),this.reversedRegex=YEt(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(let o of this.brackets){for(let r of o.open)this.textIsBracket[r]=o,this.textIsOpenBracket[r]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,r.length);for(let r of o.close)this.textIsBracket[r]=o,this.textIsOpenBracket[r]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,r.length)}}};jhe=function(){function i(n){let o=new Uint16Array(n.length),r=0;for(let s=n.length-1;s>=0;s--)o[r++]=n.charCodeAt(s);return Uhe().decode(o)}let e=null,t=null;return function(o){return e!==o&&(e=o,t=i(e)),t}}(),au=class{static _findPrevBracketInText(e,t,n,o){let r=n.match(e);if(!r)return null;let s=n.length-(r.index||0),a=r[0].length,l=o+s;return new O(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,n,o,r){let a=jhe(n).substring(n.length-r,n.length-o);return this._findPrevBracketInText(e,t,a,o)}static findNextBracketInText(e,t,n,o){let r=n.match(e);if(!r)return null;let s=r.index||0,a=r[0].length;if(a===0)return null;let l=o+s;return new O(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,n,o,r){let s=n.substring(o,r);return this.findNextBracketInText(e,t,s,o)}}});var m$,EGe=P(()=>{Vi();D5();p$();m$=class{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(let t of this._richEditBrackets.brackets)for(let n of t.close){let o=n.charAt(n.length-1);e.push(o)}return Oh(e)}onElectricCharacter(e,t,n){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;let o=t.findTokenIndexAtOffset(n-1);if(sp(t.getStandardTokenType(o)))return null;let r=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,n-1)+e,a=au.findPrevBracketInRange(r,1,s,0,s.length);if(!a)return null;let l=s.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[l])return null;let d=t.getActualLineContentBefore(a.startColumn-1);return/^\s*$/.test(d)?{matchOpenBracket:l}:null}}});function g$(i){return i.global&&(i.lastIndex=0),!0}var v$,DGe=P(()=>{v$=class{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&g$(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&g$(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&g$(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&g$(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}}});var _$,TGe=P(()=>{Pi();Ri();q3();_$=class i{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(t=>{let n=i._createOpenBracketRegExp(t[0]),o=i._createCloseBracketRegExp(t[1]);n&&o&&this._brackets.push({open:t[0],openRegExp:n,close:t[1],closeRegExp:o})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,n,o){if(e>=3)for(let r=0,s=this._regExpRules.length;rc.reg?(c.reg.lastIndex=0,c.reg.test(c.text)):!0))return a.action}if(e>=2&&n.length>0&&o.length>0)for(let r=0,s=this._brackets.length;r=2&&n.length>0){for(let r=0,s=this._brackets.length;r"u"?t:r}function NGe(i){return i.replace(/[\[\]]/g,"")}var Ni,er=P(()=>{_i();Ni=vi("configurationService")});var Kn,Ha=P(()=>{_i();Kn=vi("languageService")});var oh,y$=P(()=>{oh=class{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}});function ln(i,e,t){e instanceof oh||(e=new oh(e,[],!!t)),AGe.push([i,e])}function Khe(){return AGe}var AGe,xl=P(()=>{y$();AGe=[]});var rr,K3=P(()=>{rr=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})});function XEt(i){return i.length>0&&i.charAt(i.length-1)==="#"?i.substring(0,i.length-1):i}var T5,Yhe,QEt,C$=P(()=>{Xt();Ys();T5={JSONContribution:"base.contributions.json"};Yhe=class{constructor(){this._onDidChangeSchema=new ge,this.schemasById={}}registerSchema(e,t){this.schemasById[XEt(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}},QEt=new Yhe;jn.add(T5.JSONContribution,QEt)});function KT(i){let e=[];if(e4.test(i)){let t=PGe.exec(i);for(;t?.length;){let n=t[1].trim();n&&e.push(n),t=PGe.exec(i)}}return Oh(e)}function JEt(i){switch(Array.isArray(i)?i[0]:i){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}function eDt(i,e){var t,n,o,r;return i.trim()?e4.test(i)?g("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",i):x$.getConfigurationProperties()[i]!==void 0?g("config.property.duplicate","Cannot register '{0}'. This property is already registered.",i):!((t=e.policy)===null||t===void 0)&&t.name&&x$.getPolicyConfigurations().get((n=e.policy)===null||n===void 0?void 0:n.name)!==void 0?g("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",i,(o=e.policy)===null||o===void 0?void 0:o.name,x$.getPolicyConfigurations().get((r=e.policy)===null||r===void 0?void 0:r.name)):null:g("config.property.empty","Cannot register an empty property")}var Yl,Zhe,Xhe,Qhe,Jhe,efe,w$,GT,RGe,tfe,OGe,PGe,I5,e4,x$,Wg=P(()=>{Vi();Xt();ho();Wt();er();C$();Ys();Yl={Configuration:"base.contributions.configuration"},Zhe={properties:{},patternProperties:{}},Xhe={properties:{},patternProperties:{}},Qhe={properties:{},patternProperties:{}},Jhe={properties:{},patternProperties:{}},efe={properties:{},patternProperties:{}},w$={properties:{},patternProperties:{}},GT="vscode://schemas/settings/resourceLanguage",RGe=jn.as(T5.JSONContribution),tfe=class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new ge,this._onDidUpdateConfiguration=new ge,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:g("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={},RGe.registerSchema(GT,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){let n=new Set;this.doRegisterConfigurations(e,t,n),RGe.registerSchema(GT,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}registerDefaultConfigurations(e){let t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){var n;let o=[];for(let{overrides:r,source:s}of e)for(let a in r)if(t.add(a),e4.test(a)){let l=this.configurationDefaultsOverrides.get(a),c=(n=l?.valuesSources)!==null&&n!==void 0?n:new Map;if(s)for(let f of Object.keys(r[a]))c.set(f,s);let d={...l?.value||{},...r[a]};this.configurationDefaultsOverrides.set(a,{source:s,value:d,valuesSources:c});let u=NGe(a),h={type:"object",default:d,description:g("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",u),$ref:GT,defaultDefaultValue:d,source:qs(s)?void 0:s,defaultValueSource:s};o.push(...KT(a)),this.configurationProperties[a]=h,this.defaultLanguageConfigurationOverridesNode.properties[a]=h}else{this.configurationDefaultsOverrides.set(a,{value:r[a],source:s});let l=this.configurationProperties[a];l&&(this.updatePropertyDefaultValue(a,l),this.updateSchema(a,l))}this.doRegisterOverrideIdentifiers(o)}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(let t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,n){e.forEach(o=>{this.validateAndRegisterProperties(o,t,o.extensionInfo,o.restrictedProperties,void 0,n),this.configurationContributors.push(o),this.registerJSONConfiguration(o)})}validateAndRegisterProperties(e,t=!0,n,o,r=3,s){var a;r=kc(e.scope)?r:e.scope;let l=e.properties;if(l)for(let d in l){let u=l[d];if(t&&eDt(d,u)){delete l[d];continue}if(u.source=n,u.defaultDefaultValue=l[d].default,this.updatePropertyDefaultValue(d,u),e4.test(d)?u.scope=void 0:(u.scope=kc(u.scope)?r:u.scope,u.restricted=kc(u.restricted)?!!o?.includes(d):u.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),s.add(d)}let c=e.allOf;if(c)for(let d of c)this.validateAndRegisterProperties(d,t,n,o,r,s)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){let t=n=>{let o=n.properties;if(o)for(let s in o)this.updateSchema(s,o[s]);let r=n.allOf;r?.forEach(t)};t(e)}updateSchema(e,t){switch(Zhe.properties[e]=t,t.scope){case 1:Xhe.properties[e]=t;break;case 2:Qhe.properties[e]=t;break;case 6:Jhe.properties[e]=t;break;case 3:efe.properties[e]=t;break;case 4:w$.properties[e]=t;break;case 5:w$.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(let e of this.overrideIdentifiers.values()){let t=`[${e}]`,n={type:"object",description:g("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:g("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:GT};this.updatePropertyDefaultValue(t,n),Zhe.properties[t]=n,Xhe.properties[t]=n,Qhe.properties[t]=n,Jhe.properties[t]=n,efe.properties[t]=n,w$.properties[t]=n}}registerOverridePropertyPatternKey(){let e={type:"object",description:g("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:g("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:GT};Zhe.patternProperties[I5]=e,Xhe.patternProperties[I5]=e,Qhe.patternProperties[I5]=e,Jhe.patternProperties[I5]=e,efe.patternProperties[I5]=e,w$.patternProperties[I5]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let n=this.configurationDefaultsOverrides.get(e),o=n?.value,r=n?.source;$l(o)&&(o=t.defaultDefaultValue,r=void 0),$l(o)&&(o=JEt(t.type)),t.default=o,t.defaultValueSource=r}},OGe="\\[([^\\]]+)\\]",PGe=new RegExp(OGe,"g"),I5=`^(${OGe})+$`,e4=new RegExp(I5);x$=new tfe;jn.add(Yl.Configuration,x$)});var tDt,ife,Y3,ra,iDt,Zf=P(()=>{Wt();Xt();Ys();K3();Wg();tDt={ModesRegistry:"editor.modesRegistry"},ife=class{constructor(){this._onDidChangeLanguages=new ge,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,n=this._languages.length;te!==""&&t!=="")}var S$,k$,nfe,ofe,FGe=P(()=>{zue();S$=class{constructor(e,t){this.languageId=e;let n=t.brackets?zGe(t.brackets):[],o=new pT(a=>{let l=new Set;return{info:new nfe(this,a,l),closing:l}}),r=new pT(a=>{let l=new Set,c=new Set;return{info:new ofe(this,a,l,c),opening:l,openingColorized:c}});for(let[a,l]of n){let c=o.get(a),d=r.get(l);c.closing.add(d.info),d.opening.add(c.info)}let s=t.colorizedBracketPairs?zGe(t.colorizedBracketPairs):n.filter(a=>!(a[0]==="<"&&a[1]===">"));for(let[a,l]of s){let c=o.get(a),d=r.get(l);c.closing.add(d.info),d.openingColorized.add(c.info),d.opening.add(c.info)}this._openingBrackets=new Map([...o.cachedValues].map(([a,l])=>[a,l.info])),this._closingBrackets=new Map([...r.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)}};k$=class{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}},nfe=class extends k${constructor(e,t,n){super(e,t),this.openedBrackets=n,this.isOpeningBracket=!0}},ofe=class extends k${constructor(e,t,n,o){super(e,t),this.openingBrackets=n,this.openingColorizedBrackets=o,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]}}});function oDt(i,e,t,n){let o=e.getLanguageConfiguration(i);if(!o){if(!n.isRegisteredLanguageId(i))return new tw(i,{});o=new tw(i,{})}let r=rDt(o.languageId,t),s=VGe([o.underlyingConfig,r]);return new tw(o.languageId,s)}function rDt(i,e){let t=e.getValue(sfe.brackets,{overrideIdentifier:i}),n=e.getValue(sfe.colorizedBracketPairs,{overrideIdentifier:i});return{brackets:BGe(t),colorizedBracketPairs:BGe(n)}}function BGe(i){if(Array.isArray(i))return i.map(e=>{if(!(!Array.isArray(e)||e.length!==2))return[e[0],e[1]]}).filter(e=>!!e)}function D$(i,e,t){let n=i.getLineContent(e),o=yo(n);return o.length>t-1&&(o=o.substring(0,t-1)),o}function Z3(i,e,t){i.tokenization.forceTokenization(e);let n=i.tokenization.getLineTokens(e),o=typeof t>"u"?i.getLineMaxColumn(e)-1:t-1;return G3(n,o)}function VGe(i){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(let t of i)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}var nDt,HGe,YT,An,rfe,sfe,afe,L$,E$,lfe,tw,Kr=P(()=>{Xt();nt();Ri();CC();q3();D5();bGe();EGe();DGe();TGe();p$();_i();er();Ha();xl();Zf();FGe();nDt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},HGe=function(i,e){return function(t,n){e(t,n,i)}},YT=class{constructor(e){this.languageId=e}affects(e){return this.languageId?this.languageId===e:!0}},An=vi("languageConfigurationService"),rfe=class extends ue{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new lfe),this.onDidChangeEmitter=this._register(new ge),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;let n=new Set(Object.values(sfe));this._register(this.configurationService.onDidChangeConfiguration(o=>{let r=o.change.keys.some(a=>n.has(a)),s=o.change.overrides.filter(([a,l])=>l.some(c=>n.has(c))).map(([a])=>a);if(r)this.configurations.clear(),this.onDidChangeEmitter.fire(new YT(void 0));else for(let a of s)this.languageService.isRegisteredLanguageId(a)&&(this.configurations.delete(a),this.onDidChangeEmitter.fire(new YT(a)))})),this._register(this._registry.onDidChange(o=>{this.configurations.delete(o.languageId),this.onDidChangeEmitter.fire(new YT(o.languageId))}))}register(e,t,n){return this._registry.register(e,t,n)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=oDt(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};rfe=nDt([HGe(0,Ni),HGe(1,Kn)],rfe);sfe={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};afe=class{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){let n=new L$(e,t,++this._order);return this._entries.push(n),this._resolved=null,Yt(()=>{for(let o=0;oe.configuration)))}};L$=class{constructor(e,t,n){this.configuration=e,this.priority=t,this.order=n}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}},E$=class{constructor(e){this.languageId=e}},lfe=class extends ue{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new ge),this.onDidChange=this._onDidChange.event,this._register(this.register(ra,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,n=0){let o=this._entries.get(e);o||(o=new afe(e),this._entries.set(e,o));let r=o.register(t,n);return this._onDidChange.fire(new E$(e)),Yt(()=>{r.dispose(),this._onDidChange.fire(new E$(e))})}getLanguageConfiguration(e){let t=this._entries.get(e);return t?.getResolvedConfiguration()||null}},tw=class i{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 _$(this.underlyingConfig):null,this.comments=i._handleComments(this.underlyingConfig),this.characterPair=new QC(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||tT,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new v$(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new S$(e,this.underlyingConfig)}getWordDefinition(){return iT(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new u$(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new m$(this.brackets)),this._electricCharacter}onEnter(e,t,n,o){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,n,o):null}getAutoClosingPairs(){return new d$(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){let t=e.comments;if(!t)return null;let n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){let[o,r]=t.blockComment;n.blockCommentStartToken=o,n.blockCommentEndToken=r}return n}};ln(An,rfe,1)});var gm,WGe=P(()=>{gm=class{constructor(e,t,n,o){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=o}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}});function UGe(i,e,t){return new t4(new T$(i),new T$(e)).ComputeDiff(t).changes}var T$,X3,Q3,I$,t4,ZT=P(()=>{WGe();U3();T$=class{constructor(e){this.source=e}getElements(){let e=this.source,t=new Int32Array(e.length);for(let n=0,o=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new gm(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}},t4=class i{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;let[o,r,s]=i._getElements(e),[a,l,c]=i._getElements(t);this._hasStrings=s&&c,this._originalStringElements=o,this._originalElementsOrHash=r,this._modifiedStringElements=a,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){let t=e.getElements();if(i._isStringArray(t)){let n=new Int32Array(t.length);for(let o=0,r=t.length;o=e&&o>=n&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||n>o){let u;return n<=o?(X3.Assert(e===t+1,"originalStart should only be one more than originalEnd"),u=[new gm(e,0,n,o-n+1)]):e<=t?(X3.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),u=[new gm(e,t-e+1,n,0)]):(X3.Assert(e===t+1,"originalStart should only be one more than originalEnd"),X3.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u}let s=[0],a=[0],l=this.ComputeRecursionPoint(e,t,n,o,s,a,r),c=s[0],d=a[0];if(l!==null)return l;if(!r[0]){let u=this.ComputeDiffRecursive(e,c,n,d,r),h=[];return r[0]?h=[new gm(c+1,t-(c+1)+1,d+1,o-(d+1)+1)]:h=this.ComputeDiffRecursive(c+1,t,d+1,o,r),this.ConcatenateChanges(u,h)}return[new gm(e,t-e+1,n,o-n+1)]}WALKTRACE(e,t,n,o,r,s,a,l,c,d,u,h,f,p,m,y,_,v){let b=null,C=null,w=new I$,S=t,x=n,k=f[0]-y[0]-o,D=-1073741824,E=this.m_forwardHistory.length-1;do{let A=k+e;A===S||A=0&&(c=this.m_forwardHistory[E],e=c[0],S=1,x=c.length-1)}while(--E>=-1);if(b=w.getReverseChanges(),v[0]){let A=f[0]+1,T=y[0]+1;if(b!==null&&b.length>0){let L=b[b.length-1];A=Math.max(A,L.getOriginalEnd()),T=Math.max(T,L.getModifiedEnd())}C=[new gm(A,h-A+1,T,m-T+1)]}else{w=new I$,S=s,x=a,k=f[0]-y[0]-l,D=1073741824,E=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{let A=k+r;A===S||A=d[A+1]?(u=d[A+1]-1,p=u-k-l,u>D&&w.MarkNextChange(),D=u+1,w.AddOriginalElement(u+1,p+1),k=A+1-r):(u=d[A-1],p=u-k-l,u>D&&w.MarkNextChange(),D=u,w.AddModifiedElement(u+1,p+1),k=A-1-r),E>=0&&(d=this.m_reverseHistory[E],r=d[0],S=1,x=d.length-1)}while(--E>=-1);C=w.getChanges()}return this.ConcatenateChanges(b,C)}ComputeRecursionPoint(e,t,n,o,r,s,a){let l=0,c=0,d=0,u=0,h=0,f=0;e--,n--,r[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];let p=t-e+(o-n),m=p+1,y=new Int32Array(m),_=new Int32Array(m),v=o-n,b=t-e,C=e-n,w=t-o,x=(b-v)%2===0;y[v]=e,_[b]=t,a[0]=!1;for(let k=1;k<=p/2+1;k++){let D=0,E=0;d=this.ClipDiagonalBound(v-k,k,v,m),u=this.ClipDiagonalBound(v+k,k,v,m);for(let T=d;T<=u;T+=2){T===d||TD+E&&(D=l,E=c),!x&&Math.abs(T-b)<=k-1&&l>=_[T])return r[0]=l,s[0]=c,L<=_[T]&&k<=1448?this.WALKTRACE(v,d,u,C,b,h,f,w,y,_,l,t,r,c,o,s,x,a):null}let A=(D-e+(E-n)-k)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(D,A))return a[0]=!0,r[0]=D,s[0]=E,A>0&&k<=1448?this.WALKTRACE(v,d,u,C,b,h,f,w,y,_,l,t,r,c,o,s,x,a):(e++,n++,[new gm(e,t-e+1,n,o-n+1)]);h=this.ClipDiagonalBound(b-k,k,b,m),f=this.ClipDiagonalBound(b+k,k,b,m);for(let T=h;T<=f;T+=2){T===h||T=_[T+1]?l=_[T+1]-1:l=_[T-1],c=l-(T-b)-w;let L=l;for(;l>e&&c>n&&this.ElementsAreEqual(l,c);)l--,c--;if(_[T]=l,x&&Math.abs(T-v)<=k&&l<=y[T])return r[0]=l,s[0]=c,L>=y[T]&&k<=1448?this.WALKTRACE(v,d,u,C,b,h,f,w,y,_,l,t,r,c,o,s,x,a):null}if(k<=1447){let T=new Int32Array(u-d+2);T[0]=v-d+1,Q3.Copy2(y,d,T,1,u-d+1),this.m_forwardHistory.push(T),T=new Int32Array(f-h+2),T[0]=b-h+1,Q3.Copy2(_,h,T,1,f-h+1),this.m_reverseHistory.push(T)}}return this.WALKTRACE(v,d,u,C,b,h,f,w,y,_,l,t,r,c,o,s,x,a)}PrettifyChanges(e){for(let t=0;t0,a=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;t--){let n=e[t],o=0,r=0;if(t>0){let u=e[t-1];o=u.originalStart+u.originalLength,r=u.modifiedStart+u.modifiedLength}let s=n.originalLength>0,a=n.modifiedLength>0,l=0,c=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let u=1;;u++){let h=n.originalStart-u,f=n.modifiedStart-u;if(hc&&(c=m,l=u)}n.originalStart-=l,n.modifiedStart-=l;let d=[null];if(t>0&&this.ChangesOverlap(e[t-1],e[t],d)){e[t-1]=d[0],e.splice(t,1),t++;continue}}if(this._hasStrings)for(let t=1,n=e.length;t0&&f>l&&(l=f,c=u,d=h)}return l>0?[c,d]:null}_contiguousSequenceScore(e,t,n){let o=0;for(let r=0;r=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){let n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){let n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,o){let r=this._OriginalRegionIsBoundary(e,t)?1:0,s=this._ModifiedRegionIsBoundary(n,o)?1:0;return r+s}ConcatenateChanges(e,t){let n=[];if(e.length===0||t.length===0)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){let o=new Array(e.length+t.length-1);return Q3.Copy(e,0,o,0,e.length-1),o[e.length-1]=n[0],Q3.Copy(t,1,o,e.length,t.length-1),o}else{let o=new Array(e.length+t.length);return Q3.Copy(e,0,o,0,e.length),Q3.Copy(t,0,o,e.length,t.length),o}}ChangesOverlap(e,t,n){if(X3.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),X3.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){let o=e.originalStart,r=e.originalLength,s=e.modifiedStart,a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new gm(o,r,s,a),!0}else return n[0]=null,!1}ClipDiagonalBound(e,t,n,o){if(e>=0&&e255?255:i|0}function N5(i){return i<0?0:i>4294967295?4294967295:i|0}var XT=P(()=>{});var M$,N$,A$,cfe=P(()=>{Vi();XT();M$=class{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=N5(e);let n=this.values,o=this.prefixSum,r=t.length;return r===0?!1:(this.values=new Uint32Array(n.length+r),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=N5(e),t=N5(t),this.values[e]===t?!1:(this.values[e]=t,e-1=n.length)return!1;let r=n.length-e;return t>=r&&(t=r),t===0?!1:(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=N5(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,o=0,r=0,s=0;for(;t<=n;)if(o=t+(n-t)/2|0,r=this.prefixSum[o],s=r-this.values[o],e=r)t=o+1;else break;return new A$(o,e-s)}},N$=class{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),e===0?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();let t=this._indexBySum[e],n=t>0?this._prefixSum[t-1]:0;return new A$(t,e-n)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=v3(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=o+n;for(let r=0;r{Ri();Mi();cfe();R$=class{constructor(e,t,n,o){this._uri=e,this._lines=t,this._eol=n,this._versionId=o,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);let t=e.changes;for(let n of t)this._acceptDeleteRange(n.range),this._acceptInsertText(new ke(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){let e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let o=0;o{XT();i4=class i{constructor(e){let t=M5(e);this._defaultValue=t,this._asciiMap=i._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);return t.fill(e),t}set(e,t){let n=M5(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}},n4=class{constructor(){this._actual=new i4(0)}add(e){this._actual.set(e,1)}has(e){return this._actual.get(e)===1}clear(){return this._actual.clear()}}});function sDt(){return dfe===null&&(dfe=new hfe([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),dfe}function aDt(){if(QT===null){QT=new i4(0);let i=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let t=0;t{A5();ufe=class{constructor(e,t,n){let o=new Uint8Array(e*t);for(let r=0,s=e*t;rt&&(t=l),a>n&&(n=a),c>n&&(n=c)}t++,n++;let o=new ufe(n,t,0);for(let r=0,s=e.length;r=this._maxCharCode?0:this._states.get(e,t)}},dfe=null;QT=null;ffe=class i{static _createLink(e,t,n,o,r){let s=r-1;do{let a=t.charCodeAt(s);if(e.get(a)!==2)break;s--}while(s>o);if(o>0){let a=t.charCodeAt(o-1),l=t.charCodeAt(s);(a===40&&l===41||a===91&&l===93||a===123&&l===125)&&s--}return{range:{startLineNumber:n,startColumn:o+1,endLineNumber:n,endColumn:s+2},url:t.substring(o,s+1)}}static computeLinks(e,t=sDt()){let n=aDt(),o=[];for(let r=1,s=e.getLineCount();r<=s;r++){let a=e.getLineContent(r),l=a.length,c=0,d=0,u=0,h=1,f=!1,p=!1,m=!1,y=!1;for(;c{iw=class{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(e,t,n,o,r){if(e&&t){let s=this.doNavigateValueSet(t,r);if(s)return{range:e,value:s}}if(n&&o){let s=this.doNavigateValueSet(o,r);if(s)return{range:n,value:s}}return null}doNavigateValueSet(e,t){let n=this.numberReplace(e,t);return n!==null?n:this.textReplace(e,t)}numberReplace(e,t){let n=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),o=Number(e),r=parseFloat(e);return!isNaN(o)&&!isNaN(r)&&o===r?o===0&&!t?null:(o=Math.floor(o*n),o+=t?n:-n,String(o/n)):null}textReplace(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)}valueSetsReplace(e,t,n){let o=null;for(let r=0,s=e.length;o===null&&r=0?(o+=n?1:-1,o<0?o=e.length-1:o%=e.length,e[o]):null}};iw.INSTANCE=new iw});function lDt(i){let e={};return t=>(e.hasOwnProperty(t)||(e[t]=i(t)),e[t])}var pfe,id,nw=P(()=>{A5();pfe=class extends i4{constructor(e){super(0);for(let t=0,n=e.length;tnew pfe(i))});function KGe(i){return i&&typeof i.read=="function"}function z$(i){return!i.isTooLargeForSyncing()&&!i.isForSimpleWidget}var Sl,lu,Zl,Gh,J3,Ug,ow,P$,O$,Ca=P(()=>{Gc();(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=4]="Right",i[i.Full=7]="Full"})(Sl||(Sl={}));(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=3]="Right"})(lu||(lu={}));(function(i){i[i.Inline=1]="Inline",i[i.Gutter=2]="Gutter"})(Zl||(Zl={}));(function(i){i[i.Both=0]="Both",i[i.Right=1]="Right",i[i.Left=2]="Left",i[i.None=3]="None"})(Gh||(Gh={}));J3=class{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,e.tabSize|0),e.indentSize==="tabSize"?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,e.indentSize|0),this._indentSizeIsTabSize=!1),this.insertSpaces=!!e.insertSpaces,this.defaultEOL=e.defaultEOL|0,this.trimAutoWhitespace=!!e.trimAutoWhitespace,this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&Za(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}},Ug=class{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}};ow=class{constructor(e,t,n,o,r,s){this.identifier=e,this.range=t,this.text=n,this.forceMoveMarkers=o,this.isAutoWhitespaceEdit=r,this._isTracked=s}},P$=class{constructor(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}},O$=class{constructor(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}}});function uDt(i){if(!i||i.length===0)return!1;for(let e=0,t=i.length;e=t)break;let o=i.charCodeAt(e);if(o===110||o===114||o===87)return!0}}return!1}function ev(i,e,t){if(!t)return new Ug(i,null);let n=[];for(let o=0,r=e.length;o0){let s=e.charCodeAt(n);if(i.get(s)!==0)return!0}return!1}function fDt(i,e,t,n,o){if(n+o===t)return!0;let r=e.charCodeAt(n+o);if(i.get(r)!==0||r===13||r===10)return!0;if(o>0){let s=e.charCodeAt(n+o-1);if(i.get(s)!==0)return!0}return!1}function H$(i,e,t,n,o){return hDt(i,e,t,n,o)&&fDt(i,e,t,n,o)}var dDt,vm,F$,R5,$g,JT=P(()=>{Ri();nw();Mi();Kt();Ca();dDt=999,vm=class{constructor(e,t,n,o){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=o}parseSearchRequest(){if(this.searchString==="")return null;let e;this.isRegex?e=uDt(this.searchString):e=this.searchString.indexOf(` +`)>=0;let t=null;try{t=sU(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!t)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new P$(t,this.wordSeparators?id(this.wordSeparators):null,n?this.searchString:null)}};F$=class{constructor(e){let t=[],n=0;for(let o=0,r=e.length;o>0);t[r]>=e?o=r-1:t[r+1]>=e?(n=r,o=r):n=r+1}return n+1}},R5=class{static findMatches(e,t,n,o,r){let s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,n,new $g(s.wordSeparators,s.regex),o,r):this._doFindMatchesLineByLine(e,n,s,o,r):[]}static _getMultilineMatchRange(e,t,n,o,r,s){let a,l=0;o?(l=o.findLineFeedCountBeforeOffset(r),a=t+r+l):a=t+r;let c;if(o){let f=o.findLineFeedCountBeforeOffset(r+s.length)-l;c=a+s.length+f}else c=a+s.length;let d=e.getPositionAt(a),u=e.getPositionAt(c);return new O(d.lineNumber,d.column,u.lineNumber,u.column)}static _doFindMatchesMultiline(e,t,n,o,r){let s=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l=e.getEOL()===`\r +`?new F$(a):null,c=[],d=0,u;for(n.reset(0);u=n.next(a);)if(c[d++]=ev(this._getMultilineMatchRange(e,s,a,l,u.index,u[0]),u,o),d>=r)return c;return c}static _doFindMatchesLineByLine(e,t,n,o,r){let s=[],a=0;if(t.startLineNumber===t.endLineNumber){let c=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return a=this._findMatchesInLine(n,c,t.startLineNumber,t.startColumn-1,a,s,o,r),s}let l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);a=this._findMatchesInLine(n,l,t.startLineNumber,t.startColumn-1,a,s,o,r);for(let c=t.startLineNumber+1;c=l))return r;return r}let d=new $g(e.wordSeparators,e.regex),u;d.reset(0);do if(u=d.next(t),u&&(s[r++]=ev(new O(n,u.index+1+o,n,u.index+1+u[0].length+o),u,a),r>=l))return r;while(u);return r}static findNextMatch(e,t,n,o){let r=t.parseSearchRequest();if(!r)return null;let s=new $g(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindNextMatchMultiline(e,n,s,o):this._doFindNextMatchLineByLine(e,n,s,o)}static _doFindNextMatchMultiline(e,t,n,o){let r=new ke(t.lineNumber,1),s=e.getOffsetAt(r),a=e.getLineCount(),l=e.getValueInRange(new O(r.lineNumber,r.column,a,e.getLineMaxColumn(a)),1),c=e.getEOL()===`\r +`?new F$(l):null;n.reset(t.column-1);let d=n.next(l);return d?ev(this._getMultilineMatchRange(e,s,l,c,d.index,d[0]),d,o):t.lineNumber!==1||t.column!==1?this._doFindNextMatchMultiline(e,new ke(1,1),n,o):null}static _doFindNextMatchLineByLine(e,t,n,o){let r=e.getLineCount(),s=t.lineNumber,a=e.getLineContent(s),l=this._findFirstMatchInLine(n,a,s,t.column,o);if(l)return l;for(let c=1;c<=r;c++){let d=(s+c-1)%r,u=e.getLineContent(d+1),h=this._findFirstMatchInLine(n,u,d+1,1,o);if(h)return h}return null}static _findFirstMatchInLine(e,t,n,o,r){e.reset(o-1);let s=e.next(t);return s?ev(new O(n,s.index+1,n,s.index+1+s[0].length),s,r):null}static findPreviousMatch(e,t,n,o){let r=t.parseSearchRequest();if(!r)return null;let s=new $g(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindPreviousMatchMultiline(e,n,s,o):this._doFindPreviousMatchLineByLine(e,n,s,o)}static _doFindPreviousMatchMultiline(e,t,n,o){let r=this._doFindMatchesMultiline(e,new O(1,1,t.lineNumber,t.column),n,o,10*dDt);if(r.length>0)return r[r.length-1];let s=e.getLineCount();return t.lineNumber!==s||t.column!==e.getLineMaxColumn(s)?this._doFindPreviousMatchMultiline(e,new ke(s,e.getLineMaxColumn(s)),n,o):null}static _doFindPreviousMatchLineByLine(e,t,n,o){let r=e.getLineCount(),s=t.lineNumber,a=e.getLineContent(s).substring(0,t.column-1),l=this._findLastMatchInLine(n,a,s,o);if(l)return l;for(let c=1;c<=r;c++){let d=(r+s-c-1)%r,u=e.getLineContent(d+1),h=this._findLastMatchInLine(n,u,d+1,o);if(h)return h}return null}static _findLastMatchInLine(e,t,n,o){let r=null,s;for(e.reset(0);s=e.next(t);)r=ev(new O(n,s.index+1,n,s.index+1+s[0].length),s,o);return r}};$g=class{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){let t=e.length,n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t||(n=this._searchRegex.exec(e),!n))return null;let o=n.index,r=n[0].length;if(o===this._prevMatchStartIndex&&r===this._prevMatchLength){if(r===0){zC(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=o,this._prevMatchLength=r,!this._wordSeparators||H$(this._wordSeparators,e,t,o,r))return n}while(n);return null}}});function pDt(i,e){return`[${va(i.map(n=>String.fromCodePoint(n)).join(""))}]`}function YGe(i){return i===" "||i===` +`||i===" "}var P5,B$,mfe=P(()=>{Kt();JT();Ri();um();CC();P5=class{static computeUnicodeHighlights(e,t,n){let o=n?n.startLineNumber:1,r=n?n.endLineNumber:e.getLineCount(),s=new B$(t),a=s.getCandidateCodePoints(),l;a==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${pDt(Array.from(a))}`,"g");let c=new $g(null,l),d=[],u=!1,h,f=0,p=0,m=0;e:for(let y=o,_=r;y<=_;y++){let v=e.getLineContent(y),b=v.length;c.reset(0);do if(h=c.next(v),h){let C=h.index,w=h.index+h[0].length;if(C>0){let D=v.charCodeAt(C-1);Or(D)&&C--}if(w+1=1e3){u=!0;break e}d.push(new O(y,C+1,y,w+1))}}while(h)}return{ranges:d,hasMore:u,ambiguousCharacterCount:f,invisibleCharacterCount:p,nonBasicAsciiCharacterCount:m}}static computeUnicodeHighlightReason(e,t){let n=new B$(t);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{let r=e.codePointAt(0),s=n.ambiguousCharacters.getPrimaryConfusable(r),a=Ig.getLocales().filter(l=>!Ig.getInstance(new Set([...t.allowedLocales,l])).isAmbiguous(r));return{kind:0,confusableWith:String.fromCodePoint(s),notAmbiguousInLocales:a}}case 1:return{kind:2}}}};B$=class{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=Ig.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";let e=new Set;if(this.options.invisibleCharacters)for(let t of Mg.codePoints)YGe(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(let t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(let t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){let n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let o=!1,r=!1;if(t)for(let s of t){let a=s.codePointAt(0),l=Ag(s);o=o||l,!l&&!this.ambiguousCharacters.isAmbiguous(a)&&!Mg.isInvisibleCharacter(a)&&(r=!0)}return!o&&r?0:this.options.invisibleCharacters&&!YGe(e)&&Mg.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}});var tv,rw,V$=P(()=>{tv=class{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}},rw=class{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}});var Pn,W$,Xf=P(()=>{Pi();Pn=class i{static addRange(e,t){let n=0;for(;nt)throw new fo(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new i(this.start+e,this.endExclusive+e)}deltaStart(e){return new i(this.start+e,this.endExclusive)}deltaEnd(e){return new i(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new fo(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new fo(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;te.toString()).join(", ")}intersectsStrict(e){let t=0;for(;te+t.length,0)}}});function o4(i,e,t){let n=mDt(i,e);if(n!==-1)return i[n]}function mDt(i,e,t=i.length-1){for(let n=t;n>=0;n--){let o=i[n];if(e(o))return n}return-1}function r4(i,e){let t=O5(i,e);return t===-1?void 0:i[t]}function O5(i,e,t=0,n=i.length){let o=t,r=n;for(;o0&&(t=o)}return t}function XGe(i,e){if(i.length===0)return;let t=i[0];for(let n=1;n=0&&(t=o)}return t}function QGe(i,e){return eI(i,(t,n)=>-e(t,n))}function JGe(i,e){if(i.length===0)return-1;let t=0;for(let n=1;n0&&(t=n)}return t}function eKe(i,e){for(let t of i){let n=e(t);if(n!==void 0)return n}}var sw,rh=P(()=>{sw=class i{constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(i.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!e(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}let t=O5(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=t+1,t===-1?void 0:this._array[t]}};sw.assertInvariants=!1});var rn,_m,sh=P(()=>{Pi();Xf();Kt();rh();rn=class i{static fromRangeInclusive(e){return new i(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(e.length===0)return[];let t=new _m(e[0].slice());for(let n=1;nt)throw new fo(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&eo.endLineNumberExclusive>=e.startLineNumber),n=O5(this._normalizedRanges,o=>o.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){let o=this._normalizedRanges[t];this._normalizedRanges[t]=o.join(e)}else{let o=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,o)}}contains(e){let t=r4(this._normalizedRanges,n=>n.startLineNumber<=e);return!!t&&t.endLineNumberExclusive>e}intersects(e){let t=r4(this._normalizedRanges,n=>n.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;let t=[],n=0,o=0,r=null;for(;n=s.startLineNumber?r=new rn(r.startLineNumber,Math.max(r.endLineNumberExclusive,s.endLineNumberExclusive)):(t.push(r),r=s)}return r!==null&&t.push(r),new i(t)}subtractFrom(e){let t=iv(this._normalizedRanges,s=>s.endLineNumberExclusive>=e.startLineNumber),n=O5(this._normalizedRanges,s=>s.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)return new i([e]);let o=[],r=e.startLineNumber;for(let s=t;sr&&o.push(new rn(r,a.startLineNumber)),r=a.endLineNumberExclusive}return re.toString()).join(", ")}getIntersection(e){let t=[],n=0,o=0;for(;nt.delta(e)))}}});var cu,du,Qf,nv=P(()=>{sh();cu=class i{static inverse(e,t,n){let o=[],r=1,s=1;for(let l of e){let c=new i(new rn(r,l.original.startLineNumber),new rn(s,l.modified.startLineNumber));c.modified.isEmpty||o.push(c),r=l.original.endLineNumberExclusive,s=l.modified.endLineNumberExclusive}let a=new i(new rn(r,t+1),new rn(s,n+1));return a.modified.isEmpty||o.push(a),o}static clip(e,t,n){let o=[];for(let r of e){let s=r.original.intersect(t),a=r.modified.intersect(n);s&&!s.isEmpty&&a&&!a.isEmpty&&o.push(new i(s,a))}return o}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new i(this.modified,this.original)}join(e){return new i(this.original.join(e.original),this.modified.join(e.modified))}},du=class i extends cu{constructor(e,t,n){super(e,t),this.innerChanges=n}flip(){var e;return new i(this.modified,this.original,(e=this.innerChanges)===null||e===void 0?void 0:e.map(t=>t.flip()))}},Qf=class i{constructor(e,t){this.originalRange=e,this.modifiedRange=t}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new i(this.modifiedRange,this.originalRange)}}});function iKe(i,e,t,n){return new t4(i,e,t).ComputeDiff(n)}function vDt(i){if(i.length<=1)return i;let e=[i[0]],t=e[0];for(let n=1,o=i.length;n!0;let e=Date.now();return()=>Date.now()-e{ZT();V$();nv();Ri();Kt();um();sh();gDt=3,U$=class{computeDiff(e,t,n){var o;let s=new vfe(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),a=[],l=null;for(let c of s.changes){let d;c.originalEndLineNumber===0?d=new rn(c.originalStartLineNumber+1,c.originalStartLineNumber+1):d=new rn(c.originalStartLineNumber,c.originalEndLineNumber+1);let u;c.modifiedEndLineNumber===0?u=new rn(c.modifiedStartLineNumber+1,c.modifiedStartLineNumber+1):u=new rn(c.modifiedStartLineNumber,c.modifiedEndLineNumber+1);let h=new du(d,u,(o=c.charChanges)===null||o===void 0?void 0:o.map(f=>new Qf(new O(f.originalStartLineNumber,f.originalStartColumn,f.originalEndLineNumber,f.originalEndColumn),new O(f.modifiedStartLineNumber,f.modifiedStartColumn,f.modifiedEndLineNumber,f.modifiedEndColumn))));l&&(l.modified.endLineNumberExclusive===h.modified.startLineNumber||l.original.endLineNumberExclusive===h.original.startLineNumber)&&(h=new du(l.original.join(h.original),l.modified.join(h.modified),l.innerChanges&&h.innerChanges?l.innerChanges.concat(h.innerChanges):void 0),a.pop()),a.push(h),l=h}return zg(()=>NU(a,(c,d)=>d.original.startLineNumber-c.original.endLineNumberExclusive===d.modified.startLineNumber-c.modified.endLineNumberExclusive&&c.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}},aw=class i{constructor(e,t,n,o,r,s,a,l){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=o,this.modifiedStartLineNumber=r,this.modifiedStartColumn=s,this.modifiedEndLineNumber=a,this.modifiedEndColumn=l}static createFromDiffChange(e,t,n){let o=t.getStartLineNumber(e.originalStart),r=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),a=t.getEndColumn(e.originalStart+e.originalLength-1),l=n.getStartLineNumber(e.modifiedStart),c=n.getStartColumn(e.modifiedStart),d=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),u=n.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new i(o,r,s,a,l,c,d,u)}};tI=class i{constructor(e,t,n,o,r){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=o,this.charChanges=r}static createFromDiffResult(e,t,n,o,r,s,a){let l,c,d,u,h;if(t.originalLength===0?(l=n.getStartLineNumber(t.originalStart)-1,c=0):(l=n.getStartLineNumber(t.originalStart),c=n.getEndLineNumber(t.originalStart+t.originalLength-1)),t.modifiedLength===0?(d=o.getStartLineNumber(t.modifiedStart)-1,u=0):(d=o.getStartLineNumber(t.modifiedStart),u=o.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),s&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&r()){let f=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),p=o.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(f.getElements().length>0&&p.getElements().length>0){let m=iKe(f,p,r,!0).changes;a&&(m=vDt(m)),h=[];for(let y=0,_=m.length;y<_;y++)h.push(aw.createFromDiffChange(m[y],f,p))}}return new i(l,c,d,u,h)}},vfe=class{constructor(e,t,n){this.shouldComputeCharChanges=n.shouldComputeCharChanges,this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=n.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new $$(e),this.modified=new $$(t),this.continueLineDiff=tKe(n.maxComputationTime),this.continueCharDiff=tKe(n.maxComputationTime===0?0:Math.min(n.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:void 0}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:void 0}]};let e=iKe(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,n=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){let a=[];for(let l=0,c=t.length;l1&&m>1;){let y=h.charCodeAt(p-2),_=f.charCodeAt(m-2);if(y!==_)break;p--,m--}(p>1||m>1)&&this._pushTrimWhitespaceCharChange(o,r+1,1,p,s+1,1,m)}{let p=bfe(h,1),m=bfe(f,1),y=h.length+1,_=f.length+1;for(;p{Vi();Pi();Xf();jg=class i{static trivial(e,t){return new i([new kl(Pn.ofLength(e.length),Pn.ofLength(t.length))],!1)}static trivialTimedOut(e,t){return new i([new kl(Pn.ofLength(e.length),Pn.ofLength(t.length))],!0)}constructor(e,t){this.diffs=e,this.hitTimeout=t}},kl=class i{static invert(e,t){let n=[];return HV(e,(o,r)=>{n.push(i.fromOffsetPairs(o?o.getEndExclusives():Kh.zero,r?r.getStarts():new Kh(t,(o?o.seq2Range.endExclusive-o.seq1Range.endExclusive:0)+t)))}),n}static fromOffsetPairs(e,t){return new i(new Pn(e.offset1,t.offset1),new Pn(e.offset2,t.offset2))}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new i(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new i(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new i(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new i(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new i(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){let t=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(!(!t||!n))return new i(t,n)}getStarts(){return new Kh(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new Kh(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}},Kh=class i{constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return e===0?this:new i(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}};Kh.zero=new Kh(0,0);Kh.max=new Kh(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);qg=class{isValid(){return!0}};qg.instance=new qg;j$=class{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new fo("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime{cw=class{constructor(e,t){this.width=e,this.height=t,this.array=[],this.array=new Array(e*t)}get(e,t){return this.array[e+t*this.width]}set(e,t,n){this.array[e+t*this.width]=n}};dw=class i{static getKey(e){let t=this.chrKeys.get(e);return t===void 0&&(t=this.chrKeys.size,this.chrKeys.set(e,t)),t}constructor(e,t,n){this.range=e,this.lines=t,this.source=n,this.histogram=[];let o=0;for(let r=e.startLineNumber-1;r{Xf();lw();q$();G$=class{compute(e,t,n=qg.instance,o){if(e.length===0||t.length===0)return jg.trivial(e,t);let r=new cw(e.length,t.length),s=new cw(e.length,t.length),a=new cw(e.length,t.length);for(let p=0;p0&&m>0&&s.get(p-1,m-1)===3&&(v+=a.get(p-1,m-1)),v+=o?o(p,m):1):v=-1;let b=Math.max(y,_,v);if(b===v){let C=p>0&&m>0?a.get(p-1,m-1):0;a.set(p,m,C+1),s.set(p,m,3)}else b===y?(a.set(p,m,0),s.set(p,m,1)):b===_&&(a.set(p,m,0),s.set(p,m,2));r.set(p,m,b)}let l=[],c=e.length,d=t.length;function u(p,m){(p+1!==c||m+1!==d)&&l.push(new kl(new Pn(p+1,c),new Pn(m+1,d))),c=p,d=m}let h=e.length-1,f=t.length-1;for(;h>=0&&f>=0;)s.get(h,f)===3?(u(h,f),h--,f--):s.get(h,f)===1?h--:f--;return u(-1,-1),l.reverse(),new jg(l,!1)}}});var uw,K$,yfe,Cfe,wfe=P(()=>{Xf();lw();uw=class{compute(e,t,n=qg.instance){if(e.length===0||t.length===0)return jg.trivial(e,t);let o=e,r=t;function s(m,y){for(;mo.length||w>r.length)continue;let S=s(C,w);l.set(d,S);let x=C===v?c.get(d+1):c.get(d-1);if(c.set(d,S!==C?new K$(x,C,w,S-C):x),l.get(d)===o.length&&l.get(d)-d===r.length)break e}}let u=c.get(d),h=[],f=o.length,p=r.length;for(;;){let m=u?u.x+u.length:0,y=u?u.y+u.length:0;if((m!==f||y!==p)&&h.push(new kl(new Pn(m,f),new Pn(y,p))),!u)break;f=u.x,p=u.y,u=u.prev}return h.reverse(),new jg(h,!1)}},K$=class{constructor(e,t,n,o){this.prev=e,this.x=t,this.y=n,this.length=o}},yfe=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){let n=this.negativeArr;this.negativeArr=new Int32Array(n.length*2),this.negativeArr.set(n)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){let n=this.positiveArr;this.positiveArr=new Int32Array(n.length*2),this.positiveArr.set(n)}this.positiveArr[e]=t}}},Cfe=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}});function _Dt(i){return Array.isArray(i)}var rKe,sKe,xfe,rs,Sfe,nd,Y$,ov,od=P(()=>{xfe=class{constructor(e,t){this.uri=e,this.value=t}};rs=class i{constructor(e,t){if(this[rKe]="ResourceMap",e instanceof i)this.map=new Map(e.map),this.toKey=t??i.defaultToKey;else if(_Dt(e)){this.map=new Map,this.toKey=t??i.defaultToKey;for(let[n,o]of e)this.set(n,o)}else this.map=new Map,this.toKey=e??i.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new xfe(e,t)),this}get(e){var t;return(t=this.map.get(this.toKey(e)))===null||t===void 0?void 0:t.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){typeof t<"u"&&(e=e.bind(t));for(let[n,o]of this.map)e(o.value,o.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(rKe=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}};rs.defaultToKey=i=>i.toString();Sfe=class{constructor(){this[sKe]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return(e=this._head)===null||e===void 0?void 0:e.value}get last(){var e;return(e=this._tail)===null||e===void 0?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){let n=this._map.get(e);if(n)return t!==0&&this.touch(n,t),n.value}set(e,t,n=0){let o=this._map.get(e);if(o)o.value=t,n!==0&&this.touch(o,n);else{switch(o={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(o);break;case 1:this.addItemFirst(o);break;case 2:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._state,o=this._head;for(;o;){if(t?e.bind(t)(o.value,o.key,this):e(o.value,o.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let e=this,t=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let r={value:n.key,done:!1};return n=n.next,r}else return{value:void 0,done:!0}}};return o}values(){let e=this,t=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let r={value:n.value,done:!1};return n=n.next,r}else return{value:void 0,done:!0}}};return o}entries(){let e=this,t=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let r={value:[n.key,n.value],done:!1};return n=n.next,r}else return{value:void 0,done:!0}}};return o}[(sKe=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==1&&t!==2)){if(t===1){if(e===this._head)return;let n=e.next,o=e.previous;e===this._tail?(o.next=void 0,this._tail=o):(n.previous=o,o.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===2){if(e===this._tail)return;let n=e.next,o=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=o,o.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(let[t,n]of e)this.set(t,n)}},nd=class extends Sfe{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}},Y$=class{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(let[t,n]of e)this.set(t,n)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){let t=this._m1.get(e);return t===void 0?!1:(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}},ov=class{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){let n=this.map.get(e);n&&(n.delete(t),n.size===0&&this.map.delete(e))}forEach(e,t){let n=this.map.get(e);n&&n.forEach(t)}get(e){let t=this.map.get(e);return t||new Set}}});function kfe(i){return i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57}function aKe(i){return bDt[i]}function lKe(i){return i===10?8:i===13?7:iI(i)?6:i>=97&&i<=122?0:i>=65&&i<=90?1:i>=48&&i<=57?2:i===-1?3:i===44||i===59?5:4}var rv,bDt,Lfe=P(()=>{rh();Xf();Mi();Kt();q$();rv=class{constructor(e,t,n){this.lines=e,this.considerWhitespaceChanges=n,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let o=!1;t.start>0&&t.endExclusive>=e.length&&(t=new Pn(t.start-1,t.endExclusive),o=!0),this.lineRange=t,this.firstCharOffsetByLine[0]=0;for(let r=this.lineRange.start;rString.fromCharCode(t)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){let t=lKe(e>0?this.elements[e-1]:-1),n=lKe(en<=e);return new ke(this.lineRange.start+t+1,e-this.firstCharOffsetByLine[t]+this.additionalOffsetByLine[t]+1)}translateRange(e){return O.fromPositions(this.translateOffset(e.start),this.translateOffset(e.endExclusive))}findWordContaining(e){if(e<0||e>=this.elements.length||!kfe(this.elements[e]))return;let t=e;for(;t>0&&kfe(this.elements[t-1]);)t--;let n=e;for(;ns<=e.start))!==null&&t!==void 0?t:0,r=(n=ZGe(this.firstCharOffsetByLine,s=>e.endExclusive<=s))!==null&&n!==void 0?n:this.elements.length;return new Pn(o,r)}};bDt={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10}});function dKe(i,e,t,n,o,r){let{moves:s,excludedChanges:a}=CDt(i,e,t,r);if(!r.isValid())return[];let l=i.filter(d=>!a.has(d)),c=wDt(l,n,o,e,t,r);return ZD(s,c),s=xDt(s),s=s.filter(d=>{let u=d.original.toOffsetRange().slice(e).map(f=>f.trim());return u.join(` +`).length>=15&&yDt(u,f=>f.length>=2)>=2}),s=SDt(i,s),s}function yDt(i,e){let t=0;for(let n of i)e(n)&&t++;return t}function CDt(i,e,t,n){let o=[],r=i.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new dw(l.original,e,l)),s=new Set(i.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new dw(l.modified,t,l))),a=new Set;for(let l of r){let c=-1,d;for(let u of s){let h=l.computeSimilarity(u);h>c&&(c=h,d=u)}if(c>.9&&d&&(s.delete(d),o.push(new cu(l.range,d.range)),a.add(l.source),a.add(d.source)),!n.isValid())return{moves:o,excludedChanges:a}}return{moves:o,excludedChanges:a}}function wDt(i,e,t,n,o,r){let s=[],a=new ov;for(let h of i)for(let f=h.original.startLineNumber;fh.modified.startLineNumber,Nf));for(let h of i){let f=[];for(let p=h.modified.startLineNumber;p{for(let C of f)if(C.originalLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive&&C.modifiedLineRange.endLineNumberExclusive+1===y.endLineNumberExclusive){C.originalLineRange=new rn(C.originalLineRange.startLineNumber,v.endLineNumberExclusive),C.modifiedLineRange=new rn(C.modifiedLineRange.startLineNumber,y.endLineNumberExclusive),_.push(C);return}let b={modifiedLineRange:y,originalLineRange:v};l.push(b),_.push(b)}),f=_}if(!r.isValid())return[]}l.sort(WV(Sc(h=>h.modifiedLineRange.length,Nf)));let c=new _m,d=new _m;for(let h of l){let f=h.modifiedLineRange.startLineNumber-h.originalLineRange.startLineNumber,p=c.subtractFrom(h.modifiedLineRange),m=d.subtractFrom(h.originalLineRange).getWithDelta(f),y=p.getIntersection(m);for(let _ of y.ranges){if(_.length<3)continue;let v=_,b=_.delta(-f);s.push(new cu(b,v)),c.addRange(v),d.addRange(b)}}s.sort(Sc(h=>h.original.startLineNumber,Nf));let u=new sw(i);for(let h=0;hS.original.startLineNumber<=f.original.startLineNumber),m=r4(i,S=>S.modified.startLineNumber<=f.modified.startLineNumber),y=Math.max(f.original.startLineNumber-p.original.startLineNumber,f.modified.startLineNumber-m.modified.startLineNumber),_=u.findLastMonotonous(S=>S.original.startLineNumberS.modified.startLineNumbern.length||x>o.length||c.contains(x)||d.contains(S)||!cKe(n[S-1],o[x-1],r))break}C>0&&(d.addRange(new rn(f.original.startLineNumber-C,f.original.startLineNumber)),c.addRange(new rn(f.modified.startLineNumber-C,f.modified.startLineNumber)));let w;for(w=0;wn.length||x>o.length||c.contains(x)||d.contains(S)||!cKe(n[S-1],o[x-1],r))break}w>0&&(d.addRange(new rn(f.original.endLineNumberExclusive,f.original.endLineNumberExclusive+w)),c.addRange(new rn(f.modified.endLineNumberExclusive,f.modified.endLineNumberExclusive+w))),(C>0||w>0)&&(s[h]=new cu(new rn(f.original.startLineNumber-C,f.original.endLineNumberExclusive+w),new rn(f.modified.startLineNumber-C,f.modified.endLineNumberExclusive+w)))}return s}function cKe(i,e,t){if(i.trim()===e.trim())return!0;if(i.length>300&&e.length>300)return!1;let o=new uw().compute(new rv([i],new Pn(0,1),!1),new rv([e],new Pn(0,1),!1),t),r=0,s=kl.invert(o.diffs,i.length);for(let d of s)d.seq1Range.forEach(u=>{iI(i.charCodeAt(u))||r++});function a(d){let u=0;for(let h=0;he.length?i:e);return r/l>.6&&l>10}function xDt(i){if(i.length===0)return i;i.sort(Sc(t=>t.original.startLineNumber,Nf));let e=[i[0]];for(let t=1;t=0&&s>=0&&r+s<=2){e[e.length-1]=n.join(o);continue}e.push(o)}return e}function SDt(i,e){let t=new sw(i);return e=e.filter(n=>{let o=t.findLastMonotonous(a=>a.original.startLineNumbera.modified.startLineNumber{lw();nv();Vi();rh();od();sh();Xf();Lfe();q$();wfe()});function nI(i,e,t){let n=t;return n=hKe(i,e,n),n=hKe(i,e,n),n=kDt(i,e,n),n}function hKe(i,e,t){if(t.length===0)return t;let n=[];n.push(t[0]);for(let r=1;r0&&(a=a.delta(c))}o.push(a)}return n.length>0&&o.push(n[n.length-1]),o}function kDt(i,e,t){if(!i.getBoundaryScore||!e.getBoundaryScore)return t;for(let n=0;n0?t[n-1]:void 0,r=t[n],s=n+1=n.start&&i.seq2Range.start-s>=o.start&&t.isStronglyEqual(i.seq2Range.start-s,i.seq2Range.endExclusive-s)&&s<100;)s++;s--;let a=0;for(;i.seq1Range.start+ac&&(c=p,l=d)}return i.delta(l)}function pKe(i,e,t){let n=[];for(let o of t){let r=n[n.length-1];if(!r){n.push(o);continue}o.seq1Range.start-r.seq1Range.endExclusive<=2||o.seq2Range.start-r.seq2Range.endExclusive<=2?n[n.length-1]=new kl(r.seq1Range.join(o.seq1Range),r.seq2Range.join(o.seq2Range)):n.push(o)}return n}function mKe(i,e,t){let n=kl.invert(t,i.length),o=[],r=new Kh(0,0);function s(l,c){if(l.offset10;){let y=n[0];if(!(y.seq1Range.intersects(d)||y.seq2Range.intersects(u)))break;let v=i.findWordContaining(y.seq1Range.start),b=e.findWordContaining(y.seq2Range.start),C=new kl(v,b),w=C.intersect(y);if(p+=w.seq1Range.length,m+=w.seq2Range.length,h=h.join(C),h.seq1Range.endExclusive>=y.seq1Range.endExclusive)n.shift();else break}p+m<(h.seq1Range.length+h.seq2Range.length)*2/3&&o.push(h),r=h.getEndExclusives()}for(;n.length>0;){let l=n.shift();l.seq1Range.isEmpty||(s(l.getStarts(),l),s(l.getEndExclusives().delta(-1),l))}return LDt(t,o)}function LDt(i,e){let t=[];for(;i.length>0||e.length>0;){let n=i[0],o=e[0],r;n&&(!o||n.seq1Range.start0&&t[t.length-1].seq1Range.endExclusive>=r.seq1Range.start?t[t.length-1]=t[t.length-1].join(r):t.push(r)}return t}function gKe(i,e,t){let n=t;if(n.length===0)return n;let o=0,r;do{r=!1;let s=[n[0]];for(let a=1;a5||f.seq1Range.length+f.seq2Range.length>5)},l=n[a],c=s[s.length-1];d(c,l)?(r=!0,s[s.length-1]=s[s.length-1].join(l)):s.push(l)}n=s}while(o++<10&&r);return n}function vKe(i,e,t){let n=t;if(n.length===0)return n;let o=0,r;do{r=!1;let a=[n[0]];for(let l=1;l5||m.length>500)return!1;let _=i.getText(m).trim();if(_.length>20||_.split(/\r\n|\r|\n/).length>1)return!1;let v=i.countLinesIn(f.seq1Range),b=f.seq1Range.length,C=e.countLinesIn(f.seq2Range),w=f.seq2Range.length,S=i.countLinesIn(p.seq1Range),x=p.seq1Range.length,k=e.countLinesIn(p.seq2Range),D=p.seq2Range.length,E=2*40+50;function A(T){return Math.min(T,E)}return Math.pow(Math.pow(A(v*40+b),1.5)+Math.pow(A(C*40+w),1.5),1.5)+Math.pow(Math.pow(A(S*40+x),1.5)+Math.pow(A(k*40+D),1.5),1.5)>(E**1.5)**1.5*1.3},c=n[l],d=a[a.length-1];u(d,c)?(r=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}n=a}while(o++<10&&r);let s=[];return dje(n,(a,l,c)=>{let d=l;function u(_){return _.length>0&&_.trim().length<=3&&l.seq1Range.length+l.seq2Range.length>100}let h=i.extendToFullLines(l.seq1Range),f=i.getText(new Pn(h.start,l.seq1Range.start));u(f)&&(d=d.deltaStart(-f.length));let p=i.getText(new Pn(l.seq1Range.endExclusive,h.endExclusive));u(p)&&(d=d.deltaEnd(p.length));let m=kl.fromOffsetPairs(a?a.getEndExclusives():Kh.zero,c?c.getStarts():Kh.max),y=d.intersect(m);s.length>0&&y.getStarts().equals(s[s.length-1].getEndExclusives())?s[s.length-1]=s[s.length-1].join(y):s.push(y)}),s}var Efe=P(()=>{Vi();Xf();lw()});function _Ke(i){let e=0;for(;e{oI=class{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){let t=e===0?0:_Ke(this.lines[e-1]),n=e===this.lines.length?0:_Ke(this.lines[e]);return 1e3-(t+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` +`)}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}});function yKe(i,e,t,n=!1){let o=[];for(let r of gC(i.map(s=>EDt(s,e,t)),(s,a)=>s.original.overlapOrTouch(a.original)||s.modified.overlapOrTouch(a.modified))){let s=r[0],a=r[r.length-1];o.push(new du(s.original.join(a.original),s.modified.join(a.modified),r.map(l=>l.innerChanges[0])))}return zg(()=>!n&&o.length>0&&o[0].original.startLineNumber!==o[0].modified.startLineNumber?!1:NU(o,(r,s)=>s.original.startLineNumber-r.original.endLineNumberExclusive===s.modified.startLineNumber-r.modified.endLineNumberExclusive&&r.original.endLineNumberExclusive=t[i.modifiedRange.startLineNumber-1].length&&i.originalRange.startColumn-1>=e[i.originalRange.startLineNumber-1].length&&i.originalRange.startLineNumber<=i.originalRange.endLineNumber+o&&i.modifiedRange.startLineNumber<=i.modifiedRange.endLineNumber+o&&(n=1);let r=new rn(i.originalRange.startLineNumber+n,i.originalRange.endLineNumber+1+o),s=new rn(i.modifiedRange.startLineNumber+n,i.modifiedRange.endLineNumber+1+o);return new du(r,s,[i])}var hw,Dfe=P(()=>{Vi();um();sh();Xf();Kt();lw();oKe();wfe();uKe();Efe();V$();nv();Lfe();bKe();hw=class{constructor(){this.dynamicProgrammingDiffing=new G$,this.myersDiffingAlgorithm=new uw}computeDiff(e,t,n){if(e.length<=1&&uo(e,t,(w,S)=>w===S))return new tv([],[],!1);if(e.length===1&&e[0].length===0||t.length===1&&t[0].length===0)return new tv([new du(new rn(1,e.length+1),new rn(1,t.length+1),[new Qf(new O(1,1,e.length,e[0].length+1),new O(1,1,t.length,t[0].length+1))])],[],!1);let o=n.maxComputationTimeMs===0?qg.instance:new j$(n.maxComputationTimeMs),r=!n.ignoreTrimWhitespace,s=new Map;function a(w){let S=s.get(w);return S===void 0&&(S=s.size,s.set(w,S)),S}let l=e.map(w=>a(w.trim())),c=t.map(w=>a(w.trim())),d=new oI(l,e),u=new oI(c,t),h=d.length+u.length<1700?this.dynamicProgrammingDiffing.compute(d,u,o,(w,S)=>e[w]===t[S]?t[S].length===0?.1:1+Math.log(1+t[S].length):.99):this.myersDiffingAlgorithm.compute(d,u),f=h.diffs,p=h.hitTimeout;f=nI(d,u,f),f=gKe(d,u,f);let m=[],y=w=>{if(r)for(let S=0;Sw.seq1Range.start-_===w.seq2Range.start-v);let S=w.seq1Range.start-_;y(S),_=w.seq1Range.endExclusive,v=w.seq2Range.endExclusive;let x=this.refineDiff(e,t,w,o,r);x.hitTimeout&&(p=!0);for(let k of x.mappings)m.push(k)}y(e.length-_);let b=yKe(m,e,t),C=[];return n.computeMoves&&(C=this.computeMoves(b,e,t,l,c,o,r)),zg(()=>{function w(x,k){if(x.lineNumber<1||x.lineNumber>k.length)return!1;let D=k[x.lineNumber-1];return!(x.column<1||x.column>D.length+1)}function S(x,k){return!(x.startLineNumber<1||x.startLineNumber>k.length+1||x.endLineNumberExclusive<1||x.endLineNumberExclusive>k.length+1)}for(let x of b){if(!x.innerChanges)return!1;for(let k of x.innerChanges)if(!(w(k.modifiedRange.getStartPosition(),t)&&w(k.modifiedRange.getEndPosition(),t)&&w(k.originalRange.getStartPosition(),e)&&w(k.originalRange.getEndPosition(),e)))return!1;if(!S(x.modified,t)||!S(x.original,e))return!1}return!0}),new tv(b,C,p)}computeMoves(e,t,n,o,r,s,a){return dKe(e,t,n,o,r,s).map(d=>{let u=this.refineDiff(t,n,new kl(d.original.toOffsetRange(),d.modified.toOffsetRange()),s,a),h=yKe(u.mappings,t,n,!0);return new rw(d,h)})}refineDiff(e,t,n,o,r){let s=new rv(e,n.seq1Range,r),a=new rv(t,n.seq2Range,r),l=s.length+a.length<500?this.dynamicProgrammingDiffing.compute(s,a,o):this.myersDiffingAlgorithm.compute(s,a,o),c=l.diffs;return c=nI(s,a,c),c=mKe(s,a,c),c=pKe(s,a,c),c=vKe(s,a,c),{mappings:c.map(u=>new Qf(s.translateRange(u.seq1Range),a.translateRange(u.seq2Range))),hitTimeout:l.hitTimeout}}}});var Tfe,CKe=P(()=>{nKe();Dfe();Tfe={getLegacy:()=>new U$,getDefault:()=>new hw}});function sv(i,e){let t=Math.pow(10,e);return Math.round(i*t)/t}var On,Gg,bm,it,sa=P(()=>{On=class{constructor(e,t,n,o=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,t))|0,this.b=Math.min(255,Math.max(0,n))|0,this.a=sv(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}},Gg=class i{constructor(e,t,n,o){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=sv(Math.max(Math.min(1,t),0),3),this.l=sv(Math.max(Math.min(1,n),0),3),this.a=sv(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){let t=e.r/255,n=e.g/255,o=e.b/255,r=e.a,s=Math.max(t,n,o),a=Math.min(t,n,o),l=0,c=0,d=(a+s)/2,u=s-a;if(u>0){switch(c=Math.min(d<=.5?u/(2*d):u/(2-2*d),1),s){case t:l=(n-o)/u+(n1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(e){let t=e.h/360,{s:n,l:o,a:r}=e,s,a,l;if(n===0)s=a=l=o;else{let c=o<.5?o*(1+n):o+n-o*n,d=2*o-c;s=i._hue2rgb(d,c,t+1/3),a=i._hue2rgb(d,c,t),l=i._hue2rgb(d,c,t-1/3)}return new On(Math.round(s*255),Math.round(a*255),Math.round(l*255),r)}},bm=class i{constructor(e,t,n,o){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=sv(Math.max(Math.min(1,t),0),3),this.v=sv(Math.max(Math.min(1,n),0),3),this.a=sv(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){let t=e.r/255,n=e.g/255,o=e.b/255,r=Math.max(t,n,o),s=Math.min(t,n,o),a=r-s,l=r===0?0:a/r,c;return a===0?c=0:r===t?c=((n-o)/a%6+6)%6:r===n?c=(o-t)/a+2:c=(t-n)/a+4,new i(Math.round(c*60),l,r,e.a)}static toRGBA(e){let{h:t,s:n,v:o,a:r}=e,s=o*n,a=s*(1-Math.abs(t/60%2-1)),l=o-s,[c,d,u]=[0,0,0];return t<60?(c=s,d=a):t<120?(c=a,d=s):t<180?(d=s,u=a):t<240?(d=a,u=s):t<300?(c=a,u=s):t<=360&&(c=s,u=a),c=Math.round((c+l)*255),d=Math.round((d+l)*255),u=Math.round((u+l)*255),new On(c,d,u,r)}},it=class i{static fromHex(e){return i.Format.CSS.parseHex(e)||i.red}static equals(e,t){return!e&&!t?!0:!e||!t?!1:e.equals(t)}get hsla(){return this._hsla?this._hsla:Gg.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:bm.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof On)this.rgba=e;else if(e instanceof Gg)this._hsla=e,this.rgba=Gg.toRGBA(e);else if(e instanceof bm)this._hsva=e,this.rgba=bm.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&On.equals(this.rgba,e.rgba)&&Gg.equals(this.hsla,e.hsla)&&bm.equals(this.hsva,e.hsva)}getRelativeLuminance(){let e=i._relativeLuminanceForComponent(this.rgba.r),t=i._relativeLuminanceForComponent(this.rgba.g),n=i._relativeLuminanceForComponent(this.rgba.b),o=.2126*e+.7152*t+.0722*n;return sv(o,4)}static _relativeLuminanceForComponent(e){let t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){let t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t>n}isDarkerThan(e){let t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t0)for(let o of n){let r=o.filter(c=>c!==void 0),s=r[1],a=r[2];if(!a)continue;let l;if(s==="rgb"){let c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;l=wKe(rI(i,o),sI(a,c),!1)}else if(s==="rgba"){let c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=wKe(rI(i,o),sI(a,c),!0)}else if(s==="hsl"){let c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;l=xKe(rI(i,o),sI(a,c),!1)}else if(s==="hsla"){let c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=xKe(rI(i,o),sI(a,c),!0)}else s==="#"&&(l=DDt(rI(i,o),s+a));l&&e.push(l)}return e}function kKe(i){return!i||typeof i.getValue!="function"||typeof i.positionAt!="function"?[]:TDt(i)}var LKe=P(()=>{sa()});var Mfe,z5,EKe=P(()=>{ZT();Io();Mi();Kt();$Ge();CC();qGe();GGe();Oue();Yu();mfe();CKe();Gc();LKe();Mfe=class extends R${get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){let t=[];for(let n=0;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,o=!0;else{let r=this._lines[t-1].length+1;n<1?(n=1,o=!0):n>r&&(n=r,o=!0)}return o?{lineNumber:t,column:n}:e}},z5=class i{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){let e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}acceptNewModel(e){this._models[e.url]=new Mfe(li.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}async computeUnicodeHighlights(e,t,n){let o=this._getModel(e);return o?P5.computeUnicodeHighlights(o,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async computeDiff(e,t,n,o){let r=this._getModel(e),s=this._getModel(t);return!r||!s?null:i.computeDiff(r,s,n,o)}static computeDiff(e,t,n,o){let r=o==="advanced"?Tfe.getDefault():Tfe.getLegacy(),s=e.getLinesContent(),a=t.getLinesContent(),l=r.computeDiff(s,a,n),c=l.changes.length>0?!1:this._modelsAreIdentical(e,t);function d(u){return u.map(h=>{var f;return[h.original.startLineNumber,h.original.endLineNumberExclusive,h.modified.startLineNumber,h.modified.endLineNumberExclusive,(f=h.innerChanges)===null||f===void 0?void 0:f.map(p=>[p.originalRange.startLineNumber,p.originalRange.startColumn,p.originalRange.endLineNumber,p.originalRange.endColumn,p.modifiedRange.startLineNumber,p.modifiedRange.startColumn,p.modifiedRange.endLineNumber,p.modifiedRange.endColumn])]})}return{identical:c,quitEarly:l.hitTimeout,changes:d(l.changes),moves:l.moves.map(u=>[u.lineRangeMapping.original.startLineNumber,u.lineRangeMapping.original.endLineNumberExclusive,u.lineRangeMapping.modified.startLineNumber,u.lineRangeMapping.modified.endLineNumberExclusive,d(u.changes)])}}static _modelsAreIdentical(e,t){let n=e.getLineCount(),o=t.getLineCount();if(n!==o)return!1;for(let r=1;r<=n;r++){let s=e.getLineContent(r),a=t.getLineContent(r);if(s!==a)return!1}return!0}async computeMoreMinimalEdits(e,t,n){let o=this._getModel(e);if(!o)return t;let r=[],s;t=t.slice(0).sort((l,c)=>{if(l.range&&c.range)return O.compareRangesUsingStarts(l.range,c.range);let d=l.range?0:1,u=c.range?0:1;return d-u});let a=0;for(let l=1;li._diffLimit){r.push({range:l,text:c});continue}let h=UGe(u,c,n),f=o.offsetAt(O.lift(l).getStartPosition());for(let p of h){let m=o.positionAt(f+p.originalStart),y=o.positionAt(f+p.originalStart+p.originalLength),_={text:c.substr(p.modifiedStart,p.modifiedLength),range:{startLineNumber:m.lineNumber,startColumn:m.column,endLineNumber:y.lineNumber,endColumn:y.column}};o.getValueInRange(_.range)!==_.text&&r.push(_)}}return typeof s=="number"&&r.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r}async computeLinks(e){let t=this._getModel(e);return t?jGe(t):null}async computeDefaultDocumentColors(e){let t=this._getModel(e);return t?kKe(t):null}async textualSuggest(e,t,n,o){let r=new Er,s=new RegExp(n,o),a=new Set;e:for(let l of e){let c=this._getModel(l);if(c){for(let d of c.words(s))if(!(d===t||!isNaN(Number(d)))&&(a.add(d),a.size>i._suggestionsLimit))break e}}return{words:Array.from(a),duration:r.elapsed()}}async computeWordRanges(e,t,n,o){let r=this._getModel(e);if(!r)return Object.create(null);let s=new RegExp(n,o),a=Object.create(null);for(let l=t.startLineNumber;lthis._host.fhr(a,l)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(s,t),Promise.resolve(bC(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(n){return Promise.reject(n)}}};z5._diffLimit=1e5;z5._suggestionsLimit=1e4;typeof importScripts=="function"&&(globalThis.monaco=nU())});var fw,Z$,aI=P(()=>{_i();fw=vi("textResourceConfigurationService"),Z$=vi("textResourcePropertiesService")});var Rt,Yn=P(()=>{_i();Rt=vi("ILanguageFeaturesService")});function F5(i,e){let t=i.getModel(e);return!(!t||t.isTooLargeForSyncing())}var IDt,lI,DKe,TKe,X$,Nfe,Afe,Rfe,Q$,cI,H5,J$=P(()=>{Qi();nt();Ahe();_Ge();Kt();Kr();EKe();Dc();aI();Vi();Ju();Yu();Pi();Yn();V$();nv();sh();_l();Qt();IDt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},lI=function(i,e){return function(t,n){e(t,n,i)}},DKe=60*1e3,TKe=5*60*1e3;X$=class extends ue{constructor(e,t,n,o,r){super(),this._modelService=e,this._workerManager=this._register(new Afe(this._modelService,o)),this._logService=n,this._register(r.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(s,a)=>F5(this._modelService,s.uri)?this._workerManager.withWorker().then(l=>l.computeLinks(s.uri)).then(l=>l&&{links:l}):Promise.resolve({links:[]})})),this._register(r.completionProvider.register("*",new Nfe(this._workerManager,t,this._modelService,o)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return F5(this._modelService,e)}computedUnicodeHighlights(e,t,n){return this._workerManager.withWorker().then(o=>o.computedUnicodeHighlights(e,t,n))}async computeDiff(e,t,n,o){let r=await this._workerManager.withWorker().then(l=>l.computeDiff(e,t,n,o));if(!r)return null;return{identical:r.identical,quitEarly:r.quitEarly,changes:a(r.changes),moves:r.moves.map(l=>new rw(new cu(new rn(l[0],l[1]),new rn(l[2],l[3])),a(l[4])))};function a(l){return l.map(c=>{var d;return new du(new rn(c[0],c[1]),new rn(c[2],c[3]),(d=c[4])===null||d===void 0?void 0:d.map(u=>new Qf(new O(u[0],u[1],u[2],u[3]),new O(u[4],u[5],u[6],u[7]))))})}}computeMoreMinimalEdits(e,t,n=!1){if(Nr(t)){if(!F5(this._modelService,e))return Promise.resolve(t);let o=Er.create(),r=this._workerManager.withWorker().then(s=>s.computeMoreMinimalEdits(e,t,n));return r.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),o.elapsed())),Promise.race([r,eh(1e3).then(()=>t)])}else return Promise.resolve(void 0)}canNavigateValueSet(e){return F5(this._modelService,e)}navigateValueSet(e,t,n){return this._workerManager.withWorker().then(o=>o.navigateValueSet(e,t,n))}canComputeWordRanges(e){return F5(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then(n=>n.computeWordRanges(e,t))}};X$=IDt([lI(0,no),lI(1,fw),lI(2,ks),lI(3,An),lI(4,Rt)],X$);Nfe=class{constructor(e,t,n,o){this.languageConfigurationService=o,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=n}async provideCompletionItems(e,t){let n=this._configurationService.getValue(e.uri,t,"editor");if(n.wordBasedSuggestions==="off")return;let o=[];if(n.wordBasedSuggestions==="currentDocument")F5(this._modelService,e.uri)&&o.push(e.uri);else for(let u of this._modelService.getModels())F5(this._modelService,u.uri)&&(u===e?o.unshift(u.uri):(n.wordBasedSuggestions==="allDocuments"||u.getLanguageId()===e.getLanguageId())&&o.push(u.uri));if(o.length===0)return;let r=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),s=e.getWordAtPosition(t),a=s?new O(t.lineNumber,s.startColumn,t.lineNumber,s.endColumn):O.fromPositions(t),l=a.setEndPosition(t.lineNumber,t.column),d=await(await this._workerManager.withWorker()).textualSuggest(o,s?.word,r);if(d)return{duration:d.duration,suggestions:d.words.map(u=>({kind:18,label:u,insertText:u,range:{insert:l,replace:a}}))}}},Afe=class extends ue{constructor(e,t){super(),this.languageConfigurationService=t,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new $3).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(TKe/2),$0),this._register(this._modelService.onModelRemoved(o=>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>TKe&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new H5(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}},Rfe=class extends ue{constructor(e,t,n){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!n){let o=new B3;o.cancelAndSet(()=>this._checkStopModelSync(),Math.round(DKe/2)),this._register(o)}}dispose(){for(let e in this._syncedModels)Nn(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(let n of e){let o=n.toString();this._syncedModels[o]||this._beginModelSync(n,t),this._syncedModels[o]&&(this._syncedModelsLastUsedTime[o]=new Date().getTime())}}_checkStopModelSync(){let e=new Date().getTime(),t=[];for(let n in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[n]>DKe&&t.push(n);for(let n of t)this._stopModelSync(n)}_beginModelSync(e,t){let n=this._modelService.getModel(e);if(!n||!t&&n.isTooLargeForSyncing())return;let o=e.toString();this._proxy.acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});let r=new Ye;r.add(n.onDidChangeContent(s=>{this._proxy.acceptModelChanged(o.toString(),s)})),r.add(n.onWillDispose(()=>{this._stopModelSync(o)})),r.add(Yt(()=>{this._proxy.acceptRemovedModel(o)})),this._syncedModels[o]=r}_stopModelSync(e){let t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],Nn(t)}},Q$=class{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}},cI=class{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}},H5=class extends ue{constructor(e,t,n,o){super(),this.languageConfigurationService=o,this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new jT(n),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new c$(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new cI(this)))}catch(e){$T(e),this._worker=new Q$(new z5(new cI(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>($T(e),this._worker=new Q$(new z5(new cI(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new Rfe(e,this._modelService,this._keepIdleModels))),this._modelManager}async _withSyncedResources(e,t=!1){return this._disposed?Promise.reject(Oje()):this._getProxy().then(n=>(this._getOrCreateModelManager(n).ensureSyncedResources(e,t),n))}computedUnicodeHighlights(e,t,n){return this._withSyncedResources([e]).then(o=>o.computeUnicodeHighlights(e.toString(),t,n))}computeDiff(e,t,n,o){return this._withSyncedResources([e,t],!0).then(r=>r.computeDiff(e.toString(),t.toString(),n,o))}computeMoreMinimalEdits(e,t,n){return this._withSyncedResources([e]).then(o=>o.computeMoreMinimalEdits(e.toString(),t,n))}computeLinks(e){return this._withSyncedResources([e]).then(t=>t.computeLinks(e.toString()))}computeDefaultDocumentColors(e){return this._withSyncedResources([e]).then(t=>t.computeDefaultDocumentColors(e.toString()))}async textualSuggest(e,t,n){let o=await this._withSyncedResources(e),r=n.source,s=n.flags;return o.textualSuggest(e.map(a=>a.toString()),t,r,s)}computeWordRanges(e,t){return this._withSyncedResources([e]).then(n=>{let o=this._modelService.getModel(e);if(!o)return Promise.resolve(null);let r=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId()).getWordDefinition(),s=r.source,a=r.flags;return n.computeWordRanges(e.toString(),t,s,a)})}navigateValueSet(e,t,n){return this._withSyncedResources([e]).then(o=>{let r=this._modelService.getModel(e);if(!r)return null;let s=this.languageConfigurationService.getLanguageConfiguration(r.getLanguageId()).getWordDefinition(),a=s.source,l=s.flags;return o.navigateValueSet(e.toString(),t,n,a,l)})}dispose(){super.dispose(),this._disposed=!0}}});function IKe(i,e,t){return new Pfe(i,e,t)}var Pfe,MKe=P(()=>{Gc();J$();Pfe=class extends H5{constructor(e,t,n){super(e,n.keepIdleModels||!1,n.label,t),this._foreignModuleId=n.moduleId,this._foreignModuleCreateData=n.createData||null,this._foreignModuleHost=n.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(n){return Promise.reject(n)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{let t=this._foreignModuleHost?bC(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then(n=>{this._foreignModuleCreateData=null;let o=(a,l)=>e.fmr(a,l),r=(a,l)=>function(){let c=Array.prototype.slice.call(arguments,0);return l(a,c)},s={};for(let a of n)s[a]=r(a,o);return s})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(t=>this.getProxy())}}});var s4,dI=P(()=>{s4={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}});function pw(i,e){return new A3([new am(0,"",i)],e)}function av(i,e){let t=new Uint32Array(2);return t[0]=0,t[1]=(i<<0|0|0|32768|2<<24)>>>0,new U0(t,e===null?Kg:e)}var Kg,mw=P(()=>{Pr();Kg=new class{clone(){return this}equals(i){return this===i}}});var Ls,B5=P(()=>{Ls=class{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 n="mtk"+this.getForeground(e),o=this.getFontStyle(e);return o&1&&(n+=" mtki"),o&2&&(n+=" mtkb"),o&4&&(n+=" mtku"),o&8&&(n+=" mtks"),n}static getInlineStyleFromMetadata(e,t){let n=this.getForeground(e),o=this.getFontStyle(e),r=`color: ${t[n]};`;o&1&&(r+="font-style: italic;"),o&2&&(r+="font-weight: bold;");let s="";return o&4&&(s+=" underline"),o&8&&(s+=" line-through"),s&&(r+=`text-decoration:${s};`),r}static getPresentationFromMetadata(e){let t=this.getForeground(e),n=this.getFontStyle(e);return{foreground:t,italic:!!(n&1),bold:!!(n&2),underline:!!(n&4),strikethrough:!!(n&8)}}}});var Es,Ofe,Yg=P(()=>{B5();Es=class i{static createEmpty(e,t){let n=i.defaultTokenMetadata,o=new Uint32Array(2);return o[0]=e.length,o[1]=n,new i(o,e,t)}constructor(e,t,n){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=n}equals(e){return e instanceof i?this.slicedEquals(e,0,this._tokensCount):!1}slicedEquals(e,t,n){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;let o=t<<1,r=o+(n<<1);for(let s=o;s0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){let t=this._tokens[(e<<1)+1],n=Ls.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(n)}getStandardTokenType(e){let t=this._tokens[(e<<1)+1];return Ls.getTokenType(t)}getForeground(e){let t=this._tokens[(e<<1)+1];return Ls.getForeground(t)}getClassName(e){let t=this._tokens[(e<<1)+1];return Ls.getClassNameFromMetadata(t)}getInlineStyle(e,t){let n=this._tokens[(e<<1)+1];return Ls.getInlineStyleFromMetadata(n,t)}getPresentation(e){let t=this._tokens[(e<<1)+1];return Ls.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return i.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,n){return new Ofe(this,e,t,n)}static convertToEndOffset(e,t){let o=(e.length>>>1)-1;for(let r=0;r>>1)-1;for(;nt&&(o=r)}return n}withInserted(e){if(e.length===0)return this;let t=0,n=0,o="",r=new Array,s=0;for(;;){let a=ts){o+=this._text.substring(s,l.offset);let c=this._tokens[(t<<1)+1];r.push(o.length,c),s=l.offset}o+=l.text,r.push(o.length,l.tokenMetadata),n++}else break}return new i(new Uint32Array(r),o,this._languageIdCodec)}};Es.defaultTokenMetadata=(32768|2<<24)>>>0;Ofe=class i{constructor(e,t,n,o){this._source=e,this._startOffset=t,this._endOffset=n,this._deltaOffset=o,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let r=this._firstTokenIndex,s=e.getCount();r=n);r++)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 i?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){let 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}}});var Ld,ej,zfe,tj,gw=P(()=>{Ri();Ld=class i{constructor(e,t,n,o){this.startColumn=e,this.endColumn=t,this.className=n,this.type=o,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){let n=e.length,o=t.length;if(n!==o)return!1;for(let r=0;r=r||(a[l++]=new i(Math.max(1,c.startColumn-o+1),Math.min(s+1,c.endColumn-o+1),c.className,c.type));return a}static filter(e,t,n,o){if(e.length===0)return[];let r=[],s=0;for(let a=0,l=e.length;at||d.isEmpty()&&(c.type===0||c.type===3))continue;let u=d.startLineNumber===t?d.startColumn:n,h=d.endLineNumber===t?d.endColumn:o;r[s++]=new i(u,h,c.inlineClassName,c.type)}return r}static _typeCompare(e,t){let n=[2,0,1,3];return n[e]-n[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;let n=i._typeCompare(e.type,t.type);return n!==0?n:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(o,0,e),this.classNames.splice(o,0,t),this.metadata.splice(o,0,n);break}this.count++}},tj=class{static normalize(e,t){if(t.length===0)return[];let n=[],o=new zfe,r=0;for(let s=0,a=t.length;s1){let m=e.charCodeAt(c-2);Or(m)&&c--}if(d>1){let m=e.charCodeAt(d-2);Or(m)&&d--}let f=c-1,p=d-2;r=o.consumeLowerThan(f,r,n),o.count===0&&(r=f),o.insert(p,u,h)}return o.consumeLowerThan(1073741824,r,n),n}}});var aa,AKe=P(()=>{aa=class{constructor(e,t,n,o){this.endIndex=e,this.type=t,this.metadata=n,this.containsRTL=o,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}});function a4(i,e){if(i.lineContent.length===0){if(i.lineDecorations.length>0){e.appendString("");let t=0,n=0,o=0;for(let s of i.lineDecorations)(s.type===1||s.type===2)&&(e.appendString(''),s.type===1&&(o|=1,t++),s.type===2&&(o|=2,n++));e.appendString("");let r=new hI(1,t+n);return r.setColumnInfo(1,t,0,0),new fI(r,!1,o)}return e.appendString(""),new fI(new hI(0,0),!1,0)}return zDt(MDt(i),e)}function _w(i){let e=new qh(1e4),t=a4(i,e);return new Ffe(t.characterMapping,e.build(),t.containsRTL,t.containsForeignElements)}function MDt(i){let e=i.lineContent,t,n,o;i.stopRenderingLineAfter!==-1&&i.stopRenderingLineAfter0){for(let a=0,l=i.lineDecorations.length;a0&&(r[s++]=new aa(n,"",0,!1));let a=n;for(let l=0,c=t.getCount();l=o){let f=e?lm(i.substring(a,o)):!1;r[s++]=new aa(o,u,0,f);break}let h=e?lm(i.substring(a,d)):!1;r[s++]=new aa(d,u,0,h),a=d}return r}function ADt(i,e,t){let n=0,o=[],r=0;if(t)for(let s=0,a=e.length;s=50&&(o[r++]=new aa(f+1,d,u,h),p=f+1,f=-1);p!==c&&(o[r++]=new aa(c,d,u,h))}else o[r++]=l;n=c}else for(let s=0,a=e.length;s50){let u=l.type,h=l.metadata,f=l.containsRTL,p=Math.ceil(d/50);for(let m=1;m=8234&&i<=8238||i>=8294&&i<=8297||i>=8206&&i<=8207||i===1564}function RDt(i,e){let t=[],n=new aa(0,"",0,!1),o=0;for(let r of e){let s=r.endIndex;for(;on.endIndex&&(n=new aa(o,r.type,r.metadata,r.containsRTL),t.push(n)),n=new aa(o+1,"mtkcontrol",r.metadata,!1),t.push(n))}o>n.endIndex&&(n=new aa(s,r.type,r.metadata,r.containsRTL),t.push(n))}return t}function PDt(i,e,t,n){let o=i.continuesWithWrappedLine,r=i.fauxIndentLength,s=i.tabSize,a=i.startVisibleColumn,l=i.useMonospaceOptimizations,c=i.selectionsOnLine,d=i.renderWhitespace===1,u=i.renderWhitespace===3,h=i.renderSpaceWidth!==i.spaceWidth,f=[],p=0,m=0,y=n[m].type,_=n[m].containsRTL,v=n[m].endIndex,b=n.length,C=!1,w=qr(e),S;w===-1?(C=!0,w=t,S=t):S=ql(e);let x=!1,k=0,D=c&&c[k],E=a%s;for(let T=r;T=D.endOffset&&(k++,D=c&&c[k]);let I;if(TS)I=!0;else if(L===9)I=!0;else if(L===32)if(d)if(x)I=!0;else{let M=T+1T),I&&u&&(I=C||T>S),I&&_&&T>=w&&T<=S&&(I=!1),x){if(!I||!l&&E>=s){if(h){let M=p>0?f[p-1].endIndex:r;for(let N=M+1;N<=T;N++)f[p++]=new aa(N,"mtkw",1,!1)}else f[p++]=new aa(T,"mtkw",1,!1);E=E%s}}else(T===v||I&&T>r)&&(f[p++]=new aa(T,y,0,_),E=E%s);for(L===9?E=s:Bf(L)?E+=2:E++,x=I;T===v&&(m++,m0?e.charCodeAt(t-1):0,L=t>1?e.charCodeAt(t-2):0;T===32&&L!==32&&L!==9||(A=!0)}else A=!0;if(A)if(h){let T=p>0?f[p-1].endIndex:r;for(let L=T+1;L<=t;L++)f[p++]=new aa(L,"mtkw",1,!1)}else f[p++]=new aa(t,"mtkw",1,!1);else f[p++]=new aa(t,y,0,_);return f}function ODt(i,e,t,n){n.sort(Ld.compare);let o=tj.normalize(i,n),r=o.length,s=0,a=[],l=0,c=0;for(let u=0,h=t.length;uc&&(c=v.startOffset,a[l++]=new aa(c,m,y,_)),v.endOffset+1<=p)c=v.endOffset+1,a[l++]=new aa(c,m+" "+v.className,y|v.metadata,_),s++;else{c=p,a[l++]=new aa(c,m+" "+v.className,y|v.metadata,_);break}}p>c&&(c=p,a[l++]=new aa(c,m,y,_))}let d=t[t.length-1].endIndex;if(s'):e.appendString("");for(let D=0,E=c.length;D=d&&(ie+=K)}}for(N&&(e.appendString(' style="width:'),e.appendString(String(p*F)),e.appendString('px"')),e.appendASCIICharCode(62);C1?e.appendCharCode(8594):e.appendCharCode(65515);for(let K=2;K<=fe;K++)e.appendCharCode(160)}else ie=2,fe=1,e.appendCharCode(m),e.appendCharCode(8204);S+=ie,x+=fe,C>=d&&(w+=fe)}}else for(e.appendASCIICharCode(62);C=d&&(w+=ie)}z?k++:k=0,C>=s&&!b&&A.isPseudoAfter()&&(b=!0,v.setColumnInfo(C+1,D,S,x)),e.appendString("")}return b||v.setColumnInfo(s+1,c.length-1,S,x),a&&(e.appendString(''),e.appendString(g("showMore","Show more ({0})",HDt(l))),e.appendString("")),e.appendString(""),new fI(v,f,o)}function FDt(i){return i.toString(16).toUpperCase().padStart(4,"0")}function HDt(i){return i<1024?g("overflow.chars","{0} chars",i):i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/1024/1024).toFixed(1)} MB`}var vw,uu,uI,hI,fI,Ffe,Hfe,lv=P(()=>{Wt();Ri();J0();gw();AKe();vw=class{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}},uu=class{constructor(e,t,n,o,r,s,a,l,c,d,u,h,f,p,m,y,_,v,b){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.continuesWithWrappedLine=o,this.isBasicASCII=r,this.containsRTL=s,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=c.sort(Ld.compare),this.tabSize=d,this.startVisibleColumn=u,this.spaceWidth=h,this.stopRenderingLineAfter=m,this.renderWhitespace=y==="all"?4:y==="boundary"?1:y==="selection"?2:y==="trailing"?3:0,this.renderControlCharacters=_,this.fontLigatures=v,this.selectionsOnLine=b&&b.sort((S,x)=>S.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,n,o){let r=(t<<16|n<<0)>>>0;this._data[e-1]=r,this._horizontalOffset[e-1]=o}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){let t=this.charOffsetToPartData(e-1),n=i.getPartIndex(t),o=i.getCharIndex(t);return new uI(n,o)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,n){if(this.length===0)return 0;let o=(e<<16|n<<0)>>>0,r=0,s=this.length-1;for(;r+1>>1,y=this._data[m];if(y===o)return m;y>o?s=m:r=m}if(r===s)return r;let a=this._data[r],l=this._data[s];if(a===o)return r;if(l===o)return s;let c=i.getPartIndex(a),d=i.getCharIndex(a),u=i.getPartIndex(l),h;c!==u?h=t:h=i.getCharIndex(l);let f=n-d,p=h-n;return f<=p?r:s}},fI=class{constructor(e,t,n){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n}};Ffe=class{constructor(e,t,n,o){this.characterMapping=e,this.html=t,this.containsRTL=n,this.containsForeignElements=o}};Hfe=class{constructor(e,t,n,o,r,s,a,l,c,d,u,h,f,p,m,y){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.len=o,this.isOverflowing=r,this.overflowingCharCount=s,this.parts=a,this.containsForeignElements=l,this.fauxIndentLength=c,this.tabSize=d,this.startVisibleColumn=u,this.containsRTL=h,this.spaceWidth=f,this.renderSpaceCharCode=p,this.renderWhitespace=m,this.renderControlCharacters=y}}});var pI,ij,V5,Ed,l4,nj,bw,W5,ap=P(()=>{Vi();Ri();Kt();pI=class{constructor(e,t,n,o){this._viewportBrand=void 0,this.top=e|0,this.left=t|0,this.width=n|0,this.height=o|0}},ij=class{constructor(e,t){this.tabSize=e,this.data=t}},V5=class{constructor(e,t,n,o,r,s,a){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=n,this.maxColumn=o,this.startVisibleColumn=r,this.tokens=s,this.inlineDecorations=a}},Ed=class i{constructor(e,t,n,o,r,s,a,l,c,d){this.minColumn=e,this.maxColumn=t,this.content=n,this.continuesWithWrappedLine=o,this.isBasicASCII=i.isBasicASCII(n,s),this.containsRTL=i.containsRTL(n,this.isBasicASCII,r),this.tokens=a,this.inlineDecorations=l,this.tabSize=c,this.startVisibleColumn=d}static isBasicASCII(e,t){return t?Ag(e):!0}static containsRTL(e,t,n){return!t&&n?lm(e):!1}},l4=class{constructor(e,t,n){this.range=e,this.inlineClassName=t,this.type=n}},nj=class{constructor(e,t,n,o){this.startOffset=e,this.endOffset=t,this.inlineClassName=n,this.inlineClassNameAffectsLetterSpacing=o}toInlineDecoration(e){return new l4(new O(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}},bw=class{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}},W5=class i{constructor(e,t,n){this.color=e,this.zIndex=t,this.data=n}static compareByRenderingProps(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&uo(e.data,t.data)}static equalsArr(e,t){return uo(e,t,i.equals)}}});function BDt(i){return Array.isArray(i)}function PKe(i){return!BDt(i)}function Bfe(i){return typeof i=="string"}function Vfe(i){return!Bfe(i)}function U5(i){return!i}function Zg(i,e){return i.ignoreCase&&e?e.toLowerCase():e}function Wfe(i){return i.replace(/[&<>'"_]/g,"-")}function OKe(i,e){console.log(`${i.languageId}: ${e}`)}function sr(i,e){return new Error(`${i.languageId}: ${e}`)}function Xg(i,e,t,n,o){let r=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,s=null;return e.replace(r,function(a,l,c,d,u,h,f,p,m){return U5(c)?U5(d)?!U5(u)&&u0;){let n=i.tokenizer[t];if(n)return n;let o=t.lastIndexOf(".");o<0?t=null:t=t.substr(0,o)}return null}function zKe(i,e){let t=e;for(;t&&t.length>0;){if(i.stateNames[t])return!0;let o=t.lastIndexOf(".");o<0?t=null:t=t.substr(0,o)}return!1}var Ufe=P(()=>{});function UDt(i,e){if(!e)return null;e=Zg(i,e);let t=i.brackets;for(let n of t){if(n.open===e)return{token:n.token,bracketType:1};if(n.close===e)return{token:n.token,bracketType:-1}}return null}var VDt,WDt,$fe,HKe,$5,Cw,yw,Qg,gI,jfe,qfe,j5,Gfe=P(()=>{nt();Pr();mw();Ufe();er();VDt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},WDt=function(i,e){return function(t,n){e(t,n,i)}},HKe=5,$5=class{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 Cw(e,t);let n=Cw.getStackElementId(e);n.length>0&&(n+="|"),n+=t;let o=this._entries[n];return o||(o=new Cw(e,t),this._entries[n]=o,o)}};$5._INSTANCE=new $5(HKe);Cw=class i{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 i._equals(this,e)}push(e){return $5.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return $5.create(this.parent,e)}},yw=class i{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 i(this.languageId,this.state)}},Qg=class{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 gI(e,t);if(e!==null&&e.depth>=this._maxCacheDepth)return new gI(e,t);let n=Cw.getStackElementId(e),o=this._entries[n];return o||(o=new gI(e,null),this._entries[n]=o,o)}};Qg._INSTANCE=new Qg(HKe);gI=class i{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:Qg.create(this.stack,this.embeddedLanguageData)}equals(e){return!(e instanceof i)||!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)}},jfe=class{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 am(e,t,this._languageId)))}nestedLanguageTokenize(e,t,n,o){let r=n.languageId,s=n.state,a=Eo.get(r);if(!a)return this.enterLanguage(r),this.emit(o,""),s;let l=a.tokenize(e,t,s);if(o!==0)for(let c of l.tokens)this._tokens.push(new am(c.offset+o,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 A3(this._tokens,e)}},qfe=class i{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){let n=this._theme.match(this._currentLanguageId,t)|1024;this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))}static _merge(e,t,n){let o=e!==null?e.length:0,r=t.length,s=n!==null?n.length:0;if(o===0&&r===0&&s===0)return new Uint32Array(0);if(o===0&&r===0)return n;if(r===0&&s===0)return e;let a=new Uint32Array(o+r+s);e!==null&&a.set(e);for(let l=0;l{if(s)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}))}))}getLoadStatus(){let e=[];for(let t in this._embeddedLanguages){let n=Eo.get(t);if(n){if(n instanceof $fe){let o=n.getLoadStatus();o.loaded===!1&&e.push(o.promise)}continue}Eo.isResolved(t)||e.push(Eo.getOrCreate(t))}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(t=>{})}}getInitialState(){let e=$5.create(null,this._lexer.start);return Qg.create(e,null)}tokenize(e,t,n){if(e.length>=this._maxTokenizationLineLength)return pw(this._languageId,n);let o=new jfe,r=this._tokenize(e,t,n,o);return o.finalize(r)}tokenizeEncoded(e,t,n){if(e.length>=this._maxTokenizationLineLength)return av(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),n);let o=new qfe(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),r=this._tokenize(e,t,n,o);return o.finalize(r)}_tokenize(e,t,n,o){return n.embeddedLanguageData?this._nestedTokenize(e,t,n,0,o):this._myTokenize(e,t,n,0,o)}_findLeavingNestedLanguageOffset(e,t){let n=this._lexer.tokenizer[t.stack.state];if(!n&&(n=mI(this._lexer,t.stack.state),!n))throw sr(this._lexer,"tokenizer state is not defined: "+t.stack.state);let o=-1,r=!1;for(let s of n){if(!Vfe(s.action)||s.action.nextEmbedded!=="@pop")continue;r=!0;let a=s.regex,l=s.regex.source;if(l.substr(0,4)==="^(?:"&&l.substr(l.length-1,1)===")"){let d=(a.ignoreCase?"i":"")+(a.unicode?"u":"");a=new RegExp(l.substr(4,l.length-5),d)}let c=e.search(a);c===-1||c!==0&&s.matchOnlyAtLineStart||(o===-1||c0&&r.nestedLanguageTokenize(a,!1,n.embeddedLanguageData,o);let l=e.substring(s);return this._myTokenize(l,t,n,o+s,r)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,n,o,r){r.enterLanguage(this._languageId);let s=e.length,a=t&&this._lexer.includeLF?e+` +`:e,l=a.length,c=n.embeddedLanguageData,d=n.stack,u=0,h=null,f=!0;for(;f||u=l)break;f=!1;let D=this._lexer.tokenizer[_];if(!D&&(D=mI(this._lexer,_),!D))throw sr(this._lexer,"tokenizer state is not defined: "+_);let E=a.substr(u);for(let A of D)if((u===0||!A.matchOnlyAtLineStart)&&(v=E.match(A.regex),v)){b=v[0],C=A.action;break}}if(v||(v=[""],b=""),C||(u=this._lexer.maxStack)throw sr(this._lexer,"maximum tokenizer stack size reached: ["+d.state+","+d.parent.state+",...]");d=d.push(_)}else if(C.next==="@pop"){if(d.depth<=1)throw sr(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(w));d=d.pop()}else if(C.next==="@popall")d=d.popall();else{let D=Xg(this._lexer,C.next,b,v,_);if(D[0]==="@"&&(D=D.substr(1)),mI(this._lexer,D))d=d.push(D);else throw sr(this._lexer,"trying to set a next state '"+D+"' that is undefined in rule: "+this._safeRuleName(w))}}C.log&&typeof C.log=="string"&&OKe(this._lexer,this._lexer.languageId+": "+Xg(this._lexer,C.log,b,v,_))}if(x===null)throw sr(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(w));let k=D=>{let E=this._languageService.getLanguageIdByLanguageName(D)||this._languageService.getLanguageIdByMimeType(D)||D,A=this._getNestedEmbeddedLanguageData(E);if(u0)throw sr(this._lexer,"groups cannot be nested: "+this._safeRuleName(w));if(v.length!==x.length+1)throw sr(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(w));let D=0;for(let E=1;E{let s=()=>{let a=jDt(i,e,t,n);if(t instanceof j5){let l=t.getLoadStatus();if(l.loaded===!1){l.promise.then(s,r);return}}o(a)};s()})}function BKe(i,e,t){let n=[],r=new Uint32Array(2);r[0]=0,r[1]=33587200;for(let s=0,a=i.length;s")}return n.join("")}function jDt(i,e,t,n){let o=[],r=t.getInitialState();for(let s=0,a=i.length;s"),r=c.endState}return o.join("")}var Kfe,ww,VKe=P(()=>{Vg();Ri();Pr();Yg();lv();ap();Gfe();Kfe=td("standaloneColorizer",{createHTML:i=>i}),ww=class{static colorizeElement(e,t,n,o){o=o||{};let r=o.theme||"vs",s=o.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(!s)return console.error("Mode not detected"),Promise.resolve();let a=t.getLanguageIdByMimeType(s)||s;e.setTheme(r);let l=n.firstChild?n.firstChild.nodeValue:"";n.className+=" "+r;let c=d=>{var u;let h=(u=Kfe?.createHTML(d))!==null&&u!==void 0?u:d;n.innerHTML=h};return this.colorize(t,l||"",a,o).then(c,d=>console.error(d))}static async colorize(e,t,n,o){let r=e.languageIdCodec,s=4;o&&typeof o.tabSize=="number"&&(s=o.tabSize),FC(t)&&(t=t.substr(1));let a=Ec(t);if(!e.isRegisteredLanguageId(n))return BKe(a,s,r);let l=await Eo.getOrCreate(n);return l?$Dt(a,s,l,r):BKe(a,s,r)}static colorizeLine(e,t,n,o,r=4){let s=Ed.isBasicASCII(e,t),a=Ed.containsRTL(e,s,n);return _w(new uu(!1,!0,e,!1,s,a,0,o,[],r,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,n=4){let o=e.getLineContent(t);e.tokenization.forceTokenization(t);let s=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(o,e.mightContainNonBasicASCII(),e.mightContainRTL(),s,n)}}});var WKe=P(()=>{});function $Ke(i){q5=document.createElement("div"),q5.className="monaco-aria-container";let e=()=>{let n=document.createElement("div");return n.className="monaco-alert",n.setAttribute("role","alert"),n.setAttribute("aria-atomic","true"),q5.appendChild(n),n};oj=e(),Yfe=e();let t=()=>{let n=document.createElement("div");return n.className="monaco-status",n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),q5.appendChild(n),n};rj=t(),Zfe=t(),i.appendChild(q5)}function Hs(i){q5&&(oj.textContent!==i?(is(Yfe),sj(oj,i)):(is(oj),sj(Yfe,i)))}function hu(i){q5&&(rj.textContent!==i?(is(Zfe),sj(rj,i)):(is(rj),sj(Zfe,i)))}function sj(i,e){is(i),e.length>UKe&&(e=e.substr(0,UKe)),i.textContent=e,i.style.visibility="hidden",i.style.visibility="visible"}var UKe,q5,oj,Yfe,rj,Zfe,Xl=P(()=>{Qt();WKe();UKe=2e4});var xw,lj=P(()=>{_i();xw=vi("markerDecorationsService")});var qDt,GDt,vI,jKe=P(()=>{lj();an();qDt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},GDt=function(i,e){return function(t,n){e(t,n,i)}},vI=class{constructor(e,t){}dispose(){}};vI.ID="editor.contrib.markerDecorations";vI=qDt([GDt(1,xw)],vI);Ii(vI.ID,vI,0)});var qKe=P(()=>{});var Sw,Xfe=P(()=>{nt();Xt();Qt();Sw=class extends ue{constructor(e,t){super(),this._onDidChange=this._register(new ge),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null,t=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()},n=!1,o=!1,r=()=>{if(n&&!o)try{n=!1,o=!0,t()}finally{za(pi(this._referenceDomElement),()=>{o=!1,r()})}};this._resizeObserver=new ResizeObserver(s=>{s&&s[0]&&s[0].contentRect?e={width:s[0].contentRect.width,height:s[0].contentRect.height}:e=null,n=!0,r()}),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let n=0,o=0;t?(n=t.width,o=t.height):this._referenceDomElement&&(n=this._referenceDomElement.clientWidth,o=this._referenceDomElement.clientHeight),n=Math.max(5,n),o=Math.max(5,o),(this._width!==n||this._height!==o)&&(this._width=n,this._height=o,e&&this._onDidChange.fire())}}});function ym(i,e){kw.items.push(new kw(i,e))}function ah(i,e){ym(i,(t,n,o)=>{if(typeof t<"u"){for(let[r,s]of e)if(t===r){o(i,s);return}}})}function GKe(i){kw.items.forEach(e=>e.apply(i))}var kw,KDt,KKe=P(()=>{kw=class i{constructor(e,t){this.key=e,this.migrate=t}apply(e){let t=i._read(e,this.key),n=r=>i._read(e,r),o=(r,s)=>i._write(e,r,s);this.migrate(t,n,o)}static _read(e,t){if(typeof e>"u")return;let n=t.indexOf(".");if(n>=0){let o=t.substring(0,n);return this._read(e[o],t.substring(n+1))}return e[t]}static _write(e,t,n){let o=t.indexOf(".");if(o>=0){let r=t.substring(0,o);e[r]=e[r]||{},this._write(e[r],t.substring(o+1),n);return}e[t]=n}};kw.items=[];ah("wordWrap",[[!0,"on"],[!1,"off"]]);ah("lineNumbers",[[!0,"on"],[!1,"off"]]);ah("cursorBlinking",[["visible","solid"]]);ah("renderWhitespace",[[!0,"boundary"],[!1,"none"]]);ah("renderLineHighlight",[[!0,"line"],[!1,"none"]]);ah("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]);ah("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]);ah("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);ah("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);ah("autoIndent",[[!1,"advanced"],[!0,"full"]]);ah("matchBrackets",[[!0,"always"],[!1,"never"]]);ah("renderFinalNewline",[[!0,"on"],[!1,"off"]]);ah("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]);ah("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]);ah("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]);ym("autoClosingBrackets",(i,e,t)=>{i===!1&&(t("autoClosingBrackets","never"),typeof e("autoClosingQuotes")>"u"&&t("autoClosingQuotes","never"),typeof e("autoSurround")>"u"&&t("autoSurround","never"))});ym("renderIndentGuides",(i,e,t)=>{typeof i<"u"&&(t("renderIndentGuides",void 0),typeof e("guides.indentation")>"u"&&t("guides.indentation",!!i))});ym("highlightActiveIndentGuide",(i,e,t)=>{typeof i<"u"&&(t("highlightActiveIndentGuide",void 0),typeof e("guides.highlightActiveIndentation")>"u"&&t("guides.highlightActiveIndentation",!!i))});KDt={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};ym("suggest.filteredTypes",(i,e,t)=>{if(i&&typeof i=="object"){for(let n of Object.entries(KDt))i[n[0]]===!1&&typeof e(`suggest.${n[1]}`)>"u"&&t(`suggest.${n[1]}`,!1);t("suggest.filteredTypes",void 0)}});ym("quickSuggestions",(i,e,t)=>{if(typeof i=="boolean"){let n=i?"on":"off";t("quickSuggestions",{comments:n,strings:n,other:n})}});ym("experimental.stickyScroll.enabled",(i,e,t)=>{typeof i=="boolean"&&(t("experimental.stickyScroll.enabled",void 0),typeof e("stickyScroll.enabled")>"u"&&t("stickyScroll.enabled",i))});ym("experimental.stickyScroll.maxLineCount",(i,e,t)=>{typeof i=="number"&&(t("experimental.stickyScroll.maxLineCount",void 0),typeof e("stickyScroll.maxLineCount")>"u"&&t("stickyScroll.maxLineCount",i))});ym("codeActionsOnSave",(i,e,t)=>{if(i&&typeof i=="object"){let n=!1,o={};for(let r of Object.entries(i))typeof r[1]=="boolean"?(n=!0,o[r[0]]=r[1]?"explicit":"never"):o[r[0]]=r[1];n&&t("codeActionsOnSave",o)}});ym("codeActionWidget.includeNearbyQuickfixes",(i,e,t)=>{typeof i=="boolean"&&(t("codeActionWidget.includeNearbyQuickfixes",void 0),typeof e("codeActionWidget.includeNearbyQuickFixes")>"u"&&t("codeActionWidget.includeNearbyQuickFixes",i))});ym("lightbulb.enabled",(i,e,t)=>{typeof i=="boolean"&&t("lightbulb.enabled",i?void 0:"off")})});var Qfe,c4,cj=P(()=>{Xt();Qfe=class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new ge,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}},c4=new Qfe});var Ba,G5,Yh=P(()=>{Xi();_i();Ba=vi("accessibilityService"),G5=new Bt("accessibilityModeEnabled",!1)});function XDt(i){let e=0;for(;i;)i=Math.floor(i/10),e++;return e||1}function QDt(){let i="";return!Xu&&!fU&&(i+="no-user-select "),Xu&&(i+="no-minimap-shadow ",i+="enable-user-select "),Wi&&(i+="mac "),i}function YKe(i){let e=Q1(i);return GKe(e),e}var YDt,ZDt,dj,Jfe,e1e,K5,ZKe=P(()=>{Xc();Vi();Xt();nt();Gc();Mn();Xfe();Zue();KKe();cj();Ks();BC();mU();Yh();YDt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},ZDt=function(i,e){return function(t,n){e(t,n,i)}},dj=class extends ue{constructor(e,t,n,o){super(),this._accessibilityService=o,this._onDidChange=this._register(new ge),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new ge),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new nT,this.isSimpleWidget=e,this._containerObserver=this._register(new Sw(n,t.dimension)),this._rawOptions=YKe(t),this._validatedOptions=K5.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(Qc.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(c4.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(xT.onDidChange(()=>this._recomputeOptions())),this._register(P3.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){let e=this._computeOptions(),t=K5.checkEquals(this.options,e);t!==null&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){let e=this._readEnvConfiguration(),t=g5.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),n=this._readFontInfo(t),o={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:n,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:c4.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return K5.computeOptions(this._validatedOptions,o)}_readEnvConfiguration(){return{extraEditorClassName:QDt(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:cm||Aa,pixelRatio:P3.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return xT.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){let t=YKe(e);K5.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=K5.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){let t=XDt(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};dj=YDt([ZDt(3,Ba)],dj);Jfe=class{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}},e1e=class{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}},K5=class i{static validateOptions(e){let t=new Jfe;for(let n of S3){let o=n.name==="_never_"?void 0:e[n.name];t._write(n.id,n.validate(o))}return t}static computeOptions(e,t){let n=new e1e;for(let o of S3)n._write(o.id,o.compute(t,n,e._read(o.id)));return n}static _deepEquals(e,t){if(typeof e!="object"||typeof t!="object"||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)?uo(e,t):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(!i._deepEquals(e[n],t[n]))return!1;return!0}static checkEquals(e,t){let n=[],o=!1;for(let r of S3){let s=!i._deepEquals(e._read(r.id),t._read(r.id));n[r.id]=s,s&&(o=!0)}return o?new SC(n):null}static applyUpdate(e,t){let n=!1;for(let o of S3)if(t.hasOwnProperty(o.name)){let r=o.applyUpdate(e[o.name],t[o.name]);e[o.name]=r.newValue,n=n||r.didChange}return n}}});var Jg,t1e=P(()=>{(function(i){let e={total:0,min:Number.MAX_VALUE,max:0},t={...e},n={...e},o={...e},r=0,s={keydown:0,input:0,render:0};function a(){_(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),s.keydown=1,queueMicrotask(l)}i.onKeyDown=a;function l(){s.keydown===1&&(performance.mark("keydown/end"),s.keydown=2)}function c(){performance.mark("input/start"),s.input=1,y()}i.onBeforeInput=c;function d(){s.input===0&&c(),queueMicrotask(u)}i.onInput=d;function u(){s.input===1&&(performance.mark("input/end"),s.input=2)}function h(){_()}i.onKeyUp=h;function f(){_()}i.onSelectionChange=f;function p(){s.keydown===2&&s.input===2&&s.render===0&&(performance.mark("render/start"),s.render=1,queueMicrotask(m),y())}i.onRenderStart=p;function m(){s.render===1&&(performance.mark("render/end"),s.render=2)}function y(){setTimeout(_)}function _(){s.keydown===2&&s.input===2&&s.render===2&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),v("keydown",e),v("input",t),v("render",n),v("inputlatency",o),r++,b())}function v(x,k){let D=performance.getEntriesByName(x)[0].duration;k.total+=D,k.min=Math.min(k.min,D),k.max=Math.max(k.max,D)}function b(){performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),s.keydown=0,s.input=0,s.render=0}function C(){if(r===0)return;let x={keydown:w(e),input:w(t),render:w(n),total:w(o),sampleCount:r};return S(e),S(t),S(n),S(o),r=0,x}i.getAndClearMeasurements=C;function w(x){return{average:x.total/r,max:x.max,min:x.min}}function S(x){x.total=0,x.min=Number.MAX_VALUE,x.max=0}})(Jg||(Jg={}))});var Jf,Lw=P(()=>{Qt();nt();Jf=class{constructor(){this._hooks=new Ye,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,n,o,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=o,this._onStopCallback=r;let s=e;try{e.setPointerCapture(t),this._hooks.add(Yt(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{s=pi(e)}this._hooks.add(Xe(s,Lt.POINTER_MOVE,a=>{if(a.buttons!==n){this.stopMonitoring(!0);return}a.preventDefault(),this._pointerMoveCallback(a)})),this._hooks.add(Xe(s,Lt.POINTER_UP,a=>this.stopMonitoring(!0)))}}});function gj(i){return`--vscode-${i.replace(/\./g,"-")}`}function ai(i){return`var(${gj(i)})`}function nYe(i,e){return`var(${gj(i)}, ${e})`}function me(i,e,t,n,o){return vj.registerColor(i,e,t,n,o)}function JDt(i,e){var t,n,o,r;switch(i.op){case 0:return(t=Cm(i.value,e))===null||t===void 0?void 0:t.darken(i.factor);case 1:return(n=Cm(i.value,e))===null||n===void 0?void 0:n.lighten(i.factor);case 2:return(o=Cm(i.value,e))===null||o===void 0?void 0:o.transparent(i.factor);case 3:{let s=Cm(i.background,e);return s?(r=Cm(i.value,e))===null||r===void 0?void 0:r.makeOpaque(s):Cm(i.value,e)}case 4:for(let s of i.values){let a=Cm(s,e);if(a)return a}return;case 6:return Cm(e.defines(i.if)?i.then:i.else,e);case 5:{let s=Cm(i.value,e);if(!s)return;let a=Cm(i.background,e);return a?s.isDarkerThan(a)?it.getLighterColor(s,a,i.factor).transparent(i.transparency):it.getDarkerColor(s,a,i.factor).transparent(i.transparency):s.transparent(i.factor*i.transparency)}default:throw O3(i)}}function Q5(i,e){return{op:0,value:i,factor:e}}function km(i,e){return{op:1,value:i,factor:e}}function Ei(i,e){return{op:2,value:i,factor:e}}function Bw(...i){return{op:4,values:i}}function eTt(i,e,t){return{op:6,if:i,then:e,else:t}}function tYe(i,e,t,n){return{op:5,value:i,background:e,factor:t,transparency:n}}function Cm(i,e){if(i!==null){if(typeof i=="string")return i[0]==="#"?it.fromHex(i):e.getColor(i);if(i instanceof it)return i;if(typeof i=="object")return JDt(i,e)}}var n1e,i1e,vj,Ut,x5i,oYe,S5i,wm,fu,Fn,Uo,k5i,L5i,rYe,E5i,D5i,T5i,I5i,M5i,N5i,Zh,Vw,_j,bj,yj,Ww,A5i,Lm,Uw,R5i,sYe,aYe,lYe,cYe,dYe,uYe,hYe,fYe,pYe,xm,mYe,e2,cv,Ew,gYe,Dw,vYe,_Ye,bYe,hj,yYe,_I,CYe,Tw,Iw,Mw,Nw,wYe,P5i,lp,xYe,yI,Ll,Z5,O5i,Ql,X5,SYe,z5i,F5i,Xs,lh,H5i,B5i,V5i,W5i,Fr,cp,e1,kYe,o1e,LYe,EYe,Cj,DYe,TYe,IYe,MYe,NYe,d4,AYe,r1e,CI,U5i,RYe,t1,PYe,OYe,t2,zYe,$5i,j5i,q5i,G5i,bI,K5i,wj,Y5i,FYe,i2,n2,HYe,BYe,VYe,WYe,uj,Z5i,X5i,fj,pj,UYe,$Ye,Q5i,J5i,ebi,tbi,jYe,qYe,ibi,nbi,obi,rbi,sbi,abi,lbi,GYe,KYe,YYe,ZYe,o2,Sm,Aw,XYe,QYe,JYe,eZe,tZe,s1e,a1e,iZe,nZe,Xh,wI,cbi,dbi,ubi,oZe,rZe,sZe,aZe,hbi,fbi,Rw,lZe,cZe,dZe,pbi,uZe,mbi,hZe,fZe,gbi,XKe,r2,u4,s2,pZe,mZe,gZe,vZe,_Ze,bZe,yZe,mj,vbi,_bi,bbi,ybi,Cbi,wbi,CZe,wZe,l1e,xZe,xbi,SZe,QKe,JKe,eYe,dp,Fw,Pw,Sbi,Ow,kbi,zw,Lbi,Hw,Ebi,Dbi,Tbi,xj,$w,Y5,xI,c1e,kZe,LZe,EZe,DZe,TZe,Ibi,Mbi,Nbi,IZe,MZe,NZe,Abi,Rbi,Pbi,Obi,zbi,Fbi,Hbi,Bbi,AZe,RZe,iYe,pr=P(()=>{um();Qi();sa();Xt();Wt();C$();Ys();n1e={ColorContribution:"base.contributions.colors"},i1e=class{constructor(){this._onDidChangeSchema=new ge,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,n,o=!1,r){let s={id:e,description:n,defaults:t,needsTransparency:o,deprecationMessage:r};this.colorsById[e]=s;let a={type:"string",description:n,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return r&&(a.deprecationMessage=r),o&&(a.pattern="^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",a.patternErrorMessage="This color must be transparent or it will obscure content"),this.colorSchema.properties[e]=a,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map(e=>this.colorsById[e])}resolveDefaultColor(e,t){let n=this.colorsById[e];if(n&&n.defaults){let o=n.defaults[t.type];return Cm(o,t)}}getColorSchema(){return this.colorSchema}toString(){let e=(t,n)=>{let o=t.indexOf(".")===-1?0:1,r=n.indexOf(".")===-1?0:1;return o!==r?o-r:t.localeCompare(n)};return Object.keys(this.colorsById).sort(e).map(t=>`- \`${t}\`: ${this.colorsById[t].description}`).join(` +`)}},vj=new i1e;jn.add(n1e.ColorContribution,vj);Ut=me("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},g("foreground","Overall foreground color. This color is only used if not overridden by a component.")),x5i=me("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},g("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),oYe=me("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},g("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),S5i=me("descriptionForeground",{light:"#717171",dark:Ei(Ut,.7),hcDark:Ei(Ut,.7),hcLight:Ei(Ut,.7)},g("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),wm=me("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},g("iconForeground","The default color for icons in the workbench.")),fu=me("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},g("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),Fn=me("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},g("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),Uo=me("contrastActiveBorder",{light:null,dark:null,hcDark:fu,hcLight:fu},g("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),k5i=me("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},g("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),L5i=me("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:it.black,hcLight:"#292929"},g("textSeparatorForeground","Color for text separators.")),rYe=me("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},g("textLinkForeground","Foreground color for links in text.")),E5i=me("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},g("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),D5i=me("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},g("textPreformatForeground","Foreground color for preformatted text segments.")),T5i=me("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},g("textPreformatBackground","Background color for preformatted text segments.")),I5i=me("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},g("textBlockQuoteBackground","Background color for block quotes in text.")),M5i=me("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:it.white,hcLight:"#292929"},g("textBlockQuoteBorder","Border color for block quotes in text.")),N5i=me("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:it.black,hcLight:"#F2F2F2"},g("textCodeBlockBackground","Background color for code blocks in text.")),Zh=me("widget.shadow",{dark:Ei(it.black,.36),light:Ei(it.black,.16),hcDark:null,hcLight:null},g("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),Vw=me("widget.border",{dark:null,light:null,hcDark:Fn,hcLight:Fn},g("widgetBorder","Border color of widgets such as find/replace inside the editor.")),_j=me("input.background",{dark:"#3C3C3C",light:it.white,hcDark:it.black,hcLight:it.white},g("inputBoxBackground","Input box background.")),bj=me("input.foreground",{dark:Ut,light:Ut,hcDark:Ut,hcLight:Ut},g("inputBoxForeground","Input box foreground.")),yj=me("input.border",{dark:null,light:null,hcDark:Fn,hcLight:Fn},g("inputBoxBorder","Input box border.")),Ww=me("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:Fn,hcLight:Fn},g("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),A5i=me("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},g("inputOption.hoverBackground","Background color of activated options in input fields.")),Lm=me("inputOption.activeBackground",{dark:Ei(fu,.4),light:Ei(fu,.2),hcDark:it.transparent,hcLight:it.transparent},g("inputOption.activeBackground","Background hover color of options in input fields.")),Uw=me("inputOption.activeForeground",{dark:it.white,light:it.black,hcDark:Ut,hcLight:Ut},g("inputOption.activeForeground","Foreground color of activated options in input fields.")),R5i=me("input.placeholderForeground",{light:Ei(Ut,.5),dark:Ei(Ut,.5),hcDark:Ei(Ut,.7),hcLight:Ei(Ut,.7)},g("inputPlaceholderForeground","Input box foreground color for placeholder text.")),sYe=me("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:it.black,hcLight:it.white},g("inputValidationInfoBackground","Input validation background color for information severity.")),aYe=me("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:Ut},g("inputValidationInfoForeground","Input validation foreground color for information severity.")),lYe=me("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:Fn,hcLight:Fn},g("inputValidationInfoBorder","Input validation border color for information severity.")),cYe=me("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:it.black,hcLight:it.white},g("inputValidationWarningBackground","Input validation background color for warning severity.")),dYe=me("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:Ut},g("inputValidationWarningForeground","Input validation foreground color for warning severity.")),uYe=me("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:Fn,hcLight:Fn},g("inputValidationWarningBorder","Input validation border color for warning severity.")),hYe=me("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:it.black,hcLight:it.white},g("inputValidationErrorBackground","Input validation background color for error severity.")),fYe=me("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:Ut},g("inputValidationErrorForeground","Input validation foreground color for error severity.")),pYe=me("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:Fn,hcLight:Fn},g("inputValidationErrorBorder","Input validation border color for error severity.")),xm=me("dropdown.background",{dark:"#3C3C3C",light:it.white,hcDark:it.black,hcLight:it.white},g("dropdownBackground","Dropdown background.")),mYe=me("dropdown.listBackground",{dark:null,light:null,hcDark:it.black,hcLight:it.white},g("dropdownListBackground","Dropdown list background.")),e2=me("dropdown.foreground",{dark:"#F0F0F0",light:Ut,hcDark:it.white,hcLight:Ut},g("dropdownForeground","Dropdown foreground.")),cv=me("dropdown.border",{dark:xm,light:"#CECECE",hcDark:Fn,hcLight:Fn},g("dropdownBorder","Dropdown border.")),Ew=me("button.foreground",{dark:it.white,light:it.white,hcDark:it.white,hcLight:it.white},g("buttonForeground","Button foreground color.")),gYe=me("button.separator",{dark:Ei(Ew,.4),light:Ei(Ew,.4),hcDark:Ei(Ew,.4),hcLight:Ei(Ew,.4)},g("buttonSeparator","Button separator color.")),Dw=me("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},g("buttonBackground","Button background color.")),vYe=me("button.hoverBackground",{dark:km(Dw,.2),light:Q5(Dw,.2),hcDark:Dw,hcLight:Dw},g("buttonHoverBackground","Button background color when hovering.")),_Ye=me("button.border",{dark:Fn,light:Fn,hcDark:Fn,hcLight:Fn},g("buttonBorder","Button border color.")),bYe=me("button.secondaryForeground",{dark:it.white,light:it.white,hcDark:it.white,hcLight:Ut},g("buttonSecondaryForeground","Secondary button foreground color.")),hj=me("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:it.white},g("buttonSecondaryBackground","Secondary button background color.")),yYe=me("button.secondaryHoverBackground",{dark:km(hj,.2),light:Q5(hj,.2),hcDark:null,hcLight:null},g("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),_I=me("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:it.black,hcLight:"#0F4A85"},g("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),CYe=me("badge.foreground",{dark:it.white,light:"#333",hcDark:it.white,hcLight:it.white},g("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),Tw=me("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},g("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),Iw=me("scrollbarSlider.background",{dark:it.fromHex("#797979").transparent(.4),light:it.fromHex("#646464").transparent(.4),hcDark:Ei(Fn,.6),hcLight:Ei(Fn,.4)},g("scrollbarSliderBackground","Scrollbar slider background color.")),Mw=me("scrollbarSlider.hoverBackground",{dark:it.fromHex("#646464").transparent(.7),light:it.fromHex("#646464").transparent(.7),hcDark:Ei(Fn,.8),hcLight:Ei(Fn,.8)},g("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),Nw=me("scrollbarSlider.activeBackground",{dark:it.fromHex("#BFBFBF").transparent(.4),light:it.fromHex("#000000").transparent(.6),hcDark:Fn,hcLight:Fn},g("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),wYe=me("progressBar.background",{dark:it.fromHex("#0E70C0"),light:it.fromHex("#0E70C0"),hcDark:Fn,hcLight:Fn},g("progressBarBackground","Background color of the progress bar that can show for long running operations.")),P5i=me("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},g("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),lp=me("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},g("editorError.foreground","Foreground color of error squigglies in the editor.")),xYe=me("editorError.border",{dark:null,light:null,hcDark:it.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},g("errorBorder","If set, color of double underlines for errors in the editor.")),yI=me("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},g("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Ll=me("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},g("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),Z5=me("editorWarning.border",{dark:null,light:null,hcDark:it.fromHex("#FFCC00").transparent(.8),hcLight:it.fromHex("#FFCC00").transparent(.8)},g("warningBorder","If set, color of double underlines for warnings in the editor.")),O5i=me("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},g("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Ql=me("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},g("editorInfo.foreground","Foreground color of info squigglies in the editor.")),X5=me("editorInfo.border",{dark:null,light:null,hcDark:it.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},g("infoBorder","If set, color of double underlines for infos in the editor.")),SYe=me("editorHint.foreground",{dark:it.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},g("editorHint.foreground","Foreground color of hint squigglies in the editor.")),z5i=me("editorHint.border",{dark:null,light:null,hcDark:it.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},g("hintBorder","If set, color of double underlines for hints in the editor.")),F5i=me("sash.hoverBorder",{dark:fu,light:fu,hcDark:fu,hcLight:fu},g("sashActiveBorder","Border color of active sashes.")),Xs=me("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:it.black,hcLight:it.white},g("editorBackground","Editor background color.")),lh=me("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:it.white,hcLight:Ut},g("editorForeground","Editor default foreground color.")),H5i=me("editorStickyScroll.background",{light:Xs,dark:Xs,hcDark:Xs,hcLight:Xs},g("editorStickyScrollBackground","Background color of sticky scroll in the editor")),B5i=me("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:it.fromHex("#0F4A85").transparent(.1)},g("editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor")),V5i=me("editorStickyScroll.border",{dark:null,light:null,hcDark:Fn,hcLight:Fn},g("editorStickyScrollBorder","Border color of sticky scroll in the editor")),W5i=me("editorStickyScroll.shadow",{dark:Tw,light:Tw,hcDark:Tw,hcLight:Tw},g("editorStickyScrollShadow"," Shadow color of sticky scroll in the editor")),Fr=me("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:it.white},g("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),cp=me("editorWidget.foreground",{dark:Ut,light:Ut,hcDark:Ut,hcLight:Ut},g("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),e1=me("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:Fn,hcLight:Fn},g("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),kYe=me("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},g("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),o1e=me("quickInput.background",{dark:Fr,light:Fr,hcDark:Fr,hcLight:Fr},g("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),LYe=me("quickInput.foreground",{dark:cp,light:cp,hcDark:cp,hcLight:cp},g("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),EYe=me("quickInputTitle.background",{dark:new it(new On(255,255,255,.105)),light:new it(new On(0,0,0,.06)),hcDark:"#000000",hcLight:it.white},g("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),Cj=me("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:it.white,hcLight:"#0F4A85"},g("pickerGroupForeground","Quick picker color for grouping labels.")),DYe=me("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:it.white,hcLight:"#0F4A85"},g("pickerGroupBorder","Quick picker color for grouping borders.")),TYe=me("keybindingLabel.background",{dark:new it(new On(128,128,128,.17)),light:new it(new On(221,221,221,.4)),hcDark:it.transparent,hcLight:it.transparent},g("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),IYe=me("keybindingLabel.foreground",{dark:it.fromHex("#CCCCCC"),light:it.fromHex("#555555"),hcDark:it.white,hcLight:Ut},g("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),MYe=me("keybindingLabel.border",{dark:new it(new On(51,51,51,.6)),light:new it(new On(204,204,204,.4)),hcDark:new it(new On(111,195,223)),hcLight:Fn},g("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),NYe=me("keybindingLabel.bottomBorder",{dark:new it(new On(68,68,68,.6)),light:new it(new On(187,187,187,.4)),hcDark:new it(new On(111,195,223)),hcLight:Ut},g("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),d4=me("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},g("editorSelectionBackground","Color of the editor selection.")),AYe=me("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:it.white},g("editorSelectionForeground","Color of the selected text for high contrast.")),r1e=me("editor.inactiveSelectionBackground",{light:Ei(d4,.5),dark:Ei(d4,.5),hcDark:Ei(d4,.7),hcLight:Ei(d4,.5)},g("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),CI=me("editor.selectionHighlightBackground",{light:tYe(d4,Xs,.3,.6),dark:tYe(d4,Xs,.3,.6),hcDark:null,hcLight:null},g("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),U5i=me("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:Uo,hcLight:Uo},g("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),RYe=me("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},g("editorFindMatch","Color of the current search match.")),t1=me("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},g("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),PYe=me("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},g("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),OYe=me("editor.findMatchBorder",{light:null,dark:null,hcDark:Uo,hcLight:Uo},g("editorFindMatchBorder","Border color of the current search match.")),t2=me("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:Uo,hcLight:Uo},g("findMatchHighlightBorder","Border color of the other search matches.")),zYe=me("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:Ei(Uo,.4),hcLight:Ei(Uo,.4)},g("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),$5i=me("searchEditor.findMatchBackground",{light:Ei(t1,.66),dark:Ei(t1,.66),hcDark:t1,hcLight:t1},g("searchEditor.queryMatch","Color of the Search Editor query matches.")),j5i=me("searchEditor.findMatchBorder",{light:Ei(t2,.66),dark:Ei(t2,.66),hcDark:t2,hcLight:t2},g("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches.")),q5i=me("search.resultsInfoForeground",{light:Ut,dark:Ei(Ut,.65),hcDark:Ut,hcLight:Ut},g("search.resultsInfoForeground","Color of the text in the search viewlet's completion message.")),G5i=me("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},g("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),bI=me("editorHoverWidget.background",{light:Fr,dark:Fr,hcDark:Fr,hcLight:Fr},g("hoverBackground","Background color of the editor hover.")),K5i=me("editorHoverWidget.foreground",{light:cp,dark:cp,hcDark:cp,hcLight:cp},g("hoverForeground","Foreground color of the editor hover.")),wj=me("editorHoverWidget.border",{light:e1,dark:e1,hcDark:e1,hcLight:e1},g("hoverBorder","Border color of the editor hover.")),Y5i=me("editorHoverWidget.statusBarBackground",{dark:km(bI,.2),light:Q5(bI,.05),hcDark:Fr,hcLight:Fr},g("statusBarBackground","Background color of the editor hover status bar.")),FYe=me("editorLink.activeForeground",{dark:"#4E94CE",light:it.blue,hcDark:it.cyan,hcLight:"#292929"},g("activeLinkForeground","Color of active links.")),i2=me("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:it.white,hcLight:it.black},g("editorInlayHintForeground","Foreground color of inline hints")),n2=me("editorInlayHint.background",{dark:Ei(_I,.1),light:Ei(_I,.1),hcDark:Ei(it.white,.1),hcLight:Ei(_I,.1)},g("editorInlayHintBackground","Background color of inline hints")),HYe=me("editorInlayHint.typeForeground",{dark:i2,light:i2,hcDark:i2,hcLight:i2},g("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),BYe=me("editorInlayHint.typeBackground",{dark:n2,light:n2,hcDark:n2,hcLight:n2},g("editorInlayHintBackgroundTypes","Background color of inline hints for types")),VYe=me("editorInlayHint.parameterForeground",{dark:i2,light:i2,hcDark:i2,hcLight:i2},g("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),WYe=me("editorInlayHint.parameterBackground",{dark:n2,light:n2,hcDark:n2,hcLight:n2},g("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),uj=me("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},g("editorLightBulbForeground","The color used for the lightbulb actions icon.")),Z5i=me("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),X5i=me("editorLightBulbAi.foreground",{dark:uj,light:uj,hcDark:uj,hcLight:uj},g("editorLightBulbAiForeground","The color used for the lightbulb AI icon.")),fj=new it(new On(155,185,85,.2)),pj=new it(new On(255,0,0,.2)),UYe=me("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},g("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),$Ye=me("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},g("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),Q5i=me("diffEditor.insertedLineBackground",{dark:fj,light:fj,hcDark:null,hcLight:null},g("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),J5i=me("diffEditor.removedLineBackground",{dark:pj,light:pj,hcDark:null,hcLight:null},g("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),ebi=me("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},g("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),tbi=me("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},g("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),jYe=me("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},g("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),qYe=me("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},g("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),ibi=me("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},g("diffEditorInsertedOutline","Outline color for the text that got inserted.")),nbi=me("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},g("diffEditorRemovedOutline","Outline color for text that got removed.")),obi=me("diffEditor.border",{dark:null,light:null,hcDark:Fn,hcLight:Fn},g("diffEditorBorder","Border color between the two text editors.")),rbi=me("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},g("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),sbi=me("diffEditor.unchangedRegionBackground",{dark:"sideBar.background",light:"sideBar.background",hcDark:"sideBar.background",hcLight:"sideBar.background"},g("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor.")),abi=me("diffEditor.unchangedRegionForeground",{dark:"foreground",light:"foreground",hcDark:"foreground",hcLight:"foreground"},g("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor.")),lbi=me("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},g("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor.")),GYe=me("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},g("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),KYe=me("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},g("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),YYe=me("list.focusOutline",{dark:fu,light:fu,hcDark:Uo,hcLight:Uo},g("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),ZYe=me("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},g("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),o2=me("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:it.fromHex("#0F4A85").transparent(.1)},g("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Sm=me("list.activeSelectionForeground",{dark:it.white,light:it.white,hcDark:null,hcLight:null},g("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Aw=me("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},g("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),XYe=me("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:it.fromHex("#0F4A85").transparent(.1)},g("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),QYe=me("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},g("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),JYe=me("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},g("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),eZe=me("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},g("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tZe=me("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},g("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),s1e=me("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:it.white.transparent(.1),hcLight:it.fromHex("#0F4A85").transparent(.1)},g("listHoverBackground","List/Tree background when hovering over items using the mouse.")),a1e=me("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},g("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),iZe=me("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},g("listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),nZe=me("list.dropBetweenBackground",{dark:wm,light:wm,hcDark:null,hcLight:null},g("listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),Xh=me("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:fu,hcLight:fu},g("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),wI=me("list.focusHighlightForeground",{dark:Xh,light:eTt(o2,Xh,"#BBE7FF"),hcDark:Xh,hcLight:Xh},g("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),cbi=me("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},g("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),dbi=me("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},g("listErrorForeground","Foreground color of list items containing errors.")),ubi=me("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},g("listWarningForeground","Foreground color of list items containing warnings.")),oZe=me("listFilterWidget.background",{light:Q5(Fr,0),dark:km(Fr,0),hcDark:Fr,hcLight:Fr},g("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),rZe=me("listFilterWidget.outline",{dark:it.transparent,light:it.transparent,hcDark:"#f38518",hcLight:"#007ACC"},g("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),sZe=me("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:Fn,hcLight:Fn},g("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),aZe=me("listFilterWidget.shadow",{dark:Zh,light:Zh,hcDark:Zh,hcLight:Zh},g("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees.")),hbi=me("list.filterMatchBackground",{dark:t1,light:t1,hcDark:null,hcLight:null},g("listFilterMatchHighlight","Background color of the filtered match.")),fbi=me("list.filterMatchBorder",{dark:t2,light:t2,hcDark:Fn,hcLight:Uo},g("listFilterMatchHighlightBorder","Border color of the filtered match.")),Rw=me("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},g("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),lZe=me("tree.inactiveIndentGuidesStroke",{dark:Ei(Rw,.4),light:Ei(Rw,.4),hcDark:Ei(Rw,.4),hcLight:Ei(Rw,.4)},g("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),cZe=me("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},g("tableColumnsBorder","Table border color between columns.")),dZe=me("tree.tableOddRowsBackground",{dark:Ei(Ut,.04),light:Ei(Ut,.04),hcDark:null,hcLight:null},g("tableOddRowsBackgroundColor","Background color for odd table rows.")),pbi=me("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},g("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized. ")),uZe=me("checkbox.background",{dark:xm,light:xm,hcDark:xm,hcLight:xm},g("checkbox.background","Background color of checkbox widget.")),mbi=me("checkbox.selectBackground",{dark:Fr,light:Fr,hcDark:Fr,hcLight:Fr},g("checkbox.select.background","Background color of checkbox widget when the element it's in is selected.")),hZe=me("checkbox.foreground",{dark:e2,light:e2,hcDark:e2,hcLight:e2},g("checkbox.foreground","Foreground color of checkbox widget.")),fZe=me("checkbox.border",{dark:cv,light:cv,hcDark:cv,hcLight:cv},g("checkbox.border","Border color of checkbox widget.")),gbi=me("checkbox.selectBorder",{dark:wm,light:wm,hcDark:wm,hcLight:wm},g("checkbox.select.border","Border color of checkbox widget when the element it's in is selected.")),XKe=me("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,g("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),r2=me("quickInputList.focusForeground",{dark:Sm,light:Sm,hcDark:Sm,hcLight:Sm},g("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),u4=me("quickInputList.focusIconForeground",{dark:Aw,light:Aw,hcDark:Aw,hcLight:Aw},g("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),s2=me("quickInputList.focusBackground",{dark:Bw(XKe,o2),light:Bw(XKe,o2),hcDark:null,hcLight:null},g("quickInput.listFocusBackground","Quick picker background color for the focused item.")),pZe=me("menu.border",{dark:null,light:null,hcDark:Fn,hcLight:Fn},g("menuBorder","Border color of menus.")),mZe=me("menu.foreground",{dark:e2,light:e2,hcDark:e2,hcLight:e2},g("menuForeground","Foreground color of menu items.")),gZe=me("menu.background",{dark:xm,light:xm,hcDark:xm,hcLight:xm},g("menuBackground","Background color of menu items.")),vZe=me("menu.selectionForeground",{dark:Sm,light:Sm,hcDark:Sm,hcLight:Sm},g("menuSelectionForeground","Foreground color of the selected menu item in menus.")),_Ze=me("menu.selectionBackground",{dark:o2,light:o2,hcDark:o2,hcLight:o2},g("menuSelectionBackground","Background color of the selected menu item in menus.")),bZe=me("menu.selectionBorder",{dark:null,light:null,hcDark:Uo,hcLight:Uo},g("menuSelectionBorder","Border color of the selected menu item in menus.")),yZe=me("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:Fn,hcLight:Fn},g("menuSeparatorBackground","Color of a separator menu item in menus.")),mj=me("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},g("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),vbi=me("toolbar.hoverOutline",{dark:null,light:null,hcDark:Uo,hcLight:Uo},g("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),_bi=me("toolbar.activeBackground",{dark:km(mj,.1),light:Q5(mj,.1),hcDark:null,hcLight:null},g("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),bbi=me("editor.snippetTabstopHighlightBackground",{dark:new it(new On(124,124,124,.3)),light:new it(new On(10,50,100,.2)),hcDark:new it(new On(124,124,124,.3)),hcLight:new it(new On(10,50,100,.2))},g("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),ybi=me("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},g("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),Cbi=me("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},g("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),wbi=me("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new it(new On(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},g("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),CZe=me("breadcrumb.foreground",{light:Ei(Ut,.8),dark:Ei(Ut,.8),hcDark:Ei(Ut,.8),hcLight:Ei(Ut,.8)},g("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),wZe=me("breadcrumb.background",{light:Xs,dark:Xs,hcDark:Xs,hcLight:Xs},g("breadcrumbsBackground","Background color of breadcrumb items.")),l1e=me("breadcrumb.focusForeground",{light:Q5(Ut,.2),dark:km(Ut,.1),hcDark:km(Ut,.1),hcLight:km(Ut,.1)},g("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),xZe=me("breadcrumb.activeSelectionForeground",{light:Q5(Ut,.2),dark:km(Ut,.1),hcDark:km(Ut,.1),hcLight:km(Ut,.1)},g("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),xbi=me("breadcrumbPicker.background",{light:Fr,dark:Fr,hcDark:Fr,hcLight:Fr},g("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),SZe=.5,QKe=it.fromHex("#40C8AE").transparent(SZe),JKe=it.fromHex("#40A6FF").transparent(SZe),eYe=it.fromHex("#606060").transparent(.4),dp=.4,Fw=1,Pw=me("merge.currentHeaderBackground",{dark:QKe,light:QKe,hcDark:null,hcLight:null},g("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Sbi=me("merge.currentContentBackground",{dark:Ei(Pw,dp),light:Ei(Pw,dp),hcDark:Ei(Pw,dp),hcLight:Ei(Pw,dp)},g("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Ow=me("merge.incomingHeaderBackground",{dark:JKe,light:JKe,hcDark:null,hcLight:null},g("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),kbi=me("merge.incomingContentBackground",{dark:Ei(Ow,dp),light:Ei(Ow,dp),hcDark:Ei(Ow,dp),hcLight:Ei(Ow,dp)},g("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),zw=me("merge.commonHeaderBackground",{dark:eYe,light:eYe,hcDark:null,hcLight:null},g("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Lbi=me("merge.commonContentBackground",{dark:Ei(zw,dp),light:Ei(zw,dp),hcDark:Ei(zw,dp),hcLight:Ei(zw,dp)},g("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Hw=me("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},g("mergeBorder","Border color on headers and the splitter in inline merge-conflicts.")),Ebi=me("editorOverviewRuler.currentContentForeground",{dark:Ei(Pw,Fw),light:Ei(Pw,Fw),hcDark:Hw,hcLight:Hw},g("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),Dbi=me("editorOverviewRuler.incomingContentForeground",{dark:Ei(Ow,Fw),light:Ei(Ow,Fw),hcDark:Hw,hcLight:Hw},g("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),Tbi=me("editorOverviewRuler.commonContentForeground",{dark:Ei(zw,Fw),light:Ei(zw,Fw),hcDark:Hw,hcLight:Hw},g("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),xj=me("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},g("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),$w=me("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},g("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Y5=me("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},g("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),xI=me("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},g("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),c1e=me("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},g("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),kZe=me("minimap.infoHighlight",{dark:Ql,light:Ql,hcDark:X5,hcLight:X5},g("minimapInfo","Minimap marker color for infos.")),LZe=me("minimap.warningHighlight",{dark:Ll,light:Ll,hcDark:Z5,hcLight:Z5},g("overviewRuleWarning","Minimap marker color for warnings.")),EZe=me("minimap.errorHighlight",{dark:new it(new On(255,18,18,.7)),light:new it(new On(255,18,18,.7)),hcDark:new it(new On(255,50,50,1)),hcLight:"#B5200D"},g("minimapError","Minimap marker color for errors.")),DZe=me("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},g("minimapBackground","Minimap background color.")),TZe=me("minimap.foregroundOpacity",{dark:it.fromHex("#000f"),light:it.fromHex("#000f"),hcDark:it.fromHex("#000f"),hcLight:it.fromHex("#000f")},g("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),Ibi=me("minimapSlider.background",{light:Ei(Iw,.5),dark:Ei(Iw,.5),hcDark:Ei(Iw,.5),hcLight:Ei(Iw,.5)},g("minimapSliderBackground","Minimap slider background color.")),Mbi=me("minimapSlider.hoverBackground",{light:Ei(Mw,.5),dark:Ei(Mw,.5),hcDark:Ei(Mw,.5),hcLight:Ei(Mw,.5)},g("minimapSliderHoverBackground","Minimap slider background color when hovering.")),Nbi=me("minimapSlider.activeBackground",{light:Ei(Nw,.5),dark:Ei(Nw,.5),hcDark:Ei(Nw,.5),hcLight:Ei(Nw,.5)},g("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),IZe=me("problemsErrorIcon.foreground",{dark:lp,light:lp,hcDark:lp,hcLight:lp},g("problemsErrorIconForeground","The color used for the problems error icon.")),MZe=me("problemsWarningIcon.foreground",{dark:Ll,light:Ll,hcDark:Ll,hcLight:Ll},g("problemsWarningIconForeground","The color used for the problems warning icon.")),NZe=me("problemsInfoIcon.foreground",{dark:Ql,light:Ql,hcDark:Ql,hcLight:Ql},g("problemsInfoIconForeground","The color used for the problems info icon.")),Abi=me("charts.foreground",{dark:Ut,light:Ut,hcDark:Ut,hcLight:Ut},g("chartsForeground","The foreground color used in charts.")),Rbi=me("charts.lines",{dark:Ei(Ut,.5),light:Ei(Ut,.5),hcDark:Ei(Ut,.5),hcLight:Ei(Ut,.5)},g("chartsLines","The color used for horizontal lines in charts.")),Pbi=me("charts.red",{dark:lp,light:lp,hcDark:lp,hcLight:lp},g("chartsRed","The red color used in chart visualizations.")),Obi=me("charts.blue",{dark:Ql,light:Ql,hcDark:Ql,hcLight:Ql},g("chartsBlue","The blue color used in chart visualizations.")),zbi=me("charts.yellow",{dark:Ll,light:Ll,hcDark:Ll,hcLight:Ll},g("chartsYellow","The yellow color used in chart visualizations.")),Fbi=me("charts.orange",{dark:Y5,light:Y5,hcDark:Y5,hcLight:Y5},g("chartsOrange","The orange color used in chart visualizations.")),Hbi=me("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},g("chartsGreen","The green color used in chart visualizations.")),Bbi=me("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},g("chartsPurple","The purple color used in chart visualizations."));AZe="vscode://schemas/workbench-colors",RZe=jn.as(T5.JSONContribution);RZe.registerSchema(AZe,vj.getColorSchema());iYe=new hn(()=>RZe.notifySchemaChanged(AZe),200);vj.onDidChangeSchema(()=>{iYe.isScheduled()||iYe.schedule()})});function Ej(i){let e=Lo(i);return new d1e(e.left,e.top,e.width,e.height)}function Dj(i,e,t){let n=e.width/i.offsetWidth,o=e.height/i.offsetHeight,r=(t.x-e.x)/n,s=(t.y-e.y)/o;return new u1e(r,s)}function iTt(i){return i.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}var dv,SI,d1e,u1e,up,Sj,kj,Lj,J5,h1e,jw=P(()=>{Qt();Lw();Uh();Qi();nt();pr();dv=class{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(e){return new SI(this.x-e.scrollX,this.y-e.scrollY)}},SI=class{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(e){return new dv(this.clientX+e.scrollX,this.clientY+e.scrollY)}},d1e=class{constructor(e,t,n,o){this.x=e,this.y=t,this.width=n,this.height=o,this._editorPagePositionBrand=void 0}},u1e=class{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}};up=class extends Oa{constructor(e,t,n){super(pi(n),e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new dv(this.posx,this.posy),this.editorPos=Ej(n),this.relativePos=Dj(n,this.editorPos,this.pos)}},Sj=class{constructor(e){this._editorViewDomNode=e}_create(e){return new up(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return Xe(e,"contextmenu",n=>{t(this._create(n))})}onMouseUp(e,t){return Xe(e,"mouseup",n=>{t(this._create(n))})}onMouseDown(e,t){return Xe(e,Lt.MOUSE_DOWN,n=>{t(this._create(n))})}onPointerDown(e,t){return Xe(e,Lt.POINTER_DOWN,n=>{t(this._create(n),n.pointerId)})}onMouseLeave(e,t){return Xe(e,Lt.MOUSE_LEAVE,n=>{t(this._create(n))})}onMouseMove(e,t){return Xe(e,"mousemove",n=>t(this._create(n)))}},kj=class{constructor(e){this._editorViewDomNode=e}_create(e){return new up(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return Xe(e,"pointerup",n=>{t(this._create(n))})}onPointerDown(e,t){return Xe(e,Lt.POINTER_DOWN,n=>{t(this._create(n),n.pointerId)})}onPointerLeave(e,t){return Xe(e,Lt.POINTER_LEAVE,n=>{t(this._create(n))})}onPointerMove(e,t){return Xe(e,"pointermove",n=>t(this._create(n)))}},Lj=class extends ue{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new Jf),this._keydownListener=null}startMonitoring(e,t,n,o,r){this._keydownListener=go(e.ownerDocument,"keydown",s=>{s.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,s.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(e,t,n,s=>{o(new up(s,!0,this._editorViewDomNode))},s=>{this._keydownListener.dispose(),r(s)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}},J5=class i{constructor(e){this._editor=e,this._instanceId=++i._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new hn(()=>this.garbageCollect(),1e3)}createClassNameRef(e){let t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){let t=this.computeUniqueKey(e),n=this._rules.get(t);if(!n){let o=this._counter++;n=new h1e(t,`dyn-rule-${this._instanceId}-${o}`,k5(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,n)}return n}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(let e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}};J5._idPool=0;h1e=class{constructor(e,t,n,o){this.key=e,this.className=t,this.properties=o,this._referenceCount=0,this._styleElementDisposables=new Ye,this._styleElement=ya(n,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let n=`.${e} {`;for(let o in t){let r=t[o],s;typeof r=="object"?s=ai(r.id):s=r;let a=iTt(o);n+=` ${a}: ${s};`}return n+=` -}`,n}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}});var hp,qw=P(()=>{nt();hp=class extends ue{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let n=0,o=e.length;n{qw();Yr=class extends hp{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}},El=class{static write(e,t){e.setAttribute("data-mprt",String(t))}static read(e){let t=e.getAttribute("data-mprt");return t===null?0:parseInt(t,10)}static collect(e,t){let n=[],o=0;for(;e&&e!==e.ownerDocument.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(n[o++]=this.read(e)),e=e.parentElement;let r=new Uint8Array(o);for(let s=0;s{f1e=class{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;let n=this._viewLayout.getCurrentViewport();this.scrollTop=n.top,this.scrollLeft=n.left,this.viewportWidth=n.width,this.viewportHeight=n.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e,t){return this._viewLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,t)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}},Lj=class extends f1e{constructor(e,t,n){super(e,t),this._renderingContextBrand=void 0,this._viewLines=n}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}},Ej=class{constructor(e,t,n,o){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=n,this.continuesOnNextLine=o}},Gw=class i{static from(e){let t=new Array(e.length);for(let n=0,o=e.length;n{Kw();eb=class{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,n,o,r){let s=this._createRange();try{return s.setStart(e,t),s.setEnd(n,o),s.getClientRects()}catch{return null}finally{this._detachRange(s,r)}}static _mergeAdjacentRanges(e){if(e.length===1)return e;e.sort(Em.compare);let t=[],n=0,o=e[0];for(let r=1,s=e.length;r=a.left?o.width=Math.max(o.width,a.left+a.width-o.left):(t[n++]=o,o=a)}return t[n++]=o,t}static _createHorizontalRangesFromClientRects(e,t,n){if(!e||e.length===0)return null;let o=[];for(let r=0,s=e.length;rl)return null;if(t=Math.min(l,Math.max(0,t)),o=Math.min(l,Math.max(0,o)),t===o&&n===r&&n===0&&!e.children[t].firstChild){let h=e.children[t].getClientRects();return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(h,s.clientRectDeltaLeft,s.clientRectScale)}t!==o&&o>0&&r===0&&(o--,r=1073741824);let c=e.children[t].firstChild,d=e.children[o].firstChild;if((!c||!d)&&(!c&&n===0&&t>0&&(c=e.children[t-1].firstChild,n=1073741824),!d&&r===0&&o>0&&(d=e.children[o-1].firstChild,r=1073741824)),!c||!d)return null;n=Math.min(c.textContent.length,Math.max(0,n)),r=Math.min(d.textContent.length,Math.max(0,r));let u=this._readClientRects(c,n,d,r,s.endNode);return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(u,s.clientRectDeltaLeft,s.clientRectScale)}}});function Ac(i){return i===ch.HIGH_CONTRAST_DARK||i===ch.HIGH_CONTRAST_LIGHT}function a2(i){return i===ch.DARK||i===ch.HIGH_CONTRAST_DARK}var ch,fp=P(()=>{(function(i){i.DARK="dark",i.LIGHT="light",i.HIGH_CONTRAST_DARK="hcDark",i.HIGH_CONTRAST_LIGHT="hcLight"})(ch||(ch={}))});function oTt(i,e,t,n,o){return new p1e(i,e,t,n,o)}function rTt(i,e,t,n,o){return new Tj(i,e,t,n,o)}function Ij(i,e,t){let n=e.textContent.length,o=-1;for(;e;)e=e.previousSibling,o++;return i.getColumn(new uI(o,t),n)}var nTt,Zw,LI,pp,Yw,Tj,p1e,OZe,Mj=P(()=>{Xc();_a();Mn();PZe();Kw();gw();av();fp();Ks();nTt=function(){return tu?!0:!(Ar||Aa||Xu)}(),Zw=!0,LI=class{constructor(e,t){this.themeType=t;let n=e.options,o=n.get(50);n.get(38)==="off"?this.renderWhitespace=n.get(98):this.renderWhitespace="none",this.renderControlCharacters=n.get(93),this.spaceWidth=o.spaceWidth,this.middotWidth=o.middotWidth,this.wsmiddotWidth=o.wsmiddotWidth,this.useMonospaceOptimizations=o.isMonospace&&!n.get(33),this.canUseHalfwidthRightwardsArrow=o.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(66),this.stopRenderingLineAfter=n.get(116),this.fontLigatures=n.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}},pp=class i{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(this._renderedViewLine)this._renderedViewLine.domNode=vn(e);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return Ac(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(e,t,n,o){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;let r=n.getViewLineRenderingData(e),s=this._options,a=Ld.filter(r.inlineDecorations,e,r.minColumn,r.maxColumn),l=null;if(Ac(s.themeType)||this._options.renderWhitespace==="selection"){let h=n.selections;for(let f of h){if(f.endLineNumbere)continue;let p=f.startLineNumber===e?f.startColumn:r.minColumn,m=f.endLineNumber===e?f.endColumn:r.maxColumn;p');let d=a4(c,o);o.appendString("");let u=null;return Zw&&nTt&&r.isBasicASCII&&s.useMonospaceOptimizations&&d.containsForeignElements===0&&(u=new Yw(this._renderedViewLine?this._renderedViewLine.domNode:null,c,d.characterMapping)),u||(u=OZe(this._renderedViewLine?this._renderedViewLine.domNode:null,c,d.characterMapping,d.containsRTL,d.containsForeignElements)),this._renderedViewLine=u,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof Yw:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof Yw?this._renderedViewLine.monospaceAssumptionsAreValid():Zw}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof Yw&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,n,o){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),n=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,n));let r=this._renderedViewLine.input.stopRenderingLineAfter;if(r!==-1&&t>r+1&&n>r+1)return new kI(!0,[new Em(this.getWidth(o),0)]);r!==-1&&t>r+1&&(t=r+1),r!==-1&&n>r+1&&(n=r+1);let s=this._renderedViewLine.getVisibleRangesForRange(e,t,n,o);return s&&s.length>0?new kI(!1,s):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}};pp.CLASS_NAME="view-line";Yw=class{constructor(e,t,n){this._cachedWidth=-1,this.domNode=e,this.input=t;let o=Math.floor(t.lineContent.length/300);if(o>0){this._keyColumnPixelOffsetCache=new Float32Array(o);for(let r=0;r=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),Zw=!1)}return Zw}toSlowRenderedLine(){return OZe(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,n,o){let r=this._getColumnPixelOffset(e,t,o),s=this._getColumnPixelOffset(e,n,o);return[new Em(r,s-r)]}_getColumnPixelOffset(e,t,n){if(t<=300){let c=this._characterMapping.getHorizontalOffset(t);return this._charWidth*c}let o=Math.floor((t-1)/300)-1,r=(o+1)*300+1,s=-1;if(this._keyColumnPixelOffsetCache&&(s=this._keyColumnPixelOffsetCache[o],s===-1&&(s=this._actualReadPixelOffset(e,r,n),this._keyColumnPixelOffsetCache[o]=s)),s===-1){let c=this._characterMapping.getHorizontalOffset(t);return this._charWidth*c}let a=this._characterMapping.getHorizontalOffset(r),l=this._characterMapping.getHorizontalOffset(t);return s+this._charWidth*(l-a)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,n){if(!this.domNode)return-1;let o=this._characterMapping.getDomPosition(t),r=eb.readHorizontalRanges(this._getReadingTarget(this.domNode),o.partIndex,o.charIndex,o.partIndex,o.charIndex,n);return!r||r.length===0?-1:r[0].left}getColumnOfNodeOffset(e,t){return Ij(this._characterMapping,e,t)}},Tj=class{constructor(e,t,n,o,r){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=r,this._cachedWidth=-1,this._pixelOffsetCache=null,!o||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let s=0,a=this._characterMapping.length;s<=a;s++)this._pixelOffsetCache[s]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e?.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(e,t,n,o){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){let r=this._readPixelOffset(this.domNode,e,t,o);if(r===-1)return null;let s=this._readPixelOffset(this.domNode,e,n,o);return s===-1?null:[new Em(r,s-r)]}return this._readVisibleRangesForRange(this.domNode,e,t,n,o)}_readVisibleRangesForRange(e,t,n,o,r){if(n===o){let s=this._readPixelOffset(e,t,n,r);return s===-1?null:[new Em(s,0)]}else return this._readRawVisibleRangesForRange(e,n,o,r)}_readPixelOffset(e,t,n,o){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth(o);let r=this._getReadingTarget(e);return r.firstChild?(o.markDidDomLayout(),r.firstChild.offsetWidth):0}if(this._pixelOffsetCache!==null){let r=this._pixelOffsetCache[n];if(r!==-1)return r;let s=this._actualReadPixelOffset(e,t,n,o);return this._pixelOffsetCache[n]=s,s}return this._actualReadPixelOffset(e,t,n,o)}_actualReadPixelOffset(e,t,n,o){if(this._characterMapping.length===0){let l=eb.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,o);return!l||l.length===0?-1:l[0].left}if(n===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth(o);let r=this._characterMapping.getDomPosition(n),s=eb.readHorizontalRanges(this._getReadingTarget(e),r.partIndex,r.charIndex,r.partIndex,r.charIndex,o);if(!s||s.length===0)return-1;let a=s[0].left;if(this.input.isBasicASCII){let l=this._characterMapping.getHorizontalOffset(n),c=Math.round(this.input.spaceWidth*l);if(Math.abs(c-a)<=1)return c}return a}_readRawVisibleRangesForRange(e,t,n,o){if(t===1&&n===this._characterMapping.length)return[new Em(0,this.getWidth(o))];let r=this._characterMapping.getDomPosition(t),s=this._characterMapping.getDomPosition(n);return eb.readHorizontalRanges(this._getReadingTarget(e),r.partIndex,r.charIndex,s.partIndex,s.charIndex,o)}getColumnOfNodeOffset(e,t){return Ij(this._characterMapping,e,t)}},p1e=class extends Tj{_readVisibleRangesForRange(e,t,n,o,r){let s=super._readVisibleRangesForRange(e,t,n,o,r);if(!s||s.length===0||n===o||n===1&&o===this._characterMapping.length)return s;if(!this.input.containsRTL){let a=this._readPixelOffset(e,t,o,r);if(a!==-1){let l=s[s.length-1];l.left{Ri();mr=class i{static _nextVisibleColumn(e,t,n){return e===9?i.nextRenderTabStop(t,n):Bf(e)||yT(e)?t+2:t+1}static visibleColumnFromColumn(e,t,n){let o=Math.min(t-1,e.length),r=e.substring(0,o),s=new f5(r),a=0;for(;!s.eol();){let l=zC(r,o,s.offset);s.nextGraphemeLength(),a=this._nextVisibleColumn(l,a,n)}return a}static columnFromVisibleColumn(e,t,n){if(t<=0)return 1;let o=e.length,r=new f5(e),s=0,a=1;for(;!r.eol();){let l=zC(e,o,r.offset);r.nextGraphemeLength();let c=this._nextVisibleColumn(l,s,n),d=r.offset+1;if(c>=t){let u=t-s;return c-t{mp();tb=class i{static whitespaceVisibleColumn(e,t,n){let o=e.length,r=0,s=-1,a=-1;for(let l=0;lr.left+r.width)y=p.length;else{let v=Rj.getInstance();for(let b=0;b{jw();rd();Mj();Mi();Kt();mp();Qt();m1e();l2=class{constructor(e=null){this.hitTarget=e,this.type=0}},Nj=class{constructor(e,t,n){this.position=e,this.spanNode=t,this.injectedText=n,this.type=1}};(function(i){function e(t,n,o){let r=t.getPositionFromDOMInfo(n,o);return r?new Nj(r,n,null):new l2(n)}i.createFromDOMInfo=e})(ib||(ib={}));Aj=class{constructor(e,t){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=t}},Dl=class{static _deduceRage(e,t=null){return!t&&e?new O(e.lineNumber,e.column,e.lineNumber,e.column):t??null}static createUnknown(e,t,n){return{type:0,element:e,mouseColumn:t,position:n,range:this._deduceRage(n)}}static createTextarea(e,t){return{type:1,element:e,mouseColumn:t,position:null,range:null}}static createMargin(e,t,n,o,r,s){return{type:e,element:t,mouseColumn:n,position:o,range:r,detail:s}}static createViewZone(e,t,n,o,r){return{type:e,element:t,mouseColumn:n,position:o,range:this._deduceRage(o),detail:r}}static createContentText(e,t,n,o,r){return{type:6,element:e,mouseColumn:t,position:n,range:this._deduceRage(n,o),detail:r}}static createContentEmpty(e,t,n,o){return{type:7,element:e,mouseColumn:t,position:n,range:this._deduceRage(n),detail:o}}static createContentWidget(e,t,n){return{type:9,element:e,mouseColumn:t,position:null,range:null,detail:n}}static createScrollbar(e,t,n){return{type:11,element:e,mouseColumn:t,position:n,range:this._deduceRage(n)}}static createOverlayWidget(e,t,n){return{type:12,element:e,mouseColumn:t,position:null,range:null,detail:n}}static createOutsideEditor(e,t,n,o){return{type:13,element:null,mouseColumn:e,position:t,range:this._deduceRage(t),outsidePosition:n,outsideDistance:o}}static _typeToString(e){return e===1?"TEXTAREA":e===2?"GUTTER_GLYPH_MARGIN":e===3?"GUTTER_LINE_NUMBERS":e===4?"GUTTER_LINE_DECORATIONS":e===5?"GUTTER_VIEW_ZONE":e===6?"CONTENT_TEXT":e===7?"CONTENT_EMPTY":e===8?"CONTENT_VIEW_ZONE":e===9?"CONTENT_WIDGET":e===10?"OVERVIEW_RULER":e===11?"SCROLLBAR":e===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+JSON.stringify(e.detail)}},Rc=class{static isTextArea(e){return e.length===2&&e[0]===3&&e[1]===7}static isChildOfViewLines(e){return e.length>=4&&e[0]===3&&e[3]===8}static isStrictChildOfViewLines(e){return e.length>4&&e[0]===3&&e[3]===8}static isChildOfScrollableElement(e){return e.length>=2&&e[0]===3&&e[1]===6}static isChildOfMinimap(e){return e.length>=2&&e[0]===3&&e[1]===9}static isChildOfContentWidgets(e){return e.length>=4&&e[0]===3&&e[3]===1}static isChildOfOverflowGuard(e){return e.length>=1&&e[0]===3}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&e[0]===2}static isChildOfOverlayWidgets(e){return e.length>=2&&e[0]===3&&e[1]===4}static isChildOfOverflowingOverlayWidgets(e){return e.length>=1&&e[0]===5}},Xw=class i{constructor(e,t,n){this.viewModel=e.viewModel;let o=e.configuration.options;this.layoutInfo=o.get(143),this.viewDomNode=t.viewDomNode,this.lineHeight=o.get(66),this.stickyTabStops=o.get(115),this.typicalHalfwidthCharacterWidth=o.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=n,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return i.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){let n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){let o=n.verticalOffset+n.height/2,r=e.viewModel.getLineCount(),s=null,a,l=null;return n.afterLineNumber!==r&&(l=new ke(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(s=new ke(n.afterLineNumber,e.viewModel.getLineMaxColumn(n.afterLineNumber))),l===null?a=s:s===null?a=l:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,EI._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}},_1e=class i extends v1e{constructor(e,t,n,o,r){super(e,t,n,o),this._ctx=e,r?(this.target=r,this.targetPath=El.collect(r,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset} - target: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(e=null){return e&&e.columns.contentLeft+s.width)continue;let a=e.getVerticalOffsetForLineNumber(s.position.lineNumber);if(a<=r&&r<=a+s.height)return t.fulfillContentText(s.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){let n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){let o=t.isInContentArea?8:5;return t.fulfillViewZone(o,n.position,n)}return null}static _hitTestTextArea(e,t){return Rc.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){let n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),o=n.range.getStartPosition(),r=Math.abs(t.relativePos.x),s={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:r};if(r-=e.layoutInfo.glyphMarginLeft,r<=e.layoutInfo.glyphMarginWidth){let a=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(n.range.getStartPosition()),l=e.viewModel.glyphLanes.getLanesAtLine(a.lineNumber);return s.glyphMarginLane=l[Math.floor(r/e.lineHeight)],t.fulfillMargin(2,o,n.range,s)}return r-=e.layoutInfo.glyphMarginWidth,r<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,o,n.range,s):(r-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,o,n.range,s))}return null}static _hitTestViewLines(e,t,n){if(!Rc.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new ke(1,1),zZe);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){let r=e.viewModel.getLineCount(),s=e.viewModel.getLineMaxColumn(r);return t.fulfillContentEmpty(new ke(r,s),zZe)}if(n){if(Rc.isStrictChildOfViewLines(t.targetPath)){let r=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(e.viewModel.getLineLength(r)===0){let a=e.getLineWidth(r),l=g1e(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(new ke(r,1),l)}let s=e.getLineWidth(r);if(t.mouseContentHorizontalOffset>=s){let a=g1e(t.mouseContentHorizontalOffset-s),l=new ke(r,e.viewModel.getLineMaxColumn(r));return t.fulfillContentEmpty(l,a)}}return t.fulfillUnknown()}let o=i._doHitTest(e,t);return o.type===1?i.createMouseTargetFromHitTestPosition(e,t,o.spanNode,o.position,o.injectedText):this._createMouseTarget(e,t.withTarget(o.hitTarget),!0)}static _hitTestMinimap(e,t){if(Rc.isChildOfMinimap(t.targetPath)){let n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),o=e.viewModel.getLineMaxColumn(n);return t.fulfillScrollbar(new ke(n,o))}return null}static _hitTestScrollbarSlider(e,t){if(Rc.isChildOfScrollableElement(t.targetPath)&&t.target&&t.target.nodeType===1){let n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){let o=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.viewModel.getLineMaxColumn(o);return t.fulfillScrollbar(new ke(o,r))}}return null}static _hitTestScrollbar(e,t){if(Rc.isChildOfScrollableElement(t.targetPath)){let n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),o=e.viewModel.getLineMaxColumn(n);return t.fulfillScrollbar(new ke(n,o))}return null}getMouseColumn(e){let t=this._context.configuration.options,n=t.get(143),o=this._context.viewLayout.getCurrentScrollLeft()+e.x-n.contentLeft;return i._getMouseColumn(o,t.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,n,o,r){let s=o.lineNumber,a=o.column,l=e.getLineWidth(s);if(t.mouseContentHorizontalOffset>l){let _=g1e(t.mouseContentHorizontalOffset-l);return t.fulfillContentEmpty(o,_)}let c=e.visibleRangeForPosition(s,a);if(!c)return t.fulfillUnknown(o);let d=c.left;if(Math.abs(t.mouseContentHorizontalOffset-d)<1)return t.fulfillContentText(o,null,{mightBeForeignElement:!!r,injectedText:r});let u=[];if(u.push({offset:c.left,column:a}),a>1){let _=e.visibleRangeForPosition(s,a-1);_&&u.push({offset:_.left,column:a-1})}let h=e.viewModel.getLineMaxColumn(s);if(a_.offset-v.offset);let f=t.pos.toClientCoordinates(pi(e.viewDomNode)),p=n.getBoundingClientRect(),m=p.left<=f.clientX&&f.clientX<=p.right,y=null;for(let _=1;_r)){let a=Math.floor((o+r)/2),l=t.pos.y+(a-t.mouseVerticalOffset);l<=t.editorPos.y&&(l=t.editorPos.y+1),l>=t.editorPos.y+t.editorPos.height&&(l=t.editorPos.y+t.editorPos.height-1);let c=new cv(t.pos.x,l),d=this._actualDoHitTestWithCaretRangeFromPoint(e,c.toClientCoordinates(pi(e.viewDomNode)));if(d.type===1)return d}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates(pi(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,t){let n=mm(e.viewDomNode),o;if(n?typeof n.caretRangeFromPoint>"u"?o=sTt(n,t.clientX,t.clientY):o=n.caretRangeFromPoint(t.clientX,t.clientY):o=e.viewDomNode.ownerDocument.caretRangeFromPoint(t.clientX,t.clientY),!o||!o.startContainer)return new l2;let r=o.startContainer;if(r.nodeType===r.TEXT_NODE){let s=r.parentNode,a=s?s.parentNode:null,l=a?a.parentNode:null;return(l&&l.nodeType===l.ELEMENT_NODE?l.className:null)===pp.CLASS_NAME?ib.createFromDOMInfo(e,s,o.startOffset):new l2(r.parentNode)}else if(r.nodeType===r.ELEMENT_NODE){let s=r.parentNode,a=s?s.parentNode:null;return(a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===pp.CLASS_NAME?ib.createFromDOMInfo(e,r,r.textContent.length):new l2(r)}return new l2}static _doHitTestWithCaretPositionFromPoint(e,t){let n=e.viewDomNode.ownerDocument.caretPositionFromPoint(t.clientX,t.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){let o=n.offsetNode.parentNode,r=o?o.parentNode:null,s=r?r.parentNode:null;return(s&&s.nodeType===s.ELEMENT_NODE?s.className:null)===pp.CLASS_NAME?ib.createFromDOMInfo(e,n.offsetNode.parentNode,n.offset):new l2(n.offsetNode.parentNode)}if(n.offsetNode.nodeType===n.offsetNode.ELEMENT_NODE){let o=n.offsetNode.parentNode,r=o&&o.nodeType===o.ELEMENT_NODE?o.className:null,s=o?o.parentNode:null,a=s&&s.nodeType===s.ELEMENT_NODE?s.className:null;if(r===pp.CLASS_NAME){let l=n.offsetNode.childNodes[Math.min(n.offset,n.offsetNode.childNodes.length-1)];if(l)return ib.createFromDOMInfo(e,l,0)}else if(a===pp.CLASS_NAME)return ib.createFromDOMInfo(e,n.offsetNode,0)}return new l2(n.offsetNode)}static _snapToSoftTabBoundary(e,t){let n=t.getLineContent(e.lineNumber),{tabSize:o}=t.model.getOptions(),r=tb.atomicPosition(n,e.column-1,o,2);return r!==-1?new ke(e.lineNumber,r+1):e}static _doHitTest(e,t){let n=new l2;if(typeof e.viewDomNode.ownerDocument.caretRangeFromPoint=="function"?n=this._doHitTestWithCaretRangeFromPoint(e,t):e.viewDomNode.ownerDocument.caretPositionFromPoint&&(n=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates(pi(e.viewDomNode)))),n.type===1){let o=e.viewModel.getInjectedTextAt(n.position),r=e.viewModel.normalizePosition(n.position,2);(o||!r.equals(n.position))&&(n=new Nj(r,n.spanNode,o))}return n}};Rj=class i{static getInstance(){return i._INSTANCE||(i._INSTANCE=new i),i._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(e,t){let n=e+t;if(this._cache[n])return this._cache[n];let o=this._canvas.getContext("2d");o.font=t;let s=o.measureText(e).width;return this._cache[n]=s,s}};Rj._INSTANCE=null});function Tr(i,e,t){let n=null,o=null;if(typeof t.value=="function"?(n="value",o=t.value,o.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof t.get=="function"&&(n="get",o=t.get),!o)throw new Error("not supported");let r=`$memoize$${e}`;t[n]=function(...s){return this.hasOwnProperty(r)||Object.defineProperty(this,r,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,s)}),this[r]}}var dv=P(()=>{});var aTt,vo,ar,dh=P(()=>{Qt();_l();Vi();dv();Xt();nt();Hh();aTt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r};(function(i){i.Tap="-monaco-gesturetap",i.Change="-monaco-gesturechange",i.Start="-monaco-gesturestart",i.End="-monaco-gesturesend",i.Contextmenu="-monaco-gesturecontextmenu"})(vo||(vo={}));ar=class i extends ue{constructor(){super(),this.dispatched=!1,this.targets=new $r,this.ignoreTargets=new $r,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(Et.runAndSubscribe(x5,({window:e,disposables:t})=>{t.add(Xe(e.document,"touchstart",n=>this.onTouchStart(n),{passive:!1})),t.add(Xe(e.document,"touchend",n=>this.onTouchEnd(e,n))),t.add(Xe(e.document,"touchmove",n=>this.onTouchMove(n),{passive:!1}))},{window:Hn,disposables:this._store}))}static addTarget(e){if(!i.isTouchDevice())return ue.None;i.INSTANCE||(i.INSTANCE=l5(new i));let t=i.INSTANCE.targets.push(e);return Yt(t)}static ignoreTarget(e){if(!i.isTouchDevice())return ue.None;i.INSTANCE||(i.INSTANCE=l5(new i));let t=i.INSTANCE.ignoreTargets.push(e);return Yt(t)}static isTouchDevice(){return"ontouchstart"in Hn||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,o=e.targetTouches.length;n=i.HOLD_DELAY&&Math.abs(l.initialPageX-Ph(l.rollingPageX))<30&&Math.abs(l.initialPageY-Ph(l.rollingPageY))<30){let d=this.newGestureEvent(vo.Contextmenu,l.initialTarget);d.pageX=Ph(l.rollingPageX),d.pageY=Ph(l.rollingPageY),this.dispatchEvent(d)}else if(o===1){let d=Ph(l.rollingPageX),u=Ph(l.rollingPageY),h=Ph(l.rollingTimestamps)-l.rollingTimestamps[0],f=d-l.rollingPageX[0],p=u-l.rollingPageY[0],m=[...this.targets].filter(y=>l.initialTarget instanceof Node&&y.contains(l.initialTarget));this.inertia(e,m,n,Math.abs(f)/h,f>0?1:-1,d,Math.abs(p)/h,p>0?1:-1,u)}this.dispatchEvent(this.newGestureEvent(vo.End,l.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let n=document.createEvent("CustomEvent");return n.initEvent(e,!1,!0),n.initialTarget=t,n.tapCount=0,n}dispatchEvent(e){if(e.type===vo.Tap){let t=new Date().getTime(),n=0;t-this._lastSetTapCountTime>i.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=t,e.tapCount=n}else(e.type===vo.Change||e.type===vo.Contextmenu)&&(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(let t of this.ignoreTargets)if(t.contains(e.initialTarget))return;for(let t of this.targets)t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}}inertia(e,t,n,o,r,s,a,l,c){this.handle=za(e,()=>{let d=Date.now(),u=d-n,h=0,f=0,p=!0;o+=i.SCROLL_FRICTION*u,a+=i.SCROLL_FRICTION*u,o>0&&(p=!1,h=r*o*u),a>0&&(p=!1,f=l*a*u);let m=this.newGestureEvent(vo.Change);m.translationX=h,m.translationY=f,t.forEach(y=>y.dispatchEvent(m)),p||this.inertia(e,t,d,o,r,s+h,a,l,c+f)})}onTouchMove(e){let t=Date.now();for(let n=0,o=e.changedTouches.length;n3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(r.pageX),s.rollingPageY.push(r.pageY),s.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}};ar.SCROLL_FRICTION=-.005;ar.HOLD_DELAY=700;ar.CLEAR_TAP_COUNT_TIME=400;aTt([Tr],ar,"isTouchDevice",null)});var Ds,i1=P(()=>{Qt();Gl();Uh();dh();nt();Ds=class extends ue{onclick(e,t){this._register(Xe(e,Lt.CLICK,n=>t(new Oa(pi(e),n))))}onmousedown(e,t){this._register(Xe(e,Lt.MOUSE_DOWN,n=>t(new Oa(pi(e),n))))}onmouseover(e,t){this._register(Xe(e,Lt.MOUSE_OVER,n=>t(new Oa(pi(e),n))))}onmouseleave(e,t){this._register(Xe(e,Lt.MOUSE_LEAVE,n=>t(new Oa(pi(e),n))))}onkeydown(e,t){this._register(Xe(e,Lt.KEY_DOWN,n=>t(new qn(n))))}onkeyup(e,t){this._register(Xe(e,Lt.KEY_UP,n=>t(new qn(n))))}oninput(e,t){this._register(Xe(e,Lt.INPUT,t))}onblur(e,t){this._register(Xe(e,Lt.BLUR,t))}onfocus(e,t){this._register(Xe(e,Lt.FOCUS,t))}ignoreGesture(e){return ar.ignoreTarget(e)}}});var uv,Pj,Oj=P(()=>{Lw();i1();Qi();or();Qt();uv=11,Pj=class extends Ds{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...ui.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width=uv+"px",this.domNode.style.height=uv+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new Jf),this._register(go(this.bgDomNode,Lt.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(go(this.domNode,Lt.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new U3),this._pointerdownScheduleRepeatTimer=this._register(new Zs)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,pi(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}}});var zj,FZe=P(()=>{Qi();nt();zj=class extends ue{constructor(e,t,n){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new Zs)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)===null||e===void 0||e.setClassName(this._visibleClassName)},0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(t=this._domNode)===null||t===void 0||t.setClassName(this._invisibleClassName+(e?" fade":"")))}}});var lTt,Qw,y1e=P(()=>{Qt();_a();Lw();Oj();FZe();i1();Mn();lTt=140,Qw=class extends Ds{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new zj(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new Jf),this._shouldRender=!0,this.domNode=vn(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(Xe(this.domNode.domNode,Lt.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new Pj(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,o){this.slider=vn(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof n=="number"&&this.slider.setWidth(n),typeof o=="number"&&this.slider.setHeight(o),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(Xe(this.slider.domNode,Lt.POINTER_DOWN,r=>{r.button===0&&(r.preventDefault(),this._sliderPointerDown(r))})),this.onclick(this.slider.domNode,r=>{r.leftButton&&r.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),o=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),r=this._sliderPointerPosition(e);n<=r&&r<=o?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,n;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,n=e.offsetY;else{let r=Lo(this.domNode.domNode);t=e.pageX-r.left,n=e.pageY-r.top}let o=this._pointerDownRelativePosition(t,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(o):this._scrollbarState.getDesiredScrollPositionFromOffset(o)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),n=this._sliderOrthogonalPointerPosition(e),o=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{let s=this._sliderOrthogonalPointerPosition(r),a=Math.abs(s-n);if(hr&&a>lTt){this._setDesiredScrollPositionNow(o.getScrollPosition());return}let c=this._sliderPointerPosition(r)-t;this._setDesiredScrollPositionNow(o.getDesiredScrollPositionFromDelta(c))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}});var hv,Fj=P(()=>{hv=class i{constructor(e,t,n,o,r,s){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=o,this._scrollSize=r,this._scrollPosition=s,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new i(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){let t=Math.round(e);return this._visibleSize!==t?(this._visibleSize=t,this._refreshComputedValues(),!0):!1}setScrollSize(e){let t=Math.round(e);return this._scrollSize!==t?(this._scrollSize=t,this._refreshComputedValues(),!0):!1}setScrollPosition(e){let t=Math.round(e);return this._scrollPosition!==t?(this._scrollPosition=t,this._refreshComputedValues(),!0):!1}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,n,o,r){let s=Math.max(0,n-e),a=Math.max(0,s-2*t),l=o>0&&o>n;if(!l)return{computedAvailableSize:Math.round(s),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(n*a/o))),d=(a-c)/(o-n),u=r*d;return{computedAvailableSize:Math.round(s),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:d,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){let e=i._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize,n=this._scrollPosition;return t{Uh();y1e();Oj();Fj();Go();Hj=class extends Qw{constructor(e,t,n){let o=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new hv(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,o.width,o.scrollWidth,r.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){let s=(t.arrowSize-uv)/2,a=(t.horizontalScrollbarSize-uv)/2;this._createArrow({className:"scra",icon:kt.scrollbarButtonLeft,top:a,left:s,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new jf(null,1,0))}),this._createArrow({className:"scra",icon:kt.scrollbarButtonRight,top:a,left:void 0,bottom:void 0,right:s,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new jf(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}});var Bj,BZe=P(()=>{Uh();y1e();Oj();Fj();Go();Bj=class extends Qw{constructor(e,t,n){let o=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new hv(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,o.height,o.scrollHeight,r.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){let s=(t.arrowSize-uv)/2,a=(t.verticalScrollbarSize-uv)/2;this._createArrow({className:"scra",icon:kt.scrollbarButtonUp,top:s,left:a,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new jf(null,0,1))}),this._createArrow({className:"scra",icon:kt.scrollbarButtonDown,top:void 0,left:a,bottom:s,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new jf(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}});function C1e(i,e){let t=e-i;return function(n){return i+t*uTt(n)}}function cTt(i,e,t){return function(n){return n{Xt();nt();w1e=class i{constructor(e,t,n,o,r,s,a){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t=t|0,n=n|0,o=o|0,r=r|0,s=s|0,a=a|0),this.rawScrollLeft=o,this.rawScrollTop=a,t<0&&(t=0),o+t>n&&(o=n-t),o<0&&(o=0),r<0&&(r=0),a+r>s&&(a=s-r),a<0&&(a=0),this.width=t,this.scrollWidth=n,this.scrollLeft=o,this.height=r,this.scrollHeight=s,this.scrollTop=a}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new i(this._forceIntegerValues,typeof e.width<"u"?e.width:this.width,typeof e.scrollWidth<"u"?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,typeof e.height<"u"?e.height:this.height,typeof e.scrollHeight<"u"?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new i(this._forceIntegerValues,this.width,this.scrollWidth,typeof e.scrollLeft<"u"?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof e.scrollTop<"u"?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){let n=this.width!==e.width,o=this.scrollWidth!==e.scrollWidth,r=this.scrollLeft!==e.scrollLeft,s=this.height!==e.height,a=this.scrollHeight!==e.scrollHeight,l=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:o,scrollLeftChanged:r,heightChanged:s,scrollHeightChanged:a,scrollTopChanged:l}}},n1=class extends ue{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new ge),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new w1e(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var n;let o=this._state.withScrollDimensions(e,t);this._setState(o,!!this._smoothScrolling),(n=this._smoothScrolling)===null||n===void 0||n.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let o;t?o=new Wj(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):o=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=o}else{let n=this._state.withScrollPosition(e);this._smoothScrolling=Wj.start(this._state,n,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,t)))}},Vj=class{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}};Wj=class i{constructor(e,t,n,o){this.from=e,this.to=t,this.duration=o,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,n){if(Math.abs(e-t)>2.5*n){let r,s;return e{});function fTt(i){let e={lazyRender:typeof i.lazyRender<"u"?i.lazyRender:!1,className:typeof i.className<"u"?i.className:"",useShadows:typeof i.useShadows<"u"?i.useShadows:!0,handleMouseWheel:typeof i.handleMouseWheel<"u"?i.handleMouseWheel:!0,flipAxes:typeof i.flipAxes<"u"?i.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof i.consumeMouseWheelIfScrollbarIsNeeded<"u"?i.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof i.alwaysConsumeMouseWheel<"u"?i.alwaysConsumeMouseWheel:!1,scrollYToX:typeof i.scrollYToX<"u"?i.scrollYToX:!1,mouseWheelScrollSensitivity:typeof i.mouseWheelScrollSensitivity<"u"?i.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof i.fastScrollSensitivity<"u"?i.fastScrollSensitivity:5,scrollPredominantAxis:typeof i.scrollPredominantAxis<"u"?i.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof i.mouseWheelSmoothScroll<"u"?i.mouseWheelSmoothScroll:!0,arrowSize:typeof i.arrowSize<"u"?i.arrowSize:11,listenOnDomNode:typeof i.listenOnDomNode<"u"?i.listenOnDomNode:null,horizontal:typeof i.horizontal<"u"?i.horizontal:1,horizontalScrollbarSize:typeof i.horizontalScrollbarSize<"u"?i.horizontalScrollbarSize:10,horizontalSliderSize:typeof i.horizontalSliderSize<"u"?i.horizontalSliderSize:0,horizontalHasArrows:typeof i.horizontalHasArrows<"u"?i.horizontalHasArrows:!1,vertical:typeof i.vertical<"u"?i.vertical:1,verticalScrollbarSize:typeof i.verticalScrollbarSize<"u"?i.verticalScrollbarSize:10,verticalHasArrows:typeof i.verticalHasArrows<"u"?i.verticalHasArrows:!1,verticalSliderSize:typeof i.verticalSliderSize<"u"?i.verticalSliderSize:0,scrollByPage:typeof i.scrollByPage<"u"?i.scrollByPage:!1};return e.horizontalSliderSize=typeof i.horizontalSliderSize<"u"?i.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof i.verticalSliderSize<"u"?i.verticalSliderSize:e.verticalScrollbarSize,Wi&&(e.className+=" mac"),e}var hTt,WZe,UZe,x1e,nb,DI,ex,c2,gp,o1=P(()=>{Xc();Qt();_a();Uh();HZe();BZe();i1();Qi();Xt();nt();Mn();Jw();VZe();hTt=500,WZe=50,UZe=!0,x1e=class{constructor(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0}},nb=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let e=1,t=0,n=1,o=this._rear;do{let r=o===this._front?e:Math.pow(2,-n);if(e-=r,t+=this._memory[o].score*r,o===this._front)break;o=(this._capacity+o-1)%this._capacity,n++}while(!0);return t<=.5}acceptStandardWheelEvent(e){if(Rg){let t=pi(e.browserEvent),n=fqe(t);this.accept(Date.now(),e.deltaX*n,e.deltaY*n)}else this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,t,n){let o=new x1e(e,t,n);o.score=this._computeScore(o),this._front===-1&&this._rear===-1?(this._memory[0]=o,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=o)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5,n=this._front===-1&&this._rear===-1?null:this._memory[this._rear];return(!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}};nb.INSTANCE=new nb;DI=class extends Ds{get options(){return this._options}constructor(e,t,n){super(),this._onScroll=this._register(new ge),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new ge),e.style.overflow="hidden",this._options=fTt(t),this._scrollable=n,this._register(this._scrollable.onScroll(r=>{this._onWillScroll.fire(r),this._onDidScroll(r),this._onScroll.fire(r)}));let o={onMouseWheel:r=>this._onMouseWheel(r),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new Bj(this._scrollable,this._options,o)),this._horizontalScrollbar=this._register(new Hj(this._scrollable,this._options,o)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=vn(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=vn(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=vn(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,r=>this._onMouseOver(r)),this.onmouseleave(this._listenOnDomNode,r=>this._onMouseLeave(r)),this._hideTimeout=this._register(new Zs),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=Nn(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Wi&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new jf(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Nn(this._mouseWheelToDispose),e)){let n=o=>{this._onMouseWheel(new jf(o))};this._mouseWheelToDispose.push(Xe(this._listenOnDomNode,Lt.MOUSE_WHEEL,n,{passive:!1}))}}_onMouseWheel(e){var t;if(!((t=e.browserEvent)===null||t===void 0)&&t.defaultPrevented)return;let n=nb.INSTANCE;UZe&&n.acceptStandardWheelEvent(e);let o=!1;if(e.deltaY||e.deltaX){let s=e.deltaY*this._options.mouseWheelScrollSensitivity,a=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&a+s===0?a=s=0:Math.abs(s)>=Math.abs(a)?a=0:s=0),this._options.flipAxes&&([s,a]=[a,s]);let l=!Wi&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||l)&&!a&&(a=s,s=0),e.browserEvent&&e.browserEvent.altKey&&(a=a*this._options.fastScrollSensitivity,s=s*this._options.fastScrollSensitivity);let c=this._scrollable.getFutureScrollPosition(),d={};if(s){let u=WZe*s,h=c.scrollTop-(u<0?Math.floor(u):Math.ceil(u));this._verticalScrollbar.writeScrollPosition(d,h)}if(a){let u=WZe*a,h=c.scrollLeft-(u<0?Math.floor(u):Math.ceil(u));this._horizontalScrollbar.writeScrollPosition(d,h)}d=this._scrollable.validateScrollPosition(d),(c.scrollLeft!==d.scrollLeft||c.scrollTop!==d.scrollTop)&&(UZe&&this._options.mouseWheelSmoothScroll&&n.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(d):this._scrollable.setScrollPositionNow(d),o=!0)}let r=o;!r&&this._options.alwaysConsumeMouseWheel&&(r=!0),!r&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(r=!0),r&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0,o=n?" left":"",r=t?" top":"",s=n||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${o}`),this._topShadowDomNode.setClassName(`shadow${r}`),this._topLeftShadowDomNode.setClassName(`shadow${s}${r}${o}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),hTt)}},ex=class extends DI{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;let n=new n1({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:o=>za(pi(e),o)});super(e,t,n),this._register(n)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}},c2=class extends DI{constructor(e,t,n){super(e,t,n)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}},gp=class extends DI{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;let n=new n1({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:o=>za(pi(e),o)});super(e,t,n),this._register(n),this._element=e,this._register(this.onScroll(o=>{o.scrollTopChanged&&(this._element.scrollTop=o.scrollTop),o.scrollLeftChanged&&(this._element.scrollLeft=o.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}});var tx,S1e,k1e,L1e,Uj,$Ze=P(()=>{Qt();Uh();nt();Mn();b1e();jw();BC();Mi();zo();qw();o1();tx=class extends hp{constructor(e,t,n){super(),this._mouseLeaveMonitor=null,this._context=e,this.viewController=t,this.viewHelper=n,this.mouseTargetFactory=new EI(this._context,n),this._mouseDownOperation=this._register(new S1e(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(s,a)=>this._createMouseTarget(s,a),s=>this._getMouseColumn(s))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(143).height;let o=new Cj(this.viewHelper.viewDomNode);this._register(o.onContextMenu(this.viewHelper.viewDomNode,s=>this._onContextMenu(s,!0))),this._register(o.onMouseMove(this.viewHelper.viewDomNode,s=>{this._onMouseMove(s),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=Xe(this.viewHelper.viewDomNode.ownerDocument,"mousemove",a=>{this.viewHelper.viewDomNode.contains(a.target)||this._onMouseLeave(new up(a,!1,this.viewHelper.viewDomNode))}))})),this._register(o.onMouseUp(this.viewHelper.viewDomNode,s=>this._onMouseUp(s))),this._register(o.onMouseLeave(this.viewHelper.viewDomNode,s=>this._onMouseLeave(s)));let r=0;this._register(o.onPointerDown(this.viewHelper.viewDomNode,(s,a)=>{r=a})),this._register(Xe(this.viewHelper.viewDomNode,Lt.POINTER_UP,s=>{this._mouseDownOperation.onPointerUp()})),this._register(o.onMouseDown(this.viewHelper.viewDomNode,s=>this._onMouseDown(s,r))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){let e=nb.INSTANCE,t=0,n=Qc.getZoomLevel(),o=!1,r=0,s=l=>{if(this.viewController.emitMouseWheel(l),!this._context.configuration.options.get(75))return;let c=new jf(l);if(e.acceptStandardWheelEvent(c),e.isPhysicalMouseWheel()){if(a(l)){let d=Qc.getZoomLevel(),u=c.deltaY>0?1:-1;Qc.setZoomLevel(d+u),c.preventDefault(),c.stopPropagation()}}else Date.now()-t>50&&(n=Qc.getZoomLevel(),o=a(l),r=0),t=Date.now(),r+=c.deltaY,o&&(Qc.setZoomLevel(n+r/5),c.preventDefault(),c.stopPropagation())};this._register(Xe(this.viewHelper.viewDomNode,Lt.MOUSE_WHEEL,s,{capture:!0,passive:!1}));function a(l){return Wi?(l.metaKey||l.ctrlKey)&&!l.shiftKey&&!l.altKey:l.ctrlKey&&!l.metaKey&&!l.shiftKey&&!l.altKey}}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(143)){let t=this._context.configuration.options.get(143).height;this._height!==t&&(this._height=t,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){let o=new SI(e,t).toPageCoordinates(pi(this.viewHelper.viewDomNode)),r=Sj(this.viewHelper.viewDomNode);if(o.yr.y+r.height||o.xr.x+r.width)return null;let s=kj(this.viewHelper.viewDomNode,r,o);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),r,o,s,null)}_createMouseTarget(e,t){let n=e.target;if(!this.viewHelper.viewDomNode.contains(n)){let o=mm(this.viewHelper.viewDomNode);o&&(n=o.elementsFromPoint(e.posx,e.posy).find(r=>this.viewHelper.viewDomNode.contains(r)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?n:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),!(this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(d&&(o||s&&a))u(),this._mouseDownOperation.start(n.type,e,t);else if(r)e.preventDefault();else if(l){let h=n.detail;d&&this.viewHelper.shouldSuppressMouseDownOnViewZone(h.viewZoneId)&&(u(),this._mouseDownOperation.start(n.type,e,t),e.preventDefault())}else c&&this.viewHelper.shouldSuppressMouseDownOnWidget(n.detail)&&(u(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:n})}},S1e=class extends ue{constructor(e,t,n,o,r,s){super(),this._context=e,this._viewController=t,this._viewHelper=n,this._mouseTargetFactory=o,this._createMouseTarget=r,this._getMouseColumn=s,this._mouseMoveMonitor=this._register(new xj(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new k1e(this._context,this._viewHelper,this._mouseTargetFactory,(a,l,c)=>this._dispatchMouse(a,l,c))),this._mouseState=new Uj,this._currentSelection=new jt(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);let t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):t.type===13&&(t.outsidePosition==="above"||t.outsidePosition==="below")?this._topBottomDragScrolling.start(t,e):(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)))}start(e,t,n){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(e===3),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);let o=this._findMousePosition(t,!0);if(!o||!o.position)return;this._mouseState.trySetCount(t.detail,o.position),t.detail=this._mouseState.count;let r=this._context.configuration.options;if(!r.get(90)&&r.get(35)&&!r.get(22)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&o.type===6&&o.position&&this._currentSelection.containsPosition(o.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,n,t.buttons,s=>this._onMouseDownThenMove(s),s=>{let a=this._findMousePosition(this._lastMouseEvent,!1);YC(s)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:a?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(o,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,n,t.buttons,s=>this._onMouseDownThenMove(s),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){let t=e.editorPos,n=this._context.viewModel,o=this._context.viewLayout,r=this._getMouseColumn(e);if(e.posyt.y+t.height){let a=e.posy-t.y-t.height,l=o.getCurrentScrollTop()+e.relativePos.y,c=Xw.getZoneAtCoord(this._context,l);if(c){let u=this._helpPositionJumpOverViewZone(c);if(u)return Dl.createOutsideEditor(r,u,"below",a)}let d=o.getLineNumberAtVerticalOffset(l);return Dl.createOutsideEditor(r,new ke(d,n.getLineMaxColumn(d)),"below",a)}let s=o.getLineNumberAtVerticalOffset(o.getCurrentScrollTop()+e.relativePos.y);if(e.posxt.x+t.width){let a=e.posx-t.x-t.width;return Dl.createOutsideEditor(r,new ke(s,n.getLineMaxColumn(s)),"right",a)}return null}_findMousePosition(e,t){let n=this._getPositionOutsideEditor(e);if(n)return n;let o=this._createMouseTarget(e,t);if(!o.position)return null;if(o.type===8||o.type===5){let s=this._helpPositionJumpOverViewZone(o.detail);if(s)return Dl.createViewZone(o.type,o.element,o.mouseColumn,s,o.detail)}return o}_helpPositionJumpOverViewZone(e){let t=new ke(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,o=e.positionAfter;return n&&o?n.isBefore(t)?n:o:null}_dispatchMouse(e,t,n){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:n,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:e.type===6&&e.detail.injectedText!==null})}},k1e=class extends ue{constructor(e,t,n,o){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=n,this._dispatchMouse=o,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new L1e(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}},L1e=class extends ue{constructor(e,t,n,o,r,s){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=n,this._dispatchMouse=o,this._position=r,this._mouseEvent=s,this._lastTime=Date.now(),this._animationFrameDisposable=za(pi(s.browserEvent),()=>this._execute())}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){let e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){let e=this._context.configuration.options.get(66),t=this._context.configuration.options.get(143).height/e,n=this._position.outsideDistance/e;return n<=1.5?Math.max(30,t*(1+n)):n<=3?Math.max(60,t*(2+n)):Math.max(200,t*(7+n))}_execute(){let e=this._context.configuration.options.get(66),t=this._getScrollSpeed(),n=this._tick(),o=t*(n/1e3)*e,r=this._position.outsidePosition==="above"?-o:o;this._context.viewModel.viewLayout.deltaScrollNow(0,r),this._viewHelper.renderNow();let s=this._context.viewLayout.getLinesViewportData(),a=this._position.outsidePosition==="above"?s.startLineNumber:s.endLineNumber,l;{let c=Sj(this._viewHelper.viewDomNode),d=this._context.configuration.options.get(143).horizontalScrollbarHeight,u=new cv(this._mouseEvent.pos.x,c.y+c.height-d-.1),h=kj(this._viewHelper.viewDomNode,c,u);l=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),c,u,h,null)}(!l.position||l.position.lineNumber!==a)&&(this._position.outsidePosition==="above"?l=Dl.createOutsideEditor(this._position.mouseColumn,new ke(a,1),"above",this._position.outsideDistance):l=Dl.createOutsideEditor(this._position.mouseColumn,new ke(a,this._context.viewModel.getLineMaxColumn(a)),"below",this._position.outsideDistance)),this._dispatchMouse(l,!0,2),this._animationFrameDisposable=za(pi(l.element),()=>this._execute())}},Uj=class i{get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){let n=new Date().getTime();n-this._lastSetMouseDownCountTime>i.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=n,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}};Uj.CLEAR_MOUSE_DOWN_COUNT_TIME=400});var _n,vp=P(()=>{Xt();_n=class{get event(){return this.emitter.event}constructor(e,t,n){let o=r=>this.emitter.fire(r);this.emitter=new ge({onWillAddFirstListener:()=>e.addEventListener(t,o,n),onDidRemoveLastListener:()=>e.removeEventListener(t,o,n)})}dispose(){this.emitter.dispose()}}});var uh,tl,$j,E1e=P(()=>{Ri();Kt();uh=!1,tl=class i{constructor(e,t,n,o,r){this.value=e,this.selectionStart=t,this.selectionEnd=n,this.selection=o,this.newlineCountBeforeSelection=r}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){let n=e.getValue(),o=e.getSelectionStart(),r=e.getSelectionEnd(),s;if(t){let a=n.substring(0,o),l=t.value.substring(0,t.selectionStart);a===l&&(s=t.newlineCountBeforeSelection)}return new i(n,o,r,null,s)}collapseSelection(){return this.selectionStart===this.value.length?this:new i(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,n){uh&&console.log(`writeToTextArea ${e}: ${this.toString()}`),t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){var t,n,o,r,s,a,l,c;if(e<=this.selectionStart){let h=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition((n=(t=this.selection)===null||t===void 0?void 0:t.getStartPosition())!==null&&n!==void 0?n:null,h,-1)}if(e>=this.selectionEnd){let h=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition((r=(o=this.selection)===null||o===void 0?void 0:o.getEndPosition())!==null&&r!==void 0?r:null,h,1)}let d=this.value.substring(this.selectionStart,e);if(d.indexOf("\u2026")===-1)return this._finishDeduceEditorPosition((a=(s=this.selection)===null||s===void 0?void 0:s.getStartPosition())!==null&&a!==void 0?a:null,d,1);let u=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition((c=(l=this.selection)===null||l===void 0?void 0:l.getEndPosition())!==null&&c!==void 0?c:null,u,-1)}_finishDeduceEditorPosition(e,t,n){let o=0,r=-1;for(;(r=t.indexOf(` -`,r+1))!==-1;)o++;return[e,n*t.length,o]}static deduceInput(e,t,n){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};uh&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`));let o=Math.min(Hf(e.value,t.value),e.selectionStart,t.selectionStart),r=Math.min(m5(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),s=e.value.substring(o,e.value.length-r),a=t.value.substring(o,t.value.length-r),l=e.selectionStart-o,c=e.selectionEnd-o,d=t.selectionStart-o,u=t.selectionEnd-o;if(uh&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${s}>, selectionStart: ${l}, selectionEnd: ${c}`),console.log(`AFTER DIFFING CURRENT STATE: <${a}>, selectionStart: ${d}, selectionEnd: ${u}`)),d===u){let f=e.selectionStart-o;return uh&&console.log(`REMOVE PREVIOUS: ${f} chars`),{text:a,replacePrevCharCnt:f,replaceNextCharCnt:0,positionDelta:0}}let h=c-l;return{text:a,replacePrevCharCnt:h,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(uh&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`)),e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};let n=Math.min(Hf(e.value,t.value),e.selectionEnd),o=Math.min(m5(e.value,t.value),e.value.length-e.selectionEnd),r=e.value.substring(n,e.value.length-o),s=t.value.substring(n,t.value.length-o),a=e.selectionStart-n,l=e.selectionEnd-n,c=t.selectionStart-n,d=t.selectionEnd-n;return uh&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${r}>, selectionStart: ${a}, selectionEnd: ${l}`),console.log(`AFTER DIFFING CURRENT STATE: <${s}>, selectionStart: ${c}, selectionEnd: ${d}`)),{text:s,replacePrevCharCnt:l,replaceNextCharCnt:r.length-l,positionDelta:d-s.length}}};tl.EMPTY=new tl("",0,0,null,void 0);$j=class i{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){let n=e*t,o=n+1,r=n+t;return new O(o,1,r+1,1)}static fromEditorSelection(e,t,n,o){let s=i._getPageOfLine(t.startLineNumber,n),a=i._getRangeForPage(s,n),l=i._getPageOfLine(t.endLineNumber,n),c=i._getRangeForPage(l,n),d=a.intersectRanges(new O(1,1,t.startLineNumber,t.startColumn));if(o&&e.getValueLengthInRange(d,1)>500){let _=e.modifyPosition(d.getEndPosition(),-500);d=O.fromPositions(_,d.getEndPosition())}let u=e.getValueInRange(d,1),h=e.getLineCount(),f=e.getLineMaxColumn(h),p=c.intersectRanges(new O(t.endLineNumber,t.endColumn,h,f));if(o&&e.getValueLengthInRange(p,1)>500){let _=e.modifyPosition(p.getStartPosition(),500);p=O.fromPositions(p.getStartPosition(),_)}let m=e.getValueInRange(p,1),y;if(s===l||s+1===l)y=e.getValueInRange(t,1);else{let _=a.intersectRanges(t),v=c.intersectRanges(t);y=e.getValueInRange(_,1)+"\u2026"+e.getValueInRange(v,1)}return o&&y.length>2*500&&(y=y.substring(0,500)+"\u2026"+y.substring(y.length-500,y.length)),new tl(u+y+m,u.length,u.length+y.length,t,d.endLineNumber-d.startLineNumber)}}});var pTt,jZe,TI,II,fv,D1e,jj,qj,Gj,MI=P(()=>{Xc();Qt();vp();Gl();t1e();Qi();Xt();nt();G3();Ri();E1e();zo();Yh();Ju();pTt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},jZe=function(i,e){return function(t,n){e(t,n,i)}};(function(i){i.Tap="-monaco-textarea-synthetic-tap"})(TI||(TI={}));II={forceCopyWithSyntaxHighlighting:!1},fv=class{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}};fv.INSTANCE=new fv;D1e=class{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){e=e||"";let t={text:e,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}},jj=class extends ue{get textAreaState(){return this._textAreaState}constructor(e,t,n,o,r,s){super(),this._host=e,this._textArea=t,this._OS=n,this._browser=o,this._accessibilityService=r,this._logService=s,this._onFocus=this._register(new ge),this.onFocus=this._onFocus.event,this._onBlur=this._register(new ge),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new ge),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new ge),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new ge),this.onCut=this._onCut.event,this._onPaste=this._register(new ge),this.onPaste=this._onPaste.event,this._onType=this._register(new ge),this.onType=this._onType.event,this._onCompositionStart=this._register(new ge),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new ge),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new ge),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new ge),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new To),this._asyncTriggerCut=this._register(new hn(()=>this._onCut.fire(),0)),this._textAreaState=tl.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(Et.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new hn(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let a=null;this._register(this._textArea.onKeyDown(l=>{let c=new qn(l);(c.keyCode===114||this._currentComposition&&c.keyCode===1)&&c.stopPropagation(),c.equals(9)&&c.preventDefault(),a=c,this._onKeyDown.fire(c)})),this._register(this._textArea.onKeyUp(l=>{let c=new qn(l);this._onKeyUp.fire(c)})),this._register(this._textArea.onCompositionStart(l=>{uh&&console.log("[compositionstart]",l);let c=new D1e;if(this._currentComposition){this._currentComposition=c;return}if(this._currentComposition=c,this._OS===2&&a&&a.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===l.data&&(a.code==="ArrowRight"||a.code==="ArrowLeft")){uh&&console.log("[compositionstart] Handling long press case on macOS + arrow key",l),c.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:l.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:l.data});return}this._onCompositionStart.fire({data:l.data})})),this._register(this._textArea.onCompositionUpdate(l=>{uh&&console.log("[compositionupdate]",l);let c=this._currentComposition;if(!c)return;if(this._browser.isAndroid){let u=tl.readFromTextArea(this._textArea,this._textAreaState),h=tl.deduceAndroidCompositionInput(this._textAreaState,u);this._textAreaState=u,this._onType.fire(h),this._onCompositionUpdate.fire(l);return}let d=c.handleCompositionUpdate(l.data);this._textAreaState=tl.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(d),this._onCompositionUpdate.fire(l)})),this._register(this._textArea.onCompositionEnd(l=>{uh&&console.log("[compositionend]",l);let c=this._currentComposition;if(!c)return;if(this._currentComposition=null,this._browser.isAndroid){let u=tl.readFromTextArea(this._textArea,this._textAreaState),h=tl.deduceAndroidCompositionInput(this._textAreaState,u);this._textAreaState=u,this._onType.fire(h),this._onCompositionEnd.fire();return}let d=c.handleCompositionUpdate(l.data);this._textAreaState=tl.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(d),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(l=>{if(uh&&console.log("[input]",l),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;let c=tl.readFromTextArea(this._textArea,this._textAreaState),d=tl.deduceInput(this._textAreaState,c,this._OS===2);d.replacePrevCharCnt===0&&d.text.length===1&&(Or(d.text.charCodeAt(0))||d.text.charCodeAt(0)===127)||(this._textAreaState=c,(d.text!==""||d.replacePrevCharCnt!==0||d.replaceNextCharCnt!==0||d.positionDelta!==0)&&this._onType.fire(d))})),this._register(this._textArea.onCut(l=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(l),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(l=>{this._ensureClipboardGetsEditorSelection(l)})),this._register(this._textArea.onPaste(l=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),l.preventDefault(),!l.clipboardData)return;let[c,d]=qj.getTextData(l.clipboardData);c&&(d=d||fv.INSTANCE.get(c),this._onPaste.fire({text:c,metadata:d}))})),this._register(this._textArea.onFocus(()=>{let l=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!l&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new hn(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return Xe(this._textArea.ownerDocument,"selectionchange",t=>{if(Jg.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;let n=Date.now(),o=n-e;if(e=n,o<5)return;let r=n-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),r<100||!this._textAreaState.selection)return;let s=this._textArea.getValue();if(this._textAreaState.value!==s)return;let a=this._textArea.getSelectionStart(),l=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===a&&this._textAreaState.selectionEnd===l)return;let c=this._textAreaState.deduceEditorPosition(a),d=this._host.deduceModelPosition(c[0],c[1],c[2]),u=this._textAreaState.deduceEditorPosition(l),h=this._host.deduceModelPosition(u[0],u[1],u[2]),f=new jt(d.lineNumber,d.column,h.lineNumber,h.column);this._onSelectionChangeRequest.fire(f)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeNativeTextAreaContent(e){!this._accessibilityService.isScreenReaderOptimized()&&e==="render"||this._currentComposition||(this._logService.trace(`writeTextAreaState(reason: ${e})`),this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent()))}_ensureClipboardGetsEditorSelection(e){let t=this._host.getDataToCopy(),n={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};fv.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,` -`):t.text,n),e.preventDefault(),e.clipboardData&&qj.setTextData(e.clipboardData,t.text,t.html,n)}};jj=pTt([jZe(4,Ba),jZe(5,ks)],jj);qj={getTextData(i){let e=i.getData(rr.text),t=null,n=i.getData("vscode-editor-data");if(typeof n=="string")try{t=JSON.parse(n),t.version!==1&&(t=null)}catch{}return e.length===0&&t===null&&i.files.length>0?[Array.prototype.slice.call(i.files,0).map(r=>r.name).join(` -`),null]:[e,t]},setTextData(i,e,t,n){i.setData(rr.text,e),typeof t=="string"&&i.setData("text/html",t),i.setData("vscode-editor-data",JSON.stringify(n))}},Gj=class extends ue{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new _n(this._actual,"keydown")).event,this.onKeyUp=this._register(new _n(this._actual,"keyup")).event,this.onCompositionStart=this._register(new _n(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new _n(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new _n(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new _n(this._actual,"beforeinput")).event,this.onInput=this._register(new _n(this._actual,"input")).event,this.onCut=this._register(new _n(this._actual,"cut")).event,this.onCopy=this._register(new _n(this._actual,"copy")).event,this.onPaste=this._register(new _n(this._actual,"paste")).event,this.onFocus=this._register(new _n(this._actual,"focus")).event,this.onBlur=this._register(new _n(this._actual,"blur")).event,this._onSyntheticTap=this._register(new ge),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown(()=>Jg.onKeyDown())),this._register(this.onBeforeInput(()=>Jg.onBeforeInput())),this._register(this.onInput(()=>Jg.onInput())),this._register(this.onKeyUp(()=>Jg.onKeyUp())),this._register(Xe(this._actual,TI.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){let e=mm(this._actual);return e?e.activeElement===this._actual:this._actual.isConnected?gs()===this._actual:!1}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){let n=this._actual;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,n){let o=this._actual,r=null,s=mm(o);s?r=s.activeElement:r=gs();let a=pi(r),l=r===o,c=o.selectionStart,d=o.selectionEnd;if(l&&c===t&&d===n){Aa&&a.parent!==a&&o.focus();return}if(l){this.setIgnoreSelectionChangeTime("setSelectionRange"),o.setSelectionRange(t,n),Aa&&a.parent!==a&&o.focus();return}try{let u=oGe(o);this.setIgnoreSelectionChangeTime("setSelectionRange"),o.focus(),o.setSelectionRange(t,n),rGe(o,u)}catch{}}}});var T1e,I1e,Kj,qZe=P(()=>{PU();Qt();dh();_l();nt();Mn();$Ze();MI();jw();T1e=class extends tx{constructor(e,t,n){super(e,t,n),this._register(ar.addTarget(this.viewHelper.linesContentDomNode)),this._register(Xe(this.viewHelper.linesContentDomNode,vo.Tap,r=>this.onTap(r))),this._register(Xe(this.viewHelper.linesContentDomNode,vo.Change,r=>this.onChange(r))),this._register(Xe(this.viewHelper.linesContentDomNode,vo.Contextmenu,r=>this._onContextMenu(new up(r,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(Xe(this.viewHelper.linesContentDomNode,"pointerdown",r=>{let s=r.pointerType;if(s==="mouse"){this._lastPointerType="mouse";return}else s==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));let o=new wj(this.viewHelper.viewDomNode);this._register(o.onPointerMove(this.viewHelper.viewDomNode,r=>this._onMouseMove(r))),this._register(o.onPointerUp(this.viewHelper.viewDomNode,r=>this._onMouseUp(r))),this._register(o.onPointerLeave(this.viewHelper.viewDomNode,r=>this._onMouseLeave(r))),this._register(o.onPointerDown(this.viewHelper.viewDomNode,(r,s)=>this._onMouseDown(r,s)))}onTap(e){!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget)||(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),this._lastPointerType==="pen"&&this._dispatchGesture(e,!0)}_dispatchGesture(e,t){let n=this._createMouseTarget(new up(e,!1,this.viewHelper.viewDomNode),!1);n.position&&this.viewController.dispatchMouse({position:n.position,mouseColumn:n.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:t,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:n.type===6&&n.detail.injectedText!==null})}_onMouseDown(e,t){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e,t)}},I1e=class extends tx{constructor(e,t,n){super(e,t,n),this._register(ar.addTarget(this.viewHelper.linesContentDomNode)),this._register(Xe(this.viewHelper.linesContentDomNode,vo.Tap,o=>this.onTap(o))),this._register(Xe(this.viewHelper.linesContentDomNode,vo.Change,o=>this.onChange(o))),this._register(Xe(this.viewHelper.linesContentDomNode,vo.Contextmenu,o=>this._onContextMenu(new up(o,!1,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();let t=this._createMouseTarget(new up(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){let n=document.createEvent("CustomEvent");n.initEvent(TI.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(n),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}},Kj=class extends ue{constructor(e,t,n){super(),(Lc||Mje&&$V)&&VC.pointerEvents?this.handler=this._register(new T1e(e,t,n)):Hn.TouchEvent?this.handler=this._register(new I1e(e,t,n)):this.handler=this._register(new tx(e,t,n))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}});var GZe=P(()=>{});var KZe=P(()=>{});var pu,pv=P(()=>{qw();pu=class extends hp{}});function Ko(i){return{id:i}}function NI(i){switch(i){case ch.DARK:return"vs-dark";case ch.HIGH_CONTRAST_DARK:return"hc-black";case ch.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}function Qs(i){return YZe.onColorThemeChange(i)}var Mo,N1e,M1e,YZe,Yj,No=P(()=>{Xt();nt();_i();Ys();fp();Mo=vi("themeService");N1e={ThemingContribution:"base.contributions.theming"},M1e=class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new ge}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),Yt(()=>{let t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}},YZe=new M1e;jn.add(N1e.ThemingContribution,YZe);Yj=class extends ue{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(t=>this.onThemeChange(t)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}});var A1e,R1e,gyi,vyi,_yi,byi,eq,ZZe,d2,XZe,Zj,Xj,ob,QZe,JZe,eXe,tXe,iXe,rb,nXe,oXe,rXe,sXe,aXe,Qj,yyi,lXe,Cyi,wyi,xyi,Syi,cXe,dXe,kyi,Lyi,uXe,Eyi,Dyi,Tyi,Jj,tq,hXe,fXe,pXe,iq,nq,oq,rq,sq,aq,mXe,gXe,vXe,_Xe,bXe,yXe,CXe,wXe,xXe,SXe,kXe,LXe,EXe,Iyi,Myi,r1=P(()=>{Wt();sa();pr();No();A1e=me("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},g("lineHighlight","Background color for the highlight of line at the cursor position.")),R1e=me("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:Fn},g("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),gyi=me("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},g("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),vyi=me("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:Uo,hcLight:Uo},g("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),_yi=me("editor.symbolHighlightBackground",{dark:t1,light:t1,hcDark:null,hcLight:null},g("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),byi=me("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:Uo,hcLight:Uo},g("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),eq=me("editorCursor.foreground",{dark:"#AEAFAD",light:it.black,hcDark:it.white,hcLight:"#0F4A85"},g("caret","Color of the editor cursor.")),ZZe=me("editorCursor.background",null,g("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),d2=me("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},g("editorWhitespaces","Color of whitespace characters in the editor.")),XZe=me("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:it.white,hcLight:"#292929"},g("editorLineNumbers","Color of editor line numbers.")),Zj=me("editorIndentGuide.background",{dark:d2,light:d2,hcDark:d2,hcLight:d2},g("editorIndentGuides","Color of the editor indentation guides."),!1,g("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),Xj=me("editorIndentGuide.activeBackground",{dark:d2,light:d2,hcDark:d2,hcLight:d2},g("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,g("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),ob=me("editorIndentGuide.background1",{dark:Zj,light:Zj,hcDark:Zj,hcLight:Zj},g("editorIndentGuides1","Color of the editor indentation guides (1).")),QZe=me("editorIndentGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorIndentGuides2","Color of the editor indentation guides (2).")),JZe=me("editorIndentGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorIndentGuides3","Color of the editor indentation guides (3).")),eXe=me("editorIndentGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorIndentGuides4","Color of the editor indentation guides (4).")),tXe=me("editorIndentGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorIndentGuides5","Color of the editor indentation guides (5).")),iXe=me("editorIndentGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorIndentGuides6","Color of the editor indentation guides (6).")),rb=me("editorIndentGuide.activeBackground1",{dark:Xj,light:Xj,hcDark:Xj,hcLight:Xj},g("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),nXe=me("editorIndentGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),oXe=me("editorIndentGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),rXe=me("editorIndentGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),sXe=me("editorIndentGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),aXe=me("editorIndentGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),Qj=me("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:Uo,hcLight:Uo},g("editorActiveLineNumber","Color of editor active line number"),!1,g("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),yyi=me("editorLineNumber.activeForeground",{dark:Qj,light:Qj,hcDark:Qj,hcLight:Qj},g("editorActiveLineNumber","Color of editor active line number")),lXe=me("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},g("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed.")),Cyi=me("editorRuler.foreground",{dark:"#5A5A5A",light:it.lightgrey,hcDark:it.white,hcLight:"#292929"},g("editorRuler","Color of the editor rulers.")),wyi=me("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},g("editorCodeLensForeground","Foreground color of editor CodeLens")),xyi=me("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},g("editorBracketMatchBackground","Background color behind matching brackets")),Syi=me("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:Fn,hcLight:Fn},g("editorBracketMatchBorder","Color for matching brackets boxes")),cXe=me("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},g("editorOverviewRulerBorder","Color of the overview ruler border.")),dXe=me("editorOverviewRuler.background",null,g("editorOverviewRulerBackground","Background color of the editor overview ruler.")),kyi=me("editorGutter.background",{dark:Xs,light:Xs,hcDark:Xs,hcLight:Xs},g("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),Lyi=me("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:it.fromHex("#fff").transparent(.8),hcLight:Fn},g("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),uXe=me("editorUnnecessaryCode.opacity",{dark:it.fromHex("#000a"),light:it.fromHex("#0007"),hcDark:null,hcLight:null},g("unnecessaryCodeOpacity",`Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.`)),Eyi=me("editorGhostText.border",{dark:null,light:null,hcDark:it.fromHex("#fff").transparent(.8),hcLight:it.fromHex("#292929").transparent(.8)},g("editorGhostTextBorder","Border color of ghost text in the editor.")),Dyi=me("editorGhostText.foreground",{dark:it.fromHex("#ffffff56"),light:it.fromHex("#0007"),hcDark:null,hcLight:null},g("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),Tyi=me("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},g("editorGhostTextBackground","Background color of the ghost text in the editor.")),Jj=new it(new On(0,122,204,.6)),tq=me("editorOverviewRuler.rangeHighlightForeground",{dark:Jj,light:Jj,hcDark:Jj,hcLight:Jj},g("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),hXe=me("editorOverviewRuler.errorForeground",{dark:new it(new On(255,18,18,.7)),light:new it(new On(255,18,18,.7)),hcDark:new it(new On(255,50,50,1)),hcLight:"#B5200D"},g("overviewRuleError","Overview ruler marker color for errors.")),fXe=me("editorOverviewRuler.warningForeground",{dark:Ll,light:Ll,hcDark:Z5,hcLight:Z5},g("overviewRuleWarning","Overview ruler marker color for warnings.")),pXe=me("editorOverviewRuler.infoForeground",{dark:Ql,light:Ql,hcDark:X5,hcLight:X5},g("overviewRuleInfo","Overview ruler marker color for infos.")),iq=me("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},g("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),nq=me("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},g("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),oq=me("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},g("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),rq=me("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),sq=me("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),aq=me("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),mXe=me("editorBracketHighlight.unexpectedBracket.foreground",{dark:new it(new On(255,18,18,.8)),light:new it(new On(255,18,18,.8)),hcDark:new it(new On(255,50,50,1)),hcLight:""},g("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),gXe=me("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),vXe=me("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),_Xe=me("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),bXe=me("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),yXe=me("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),CXe=me("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),wXe=me("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),xXe=me("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),SXe=me("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),kXe=me("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),LXe=me("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),EXe=me("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides.")),Iyi=me("editorUnicodeHighlight.border",{dark:Ll,light:Ll,hcDark:Ll,hcLight:Ll},g("editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),Myi=me("editorUnicodeHighlight.background",{dark:yI,light:yI,hcDark:yI,hcLight:yI},g("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));Qs((i,e)=>{let t=i.getColor(Xs),n=i.getColor(A1e),o=n&&!n.isTransparent()?n:t;o&&e.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${o}; }`)})});var sb,P1e=P(()=>{KZe();Mn();pv();Mi();Kt();No();r1();sb=class i extends pu{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new ke(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){let e=this._context.configuration.options;this._lineHeight=e.get(66);let t=e.get(67);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(94);let n=e.get(143);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){let t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let n=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,n=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(n=!0),n}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){let t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ke(e,1));if(t.column!==1)return"";let n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(this._renderLineNumbers===2){let o=Math.abs(this._lastCursorModelPosition.lineNumber-n);return o===0?''+n+"":String(o)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===n||n%10===0?String(n):"":String(n)}prepareRender(e){if(this._renderLineNumbers===0){this._renderResult=null;return}let t=Ar?this._lineHeight%2===0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter(c=>!!c.options.lineNumberClassName);r.sort((c,d)=>O.compareRangesUsingEnds(c.range,d.range));let s=0,a=this._context.viewModel.getLineCount(),l=[];for(let c=n;c<=o;c++){let d=c-n,u=this._getLineRenderLineNumber(c),h="";for(;s${u}`}this._renderResult=l}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};sb.CLASS_NAME="line-numbers";Qs((i,e)=>{let t=i.getColor(XZe),n=i.getColor(lXe);n?e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):t&&e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${t.transparent(.4)}; }`)})});var DXe=P(()=>{});var mv,O1e=P(()=>{DXe();_a();rd();mv=class i extends Yr{constructor(e){super(e);let t=this._context.configuration.options,n=t.get(143);this._canUseLayerHinting=!t.get(32),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._domNode=vn(document.createElement("div")),this._domNode.setClassName(i.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=vn(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(i.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(143);return this._canUseLayerHinting=!t.get(32),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");let t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);let n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)}};mv.CLASS_NAME="glyph-margin";mv.OUTER_CLASS_NAME="margin"});var TXe=P(()=>{});var h4,lq=P(()=>{TXe();h4="monaco-mouse-cursor-text"});var z1e,ab,F1e=P(()=>{Xt();z1e=class{constructor(){this._onDidChange=new ge,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}},ab=new z1e});var fn,vs=P(()=>{_i();fn=vi("keybindingService")});function gTt(i,e,t,n){if(e.length===0)return 0;let o=i.createElement("div");o.style.position="absolute",o.style.top="-50000px",o.style.width="50000px";let r=i.createElement("span");Gr(r,t),r.style.whiteSpace="pre",r.style.tabSize=`${n*t.spaceWidth}px`,r.append(e),o.appendChild(r),i.body.appendChild(o);let s=r.offsetWidth;return i.body.removeChild(o),s}var mTt,IXe,B1e,H1e,cq,MXe=P(()=>{GZe();Wt();Xc();_a();Mn();Ri();Vf();MI();E1e();rd();P1e();O1e();Ks();nw();Mi();Kt();zo();lq();Pr();sa();F1e();vs();_i();mTt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},IXe=function(i,e){return function(t,n){e(t,n,i)}},B1e=class{constructor(e,t,n,o,r){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=n,this.widthOfHiddenLineTextBefore=o,this.distanceToModelLineEnd=r,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){let t=new ke(this.modelLineNumber,this.distanceToModelLineStart+1),n=new ke(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(e?this._previousPresentation=e:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}},H1e=Aa,cq=class extends Yr{constructor(e,t,n,o,r){super(e),this._keybindingService=o,this._instantiationService=r,this._primaryCursorPosition=new ke(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=n,this._scrollLeft=0,this._scrollTop=0;let s=this._context.configuration.options,a=s.get(143);this._setAccessibilityOptions(s),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._contentHeight=a.height,this._fontInfo=s.get(50),this._lineHeight=s.get(66),this._emptySelectionClipboard=s.get(37),this._copyWithSyntaxHighlighting=s.get(25),this._visibleTextArea=null,this._selections=[new jt(1,1,1,1)],this._modelSelections=[new jt(1,1,1,1)],this._lastRenderPosition=null,this.textArea=vn(document.createElement("textarea")),El.write(this.textArea,7),this.textArea.setClassName(`inputarea ${h4}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");let{tabSize:l}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${l*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(s)),this.textArea.setAttribute("aria-required",s.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(s.get(123))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",g("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",s.get(90)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=vn(document.createElement("div")),this.textAreaCover.setPosition("absolute");let c={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:h=>this._context.viewModel.getLineMaxColumn(h),getValueInRange:(h,f)=>this._context.viewModel.getValueInRange(h,f),getValueLengthInRange:(h,f)=>this._context.viewModel.getValueLengthInRange(h,f),modifyPosition:(h,f)=>this._context.viewModel.modifyPosition(h,f)},d={getDataToCopy:()=>{let h=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,hr),f=this._context.viewModel.model.getEOL(),p=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),m=Array.isArray(h)?h:null,y=Array.isArray(h)?h.join(f):h,_,v=null;if(II.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&y.length<65536){let b=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);b&&(_=b.html,v=b.mode)}return{isFromEmptySelection:p,multicursorText:m,text:y,html:_,mode:v}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){let h=this._selections[0];if(Wi&&h.isEmpty()){let p=h.getStartPosition(),m=this._getWordBeforePosition(p);if(m.length===0&&(m=this._getCharacterBeforePosition(p)),m.length>0)return new tl(m,m.length,m.length,O.fromPositions(p),0)}if(Wi&&!h.isEmpty()&&c.getValueLengthInRange(h,0)<500){let p=c.getValueInRange(h,0);return new tl(p,0,p.length,h,0)}if(Xu&&!h.isEmpty()){let p="vscode-placeholder";return new tl(p,0,p.length,null,void 0)}return tl.EMPTY}if(que){let h=this._selections[0];if(h.isEmpty()){let f=h.getStartPosition(),[p,m]=this._getAndroidWordAtPosition(f);if(p.length>0)return new tl(p,m,m,O.fromPositions(f),0)}return tl.EMPTY}return $j.fromEditorSelection(c,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(h,f,p)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(h,f,p)},u=this._register(new Gj(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(jj,d,u,Xa,{isAndroid:que,isChrome:Rg,isFirefox:Aa,isSafari:Xu})),this._register(this._textAreaInput.onKeyDown(h=>{this._viewController.emitKeyDown(h)})),this._register(this._textAreaInput.onKeyUp(h=>{this._viewController.emitKeyUp(h)})),this._register(this._textAreaInput.onPaste(h=>{let f=!1,p=null,m=null;h.metadata&&(f=this._emptySelectionClipboard&&!!h.metadata.isFromEmptySelection,p=typeof h.metadata.multicursorText<"u"?h.metadata.multicursorText:null,m=h.metadata.mode),this._viewController.paste(h.text,f,p,m)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(h=>{h.replacePrevCharCnt||h.replaceNextCharCnt||h.positionDelta?(uh&&console.log(` => compositionType: <<${h.text}>>, ${h.replacePrevCharCnt}, ${h.replaceNextCharCnt}, ${h.positionDelta}`),this._viewController.compositionType(h.text,h.replacePrevCharCnt,h.replaceNextCharCnt,h.positionDelta)):(uh&&console.log(` => type: <<${h.text}>>`),this._viewController.type(h.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(h=>{this._viewController.setSelection(h)})),this._register(this._textAreaInput.onCompositionStart(h=>{let f=this.textArea.domNode,p=this._modelSelections[0],{distanceToModelLineStart:m,widthOfHiddenTextBefore:y}=(()=>{let v=f.value.substring(0,Math.min(f.selectionStart,f.selectionEnd)),b=v.lastIndexOf(` +}`,n}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}});var hp,qw=P(()=>{nt();hp=class extends ue{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let n=0,o=e.length;n{qw();Yr=class extends hp{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}},El=class{static write(e,t){e.setAttribute("data-mprt",String(t))}static read(e){let t=e.getAttribute("data-mprt");return t===null?0:parseInt(t,10)}static collect(e,t){let n=[],o=0;for(;e&&e!==e.ownerDocument.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(n[o++]=this.read(e)),e=e.parentElement;let r=new Uint8Array(o);for(let s=0;s{f1e=class{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;let n=this._viewLayout.getCurrentViewport();this.scrollTop=n.top,this.scrollLeft=n.left,this.viewportWidth=n.width,this.viewportHeight=n.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e,t){return this._viewLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,t)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}},Tj=class extends f1e{constructor(e,t,n){super(e,t),this._renderingContextBrand=void 0,this._viewLines=n}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}},Ij=class{constructor(e,t,n,o){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=n,this.continuesOnNextLine=o}},Gw=class i{static from(e){let t=new Array(e.length);for(let n=0,o=e.length;n{Kw();eb=class{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,n,o,r){let s=this._createRange();try{return s.setStart(e,t),s.setEnd(n,o),s.getClientRects()}catch{return null}finally{this._detachRange(s,r)}}static _mergeAdjacentRanges(e){if(e.length===1)return e;e.sort(Em.compare);let t=[],n=0,o=e[0];for(let r=1,s=e.length;r=a.left?o.width=Math.max(o.width,a.left+a.width-o.left):(t[n++]=o,o=a)}return t[n++]=o,t}static _createHorizontalRangesFromClientRects(e,t,n){if(!e||e.length===0)return null;let o=[];for(let r=0,s=e.length;rl)return null;if(t=Math.min(l,Math.max(0,t)),o=Math.min(l,Math.max(0,o)),t===o&&n===r&&n===0&&!e.children[t].firstChild){let h=e.children[t].getClientRects();return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(h,s.clientRectDeltaLeft,s.clientRectScale)}t!==o&&o>0&&r===0&&(o--,r=1073741824);let c=e.children[t].firstChild,d=e.children[o].firstChild;if((!c||!d)&&(!c&&n===0&&t>0&&(c=e.children[t-1].firstChild,n=1073741824),!d&&r===0&&o>0&&(d=e.children[o-1].firstChild,r=1073741824)),!c||!d)return null;n=Math.min(c.textContent.length,Math.max(0,n)),r=Math.min(d.textContent.length,Math.max(0,r));let u=this._readClientRects(c,n,d,r,s.endNode);return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(u,s.clientRectDeltaLeft,s.clientRectScale)}}});function Ac(i){return i===ch.HIGH_CONTRAST_DARK||i===ch.HIGH_CONTRAST_LIGHT}function a2(i){return i===ch.DARK||i===ch.HIGH_CONTRAST_DARK}var ch,fp=P(()=>{(function(i){i.DARK="dark",i.LIGHT="light",i.HIGH_CONTRAST_DARK="hcDark",i.HIGH_CONTRAST_LIGHT="hcLight"})(ch||(ch={}))});function oTt(i,e,t,n,o){return new p1e(i,e,t,n,o)}function rTt(i,e,t,n,o){return new Nj(i,e,t,n,o)}function Aj(i,e,t){let n=e.textContent.length,o=-1;for(;e;)e=e.previousSibling,o++;return i.getColumn(new uI(o,t),n)}var nTt,Zw,LI,pp,Yw,Nj,p1e,OZe,Rj=P(()=>{Xc();_a();Mn();PZe();Kw();gw();lv();fp();Ks();nTt=function(){return tu?!0:!(Ar||Aa||Xu)}(),Zw=!0,LI=class{constructor(e,t){this.themeType=t;let n=e.options,o=n.get(50);n.get(38)==="off"?this.renderWhitespace=n.get(98):this.renderWhitespace="none",this.renderControlCharacters=n.get(93),this.spaceWidth=o.spaceWidth,this.middotWidth=o.middotWidth,this.wsmiddotWidth=o.wsmiddotWidth,this.useMonospaceOptimizations=o.isMonospace&&!n.get(33),this.canUseHalfwidthRightwardsArrow=o.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(66),this.stopRenderingLineAfter=n.get(116),this.fontLigatures=n.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}},pp=class i{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(this._renderedViewLine)this._renderedViewLine.domNode=vn(e);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return Ac(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(e,t,n,o){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;let r=n.getViewLineRenderingData(e),s=this._options,a=Ld.filter(r.inlineDecorations,e,r.minColumn,r.maxColumn),l=null;if(Ac(s.themeType)||this._options.renderWhitespace==="selection"){let h=n.selections;for(let f of h){if(f.endLineNumbere)continue;let p=f.startLineNumber===e?f.startColumn:r.minColumn,m=f.endLineNumber===e?f.endColumn:r.maxColumn;p');let d=a4(c,o);o.appendString("");let u=null;return Zw&&nTt&&r.isBasicASCII&&s.useMonospaceOptimizations&&d.containsForeignElements===0&&(u=new Yw(this._renderedViewLine?this._renderedViewLine.domNode:null,c,d.characterMapping)),u||(u=OZe(this._renderedViewLine?this._renderedViewLine.domNode:null,c,d.characterMapping,d.containsRTL,d.containsForeignElements)),this._renderedViewLine=u,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof Yw:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof Yw?this._renderedViewLine.monospaceAssumptionsAreValid():Zw}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof Yw&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,n,o){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),n=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,n));let r=this._renderedViewLine.input.stopRenderingLineAfter;if(r!==-1&&t>r+1&&n>r+1)return new kI(!0,[new Em(this.getWidth(o),0)]);r!==-1&&t>r+1&&(t=r+1),r!==-1&&n>r+1&&(n=r+1);let s=this._renderedViewLine.getVisibleRangesForRange(e,t,n,o);return s&&s.length>0?new kI(!1,s):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}};pp.CLASS_NAME="view-line";Yw=class{constructor(e,t,n){this._cachedWidth=-1,this.domNode=e,this.input=t;let o=Math.floor(t.lineContent.length/300);if(o>0){this._keyColumnPixelOffsetCache=new Float32Array(o);for(let r=0;r=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),Zw=!1)}return Zw}toSlowRenderedLine(){return OZe(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,n,o){let r=this._getColumnPixelOffset(e,t,o),s=this._getColumnPixelOffset(e,n,o);return[new Em(r,s-r)]}_getColumnPixelOffset(e,t,n){if(t<=300){let c=this._characterMapping.getHorizontalOffset(t);return this._charWidth*c}let o=Math.floor((t-1)/300)-1,r=(o+1)*300+1,s=-1;if(this._keyColumnPixelOffsetCache&&(s=this._keyColumnPixelOffsetCache[o],s===-1&&(s=this._actualReadPixelOffset(e,r,n),this._keyColumnPixelOffsetCache[o]=s)),s===-1){let c=this._characterMapping.getHorizontalOffset(t);return this._charWidth*c}let a=this._characterMapping.getHorizontalOffset(r),l=this._characterMapping.getHorizontalOffset(t);return s+this._charWidth*(l-a)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,n){if(!this.domNode)return-1;let o=this._characterMapping.getDomPosition(t),r=eb.readHorizontalRanges(this._getReadingTarget(this.domNode),o.partIndex,o.charIndex,o.partIndex,o.charIndex,n);return!r||r.length===0?-1:r[0].left}getColumnOfNodeOffset(e,t){return Aj(this._characterMapping,e,t)}},Nj=class{constructor(e,t,n,o,r){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=r,this._cachedWidth=-1,this._pixelOffsetCache=null,!o||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let s=0,a=this._characterMapping.length;s<=a;s++)this._pixelOffsetCache[s]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e?.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(e,t,n,o){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){let r=this._readPixelOffset(this.domNode,e,t,o);if(r===-1)return null;let s=this._readPixelOffset(this.domNode,e,n,o);return s===-1?null:[new Em(r,s-r)]}return this._readVisibleRangesForRange(this.domNode,e,t,n,o)}_readVisibleRangesForRange(e,t,n,o,r){if(n===o){let s=this._readPixelOffset(e,t,n,r);return s===-1?null:[new Em(s,0)]}else return this._readRawVisibleRangesForRange(e,n,o,r)}_readPixelOffset(e,t,n,o){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth(o);let r=this._getReadingTarget(e);return r.firstChild?(o.markDidDomLayout(),r.firstChild.offsetWidth):0}if(this._pixelOffsetCache!==null){let r=this._pixelOffsetCache[n];if(r!==-1)return r;let s=this._actualReadPixelOffset(e,t,n,o);return this._pixelOffsetCache[n]=s,s}return this._actualReadPixelOffset(e,t,n,o)}_actualReadPixelOffset(e,t,n,o){if(this._characterMapping.length===0){let l=eb.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,o);return!l||l.length===0?-1:l[0].left}if(n===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth(o);let r=this._characterMapping.getDomPosition(n),s=eb.readHorizontalRanges(this._getReadingTarget(e),r.partIndex,r.charIndex,r.partIndex,r.charIndex,o);if(!s||s.length===0)return-1;let a=s[0].left;if(this.input.isBasicASCII){let l=this._characterMapping.getHorizontalOffset(n),c=Math.round(this.input.spaceWidth*l);if(Math.abs(c-a)<=1)return c}return a}_readRawVisibleRangesForRange(e,t,n,o){if(t===1&&n===this._characterMapping.length)return[new Em(0,this.getWidth(o))];let r=this._characterMapping.getDomPosition(t),s=this._characterMapping.getDomPosition(n);return eb.readHorizontalRanges(this._getReadingTarget(e),r.partIndex,r.charIndex,s.partIndex,s.charIndex,o)}getColumnOfNodeOffset(e,t){return Aj(this._characterMapping,e,t)}},p1e=class extends Nj{_readVisibleRangesForRange(e,t,n,o,r){let s=super._readVisibleRangesForRange(e,t,n,o,r);if(!s||s.length===0||n===o||n===1&&o===this._characterMapping.length)return s;if(!this.input.containsRTL){let a=this._readPixelOffset(e,t,o,r);if(a!==-1){let l=s[s.length-1];l.left{Ri();mr=class i{static _nextVisibleColumn(e,t,n){return e===9?i.nextRenderTabStop(t,n):Bf(e)||yT(e)?t+2:t+1}static visibleColumnFromColumn(e,t,n){let o=Math.min(t-1,e.length),r=e.substring(0,o),s=new f5(r),a=0;for(;!s.eol();){let l=zC(r,o,s.offset);s.nextGraphemeLength(),a=this._nextVisibleColumn(l,a,n)}return a}static columnFromVisibleColumn(e,t,n){if(t<=0)return 1;let o=e.length,r=new f5(e),s=0,a=1;for(;!r.eol();){let l=zC(e,o,r.offset);r.nextGraphemeLength();let c=this._nextVisibleColumn(l,s,n),d=r.offset+1;if(c>=t){let u=t-s;return c-t{mp();tb=class i{static whitespaceVisibleColumn(e,t,n){let o=e.length,r=0,s=-1,a=-1;for(let l=0;lr.left+r.width)y=p.length;else{let v=zj.getInstance();for(let b=0;b{jw();rd();Rj();Mi();Kt();mp();Qt();m1e();l2=class{constructor(e=null){this.hitTarget=e,this.type=0}},Pj=class{constructor(e,t,n){this.position=e,this.spanNode=t,this.injectedText=n,this.type=1}};(function(i){function e(t,n,o){let r=t.getPositionFromDOMInfo(n,o);return r?new Pj(r,n,null):new l2(n)}i.createFromDOMInfo=e})(ib||(ib={}));Oj=class{constructor(e,t){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=t}},Dl=class{static _deduceRage(e,t=null){return!t&&e?new O(e.lineNumber,e.column,e.lineNumber,e.column):t??null}static createUnknown(e,t,n){return{type:0,element:e,mouseColumn:t,position:n,range:this._deduceRage(n)}}static createTextarea(e,t){return{type:1,element:e,mouseColumn:t,position:null,range:null}}static createMargin(e,t,n,o,r,s){return{type:e,element:t,mouseColumn:n,position:o,range:r,detail:s}}static createViewZone(e,t,n,o,r){return{type:e,element:t,mouseColumn:n,position:o,range:this._deduceRage(o),detail:r}}static createContentText(e,t,n,o,r){return{type:6,element:e,mouseColumn:t,position:n,range:this._deduceRage(n,o),detail:r}}static createContentEmpty(e,t,n,o){return{type:7,element:e,mouseColumn:t,position:n,range:this._deduceRage(n),detail:o}}static createContentWidget(e,t,n){return{type:9,element:e,mouseColumn:t,position:null,range:null,detail:n}}static createScrollbar(e,t,n){return{type:11,element:e,mouseColumn:t,position:n,range:this._deduceRage(n)}}static createOverlayWidget(e,t,n){return{type:12,element:e,mouseColumn:t,position:null,range:null,detail:n}}static createOutsideEditor(e,t,n,o){return{type:13,element:null,mouseColumn:e,position:t,range:this._deduceRage(t),outsidePosition:n,outsideDistance:o}}static _typeToString(e){return e===1?"TEXTAREA":e===2?"GUTTER_GLYPH_MARGIN":e===3?"GUTTER_LINE_NUMBERS":e===4?"GUTTER_LINE_DECORATIONS":e===5?"GUTTER_VIEW_ZONE":e===6?"CONTENT_TEXT":e===7?"CONTENT_EMPTY":e===8?"CONTENT_VIEW_ZONE":e===9?"CONTENT_WIDGET":e===10?"OVERVIEW_RULER":e===11?"SCROLLBAR":e===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+JSON.stringify(e.detail)}},Rc=class{static isTextArea(e){return e.length===2&&e[0]===3&&e[1]===7}static isChildOfViewLines(e){return e.length>=4&&e[0]===3&&e[3]===8}static isStrictChildOfViewLines(e){return e.length>4&&e[0]===3&&e[3]===8}static isChildOfScrollableElement(e){return e.length>=2&&e[0]===3&&e[1]===6}static isChildOfMinimap(e){return e.length>=2&&e[0]===3&&e[1]===9}static isChildOfContentWidgets(e){return e.length>=4&&e[0]===3&&e[3]===1}static isChildOfOverflowGuard(e){return e.length>=1&&e[0]===3}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&e[0]===2}static isChildOfOverlayWidgets(e){return e.length>=2&&e[0]===3&&e[1]===4}static isChildOfOverflowingOverlayWidgets(e){return e.length>=1&&e[0]===5}},Xw=class i{constructor(e,t,n){this.viewModel=e.viewModel;let o=e.configuration.options;this.layoutInfo=o.get(143),this.viewDomNode=t.viewDomNode,this.lineHeight=o.get(66),this.stickyTabStops=o.get(115),this.typicalHalfwidthCharacterWidth=o.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=n,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return i.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){let n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){let o=n.verticalOffset+n.height/2,r=e.viewModel.getLineCount(),s=null,a,l=null;return n.afterLineNumber!==r&&(l=new ke(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(s=new ke(n.afterLineNumber,e.viewModel.getLineMaxColumn(n.afterLineNumber))),l===null?a=s:s===null?a=l:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,EI._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}},_1e=class i extends v1e{constructor(e,t,n,o,r){super(e,t,n,o),this._ctx=e,r?(this.target=r,this.targetPath=El.collect(r,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset} + target: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(e=null){return e&&e.columns.contentLeft+s.width)continue;let a=e.getVerticalOffsetForLineNumber(s.position.lineNumber);if(a<=r&&r<=a+s.height)return t.fulfillContentText(s.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){let n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){let o=t.isInContentArea?8:5;return t.fulfillViewZone(o,n.position,n)}return null}static _hitTestTextArea(e,t){return Rc.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){let n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),o=n.range.getStartPosition(),r=Math.abs(t.relativePos.x),s={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:r};if(r-=e.layoutInfo.glyphMarginLeft,r<=e.layoutInfo.glyphMarginWidth){let a=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(n.range.getStartPosition()),l=e.viewModel.glyphLanes.getLanesAtLine(a.lineNumber);return s.glyphMarginLane=l[Math.floor(r/e.lineHeight)],t.fulfillMargin(2,o,n.range,s)}return r-=e.layoutInfo.glyphMarginWidth,r<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,o,n.range,s):(r-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,o,n.range,s))}return null}static _hitTestViewLines(e,t,n){if(!Rc.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new ke(1,1),zZe);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){let r=e.viewModel.getLineCount(),s=e.viewModel.getLineMaxColumn(r);return t.fulfillContentEmpty(new ke(r,s),zZe)}if(n){if(Rc.isStrictChildOfViewLines(t.targetPath)){let r=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(e.viewModel.getLineLength(r)===0){let a=e.getLineWidth(r),l=g1e(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(new ke(r,1),l)}let s=e.getLineWidth(r);if(t.mouseContentHorizontalOffset>=s){let a=g1e(t.mouseContentHorizontalOffset-s),l=new ke(r,e.viewModel.getLineMaxColumn(r));return t.fulfillContentEmpty(l,a)}}return t.fulfillUnknown()}let o=i._doHitTest(e,t);return o.type===1?i.createMouseTargetFromHitTestPosition(e,t,o.spanNode,o.position,o.injectedText):this._createMouseTarget(e,t.withTarget(o.hitTarget),!0)}static _hitTestMinimap(e,t){if(Rc.isChildOfMinimap(t.targetPath)){let n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),o=e.viewModel.getLineMaxColumn(n);return t.fulfillScrollbar(new ke(n,o))}return null}static _hitTestScrollbarSlider(e,t){if(Rc.isChildOfScrollableElement(t.targetPath)&&t.target&&t.target.nodeType===1){let n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){let o=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.viewModel.getLineMaxColumn(o);return t.fulfillScrollbar(new ke(o,r))}}return null}static _hitTestScrollbar(e,t){if(Rc.isChildOfScrollableElement(t.targetPath)){let n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),o=e.viewModel.getLineMaxColumn(n);return t.fulfillScrollbar(new ke(n,o))}return null}getMouseColumn(e){let t=this._context.configuration.options,n=t.get(143),o=this._context.viewLayout.getCurrentScrollLeft()+e.x-n.contentLeft;return i._getMouseColumn(o,t.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,n,o,r){let s=o.lineNumber,a=o.column,l=e.getLineWidth(s);if(t.mouseContentHorizontalOffset>l){let _=g1e(t.mouseContentHorizontalOffset-l);return t.fulfillContentEmpty(o,_)}let c=e.visibleRangeForPosition(s,a);if(!c)return t.fulfillUnknown(o);let d=c.left;if(Math.abs(t.mouseContentHorizontalOffset-d)<1)return t.fulfillContentText(o,null,{mightBeForeignElement:!!r,injectedText:r});let u=[];if(u.push({offset:c.left,column:a}),a>1){let _=e.visibleRangeForPosition(s,a-1);_&&u.push({offset:_.left,column:a-1})}let h=e.viewModel.getLineMaxColumn(s);if(a_.offset-v.offset);let f=t.pos.toClientCoordinates(pi(e.viewDomNode)),p=n.getBoundingClientRect(),m=p.left<=f.clientX&&f.clientX<=p.right,y=null;for(let _=1;_r)){let a=Math.floor((o+r)/2),l=t.pos.y+(a-t.mouseVerticalOffset);l<=t.editorPos.y&&(l=t.editorPos.y+1),l>=t.editorPos.y+t.editorPos.height&&(l=t.editorPos.y+t.editorPos.height-1);let c=new dv(t.pos.x,l),d=this._actualDoHitTestWithCaretRangeFromPoint(e,c.toClientCoordinates(pi(e.viewDomNode)));if(d.type===1)return d}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates(pi(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,t){let n=mm(e.viewDomNode),o;if(n?typeof n.caretRangeFromPoint>"u"?o=sTt(n,t.clientX,t.clientY):o=n.caretRangeFromPoint(t.clientX,t.clientY):o=e.viewDomNode.ownerDocument.caretRangeFromPoint(t.clientX,t.clientY),!o||!o.startContainer)return new l2;let r=o.startContainer;if(r.nodeType===r.TEXT_NODE){let s=r.parentNode,a=s?s.parentNode:null,l=a?a.parentNode:null;return(l&&l.nodeType===l.ELEMENT_NODE?l.className:null)===pp.CLASS_NAME?ib.createFromDOMInfo(e,s,o.startOffset):new l2(r.parentNode)}else if(r.nodeType===r.ELEMENT_NODE){let s=r.parentNode,a=s?s.parentNode:null;return(a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===pp.CLASS_NAME?ib.createFromDOMInfo(e,r,r.textContent.length):new l2(r)}return new l2}static _doHitTestWithCaretPositionFromPoint(e,t){let n=e.viewDomNode.ownerDocument.caretPositionFromPoint(t.clientX,t.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){let o=n.offsetNode.parentNode,r=o?o.parentNode:null,s=r?r.parentNode:null;return(s&&s.nodeType===s.ELEMENT_NODE?s.className:null)===pp.CLASS_NAME?ib.createFromDOMInfo(e,n.offsetNode.parentNode,n.offset):new l2(n.offsetNode.parentNode)}if(n.offsetNode.nodeType===n.offsetNode.ELEMENT_NODE){let o=n.offsetNode.parentNode,r=o&&o.nodeType===o.ELEMENT_NODE?o.className:null,s=o?o.parentNode:null,a=s&&s.nodeType===s.ELEMENT_NODE?s.className:null;if(r===pp.CLASS_NAME){let l=n.offsetNode.childNodes[Math.min(n.offset,n.offsetNode.childNodes.length-1)];if(l)return ib.createFromDOMInfo(e,l,0)}else if(a===pp.CLASS_NAME)return ib.createFromDOMInfo(e,n.offsetNode,0)}return new l2(n.offsetNode)}static _snapToSoftTabBoundary(e,t){let n=t.getLineContent(e.lineNumber),{tabSize:o}=t.model.getOptions(),r=tb.atomicPosition(n,e.column-1,o,2);return r!==-1?new ke(e.lineNumber,r+1):e}static _doHitTest(e,t){let n=new l2;if(typeof e.viewDomNode.ownerDocument.caretRangeFromPoint=="function"?n=this._doHitTestWithCaretRangeFromPoint(e,t):e.viewDomNode.ownerDocument.caretPositionFromPoint&&(n=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates(pi(e.viewDomNode)))),n.type===1){let o=e.viewModel.getInjectedTextAt(n.position),r=e.viewModel.normalizePosition(n.position,2);(o||!r.equals(n.position))&&(n=new Pj(r,n.spanNode,o))}return n}};zj=class i{static getInstance(){return i._INSTANCE||(i._INSTANCE=new i),i._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(e,t){let n=e+t;if(this._cache[n])return this._cache[n];let o=this._canvas.getContext("2d");o.font=t;let s=o.measureText(e).width;return this._cache[n]=s,s}};zj._INSTANCE=null});function Tr(i,e,t){let n=null,o=null;if(typeof t.value=="function"?(n="value",o=t.value,o.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof t.get=="function"&&(n="get",o=t.get),!o)throw new Error("not supported");let r=`$memoize$${e}`;t[n]=function(...s){return this.hasOwnProperty(r)||Object.defineProperty(this,r,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,s)}),this[r]}}var uv=P(()=>{});var aTt,vo,ar,dh=P(()=>{Qt();_l();Vi();uv();Xt();nt();Hh();aTt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r};(function(i){i.Tap="-monaco-gesturetap",i.Change="-monaco-gesturechange",i.Start="-monaco-gesturestart",i.End="-monaco-gesturesend",i.Contextmenu="-monaco-gesturecontextmenu"})(vo||(vo={}));ar=class i extends ue{constructor(){super(),this.dispatched=!1,this.targets=new $r,this.ignoreTargets=new $r,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(Et.runAndSubscribe(x5,({window:e,disposables:t})=>{t.add(Xe(e.document,"touchstart",n=>this.onTouchStart(n),{passive:!1})),t.add(Xe(e.document,"touchend",n=>this.onTouchEnd(e,n))),t.add(Xe(e.document,"touchmove",n=>this.onTouchMove(n),{passive:!1}))},{window:Hn,disposables:this._store}))}static addTarget(e){if(!i.isTouchDevice())return ue.None;i.INSTANCE||(i.INSTANCE=l5(new i));let t=i.INSTANCE.targets.push(e);return Yt(t)}static ignoreTarget(e){if(!i.isTouchDevice())return ue.None;i.INSTANCE||(i.INSTANCE=l5(new i));let t=i.INSTANCE.ignoreTargets.push(e);return Yt(t)}static isTouchDevice(){return"ontouchstart"in Hn||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,o=e.targetTouches.length;n=i.HOLD_DELAY&&Math.abs(l.initialPageX-Ph(l.rollingPageX))<30&&Math.abs(l.initialPageY-Ph(l.rollingPageY))<30){let d=this.newGestureEvent(vo.Contextmenu,l.initialTarget);d.pageX=Ph(l.rollingPageX),d.pageY=Ph(l.rollingPageY),this.dispatchEvent(d)}else if(o===1){let d=Ph(l.rollingPageX),u=Ph(l.rollingPageY),h=Ph(l.rollingTimestamps)-l.rollingTimestamps[0],f=d-l.rollingPageX[0],p=u-l.rollingPageY[0],m=[...this.targets].filter(y=>l.initialTarget instanceof Node&&y.contains(l.initialTarget));this.inertia(e,m,n,Math.abs(f)/h,f>0?1:-1,d,Math.abs(p)/h,p>0?1:-1,u)}this.dispatchEvent(this.newGestureEvent(vo.End,l.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let n=document.createEvent("CustomEvent");return n.initEvent(e,!1,!0),n.initialTarget=t,n.tapCount=0,n}dispatchEvent(e){if(e.type===vo.Tap){let t=new Date().getTime(),n=0;t-this._lastSetTapCountTime>i.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=t,e.tapCount=n}else(e.type===vo.Change||e.type===vo.Contextmenu)&&(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(let t of this.ignoreTargets)if(t.contains(e.initialTarget))return;for(let t of this.targets)t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}}inertia(e,t,n,o,r,s,a,l,c){this.handle=za(e,()=>{let d=Date.now(),u=d-n,h=0,f=0,p=!0;o+=i.SCROLL_FRICTION*u,a+=i.SCROLL_FRICTION*u,o>0&&(p=!1,h=r*o*u),a>0&&(p=!1,f=l*a*u);let m=this.newGestureEvent(vo.Change);m.translationX=h,m.translationY=f,t.forEach(y=>y.dispatchEvent(m)),p||this.inertia(e,t,d,o,r,s+h,a,l,c+f)})}onTouchMove(e){let t=Date.now();for(let n=0,o=e.changedTouches.length;n3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(r.pageX),s.rollingPageY.push(r.pageY),s.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}};ar.SCROLL_FRICTION=-.005;ar.HOLD_DELAY=700;ar.CLEAR_TAP_COUNT_TIME=400;aTt([Tr],ar,"isTouchDevice",null)});var Ds,i1=P(()=>{Qt();Gl();Uh();dh();nt();Ds=class extends ue{onclick(e,t){this._register(Xe(e,Lt.CLICK,n=>t(new Oa(pi(e),n))))}onmousedown(e,t){this._register(Xe(e,Lt.MOUSE_DOWN,n=>t(new Oa(pi(e),n))))}onmouseover(e,t){this._register(Xe(e,Lt.MOUSE_OVER,n=>t(new Oa(pi(e),n))))}onmouseleave(e,t){this._register(Xe(e,Lt.MOUSE_LEAVE,n=>t(new Oa(pi(e),n))))}onkeydown(e,t){this._register(Xe(e,Lt.KEY_DOWN,n=>t(new qn(n))))}onkeyup(e,t){this._register(Xe(e,Lt.KEY_UP,n=>t(new qn(n))))}oninput(e,t){this._register(Xe(e,Lt.INPUT,t))}onblur(e,t){this._register(Xe(e,Lt.BLUR,t))}onfocus(e,t){this._register(Xe(e,Lt.FOCUS,t))}ignoreGesture(e){return ar.ignoreTarget(e)}}});var hv,Fj,Hj=P(()=>{Lw();i1();Qi();or();Qt();hv=11,Fj=class extends Ds{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...ui.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width=hv+"px",this.domNode.style.height=hv+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new Jf),this._register(go(this.bgDomNode,Lt.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(go(this.domNode,Lt.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new $3),this._pointerdownScheduleRepeatTimer=this._register(new Zs)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,pi(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}}});var Bj,FZe=P(()=>{Qi();nt();Bj=class extends ue{constructor(e,t,n){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new Zs)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)===null||e===void 0||e.setClassName(this._visibleClassName)},0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(t=this._domNode)===null||t===void 0||t.setClassName(this._invisibleClassName+(e?" fade":"")))}}});var lTt,Qw,y1e=P(()=>{Qt();_a();Lw();Hj();FZe();i1();Mn();lTt=140,Qw=class extends Ds{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new Bj(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new Jf),this._shouldRender=!0,this.domNode=vn(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(Xe(this.domNode.domNode,Lt.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new Fj(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,o){this.slider=vn(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof n=="number"&&this.slider.setWidth(n),typeof o=="number"&&this.slider.setHeight(o),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(Xe(this.slider.domNode,Lt.POINTER_DOWN,r=>{r.button===0&&(r.preventDefault(),this._sliderPointerDown(r))})),this.onclick(this.slider.domNode,r=>{r.leftButton&&r.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),o=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),r=this._sliderPointerPosition(e);n<=r&&r<=o?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,n;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,n=e.offsetY;else{let r=Lo(this.domNode.domNode);t=e.pageX-r.left,n=e.pageY-r.top}let o=this._pointerDownRelativePosition(t,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(o):this._scrollbarState.getDesiredScrollPositionFromOffset(o)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),n=this._sliderOrthogonalPointerPosition(e),o=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{let s=this._sliderOrthogonalPointerPosition(r),a=Math.abs(s-n);if(hr&&a>lTt){this._setDesiredScrollPositionNow(o.getScrollPosition());return}let c=this._sliderPointerPosition(r)-t;this._setDesiredScrollPositionNow(o.getDesiredScrollPositionFromDelta(c))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}});var fv,Vj=P(()=>{fv=class i{constructor(e,t,n,o,r,s){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=o,this._scrollSize=r,this._scrollPosition=s,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new i(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){let t=Math.round(e);return this._visibleSize!==t?(this._visibleSize=t,this._refreshComputedValues(),!0):!1}setScrollSize(e){let t=Math.round(e);return this._scrollSize!==t?(this._scrollSize=t,this._refreshComputedValues(),!0):!1}setScrollPosition(e){let t=Math.round(e);return this._scrollPosition!==t?(this._scrollPosition=t,this._refreshComputedValues(),!0):!1}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,n,o,r){let s=Math.max(0,n-e),a=Math.max(0,s-2*t),l=o>0&&o>n;if(!l)return{computedAvailableSize:Math.round(s),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(n*a/o))),d=(a-c)/(o-n),u=r*d;return{computedAvailableSize:Math.round(s),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:d,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){let e=i._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize,n=this._scrollPosition;return t{Uh();y1e();Hj();Vj();Go();Wj=class extends Qw{constructor(e,t,n){let o=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new fv(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,o.width,o.scrollWidth,r.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){let s=(t.arrowSize-hv)/2,a=(t.horizontalScrollbarSize-hv)/2;this._createArrow({className:"scra",icon:kt.scrollbarButtonLeft,top:a,left:s,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new jf(null,1,0))}),this._createArrow({className:"scra",icon:kt.scrollbarButtonRight,top:a,left:void 0,bottom:void 0,right:s,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new jf(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}});var Uj,BZe=P(()=>{Uh();y1e();Hj();Vj();Go();Uj=class extends Qw{constructor(e,t,n){let o=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new fv(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,o.height,o.scrollHeight,r.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){let s=(t.arrowSize-hv)/2,a=(t.verticalScrollbarSize-hv)/2;this._createArrow({className:"scra",icon:kt.scrollbarButtonUp,top:s,left:a,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new jf(null,0,1))}),this._createArrow({className:"scra",icon:kt.scrollbarButtonDown,top:void 0,left:a,bottom:s,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new jf(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}});function C1e(i,e){let t=e-i;return function(n){return i+t*uTt(n)}}function cTt(i,e,t){return function(n){return n{Xt();nt();w1e=class i{constructor(e,t,n,o,r,s,a){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t=t|0,n=n|0,o=o|0,r=r|0,s=s|0,a=a|0),this.rawScrollLeft=o,this.rawScrollTop=a,t<0&&(t=0),o+t>n&&(o=n-t),o<0&&(o=0),r<0&&(r=0),a+r>s&&(a=s-r),a<0&&(a=0),this.width=t,this.scrollWidth=n,this.scrollLeft=o,this.height=r,this.scrollHeight=s,this.scrollTop=a}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new i(this._forceIntegerValues,typeof e.width<"u"?e.width:this.width,typeof e.scrollWidth<"u"?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,typeof e.height<"u"?e.height:this.height,typeof e.scrollHeight<"u"?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new i(this._forceIntegerValues,this.width,this.scrollWidth,typeof e.scrollLeft<"u"?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof e.scrollTop<"u"?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){let n=this.width!==e.width,o=this.scrollWidth!==e.scrollWidth,r=this.scrollLeft!==e.scrollLeft,s=this.height!==e.height,a=this.scrollHeight!==e.scrollHeight,l=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:o,scrollLeftChanged:r,heightChanged:s,scrollHeightChanged:a,scrollTopChanged:l}}},n1=class extends ue{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new ge),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new w1e(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var n;let o=this._state.withScrollDimensions(e,t);this._setState(o,!!this._smoothScrolling),(n=this._smoothScrolling)===null||n===void 0||n.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let o;t?o=new jj(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):o=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=o}else{let n=this._state.withScrollPosition(e);this._smoothScrolling=jj.start(this._state,n,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,t)))}},$j=class{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}};jj=class i{constructor(e,t,n,o){this.from=e,this.to=t,this.duration=o,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,n){if(Math.abs(e-t)>2.5*n){let r,s;return e{});function fTt(i){let e={lazyRender:typeof i.lazyRender<"u"?i.lazyRender:!1,className:typeof i.className<"u"?i.className:"",useShadows:typeof i.useShadows<"u"?i.useShadows:!0,handleMouseWheel:typeof i.handleMouseWheel<"u"?i.handleMouseWheel:!0,flipAxes:typeof i.flipAxes<"u"?i.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof i.consumeMouseWheelIfScrollbarIsNeeded<"u"?i.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof i.alwaysConsumeMouseWheel<"u"?i.alwaysConsumeMouseWheel:!1,scrollYToX:typeof i.scrollYToX<"u"?i.scrollYToX:!1,mouseWheelScrollSensitivity:typeof i.mouseWheelScrollSensitivity<"u"?i.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof i.fastScrollSensitivity<"u"?i.fastScrollSensitivity:5,scrollPredominantAxis:typeof i.scrollPredominantAxis<"u"?i.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof i.mouseWheelSmoothScroll<"u"?i.mouseWheelSmoothScroll:!0,arrowSize:typeof i.arrowSize<"u"?i.arrowSize:11,listenOnDomNode:typeof i.listenOnDomNode<"u"?i.listenOnDomNode:null,horizontal:typeof i.horizontal<"u"?i.horizontal:1,horizontalScrollbarSize:typeof i.horizontalScrollbarSize<"u"?i.horizontalScrollbarSize:10,horizontalSliderSize:typeof i.horizontalSliderSize<"u"?i.horizontalSliderSize:0,horizontalHasArrows:typeof i.horizontalHasArrows<"u"?i.horizontalHasArrows:!1,vertical:typeof i.vertical<"u"?i.vertical:1,verticalScrollbarSize:typeof i.verticalScrollbarSize<"u"?i.verticalScrollbarSize:10,verticalHasArrows:typeof i.verticalHasArrows<"u"?i.verticalHasArrows:!1,verticalSliderSize:typeof i.verticalSliderSize<"u"?i.verticalSliderSize:0,scrollByPage:typeof i.scrollByPage<"u"?i.scrollByPage:!1};return e.horizontalSliderSize=typeof i.horizontalSliderSize<"u"?i.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof i.verticalSliderSize<"u"?i.verticalSliderSize:e.verticalScrollbarSize,Wi&&(e.className+=" mac"),e}var hTt,WZe,UZe,x1e,nb,DI,ex,c2,gp,o1=P(()=>{Xc();Qt();_a();Uh();HZe();BZe();i1();Qi();Xt();nt();Mn();Jw();VZe();hTt=500,WZe=50,UZe=!0,x1e=class{constructor(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0}},nb=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let e=1,t=0,n=1,o=this._rear;do{let r=o===this._front?e:Math.pow(2,-n);if(e-=r,t+=this._memory[o].score*r,o===this._front)break;o=(this._capacity+o-1)%this._capacity,n++}while(!0);return t<=.5}acceptStandardWheelEvent(e){if(Rg){let t=pi(e.browserEvent),n=fqe(t);this.accept(Date.now(),e.deltaX*n,e.deltaY*n)}else this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,t,n){let o=new x1e(e,t,n);o.score=this._computeScore(o),this._front===-1&&this._rear===-1?(this._memory[0]=o,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=o)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5,n=this._front===-1&&this._rear===-1?null:this._memory[this._rear];return(!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}};nb.INSTANCE=new nb;DI=class extends Ds{get options(){return this._options}constructor(e,t,n){super(),this._onScroll=this._register(new ge),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new ge),e.style.overflow="hidden",this._options=fTt(t),this._scrollable=n,this._register(this._scrollable.onScroll(r=>{this._onWillScroll.fire(r),this._onDidScroll(r),this._onScroll.fire(r)}));let o={onMouseWheel:r=>this._onMouseWheel(r),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new Uj(this._scrollable,this._options,o)),this._horizontalScrollbar=this._register(new Wj(this._scrollable,this._options,o)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=vn(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=vn(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=vn(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,r=>this._onMouseOver(r)),this.onmouseleave(this._listenOnDomNode,r=>this._onMouseLeave(r)),this._hideTimeout=this._register(new Zs),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=Nn(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Wi&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new jf(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Nn(this._mouseWheelToDispose),e)){let n=o=>{this._onMouseWheel(new jf(o))};this._mouseWheelToDispose.push(Xe(this._listenOnDomNode,Lt.MOUSE_WHEEL,n,{passive:!1}))}}_onMouseWheel(e){var t;if(!((t=e.browserEvent)===null||t===void 0)&&t.defaultPrevented)return;let n=nb.INSTANCE;UZe&&n.acceptStandardWheelEvent(e);let o=!1;if(e.deltaY||e.deltaX){let s=e.deltaY*this._options.mouseWheelScrollSensitivity,a=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&a+s===0?a=s=0:Math.abs(s)>=Math.abs(a)?a=0:s=0),this._options.flipAxes&&([s,a]=[a,s]);let l=!Wi&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||l)&&!a&&(a=s,s=0),e.browserEvent&&e.browserEvent.altKey&&(a=a*this._options.fastScrollSensitivity,s=s*this._options.fastScrollSensitivity);let c=this._scrollable.getFutureScrollPosition(),d={};if(s){let u=WZe*s,h=c.scrollTop-(u<0?Math.floor(u):Math.ceil(u));this._verticalScrollbar.writeScrollPosition(d,h)}if(a){let u=WZe*a,h=c.scrollLeft-(u<0?Math.floor(u):Math.ceil(u));this._horizontalScrollbar.writeScrollPosition(d,h)}d=this._scrollable.validateScrollPosition(d),(c.scrollLeft!==d.scrollLeft||c.scrollTop!==d.scrollTop)&&(UZe&&this._options.mouseWheelSmoothScroll&&n.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(d):this._scrollable.setScrollPositionNow(d),o=!0)}let r=o;!r&&this._options.alwaysConsumeMouseWheel&&(r=!0),!r&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(r=!0),r&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0,o=n?" left":"",r=t?" top":"",s=n||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${o}`),this._topShadowDomNode.setClassName(`shadow${r}`),this._topLeftShadowDomNode.setClassName(`shadow${s}${r}${o}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),hTt)}},ex=class extends DI{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;let n=new n1({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:o=>za(pi(e),o)});super(e,t,n),this._register(n)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}},c2=class extends DI{constructor(e,t,n){super(e,t,n)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}},gp=class extends DI{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;let n=new n1({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:o=>za(pi(e),o)});super(e,t,n),this._register(n),this._element=e,this._register(this.onScroll(o=>{o.scrollTopChanged&&(this._element.scrollTop=o.scrollTop),o.scrollLeftChanged&&(this._element.scrollLeft=o.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}});var tx,S1e,k1e,L1e,qj,$Ze=P(()=>{Qt();Uh();nt();Mn();b1e();jw();BC();Mi();zo();qw();o1();tx=class extends hp{constructor(e,t,n){super(),this._mouseLeaveMonitor=null,this._context=e,this.viewController=t,this.viewHelper=n,this.mouseTargetFactory=new EI(this._context,n),this._mouseDownOperation=this._register(new S1e(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(s,a)=>this._createMouseTarget(s,a),s=>this._getMouseColumn(s))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(143).height;let o=new Sj(this.viewHelper.viewDomNode);this._register(o.onContextMenu(this.viewHelper.viewDomNode,s=>this._onContextMenu(s,!0))),this._register(o.onMouseMove(this.viewHelper.viewDomNode,s=>{this._onMouseMove(s),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=Xe(this.viewHelper.viewDomNode.ownerDocument,"mousemove",a=>{this.viewHelper.viewDomNode.contains(a.target)||this._onMouseLeave(new up(a,!1,this.viewHelper.viewDomNode))}))})),this._register(o.onMouseUp(this.viewHelper.viewDomNode,s=>this._onMouseUp(s))),this._register(o.onMouseLeave(this.viewHelper.viewDomNode,s=>this._onMouseLeave(s)));let r=0;this._register(o.onPointerDown(this.viewHelper.viewDomNode,(s,a)=>{r=a})),this._register(Xe(this.viewHelper.viewDomNode,Lt.POINTER_UP,s=>{this._mouseDownOperation.onPointerUp()})),this._register(o.onMouseDown(this.viewHelper.viewDomNode,s=>this._onMouseDown(s,r))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){let e=nb.INSTANCE,t=0,n=Qc.getZoomLevel(),o=!1,r=0,s=l=>{if(this.viewController.emitMouseWheel(l),!this._context.configuration.options.get(75))return;let c=new jf(l);if(e.acceptStandardWheelEvent(c),e.isPhysicalMouseWheel()){if(a(l)){let d=Qc.getZoomLevel(),u=c.deltaY>0?1:-1;Qc.setZoomLevel(d+u),c.preventDefault(),c.stopPropagation()}}else Date.now()-t>50&&(n=Qc.getZoomLevel(),o=a(l),r=0),t=Date.now(),r+=c.deltaY,o&&(Qc.setZoomLevel(n+r/5),c.preventDefault(),c.stopPropagation())};this._register(Xe(this.viewHelper.viewDomNode,Lt.MOUSE_WHEEL,s,{capture:!0,passive:!1}));function a(l){return Wi?(l.metaKey||l.ctrlKey)&&!l.shiftKey&&!l.altKey:l.ctrlKey&&!l.metaKey&&!l.shiftKey&&!l.altKey}}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(143)){let t=this._context.configuration.options.get(143).height;this._height!==t&&(this._height=t,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){let o=new SI(e,t).toPageCoordinates(pi(this.viewHelper.viewDomNode)),r=Ej(this.viewHelper.viewDomNode);if(o.yr.y+r.height||o.xr.x+r.width)return null;let s=Dj(this.viewHelper.viewDomNode,r,o);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),r,o,s,null)}_createMouseTarget(e,t){let n=e.target;if(!this.viewHelper.viewDomNode.contains(n)){let o=mm(this.viewHelper.viewDomNode);o&&(n=o.elementsFromPoint(e.posx,e.posy).find(r=>this.viewHelper.viewDomNode.contains(r)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?n:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),!(this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(d&&(o||s&&a))u(),this._mouseDownOperation.start(n.type,e,t);else if(r)e.preventDefault();else if(l){let h=n.detail;d&&this.viewHelper.shouldSuppressMouseDownOnViewZone(h.viewZoneId)&&(u(),this._mouseDownOperation.start(n.type,e,t),e.preventDefault())}else c&&this.viewHelper.shouldSuppressMouseDownOnWidget(n.detail)&&(u(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:n})}},S1e=class extends ue{constructor(e,t,n,o,r,s){super(),this._context=e,this._viewController=t,this._viewHelper=n,this._mouseTargetFactory=o,this._createMouseTarget=r,this._getMouseColumn=s,this._mouseMoveMonitor=this._register(new Lj(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new k1e(this._context,this._viewHelper,this._mouseTargetFactory,(a,l,c)=>this._dispatchMouse(a,l,c))),this._mouseState=new qj,this._currentSelection=new jt(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);let t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):t.type===13&&(t.outsidePosition==="above"||t.outsidePosition==="below")?this._topBottomDragScrolling.start(t,e):(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)))}start(e,t,n){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(e===3),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);let o=this._findMousePosition(t,!0);if(!o||!o.position)return;this._mouseState.trySetCount(t.detail,o.position),t.detail=this._mouseState.count;let r=this._context.configuration.options;if(!r.get(90)&&r.get(35)&&!r.get(22)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&o.type===6&&o.position&&this._currentSelection.containsPosition(o.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,n,t.buttons,s=>this._onMouseDownThenMove(s),s=>{let a=this._findMousePosition(this._lastMouseEvent,!1);YC(s)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:a?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(o,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,n,t.buttons,s=>this._onMouseDownThenMove(s),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){let t=e.editorPos,n=this._context.viewModel,o=this._context.viewLayout,r=this._getMouseColumn(e);if(e.posyt.y+t.height){let a=e.posy-t.y-t.height,l=o.getCurrentScrollTop()+e.relativePos.y,c=Xw.getZoneAtCoord(this._context,l);if(c){let u=this._helpPositionJumpOverViewZone(c);if(u)return Dl.createOutsideEditor(r,u,"below",a)}let d=o.getLineNumberAtVerticalOffset(l);return Dl.createOutsideEditor(r,new ke(d,n.getLineMaxColumn(d)),"below",a)}let s=o.getLineNumberAtVerticalOffset(o.getCurrentScrollTop()+e.relativePos.y);if(e.posxt.x+t.width){let a=e.posx-t.x-t.width;return Dl.createOutsideEditor(r,new ke(s,n.getLineMaxColumn(s)),"right",a)}return null}_findMousePosition(e,t){let n=this._getPositionOutsideEditor(e);if(n)return n;let o=this._createMouseTarget(e,t);if(!o.position)return null;if(o.type===8||o.type===5){let s=this._helpPositionJumpOverViewZone(o.detail);if(s)return Dl.createViewZone(o.type,o.element,o.mouseColumn,s,o.detail)}return o}_helpPositionJumpOverViewZone(e){let t=new ke(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,o=e.positionAfter;return n&&o?n.isBefore(t)?n:o:null}_dispatchMouse(e,t,n){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:n,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:e.type===6&&e.detail.injectedText!==null})}},k1e=class extends ue{constructor(e,t,n,o){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=n,this._dispatchMouse=o,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new L1e(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}},L1e=class extends ue{constructor(e,t,n,o,r,s){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=n,this._dispatchMouse=o,this._position=r,this._mouseEvent=s,this._lastTime=Date.now(),this._animationFrameDisposable=za(pi(s.browserEvent),()=>this._execute())}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){let e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){let e=this._context.configuration.options.get(66),t=this._context.configuration.options.get(143).height/e,n=this._position.outsideDistance/e;return n<=1.5?Math.max(30,t*(1+n)):n<=3?Math.max(60,t*(2+n)):Math.max(200,t*(7+n))}_execute(){let e=this._context.configuration.options.get(66),t=this._getScrollSpeed(),n=this._tick(),o=t*(n/1e3)*e,r=this._position.outsidePosition==="above"?-o:o;this._context.viewModel.viewLayout.deltaScrollNow(0,r),this._viewHelper.renderNow();let s=this._context.viewLayout.getLinesViewportData(),a=this._position.outsidePosition==="above"?s.startLineNumber:s.endLineNumber,l;{let c=Ej(this._viewHelper.viewDomNode),d=this._context.configuration.options.get(143).horizontalScrollbarHeight,u=new dv(this._mouseEvent.pos.x,c.y+c.height-d-.1),h=Dj(this._viewHelper.viewDomNode,c,u);l=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),c,u,h,null)}(!l.position||l.position.lineNumber!==a)&&(this._position.outsidePosition==="above"?l=Dl.createOutsideEditor(this._position.mouseColumn,new ke(a,1),"above",this._position.outsideDistance):l=Dl.createOutsideEditor(this._position.mouseColumn,new ke(a,this._context.viewModel.getLineMaxColumn(a)),"below",this._position.outsideDistance)),this._dispatchMouse(l,!0,2),this._animationFrameDisposable=za(pi(l.element),()=>this._execute())}},qj=class i{get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){let n=new Date().getTime();n-this._lastSetMouseDownCountTime>i.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=n,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}};qj.CLEAR_MOUSE_DOWN_COUNT_TIME=400});var _n,vp=P(()=>{Xt();_n=class{get event(){return this.emitter.event}constructor(e,t,n){let o=r=>this.emitter.fire(r);this.emitter=new ge({onWillAddFirstListener:()=>e.addEventListener(t,o,n),onDidRemoveLastListener:()=>e.removeEventListener(t,o,n)})}dispose(){this.emitter.dispose()}}});var uh,tl,Gj,E1e=P(()=>{Ri();Kt();uh=!1,tl=class i{constructor(e,t,n,o,r){this.value=e,this.selectionStart=t,this.selectionEnd=n,this.selection=o,this.newlineCountBeforeSelection=r}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){let n=e.getValue(),o=e.getSelectionStart(),r=e.getSelectionEnd(),s;if(t){let a=n.substring(0,o),l=t.value.substring(0,t.selectionStart);a===l&&(s=t.newlineCountBeforeSelection)}return new i(n,o,r,null,s)}collapseSelection(){return this.selectionStart===this.value.length?this:new i(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,n){uh&&console.log(`writeToTextArea ${e}: ${this.toString()}`),t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){var t,n,o,r,s,a,l,c;if(e<=this.selectionStart){let h=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition((n=(t=this.selection)===null||t===void 0?void 0:t.getStartPosition())!==null&&n!==void 0?n:null,h,-1)}if(e>=this.selectionEnd){let h=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition((r=(o=this.selection)===null||o===void 0?void 0:o.getEndPosition())!==null&&r!==void 0?r:null,h,1)}let d=this.value.substring(this.selectionStart,e);if(d.indexOf("\u2026")===-1)return this._finishDeduceEditorPosition((a=(s=this.selection)===null||s===void 0?void 0:s.getStartPosition())!==null&&a!==void 0?a:null,d,1);let u=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition((c=(l=this.selection)===null||l===void 0?void 0:l.getEndPosition())!==null&&c!==void 0?c:null,u,-1)}_finishDeduceEditorPosition(e,t,n){let o=0,r=-1;for(;(r=t.indexOf(` +`,r+1))!==-1;)o++;return[e,n*t.length,o]}static deduceInput(e,t,n){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};uh&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`));let o=Math.min(Hf(e.value,t.value),e.selectionStart,t.selectionStart),r=Math.min(m5(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),s=e.value.substring(o,e.value.length-r),a=t.value.substring(o,t.value.length-r),l=e.selectionStart-o,c=e.selectionEnd-o,d=t.selectionStart-o,u=t.selectionEnd-o;if(uh&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${s}>, selectionStart: ${l}, selectionEnd: ${c}`),console.log(`AFTER DIFFING CURRENT STATE: <${a}>, selectionStart: ${d}, selectionEnd: ${u}`)),d===u){let f=e.selectionStart-o;return uh&&console.log(`REMOVE PREVIOUS: ${f} chars`),{text:a,replacePrevCharCnt:f,replaceNextCharCnt:0,positionDelta:0}}let h=c-l;return{text:a,replacePrevCharCnt:h,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(uh&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`)),e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};let n=Math.min(Hf(e.value,t.value),e.selectionEnd),o=Math.min(m5(e.value,t.value),e.value.length-e.selectionEnd),r=e.value.substring(n,e.value.length-o),s=t.value.substring(n,t.value.length-o),a=e.selectionStart-n,l=e.selectionEnd-n,c=t.selectionStart-n,d=t.selectionEnd-n;return uh&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${r}>, selectionStart: ${a}, selectionEnd: ${l}`),console.log(`AFTER DIFFING CURRENT STATE: <${s}>, selectionStart: ${c}, selectionEnd: ${d}`)),{text:s,replacePrevCharCnt:l,replaceNextCharCnt:r.length-l,positionDelta:d-s.length}}};tl.EMPTY=new tl("",0,0,null,void 0);Gj=class i{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){let n=e*t,o=n+1,r=n+t;return new O(o,1,r+1,1)}static fromEditorSelection(e,t,n,o){let s=i._getPageOfLine(t.startLineNumber,n),a=i._getRangeForPage(s,n),l=i._getPageOfLine(t.endLineNumber,n),c=i._getRangeForPage(l,n),d=a.intersectRanges(new O(1,1,t.startLineNumber,t.startColumn));if(o&&e.getValueLengthInRange(d,1)>500){let _=e.modifyPosition(d.getEndPosition(),-500);d=O.fromPositions(_,d.getEndPosition())}let u=e.getValueInRange(d,1),h=e.getLineCount(),f=e.getLineMaxColumn(h),p=c.intersectRanges(new O(t.endLineNumber,t.endColumn,h,f));if(o&&e.getValueLengthInRange(p,1)>500){let _=e.modifyPosition(p.getStartPosition(),500);p=O.fromPositions(p.getStartPosition(),_)}let m=e.getValueInRange(p,1),y;if(s===l||s+1===l)y=e.getValueInRange(t,1);else{let _=a.intersectRanges(t),v=c.intersectRanges(t);y=e.getValueInRange(_,1)+"\u2026"+e.getValueInRange(v,1)}return o&&y.length>2*500&&(y=y.substring(0,500)+"\u2026"+y.substring(y.length-500,y.length)),new tl(u+y+m,u.length,u.length+y.length,t,d.endLineNumber-d.startLineNumber)}}});var pTt,jZe,TI,II,pv,D1e,Kj,Yj,Zj,MI=P(()=>{Xc();Qt();vp();Gl();t1e();Qi();Xt();nt();K3();Ri();E1e();zo();Yh();Ju();pTt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},jZe=function(i,e){return function(t,n){e(t,n,i)}};(function(i){i.Tap="-monaco-textarea-synthetic-tap"})(TI||(TI={}));II={forceCopyWithSyntaxHighlighting:!1},pv=class{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}};pv.INSTANCE=new pv;D1e=class{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){e=e||"";let t={text:e,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}},Kj=class extends ue{get textAreaState(){return this._textAreaState}constructor(e,t,n,o,r,s){super(),this._host=e,this._textArea=t,this._OS=n,this._browser=o,this._accessibilityService=r,this._logService=s,this._onFocus=this._register(new ge),this.onFocus=this._onFocus.event,this._onBlur=this._register(new ge),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new ge),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new ge),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new ge),this.onCut=this._onCut.event,this._onPaste=this._register(new ge),this.onPaste=this._onPaste.event,this._onType=this._register(new ge),this.onType=this._onType.event,this._onCompositionStart=this._register(new ge),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new ge),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new ge),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new ge),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new To),this._asyncTriggerCut=this._register(new hn(()=>this._onCut.fire(),0)),this._textAreaState=tl.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(Et.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new hn(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let a=null;this._register(this._textArea.onKeyDown(l=>{let c=new qn(l);(c.keyCode===114||this._currentComposition&&c.keyCode===1)&&c.stopPropagation(),c.equals(9)&&c.preventDefault(),a=c,this._onKeyDown.fire(c)})),this._register(this._textArea.onKeyUp(l=>{let c=new qn(l);this._onKeyUp.fire(c)})),this._register(this._textArea.onCompositionStart(l=>{uh&&console.log("[compositionstart]",l);let c=new D1e;if(this._currentComposition){this._currentComposition=c;return}if(this._currentComposition=c,this._OS===2&&a&&a.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===l.data&&(a.code==="ArrowRight"||a.code==="ArrowLeft")){uh&&console.log("[compositionstart] Handling long press case on macOS + arrow key",l),c.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:l.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:l.data});return}this._onCompositionStart.fire({data:l.data})})),this._register(this._textArea.onCompositionUpdate(l=>{uh&&console.log("[compositionupdate]",l);let c=this._currentComposition;if(!c)return;if(this._browser.isAndroid){let u=tl.readFromTextArea(this._textArea,this._textAreaState),h=tl.deduceAndroidCompositionInput(this._textAreaState,u);this._textAreaState=u,this._onType.fire(h),this._onCompositionUpdate.fire(l);return}let d=c.handleCompositionUpdate(l.data);this._textAreaState=tl.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(d),this._onCompositionUpdate.fire(l)})),this._register(this._textArea.onCompositionEnd(l=>{uh&&console.log("[compositionend]",l);let c=this._currentComposition;if(!c)return;if(this._currentComposition=null,this._browser.isAndroid){let u=tl.readFromTextArea(this._textArea,this._textAreaState),h=tl.deduceAndroidCompositionInput(this._textAreaState,u);this._textAreaState=u,this._onType.fire(h),this._onCompositionEnd.fire();return}let d=c.handleCompositionUpdate(l.data);this._textAreaState=tl.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(d),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(l=>{if(uh&&console.log("[input]",l),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;let c=tl.readFromTextArea(this._textArea,this._textAreaState),d=tl.deduceInput(this._textAreaState,c,this._OS===2);d.replacePrevCharCnt===0&&d.text.length===1&&(Or(d.text.charCodeAt(0))||d.text.charCodeAt(0)===127)||(this._textAreaState=c,(d.text!==""||d.replacePrevCharCnt!==0||d.replaceNextCharCnt!==0||d.positionDelta!==0)&&this._onType.fire(d))})),this._register(this._textArea.onCut(l=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(l),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(l=>{this._ensureClipboardGetsEditorSelection(l)})),this._register(this._textArea.onPaste(l=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),l.preventDefault(),!l.clipboardData)return;let[c,d]=Yj.getTextData(l.clipboardData);c&&(d=d||pv.INSTANCE.get(c),this._onPaste.fire({text:c,metadata:d}))})),this._register(this._textArea.onFocus(()=>{let l=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!l&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new hn(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return Xe(this._textArea.ownerDocument,"selectionchange",t=>{if(Jg.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;let n=Date.now(),o=n-e;if(e=n,o<5)return;let r=n-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),r<100||!this._textAreaState.selection)return;let s=this._textArea.getValue();if(this._textAreaState.value!==s)return;let a=this._textArea.getSelectionStart(),l=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===a&&this._textAreaState.selectionEnd===l)return;let c=this._textAreaState.deduceEditorPosition(a),d=this._host.deduceModelPosition(c[0],c[1],c[2]),u=this._textAreaState.deduceEditorPosition(l),h=this._host.deduceModelPosition(u[0],u[1],u[2]),f=new jt(d.lineNumber,d.column,h.lineNumber,h.column);this._onSelectionChangeRequest.fire(f)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeNativeTextAreaContent(e){!this._accessibilityService.isScreenReaderOptimized()&&e==="render"||this._currentComposition||(this._logService.trace(`writeTextAreaState(reason: ${e})`),this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent()))}_ensureClipboardGetsEditorSelection(e){let t=this._host.getDataToCopy(),n={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};pv.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,` +`):t.text,n),e.preventDefault(),e.clipboardData&&Yj.setTextData(e.clipboardData,t.text,t.html,n)}};Kj=pTt([jZe(4,Ba),jZe(5,ks)],Kj);Yj={getTextData(i){let e=i.getData(rr.text),t=null,n=i.getData("vscode-editor-data");if(typeof n=="string")try{t=JSON.parse(n),t.version!==1&&(t=null)}catch{}return e.length===0&&t===null&&i.files.length>0?[Array.prototype.slice.call(i.files,0).map(r=>r.name).join(` +`),null]:[e,t]},setTextData(i,e,t,n){i.setData(rr.text,e),typeof t=="string"&&i.setData("text/html",t),i.setData("vscode-editor-data",JSON.stringify(n))}},Zj=class extends ue{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new _n(this._actual,"keydown")).event,this.onKeyUp=this._register(new _n(this._actual,"keyup")).event,this.onCompositionStart=this._register(new _n(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new _n(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new _n(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new _n(this._actual,"beforeinput")).event,this.onInput=this._register(new _n(this._actual,"input")).event,this.onCut=this._register(new _n(this._actual,"cut")).event,this.onCopy=this._register(new _n(this._actual,"copy")).event,this.onPaste=this._register(new _n(this._actual,"paste")).event,this.onFocus=this._register(new _n(this._actual,"focus")).event,this.onBlur=this._register(new _n(this._actual,"blur")).event,this._onSyntheticTap=this._register(new ge),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown(()=>Jg.onKeyDown())),this._register(this.onBeforeInput(()=>Jg.onBeforeInput())),this._register(this.onInput(()=>Jg.onInput())),this._register(this.onKeyUp(()=>Jg.onKeyUp())),this._register(Xe(this._actual,TI.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){let e=mm(this._actual);return e?e.activeElement===this._actual:this._actual.isConnected?gs()===this._actual:!1}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){let n=this._actual;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,n){let o=this._actual,r=null,s=mm(o);s?r=s.activeElement:r=gs();let a=pi(r),l=r===o,c=o.selectionStart,d=o.selectionEnd;if(l&&c===t&&d===n){Aa&&a.parent!==a&&o.focus();return}if(l){this.setIgnoreSelectionChangeTime("setSelectionRange"),o.setSelectionRange(t,n),Aa&&a.parent!==a&&o.focus();return}try{let u=oGe(o);this.setIgnoreSelectionChangeTime("setSelectionRange"),o.focus(),o.setSelectionRange(t,n),rGe(o,u)}catch{}}}});var T1e,I1e,Xj,qZe=P(()=>{FU();Qt();dh();_l();nt();Mn();$Ze();MI();jw();T1e=class extends tx{constructor(e,t,n){super(e,t,n),this._register(ar.addTarget(this.viewHelper.linesContentDomNode)),this._register(Xe(this.viewHelper.linesContentDomNode,vo.Tap,r=>this.onTap(r))),this._register(Xe(this.viewHelper.linesContentDomNode,vo.Change,r=>this.onChange(r))),this._register(Xe(this.viewHelper.linesContentDomNode,vo.Contextmenu,r=>this._onContextMenu(new up(r,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(Xe(this.viewHelper.linesContentDomNode,"pointerdown",r=>{let s=r.pointerType;if(s==="mouse"){this._lastPointerType="mouse";return}else s==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));let o=new kj(this.viewHelper.viewDomNode);this._register(o.onPointerMove(this.viewHelper.viewDomNode,r=>this._onMouseMove(r))),this._register(o.onPointerUp(this.viewHelper.viewDomNode,r=>this._onMouseUp(r))),this._register(o.onPointerLeave(this.viewHelper.viewDomNode,r=>this._onMouseLeave(r))),this._register(o.onPointerDown(this.viewHelper.viewDomNode,(r,s)=>this._onMouseDown(r,s)))}onTap(e){!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget)||(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),this._lastPointerType==="pen"&&this._dispatchGesture(e,!0)}_dispatchGesture(e,t){let n=this._createMouseTarget(new up(e,!1,this.viewHelper.viewDomNode),!1);n.position&&this.viewController.dispatchMouse({position:n.position,mouseColumn:n.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:t,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:n.type===6&&n.detail.injectedText!==null})}_onMouseDown(e,t){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e,t)}},I1e=class extends tx{constructor(e,t,n){super(e,t,n),this._register(ar.addTarget(this.viewHelper.linesContentDomNode)),this._register(Xe(this.viewHelper.linesContentDomNode,vo.Tap,o=>this.onTap(o))),this._register(Xe(this.viewHelper.linesContentDomNode,vo.Change,o=>this.onChange(o))),this._register(Xe(this.viewHelper.linesContentDomNode,vo.Contextmenu,o=>this._onContextMenu(new up(o,!1,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();let t=this._createMouseTarget(new up(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){let n=document.createEvent("CustomEvent");n.initEvent(TI.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(n),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}},Xj=class extends ue{constructor(e,t,n){super(),(Lc||Mje&&GV)&&VC.pointerEvents?this.handler=this._register(new T1e(e,t,n)):Hn.TouchEvent?this.handler=this._register(new I1e(e,t,n)):this.handler=this._register(new tx(e,t,n))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}});var GZe=P(()=>{});var KZe=P(()=>{});var pu,mv=P(()=>{qw();pu=class extends hp{}});function Ko(i){return{id:i}}function NI(i){switch(i){case ch.DARK:return"vs-dark";case ch.HIGH_CONTRAST_DARK:return"hc-black";case ch.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}function Qs(i){return YZe.onColorThemeChange(i)}var Mo,N1e,M1e,YZe,Qj,No=P(()=>{Xt();nt();_i();Ys();fp();Mo=vi("themeService");N1e={ThemingContribution:"base.contributions.theming"},M1e=class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new ge}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),Yt(()=>{let t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}},YZe=new M1e;jn.add(N1e.ThemingContribution,YZe);Qj=class extends ue{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(t=>this.onThemeChange(t)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}});var A1e,R1e,vyi,_yi,byi,yyi,nq,ZZe,d2,XZe,Jj,eq,ob,QZe,JZe,eXe,tXe,iXe,rb,nXe,oXe,rXe,sXe,aXe,tq,Cyi,lXe,wyi,xyi,Syi,kyi,cXe,dXe,Lyi,Eyi,uXe,Dyi,Tyi,Iyi,iq,oq,hXe,fXe,pXe,rq,sq,aq,lq,cq,dq,mXe,gXe,vXe,_Xe,bXe,yXe,CXe,wXe,xXe,SXe,kXe,LXe,EXe,Myi,Nyi,r1=P(()=>{Wt();sa();pr();No();A1e=me("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},g("lineHighlight","Background color for the highlight of line at the cursor position.")),R1e=me("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:Fn},g("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),vyi=me("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},g("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),_yi=me("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:Uo,hcLight:Uo},g("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),byi=me("editor.symbolHighlightBackground",{dark:t1,light:t1,hcDark:null,hcLight:null},g("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),yyi=me("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:Uo,hcLight:Uo},g("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),nq=me("editorCursor.foreground",{dark:"#AEAFAD",light:it.black,hcDark:it.white,hcLight:"#0F4A85"},g("caret","Color of the editor cursor.")),ZZe=me("editorCursor.background",null,g("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),d2=me("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},g("editorWhitespaces","Color of whitespace characters in the editor.")),XZe=me("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:it.white,hcLight:"#292929"},g("editorLineNumbers","Color of editor line numbers.")),Jj=me("editorIndentGuide.background",{dark:d2,light:d2,hcDark:d2,hcLight:d2},g("editorIndentGuides","Color of the editor indentation guides."),!1,g("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),eq=me("editorIndentGuide.activeBackground",{dark:d2,light:d2,hcDark:d2,hcLight:d2},g("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,g("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),ob=me("editorIndentGuide.background1",{dark:Jj,light:Jj,hcDark:Jj,hcLight:Jj},g("editorIndentGuides1","Color of the editor indentation guides (1).")),QZe=me("editorIndentGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorIndentGuides2","Color of the editor indentation guides (2).")),JZe=me("editorIndentGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorIndentGuides3","Color of the editor indentation guides (3).")),eXe=me("editorIndentGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorIndentGuides4","Color of the editor indentation guides (4).")),tXe=me("editorIndentGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorIndentGuides5","Color of the editor indentation guides (5).")),iXe=me("editorIndentGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorIndentGuides6","Color of the editor indentation guides (6).")),rb=me("editorIndentGuide.activeBackground1",{dark:eq,light:eq,hcDark:eq,hcLight:eq},g("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),nXe=me("editorIndentGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),oXe=me("editorIndentGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),rXe=me("editorIndentGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),sXe=me("editorIndentGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),aXe=me("editorIndentGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),tq=me("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:Uo,hcLight:Uo},g("editorActiveLineNumber","Color of editor active line number"),!1,g("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),Cyi=me("editorLineNumber.activeForeground",{dark:tq,light:tq,hcDark:tq,hcLight:tq},g("editorActiveLineNumber","Color of editor active line number")),lXe=me("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},g("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed.")),wyi=me("editorRuler.foreground",{dark:"#5A5A5A",light:it.lightgrey,hcDark:it.white,hcLight:"#292929"},g("editorRuler","Color of the editor rulers.")),xyi=me("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},g("editorCodeLensForeground","Foreground color of editor CodeLens")),Syi=me("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},g("editorBracketMatchBackground","Background color behind matching brackets")),kyi=me("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:Fn,hcLight:Fn},g("editorBracketMatchBorder","Color for matching brackets boxes")),cXe=me("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},g("editorOverviewRulerBorder","Color of the overview ruler border.")),dXe=me("editorOverviewRuler.background",null,g("editorOverviewRulerBackground","Background color of the editor overview ruler.")),Lyi=me("editorGutter.background",{dark:Xs,light:Xs,hcDark:Xs,hcLight:Xs},g("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),Eyi=me("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:it.fromHex("#fff").transparent(.8),hcLight:Fn},g("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),uXe=me("editorUnnecessaryCode.opacity",{dark:it.fromHex("#000a"),light:it.fromHex("#0007"),hcDark:null,hcLight:null},g("unnecessaryCodeOpacity",`Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.`)),Dyi=me("editorGhostText.border",{dark:null,light:null,hcDark:it.fromHex("#fff").transparent(.8),hcLight:it.fromHex("#292929").transparent(.8)},g("editorGhostTextBorder","Border color of ghost text in the editor.")),Tyi=me("editorGhostText.foreground",{dark:it.fromHex("#ffffff56"),light:it.fromHex("#0007"),hcDark:null,hcLight:null},g("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),Iyi=me("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},g("editorGhostTextBackground","Background color of the ghost text in the editor.")),iq=new it(new On(0,122,204,.6)),oq=me("editorOverviewRuler.rangeHighlightForeground",{dark:iq,light:iq,hcDark:iq,hcLight:iq},g("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),hXe=me("editorOverviewRuler.errorForeground",{dark:new it(new On(255,18,18,.7)),light:new it(new On(255,18,18,.7)),hcDark:new it(new On(255,50,50,1)),hcLight:"#B5200D"},g("overviewRuleError","Overview ruler marker color for errors.")),fXe=me("editorOverviewRuler.warningForeground",{dark:Ll,light:Ll,hcDark:Z5,hcLight:Z5},g("overviewRuleWarning","Overview ruler marker color for warnings.")),pXe=me("editorOverviewRuler.infoForeground",{dark:Ql,light:Ql,hcDark:X5,hcLight:X5},g("overviewRuleInfo","Overview ruler marker color for infos.")),rq=me("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},g("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),sq=me("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},g("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),aq=me("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},g("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),lq=me("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),cq=me("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),dq=me("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),mXe=me("editorBracketHighlight.unexpectedBracket.foreground",{dark:new it(new On(255,18,18,.8)),light:new it(new On(255,18,18,.8)),hcDark:new it(new On(255,50,50,1)),hcLight:""},g("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),gXe=me("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),vXe=me("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),_Xe=me("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),bXe=me("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),yXe=me("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),CXe=me("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),wXe=me("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),xXe=me("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),SXe=me("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),kXe=me("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),LXe=me("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),EXe=me("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},g("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides.")),Myi=me("editorUnicodeHighlight.border",{dark:Ll,light:Ll,hcDark:Ll,hcLight:Ll},g("editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),Nyi=me("editorUnicodeHighlight.background",{dark:yI,light:yI,hcDark:yI,hcLight:yI},g("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));Qs((i,e)=>{let t=i.getColor(Xs),n=i.getColor(A1e),o=n&&!n.isTransparent()?n:t;o&&e.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${o}; }`)})});var sb,P1e=P(()=>{KZe();Mn();mv();Mi();Kt();No();r1();sb=class i extends pu{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new ke(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){let e=this._context.configuration.options;this._lineHeight=e.get(66);let t=e.get(67);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(94);let n=e.get(143);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){let t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let n=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,n=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(n=!0),n}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){let t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ke(e,1));if(t.column!==1)return"";let n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(this._renderLineNumbers===2){let o=Math.abs(this._lastCursorModelPosition.lineNumber-n);return o===0?''+n+"":String(o)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===n||n%10===0?String(n):"":String(n)}prepareRender(e){if(this._renderLineNumbers===0){this._renderResult=null;return}let t=Ar?this._lineHeight%2===0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter(c=>!!c.options.lineNumberClassName);r.sort((c,d)=>O.compareRangesUsingEnds(c.range,d.range));let s=0,a=this._context.viewModel.getLineCount(),l=[];for(let c=n;c<=o;c++){let d=c-n,u=this._getLineRenderLineNumber(c),h="";for(;s${u}`}this._renderResult=l}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};sb.CLASS_NAME="line-numbers";Qs((i,e)=>{let t=i.getColor(XZe),n=i.getColor(lXe);n?e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):t&&e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${t.transparent(.4)}; }`)})});var DXe=P(()=>{});var gv,O1e=P(()=>{DXe();_a();rd();gv=class i extends Yr{constructor(e){super(e);let t=this._context.configuration.options,n=t.get(143);this._canUseLayerHinting=!t.get(32),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._domNode=vn(document.createElement("div")),this._domNode.setClassName(i.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=vn(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(i.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(143);return this._canUseLayerHinting=!t.get(32),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");let t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);let n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)}};gv.CLASS_NAME="glyph-margin";gv.OUTER_CLASS_NAME="margin"});var TXe=P(()=>{});var h4,uq=P(()=>{TXe();h4="monaco-mouse-cursor-text"});var z1e,ab,F1e=P(()=>{Xt();z1e=class{constructor(){this._onDidChange=new ge,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}},ab=new z1e});var fn,vs=P(()=>{_i();fn=vi("keybindingService")});function gTt(i,e,t,n){if(e.length===0)return 0;let o=i.createElement("div");o.style.position="absolute",o.style.top="-50000px",o.style.width="50000px";let r=i.createElement("span");Gr(r,t),r.style.whiteSpace="pre",r.style.tabSize=`${n*t.spaceWidth}px`,r.append(e),o.appendChild(r),i.body.appendChild(o);let s=r.offsetWidth;return i.body.removeChild(o),s}var mTt,IXe,B1e,H1e,hq,MXe=P(()=>{GZe();Wt();Xc();_a();Mn();Ri();Vf();MI();E1e();rd();P1e();O1e();Ks();nw();Mi();Kt();zo();uq();Pr();sa();F1e();vs();_i();mTt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},IXe=function(i,e){return function(t,n){e(t,n,i)}},B1e=class{constructor(e,t,n,o,r){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=n,this.widthOfHiddenLineTextBefore=o,this.distanceToModelLineEnd=r,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){let t=new ke(this.modelLineNumber,this.distanceToModelLineStart+1),n=new ke(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(e?this._previousPresentation=e:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}},H1e=Aa,hq=class extends Yr{constructor(e,t,n,o,r){super(e),this._keybindingService=o,this._instantiationService=r,this._primaryCursorPosition=new ke(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=n,this._scrollLeft=0,this._scrollTop=0;let s=this._context.configuration.options,a=s.get(143);this._setAccessibilityOptions(s),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._contentHeight=a.height,this._fontInfo=s.get(50),this._lineHeight=s.get(66),this._emptySelectionClipboard=s.get(37),this._copyWithSyntaxHighlighting=s.get(25),this._visibleTextArea=null,this._selections=[new jt(1,1,1,1)],this._modelSelections=[new jt(1,1,1,1)],this._lastRenderPosition=null,this.textArea=vn(document.createElement("textarea")),El.write(this.textArea,7),this.textArea.setClassName(`inputarea ${h4}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");let{tabSize:l}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${l*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(s)),this.textArea.setAttribute("aria-required",s.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(s.get(123))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",g("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",s.get(90)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=vn(document.createElement("div")),this.textAreaCover.setPosition("absolute");let c={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:h=>this._context.viewModel.getLineMaxColumn(h),getValueInRange:(h,f)=>this._context.viewModel.getValueInRange(h,f),getValueLengthInRange:(h,f)=>this._context.viewModel.getValueLengthInRange(h,f),modifyPosition:(h,f)=>this._context.viewModel.modifyPosition(h,f)},d={getDataToCopy:()=>{let h=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,hr),f=this._context.viewModel.model.getEOL(),p=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),m=Array.isArray(h)?h:null,y=Array.isArray(h)?h.join(f):h,_,v=null;if(II.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&y.length<65536){let b=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);b&&(_=b.html,v=b.mode)}return{isFromEmptySelection:p,multicursorText:m,text:y,html:_,mode:v}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){let h=this._selections[0];if(Wi&&h.isEmpty()){let p=h.getStartPosition(),m=this._getWordBeforePosition(p);if(m.length===0&&(m=this._getCharacterBeforePosition(p)),m.length>0)return new tl(m,m.length,m.length,O.fromPositions(p),0)}if(Wi&&!h.isEmpty()&&c.getValueLengthInRange(h,0)<500){let p=c.getValueInRange(h,0);return new tl(p,0,p.length,h,0)}if(Xu&&!h.isEmpty()){let p="vscode-placeholder";return new tl(p,0,p.length,null,void 0)}return tl.EMPTY}if(que){let h=this._selections[0];if(h.isEmpty()){let f=h.getStartPosition(),[p,m]=this._getAndroidWordAtPosition(f);if(p.length>0)return new tl(p,m,m,O.fromPositions(f),0)}return tl.EMPTY}return Gj.fromEditorSelection(c,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(h,f,p)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(h,f,p)},u=this._register(new Zj(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(Kj,d,u,Xa,{isAndroid:que,isChrome:Rg,isFirefox:Aa,isSafari:Xu})),this._register(this._textAreaInput.onKeyDown(h=>{this._viewController.emitKeyDown(h)})),this._register(this._textAreaInput.onKeyUp(h=>{this._viewController.emitKeyUp(h)})),this._register(this._textAreaInput.onPaste(h=>{let f=!1,p=null,m=null;h.metadata&&(f=this._emptySelectionClipboard&&!!h.metadata.isFromEmptySelection,p=typeof h.metadata.multicursorText<"u"?h.metadata.multicursorText:null,m=h.metadata.mode),this._viewController.paste(h.text,f,p,m)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(h=>{h.replacePrevCharCnt||h.replaceNextCharCnt||h.positionDelta?(uh&&console.log(` => compositionType: <<${h.text}>>, ${h.replacePrevCharCnt}, ${h.replaceNextCharCnt}, ${h.positionDelta}`),this._viewController.compositionType(h.text,h.replacePrevCharCnt,h.replaceNextCharCnt,h.positionDelta)):(uh&&console.log(` => type: <<${h.text}>>`),this._viewController.type(h.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(h=>{this._viewController.setSelection(h)})),this._register(this._textAreaInput.onCompositionStart(h=>{let f=this.textArea.domNode,p=this._modelSelections[0],{distanceToModelLineStart:m,widthOfHiddenTextBefore:y}=(()=>{let v=f.value.substring(0,Math.min(f.selectionStart,f.selectionEnd)),b=v.lastIndexOf(` `),C=v.substring(b+1),w=C.lastIndexOf(" "),S=C.length-w-1,x=p.getStartPosition(),k=Math.min(x.column-1,S),D=x.column-1-k,E=C.substring(0,C.length-k),{tabSize:A}=this._context.viewModel.model.getOptions(),T=gTt(this.textArea.domNode.ownerDocument,E,this._fontInfo,A);return{distanceToModelLineStart:D,widthOfHiddenTextBefore:T}})(),{distanceToModelLineEnd:_}=(()=>{let v=f.value.substring(Math.max(f.selectionStart,f.selectionEnd)),b=v.indexOf(` `),C=b===-1?v:v.substring(0,b),w=C.indexOf(" "),S=w===-1?C.length:C.length-w-1,x=p.getEndPosition(),k=Math.min(this._context.viewModel.model.getLineMaxColumn(x.lineNumber)-x.column,S);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(x.lineNumber)-x.column-k}})();this._context.viewModel.revealRange("keyboard",!0,O.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new B1e(this._context,p.startLineNumber,m,y,_),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${h4} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(h=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${h4}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(ab.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){let t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',n=this._context.viewModel.getLineContent(e.lineNumber),o=id(t),r=!0,s=e.column,a=!0,l=e.column,c=0;for(;c<50&&(r||a);){if(r&&s<=1&&(r=!1),r){let d=n.charCodeAt(s-2);o.get(d)!==0?r=!1:s--}if(a&&l>n.length&&(a=!1),a){let d=n.charCodeAt(l-1);o.get(d)!==0?a=!1:l++}c++}return[n.substring(s-1,l-1),e.column-s]}_getWordBeforePosition(e){let t=this._context.viewModel.getLineContent(e.lineNumber),n=id(this._context.configuration.options.get(129)),o=e.column,r=0;for(;o>1;){let s=t.charCodeAt(o-2);if(n.get(s)!==0||r>50)return t.substring(o-1,e.column-1);r++,o--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){let n=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!Or(n.charCodeAt(0)))return n}return""}_getAriaLabel(e){var t,n,o;if(e.get(2)===1){let s=(t=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))===null||t===void 0?void 0:t.getAriaLabel(),a=(n=this._keybindingService.lookupKeybinding("workbench.action.showCommands"))===null||n===void 0?void 0:n.getAriaLabel(),l=(o=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings"))===null||o===void 0?void 0:o.getAriaLabel(),c=g("accessibilityModeOff","The editor is not accessible at this time.");return s?g("accessibilityOffAriaLabel","{0} To enable screen reader optimized mode, use {1}",c,s):a?g("accessibilityOffAriaLabelNoKb","{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",c,a):l?g("accessibilityOffAriaLabelNoKbs","{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",c,l):c}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);let t=e.get(3);this._accessibilitySupport===2&&t===nu.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;let o=e.get(143).wrappingColumn;if(o!==-1&&this._accessibilitySupport!==1){let r=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(o*r.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=H1e?0:1}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(143);this._setAccessibilityOptions(t),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.height,this._fontInfo=t.get(50),this._lineHeight=t.get(66),this._emptySelectionClipboard=t.get(37),this._copyWithSyntaxHighlighting=t.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");let{tabSize:o}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${o*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("aria-required",t.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(123))),(e.hasChanged(34)||e.hasChanged(90))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){let e=this._context.configuration.options;!ab.enabled||e.get(34)&&e.get(90)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){var t;this._primaryCursorPosition=new ke(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),(t=this._visibleTextArea)===null||t===void 0||t.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){var e;if(this._visibleTextArea){let o=this._visibleTextArea.visibleTextareaStart,r=this._visibleTextArea.visibleTextareaEnd,s=this._visibleTextArea.startPosition,a=this._visibleTextArea.endPosition;if(s&&a&&o&&r&&r.left>=this._scrollLeft&&o.left<=this._scrollLeft+this._contentWidth){let l=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,c=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart)),d=this._visibleTextArea.widthOfHiddenLineTextBefore,u=this._contentLeft+o.left-this._scrollLeft,h=r.left-o.left+1;if(uthis._contentWidth&&(h=this._contentWidth);let f=this._context.viewModel.getViewLineData(s.lineNumber),p=f.tokens.findTokenIndexAtOffset(s.column-1),m=f.tokens.findTokenIndexAtOffset(a.column-1),y=p===m,_=this._visibleTextArea.definePresentation(y?f.tokens.getPresentation(p):null);this.textArea.domNode.scrollTop=c*this._lineHeight,this.textArea.domNode.scrollLeft=d,this._doRender({lastRenderPosition:null,top:l,left:u,width:h,height:this._lineHeight,useCover:!1,color:(Eo.getColorMap()||[])[_.foreground],italic:_.italic,bold:_.bold,underline:_.underline,strikethrough:_.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}let t=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(tthis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}let n=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(n<0||n>this._contentHeight){this._renderAtTopLeft();return}if(Wi||this._accessibilitySupport===2){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:n,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;let o=(e=this._textAreaInput.textAreaState.newlineCountBeforeSelection)!==null&&e!==void 0?e:this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=o*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:n,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:H1e?0:1,useCover:!1})}_newlinecount(e){let t=0,n=-1;do{if(n=e.indexOf(` -`,n+1),n===-1)break;t++}while(!0);return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:H1e?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;let t=this.textArea,n=this.textAreaCover;Gr(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?it.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),n.setTop(e.useCover?e.top:0),n.setLeft(e.useCover?e.left:0),n.setWidth(e.useCover?e.width:0),n.setHeight(e.useCover?e.height:0);let o=this._context.configuration.options;o.get(57)?n.setClassName("monaco-editor-background textAreaCover "+mv.OUTER_CLASS_NAME):o.get(67).renderType!==0?n.setClassName("monaco-editor-background textAreaCover "+sb.CLASS_NAME):n.setClassName("monaco-editor-background textAreaCover")}};cq=mTt([IXe(3,fn),IXe(4,qt)],cq)});function vTt(i,e,t){let n=0;for(let r=0;r{Ri();mp()});function u2(i){return i==="'"||i==='"'||i==="`"}var _Tt,bTt,yTt,f4,Vn,V1e,W1e,wa,Tl,s1=P(()=>{Mi();Kt();zo();D5();mp();dq();_Tt=()=>!0,bTt=()=>!1,yTt=i=>i===" "||i===" ",f4=class{static shouldRecreate(e){return e.hasChanged(143)||e.hasChanged(129)||e.hasChanged(37)||e.hasChanged(76)||e.hasChanged(78)||e.hasChanged(79)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(127)||e.hasChanged(50)||e.hasChanged(90)}constructor(e,t,n,o){var r;this.languageConfigurationService=o,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;let s=n.options,a=s.get(143),l=s.get(50);this.readOnly=s.get(90),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=s.get(115),this.lineHeight=l.lineHeight,this.typicalHalfwidthCharacterWidth=l.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(a.height/this.lineHeight)-2),this.useTabStops=s.get(127),this.wordSeparators=s.get(129),this.emptySelectionClipboard=s.get(37),this.copyWithSyntaxHighlighting=s.get(25),this.multiCursorMergeOverlapping=s.get(76),this.multiCursorPaste=s.get(78),this.multiCursorLimit=s.get(79),this.autoClosingBrackets=s.get(6),this.autoClosingComments=s.get(7),this.autoClosingQuotes=s.get(11),this.autoClosingDelete=s.get(9),this.autoClosingOvertype=s.get(10),this.autoSurround=s.get(14),this.autoIndent=s.get(12),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();let c=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(c)for(let u of c)this.surroundingPairs[u.open]=u.close;let d=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=(r=d?.blockCommentStartToken)!==null&&r!==void 0?r:null}get electricChars(){var e;if(!this._electricChars){this._electricChars={};let t=(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||e===void 0?void 0:e.getElectricCharacters();if(t)for(let n of t)this._electricChars[n]=!0}return this._electricChars}onElectricCharacter(e,t,n){let o=q3(t,n-1),r=this.languageConfigurationService.getLanguageConfiguration(o.languageId).electricCharacter;return r?r.onElectricCharacter(e,o,n-o.firstCharOffset):null}normalizeIndentation(e){return lb(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,n){switch(t){case"beforeWhitespace":return yTt;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,n);case"always":return _Tt;case"never":return bTt}}_getLanguageDefinedShouldAutoClose(e,t){let n=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return o=>n.indexOf(o)!==-1}visibleColumnFromColumn(e,t){return mr.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,n){let o=mr.columnFromVisibleColumn(e.getLineContent(t),n,this.tabSize),r=e.getLineMinColumn(t);if(os?s:o}},Vn=class i{static fromModelState(e){return new V1e(e)}static fromViewState(e){return new W1e(e)}static fromModelSelection(e){let t=jt.liftSelection(e),n=new wa(O.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return i.fromModelState(n)}static fromModelSelections(e){let t=[];for(let n=0,o=e.length;n{s1();Mi();Kt();gv=class i{static columnSelect(e,t,n,o,r,s){let a=Math.abs(r-n)+1,l=n>r,c=o>s,d=os||_o||y0&&o--,i.columnSelect(e,t,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,o)}static columnSelectRight(e,t,n){let o=0,r=Math.min(n.fromViewLineNumber,n.toViewLineNumber),s=Math.max(n.fromViewLineNumber,n.toViewLineNumber);for(let l=r;l<=s;l++){let c=t.getLineMaxColumn(l),d=e.visibleColumnFromColumn(t,new ke(l,c));o=Math.max(o,d)}let a=n.toViewVisualColumn;return a{zo();Ts=class{constructor(e,t,n=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=n}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let o=t.getInverseEditOperations()[0].range;return jt.fromPositions(o.getEndPosition())}},uq=class{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let o=t.getInverseEditOperations()[0].range;return jt.fromRange(o,0)}},cb=class{constructor(e,t,n=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=n}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let o=t.getInverseEditOperations()[0].range;return jt.fromPositions(o.getStartPosition())}},db=class{constructor(e,t,n,o,r=!1){this._range=e,this._text=t,this._columnDeltaOffset=o,this._lineNumberDeltaOffset=n,this.insertsAutoWhitespace=r}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let o=t.getInverseEditOperations()[0].range;return jt.fromPositions(o.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}},vv=class{constructor(e,t,n,o=!1){this._range=e,this._text=t,this._initialSelection=n,this._forceMoveMarkers=o,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}});var AI,Zr,hq=P(()=>{Ri();mp();Mi();Kt();m1e();s1();AI=class{constructor(e,t,n){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=n}},Zr=class i{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-Bue(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){let n=t.lineNumber-1;return new ke(n,e.getLineMaxColumn(n))}else return t}static leftPositionAtomicSoftTabs(e,t,n){if(t.column<=e.getLineIndentColumn(t.lineNumber)){let o=e.getLineMinColumn(t.lineNumber),r=e.getLineContent(t.lineNumber),s=tb.atomicPosition(r,t.column-1,n,0);if(s!==-1&&s+1>=o)return new ke(t.lineNumber,s+1)}return this.leftPosition(e,t)}static left(e,t,n){let o=e.stickyTabStops?i.leftPositionAtomicSoftTabs(t,n,e.tabSize):i.leftPosition(t,n);return new AI(o.lineNumber,o.column,0)}static moveLeft(e,t,n,o,r){let s,a;if(n.hasSelection()&&!o)s=n.selection.startLineNumber,a=n.selection.startColumn;else{let l=n.position.delta(void 0,-(r-1)),c=t.normalizePosition(i.clipPositionColumn(l,t),0),d=i.left(e,t,c);s=d.lineNumber,a=d.column}return n.move(o,s,a,0)}static clipPositionColumn(e,t){return new ke(e.lineNumber,i.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,n){return en?n:e}static rightPosition(e,t,n){return nd?(n=d,a?o=t.getLineMaxColumn(n):o=Math.min(t.getLineMaxColumn(n),o)):o=e.columnFromVisibleColumn(t,n,c),f?r=0:r=c-mr.visibleColumnFromColumn(t.getLineContent(n),o,e.tabSize),l!==void 0){let p=new ke(n,o),m=t.normalizePosition(p,l);r=r+(o-m.column),n=m.lineNumber,o=m.column}return new AI(n,o,r)}static down(e,t,n,o,r,s,a){return this.vertical(e,t,n,o,r,n+s,a,4)}static moveDown(e,t,n,o,r){let s,a;n.hasSelection()&&!o?(s=n.selection.endLineNumber,a=n.selection.endColumn):(s=n.position.lineNumber,a=n.position.column);let l=0,c;do if(c=i.down(e,t,s+l,a,n.leftoverVisibleColumns,r,!0),t.normalizePosition(new ke(c.lineNumber,c.column),2).lineNumber>s)break;while(l++<10&&s+l1&&this._isBlankLine(t,r);)r--;for(;r>1&&!this._isBlankLine(t,r);)r--;return n.move(o,r,t.getLineMinColumn(r),0)}static moveToNextBlankLine(e,t,n,o){let r=t.getLineCount(),s=n.position.lineNumber;for(;s{Ri();ub();s1();mp();hq();Kt();Mi();p4=class i{static deleteRight(e,t,n,o){let r=[],s=e!==3;for(let a=0,l=o.length;a=h.length+1)return!1;let f=h.charAt(u.column-2),p=o.get(f);if(!p)return!1;if(u2(f)){if(n==="never")return!1}else if(t==="never")return!1;let m=h.charAt(u.column-1),y=!1;for(let _ of p)_.open===f&&_.close===m&&(y=!0);if(!y)return!1;if(e==="auto"){let _=!1;for(let v=0,b=a.length;v1){let r=t.getLineContent(o.lineNumber),s=qr(r),a=s===-1?r.length+1:s+1;if(o.column<=a){let l=n.visibleColumnFromColumn(t,o),c=mr.prevIndentTabStop(l,n.indentSize),d=n.columnFromVisibleColumn(t,o.lineNumber,c);return new O(o.lineNumber,d,o.lineNumber,o.column)}}return O.fromPositions(i.getPositionAfterDeleteLeft(o,t),o)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){let n=uqe(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,n+1)}else if(e.lineNumber>1){let n=e.lineNumber-1;return new ke(n,t.getLineMaxColumn(n))}else return e}static cut(e,t,n){let o=[],r=null;n.sort((s,a)=>ke.compare(s.getStartPosition(),a.getEndPosition()));for(let s=0,a=n.length;s1&&r?.endLineNumber!==c.lineNumber?(d=c.lineNumber-1,u=t.getLineMaxColumn(c.lineNumber-1),h=c.lineNumber,f=t.getLineMaxColumn(c.lineNumber)):(d=c.lineNumber,u=1,h=c.lineNumber,f=t.getLineMaxColumn(c.lineNumber));let p=new O(d,u,h,f);r=p,p.isEmpty()?o[s]=null:o[s]=new Ts(p,"")}else o[s]=null;else o[s]=new Ts(l,"")}return new Tl(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}});function pq(i){return i.filter(e=>!!e)}var la,hb,RI=P(()=>{Ri();s1();fq();nw();Mi();Kt();la=class i{static _createWord(e,t,n,o,r){return{start:o,end:r,wordType:t,nextCharClass:n}}static _findPreviousWordOnLine(e,t,n){let o=t.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(o,e,n)}static _doFindPreviousWordOnLine(e,t,n){let o=0;for(let r=n.column-2;r>=0;r--){let s=e.charCodeAt(r),a=t.get(s);if(a===0){if(o===2)return this._createWord(e,o,a,r+1,this._findEndOfWord(e,t,o,r+1));o=1}else if(a===2){if(o===1)return this._createWord(e,o,a,r+1,this._findEndOfWord(e,t,o,r+1));o=2}else if(a===1&&o!==0)return this._createWord(e,o,a,r+1,this._findEndOfWord(e,t,o,r+1))}return o!==0?this._createWord(e,o,1,0,this._findEndOfWord(e,t,o,0)):null}static _findEndOfWord(e,t,n,o){let r=e.length;for(let s=o;s=0;r--){let s=e.charCodeAt(r),a=t.get(s);if(a===1||n===1&&a===2||n===2&&a===0)return r+1}return 0}static moveWordLeft(e,t,n,o){let r=n.lineNumber,s=n.column;s===1&&r>1&&(r=r-1,s=t.getLineMaxColumn(r));let a=i._findPreviousWordOnLine(e,t,new ke(r,s));if(o===0)return new ke(r,a?a.start+1:1);if(o===1)return a&&a.wordType===2&&a.end-a.start===1&&a.nextCharClass===0&&(a=i._findPreviousWordOnLine(e,t,new ke(r,a.start+1))),new ke(r,a?a.start+1:1);if(o===3){for(;a&&a.wordType===2;)a=i._findPreviousWordOnLine(e,t,new ke(r,a.start+1));return new ke(r,a?a.start+1:1)}return a&&s<=a.end+1&&(a=i._findPreviousWordOnLine(e,t,new ke(r,a.start+1))),new ke(r,a?a.end+1:1)}static _moveWordPartLeft(e,t){let n=t.lineNumber,o=e.getLineMaxColumn(n);if(t.column===1)return n>1?new ke(n-1,e.getLineMaxColumn(n-1)):t;let r=e.getLineContent(n);for(let s=t.column-1;s>1;s--){let a=r.charCodeAt(s-2),l=r.charCodeAt(s-1);if(a===95&&l!==95)return new ke(n,s);if(a===45&&l!==45)return new ke(n,s);if((Tg(a)||_T(a))&&Ff(l))return new ke(n,s);if(Ff(a)&&Ff(l)&&s+1=l.start+1&&(l=i._findNextWordOnLine(e,t,new ke(r,l.end+1))),l?s=l.start+1:s=t.getLineMaxColumn(r);return new ke(r,s)}static _moveWordPartRight(e,t){let n=t.lineNumber,o=e.getLineMaxColumn(n);if(t.column===o)return n1?c=1:(l--,c=o.getLineMaxColumn(l)):(d&&c<=d.end+1&&(d=i._findPreviousWordOnLine(n,o,new ke(l,d.start+1))),d?c=d.end+1:c>1?c=1:(l--,c=o.getLineMaxColumn(l))),new O(l,c,a.lineNumber,a.column)}static deleteInsideWord(e,t,n){if(!n.isEmpty())return n;let o=new ke(n.positionLineNumber,n.positionColumn),r=this._deleteInsideWordWhitespace(t,o);return r||this._deleteInsideWordDetermineDeleteRange(e,t,o)}static _charAtIsWhitespace(e,t){let n=e.charCodeAt(t);return n===32||n===9}static _deleteInsideWordWhitespace(e,t){let n=e.getLineContent(t.lineNumber),o=n.length;if(o===0)return null;let r=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(n,r))return null;let s=Math.min(t.column-1,o-1);if(!this._charAtIsWhitespace(n,s))return null;for(;r>0&&this._charAtIsWhitespace(n,r-1);)r--;for(;s+11?new O(n.lineNumber-1,t.getLineMaxColumn(n.lineNumber-1),n.lineNumber,1):n.lineNumberu.start+1<=n.column&&n.column<=u.end+1,a=(u,h)=>(u=Math.min(u,n.column),h=Math.max(h,n.column),new O(n.lineNumber,u,n.lineNumber,h)),l=u=>{let h=u.start+1,f=u.end+1,p=!1;for(;f-11&&this._charAtIsWhitespace(o,h-2);)h--;return a(h,f)},c=i._findPreviousWordOnLine(e,t,n);if(c&&s(c))return l(c);let d=i._findNextWordOnLine(e,t,n);return d&&s(d)?l(d):c&&d?a(c.end+1,d.start+1):c?a(c.start+1,c.end+1):d?a(d.start+1,d.end+1):a(1,r+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;let n=t.getPosition(),o=i._moveWordPartLeft(e,n);return new O(n.lineNumber,n.column,o.lineNumber,o.column)}static _findFirstNonWhitespaceChar(e,t){let n=e.length;for(let o=t;o=h.start+1&&(h=i._findNextWordOnLine(n,o,new ke(l,h.end+1))),h?c=h.start+1:c{ho();s1();hq();RI();Mi();Kt();Js=class{static addCursorDown(e,t,n){let o=[],r=0;for(let s=0,a=t.length;sc&&(d=c,u=e.model.getLineMaxColumn(d)),Vn.fromModelState(new wa(new O(s.lineNumber,1,d,u),2,0,new ke(d,u),0))}let l=t.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumberl){let c=e.getLineCount(),d=a.lineNumber+1,u=1;return d>c&&(d=c,u=e.getLineMaxColumn(d)),Vn.fromViewState(t.viewState.move(!0,d,u,0))}else{let c=t.modelState.selectionStart.getEndPosition();return Vn.fromModelState(t.modelState.move(!0,c.lineNumber,c.column,0))}}static word(e,t,n,o){let r=e.model.validatePosition(o);return Vn.fromModelState(la.word(e.cursorConfig,e.model,t.modelState,n,r))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new Vn(t.modelState,t.viewState);let n=t.viewState.position.lineNumber,o=t.viewState.position.column;return Vn.fromViewState(new wa(new O(n,o,n,o),0,0,new ke(n,o),0))}static moveTo(e,t,n,o,r){if(n){if(t.modelState.selectionStartKind===1)return this.word(e,t,n,o);if(t.modelState.selectionStartKind===2)return this.line(e,t,n,o,r)}let s=e.model.validatePosition(o),a=r?e.coordinatesConverter.validateViewPosition(new ke(r.lineNumber,r.column),s):e.coordinatesConverter.convertModelPositionToViewPosition(s);return Vn.fromViewState(t.viewState.move(n,a.lineNumber,a.column,0))}static simpleMove(e,t,n,o,r,s){switch(n){case 0:return s===4?this._moveHalfLineLeft(e,t,o):this._moveLeft(e,t,o,r);case 1:return s===4?this._moveHalfLineRight(e,t,o):this._moveRight(e,t,o,r);case 2:return s===2?this._moveUpByViewLines(e,t,o,r):this._moveUpByModelLines(e,t,o,r);case 3:return s===2?this._moveDownByViewLines(e,t,o,r):this._moveDownByModelLines(e,t,o,r);case 4:return s===2?t.map(a=>Vn.fromViewState(Zr.moveToPrevBlankLine(e.cursorConfig,e,a.viewState,o))):t.map(a=>Vn.fromModelState(Zr.moveToPrevBlankLine(e.cursorConfig,e.model,a.modelState,o)));case 5:return s===2?t.map(a=>Vn.fromViewState(Zr.moveToNextBlankLine(e.cursorConfig,e,a.viewState,o))):t.map(a=>Vn.fromModelState(Zr.moveToNextBlankLine(e.cursorConfig,e.model,a.modelState,o)));case 6:return this._moveToViewMinColumn(e,t,o);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,o);case 8:return this._moveToViewCenterColumn(e,t,o);case 9:return this._moveToViewMaxColumn(e,t,o);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,o);default:return null}}static viewportMove(e,t,n,o,r){let s=e.getCompletelyVisibleViewRange(),a=e.coordinatesConverter.convertViewRangeToModelRange(s);switch(n){case 11:{let l=this._firstLineNumberInRange(e.model,a,r),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],o,l,c)]}case 13:{let l=this._lastLineNumberInRange(e.model,a,r),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],o,l,c)]}case 12:{let l=Math.round((a.startLineNumber+a.endLineNumber)/2),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],o,l,c)]}case 14:{let l=[];for(let c=0,d=t.length;cn.endLineNumber-1?s=n.endLineNumber-1:rVn.fromViewState(Zr.moveLeft(e.cursorConfig,e,r.viewState,n,o)))}static _moveHalfLineLeft(e,t,n){let o=[];for(let r=0,s=t.length;rVn.fromViewState(Zr.moveRight(e.cursorConfig,e,r.viewState,n,o)))}static _moveHalfLineRight(e,t,n){let o=[];for(let r=0,s=t.length;r{Ri();mp()});function u2(i){return i==="'"||i==='"'||i==="`"}var _Tt,bTt,yTt,f4,Vn,V1e,W1e,wa,Tl,s1=P(()=>{Mi();Kt();zo();D5();mp();fq();_Tt=()=>!0,bTt=()=>!1,yTt=i=>i===" "||i===" ",f4=class{static shouldRecreate(e){return e.hasChanged(143)||e.hasChanged(129)||e.hasChanged(37)||e.hasChanged(76)||e.hasChanged(78)||e.hasChanged(79)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(127)||e.hasChanged(50)||e.hasChanged(90)}constructor(e,t,n,o){var r;this.languageConfigurationService=o,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;let s=n.options,a=s.get(143),l=s.get(50);this.readOnly=s.get(90),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=s.get(115),this.lineHeight=l.lineHeight,this.typicalHalfwidthCharacterWidth=l.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(a.height/this.lineHeight)-2),this.useTabStops=s.get(127),this.wordSeparators=s.get(129),this.emptySelectionClipboard=s.get(37),this.copyWithSyntaxHighlighting=s.get(25),this.multiCursorMergeOverlapping=s.get(76),this.multiCursorPaste=s.get(78),this.multiCursorLimit=s.get(79),this.autoClosingBrackets=s.get(6),this.autoClosingComments=s.get(7),this.autoClosingQuotes=s.get(11),this.autoClosingDelete=s.get(9),this.autoClosingOvertype=s.get(10),this.autoSurround=s.get(14),this.autoIndent=s.get(12),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();let c=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(c)for(let u of c)this.surroundingPairs[u.open]=u.close;let d=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=(r=d?.blockCommentStartToken)!==null&&r!==void 0?r:null}get electricChars(){var e;if(!this._electricChars){this._electricChars={};let t=(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||e===void 0?void 0:e.getElectricCharacters();if(t)for(let n of t)this._electricChars[n]=!0}return this._electricChars}onElectricCharacter(e,t,n){let o=G3(t,n-1),r=this.languageConfigurationService.getLanguageConfiguration(o.languageId).electricCharacter;return r?r.onElectricCharacter(e,o,n-o.firstCharOffset):null}normalizeIndentation(e){return lb(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,n){switch(t){case"beforeWhitespace":return yTt;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,n);case"always":return _Tt;case"never":return bTt}}_getLanguageDefinedShouldAutoClose(e,t){let n=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return o=>n.indexOf(o)!==-1}visibleColumnFromColumn(e,t){return mr.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,n){let o=mr.columnFromVisibleColumn(e.getLineContent(t),n,this.tabSize),r=e.getLineMinColumn(t);if(os?s:o}},Vn=class i{static fromModelState(e){return new V1e(e)}static fromViewState(e){return new W1e(e)}static fromModelSelection(e){let t=jt.liftSelection(e),n=new wa(O.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return i.fromModelState(n)}static fromModelSelections(e){let t=[];for(let n=0,o=e.length;n{s1();Mi();Kt();vv=class i{static columnSelect(e,t,n,o,r,s){let a=Math.abs(r-n)+1,l=n>r,c=o>s,d=os||_o||y0&&o--,i.columnSelect(e,t,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,o)}static columnSelectRight(e,t,n){let o=0,r=Math.min(n.fromViewLineNumber,n.toViewLineNumber),s=Math.max(n.fromViewLineNumber,n.toViewLineNumber);for(let l=r;l<=s;l++){let c=t.getLineMaxColumn(l),d=e.visibleColumnFromColumn(t,new ke(l,c));o=Math.max(o,d)}let a=n.toViewVisualColumn;return a{zo();Ts=class{constructor(e,t,n=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=n}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let o=t.getInverseEditOperations()[0].range;return jt.fromPositions(o.getEndPosition())}},pq=class{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let o=t.getInverseEditOperations()[0].range;return jt.fromRange(o,0)}},cb=class{constructor(e,t,n=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=n}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let o=t.getInverseEditOperations()[0].range;return jt.fromPositions(o.getStartPosition())}},db=class{constructor(e,t,n,o,r=!1){this._range=e,this._text=t,this._columnDeltaOffset=o,this._lineNumberDeltaOffset=n,this.insertsAutoWhitespace=r}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let o=t.getInverseEditOperations()[0].range;return jt.fromPositions(o.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}},_v=class{constructor(e,t,n,o=!1){this._range=e,this._text=t,this._initialSelection=n,this._forceMoveMarkers=o,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}});var AI,Zr,mq=P(()=>{Ri();mp();Mi();Kt();m1e();s1();AI=class{constructor(e,t,n){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=n}},Zr=class i{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-Bue(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){let n=t.lineNumber-1;return new ke(n,e.getLineMaxColumn(n))}else return t}static leftPositionAtomicSoftTabs(e,t,n){if(t.column<=e.getLineIndentColumn(t.lineNumber)){let o=e.getLineMinColumn(t.lineNumber),r=e.getLineContent(t.lineNumber),s=tb.atomicPosition(r,t.column-1,n,0);if(s!==-1&&s+1>=o)return new ke(t.lineNumber,s+1)}return this.leftPosition(e,t)}static left(e,t,n){let o=e.stickyTabStops?i.leftPositionAtomicSoftTabs(t,n,e.tabSize):i.leftPosition(t,n);return new AI(o.lineNumber,o.column,0)}static moveLeft(e,t,n,o,r){let s,a;if(n.hasSelection()&&!o)s=n.selection.startLineNumber,a=n.selection.startColumn;else{let l=n.position.delta(void 0,-(r-1)),c=t.normalizePosition(i.clipPositionColumn(l,t),0),d=i.left(e,t,c);s=d.lineNumber,a=d.column}return n.move(o,s,a,0)}static clipPositionColumn(e,t){return new ke(e.lineNumber,i.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,n){return en?n:e}static rightPosition(e,t,n){return nd?(n=d,a?o=t.getLineMaxColumn(n):o=Math.min(t.getLineMaxColumn(n),o)):o=e.columnFromVisibleColumn(t,n,c),f?r=0:r=c-mr.visibleColumnFromColumn(t.getLineContent(n),o,e.tabSize),l!==void 0){let p=new ke(n,o),m=t.normalizePosition(p,l);r=r+(o-m.column),n=m.lineNumber,o=m.column}return new AI(n,o,r)}static down(e,t,n,o,r,s,a){return this.vertical(e,t,n,o,r,n+s,a,4)}static moveDown(e,t,n,o,r){let s,a;n.hasSelection()&&!o?(s=n.selection.endLineNumber,a=n.selection.endColumn):(s=n.position.lineNumber,a=n.position.column);let l=0,c;do if(c=i.down(e,t,s+l,a,n.leftoverVisibleColumns,r,!0),t.normalizePosition(new ke(c.lineNumber,c.column),2).lineNumber>s)break;while(l++<10&&s+l1&&this._isBlankLine(t,r);)r--;for(;r>1&&!this._isBlankLine(t,r);)r--;return n.move(o,r,t.getLineMinColumn(r),0)}static moveToNextBlankLine(e,t,n,o){let r=t.getLineCount(),s=n.position.lineNumber;for(;s{Ri();ub();s1();mp();mq();Kt();Mi();p4=class i{static deleteRight(e,t,n,o){let r=[],s=e!==3;for(let a=0,l=o.length;a=h.length+1)return!1;let f=h.charAt(u.column-2),p=o.get(f);if(!p)return!1;if(u2(f)){if(n==="never")return!1}else if(t==="never")return!1;let m=h.charAt(u.column-1),y=!1;for(let _ of p)_.open===f&&_.close===m&&(y=!0);if(!y)return!1;if(e==="auto"){let _=!1;for(let v=0,b=a.length;v1){let r=t.getLineContent(o.lineNumber),s=qr(r),a=s===-1?r.length+1:s+1;if(o.column<=a){let l=n.visibleColumnFromColumn(t,o),c=mr.prevIndentTabStop(l,n.indentSize),d=n.columnFromVisibleColumn(t,o.lineNumber,c);return new O(o.lineNumber,d,o.lineNumber,o.column)}}return O.fromPositions(i.getPositionAfterDeleteLeft(o,t),o)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){let n=uqe(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,n+1)}else if(e.lineNumber>1){let n=e.lineNumber-1;return new ke(n,t.getLineMaxColumn(n))}else return e}static cut(e,t,n){let o=[],r=null;n.sort((s,a)=>ke.compare(s.getStartPosition(),a.getEndPosition()));for(let s=0,a=n.length;s1&&r?.endLineNumber!==c.lineNumber?(d=c.lineNumber-1,u=t.getLineMaxColumn(c.lineNumber-1),h=c.lineNumber,f=t.getLineMaxColumn(c.lineNumber)):(d=c.lineNumber,u=1,h=c.lineNumber,f=t.getLineMaxColumn(c.lineNumber));let p=new O(d,u,h,f);r=p,p.isEmpty()?o[s]=null:o[s]=new Ts(p,"")}else o[s]=null;else o[s]=new Ts(l,"")}return new Tl(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}});function vq(i){return i.filter(e=>!!e)}var la,hb,RI=P(()=>{Ri();s1();gq();nw();Mi();Kt();la=class i{static _createWord(e,t,n,o,r){return{start:o,end:r,wordType:t,nextCharClass:n}}static _findPreviousWordOnLine(e,t,n){let o=t.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(o,e,n)}static _doFindPreviousWordOnLine(e,t,n){let o=0;for(let r=n.column-2;r>=0;r--){let s=e.charCodeAt(r),a=t.get(s);if(a===0){if(o===2)return this._createWord(e,o,a,r+1,this._findEndOfWord(e,t,o,r+1));o=1}else if(a===2){if(o===1)return this._createWord(e,o,a,r+1,this._findEndOfWord(e,t,o,r+1));o=2}else if(a===1&&o!==0)return this._createWord(e,o,a,r+1,this._findEndOfWord(e,t,o,r+1))}return o!==0?this._createWord(e,o,1,0,this._findEndOfWord(e,t,o,0)):null}static _findEndOfWord(e,t,n,o){let r=e.length;for(let s=o;s=0;r--){let s=e.charCodeAt(r),a=t.get(s);if(a===1||n===1&&a===2||n===2&&a===0)return r+1}return 0}static moveWordLeft(e,t,n,o){let r=n.lineNumber,s=n.column;s===1&&r>1&&(r=r-1,s=t.getLineMaxColumn(r));let a=i._findPreviousWordOnLine(e,t,new ke(r,s));if(o===0)return new ke(r,a?a.start+1:1);if(o===1)return a&&a.wordType===2&&a.end-a.start===1&&a.nextCharClass===0&&(a=i._findPreviousWordOnLine(e,t,new ke(r,a.start+1))),new ke(r,a?a.start+1:1);if(o===3){for(;a&&a.wordType===2;)a=i._findPreviousWordOnLine(e,t,new ke(r,a.start+1));return new ke(r,a?a.start+1:1)}return a&&s<=a.end+1&&(a=i._findPreviousWordOnLine(e,t,new ke(r,a.start+1))),new ke(r,a?a.end+1:1)}static _moveWordPartLeft(e,t){let n=t.lineNumber,o=e.getLineMaxColumn(n);if(t.column===1)return n>1?new ke(n-1,e.getLineMaxColumn(n-1)):t;let r=e.getLineContent(n);for(let s=t.column-1;s>1;s--){let a=r.charCodeAt(s-2),l=r.charCodeAt(s-1);if(a===95&&l!==95)return new ke(n,s);if(a===45&&l!==45)return new ke(n,s);if((Tg(a)||_T(a))&&Ff(l))return new ke(n,s);if(Ff(a)&&Ff(l)&&s+1=l.start+1&&(l=i._findNextWordOnLine(e,t,new ke(r,l.end+1))),l?s=l.start+1:s=t.getLineMaxColumn(r);return new ke(r,s)}static _moveWordPartRight(e,t){let n=t.lineNumber,o=e.getLineMaxColumn(n);if(t.column===o)return n1?c=1:(l--,c=o.getLineMaxColumn(l)):(d&&c<=d.end+1&&(d=i._findPreviousWordOnLine(n,o,new ke(l,d.start+1))),d?c=d.end+1:c>1?c=1:(l--,c=o.getLineMaxColumn(l))),new O(l,c,a.lineNumber,a.column)}static deleteInsideWord(e,t,n){if(!n.isEmpty())return n;let o=new ke(n.positionLineNumber,n.positionColumn),r=this._deleteInsideWordWhitespace(t,o);return r||this._deleteInsideWordDetermineDeleteRange(e,t,o)}static _charAtIsWhitespace(e,t){let n=e.charCodeAt(t);return n===32||n===9}static _deleteInsideWordWhitespace(e,t){let n=e.getLineContent(t.lineNumber),o=n.length;if(o===0)return null;let r=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(n,r))return null;let s=Math.min(t.column-1,o-1);if(!this._charAtIsWhitespace(n,s))return null;for(;r>0&&this._charAtIsWhitespace(n,r-1);)r--;for(;s+11?new O(n.lineNumber-1,t.getLineMaxColumn(n.lineNumber-1),n.lineNumber,1):n.lineNumberu.start+1<=n.column&&n.column<=u.end+1,a=(u,h)=>(u=Math.min(u,n.column),h=Math.max(h,n.column),new O(n.lineNumber,u,n.lineNumber,h)),l=u=>{let h=u.start+1,f=u.end+1,p=!1;for(;f-11&&this._charAtIsWhitespace(o,h-2);)h--;return a(h,f)},c=i._findPreviousWordOnLine(e,t,n);if(c&&s(c))return l(c);let d=i._findNextWordOnLine(e,t,n);return d&&s(d)?l(d):c&&d?a(c.end+1,d.start+1):c?a(c.start+1,c.end+1):d?a(d.start+1,d.end+1):a(1,r+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;let n=t.getPosition(),o=i._moveWordPartLeft(e,n);return new O(n.lineNumber,n.column,o.lineNumber,o.column)}static _findFirstNonWhitespaceChar(e,t){let n=e.length;for(let o=t;o=h.start+1&&(h=i._findNextWordOnLine(n,o,new ke(l,h.end+1))),h?c=h.start+1:c{ho();s1();mq();RI();Mi();Kt();Js=class{static addCursorDown(e,t,n){let o=[],r=0;for(let s=0,a=t.length;sc&&(d=c,u=e.model.getLineMaxColumn(d)),Vn.fromModelState(new wa(new O(s.lineNumber,1,d,u),2,0,new ke(d,u),0))}let l=t.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumberl){let c=e.getLineCount(),d=a.lineNumber+1,u=1;return d>c&&(d=c,u=e.getLineMaxColumn(d)),Vn.fromViewState(t.viewState.move(!0,d,u,0))}else{let c=t.modelState.selectionStart.getEndPosition();return Vn.fromModelState(t.modelState.move(!0,c.lineNumber,c.column,0))}}static word(e,t,n,o){let r=e.model.validatePosition(o);return Vn.fromModelState(la.word(e.cursorConfig,e.model,t.modelState,n,r))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new Vn(t.modelState,t.viewState);let n=t.viewState.position.lineNumber,o=t.viewState.position.column;return Vn.fromViewState(new wa(new O(n,o,n,o),0,0,new ke(n,o),0))}static moveTo(e,t,n,o,r){if(n){if(t.modelState.selectionStartKind===1)return this.word(e,t,n,o);if(t.modelState.selectionStartKind===2)return this.line(e,t,n,o,r)}let s=e.model.validatePosition(o),a=r?e.coordinatesConverter.validateViewPosition(new ke(r.lineNumber,r.column),s):e.coordinatesConverter.convertModelPositionToViewPosition(s);return Vn.fromViewState(t.viewState.move(n,a.lineNumber,a.column,0))}static simpleMove(e,t,n,o,r,s){switch(n){case 0:return s===4?this._moveHalfLineLeft(e,t,o):this._moveLeft(e,t,o,r);case 1:return s===4?this._moveHalfLineRight(e,t,o):this._moveRight(e,t,o,r);case 2:return s===2?this._moveUpByViewLines(e,t,o,r):this._moveUpByModelLines(e,t,o,r);case 3:return s===2?this._moveDownByViewLines(e,t,o,r):this._moveDownByModelLines(e,t,o,r);case 4:return s===2?t.map(a=>Vn.fromViewState(Zr.moveToPrevBlankLine(e.cursorConfig,e,a.viewState,o))):t.map(a=>Vn.fromModelState(Zr.moveToPrevBlankLine(e.cursorConfig,e.model,a.modelState,o)));case 5:return s===2?t.map(a=>Vn.fromViewState(Zr.moveToNextBlankLine(e.cursorConfig,e,a.viewState,o))):t.map(a=>Vn.fromModelState(Zr.moveToNextBlankLine(e.cursorConfig,e.model,a.modelState,o)));case 6:return this._moveToViewMinColumn(e,t,o);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,o);case 8:return this._moveToViewCenterColumn(e,t,o);case 9:return this._moveToViewMaxColumn(e,t,o);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,o);default:return null}}static viewportMove(e,t,n,o,r){let s=e.getCompletelyVisibleViewRange(),a=e.coordinatesConverter.convertViewRangeToModelRange(s);switch(n){case 11:{let l=this._firstLineNumberInRange(e.model,a,r),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],o,l,c)]}case 13:{let l=this._lastLineNumberInRange(e.model,a,r),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],o,l,c)]}case 12:{let l=Math.round((a.startLineNumber+a.endLineNumber)/2),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],o,l,c)]}case 14:{let l=[];for(let c=0,d=t.length;cn.endLineNumber-1?s=n.endLineNumber-1:rVn.fromViewState(Zr.moveLeft(e.cursorConfig,e,r.viewState,n,o)))}static _moveHalfLineLeft(e,t,n){let o=[];for(let r=0,s=t.length;rVn.fromViewState(Zr.moveRight(e.cursorConfig,e,r.viewState,n,o)))}static _moveHalfLineRight(e,t,n){let o=[];for(let r=0,s=t.length;r1&&o.firstCharOffset===0){let m=Y3(e,t.startLineNumber-1);m.languageId===o.languageId&&(c=m.getLineContent())}let d=r.onEnter(i,c,a,l);if(!d)return null;let u=d.indentAction,h=d.appendText,f=d.removeText||0;h?u===os.Indent&&(h=" "+h):u===os.Indent||u===os.IndentOutdent?h=" ":h="";let p=k$(e,t.startLineNumber,t.startColumn);return f&&(p=p.substring(0,p.length-f)),{indentAction:u,appendText:h,removeText:f,indentation:p}}var gq=P(()=>{j3();Kr()});function fb(i,e){if(e<=0)return"";U1e[i]||(U1e[i]=["",i]);let t=U1e[i];for(let n=t.length;n<=e;n++)t[n]=t[n-1]+i;return t[e]}var CTt,wTt,vq,U1e,mu,_q=P(()=>{Ri();mp();Kt();zo();gq();Kr();CTt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},wTt=function(i,e){return function(t,n){e(t,n,i)}},U1e=Object.create(null);mu=vq=class{static unshiftIndent(e,t,n,o,r){let s=mr.visibleColumnFromColumn(e,t,n);if(r){let a=fb(" ",o),c=mr.prevIndentTabStop(s,o)/o;return fb(a,c)}else{let a=" ",c=mr.prevRenderTabStop(s,n)/n;return fb(a,c)}}static shiftIndent(e,t,n,o,r){let s=mr.visibleColumnFromColumn(e,t,n);if(r){let a=fb(" ",o),c=mr.nextIndentTabStop(s,o)/o;return fb(a,c)}else{let a=" ",c=mr.nextRenderTabStop(s,n)/n;return fb(a,c)}}constructor(e,t,n){this._languageConfigurationService=n,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,n):e.addEditOperation(t,n)}getEditOperations(e,t){let n=this._selection.startLineNumber,o=this._selection.endLineNumber;this._selection.endColumn===1&&n!==o&&(o=o-1);let{tabSize:r,indentSize:s,insertSpaces:a}=this._opts,l=n===o;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(n))&&(this._useLastEditRangeForCursorEndPosition=!0);let c=0,d=0;for(let u=n;u<=o;u++,c=d){d=0;let h=e.getLineContent(u),f=qr(h);if(this._opts.isUnshift&&(h.length===0||f===0)||!l&&!this._opts.isUnshift&&h.length===0)continue;if(f===-1&&(f=h.length),u>1&&mr.visibleColumnFromColumn(h,f+1,r)%s!==0&&e.tokenization.isCheapToTokenize(u-1)){let y=m4(this._opts.autoIndent,e,new O(u-1,e.getLineMaxColumn(u-1),u-1,e.getLineMaxColumn(u-1)),this._languageConfigurationService);if(y){if(d=c,y.appendText)for(let _=0,v=y.appendText.length;_{Kt();zo();bq=class{constructor(e,t,n){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=n}getEditOperations(e,t){t.addTrackedEditOperation(new O(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new O(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){let n=t.getInverseEditOperations(),o=n[0].range,r=n[1].range;return new jt(o.endLineNumber,o.endColumn,r.endLineNumber,r.endColumn-this._charAfterSelection.length)}},yq=class{constructor(e,t,n){this._position=e,this._text=t,this._charAfter=n}getEditOperations(e,t){t.addTrackedEditOperation(new O(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(e,t){let o=t.getInverseEditOperations()[0].range;return new jt(o.endLineNumber,o.startColumn,o.endLineNumber,o.endColumn-this._charAfter.length)}}});function xTt(i,e,t){let n=i.tokenization.getLanguageIdAtPosition(e,0);if(e>1){let o,r=-1;for(o=e-1;o>=1;o--){if(i.tokenization.getLanguageIdAtPosition(o,0)!==n)return r;let s=i.getLineContent(o);if(t.shouldIgnore(s)||/^\s+$/.test(s)||s===""){r=o;continue}return o}}return-1}function OI(i,e,t,n=!0,o){if(i<4)return null;let r=o.getLanguageConfiguration(e.tokenization.getLanguageId()).indentRulesSupport;if(!r)return null;if(t<=1)return{indentation:"",action:null};for(let l=t-1;l>0&&e.getLineContent(l)==="";l--)if(l===1)return{indentation:"",action:null};let s=xTt(e,t,r);if(s<0)return null;if(s<1)return{indentation:"",action:null};let a=e.getLineContent(s);if(r.shouldIncrease(a)||r.shouldIndentNextLine(a))return{indentation:yo(a),action:os.Indent,line:s};if(r.shouldDecrease(a))return{indentation:yo(a),action:null,line:s};{if(s===1)return{indentation:yo(e.getLineContent(s)),action:null,line:s};let l=s-1,c=r.getIndentMetadata(e.getLineContent(l));if(!(c&3)&&c&4){let d=0;for(let u=l-1;u>0;u--)if(!r.shouldIndentNextLine(e.getLineContent(u))){d=u;break}return{indentation:yo(e.getLineContent(d+1)),action:null,line:d+1}}if(n)return{indentation:yo(e.getLineContent(s)),action:null,line:s};for(let d=s;d>0;d--){let u=e.getLineContent(d);if(r.shouldIncrease(u))return{indentation:yo(u),action:os.Indent,line:d};if(r.shouldIndentNextLine(u)){let h=0;for(let f=d-1;f>0;f--)if(!r.shouldIndentNextLine(e.getLineContent(d))){h=f;break}return{indentation:yo(e.getLineContent(h+1)),action:null,line:h+1}}else if(r.shouldDecrease(u))return{indentation:yo(u),action:null,line:d}}return{indentation:yo(e.getLineContent(1)),action:null,line:1}}}function pb(i,e,t,n,o,r){if(i<4)return null;let s=r.getLanguageConfiguration(t);if(!s)return null;let a=r.getLanguageConfiguration(t).indentRulesSupport;if(!a)return null;let l=OI(i,e,n,void 0,r),c=e.getLineContent(n);if(l){let d=l.line;if(d!==void 0){let u=!0;for(let h=d;h0&&r.getLanguageId(0)!==s.languageId?(l=!0,c=a.substr(0,t.startColumn-1-s.firstCharOffset)):c=r.getLineContent().substring(0,t.startColumn-1);let d;t.isEmpty()?d=a.substr(t.startColumn-1-s.firstCharOffset):d=Y3(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-s.firstCharOffset);let u=o.getLanguageConfiguration(s.languageId).indentRulesSupport;if(!u)return null;let h=c,f=yo(c),p={tokenization:{getLineTokens:v=>e.tokenization.getLineTokens(v),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(v,b)=>e.getLanguageIdAtPosition(v,b)},getLineContent:v=>v===t.startLineNumber?h:e.getLineContent(v)},m=yo(r.getLineContent()),y=OI(i,p,t.startLineNumber+1,void 0,o);if(!y){let v=l?m:f;return{beforeEnter:v,afterEnter:v}}let _=l?m:y.indentation;return y.action===os.Indent&&(_=n.shiftIndent(_)),u.shouldDecrease(d)&&(_=n.unshiftIndent(_)),{beforeEnter:l?m:f,afterEnter:_}}function PXe(i,e,t,n,o,r){if(i<4)return null;let s=Y3(e,t.startLineNumber,t.startColumn);if(s.firstCharOffset)return null;let a=r.getLanguageConfiguration(s.languageId).indentRulesSupport;if(!a)return null;let l=s.getLineContent(),c=l.substr(0,t.startColumn-1-s.firstCharOffset),d;if(t.isEmpty()?d=l.substr(t.startColumn-1-s.firstCharOffset):d=Y3(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-s.firstCharOffset),!a.shouldDecrease(c+d)&&a.shouldDecrease(c+n+d)){let u=OI(i,e,t.startLineNumber,!1,r);if(!u)return null;let h=u.indentation;return u.action!==os.Indent&&(h=o.unshiftIndent(h)),h}return null}function Cq(i,e,t){let n=t.getLanguageConfiguration(i.getLanguageId()).indentRulesSupport;return!n||e<1||e>i.getLineCount()?null:n.getIndentMetadata(i.getLineContent(e))}var wq=P(()=>{Ri();j3();D5();Kr()});function $1e(i,e){return i===" "?e===5||e===6?6:5:4}function xq(i,e){return zXe(i)&&!zXe(e)?!0:i===5?!1:OXe(i)!==OXe(e)}function OXe(i){return i===6||i===5?"space":i}function zXe(i){return i===4||i===5||i===6}var gu,zI,Sq,kq=P(()=>{Pi();Ri();ub();_q();AXe();s1();nw();Kt();Mi();j3();Kr();D5();wq();gq();gu=class i{static indent(e,t,n){if(t===null||n===null)return[];let o=[];for(let r=0,s=n.length;r1){let a;for(a=n-1;a>=1;a--){let d=t.getLineContent(a);if(ql(d)>=0)break}if(a<1)return null;let l=t.getLineMaxColumn(a),c=m4(e.autoIndent,t,new O(a,l,a,l),e.languageConfigurationService);c&&(r=c.indentation+c.appendText)}return o&&(o===os.Indent&&(r=i.shiftIndent(e,r)),o===os.Outdent&&(r=i.unshiftIndent(e,r)),r=e.normalizeIndentation(r)),r||null}static _replaceJumpToNextIndent(e,t,n,o){let r="",s=n.getStartPosition();if(e.insertSpaces){let a=e.visibleColumnFromColumn(t,s),l=e.indentSize,c=l-a%l;for(let d=0;dthis._compositionType(n,d,r,s,a,l));return new Tl(4,c,{shouldPushStackElementBefore:xq(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,n,o,r,s){if(!t.isEmpty())return null;let a=t.getPosition(),l=Math.max(1,a.column-o),c=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+r),d=new O(a.lineNumber,l,a.lineNumber,c);return e.getValueInRange(d)===n&&s===0?null:new db(d,n,0,s)}static _typeCommand(e,t,n){return n?new cb(e,t,!0):new Ts(e,t,!0)}static _enter(e,t,n,o){if(e.autoIndent===0)return i._typeCommand(o,` + `,constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},i.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},i.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function t(n){if(!n.to)return null;let o;switch(n.to){case i.RawDirection.Left:o=0;break;case i.RawDirection.Right:o=1;break;case i.RawDirection.Up:o=2;break;case i.RawDirection.Down:o=3;break;case i.RawDirection.PrevBlankLine:o=4;break;case i.RawDirection.NextBlankLine:o=5;break;case i.RawDirection.WrappedLineStart:o=6;break;case i.RawDirection.WrappedLineFirstNonWhitespaceCharacter:o=7;break;case i.RawDirection.WrappedLineColumnCenter:o=8;break;case i.RawDirection.WrappedLineEnd:o=9;break;case i.RawDirection.WrappedLineLastNonWhitespaceCharacter:o=10;break;case i.RawDirection.ViewPortTop:o=11;break;case i.RawDirection.ViewPortBottom:o=13;break;case i.RawDirection.ViewPortCenter:o=12;break;case i.RawDirection.ViewPortIfOutside:o=14;break;default:return null}let r=0;switch(n.by){case i.RawUnit.Line:r=1;break;case i.RawUnit.WrappedLine:r=2;break;case i.RawUnit.Character:r=3;break;case i.RawUnit.HalfLine:r=4;break}return{direction:o,unit:r,select:!!n.select,value:n.value||1}}i.parse=t})(PI||(PI={}))});function m4(i,e,t,n){let o=Z3(e,t.startLineNumber,t.startColumn),r=n.getLanguageConfiguration(o.languageId);if(!r)return null;let s=o.getLineContent(),a=s.substr(0,t.startColumn-1-o.firstCharOffset),l;t.isEmpty()?l=s.substr(t.startColumn-1-o.firstCharOffset):l=Z3(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-o.firstCharOffset);let c="";if(t.startLineNumber>1&&o.firstCharOffset===0){let m=Z3(e,t.startLineNumber-1);m.languageId===o.languageId&&(c=m.getLineContent())}let d=r.onEnter(i,c,a,l);if(!d)return null;let u=d.indentAction,h=d.appendText,f=d.removeText||0;h?u===os.Indent&&(h=" "+h):u===os.Indent||u===os.IndentOutdent?h=" ":h="";let p=D$(e,t.startLineNumber,t.startColumn);return f&&(p=p.substring(0,p.length-f)),{indentAction:u,appendText:h,removeText:f,indentation:p}}var bq=P(()=>{q3();Kr()});function fb(i,e){if(e<=0)return"";U1e[i]||(U1e[i]=["",i]);let t=U1e[i];for(let n=t.length;n<=e;n++)t[n]=t[n-1]+i;return t[e]}var CTt,wTt,yq,U1e,mu,Cq=P(()=>{Ri();mp();Kt();zo();bq();Kr();CTt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},wTt=function(i,e){return function(t,n){e(t,n,i)}},U1e=Object.create(null);mu=yq=class{static unshiftIndent(e,t,n,o,r){let s=mr.visibleColumnFromColumn(e,t,n);if(r){let a=fb(" ",o),c=mr.prevIndentTabStop(s,o)/o;return fb(a,c)}else{let a=" ",c=mr.prevRenderTabStop(s,n)/n;return fb(a,c)}}static shiftIndent(e,t,n,o,r){let s=mr.visibleColumnFromColumn(e,t,n);if(r){let a=fb(" ",o),c=mr.nextIndentTabStop(s,o)/o;return fb(a,c)}else{let a=" ",c=mr.nextRenderTabStop(s,n)/n;return fb(a,c)}}constructor(e,t,n){this._languageConfigurationService=n,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,n):e.addEditOperation(t,n)}getEditOperations(e,t){let n=this._selection.startLineNumber,o=this._selection.endLineNumber;this._selection.endColumn===1&&n!==o&&(o=o-1);let{tabSize:r,indentSize:s,insertSpaces:a}=this._opts,l=n===o;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(n))&&(this._useLastEditRangeForCursorEndPosition=!0);let c=0,d=0;for(let u=n;u<=o;u++,c=d){d=0;let h=e.getLineContent(u),f=qr(h);if(this._opts.isUnshift&&(h.length===0||f===0)||!l&&!this._opts.isUnshift&&h.length===0)continue;if(f===-1&&(f=h.length),u>1&&mr.visibleColumnFromColumn(h,f+1,r)%s!==0&&e.tokenization.isCheapToTokenize(u-1)){let y=m4(this._opts.autoIndent,e,new O(u-1,e.getLineMaxColumn(u-1),u-1,e.getLineMaxColumn(u-1)),this._languageConfigurationService);if(y){if(d=c,y.appendText)for(let _=0,v=y.appendText.length;_{Kt();zo();wq=class{constructor(e,t,n){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=n}getEditOperations(e,t){t.addTrackedEditOperation(new O(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new O(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){let n=t.getInverseEditOperations(),o=n[0].range,r=n[1].range;return new jt(o.endLineNumber,o.endColumn,r.endLineNumber,r.endColumn-this._charAfterSelection.length)}},xq=class{constructor(e,t,n){this._position=e,this._text=t,this._charAfter=n}getEditOperations(e,t){t.addTrackedEditOperation(new O(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(e,t){let o=t.getInverseEditOperations()[0].range;return new jt(o.endLineNumber,o.startColumn,o.endLineNumber,o.endColumn-this._charAfter.length)}}});function xTt(i,e,t){let n=i.tokenization.getLanguageIdAtPosition(e,0);if(e>1){let o,r=-1;for(o=e-1;o>=1;o--){if(i.tokenization.getLanguageIdAtPosition(o,0)!==n)return r;let s=i.getLineContent(o);if(t.shouldIgnore(s)||/^\s+$/.test(s)||s===""){r=o;continue}return o}}return-1}function OI(i,e,t,n=!0,o){if(i<4)return null;let r=o.getLanguageConfiguration(e.tokenization.getLanguageId()).indentRulesSupport;if(!r)return null;if(t<=1)return{indentation:"",action:null};for(let l=t-1;l>0&&e.getLineContent(l)==="";l--)if(l===1)return{indentation:"",action:null};let s=xTt(e,t,r);if(s<0)return null;if(s<1)return{indentation:"",action:null};let a=e.getLineContent(s);if(r.shouldIncrease(a)||r.shouldIndentNextLine(a))return{indentation:yo(a),action:os.Indent,line:s};if(r.shouldDecrease(a))return{indentation:yo(a),action:null,line:s};{if(s===1)return{indentation:yo(e.getLineContent(s)),action:null,line:s};let l=s-1,c=r.getIndentMetadata(e.getLineContent(l));if(!(c&3)&&c&4){let d=0;for(let u=l-1;u>0;u--)if(!r.shouldIndentNextLine(e.getLineContent(u))){d=u;break}return{indentation:yo(e.getLineContent(d+1)),action:null,line:d+1}}if(n)return{indentation:yo(e.getLineContent(s)),action:null,line:s};for(let d=s;d>0;d--){let u=e.getLineContent(d);if(r.shouldIncrease(u))return{indentation:yo(u),action:os.Indent,line:d};if(r.shouldIndentNextLine(u)){let h=0;for(let f=d-1;f>0;f--)if(!r.shouldIndentNextLine(e.getLineContent(d))){h=f;break}return{indentation:yo(e.getLineContent(h+1)),action:null,line:h+1}}else if(r.shouldDecrease(u))return{indentation:yo(u),action:null,line:d}}return{indentation:yo(e.getLineContent(1)),action:null,line:1}}}function pb(i,e,t,n,o,r){if(i<4)return null;let s=r.getLanguageConfiguration(t);if(!s)return null;let a=r.getLanguageConfiguration(t).indentRulesSupport;if(!a)return null;let l=OI(i,e,n,void 0,r),c=e.getLineContent(n);if(l){let d=l.line;if(d!==void 0){let u=!0;for(let h=d;h0&&r.getLanguageId(0)!==s.languageId?(l=!0,c=a.substr(0,t.startColumn-1-s.firstCharOffset)):c=r.getLineContent().substring(0,t.startColumn-1);let d;t.isEmpty()?d=a.substr(t.startColumn-1-s.firstCharOffset):d=Z3(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-s.firstCharOffset);let u=o.getLanguageConfiguration(s.languageId).indentRulesSupport;if(!u)return null;let h=c,f=yo(c),p={tokenization:{getLineTokens:v=>e.tokenization.getLineTokens(v),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(v,b)=>e.getLanguageIdAtPosition(v,b)},getLineContent:v=>v===t.startLineNumber?h:e.getLineContent(v)},m=yo(r.getLineContent()),y=OI(i,p,t.startLineNumber+1,void 0,o);if(!y){let v=l?m:f;return{beforeEnter:v,afterEnter:v}}let _=l?m:y.indentation;return y.action===os.Indent&&(_=n.shiftIndent(_)),u.shouldDecrease(d)&&(_=n.unshiftIndent(_)),{beforeEnter:l?m:f,afterEnter:_}}function PXe(i,e,t,n,o,r){if(i<4)return null;let s=Z3(e,t.startLineNumber,t.startColumn);if(s.firstCharOffset)return null;let a=r.getLanguageConfiguration(s.languageId).indentRulesSupport;if(!a)return null;let l=s.getLineContent(),c=l.substr(0,t.startColumn-1-s.firstCharOffset),d;if(t.isEmpty()?d=l.substr(t.startColumn-1-s.firstCharOffset):d=Z3(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-s.firstCharOffset),!a.shouldDecrease(c+d)&&a.shouldDecrease(c+n+d)){let u=OI(i,e,t.startLineNumber,!1,r);if(!u)return null;let h=u.indentation;return u.action!==os.Indent&&(h=o.unshiftIndent(h)),h}return null}function Sq(i,e,t){let n=t.getLanguageConfiguration(i.getLanguageId()).indentRulesSupport;return!n||e<1||e>i.getLineCount()?null:n.getIndentMetadata(i.getLineContent(e))}var kq=P(()=>{Ri();q3();D5();Kr()});function $1e(i,e){return i===" "?e===5||e===6?6:5:4}function Lq(i,e){return zXe(i)&&!zXe(e)?!0:i===5?!1:OXe(i)!==OXe(e)}function OXe(i){return i===6||i===5?"space":i}function zXe(i){return i===4||i===5||i===6}var gu,zI,Eq,Dq=P(()=>{Pi();Ri();ub();Cq();AXe();s1();nw();Kt();Mi();q3();Kr();D5();kq();bq();gu=class i{static indent(e,t,n){if(t===null||n===null)return[];let o=[];for(let r=0,s=n.length;r1){let a;for(a=n-1;a>=1;a--){let d=t.getLineContent(a);if(ql(d)>=0)break}if(a<1)return null;let l=t.getLineMaxColumn(a),c=m4(e.autoIndent,t,new O(a,l,a,l),e.languageConfigurationService);c&&(r=c.indentation+c.appendText)}return o&&(o===os.Indent&&(r=i.shiftIndent(e,r)),o===os.Outdent&&(r=i.unshiftIndent(e,r)),r=e.normalizeIndentation(r)),r||null}static _replaceJumpToNextIndent(e,t,n,o){let r="",s=n.getStartPosition();if(e.insertSpaces){let a=e.visibleColumnFromColumn(t,s),l=e.indentSize,c=l-a%l;for(let d=0;dthis._compositionType(n,d,r,s,a,l));return new Tl(4,c,{shouldPushStackElementBefore:Lq(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,n,o,r,s){if(!t.isEmpty())return null;let a=t.getPosition(),l=Math.max(1,a.column-o),c=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+r),d=new O(a.lineNumber,l,a.lineNumber,c);return e.getValueInRange(d)===n&&s===0?null:new db(d,n,0,s)}static _typeCommand(e,t,n){return n?new cb(e,t,!0):new Ts(e,t,!0)}static _enter(e,t,n,o){if(e.autoIndent===0)return i._typeCommand(o,` `,n);if(!t.tokenization.isCheapToTokenize(o.getStartPosition().lineNumber)||e.autoIndent===1){let l=t.getLineContent(o.startLineNumber),c=yo(l).substring(0,o.startColumn-1);return i._typeCommand(o,` `+e.normalizeIndentation(c),n)}let r=m4(e.autoIndent,t,o,e.languageConfigurationService);if(r){if(r.indentAction===os.None)return i._typeCommand(o,` `+e.normalizeIndentation(r.indentation+r.appendText),n);if(r.indentAction===os.Indent)return i._typeCommand(o,` @@ -63,53 +63,53 @@ Received: '{1}'.`,e,Og.getLexeme(t)),r=t.offset,s=Og.getLexeme(t);return this._p `+e.normalizeIndentation(l+r.appendText),n)}}let s=t.getLineContent(o.startLineNumber),a=yo(s).substring(0,o.startColumn-1);if(e.autoIndent>=4){let l=RXe(e.autoIndent,t,o,{unshiftIndent:c=>i.unshiftIndent(e,c),shiftIndent:c=>i.shiftIndent(e,c),normalizeIndentation:c=>e.normalizeIndentation(c)},e.languageConfigurationService);if(l){let c=e.visibleColumnFromColumn(t,o.getEndPosition()),d=o.endColumn,u=t.getLineContent(o.endLineNumber),h=qr(u);if(h>=0?o=o.setEndPosition(o.endLineNumber,Math.max(o.endColumn,h+1)):o=o.setEndPosition(o.endLineNumber,t.getLineMaxColumn(o.endLineNumber)),n)return new cb(o,` `+e.normalizeIndentation(l.afterEnter),!0);{let f=0;return d<=h+1&&(e.insertSpaces||(c=Math.ceil(c/e.indentSize)),f=Math.min(c+1-e.normalizeIndentation(l.afterEnter).length-1,0)),new db(o,` `+e.normalizeIndentation(l.afterEnter),0,f,!0)}}}return i._typeCommand(o,` -`+e.normalizeIndentation(a),n)}static _isAutoIndentType(e,t,n){if(e.autoIndent<4)return!1;for(let o=0,r=n.length;oi.shiftIndent(e,a),unshiftIndent:a=>i.unshiftIndent(e,a)},e.languageConfigurationService);if(s===null)return null;if(s!==e.normalizeIndentation(r)){let a=t.getLineFirstNonWhitespaceColumn(n.startLineNumber);return a===0?i._typeCommand(new O(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(s)+o,!1):i._typeCommand(new O(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(s)+t.getLineContent(n.startLineNumber).substring(a-1,n.startColumn-1)+o,!1)}return null}static _isAutoClosingOvertype(e,t,n,o,r){if(e.autoClosingOvertype==="never"||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(r))return!1;for(let s=0,a=n.length;s2?d.charCodeAt(c.column-2):0)===92&&h)return!1;if(e.autoClosingOvertype==="auto"){let p=!1;for(let m=0,y=o.length;mt.startsWith(l.open)),a=r.some(l=>t.startsWith(l.close));return!s&&a}static _findAutoClosingPairOpen(e,t,n,o){let r=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(o);if(!r)return null;let s=null;for(let a of r)if(s===null||a.open.length>s.open.length){let l=!0;for(let c of n)if(t.getValueInRange(new O(c.lineNumber,c.column-a.open.length+1,c.lineNumber,c.column))+o!==a.open){l=!1;break}l&&(s=a)}return s}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;let n=t.close.charAt(t.close.length-1),o=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(n)||[],r=null;for(let s of o)s.open!==t.open&&t.open.includes(s.open)&&t.close.endsWith(s.close)&&(!r||s.open.length>r.open.length)&&(r=s);return r}static _getAutoClosingPairClose(e,t,n,o,r){for(let p of n)if(!p.isEmpty())return null;let s=n.map(p=>{let m=p.getPosition();return r?{lineNumber:m.lineNumber,beforeColumn:m.column-o.length,afterColumn:m.column}:{lineNumber:m.lineNumber,beforeColumn:m.column,afterColumn:m.column}}),a=this._findAutoClosingPairOpen(e,t,s.map(p=>new ke(p.lineNumber,p.beforeColumn)),o);if(!a)return null;let l,c;if(u2(o)?(l=e.autoClosingQuotes,c=e.shouldAutoCloseBefore.quote):(e.blockCommentStartToken?a.open.includes(e.blockCommentStartToken):!1)?(l=e.autoClosingComments,c=e.shouldAutoCloseBefore.comment):(l=e.autoClosingBrackets,c=e.shouldAutoCloseBefore.bracket),l==="never")return null;let u=this._findContainedAutoClosingPair(e,a),h=u?u.close:"",f=!0;for(let p of s){let{lineNumber:m,beforeColumn:y,afterColumn:_}=p,v=t.getLineContent(m),b=v.substring(0,y-1),C=v.substring(_-1);if(C.startsWith(h)||(f=!1),C.length>0){let k=C.charAt(0);if(!i._isBeforeClosingBrace(e,C)&&!c(k))return null}if(a.open.length===1&&(o==="'"||o==='"')&&l!=="always"){let k=id(e.wordSeparators);if(b.length>0){let D=b.charCodeAt(b.length-1);if(k.get(D)===0)return null}}if(!t.tokenization.isCheapToTokenize(m))return null;t.tokenization.forceTokenization(m);let w=t.tokenization.getLineTokens(m),S=q3(w,y-1);if(!a.shouldAutoClose(S,y-S.firstCharOffset))return null;let x=a.findNeutralCharacter();if(x){let k=t.tokenization.getTokenTypeIfInsertingCharacter(m,y,x);if(!a.isOK(k))return null}}return f?a.close.substring(0,a.close.length-h.length):a.close}static _runAutoClosingOpenCharType(e,t,n,o,r,s,a){let l=[];for(let c=0,d=o.length;cnew Ts(new O(h.positionLineNumber,h.positionColumn,h.positionLineNumber,h.positionColumn+1),"",!1));return new Tl(4,u,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}let d=this._getAutoClosingPairClose(t,n,r,l,!0);return d!==null?this._runAutoClosingOpenCharType(e,t,n,r,l,!0,d):null}static typeWithInterceptors(e,t,n,o,r,s,a){if(!e&&a===` -`){let d=[];for(let u=0,h=r.length;u{Wt();Xi();(function(i){i.editorSimpleInput=new Bt("editorSimpleInput",!1,!0),i.editorTextFocus=new Bt("editorTextFocus",!1,g("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),i.focus=new Bt("editorFocus",!1,g("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),i.textInputFocus=new Bt("textInputFocus",!1,g("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),i.readOnly=new Bt("editorReadonly",!1,g("editorReadonly","Whether the editor is read-only")),i.inDiffEditor=new Bt("inDiffEditor",!1,g("inDiffEditor","Whether the context is a diff editor")),i.isEmbeddedDiffEditor=new Bt("isEmbeddedDiffEditor",!1,g("isEmbeddedDiffEditor","Whether the context is an embedded diff editor")),i.inMultiDiffEditor=new Bt("inMultiDiffEditor",!1,g("inMultiDiffEditor","Whether the context is a multi diff editor")),i.multiDiffEditorAllCollapsed=new Bt("multiDiffEditorAllCollapsed",void 0,g("multiDiffEditorAllCollapsed","Whether all files in multi diff editor are collapsed")),i.hasChanges=new Bt("diffEditorHasChanges",!1,g("diffEditorHasChanges","Whether the diff editor has changes")),i.comparingMovedCode=new Bt("comparingMovedCode",!1,g("comparingMovedCode","Whether a moved code block is selected for comparison")),i.accessibleDiffViewerVisible=new Bt("accessibleDiffViewerVisible",!1,g("accessibleDiffViewerVisible","Whether the accessible diff viewer is visible")),i.diffEditorRenderSideBySideInlineBreakpointReached=new Bt("diffEditorRenderSideBySideInlineBreakpointReached",!1,g("diffEditorRenderSideBySideInlineBreakpointReached","Whether the diff editor render side by side inline breakpoint is reached")),i.columnSelection=new Bt("editorColumnSelection",!1,g("editorColumnSelection","Whether `editor.columnSelection` is enabled")),i.writable=i.readOnly.toNegated(),i.hasNonEmptySelection=new Bt("editorHasSelection",!1,g("editorHasSelection","Whether the editor has text selected")),i.hasOnlyEmptySelection=i.hasNonEmptySelection.toNegated(),i.hasMultipleSelections=new Bt("editorHasMultipleSelections",!1,g("editorHasMultipleSelections","Whether the editor has multiple selections")),i.hasSingleSelection=i.hasMultipleSelections.toNegated(),i.tabMovesFocus=new Bt("editorTabMovesFocus",!1,g("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),i.tabDoesNotMoveFocus=i.tabMovesFocus.toNegated(),i.isInWalkThroughSnippet=new Bt("isInEmbeddedEditor",!1,!0),i.canUndo=new Bt("canUndo",!1,!0),i.canRedo=new Bt("canRedo",!1,!0),i.hoverVisible=new Bt("editorHoverVisible",!1,g("editorHoverVisible","Whether the editor hover is visible")),i.hoverFocused=new Bt("editorHoverFocused",!1,g("editorHoverFocused","Whether the editor hover is focused")),i.stickyScrollFocused=new Bt("stickyScrollFocused",!1,g("stickyScrollFocused","Whether the sticky scroll is focused")),i.stickyScrollVisible=new Bt("stickyScrollVisible",!1,g("stickyScrollVisible","Whether the sticky scroll is visible")),i.standaloneColorPickerVisible=new Bt("standaloneColorPickerVisible",!1,g("standaloneColorPickerVisible","Whether the standalone color picker is visible")),i.standaloneColorPickerFocused=new Bt("standaloneColorPickerFocused",!1,g("standaloneColorPickerFocused","Whether the standalone color picker is focused")),i.inCompositeEditor=new Bt("inCompositeEditor",void 0,g("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),i.notInCompositeEditor=i.inCompositeEditor.toNegated(),i.languageId=new Bt("editorLangId","",g("editorLangId","The language identifier of the editor")),i.hasCompletionItemProvider=new Bt("editorHasCompletionItemProvider",!1,g("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),i.hasCodeActionsProvider=new Bt("editorHasCodeActionsProvider",!1,g("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),i.hasCodeLensProvider=new Bt("editorHasCodeLensProvider",!1,g("editorHasCodeLensProvider","Whether the editor has a code lens provider")),i.hasDefinitionProvider=new Bt("editorHasDefinitionProvider",!1,g("editorHasDefinitionProvider","Whether the editor has a definition provider")),i.hasDeclarationProvider=new Bt("editorHasDeclarationProvider",!1,g("editorHasDeclarationProvider","Whether the editor has a declaration provider")),i.hasImplementationProvider=new Bt("editorHasImplementationProvider",!1,g("editorHasImplementationProvider","Whether the editor has an implementation provider")),i.hasTypeDefinitionProvider=new Bt("editorHasTypeDefinitionProvider",!1,g("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),i.hasHoverProvider=new Bt("editorHasHoverProvider",!1,g("editorHasHoverProvider","Whether the editor has a hover provider")),i.hasDocumentHighlightProvider=new Bt("editorHasDocumentHighlightProvider",!1,g("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),i.hasDocumentSymbolProvider=new Bt("editorHasDocumentSymbolProvider",!1,g("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),i.hasReferenceProvider=new Bt("editorHasReferenceProvider",!1,g("editorHasReferenceProvider","Whether the editor has a reference provider")),i.hasRenameProvider=new Bt("editorHasRenameProvider",!1,g("editorHasRenameProvider","Whether the editor has a rename provider")),i.hasSignatureHelpProvider=new Bt("editorHasSignatureHelpProvider",!1,g("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),i.hasInlayHintsProvider=new Bt("editorHasInlayHintsProvider",!1,g("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),i.hasDocumentFormattingProvider=new Bt("editorHasDocumentFormattingProvider",!1,g("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),i.hasDocumentSelectionFormattingProvider=new Bt("editorHasDocumentSelectionFormattingProvider",!1,g("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),i.hasMultipleDocumentFormattingProvider=new Bt("editorHasMultipleDocumentFormattingProvider",!1,g("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),i.hasMultipleDocumentSelectionFormattingProvider=new Bt("editorHasMultipleDocumentSelectionFormattingProvider",!1,g("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))})(re||(re={}))});function nx(i,e){Pa.registerKeybindingRule({id:i,primary:e,when:STt,weight:wo+1})}function FXe(i){return i.register(),i}function mb(i,e){FXe(new Lq("default:"+i,i)),FXe(new Lq(i,i,e))}var wo,ss,Jl,ix,FI,Va,STt,_v,Lq,HI=P(()=>{Wt();Xc();ho();Xl();an();fs();NXe();s1();fq();mq();kq();Mi();Kt();Co();Xi();O3();Qt();wo=0,ss=class extends Jo{runEditorCommand(e,t,n){let o=t._getViewModel();o&&this.runCoreEditorCommand(o,n||{})}};(function(i){let e=function(n){if(!Gs(n))return!1;let o=n;return!(!qs(o.to)||!$l(o.by)&&!qs(o.by)||!$l(o.value)&&!zh(o.value)||!$l(o.revealCursor)&&!BV(o.revealCursor))};i.metadata={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n * 'to': A mandatory direction value.\n ```\n 'up', 'down'\n ```\n * 'by': Unit to move. Default is computed based on 'to' value.\n ```\n 'line', 'wrappedLine', 'page', 'halfPage', 'editor'\n ```\n * 'value': Number of units to move. Default is '1'.\n * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n ",constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage","editor"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},i.RawDirection={Up:"up",Right:"right",Down:"down",Left:"left"},i.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage",Editor:"editor",Column:"column"};function t(n){let o;switch(n.to){case i.RawDirection.Up:o=1;break;case i.RawDirection.Right:o=2;break;case i.RawDirection.Down:o=3;break;case i.RawDirection.Left:o=4;break;default:return null}let r;switch(n.by){case i.RawUnit.Line:r=1;break;case i.RawUnit.WrappedLine:r=2;break;case i.RawUnit.Page:r=3;break;case i.RawUnit.HalfPage:r=4;break;case i.RawUnit.Editor:r=5;break;case i.RawUnit.Column:r=6;break;default:r=2}let s=Math.floor(n.value||1),a=!!n.revealCursor;return{direction:o,unit:r,value:s,revealCursor:a,select:!!n.select}}i.parse=t})(Jl||(Jl={}));(function(i){let e=function(t){if(!Gs(t))return!1;let n=t;return!(!zh(n.lineNumber)&&!qs(n.lineNumber)||!$l(n.at)&&!qs(n.at))};i.metadata={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n * 'lineNumber': A mandatory line number value.\n * 'at': Logical position at which line has to be revealed.\n ```\n 'top', 'center', 'bottom'\n ```\n ",constraint:e,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},i.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(ix||(ix={}));FI=class{constructor(e){e.addImplementation(1e4,"code-editor",(t,n)=>{let o=t.get(tn).getFocusedCodeEditor();return o&&o.hasTextFocus()?this._runEditorCommand(t,o,n):!1}),e.addImplementation(1e3,"generic-dom-input-textarea",(t,n)=>{let o=gs();return o&&["input","textarea"].indexOf(o.tagName.toLowerCase())>=0?(this.runDOMCommand(o),!0):!1}),e.addImplementation(0,"generic-dom",(t,n)=>{let o=t.get(tn).getActiveCodeEditor();return o?(o.focus(),this._runEditorCommand(t,o,n)):!1})}_runEditorCommand(e,t,n){let o=this.runEditorCommand(e,t,n);return o||!0}};(function(i){class e extends ss{constructor(v){super(v),this._inSelectionMode=v.inSelectionMode}runCoreEditorCommand(v,b){if(!b.position)return;v.model.pushStackElement(),v.setCursorStates(b.source,3,[Js.moveTo(v,v.getPrimaryCursorState(),this._inSelectionMode,b.position,b.viewPosition)])&&b.revealType!==2&&v.revealPrimaryCursor(b.source,!0,!0)}}i.MoveTo=zt(new e({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),i.MoveToSelect=zt(new e({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class t extends ss{runCoreEditorCommand(v,b){v.model.pushStackElement();let C=this._getColumnSelectResult(v,v.getPrimaryCursorState(),v.getCursorColumnSelectData(),b);C!==null&&(v.setCursorStates(b.source,3,C.viewStates.map(w=>Vn.fromViewState(w))),v.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:C.fromLineNumber,fromViewVisualColumn:C.fromVisualColumn,toViewLineNumber:C.toLineNumber,toViewVisualColumn:C.toVisualColumn}),C.reversed?v.revealTopMostCursor(b.source):v.revealBottomMostCursor(b.source))}}i.ColumnSelect=zt(new class extends t{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(_,v,b,C){if(typeof C.position>"u"||typeof C.viewPosition>"u"||typeof C.mouseColumn>"u")return null;let w=_.model.validatePosition(C.position),S=_.coordinatesConverter.validateViewPosition(new ke(C.viewPosition.lineNumber,C.viewPosition.column),w),x=C.doColumnSelect?b.fromViewLineNumber:S.lineNumber,k=C.doColumnSelect?b.fromViewVisualColumn:C.mouseColumn-1;return gv.columnSelect(_.cursorConfig,_,x,k,S.lineNumber,C.mouseColumn-1)}}),i.CursorColumnSelectLeft=zt(new class extends t{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(_,v,b,C){return gv.columnSelectLeft(_.cursorConfig,_,b)}}),i.CursorColumnSelectRight=zt(new class extends t{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(_,v,b,C){return gv.columnSelectRight(_.cursorConfig,_,b)}});class n extends t{constructor(v){super(v),this._isPaged=v.isPaged}_getColumnSelectResult(v,b,C,w){return gv.columnSelectUp(v.cursorConfig,v,C,this._isPaged)}}i.CursorColumnSelectUp=zt(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:3600,linux:{primary:0}}})),i.CursorColumnSelectPageUp=zt(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:3595,linux:{primary:0}}}));class o extends t{constructor(v){super(v),this._isPaged=v.isPaged}_getColumnSelectResult(v,b,C,w){return gv.columnSelectDown(v.cursorConfig,v,C,this._isPaged)}}i.CursorColumnSelectDown=zt(new o({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:3602,linux:{primary:0}}})),i.CursorColumnSelectPageDown=zt(new o({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:3596,linux:{primary:0}}}));class r extends ss{constructor(){super({id:"cursorMove",precondition:void 0,metadata:PI.metadata})}runCoreEditorCommand(v,b){let C=PI.parse(b);C&&this._runCursorMove(v,b.source,C)}_runCursorMove(v,b,C){v.model.pushStackElement(),v.setCursorStates(b,3,r._move(v,v.getCursorStates(),C)),v.revealPrimaryCursor(b,!0)}static _move(v,b,C){let w=C.select,S=C.value;switch(C.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return Js.simpleMove(v,b,C.direction,w,S,C.unit);case 11:case 13:case 12:case 14:return Js.viewportMove(v,b,C.direction,w,S);default:return null}}}i.CursorMoveImpl=r,i.CursorMove=zt(new r);class s extends ss{constructor(v){super(v),this._staticArgs=v.args}runCoreEditorCommand(v,b){let C=this._staticArgs;this._staticArgs.value===-1&&(C={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:b.pageSize||v.cursorConfig.pageSize}),v.model.pushStackElement(),v.setCursorStates(b.source,3,Js.simpleMove(v,v.getCursorStates(),C.direction,C.select,C.value,C.unit)),v.revealPrimaryCursor(b.source,!0)}}i.CursorLeft=zt(new s({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),i.CursorLeftSelect=zt(new s({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:1039}})),i.CursorRight=zt(new s({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),i.CursorRightSelect=zt(new s({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:1041}})),i.CursorUp=zt(new s({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),i.CursorUpSelect=zt(new s({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),i.CursorPageUp=zt(new s({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:11}})),i.CursorPageUpSelect=zt(new s({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:1035}})),i.CursorDown=zt(new s({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),i.CursorDownSelect=zt(new s({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),i.CursorPageDown=zt(new s({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:12}})),i.CursorPageDownSelect=zt(new s({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:1036}})),i.CreateCursor=zt(new class extends ss{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(_,v){if(!v.position)return;let b;v.wholeLine?b=Js.line(_,_.getPrimaryCursorState(),!1,v.position,v.viewPosition):b=Js.moveTo(_,_.getPrimaryCursorState(),!1,v.position,v.viewPosition);let C=_.getCursorStates();if(C.length>1){let w=b.modelState?b.modelState.position:null,S=b.viewState?b.viewState.position:null;for(let x=0,k=C.length;xS&&(w=S);let x=new O(w,1,w,_.model.getLineMaxColumn(w)),k=0;if(b.at)switch(b.at){case ix.RawAtArgument.Top:k=3;break;case ix.RawAtArgument.Center:k=1;break;case ix.RawAtArgument.Bottom:k=4;break;default:break}let D=_.coordinatesConverter.convertModelRangeToViewRange(x);_.revealRange(v.source,!1,D,k,0)}}),i.SelectAll=new class extends FI{constructor(){super(fGe)}runDOMCommand(_){Aa&&(_.focus(),_.select()),_.ownerDocument.execCommand("selectAll")}runEditorCommand(_,v,b){let C=v._getViewModel();C&&this.runCoreEditorCommand(C,b)}runCoreEditorCommand(_,v){_.model.pushStackElement(),_.setCursorStates("keyboard",3,[Js.selectAll(_,_.getPrimaryCursorState())])}},i.SetSelection=zt(new class extends ss{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(_,v){v.selection&&(_.model.pushStackElement(),_.setCursorStates(v.source,3,[Vn.fromModelSelection(v.selection)]))}})})(Va||(Va={}));STt=mt.and(re.textInputFocus,re.columnSelection);nx(Va.CursorColumnSelectLeft.id,1039);nx(Va.CursorColumnSelectRight.id,1041);nx(Va.CursorColumnSelectUp.id,1040);nx(Va.CursorColumnSelectPageUp.id,1035);nx(Va.CursorColumnSelectDown.id,1042);nx(Va.CursorColumnSelectPageDown.id,1036);(function(i){class e extends Jo{runEditorCommand(n,o,r){let s=o._getViewModel();s&&this.runCoreEditingCommand(o,s,r||{})}}i.CoreEditingCommand=e,i.LineBreakInsert=zt(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:re.writable,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(t,n,o){t.pushUndoStop(),t.executeCommands(this.id,gu.lineBreakInsert(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection)))}}),i.Outdent=zt(new class extends e{constructor(){super({id:"outdent",precondition:re.writable,kbOpts:{weight:wo,kbExpr:mt.and(re.editorTextFocus,re.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(t,n,o){t.pushUndoStop(),t.executeCommands(this.id,gu.outdent(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection))),t.pushUndoStop()}}),i.Tab=zt(new class extends e{constructor(){super({id:"tab",precondition:re.writable,kbOpts:{weight:wo,kbExpr:mt.and(re.editorTextFocus,re.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(t,n,o){t.pushUndoStop(),t.executeCommands(this.id,gu.tab(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection))),t.pushUndoStop()}}),i.DeleteLeft=zt(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(t,n,o){let[r,s]=p4.deleteLeft(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(a=>a.modelState.selection),n.getCursorAutoClosedCharacters());r&&t.pushUndoStop(),t.executeCommands(this.id,s),n.setPrevEditOperationType(2)}}),i.DeleteRight=zt(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(t,n,o){let[r,s]=p4.deleteRight(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(a=>a.modelState.selection));r&&t.pushUndoStop(),t.executeCommands(this.id,s),n.setPrevEditOperationType(3)}}),i.Undo=new class extends FI{constructor(){super(Lhe)}runDOMCommand(t){t.ownerDocument.execCommand("undo")}runEditorCommand(t,n,o){if(!(!n.hasModel()||n.getOption(90)===!0))return n.getModel().undo()}},i.Redo=new class extends FI{constructor(){super(Ehe)}runDOMCommand(t){t.ownerDocument.execCommand("redo")}runEditorCommand(t,n,o){if(!(!n.hasModel()||n.getOption(90)===!0))return n.getModel().redo()}}})(_v||(_v={}));Lq=class extends E5{constructor(e,t,n){super({id:e,precondition:void 0,metadata:n}),this._handlerId=t}runCommand(e,t){let n=e.get(tn).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,t)}};mb("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});mb("replacePreviousChar");mb("compositionType");mb("compositionStart");mb("compositionEnd");mb("paste");mb("cut")});var Eq,HXe=P(()=>{HI();Mi();Mn();Eq=class{constructor(e,t,n,o){this.configuration=e,this.viewModel=t,this.userInputEvents=n,this.commandDelegate=o}paste(e,t,n,o){this.commandDelegate.paste(e,t,n,o)}type(e){this.commandDelegate.type(e)}compositionType(e,t,n,o){this.commandDelegate.compositionType(e,t,n,o)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Va.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){let t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():e.mouseDownCount===3?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount===2?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):o?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){Va.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){Va.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,n){e=this._validateViewColumn(e),Va.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:n})}_createCursor(e,t){e=this._validateViewColumn(e),Va.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){Va.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){Va.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){Va.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){Va.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){Va.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){Va.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){Va.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){Va.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){Va.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}});var BI,ox,VI,Dq=P(()=>{_a();Vg();Pi();J0();BI=class{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){let t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new fo("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(this.getCount()===0)return null;let n=this.getStartLineNumber(),o=this.getEndLineNumber();if(to)return null;let r=0,s=0;for(let l=n;l<=o;l++){let c=l-this._rendLineNumberStart;e<=l&&l<=t&&(s===0?(r=c,s=1):s++)}if(e=o&&a<=r&&(this._lines[a-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(e,t){if(this.getCount()===0)return null;let n=t-e+1,o=this.getStartLineNumber(),r=this.getEndLineNumber();if(e<=o)return this._rendLineNumberStart+=n,null;if(e>r)return null;if(n+e>r)return this._lines.splice(e-this._rendLineNumberStart,r-e+1);let s=[];for(let u=0;un)continue;let l=Math.max(t,a.fromLineNumber),c=Math.min(n,a.toLineNumber);for(let d=l;d<=c;d++){let u=d-this._rendLineNumberStart;this._lines[u].onTokensChanged(),o=!0}}return o}},ox=class{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new BI(()=>this._host.createVisibleLine())}_createDomNode(){let e=vn(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(143)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){let t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let n=0,o=t.length;nt){let s=t,a=Math.min(n,r.rendLineNumberStart-1);s<=a&&(this._insertLinesBefore(r,s,a,o,t),r.linesLength+=a-s+1)}else if(r.rendLineNumberStart0&&(this._removeLinesBefore(r,s),r.linesLength-=s)}if(r.rendLineNumberStart=t,r.rendLineNumberStart+r.linesLength-1n){let s=Math.max(0,n-r.rendLineNumberStart+1),l=r.linesLength-1-s+1;l>0&&(this._removeLinesAfter(r,l),r.linesLength-=l)}return this._finishRendering(r,!1,o),r}_renderUntouchedLines(e,t,n,o,r){let s=e.rendLineNumberStart,a=e.lines;for(let l=t;l<=n;l++){let c=s+l;a[l].layoutLine(c,o[c-r])}}_insertLinesBefore(e,t,n,o,r){let s=[],a=0;for(let l=t;l<=n;l++)s[a++]=this.host.createVisibleLine();e.lines=s.concat(e.lines)}_removeLinesBefore(e,t){for(let n=0;n=0;a--){let l=e.lines[a];o[a]&&(l.setDomNode(s),s=s.previousSibling)}}_finishRenderingInvalidLines(e,t,n){let o=document.createElement("div");i._ttPolicy&&(t=i._ttPolicy.createHTML(t)),o.innerHTML=t;for(let r=0;ri});VI._sb=new qh(1e5)});var Tq,j1e,Iq,Mq,BXe=P(()=>{_a();Vf();Dq();rd();Tq=class extends Yr{constructor(e){super(e),this._visibleLines=new ox(this),this.domNode=this._visibleLines.domNode;let n=this._context.configuration.options.get(50);Gr(this.domNode,n),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;en.shouldRender());for(let n=0,o=t.length;n'),o.appendString(r),o.appendString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}},Iq=class extends Tq{constructor(e){super(e);let n=this._context.configuration.options.get(143);this._contentWidth=n.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){let n=this._context.configuration.options.get(143);return this._contentWidth=n.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}},Mq=class extends Tq{constructor(e){super(e);let t=this._context.configuration.options,n=t.get(143);this._contentLeft=n.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),Gr(this.domNode,t.get(50))}onConfigurationChanged(e){let t=this._context.configuration.options;Gr(this.domNode,t.get(50));let n=t.get(143);return this._contentLeft=n.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);let t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}});var rx,q1e=P(()=>{Mi();rx=class i{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){var t;(t=this.onKeyDown)===null||t===void 0||t.call(this,e)}emitKeyUp(e){var t;(t=this.onKeyUp)===null||t===void 0||t.call(this,e)}emitContextMenu(e){var t;(t=this.onContextMenu)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var t;(t=this.onMouseMove)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var t;(t=this.onMouseLeave)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var t;(t=this.onMouseDown)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var t;(t=this.onMouseUp)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var t;(t=this.onMouseDrag)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var t;(t=this.onMouseDrop)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var e;(e=this.onMouseDropCanceled)===null||e===void 0||e.call(this)}emitMouseWheel(e){var t;(t=this.onMouseWheel)===null||t===void 0||t.call(this,e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return i.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){let n={...e};return n.position&&(n.position=t.convertViewPositionToModelPosition(n.position)),n.range&&(n.range=t.convertViewRangeToModelRange(n.range)),(n.type===5||n.type===8)&&(n.detail=this.convertViewToModelViewZoneData(n.detail,t)),n}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new ke(e.afterLineNumber,1)).lineNumber}}}});var VXe=P(()=>{});var Nq,WXe=P(()=>{_a();VXe();rd();Nq=class extends Yr{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=vn(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1,n=this._context.configuration.options.get(143),o=n.contentWidth-n.verticalScrollbarWidth;this.contentWidth!==o&&(this.contentWidth=o,e=!0);let r=n.contentLeft;return this.contentLeft!==r&&(this.contentLeft=r,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){var t;let n=0,o=e.getDecorationsInViewport();for(let r of o){if(!r.options.blockClassName)continue;let s=this.blocks[n];s||(s=this.blocks[n]=vn(document.createElement("div")),this.domNode.appendChild(s));let a,l;r.options.blockIsAfterEnd?(a=e.getVerticalOffsetAfterLineNumber(r.range.endLineNumber,!1),l=e.getVerticalOffsetAfterLineNumber(r.range.endLineNumber,!0)):(a=e.getVerticalOffsetForLineNumber(r.range.startLineNumber,!0),l=r.range.isEmpty()&&!r.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(r.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(r.range.endLineNumber,!0));let[c,d,u,h]=(t=r.options.blockPadding)!==null&&t!==void 0?t:[0,0,0,0];s.setClassName("blockDecorations-block "+r.options.blockClassName),s.setLeft(this.contentLeft-h),s.setWidth(this.contentWidth+h+d),s.setTop(a-e.scrollTop-c),s.setHeight(l-a+c+u),n++}for(let r=n;r{Qt();_a();rd();Aq=class extends Yr{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=vn(document.createElement("div")),El.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=vn(document.createElement("div")),El.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){let t=Object.keys(this._widgets);for(let n of t)this._widgets[n].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){let e=Object.keys(this._widgets);for(let t of e)this._widgets[t].updateAnchorViewPosition()}addWidget(e){let t=new K1e(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,n,o,r){this._widgets[e.getId()].setPosition(t,n,o,r),this.setShouldRender()}removeWidget(e){let t=e.getId();if(this._widgets.hasOwnProperty(t)){let n=this._widgets[t];delete this._widgets[t];let o=n.domNode.domNode;o.parentNode.removeChild(o),o.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return this._widgets.hasOwnProperty(e)?this._widgets[e].suppressMouseDown:!1}onBeforeRender(e){let t=Object.keys(this._widgets);for(let n of t)this._widgets[n].onBeforeRender(e)}prepareRender(e){let t=Object.keys(this._widgets);for(let n of t)this._widgets[n].prepareRender(e)}render(e){let t=Object.keys(this._widgets);for(let n of t)this._widgets[n].render(e)}},K1e=class{constructor(e,t,n){this._primaryAnchor=new gb(null,null),this._secondaryAnchor=new gb(null,null),this._context=e,this._viewDomNode=t,this._actual=n,this.domNode=vn(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;let o=this._context.configuration.options,r=o.get(143);this._fixedOverflowWidgets=o.get(42),this._contentWidth=r.contentWidth,this._contentLeft=r.contentLeft,this._lineHeight=o.get(66),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){let t=this._context.configuration.options;if(this._lineHeight=t.get(66),e.hasChanged(143)){let n=t.get(143);this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,t,n){this._affinity=e,this._primaryAnchor=o(t,this._context.viewModel,this._affinity),this._secondaryAnchor=o(n,this._context.viewModel,this._affinity);function o(r,s,a){if(!r)return new gb(null,null);let l=s.model.validatePosition(r);if(s.coordinatesConverter.modelPositionIsVisible(l)){let c=s.coordinatesConverter.convertModelPositionToViewPosition(l,a??void 0);return new gb(r,c)}return new gb(r,null)}}_getMaxWidth(){let e=this.domNode.domNode.ownerDocument,t=e.defaultView;return this.allowEditorOverflow?t?.innerWidth||e.documentElement.offsetWidth||e.body.offsetWidth:this._contentWidth}setPosition(e,t,n,o){this._setPosition(o,e,t),this._preference=n,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,n,o){let r=e.top,s=r,a=e.top+e.height,l=o.viewportHeight-a,c=r-n,d=s>=n,u=a,h=l>=n,f=e.left;return f+t>o.scrollLeft+o.viewportWidth&&(f=o.scrollLeft+o.viewportWidth-t),fc){let f=h-(c-o);h-=f,n-=f}if(h=_,C=f+n<=p.height-v;return this._fixedOverflowWidgets?{fitsAbove:b,aboveTop:Math.max(h,_),fitsBelow:C,belowTop:f,left:y}:{fitsAbove:b,aboveTop:a,fitsBelow:C,belowTop:l,left:m}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new vb(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){var t,n;let o=a(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),r=((t=this._secondaryAnchor.viewPosition)===null||t===void 0?void 0:t.lineNumber)===((n=this._primaryAnchor.viewPosition)===null||n===void 0?void 0:n.lineNumber)?this._secondaryAnchor.viewPosition:null,s=a(r,this._affinity,this._lineHeight);return{primary:o,secondary:s};function a(l,c,d){if(!l)return null;let u=e.visibleRangeForPosition(l);if(!u)return null;let h=l.column===1&&c===3?0:u.left,f=e.getVerticalOffsetForLineNumber(l.lineNumber)-e.scrollTop;return new Rq(f,h,d)}}_reduceAnchorCoordinates(e,t,n){if(!t)return e;let o=this._context.configuration.options.get(50),r=t.left;return re.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&G1e(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&G1e(this._actual.afterRender,this._actual,this._renderData.position)}},gb=class{constructor(e,t){this.modelPosition=e,this.viewPosition=t}},vb=class{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}},Rq=class{constructor(e,t,n){this.top=e,this.left=t,this.height=n,this._anchorCoordinateBrand=void 0}}});var $Xe=P(()=>{});var Pq,Oq,zq,jXe=P(()=>{$Xe();pv();r1();Vi();No();zo();fp();Mi();Pq=class extends pu{constructor(e){super(),this._context=e;let t=this._context.configuration.options,n=t.get(143);this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._wordWrap=n.isViewportWrapping,this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new jt(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1,t=new Set;for(let r of this._selections)t.add(r.positionLineNumber);let n=Array.from(t);n.sort((r,s)=>r-s),uo(this._cursorLineNumbers,n)||(this._cursorLineNumbers=n,e=!0);let o=this._selections.every(r=>r.isEmpty());return this._selectionIsEmpty!==o&&(this._selectionIsEmpty=o,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(143);return this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._wordWrap=n.isViewportWrapping,this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return this._renderLineHighlightOnlyWhenFocus?(this._focused=e.isFocused,!0):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}let t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=[];for(let s=t;s<=n;s++){let a=s-t;o[a]=""}if(this._wordWrap){let s=this._renderOne(e,!1);for(let a of this._cursorLineNumbers){let l=this._context.viewModel.coordinatesConverter,c=l.convertViewPositionToModelPosition(new ke(a,1)).lineNumber,d=l.convertModelPositionToViewPosition(new ke(c,1)).lineNumber,u=l.convertModelPositionToViewPosition(new ke(c,this._context.viewModel.model.getLineMaxColumn(c))).lineNumber,h=Math.max(d,t),f=Math.min(u,n);for(let p=h;p<=f;p++){let m=p-t;o[m]=s}}}let r=this._renderOne(e,!0);for(let s of this._cursorLineNumbers){if(sn)continue;let a=s-t;o[a]=r}this._renderData=o}render(e,t){if(!this._renderData)return"";let n=t-e;return n>=this._renderData.length?"":this._renderData[n]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}},Oq=class extends Pq{_renderOne(e,t){return`
`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}},zq=class extends Pq{_renderOne(e,t){return`
`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}};Qs((i,e)=>{let t=i.getColor(A1e);if(t&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${t}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)),!t||t.isTransparent()||i.defines(R1e)){let n=i.getColor(R1e);n&&(e.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${n}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${n}; }`),Ac(i.type)&&(e.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}})});var qXe=P(()=>{});var Fq,GXe=P(()=>{qXe();pv();Kw();Kt();Fq=class extends pu{constructor(e){super(),this._context=e;let t=this._context.configuration.options;this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){let t=e.getDecorationsInViewport(),n=[],o=0;for(let l=0,c=t.length;l{if(l.options.zIndexc.options.zIndex)return 1;let d=l.options.className,u=c.options.className;return du?1:O.compareRangesUsingStarts(l.range,c.range)});let r=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,a=[];for(let l=r;l<=s;l++){let c=l-r;a[c]=""}this._renderWholeLineDecorations(e,n,a),this._renderNormalDecorations(e,n,a),this._renderResult=a}_renderWholeLineDecorations(e,t,n){let o=String(this._lineHeight),r=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let a=0,l=t.length;a',u=Math.max(c.range.startLineNumber,r),h=Math.min(c.range.endLineNumber,s);for(let f=u;f<=h;f++){let p=f-r;n[p]+=d}}}_renderNormalDecorations(e,t,n){var o;let r=String(this._lineHeight),s=e.visibleRange.startLineNumber,a=null,l=!1,c=null,d=!1;for(let u=0,h=t.length;u';l[f]+=v}}}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}});var Hq,KXe=P(()=>{Qt();_a();o1();rd();No();Hq=class extends Yr{constructor(e,t,n,o){super(e);let r=this._context.configuration.options,s=r.get(102),a=r.get(74),l=r.get(40),c=r.get(105),d={listenOnDomNode:n.domNode,className:"editor-scrollable "+NI(e.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:a,fastScrollSensitivity:l,scrollPredominantAxis:c,scrollByPage:s.scrollByPage};this.scrollbar=this._register(new c2(t.domNode,d,this._context.viewLayout.getScrollable())),El.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=vn(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();let u=(h,f,p)=>{let m={};if(f){let y=h.scrollTop;y&&(m.scrollTop=this._context.viewLayout.getCurrentScrollTop()+y,h.scrollTop=0)}if(p){let y=h.scrollLeft;y&&(m.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+y,h.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(m,1)};this._register(Xe(n.domNode,"scroll",h=>u(n.domNode,!0,!0))),this._register(Xe(t.domNode,"scroll",h=>u(t.domNode,!0,!1))),this._register(Xe(o.domNode,"scroll",h=>u(o.domNode,!0,!1))),this._register(Xe(this.scrollbarDomNode.domNode,"scroll",h=>u(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){let e=this._context.configuration.options,t=e.get(143);this.scrollbarDomNode.setLeft(t.contentLeft),e.get(72).side==="right"?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(102)||e.hasChanged(74)||e.hasChanged(40)){let t=this._context.configuration.options,n=t.get(102),o=t.get(74),r=t.get(40),s=t.get(105),a={vertical:n.vertical,horizontal:n.horizontal,verticalScrollbarSize:n.verticalScrollbarSize,horizontalScrollbarSize:n.horizontalScrollbarSize,scrollByPage:n.scrollByPage,handleMouseWheel:n.handleMouseWheel,mouseWheelScrollSensitivity:o,fastScrollSensitivity:r,scrollPredominantAxis:s};this.scrollbar.updateOptions(a)}return e.hasChanged(143)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+NI(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}});var YXe=P(()=>{});var _b,Y1e,Z1e,sx,Bq,X1e,Q1e,J1e,Vq=P(()=>{_a();Vi();YXe();pv();rd();Mi();Kt();Ca();_b=class{constructor(e,t,n,o,r){this.startLineNumber=e,this.endLineNumber=t,this.className=n,this.tooltip=o,this._decorationToRenderBrand=void 0,this.zIndex=r??0}},Y1e=class{constructor(e,t,n){this.className=e,this.zIndex=t,this.tooltip=n}},Z1e=class{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}},sx=class extends pu{_render(e,t,n){let o=[];for(let a=e;a<=t;a++){let l=a-e;o[l]=new Z1e}if(n.length===0)return o;n.sort((a,l)=>a.className===l.className?a.startLineNumber===l.startLineNumber?a.endLineNumber-l.endLineNumber:a.startLineNumber-l.startLineNumber:a.classNameo)continue;let c=Math.max(a,n),d=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ke(c,0)),u=this._context.viewModel.glyphLanes.getLanesAtLine(d.lineNumber).indexOf(r.preference.lane);t.push(new Q1e(c,u,r.preference.zIndex,r))}}_collectSortedGlyphRenderRequests(e){let t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort((n,o)=>n.lineNumber===o.lineNumber?n.laneIndex===o.laneIndex?n.zIndex===o.zIndex?o.type===n.type?n.type===0&&o.type===0?n.className0;){let o=t.peek();if(!o)break;let r=t.takeWhile(a=>a.lineNumber===o.lineNumber&&a.laneIndex===o.laneIndex);if(!r||r.length===0)break;let s=r[0];if(s.type===0){let a=[];for(let l of r){if(l.zIndex!==s.zIndex||l.type!==s.type)break;(a.length===0||a[a.length-1]!==l.className)&&a.push(l.className)}n.push(s.accept(a.join(" ")))}else s.widget.renderInfo={lineNumber:s.lineNumber,laneIndex:s.laneIndex}}this._decorationGlyphsToRender=n}render(e){if(!this._glyphMargin){for(let n of Object.values(this._widgets))n.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){let n=this._managedDomNodes.pop();n?.domNode.remove()}return}let t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(let n of Object.values(this._widgets))if(!n.renderInfo)n.domNode.setDisplay("none");else{let o=e.viewportData.relativeVerticalOffset[n.renderInfo.lineNumber-e.viewportData.startLineNumber],r=this._glyphMarginLeft+n.renderInfo.laneIndex*this._lineHeight;n.domNode.setDisplay("block"),n.domNode.setTop(o),n.domNode.setLeft(r),n.domNode.setWidth(t),n.domNode.setHeight(this._lineHeight)}for(let n=0;nthis._decorationGlyphsToRender.length;){let n=this._managedDomNodes.pop();n?.domNode.remove()}}},X1e=class{constructor(e,t,n,o){this.lineNumber=e,this.laneIndex=t,this.zIndex=n,this.className=o,this.type=0}accept(e){return new J1e(this.lineNumber,this.laneIndex,e)}},Q1e=class{constructor(e,t,n,o){this.lineNumber=e,this.laneIndex=t,this.zIndex=n,this.widget=o,this.type=1}},J1e=class{constructor(e,t,n){this.lineNumber=e,this.laneIndex=t,this.combinedClassName=n}}});var ZXe=P(()=>{});var ax,epe=P(()=>{nt();ax=class extends ue{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}});function bb(i,e){let t=0,n=0,o=i.length;for(;n{});var g4,_p,v4,Uq=P(()=>{(function(i){i[i.Disabled=0]="Disabled",i[i.EnabledForActive=1]="EnabledForActive",i[i.Enabled=2]="Enabled"})(g4||(g4={}));_p=class{constructor(e,t,n,o,r,s){if(this.visibleColumn=e,this.column=t,this.className=n,this.horizontalLine=o,this.forWrappedLinesAfterColumn=r,this.forWrappedLinesBeforeOrAtColumn=s,e!==-1==(t!==-1))throw new Error}},v4=class{constructor(e,t){this.top=e,this.endColumn=t}}});var $q,WI,tpe=P(()=>{rh();Ri();mp();Kt();epe();Wq();Uq();Pi();$q=class extends ax{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return bb(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,n){this.assertNotDisposed();let o=this.textModel.getLineCount();if(e<1||e>o)throw new fo("Illegal value for lineNumber");let r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=!!(r&&r.offSide),a=-2,l=-1,c=-2,d=-1,u=x=>{if(a!==-1&&(a===-2||a>x-1)){a=-1,l=-1;for(let k=x-2;k>=0;k--){let D=this._computeIndentLevel(k);if(D>=0){a=k,l=D;break}}}if(c===-2){c=-1,d=-1;for(let k=x;k=0){c=k,d=D;break}}}},h=-2,f=-1,p=-2,m=-1,y=x=>{if(h===-2){h=-1,f=-1;for(let k=x-2;k>=0;k--){let D=this._computeIndentLevel(k);if(D>=0){h=k,f=D;break}}}if(p!==-1&&(p===-2||p=0){p=k,m=D;break}}}},_=0,v=!0,b=0,C=!0,w=0,S=0;for(let x=0;v||C;x++){let k=e-x,D=e+x;x>1&&(k<1||k1&&(D>o||D>n)&&(C=!1),x>5e4&&(v=!1,C=!1);let E=-1;if(v&&k>=1){let T=this._computeIndentLevel(k-1);T>=0?(c=k-1,d=T,E=Math.ceil(T/this.textModel.getOptions().indentSize)):(u(k),E=this._getIndentLevelForWhitespaceLine(s,l,d))}let A=-1;if(C&&D<=o){let T=this._computeIndentLevel(D-1);T>=0?(h=D-1,f=T,A=Math.ceil(T/this.textModel.getOptions().indentSize)):(y(D),A=this._getIndentLevelForWhitespaceLine(s,f,m))}if(x===0){S=E;continue}if(x===1){if(D<=o&&A>=0&&S+1===A){v=!1,_=D,b=D,w=A;continue}if(k>=1&&E>=0&&E-1===S){C=!1,_=k,b=k,w=E;continue}if(_=e,b=e,w=S,w===0)return{startLineNumber:_,endLineNumber:b,indent:w}}v&&(E>=w?_=k:v=!1),C&&(A>=w?b=D:C=!1)}return{startLineNumber:_,endLineNumber:b,indent:w}}getLinesBracketGuides(e,t,n,o){var r;let s=[];for(let h=e;h<=t;h++)s.push([]);let a=!0,l=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new O(e,1,t,this.textModel.getLineMaxColumn(t))).toArray(),c;if(n&&l.length>0){let h=(e<=n.lineNumber&&n.lineNumber<=t?l:this.textModel.bracketPairs.getBracketPairsInRange(O.fromPositions(n)).toArray()).filter(f=>O.strictContainsPosition(f.range,n));c=(r=o4(h,f=>a||f.range.startLineNumber!==f.range.endLineNumber))===null||r===void 0?void 0:r.range}let d=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,u=new WI;for(let h of l){if(!h.closingBracketRange)continue;let f=c&&h.range.equalsRange(c);if(!f&&!o.includeInactive)continue;let p=u.getInlineClassName(h.nestingLevel,h.nestingLevelOfEqualBracketType,d)+(o.highlightActive&&f?" "+u.activeClassName:""),m=h.openingBracketRange.getStartPosition(),y=h.closingBracketRange.getStartPosition(),_=o.horizontalGuides===g4.Enabled||o.horizontalGuides===g4.EnabledForActive&&f;if(h.range.startLineNumber===h.range.endLineNumber){a&&_&&s[h.range.startLineNumber-e].push(new _p(-1,h.openingBracketRange.getEndPosition().column,p,new v4(!1,y.column),-1,-1));continue}let v=this.getVisibleColumnFromPosition(y),b=this.getVisibleColumnFromPosition(h.openingBracketRange.getStartPosition()),C=Math.min(b,v,h.minVisibleColumnIndentation+1),w=!1;qr(this.textModel.getLineContent(h.closingBracketRange.startLineNumber))=e&&b>C&&s[m.lineNumber-e].push(new _p(C,-1,p,new v4(!1,m.column),-1,-1)),y.lineNumber<=t&&v>C&&s[y.lineNumber-e].push(new _p(C,-1,p,new v4(!w,y.column),-1,-1)))}for(let h of s)h.sort((f,p)=>f.visibleColumn-p.visibleColumn);return s}getVisibleColumnFromPosition(e){return mr.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();let n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");let o=this.textModel.getOptions(),r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=!!(r&&r.offSide),a=new Array(t-e+1),l=-2,c=-1,d=-2,u=-1;for(let h=e;h<=t;h++){let f=h-e,p=this._computeIndentLevel(h-1);if(p>=0){l=h-1,c=p,a[f]=Math.ceil(p/o.indentSize);continue}if(l===-2){l=-1,c=-1;for(let m=h-2;m>=0;m--){let y=this._computeIndentLevel(m);if(y>=0){l=m,c=y;break}}}if(d!==-1&&(d===-2||d=0){d=m,u=y;break}}}a[f]=this._getIndentLevelForWhitespaceLine(s,c,u)}return a}_getIndentLevelForWhitespaceLine(e,t,n){let o=this.textModel.getOptions();return t===-1||n===-1?0:t{ZXe();pv();r1();No();Mi();Vi();ho();tpe();Uq();jq=class extends pu{constructor(e){super(),this._context=e,this._primaryPosition=null;let t=this._context.configuration.options,n=t.get(144),o=t.get(50);this._lineHeight=t.get(66),this._spaceWidth=o.spaceWidth,this._maxIndentLeft=n.wrappingColumn===-1?-1:n.wrappingColumn*o.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(144),o=t.get(50);return this._lineHeight=t.get(66),this._spaceWidth=o.spaceWidth,this._maxIndentLeft=n.wrappingColumn===-1?-1:n.wrappingColumn*o.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),!0}onCursorStateChanged(e){var t;let o=e.selections[0].getPosition();return!((t=this._primaryPosition)===null||t===void 0)&&t.equals(o)?!1:(this._primaryPosition=o,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){var t,n,o,r;if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}let s=e.visibleRange.startLineNumber,a=e.visibleRange.endLineNumber,l=e.scrollWidth,c=this._lineHeight,d=this._primaryPosition,u=this.getGuidesByLine(s,Math.min(a+1,this._context.viewModel.getLineCount()),d),h=[];for(let f=s;f<=a;f++){let p=f-s,m=u[p],y="",_=(n=(t=e.visibleRangeForPosition(new ke(f,1)))===null||t===void 0?void 0:t.left)!==null&&n!==void 0?n:0;for(let v of m){let b=v.column===-1?_+(v.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new ke(f,v.column)).left;if(b>l||this._maxIndentLeft>0&&b>this._maxIndentLeft)break;let C=v.horizontalLine?v.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",w=v.horizontalLine?((r=(o=e.visibleRangeForPosition(new ke(f,v.horizontalLine.endColumn)))===null||o===void 0?void 0:o.left)!==null&&r!==void 0?r:b+this._spaceWidth)-b:this._spaceWidth;y+=`
`}h[p]=y}this._renderResult=h}getGuidesByLine(e,t,n){let o=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,n,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?g4.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?g4.EnabledForActive:g4.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,r=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null,s=0,a=0,l=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&n){let u=this._context.viewModel.getActiveIndentGuide(n.lineNumber,e,t);s=u.startLineNumber,a=u.endLineNumber,l=u.indent}let{indentSize:c}=this._context.viewModel.model.getOptions(),d=[];for(let u=e;u<=t;u++){let h=new Array;d.push(h);let f=o?o[u-e]:[],p=new qc(f),m=r?r[u-e]:0;for(let y=1;y<=m;y++){let _=(y-1)*c+1,v=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||f.length===0)&&s<=u&&u<=a&&y===l;h.push(...p.takeWhile(C=>C.visibleColumn<_)||[]);let b=p.peek();(!b||b.visibleColumn!==_||b.horizontalLine)&&h.push(new _p(_,-1,`core-guide-indent lvl-${(y-1)%30}`+(v?" indent-active":""),null,-1,-1))}h.push(...p.takeWhile(y=>!0)||[])}return d}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};Qs((i,e)=>{let t=[{bracketColor:iq,guideColor:gXe,guideColorActive:wXe},{bracketColor:nq,guideColor:vXe,guideColorActive:xXe},{bracketColor:oq,guideColor:_Xe,guideColorActive:SXe},{bracketColor:rq,guideColor:bXe,guideColorActive:kXe},{bracketColor:sq,guideColor:yXe,guideColorActive:LXe},{bracketColor:aq,guideColor:CXe,guideColorActive:EXe}],n=new WI,o=[{indentColor:ob,indentColorActive:rb},{indentColor:QZe,indentColorActive:nXe},{indentColor:JZe,indentColorActive:oXe},{indentColor:eXe,indentColorActive:rXe},{indentColor:tXe,indentColorActive:sXe},{indentColor:iXe,indentColorActive:aXe}],r=t.map(a=>{var l,c;let d=i.getColor(a.bracketColor),u=i.getColor(a.guideColor),h=i.getColor(a.guideColorActive),f=lx((l=lx(u))!==null&&l!==void 0?l:d?.transparent(.3)),p=lx((c=lx(h))!==null&&c!==void 0?c:d);if(!(!f||!p))return{guideColor:f,guideColorActive:p}}).filter(om),s=o.map(a=>{let l=i.getColor(a.indentColor),c=i.getColor(a.indentColorActive),d=lx(l),u=lx(c);if(!(!d||!u))return{indentColor:d,indentColorActive:u}}).filter(om);if(r.length>0){for(let a=0;a<30;a++){let l=r[a%r.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(a).replace(/ /g,".")} { --guide-color: ${l.guideColor}; --guide-color-active: ${l.guideColorActive}; }`)}e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),e.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(s.length>0){for(let a=0;a<30;a++){let l=s[a%s.length];e.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${a} { --indent-color: ${l.indentColor}; --indent-color-active: ${l.indentColorActive}; }`)}e.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),e.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}})});var QXe=P(()=>{});var cx,JXe=P(()=>{cx=class{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;let e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}});var ipe,npe,ope,UI,eQe=P(()=>{lq();Qi();Mn();QXe();Vf();Kw();Dq();rd();JXe();Mj();Mi();Kt();ipe=class{constructor(){this._currentVisibleRange=new O(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}},npe=class{constructor(e,t,n,o,r,s,a){this.minimalReveal=e,this.lineNumber=t,this.startColumn=n,this.endColumn=o,this.startScrollTop=r,this.stopScrollTop=s,this.scrollType=a,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}},ope=class{constructor(e,t,n,o,r){this.minimalReveal=e,this.selections=t,this.startScrollTop=n,this.stopScrollTop=o,this.scrollType=r,this.type="selections";let s=t[0].startLineNumber,a=t[0].endLineNumber;for(let l=1,c=t.length;l{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new hn(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new ipe,this._horizontalRevealRequest=null,this._stickyScrollEnabled=o.get(114).enabled,this._maxNumberStickyLines=o.get(114).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new pp(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(144)&&(this._maxLineWidth=0);let t=this._context.configuration.options,n=t.get(50),o=t.get(144);return this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=o.isViewportWrapping,this._revealHorizontalRightPadding=t.get(99),this._cursorSurroundingLines=t.get(29),this._cursorSurroundingLinesStyle=t.get(30),this._canUseLayerHinting=!t.get(32),this._stickyScrollEnabled=t.get(114).enabled,this._maxNumberStickyLines=t.get(114).maxLineCount,Gr(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(143)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){let e=this._context.configuration,t=new LI(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;let n=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();for(let r=n;r<=o;r++)this._visibleLines.getVisibleLine(r).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){let t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),o=!1;for(let r=t;r<=n;r++)o=this._visibleLines.getVisibleLine(r).onSelectionChanged()||o;return o}onDecorationsChanged(e){{let t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let o=t;o<=n;o++)this._visibleLines.getVisibleLine(o).onDecorationsChanged()}return!0}onFlushed(e){let t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){let t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(t===-1)return!1;let n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new npe(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new ope(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;let r=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(n,r),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){let t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){let n=this._getViewLineDomNode(e);if(n===null)return null;let o=this._getLineNumberFor(n);if(o===-1||o<1||o>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(o)===1)return new ke(o,1);let r=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(os)return null;let a=this._visibleLines.getVisibleLine(o).getColumnOfNodeOffset(e,t),l=this._context.viewModel.getLineMinColumn(o);return an)return-1;let o=new cx(this.domNode.domNode,this._textRangeRestingSpot),r=this._visibleLines.getVisibleLine(e).getWidth(o);return this._updateLineWidthsSlowIfDomDidLayout(o),r}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;let n=e.endLineNumber,o=O.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!o)return null;let r=[],s=0,a=new cx(this.domNode.domNode,this._textRangeRestingSpot),l=0;t&&(l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ke(o.startLineNumber,1)).lineNumber);let c=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let u=o.startLineNumber;u<=o.endLineNumber;u++){if(ud)continue;let h=u===o.startLineNumber?o.startColumn:1,f=u!==o.endLineNumber,p=f?this._context.viewModel.getLineMaxColumn(u):o.endColumn,m=this._visibleLines.getVisibleLine(u).getVisibleRangesForRange(u,h,p,a);if(m){if(t&&uthis._visibleLines.getEndLineNumber())return null;let o=new cx(this.domNode.domNode,this._textRangeRestingSpot),r=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,n,o);return this._updateLineWidthsSlowIfDomDidLayout(o),r}visibleRangeForPosition(e){let t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new Dj(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){let t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),o=1,r=!0;for(let s=t;s<=n;s++){let a=this._visibleLines.getVisibleLine(s);if(e&&!a.getWidthIsFast()){r=!1;continue}o=Math.max(o,a.getWidth(null))}return r&&t===1&&n===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(o),r}_checkMonospaceFontAssumptions(){let e=-1,t=-1,n=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();for(let r=n;r<=o;r++){let s=this._visibleLines.getVisibleLine(r);if(s.needsMonospaceFontCheck()){let a=s.getWidth(null);a>t&&(t=a,e=r)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let r=n;r<=o;r++)this._visibleLines.getVisibleLine(r).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){let n=this._horizontalRevealRequest;if(e.startLineNumber<=n.minLineNumber&&n.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();let o=this._computeScrollLeftToReveal(n);o&&(this._isViewportWrapping||this._ensureMaxLineWidth(o.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:o.scrollLeft},n.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),Ar&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){let n=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();for(let r=n;r<=o;r++)if(this._visibleLines.getVisibleLine(r).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");let t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){let t=Math.ceil(e);this._maxLineWidth0){let _=r[0].startLineNumber,v=r[0].endLineNumber;for(let b=1,C=r.length;bl){if(!d)return-1;y=u}else if(s===5||s===6)if(s===6&&a<=u&&h<=c)y=a;else{let _=Math.max(5*this._lineHeight,l*.2),v=u-_,b=h-l;y=Math.max(b,v)}else if(s===1||s===2)if(s===2&&a<=u&&h<=c)y=a;else{let _=(u+h)/2;y=Math.max(0,_-l/2)}else y=this._computeMinimumScrolling(a,c,u,h,s===3,s===4);return y}_computeScrollLeftToReveal(e){let t=this._context.viewLayout.getCurrentViewport(),n=this._context.configuration.options.get(143),o=t.left,r=o+t.width-n.verticalScrollbarWidth,s=1073741824,a=0;if(e.type==="range"){let c=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!c)return null;for(let d of c.ranges)s=Math.min(s,Math.round(d.left)),a=Math.max(a,Math.round(d.left+d.width))}else for(let c of e.selections){if(c.startLineNumber!==c.endLineNumber)return null;let d=this._visibleRangesForLineRange(c.startLineNumber,c.startColumn,c.endColumn);if(!d)return null;for(let u of d.ranges)s=Math.min(s,Math.round(u.left)),a=Math.max(a,Math.round(u.left+u.width))}return e.minimalReveal||(s=Math.max(0,s-i.HORIZONTAL_EXTRA_PX),a+=this._revealHorizontalRightPadding),e.type==="selections"&&a-s>t.width?null:{scrollLeft:this._computeMinimumScrolling(o,r,s,a),maxHorizontalOffset:a}}_computeMinimumScrolling(e,t,n,o,r,s){e=e|0,t=t|0,n=n|0,o=o|0,r=!!r,s=!!s;let a=t-e;if(o-nt)return Math.max(0,o-a)}else return n;return e}};UI.HORIZONTAL_EXTRA_PX=30});var tQe=P(()=>{});var qq,iQe=P(()=>{tQe();Vq();qq=class extends sx{constructor(e){super(),this._context=e;let n=this._context.configuration.options.get(143);this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let n=this._context.configuration.options.get(143);return this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){var t,n;let o=e.getDecorationsInViewport(),r=[],s=0;for(let a=0,l=o.length;a',l=[];for(let c=t;c<=n;c++){let d=c-t,u=o[d].getDecorations(),h="";for(let f of u){let p='
{});var Gq,oQe=P(()=>{nQe();Vq();Gq=class extends sx{constructor(e){super(),this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){let t=e.getDecorationsInViewport(),n=[],o=0;for(let r=0,s=t.length;r
';r[a]=c}this._renderResult=r}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}});var rQe=P(()=>{});var bp,rpe=P(()=>{bp=class i{constructor(e,t,n,o){this._rgba8Brand=void 0,this.r=i._clamp(e),this.g=i._clamp(t),this.b=i._clamp(n),this.a=i._clamp(o)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:e|0}};bp.Empty=new bp(0,0,0,0)});var yb,spe=P(()=>{Xt();nt();rpe();Pr();yb=class i extends ue{static getInstance(){return this._INSTANCE||(this._INSTANCE=l5(new i)),this._INSTANCE}constructor(){super(),this._onDidChange=new ge,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Eo.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){let e=Eo.getColorMap();if(!e){this._colors=[bp.Empty],this._backgroundIsLight=!0;return}this._colors=[bp.Empty];for(let n=1;n=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}};yb._INSTANCE=null});var sQe,aQe,ape=P(()=>{sQe=(()=>{let i=[];for(let e=32;e<=126;e++)i.push(e);return i.push(65533),i})(),aQe=(i,e)=>(i-=32,i<0||i>96?e<=2?(i+96)%96:95:i)});var $I,lQe=P(()=>{ape();XT();$I=class i{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=i.soften(e,12/15),this.charDataLight=i.soften(e,50/60)}static soften(e,t){let n=new Uint8ClampedArray(e.length);for(let o=0,r=e.length;oe.width||n+p>e.height){console.warn("bad render request outside image data");return}let m=d?this.charDataLight:this.charDataNormal,y=aQe(o,c),_=e.width*4,v=a.r,b=a.g,C=a.b,w=r.r-v,S=r.g-b,x=r.b-C,k=Math.max(s,l),D=e.data,E=y*h*f,A=n*_+t*4;for(let T=0;Te.width||n+u>e.height){console.warn("bad render request outside image data");return}let h=e.width*4,f=.5*(r/255),p=s.r,m=s.g,y=s.b,_=o.r-p,v=o.g-m,b=o.b-y,C=p+_*f,w=m+v*f,S=y+b*f,x=Math.max(r,a),k=e.data,D=n*h+t*4;for(let E=0;E{S3();cQe={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},dQe=i=>{let e=new Uint8ClampedArray(i.length/2);for(let t=0;t>1]=cQe[i[t]]<<4|cQe[i[t+1]]&15;return e},lpe={1:Gu(()=>dQe("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:Gu(()=>dQe("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))}});var Kq,hQe=P(()=>{lQe();ape();uQe();XT();Kq=class i{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let n;return lpe[e]?n=new $I(lpe[e](),e):n=i.createFromSampleData(i.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=n,n}static createSampleData(e){let t=document.createElement("canvas"),n=t.getContext("2d");t.style.height="16px",t.height=16,t.width=96*10,t.style.width=96*10+"px",n.fillStyle="#ffffff",n.font=`bold 16px ${e}`,n.textBaseline="middle";let o=0;for(let r of sQe)n.fillText(String.fromCharCode(r),o,16/2),o+=10;return n.getImageData(0,0,96*10,16)}static createFromSampleData(e,t){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");let o=i._downsample(e,t);return new $I(o,t)}static _downsampleChar(e,t,n,o,r){let s=1*r,a=2*r,l=o,c=0;for(let d=0;d0){let c=255/l;for(let d=0;d{rQe();Qt();_a();Lw();nt();Mn();Ri();Dq();rd();Ks();Kt();rpe();spe();ap();pr();zo();dh();hQe();Ca();S3();kTt=140,LTt=2,Yq=class i{constructor(e,t,n){let o=e.options,r=o.get(141),s=o.get(143),a=s.minimap,l=o.get(50),c=o.get(72);this.renderMinimap=a.renderMinimap,this.size=c.size,this.minimapHeightIsEditorHeight=a.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=o.get(104),this.paddingTop=o.get(83).top,this.paddingBottom=o.get(83).bottom,this.showSlider=c.showSlider,this.autohide=c.autohide,this.pixelRatio=r,this.typicalHalfwidthCharacterWidth=l.typicalHalfwidthCharacterWidth,this.lineHeight=o.get(66),this.minimapLeft=a.minimapLeft,this.minimapWidth=a.minimapWidth,this.minimapHeight=s.height,this.canvasInnerWidth=a.minimapCanvasInnerWidth,this.canvasInnerHeight=a.minimapCanvasInnerHeight,this.canvasOuterWidth=a.minimapCanvasOuterWidth,this.canvasOuterHeight=a.minimapCanvasOuterHeight,this.isSampling=a.minimapIsSampling,this.editorHeight=s.height,this.fontScale=a.minimapScale,this.minimapLineHeight=a.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=Gu(()=>Kq.create(this.fontScale,l.fontFamily)),this.defaultBackgroundColor=n.getColor(2),this.backgroundColor=i._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=i._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){let n=e.getColor(DZe);return n?new bp(n.rgba.r,n.rgba.g,n.rgba.b,Math.round(255*n.rgba.a)):t}static _getMinimapForegroundOpacity(e){let t=e.getColor(TZe);return t?bp._clamp(Math.round(255*t.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}},cpe=class i{constructor(e,t,n,o,r,s,a,l,c){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=n,this._computedSliderRatio=o,this.sliderTop=r,this.sliderHeight=s,this.topPaddingLineCount=a,this.startLineNumber=l,this.endLineNumber=c}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){let t=Math.max(this.startLineNumber,e.startLineNumber),n=Math.min(this.endLineNumber,e.endLineNumber);return t>n?null:[t,n]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,n,o,r,s,a,l,c,d,u){let h=e.pixelRatio,f=e.minimapLineHeight,p=Math.floor(e.canvasInnerHeight/f),m=e.lineHeight;if(e.minimapHeightIsEditorHeight){let S=l*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(S+=Math.max(0,r-e.lineHeight-e.paddingBottom));let x=Math.max(1,Math.floor(r*r/S)),k=Math.max(0,e.minimapHeight-x),D=k/(d-r),E=c*D,A=k>0,T=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),L=Math.floor(e.paddingTop/e.lineHeight);return new i(c,d,A,D,E,x,L,1,Math.min(a,T))}let y;if(s&&n!==a){let S=n-t+1;y=Math.floor(S*f/h)}else{let S=r/m;y=Math.floor(S*f/h)}let _=Math.floor(e.paddingTop/m),v=Math.floor(e.paddingBottom/m);if(e.scrollBeyondLastLine){let S=r/m;v=Math.max(v,S-1)}let b;if(v>0){let S=r/m;b=(_+a+v-S-1)*f/h}else b=Math.max(0,(_+a)*f/h-y);b=Math.min(e.minimapHeight-y,b);let C=b/(d-r),w=c*C;if(p>=_+a+v){let S=b>0;return new i(c,d,S,C,w,y,_,1,a)}else{let S;t>1?S=t+_:S=Math.max(1,c/m);let x,k=Math.max(1,Math.floor(S-w*h/f));k<_?(x=_-k+1,k=1):(x=0,k=Math.max(1,k-_)),u&&u.scrollHeight===d&&(u.scrollTop>c&&(k=Math.min(k,u.startLineNumber),x=Math.max(x,u.topPaddingLineCount)),u.scrollTop=e.paddingTop?A=(t-k+x+E)*f/h:A=c/e.paddingTop*(x+E)*f/h,new i(c,d,!0,C,A,y,x,k,D)}}},dx=class{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}};dx.INVALID=new dx(-1);Zq=class{constructor(e,t,n){this.renderedLayout=e,this._imageData=t,this._renderedLines=new BI(()=>dx.INVALID),this._renderedLines._set(e.startLineNumber,n)}linesEquals(e){if(!this.scrollEquals(e))return!1;let n=this._renderedLines._get().lines;for(let o=0,r=n.length;o1){for(let _=0,v=o-1;_0&&this.minimapLines[n-1]>=e;)n--;let o=this.modelLineToMinimapLine(t)-1;for(;o+1t)return null}return[n+1,o+1]}decorationLineRangeToMinimapLineRange(e,t){let n=this.modelLineToMinimapLine(e),o=this.modelLineToMinimapLine(t);return e!==t&&o===n&&(o===this.minimapLines.length?n>1&&n--:o++),[n,o]}onLinesDeleted(e){let t=e.toLineNumber-e.fromLineNumber+1,n=this.minimapLines.length,o=0;for(let r=this.minimapLines.length-1;r>=0&&!(this.minimapLines[r]=0&&!(this.minimapLines[n]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:n,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(o)}_recreateLineSampling(){this._minimapSelections=null;let e=!!this._samplingState,[t,n]=Xq.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(let o of n)switch(o.type){case"deleted":this._actual.onLinesDeleted(o.deleteFromLineNumber,o.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(o.insertFromLineNumber,o.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,n){if(this._samplingState){let o=[];for(let r=0,s=t-e+1;r{if(n.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(n.button===0&&this._lastRenderData){let c=Lo(this._slider.domNode),d=c.top+c.height/2;this._startSliderDragging(n,d,this._lastRenderData.renderedLayout)}return}let r=this._model.options.minimapLineHeight,s=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*n.offsetY,l=Math.floor(s/r)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;l=Math.min(l,this._model.getLineCount()),this._model.revealLineNumber(l)}),this._sliderPointerMoveMonitor=new Jf,this._sliderPointerDownListener=go(this._slider.domNode,Lt.POINTER_DOWN,n=>{n.preventDefault(),n.stopPropagation(),n.button===0&&this._lastRenderData&&this._startSliderDragging(n,n.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=ar.addTarget(this._domNode.domNode),this._sliderTouchStartListener=Xe(this._domNode.domNode,vo.Start,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(n))},{passive:!1}),this._sliderTouchMoveListener=Xe(this._domNode.domNode,vo.Change,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(n)},{passive:!1}),this._sliderTouchEndListener=go(this._domNode.domNode,vo.End,n=>{n.preventDefault(),n.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,n){if(!e.target||!(e.target instanceof Element))return;let o=e.pageX;this._slider.toggleClassName("active",!0);let r=(s,a)=>{let l=Lo(this._domNode.domNode),c=Math.min(Math.abs(a-o),Math.abs(a-l.left),Math.abs(a-l.left-l.width));if(hr&&c>kTt){this._model.setScrollTop(n.scrollTop);return}let d=s-t;this._model.setScrollTop(n.getDesiredScrollTopFromDelta(d))};e.pageY!==t&&r(e.pageY,o),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,s=>r(s.pageY,s.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){let t=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(n)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){let e=["minimap"];return this._model.options.showSlider==="always"?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new dpe(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return this._lastRenderData?this._lastRenderData.onLinesChanged(e,t):!1}onLinesDeleted(e,t){var n;return(n=this._lastRenderData)===null||n===void 0||n.onLinesDeleted(e,t),!0}onLinesInserted(e,t){var n;return(n=this._lastRenderData)===null||n===void 0||n.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(c1e),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");let n=cpe.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(n.sliderNeeded?"block":"none"),this._slider.setTop(n.sliderTop),this._slider.setHeight(n.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(n.sliderHeight),this.renderDecorations(n),this._lastRenderData=this.renderLines(n)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;let t=this._model.getSelections();t.sort(O.compareRangesUsingStarts);let n=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);n.sort((h,f)=>(h.options.zIndex||0)-(f.options.zIndex||0));let{canvasInnerWidth:o,canvasInnerHeight:r}=this._model.options,s=this._model.options.minimapLineHeight,a=this._model.options.minimapCharWidth,l=this._model.getOptions().tabSize,c=this._decorationsCanvas.domNode.getContext("2d");c.clearRect(0,0,o,r);let d=new Jq(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(c,t,d,e,s),this._renderDecorationsLineHighlights(c,n,d,e,s);let u=new Jq(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(c,t,u,e,s,l,a,o),this._renderDecorationsHighlights(c,n,u,e,s,l,a,o)}}_renderSelectionLineHighlights(e,t,n,o,r){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let s=0,a=0;for(let l of t){let c=o.intersectWithViewport(l);if(!c)continue;let[d,u]=c;for(let p=d;p<=u;p++)n.set(p,!0);let h=o.getYForLineNumber(d,r),f=o.getYForLineNumber(u,r);a>=h||(a>s&&e.fillRect(W0,s,e.canvas.width,a-s),s=h),a=f}a>s&&e.fillRect(W0,s,e.canvas.width,a-s)}_renderDecorationsLineHighlights(e,t,n,o,r){let s=new Map;for(let a=t.length-1;a>=0;a--){let l=t[a],c=l.options.minimap;if(!c||c.position!==Zl.Inline)continue;let d=o.intersectWithViewport(l.range);if(!d)continue;let[u,h]=d,f=c.getColor(this._theme.value);if(!f||f.isTransparent())continue;let p=s.get(f.toString());p||(p=f.transparent(.5).toString(),s.set(f.toString(),p)),e.fillStyle=p;for(let m=u;m<=h;m++){if(n.has(m))continue;n.set(m,!0);let y=o.getYForLineNumber(u,r);e.fillRect(W0,y,e.canvas.width,r)}}}_renderSelectionsHighlights(e,t,n,o,r,s,a,l){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(let c of t){let d=o.intersectWithViewport(c);if(!d)continue;let[u,h]=d;for(let f=u;f<=h;f++)this.renderDecorationOnLine(e,n,c,this._selectionColor,o,f,r,r,s,a,l)}}_renderDecorationsHighlights(e,t,n,o,r,s,a,l){for(let c of t){let d=c.options.minimap;if(!d)continue;let u=o.intersectWithViewport(c.range);if(!u)continue;let[h,f]=u,p=d.getColor(this._theme.value);if(!(!p||p.isTransparent()))for(let m=h;m<=f;m++)switch(d.position){case Zl.Inline:this.renderDecorationOnLine(e,n,c.range,p,o,m,r,r,s,a,l);continue;case Zl.Gutter:{let y=o.getYForLineNumber(m,r);this.renderDecoration(e,p,2,y,LTt,r);continue}}}}renderDecorationOnLine(e,t,n,o,r,s,a,l,c,d,u){let h=r.getYForLineNumber(s,l);if(h+a<0||h>this._model.options.canvasInnerHeight)return;let{startLineNumber:f,endLineNumber:p}=n,m=f===s?n.startColumn:1,y=p===s?n.endColumn:this._model.getLineMaxColumn(s),_=this.getXOffsetForPosition(t,s,m,c,d,u),v=this.getXOffsetForPosition(t,s,y,c,d,u);this.renderDecoration(e,o,_,h,v-_,a)}getXOffsetForPosition(e,t,n,o,r,s){if(n===1)return W0;if((n-1)*r>=s)return s;let l=e.get(t);if(!l){let c=this._model.getLineContent(t);l=[W0];let d=W0;for(let u=1;u=s){l[u]=s;break}l[u]=p,d=p}e.set(t,l)}return n-1w?Math.floor((o-w)/2):0,x=h.a/255,k=new bp(Math.round((h.r-u.r)*x+u.r),Math.round((h.g-u.g)*x+u.g),Math.round((h.b-u.b)*x+u.b),255),D=e.topPaddingLineCount*o,E=[];for(let M=0,N=n-t+1;M=0&&Av)return;let T=y.charCodeAt(w);if(T===9){let L=h-(w+S)%h;S+=L-1,C+=L*s}else if(T===32)C+=s;else{let L=Bf(T)?2:1;for(let I=0;Iv)return}}}}},Jq=class{constructor(e,t,n){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=n,this._values=[];for(let o=0,r=this._endLineNumber-this._startLineNumber+1;othis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}});var pQe=P(()=>{});var eG,mQe=P(()=>{pQe();_a();rd();Qt();eG=class extends Yr{constructor(e,t){super(e),this._viewDomNode=t;let o=this._context.configuration.options.get(143);this._widgets={},this._verticalScrollbarWidth=o.verticalScrollbarWidth,this._minimapWidth=o.minimap.minimapWidth,this._horizontalScrollbarHeight=o.horizontalScrollbarHeight,this._editorHeight=o.height,this._editorWidth=o.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=vn(document.createElement("div")),El.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=vn(document.createElement("div")),El.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){let n=this._context.configuration.options.get(143);return this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimap.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,!0}addWidget(e){let t=vn(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),e.allowEditorOverflow?this.overflowingOverlayWidgetsDomNode.appendChild(t):this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){let n=this._widgets[e.getId()];return n.preference===t?(this._updateMaxMinWidth(),!1):(n.preference=t,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){let t=e.getId();if(this._widgets.hasOwnProperty(t)){let o=this._widgets[t].domNode.domNode;delete this._widgets[t],o.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var e,t;let n=0,o=Object.keys(this._widgets);for(let r=0,s=o.length;r{_a();sa();rd();Mi();Pr();r1();ap();Vi();hpe=class{constructor(e,t){let n=e.options;this.lineHeight=n.get(66),this.pixelRatio=n.get(141),this.overviewRulerLanes=n.get(82),this.renderBorder=n.get(81);let o=t.getColor(cXe);this.borderColor=o?o.toString():null,this.hideCursor=n.get(59);let r=t.getColor(eq);this.cursorColor=r?r.transparent(.7).toString():null,this.themeType=t.type;let s=n.get(72),a=s.enabled,l=s.side,c=t.getColor(dXe),d=Eo.getDefaultBackground();c?this.backgroundColor=c:a&&l==="right"?this.backgroundColor=d:this.backgroundColor=null;let h=n.get(143).overviewRuler;this.top=h.top,this.right=h.right,this.domWidth=h.width,this.domHeight=h.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);let[f,p]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=f,this.w=p}_initLanes(e,t,n){let o=t-e;if(n>=3){let r=Math.floor(o/3),s=Math.floor(o/3),a=o-r-s,l=e,c=l+r,d=l+r+a;return[[0,l,c,l,d,l,c,l],[0,r,a,r+a,s,r+a+s,a+s,r+a+s]]}else if(n===2){let r=Math.floor(o/2),s=o-r,a=e,l=a+r;return[[0,a,a,a,l,a,a,a],[0,r,r,r,s,r+s,r+s,r+s]]}else{let r=e,s=o;return[[0,r,r,r,r,r,r,r],[0,s,s,s,s,s,s,s]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&it.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}},tG=class extends Yr{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=vn(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Eo.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){let t=new hpe(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(t)?!1:(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,n=e.selections.length;tp.lineNumber===m.lineNumber)&&(this._actualShouldRender=2),this._actualShouldRender===1)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");let n=this._settings.canvasWidth,o=this._settings.canvasHeight,r=this._settings.lineHeight,s=this._context.viewLayout,a=this._context.viewLayout.getScrollHeight(),l=o/a,c=6*this._settings.pixelRatio|0,d=c/2|0,u=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(u.fillStyle=it.Format.CSS.formatHexA(e),u.fillRect(0,0,n,o)):(u.clearRect(0,0,n,o),u.fillStyle=it.Format.CSS.formatHexA(e),u.fillRect(0,0,n,o)):u.clearRect(0,0,n,o);let h=this._settings.x,f=this._settings.w;for(let p of t){let m=p.color,y=p.data;u.fillStyle=m;let _=0,v=0,b=0;for(let C=0,w=y.length/3;Co&&(T=o-d),D=T-d,E=T+d}D>b+1||S!==_?(C!==0&&u.fillRect(h[_],v,f[_],b-v),_=S,v=D,b=E):E>b&&(b=E)}u.fillRect(h[_],v,f[_],b-v)}if(!this._settings.hideCursor&&this._settings.cursorColor){let p=2*this._settings.pixelRatio|0,m=p/2|0,y=this._settings.x[7],_=this._settings.w[7];u.fillStyle=this._settings.cursorColor;let v=-100,b=-100;for(let C=0,w=this._cursorPositions.length;Co&&(x=o-m);let k=x-m,D=k+p;k>b+1?(C!==0&&u.fillRect(y,v,_,b-v),v=k,b=D):D>b&&(b=D)}u.fillRect(y,v,_,b-v)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(u.beginPath(),u.lineWidth=1,u.strokeStyle=this._settings.borderColor,u.moveTo(0,0),u.lineTo(0,o),u.stroke(),u.moveTo(0,0),u.lineTo(n,0),u.stroke())}}});var iG,jI,nG,fpe=P(()=>{iG=class{constructor(e,t,n){this._colorZoneBrand=void 0,this.from=e|0,this.to=t|0,this.colorId=n|0}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}},jI=class{constructor(e,t,n,o){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=n,this.color=o,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colorn&&(m=n-y);let _=d.color,v=this._color2Id[_];v||(v=++this._lastAssignedId,this._color2Id[_]=v,this._id2Color[v]=_);let b=new iG(m-y,m+y,v);d.setColorZone(b),a.push(b)}return this._colorZonesInvalid=!1,a.sort(iG.compare),a}}});var oG,vQe=P(()=>{_a();fpe();qw();oG=class extends hp{constructor(e,t){super(),this._context=e;let n=this._context.configuration.options;this._domNode=vn(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new nG(o=>this._context.viewLayout.getVerticalOffsetForLineNumber(o)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(n.get(66)),this._zoneManager.setPixelRatio(n.get(141)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return e.hasChanged(66)&&(this._zoneManager.setLineHeight(t.get(66)),this._render()),e.hasChanged(141)&&(this._zoneManager.setPixelRatio(t.get(141)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;let e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),o=this._zoneManager.getId2Color(),r=this._domNode.domNode.getContext("2d");return r.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(r,n,o,e),!0}_renderOneLane(e,t,n,o){let r=0,s=0,a=0;for(let l of t){let c=l.colorId,d=l.from,u=l.to;c!==r?(e.fillRect(0,s,o,a-s),r=c,e.fillStyle=n[r],s=d,a=u):a>=d?a=Math.max(a,u):(e.fillRect(0,s,o,a-s),s=d,a=u)}e.fillRect(0,s,o,a-s)}}});var _Qe=P(()=>{});var rG,bQe=P(()=>{_Qe();_a();rd();rG=class extends Yr{constructor(e){super(e),this.domNode=vn(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];let t=this._context.configuration.options;this._rulers=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._rulers=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){let e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){let a=vn(document.createElement("div"));a.setClassName("view-ruler"),a.setWidth(r),this.domNode.appendChild(a),this._renderedRulers.push(a),s--}return}let n=e-t;for(;n>0;){let o=this._renderedRulers.pop();this.domNode.removeChild(o),n--}}render(e){this._ensureRulersCount();for(let t=0,n=this._rulers.length;t{});var sG,CQe=P(()=>{yQe();_a();rd();sG=class extends Yr{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;let n=this._context.configuration.options.get(102);this._useShadows=n.useShadows,this._domNode=vn(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){let e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){let t=this._context.configuration.options.get(143);t.minimap.renderMinimap===0||t.minimap.minimapWidth>0&&t.minimap.minimapLeft===0?this._width=t.width:this._width=t.width-t.verticalScrollbarWidth}onConfigurationChanged(e){let n=this._context.configuration.options.get(102);return this._useShadows=n.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}});var wQe=P(()=>{});function ETt(i){return new ppe(i)}function DTt(i){return new mpe(i.lineNumber,i.ranges.map(ETt))}function aG(i){return i<0?-i:i}var ppe,mpe,Dm,xQe=P(()=>{wQe();pv();pr();No();ppe=class{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}},mpe=class{constructor(e,t){this.lineNumber=e,this.ranges=t}};Dm=class i extends pu{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;let t=this._context.configuration.options;this._lineHeight=t.get(66),this._roundedSelection=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._lineHeight=t.get(66),this._roundedSelection=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,n=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,n){let o=this._typicalHalfwidthCharacterWidth/4,r=null,s=null;if(n&&n.length>0&&t.length>0){let a=t[0].lineNumber;if(a===e.startLineNumber)for(let c=0;!r&&c=0;c--)n[c].lineNumber===l&&(s=n[c].ranges[0]);r&&!r.startStyle&&(r=null),s&&!s.startStyle&&(s=null)}for(let a=0,l=t.length;a0){let p=t[a-1].ranges[0].left,m=t[a-1].ranges[0].left+t[a-1].ranges[0].width;aG(d-p)p&&(h.top=1),aG(u-m)'}_actualRenderOneSelection(e,t,n,o){if(o.length===0)return;let r=!!o[0].ranges[0].startStyle,s=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),l=o[0].lineNumber,c=o[o.length-1].lineNumber;for(let d=0,u=o.length;d1,c)}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t.map(([s,a])=>s+a)}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};Dm.SELECTION_CLASS_NAME="selected-text";Dm.SELECTION_TOP_LEFT="top-left-radius";Dm.SELECTION_BOTTOM_LEFT="bottom-left-radius";Dm.SELECTION_TOP_RIGHT="top-right-radius";Dm.SELECTION_BOTTOM_RIGHT="bottom-right-radius";Dm.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background";Dm.ROUNDED_PIECE_WIDTH=10;Qs((i,e)=>{let t=i.getColor(AYe);t&&!t.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${t}; }`)})});var SQe=P(()=>{});var lG,qI,kQe=P(()=>{Qt();_a();Ri();Vf();Ks();Mi();Kt();lq();lG=class{constructor(e,t,n,o,r,s,a){this.top=e,this.left=t,this.paddingLeft=n,this.width=o,this.height=r,this.textContent=s,this.textContentClassName=a}},qI=class{constructor(e){this._context=e;let t=this._context.configuration.options,n=t.get(50);this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=vn(document.createElement("div")),this._domNode.setClassName(`cursor ${h4}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),Gr(this._domNode,n),this._domNode.setDisplay("none"),this._position=new ke(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),Gr(this._domNode,n),!0}onCursorPositionChanged(e,t){return t?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=e,!0}_getGraphemeAwarePosition(){let{lineNumber:e,column:t}=this._position,n=this._context.viewModel.getLineContent(e),[o,r]=lqe(n,t-1);return[new ke(e,o+1),n.substring(o,r)]}_prepareRender(e){let t="",n="",[o,r]=this._getGraphemeAwarePosition();if(this._cursorStyle===Na.Line||this._cursorStyle===Na.LineThin){let h=e.visibleRangeForPosition(o);if(!h||h.outsideRenderedLine)return null;let f=pi(this._domNode.domNode),p;this._cursorStyle===Na.Line?(p=xhe(f,this._lineCursorWidth>0?this._lineCursorWidth:2),p>2&&(t=r,n=this._getTokenClassName(o))):p=xhe(f,1);let m=h.left,y=0;p>=2&&m>=1&&(y=1,m-=y);let _=e.getVerticalOffsetForLineNumber(o.lineNumber)-e.bigNumbersDelta;return new lG(_,m,y,p,this._lineHeight,t,n)}let s=e.linesVisibleRangesForRange(new O(o.lineNumber,o.column,o.lineNumber,o.column+r.length),!1);if(!s||s.length===0)return null;let a=s[0];if(a.outsideRenderedLine||a.ranges.length===0)return null;let l=a.ranges[0],c=r===" "?this._typicalHalfwidthCharacterWidth:l.width<1?this._typicalHalfwidthCharacterWidth:l.width;this._cursorStyle===Na.Block&&(t=r,n=this._getTokenClassName(o));let d=e.getVerticalOffsetForLineNumber(o.lineNumber)-e.bigNumbersDelta,u=this._lineHeight;return(this._cursorStyle===Na.Underline||this._cursorStyle===Na.UnderlineThin)&&(d+=this._lineHeight-2,u=2),new lG(d,l.left,0,c,u,t,n)}_getTokenClassName(e){let t=this._context.viewModel.getViewLineData(e.lineNumber),n=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(n)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${h4} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}});var GI,LQe=P(()=>{SQe();_a();Qi();rd();kQe();Ks();r1();No();fp();Qt();GI=class i extends Yr{constructor(e){super(e);let t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new qI(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=vn(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new Zs,this._cursorFlatBlinkInterval=new U3,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){let t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let n=0,o=this._secondaryCursors.length;nt.length){let r=this._secondaryCursors.length-t.length;for(let s=0;s{for(let o=0,r=e.ranges.length;o{this._isVisible?this._hide():this._show()},i.BLINK_INTERVAL,pi(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},i.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case Na.Line:e+=" cursor-line-style";break;case Na.Block:e+=" cursor-block-style";break;case Na.Underline:e+=" cursor-underline-style";break;case Na.LineThin:e+=" cursor-line-thin-style";break;case Na.BlockOutline:e+=" cursor-block-outline-style";break;case Na.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{let t=i.getColor(eq);if(t){let n=i.getColor(ZZe);n||(n=t.opposite()),e.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${t}; border-color: ${t}; color: ${n}; }`),Ac(i.type)&&e.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}})});function TTt(i,e){try{return i(e)}catch(t){hi(t)}}var gpe,cG,EQe=P(()=>{_a();Pi();rd();Mi();gpe=()=>{throw new Error("Invalid change accessor")},cG=class extends Yr{constructor(e){super(e);let t=this._context.configuration.options,n=t.get(143);this._lineHeight=t.get(66),this._contentWidth=n.contentWidth,this._contentLeft=n.contentLeft,this.domNode=vn(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=vn(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){let e=this._context.viewLayout.getWhitespaces(),t=new Map;for(let o of e)t.set(o.id,o);let n=!1;return this._context.viewModel.changeWhitespace(o=>{let r=Object.keys(this._zones);for(let s=0,a=r.length;s{let o={addZone:r=>(t=!0,this._addZone(n,r)),removeZone:r=>{r&&(t=this._removeZone(n,r)||t)},layoutZone:r=>{r&&(t=this._layoutZone(n,r)||t)}};TTt(e,o),o.addZone=gpe,o.removeZone=gpe,o.layoutZone=gpe}),t}_addZone(e,t){let n=this._computeWhitespaceProps(t),r={whitespaceId:e.insertWhitespace(n.afterViewLineNumber,this._getZoneOrdinal(t),n.heightInPx,n.minWidthInPx),delegate:t,isInHiddenArea:n.isInHiddenArea,isVisible:!1,domNode:vn(t.domNode),marginDomNode:t.marginDomNode?vn(t.marginDomNode):null};return this._safeCallOnComputedHeight(r.delegate,n.heightInPx),r.domNode.setPosition("absolute"),r.domNode.domNode.style.width="100%",r.domNode.setDisplay("none"),r.domNode.setAttribute("monaco-view-zone",r.whitespaceId),this.domNode.appendChild(r.domNode),r.marginDomNode&&(r.marginDomNode.setPosition("absolute"),r.marginDomNode.domNode.style.width="100%",r.marginDomNode.setDisplay("none"),r.marginDomNode.setAttribute("monaco-view-zone",r.whitespaceId),this.marginDomNode.appendChild(r.marginDomNode)),this._zones[r.whitespaceId]=r,this.setShouldRender(),r.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){let n=this._zones[t];return delete this._zones[t],e.removeWhitespace(n.whitespaceId),n.domNode.removeAttribute("monaco-visible-view-zone"),n.domNode.removeAttribute("monaco-view-zone"),n.domNode.domNode.parentNode.removeChild(n.domNode.domNode),n.marginDomNode&&(n.marginDomNode.removeAttribute("monaco-visible-view-zone"),n.marginDomNode.removeAttribute("monaco-view-zone"),n.marginDomNode.domNode.parentNode.removeChild(n.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){let n=this._zones[t],o=this._computeWhitespaceProps(n.delegate);return n.isInHiddenArea=o.isInHiddenArea,e.changeOneWhitespace(n.whitespaceId,o.afterViewLineNumber,o.heightInPx),this._safeCallOnComputedHeight(n.delegate,o.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){return this._zones.hasOwnProperty(e)?!!this._zones[e].delegate.suppressMouseDown:!1}_heightInPixels(e){return typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(t)}catch(n){hi(n)}}_safeCallOnDomNodeTop(e,t){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(t)}catch(n){hi(n)}}prepareRender(e){}render(e){let t=e.viewportData.whitespaceViewportData,n={},o=!1;for(let s of t)this._zones[s.id].isInHiddenArea||(n[s.id]=s,o=!0);let r=Object.keys(this._zones);for(let s=0,a=r.length;s{});var dG,uG,TQe=P(()=>{DQe();pv();Ri();av();Mi();r1();dG=class extends pu{constructor(e){super(),this._context=e,this._options=new uG(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=new uG(this._context.configuration);return this._options.equals(t)?e.hasChanged(143):(this._options=t,!0)}onCursorStateChanged(e){return this._selection=e.selections,this._options.renderWhitespace==="selection"}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}prepareRender(e){if(this._options.renderWhitespace==="none"){this._renderResult=null;return}let t=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber-t+1,r=new Array(o);for(let a=0;aa)continue;let f=h.startLineNumber===a?h.startColumn:c.minColumn,p=h.endLineNumber===a?h.endColumn:c.maxColumn;f=E.endOffset&&(D++,E=n&&n[D]),L!==9&&L!==32||h&&!S&&T<=k)continue;if(u&&T>=x&&T<=k&&L===32){let M=T-1>=0?a.charCodeAt(T-1):0,N=T+1=0?a.charCodeAt(T-1):0;if(L===32&&M!==32&&M!==9)continue}if(n&&(!E||E.startOffset>T||E.endOffset<=T))continue;let I=e.visibleRangeForPosition(new ke(t,T+1));I&&(s?(A=Math.max(A,I.left),L===9?w+=this._renderArrow(f,y,I.left):w+=``):L===9?w+=`
${C?"\uFFEB":"\u2192"}
`:w+=`
${String.fromCharCode(b)}
`)}return s?(A=Math.round(A+y),``+w+""):w}_renderArrow(e,t,n){let o=t/7,r=t,s=e/2,a=n,l={x:0,y:o/2},c={x:100/125*r,y:l.y},d={x:c.x-.2*c.x,y:c.y+.2*c.x},u={x:d.x+.1*c.x,y:d.y+.1*c.x},h={x:u.x+.35*c.x,y:u.y-.35*c.x},f={x:h.x,y:-h.y},p={x:u.x,y:-u.y},m={x:d.x,y:-d.y},y={x:c.x,y:-c.y},_={x:l.x,y:-l.y};return``}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}},uG=class{constructor(e){let t=e.options,n=t.get(50),o=t.get(38);o==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):o==="svg"?(this.renderWhitespace=t.get(98),this.renderWithSVG=!0):(this.renderWhitespace=t.get(98),this.renderWithSVG=!1),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(66),this.stopRenderingLineAfter=t.get(116)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}});var hG,IQe=P(()=>{Kt();hG=class{constructor(e,t,n,o){this.selections=e,this.startLineNumber=t.startLineNumber|0,this.endLineNumber=t.endLineNumber|0,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=t.bigNumbersDelta|0,this.whitespaceViewportData=n,this._model=o,this.visibleRange=new O(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}});var fG,MQe=P(()=>{fG=class{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}});var pG,NQe=P(()=>{MQe();pG=class{constructor(e,t,n){this.configuration=e,this.theme=new fG(t),this.viewModel=n,this.viewLayout=n.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}});function bv(i){try{return i()}catch(e){return hi(e),null}}var ITt,MTt,mG,KI,AQe=P(()=>{Qt();_a();t1e();Pi();b1e();qZe();MXe();Kw();HXe();BXe();rd();q1e();WXe();UXe();jXe();GXe();KXe();Vq();XXe();P1e();eQe();iQe();O1e();oQe();fQe();mQe();gQe();vQe();bQe();CQe();xQe();LQe();EQe();TQe();Mi();Kt();zo();Ca();qw();IQe();NQe();_i();No();ITt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},MTt=function(i,e){return function(t,n){e(t,n,i)}},mG=class extends hp{constructor(e,t,n,o,r,s,a){super(),this._instantiationService=a,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new jt(1,1,1,1)],this._renderAnimationFrame=null;let l=new Eq(t,o,r,e);this._context=new pG(t,n,o),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(cq,this._context,l,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=vn(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=vn(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=vn(document.createElement("div")),El.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new Hq(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new UI(this._context,this._linesContent),this._viewZones=new cG(this._context),this._viewParts.push(this._viewZones);let c=new tG(this._context);this._viewParts.push(c);let d=new sG(this._context);this._viewParts.push(d);let u=new Iq(this._context);this._viewParts.push(u),u.addDynamicOverlay(new Oq(this._context)),u.addDynamicOverlay(new Dm(this._context)),u.addDynamicOverlay(new jq(this._context)),u.addDynamicOverlay(new Fq(this._context)),u.addDynamicOverlay(new dG(this._context));let h=new Mq(this._context);this._viewParts.push(h),h.addDynamicOverlay(new zq(this._context)),h.addDynamicOverlay(new Gq(this._context)),h.addDynamicOverlay(new qq(this._context)),h.addDynamicOverlay(new sb(this._context)),this._glyphMarginWidgets=new Bq(this._context),this._viewParts.push(this._glyphMarginWidgets);let f=new mv(this._context);f.getDomNode().appendChild(this._viewZones.marginDomNode),f.getDomNode().appendChild(h.getDomNode()),f.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(f),this._contentWidgets=new Aq(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new GI(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new eG(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);let p=new rG(this._context);this._viewParts.push(p);let m=new Nq(this._context);this._viewParts.push(m);let y=new Qq(this._context);if(this._viewParts.push(y),c){let _=this._scrollbar.getOverviewRulerLayoutInfo();_.parent.insertBefore(c.getDomNode(),_.insertBefore)}this._linesContent.appendChild(u.getDomNode()),this._linesContent.appendChild(p.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(f.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(d.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(y.getDomNode()),this._overflowGuardContainer.appendChild(m.domNode),this.domNode.appendChild(this._overflowGuardContainer),s?(s.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),s.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new Kj(this._context,l,this._createPointerHandlerHelper()))}_computeGlyphMarginLanes(){let e=this._context.viewModel.model,t=this._context.viewModel.glyphLanes,n=[],o=0;n=n.concat(e.getAllMarginDecorations().map(r=>{var s,a,l;let c=(a=(s=r.options.glyphMargin)===null||s===void 0?void 0:s.position)!==null&&a!==void 0?a:lu.Center;return o=Math.max(o,r.range.endLineNumber),{range:r.range,lane:c,persist:(l=r.options.glyphMargin)===null||l===void 0?void 0:l.persistLane}})),n=n.concat(this._glyphMarginWidgets.getWidgets().map(r=>{let s=e.validateRange(r.preference.range);return o=Math.max(o,s.endLineNumber),{range:s,lane:r.preference.lane}})),n.sort((r,s)=>O.compareRangesUsingStarts(r.range,s.range)),t.reset(o);for(let r of n)t.push(r.lane,r.range,r.persist);return t}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{let e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new Aj(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new ke(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){let t=this._context.configuration.options.get(143);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){let e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(140)+" "+NI(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(let e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new fo;if(this._renderAnimationFrame===null){let e=this._createCoordinatedRendering();this._renderAnimationFrame=KI.INSTANCE.scheduleCoordinatedRendering({window:pi(this.domNode.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new fo;try{return e.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new fo;return e.renderText()},prepareRender:(t,n)=>{if(this._store.isDisposed)throw new fo;return e.prepareRender(t,n)},render:(t,n)=>{if(this._store.isDisposed)throw new fo;return e.render(t,n)}})}}_flushAccumulatedAndRenderNow(){let e=this._createCoordinatedRendering();bv(()=>e.prepareRenderText());let t=bv(()=>e.renderText());if(t){let[n,o]=t;bv(()=>e.prepareRender(n,o)),bv(()=>e.render(n,o))}}_getViewPartsToRender(){let e=[],t=0;for(let n of this._viewParts)n.shouldRender()&&(e[t++]=n);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=!1;let e=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(e.requiredLanes)}Jg.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return null;let t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);let n=new hG(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(n),this._viewLines.shouldRender()&&(this._viewLines.renderText(n),this._viewLines.onDidRender(),e=this._getViewPartsToRender()),[e,new Lj(this._context.viewLayout,n,this._viewLines)]},prepareRender:(e,t)=>{for(let n of e)n.prepareRender(t)},render:(e,t)=>{for(let n of e)n.render(t),n.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){let n=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),o=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n);this._flushAccumulatedAndRenderNow();let r=this._viewLines.visibleRangeForPosition(new ke(o.lineNumber,o.column));return r?r.left:-1}getTargetAtClientPoint(e,t){let n=this._pointerHandler.getTargetAtClientPoint(e,t);return n?rx.convertViewToModelMouseTarget(n,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new oG(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(let n of this._viewParts)n.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var t,n,o,r,s,a,l,c;this._contentWidgets.setWidgetPosition(e.widget,(n=(t=e.position)===null||t===void 0?void 0:t.position)!==null&&n!==void 0?n:null,(r=(o=e.position)===null||o===void 0?void 0:o.secondaryPosition)!==null&&r!==void 0?r:null,(a=(s=e.position)===null||s===void 0?void 0:s.preference)!==null&&a!==void 0?a:null,(c=(l=e.position)===null||l===void 0?void 0:l.positionAffinity)!==null&&c!==void 0?c:null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){let t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){let t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};mG=ITt([MTt(6,qt)],mG);KI=class{constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{let t=this._coordinatedRenderings.indexOf(e);if(t!==-1&&(this._coordinatedRenderings.splice(t,1),this._coordinatedRenderings.length===0)){for(let[n,o]of this._animationFrameRunners)o.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){let t=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,qC(e,t,100))}}_onRenderScheduled(){let e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(let n of e)bv(()=>n.prepareRenderText());let t=[];for(let n=0,o=e.length;nr.renderText())}for(let n=0,o=e.length;nr.prepareRender(a,l))}for(let n=0,o=e.length;nr.render(a,l))}}};KI.INSTANCE=new KI});var ux,vpe=P(()=>{ux=class{constructor(e,t,n,o,r,s,a){this.id=e,this.label=t,this.alias=n,this.metadata=o,this._precondition=r,this._run=s,this._contextKeyService=a}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}});function Qh(i){let e=0,t=0,n=0,o=0;for(let r=0,s=i.length;r{});var YI,_pe,gG,RQe=P(()=>{YI=class{constructor(e,t,n,o){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=n,this.isInvalid=o}},_pe=class{constructor(e,t,n,o,r,s){this.range=e,this.openingBracketRange=t,this.closingBracketRange=n,this.nestingLevel=o,this.nestingLevelOfEqualBracketType=r,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}},gG=class extends _pe{constructor(e,t,n,o,r,s,a){super(e,t,n,o,r,s),this.minVisibleColumnIndentation=a}}});function PQe(i,e,t,n){return i!==t?as(t-i,n):as(0,n-e)}function hx(i){return i===0}function as(i,e){return i*Jh+e}function Dd(i){let e=i,t=Math.floor(e/Jh),n=e-t*Jh;return new yv(t,n)}function OQe(i){return Math.floor(i/Jh)}function tr(i,e){let t=i+e;return e>=Jh&&(t=t-i%Jh),t}function zQe(i,e){return i.reduce((t,n)=>tr(t,e(n)),Wa)}function bpe(i,e){return i===e}function wb(i,e){let t=i,n=e;if(n-t<=0)return Wa;let r=Math.floor(t/Jh),s=Math.floor(n/Jh),a=n-s*Jh;if(r===s){let l=t-r*Jh;return as(0,a-l)}else return as(s-r,a)}function _4(i,e){return i=e}function wv(i){return as(i.lineNumber-1,i.column-1)}function xv(i,e){let t=i,n=Math.floor(t/Jh),o=t-n*Jh,r=e,s=Math.floor(r/Jh),a=r-s*Jh;return new O(n+1,o+1,s+1,a+1)}function FQe(i){let e=Ec(i);return as(e.length-1,e[e.length-1].length)}var yv,Wa,Jh,Tm=P(()=>{Ri();Kt();yv=class{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}};yv.zero=new yv(0,0);Wa=0;Jh=2**26});var yp,vG,ype,ZI=P(()=>{Kt();Tm();yp=class i{static fromModelContentChanges(e){return e.map(n=>{let o=O.lift(n.range);return new i(wv(o.getStartPosition()),wv(o.getEndPosition()),FQe(n.text))}).reverse()}constructor(e,t,n){this.startOffset=e,this.endOffset=t,this.newLength=n}toString(){return`[${Dd(this.startOffset)}...${Dd(this.endOffset)}) -> ${Dd(this.newLength)}`}},vG=class{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(t=>ype.from(t))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);let t=this.edits[this.nextEditIdx],n=t?this.translateOldToCur(t.offsetObj):null;return n===null?null:wb(e,n)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?as(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):as(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){let t=Dd(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?as(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):as(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx{_G=[],il=class i{static create(e,t){if(e<=128&&t.length===0){let n=i.cache[e];return n||(n=new i(e,t),i.cache[e]=n),n}return new i(e,t)}static getEmpty(){return this.empty}constructor(e,t){this.items=e,this.additionalItems=t}add(e,t){let n=t.getKey(e),o=n>>5;if(o===0){let s=1<{Pi();mp();Tm();xb();XI=class{get length(){return this._length}constructor(e){this._length=e}},QI=class i extends XI{static create(e,t,n){let o=e.length;return t&&(o=tr(o,t.length)),n&&(o=tr(o,n.length)),new i(o,e,t,n,t?t.missingOpeningBracketIds:il.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){let e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,n,o,r){super(e),this.openingBracket=t,this.child=n,this.closingBracket=o,this.missingOpeningBracketIds=r}canBeReused(e){return!(this.closingBracket===null||e.intersects(this.missingOpeningBracketIds))}deepClone(){return new i(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation(tr(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}},ef=class extends XI{static create23(e,t,n,o=!1){let r=e.length,s=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(r=tr(r,t.length),s=s.merge(t.missingOpeningBracketIds),n){if(e.listHeight!==n.listHeight)throw new Error("Invalid list heights");r=tr(r,n.length),s=s.merge(n.missingOpeningBracketIds)}return o?new wpe(r,e.listHeight+1,e,t,n,s):new JI(r,e.listHeight+1,e,t,n,s)}static getEmpty(){return new xpe(Wa,0,[],il.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,n){super(e),this.listHeight=t,this._missingOpeningBracketIds=n,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();let e=this.childrenLength;if(e===0)return;let t=this.getChild(e-1),n=t.kind===4?t.toMutable():t;return t!==n&&this.setChild(e-1,n),n}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;let t=this.getChild(0),n=t.kind===4?t.toMutable():t;return t!==n&&this.setChild(0,n),n}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds)||this.childrenLength===0)return!1;let t=this;for(;t.kind===4;){let n=t.childrenLength;if(n===0)throw new fo;t=t.getChild(n-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();let e=this.childrenLength,t=this.getChild(0).length,n=this.getChild(0).missingOpeningBracketIds;for(let o=1;o{Pi();B5();iM();Tm();xb();Mm=class{constructor(e,t,n,o,r){this.length=e,this.kind=t,this.bracketId=n,this.bracketIds=o,this.astNode=r}},mx=class{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new Spe(this.textModel,this.bracketTokens),this._offset=Wa,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return as(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=tr(this._offset,e);let t=Dd(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=tr(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}},Spe=class{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,this.line!==null&&(this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){let r=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=r.length,r}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));let e=this.lineIdx,t=this.lineCharOffset,n=0;for(;;){let r=this.lineTokens,s=r.getCount(),a=null;if(this.lineTokenOffset1e3))break;if(n>1500)break}let o=PQe(e,t,this.lineIdx,this.lineCharOffset);return new Mm(o,0,-1,il.getEmpty(),new Im(o))}},CG=class{constructor(e,t){this.text=e,this._offset=Wa,this.idx=0;let n=t.getRegExpStr(),o=n?new RegExp(n+`| +`+e.normalizeIndentation(a),n)}static _isAutoIndentType(e,t,n){if(e.autoIndent<4)return!1;for(let o=0,r=n.length;oi.shiftIndent(e,a),unshiftIndent:a=>i.unshiftIndent(e,a)},e.languageConfigurationService);if(s===null)return null;if(s!==e.normalizeIndentation(r)){let a=t.getLineFirstNonWhitespaceColumn(n.startLineNumber);return a===0?i._typeCommand(new O(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(s)+o,!1):i._typeCommand(new O(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(s)+t.getLineContent(n.startLineNumber).substring(a-1,n.startColumn-1)+o,!1)}return null}static _isAutoClosingOvertype(e,t,n,o,r){if(e.autoClosingOvertype==="never"||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(r))return!1;for(let s=0,a=n.length;s2?d.charCodeAt(c.column-2):0)===92&&h)return!1;if(e.autoClosingOvertype==="auto"){let p=!1;for(let m=0,y=o.length;mt.startsWith(l.open)),a=r.some(l=>t.startsWith(l.close));return!s&&a}static _findAutoClosingPairOpen(e,t,n,o){let r=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(o);if(!r)return null;let s=null;for(let a of r)if(s===null||a.open.length>s.open.length){let l=!0;for(let c of n)if(t.getValueInRange(new O(c.lineNumber,c.column-a.open.length+1,c.lineNumber,c.column))+o!==a.open){l=!1;break}l&&(s=a)}return s}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;let n=t.close.charAt(t.close.length-1),o=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(n)||[],r=null;for(let s of o)s.open!==t.open&&t.open.includes(s.open)&&t.close.endsWith(s.close)&&(!r||s.open.length>r.open.length)&&(r=s);return r}static _getAutoClosingPairClose(e,t,n,o,r){for(let p of n)if(!p.isEmpty())return null;let s=n.map(p=>{let m=p.getPosition();return r?{lineNumber:m.lineNumber,beforeColumn:m.column-o.length,afterColumn:m.column}:{lineNumber:m.lineNumber,beforeColumn:m.column,afterColumn:m.column}}),a=this._findAutoClosingPairOpen(e,t,s.map(p=>new ke(p.lineNumber,p.beforeColumn)),o);if(!a)return null;let l,c;if(u2(o)?(l=e.autoClosingQuotes,c=e.shouldAutoCloseBefore.quote):(e.blockCommentStartToken?a.open.includes(e.blockCommentStartToken):!1)?(l=e.autoClosingComments,c=e.shouldAutoCloseBefore.comment):(l=e.autoClosingBrackets,c=e.shouldAutoCloseBefore.bracket),l==="never")return null;let u=this._findContainedAutoClosingPair(e,a),h=u?u.close:"",f=!0;for(let p of s){let{lineNumber:m,beforeColumn:y,afterColumn:_}=p,v=t.getLineContent(m),b=v.substring(0,y-1),C=v.substring(_-1);if(C.startsWith(h)||(f=!1),C.length>0){let k=C.charAt(0);if(!i._isBeforeClosingBrace(e,C)&&!c(k))return null}if(a.open.length===1&&(o==="'"||o==='"')&&l!=="always"){let k=id(e.wordSeparators);if(b.length>0){let D=b.charCodeAt(b.length-1);if(k.get(D)===0)return null}}if(!t.tokenization.isCheapToTokenize(m))return null;t.tokenization.forceTokenization(m);let w=t.tokenization.getLineTokens(m),S=G3(w,y-1);if(!a.shouldAutoClose(S,y-S.firstCharOffset))return null;let x=a.findNeutralCharacter();if(x){let k=t.tokenization.getTokenTypeIfInsertingCharacter(m,y,x);if(!a.isOK(k))return null}}return f?a.close.substring(0,a.close.length-h.length):a.close}static _runAutoClosingOpenCharType(e,t,n,o,r,s,a){let l=[];for(let c=0,d=o.length;cnew Ts(new O(h.positionLineNumber,h.positionColumn,h.positionLineNumber,h.positionColumn+1),"",!1));return new Tl(4,u,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}let d=this._getAutoClosingPairClose(t,n,r,l,!0);return d!==null?this._runAutoClosingOpenCharType(e,t,n,r,l,!0,d):null}static typeWithInterceptors(e,t,n,o,r,s,a){if(!e&&a===` +`){let d=[];for(let u=0,h=r.length;u{Wt();Xi();(function(i){i.editorSimpleInput=new Bt("editorSimpleInput",!1,!0),i.editorTextFocus=new Bt("editorTextFocus",!1,g("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),i.focus=new Bt("editorFocus",!1,g("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),i.textInputFocus=new Bt("textInputFocus",!1,g("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),i.readOnly=new Bt("editorReadonly",!1,g("editorReadonly","Whether the editor is read-only")),i.inDiffEditor=new Bt("inDiffEditor",!1,g("inDiffEditor","Whether the context is a diff editor")),i.isEmbeddedDiffEditor=new Bt("isEmbeddedDiffEditor",!1,g("isEmbeddedDiffEditor","Whether the context is an embedded diff editor")),i.inMultiDiffEditor=new Bt("inMultiDiffEditor",!1,g("inMultiDiffEditor","Whether the context is a multi diff editor")),i.multiDiffEditorAllCollapsed=new Bt("multiDiffEditorAllCollapsed",void 0,g("multiDiffEditorAllCollapsed","Whether all files in multi diff editor are collapsed")),i.hasChanges=new Bt("diffEditorHasChanges",!1,g("diffEditorHasChanges","Whether the diff editor has changes")),i.comparingMovedCode=new Bt("comparingMovedCode",!1,g("comparingMovedCode","Whether a moved code block is selected for comparison")),i.accessibleDiffViewerVisible=new Bt("accessibleDiffViewerVisible",!1,g("accessibleDiffViewerVisible","Whether the accessible diff viewer is visible")),i.diffEditorRenderSideBySideInlineBreakpointReached=new Bt("diffEditorRenderSideBySideInlineBreakpointReached",!1,g("diffEditorRenderSideBySideInlineBreakpointReached","Whether the diff editor render side by side inline breakpoint is reached")),i.columnSelection=new Bt("editorColumnSelection",!1,g("editorColumnSelection","Whether `editor.columnSelection` is enabled")),i.writable=i.readOnly.toNegated(),i.hasNonEmptySelection=new Bt("editorHasSelection",!1,g("editorHasSelection","Whether the editor has text selected")),i.hasOnlyEmptySelection=i.hasNonEmptySelection.toNegated(),i.hasMultipleSelections=new Bt("editorHasMultipleSelections",!1,g("editorHasMultipleSelections","Whether the editor has multiple selections")),i.hasSingleSelection=i.hasMultipleSelections.toNegated(),i.tabMovesFocus=new Bt("editorTabMovesFocus",!1,g("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),i.tabDoesNotMoveFocus=i.tabMovesFocus.toNegated(),i.isInWalkThroughSnippet=new Bt("isInEmbeddedEditor",!1,!0),i.canUndo=new Bt("canUndo",!1,!0),i.canRedo=new Bt("canRedo",!1,!0),i.hoverVisible=new Bt("editorHoverVisible",!1,g("editorHoverVisible","Whether the editor hover is visible")),i.hoverFocused=new Bt("editorHoverFocused",!1,g("editorHoverFocused","Whether the editor hover is focused")),i.stickyScrollFocused=new Bt("stickyScrollFocused",!1,g("stickyScrollFocused","Whether the sticky scroll is focused")),i.stickyScrollVisible=new Bt("stickyScrollVisible",!1,g("stickyScrollVisible","Whether the sticky scroll is visible")),i.standaloneColorPickerVisible=new Bt("standaloneColorPickerVisible",!1,g("standaloneColorPickerVisible","Whether the standalone color picker is visible")),i.standaloneColorPickerFocused=new Bt("standaloneColorPickerFocused",!1,g("standaloneColorPickerFocused","Whether the standalone color picker is focused")),i.inCompositeEditor=new Bt("inCompositeEditor",void 0,g("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),i.notInCompositeEditor=i.inCompositeEditor.toNegated(),i.languageId=new Bt("editorLangId","",g("editorLangId","The language identifier of the editor")),i.hasCompletionItemProvider=new Bt("editorHasCompletionItemProvider",!1,g("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),i.hasCodeActionsProvider=new Bt("editorHasCodeActionsProvider",!1,g("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),i.hasCodeLensProvider=new Bt("editorHasCodeLensProvider",!1,g("editorHasCodeLensProvider","Whether the editor has a code lens provider")),i.hasDefinitionProvider=new Bt("editorHasDefinitionProvider",!1,g("editorHasDefinitionProvider","Whether the editor has a definition provider")),i.hasDeclarationProvider=new Bt("editorHasDeclarationProvider",!1,g("editorHasDeclarationProvider","Whether the editor has a declaration provider")),i.hasImplementationProvider=new Bt("editorHasImplementationProvider",!1,g("editorHasImplementationProvider","Whether the editor has an implementation provider")),i.hasTypeDefinitionProvider=new Bt("editorHasTypeDefinitionProvider",!1,g("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),i.hasHoverProvider=new Bt("editorHasHoverProvider",!1,g("editorHasHoverProvider","Whether the editor has a hover provider")),i.hasDocumentHighlightProvider=new Bt("editorHasDocumentHighlightProvider",!1,g("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),i.hasDocumentSymbolProvider=new Bt("editorHasDocumentSymbolProvider",!1,g("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),i.hasReferenceProvider=new Bt("editorHasReferenceProvider",!1,g("editorHasReferenceProvider","Whether the editor has a reference provider")),i.hasRenameProvider=new Bt("editorHasRenameProvider",!1,g("editorHasRenameProvider","Whether the editor has a rename provider")),i.hasSignatureHelpProvider=new Bt("editorHasSignatureHelpProvider",!1,g("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),i.hasInlayHintsProvider=new Bt("editorHasInlayHintsProvider",!1,g("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),i.hasDocumentFormattingProvider=new Bt("editorHasDocumentFormattingProvider",!1,g("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),i.hasDocumentSelectionFormattingProvider=new Bt("editorHasDocumentSelectionFormattingProvider",!1,g("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),i.hasMultipleDocumentFormattingProvider=new Bt("editorHasMultipleDocumentFormattingProvider",!1,g("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),i.hasMultipleDocumentSelectionFormattingProvider=new Bt("editorHasMultipleDocumentSelectionFormattingProvider",!1,g("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))})(re||(re={}))});function nx(i,e){Pa.registerKeybindingRule({id:i,primary:e,when:STt,weight:wo+1})}function FXe(i){return i.register(),i}function mb(i,e){FXe(new Tq("default:"+i,i)),FXe(new Tq(i,i,e))}var wo,ss,Jl,ix,FI,Va,STt,bv,Tq,HI=P(()=>{Wt();Xc();ho();Xl();an();fs();NXe();s1();gq();_q();Dq();Mi();Kt();Co();Xi();z3();Qt();wo=0,ss=class extends Jo{runEditorCommand(e,t,n){let o=t._getViewModel();o&&this.runCoreEditorCommand(o,n||{})}};(function(i){let e=function(n){if(!Gs(n))return!1;let o=n;return!(!qs(o.to)||!$l(o.by)&&!qs(o.by)||!$l(o.value)&&!zh(o.value)||!$l(o.revealCursor)&&!UV(o.revealCursor))};i.metadata={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n * 'to': A mandatory direction value.\n ```\n 'up', 'down'\n ```\n * 'by': Unit to move. Default is computed based on 'to' value.\n ```\n 'line', 'wrappedLine', 'page', 'halfPage', 'editor'\n ```\n * 'value': Number of units to move. Default is '1'.\n * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n ",constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage","editor"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},i.RawDirection={Up:"up",Right:"right",Down:"down",Left:"left"},i.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage",Editor:"editor",Column:"column"};function t(n){let o;switch(n.to){case i.RawDirection.Up:o=1;break;case i.RawDirection.Right:o=2;break;case i.RawDirection.Down:o=3;break;case i.RawDirection.Left:o=4;break;default:return null}let r;switch(n.by){case i.RawUnit.Line:r=1;break;case i.RawUnit.WrappedLine:r=2;break;case i.RawUnit.Page:r=3;break;case i.RawUnit.HalfPage:r=4;break;case i.RawUnit.Editor:r=5;break;case i.RawUnit.Column:r=6;break;default:r=2}let s=Math.floor(n.value||1),a=!!n.revealCursor;return{direction:o,unit:r,value:s,revealCursor:a,select:!!n.select}}i.parse=t})(Jl||(Jl={}));(function(i){let e=function(t){if(!Gs(t))return!1;let n=t;return!(!zh(n.lineNumber)&&!qs(n.lineNumber)||!$l(n.at)&&!qs(n.at))};i.metadata={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n * 'lineNumber': A mandatory line number value.\n * 'at': Logical position at which line has to be revealed.\n ```\n 'top', 'center', 'bottom'\n ```\n ",constraint:e,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},i.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(ix||(ix={}));FI=class{constructor(e){e.addImplementation(1e4,"code-editor",(t,n)=>{let o=t.get(tn).getFocusedCodeEditor();return o&&o.hasTextFocus()?this._runEditorCommand(t,o,n):!1}),e.addImplementation(1e3,"generic-dom-input-textarea",(t,n)=>{let o=gs();return o&&["input","textarea"].indexOf(o.tagName.toLowerCase())>=0?(this.runDOMCommand(o),!0):!1}),e.addImplementation(0,"generic-dom",(t,n)=>{let o=t.get(tn).getActiveCodeEditor();return o?(o.focus(),this._runEditorCommand(t,o,n)):!1})}_runEditorCommand(e,t,n){let o=this.runEditorCommand(e,t,n);return o||!0}};(function(i){class e extends ss{constructor(v){super(v),this._inSelectionMode=v.inSelectionMode}runCoreEditorCommand(v,b){if(!b.position)return;v.model.pushStackElement(),v.setCursorStates(b.source,3,[Js.moveTo(v,v.getPrimaryCursorState(),this._inSelectionMode,b.position,b.viewPosition)])&&b.revealType!==2&&v.revealPrimaryCursor(b.source,!0,!0)}}i.MoveTo=zt(new e({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),i.MoveToSelect=zt(new e({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class t extends ss{runCoreEditorCommand(v,b){v.model.pushStackElement();let C=this._getColumnSelectResult(v,v.getPrimaryCursorState(),v.getCursorColumnSelectData(),b);C!==null&&(v.setCursorStates(b.source,3,C.viewStates.map(w=>Vn.fromViewState(w))),v.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:C.fromLineNumber,fromViewVisualColumn:C.fromVisualColumn,toViewLineNumber:C.toLineNumber,toViewVisualColumn:C.toVisualColumn}),C.reversed?v.revealTopMostCursor(b.source):v.revealBottomMostCursor(b.source))}}i.ColumnSelect=zt(new class extends t{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(_,v,b,C){if(typeof C.position>"u"||typeof C.viewPosition>"u"||typeof C.mouseColumn>"u")return null;let w=_.model.validatePosition(C.position),S=_.coordinatesConverter.validateViewPosition(new ke(C.viewPosition.lineNumber,C.viewPosition.column),w),x=C.doColumnSelect?b.fromViewLineNumber:S.lineNumber,k=C.doColumnSelect?b.fromViewVisualColumn:C.mouseColumn-1;return vv.columnSelect(_.cursorConfig,_,x,k,S.lineNumber,C.mouseColumn-1)}}),i.CursorColumnSelectLeft=zt(new class extends t{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(_,v,b,C){return vv.columnSelectLeft(_.cursorConfig,_,b)}}),i.CursorColumnSelectRight=zt(new class extends t{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(_,v,b,C){return vv.columnSelectRight(_.cursorConfig,_,b)}});class n extends t{constructor(v){super(v),this._isPaged=v.isPaged}_getColumnSelectResult(v,b,C,w){return vv.columnSelectUp(v.cursorConfig,v,C,this._isPaged)}}i.CursorColumnSelectUp=zt(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:3600,linux:{primary:0}}})),i.CursorColumnSelectPageUp=zt(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:3595,linux:{primary:0}}}));class o extends t{constructor(v){super(v),this._isPaged=v.isPaged}_getColumnSelectResult(v,b,C,w){return vv.columnSelectDown(v.cursorConfig,v,C,this._isPaged)}}i.CursorColumnSelectDown=zt(new o({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:3602,linux:{primary:0}}})),i.CursorColumnSelectPageDown=zt(new o({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:3596,linux:{primary:0}}}));class r extends ss{constructor(){super({id:"cursorMove",precondition:void 0,metadata:PI.metadata})}runCoreEditorCommand(v,b){let C=PI.parse(b);C&&this._runCursorMove(v,b.source,C)}_runCursorMove(v,b,C){v.model.pushStackElement(),v.setCursorStates(b,3,r._move(v,v.getCursorStates(),C)),v.revealPrimaryCursor(b,!0)}static _move(v,b,C){let w=C.select,S=C.value;switch(C.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return Js.simpleMove(v,b,C.direction,w,S,C.unit);case 11:case 13:case 12:case 14:return Js.viewportMove(v,b,C.direction,w,S);default:return null}}}i.CursorMoveImpl=r,i.CursorMove=zt(new r);class s extends ss{constructor(v){super(v),this._staticArgs=v.args}runCoreEditorCommand(v,b){let C=this._staticArgs;this._staticArgs.value===-1&&(C={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:b.pageSize||v.cursorConfig.pageSize}),v.model.pushStackElement(),v.setCursorStates(b.source,3,Js.simpleMove(v,v.getCursorStates(),C.direction,C.select,C.value,C.unit)),v.revealPrimaryCursor(b.source,!0)}}i.CursorLeft=zt(new s({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),i.CursorLeftSelect=zt(new s({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:1039}})),i.CursorRight=zt(new s({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),i.CursorRightSelect=zt(new s({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:1041}})),i.CursorUp=zt(new s({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),i.CursorUpSelect=zt(new s({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),i.CursorPageUp=zt(new s({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:11}})),i.CursorPageUpSelect=zt(new s({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:1035}})),i.CursorDown=zt(new s({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),i.CursorDownSelect=zt(new s({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),i.CursorPageDown=zt(new s({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:12}})),i.CursorPageDownSelect=zt(new s({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:1036}})),i.CreateCursor=zt(new class extends ss{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(_,v){if(!v.position)return;let b;v.wholeLine?b=Js.line(_,_.getPrimaryCursorState(),!1,v.position,v.viewPosition):b=Js.moveTo(_,_.getPrimaryCursorState(),!1,v.position,v.viewPosition);let C=_.getCursorStates();if(C.length>1){let w=b.modelState?b.modelState.position:null,S=b.viewState?b.viewState.position:null;for(let x=0,k=C.length;xS&&(w=S);let x=new O(w,1,w,_.model.getLineMaxColumn(w)),k=0;if(b.at)switch(b.at){case ix.RawAtArgument.Top:k=3;break;case ix.RawAtArgument.Center:k=1;break;case ix.RawAtArgument.Bottom:k=4;break;default:break}let D=_.coordinatesConverter.convertModelRangeToViewRange(x);_.revealRange(v.source,!1,D,k,0)}}),i.SelectAll=new class extends FI{constructor(){super(fGe)}runDOMCommand(_){Aa&&(_.focus(),_.select()),_.ownerDocument.execCommand("selectAll")}runEditorCommand(_,v,b){let C=v._getViewModel();C&&this.runCoreEditorCommand(C,b)}runCoreEditorCommand(_,v){_.model.pushStackElement(),_.setCursorStates("keyboard",3,[Js.selectAll(_,_.getPrimaryCursorState())])}},i.SetSelection=zt(new class extends ss{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(_,v){v.selection&&(_.model.pushStackElement(),_.setCursorStates(v.source,3,[Vn.fromModelSelection(v.selection)]))}})})(Va||(Va={}));STt=mt.and(re.textInputFocus,re.columnSelection);nx(Va.CursorColumnSelectLeft.id,1039);nx(Va.CursorColumnSelectRight.id,1041);nx(Va.CursorColumnSelectUp.id,1040);nx(Va.CursorColumnSelectPageUp.id,1035);nx(Va.CursorColumnSelectDown.id,1042);nx(Va.CursorColumnSelectPageDown.id,1036);(function(i){class e extends Jo{runEditorCommand(n,o,r){let s=o._getViewModel();s&&this.runCoreEditingCommand(o,s,r||{})}}i.CoreEditingCommand=e,i.LineBreakInsert=zt(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:re.writable,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(t,n,o){t.pushUndoStop(),t.executeCommands(this.id,gu.lineBreakInsert(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection)))}}),i.Outdent=zt(new class extends e{constructor(){super({id:"outdent",precondition:re.writable,kbOpts:{weight:wo,kbExpr:mt.and(re.editorTextFocus,re.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(t,n,o){t.pushUndoStop(),t.executeCommands(this.id,gu.outdent(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection))),t.pushUndoStop()}}),i.Tab=zt(new class extends e{constructor(){super({id:"tab",precondition:re.writable,kbOpts:{weight:wo,kbExpr:mt.and(re.editorTextFocus,re.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(t,n,o){t.pushUndoStop(),t.executeCommands(this.id,gu.tab(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection))),t.pushUndoStop()}}),i.DeleteLeft=zt(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(t,n,o){let[r,s]=p4.deleteLeft(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(a=>a.modelState.selection),n.getCursorAutoClosedCharacters());r&&t.pushUndoStop(),t.executeCommands(this.id,s),n.setPrevEditOperationType(2)}}),i.DeleteRight=zt(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:wo,kbExpr:re.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(t,n,o){let[r,s]=p4.deleteRight(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(a=>a.modelState.selection));r&&t.pushUndoStop(),t.executeCommands(this.id,s),n.setPrevEditOperationType(3)}}),i.Undo=new class extends FI{constructor(){super(Lhe)}runDOMCommand(t){t.ownerDocument.execCommand("undo")}runEditorCommand(t,n,o){if(!(!n.hasModel()||n.getOption(90)===!0))return n.getModel().undo()}},i.Redo=new class extends FI{constructor(){super(Ehe)}runDOMCommand(t){t.ownerDocument.execCommand("redo")}runEditorCommand(t,n,o){if(!(!n.hasModel()||n.getOption(90)===!0))return n.getModel().redo()}}})(bv||(bv={}));Tq=class extends E5{constructor(e,t,n){super({id:e,precondition:void 0,metadata:n}),this._handlerId=t}runCommand(e,t){let n=e.get(tn).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,t)}};mb("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});mb("replacePreviousChar");mb("compositionType");mb("compositionStart");mb("compositionEnd");mb("paste");mb("cut")});var Iq,HXe=P(()=>{HI();Mi();Mn();Iq=class{constructor(e,t,n,o){this.configuration=e,this.viewModel=t,this.userInputEvents=n,this.commandDelegate=o}paste(e,t,n,o){this.commandDelegate.paste(e,t,n,o)}type(e){this.commandDelegate.type(e)}compositionType(e,t,n,o){this.commandDelegate.compositionType(e,t,n,o)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Va.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){let t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():e.mouseDownCount===3?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount===2?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):o?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){Va.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){Va.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,n){e=this._validateViewColumn(e),Va.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:n})}_createCursor(e,t){e=this._validateViewColumn(e),Va.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){Va.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){Va.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){Va.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){Va.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){Va.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){Va.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){Va.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){Va.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){Va.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}});var BI,ox,VI,Mq=P(()=>{_a();Vg();Pi();J0();BI=class{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){let t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new fo("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(this.getCount()===0)return null;let n=this.getStartLineNumber(),o=this.getEndLineNumber();if(to)return null;let r=0,s=0;for(let l=n;l<=o;l++){let c=l-this._rendLineNumberStart;e<=l&&l<=t&&(s===0?(r=c,s=1):s++)}if(e=o&&a<=r&&(this._lines[a-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(e,t){if(this.getCount()===0)return null;let n=t-e+1,o=this.getStartLineNumber(),r=this.getEndLineNumber();if(e<=o)return this._rendLineNumberStart+=n,null;if(e>r)return null;if(n+e>r)return this._lines.splice(e-this._rendLineNumberStart,r-e+1);let s=[];for(let u=0;un)continue;let l=Math.max(t,a.fromLineNumber),c=Math.min(n,a.toLineNumber);for(let d=l;d<=c;d++){let u=d-this._rendLineNumberStart;this._lines[u].onTokensChanged(),o=!0}}return o}},ox=class{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new BI(()=>this._host.createVisibleLine())}_createDomNode(){let e=vn(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(143)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){let t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let n=0,o=t.length;nt){let s=t,a=Math.min(n,r.rendLineNumberStart-1);s<=a&&(this._insertLinesBefore(r,s,a,o,t),r.linesLength+=a-s+1)}else if(r.rendLineNumberStart0&&(this._removeLinesBefore(r,s),r.linesLength-=s)}if(r.rendLineNumberStart=t,r.rendLineNumberStart+r.linesLength-1n){let s=Math.max(0,n-r.rendLineNumberStart+1),l=r.linesLength-1-s+1;l>0&&(this._removeLinesAfter(r,l),r.linesLength-=l)}return this._finishRendering(r,!1,o),r}_renderUntouchedLines(e,t,n,o,r){let s=e.rendLineNumberStart,a=e.lines;for(let l=t;l<=n;l++){let c=s+l;a[l].layoutLine(c,o[c-r])}}_insertLinesBefore(e,t,n,o,r){let s=[],a=0;for(let l=t;l<=n;l++)s[a++]=this.host.createVisibleLine();e.lines=s.concat(e.lines)}_removeLinesBefore(e,t){for(let n=0;n=0;a--){let l=e.lines[a];o[a]&&(l.setDomNode(s),s=s.previousSibling)}}_finishRenderingInvalidLines(e,t,n){let o=document.createElement("div");i._ttPolicy&&(t=i._ttPolicy.createHTML(t)),o.innerHTML=t;for(let r=0;ri});VI._sb=new qh(1e5)});var Nq,j1e,Aq,Rq,BXe=P(()=>{_a();Vf();Mq();rd();Nq=class extends Yr{constructor(e){super(e),this._visibleLines=new ox(this),this.domNode=this._visibleLines.domNode;let n=this._context.configuration.options.get(50);Gr(this.domNode,n),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;en.shouldRender());for(let n=0,o=t.length;n'),o.appendString(r),o.appendString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}},Aq=class extends Nq{constructor(e){super(e);let n=this._context.configuration.options.get(143);this._contentWidth=n.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){let n=this._context.configuration.options.get(143);return this._contentWidth=n.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}},Rq=class extends Nq{constructor(e){super(e);let t=this._context.configuration.options,n=t.get(143);this._contentLeft=n.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),Gr(this.domNode,t.get(50))}onConfigurationChanged(e){let t=this._context.configuration.options;Gr(this.domNode,t.get(50));let n=t.get(143);return this._contentLeft=n.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);let t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}});var rx,q1e=P(()=>{Mi();rx=class i{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){var t;(t=this.onKeyDown)===null||t===void 0||t.call(this,e)}emitKeyUp(e){var t;(t=this.onKeyUp)===null||t===void 0||t.call(this,e)}emitContextMenu(e){var t;(t=this.onContextMenu)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var t;(t=this.onMouseMove)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var t;(t=this.onMouseLeave)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var t;(t=this.onMouseDown)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var t;(t=this.onMouseUp)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var t;(t=this.onMouseDrag)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var t;(t=this.onMouseDrop)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var e;(e=this.onMouseDropCanceled)===null||e===void 0||e.call(this)}emitMouseWheel(e){var t;(t=this.onMouseWheel)===null||t===void 0||t.call(this,e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return i.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){let n={...e};return n.position&&(n.position=t.convertViewPositionToModelPosition(n.position)),n.range&&(n.range=t.convertViewRangeToModelRange(n.range)),(n.type===5||n.type===8)&&(n.detail=this.convertViewToModelViewZoneData(n.detail,t)),n}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new ke(e.afterLineNumber,1)).lineNumber}}}});var VXe=P(()=>{});var Pq,WXe=P(()=>{_a();VXe();rd();Pq=class extends Yr{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=vn(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1,n=this._context.configuration.options.get(143),o=n.contentWidth-n.verticalScrollbarWidth;this.contentWidth!==o&&(this.contentWidth=o,e=!0);let r=n.contentLeft;return this.contentLeft!==r&&(this.contentLeft=r,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){var t;let n=0,o=e.getDecorationsInViewport();for(let r of o){if(!r.options.blockClassName)continue;let s=this.blocks[n];s||(s=this.blocks[n]=vn(document.createElement("div")),this.domNode.appendChild(s));let a,l;r.options.blockIsAfterEnd?(a=e.getVerticalOffsetAfterLineNumber(r.range.endLineNumber,!1),l=e.getVerticalOffsetAfterLineNumber(r.range.endLineNumber,!0)):(a=e.getVerticalOffsetForLineNumber(r.range.startLineNumber,!0),l=r.range.isEmpty()&&!r.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(r.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(r.range.endLineNumber,!0));let[c,d,u,h]=(t=r.options.blockPadding)!==null&&t!==void 0?t:[0,0,0,0];s.setClassName("blockDecorations-block "+r.options.blockClassName),s.setLeft(this.contentLeft-h),s.setWidth(this.contentWidth+h+d),s.setTop(a-e.scrollTop-c),s.setHeight(l-a+c+u),n++}for(let r=n;r{Qt();_a();rd();Oq=class extends Yr{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=vn(document.createElement("div")),El.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=vn(document.createElement("div")),El.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){let t=Object.keys(this._widgets);for(let n of t)this._widgets[n].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){let e=Object.keys(this._widgets);for(let t of e)this._widgets[t].updateAnchorViewPosition()}addWidget(e){let t=new K1e(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,n,o,r){this._widgets[e.getId()].setPosition(t,n,o,r),this.setShouldRender()}removeWidget(e){let t=e.getId();if(this._widgets.hasOwnProperty(t)){let n=this._widgets[t];delete this._widgets[t];let o=n.domNode.domNode;o.parentNode.removeChild(o),o.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return this._widgets.hasOwnProperty(e)?this._widgets[e].suppressMouseDown:!1}onBeforeRender(e){let t=Object.keys(this._widgets);for(let n of t)this._widgets[n].onBeforeRender(e)}prepareRender(e){let t=Object.keys(this._widgets);for(let n of t)this._widgets[n].prepareRender(e)}render(e){let t=Object.keys(this._widgets);for(let n of t)this._widgets[n].render(e)}},K1e=class{constructor(e,t,n){this._primaryAnchor=new gb(null,null),this._secondaryAnchor=new gb(null,null),this._context=e,this._viewDomNode=t,this._actual=n,this.domNode=vn(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;let o=this._context.configuration.options,r=o.get(143);this._fixedOverflowWidgets=o.get(42),this._contentWidth=r.contentWidth,this._contentLeft=r.contentLeft,this._lineHeight=o.get(66),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){let t=this._context.configuration.options;if(this._lineHeight=t.get(66),e.hasChanged(143)){let n=t.get(143);this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,t,n){this._affinity=e,this._primaryAnchor=o(t,this._context.viewModel,this._affinity),this._secondaryAnchor=o(n,this._context.viewModel,this._affinity);function o(r,s,a){if(!r)return new gb(null,null);let l=s.model.validatePosition(r);if(s.coordinatesConverter.modelPositionIsVisible(l)){let c=s.coordinatesConverter.convertModelPositionToViewPosition(l,a??void 0);return new gb(r,c)}return new gb(r,null)}}_getMaxWidth(){let e=this.domNode.domNode.ownerDocument,t=e.defaultView;return this.allowEditorOverflow?t?.innerWidth||e.documentElement.offsetWidth||e.body.offsetWidth:this._contentWidth}setPosition(e,t,n,o){this._setPosition(o,e,t),this._preference=n,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,n,o){let r=e.top,s=r,a=e.top+e.height,l=o.viewportHeight-a,c=r-n,d=s>=n,u=a,h=l>=n,f=e.left;return f+t>o.scrollLeft+o.viewportWidth&&(f=o.scrollLeft+o.viewportWidth-t),fc){let f=h-(c-o);h-=f,n-=f}if(h=_,C=f+n<=p.height-v;return this._fixedOverflowWidgets?{fitsAbove:b,aboveTop:Math.max(h,_),fitsBelow:C,belowTop:f,left:y}:{fitsAbove:b,aboveTop:a,fitsBelow:C,belowTop:l,left:m}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new vb(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){var t,n;let o=a(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),r=((t=this._secondaryAnchor.viewPosition)===null||t===void 0?void 0:t.lineNumber)===((n=this._primaryAnchor.viewPosition)===null||n===void 0?void 0:n.lineNumber)?this._secondaryAnchor.viewPosition:null,s=a(r,this._affinity,this._lineHeight);return{primary:o,secondary:s};function a(l,c,d){if(!l)return null;let u=e.visibleRangeForPosition(l);if(!u)return null;let h=l.column===1&&c===3?0:u.left,f=e.getVerticalOffsetForLineNumber(l.lineNumber)-e.scrollTop;return new zq(f,h,d)}}_reduceAnchorCoordinates(e,t,n){if(!t)return e;let o=this._context.configuration.options.get(50),r=t.left;return re.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&G1e(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&G1e(this._actual.afterRender,this._actual,this._renderData.position)}},gb=class{constructor(e,t){this.modelPosition=e,this.viewPosition=t}},vb=class{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}},zq=class{constructor(e,t,n){this.top=e,this.left=t,this.height=n,this._anchorCoordinateBrand=void 0}}});var $Xe=P(()=>{});var Fq,Hq,Bq,jXe=P(()=>{$Xe();mv();r1();Vi();No();zo();fp();Mi();Fq=class extends pu{constructor(e){super(),this._context=e;let t=this._context.configuration.options,n=t.get(143);this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._wordWrap=n.isViewportWrapping,this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new jt(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1,t=new Set;for(let r of this._selections)t.add(r.positionLineNumber);let n=Array.from(t);n.sort((r,s)=>r-s),uo(this._cursorLineNumbers,n)||(this._cursorLineNumbers=n,e=!0);let o=this._selections.every(r=>r.isEmpty());return this._selectionIsEmpty!==o&&(this._selectionIsEmpty=o,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(143);return this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._wordWrap=n.isViewportWrapping,this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return this._renderLineHighlightOnlyWhenFocus?(this._focused=e.isFocused,!0):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}let t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=[];for(let s=t;s<=n;s++){let a=s-t;o[a]=""}if(this._wordWrap){let s=this._renderOne(e,!1);for(let a of this._cursorLineNumbers){let l=this._context.viewModel.coordinatesConverter,c=l.convertViewPositionToModelPosition(new ke(a,1)).lineNumber,d=l.convertModelPositionToViewPosition(new ke(c,1)).lineNumber,u=l.convertModelPositionToViewPosition(new ke(c,this._context.viewModel.model.getLineMaxColumn(c))).lineNumber,h=Math.max(d,t),f=Math.min(u,n);for(let p=h;p<=f;p++){let m=p-t;o[m]=s}}}let r=this._renderOne(e,!0);for(let s of this._cursorLineNumbers){if(sn)continue;let a=s-t;o[a]=r}this._renderData=o}render(e,t){if(!this._renderData)return"";let n=t-e;return n>=this._renderData.length?"":this._renderData[n]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}},Hq=class extends Fq{_renderOne(e,t){return`
`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}},Bq=class extends Fq{_renderOne(e,t){return`
`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}};Qs((i,e)=>{let t=i.getColor(A1e);if(t&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${t}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)),!t||t.isTransparent()||i.defines(R1e)){let n=i.getColor(R1e);n&&(e.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${n}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${n}; }`),Ac(i.type)&&(e.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}})});var qXe=P(()=>{});var Vq,GXe=P(()=>{qXe();mv();Kw();Kt();Vq=class extends pu{constructor(e){super(),this._context=e;let t=this._context.configuration.options;this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){let t=e.getDecorationsInViewport(),n=[],o=0;for(let l=0,c=t.length;l{if(l.options.zIndexc.options.zIndex)return 1;let d=l.options.className,u=c.options.className;return du?1:O.compareRangesUsingStarts(l.range,c.range)});let r=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,a=[];for(let l=r;l<=s;l++){let c=l-r;a[c]=""}this._renderWholeLineDecorations(e,n,a),this._renderNormalDecorations(e,n,a),this._renderResult=a}_renderWholeLineDecorations(e,t,n){let o=String(this._lineHeight),r=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let a=0,l=t.length;a',u=Math.max(c.range.startLineNumber,r),h=Math.min(c.range.endLineNumber,s);for(let f=u;f<=h;f++){let p=f-r;n[p]+=d}}}_renderNormalDecorations(e,t,n){var o;let r=String(this._lineHeight),s=e.visibleRange.startLineNumber,a=null,l=!1,c=null,d=!1;for(let u=0,h=t.length;u';l[f]+=v}}}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}});var Wq,KXe=P(()=>{Qt();_a();o1();rd();No();Wq=class extends Yr{constructor(e,t,n,o){super(e);let r=this._context.configuration.options,s=r.get(102),a=r.get(74),l=r.get(40),c=r.get(105),d={listenOnDomNode:n.domNode,className:"editor-scrollable "+NI(e.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:a,fastScrollSensitivity:l,scrollPredominantAxis:c,scrollByPage:s.scrollByPage};this.scrollbar=this._register(new c2(t.domNode,d,this._context.viewLayout.getScrollable())),El.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=vn(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();let u=(h,f,p)=>{let m={};if(f){let y=h.scrollTop;y&&(m.scrollTop=this._context.viewLayout.getCurrentScrollTop()+y,h.scrollTop=0)}if(p){let y=h.scrollLeft;y&&(m.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+y,h.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(m,1)};this._register(Xe(n.domNode,"scroll",h=>u(n.domNode,!0,!0))),this._register(Xe(t.domNode,"scroll",h=>u(t.domNode,!0,!1))),this._register(Xe(o.domNode,"scroll",h=>u(o.domNode,!0,!1))),this._register(Xe(this.scrollbarDomNode.domNode,"scroll",h=>u(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){let e=this._context.configuration.options,t=e.get(143);this.scrollbarDomNode.setLeft(t.contentLeft),e.get(72).side==="right"?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(102)||e.hasChanged(74)||e.hasChanged(40)){let t=this._context.configuration.options,n=t.get(102),o=t.get(74),r=t.get(40),s=t.get(105),a={vertical:n.vertical,horizontal:n.horizontal,verticalScrollbarSize:n.verticalScrollbarSize,horizontalScrollbarSize:n.horizontalScrollbarSize,scrollByPage:n.scrollByPage,handleMouseWheel:n.handleMouseWheel,mouseWheelScrollSensitivity:o,fastScrollSensitivity:r,scrollPredominantAxis:s};this.scrollbar.updateOptions(a)}return e.hasChanged(143)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+NI(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}});var YXe=P(()=>{});var _b,Y1e,Z1e,sx,Uq,X1e,Q1e,J1e,$q=P(()=>{_a();Vi();YXe();mv();rd();Mi();Kt();Ca();_b=class{constructor(e,t,n,o,r){this.startLineNumber=e,this.endLineNumber=t,this.className=n,this.tooltip=o,this._decorationToRenderBrand=void 0,this.zIndex=r??0}},Y1e=class{constructor(e,t,n){this.className=e,this.zIndex=t,this.tooltip=n}},Z1e=class{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}},sx=class extends pu{_render(e,t,n){let o=[];for(let a=e;a<=t;a++){let l=a-e;o[l]=new Z1e}if(n.length===0)return o;n.sort((a,l)=>a.className===l.className?a.startLineNumber===l.startLineNumber?a.endLineNumber-l.endLineNumber:a.startLineNumber-l.startLineNumber:a.classNameo)continue;let c=Math.max(a,n),d=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ke(c,0)),u=this._context.viewModel.glyphLanes.getLanesAtLine(d.lineNumber).indexOf(r.preference.lane);t.push(new Q1e(c,u,r.preference.zIndex,r))}}_collectSortedGlyphRenderRequests(e){let t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort((n,o)=>n.lineNumber===o.lineNumber?n.laneIndex===o.laneIndex?n.zIndex===o.zIndex?o.type===n.type?n.type===0&&o.type===0?n.className0;){let o=t.peek();if(!o)break;let r=t.takeWhile(a=>a.lineNumber===o.lineNumber&&a.laneIndex===o.laneIndex);if(!r||r.length===0)break;let s=r[0];if(s.type===0){let a=[];for(let l of r){if(l.zIndex!==s.zIndex||l.type!==s.type)break;(a.length===0||a[a.length-1]!==l.className)&&a.push(l.className)}n.push(s.accept(a.join(" ")))}else s.widget.renderInfo={lineNumber:s.lineNumber,laneIndex:s.laneIndex}}this._decorationGlyphsToRender=n}render(e){if(!this._glyphMargin){for(let n of Object.values(this._widgets))n.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){let n=this._managedDomNodes.pop();n?.domNode.remove()}return}let t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(let n of Object.values(this._widgets))if(!n.renderInfo)n.domNode.setDisplay("none");else{let o=e.viewportData.relativeVerticalOffset[n.renderInfo.lineNumber-e.viewportData.startLineNumber],r=this._glyphMarginLeft+n.renderInfo.laneIndex*this._lineHeight;n.domNode.setDisplay("block"),n.domNode.setTop(o),n.domNode.setLeft(r),n.domNode.setWidth(t),n.domNode.setHeight(this._lineHeight)}for(let n=0;nthis._decorationGlyphsToRender.length;){let n=this._managedDomNodes.pop();n?.domNode.remove()}}},X1e=class{constructor(e,t,n,o){this.lineNumber=e,this.laneIndex=t,this.zIndex=n,this.className=o,this.type=0}accept(e){return new J1e(this.lineNumber,this.laneIndex,e)}},Q1e=class{constructor(e,t,n,o){this.lineNumber=e,this.laneIndex=t,this.zIndex=n,this.widget=o,this.type=1}},J1e=class{constructor(e,t,n){this.lineNumber=e,this.laneIndex=t,this.combinedClassName=n}}});var ZXe=P(()=>{});var ax,epe=P(()=>{nt();ax=class extends ue{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}});function bb(i,e){let t=0,n=0,o=i.length;for(;n{});var g4,_p,v4,qq=P(()=>{(function(i){i[i.Disabled=0]="Disabled",i[i.EnabledForActive=1]="EnabledForActive",i[i.Enabled=2]="Enabled"})(g4||(g4={}));_p=class{constructor(e,t,n,o,r,s){if(this.visibleColumn=e,this.column=t,this.className=n,this.horizontalLine=o,this.forWrappedLinesAfterColumn=r,this.forWrappedLinesBeforeOrAtColumn=s,e!==-1==(t!==-1))throw new Error}},v4=class{constructor(e,t){this.top=e,this.endColumn=t}}});var Gq,WI,tpe=P(()=>{rh();Ri();mp();Kt();epe();jq();qq();Pi();Gq=class extends ax{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return bb(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,n){this.assertNotDisposed();let o=this.textModel.getLineCount();if(e<1||e>o)throw new fo("Illegal value for lineNumber");let r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=!!(r&&r.offSide),a=-2,l=-1,c=-2,d=-1,u=x=>{if(a!==-1&&(a===-2||a>x-1)){a=-1,l=-1;for(let k=x-2;k>=0;k--){let D=this._computeIndentLevel(k);if(D>=0){a=k,l=D;break}}}if(c===-2){c=-1,d=-1;for(let k=x;k=0){c=k,d=D;break}}}},h=-2,f=-1,p=-2,m=-1,y=x=>{if(h===-2){h=-1,f=-1;for(let k=x-2;k>=0;k--){let D=this._computeIndentLevel(k);if(D>=0){h=k,f=D;break}}}if(p!==-1&&(p===-2||p=0){p=k,m=D;break}}}},_=0,v=!0,b=0,C=!0,w=0,S=0;for(let x=0;v||C;x++){let k=e-x,D=e+x;x>1&&(k<1||k1&&(D>o||D>n)&&(C=!1),x>5e4&&(v=!1,C=!1);let E=-1;if(v&&k>=1){let T=this._computeIndentLevel(k-1);T>=0?(c=k-1,d=T,E=Math.ceil(T/this.textModel.getOptions().indentSize)):(u(k),E=this._getIndentLevelForWhitespaceLine(s,l,d))}let A=-1;if(C&&D<=o){let T=this._computeIndentLevel(D-1);T>=0?(h=D-1,f=T,A=Math.ceil(T/this.textModel.getOptions().indentSize)):(y(D),A=this._getIndentLevelForWhitespaceLine(s,f,m))}if(x===0){S=E;continue}if(x===1){if(D<=o&&A>=0&&S+1===A){v=!1,_=D,b=D,w=A;continue}if(k>=1&&E>=0&&E-1===S){C=!1,_=k,b=k,w=E;continue}if(_=e,b=e,w=S,w===0)return{startLineNumber:_,endLineNumber:b,indent:w}}v&&(E>=w?_=k:v=!1),C&&(A>=w?b=D:C=!1)}return{startLineNumber:_,endLineNumber:b,indent:w}}getLinesBracketGuides(e,t,n,o){var r;let s=[];for(let h=e;h<=t;h++)s.push([]);let a=!0,l=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new O(e,1,t,this.textModel.getLineMaxColumn(t))).toArray(),c;if(n&&l.length>0){let h=(e<=n.lineNumber&&n.lineNumber<=t?l:this.textModel.bracketPairs.getBracketPairsInRange(O.fromPositions(n)).toArray()).filter(f=>O.strictContainsPosition(f.range,n));c=(r=o4(h,f=>a||f.range.startLineNumber!==f.range.endLineNumber))===null||r===void 0?void 0:r.range}let d=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,u=new WI;for(let h of l){if(!h.closingBracketRange)continue;let f=c&&h.range.equalsRange(c);if(!f&&!o.includeInactive)continue;let p=u.getInlineClassName(h.nestingLevel,h.nestingLevelOfEqualBracketType,d)+(o.highlightActive&&f?" "+u.activeClassName:""),m=h.openingBracketRange.getStartPosition(),y=h.closingBracketRange.getStartPosition(),_=o.horizontalGuides===g4.Enabled||o.horizontalGuides===g4.EnabledForActive&&f;if(h.range.startLineNumber===h.range.endLineNumber){a&&_&&s[h.range.startLineNumber-e].push(new _p(-1,h.openingBracketRange.getEndPosition().column,p,new v4(!1,y.column),-1,-1));continue}let v=this.getVisibleColumnFromPosition(y),b=this.getVisibleColumnFromPosition(h.openingBracketRange.getStartPosition()),C=Math.min(b,v,h.minVisibleColumnIndentation+1),w=!1;qr(this.textModel.getLineContent(h.closingBracketRange.startLineNumber))=e&&b>C&&s[m.lineNumber-e].push(new _p(C,-1,p,new v4(!1,m.column),-1,-1)),y.lineNumber<=t&&v>C&&s[y.lineNumber-e].push(new _p(C,-1,p,new v4(!w,y.column),-1,-1)))}for(let h of s)h.sort((f,p)=>f.visibleColumn-p.visibleColumn);return s}getVisibleColumnFromPosition(e){return mr.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();let n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");let o=this.textModel.getOptions(),r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=!!(r&&r.offSide),a=new Array(t-e+1),l=-2,c=-1,d=-2,u=-1;for(let h=e;h<=t;h++){let f=h-e,p=this._computeIndentLevel(h-1);if(p>=0){l=h-1,c=p,a[f]=Math.ceil(p/o.indentSize);continue}if(l===-2){l=-1,c=-1;for(let m=h-2;m>=0;m--){let y=this._computeIndentLevel(m);if(y>=0){l=m,c=y;break}}}if(d!==-1&&(d===-2||d=0){d=m,u=y;break}}}a[f]=this._getIndentLevelForWhitespaceLine(s,c,u)}return a}_getIndentLevelForWhitespaceLine(e,t,n){let o=this.textModel.getOptions();return t===-1||n===-1?0:t{ZXe();mv();r1();No();Mi();Vi();ho();tpe();qq();Kq=class extends pu{constructor(e){super(),this._context=e,this._primaryPosition=null;let t=this._context.configuration.options,n=t.get(144),o=t.get(50);this._lineHeight=t.get(66),this._spaceWidth=o.spaceWidth,this._maxIndentLeft=n.wrappingColumn===-1?-1:n.wrappingColumn*o.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(144),o=t.get(50);return this._lineHeight=t.get(66),this._spaceWidth=o.spaceWidth,this._maxIndentLeft=n.wrappingColumn===-1?-1:n.wrappingColumn*o.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),!0}onCursorStateChanged(e){var t;let o=e.selections[0].getPosition();return!((t=this._primaryPosition)===null||t===void 0)&&t.equals(o)?!1:(this._primaryPosition=o,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){var t,n,o,r;if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}let s=e.visibleRange.startLineNumber,a=e.visibleRange.endLineNumber,l=e.scrollWidth,c=this._lineHeight,d=this._primaryPosition,u=this.getGuidesByLine(s,Math.min(a+1,this._context.viewModel.getLineCount()),d),h=[];for(let f=s;f<=a;f++){let p=f-s,m=u[p],y="",_=(n=(t=e.visibleRangeForPosition(new ke(f,1)))===null||t===void 0?void 0:t.left)!==null&&n!==void 0?n:0;for(let v of m){let b=v.column===-1?_+(v.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new ke(f,v.column)).left;if(b>l||this._maxIndentLeft>0&&b>this._maxIndentLeft)break;let C=v.horizontalLine?v.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",w=v.horizontalLine?((r=(o=e.visibleRangeForPosition(new ke(f,v.horizontalLine.endColumn)))===null||o===void 0?void 0:o.left)!==null&&r!==void 0?r:b+this._spaceWidth)-b:this._spaceWidth;y+=`
`}h[p]=y}this._renderResult=h}getGuidesByLine(e,t,n){let o=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,n,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?g4.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?g4.EnabledForActive:g4.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,r=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null,s=0,a=0,l=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&n){let u=this._context.viewModel.getActiveIndentGuide(n.lineNumber,e,t);s=u.startLineNumber,a=u.endLineNumber,l=u.indent}let{indentSize:c}=this._context.viewModel.model.getOptions(),d=[];for(let u=e;u<=t;u++){let h=new Array;d.push(h);let f=o?o[u-e]:[],p=new qc(f),m=r?r[u-e]:0;for(let y=1;y<=m;y++){let _=(y-1)*c+1,v=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||f.length===0)&&s<=u&&u<=a&&y===l;h.push(...p.takeWhile(C=>C.visibleColumn<_)||[]);let b=p.peek();(!b||b.visibleColumn!==_||b.horizontalLine)&&h.push(new _p(_,-1,`core-guide-indent lvl-${(y-1)%30}`+(v?" indent-active":""),null,-1,-1))}h.push(...p.takeWhile(y=>!0)||[])}return d}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};Qs((i,e)=>{let t=[{bracketColor:rq,guideColor:gXe,guideColorActive:wXe},{bracketColor:sq,guideColor:vXe,guideColorActive:xXe},{bracketColor:aq,guideColor:_Xe,guideColorActive:SXe},{bracketColor:lq,guideColor:bXe,guideColorActive:kXe},{bracketColor:cq,guideColor:yXe,guideColorActive:LXe},{bracketColor:dq,guideColor:CXe,guideColorActive:EXe}],n=new WI,o=[{indentColor:ob,indentColorActive:rb},{indentColor:QZe,indentColorActive:nXe},{indentColor:JZe,indentColorActive:oXe},{indentColor:eXe,indentColorActive:rXe},{indentColor:tXe,indentColorActive:sXe},{indentColor:iXe,indentColorActive:aXe}],r=t.map(a=>{var l,c;let d=i.getColor(a.bracketColor),u=i.getColor(a.guideColor),h=i.getColor(a.guideColorActive),f=lx((l=lx(u))!==null&&l!==void 0?l:d?.transparent(.3)),p=lx((c=lx(h))!==null&&c!==void 0?c:d);if(!(!f||!p))return{guideColor:f,guideColorActive:p}}).filter(om),s=o.map(a=>{let l=i.getColor(a.indentColor),c=i.getColor(a.indentColorActive),d=lx(l),u=lx(c);if(!(!d||!u))return{indentColor:d,indentColorActive:u}}).filter(om);if(r.length>0){for(let a=0;a<30;a++){let l=r[a%r.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(a).replace(/ /g,".")} { --guide-color: ${l.guideColor}; --guide-color-active: ${l.guideColorActive}; }`)}e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),e.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(s.length>0){for(let a=0;a<30;a++){let l=s[a%s.length];e.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${a} { --indent-color: ${l.indentColor}; --indent-color-active: ${l.indentColorActive}; }`)}e.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),e.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}})});var QXe=P(()=>{});var cx,JXe=P(()=>{cx=class{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;let e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}});var ipe,npe,ope,UI,eQe=P(()=>{uq();Qi();Mn();QXe();Vf();Kw();Mq();rd();JXe();Rj();Mi();Kt();ipe=class{constructor(){this._currentVisibleRange=new O(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}},npe=class{constructor(e,t,n,o,r,s,a){this.minimalReveal=e,this.lineNumber=t,this.startColumn=n,this.endColumn=o,this.startScrollTop=r,this.stopScrollTop=s,this.scrollType=a,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}},ope=class{constructor(e,t,n,o,r){this.minimalReveal=e,this.selections=t,this.startScrollTop=n,this.stopScrollTop=o,this.scrollType=r,this.type="selections";let s=t[0].startLineNumber,a=t[0].endLineNumber;for(let l=1,c=t.length;l{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new hn(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new ipe,this._horizontalRevealRequest=null,this._stickyScrollEnabled=o.get(114).enabled,this._maxNumberStickyLines=o.get(114).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new pp(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(144)&&(this._maxLineWidth=0);let t=this._context.configuration.options,n=t.get(50),o=t.get(144);return this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=o.isViewportWrapping,this._revealHorizontalRightPadding=t.get(99),this._cursorSurroundingLines=t.get(29),this._cursorSurroundingLinesStyle=t.get(30),this._canUseLayerHinting=!t.get(32),this._stickyScrollEnabled=t.get(114).enabled,this._maxNumberStickyLines=t.get(114).maxLineCount,Gr(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(143)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){let e=this._context.configuration,t=new LI(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;let n=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();for(let r=n;r<=o;r++)this._visibleLines.getVisibleLine(r).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){let t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),o=!1;for(let r=t;r<=n;r++)o=this._visibleLines.getVisibleLine(r).onSelectionChanged()||o;return o}onDecorationsChanged(e){{let t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let o=t;o<=n;o++)this._visibleLines.getVisibleLine(o).onDecorationsChanged()}return!0}onFlushed(e){let t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){let t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(t===-1)return!1;let n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new npe(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new ope(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;let r=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(n,r),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){let t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){let n=this._getViewLineDomNode(e);if(n===null)return null;let o=this._getLineNumberFor(n);if(o===-1||o<1||o>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(o)===1)return new ke(o,1);let r=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(os)return null;let a=this._visibleLines.getVisibleLine(o).getColumnOfNodeOffset(e,t),l=this._context.viewModel.getLineMinColumn(o);return an)return-1;let o=new cx(this.domNode.domNode,this._textRangeRestingSpot),r=this._visibleLines.getVisibleLine(e).getWidth(o);return this._updateLineWidthsSlowIfDomDidLayout(o),r}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;let n=e.endLineNumber,o=O.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!o)return null;let r=[],s=0,a=new cx(this.domNode.domNode,this._textRangeRestingSpot),l=0;t&&(l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ke(o.startLineNumber,1)).lineNumber);let c=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let u=o.startLineNumber;u<=o.endLineNumber;u++){if(ud)continue;let h=u===o.startLineNumber?o.startColumn:1,f=u!==o.endLineNumber,p=f?this._context.viewModel.getLineMaxColumn(u):o.endColumn,m=this._visibleLines.getVisibleLine(u).getVisibleRangesForRange(u,h,p,a);if(m){if(t&&uthis._visibleLines.getEndLineNumber())return null;let o=new cx(this.domNode.domNode,this._textRangeRestingSpot),r=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,n,o);return this._updateLineWidthsSlowIfDomDidLayout(o),r}visibleRangeForPosition(e){let t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new Mj(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){let t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),o=1,r=!0;for(let s=t;s<=n;s++){let a=this._visibleLines.getVisibleLine(s);if(e&&!a.getWidthIsFast()){r=!1;continue}o=Math.max(o,a.getWidth(null))}return r&&t===1&&n===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(o),r}_checkMonospaceFontAssumptions(){let e=-1,t=-1,n=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();for(let r=n;r<=o;r++){let s=this._visibleLines.getVisibleLine(r);if(s.needsMonospaceFontCheck()){let a=s.getWidth(null);a>t&&(t=a,e=r)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let r=n;r<=o;r++)this._visibleLines.getVisibleLine(r).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){let n=this._horizontalRevealRequest;if(e.startLineNumber<=n.minLineNumber&&n.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();let o=this._computeScrollLeftToReveal(n);o&&(this._isViewportWrapping||this._ensureMaxLineWidth(o.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:o.scrollLeft},n.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),Ar&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){let n=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();for(let r=n;r<=o;r++)if(this._visibleLines.getVisibleLine(r).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");let t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){let t=Math.ceil(e);this._maxLineWidth0){let _=r[0].startLineNumber,v=r[0].endLineNumber;for(let b=1,C=r.length;bl){if(!d)return-1;y=u}else if(s===5||s===6)if(s===6&&a<=u&&h<=c)y=a;else{let _=Math.max(5*this._lineHeight,l*.2),v=u-_,b=h-l;y=Math.max(b,v)}else if(s===1||s===2)if(s===2&&a<=u&&h<=c)y=a;else{let _=(u+h)/2;y=Math.max(0,_-l/2)}else y=this._computeMinimumScrolling(a,c,u,h,s===3,s===4);return y}_computeScrollLeftToReveal(e){let t=this._context.viewLayout.getCurrentViewport(),n=this._context.configuration.options.get(143),o=t.left,r=o+t.width-n.verticalScrollbarWidth,s=1073741824,a=0;if(e.type==="range"){let c=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!c)return null;for(let d of c.ranges)s=Math.min(s,Math.round(d.left)),a=Math.max(a,Math.round(d.left+d.width))}else for(let c of e.selections){if(c.startLineNumber!==c.endLineNumber)return null;let d=this._visibleRangesForLineRange(c.startLineNumber,c.startColumn,c.endColumn);if(!d)return null;for(let u of d.ranges)s=Math.min(s,Math.round(u.left)),a=Math.max(a,Math.round(u.left+u.width))}return e.minimalReveal||(s=Math.max(0,s-i.HORIZONTAL_EXTRA_PX),a+=this._revealHorizontalRightPadding),e.type==="selections"&&a-s>t.width?null:{scrollLeft:this._computeMinimumScrolling(o,r,s,a),maxHorizontalOffset:a}}_computeMinimumScrolling(e,t,n,o,r,s){e=e|0,t=t|0,n=n|0,o=o|0,r=!!r,s=!!s;let a=t-e;if(o-nt)return Math.max(0,o-a)}else return n;return e}};UI.HORIZONTAL_EXTRA_PX=30});var tQe=P(()=>{});var Yq,iQe=P(()=>{tQe();$q();Yq=class extends sx{constructor(e){super(),this._context=e;let n=this._context.configuration.options.get(143);this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let n=this._context.configuration.options.get(143);return this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){var t,n;let o=e.getDecorationsInViewport(),r=[],s=0;for(let a=0,l=o.length;a',l=[];for(let c=t;c<=n;c++){let d=c-t,u=o[d].getDecorations(),h="";for(let f of u){let p='
{});var Zq,oQe=P(()=>{nQe();$q();Zq=class extends sx{constructor(e){super(),this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){let t=e.getDecorationsInViewport(),n=[],o=0;for(let r=0,s=t.length;r
';r[a]=c}this._renderResult=r}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}});var rQe=P(()=>{});var bp,rpe=P(()=>{bp=class i{constructor(e,t,n,o){this._rgba8Brand=void 0,this.r=i._clamp(e),this.g=i._clamp(t),this.b=i._clamp(n),this.a=i._clamp(o)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:e|0}};bp.Empty=new bp(0,0,0,0)});var yb,spe=P(()=>{Xt();nt();rpe();Pr();yb=class i extends ue{static getInstance(){return this._INSTANCE||(this._INSTANCE=l5(new i)),this._INSTANCE}constructor(){super(),this._onDidChange=new ge,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Eo.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){let e=Eo.getColorMap();if(!e){this._colors=[bp.Empty],this._backgroundIsLight=!0;return}this._colors=[bp.Empty];for(let n=1;n=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}};yb._INSTANCE=null});var sQe,aQe,ape=P(()=>{sQe=(()=>{let i=[];for(let e=32;e<=126;e++)i.push(e);return i.push(65533),i})(),aQe=(i,e)=>(i-=32,i<0||i>96?e<=2?(i+96)%96:95:i)});var $I,lQe=P(()=>{ape();XT();$I=class i{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=i.soften(e,12/15),this.charDataLight=i.soften(e,50/60)}static soften(e,t){let n=new Uint8ClampedArray(e.length);for(let o=0,r=e.length;oe.width||n+p>e.height){console.warn("bad render request outside image data");return}let m=d?this.charDataLight:this.charDataNormal,y=aQe(o,c),_=e.width*4,v=a.r,b=a.g,C=a.b,w=r.r-v,S=r.g-b,x=r.b-C,k=Math.max(s,l),D=e.data,E=y*h*f,A=n*_+t*4;for(let T=0;Te.width||n+u>e.height){console.warn("bad render request outside image data");return}let h=e.width*4,f=.5*(r/255),p=s.r,m=s.g,y=s.b,_=o.r-p,v=o.g-m,b=o.b-y,C=p+_*f,w=m+v*f,S=y+b*f,x=Math.max(r,a),k=e.data,D=n*h+t*4;for(let E=0;E{k3();cQe={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},dQe=i=>{let e=new Uint8ClampedArray(i.length/2);for(let t=0;t>1]=cQe[i[t]]<<4|cQe[i[t+1]]&15;return e},lpe={1:Gu(()=>dQe("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:Gu(()=>dQe("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))}});var Xq,hQe=P(()=>{lQe();ape();uQe();XT();Xq=class i{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let n;return lpe[e]?n=new $I(lpe[e](),e):n=i.createFromSampleData(i.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=n,n}static createSampleData(e){let t=document.createElement("canvas"),n=t.getContext("2d");t.style.height="16px",t.height=16,t.width=96*10,t.style.width=96*10+"px",n.fillStyle="#ffffff",n.font=`bold 16px ${e}`,n.textBaseline="middle";let o=0;for(let r of sQe)n.fillText(String.fromCharCode(r),o,16/2),o+=10;return n.getImageData(0,0,96*10,16)}static createFromSampleData(e,t){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");let o=i._downsample(e,t);return new $I(o,t)}static _downsampleChar(e,t,n,o,r){let s=1*r,a=2*r,l=o,c=0;for(let d=0;d0){let c=255/l;for(let d=0;d{rQe();Qt();_a();Lw();nt();Mn();Ri();Mq();rd();Ks();Kt();rpe();spe();ap();pr();zo();dh();hQe();Ca();k3();kTt=140,LTt=2,Qq=class i{constructor(e,t,n){let o=e.options,r=o.get(141),s=o.get(143),a=s.minimap,l=o.get(50),c=o.get(72);this.renderMinimap=a.renderMinimap,this.size=c.size,this.minimapHeightIsEditorHeight=a.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=o.get(104),this.paddingTop=o.get(83).top,this.paddingBottom=o.get(83).bottom,this.showSlider=c.showSlider,this.autohide=c.autohide,this.pixelRatio=r,this.typicalHalfwidthCharacterWidth=l.typicalHalfwidthCharacterWidth,this.lineHeight=o.get(66),this.minimapLeft=a.minimapLeft,this.minimapWidth=a.minimapWidth,this.minimapHeight=s.height,this.canvasInnerWidth=a.minimapCanvasInnerWidth,this.canvasInnerHeight=a.minimapCanvasInnerHeight,this.canvasOuterWidth=a.minimapCanvasOuterWidth,this.canvasOuterHeight=a.minimapCanvasOuterHeight,this.isSampling=a.minimapIsSampling,this.editorHeight=s.height,this.fontScale=a.minimapScale,this.minimapLineHeight=a.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=Gu(()=>Xq.create(this.fontScale,l.fontFamily)),this.defaultBackgroundColor=n.getColor(2),this.backgroundColor=i._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=i._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){let n=e.getColor(DZe);return n?new bp(n.rgba.r,n.rgba.g,n.rgba.b,Math.round(255*n.rgba.a)):t}static _getMinimapForegroundOpacity(e){let t=e.getColor(TZe);return t?bp._clamp(Math.round(255*t.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}},cpe=class i{constructor(e,t,n,o,r,s,a,l,c){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=n,this._computedSliderRatio=o,this.sliderTop=r,this.sliderHeight=s,this.topPaddingLineCount=a,this.startLineNumber=l,this.endLineNumber=c}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){let t=Math.max(this.startLineNumber,e.startLineNumber),n=Math.min(this.endLineNumber,e.endLineNumber);return t>n?null:[t,n]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,n,o,r,s,a,l,c,d,u){let h=e.pixelRatio,f=e.minimapLineHeight,p=Math.floor(e.canvasInnerHeight/f),m=e.lineHeight;if(e.minimapHeightIsEditorHeight){let S=l*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(S+=Math.max(0,r-e.lineHeight-e.paddingBottom));let x=Math.max(1,Math.floor(r*r/S)),k=Math.max(0,e.minimapHeight-x),D=k/(d-r),E=c*D,A=k>0,T=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),L=Math.floor(e.paddingTop/e.lineHeight);return new i(c,d,A,D,E,x,L,1,Math.min(a,T))}let y;if(s&&n!==a){let S=n-t+1;y=Math.floor(S*f/h)}else{let S=r/m;y=Math.floor(S*f/h)}let _=Math.floor(e.paddingTop/m),v=Math.floor(e.paddingBottom/m);if(e.scrollBeyondLastLine){let S=r/m;v=Math.max(v,S-1)}let b;if(v>0){let S=r/m;b=(_+a+v-S-1)*f/h}else b=Math.max(0,(_+a)*f/h-y);b=Math.min(e.minimapHeight-y,b);let C=b/(d-r),w=c*C;if(p>=_+a+v){let S=b>0;return new i(c,d,S,C,w,y,_,1,a)}else{let S;t>1?S=t+_:S=Math.max(1,c/m);let x,k=Math.max(1,Math.floor(S-w*h/f));k<_?(x=_-k+1,k=1):(x=0,k=Math.max(1,k-_)),u&&u.scrollHeight===d&&(u.scrollTop>c&&(k=Math.min(k,u.startLineNumber),x=Math.max(x,u.topPaddingLineCount)),u.scrollTop=e.paddingTop?A=(t-k+x+E)*f/h:A=c/e.paddingTop*(x+E)*f/h,new i(c,d,!0,C,A,y,x,k,D)}}},dx=class{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}};dx.INVALID=new dx(-1);Jq=class{constructor(e,t,n){this.renderedLayout=e,this._imageData=t,this._renderedLines=new BI(()=>dx.INVALID),this._renderedLines._set(e.startLineNumber,n)}linesEquals(e){if(!this.scrollEquals(e))return!1;let n=this._renderedLines._get().lines;for(let o=0,r=n.length;o1){for(let _=0,v=o-1;_0&&this.minimapLines[n-1]>=e;)n--;let o=this.modelLineToMinimapLine(t)-1;for(;o+1t)return null}return[n+1,o+1]}decorationLineRangeToMinimapLineRange(e,t){let n=this.modelLineToMinimapLine(e),o=this.modelLineToMinimapLine(t);return e!==t&&o===n&&(o===this.minimapLines.length?n>1&&n--:o++),[n,o]}onLinesDeleted(e){let t=e.toLineNumber-e.fromLineNumber+1,n=this.minimapLines.length,o=0;for(let r=this.minimapLines.length-1;r>=0&&!(this.minimapLines[r]=0&&!(this.minimapLines[n]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:n,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(o)}_recreateLineSampling(){this._minimapSelections=null;let e=!!this._samplingState,[t,n]=eG.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(let o of n)switch(o.type){case"deleted":this._actual.onLinesDeleted(o.deleteFromLineNumber,o.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(o.insertFromLineNumber,o.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,n){if(this._samplingState){let o=[];for(let r=0,s=t-e+1;r{if(n.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(n.button===0&&this._lastRenderData){let c=Lo(this._slider.domNode),d=c.top+c.height/2;this._startSliderDragging(n,d,this._lastRenderData.renderedLayout)}return}let r=this._model.options.minimapLineHeight,s=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*n.offsetY,l=Math.floor(s/r)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;l=Math.min(l,this._model.getLineCount()),this._model.revealLineNumber(l)}),this._sliderPointerMoveMonitor=new Jf,this._sliderPointerDownListener=go(this._slider.domNode,Lt.POINTER_DOWN,n=>{n.preventDefault(),n.stopPropagation(),n.button===0&&this._lastRenderData&&this._startSliderDragging(n,n.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=ar.addTarget(this._domNode.domNode),this._sliderTouchStartListener=Xe(this._domNode.domNode,vo.Start,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(n))},{passive:!1}),this._sliderTouchMoveListener=Xe(this._domNode.domNode,vo.Change,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(n)},{passive:!1}),this._sliderTouchEndListener=go(this._domNode.domNode,vo.End,n=>{n.preventDefault(),n.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,n){if(!e.target||!(e.target instanceof Element))return;let o=e.pageX;this._slider.toggleClassName("active",!0);let r=(s,a)=>{let l=Lo(this._domNode.domNode),c=Math.min(Math.abs(a-o),Math.abs(a-l.left),Math.abs(a-l.left-l.width));if(hr&&c>kTt){this._model.setScrollTop(n.scrollTop);return}let d=s-t;this._model.setScrollTop(n.getDesiredScrollTopFromDelta(d))};e.pageY!==t&&r(e.pageY,o),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,s=>r(s.pageY,s.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){let t=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(n)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){let e=["minimap"];return this._model.options.showSlider==="always"?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new dpe(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return this._lastRenderData?this._lastRenderData.onLinesChanged(e,t):!1}onLinesDeleted(e,t){var n;return(n=this._lastRenderData)===null||n===void 0||n.onLinesDeleted(e,t),!0}onLinesInserted(e,t){var n;return(n=this._lastRenderData)===null||n===void 0||n.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(c1e),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");let n=cpe.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(n.sliderNeeded?"block":"none"),this._slider.setTop(n.sliderTop),this._slider.setHeight(n.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(n.sliderHeight),this.renderDecorations(n),this._lastRenderData=this.renderLines(n)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;let t=this._model.getSelections();t.sort(O.compareRangesUsingStarts);let n=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);n.sort((h,f)=>(h.options.zIndex||0)-(f.options.zIndex||0));let{canvasInnerWidth:o,canvasInnerHeight:r}=this._model.options,s=this._model.options.minimapLineHeight,a=this._model.options.minimapCharWidth,l=this._model.getOptions().tabSize,c=this._decorationsCanvas.domNode.getContext("2d");c.clearRect(0,0,o,r);let d=new iG(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(c,t,d,e,s),this._renderDecorationsLineHighlights(c,n,d,e,s);let u=new iG(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(c,t,u,e,s,l,a,o),this._renderDecorationsHighlights(c,n,u,e,s,l,a,o)}}_renderSelectionLineHighlights(e,t,n,o,r){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let s=0,a=0;for(let l of t){let c=o.intersectWithViewport(l);if(!c)continue;let[d,u]=c;for(let p=d;p<=u;p++)n.set(p,!0);let h=o.getYForLineNumber(d,r),f=o.getYForLineNumber(u,r);a>=h||(a>s&&e.fillRect(W0,s,e.canvas.width,a-s),s=h),a=f}a>s&&e.fillRect(W0,s,e.canvas.width,a-s)}_renderDecorationsLineHighlights(e,t,n,o,r){let s=new Map;for(let a=t.length-1;a>=0;a--){let l=t[a],c=l.options.minimap;if(!c||c.position!==Zl.Inline)continue;let d=o.intersectWithViewport(l.range);if(!d)continue;let[u,h]=d,f=c.getColor(this._theme.value);if(!f||f.isTransparent())continue;let p=s.get(f.toString());p||(p=f.transparent(.5).toString(),s.set(f.toString(),p)),e.fillStyle=p;for(let m=u;m<=h;m++){if(n.has(m))continue;n.set(m,!0);let y=o.getYForLineNumber(u,r);e.fillRect(W0,y,e.canvas.width,r)}}}_renderSelectionsHighlights(e,t,n,o,r,s,a,l){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(let c of t){let d=o.intersectWithViewport(c);if(!d)continue;let[u,h]=d;for(let f=u;f<=h;f++)this.renderDecorationOnLine(e,n,c,this._selectionColor,o,f,r,r,s,a,l)}}_renderDecorationsHighlights(e,t,n,o,r,s,a,l){for(let c of t){let d=c.options.minimap;if(!d)continue;let u=o.intersectWithViewport(c.range);if(!u)continue;let[h,f]=u,p=d.getColor(this._theme.value);if(!(!p||p.isTransparent()))for(let m=h;m<=f;m++)switch(d.position){case Zl.Inline:this.renderDecorationOnLine(e,n,c.range,p,o,m,r,r,s,a,l);continue;case Zl.Gutter:{let y=o.getYForLineNumber(m,r);this.renderDecoration(e,p,2,y,LTt,r);continue}}}}renderDecorationOnLine(e,t,n,o,r,s,a,l,c,d,u){let h=r.getYForLineNumber(s,l);if(h+a<0||h>this._model.options.canvasInnerHeight)return;let{startLineNumber:f,endLineNumber:p}=n,m=f===s?n.startColumn:1,y=p===s?n.endColumn:this._model.getLineMaxColumn(s),_=this.getXOffsetForPosition(t,s,m,c,d,u),v=this.getXOffsetForPosition(t,s,y,c,d,u);this.renderDecoration(e,o,_,h,v-_,a)}getXOffsetForPosition(e,t,n,o,r,s){if(n===1)return W0;if((n-1)*r>=s)return s;let l=e.get(t);if(!l){let c=this._model.getLineContent(t);l=[W0];let d=W0;for(let u=1;u=s){l[u]=s;break}l[u]=p,d=p}e.set(t,l)}return n-1w?Math.floor((o-w)/2):0,x=h.a/255,k=new bp(Math.round((h.r-u.r)*x+u.r),Math.round((h.g-u.g)*x+u.g),Math.round((h.b-u.b)*x+u.b),255),D=e.topPaddingLineCount*o,E=[];for(let M=0,N=n-t+1;M=0&&Av)return;let T=y.charCodeAt(w);if(T===9){let L=h-(w+S)%h;S+=L-1,C+=L*s}else if(T===32)C+=s;else{let L=Bf(T)?2:1;for(let I=0;Iv)return}}}}},iG=class{constructor(e,t,n){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=n,this._values=[];for(let o=0,r=this._endLineNumber-this._startLineNumber+1;othis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}});var pQe=P(()=>{});var nG,mQe=P(()=>{pQe();_a();rd();Qt();nG=class extends Yr{constructor(e,t){super(e),this._viewDomNode=t;let o=this._context.configuration.options.get(143);this._widgets={},this._verticalScrollbarWidth=o.verticalScrollbarWidth,this._minimapWidth=o.minimap.minimapWidth,this._horizontalScrollbarHeight=o.horizontalScrollbarHeight,this._editorHeight=o.height,this._editorWidth=o.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=vn(document.createElement("div")),El.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=vn(document.createElement("div")),El.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){let n=this._context.configuration.options.get(143);return this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimap.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,!0}addWidget(e){let t=vn(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),e.allowEditorOverflow?this.overflowingOverlayWidgetsDomNode.appendChild(t):this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){let n=this._widgets[e.getId()];return n.preference===t?(this._updateMaxMinWidth(),!1):(n.preference=t,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){let t=e.getId();if(this._widgets.hasOwnProperty(t)){let o=this._widgets[t].domNode.domNode;delete this._widgets[t],o.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var e,t;let n=0,o=Object.keys(this._widgets);for(let r=0,s=o.length;r{_a();sa();rd();Mi();Pr();r1();ap();Vi();hpe=class{constructor(e,t){let n=e.options;this.lineHeight=n.get(66),this.pixelRatio=n.get(141),this.overviewRulerLanes=n.get(82),this.renderBorder=n.get(81);let o=t.getColor(cXe);this.borderColor=o?o.toString():null,this.hideCursor=n.get(59);let r=t.getColor(nq);this.cursorColor=r?r.transparent(.7).toString():null,this.themeType=t.type;let s=n.get(72),a=s.enabled,l=s.side,c=t.getColor(dXe),d=Eo.getDefaultBackground();c?this.backgroundColor=c:a&&l==="right"?this.backgroundColor=d:this.backgroundColor=null;let h=n.get(143).overviewRuler;this.top=h.top,this.right=h.right,this.domWidth=h.width,this.domHeight=h.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);let[f,p]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=f,this.w=p}_initLanes(e,t,n){let o=t-e;if(n>=3){let r=Math.floor(o/3),s=Math.floor(o/3),a=o-r-s,l=e,c=l+r,d=l+r+a;return[[0,l,c,l,d,l,c,l],[0,r,a,r+a,s,r+a+s,a+s,r+a+s]]}else if(n===2){let r=Math.floor(o/2),s=o-r,a=e,l=a+r;return[[0,a,a,a,l,a,a,a],[0,r,r,r,s,r+s,r+s,r+s]]}else{let r=e,s=o;return[[0,r,r,r,r,r,r,r],[0,s,s,s,s,s,s,s]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&it.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}},oG=class extends Yr{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=vn(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Eo.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){let t=new hpe(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(t)?!1:(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,n=e.selections.length;tp.lineNumber===m.lineNumber)&&(this._actualShouldRender=2),this._actualShouldRender===1)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");let n=this._settings.canvasWidth,o=this._settings.canvasHeight,r=this._settings.lineHeight,s=this._context.viewLayout,a=this._context.viewLayout.getScrollHeight(),l=o/a,c=6*this._settings.pixelRatio|0,d=c/2|0,u=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(u.fillStyle=it.Format.CSS.formatHexA(e),u.fillRect(0,0,n,o)):(u.clearRect(0,0,n,o),u.fillStyle=it.Format.CSS.formatHexA(e),u.fillRect(0,0,n,o)):u.clearRect(0,0,n,o);let h=this._settings.x,f=this._settings.w;for(let p of t){let m=p.color,y=p.data;u.fillStyle=m;let _=0,v=0,b=0;for(let C=0,w=y.length/3;Co&&(T=o-d),D=T-d,E=T+d}D>b+1||S!==_?(C!==0&&u.fillRect(h[_],v,f[_],b-v),_=S,v=D,b=E):E>b&&(b=E)}u.fillRect(h[_],v,f[_],b-v)}if(!this._settings.hideCursor&&this._settings.cursorColor){let p=2*this._settings.pixelRatio|0,m=p/2|0,y=this._settings.x[7],_=this._settings.w[7];u.fillStyle=this._settings.cursorColor;let v=-100,b=-100;for(let C=0,w=this._cursorPositions.length;Co&&(x=o-m);let k=x-m,D=k+p;k>b+1?(C!==0&&u.fillRect(y,v,_,b-v),v=k,b=D):D>b&&(b=D)}u.fillRect(y,v,_,b-v)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(u.beginPath(),u.lineWidth=1,u.strokeStyle=this._settings.borderColor,u.moveTo(0,0),u.lineTo(0,o),u.stroke(),u.moveTo(0,0),u.lineTo(n,0),u.stroke())}}});var rG,jI,sG,fpe=P(()=>{rG=class{constructor(e,t,n){this._colorZoneBrand=void 0,this.from=e|0,this.to=t|0,this.colorId=n|0}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}},jI=class{constructor(e,t,n,o){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=n,this.color=o,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colorn&&(m=n-y);let _=d.color,v=this._color2Id[_];v||(v=++this._lastAssignedId,this._color2Id[_]=v,this._id2Color[v]=_);let b=new rG(m-y,m+y,v);d.setColorZone(b),a.push(b)}return this._colorZonesInvalid=!1,a.sort(rG.compare),a}}});var aG,vQe=P(()=>{_a();fpe();qw();aG=class extends hp{constructor(e,t){super(),this._context=e;let n=this._context.configuration.options;this._domNode=vn(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new sG(o=>this._context.viewLayout.getVerticalOffsetForLineNumber(o)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(n.get(66)),this._zoneManager.setPixelRatio(n.get(141)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return e.hasChanged(66)&&(this._zoneManager.setLineHeight(t.get(66)),this._render()),e.hasChanged(141)&&(this._zoneManager.setPixelRatio(t.get(141)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;let e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),o=this._zoneManager.getId2Color(),r=this._domNode.domNode.getContext("2d");return r.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(r,n,o,e),!0}_renderOneLane(e,t,n,o){let r=0,s=0,a=0;for(let l of t){let c=l.colorId,d=l.from,u=l.to;c!==r?(e.fillRect(0,s,o,a-s),r=c,e.fillStyle=n[r],s=d,a=u):a>=d?a=Math.max(a,u):(e.fillRect(0,s,o,a-s),s=d,a=u)}e.fillRect(0,s,o,a-s)}}});var _Qe=P(()=>{});var lG,bQe=P(()=>{_Qe();_a();rd();lG=class extends Yr{constructor(e){super(e),this.domNode=vn(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];let t=this._context.configuration.options;this._rulers=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._rulers=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){let e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){let a=vn(document.createElement("div"));a.setClassName("view-ruler"),a.setWidth(r),this.domNode.appendChild(a),this._renderedRulers.push(a),s--}return}let n=e-t;for(;n>0;){let o=this._renderedRulers.pop();this.domNode.removeChild(o),n--}}render(e){this._ensureRulersCount();for(let t=0,n=this._rulers.length;t{});var cG,CQe=P(()=>{yQe();_a();rd();cG=class extends Yr{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;let n=this._context.configuration.options.get(102);this._useShadows=n.useShadows,this._domNode=vn(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){let e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){let t=this._context.configuration.options.get(143);t.minimap.renderMinimap===0||t.minimap.minimapWidth>0&&t.minimap.minimapLeft===0?this._width=t.width:this._width=t.width-t.verticalScrollbarWidth}onConfigurationChanged(e){let n=this._context.configuration.options.get(102);return this._useShadows=n.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}});var wQe=P(()=>{});function ETt(i){return new ppe(i)}function DTt(i){return new mpe(i.lineNumber,i.ranges.map(ETt))}function dG(i){return i<0?-i:i}var ppe,mpe,Dm,xQe=P(()=>{wQe();mv();pr();No();ppe=class{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}},mpe=class{constructor(e,t){this.lineNumber=e,this.ranges=t}};Dm=class i extends pu{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;let t=this._context.configuration.options;this._lineHeight=t.get(66),this._roundedSelection=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._lineHeight=t.get(66),this._roundedSelection=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,n=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,n){let o=this._typicalHalfwidthCharacterWidth/4,r=null,s=null;if(n&&n.length>0&&t.length>0){let a=t[0].lineNumber;if(a===e.startLineNumber)for(let c=0;!r&&c=0;c--)n[c].lineNumber===l&&(s=n[c].ranges[0]);r&&!r.startStyle&&(r=null),s&&!s.startStyle&&(s=null)}for(let a=0,l=t.length;a0){let p=t[a-1].ranges[0].left,m=t[a-1].ranges[0].left+t[a-1].ranges[0].width;dG(d-p)p&&(h.top=1),dG(u-m)'}_actualRenderOneSelection(e,t,n,o){if(o.length===0)return;let r=!!o[0].ranges[0].startStyle,s=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),l=o[0].lineNumber,c=o[o.length-1].lineNumber;for(let d=0,u=o.length;d1,c)}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t.map(([s,a])=>s+a)}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};Dm.SELECTION_CLASS_NAME="selected-text";Dm.SELECTION_TOP_LEFT="top-left-radius";Dm.SELECTION_BOTTOM_LEFT="bottom-left-radius";Dm.SELECTION_TOP_RIGHT="top-right-radius";Dm.SELECTION_BOTTOM_RIGHT="bottom-right-radius";Dm.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background";Dm.ROUNDED_PIECE_WIDTH=10;Qs((i,e)=>{let t=i.getColor(AYe);t&&!t.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${t}; }`)})});var SQe=P(()=>{});var uG,qI,kQe=P(()=>{Qt();_a();Ri();Vf();Ks();Mi();Kt();uq();uG=class{constructor(e,t,n,o,r,s,a){this.top=e,this.left=t,this.paddingLeft=n,this.width=o,this.height=r,this.textContent=s,this.textContentClassName=a}},qI=class{constructor(e){this._context=e;let t=this._context.configuration.options,n=t.get(50);this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=vn(document.createElement("div")),this._domNode.setClassName(`cursor ${h4}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),Gr(this._domNode,n),this._domNode.setDisplay("none"),this._position=new ke(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){let t=this._context.configuration.options,n=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),Gr(this._domNode,n),!0}onCursorPositionChanged(e,t){return t?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=e,!0}_getGraphemeAwarePosition(){let{lineNumber:e,column:t}=this._position,n=this._context.viewModel.getLineContent(e),[o,r]=lqe(n,t-1);return[new ke(e,o+1),n.substring(o,r)]}_prepareRender(e){let t="",n="",[o,r]=this._getGraphemeAwarePosition();if(this._cursorStyle===Na.Line||this._cursorStyle===Na.LineThin){let h=e.visibleRangeForPosition(o);if(!h||h.outsideRenderedLine)return null;let f=pi(this._domNode.domNode),p;this._cursorStyle===Na.Line?(p=xhe(f,this._lineCursorWidth>0?this._lineCursorWidth:2),p>2&&(t=r,n=this._getTokenClassName(o))):p=xhe(f,1);let m=h.left,y=0;p>=2&&m>=1&&(y=1,m-=y);let _=e.getVerticalOffsetForLineNumber(o.lineNumber)-e.bigNumbersDelta;return new uG(_,m,y,p,this._lineHeight,t,n)}let s=e.linesVisibleRangesForRange(new O(o.lineNumber,o.column,o.lineNumber,o.column+r.length),!1);if(!s||s.length===0)return null;let a=s[0];if(a.outsideRenderedLine||a.ranges.length===0)return null;let l=a.ranges[0],c=r===" "?this._typicalHalfwidthCharacterWidth:l.width<1?this._typicalHalfwidthCharacterWidth:l.width;this._cursorStyle===Na.Block&&(t=r,n=this._getTokenClassName(o));let d=e.getVerticalOffsetForLineNumber(o.lineNumber)-e.bigNumbersDelta,u=this._lineHeight;return(this._cursorStyle===Na.Underline||this._cursorStyle===Na.UnderlineThin)&&(d+=this._lineHeight-2,u=2),new uG(d,l.left,0,c,u,t,n)}_getTokenClassName(e){let t=this._context.viewModel.getViewLineData(e.lineNumber),n=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(n)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${h4} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}});var GI,LQe=P(()=>{SQe();_a();Qi();rd();kQe();Ks();r1();No();fp();Qt();GI=class i extends Yr{constructor(e){super(e);let t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new qI(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=vn(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new Zs,this._cursorFlatBlinkInterval=new $3,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){let t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let n=0,o=this._secondaryCursors.length;nt.length){let r=this._secondaryCursors.length-t.length;for(let s=0;s{for(let o=0,r=e.ranges.length;o{this._isVisible?this._hide():this._show()},i.BLINK_INTERVAL,pi(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},i.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case Na.Line:e+=" cursor-line-style";break;case Na.Block:e+=" cursor-block-style";break;case Na.Underline:e+=" cursor-underline-style";break;case Na.LineThin:e+=" cursor-line-thin-style";break;case Na.BlockOutline:e+=" cursor-block-outline-style";break;case Na.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{let t=i.getColor(nq);if(t){let n=i.getColor(ZZe);n||(n=t.opposite()),e.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${t}; border-color: ${t}; color: ${n}; }`),Ac(i.type)&&e.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}})});function TTt(i,e){try{return i(e)}catch(t){hi(t)}}var gpe,hG,EQe=P(()=>{_a();Pi();rd();Mi();gpe=()=>{throw new Error("Invalid change accessor")},hG=class extends Yr{constructor(e){super(e);let t=this._context.configuration.options,n=t.get(143);this._lineHeight=t.get(66),this._contentWidth=n.contentWidth,this._contentLeft=n.contentLeft,this.domNode=vn(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=vn(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){let e=this._context.viewLayout.getWhitespaces(),t=new Map;for(let o of e)t.set(o.id,o);let n=!1;return this._context.viewModel.changeWhitespace(o=>{let r=Object.keys(this._zones);for(let s=0,a=r.length;s{let o={addZone:r=>(t=!0,this._addZone(n,r)),removeZone:r=>{r&&(t=this._removeZone(n,r)||t)},layoutZone:r=>{r&&(t=this._layoutZone(n,r)||t)}};TTt(e,o),o.addZone=gpe,o.removeZone=gpe,o.layoutZone=gpe}),t}_addZone(e,t){let n=this._computeWhitespaceProps(t),r={whitespaceId:e.insertWhitespace(n.afterViewLineNumber,this._getZoneOrdinal(t),n.heightInPx,n.minWidthInPx),delegate:t,isInHiddenArea:n.isInHiddenArea,isVisible:!1,domNode:vn(t.domNode),marginDomNode:t.marginDomNode?vn(t.marginDomNode):null};return this._safeCallOnComputedHeight(r.delegate,n.heightInPx),r.domNode.setPosition("absolute"),r.domNode.domNode.style.width="100%",r.domNode.setDisplay("none"),r.domNode.setAttribute("monaco-view-zone",r.whitespaceId),this.domNode.appendChild(r.domNode),r.marginDomNode&&(r.marginDomNode.setPosition("absolute"),r.marginDomNode.domNode.style.width="100%",r.marginDomNode.setDisplay("none"),r.marginDomNode.setAttribute("monaco-view-zone",r.whitespaceId),this.marginDomNode.appendChild(r.marginDomNode)),this._zones[r.whitespaceId]=r,this.setShouldRender(),r.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){let n=this._zones[t];return delete this._zones[t],e.removeWhitespace(n.whitespaceId),n.domNode.removeAttribute("monaco-visible-view-zone"),n.domNode.removeAttribute("monaco-view-zone"),n.domNode.domNode.parentNode.removeChild(n.domNode.domNode),n.marginDomNode&&(n.marginDomNode.removeAttribute("monaco-visible-view-zone"),n.marginDomNode.removeAttribute("monaco-view-zone"),n.marginDomNode.domNode.parentNode.removeChild(n.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){let n=this._zones[t],o=this._computeWhitespaceProps(n.delegate);return n.isInHiddenArea=o.isInHiddenArea,e.changeOneWhitespace(n.whitespaceId,o.afterViewLineNumber,o.heightInPx),this._safeCallOnComputedHeight(n.delegate,o.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){return this._zones.hasOwnProperty(e)?!!this._zones[e].delegate.suppressMouseDown:!1}_heightInPixels(e){return typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(t)}catch(n){hi(n)}}_safeCallOnDomNodeTop(e,t){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(t)}catch(n){hi(n)}}prepareRender(e){}render(e){let t=e.viewportData.whitespaceViewportData,n={},o=!1;for(let s of t)this._zones[s.id].isInHiddenArea||(n[s.id]=s,o=!0);let r=Object.keys(this._zones);for(let s=0,a=r.length;s{});var fG,pG,TQe=P(()=>{DQe();mv();Ri();lv();Mi();r1();fG=class extends pu{constructor(e){super(),this._context=e,this._options=new pG(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=new pG(this._context.configuration);return this._options.equals(t)?e.hasChanged(143):(this._options=t,!0)}onCursorStateChanged(e){return this._selection=e.selections,this._options.renderWhitespace==="selection"}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}prepareRender(e){if(this._options.renderWhitespace==="none"){this._renderResult=null;return}let t=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber-t+1,r=new Array(o);for(let a=0;aa)continue;let f=h.startLineNumber===a?h.startColumn:c.minColumn,p=h.endLineNumber===a?h.endColumn:c.maxColumn;f=E.endOffset&&(D++,E=n&&n[D]),L!==9&&L!==32||h&&!S&&T<=k)continue;if(u&&T>=x&&T<=k&&L===32){let M=T-1>=0?a.charCodeAt(T-1):0,N=T+1=0?a.charCodeAt(T-1):0;if(L===32&&M!==32&&M!==9)continue}if(n&&(!E||E.startOffset>T||E.endOffset<=T))continue;let I=e.visibleRangeForPosition(new ke(t,T+1));I&&(s?(A=Math.max(A,I.left),L===9?w+=this._renderArrow(f,y,I.left):w+=``):L===9?w+=`
${C?"\uFFEB":"\u2192"}
`:w+=`
${String.fromCharCode(b)}
`)}return s?(A=Math.round(A+y),``+w+""):w}_renderArrow(e,t,n){let o=t/7,r=t,s=e/2,a=n,l={x:0,y:o/2},c={x:100/125*r,y:l.y},d={x:c.x-.2*c.x,y:c.y+.2*c.x},u={x:d.x+.1*c.x,y:d.y+.1*c.x},h={x:u.x+.35*c.x,y:u.y-.35*c.x},f={x:h.x,y:-h.y},p={x:u.x,y:-u.y},m={x:d.x,y:-d.y},y={x:c.x,y:-c.y},_={x:l.x,y:-l.y};return``}render(e,t){if(!this._renderResult)return"";let n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}},pG=class{constructor(e){let t=e.options,n=t.get(50),o=t.get(38);o==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):o==="svg"?(this.renderWhitespace=t.get(98),this.renderWithSVG=!0):(this.renderWhitespace=t.get(98),this.renderWithSVG=!1),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(66),this.stopRenderingLineAfter=t.get(116)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}});var mG,IQe=P(()=>{Kt();mG=class{constructor(e,t,n,o){this.selections=e,this.startLineNumber=t.startLineNumber|0,this.endLineNumber=t.endLineNumber|0,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=t.bigNumbersDelta|0,this.whitespaceViewportData=n,this._model=o,this.visibleRange=new O(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}});var gG,MQe=P(()=>{gG=class{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}});var vG,NQe=P(()=>{MQe();vG=class{constructor(e,t,n){this.configuration=e,this.theme=new gG(t),this.viewModel=n,this.viewLayout=n.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}});function yv(i){try{return i()}catch(e){return hi(e),null}}var ITt,MTt,_G,KI,AQe=P(()=>{Qt();_a();t1e();Pi();b1e();qZe();MXe();Kw();HXe();BXe();rd();q1e();WXe();UXe();jXe();GXe();KXe();$q();XXe();P1e();eQe();iQe();O1e();oQe();fQe();mQe();gQe();vQe();bQe();CQe();xQe();LQe();EQe();TQe();Mi();Kt();zo();Ca();qw();IQe();NQe();_i();No();ITt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},MTt=function(i,e){return function(t,n){e(t,n,i)}},_G=class extends hp{constructor(e,t,n,o,r,s,a){super(),this._instantiationService=a,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new jt(1,1,1,1)],this._renderAnimationFrame=null;let l=new Iq(t,o,r,e);this._context=new vG(t,n,o),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(hq,this._context,l,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=vn(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=vn(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=vn(document.createElement("div")),El.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new Wq(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new UI(this._context,this._linesContent),this._viewZones=new hG(this._context),this._viewParts.push(this._viewZones);let c=new oG(this._context);this._viewParts.push(c);let d=new cG(this._context);this._viewParts.push(d);let u=new Aq(this._context);this._viewParts.push(u),u.addDynamicOverlay(new Hq(this._context)),u.addDynamicOverlay(new Dm(this._context)),u.addDynamicOverlay(new Kq(this._context)),u.addDynamicOverlay(new Vq(this._context)),u.addDynamicOverlay(new fG(this._context));let h=new Rq(this._context);this._viewParts.push(h),h.addDynamicOverlay(new Bq(this._context)),h.addDynamicOverlay(new Zq(this._context)),h.addDynamicOverlay(new Yq(this._context)),h.addDynamicOverlay(new sb(this._context)),this._glyphMarginWidgets=new Uq(this._context),this._viewParts.push(this._glyphMarginWidgets);let f=new gv(this._context);f.getDomNode().appendChild(this._viewZones.marginDomNode),f.getDomNode().appendChild(h.getDomNode()),f.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(f),this._contentWidgets=new Oq(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new GI(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new nG(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);let p=new lG(this._context);this._viewParts.push(p);let m=new Pq(this._context);this._viewParts.push(m);let y=new tG(this._context);if(this._viewParts.push(y),c){let _=this._scrollbar.getOverviewRulerLayoutInfo();_.parent.insertBefore(c.getDomNode(),_.insertBefore)}this._linesContent.appendChild(u.getDomNode()),this._linesContent.appendChild(p.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(f.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(d.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(y.getDomNode()),this._overflowGuardContainer.appendChild(m.domNode),this.domNode.appendChild(this._overflowGuardContainer),s?(s.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),s.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new Xj(this._context,l,this._createPointerHandlerHelper()))}_computeGlyphMarginLanes(){let e=this._context.viewModel.model,t=this._context.viewModel.glyphLanes,n=[],o=0;n=n.concat(e.getAllMarginDecorations().map(r=>{var s,a,l;let c=(a=(s=r.options.glyphMargin)===null||s===void 0?void 0:s.position)!==null&&a!==void 0?a:lu.Center;return o=Math.max(o,r.range.endLineNumber),{range:r.range,lane:c,persist:(l=r.options.glyphMargin)===null||l===void 0?void 0:l.persistLane}})),n=n.concat(this._glyphMarginWidgets.getWidgets().map(r=>{let s=e.validateRange(r.preference.range);return o=Math.max(o,s.endLineNumber),{range:s,lane:r.preference.lane}})),n.sort((r,s)=>O.compareRangesUsingStarts(r.range,s.range)),t.reset(o);for(let r of n)t.push(r.lane,r.range,r.persist);return t}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{let e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new Oj(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new ke(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){let t=this._context.configuration.options.get(143);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){let e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(140)+" "+NI(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(let e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new fo;if(this._renderAnimationFrame===null){let e=this._createCoordinatedRendering();this._renderAnimationFrame=KI.INSTANCE.scheduleCoordinatedRendering({window:pi(this.domNode.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new fo;try{return e.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new fo;return e.renderText()},prepareRender:(t,n)=>{if(this._store.isDisposed)throw new fo;return e.prepareRender(t,n)},render:(t,n)=>{if(this._store.isDisposed)throw new fo;return e.render(t,n)}})}}_flushAccumulatedAndRenderNow(){let e=this._createCoordinatedRendering();yv(()=>e.prepareRenderText());let t=yv(()=>e.renderText());if(t){let[n,o]=t;yv(()=>e.prepareRender(n,o)),yv(()=>e.render(n,o))}}_getViewPartsToRender(){let e=[],t=0;for(let n of this._viewParts)n.shouldRender()&&(e[t++]=n);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=!1;let e=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(e.requiredLanes)}Jg.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return null;let t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);let n=new mG(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(n),this._viewLines.shouldRender()&&(this._viewLines.renderText(n),this._viewLines.onDidRender(),e=this._getViewPartsToRender()),[e,new Tj(this._context.viewLayout,n,this._viewLines)]},prepareRender:(e,t)=>{for(let n of e)n.prepareRender(t)},render:(e,t)=>{for(let n of e)n.render(t),n.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){let n=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),o=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n);this._flushAccumulatedAndRenderNow();let r=this._viewLines.visibleRangeForPosition(new ke(o.lineNumber,o.column));return r?r.left:-1}getTargetAtClientPoint(e,t){let n=this._pointerHandler.getTargetAtClientPoint(e,t);return n?rx.convertViewToModelMouseTarget(n,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new aG(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(let n of this._viewParts)n.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var t,n,o,r,s,a,l,c;this._contentWidgets.setWidgetPosition(e.widget,(n=(t=e.position)===null||t===void 0?void 0:t.position)!==null&&n!==void 0?n:null,(r=(o=e.position)===null||o===void 0?void 0:o.secondaryPosition)!==null&&r!==void 0?r:null,(a=(s=e.position)===null||s===void 0?void 0:s.preference)!==null&&a!==void 0?a:null,(c=(l=e.position)===null||l===void 0?void 0:l.positionAffinity)!==null&&c!==void 0?c:null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){let t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){let t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};_G=ITt([MTt(6,qt)],_G);KI=class{constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{let t=this._coordinatedRenderings.indexOf(e);if(t!==-1&&(this._coordinatedRenderings.splice(t,1),this._coordinatedRenderings.length===0)){for(let[n,o]of this._animationFrameRunners)o.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){let t=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,qC(e,t,100))}}_onRenderScheduled(){let e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(let n of e)yv(()=>n.prepareRenderText());let t=[];for(let n=0,o=e.length;nr.renderText())}for(let n=0,o=e.length;nr.prepareRender(a,l))}for(let n=0,o=e.length;nr.render(a,l))}}};KI.INSTANCE=new KI});var ux,vpe=P(()=>{ux=class{constructor(e,t,n,o,r,s,a){this.id=e,this.label=t,this.alias=n,this.metadata=o,this._precondition=r,this._run=s,this._contextKeyService=a}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}});function Qh(i){let e=0,t=0,n=0,o=0;for(let r=0,s=i.length;r{});var YI,_pe,bG,RQe=P(()=>{YI=class{constructor(e,t,n,o){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=n,this.isInvalid=o}},_pe=class{constructor(e,t,n,o,r,s){this.range=e,this.openingBracketRange=t,this.closingBracketRange=n,this.nestingLevel=o,this.nestingLevelOfEqualBracketType=r,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}},bG=class extends _pe{constructor(e,t,n,o,r,s,a){super(e,t,n,o,r,s),this.minVisibleColumnIndentation=a}}});function PQe(i,e,t,n){return i!==t?as(t-i,n):as(0,n-e)}function hx(i){return i===0}function as(i,e){return i*Jh+e}function Dd(i){let e=i,t=Math.floor(e/Jh),n=e-t*Jh;return new Cv(t,n)}function OQe(i){return Math.floor(i/Jh)}function tr(i,e){let t=i+e;return e>=Jh&&(t=t-i%Jh),t}function zQe(i,e){return i.reduce((t,n)=>tr(t,e(n)),Wa)}function bpe(i,e){return i===e}function wb(i,e){let t=i,n=e;if(n-t<=0)return Wa;let r=Math.floor(t/Jh),s=Math.floor(n/Jh),a=n-s*Jh;if(r===s){let l=t-r*Jh;return as(0,a-l)}else return as(s-r,a)}function _4(i,e){return i=e}function xv(i){return as(i.lineNumber-1,i.column-1)}function Sv(i,e){let t=i,n=Math.floor(t/Jh),o=t-n*Jh,r=e,s=Math.floor(r/Jh),a=r-s*Jh;return new O(n+1,o+1,s+1,a+1)}function FQe(i){let e=Ec(i);return as(e.length-1,e[e.length-1].length)}var Cv,Wa,Jh,Tm=P(()=>{Ri();Kt();Cv=class{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}};Cv.zero=new Cv(0,0);Wa=0;Jh=2**26});var yp,yG,ype,ZI=P(()=>{Kt();Tm();yp=class i{static fromModelContentChanges(e){return e.map(n=>{let o=O.lift(n.range);return new i(xv(o.getStartPosition()),xv(o.getEndPosition()),FQe(n.text))}).reverse()}constructor(e,t,n){this.startOffset=e,this.endOffset=t,this.newLength=n}toString(){return`[${Dd(this.startOffset)}...${Dd(this.endOffset)}) -> ${Dd(this.newLength)}`}},yG=class{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(t=>ype.from(t))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);let t=this.edits[this.nextEditIdx],n=t?this.translateOldToCur(t.offsetObj):null;return n===null?null:wb(e,n)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?as(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):as(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){let t=Dd(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?as(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):as(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx{CG=[],il=class i{static create(e,t){if(e<=128&&t.length===0){let n=i.cache[e];return n||(n=new i(e,t),i.cache[e]=n),n}return new i(e,t)}static getEmpty(){return this.empty}constructor(e,t){this.items=e,this.additionalItems=t}add(e,t){let n=t.getKey(e),o=n>>5;if(o===0){let s=1<{Pi();mp();Tm();xb();XI=class{get length(){return this._length}constructor(e){this._length=e}},QI=class i extends XI{static create(e,t,n){let o=e.length;return t&&(o=tr(o,t.length)),n&&(o=tr(o,n.length)),new i(o,e,t,n,t?t.missingOpeningBracketIds:il.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){let e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,n,o,r){super(e),this.openingBracket=t,this.child=n,this.closingBracket=o,this.missingOpeningBracketIds=r}canBeReused(e){return!(this.closingBracket===null||e.intersects(this.missingOpeningBracketIds))}deepClone(){return new i(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation(tr(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}},ef=class extends XI{static create23(e,t,n,o=!1){let r=e.length,s=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(r=tr(r,t.length),s=s.merge(t.missingOpeningBracketIds),n){if(e.listHeight!==n.listHeight)throw new Error("Invalid list heights");r=tr(r,n.length),s=s.merge(n.missingOpeningBracketIds)}return o?new wpe(r,e.listHeight+1,e,t,n,s):new JI(r,e.listHeight+1,e,t,n,s)}static getEmpty(){return new xpe(Wa,0,[],il.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,n){super(e),this.listHeight=t,this._missingOpeningBracketIds=n,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();let e=this.childrenLength;if(e===0)return;let t=this.getChild(e-1),n=t.kind===4?t.toMutable():t;return t!==n&&this.setChild(e-1,n),n}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;let t=this.getChild(0),n=t.kind===4?t.toMutable():t;return t!==n&&this.setChild(0,n),n}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds)||this.childrenLength===0)return!1;let t=this;for(;t.kind===4;){let n=t.childrenLength;if(n===0)throw new fo;t=t.getChild(n-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();let e=this.childrenLength,t=this.getChild(0).length,n=this.getChild(0).missingOpeningBracketIds;for(let o=1;o{Pi();B5();iM();Tm();xb();Mm=class{constructor(e,t,n,o,r){this.length=e,this.kind=t,this.bracketId=n,this.bracketIds=o,this.astNode=r}},mx=class{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new Spe(this.textModel,this.bracketTokens),this._offset=Wa,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return as(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=tr(this._offset,e);let t=Dd(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=tr(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}},Spe=class{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,this.line!==null&&(this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){let r=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=r.length,r}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));let e=this.lineIdx,t=this.lineCharOffset,n=0;for(;;){let r=this.lineTokens,s=r.getCount(),a=null;if(this.lineTokenOffset1e3))break;if(n>1500)break}let o=PQe(e,t,this.lineIdx,this.lineCharOffset);return new Mm(o,0,-1,il.getEmpty(),new Im(o))}},SG=class{constructor(e,t){this.text=e,this._offset=Wa,this.idx=0;let n=t.getRegExpStr(),o=n?new RegExp(n+`| `,"gi"):null,r=[],s,a=0,l=0,c=0,d=0,u=[];for(let p=0;p<60;p++)u.push(new Mm(as(0,p),0,-1,il.getEmpty(),new Im(as(0,p))));let h=[];for(let p=0;p<60;p++)h.push(new Mm(as(1,p),0,-1,il.getEmpty(),new Im(as(1,p))));if(o)for(o.lastIndex=0;(s=o.exec(e))!==null;){let p=s.index,m=s[0];if(m===` -`)a++,l=p+1;else{if(c!==p){let y;if(d===a){let _=p-c;if(_{Ri();iM();Tm();xb();wG();kpe=class i{static createFromLanguage(e,t){function n(r){return t.getKey(`${r.languageId}:::${r.bracketText}`)}let o=new Map;for(let r of e.bracketsNew.openingBrackets){let s=as(0,r.bracketText.length),a=n(r),l=il.getEmpty().add(a,Cpe);o.set(r.bracketText,new Mm(s,1,a,l,tM.create(s,r,l)))}for(let r of e.bracketsNew.closingBrackets){let s=as(0,r.bracketText.length),a=il.getEmpty(),l=r.getOpeningBrackets();for(let c of l)a=a.add(n(c),Cpe);o.set(r.bracketText,new Mm(s,2,n(l[0]),a,tM.create(s,r,a)))}return new i(o)}constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{let e=[...this.map.keys()];return e.sort(),e.reverse(),e.map(t=>RTt(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){let e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(let[t,n]of this.map)if(n.kind===2&&n.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}};gx=class{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=kpe.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}});function BQe(i){if(i.length===0)return null;if(i.length===1)return i[0];let e=0;function t(){if(e>=i.length)return null;let s=e,a=i[s].listHeight;for(e++;e=2?Dpe(s===0&&e===i.length?i:i.slice(s,e),!1):i[s]}let n=t(),o=t();if(!o)return n;for(let s=t();s;s=t())HQe(n,o)<=HQe(o,s)?(n=Epe(n,o),o=s):o=Epe(o,s);return Epe(n,o)}function Dpe(i,e=!1){if(i.length===0)return null;if(i.length===1)return i[0];let t=i.length;for(;t>3;){let n=t>>1;for(let o=0;o=3?i[2]:null,e)}function HQe(i,e){return Math.abs(i.listHeight-e.listHeight)}function Epe(i,e){return i.listHeight===e.listHeight?ef.create23(i,e,null,!1):i.listHeight>e.listHeight?PTt(i,e):OTt(e,i)}function PTt(i,e){i=i.toMutable();let t=i,n=[],o;for(;;){if(e.listHeight===t.listHeight){o=e;break}if(t.kind!==4)throw new Error("unexpected");n.push(t),t=t.makeLastElementMutable()}for(let r=n.length-1;r>=0;r--){let s=n[r];o?s.childrenLength>=3?o=ef.create23(s.unappendChild(),o,null,!1):(s.appendChildOfSameHeight(o),o=void 0):s.handleChildrenChanged()}return o?ef.create23(i,o,null,!1):i}function OTt(i,e){i=i.toMutable();let t=i,n=[];for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");n.push(t),t=t.makeFirstElementMutable()}let o=e;for(let r=n.length-1;r>=0;r--){let s=n[r];o?s.childrenLength>=3?o=ef.create23(o,s.unprependChild(),null,!1):(s.prependChildOfSameHeight(o),o=void 0):s.handleChildrenChanged()}return o?ef.create23(o,i,null,!1):i}var VQe=P(()=>{iM()});function Tpe(i,e=-1){for(;;){if(e++,e>=i.childrenLength)return-1;if(i.getChild(e))return e}}function nM(i){return i.length>0?i[i.length-1]:void 0}var xG,WQe=P(()=>{Tm();xG=class{constructor(e){this.lastOffset=Wa,this.nextNodes=[e],this.offsets=[Wa],this.idxs=[]}readLongestNodeAt(e,t){if(_4(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){let n=nM(this.nextNodes);if(!n)return;let o=nM(this.offsets);if(_4(e,o))return;if(_4(o,e))if(tr(o,n.length)<=e)this.nextNodeAfterCurrent();else{let r=Tpe(n);r!==-1?(this.nextNodes.push(n.getChild(r)),this.offsets.push(o),this.idxs.push(r)):this.nextNodeAfterCurrent()}else{if(t(n))return this.nextNodeAfterCurrent(),n;{let r=Tpe(n);if(r===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(n.getChild(r)),this.offsets.push(o),this.idxs.push(r)}}}}nextNodeAfterCurrent(){for(;;){let e=nM(this.offsets),t=nM(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;let n=nM(this.nextNodes),o=Tpe(n,this.idxs[this.idxs.length-1]);if(o!==-1){this.nextNodes.push(n.getChild(o)),this.offsets.push(tr(e,t.length)),this.idxs[this.idxs.length-1]=o;break}else this.idxs.pop()}}}});function oM(i,e,t,n){return new Ipe(i,e,t,n).parseDocument()}var Ipe,Mpe=P(()=>{iM();ZI();xb();Tm();VQe();WQe();Ipe=class{constructor(e,t,n,o){if(this.tokenizer=e,this.createImmutableLists=o,this._itemsConstructed=0,this._itemsFromCache=0,n&&o)throw new Error("Not supported");this.oldNodeReader=n?new xG(n):void 0,this.positionMapper=new vG(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(il.getEmpty(),0);return e||(e=ef.getEmpty()),e}parseList(e,t){let n=[];for(;;){let r=this.tryReadChildFromCache(e);if(!r){let s=this.tokenizer.peek();if(!s||s.kind===2&&s.bracketIds.intersects(e))break;r=this.parseChild(e,t+1)}r.kind===4&&r.childrenLength===0||n.push(r)}return this.oldNodeReader?BQe(n):Dpe(n,this.createImmutableLists)}tryReadChildFromCache(e){if(this.oldNodeReader){let t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(t===null||!hx(t)){let n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),o=>t!==null&&!_4(o.length,t)?!1:o.canBeReused(e));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(e,t){this._itemsConstructed++;let n=this.tokenizer.read();switch(n.kind){case 2:return new yG(n.bracketIds,n.length);case 0:return n.astNode;case 1:{if(t>300)return new Im(n.length);let o=e.merge(n.bracketIds),r=this.parseList(o,t+1),s=this.tokenizer.peek();return s&&s.kind===2&&(s.bracketId===n.bracketId||s.bracketIds.intersects(n.bracketIds))?(this.tokenizer.read(),QI.create(n.astNode,r,s.astNode)):QI.create(n.astNode,r,null)}default:throw new Error("unexpected")}}}});function vx(i,e){if(i.length===0)return e;if(e.length===0)return i;let t=new qc(UQe(i)),n=UQe(e);n.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let o=t.dequeue();function r(c){if(c===void 0){let u=t.takeWhile(h=>!0)||[];return o&&u.unshift(o),u}let d=[];for(;o&&!hx(c);){let[u,h]=o.splitAt(c);d.push(u),c=wb(u.lengthAfter,c),o=h??t.dequeue()}return hx(c)||d.push(new rM(!1,c,c)),d}let s=[];function a(c,d,u){if(s.length>0&&bpe(s[s.length-1].endOffset,c)){let h=s[s.length-1];s[s.length-1]=new yp(h.startOffset,d,tr(h.newLength,u))}else s.push({startOffset:c,endOffset:d,newLength:u})}let l=Wa;for(let c of n){let d=r(c.lengthBefore);if(c.modified){let u=zQe(d,f=>f.lengthBefore),h=tr(l,u);a(l,h,c.lengthAfter),l=h}else for(let u of d){let h=l;l=tr(l,u.lengthBefore),u.modified&&a(h,l,u.lengthAfter)}}return s}function UQe(i){let e=[],t=Wa;for(let n of i){let o=wb(t,n.startOffset);hx(o)||e.push(new rM(!1,o,o));let r=wb(n.startOffset,n.endOffset);e.push(new rM(!0,r,n.newLength)),t=n.endOffset}return e}var rM,Npe=P(()=>{Vi();ZI();Tm();rM=class i{constructor(e,t,n){this.modified=e,this.lengthBefore=t,this.lengthAfter=n}splitAt(e){let t=wb(e,this.lengthAfter);return bpe(t,Wa)?[this,void 0]:this.modified?[new i(this.modified,this.lengthBefore,e),new i(this.modified,Wa,t)]:[new i(this.modified,e,e),new i(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${Dd(this.lengthBefore)} -> ${Dd(this.lengthAfter)}`}}});function $Qe(i,e,t,n){if(i.kind===4||i.kind===2){let o=[];for(let r of i.children)t=tr(e,r.length),o.push({nodeOffsetStart:e,nodeOffsetEnd:t}),e=t;for(let r=o.length-1;r>=0;r--){let{nodeOffsetStart:s,nodeOffsetEnd:a}=o[r];if(_4(s,n)){let l=$Qe(i.children[r],s,a,n);if(l)return l}}return null}else{if(i.kind===3)return null;if(i.kind===1){let o=xv(e,t);return{bracketInfo:i.bracketInfo,range:o}}}return null}function jQe(i,e,t,n){if(i.kind===4||i.kind===2){for(let o of i.children){if(t=tr(e,o.length),_4(n,t)){let r=jQe(o,e,t,n);if(r)return r}e=t}return null}else{if(i.kind===3)return null;if(i.kind===1){let o=xv(e,t);return{bracketInfo:i.bracketInfo,range:o}}}return null}function Ape(i,e,t,n,o,r,s,a,l,c,d=!1){if(s>200)return!0;e:for(;;)switch(i.kind){case 4:{let u=i.childrenLength;for(let h=0;h200)return!0;let c=!0;if(i.kind===2){let d=0;if(a){let f=a.get(i.openingBracket.text);f===void 0&&(f=0),d=f,f++,a.set(i.openingBracket.text,f)}let u=tr(e,i.openingBracket.length),h=-1;if(r.includeMinIndentation&&(h=i.computeMinIndentation(e,r.textModel)),c=r.push(new gG(xv(e,t),xv(e,u),i.closingBracket?xv(tr(u,((l=i.child)===null||l===void 0?void 0:l.length)||Wa),t):void 0,s,d,i,h)),e=u,c&&i.child){let f=i.child;if(t=tr(e,f.length),Cv(e,o)&&fx(t,n)&&(c=Ppe(f,e,t,n,o,r,s+1,a),!c))return!1}a?.set(i.openingBracket.text,d)}else{let d=e;for(let u of i.children){let h=d;if(d=tr(d,u.length),Cv(h,o)&&Cv(n,d)&&(c=Ppe(u,h,d,n,o,r,s,a),!c))return!1}}return c}var SG,Rpe,qQe=P(()=>{Xt();nt();RQe();ZI();Lpe();Tm();Mpe();xb();wG();Vi();Npe();SG=class extends ue{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new ge,this.denseKeyProvider=new px,this.brackets=new gx(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)e.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{let n=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),o=new CG(this.textModel.getValue(),n);this.initialAstWithoutTokens=oM(o,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){let e=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){let t=e.map(n=>new yp(as(n.fromLineNumber-1,0),as(n.toLineNumber,0),as(n.toLineNumber-n.fromLineNumber+1,0)));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){let t=yp.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){let n=vx(this.queuedTextEdits,e);this.queuedTextEdits=n,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=vx(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,n){let r=t,s=new mx(this.textModel,this.brackets);return oM(s,e,r,n)}getBracketsInRange(e,t){this.flushQueue();let n=as(e.startLineNumber-1,e.startColumn-1),o=as(e.endLineNumber-1,e.endColumn-1);return new nm(r=>{let s=this.initialAstWithoutTokens||this.astWithTokens;Ape(s,Wa,s.length,n,o,r,0,0,new Map,t)})}getBracketPairsInRange(e,t){this.flushQueue();let n=wv(e.getStartPosition()),o=wv(e.getEndPosition());return new nm(r=>{let s=this.initialAstWithoutTokens||this.astWithTokens,a=new Rpe(r,t,this.textModel);Ppe(s,Wa,s.length,n,o,a,0,new Map)})}getFirstBracketAfter(e){this.flushQueue();let t=this.initialAstWithoutTokens||this.astWithTokens;return jQe(t,Wa,t.length,wv(e))}getFirstBracketBefore(e){this.flushQueue();let t=this.initialAstWithoutTokens||this.astWithTokens;return $Qe(t,Wa,t.length,wv(e))}};Rpe=class{constructor(e,t,n){this.push=e,this.includeMinIndentation=t,this.textModel=n}}});function zTt(i,e){return{object:i,dispose:()=>e?.dispose()}}function Ope(i){if(typeof i>"u")return()=>!0;{let e=Date.now();return()=>Date.now()-e<=i}}function kG(i){return i instanceof Nm?null:i}var LG,Nm,GQe=P(()=>{Vi();Xt();nt();Kt();D5();u$();qQe();LG=class extends ue{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new To),this.onDidChangeEmitter=new ge,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(n=>{var o;(!n.languageId||!((o=this.bracketPairsTree.value)===null||o===void 0)&&o.object.didLanguageChange(n.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;(t=this.bracketPairsTree.value)===null||t===void 0||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;(e=this.bracketPairsTree.value)===null||e===void 0||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;(t=this.bracketPairsTree.value)===null||t===void 0||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){let e=new Ye;this.bracketPairsTree.value=zTt(e.add(new SG(this.textModel,t=>this.languageConfigurationService.getLanguageConfiguration(t))),e),e.add(this.bracketPairsTree.value.object.onDidChange(t=>this.onDidChangeEmitter.fire(t))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e,!1))||nm.empty}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e,!0))||nm.empty}getBracketsInRange(e,t=!1){var n;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((n=this.bracketPairsTree.value)===null||n===void 0?void 0:n.object.getBracketsInRange(e,t))||nm.empty}findMatchingBracketUp(e,t,n){let o=this.textModel.validatePosition(t),r=this.textModel.getLanguageIdAtPosition(o.lineNumber,o.column);if(this.canBuildAST){let s=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew.getClosingBracketInfo(e);if(!s)return null;let a=this.getBracketPairsInRange(O.fromPositions(t,t)).findLast(l=>s.closes(l.openingBracketInfo));return a?a.openingBracketRange:null}else{let s=e.toLowerCase(),a=this.languageConfigurationService.getLanguageConfiguration(r).brackets;if(!a)return null;let l=a.textIsBracket[s];return l?kG(this._findMatchingBracketUp(l,o,Ope(n))):null}}matchBracket(e,t){if(this.canBuildAST){let n=this.getBracketPairsInRange(O.fromPositions(e,e)).filter(o=>o.closingBracketRange!==void 0&&(o.openingBracketRange.containsPosition(e)||o.closingBracketRange.containsPosition(e))).findLastMaxBy(Sc(o=>o.openingBracketRange.containsPosition(e)?o.openingBracketRange:o.closingBracketRange,O.compareRangesUsingStarts));return n?[n.openingBracketRange,n.closingBracketRange]:null}else{let n=Ope(t);return this._matchBracket(this.textModel.validatePosition(e),n)}}_establishBracketSearchOffsets(e,t,n,o){let r=t.getCount(),s=t.getLanguageId(o),a=Math.max(0,e.column-1-n.maxBracketLength);for(let c=o-1;c>=0;c--){let d=t.getEndOffset(c);if(d<=a)break;if(sp(t.getStandardTokenType(c))||t.getLanguageId(c)!==s){a=d;break}}let l=Math.min(t.getLineContent().length,e.column-1+n.maxBracketLength);for(let c=o+1;c=l)break;if(sp(t.getStandardTokenType(c))||t.getLanguageId(c)!==s){l=d;break}}return{searchStartOffset:a,searchEndOffset:l}}_matchBracket(e,t){let n=e.lineNumber,o=this.textModel.tokenization.getLineTokens(n),r=this.textModel.getLineContent(n),s=o.findTokenIndexAtOffset(e.column-1);if(s<0)return null;let a=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId(s)).brackets;if(a&&!sp(o.getStandardTokenType(s))){let{searchStartOffset:l,searchEndOffset:c}=this._establishBracketSearchOffsets(e,o,a,s),d=null;for(;;){let u=au.findNextBracketInRange(a.forwardRegex,n,r,l,c);if(!u)break;if(u.startColumn<=e.column&&e.column<=u.endColumn){let h=r.substring(u.startColumn-1,u.endColumn-1).toLowerCase(),f=this._matchFoundBracket(u,a.textIsBracket[h],a.textIsOpenBracket[h],t);if(f){if(f instanceof Nm)return null;d=f}}l=u.endColumn-1}if(d)return d}if(s>0&&o.getStartOffset(s)===e.column-1){let l=s-1,c=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId(l)).brackets;if(c&&!sp(o.getStandardTokenType(l))){let{searchStartOffset:d,searchEndOffset:u}=this._establishBracketSearchOffsets(e,o,c,l),h=au.findPrevBracketInRange(c.reversedRegex,n,r,d,u);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){let f=r.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),p=this._matchFoundBracket(h,c.textIsBracket[f],c.textIsOpenBracket[f],t);if(p)return p instanceof Nm?null:p}}}return null}_matchFoundBracket(e,t,n,o){if(!t)return null;let r=n?this._findMatchingBracketDown(t,e.getEndPosition(),o):this._findMatchingBracketUp(t,e.getStartPosition(),o);return r?r instanceof Nm?r:[e,r]:null}_findMatchingBracketUp(e,t,n){let o=e.languageId,r=e.reversedRegex,s=-1,a=0,l=(c,d,u,h)=>{for(;;){if(n&&++a%100===0&&!n())return Nm.INSTANCE;let f=au.findPrevBracketInRange(r,c,d,u,h);if(!f)break;let p=d.substring(f.startColumn-1,f.endColumn-1).toLowerCase();if(e.isOpen(p)?s++:e.isClose(p)&&s--,s===0)return f;h=f.startColumn-1}return null};for(let c=t.lineNumber;c>=1;c--){let d=this.textModel.tokenization.getLineTokens(c),u=d.getCount(),h=this.textModel.getLineContent(c),f=u-1,p=h.length,m=h.length;c===t.lineNumber&&(f=d.findTokenIndexAtOffset(t.column-1),p=t.column-1,m=t.column-1);let y=!0;for(;f>=0;f--){let _=d.getLanguageId(f)===o&&!sp(d.getStandardTokenType(f));if(_)y?p=d.getStartOffset(f):(p=d.getStartOffset(f),m=d.getEndOffset(f));else if(y&&p!==m){let v=l(c,h,p,m);if(v)return v}y=_}if(y&&p!==m){let _=l(c,h,p,m);if(_)return _}}return null}_findMatchingBracketDown(e,t,n){let o=e.languageId,r=e.forwardRegex,s=1,a=0,l=(d,u,h,f)=>{for(;;){if(n&&++a%100===0&&!n())return Nm.INSTANCE;let p=au.findNextBracketInRange(r,d,u,h,f);if(!p)break;let m=u.substring(p.startColumn-1,p.endColumn-1).toLowerCase();if(e.isOpen(m)?s++:e.isClose(m)&&s--,s===0)return p;h=p.endColumn-1}return null},c=this.textModel.getLineCount();for(let d=t.lineNumber;d<=c;d++){let u=this.textModel.tokenization.getLineTokens(d),h=u.getCount(),f=this.textModel.getLineContent(d),p=0,m=0,y=0;d===t.lineNumber&&(p=u.findTokenIndexAtOffset(t.column-1),m=t.column-1,y=t.column-1);let _=!0;for(;p=1;a--){let l=this.textModel.tokenization.getLineTokens(a),c=l.getCount(),d=this.textModel.getLineContent(a),u=c-1,h=d.length,f=d.length;if(a===n.lineNumber){u=l.findTokenIndexAtOffset(n.column-1),h=n.column-1,f=n.column-1;let m=l.getLanguageId(u);o!==m&&(o=m,r=this.languageConfigurationService.getLanguageConfiguration(o).brackets,s=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew)}let p=!0;for(;u>=0;u--){let m=l.getLanguageId(u);if(o!==m){if(r&&s&&p&&h!==f){let _=au.findPrevBracketInRange(r.reversedRegex,a,d,h,f);if(_)return this._toFoundBracket(s,_);p=!1}o=m,r=this.languageConfigurationService.getLanguageConfiguration(o).brackets,s=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew}let y=!!r&&!sp(l.getStandardTokenType(u));if(y)p?h=l.getStartOffset(u):(h=l.getStartOffset(u),f=l.getEndOffset(u));else if(s&&r&&p&&h!==f){let _=au.findPrevBracketInRange(r.reversedRegex,a,d,h,f);if(_)return this._toFoundBracket(s,_)}p=y}if(s&&r&&p&&h!==f){let m=au.findPrevBracketInRange(r.reversedRegex,a,d,h,f);if(m)return this._toFoundBracket(s,m)}}return null}findNextBracket(e){var t;let n=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getFirstBracketAfter(n))||null;let o=this.textModel.getLineCount(),r=null,s=null,a=null;for(let l=n.lineNumber;l<=o;l++){let c=this.textModel.tokenization.getLineTokens(l),d=c.getCount(),u=this.textModel.getLineContent(l),h=0,f=0,p=0;if(l===n.lineNumber){h=c.findTokenIndexAtOffset(n.column-1),f=n.column-1,p=n.column-1;let y=c.getLanguageId(h);r!==y&&(r=y,s=this.languageConfigurationService.getLanguageConfiguration(r).brackets,a=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew)}let m=!0;for(;hm.closingBracketRange!==void 0&&m.range.strictContainsRange(f));return p?[p.openingBracketRange,p.closingBracketRange]:null}let o=Ope(t),r=this.textModel.getLineCount(),s=new Map,a=[],l=(f,p)=>{if(!s.has(f)){let m=[];for(let y=0,_=p?p.brackets.length:0;y<_;y++)m[y]=0;s.set(f,m)}a=s.get(f)},c=0,d=(f,p,m,y,_)=>{for(;;){if(o&&++c%100===0&&!o())return Nm.INSTANCE;let v=au.findNextBracketInRange(f.forwardRegex,p,m,y,_);if(!v)break;let b=m.substring(v.startColumn-1,v.endColumn-1).toLowerCase(),C=f.textIsBracket[b];if(C&&(C.isOpen(b)?a[C.index]++:C.isClose(b)&&a[C.index]--,a[C.index]===-1))return this._matchFoundBracket(v,C,!1,o);y=v.endColumn-1}return null},u=null,h=null;for(let f=n.lineNumber;f<=r;f++){let p=this.textModel.tokenization.getLineTokens(f),m=p.getCount(),y=this.textModel.getLineContent(f),_=0,v=0,b=0;if(f===n.lineNumber){_=p.findTokenIndexAtOffset(n.column-1),v=n.column-1,b=n.column-1;let w=p.getLanguageId(_);u!==w&&(u=w,h=this.languageConfigurationService.getLanguageConfiguration(u).brackets,l(u,h))}let C=!0;for(;_{Xt();nt();Kt();r1();No();EG=class extends ue{constructor(e){super(),this.textModel=e,this.colorProvider=new DG,this.onDidChangeEmitter=new ge,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(t=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,n,o){return o?[]:t===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map(s=>({id:`bracket${s.range.toString()}-${s.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(s,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:s.range})).toArray():[]}getAllDecorations(e,t){return e===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new O(1,1,this.textModel.getLineCount(),1),e,t):[]}},DG=class{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}};Qs((i,e)=>{let t=[iq,nq,oq,rq,sq,aq],n=new DG;e.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${i.getColor(mXe)}; }`);let o=t.map(r=>i.getColor(r)).filter(r=>!!r).filter(r=>!r.isTransparent());for(let r=0;r<30;r++){let s=o[r%o.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(r)} { color: ${s}; }`)}})});function TG(i){return i.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}function YQe(i,e){return i===null||i.length===0?e:new zpe(i,e).compress()}var tf,zpe,Fpe=P(()=>{ew();J0();tf=class i{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,n,o){this.oldPosition=e,this.oldText=t,this.newPosition=n,this.newText=o}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${TG(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${TG(this.oldText)}")`:`(replace@${this.oldPosition} "${TG(this.oldText)}" with "${TG(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){let o=t.length;Yf(e,o,n),n+=4;for(let r=0;ri.length)return!1;if(t){if(!OC(i,e))return!1;if(e.length===i.length)return!0;let r=e.length;return e.charAt(e.length-1)===n&&r--,i.charAt(r)===n}return e.charAt(e.length-1)!==n&&(e+=n),i.indexOf(e)===0}function XQe(i){return i>=65&&i<=90||i>=97&&i<=122}function QQe(i,e=hr){return e?XQe(i.charCodeAt(0))&&i.charCodeAt(1)===58:!1}var IG=P(()=>{Dg();Mn();Ri()});function Am(i){return hT(i,!0)}var aM,gr,jTi,qTi,_x,GTi,KTi,tJe,Il,iJe,kv,nJe,oJe,rJe,Vpe,YTi,JQe,eJe,ZTi,XTi,h2,ec=P(()=>{IG();Nc();Dg();Mn();Ri();Io();aM=class{constructor(e){this._ignorePathCasing=e}compare(e,t,n=!1){return e===t?0:A3(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}isEqual(e,t,n=!1){return e===t?!0:!e||!t?!1:this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,n=!1){if(e.scheme===t.scheme){if(e.scheme===$i.file)return sM(Am(e),Am(t),this._ignorePathCasing(e))&&e.query===t.query&&(n||e.fragment===t.fragment);if(JQe(e.authority,t.authority))return sM(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(n||e.fragment===t.fragment)}return!1}joinPath(e,...t){return li.joinPath(e,...t)}basenameOrAuthority(e){return Il(e)||e.authority}basename(e){return hs.basename(e.path)}extname(e){return hs.extname(e.path)}dirname(e){if(e.path.length===0)return e;let t;return e.scheme===$i.file?t=li.file(aW(Am(e))).path:(t=hs.dirname(e.path),e.authority&&t.length&&t.charCodeAt(0)!==47&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return e.scheme===$i.file?t=li.file(sW(Am(e))).path:t=hs.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!JQe(e.authority,t.authority))return;if(e.scheme===$i.file){let r=jje(Am(e),Am(t));return hr?Hpe(r):r}let n=e.path||"/",o=t.path||"/";if(this._ignorePathCasing(e)){let r=0;for(let s=Math.min(n.length,o.length);rBpe(n).length&&n[n.length-1]===t}else{let n=e.path;return n.length>1&&n.charCodeAt(n.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=Zu){return eJe(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=Zu){let n=!1;if(e.scheme===$i.file){let o=Am(e);n=o!==void 0&&o.length===Bpe(o).length&&o[o.length-1]===t}else{t="/";let o=e.path;n=o.length===1&&o.charCodeAt(o.length-1)===47}return!n&&!eJe(e,t)?e.with({path:e.path+"/"}):e}},gr=new aM(()=>!1),jTi=new aM(i=>i.scheme===$i.file?!Ar:!0),qTi=new aM(i=>!0),_x=gr.isEqual.bind(gr),GTi=gr.isEqualOrParent.bind(gr),KTi=gr.getComparisonKey.bind(gr),tJe=gr.basenameOrAuthority.bind(gr),Il=gr.basename.bind(gr),iJe=gr.extname.bind(gr),kv=gr.dirname.bind(gr),nJe=gr.joinPath.bind(gr),oJe=gr.normalizePath.bind(gr),rJe=gr.relativePath.bind(gr),Vpe=gr.resolvePath.bind(gr),YTi=gr.isAbsolutePath.bind(gr),JQe=gr.isEqualAuthority.bind(gr),eJe=gr.hasTrailingPathSeparator.bind(gr),ZTi=gr.removeTrailingPathSeparator.bind(gr),XTi=gr.addTrailingPathSeparator.bind(gr);(function(i){i.META_DATA_LABEL="label",i.META_DATA_DESCRIPTION="description",i.META_DATA_SIZE="size",i.META_DATA_MIME="mime";function e(t){let n=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(s=>{let[a,l]=s.split(":");a&&l&&n.set(a,l)});let r=t.path.substring(0,t.path.indexOf(";"));return r&&n.set(i.META_DATA_MIME,r),n}i.parseMetaData=e})(h2||(h2={}))});function bx(i){return i.toString()}function Upe(i){return i.getEOL()===` -`?0:1}function f2(i){return i?i instanceof MG||i instanceof Wpe:!1}var hh,MG,Wpe,NG,$pe=P(()=>{Wt();Pi();zo();Io();Fpe();ew();ec();hh=class i{static create(e,t){let n=e.getAlternativeVersionId(),o=Upe(e);return new i(n,n,o,o,t,t,[])}constructor(e,t,n,o,r,s,a){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=n,this.afterEOL=o,this.beforeCursorState=r,this.afterCursorState=s,this.changes=a}append(e,t,n,o,r){t.length>0&&(this.changes=YQe(this.changes,t)),this.afterEOL=n,this.afterVersionId=o,this.afterCursorState=r}static _writeSelectionsSize(e){return 4+4*4*(e?e.length:0)}static _writeSelections(e,t,n){if(Yf(e,t?t.length:0,n),n+=4,t)for(let o of t)Yf(e,o.selectionStartLineNumber,n),n+=4,Yf(e,o.selectionStartColumn,n),n+=4,Yf(e,o.positionLineNumber,n),n+=4,Yf(e,o.positionColumn,n),n+=4;return n}static _readSelections(e,t,n){let o=Kf(e,t);t+=4;for(let r=0;rt.toString()).join(", ")}matchesResource(e){return(li.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof hh}append(e,t,n,o,r){this._data instanceof hh&&this._data.append(e,t,n,o,r)}close(){this._data instanceof hh&&(this._data=this._data.serialize())}open(){this._data instanceof hh||(this._data=hh.deserialize(this._data))}undo(){if(li.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof hh&&(this._data=this._data.serialize());let e=hh.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(li.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof hh&&(this._data=this._data.serialize());let e=hh.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof hh&&(this._data=this._data.serialize()),this._data.byteLength+168}},Wpe=class{get resources(){return this._editStackElementsArr.map(e=>e.resource)}constructor(e,t,n){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=n.slice(0),this._editStackElementsMap=new Map;for(let o of this._editStackElementsArr){let r=bx(o.resource);this._editStackElementsMap.set(r,o)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){let t=bx(e);return this._editStackElementsMap.has(t)}setModel(e){let t=bx(li.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;let t=bx(e.uri);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).canAppend(e):!1}append(e,t,n,o,r){let s=bx(e.uri);this._editStackElementsMap.get(s).append(e,t,n,o,r)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(let e of this._editStackElementsArr)e.undo()}redo(){for(let e of this._editStackElementsArr)e.redo()}heapSize(e){let t=bx(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){let e=[];for(let t of this._editStackElementsArr)e.push(`${Il(t.resource)}: ${t}`);return`{${e.join(", ")}}`}};NG=class i{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);f2(e)&&e.close()}popStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);f2(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){let n=this._undoRedoService.getLastElement(this._model.uri);if(f2(n)&&n.canAppend(this._model))return n;let o=new MG(g("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(o,t),o}pushEOL(e){let t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],Upe(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,n,o){let r=this._getOrCreateEditStackElement(e,o),s=this._model.applyEdits(t,!0),a=i._computeCursorState(n,s),l=s.map((c,d)=>({index:d,textChange:c.textChange}));return l.sort((c,d)=>c.textChange.oldPosition===d.textChange.oldPosition?c.index-d.index:c.textChange.oldPosition-d.textChange.oldPosition),r.append(this._model,l.map(c=>c.textChange),Upe(this._model),this._model.getAlternativeVersionId(),a),a}static _computeCursorState(e,t){try{return e?e(t):null}catch(n){return hi(n),null}}}});function BTt(i,e,t,n,o){o.spacesDiff=0,o.looksLikeAlignment=!1;let r;for(r=0;r0&&a>0||l>0&&c>0)return;let d=Math.abs(a-c),u=Math.abs(s-l);if(d===0){o.spacesDiff=u,u>0&&0<=l-1&&l-10?o++:C>1&&r++,BTt(s,a,y,b,u),u.looksLikeAlignment&&!(t&&e===u.spacesDiff)))continue;let S=u.spacesDiff;S<=c&&d[S]++,s=y,a=b}let h=t;o!==r&&(h=o{let y=d[m];y>p&&(p=y,f=m)}),f===4&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(f=2)}return{insertSpaces:h,tabSize:f}}var jpe,sJe=P(()=>{jpe=class{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}});function vu(i){return(i.metadata&1)>>>0}function Ir(i,e){i.metadata=i.metadata&254|e<<0}function tc(i){return(i.metadata&2)>>>1===1}function vr(i,e){i.metadata=i.metadata&253|(e?1:0)<<1}function fJe(i){return(i.metadata&4)>>>2===1}function aJe(i,e){i.metadata=i.metadata&251|(e?1:0)<<2}function pJe(i){return(i.metadata&64)>>>6===1}function lJe(i,e){i.metadata=i.metadata&191|(e?1:0)<<6}function VTt(i){return(i.metadata&24)>>>3}function cJe(i,e){i.metadata=i.metadata&231|e<<3}function WTt(i){return(i.metadata&32)>>>5===1}function dJe(i,e){i.metadata=i.metadata&223|(e?1:0)<<5}function UTt(i){let e=i.root,t=0;for(;e!==Wn;){if(e.left!==Wn&&!tc(e.left)){e=e.left;continue}if(e.right!==Wn&&!tc(e.right)){t+=e.delta,e=e.right;continue}e.start=t+e.start,e.end=t+e.end,e.delta=0,b4(e),vr(e,!0),vr(e.left,!1),vr(e.right,!1),e===e.parent.right&&(t-=e.parent.delta),e=e.parent}vr(i.root,!1)}function yx(i,e,t,n){return it||n===1?!1:n===2?!0:e}function $Tt(i,e,t,n,o){let r=VTt(i),s=r===0||r===2,a=r===1||r===2,l=t-e,c=n,d=Math.min(l,c),u=i.start,h=!1,f=i.end,p=!1;e<=u&&f<=t&&WTt(i)&&(i.start=e,h=!0,i.end=e,p=!0);{let y=o?1:l>0?2:0;!h&&yx(u,s,e,y)&&(h=!0),!p&&yx(f,a,e,y)&&(p=!0)}if(d>0&&!o){let y=l>c?2:0;!h&&yx(u,s,e+d,y)&&(h=!0),!p&&yx(f,a,e+d,y)&&(p=!0)}{let y=o?1:0;!h&&yx(u,s,t,y)&&(i.start=e+c,h=!0),!p&&yx(f,a,t,y)&&(i.end=e+c,p=!0)}let m=c-l;h||(i.start=Math.max(0,u+m)),p||(i.end=Math.max(0,f+m)),i.start>i.end&&(i.end=i.start)}function jTt(i,e,t){let n=i.root,o=0,r=0,s=0,a=0,l=[],c=0;for(;n!==Wn;){if(tc(n)){vr(n.left,!1),vr(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;continue}if(!tc(n.left)){if(r=o+n.maxEnd,rt){vr(n,!0);continue}if(a=o+n.end,a>=e&&(n.setCachedOffsets(s,a,0),l[c++]=n),vr(n,!0),n.right!==Wn&&!tc(n.right)){o+=n.delta,n=n.right;continue}}return vr(i.root,!1),l}function qTt(i,e,t,n){let o=i.root,r=0,s=0,a=0,l=n-(t-e);for(;o!==Wn;){if(tc(o)){vr(o.left,!1),vr(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),b4(o),o=o.parent;continue}if(!tc(o.left)){if(s=r+o.maxEnd,st){o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(i.requestNormalizeDelta=!0),vr(o,!0);continue}if(vr(o,!0),o.right!==Wn&&!tc(o.right)){r+=o.delta,o=o.right;continue}}vr(i.root,!1)}function GTt(i,e){let t=i.root,n=[],o=0;for(;t!==Wn;){if(tc(t)){vr(t.left,!1),vr(t.right,!1),t=t.parent;continue}if(t.left!==Wn&&!tc(t.left)){t=t.left;continue}if(t.ownerId===e&&(n[o++]=t),vr(t,!0),t.right!==Wn&&!tc(t.right)){t=t.right;continue}}return vr(i.root,!1),n}function KTt(i){let e=i.root,t=[],n=0;for(;e!==Wn;){if(tc(e)){vr(e.left,!1),vr(e.right,!1),e=e.parent;continue}if(e.left!==Wn&&!tc(e.left)){e=e.left;continue}if(e.right!==Wn&&!tc(e.right)){e=e.right;continue}t[n++]=e,vr(e,!0)}return vr(i.root,!1),t}function YTt(i,e,t,n,o){let r=i.root,s=0,a=0,l=0,c=[],d=0;for(;r!==Wn;){if(tc(r)){vr(r.left,!1),vr(r.right,!1),r===r.parent.right&&(s-=r.parent.delta),r=r.parent;continue}if(r.left!==Wn&&!tc(r.left)){r=r.left;continue}a=s+r.start,l=s+r.end,r.setCachedOffsets(a,l,n);let u=!0;if(e&&r.ownerId&&r.ownerId!==e&&(u=!1),t&&fJe(r)&&(u=!1),o&&!pJe(r)&&(u=!1),u&&(c[d++]=r),vr(r,!0),r.right!==Wn&&!tc(r.right)){s+=r.delta,r=r.right;continue}}return vr(i.root,!1),c}function ZTt(i,e,t,n,o,r,s){let a=i.root,l=0,c=0,d=0,u=0,h=[],f=0;for(;a!==Wn;){if(tc(a)){vr(a.left,!1),vr(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;continue}if(!tc(a.left)){if(c=l+a.maxEnd,ct){vr(a,!0);continue}if(u=l+a.end,u>=e){a.setCachedOffsets(d,u,r);let p=!0;n&&a.ownerId&&a.ownerId!==n&&(p=!1),o&&fJe(a)&&(p=!1),s&&!pJe(a)&&(p=!1),p&&(h[f++]=a)}if(vr(a,!0),a.right!==Wn&&!tc(a.right)){l+=a.delta,a=a.right;continue}}return vr(i.root,!1),h}function uJe(i,e){if(i.root===Wn)return e.parent=Wn,e.left=Wn,e.right=Wn,Ir(e,0),i.root=e,i.root;XTt(i,e),Lv(e.parent);let t=e;for(;t!==i.root&&vu(t.parent)===1;)if(t.parent===t.parent.parent.left){let n=t.parent.parent.right;vu(n)===1?(Ir(t.parent,0),Ir(n,0),Ir(t.parent.parent,1),t=t.parent.parent):(t===t.parent.right&&(t=t.parent,lM(i,t)),Ir(t.parent,0),Ir(t.parent.parent,1),cM(i,t.parent.parent))}else{let n=t.parent.parent.left;vu(n)===1?(Ir(t.parent,0),Ir(n,0),Ir(t.parent.parent,1),t=t.parent.parent):(t===t.parent.left&&(t=t.parent,cM(i,t)),Ir(t.parent,0),Ir(t.parent.parent,1),lM(i,t.parent.parent))}return Ir(i.root,0),e}function XTt(i,e){let t=0,n=i.root,o=e.start,r=e.end;for(;;)if(JTt(o,r,n.start+t,n.end+t)<0)if(n.left===Wn){e.start-=t,e.end-=t,e.maxEnd-=t,n.left=e;break}else n=n.left;else if(n.right===Wn){e.start-=t+n.delta,e.end-=t+n.delta,e.maxEnd-=t+n.delta,n.right=e;break}else t+=n.delta,n=n.right;e.parent=n,e.left=Wn,e.right=Wn,Ir(e,1)}function hJe(i,e){let t,n;if(e.left===Wn?(t=e.right,n=e,t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta):e.right===Wn?(t=e.left,n=e):(n=QTt(e.right),t=n.right,t.start+=n.delta,t.end+=n.delta,t.delta+=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),n.start+=e.delta,n.end+=e.delta,n.delta=e.delta,(n.delta<-1073741824||n.delta>1073741824)&&(i.requestNormalizeDelta=!0)),n===i.root){i.root=t,Ir(t,0),e.detach(),Gpe(),b4(t),i.root.parent=Wn;return}let o=vu(n)===1;if(n===n.parent.left?n.parent.left=t:n.parent.right=t,n===e?t.parent=n.parent:(n.parent===e?t.parent=n:t.parent=n.parent,n.left=e.left,n.right=e.right,n.parent=e.parent,Ir(n,vu(e)),e===i.root?i.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left!==Wn&&(n.left.parent=n),n.right!==Wn&&(n.right.parent=n)),e.detach(),o){Lv(t.parent),n!==e&&(Lv(n),Lv(n.parent)),Gpe();return}Lv(t),Lv(t.parent),n!==e&&(Lv(n),Lv(n.parent));let r;for(;t!==i.root&&vu(t)===0;)t===t.parent.left?(r=t.parent.right,vu(r)===1&&(Ir(r,0),Ir(t.parent,1),lM(i,t.parent),r=t.parent.right),vu(r.left)===0&&vu(r.right)===0?(Ir(r,1),t=t.parent):(vu(r.right)===0&&(Ir(r.left,0),Ir(r,1),cM(i,r),r=t.parent.right),Ir(r,vu(t.parent)),Ir(t.parent,0),Ir(r.right,0),lM(i,t.parent),t=i.root)):(r=t.parent.left,vu(r)===1&&(Ir(r,0),Ir(t.parent,1),cM(i,t.parent),r=t.parent.left),vu(r.left)===0&&vu(r.right)===0?(Ir(r,1),t=t.parent):(vu(r.left)===0&&(Ir(r.right,0),Ir(r,1),lM(i,r),r=t.parent.left),Ir(r,vu(t.parent)),Ir(t.parent,0),Ir(r.left,0),cM(i,t.parent),t=i.root));Ir(t,0),Gpe()}function QTt(i){for(;i.left!==Wn;)i=i.left;return i}function Gpe(){Wn.parent=Wn,Wn.delta=0,Wn.start=0,Wn.end=0}function lM(i,e){let t=e.right;t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta,e.right=t.left,t.left!==Wn&&(t.left.parent=e),t.parent=e.parent,e.parent===Wn?i.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,b4(e),b4(t)}function cM(i,e){let t=e.left;e.delta-=t.delta,(e.delta<-1073741824||e.delta>1073741824)&&(i.requestNormalizeDelta=!0),e.start-=t.delta,e.end-=t.delta,e.left=t.right,t.right!==Wn&&(t.right.parent=e),t.parent=e.parent,e.parent===Wn?i.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t,b4(e),b4(t)}function mJe(i){let e=i.end;if(i.left!==Wn){let t=i.left.maxEnd;t>e&&(e=t)}if(i.right!==Wn){let t=i.right.maxEnd+i.delta;t>e&&(e=t)}return e}function b4(i){i.maxEnd=mJe(i)}function Lv(i){for(;i!==Wn;){let e=mJe(i);if(i.maxEnd===e)return;i.maxEnd=e,i=i.parent}}function JTt(i,e,t,n){return i===t?e-n:i-t}var dM,Wn,Cx,gJe=P(()=>{dM=class{constructor(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,Ir(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,aJe(this,!1),lJe(this,!1),cJe(this,1),dJe(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,vr(this,!1)}reset(e,t,n,o){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=o}setOptions(e){this.options=e;let t=this.options.className;aJe(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),lJe(this,this.options.glyphMarginClassName!==null),cJe(this,this.options.stickiness),dJe(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}},Wn=new dM(null,0,0);Wn.parent=Wn;Wn.left=Wn;Wn.right=Wn;Ir(Wn,0);Cx=class{constructor(){this.root=Wn,this.requestNormalizeDelta=!1}intervalSearch(e,t,n,o,r,s){return this.root===Wn?[]:ZTt(this,e,t,n,o,r,s)}search(e,t,n,o){return this.root===Wn?[]:YTt(this,e,t,n,o)}collectNodesFromOwner(e){return GTt(this,e)}collectNodesPostOrder(){return KTt(this)}insert(e){uJe(this,e),this._normalizeDeltaIfNecessary()}delete(e){hJe(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){let n=e,o=0;for(;e!==this.root;)e===e.parent.right&&(o+=e.parent.delta),e=e.parent;let r=n.start+o,s=n.end+o;n.setCachedOffsets(r,s,t)}acceptReplace(e,t,n,o){let r=jTt(this,e,e+t);for(let s=0,a=r.length;s{wx=class{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==bn)return AG(this.right);let e=this;for(;e.parent!==bn&&e.parent.left!==e;)e=e.parent;return e.parent===bn?bn:e.parent}prev(){if(this.left!==bn)return Ype(this.left);let e=this;for(;e.parent!==bn&&e.parent.right!==e;)e=e.parent;return e.parent===bn?bn:e.parent}detach(){this.parent=null,this.left=null,this.right=null}},bn=new wx(null,0);bn.parent=bn;bn.left=bn;bn.right=bn;bn.color=0});function _Je(i){let e;return i[i.length-1]<65536?e=new Uint16Array(i.length):e=new Uint32Array(i.length),e.set(i,0),e}function m2(i,e=!0){let t=[0],n=1;for(let o=0,r=i.length;o126)&&(s=!1)}let a=new Jpe(_Je(i),n,o,r,s);return i.length=0,a}var y4,Jpe,Td,g2,eme,tme,RG,ime=P(()=>{Mi();Kt();Ca();vJe();JT();y4=65535;Jpe=class{constructor(e,t,n,o,r){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=o,this.isBasicASCII=r}};Td=class{constructor(e,t,n,o,r){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=o,this.length=r}},g2=class{constructor(e,t){this.buffer=e,this.lineStarts=t}},eme=class{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==bn&&e.iterate(e.root,n=>(n!==bn&&this._pieces.push(n.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}},tme=class{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){let n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,n=this._cache;for(let o=0;o=e){n[o]=null,t=!0;continue}}if(t){let o=[];for(let r of n)r!==null&&o.push(r);this._cache=o}}},RG=class{constructor(e,t,n){this.create(e,t,n)}create(e,t,n){this._buffers=[new g2("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=bn,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;let o=null;for(let r=0,s=e.length;r0){e[r].lineStarts||(e[r].lineStarts=m2(e[r].buffer));let a=new Td(r+1,{line:0,column:0},{line:e[r].lineStarts.length-1,column:e[r].buffer.length-e[r].lineStarts[e[r].lineStarts.length-1]},e[r].lineStarts.length-1,e[r].buffer.length);this._buffers.push(e[r]),o=this.rbInsertRight(o,a)}this._searchCache=new tme(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=y4,n=t-Math.floor(t/3),o=n*2,r="",s=0,a=[];if(this.iterate(this.root,l=>{let c=this.getNodeContent(l),d=c.length;if(s<=n||s+d0){let l=r.replace(/\r\n|\r|\n/g,e);a.push(new g2(l,m2(l)))}this.create(a,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new eme(this,e)}getOffsetAt(e,t){let n=0,o=this.root;for(;o!==bn;)if(o.left!==bn&&o.lf_left+1>=e)o=o.left;else if(o.lf_left+o.piece.lineFeedCnt+1>=e){n+=o.size_left;let r=this.getAccumulatedValue(o,e-o.lf_left-2);return n+=r+t-1}else e-=o.lf_left+o.piece.lineFeedCnt,n+=o.size_left+o.piece.length,o=o.right;return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0,o=e;for(;t!==bn;)if(t.size_left!==0&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){let r=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+r.index,r.index===0){let s=this.getOffsetAt(n+1,1),a=o-s;return new ke(n+1,a+1)}return new ke(n+1,r.remainder+1)}else if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===bn){let r=this.getOffsetAt(n+1,1),s=o-e-r;return new ke(n+1,s+1)}else t=t.right;return new ke(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let n=this.nodeAt2(e.startLineNumber,e.startColumn),o=this.nodeAt2(e.endLineNumber,e.endColumn),r=this.getValueInRange2(n,o);return t?t!==this._EOL||!this._EOLNormalized?r.replace(/\r\n|\r|\n/g,t):t===this.getEOL()&&this._EOLNormalized?r:r.replace(/\r\n|\r|\n/g,t):r}getValueInRange2(e,t){if(e.node===t.node){let a=e.node,l=this._buffers[a.piece.bufferIndex].buffer,c=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return l.substring(c+e.remainder,c+t.remainder)}let n=e.node,o=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start),s=o.substring(r+e.remainder,r+n.piece.length);for(n=n.next();n!==bn;){let a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===t.node){s+=a.substring(l,l+t.remainder);break}else s+=a.substr(l,n.piece.length);n=n.next()}return s}getLinesContent(){let e=[],t=0,n="",o=!1;return this.iterate(this.root,r=>{if(r===bn)return!0;let s=r.piece,a=s.length;if(a===0)return!0;let l=this._buffers[s.bufferIndex].buffer,c=this._buffers[s.bufferIndex].lineStarts,d=s.start.line,u=s.end.line,h=c[d]+s.start.column;if(o&&(l.charCodeAt(h)===10&&(h++,a--),e[t++]=n,n="",o=!1,a===0))return!0;if(d===u)return!this._EOLNormalized&&l.charCodeAt(h+a-1)===13?(o=!0,n+=l.substr(h,a-1)):n+=l.substr(h,a),!0;n+=this._EOLNormalized?l.substring(h,Math.max(h,c[d+1]-this._EOLLength)):l.substring(h,c[d+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;for(let f=d+1;fC+p,t.reset(0)):(v=h.buffer,b=C=>C,t.reset(p));do if(y=t.next(v),y){if(b(y.index)>=m)return d;this.positionInBuffer(e,b(y.index)-f,_);let C=this.getLineFeedCnt(e.piece.bufferIndex,r,_),w=_.line===r.line?_.column-r.column+o:_.column+1,S=w+y[0].length;if(u[d++]=J3(new O(n+C,w,n+C,S),y,l),b(y.index)+y[0].length>=m||d>=c)return d}while(y);return d}findMatchesLineByLine(e,t,n,o){let r=[],s=0,a=new $g(t.wordSeparators,t.regex),l=this.nodeAt2(e.startLineNumber,e.startColumn);if(l===null)return[];let c=this.nodeAt2(e.endLineNumber,e.endColumn);if(c===null)return[];let d=this.positionInBuffer(l.node,l.remainder),u=this.positionInBuffer(c.node,c.remainder);if(l.node===c.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,d,u,t,n,o,s,r),r;let h=e.startLineNumber,f=l.node;for(;f!==c.node;){let m=this.getLineFeedCnt(f.piece.bufferIndex,d,f.piece.end);if(m>=1){let _=this._buffers[f.piece.bufferIndex].lineStarts,v=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start),b=_[d.line+m],C=h===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(f,a,h,C,d,this.positionInBuffer(f,b-v),t,n,o,s,r),s>=o)return r;h+=m}let y=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){let _=this.getLineContent(h).substring(y,e.endColumn-1);return s=this._findMatchesInLine(t,a,_,e.endLineNumber,y,s,r,n,o),r}if(s=this._findMatchesInLine(t,a,this.getLineContent(h).substr(y),h,y,s,r,n,o),s>=o)return r;h++,l=this.nodeAt2(h,1),f=l.node,d=this.positionInBuffer(l.node,l.remainder)}if(h===e.endLineNumber){let m=h===e.startLineNumber?e.startColumn-1:0,y=this.getLineContent(h).substring(m,e.endColumn-1);return s=this._findMatchesInLine(t,a,y,e.endLineNumber,m,s,r,n,o),r}let p=h===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(c.node,a,h,p,d,u,t,n,o,s,r),r}_findMatchesInLine(e,t,n,o,r,s,a,l,c){let d=e.wordSeparators;if(!l&&e.simpleSearch){let h=e.simpleSearch,f=h.length,p=n.length,m=-f;for(;(m=n.indexOf(h,m+f))!==-1;)if((!d||O$(d,n,p,m,f))&&(a[s++]=new Ug(new O(o,m+1+r,o,m+1+f+r),null),s>=c))return s;return s}let u;t.reset(0);do if(u=t.next(n),u&&(a[s++]=J3(new O(o,u.index+1+r,o,u.index+1+u[0].length+r),u,l),s>=c))return s;while(u);return s}insert(e,t,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==bn){let{node:o,remainder:r,nodeStartOffset:s}=this.nodeAt(e),a=o.piece,l=a.bufferIndex,c=this.positionInBuffer(o,r);if(o.piece.bufferIndex===0&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===e&&t.lengthe){let d=[],u=new Td(a.bufferIndex,c,a.end,this.getLineFeedCnt(a.bufferIndex,c,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,c));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.nodeCharCodeAt(o,r)===10){let m={line:u.start.line+1,column:0};u=new Td(u.bufferIndex,m,u.end,this.getLineFeedCnt(u.bufferIndex,m,u.end),u.length-1),t+=` +`)a++,l=p+1;else{if(c!==p){let y;if(d===a){let _=p-c;if(_{Ri();iM();Tm();xb();kG();kpe=class i{static createFromLanguage(e,t){function n(r){return t.getKey(`${r.languageId}:::${r.bracketText}`)}let o=new Map;for(let r of e.bracketsNew.openingBrackets){let s=as(0,r.bracketText.length),a=n(r),l=il.getEmpty().add(a,Cpe);o.set(r.bracketText,new Mm(s,1,a,l,tM.create(s,r,l)))}for(let r of e.bracketsNew.closingBrackets){let s=as(0,r.bracketText.length),a=il.getEmpty(),l=r.getOpeningBrackets();for(let c of l)a=a.add(n(c),Cpe);o.set(r.bracketText,new Mm(s,2,n(l[0]),a,tM.create(s,r,a)))}return new i(o)}constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{let e=[...this.map.keys()];return e.sort(),e.reverse(),e.map(t=>RTt(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){let e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(let[t,n]of this.map)if(n.kind===2&&n.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}};gx=class{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=kpe.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}});function BQe(i){if(i.length===0)return null;if(i.length===1)return i[0];let e=0;function t(){if(e>=i.length)return null;let s=e,a=i[s].listHeight;for(e++;e=2?Dpe(s===0&&e===i.length?i:i.slice(s,e),!1):i[s]}let n=t(),o=t();if(!o)return n;for(let s=t();s;s=t())HQe(n,o)<=HQe(o,s)?(n=Epe(n,o),o=s):o=Epe(o,s);return Epe(n,o)}function Dpe(i,e=!1){if(i.length===0)return null;if(i.length===1)return i[0];let t=i.length;for(;t>3;){let n=t>>1;for(let o=0;o=3?i[2]:null,e)}function HQe(i,e){return Math.abs(i.listHeight-e.listHeight)}function Epe(i,e){return i.listHeight===e.listHeight?ef.create23(i,e,null,!1):i.listHeight>e.listHeight?PTt(i,e):OTt(e,i)}function PTt(i,e){i=i.toMutable();let t=i,n=[],o;for(;;){if(e.listHeight===t.listHeight){o=e;break}if(t.kind!==4)throw new Error("unexpected");n.push(t),t=t.makeLastElementMutable()}for(let r=n.length-1;r>=0;r--){let s=n[r];o?s.childrenLength>=3?o=ef.create23(s.unappendChild(),o,null,!1):(s.appendChildOfSameHeight(o),o=void 0):s.handleChildrenChanged()}return o?ef.create23(i,o,null,!1):i}function OTt(i,e){i=i.toMutable();let t=i,n=[];for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");n.push(t),t=t.makeFirstElementMutable()}let o=e;for(let r=n.length-1;r>=0;r--){let s=n[r];o?s.childrenLength>=3?o=ef.create23(o,s.unprependChild(),null,!1):(s.prependChildOfSameHeight(o),o=void 0):s.handleChildrenChanged()}return o?ef.create23(o,i,null,!1):i}var VQe=P(()=>{iM()});function Tpe(i,e=-1){for(;;){if(e++,e>=i.childrenLength)return-1;if(i.getChild(e))return e}}function nM(i){return i.length>0?i[i.length-1]:void 0}var LG,WQe=P(()=>{Tm();LG=class{constructor(e){this.lastOffset=Wa,this.nextNodes=[e],this.offsets=[Wa],this.idxs=[]}readLongestNodeAt(e,t){if(_4(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){let n=nM(this.nextNodes);if(!n)return;let o=nM(this.offsets);if(_4(e,o))return;if(_4(o,e))if(tr(o,n.length)<=e)this.nextNodeAfterCurrent();else{let r=Tpe(n);r!==-1?(this.nextNodes.push(n.getChild(r)),this.offsets.push(o),this.idxs.push(r)):this.nextNodeAfterCurrent()}else{if(t(n))return this.nextNodeAfterCurrent(),n;{let r=Tpe(n);if(r===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(n.getChild(r)),this.offsets.push(o),this.idxs.push(r)}}}}nextNodeAfterCurrent(){for(;;){let e=nM(this.offsets),t=nM(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;let n=nM(this.nextNodes),o=Tpe(n,this.idxs[this.idxs.length-1]);if(o!==-1){this.nextNodes.push(n.getChild(o)),this.offsets.push(tr(e,t.length)),this.idxs[this.idxs.length-1]=o;break}else this.idxs.pop()}}}});function oM(i,e,t,n){return new Ipe(i,e,t,n).parseDocument()}var Ipe,Mpe=P(()=>{iM();ZI();xb();Tm();VQe();WQe();Ipe=class{constructor(e,t,n,o){if(this.tokenizer=e,this.createImmutableLists=o,this._itemsConstructed=0,this._itemsFromCache=0,n&&o)throw new Error("Not supported");this.oldNodeReader=n?new LG(n):void 0,this.positionMapper=new yG(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(il.getEmpty(),0);return e||(e=ef.getEmpty()),e}parseList(e,t){let n=[];for(;;){let r=this.tryReadChildFromCache(e);if(!r){let s=this.tokenizer.peek();if(!s||s.kind===2&&s.bracketIds.intersects(e))break;r=this.parseChild(e,t+1)}r.kind===4&&r.childrenLength===0||n.push(r)}return this.oldNodeReader?BQe(n):Dpe(n,this.createImmutableLists)}tryReadChildFromCache(e){if(this.oldNodeReader){let t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(t===null||!hx(t)){let n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),o=>t!==null&&!_4(o.length,t)?!1:o.canBeReused(e));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(e,t){this._itemsConstructed++;let n=this.tokenizer.read();switch(n.kind){case 2:return new xG(n.bracketIds,n.length);case 0:return n.astNode;case 1:{if(t>300)return new Im(n.length);let o=e.merge(n.bracketIds),r=this.parseList(o,t+1),s=this.tokenizer.peek();return s&&s.kind===2&&(s.bracketId===n.bracketId||s.bracketIds.intersects(n.bracketIds))?(this.tokenizer.read(),QI.create(n.astNode,r,s.astNode)):QI.create(n.astNode,r,null)}default:throw new Error("unexpected")}}}});function vx(i,e){if(i.length===0)return e;if(e.length===0)return i;let t=new qc(UQe(i)),n=UQe(e);n.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let o=t.dequeue();function r(c){if(c===void 0){let u=t.takeWhile(h=>!0)||[];return o&&u.unshift(o),u}let d=[];for(;o&&!hx(c);){let[u,h]=o.splitAt(c);d.push(u),c=wb(u.lengthAfter,c),o=h??t.dequeue()}return hx(c)||d.push(new rM(!1,c,c)),d}let s=[];function a(c,d,u){if(s.length>0&&bpe(s[s.length-1].endOffset,c)){let h=s[s.length-1];s[s.length-1]=new yp(h.startOffset,d,tr(h.newLength,u))}else s.push({startOffset:c,endOffset:d,newLength:u})}let l=Wa;for(let c of n){let d=r(c.lengthBefore);if(c.modified){let u=zQe(d,f=>f.lengthBefore),h=tr(l,u);a(l,h,c.lengthAfter),l=h}else for(let u of d){let h=l;l=tr(l,u.lengthBefore),u.modified&&a(h,l,u.lengthAfter)}}return s}function UQe(i){let e=[],t=Wa;for(let n of i){let o=wb(t,n.startOffset);hx(o)||e.push(new rM(!1,o,o));let r=wb(n.startOffset,n.endOffset);e.push(new rM(!0,r,n.newLength)),t=n.endOffset}return e}var rM,Npe=P(()=>{Vi();ZI();Tm();rM=class i{constructor(e,t,n){this.modified=e,this.lengthBefore=t,this.lengthAfter=n}splitAt(e){let t=wb(e,this.lengthAfter);return bpe(t,Wa)?[this,void 0]:this.modified?[new i(this.modified,this.lengthBefore,e),new i(this.modified,Wa,t)]:[new i(this.modified,e,e),new i(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${Dd(this.lengthBefore)} -> ${Dd(this.lengthAfter)}`}}});function $Qe(i,e,t,n){if(i.kind===4||i.kind===2){let o=[];for(let r of i.children)t=tr(e,r.length),o.push({nodeOffsetStart:e,nodeOffsetEnd:t}),e=t;for(let r=o.length-1;r>=0;r--){let{nodeOffsetStart:s,nodeOffsetEnd:a}=o[r];if(_4(s,n)){let l=$Qe(i.children[r],s,a,n);if(l)return l}}return null}else{if(i.kind===3)return null;if(i.kind===1){let o=Sv(e,t);return{bracketInfo:i.bracketInfo,range:o}}}return null}function jQe(i,e,t,n){if(i.kind===4||i.kind===2){for(let o of i.children){if(t=tr(e,o.length),_4(n,t)){let r=jQe(o,e,t,n);if(r)return r}e=t}return null}else{if(i.kind===3)return null;if(i.kind===1){let o=Sv(e,t);return{bracketInfo:i.bracketInfo,range:o}}}return null}function Ape(i,e,t,n,o,r,s,a,l,c,d=!1){if(s>200)return!0;e:for(;;)switch(i.kind){case 4:{let u=i.childrenLength;for(let h=0;h200)return!0;let c=!0;if(i.kind===2){let d=0;if(a){let f=a.get(i.openingBracket.text);f===void 0&&(f=0),d=f,f++,a.set(i.openingBracket.text,f)}let u=tr(e,i.openingBracket.length),h=-1;if(r.includeMinIndentation&&(h=i.computeMinIndentation(e,r.textModel)),c=r.push(new bG(Sv(e,t),Sv(e,u),i.closingBracket?Sv(tr(u,((l=i.child)===null||l===void 0?void 0:l.length)||Wa),t):void 0,s,d,i,h)),e=u,c&&i.child){let f=i.child;if(t=tr(e,f.length),wv(e,o)&&fx(t,n)&&(c=Ppe(f,e,t,n,o,r,s+1,a),!c))return!1}a?.set(i.openingBracket.text,d)}else{let d=e;for(let u of i.children){let h=d;if(d=tr(d,u.length),wv(h,o)&&wv(n,d)&&(c=Ppe(u,h,d,n,o,r,s,a),!c))return!1}}return c}var EG,Rpe,qQe=P(()=>{Xt();nt();RQe();ZI();Lpe();Tm();Mpe();xb();kG();Vi();Npe();EG=class extends ue{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new ge,this.denseKeyProvider=new px,this.brackets=new gx(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)e.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{let n=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),o=new SG(this.textModel.getValue(),n);this.initialAstWithoutTokens=oM(o,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){let e=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){let t=e.map(n=>new yp(as(n.fromLineNumber-1,0),as(n.toLineNumber,0),as(n.toLineNumber-n.fromLineNumber+1,0)));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){let t=yp.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){let n=vx(this.queuedTextEdits,e);this.queuedTextEdits=n,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=vx(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,n){let r=t,s=new mx(this.textModel,this.brackets);return oM(s,e,r,n)}getBracketsInRange(e,t){this.flushQueue();let n=as(e.startLineNumber-1,e.startColumn-1),o=as(e.endLineNumber-1,e.endColumn-1);return new nm(r=>{let s=this.initialAstWithoutTokens||this.astWithTokens;Ape(s,Wa,s.length,n,o,r,0,0,new Map,t)})}getBracketPairsInRange(e,t){this.flushQueue();let n=xv(e.getStartPosition()),o=xv(e.getEndPosition());return new nm(r=>{let s=this.initialAstWithoutTokens||this.astWithTokens,a=new Rpe(r,t,this.textModel);Ppe(s,Wa,s.length,n,o,a,0,new Map)})}getFirstBracketAfter(e){this.flushQueue();let t=this.initialAstWithoutTokens||this.astWithTokens;return jQe(t,Wa,t.length,xv(e))}getFirstBracketBefore(e){this.flushQueue();let t=this.initialAstWithoutTokens||this.astWithTokens;return $Qe(t,Wa,t.length,xv(e))}};Rpe=class{constructor(e,t,n){this.push=e,this.includeMinIndentation=t,this.textModel=n}}});function zTt(i,e){return{object:i,dispose:()=>e?.dispose()}}function Ope(i){if(typeof i>"u")return()=>!0;{let e=Date.now();return()=>Date.now()-e<=i}}function DG(i){return i instanceof Nm?null:i}var TG,Nm,GQe=P(()=>{Vi();Xt();nt();Kt();D5();p$();qQe();TG=class extends ue{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new To),this.onDidChangeEmitter=new ge,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(n=>{var o;(!n.languageId||!((o=this.bracketPairsTree.value)===null||o===void 0)&&o.object.didLanguageChange(n.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;(t=this.bracketPairsTree.value)===null||t===void 0||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;(e=this.bracketPairsTree.value)===null||e===void 0||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;(t=this.bracketPairsTree.value)===null||t===void 0||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){let e=new Ye;this.bracketPairsTree.value=zTt(e.add(new EG(this.textModel,t=>this.languageConfigurationService.getLanguageConfiguration(t))),e),e.add(this.bracketPairsTree.value.object.onDidChange(t=>this.onDidChangeEmitter.fire(t))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e,!1))||nm.empty}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e,!0))||nm.empty}getBracketsInRange(e,t=!1){var n;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((n=this.bracketPairsTree.value)===null||n===void 0?void 0:n.object.getBracketsInRange(e,t))||nm.empty}findMatchingBracketUp(e,t,n){let o=this.textModel.validatePosition(t),r=this.textModel.getLanguageIdAtPosition(o.lineNumber,o.column);if(this.canBuildAST){let s=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew.getClosingBracketInfo(e);if(!s)return null;let a=this.getBracketPairsInRange(O.fromPositions(t,t)).findLast(l=>s.closes(l.openingBracketInfo));return a?a.openingBracketRange:null}else{let s=e.toLowerCase(),a=this.languageConfigurationService.getLanguageConfiguration(r).brackets;if(!a)return null;let l=a.textIsBracket[s];return l?DG(this._findMatchingBracketUp(l,o,Ope(n))):null}}matchBracket(e,t){if(this.canBuildAST){let n=this.getBracketPairsInRange(O.fromPositions(e,e)).filter(o=>o.closingBracketRange!==void 0&&(o.openingBracketRange.containsPosition(e)||o.closingBracketRange.containsPosition(e))).findLastMaxBy(Sc(o=>o.openingBracketRange.containsPosition(e)?o.openingBracketRange:o.closingBracketRange,O.compareRangesUsingStarts));return n?[n.openingBracketRange,n.closingBracketRange]:null}else{let n=Ope(t);return this._matchBracket(this.textModel.validatePosition(e),n)}}_establishBracketSearchOffsets(e,t,n,o){let r=t.getCount(),s=t.getLanguageId(o),a=Math.max(0,e.column-1-n.maxBracketLength);for(let c=o-1;c>=0;c--){let d=t.getEndOffset(c);if(d<=a)break;if(sp(t.getStandardTokenType(c))||t.getLanguageId(c)!==s){a=d;break}}let l=Math.min(t.getLineContent().length,e.column-1+n.maxBracketLength);for(let c=o+1;c=l)break;if(sp(t.getStandardTokenType(c))||t.getLanguageId(c)!==s){l=d;break}}return{searchStartOffset:a,searchEndOffset:l}}_matchBracket(e,t){let n=e.lineNumber,o=this.textModel.tokenization.getLineTokens(n),r=this.textModel.getLineContent(n),s=o.findTokenIndexAtOffset(e.column-1);if(s<0)return null;let a=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId(s)).brackets;if(a&&!sp(o.getStandardTokenType(s))){let{searchStartOffset:l,searchEndOffset:c}=this._establishBracketSearchOffsets(e,o,a,s),d=null;for(;;){let u=au.findNextBracketInRange(a.forwardRegex,n,r,l,c);if(!u)break;if(u.startColumn<=e.column&&e.column<=u.endColumn){let h=r.substring(u.startColumn-1,u.endColumn-1).toLowerCase(),f=this._matchFoundBracket(u,a.textIsBracket[h],a.textIsOpenBracket[h],t);if(f){if(f instanceof Nm)return null;d=f}}l=u.endColumn-1}if(d)return d}if(s>0&&o.getStartOffset(s)===e.column-1){let l=s-1,c=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId(l)).brackets;if(c&&!sp(o.getStandardTokenType(l))){let{searchStartOffset:d,searchEndOffset:u}=this._establishBracketSearchOffsets(e,o,c,l),h=au.findPrevBracketInRange(c.reversedRegex,n,r,d,u);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){let f=r.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),p=this._matchFoundBracket(h,c.textIsBracket[f],c.textIsOpenBracket[f],t);if(p)return p instanceof Nm?null:p}}}return null}_matchFoundBracket(e,t,n,o){if(!t)return null;let r=n?this._findMatchingBracketDown(t,e.getEndPosition(),o):this._findMatchingBracketUp(t,e.getStartPosition(),o);return r?r instanceof Nm?r:[e,r]:null}_findMatchingBracketUp(e,t,n){let o=e.languageId,r=e.reversedRegex,s=-1,a=0,l=(c,d,u,h)=>{for(;;){if(n&&++a%100===0&&!n())return Nm.INSTANCE;let f=au.findPrevBracketInRange(r,c,d,u,h);if(!f)break;let p=d.substring(f.startColumn-1,f.endColumn-1).toLowerCase();if(e.isOpen(p)?s++:e.isClose(p)&&s--,s===0)return f;h=f.startColumn-1}return null};for(let c=t.lineNumber;c>=1;c--){let d=this.textModel.tokenization.getLineTokens(c),u=d.getCount(),h=this.textModel.getLineContent(c),f=u-1,p=h.length,m=h.length;c===t.lineNumber&&(f=d.findTokenIndexAtOffset(t.column-1),p=t.column-1,m=t.column-1);let y=!0;for(;f>=0;f--){let _=d.getLanguageId(f)===o&&!sp(d.getStandardTokenType(f));if(_)y?p=d.getStartOffset(f):(p=d.getStartOffset(f),m=d.getEndOffset(f));else if(y&&p!==m){let v=l(c,h,p,m);if(v)return v}y=_}if(y&&p!==m){let _=l(c,h,p,m);if(_)return _}}return null}_findMatchingBracketDown(e,t,n){let o=e.languageId,r=e.forwardRegex,s=1,a=0,l=(d,u,h,f)=>{for(;;){if(n&&++a%100===0&&!n())return Nm.INSTANCE;let p=au.findNextBracketInRange(r,d,u,h,f);if(!p)break;let m=u.substring(p.startColumn-1,p.endColumn-1).toLowerCase();if(e.isOpen(m)?s++:e.isClose(m)&&s--,s===0)return p;h=p.endColumn-1}return null},c=this.textModel.getLineCount();for(let d=t.lineNumber;d<=c;d++){let u=this.textModel.tokenization.getLineTokens(d),h=u.getCount(),f=this.textModel.getLineContent(d),p=0,m=0,y=0;d===t.lineNumber&&(p=u.findTokenIndexAtOffset(t.column-1),m=t.column-1,y=t.column-1);let _=!0;for(;p=1;a--){let l=this.textModel.tokenization.getLineTokens(a),c=l.getCount(),d=this.textModel.getLineContent(a),u=c-1,h=d.length,f=d.length;if(a===n.lineNumber){u=l.findTokenIndexAtOffset(n.column-1),h=n.column-1,f=n.column-1;let m=l.getLanguageId(u);o!==m&&(o=m,r=this.languageConfigurationService.getLanguageConfiguration(o).brackets,s=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew)}let p=!0;for(;u>=0;u--){let m=l.getLanguageId(u);if(o!==m){if(r&&s&&p&&h!==f){let _=au.findPrevBracketInRange(r.reversedRegex,a,d,h,f);if(_)return this._toFoundBracket(s,_);p=!1}o=m,r=this.languageConfigurationService.getLanguageConfiguration(o).brackets,s=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew}let y=!!r&&!sp(l.getStandardTokenType(u));if(y)p?h=l.getStartOffset(u):(h=l.getStartOffset(u),f=l.getEndOffset(u));else if(s&&r&&p&&h!==f){let _=au.findPrevBracketInRange(r.reversedRegex,a,d,h,f);if(_)return this._toFoundBracket(s,_)}p=y}if(s&&r&&p&&h!==f){let m=au.findPrevBracketInRange(r.reversedRegex,a,d,h,f);if(m)return this._toFoundBracket(s,m)}}return null}findNextBracket(e){var t;let n=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getFirstBracketAfter(n))||null;let o=this.textModel.getLineCount(),r=null,s=null,a=null;for(let l=n.lineNumber;l<=o;l++){let c=this.textModel.tokenization.getLineTokens(l),d=c.getCount(),u=this.textModel.getLineContent(l),h=0,f=0,p=0;if(l===n.lineNumber){h=c.findTokenIndexAtOffset(n.column-1),f=n.column-1,p=n.column-1;let y=c.getLanguageId(h);r!==y&&(r=y,s=this.languageConfigurationService.getLanguageConfiguration(r).brackets,a=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew)}let m=!0;for(;hm.closingBracketRange!==void 0&&m.range.strictContainsRange(f));return p?[p.openingBracketRange,p.closingBracketRange]:null}let o=Ope(t),r=this.textModel.getLineCount(),s=new Map,a=[],l=(f,p)=>{if(!s.has(f)){let m=[];for(let y=0,_=p?p.brackets.length:0;y<_;y++)m[y]=0;s.set(f,m)}a=s.get(f)},c=0,d=(f,p,m,y,_)=>{for(;;){if(o&&++c%100===0&&!o())return Nm.INSTANCE;let v=au.findNextBracketInRange(f.forwardRegex,p,m,y,_);if(!v)break;let b=m.substring(v.startColumn-1,v.endColumn-1).toLowerCase(),C=f.textIsBracket[b];if(C&&(C.isOpen(b)?a[C.index]++:C.isClose(b)&&a[C.index]--,a[C.index]===-1))return this._matchFoundBracket(v,C,!1,o);y=v.endColumn-1}return null},u=null,h=null;for(let f=n.lineNumber;f<=r;f++){let p=this.textModel.tokenization.getLineTokens(f),m=p.getCount(),y=this.textModel.getLineContent(f),_=0,v=0,b=0;if(f===n.lineNumber){_=p.findTokenIndexAtOffset(n.column-1),v=n.column-1,b=n.column-1;let w=p.getLanguageId(_);u!==w&&(u=w,h=this.languageConfigurationService.getLanguageConfiguration(u).brackets,l(u,h))}let C=!0;for(;_{Xt();nt();Kt();r1();No();IG=class extends ue{constructor(e){super(),this.textModel=e,this.colorProvider=new MG,this.onDidChangeEmitter=new ge,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(t=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,n,o){return o?[]:t===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map(s=>({id:`bracket${s.range.toString()}-${s.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(s,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:s.range})).toArray():[]}getAllDecorations(e,t){return e===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new O(1,1,this.textModel.getLineCount(),1),e,t):[]}},MG=class{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}};Qs((i,e)=>{let t=[rq,sq,aq,lq,cq,dq],n=new MG;e.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${i.getColor(mXe)}; }`);let o=t.map(r=>i.getColor(r)).filter(r=>!!r).filter(r=>!r.isTransparent());for(let r=0;r<30;r++){let s=o[r%o.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(r)} { color: ${s}; }`)}})});function NG(i){return i.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}function YQe(i,e){return i===null||i.length===0?e:new zpe(i,e).compress()}var tf,zpe,Fpe=P(()=>{ew();J0();tf=class i{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,n,o){this.oldPosition=e,this.oldText=t,this.newPosition=n,this.newText=o}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${NG(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${NG(this.oldText)}")`:`(replace@${this.oldPosition} "${NG(this.oldText)}" with "${NG(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){let o=t.length;Yf(e,o,n),n+=4;for(let r=0;ri.length)return!1;if(t){if(!OC(i,e))return!1;if(e.length===i.length)return!0;let r=e.length;return e.charAt(e.length-1)===n&&r--,i.charAt(r)===n}return e.charAt(e.length-1)!==n&&(e+=n),i.indexOf(e)===0}function XQe(i){return i>=65&&i<=90||i>=97&&i<=122}function QQe(i,e=hr){return e?XQe(i.charCodeAt(0))&&i.charCodeAt(1)===58:!1}var AG=P(()=>{Dg();Mn();Ri()});function Am(i){return hT(i,!0)}var aM,gr,qTi,GTi,_x,KTi,YTi,tJe,Il,iJe,Lv,nJe,oJe,rJe,Vpe,ZTi,JQe,eJe,XTi,QTi,h2,ec=P(()=>{AG();Nc();Dg();Mn();Ri();Io();aM=class{constructor(e){this._ignorePathCasing=e}compare(e,t,n=!1){return e===t?0:R3(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}isEqual(e,t,n=!1){return e===t?!0:!e||!t?!1:this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,n=!1){if(e.scheme===t.scheme){if(e.scheme===$i.file)return sM(Am(e),Am(t),this._ignorePathCasing(e))&&e.query===t.query&&(n||e.fragment===t.fragment);if(JQe(e.authority,t.authority))return sM(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(n||e.fragment===t.fragment)}return!1}joinPath(e,...t){return li.joinPath(e,...t)}basenameOrAuthority(e){return Il(e)||e.authority}basename(e){return hs.basename(e.path)}extname(e){return hs.extname(e.path)}dirname(e){if(e.path.length===0)return e;let t;return e.scheme===$i.file?t=li.file(dW(Am(e))).path:(t=hs.dirname(e.path),e.authority&&t.length&&t.charCodeAt(0)!==47&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return e.scheme===$i.file?t=li.file(cW(Am(e))).path:t=hs.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!JQe(e.authority,t.authority))return;if(e.scheme===$i.file){let r=jje(Am(e),Am(t));return hr?Hpe(r):r}let n=e.path||"/",o=t.path||"/";if(this._ignorePathCasing(e)){let r=0;for(let s=Math.min(n.length,o.length);rBpe(n).length&&n[n.length-1]===t}else{let n=e.path;return n.length>1&&n.charCodeAt(n.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=Zu){return eJe(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=Zu){let n=!1;if(e.scheme===$i.file){let o=Am(e);n=o!==void 0&&o.length===Bpe(o).length&&o[o.length-1]===t}else{t="/";let o=e.path;n=o.length===1&&o.charCodeAt(o.length-1)===47}return!n&&!eJe(e,t)?e.with({path:e.path+"/"}):e}},gr=new aM(()=>!1),qTi=new aM(i=>i.scheme===$i.file?!Ar:!0),GTi=new aM(i=>!0),_x=gr.isEqual.bind(gr),KTi=gr.isEqualOrParent.bind(gr),YTi=gr.getComparisonKey.bind(gr),tJe=gr.basenameOrAuthority.bind(gr),Il=gr.basename.bind(gr),iJe=gr.extname.bind(gr),Lv=gr.dirname.bind(gr),nJe=gr.joinPath.bind(gr),oJe=gr.normalizePath.bind(gr),rJe=gr.relativePath.bind(gr),Vpe=gr.resolvePath.bind(gr),ZTi=gr.isAbsolutePath.bind(gr),JQe=gr.isEqualAuthority.bind(gr),eJe=gr.hasTrailingPathSeparator.bind(gr),XTi=gr.removeTrailingPathSeparator.bind(gr),QTi=gr.addTrailingPathSeparator.bind(gr);(function(i){i.META_DATA_LABEL="label",i.META_DATA_DESCRIPTION="description",i.META_DATA_SIZE="size",i.META_DATA_MIME="mime";function e(t){let n=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(s=>{let[a,l]=s.split(":");a&&l&&n.set(a,l)});let r=t.path.substring(0,t.path.indexOf(";"));return r&&n.set(i.META_DATA_MIME,r),n}i.parseMetaData=e})(h2||(h2={}))});function bx(i){return i.toString()}function Upe(i){return i.getEOL()===` +`?0:1}function f2(i){return i?i instanceof RG||i instanceof Wpe:!1}var hh,RG,Wpe,PG,$pe=P(()=>{Wt();Pi();zo();Io();Fpe();ew();ec();hh=class i{static create(e,t){let n=e.getAlternativeVersionId(),o=Upe(e);return new i(n,n,o,o,t,t,[])}constructor(e,t,n,o,r,s,a){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=n,this.afterEOL=o,this.beforeCursorState=r,this.afterCursorState=s,this.changes=a}append(e,t,n,o,r){t.length>0&&(this.changes=YQe(this.changes,t)),this.afterEOL=n,this.afterVersionId=o,this.afterCursorState=r}static _writeSelectionsSize(e){return 4+4*4*(e?e.length:0)}static _writeSelections(e,t,n){if(Yf(e,t?t.length:0,n),n+=4,t)for(let o of t)Yf(e,o.selectionStartLineNumber,n),n+=4,Yf(e,o.selectionStartColumn,n),n+=4,Yf(e,o.positionLineNumber,n),n+=4,Yf(e,o.positionColumn,n),n+=4;return n}static _readSelections(e,t,n){let o=Kf(e,t);t+=4;for(let r=0;rt.toString()).join(", ")}matchesResource(e){return(li.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof hh}append(e,t,n,o,r){this._data instanceof hh&&this._data.append(e,t,n,o,r)}close(){this._data instanceof hh&&(this._data=this._data.serialize())}open(){this._data instanceof hh||(this._data=hh.deserialize(this._data))}undo(){if(li.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof hh&&(this._data=this._data.serialize());let e=hh.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(li.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof hh&&(this._data=this._data.serialize());let e=hh.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof hh&&(this._data=this._data.serialize()),this._data.byteLength+168}},Wpe=class{get resources(){return this._editStackElementsArr.map(e=>e.resource)}constructor(e,t,n){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=n.slice(0),this._editStackElementsMap=new Map;for(let o of this._editStackElementsArr){let r=bx(o.resource);this._editStackElementsMap.set(r,o)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){let t=bx(e);return this._editStackElementsMap.has(t)}setModel(e){let t=bx(li.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;let t=bx(e.uri);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).canAppend(e):!1}append(e,t,n,o,r){let s=bx(e.uri);this._editStackElementsMap.get(s).append(e,t,n,o,r)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(let e of this._editStackElementsArr)e.undo()}redo(){for(let e of this._editStackElementsArr)e.redo()}heapSize(e){let t=bx(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){let e=[];for(let t of this._editStackElementsArr)e.push(`${Il(t.resource)}: ${t}`);return`{${e.join(", ")}}`}};PG=class i{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);f2(e)&&e.close()}popStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);f2(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){let n=this._undoRedoService.getLastElement(this._model.uri);if(f2(n)&&n.canAppend(this._model))return n;let o=new RG(g("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(o,t),o}pushEOL(e){let t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],Upe(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,n,o){let r=this._getOrCreateEditStackElement(e,o),s=this._model.applyEdits(t,!0),a=i._computeCursorState(n,s),l=s.map((c,d)=>({index:d,textChange:c.textChange}));return l.sort((c,d)=>c.textChange.oldPosition===d.textChange.oldPosition?c.index-d.index:c.textChange.oldPosition-d.textChange.oldPosition),r.append(this._model,l.map(c=>c.textChange),Upe(this._model),this._model.getAlternativeVersionId(),a),a}static _computeCursorState(e,t){try{return e?e(t):null}catch(n){return hi(n),null}}}});function BTt(i,e,t,n,o){o.spacesDiff=0,o.looksLikeAlignment=!1;let r;for(r=0;r0&&a>0||l>0&&c>0)return;let d=Math.abs(a-c),u=Math.abs(s-l);if(d===0){o.spacesDiff=u,u>0&&0<=l-1&&l-10?o++:C>1&&r++,BTt(s,a,y,b,u),u.looksLikeAlignment&&!(t&&e===u.spacesDiff)))continue;let S=u.spacesDiff;S<=c&&d[S]++,s=y,a=b}let h=t;o!==r&&(h=o{let y=d[m];y>p&&(p=y,f=m)}),f===4&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(f=2)}return{insertSpaces:h,tabSize:f}}var jpe,sJe=P(()=>{jpe=class{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}});function vu(i){return(i.metadata&1)>>>0}function Ir(i,e){i.metadata=i.metadata&254|e<<0}function tc(i){return(i.metadata&2)>>>1===1}function vr(i,e){i.metadata=i.metadata&253|(e?1:0)<<1}function fJe(i){return(i.metadata&4)>>>2===1}function aJe(i,e){i.metadata=i.metadata&251|(e?1:0)<<2}function pJe(i){return(i.metadata&64)>>>6===1}function lJe(i,e){i.metadata=i.metadata&191|(e?1:0)<<6}function VTt(i){return(i.metadata&24)>>>3}function cJe(i,e){i.metadata=i.metadata&231|e<<3}function WTt(i){return(i.metadata&32)>>>5===1}function dJe(i,e){i.metadata=i.metadata&223|(e?1:0)<<5}function UTt(i){let e=i.root,t=0;for(;e!==Wn;){if(e.left!==Wn&&!tc(e.left)){e=e.left;continue}if(e.right!==Wn&&!tc(e.right)){t+=e.delta,e=e.right;continue}e.start=t+e.start,e.end=t+e.end,e.delta=0,b4(e),vr(e,!0),vr(e.left,!1),vr(e.right,!1),e===e.parent.right&&(t-=e.parent.delta),e=e.parent}vr(i.root,!1)}function yx(i,e,t,n){return it||n===1?!1:n===2?!0:e}function $Tt(i,e,t,n,o){let r=VTt(i),s=r===0||r===2,a=r===1||r===2,l=t-e,c=n,d=Math.min(l,c),u=i.start,h=!1,f=i.end,p=!1;e<=u&&f<=t&&WTt(i)&&(i.start=e,h=!0,i.end=e,p=!0);{let y=o?1:l>0?2:0;!h&&yx(u,s,e,y)&&(h=!0),!p&&yx(f,a,e,y)&&(p=!0)}if(d>0&&!o){let y=l>c?2:0;!h&&yx(u,s,e+d,y)&&(h=!0),!p&&yx(f,a,e+d,y)&&(p=!0)}{let y=o?1:0;!h&&yx(u,s,t,y)&&(i.start=e+c,h=!0),!p&&yx(f,a,t,y)&&(i.end=e+c,p=!0)}let m=c-l;h||(i.start=Math.max(0,u+m)),p||(i.end=Math.max(0,f+m)),i.start>i.end&&(i.end=i.start)}function jTt(i,e,t){let n=i.root,o=0,r=0,s=0,a=0,l=[],c=0;for(;n!==Wn;){if(tc(n)){vr(n.left,!1),vr(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;continue}if(!tc(n.left)){if(r=o+n.maxEnd,rt){vr(n,!0);continue}if(a=o+n.end,a>=e&&(n.setCachedOffsets(s,a,0),l[c++]=n),vr(n,!0),n.right!==Wn&&!tc(n.right)){o+=n.delta,n=n.right;continue}}return vr(i.root,!1),l}function qTt(i,e,t,n){let o=i.root,r=0,s=0,a=0,l=n-(t-e);for(;o!==Wn;){if(tc(o)){vr(o.left,!1),vr(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),b4(o),o=o.parent;continue}if(!tc(o.left)){if(s=r+o.maxEnd,st){o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(i.requestNormalizeDelta=!0),vr(o,!0);continue}if(vr(o,!0),o.right!==Wn&&!tc(o.right)){r+=o.delta,o=o.right;continue}}vr(i.root,!1)}function GTt(i,e){let t=i.root,n=[],o=0;for(;t!==Wn;){if(tc(t)){vr(t.left,!1),vr(t.right,!1),t=t.parent;continue}if(t.left!==Wn&&!tc(t.left)){t=t.left;continue}if(t.ownerId===e&&(n[o++]=t),vr(t,!0),t.right!==Wn&&!tc(t.right)){t=t.right;continue}}return vr(i.root,!1),n}function KTt(i){let e=i.root,t=[],n=0;for(;e!==Wn;){if(tc(e)){vr(e.left,!1),vr(e.right,!1),e=e.parent;continue}if(e.left!==Wn&&!tc(e.left)){e=e.left;continue}if(e.right!==Wn&&!tc(e.right)){e=e.right;continue}t[n++]=e,vr(e,!0)}return vr(i.root,!1),t}function YTt(i,e,t,n,o){let r=i.root,s=0,a=0,l=0,c=[],d=0;for(;r!==Wn;){if(tc(r)){vr(r.left,!1),vr(r.right,!1),r===r.parent.right&&(s-=r.parent.delta),r=r.parent;continue}if(r.left!==Wn&&!tc(r.left)){r=r.left;continue}a=s+r.start,l=s+r.end,r.setCachedOffsets(a,l,n);let u=!0;if(e&&r.ownerId&&r.ownerId!==e&&(u=!1),t&&fJe(r)&&(u=!1),o&&!pJe(r)&&(u=!1),u&&(c[d++]=r),vr(r,!0),r.right!==Wn&&!tc(r.right)){s+=r.delta,r=r.right;continue}}return vr(i.root,!1),c}function ZTt(i,e,t,n,o,r,s){let a=i.root,l=0,c=0,d=0,u=0,h=[],f=0;for(;a!==Wn;){if(tc(a)){vr(a.left,!1),vr(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;continue}if(!tc(a.left)){if(c=l+a.maxEnd,ct){vr(a,!0);continue}if(u=l+a.end,u>=e){a.setCachedOffsets(d,u,r);let p=!0;n&&a.ownerId&&a.ownerId!==n&&(p=!1),o&&fJe(a)&&(p=!1),s&&!pJe(a)&&(p=!1),p&&(h[f++]=a)}if(vr(a,!0),a.right!==Wn&&!tc(a.right)){l+=a.delta,a=a.right;continue}}return vr(i.root,!1),h}function uJe(i,e){if(i.root===Wn)return e.parent=Wn,e.left=Wn,e.right=Wn,Ir(e,0),i.root=e,i.root;XTt(i,e),Ev(e.parent);let t=e;for(;t!==i.root&&vu(t.parent)===1;)if(t.parent===t.parent.parent.left){let n=t.parent.parent.right;vu(n)===1?(Ir(t.parent,0),Ir(n,0),Ir(t.parent.parent,1),t=t.parent.parent):(t===t.parent.right&&(t=t.parent,lM(i,t)),Ir(t.parent,0),Ir(t.parent.parent,1),cM(i,t.parent.parent))}else{let n=t.parent.parent.left;vu(n)===1?(Ir(t.parent,0),Ir(n,0),Ir(t.parent.parent,1),t=t.parent.parent):(t===t.parent.left&&(t=t.parent,cM(i,t)),Ir(t.parent,0),Ir(t.parent.parent,1),lM(i,t.parent.parent))}return Ir(i.root,0),e}function XTt(i,e){let t=0,n=i.root,o=e.start,r=e.end;for(;;)if(JTt(o,r,n.start+t,n.end+t)<0)if(n.left===Wn){e.start-=t,e.end-=t,e.maxEnd-=t,n.left=e;break}else n=n.left;else if(n.right===Wn){e.start-=t+n.delta,e.end-=t+n.delta,e.maxEnd-=t+n.delta,n.right=e;break}else t+=n.delta,n=n.right;e.parent=n,e.left=Wn,e.right=Wn,Ir(e,1)}function hJe(i,e){let t,n;if(e.left===Wn?(t=e.right,n=e,t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta):e.right===Wn?(t=e.left,n=e):(n=QTt(e.right),t=n.right,t.start+=n.delta,t.end+=n.delta,t.delta+=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),n.start+=e.delta,n.end+=e.delta,n.delta=e.delta,(n.delta<-1073741824||n.delta>1073741824)&&(i.requestNormalizeDelta=!0)),n===i.root){i.root=t,Ir(t,0),e.detach(),Gpe(),b4(t),i.root.parent=Wn;return}let o=vu(n)===1;if(n===n.parent.left?n.parent.left=t:n.parent.right=t,n===e?t.parent=n.parent:(n.parent===e?t.parent=n:t.parent=n.parent,n.left=e.left,n.right=e.right,n.parent=e.parent,Ir(n,vu(e)),e===i.root?i.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left!==Wn&&(n.left.parent=n),n.right!==Wn&&(n.right.parent=n)),e.detach(),o){Ev(t.parent),n!==e&&(Ev(n),Ev(n.parent)),Gpe();return}Ev(t),Ev(t.parent),n!==e&&(Ev(n),Ev(n.parent));let r;for(;t!==i.root&&vu(t)===0;)t===t.parent.left?(r=t.parent.right,vu(r)===1&&(Ir(r,0),Ir(t.parent,1),lM(i,t.parent),r=t.parent.right),vu(r.left)===0&&vu(r.right)===0?(Ir(r,1),t=t.parent):(vu(r.right)===0&&(Ir(r.left,0),Ir(r,1),cM(i,r),r=t.parent.right),Ir(r,vu(t.parent)),Ir(t.parent,0),Ir(r.right,0),lM(i,t.parent),t=i.root)):(r=t.parent.left,vu(r)===1&&(Ir(r,0),Ir(t.parent,1),cM(i,t.parent),r=t.parent.left),vu(r.left)===0&&vu(r.right)===0?(Ir(r,1),t=t.parent):(vu(r.left)===0&&(Ir(r.right,0),Ir(r,1),lM(i,r),r=t.parent.left),Ir(r,vu(t.parent)),Ir(t.parent,0),Ir(r.left,0),cM(i,t.parent),t=i.root));Ir(t,0),Gpe()}function QTt(i){for(;i.left!==Wn;)i=i.left;return i}function Gpe(){Wn.parent=Wn,Wn.delta=0,Wn.start=0,Wn.end=0}function lM(i,e){let t=e.right;t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta,e.right=t.left,t.left!==Wn&&(t.left.parent=e),t.parent=e.parent,e.parent===Wn?i.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,b4(e),b4(t)}function cM(i,e){let t=e.left;e.delta-=t.delta,(e.delta<-1073741824||e.delta>1073741824)&&(i.requestNormalizeDelta=!0),e.start-=t.delta,e.end-=t.delta,e.left=t.right,t.right!==Wn&&(t.right.parent=e),t.parent=e.parent,e.parent===Wn?i.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t,b4(e),b4(t)}function mJe(i){let e=i.end;if(i.left!==Wn){let t=i.left.maxEnd;t>e&&(e=t)}if(i.right!==Wn){let t=i.right.maxEnd+i.delta;t>e&&(e=t)}return e}function b4(i){i.maxEnd=mJe(i)}function Ev(i){for(;i!==Wn;){let e=mJe(i);if(i.maxEnd===e)return;i.maxEnd=e,i=i.parent}}function JTt(i,e,t,n){return i===t?e-n:i-t}var dM,Wn,Cx,gJe=P(()=>{dM=class{constructor(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,Ir(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,aJe(this,!1),lJe(this,!1),cJe(this,1),dJe(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,vr(this,!1)}reset(e,t,n,o){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=o}setOptions(e){this.options=e;let t=this.options.className;aJe(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),lJe(this,this.options.glyphMarginClassName!==null),cJe(this,this.options.stickiness),dJe(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}},Wn=new dM(null,0,0);Wn.parent=Wn;Wn.left=Wn;Wn.right=Wn;Ir(Wn,0);Cx=class{constructor(){this.root=Wn,this.requestNormalizeDelta=!1}intervalSearch(e,t,n,o,r,s){return this.root===Wn?[]:ZTt(this,e,t,n,o,r,s)}search(e,t,n,o){return this.root===Wn?[]:YTt(this,e,t,n,o)}collectNodesFromOwner(e){return GTt(this,e)}collectNodesPostOrder(){return KTt(this)}insert(e){uJe(this,e),this._normalizeDeltaIfNecessary()}delete(e){hJe(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){let n=e,o=0;for(;e!==this.root;)e===e.parent.right&&(o+=e.parent.delta),e=e.parent;let r=n.start+o,s=n.end+o;n.setCachedOffsets(r,s,t)}acceptReplace(e,t,n,o){let r=jTt(this,e,e+t);for(let s=0,a=r.length;s{wx=class{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==bn)return OG(this.right);let e=this;for(;e.parent!==bn&&e.parent.left!==e;)e=e.parent;return e.parent===bn?bn:e.parent}prev(){if(this.left!==bn)return Ype(this.left);let e=this;for(;e.parent!==bn&&e.parent.right!==e;)e=e.parent;return e.parent===bn?bn:e.parent}detach(){this.parent=null,this.left=null,this.right=null}},bn=new wx(null,0);bn.parent=bn;bn.left=bn;bn.right=bn;bn.color=0});function _Je(i){let e;return i[i.length-1]<65536?e=new Uint16Array(i.length):e=new Uint32Array(i.length),e.set(i,0),e}function m2(i,e=!0){let t=[0],n=1;for(let o=0,r=i.length;o126)&&(s=!1)}let a=new Jpe(_Je(i),n,o,r,s);return i.length=0,a}var y4,Jpe,Td,g2,eme,tme,zG,ime=P(()=>{Mi();Kt();Ca();vJe();JT();y4=65535;Jpe=class{constructor(e,t,n,o,r){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=o,this.isBasicASCII=r}};Td=class{constructor(e,t,n,o,r){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=o,this.length=r}},g2=class{constructor(e,t){this.buffer=e,this.lineStarts=t}},eme=class{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==bn&&e.iterate(e.root,n=>(n!==bn&&this._pieces.push(n.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}},tme=class{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){let n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,n=this._cache;for(let o=0;o=e){n[o]=null,t=!0;continue}}if(t){let o=[];for(let r of n)r!==null&&o.push(r);this._cache=o}}},zG=class{constructor(e,t,n){this.create(e,t,n)}create(e,t,n){this._buffers=[new g2("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=bn,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;let o=null;for(let r=0,s=e.length;r0){e[r].lineStarts||(e[r].lineStarts=m2(e[r].buffer));let a=new Td(r+1,{line:0,column:0},{line:e[r].lineStarts.length-1,column:e[r].buffer.length-e[r].lineStarts[e[r].lineStarts.length-1]},e[r].lineStarts.length-1,e[r].buffer.length);this._buffers.push(e[r]),o=this.rbInsertRight(o,a)}this._searchCache=new tme(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=y4,n=t-Math.floor(t/3),o=n*2,r="",s=0,a=[];if(this.iterate(this.root,l=>{let c=this.getNodeContent(l),d=c.length;if(s<=n||s+d0){let l=r.replace(/\r\n|\r|\n/g,e);a.push(new g2(l,m2(l)))}this.create(a,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new eme(this,e)}getOffsetAt(e,t){let n=0,o=this.root;for(;o!==bn;)if(o.left!==bn&&o.lf_left+1>=e)o=o.left;else if(o.lf_left+o.piece.lineFeedCnt+1>=e){n+=o.size_left;let r=this.getAccumulatedValue(o,e-o.lf_left-2);return n+=r+t-1}else e-=o.lf_left+o.piece.lineFeedCnt,n+=o.size_left+o.piece.length,o=o.right;return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0,o=e;for(;t!==bn;)if(t.size_left!==0&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){let r=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+r.index,r.index===0){let s=this.getOffsetAt(n+1,1),a=o-s;return new ke(n+1,a+1)}return new ke(n+1,r.remainder+1)}else if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===bn){let r=this.getOffsetAt(n+1,1),s=o-e-r;return new ke(n+1,s+1)}else t=t.right;return new ke(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let n=this.nodeAt2(e.startLineNumber,e.startColumn),o=this.nodeAt2(e.endLineNumber,e.endColumn),r=this.getValueInRange2(n,o);return t?t!==this._EOL||!this._EOLNormalized?r.replace(/\r\n|\r|\n/g,t):t===this.getEOL()&&this._EOLNormalized?r:r.replace(/\r\n|\r|\n/g,t):r}getValueInRange2(e,t){if(e.node===t.node){let a=e.node,l=this._buffers[a.piece.bufferIndex].buffer,c=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return l.substring(c+e.remainder,c+t.remainder)}let n=e.node,o=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start),s=o.substring(r+e.remainder,r+n.piece.length);for(n=n.next();n!==bn;){let a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===t.node){s+=a.substring(l,l+t.remainder);break}else s+=a.substr(l,n.piece.length);n=n.next()}return s}getLinesContent(){let e=[],t=0,n="",o=!1;return this.iterate(this.root,r=>{if(r===bn)return!0;let s=r.piece,a=s.length;if(a===0)return!0;let l=this._buffers[s.bufferIndex].buffer,c=this._buffers[s.bufferIndex].lineStarts,d=s.start.line,u=s.end.line,h=c[d]+s.start.column;if(o&&(l.charCodeAt(h)===10&&(h++,a--),e[t++]=n,n="",o=!1,a===0))return!0;if(d===u)return!this._EOLNormalized&&l.charCodeAt(h+a-1)===13?(o=!0,n+=l.substr(h,a-1)):n+=l.substr(h,a),!0;n+=this._EOLNormalized?l.substring(h,Math.max(h,c[d+1]-this._EOLLength)):l.substring(h,c[d+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;for(let f=d+1;fC+p,t.reset(0)):(v=h.buffer,b=C=>C,t.reset(p));do if(y=t.next(v),y){if(b(y.index)>=m)return d;this.positionInBuffer(e,b(y.index)-f,_);let C=this.getLineFeedCnt(e.piece.bufferIndex,r,_),w=_.line===r.line?_.column-r.column+o:_.column+1,S=w+y[0].length;if(u[d++]=ev(new O(n+C,w,n+C,S),y,l),b(y.index)+y[0].length>=m||d>=c)return d}while(y);return d}findMatchesLineByLine(e,t,n,o){let r=[],s=0,a=new $g(t.wordSeparators,t.regex),l=this.nodeAt2(e.startLineNumber,e.startColumn);if(l===null)return[];let c=this.nodeAt2(e.endLineNumber,e.endColumn);if(c===null)return[];let d=this.positionInBuffer(l.node,l.remainder),u=this.positionInBuffer(c.node,c.remainder);if(l.node===c.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,d,u,t,n,o,s,r),r;let h=e.startLineNumber,f=l.node;for(;f!==c.node;){let m=this.getLineFeedCnt(f.piece.bufferIndex,d,f.piece.end);if(m>=1){let _=this._buffers[f.piece.bufferIndex].lineStarts,v=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start),b=_[d.line+m],C=h===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(f,a,h,C,d,this.positionInBuffer(f,b-v),t,n,o,s,r),s>=o)return r;h+=m}let y=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){let _=this.getLineContent(h).substring(y,e.endColumn-1);return s=this._findMatchesInLine(t,a,_,e.endLineNumber,y,s,r,n,o),r}if(s=this._findMatchesInLine(t,a,this.getLineContent(h).substr(y),h,y,s,r,n,o),s>=o)return r;h++,l=this.nodeAt2(h,1),f=l.node,d=this.positionInBuffer(l.node,l.remainder)}if(h===e.endLineNumber){let m=h===e.startLineNumber?e.startColumn-1:0,y=this.getLineContent(h).substring(m,e.endColumn-1);return s=this._findMatchesInLine(t,a,y,e.endLineNumber,m,s,r,n,o),r}let p=h===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(c.node,a,h,p,d,u,t,n,o,s,r),r}_findMatchesInLine(e,t,n,o,r,s,a,l,c){let d=e.wordSeparators;if(!l&&e.simpleSearch){let h=e.simpleSearch,f=h.length,p=n.length,m=-f;for(;(m=n.indexOf(h,m+f))!==-1;)if((!d||H$(d,n,p,m,f))&&(a[s++]=new Ug(new O(o,m+1+r,o,m+1+f+r),null),s>=c))return s;return s}let u;t.reset(0);do if(u=t.next(n),u&&(a[s++]=ev(new O(o,u.index+1+r,o,u.index+1+u[0].length+r),u,l),s>=c))return s;while(u);return s}insert(e,t,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==bn){let{node:o,remainder:r,nodeStartOffset:s}=this.nodeAt(e),a=o.piece,l=a.bufferIndex,c=this.positionInBuffer(o,r);if(o.piece.bufferIndex===0&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===e&&t.lengthe){let d=[],u=new Td(a.bufferIndex,c,a.end,this.getLineFeedCnt(a.bufferIndex,c,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,c));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.nodeCharCodeAt(o,r)===10){let m={line:u.start.line+1,column:0};u=new Td(u.bufferIndex,m,u.end,this.getLineFeedCnt(u.bufferIndex,m,u.end),u.length-1),t+=` `}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(o,r-1)===13){let m=this.positionInBuffer(o,r-1);this.deleteNodeTail(o,m),t="\r"+t,o.piece.length===0&&d.push(o)}else this.deleteNodeTail(o,c);else this.deleteNodeTail(o,c);let h=this.createNewPieces(t);u.length>0&&this.rbInsertRight(o,u);let f=o;for(let p=0;p=0;s--)r=this.rbInsertLeft(r,o[s]);this.validateCRLFWithPrevNode(r),this.deleteNodes(n)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=` `);let n=this.createNewPieces(e),o=this.rbInsertRight(t,n[0]),r=o;for(let s=1;s=h)c=u+1;else break;return n?(n.line=u,n.column=l-f,null):{line:u,column:l-f}}getLineFeedCnt(e,t,n){if(n.column===0)return n.line-t.line;let o=this._buffers[e].lineStarts;if(n.line===o.length-1)return n.line-t.line;let r=o[n.line+1],s=o[n.line]+n.column;if(r>s+1)return n.line-t.line;let a=s-1;return this._buffers[e].buffer.charCodeAt(a)===13?n.line-t.line+1:n.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;ty4){let d=[];for(;e.length>y4;){let h=e.charCodeAt(y4-1),f;h===13||h>=55296&&h<=56319?(f=e.substring(0,y4-1),e=e.substring(y4-1)):(f=e.substring(0,y4),e=e.substring(y4));let p=m2(f);d.push(new Td(this._buffers.length,{line:0,column:0},{line:p.length-1,column:f.length-p[p.length-1]},p.length-1,f.length)),this._buffers.push(new g2(f,p))}let u=m2(e);return d.push(new Td(this._buffers.length,{line:0,column:0},{line:u.length-1,column:e.length-u[u.length-1]},u.length-1,e.length)),this._buffers.push(new g2(e,u)),d}let t=this._buffers[0].buffer.length,n=m2(e,!1),o=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&t!==0&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},o=this._lastChangeBufferPos;for(let d=0;d=e-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>e-1){let l=this.getAccumulatedValue(n,e-n.lf_left-2),c=this.getAccumulatedValue(n,e-n.lf_left-1),d=this._buffers[n.piece.bufferIndex].buffer,u=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return s+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:s,nodeStartLineNumber:a-(e-1-n.lf_left)}),d.substring(u+l,u+c-t)}else if(n.lf_left+n.piece.lineFeedCnt===e-1){let l=this.getAccumulatedValue(n,e-n.lf_left-2),c=this._buffers[n.piece.bufferIndex].buffer,d=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);o=c.substring(d+l,d+n.piece.length);break}else e-=n.lf_left+n.piece.lineFeedCnt,s+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==bn;){let s=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){let a=this.getAccumulatedValue(n,0),l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return o+=s.substring(l,l+a-t),o}else{let a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);o+=s.substr(a,n.piece.length)}n=n.next()}return o}computeBufferMetadata(){let e=this.root,t=1,n=0;for(;e!==bn;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.validate(this._length)}getIndexOf(e,t){let n=e.piece,o=this.positionInBuffer(e,t),r=o.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){let s=this.getLineFeedCnt(e.piece.bufferIndex,n.start,o);if(s!==r)return{index:s,remainder:0}}return{index:r,remainder:o.column}}getAccumulatedValue(e,t){if(t<0)return 0;let n=e.piece,o=this._buffers[n.bufferIndex].lineStarts,r=n.start.line+t+1;return r>n.end.line?o[n.end.line]+n.end.column-o[n.start.line]-n.start.column:o[r]-o[n.start.line]-n.start.column}deleteNodeTail(e,t){let n=e.piece,o=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.end),s=t,a=this.offsetInBuffer(n.bufferIndex,s),l=this.getLineFeedCnt(n.bufferIndex,n.start,s),c=l-o,d=a-r,u=n.length+d;e.piece=new Td(n.bufferIndex,n.start,s,l,u),p2(this,e,d,c)}deleteNodeHead(e,t){let n=e.piece,o=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.start),s=t,a=this.getLineFeedCnt(n.bufferIndex,s,n.end),l=this.offsetInBuffer(n.bufferIndex,s),c=a-o,d=r-l,u=n.length+d;e.piece=new Td(n.bufferIndex,s,n.end,a,u),p2(this,e,d,c)}shrinkNode(e,t,n){let o=e.piece,r=o.start,s=o.end,a=o.length,l=o.lineFeedCnt,c=t,d=this.getLineFeedCnt(o.bufferIndex,o.start,c),u=this.offsetInBuffer(o.bufferIndex,t)-this.offsetInBuffer(o.bufferIndex,r);e.piece=new Td(o.bufferIndex,o.start,c,d,u),p2(this,e,u-a,d-l);let h=new Td(o.bufferIndex,n,s,this.getLineFeedCnt(o.bufferIndex,n,s),this.offsetInBuffer(o.bufferIndex,s)-this.offsetInBuffer(o.bufferIndex,n)),f=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(f)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+=` `);let n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),o=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;let r=m2(t,!1);for(let f=0;fe)t=t.left;else if(t.size_left+t.piece.length>=e){o+=t.size_left;let r={node:t,remainder:e-t.size_left,nodeStartOffset:o};return this._searchCache.set(r),r}else e-=t.size_left+t.piece.length,o+=t.size_left+t.piece.length,t=t.right;return null}nodeAt2(e,t){let n=this.root,o=0;for(;n!==bn;)if(n.left!==bn&&n.lf_left>=e-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>e-1){let r=this.getAccumulatedValue(n,e-n.lf_left-2),s=this.getAccumulatedValue(n,e-n.lf_left-1);return o+=n.size_left,{node:n,remainder:Math.min(r+t-1,s),nodeStartOffset:o}}else if(n.lf_left+n.piece.lineFeedCnt===e-1){let r=this.getAccumulatedValue(n,e-n.lf_left-2);if(r+t-1<=n.piece.length)return{node:n,remainder:r+t-1,nodeStartOffset:o};t-=n.piece.length-r;break}else e-=n.lf_left+n.piece.lineFeedCnt,o+=n.size_left+n.piece.length,n=n.right;for(n=n.next();n!==bn;){if(n.piece.lineFeedCnt>0){let r=this.getAccumulatedValue(n,0),s=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,r),nodeStartOffset:s}}else if(n.piece.length>=t-1){let r=this.offsetOfNode(n);return{node:n,remainder:t-1,nodeStartOffset:r}}else t-=n.piece.length;n=n.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;let n=this._buffers[e.piece.bufferIndex],o=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(o)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===` `)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===bn||e.piece.lineFeedCnt===0)return!1;let t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,o=t.start.line,r=n[o]+t.start.column;return o===n.length-1||n[o+1]>r+1?!1:this._buffers[t.bufferIndex].buffer.charCodeAt(r)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===bn||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let n=[],o=this._buffers[e.piece.bufferIndex].lineStarts,r;e.piece.end.column===0?r={line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:r={line:e.piece.end.line,column:e.piece.end.column-1};let s=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new Td(e.piece.bufferIndex,e.piece.start,r,a,s),p2(this,e,-1,-1),e.piece.length===0&&n.push(e);let l={line:t.piece.start.line+1,column:0},c=t.piece.length-1,d=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new Td(t.piece.bufferIndex,l,t.piece.end,d,c),p2(this,t,-1,-1),t.piece.length===0&&n.push(t);let u=this.createNewPieces(`\r `);this.rbInsertRight(e,u[0]);for(let h=0;h{Xt();Ri();Kt();Ca();ime();Cb();Fpe();nt();xx=class i extends ue{constructor(e,t,n,o,r,s,a){super(),this._onDidChangeContent=this._register(new ge),this._BOM=t,this._mightContainNonBasicASCII=!s,this._mightContainRTL=o,this._mightContainUnusualLineTerminators=r,this._pieceTree=new RG(e,n,a)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){let n=e+t,o=this.getPositionAt(e),r=this.getPositionAt(n);return new O(o.lineNumber,o.column,r.lineNumber,r.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";let n=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,n)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;let n=this.getOffsetAt(e.startLineNumber,e.startColumn),o=this.getOffsetAt(e.endLineNumber,e.endColumn),r=0,s=this._getEndOfLine(t),a=this.getEOL();if(s.length!==a.length){let l=s.length-a.length,c=e.endLineNumber-e.startLineNumber;r=l*c}return o-n+r}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let n=0,o=e.startLineNumber,r=e.endLineNumber;for(let s=o;s<=r;s++){let a=this.getLineContent(s),l=s===o?e.startColumn-1:0,c=s===r?e.endColumn-1:a.length;for(let d=l;d{Xt();Ri();Kt();Ca();ime();Cb();Fpe();nt();xx=class i extends ue{constructor(e,t,n,o,r,s,a){super(),this._onDidChangeContent=this._register(new ge),this._BOM=t,this._mightContainNonBasicASCII=!s,this._mightContainRTL=o,this._mightContainUnusualLineTerminators=r,this._pieceTree=new zG(e,n,a)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){let n=e+t,o=this.getPositionAt(e),r=this.getPositionAt(n);return new O(o.lineNumber,o.column,r.lineNumber,r.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";let n=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,n)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;let n=this.getOffsetAt(e.startLineNumber,e.startColumn),o=this.getOffsetAt(e.endLineNumber,e.endColumn),r=0,s=this._getEndOfLine(t),a=this.getEOL();if(s.length!==a.length){let l=s.length-a.length,c=e.endLineNumber-e.startLineNumber;r=l*c}return o-n+r}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let n=0,o=e.startLineNumber,r=e.endLineNumber;for(let s=o;s<=r;s++){let a=this.getLineContent(s),l=s===o?e.startColumn-1:0,c=s===r?e.endColumn-1:a.length;for(let d=l;dy.sortIndex-_.sortIndex)}this._mightContainRTL=o,this._mightContainUnusualLineTerminators=r,this._mightContainNonBasicASCII=s;let f=this._doApplyEdits(l),p=null;if(t&&u.length>0){u.sort((m,y)=>y.lineNumber-m.lineNumber),p=[];for(let m=0,y=u.length;m0&&u[m-1].lineNumber===_)continue;let v=u[m].oldContent,b=this.getLineContent(_);b.length===0||b===v||qr(b)!==-1||p.push(_)}}return this._onDidChangeContent.fire(),new A$(h,f,p)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1,n=e[0].range,o=e[e.length-1].range,r=new O(n.startLineNumber,n.startColumn,o.endLineNumber,o.endColumn),s=n.startLineNumber,a=n.startColumn,l=[];for(let f=0,p=e.length;f0&&l.push(m.text),s=y.endLineNumber,a=y.endColumn}let c=l.join(""),[d,u,h]=Qh(c);return{sortIndex:0,identifier:e[0].identifier,range:r,rangeOffset:this.getOffsetAt(r.startLineNumber,r.startColumn),rangeLength:this.getValueLengthInRange(r,0),text:c,eolCount:d,firstLineLength:u,lastLineLength:h,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(i._sortOpsDescending);let t=[];for(let n=0;n0){let h=l.eolCount+1;h===1?u=new O(c,d,c,d+l.firstLineLength):u=new O(c,d,c+h-1,l.lastLineLength+1)}else u=new O(c,d,c,d);n=u.endLineNumber,o=u.endColumn,t.push(u),r=l}return t}static _sortOpsAscending(e,t){let n=O.compareRangesUsingEnds(e.range,t.range);return n===0?e.sortIndex-t.sortIndex:n}static _sortOpsDescending(e,t){let n=O.compareRangesUsingEnds(e.range,t.range);return n===0?t.sortIndex-e.sortIndex:-n}}});var ome,mM,yJe=P(()=>{Ri();ime();nme();ome=class{constructor(e,t,n,o,r,s,a,l,c){this._chunks=e,this._bom=t,this._cr=n,this._lf=o,this._crlf=r,this._containsRTL=s,this._containsUnusualLineTerminators=a,this._isBasicASCII=l,this._normalizeEOL=c}_getEOL(e){let t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return t===0?e===1?` +`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,t,n){let o=this._mightContainRTL,r=this._mightContainUnusualLineTerminators,s=this._mightContainNonBasicASCII,a=!0,l=[];for(let m=0;my.sortIndex-_.sortIndex)}this._mightContainRTL=o,this._mightContainUnusualLineTerminators=r,this._mightContainNonBasicASCII=s;let f=this._doApplyEdits(l),p=null;if(t&&u.length>0){u.sort((m,y)=>y.lineNumber-m.lineNumber),p=[];for(let m=0,y=u.length;m0&&u[m-1].lineNumber===_)continue;let v=u[m].oldContent,b=this.getLineContent(_);b.length===0||b===v||qr(b)!==-1||p.push(_)}}return this._onDidChangeContent.fire(),new O$(h,f,p)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1,n=e[0].range,o=e[e.length-1].range,r=new O(n.startLineNumber,n.startColumn,o.endLineNumber,o.endColumn),s=n.startLineNumber,a=n.startColumn,l=[];for(let f=0,p=e.length;f0&&l.push(m.text),s=y.endLineNumber,a=y.endColumn}let c=l.join(""),[d,u,h]=Qh(c);return{sortIndex:0,identifier:e[0].identifier,range:r,rangeOffset:this.getOffsetAt(r.startLineNumber,r.startColumn),rangeLength:this.getValueLengthInRange(r,0),text:c,eolCount:d,firstLineLength:u,lastLineLength:h,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(i._sortOpsDescending);let t=[];for(let n=0;n0){let h=l.eolCount+1;h===1?u=new O(c,d,c,d+l.firstLineLength):u=new O(c,d,c+h-1,l.lastLineLength+1)}else u=new O(c,d,c,d);n=u.endLineNumber,o=u.endColumn,t.push(u),r=l}return t}static _sortOpsAscending(e,t){let n=O.compareRangesUsingEnds(e.range,t.range);return n===0?e.sortIndex-t.sortIndex:n}static _sortOpsDescending(e,t){let n=O.compareRangesUsingEnds(e.range,t.range);return n===0?t.sortIndex-e.sortIndex:-n}}});var ome,mM,yJe=P(()=>{Ri();ime();nme();ome=class{constructor(e,t,n,o,r,s,a,l,c){this._chunks=e,this._bom=t,this._cr=n,this._lf=o,this._crlf=r,this._containsRTL=s,this._containsUnusualLineTerminators=a,this._isBasicASCII=l,this._normalizeEOL=c}_getEOL(e){let t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return t===0?e===1?` `:`\r `:n>t/2?`\r `:` `}create(e){let t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&(t===`\r `&&(this._cr>0||this._lf>0)||t===` -`&&(this._cr>0||this._crlf>0)))for(let r=0,s=n.length;r=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){!t&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){let t=bJe(this._tmpLineStarts,e);this.chunks.push(new g2(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=lm(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=sU(e)))}finish(e=!0){return this._finish(),new ome(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=m2(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}});function eIt(i,e){let t=[];for(let n=0;n{Vi();PG=class{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,n){if(e>=this._store.length)return;if(t===0){this.insert(e,n);return}else if(n===0){this.delete(e,t);return}let o=this._store.slice(0,e),r=this._store.slice(e+t),s=eIt(n,this._default);this._store=o.concat(s,r)}delete(e,t){t===0||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(t===0||e>=this._store.length)return;let n=[];for(let o=0;o{OG=class{get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}constructor(e,t){this._startLineNumber=e,this._tokens=t}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}});var Sb,rme=P(()=>{wJe();Sb=class{constructor(){this._tokens=[]}add(e,t){if(this._tokens.length>0){let n=this._tokens[this._tokens.length-1];if(n.endLineNumber+1===e){n.appendLineTokens(t);return}}this._tokens.push(new OG(e,[t]))}finalize(){return this._tokens}}});function gM(i,e,t,n,o,r){let s=null;if(t)try{s=t.tokenizeEncoded(n,o,r.clone())}catch(a){hi(a)}return s||(s=sv(i.encodeLanguageId(e),r)),Es.convertToEndOffset(s.tokens,n.length),s}var sme,zG,Sx,ame,lme,FG,xJe=P(()=>{Qi();Pi();Mn();Yu();Cb();sh();Xf();mw();CJe();rme();Yg();sme=class{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new Sx(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}},zG=class extends sme{constructor(e,t,n,o){super(e,t),this._textModel=n,this._languageIdCodec=o}updateTokensUntilLine(e,t){let n=this._textModel.getLanguageId();for(;;){let o=this.getFirstInvalidLine();if(!o||o.lineNumber>t)break;let r=this._textModel.getLineContent(o.lineNumber),s=gM(this._languageIdCodec,n,this.tokenizationSupport,r,!0,o.startState);e.add(o.lineNumber,s.tokens),this.store.setEndState(o.lineNumber,s.endState)}}getTokenTypeIfInsertingCharacter(e,t){let n=this.getStartState(e.lineNumber);if(!n)return 0;let o=this._textModel.getLanguageId(),r=this._textModel.getLineContent(e.lineNumber),s=r.substring(0,e.column-1)+t+r.substring(e.column-1),a=gM(this._languageIdCodec,o,this.tokenizationSupport,s,!0,n),l=new Es(a.tokens,s,this._languageIdCodec);if(l.getCount()===0)return 0;let c=l.findTokenIndexAtOffset(e.column-1);return l.getStandardTokenType(c)}tokenizeLineWithEdit(e,t,n){let o=e.lineNumber,r=e.column,s=this.getStartState(o);if(!s)return null;let a=this._textModel.getLineContent(o),l=a.substring(0,r-1)+n+a.substring(r-1+t),c=this._textModel.getLanguageIdAtPosition(o,0),d=gM(this._languageIdCodec,c,this.tokenizationSupport,l,!0,s);return new Es(d.tokens,l,this._languageIdCodec)}isCheapToTokenize(e){let t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&a>=1;a--){let l=this._textModel.getLineFirstNonWhitespaceColumn(a);if(l!==0&&l0&&n>0&&(n--,t--),this._lineEndStates.replace(e.startLineNumber,n,t)}},lme=class{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}delete(e){let t=this._ranges.findIndex(n=>n.contains(e));if(t!==-1){let n=this._ranges[t];n.start===e?n.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new Pn(e+1,n.endExclusive):n.endExclusive===e+1?this._ranges[t]=new Pn(n.start,e):this._ranges.splice(t,1,new Pn(n.start,e),new Pn(e+1,n.endExclusive))}}addRange(e){Pn.addRange(e,this._ranges)}addRangeAndResize(e,t){let n=0;for(;!(n>=this._ranges.length||e.start<=this._ranges[n].endExclusive);)n++;let o=n;for(;!(o>=this._ranges.length||e.endExclusivee.toString()).join(" + ")}};FG=class{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,she(e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){let t=Date.now()+e.timeRemaining(),n=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()1||this._tokenizeOneInvalidLine(t)>=e)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.allStatesValid():!1}_tokenizeOneInvalidLine(e){var t;let n=(t=this._tokenizerWithStateStore)===null||t===void 0?void 0:t.getFirstInvalidLine();return n?(this._tokenizerWithStateStore.updateTokensUntilLine(e,n.lineNumber),n.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new rn(e,t))}}});function _2(i){return i instanceof Uint32Array?i:new Uint32Array(i)}var v2,b2,SJe=P(()=>{Yg();v2=new Uint32Array(0).buffer,b2=class i{static deleteBeginning(e,t){return e===null||e===v2?e:i.delete(e,0,t)}static deleteEnding(e,t){if(e===null||e===v2)return e;let n=_2(e),o=n[n.length-2];return i.delete(e,t,o)}static delete(e,t,n){if(e===null||e===v2||t===n)return e;let o=_2(e),r=o.length>>>1;if(t===0&&o[o.length-2]===n)return v2;let s=Es.findIndexInTokensArray(o,t),a=s>0?o[s-1<<1]:0,l=o[s<<1];if(nd&&(o[c++]=p,o[c++]=o[(f<<1)+1],d=p)}if(c===o.length)return e;let h=new Uint32Array(c);return h.set(o.subarray(0,c),0),h.buffer}static append(e,t){if(t===v2)return e;if(e===v2)return t;if(e===null)return e;if(t===null)return null;let n=_2(e),o=_2(t),r=o.length>>>1,s=new Uint32Array(n.length+o.length);s.set(n,0);let a=n.length,l=n[n.length-2];for(let c=0;c>>1,s=Es.findIndexInTokensArray(o,t);s>0&&o[s-1<<1]===t&&s--;for(let a=s;a>>0}var vM,LJe=P(()=>{Vi();Mi();SJe();Yg();B5();vM=class i{constructor(e){this._lineTokens=[],this._len=0,this._languageIdCodec=e}flush(){this._lineTokens=[],this._len=0}get hasTokens(){return this._lineTokens.length>0}getTokens(e,t,n){let o=null;if(t1&&(r=Ls.getLanguageId(o[1])!==e),!r)return v2}if(!o||o.length===0){let r=new Uint32Array(2);return r[0]=t,r[1]=kJe(e),r.buffer}return o[o.length-2]=t,o.byteOffset===0&&o.byteLength===o.buffer.byteLength?o.buffer:o}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){t!==0&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(t===0)return;let n=[];for(let o=0;o=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[t]=b2.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1);return}this._lineTokens[t]=b2.deleteEnding(this._lineTokens[t],e.startColumn-1);let n=e.endLineNumber-1,o=null;n=this._len)){if(t===0){this._lineTokens[o]=b2.insert(this._lineTokens[o],e.column-1,n);return}this._lineTokens[o]=b2.deleteEnding(this._lineTokens[o],e.column-1),this._lineTokens[o]=b2.insert(this._lineTokens[o],e.column-1,n),this._insertLines(e.lineNumber,t)}}setMultilineTokens(e,t){if(e.length===0)return{changes:[]};let n=[];for(let o=0,r=e.length;o{Vi();Yg();HG=class i{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let n=e;if(t.length>0){let r=t[0].getRange(),s=t[t.length-1].getRange();if(!r||!s)return e;n=e.plusRange(r).plusRange(s)}let o=null;for(let r=0,s=this._pieces.length;rn.endLineNumber){o=o||{index:r};break}if(a.removeTokens(n),a.isEmpty()){this._pieces.splice(r,1),r--,s--;continue}if(a.endLineNumbern.endLineNumber){o=o||{index:r};continue}let[l,c]=a.split(n);if(l.isEmpty()){o=o||{index:r};continue}c.isEmpty()||(this._pieces.splice(r,1,l,c),r++,s++,o=o||{index:r})}return o=o||{index:this._pieces.length},t.length>0&&(this._pieces=g3(this._pieces,o.index,t)),n}isComplete(){return this._isComplete}addSparseTokens(e,t){if(t.getLineContent().length===0)return t;let n=this._pieces;if(n.length===0)return t;let o=i._findFirstPieceWithLine(n,e),r=n[o].getLineTokens(e);if(!r)return t;let s=t.getCount(),a=r.getCount(),l=0,c=[],d=0,u=0,h=(f,p)=>{f!==u&&(u=f,c[d++]=f,c[d++]=p)};for(let f=0;f>>0,v=~_>>>0;for(;lt)o=r-1;else{for(;r>n&&e[r-1].startLineNumber<=t&&t<=e[r-1].endLineNumber;)r--;return r}}return n}acceptEdit(e,t,n,o,r){for(let s of this._pieces)s.acceptEdit(e,t,n,o,r)}}});var BG,cme,dme,DJe=P(()=>{Vi();Qi();Pi();Xt();nt();Cb();sh();Mi();CC();Pr();epe();xJe();rme();LJe();EJe();BG=class i extends ax{constructor(e,t,n,o,r,s){super(),this._languageService=e,this._languageConfigurationService=t,this._textModel=n,this._bracketPairsTextModelPart=o,this._languageId=r,this._attachedViews=s,this._semanticTokens=new HG(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new ge),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new ge),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new ge),this.onDidChangeTokens=this._onDidChangeTokens.event,this.grammarTokens=this._register(new cme(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews)),this._register(this._languageConfigurationService.onDidChange(a=>{a.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._register(this.grammarTokens.onDidChangeTokens(a=>{this._emitModelTokensChangedEvent(a)})),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState(a=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(let t of e.changes){let[n,o,r]=Qh(t.text);this._semanticTokens.acceptEdit(t.range,n,o,r,t.text.length>0?t.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(e)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);let t=this.grammarTokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new fo("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this.grammarTokens.forceTokenization(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this.grammarTokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this.grammarTokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,n){return this.grammarTokens.getTokenTypeIfInsertingCharacter(e,t,n)}tokenizeLineWithEdit(e,t,n){return this.grammarTokens.tokenizeLineWithEdit(e,t,n)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;let n=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();let t=this._textModel.validatePosition(e),n=this._textModel.getLineContent(t.lineNumber),o=this.getLineTokens(t.lineNumber),r=o.findTokenIndexAtOffset(t.column-1),[s,a]=i._findLanguageBoundaries(o,r),l=_3(t.column,this.getLanguageConfiguration(o.getLanguageId(r)).getWordDefinition(),n.substring(s,a),s);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(r>0&&s===t.column-1){let[c,d]=i._findLanguageBoundaries(o,r-1),u=_3(t.column,this.getLanguageConfiguration(o.getLanguageId(r-1)).getWordDefinition(),n.substring(c,d),c);if(u&&u.startColumn<=e.column&&e.column<=u.endColumn)return u}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){let n=e.getLanguageId(t),o=0;for(let s=t;s>=0&&e.getLanguageId(s)===n;s--)o=e.getStartOffset(s);let r=e.getLineContent().length;for(let s=t,a=e.getCount();s{let s=this.getLanguageId();r.changedLanguages.indexOf(s)!==-1&&this.resetTokenization()})),this.resetTokenization(),this._register(o.onDidChangeVisibleRanges(({view:r,state:s})=>{if(s){let a=this._attachedViewStates.get(r);a||(a=new dme(()=>this.refreshRanges(a.lineRanges)),this._attachedViewStates.set(r,a)),a.handleStateChange(s)}else this._attachedViewStates.deleteAndDispose(r)}))}resetTokenization(e=!0){var t;this._tokens.flush(),(t=this._debugBackgroundTokens)===null||t===void 0||t.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new Sx(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});let n=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];let s=Eo.get(this.getLanguageId());if(!s)return[null,null];let a;try{a=s.getInitialState()}catch(l){return hi(l),[null,null]}return[s,a]},[o,r]=n();if(o&&r?this._tokenizer=new zG(this._textModel.getLineCount(),o,this._textModel,this._languageIdCodec):this._tokenizer=null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){let s={setTokens:a=>{this.setTokens(a)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;let a=2;this._backgroundTokenizationState=a,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(a,l)=>{var c;if(!this._tokenizer)return;let d=this._tokenizer.store.getFirstInvalidEndStateLineNumber();d!==null&&a>=d&&((c=this._tokenizer)===null||c===void 0||c.store.setEndState(a,l))}};o&&o.createBackgroundTokenizer&&!o.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=o.createBackgroundTokenizer(this._textModel,s)),!this._backgroundTokenizer.value&&!this._textModel.isTooLargeForTokenization()&&(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new FG(this._tokenizer,s),this._defaultBackgroundTokenizer.handleChanges()),o?.backgroundTokenizerShouldOnlyVerifyTokens&&o.createBackgroundTokenizer?(this._debugBackgroundTokens=new vM(this._languageIdCodec),this._debugBackgroundStates=new Sx(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=o.createBackgroundTokenizer(this._textModel,{setTokens:a=>{var l;(l=this._debugBackgroundTokens)===null||l===void 0||l.setMultilineTokens(a,this._textModel)},backgroundTokenizationFinished(){},setEndState:(a,l)=>{var c;(c=this._debugBackgroundStates)===null||c===void 0||c.setEndState(a,l)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var e;(e=this._defaultBackgroundTokenizer)===null||e===void 0||e.handleChanges()}handleDidChangeContent(e){var t,n,o;if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(let r of e.changes){let[s,a]=Qh(r.text);this._tokens.acceptEdit(r.range,s,a),(t=this._debugBackgroundTokens)===null||t===void 0||t.acceptEdit(r.range,s,a)}(n=this._debugBackgroundStates)===null||n===void 0||n.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),(o=this._defaultBackgroundTokenizer)===null||o===void 0||o.handleChanges()}}setTokens(e){let{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){let e=rn.joinMany([...this._attachedViewStates].map(([t,n])=>n.lineRanges));this.refreshRanges(e)}refreshRanges(e){for(let t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){var n,o;if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);let r=new Sb,{heuristicTokens:s}=this._tokenizer.tokenizeHeuristically(r,e,t),a=this.setTokens(r.finalize());if(s)for(let l of a.changes)(n=this._backgroundTokenizer.value)===null||n===void 0||n.requestTokens(l.fromLineNumber,l.toLineNumber+1);(o=this._defaultBackgroundTokenizer)===null||o===void 0||o.checkFinished()}forceTokenization(e){var t,n;let o=new Sb;(t=this._tokenizer)===null||t===void 0||t.updateTokensUntilLine(o,e),this.setTokens(o.finalize()),(n=this._defaultBackgroundTokenizer)===null||n===void 0||n.checkFinished()}isCheapToTokenize(e){return this._tokenizer?this._tokenizer.isCheapToTokenize(e):!0}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){var t;let n=this._textModel.getLineContent(e),o=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,n);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){let r=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,n);!o.equals(r)&&(!((t=this._debugBackgroundTokenizer.value)===null||t===void 0)&&t.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return o}getTokenTypeIfInsertingCharacter(e,t,n){if(!this._tokenizer)return 0;let o=this._textModel.validatePosition(new ke(e,t));return this.forceTokenization(o.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(o,n)}tokenizeLineWithEdit(e,t,n){if(!this._tokenizer)return null;let o=this._textModel.validatePosition(e);return this.forceTokenization(o.lineNumber),this._tokenizer.tokenizeLineWithEdit(o,t,n)}get hasTokens(){return this._tokens.hasTokens}},dme=class extends ue{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new hn(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){uo(this._computedLineRanges,this._lineRanges,(e,t)=>e.equals(t))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}});var VG,fh,_M,WG,UG,$G,kb,kx,Ev,Dv=P(()=>{VG=class{constructor(){this.changeType=1}},fh=class i{static applyInjectedText(e,t){if(!t||t.length===0)return e;let n="",o=0;for(let r of t)n+=e.substring(o,r.column-1),o=r.column-1,n+=r.options.content;return n+=e.substring(o),n}static fromDecorations(e){let t=[];for(let n of e)n.options.before&&n.options.before.content.length>0&&t.push(new i(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&t.push(new i(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return t.sort((n,o)=>n.lineNumber===o.lineNumber?n.column===o.column?n.order-o.order:n.column-o.column:n.lineNumber-o.lineNumber),t}constructor(e,t,n,o,r){this.ownerId=e,this.lineNumber=t,this.column=n,this.options=o,this.order=r}},_M=class{constructor(e,t,n){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=n}},WG=class{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}},UG=class{constructor(e,t,n,o){this.changeType=4,this.injectedTexts=o,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}},$G=class{constructor(){this.changeType=5}},kb=class i{constructor(e,t,n,o){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=o,this.resultingSelection=null}containsEvent(e){for(let t=0,n=this.changes.length;t{_i();Tv=vi("undoRedoService"),bM=class{constructor(e,t){this.resource=e,this.elements=t}},Lb=class i{constructor(){this.id=i._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}};Lb._ID=0;Lb.None=new Lb;Rm=class i{constructor(){this.id=i._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}};Rm._ID=0;Rm.None=new Rm});function nIt(i){let e=new mM;return e.acceptChunk(i),e.finish()}function oIt(i){let e=new mM,t;for(;typeof(t=i.read())=="string";)e.acceptChunk(t);return e.finish()}function TJe(i,e){let t;return typeof i=="string"?t=nIt(i):KGe(i)?t=oIt(i):t=i,t.create(e)}function aIt(i){let e=0;for(let t of i)if(t===" "||t===" ")e++;else break;return e}function hme(i){return!!(i.options.overviewRuler&&i.options.overviewRuler.color)}function lIt(i){return!!i.after||!!i.before}function qG(i){return!!i.options.after||!!i.options.before}function y2(i){return i.replace(/[^a-z0-9\-_]/gi," ")}function MJe(i){return i instanceof zi?i:zi.createDynamic(i)}var iIt,ume,Eb,jG,rIt,sIt,fme,CM,Cp,GG,KG,pme,mme,gme,C2,zi,IJe,vme,_me,bme,yme,ea=P(()=>{Vi();sa();Pi();Xt();nt();Ri();Io();Cb();dq();sh();Mi();Kt();zo();eT();Ha();Kr();Ca();GQe();KQe();$pe();tpe();sJe();gJe();nme();yJe();JT();DJe();Dv();yM();iIt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},ume=function(i,e){return function(t,n){e(t,n,i)}};jG=0,rIt=999,sIt=1e4,fme=class{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;let e=[],t=0,n=0;do{let o=this._source.read();if(o===null)return this._eos=!0,t===0?null:e.join("");if(o.length>0&&(e[t++]=o,n+=o.length),n>=64*1024)return e.join("")}while(!0)}},CM=()=>{throw new Error("Invalid change accessor")},Cp=Eb=class extends ue{static resolveOptions(e,t){if(t.detectIndentation){let n=qpe(e,t.tabSize,t.insertSpaces);return new Q3({tabSize:n.tabSize,indentSize:"tabSize",insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new Q3(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return vl(this._eventEmitter.fastEvent(t=>e(t)),this._onDidChangeInjectedText.event(t=>e(t)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,n,o=null,r,s,a){super(),this._undoRedoService=r,this._languageService=s,this._languageConfigurationService=a,this._onWillDispose=this._register(new ge),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new vme(f=>this.handleBeforeFireDecorationsChangedEvent(f))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new ge),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new ge),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new ge),this._eventEmitter=this._register(new _me),this._languageSelectionListener=this._register(new To),this._deltaDecorationCallCnt=0,this._attachedViews=new bme,jG++,this.id="$model"+jG,this.isForSimpleWidget=n.isForSimpleWidget,typeof o>"u"||o===null?this._associatedResource=li.parse("inmemory://model/"+jG):this._associatedResource=o,this._attachedEditorCount=0;let{textBuffer:l,disposable:c}=TJe(e,n.defaultEOL);this._buffer=l,this._bufferDisposable=c,this._options=Eb.resolveOptions(this._buffer,n);let d=typeof t=="string"?t:t.languageId;typeof t!="string"&&(this._languageSelectionListener.value=t.onDidChange(()=>this._setLanguage(t.languageId))),this._bracketPairs=this._register(new LG(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new $q(this,this._languageConfigurationService)),this._decorationProvider=this._register(new EG(this)),this._tokenizationTextModelPart=new BG(this._languageService,this._languageConfigurationService,this,this._bracketPairs,d,this._attachedViews);let u=this._buffer.getLineCount(),h=this._buffer.getValueLengthInRange(new O(1,1,u,this._buffer.getLineLength(u)+1),0);n.largeFileOptimizations?(this._isTooLargeForTokenization=h>Eb.LARGE_FILE_SIZE_THRESHOLD||u>Eb.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=h>Eb.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=h>Eb._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=aU(jG),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new GG,this._commandManager=new NG(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})),this._languageService.requestRichLanguageFeatures(d)}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;let e=new xx([],"",` -`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=ue.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new Ev(e,t)))}setValue(e){if(this._assertNotDisposed(),e==null)throw gl();let{textBuffer:t,disposable:n}=TJe(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,n)}_createContentChanged2(e,t,n,o,r,s,a,l){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:o}],eol:this._buffer.getEOL(),isEolChange:l,versionId:this.getVersionId(),isUndoing:r,isRedoing:s,isFlush:a}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();let n=this.getFullModelRange(),o=this.getValueLengthInRange(n),r=this.getLineCount(),s=this.getLineMaxColumn(r);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new GG,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new kb([new VG],this._versionId,!1,!1),this._createContentChanged2(new O(1,1,r,s),0,o,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();let t=e===1?`\r +`&&(this._cr>0||this._crlf>0)))for(let r=0,s=n.length;r=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){!t&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){let t=bJe(this._tmpLineStarts,e);this.chunks.push(new g2(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=lm(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=cU(e)))}finish(e=!0){return this._finish(),new ome(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=m2(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}});function eIt(i,e){let t=[];for(let n=0;n{Vi();FG=class{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,n){if(e>=this._store.length)return;if(t===0){this.insert(e,n);return}else if(n===0){this.delete(e,t);return}let o=this._store.slice(0,e),r=this._store.slice(e+t),s=eIt(n,this._default);this._store=o.concat(s,r)}delete(e,t){t===0||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(t===0||e>=this._store.length)return;let n=[];for(let o=0;o{HG=class{get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}constructor(e,t){this._startLineNumber=e,this._tokens=t}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}});var Sb,rme=P(()=>{wJe();Sb=class{constructor(){this._tokens=[]}add(e,t){if(this._tokens.length>0){let n=this._tokens[this._tokens.length-1];if(n.endLineNumber+1===e){n.appendLineTokens(t);return}}this._tokens.push(new HG(e,[t]))}finalize(){return this._tokens}}});function gM(i,e,t,n,o,r){let s=null;if(t)try{s=t.tokenizeEncoded(n,o,r.clone())}catch(a){hi(a)}return s||(s=av(i.encodeLanguageId(e),r)),Es.convertToEndOffset(s.tokens,n.length),s}var sme,BG,Sx,ame,lme,VG,xJe=P(()=>{Qi();Pi();Mn();Yu();Cb();sh();Xf();mw();CJe();rme();Yg();sme=class{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new Sx(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}},BG=class extends sme{constructor(e,t,n,o){super(e,t),this._textModel=n,this._languageIdCodec=o}updateTokensUntilLine(e,t){let n=this._textModel.getLanguageId();for(;;){let o=this.getFirstInvalidLine();if(!o||o.lineNumber>t)break;let r=this._textModel.getLineContent(o.lineNumber),s=gM(this._languageIdCodec,n,this.tokenizationSupport,r,!0,o.startState);e.add(o.lineNumber,s.tokens),this.store.setEndState(o.lineNumber,s.endState)}}getTokenTypeIfInsertingCharacter(e,t){let n=this.getStartState(e.lineNumber);if(!n)return 0;let o=this._textModel.getLanguageId(),r=this._textModel.getLineContent(e.lineNumber),s=r.substring(0,e.column-1)+t+r.substring(e.column-1),a=gM(this._languageIdCodec,o,this.tokenizationSupport,s,!0,n),l=new Es(a.tokens,s,this._languageIdCodec);if(l.getCount()===0)return 0;let c=l.findTokenIndexAtOffset(e.column-1);return l.getStandardTokenType(c)}tokenizeLineWithEdit(e,t,n){let o=e.lineNumber,r=e.column,s=this.getStartState(o);if(!s)return null;let a=this._textModel.getLineContent(o),l=a.substring(0,r-1)+n+a.substring(r-1+t),c=this._textModel.getLanguageIdAtPosition(o,0),d=gM(this._languageIdCodec,c,this.tokenizationSupport,l,!0,s);return new Es(d.tokens,l,this._languageIdCodec)}isCheapToTokenize(e){let t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&a>=1;a--){let l=this._textModel.getLineFirstNonWhitespaceColumn(a);if(l!==0&&l0&&n>0&&(n--,t--),this._lineEndStates.replace(e.startLineNumber,n,t)}},lme=class{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}delete(e){let t=this._ranges.findIndex(n=>n.contains(e));if(t!==-1){let n=this._ranges[t];n.start===e?n.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new Pn(e+1,n.endExclusive):n.endExclusive===e+1?this._ranges[t]=new Pn(n.start,e):this._ranges.splice(t,1,new Pn(n.start,e),new Pn(e+1,n.endExclusive))}}addRange(e){Pn.addRange(e,this._ranges)}addRangeAndResize(e,t){let n=0;for(;!(n>=this._ranges.length||e.start<=this._ranges[n].endExclusive);)n++;let o=n;for(;!(o>=this._ranges.length||e.endExclusivee.toString()).join(" + ")}};VG=class{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,she(e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){let t=Date.now()+e.timeRemaining(),n=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()1||this._tokenizeOneInvalidLine(t)>=e)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.allStatesValid():!1}_tokenizeOneInvalidLine(e){var t;let n=(t=this._tokenizerWithStateStore)===null||t===void 0?void 0:t.getFirstInvalidLine();return n?(this._tokenizerWithStateStore.updateTokensUntilLine(e,n.lineNumber),n.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new rn(e,t))}}});function _2(i){return i instanceof Uint32Array?i:new Uint32Array(i)}var v2,b2,SJe=P(()=>{Yg();v2=new Uint32Array(0).buffer,b2=class i{static deleteBeginning(e,t){return e===null||e===v2?e:i.delete(e,0,t)}static deleteEnding(e,t){if(e===null||e===v2)return e;let n=_2(e),o=n[n.length-2];return i.delete(e,t,o)}static delete(e,t,n){if(e===null||e===v2||t===n)return e;let o=_2(e),r=o.length>>>1;if(t===0&&o[o.length-2]===n)return v2;let s=Es.findIndexInTokensArray(o,t),a=s>0?o[s-1<<1]:0,l=o[s<<1];if(nd&&(o[c++]=p,o[c++]=o[(f<<1)+1],d=p)}if(c===o.length)return e;let h=new Uint32Array(c);return h.set(o.subarray(0,c),0),h.buffer}static append(e,t){if(t===v2)return e;if(e===v2)return t;if(e===null)return e;if(t===null)return null;let n=_2(e),o=_2(t),r=o.length>>>1,s=new Uint32Array(n.length+o.length);s.set(n,0);let a=n.length,l=n[n.length-2];for(let c=0;c>>1,s=Es.findIndexInTokensArray(o,t);s>0&&o[s-1<<1]===t&&s--;for(let a=s;a>>0}var vM,LJe=P(()=>{Vi();Mi();SJe();Yg();B5();vM=class i{constructor(e){this._lineTokens=[],this._len=0,this._languageIdCodec=e}flush(){this._lineTokens=[],this._len=0}get hasTokens(){return this._lineTokens.length>0}getTokens(e,t,n){let o=null;if(t1&&(r=Ls.getLanguageId(o[1])!==e),!r)return v2}if(!o||o.length===0){let r=new Uint32Array(2);return r[0]=t,r[1]=kJe(e),r.buffer}return o[o.length-2]=t,o.byteOffset===0&&o.byteLength===o.buffer.byteLength?o.buffer:o}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){t!==0&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(t===0)return;let n=[];for(let o=0;o=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[t]=b2.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1);return}this._lineTokens[t]=b2.deleteEnding(this._lineTokens[t],e.startColumn-1);let n=e.endLineNumber-1,o=null;n=this._len)){if(t===0){this._lineTokens[o]=b2.insert(this._lineTokens[o],e.column-1,n);return}this._lineTokens[o]=b2.deleteEnding(this._lineTokens[o],e.column-1),this._lineTokens[o]=b2.insert(this._lineTokens[o],e.column-1,n),this._insertLines(e.lineNumber,t)}}setMultilineTokens(e,t){if(e.length===0)return{changes:[]};let n=[];for(let o=0,r=e.length;o{Vi();Yg();WG=class i{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let n=e;if(t.length>0){let r=t[0].getRange(),s=t[t.length-1].getRange();if(!r||!s)return e;n=e.plusRange(r).plusRange(s)}let o=null;for(let r=0,s=this._pieces.length;rn.endLineNumber){o=o||{index:r};break}if(a.removeTokens(n),a.isEmpty()){this._pieces.splice(r,1),r--,s--;continue}if(a.endLineNumbern.endLineNumber){o=o||{index:r};continue}let[l,c]=a.split(n);if(l.isEmpty()){o=o||{index:r};continue}c.isEmpty()||(this._pieces.splice(r,1,l,c),r++,s++,o=o||{index:r})}return o=o||{index:this._pieces.length},t.length>0&&(this._pieces=v3(this._pieces,o.index,t)),n}isComplete(){return this._isComplete}addSparseTokens(e,t){if(t.getLineContent().length===0)return t;let n=this._pieces;if(n.length===0)return t;let o=i._findFirstPieceWithLine(n,e),r=n[o].getLineTokens(e);if(!r)return t;let s=t.getCount(),a=r.getCount(),l=0,c=[],d=0,u=0,h=(f,p)=>{f!==u&&(u=f,c[d++]=f,c[d++]=p)};for(let f=0;f>>0,v=~_>>>0;for(;lt)o=r-1;else{for(;r>n&&e[r-1].startLineNumber<=t&&t<=e[r-1].endLineNumber;)r--;return r}}return n}acceptEdit(e,t,n,o,r){for(let s of this._pieces)s.acceptEdit(e,t,n,o,r)}}});var UG,cme,dme,DJe=P(()=>{Vi();Qi();Pi();Xt();nt();Cb();sh();Mi();CC();Pr();epe();xJe();rme();LJe();EJe();UG=class i extends ax{constructor(e,t,n,o,r,s){super(),this._languageService=e,this._languageConfigurationService=t,this._textModel=n,this._bracketPairsTextModelPart=o,this._languageId=r,this._attachedViews=s,this._semanticTokens=new WG(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new ge),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new ge),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new ge),this.onDidChangeTokens=this._onDidChangeTokens.event,this.grammarTokens=this._register(new cme(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews)),this._register(this._languageConfigurationService.onDidChange(a=>{a.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._register(this.grammarTokens.onDidChangeTokens(a=>{this._emitModelTokensChangedEvent(a)})),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState(a=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(let t of e.changes){let[n,o,r]=Qh(t.text);this._semanticTokens.acceptEdit(t.range,n,o,r,t.text.length>0?t.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(e)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);let t=this.grammarTokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new fo("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this.grammarTokens.forceTokenization(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this.grammarTokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this.grammarTokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,n){return this.grammarTokens.getTokenTypeIfInsertingCharacter(e,t,n)}tokenizeLineWithEdit(e,t,n){return this.grammarTokens.tokenizeLineWithEdit(e,t,n)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;let n=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();let t=this._textModel.validatePosition(e),n=this._textModel.getLineContent(t.lineNumber),o=this.getLineTokens(t.lineNumber),r=o.findTokenIndexAtOffset(t.column-1),[s,a]=i._findLanguageBoundaries(o,r),l=b3(t.column,this.getLanguageConfiguration(o.getLanguageId(r)).getWordDefinition(),n.substring(s,a),s);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(r>0&&s===t.column-1){let[c,d]=i._findLanguageBoundaries(o,r-1),u=b3(t.column,this.getLanguageConfiguration(o.getLanguageId(r-1)).getWordDefinition(),n.substring(c,d),c);if(u&&u.startColumn<=e.column&&e.column<=u.endColumn)return u}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){let n=e.getLanguageId(t),o=0;for(let s=t;s>=0&&e.getLanguageId(s)===n;s--)o=e.getStartOffset(s);let r=e.getLineContent().length;for(let s=t,a=e.getCount();s{let s=this.getLanguageId();r.changedLanguages.indexOf(s)!==-1&&this.resetTokenization()})),this.resetTokenization(),this._register(o.onDidChangeVisibleRanges(({view:r,state:s})=>{if(s){let a=this._attachedViewStates.get(r);a||(a=new dme(()=>this.refreshRanges(a.lineRanges)),this._attachedViewStates.set(r,a)),a.handleStateChange(s)}else this._attachedViewStates.deleteAndDispose(r)}))}resetTokenization(e=!0){var t;this._tokens.flush(),(t=this._debugBackgroundTokens)===null||t===void 0||t.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new Sx(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});let n=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];let s=Eo.get(this.getLanguageId());if(!s)return[null,null];let a;try{a=s.getInitialState()}catch(l){return hi(l),[null,null]}return[s,a]},[o,r]=n();if(o&&r?this._tokenizer=new BG(this._textModel.getLineCount(),o,this._textModel,this._languageIdCodec):this._tokenizer=null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){let s={setTokens:a=>{this.setTokens(a)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;let a=2;this._backgroundTokenizationState=a,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(a,l)=>{var c;if(!this._tokenizer)return;let d=this._tokenizer.store.getFirstInvalidEndStateLineNumber();d!==null&&a>=d&&((c=this._tokenizer)===null||c===void 0||c.store.setEndState(a,l))}};o&&o.createBackgroundTokenizer&&!o.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=o.createBackgroundTokenizer(this._textModel,s)),!this._backgroundTokenizer.value&&!this._textModel.isTooLargeForTokenization()&&(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new VG(this._tokenizer,s),this._defaultBackgroundTokenizer.handleChanges()),o?.backgroundTokenizerShouldOnlyVerifyTokens&&o.createBackgroundTokenizer?(this._debugBackgroundTokens=new vM(this._languageIdCodec),this._debugBackgroundStates=new Sx(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=o.createBackgroundTokenizer(this._textModel,{setTokens:a=>{var l;(l=this._debugBackgroundTokens)===null||l===void 0||l.setMultilineTokens(a,this._textModel)},backgroundTokenizationFinished(){},setEndState:(a,l)=>{var c;(c=this._debugBackgroundStates)===null||c===void 0||c.setEndState(a,l)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var e;(e=this._defaultBackgroundTokenizer)===null||e===void 0||e.handleChanges()}handleDidChangeContent(e){var t,n,o;if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(let r of e.changes){let[s,a]=Qh(r.text);this._tokens.acceptEdit(r.range,s,a),(t=this._debugBackgroundTokens)===null||t===void 0||t.acceptEdit(r.range,s,a)}(n=this._debugBackgroundStates)===null||n===void 0||n.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),(o=this._defaultBackgroundTokenizer)===null||o===void 0||o.handleChanges()}}setTokens(e){let{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){let e=rn.joinMany([...this._attachedViewStates].map(([t,n])=>n.lineRanges));this.refreshRanges(e)}refreshRanges(e){for(let t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){var n,o;if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);let r=new Sb,{heuristicTokens:s}=this._tokenizer.tokenizeHeuristically(r,e,t),a=this.setTokens(r.finalize());if(s)for(let l of a.changes)(n=this._backgroundTokenizer.value)===null||n===void 0||n.requestTokens(l.fromLineNumber,l.toLineNumber+1);(o=this._defaultBackgroundTokenizer)===null||o===void 0||o.checkFinished()}forceTokenization(e){var t,n;let o=new Sb;(t=this._tokenizer)===null||t===void 0||t.updateTokensUntilLine(o,e),this.setTokens(o.finalize()),(n=this._defaultBackgroundTokenizer)===null||n===void 0||n.checkFinished()}isCheapToTokenize(e){return this._tokenizer?this._tokenizer.isCheapToTokenize(e):!0}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){var t;let n=this._textModel.getLineContent(e),o=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,n);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){let r=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,n);!o.equals(r)&&(!((t=this._debugBackgroundTokenizer.value)===null||t===void 0)&&t.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return o}getTokenTypeIfInsertingCharacter(e,t,n){if(!this._tokenizer)return 0;let o=this._textModel.validatePosition(new ke(e,t));return this.forceTokenization(o.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(o,n)}tokenizeLineWithEdit(e,t,n){if(!this._tokenizer)return null;let o=this._textModel.validatePosition(e);return this.forceTokenization(o.lineNumber),this._tokenizer.tokenizeLineWithEdit(o,t,n)}get hasTokens(){return this._tokens.hasTokens}},dme=class extends ue{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new hn(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){uo(this._computedLineRanges,this._lineRanges,(e,t)=>e.equals(t))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}});var $G,fh,_M,jG,qG,GG,kb,kx,Dv,Tv=P(()=>{$G=class{constructor(){this.changeType=1}},fh=class i{static applyInjectedText(e,t){if(!t||t.length===0)return e;let n="",o=0;for(let r of t)n+=e.substring(o,r.column-1),o=r.column-1,n+=r.options.content;return n+=e.substring(o),n}static fromDecorations(e){let t=[];for(let n of e)n.options.before&&n.options.before.content.length>0&&t.push(new i(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&t.push(new i(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return t.sort((n,o)=>n.lineNumber===o.lineNumber?n.column===o.column?n.order-o.order:n.column-o.column:n.lineNumber-o.lineNumber),t}constructor(e,t,n,o,r){this.ownerId=e,this.lineNumber=t,this.column=n,this.options=o,this.order=r}},_M=class{constructor(e,t,n){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=n}},jG=class{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}},qG=class{constructor(e,t,n,o){this.changeType=4,this.injectedTexts=o,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}},GG=class{constructor(){this.changeType=5}},kb=class i{constructor(e,t,n,o){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=o,this.resultingSelection=null}containsEvent(e){for(let t=0,n=this.changes.length;t{_i();Iv=vi("undoRedoService"),bM=class{constructor(e,t){this.resource=e,this.elements=t}},Lb=class i{constructor(){this.id=i._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}};Lb._ID=0;Lb.None=new Lb;Rm=class i{constructor(){this.id=i._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}};Rm._ID=0;Rm.None=new Rm});function nIt(i){let e=new mM;return e.acceptChunk(i),e.finish()}function oIt(i){let e=new mM,t;for(;typeof(t=i.read())=="string";)e.acceptChunk(t);return e.finish()}function TJe(i,e){let t;return typeof i=="string"?t=nIt(i):KGe(i)?t=oIt(i):t=i,t.create(e)}function aIt(i){let e=0;for(let t of i)if(t===" "||t===" ")e++;else break;return e}function hme(i){return!!(i.options.overviewRuler&&i.options.overviewRuler.color)}function lIt(i){return!!i.after||!!i.before}function YG(i){return!!i.options.after||!!i.options.before}function y2(i){return i.replace(/[^a-z0-9\-_]/gi," ")}function MJe(i){return i instanceof zi?i:zi.createDynamic(i)}var iIt,ume,Eb,KG,rIt,sIt,fme,CM,Cp,ZG,XG,pme,mme,gme,C2,zi,IJe,vme,_me,bme,yme,ea=P(()=>{Vi();sa();Pi();Xt();nt();Ri();Io();Cb();fq();sh();Mi();Kt();zo();eT();Ha();Kr();Ca();GQe();KQe();$pe();tpe();sJe();gJe();nme();yJe();JT();DJe();Tv();yM();iIt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},ume=function(i,e){return function(t,n){e(t,n,i)}};KG=0,rIt=999,sIt=1e4,fme=class{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;let e=[],t=0,n=0;do{let o=this._source.read();if(o===null)return this._eos=!0,t===0?null:e.join("");if(o.length>0&&(e[t++]=o,n+=o.length),n>=64*1024)return e.join("")}while(!0)}},CM=()=>{throw new Error("Invalid change accessor")},Cp=Eb=class extends ue{static resolveOptions(e,t){if(t.detectIndentation){let n=qpe(e,t.tabSize,t.insertSpaces);return new J3({tabSize:n.tabSize,indentSize:"tabSize",insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new J3(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return vl(this._eventEmitter.fastEvent(t=>e(t)),this._onDidChangeInjectedText.event(t=>e(t)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,n,o=null,r,s,a){super(),this._undoRedoService=r,this._languageService=s,this._languageConfigurationService=a,this._onWillDispose=this._register(new ge),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new vme(f=>this.handleBeforeFireDecorationsChangedEvent(f))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new ge),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new ge),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new ge),this._eventEmitter=this._register(new _me),this._languageSelectionListener=this._register(new To),this._deltaDecorationCallCnt=0,this._attachedViews=new bme,KG++,this.id="$model"+KG,this.isForSimpleWidget=n.isForSimpleWidget,typeof o>"u"||o===null?this._associatedResource=li.parse("inmemory://model/"+KG):this._associatedResource=o,this._attachedEditorCount=0;let{textBuffer:l,disposable:c}=TJe(e,n.defaultEOL);this._buffer=l,this._bufferDisposable=c,this._options=Eb.resolveOptions(this._buffer,n);let d=typeof t=="string"?t:t.languageId;typeof t!="string"&&(this._languageSelectionListener.value=t.onDidChange(()=>this._setLanguage(t.languageId))),this._bracketPairs=this._register(new TG(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new Gq(this,this._languageConfigurationService)),this._decorationProvider=this._register(new IG(this)),this._tokenizationTextModelPart=new UG(this._languageService,this._languageConfigurationService,this,this._bracketPairs,d,this._attachedViews);let u=this._buffer.getLineCount(),h=this._buffer.getValueLengthInRange(new O(1,1,u,this._buffer.getLineLength(u)+1),0);n.largeFileOptimizations?(this._isTooLargeForTokenization=h>Eb.LARGE_FILE_SIZE_THRESHOLD||u>Eb.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=h>Eb.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=h>Eb._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=dU(KG),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new ZG,this._commandManager=new PG(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})),this._languageService.requestRichLanguageFeatures(d)}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;let e=new xx([],"",` +`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=ue.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new Dv(e,t)))}setValue(e){if(this._assertNotDisposed(),e==null)throw gl();let{textBuffer:t,disposable:n}=TJe(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,n)}_createContentChanged2(e,t,n,o,r,s,a,l){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:o}],eol:this._buffer.getEOL(),isEolChange:l,versionId:this.getVersionId(),isUndoing:r,isRedoing:s,isFlush:a}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();let n=this.getFullModelRange(),o=this.getValueLengthInRange(n),r=this.getLineCount(),s=this.getLineMaxColumn(r);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new ZG,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new kb([new $G],this._versionId,!1,!1),this._createContentChanged2(new O(1,1,r,s),0,o,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();let t=e===1?`\r `:` -`;if(this._buffer.getEOL()===t)return;let n=this.getFullModelRange(),o=this.getValueLengthInRange(n),r=this.getLineCount(),s=this.getLineMaxColumn(r);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new kb([new $G],this._versionId,!1,!1),this._createContentChanged2(new O(1,1,r,s),0,o,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){let e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let n=0,o=t.length;n0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0,n=this._buffer.getLineCount();for(let o=1;o<=n;o++){let r=this._buffer.getLineLength(o);r>=sIt?t+=r:e+=r}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();let t=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,n=typeof e.indentSize<"u"?e.indentSize:this._options.originalIndentSize,o=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,r=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new Q3({tabSize:t,indentSize:n,insertSpaces:o,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:r,bracketPairColorizationOptions:s});if(this._options.equals(a))return;let l=this._options.createChangeEvent(a);this._options=a,this._bracketPairs.handleDidChangeOptions(l),this._decorationProvider.handleDidChangeOptions(l),this._onDidChangeOptions.fire(l)}detectIndentation(e,t){this._assertNotDisposed();let n=qpe(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),lb(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){let t=this.findMatches(Vue.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(n=>({range:n.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new fo("Operation would exceed heap memory limits");let n=this.getFullModelRange(),o=this.getValueInRange(n,e);return t?this._buffer.getBOM()+o:o}createSnapshot(e=!1){return new fme(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();let n=this.getFullModelRange(),o=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+o:o}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new fo("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new fo("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new fo("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` +`;if(this._buffer.getEOL()===t)return;let n=this.getFullModelRange(),o=this.getValueLengthInRange(n),r=this.getLineCount(),s=this.getLineMaxColumn(r);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new kb([new GG],this._versionId,!1,!1),this._createContentChanged2(new O(1,1,r,s),0,o,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){let e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let n=0,o=t.length;n0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0,n=this._buffer.getLineCount();for(let o=1;o<=n;o++){let r=this._buffer.getLineLength(o);r>=sIt?t+=r:e+=r}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();let t=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,n=typeof e.indentSize<"u"?e.indentSize:this._options.originalIndentSize,o=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,r=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new J3({tabSize:t,indentSize:n,insertSpaces:o,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:r,bracketPairColorizationOptions:s});if(this._options.equals(a))return;let l=this._options.createChangeEvent(a);this._options=a,this._bracketPairs.handleDidChangeOptions(l),this._decorationProvider.handleDidChangeOptions(l),this._onDidChangeOptions.fire(l)}detectIndentation(e,t){this._assertNotDisposed();let n=qpe(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),lb(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){let t=this.findMatches(Vue.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(n=>({range:n.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new fo("Operation would exceed heap memory limits");let n=this.getFullModelRange(),o=this.getValueInRange(n,e);return t?this._buffer.getBOM()+o:o}createSnapshot(e=!1){return new fme(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();let n=this.getFullModelRange(),o=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+o:o}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new fo("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new fo("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new fo("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` `?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new fo("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new fo("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new fo("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){let t=this._buffer.getLineCount(),n=e.startLineNumber,o=e.startColumn,r=Math.floor(typeof n=="number"&&!isNaN(n)?n:1),s=Math.floor(typeof o=="number"&&!isNaN(o)?o:1);if(r<1)r=1,s=1;else if(r>t)r=t,s=this.getLineMaxColumn(r);else if(s<=1)s=1;else{let u=this.getLineMaxColumn(r);s>=u&&(s=u)}let a=e.endLineNumber,l=e.endColumn,c=Math.floor(typeof a=="number"&&!isNaN(a)?a:1),d=Math.floor(typeof l=="number"&&!isNaN(l)?l:1);if(c<1)c=1,d=1;else if(c>t)c=t,d=this.getLineMaxColumn(c);else if(d<=1)d=1;else{let u=this.getLineMaxColumn(c);d>=u&&(d=u)}return n===r&&o===s&&a===c&&l===d&&e instanceof O&&!(e instanceof jt)?e:new O(r,s,c,d)}_isValidPosition(e,t,n){if(typeof e!="number"||typeof t!="number"||isNaN(e)||isNaN(t)||e<1||t<1||(e|0)!==e||(t|0)!==t)return!1;let o=this._buffer.getLineCount();if(e>o)return!1;if(t===1)return!0;let r=this.getLineMaxColumn(e);if(t>r)return!1;if(n===1){let s=this._buffer.getLineCharCode(e,t-2);if(Or(s))return!1}return!0}_validatePosition(e,t,n){let o=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),r=Math.floor(typeof t=="number"&&!isNaN(t)?t:1),s=this._buffer.getLineCount();if(o<1)return new ke(1,1);if(o>s)return new ke(s,this.getLineMaxColumn(s));if(r<=1)return new ke(o,1);let a=this.getLineMaxColumn(o);if(r>=a)return new ke(o,a);if(n===1){let l=this._buffer.getLineCharCode(o,r-2);if(Or(l))return new ke(o,r-1)}return new ke(o,r)}validatePosition(e){return this._assertNotDisposed(),e instanceof ke&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){let n=e.startLineNumber,o=e.startColumn,r=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(n,o,0)||!this._isValidPosition(r,s,0))return!1;if(t===1){let a=o>1?this._buffer.getLineCharCode(n,o-2):0,l=s>1&&s<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,s-2):0,c=Or(a),d=Or(l);return!c&&!d}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof O&&!(e instanceof jt)&&this._isValidRange(e,1))return e;let n=this._validatePosition(e.startLineNumber,e.startColumn,0),o=this._validatePosition(e.endLineNumber,e.endColumn,0),r=n.lineNumber,s=n.column,a=o.lineNumber,l=o.column;{let c=s>1?this._buffer.getLineCharCode(r,s-2):0,d=l>1&&l<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,l-2):0,u=Or(c),h=Or(d);return!u&&!h?new O(r,s,a,l):r===a&&s===l?new O(r,s-1,a,l-1):u&&h?new O(r,s-1,a,l+1):u?new O(r,s-1,a,l):new O(r,s,a,l+1)}return new O(r,s,a,l)}modifyPosition(e,t){this._assertNotDisposed();let n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}getFullModelRange(){this._assertNotDisposed();let e=this.getLineCount();return new O(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,n,o){return this._buffer.findMatchesLineByLine(e,t,n,o)}findMatches(e,t,n,o,r,s,a=rIt){this._assertNotDisposed();let l=null;t!==null&&(Array.isArray(t)||(t=[t]),t.every(u=>O.isIRange(u))&&(l=t.map(u=>this.validateRange(u)))),l===null&&(l=[this.getFullModelRange()]),l=l.sort((u,h)=>u.startLineNumber-h.startLineNumber||u.startColumn-h.startColumn);let c=[];c.push(l.reduce((u,h)=>O.areIntersecting(u,h)?u.plusRange(h):(c.push(u),h)));let d;if(!n&&e.indexOf(` `)<0){let h=new vm(e,n,o,r).parseSearchRequest();if(!h)return[];d=f=>this.findMatchesLineByLine(f,h,s,a)}else d=u=>R5.findMatches(this,new vm(e,n,o,r),u,s,a);return c.map(d).reduce((u,h)=>u.concat(h),[])}findNextMatch(e,t,n,o,r,s){this._assertNotDisposed();let a=this.validatePosition(t);if(!n&&e.indexOf(` `)<0){let c=new vm(e,n,o,r).parseSearchRequest();if(!c)return null;let d=this.getLineCount(),u=new O(a.lineNumber,a.column,d,this.getLineMaxColumn(d)),h=this.findMatchesLineByLine(u,c,s,1);return R5.findNextMatch(this,new vm(e,n,o,r),a,s),h.length>0||(u=new O(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),h=this.findMatchesLineByLine(u,c,s,1),h.length>0)?h[0]:null}return R5.findNextMatch(this,new vm(e,n,o,r),a,s)}findPreviousMatch(e,t,n,o,r,s){this._assertNotDisposed();let a=this.validatePosition(t);return R5.findPreviousMatch(this,new vm(e,n,o,r),a,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===` `?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof ow?e:new ow(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){let t=[];for(let n=0,o=e.length;n({range:this.validateRange(a.range),text:a.text})),s=!0;if(e)for(let a=0,l=e.length;ac.endLineNumber,m=c.startLineNumber>f.endLineNumber;if(!p&&!m){d=!0;break}}if(!d){s=!1;break}}if(s)for(let a=0,l=this._trimAutoWhitespaceLines.length;ap.endLineNumber)&&!(c===p.startLineNumber&&p.startColumn===d&&p.isEmpty()&&m&&m.length>0&&m.charAt(0)===` `)&&!(c===p.startLineNumber&&p.startColumn===1&&p.isEmpty()&&m&&m.length>0&&m.charAt(m.length-1)===` -`)){u=!1;break}}if(u){let h=new O(c,1,c,d);t.push(new ow(null,h,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n,o)}_applyUndo(e,t,n,o){let r=e.map(s=>{let a=this.getPositionAt(s.newPosition),l=this.getPositionAt(s.newEnd);return{range:new O(a.lineNumber,a.column,l.lineNumber,l.column),text:s.oldText}});this._applyUndoRedoEdits(r,t,!0,!1,n,o)}_applyRedo(e,t,n,o){let r=e.map(s=>{let a=this.getPositionAt(s.oldPosition),l=this.getPositionAt(s.oldEnd);return{range:new O(a.lineNumber,a.column,l.lineNumber,l.column),text:s.newText}});this._applyUndoRedoEdits(r,t,!1,!0,n,o)}_applyUndoRedoEdits(e,t,n,o,r,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=o,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(r)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();let n=this._validateEditOperations(e);return this._doApplyEdits(n,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){let n=this._buffer.getLineCount(),o=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),r=this._buffer.getLineCount(),s=o.changes;if(this._trimAutoWhitespaceLines=o.trimAutoWhitespaceLineNumbers,s.length!==0){for(let c=0,d=s.length;c=0;D--){let E=f+D,A=b+D;k.takeFromEndWhile(L=>L.lineNumber>A);let T=k.takeFromEndWhile(L=>L.lineNumber===A);a.push(new _M(E,this.getLineContent(A),T))}if(_z.lineNumberz.lineNumber===N)}a.push(new UG(E+1,f+y,I,L))}l+=v}this._emitContentChangedEvent(new kb(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return o.reverseEdits===null?void 0:o.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(e===null||e.size===0)return;let n=Array.from(e).map(o=>new _M(o,this.getLineContent(o),this._getInjectedTextInLine(o)));this._onDidChangeInjectedText.fire(new kx(n))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){let n={addDecoration:(r,s)=>this._deltaDecorationsImpl(e,[],[{range:r,options:s}])[0],changeDecoration:(r,s)=>{this._changeDecorationImpl(r,s)},changeDecorationOptions:(r,s)=>{this._changeDecorationOptionsImpl(r,MJe(s))},removeDecoration:r=>{this._deltaDecorationsImpl(e,[r],[])},deltaDecorations:(r,s)=>r.length===0&&s.length===0?[]:this._deltaDecorationsImpl(e,r,s)},o=null;try{o=t(n)}catch(r){hi(r)}return n.addDecoration=CM,n.changeDecoration=CM,n.changeDecorationOptions=CM,n.removeDecoration=CM,n.deltaDecorations=CM,o}deltaDecorations(e,t,n=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),hi(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,n){let o=e?this._decorations[e]:null;if(!o)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:IJe[n]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(o),delete this._decorations[o.id],null;let r=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),a=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);return this._decorationsTree.delete(o),o.reset(this.getVersionId(),s,a,r),o.setOptions(IJe[n]),this._decorationsTree.insert(o),o.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;let t=this._decorationsTree.collectNodesFromOwner(e);for(let n=0,o=t.length;nthis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}getLinesDecorations(e,t,n=0,o=!1,r=!1){let s=this.getLineCount(),a=Math.min(s,Math.max(1,e)),l=Math.min(s,Math.max(1,t)),c=this.getLineMaxColumn(l),d=new O(a,1,l,c),u=this._getDecorationsInRange(d,n,o,r);return ZD(u,this._decorationProvider.getDecorationsInRange(d,n,o)),u}getDecorationsInRange(e,t=0,n=!1,o=!1,r=!1){let s=this.validateRange(e),a=this._getDecorationsInRange(s,t,n,r);return ZD(a,this._decorationProvider.getDecorationsInRange(s,t,n,o)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){let t=this._buffer.getOffsetAt(e,1),n=t+this._buffer.getLineLength(e),o=this._decorationsTree.getInjectedTextInInterval(this,t,n,0);return fh.fromDecorations(o).filter(r=>r.lineNumber===e)}getAllDecorations(e=0,t=!1){let n=this._decorationsTree.getAll(this,e,t,!1,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,t)),n}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,n,o){let r=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,r,s,t,n,o)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){let n=this._decorations[e];if(!n)return;if(n.options.after){let a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.endLineNumber)}if(n.options.before){let a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.startLineNumber)}let o=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),s=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,s,o),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.startLineNumber)}_changeDecorationOptionsImpl(e,t){let n=this._decorations[e];if(!n)return;let o=!!(n.options.overviewRuler&&n.options.overviewRuler.color),r=!!(t.overviewRuler&&t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(t),n.options.after||t.after){let l=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(l.endLineNumber)}if(n.options.before||t.before){let l=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(l.startLineNumber)}let s=o!==r,a=lIt(t)!==qG(n);s||a?(this._decorationsTree.delete(n),n.setOptions(t),this._decorationsTree.insert(n)):n.setOptions(t)}_deltaDecorationsImpl(e,t,n,o=!1){let r=this.getVersionId(),s=t.length,a=0,l=n.length,c=0;this._onDidChangeDecorations.beginDeferredEmit();try{let d=new Array(l);for(;athis._setLanguage(e.languageId,t)),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return aIt(this.getLineContent(e))+1}};Cp._MODEL_SYNC_LIMIT=50*1024*1024;Cp.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024;Cp.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3;Cp.LARGE_FILE_HEAP_OPERATION_THRESHOLD=256*1024*1024;Cp.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:Ma.tabSize,indentSize:Ma.indentSize,insertSpaces:Ma.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:Ma.trimAutoWhitespace,largeFileOptimizations:Ma.largeFileOptimizations,bracketPairColorizationOptions:Ma.bracketPairColorizationOptions};Cp=Eb=iIt([ume(4,Tv),ume(5,Kn),ume(6,An)],Cp);GG=class{constructor(){this._decorationsTree0=new Cx,this._decorationsTree1=new Cx,this._injectedTextDecorationsTree=new Cx}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(let n of t)n.range===null&&(n.range=e.getRangeAt(n.cachedAbsoluteStart,n.cachedAbsoluteEnd));return t}getAllInInterval(e,t,n,o,r,s){let a=e.getVersionId(),l=this._intervalSearch(t,n,o,r,a,s);return this._ensureNodesHaveRanges(e,l)}_intervalSearch(e,t,n,o,r,s){let a=this._decorationsTree0.intervalSearch(e,t,n,o,r,s),l=this._decorationsTree1.intervalSearch(e,t,n,o,r,s),c=this._injectedTextDecorationsTree.intervalSearch(e,t,n,o,r,s);return a.concat(l).concat(c)}getInjectedTextInInterval(e,t,n,o){let r=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,n,o,!1,r,!1);return this._ensureNodesHaveRanges(e,s).filter(a=>a.options.showIfCollapsed||!a.range.isEmpty())}getAllInjectedText(e,t){let n=e.getVersionId(),o=this._injectedTextDecorationsTree.search(t,!1,n,!1);return this._ensureNodesHaveRanges(e,o).filter(r=>r.options.showIfCollapsed||!r.range.isEmpty())}getAll(e,t,n,o,r){let s=e.getVersionId(),a=this._search(t,n,o,s,r);return this._ensureNodesHaveRanges(e,a)}_search(e,t,n,o,r){if(n)return this._decorationsTree1.search(e,t,o,r);{let s=this._decorationsTree0.search(e,t,o,r),a=this._decorationsTree1.search(e,t,o,r),l=this._injectedTextDecorationsTree.search(e,t,o,r);return s.concat(a).concat(l)}}collectNodesFromOwner(e){let t=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e),o=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(n).concat(o)}collectNodesPostOrder(){let e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),n=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(n)}insert(e){qG(e)?this._injectedTextDecorationsTree.insert(e):hme(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){qG(e)?this._injectedTextDecorationsTree.delete(e):hme(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){let n=e.getVersionId();return t.cachedVersionId!==n&&this._resolveNode(t,n),t.range===null&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){qG(e)?this._injectedTextDecorationsTree.resolveNode(e,t):hme(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,n,o){this._decorationsTree0.acceptReplace(e,t,n,o),this._decorationsTree1.acceptReplace(e,t,n,o),this._injectedTextDecorationsTree.acceptReplace(e,t,n,o)}};KG=class{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}},pme=class extends KG{constructor(e){super(e),this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:Sl.Center}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if(typeof e=="string")return e;let n=e?t.getColor(e.id):null;return n?n.toString():""}},mme=class{constructor(e){var t;this.position=(t=e?.position)!==null&&t!==void 0?t:lu.Center,this.persistLane=e?.persistLane}},gme=class extends KG{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return typeof e=="string"?it.fromHex(e):t.getColor(e.id)}},C2=class i{static from(e){return e instanceof i?e:new i(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}},zi=class i{static register(e){return new i(e)}static createDynamic(e){return new i(e)}constructor(e){var t,n,o,r,s,a;this.description=e.description,this.blockClassName=e.blockClassName?y2(e.blockClassName):null,this.blockDoesNotCollapse=(t=e.blockDoesNotCollapse)!==null&&t!==void 0?t:null,this.blockIsAfterEnd=(n=e.blockIsAfterEnd)!==null&&n!==void 0?n:null,this.blockPadding=(o=e.blockPadding)!==null&&o!==void 0?o:null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?y2(e.className):null,this.shouldFillLineOnLineBreak=(r=e.shouldFillLineOnLineBreak)!==null&&r!==void 0?r:null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new pme(e.overviewRuler):null,this.minimap=e.minimap?new gme(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new mme(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?y2(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?y2(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?y2(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?nqe(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?y2(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?y2(e.marginClassName):null,this.inlineClassName=e.inlineClassName?y2(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?y2(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?y2(e.afterContentClassName):null,this.after=e.after?C2.from(e.after):null,this.before=e.before?C2.from(e.before):null,this.hideInCommentTokens=(s=e.hideInCommentTokens)!==null&&s!==void 0?s:!1,this.hideInStringTokens=(a=e.hideInStringTokens)!==null&&a!==void 0?a:!1}};zi.EMPTY=zi.register({description:"empty"});IJe=[zi.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),zi.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),zi.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),zi.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];vme=class extends ue{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new ge),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),(e=this._affectedInjectedTextLines)===null||e===void 0||e.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){var t,n;this._affectsMinimap||(this._affectsMinimap=!!(!((t=e.minimap)===null||t===void 0)&&t.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(!((n=e.overviewRuler)===null||n===void 0)&&n.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!e.glyphMarginClassName),this._affectsLineNumber||(this._affectsLineNumber=!!e.lineNumberClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);let e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}},_me=class extends ue{constructor(){super(),this._fastEmitter=this._register(new ge),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new ge),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;let t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}},bme=class{constructor(){this._onDidChangeVisibleRanges=new ge,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){let e=new yme(t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})});return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}},yme=class{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){let n=e.map(o=>new rn(o.startLineNumber,o.endLineNumber+1));this.handleStateChange({visibleLineRanges:n,stabilized:t})}}});var wM,NJe=P(()=>{s1();Mi();Kt();zo();wM=class i{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new wa(new O(1,1,1,1),0,0,new ke(1,1),0),new wa(new O(1,1,1,1),0,0,new ke(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new Vn(this.modelState,this.viewState)}readSelectionFromMarkers(e){let t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?jt.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):jt.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,n){this._setState(e,t,n)}static _validatePositionWithCache(e,t,n,o){return t.equals(n)?o:e.normalizePosition(t,2)}static _validateViewState(e,t){let n=t.position,o=t.selectionStart.getStartPosition(),r=t.selectionStart.getEndPosition(),s=e.normalizePosition(n,2),a=this._validatePositionWithCache(e,o,n,s),l=this._validatePositionWithCache(e,r,o,a);return n.equals(s)&&o.equals(a)&&r.equals(l)?t:new wa(O.fromPositions(a,l),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+o.column-a.column,s,t.leftoverVisibleColumns+n.column-s.column)}_setState(e,t,n){if(n&&(n=i._validateViewState(e.viewModel,n)),t){let o=e.model.validateRange(t.selectionStart),r=t.selectionStart.equalsRange(o)?t.selectionStartLeftoverVisibleColumns:0,s=e.model.validatePosition(t.position),a=t.position.equals(s)?t.leftoverVisibleColumns:0;t=new wa(o,t.selectionStartKind,r,s,a)}else{if(!n)return;let o=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(n.selectionStart)),r=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(n.position));t=new wa(o,n.selectionStartKind,n.selectionStartLeftoverVisibleColumns,r,n.leftoverVisibleColumns)}if(n){let o=e.coordinatesConverter.validateViewRange(n.selectionStart,t.selectionStart),r=e.coordinatesConverter.validateViewPosition(n.position,t.position);n=new wa(o,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}else{let o=e.coordinatesConverter.convertModelPositionToViewPosition(new ke(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),r=e.coordinatesConverter.convertModelPositionToViewPosition(new ke(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),s=new O(o.lineNumber,o.column,r.lineNumber,r.column),a=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);n=new wa(s,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,a,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=n,this._updateTrackedRange(e)}}});var xM,AJe=P(()=>{Vi();rh();s1();NJe();Mi();Kt();zo();xM=class{constructor(e){this.context=e,this.cursors=[new wM(e)],this.lastAddedCursorIndex=0}dispose(){for(let e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(let e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(let e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(let e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(e=>e.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(e=>e.asCursorState())}getViewPositions(){return this.cursors.map(e=>e.viewState.position)}getTopMostViewPosition(){return QGe(this.cursors,Sc(e=>e.viewState.position,ke.compare)).viewState.position}getBottomMostViewPosition(){return XGe(this.cursors,Sc(e=>e.viewState.position,ke.compare)).viewState.position}getSelections(){return this.cursors.map(e=>e.modelState.selection)}getViewSelections(){return this.cursors.map(e=>e.viewState.selection)}setSelections(e){this.setStates(Vn.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){e!==null&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){let t=this.cursors.length-1,n=e.length;if(tn){let o=t-n;for(let r=0;r=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(this.cursors.length===1)return;let e=this.cursors.slice(0),t=[];for(let n=0,o=e.length;nn.selection,O.compareRangesUsingStarts));for(let n=0;nu&&m.index--;e.splice(u,1),t.splice(d,1),this._removeSecondaryCursor(u-1),n--}}}}});var SM,RJe=P(()=>{SM=class{constructor(e,t,n,o){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=n,this.cursorConfig=o}}});var YG,ZG,XG,QG,w2,Db,JG,eK,Tb,kM,Lx,Ex,Iv,tK,iK,nK,oK,rK,sK=P(()=>{YG=class{constructor(){this.type=0}},ZG=class{constructor(){this.type=1}},XG=class{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}},QG=class{constructor(e,t,n){this.selections=e,this.modelSelections=t,this.reason=n,this.type=3}},w2=class{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin,this.affectsLineNumber=e.affectsLineNumber):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0,this.affectsLineNumber=!0)}},Db=class{constructor(){this.type=5}},JG=class{constructor(e){this.type=6,this.isFocused=e}},eK=class{constructor(){this.type=7}},Tb=class{constructor(){this.type=8}},kM=class{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}},Lx=class{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}},Ex=class{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}},Iv=class{constructor(e,t,n,o,r,s,a){this.source=e,this.minimalReveal=t,this.range=n,this.selections=o,this.verticalType=r,this.revealHorizontal=s,this.scrollType=a,this.type=12}},tK=class{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}},iK=class{constructor(e){this.theme=e,this.type=14}},nK=class{constructor(e){this.type=15,this.ranges=e}},oK=class{constructor(){this.type=16}},rK=class{constructor(){this.type=17}}});var aK,Cme,lK,cK,dK,uK,hK,fK,pK,mK,gK,vK,_K,bK,yK,CK=P(()=>{Xt();nt();aK=class extends ue{constructor(){super(),this._onEvent=this._register(new ge),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,n=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;let e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,n=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){let e=this._viewEventQueue;this._viewEventQueue=null;let t=this._eventHandlers.slice(0);for(let n of t)n.handleEvents(e)}}},Cme=class{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}},lK=class i{constructor(e,t,n,o){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=n,this.contentHeight=o,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new i(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}},cK=class i{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new i(this.oldHasFocus,e.hasFocus)}},dK=class i{constructor(e,t,n,o,r,s,a,l){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=n,this._oldScrollTop=o,this.scrollWidth=r,this.scrollLeft=s,this.scrollHeight=a,this.scrollTop=l,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new i(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}},uK=class{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}},hK=class{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}},fK=class i{constructor(e,t,n,o,r,s,a){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=n,this.modelVersionId=o,this.source=r,this.reason=s,this.reachedMaxCursorCount=a}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;let n=e.length,o=t.length;if(n!==o)return!1;for(let r=0;r{Pi();Ri();AJe();s1();RJe();fq();kq();Kt();zo();Dv();sK();nt();CK();wK=class extends ue{constructor(e,t,n,o){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=n,this.context=new SM(this._model,this._viewModel,this._coordinatesConverter,o),this._cursors=new xM(this.context),this._hasFocus=!1,this._isHandling=!1,this._compositionState=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=Nn(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new SM(this._model,this._viewModel,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let e=this._cursors.getSelections();for(let t=0;ts&&(o=o.slice(0,s),r=!0);let a=LM.from(this._model,this);return this._cursors.setStates(o),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,n,a,r)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,n,o,r,s){let a=this._cursors.getViewPositions(),l=null,c=null;a.length>1?c=this._cursors.getViewSelections():l=O.fromPositions(a[0],a[0]),e.emitViewEvent(new Iv(t,n,l,c,o,r,s))}saveState(){let e=[],t=this._cursors.getSelections();for(let n=0,o=t.length;n0){let r=Vn.fromModelSelections(n.resultingSelection);this.setStates(e,"modelChange",n.isUndoing?5:n.isRedoing?6:2,r)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{let r=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,Vn.fromModelSelections(r))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;let e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),n=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:n.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,n)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,n,o){this.setStates(e,t,o,Vn.fromModelSelections(n))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){let n=[],o=[];for(let a=0,l=e.length;a0&&this._pushAutoClosedAction(n,o),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,n,o,r){let s=LM.from(this._model,this);if(s.equals(o))return!1;let a=this._cursors.getSelections(),l=this._cursors.getViewSelections();if(e.emitViewEvent(new QG(l,a,n)),!o||o.cursorState.length!==s.cursorState.length||s.cursorState.some((c,d)=>!c.modelState.equals(o.cursorState[d].modelState))){let c=o?o.cursorState.map(u=>u.modelState.selection):null,d=o?o.modelVersionId:0;e.emitOutgoingEvent(new fK(c,a,d,s.modelVersionId,t||"keyboard",n,r))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;let t=[];for(let n=0,o=e.length;n=0)return null;let s=r.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!s)return null;let a=s[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;let c=l[0].open,d=r.text.length-s[2].length-1,u=r.text.lastIndexOf(c,d-1);if(u===-1)return null;t.push([u,d])}return t}executeEdits(e,t,n,o){let r=null;t==="snippet"&&(r=this._findAutoClosingPairs(n)),r&&(n[0]._isTracked=!0);let s=[],a=[],l=this._model.pushEditOperations(this.getSelections(),n,c=>{if(r)for(let u=0,h=r.length;u0&&this._pushAutoClosedAction(s,a)}_executeEdit(e,t,n,o=0){if(this.context.cursorConfig.readOnly)return;let r=LM.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(s){hi(s)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,n,o,r,!1)&&this.revealPrimary(t,n,!1,0,!0,0)}getAutoClosedCharacters(){return xK.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new Sme(this._model,this.getSelections())}endComposition(e,t){let n=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{t==="keyboard"&&this._executeEditOperation(gu.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,n,this.getSelections(),this.getAutoClosedCharacters()))},e,t)}type(e,t,n){this._executeEdit(()=>{if(n==="keyboard"){let o=t.length,r=0;for(;r{let c=l.getPosition();return new jt(c.lineNumber,c.column+r,c.lineNumber,c.column+r)});this.setSelections(e,s,a,0)}return}this._executeEdit(()=>{this._executeEditOperation(gu.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,n,o,r))},e,s)}paste(e,t,n,o,r){this._executeEdit(()=>{this._executeEditOperation(gu.paste(this.context.cursorConfig,this._model,this.getSelections(),t,n,o||[]))},e,r,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(p4.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,n){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new Tl(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}executeCommands(e,t,n){this._executeEdit(()=>{this._executeEditOperation(new Tl(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}},LM=class i{static from(e,t){return new i(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,n=this.cursorState.length;t=t.length||!t[n].strictContainsRange(e[n]))return!1;return!0}},wme=class{static executeCommands(e,t,n){let o={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},r=this._innerExecuteCommands(o,n);for(let s=0,a=o.trackedRanges.length;s0&&(s[0]._isTracked=!0);let a=e.model.pushEditOperations(e.selectionsBefore,s,c=>{let d=[];for(let f=0;ff.identifier.minor-p.identifier.minor,h=[];for(let f=0;f0?(d[f].sort(u),h[f]=t[f].computeCursorState(e.model,{getInverseEditOperations:()=>d[f],getTrackedSelection:p=>{let m=parseInt(p,10),y=e.model._getTrackedRange(e.trackedRanges[m]);return e.trackedRangesDirection[m]===0?new jt(y.startLineNumber,y.startColumn,y.endLineNumber,y.endColumn):new jt(y.endLineNumber,y.endColumn,y.startLineNumber,y.startColumn)}})):h[f]=e.selectionsBefore[f];return h});a||(a=e.selectionsBefore);let l=[];for(let c in r)r.hasOwnProperty(c)&&l.push(parseInt(c,10));l.sort((c,d)=>d-c);for(let c of l)a.splice(c,1);return a}static _arrayIsEmpty(e){for(let t=0,n=e.length;t{O.isEmpty(u)&&h===""||o.push({identifier:{major:t,minor:r++},range:u,text:h,forceMoveMarkers:f,isAutoWhitespaceEdit:n.insertsAutoWhitespace})},a=!1,d={addEditOperation:s,addTrackedEditOperation:(u,h,f)=>{a=!0,s(u,h,f)},trackSelection:(u,h)=>{let f=jt.liftSelection(u),p;if(f.isEmpty())if(typeof h=="boolean")h?p=2:p=3;else{let _=e.model.getLineMaxColumn(f.startLineNumber);f.startColumn===_?p=2:p=3}else p=1;let m=e.trackedRanges.length,y=e.model._setTrackedRange(null,f,p);return e.trackedRanges[m]=y,e.trackedRangesDirection[m]=f.getDirection(),m.toString()}};try{n.getEditOperations(e.model,d)}catch(u){return hi(u),{operations:[],hadTrackedEditOperation:!1}}return{operations:o,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((n,o)=>-O.compareRangesUsingEnds(n.range,o.range));let t={};for(let n=1;nr.identifier.major?s=o.identifier.major:s=r.identifier.major,t[s.toString()]=!0;for(let a=0;a0&&n--}}return t}},xme=class{constructor(e,t,n){this.text=e,this.startSelection=t,this.endSelection=n}},Sme=class i{static _capture(e,t){let n=[];for(let o of t){if(o.startLineNumber!==o.endLineNumber)return null;n.push(new xme(e.getLineContent(o.startLineNumber),o.startColumn-1,o.endColumn-1))}return n}constructor(e,t){this._original=i._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;let n=i._capture(e,t);if(!n||this._original.length!==n.length)return null;let o=[];for(let r=0,s=this._original.length;r0;)s&&d?(p+=" ",d=!1):(p+=" ",d=!0),y--;break}case 60:p+="<",d=!1;break;case 62:p+=">",d=!1;break;case 38:p+="&",d=!1;break;case 0:p+="�",d=!1;break;case 65279:case 8232:case 8233:case 133:p+="\uFFFD",d=!1;break;case 13:p+="​",d=!1;break;case 32:s&&d?(p+=" ",d=!1):(p+=" ",d=!0);break;default:p+=String.fromCharCode(m),d=!1}}if(a+=`${p}`,f>o||l>=o)break}return a+="",a}function FJe(i,e,t){let n='
',o=Ec(i),r=t.getInitialState();for(let s=0,a=o.length;s0&&(n+="
");let c=t.tokenizeEncoded(l,!0,r);Es.convertToEndOffset(c.tokens,l.length);let u=new Es(c.tokens,l,e).inflate(),h=0;for(let f=0,p=u.getCount();f${p5(l.substring(h,y))}`,h=y}r=c.endState}return n+="
",n}var zJe,kme=P(()=>{Ri();Yg();Pr();mw();zJe={getInitialState:()=>Kg,tokenizeEncoded:(i,e,t)=>sv(0,t)}});var Lme,Eme,EM,VJe=P(()=>{Ri();Lme=class{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;let t=this._inserts,n=this._changes,o=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,n,o)}},Eme=class{constructor(e,t,n,o,r){this.id=e,this.afterLineNumber=t,this.ordinal=n,this.height=o,this.minWidth=r,this.prefixSum=0}},EM=class i{constructor(e,t,n,o){this._instanceId=aU(++i.INSTANCE_COUNT),this._pendingChanges=new Lme,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=n,this._paddingBottom=o}static findInsertionIndex(e,t,n){let o=0,r=e.length;for(;o>>1;t===e[s].afterLineNumber?n{t=!0,o=o|0,r=r|0,s=s|0,a=a|0;let l=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new Eme(l,o,r,s,a)),l},changeOneWhitespace:(o,r,s)=>{t=!0,r=r|0,s=s|0,this._pendingChanges.change({id:o,newAfterLineNumber:r,newHeight:s})},removeWhitespace:o=>{t=!0,this._pendingChanges.remove({id:o})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,n){if((e.length>0||n.length>0)&&(this._minWidth=-1),e.length+t.length+n.length<=1){for(let l of e)this._insertWhitespace(l);for(let l of t)this._changeOneWhitespace(l.id,l.newAfterLineNumber,l.newHeight);for(let l of n){let c=this._findWhitespaceIndex(l.id);c!==-1&&this._removeWhitespace(c)}return}let o=new Set;for(let l of n)o.add(l.id);let r=new Map;for(let l of t)r.set(l.id,l);let s=l=>{let c=[];for(let d of l)if(!o.has(d.id)){if(r.has(d.id)){let u=r.get(d.id);d.afterLineNumber=u.newAfterLineNumber,d.height=u.newHeight}c.push(d)}return c},a=s(this._arr).concat(s(e));a.sort((l,c)=>l.afterLineNumber===c.afterLineNumber?l.ordinal-c.ordinal:l.afterLineNumber-c.afterLineNumber),this._arr=a,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){let t=i.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){let t=this._arr;for(let n=0,o=t.length;nt&&(this._arr[n].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e=e|0,t=t|0,this._lineCount+=t-e+1;for(let n=0,o=this._arr.length;n=t.length||t[a+1].afterLineNumber>=e)return a;n=a+1|0}else o=a-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;let n=this._findLastWhitespaceBeforeLineNumber(e)+1;return n1?n=this._lineHeight*(e-1):n=0;let o=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0));return n+o+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){this._checkPendingChanges(),e=e|0;let n=this._lineHeight*e,o=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0));return n+o+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let e=0;for(let t=0,n=this._arr.length;tt}isInTopPadding(e){return this._paddingTop===0?!1:(this._checkPendingChanges(),e=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e=e|0,e<0)return 1;let t=this._lineCount|0,n=this._lineHeight,o=1,r=t;for(;o=a+n)o=s+1;else{if(e>=a)return s;r=s}}return o>t?t:o}getLinesViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;let n=this._lineHeight,o=this.getLineNumberAtOrAfterVerticalOffset(e)|0,r=this.getVerticalOffsetForLineNumber(o)|0,s=this._lineCount|0,a=this.getFirstWhitespaceIndexAfterLineNumber(o)|0,l=this.getWhitespacesCount()|0,c,d;a===-1?(a=l,d=s+1,c=0):(d=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);let u=r,h=u,f=5e5,p=0;r>=f&&(p=Math.floor(r/f)*f,p=Math.floor(p/n)*n,h-=p);let m=[],y=e+(t-e)/2,_=-1;for(let w=o;w<=s;w++){if(_===-1){let S=u,x=u+n;(S<=y&&yy)&&(_=w)}for(u+=n,m[w-o]=h,h+=n;d===w;)h+=c,u+=c,a++,a>=l?d=s+1:(d=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);if(u>=t){s=w;break}}_===-1&&(_=s);let v=this.getVerticalOffsetForLineNumber(s)|0,b=o,C=s;return bt&&C--,{bigNumbersDelta:p,startLineNumber:o,endLineNumber:s,relativeVerticalOffset:m,centeredLineNumber:_,completelyVisibleStartLineNumber:b,completelyVisibleEndLineNumber:C}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e=e|0;let t=this.getAfterLineNumberForWhitespaceIndex(e),n;t>=1?n=this._lineHeight*t:n=0;let o;return e>0?o=this.getWhitespacesAccumulatedHeight(e-1):o=0,n+o+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e=e|0;let t=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;let o=this.getVerticalOffsetForWhitespaceIndex(n),r=this.getHeightForWhitespaceIndex(n);if(e>=o+r)return-1;for(;t=a+l)t=s+1;else{if(e>=a)return s;n=s}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e=e|0;let t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0||t>=this.getWhitespacesCount())return null;let n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;let o=this.getHeightForWhitespaceIndex(t),r=this.getIdForWhitespaceIndex(t),s=this.getAfterLineNumberForWhitespaceIndex(t);return{id:r,afterLineNumber:s,verticalOffset:n,height:o}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;let n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),o=this.getWhitespacesCount()-1;if(n<0)return[];let r=[];for(let s=n;s<=o;s++){let a=this.getVerticalOffsetForWhitespaceIndex(s),l=this.getHeightForWhitespaceIndex(s);if(a>=t)break;r.push({id:this.getIdForWhitespaceIndex(s),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(s),verticalOffset:a,height:l})}return r}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].height}};EM.INSTANCE_COUNT=0});var cIt,Ib,Dme,SK,WJe=P(()=>{Xt();nt();Jw();VJe();ap();CK();cIt=125,Ib=class{constructor(e,t,n,o){e=e|0,t=t|0,n=n|0,o=o|0,e<0&&(e=0),t<0&&(t=0),n<0&&(n=0),o<0&&(o=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=n,this.contentHeight=o,this.scrollHeight=Math.max(n,o)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}},Dme=class extends ue{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new ge),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new Ib(0,0,0,0),this._scrollable=this._register(new n1({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;let t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);let n=t.contentWidth!==e.contentWidth,o=t.contentHeight!==e.contentHeight;(n||o)&&this._onDidContentSizeChange.fire(new lK(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}},SK=class extends ue{constructor(e,t,n){super(),this._configuration=e;let o=this._configuration.options,r=o.get(143),s=o.get(83);this._linesLayout=new EM(t,o.get(66),s.top,s.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new Dme(0,n)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new Ib(r.contentWidth,0,r.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(113)?cIt:0)}onConfigurationChanged(e){let t=this._configuration.options;if(e.hasChanged(66)&&this._linesLayout.setLineHeight(t.get(66)),e.hasChanged(83)){let n=t.get(83);this._linesLayout.setPadding(n.top,n.bottom)}if(e.hasChanged(143)){let n=t.get(143),o=n.contentWidth,r=n.height,s=this._scrollable.getScrollDimensions(),a=s.contentWidth;this._scrollable.setScrollDimensions(new Ib(o,s.contentWidth,r,this._getContentHeight(o,r,a)))}else this._updateHeight();e.hasChanged(113)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){let o=this._configuration.options.get(102);return o.horizontal===2||e>=t?0:o.horizontalScrollbarSize}_getContentHeight(e,t,n){let o=this._configuration.options,r=this._linesLayout.getLinesTotalHeight();return o.get(104)?r+=Math.max(0,t-o.get(66)-o.get(83).bottom):o.get(102).ignoreHorizontalScrollbarInContentHeight||(r+=this._getHorizontalScrollbarHeight(e,n)),r}_updateHeight(){let e=this._scrollable.getScrollDimensions(),t=e.width,n=e.height,o=e.contentWidth;this._scrollable.setScrollDimensions(new Ib(t,e.contentWidth,n,this._getContentHeight(t,n,o)))}getCurrentViewport(){let e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new pI(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){let e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new pI(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){let e=this._configuration.options,t=this._maxLineWidth,n=e.get(144),o=e.get(50),r=e.get(143);if(n.isViewportWrapping){let s=e.get(72);return t>r.contentWidth+o.typicalHalfwidthCharacterWidth&&s.enabled&&s.side==="right"?t+r.verticalScrollbarWidth:t}else{let s=e.get(103)*o.typicalHalfwidthCharacterWidth,a=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+s+r.verticalScrollbarWidth,a,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){let e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Ib(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){let e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),o=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n);return{scrollTop:t,scrollTopWithoutViewZones:t-o,scrollLeft:e.scrollLeft}}changeWhitespace(e){let t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){let e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){let t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){let e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){t===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){let n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})}}});function LK(i,e){return!(e.options.hideInCommentTokens&&EK(i,e)||e.options.hideInStringTokens&&DK(i,e))}function EK(i,e){return UJe(i,e.range,t=>t===1)}function DK(i,e){return UJe(i,e.range,t=>t===2)}function UJe(i,e,t){for(let n=e.startLineNumber;n<=e.endLineNumber;n++){let o=i.tokenization.getLineTokens(n),r=n===e.startLineNumber,s=n===e.endLineNumber,a=r?o.findTokenIndexAtOffset(e.startColumn-1):0;for(;ae.endColumn-1);){if(!t(o.getStandardTokenType(a)))return!1;a++}}return!0}var kK,Tme=P(()=>{Mi();Kt();ap();Ks();kK=class{constructor(e,t,n,o,r){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=o,this._coordinatesConverter=r,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){let t=e.id,n=this._decorationsCache[t];if(!n){let o=e.range,r=e.options,s;if(r.isWholeLine){let a=this._coordinatesConverter.convertModelPositionToViewPosition(new ke(o.startLineNumber,1),0,!1,!0),l=this._coordinatesConverter.convertModelPositionToViewPosition(new ke(o.endLineNumber,this.model.getLineMaxColumn(o.endLineNumber)),1);s=new O(a.lineNumber,a.column,l.lineNumber,l.column)}else s=this._coordinatesConverter.convertModelRangeToViewRange(o,1);n=new bw(s,r),this._decorationsCache[t]=n}return n}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=this._cachedModelDecorationsResolver!==null;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1,n=!1){let o=new O(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(o,t,n).inlineDecorations[0]}_getDecorationsInRange(e,t,n){let o=this._linesCollection.getDecorationsInRange(e,this.editorId,r5(this.configuration.options),t,n),r=e.startLineNumber,s=e.endLineNumber,a=[],l=0,c=[];for(let d=r;d<=s;d++)c[d-r]=[];for(let d=0,u=o.length;d=Ime.length)for(let e=1;e<=i;e++)Ime[e]=dIt(e);return Ime[i]}function dIt(i){return new Array(i+1).join(" ")}var Mme,Dx,Tx,Ime,jJe=P(()=>{Yg();Mi();Dv();ap();Mme=class{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,n){this._assertVisible();let o=n>0?this._projectionData.breakOffsets[n-1]:0,r=this._projectionData.breakOffsets[n],s;if(this._projectionData.injectionOffsets!==null){let a=this._projectionData.injectionOffsets.map((c,d)=>new fh(0,0,c+1,this._projectionData.injectionOptions[d],0));s=fh.applyInjectedText(e.getLineContent(t),a).substring(o,r)}else s=e.getValueInRange({startLineNumber:t,startColumn:o+1,endLineNumber:t,endColumn:r+1});return n>0&&(s=$Je(this._projectionData.wrappedTextIndentLength)+s),s}getViewLineLength(e,t,n){return this._assertVisible(),this._projectionData.getLineLength(n)}getViewLineMinColumn(e,t,n){return this._assertVisible(),this._projectionData.getMinOutputOffset(n)+1}getViewLineMaxColumn(e,t,n){return this._assertVisible(),this._projectionData.getMaxOutputOffset(n)+1}getViewLineData(e,t,n){let o=new Array;return this.getViewLinesData(e,t,n,1,0,[!0],o),o[0]}getViewLinesData(e,t,n,o,r,s,a){this._assertVisible();let l=this._projectionData,c=l.injectionOffsets,d=l.injectionOptions,u=null;if(c){u=[];let f=0,p=0;for(let m=0;m0?l.breakOffsets[m-1]:0,v=l.breakOffsets[m];for(;pv)break;if(_0?l.wrappedTextIndentLength:0,k=x+Math.max(C-_,0),D=x+Math.min(w-_,v-_);k!==D&&y.push(new ej(k,D,S.inlineClassName,S.inlineClassNameAffectsLetterSpacing))}}if(w<=v)f+=b,p++;else break}}}let h;c?h=e.tokenization.getLineTokens(t).withInserted(c.map((f,p)=>({offset:f,text:d[p].content,tokenMetadata:Es.defaultTokenMetadata}))):h=e.tokenization.getLineTokens(t);for(let f=n;f0?o.wrappedTextIndentLength:0,s=n>0?o.breakOffsets[n-1]:0,a=o.breakOffsets[n],l=e.sliceAndInflate(s,a,r),c=l.getLineContent();n>0&&(c=$Je(o.wrappedTextIndentLength)+c);let d=this._projectionData.getMinOutputOffset(n)+1,u=c.length+1,h=n+1o+1?(t.push(new O(n,1,o,1)),n=a.startLineNumber,o=a.endLineNumber):a.endLineNumber>o&&(o=a.endLineNumber)}return t.push(new O(n,1,o,1)),t}var IK,MK,NK,Nme,AK,Ame,qJe=P(()=>{Vi();Mi();Kt();Uq();ea();Dv();sK();jJe();cfe();ap();IK=class{constructor(e,t,n,o,r,s,a,l,c,d){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=n,this._monospaceLineBreaksComputerFactory=o,this.fontInfo=r,this.tabSize=s,this.wrappingStrategy=a,this.wrappingColumn=l,this.wrappingIndent=c,this.wordBreak=d,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new Nme(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));let n=this.model.getLinesContent(),o=this.model.getInjectedTextDecorations(this._editorId),r=n.length,s=this.createLineBreaksComputer(),a=new qc(fh.fromDecorations(o));for(let m=0;m_.lineNumber===m+1);s.addRequest(n[m],y,t?t[m]:null)}let l=s.finalize(),c=[],d=this.hiddenAreasDecorationIds.map(m=>this.model.getDecorationRange(m)).sort(O.compareRangesUsingStarts),u=1,h=0,f=-1,p=f+1=u&&y<=h,v=TK(l[m],!_);c[m]=v.getViewLineCount(),this.modelLineProjections[m]=v}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new T$(c)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){let t=e.map(h=>this.model.validateRange(h)),n=uIt(t),o=this.hiddenAreasDecorationIds.map(h=>this.model.getDecorationRange(h)).sort(O.compareRangesUsingStarts);if(n.length===o.length){let h=!1;for(let f=0;f({range:h,options:zi.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,r);let s=n,a=1,l=0,c=-1,d=c+1=a&&f<=l?this.modelLineProjections[h].isVisible()&&(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!1),p=!0):(u=!0,this.modelLineProjections[h].isVisible()||(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!0),p=!0)),p){let m=this.modelLineProjections[h].getViewLineCount();this.projectedModelLineLineCounts.setValue(h,m)}}return u||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return e<1||e>this.modelLineProjections.length?!1:this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,n,o,r){let s=this.fontInfo.equals(e),a=this.wrappingStrategy===t,l=this.wrappingColumn===n,c=this.wrappingIndent===o,d=this.wordBreak===r;if(s&&a&&l&&c&&d)return!1;let u=s&&a&&!l&&c&&d;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=n,this.wrappingIndent=o,this.wordBreak=r;let h=null;if(u){h=[];for(let f=0,p=this.modelLineProjections.length;f2&&!this.modelLineProjections[t-2].isVisible(),s=t===1?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,a=0,l=[],c=[];for(let d=0,u=o.length;dl?(d=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,u=d+l-1,p=u+1,m=p+(r-l)-1,c=!0):rt?t:e|0}getActiveIndentGuide(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);let o=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),r=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),s=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),a=this.model.guides.getActiveIndentGuide(o.lineNumber,r.lineNumber,s.lineNumber),l=this.convertModelPositionToViewPosition(a.startLineNumber,1),c=this.convertModelPositionToViewPosition(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber));return{startLineNumber:l.lineNumber,endLineNumber:c.lineNumber,indent:a.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);let t=this.projectedModelLineLineCounts.getIndexOf(e-1),n=t.index,o=t.remainder;return new MK(n+1,o)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){let t=this.modelLineProjections[e.modelLineNumber-1],n=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),o=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new ke(e.modelLineNumber,o)}getModelEndPositionOfViewLine(e){let t=this.modelLineProjections[e.modelLineNumber-1],n=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),o=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new ke(e.modelLineNumber,o)}getViewLineInfosGroupedByModelRanges(e,t){let n=this.getViewLineInfo(e),o=this.getViewLineInfo(t),r=new Array,s=this.getModelStartPositionOfViewLine(n),a=new Array;for(let l=n.modelLineNumber;l<=o.modelLineNumber;l++){let c=this.modelLineProjections[l-1];if(c.isVisible()){let d=l===n.modelLineNumber?n.modelLineWrappedLineIdx:0,u=l===o.modelLineNumber?o.modelLineWrappedLineIdx+1:c.getViewLineCount();for(let h=d;h{if(f.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,f.forWrappedLinesAfterColumn).lineNumber>=d.modelLineWrappedLineIdx||f.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,f.forWrappedLinesBeforeOrAtColumn).lineNumberd.modelLineWrappedLineIdx)return}let m=this.convertModelPositionToViewPosition(d.modelLineNumber,f.horizontalLine.endColumn),y=this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,f.horizontalLine.endColumn);return y.lineNumber===d.modelLineWrappedLineIdx?new _p(f.visibleColumn,p,f.className,new v4(f.horizontalLine.top,m.column),-1,-1):y.lineNumber!!f))}}return s}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);let n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),r=[],s=[],a=[],l=n.lineNumber-1,c=o.lineNumber-1,d=null;for(let p=l;p<=c;p++){let m=this.modelLineProjections[p];if(m.isVisible()){let y=m.getViewLineNumberOfModelPosition(0,p===l?n.column:1),_=m.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(p+1)),v=_-y+1,b=0;v>1&&m.getViewLineMinColumn(this.model,p+1,_)===1&&(b=y===0?1:2),s.push(v),a.push(b),d===null&&(d=new ke(p+1,0))}else d!==null&&(r=r.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,p)),d=null)}d!==null&&(r=r.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,o.lineNumber)),d=null);let u=t-e+1,h=new Array(u),f=0;for(let p=0,m=r.length;pt&&(p=!0,f=t-r+1),u.getViewLinesData(this.model,c+1,h,f,r-e,n,l),r+=f,p)break}return l}validateViewPosition(e,t,n){e=this._toValidViewLineNumber(e);let o=this.projectedModelLineLineCounts.getIndexOf(e-1),r=o.index,s=o.remainder,a=this.modelLineProjections[r],l=a.getViewLineMinColumn(this.model,r+1,s),c=a.getViewLineMaxColumn(this.model,r+1,s);tc&&(t=c);let d=a.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new ke(r+1,d)).equals(n)?new ke(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)}validateViewRange(e,t){let n=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),o=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new O(n.lineNumber,n.column,o.lineNumber,o.column)}convertViewPositionToModelPosition(e,t){let n=this.getViewLineInfo(e),o=this.modelLineProjections[n.modelLineNumber-1].getModelColumnOfViewPosition(n.modelLineWrappedLineIdx,t);return this.model.validatePosition(new ke(n.modelLineNumber,o))}convertViewRangeToModelRange(e){let t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new O(t.lineNumber,t.column,n.lineNumber,n.column)}convertModelPositionToViewPosition(e,t,n=2,o=!1,r=!1){let s=this.model.validatePosition(new ke(e,t)),a=s.lineNumber,l=s.column,c=a-1,d=!1;if(r)for(;c0&&!this.modelLineProjections[c].isVisible();)c--,d=!0;if(c===0&&!this.modelLineProjections[c].isVisible())return new ke(o?0:1,1);let u=1+this.projectedModelLineLineCounts.getPrefixSum(c),h;return d?r?h=this.modelLineProjections[c].getViewPositionOfModelPosition(u,1,n):h=this.modelLineProjections[c].getViewPositionOfModelPosition(u,this.model.getLineMaxColumn(c+1),n):h=this.modelLineProjections[a-1].getViewPositionOfModelPosition(u,l,n),h}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){let n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return O.fromPositions(n)}else{let n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),o=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new O(n.lineNumber,n.column,o.lineNumber,o.column)}}getViewLineNumberOfModelPosition(e,t){let n=e-1;if(this.modelLineProjections[n].isVisible()){let r=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(r,t)}for(;n>0&&!this.modelLineProjections[n].isVisible();)n--;if(n===0&&!this.modelLineProjections[n].isVisible())return 1;let o=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(o,this.model.getLineMaxColumn(n+1))}getDecorationsInRange(e,t,n,o,r){let s=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),a=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(a.lineNumber-s.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new O(s.lineNumber,1,a.lineNumber,a.column),t,n,o,r);let l=[],c=s.lineNumber-1,d=a.lineNumber-1,u=null;for(let m=c;m<=d;m++)if(this.modelLineProjections[m].isVisible())u===null&&(u=new ke(m+1,m===c?s.column:1));else if(u!==null){let _=this.model.getLineMaxColumn(m);l=l.concat(this.model.getDecorationsInRange(new O(u.lineNumber,u.column,m,_),t,n,o)),u=null}u!==null&&(l=l.concat(this.model.getDecorationsInRange(new O(u.lineNumber,u.column,a.lineNumber,a.column),t,n,o)),u=null),l.sort((m,y)=>{let _=O.compareRangesUsingStarts(m.range,y.range);return _===0?m.idy.id?1:0:_});let h=[],f=0,p=null;for(let m of l){let y=m.id;p!==y&&(p=y,h[f++]=m)}return h}getInjectedTextAt(e){let t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){let n=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[n.modelLineNumber-1].normalizePosition(n.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){let t=this.getViewLineInfo(e);return t.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(t.modelLineNumber):0}};MK=class{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}},NK=class{constructor(e,t){this.modelRange=e,this.viewLines=t}},Nme=class{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,n,o){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,n,o)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}},AK=class{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new Ame(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,n,o){return!1}createLineBreaksComputer(){let e=[];return{addRequest:(t,n,o)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,n){return new Lx(t,n)}onModelLinesInserted(e,t,n,o){return new Ex(t,n)}onModelLineChanged(e,t,n){return[!1,new kM(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,n){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){let n=t-e+1,o=new Array(n);for(let r=0;rt)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}});var Mb,RK,GJe=P(()=>{Ca();Mb=lu.Right,RK=class{constructor(e){this.persist=0,this._requiredLanes=1,this.lanes=new Uint8Array(Math.ceil((e+1)*Mb/8))}reset(e){let t=Math.ceil((e+1)*Mb/8);this.lanes.length>>3]|=1<>>3]&1<>>3]&1<{Vi();Qi();sa();nt();Mn();Ri();Ks();OJe();s1();Mi();Kt();Dv();Pr();Zf();kme();sK();WJe();spe();ap();Tme();CK();qJe();GJe();hIt=!0,PK=class extends ue{constructor(e,t,n,o,r,s,a,l,c){if(super(),this.languageConfigurationService=a,this._themeService=l,this._attachedView=c,this.hiddenAreasModel=new Ome,this.previousHiddenAreas=[],this._editorId=e,this._configuration=t,this.model=n,this._eventDispatcher=new aK,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new f4(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new hn(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=Rme.create(this.model),this.glyphLanes=new RK(0),hIt&&this.model.isTooLargeForTokenization())this._lines=new AK(this.model);else{let d=this._configuration.options,u=d.get(50),h=d.get(137),f=d.get(144),p=d.get(136),m=d.get(128);this._lines=new IK(this._editorId,this.model,o,r,u,this.model.getOptions().tabSize,h,f.wrappingColumn,p,m)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new wK(n,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new SK(this._configuration,this.getLineCount(),s)),this._register(this.viewLayout.onDidScroll(d=>{d.scrollTopChanged&&this._handleVisibleLinesChanged(),d.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new tK(d)),this._eventDispatcher.emitOutgoingEvent(new dK(d.oldScrollWidth,d.oldScrollLeft,d.oldScrollHeight,d.oldScrollTop,d.scrollWidth,d.scrollLeft,d.scrollHeight,d.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(d=>{this._eventDispatcher.emitOutgoingEvent(d)})),this._decorations=new kK(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(d=>{try{let u=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(u,d)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(yb.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new oK)})),this._register(this._themeService.onDidColorThemeChange(d=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new iK(d))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){let e=this.viewLayout.getLinesViewportData(),t=new O(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){let e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){let e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new JG(e)),this._eventDispatcher.emitOutgoingEvent(new cK(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new YG)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new ZG)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){let e=new ke(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new OK(t,this._viewportStart.startLineDelta)}return new OK(null,0)}_onConfigurationChanged(e,t){let n=this._captureStableViewport(),o=this._configuration.options,r=o.get(50),s=o.get(137),a=o.get(144),l=o.get(136),c=o.get(128);this._lines.setWrappingSettings(r,s,a.wrappingColumn,l,c)&&(e.emitViewEvent(new Db),e.emitViewEvent(new Tb),e.emitViewEvent(new w2(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(90)&&(this._decorations.reset(),e.emitViewEvent(new w2(null))),t.hasChanged(97)&&(this._decorations.reset(),e.emitViewEvent(new w2(null))),e.emitViewEvent(new XG(t)),this.viewLayout.onConfigurationChanged(t),n.recoverViewportStart(this.coordinatesConverter,this.viewLayout),f4.shouldRecreate(t)&&(this.cursorConfig=new f4(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(e=>{try{let n=this._eventDispatcher.beginEmitViewEvents(),o=!1,r=!1,s=e instanceof Ev?e.rawContentChangedEvent.changes:e.changes,a=e instanceof Ev?e.rawContentChangedEvent.versionId:null,l=this._lines.createLineBreaksComputer();for(let u of s)switch(u.changeType){case 4:{for(let h=0;h!m.ownerId||m.ownerId===this._editorId)),l.addRequest(f,p,null)}break}case 2:{let h=null;u.injectedText&&(h=u.injectedText.filter(f=>!f.ownerId||f.ownerId===this._editorId)),l.addRequest(u.detail,h,null);break}}let c=l.finalize(),d=new qc(c);for(let u of s)switch(u.changeType){case 1:{this._lines.onModelFlushed(),n.emitViewEvent(new Db),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),o=!0;break}case 3:{let h=this._lines.onModelLinesDeleted(a,u.fromLineNumber,u.toLineNumber);h!==null&&(n.emitViewEvent(h),this.viewLayout.onLinesDeleted(h.fromLineNumber,h.toLineNumber)),o=!0;break}case 4:{let h=d.takeCount(u.detail.length),f=this._lines.onModelLinesInserted(a,u.fromLineNumber,u.toLineNumber,h);f!==null&&(n.emitViewEvent(f),this.viewLayout.onLinesInserted(f.fromLineNumber,f.toLineNumber)),o=!0;break}case 2:{let h=d.dequeue(),[f,p,m,y]=this._lines.onModelLineChanged(a,u.lineNumber,h);r=f,p&&n.emitViewEvent(p),m&&(n.emitViewEvent(m),this.viewLayout.onLinesInserted(m.fromLineNumber,m.toLineNumber)),y&&(n.emitViewEvent(y),this.viewLayout.onLinesDeleted(y.fromLineNumber,y.toLineNumber));break}case 5:break}a!==null&&this._lines.acceptVersionId(a),this.viewLayout.onHeightMaybeChanged(),!o&&r&&(n.emitViewEvent(new Tb),n.emitViewEvent(new w2(null)),this._cursor.onLineMappingChanged(n),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}let t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){let n=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(n){let o=this.coordinatesConverter.convertModelPositionToViewPosition(n.getStartPosition()),r=this.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber);this.viewLayout.setScrollPosition({scrollTop:r+this._viewportStart.startLineDelta},1)}}try{let n=this._eventDispatcher.beginEmitViewEvents();e instanceof Ev&&n.emitOutgoingEvent(new _K(e.contentChangedEvent)),this._cursor.onModelContentChanged(n,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(e=>{let t=[];for(let n=0,o=e.ranges.length;n{this._eventDispatcher.emitSingleViewEvent(new eK),this.cursorConfig=new f4(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new vK(e))})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new f4(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new gK(e))})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{let t=this._eventDispatcher.beginEmitViewEvents();t.emitViewEvent(new Db),t.emitViewEvent(new Tb),t.emitViewEvent(new w2(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new f4(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new bK(e))})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new w2(e)),this._eventDispatcher.emitOutgoingEvent(new mK(e))}))}setHiddenAreas(e,t){var n;this.hiddenAreasModel.setHiddenAreas(t,e);let o=this.hiddenAreasModel.getMergedRanges();if(o===this.previousHiddenAreas)return;this.previousHiddenAreas=o;let r=this._captureStableViewport(),s=!1;try{let a=this._eventDispatcher.beginEmitViewEvents();s=this._lines.setHiddenAreas(o),s&&(a.emitViewEvent(new Db),a.emitViewEvent(new Tb),a.emitViewEvent(new w2(null)),this._cursor.onLineMappingChanged(a),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());let l=(n=r.viewportStartModelPosition)===null||n===void 0?void 0:n.lineNumber;l&&o.some(d=>d.startLineNumber<=l&&l<=d.endLineNumber)||r.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),s&&this._eventDispatcher.emitOutgoingEvent(new hK)}getVisibleRangesPlusViewportAboveBelow(){let e=this._configuration.options.get(143),t=this._configuration.options.get(66),n=Math.max(20,Math.round(e.height/t)),o=this.viewLayout.getLinesViewportData(),r=Math.max(1,o.completelyVisibleStartLineNumber-n),s=Math.min(this.getLineCount(),o.completelyVisibleEndLineNumber+n);return this._toModelVisibleRanges(new O(r,this.getLineMinColumn(r),s,this.getLineMaxColumn(s)))}getVisibleRanges(){let e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){let t=this.coordinatesConverter.convertViewRangeToModelRange(e),n=this._lines.getHiddenAreas();if(n.length===0)return[t];let o=[],r=0,s=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,c=t.endColumn;for(let d=0,u=n.length;dl||(s"u")return this._reduceRestoreStateCompatibility(e);let t=this.model.validatePosition(e.firstPosition),n=this.coordinatesConverter.convertModelPositionToViewPosition(t),o=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:o}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,n){this._viewportStart.update(this,e)}getActiveIndentGuide(e,t,n){return this._lines.getActiveIndentGuide(e,t,n)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,n,o){return this._lines.getViewLinesBracketGuides(e,t,n,o)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){let t=qr(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){let t=ql(this.getLineContent(e));return t===-1?0:t+2}getMinimapDecorationsInRange(e){return this._decorations.getMinimapDecorationsInRange(e)}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewportViewLineRenderingData(e,t){let o=this._decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return this._getViewLineRenderingData(t,o)}getViewLineRenderingData(e){let t=this._decorations.getInlineDecorationsOnLine(e);return this._getViewLineRenderingData(e,t)}_getViewLineRenderingData(e,t){let n=this.model.mightContainRTL(),o=this.model.mightContainNonBasicASCII(),r=this.getTabSize(),s=this._lines.getViewLineData(e);return s.inlineDecorations&&(t=[...t,...s.inlineDecorations.map(a=>a.toInlineDecoration(e))]),new Ed(s.minColumn,s.maxColumn,s.content,s.continuesWithWrappedLine,n,o,s.tokens,t,r,s.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,n){let o=this._lines.getViewLinesData(e,t,n);return new J$(this.getTabSize(),o)}getAllOverviewRulerDecorations(e){let t=this.model.getOverviewRulerDecorations(this._editorId,r5(this._configuration.options)),n=new Pme;for(let o of t){let r=o.options,s=r.overviewRuler;if(!s)continue;let a=s.position;if(a===0)continue;let l=s.getColor(e.value),c=this.coordinatesConverter.getViewLineNumberOfModelPosition(o.range.startLineNumber,o.range.startColumn),d=this.coordinatesConverter.getViewLineNumberOfModelPosition(o.range.endLineNumber,o.range.endColumn);n.accept(l,r.zIndex,c,d,a)}return n.asArray}_invalidateDecorationsColorCache(){let e=this.model.getOverviewRulerDecorations();for(let t of e){let n=t.options.overviewRuler;n?.invalidateCachedColor();let o=t.options.minimap;o?.invalidateCachedColor()}}getValueInRange(e,t){let n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(n,t)}getValueLengthInRange(e,t){let n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(n,t)}modifyPosition(e,t){let n=this.coordinatesConverter.convertViewPositionToModelPosition(e),o=this.model.modifyPosition(n,t);return this.coordinatesConverter.convertModelPositionToViewPosition(o)}deduceModelPositionRelativeToViewPosition(e,t,n){let o=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(t<0?t-=n:t+=n);let s=this.model.getOffsetAt(o)+t;return this.model.getPositionAt(s)}getPlainTextToCopy(e,t,n){let o=n?`\r -`:this.model.getEOL();e=e.slice(0),e.sort(O.compareRangesUsingStarts);let r=!1,s=!1;for(let l of e)l.isEmpty()?r=!0:s=!0;if(!s){if(!t)return"";let l=e.map(d=>d.startLineNumber),c="";for(let d=0;d0&&l[d-1]===l[d]||(c+=this.model.getLineContent(l[d])+o);return c}if(r&&t){let l=[],c=0;for(let d of e){let u=d.startLineNumber;d.isEmpty()?u!==c&&l.push(this.model.getLineContent(u)):l.push(this.model.getValueInRange(d,n?2:0)),c=u}return l.length===1?l[0]:l}let a=[];for(let l of e)l.isEmpty()||a.push(this.model.getValueInRange(l,n?2:0));return a.length===1?a[0]:a}getRichTextToCopy(e,t){let n=this.model.getLanguageId();if(n===ra||e.length!==1)return null;let o=e[0];if(o.isEmpty()){if(!t)return null;let d=o.startLineNumber;o=new O(d,this.model.getLineMinColumn(d),d,this.model.getLineMaxColumn(d))}let r=this._configuration.options.get(50),s=this._getColorMap(),l=/[:;\\\/<>]/.test(r.fontFamily)||r.fontFamily===ml.fontFamily,c;return l?c=ml.fontFamily:(c=r.fontFamily,c=c.replace(/"/g,"'"),/[,']/.test(c)||/[+ ]/.test(c)&&(c=`'${c}'`),c=`${c}, ${ml.fontFamily}`),{mode:n,html:`
`+this._getHTMLToCopy(o,s)+"
"}}_getHTMLToCopy(e,t){let n=e.startLineNumber,o=e.startColumn,r=e.endLineNumber,s=e.endColumn,a=this.getTabSize(),l="";for(let c=n;c<=r;c++){let d=this.model.tokenization.getLineTokens(c),u=d.getLineContent(),h=c===n?o-1:0,f=c===r?s-1:u.length;u===""?l+="
":l+=BJe(u,d.inflate(),t,h,f,a,hr)}return l}_getColorMap(){let e=Eo.getColorMap(),t=["#000000"];if(e)for(let n=1,o=e.length;nthis._cursor.setStates(o,e,t,n))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,n=0){this._withViewEventsCollector(o=>this._cursor.setSelections(o,e,t,n))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new pK);return}this._withViewEventsCollector(e)}executeEdits(e,t,n){this._executeCursorEdit(o=>this._cursor.executeEdits(o,e,t,n))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(n=>this._cursor.type(n,e,t))}compositionType(e,t,n,o,r){this._executeCursorEdit(s=>this._cursor.compositionType(s,e,t,n,o,r))}paste(e,t,n,o){this._executeCursorEdit(r=>this._cursor.paste(r,e,t,n,o))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(n=>this._cursor.executeCommand(n,e,t))}executeCommands(e,t){this._executeCursorEdit(n=>this._cursor.executeCommands(n,e,t))}revealPrimaryCursor(e,t,n=!1){this._withViewEventsCollector(o=>this._cursor.revealPrimary(o,e,n,0,t,0))}revealTopMostCursor(e){let t=this._cursor.getTopMostViewPosition(),n=new O(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(o=>o.emitViewEvent(new Iv(e,!1,n,null,0,!0,0)))}revealBottomMostCursor(e){let t=this._cursor.getBottomMostViewPosition(),n=new O(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(o=>o.emitViewEvent(new Iv(e,!1,n,null,0,!0,0)))}revealRange(e,t,n,o,r){this._withViewEventsCollector(s=>s.emitViewEvent(new Iv(e,!1,n,null,o,t,r)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new rK),this._eventDispatcher.emitOutgoingEvent(new uK))}_withViewEventsCollector(e){try{let t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}},Rme=class i{static create(e){let t=e._setTrackedRange(null,new O(1,1,1,1),1);return new i(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,n,o,r){this._model=e,this._viewLineNumber=t,this._isValid=n,this._modelTrackedRange=o,this._startLineDelta=r}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){let n=e.coordinatesConverter.convertViewPositionToModelPosition(new ke(t,e.getLineMinColumn(t))),o=e.model._setTrackedRange(this._modelTrackedRange,new O(n.lineNumber,n.column,n.lineNumber,n.column),1),r=e.viewLayout.getVerticalOffsetForLineNumber(t),s=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=o,this._startLineDelta=s-r}invalidate(){this._isValid=!1}},Pme=class{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,n,o,r){let s=this._asMap[e];if(s){let a=s.data,l=a[a.length-3],c=a[a.length-1];if(l===r&&c+1>=n){o>c&&(a[a.length-1]=o);return}a.push(r,n,o)}else{let a=new W5(e,t,[r,n,o]);this._asMap[e]=a,this.asArray.push(a)}}},Ome=class{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){let n=this.hiddenAreas.get(e);n&&KJe(n,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;let e=Array.from(this.hiddenAreas.values()).reduce((t,n)=>fIt(t,n),[]);return KJe(this.ranges,e)?this.ranges:(this.ranges=e,this.ranges)}};OK=class{constructor(e,t){this.viewportStartModelPosition=e,this.startLineDelta=t}recoverViewportStart(e,t){if(!this.viewportStartModelPosition)return;let n=e.convertModelPositionToViewPosition(this.viewportStartModelPosition),o=t.getVerticalOffsetForLineNumber(n.lineNumber);t.setScrollPosition({scrollTop:o+this.startLineDelta},1)}}});var wp,Ix=P(()=>{wp=class{constructor(...e){this._entries=new Map;for(let[t,n]of e)this.set(t,n)}set(e,t){let n=this._entries.get(e);return this._entries.set(e,t),n}get(e){return this._entries.get(e)}}});var DM,lr,C4=P(()=>{Ri();(function(i){i[i.Ignore=0]="Ignore",i[i.Info=1]="Info",i[i.Warning=2]="Warning",i[i.Error=3]="Error"})(DM||(DM={}));(function(i){let e="error",t="warning",n="warn",o="info",r="ignore";function s(l){return l?G0(e,l)?i.Error:G0(t,l)||G0(n,l)?i.Warning:G0(o,l)?i.Info:i.Ignore:i.Ignore}i.fromValue=s;function a(l){switch(l){case i.Error:return e;case i.Warning:return t;case i.Info:return o;default:return r}}i.toString=a})(DM||(DM={}));lr=DM});var Mv,xo,zK,ic=P(()=>{C4();_i();Mv=lr,xo=vi("notificationService"),zK=class{}});function ZJe(i){return i==null?!0:i===Gh.Right||i===Gh.Both}function XJe(i){return i==null?!0:i===Gh.Left||i===Gh.Both}var w4,Mx,zme=P(()=>{um();Mi();Ca();w4=class{constructor(e,t,n,o,r){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=n,this.breakOffsetsVisibleColumn=o,this.wrappedTextIndentLength=r}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){let t=e>0?this.breakOffsets[e-1]:0,o=this.breakOffsets[e]-t;return e>0&&(o+=this.wrappedTextIndentLength),o}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let o=e===0?t:this.breakOffsets[e-1]+t;if(this.injectionOffsets!==null)for(let r=0;rthis.injectionOffsets[r];r++)o0?this.breakOffsets[r-1]:0,t===0)if(e<=s)o=r-1;else if(e>l)n=r+1;else break;else if(e=l)n=r+1;else break}let a=e-s;return r>0&&(a+=this.wrappedTextIndentLength),new Mx(r,a)}normalizeOutputPosition(e,t,n){if(this.injectionOffsets!==null){let o=this.outputPositionToOffsetInInputWithInjections(e,t),r=this.normalizeOffsetInInputWithInjectionsAroundInjections(o,n);if(r!==o)return this.offsetInInputWithInjectionsToOutputPosition(r,n)}if(n===0){if(e>0&&t===this.getMinOutputOffset(e))return new Mx(e-1,this.getMaxOutputOffset(e-1))}else if(n===1){let o=this.getOutputLineCount()-1;if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){let n=this.getInjectedTextAtOffset(e);if(!n)return e;if(t===2){if(e===n.offsetInInputWithInjections+n.length&&ZJe(this.injectionOptions[n.injectedTextIndex].cursorStops))return n.offsetInInputWithInjections+n.length;{let o=n.offsetInInputWithInjections;if(XJe(this.injectionOptions[n.injectedTextIndex].cursorStops))return o;let r=n.injectedTextIndex-1;for(;r>=0&&this.injectionOffsets[r]===this.injectionOffsets[n.injectedTextIndex]&&!(ZJe(this.injectionOptions[r].cursorStops)||(o-=this.injectionOptions[r].content.length,XJe(this.injectionOptions[r].cursorStops)));)r--;return o}}else if(t===1||t===4){let o=n.offsetInInputWithInjections+n.length,r=n.injectedTextIndex;for(;r+1=0&&this.injectionOffsets[r-1]===this.injectionOffsets[r];)o-=this.injectionOptions[r-1].content.length,r--;return o}P3(t)}getInjectedText(e,t){let n=this.outputPositionToOffsetInInputWithInjections(e,t),o=this.getInjectedTextAtOffset(n);return o?{options:this.injectionOptions[o.injectedTextIndex]}:null}getInjectedTextAtOffset(e){let t=this.injectionOffsets,n=this.injectionOptions;if(t!==null){let o=0;for(let r=0;re)break;if(e<=l)return{injectedTextIndex:r,offsetInInputWithInjections:a,length:s};o+=s}}}};Mx=class{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new ke(e+this.outputLineIndex,this.outputOffset+1)}}});function pIt(i,e,t,n,o,r,s,a){if(o===-1)return null;let l=t.length;if(l<=1)return null;let c=a==="keepAll",d=e.breakOffsets,u=e.breakOffsetsVisibleColumn,h=JJe(t,n,o,r,s),f=o-h,p=Hme,m=Bme,y=0,_=0,v=0,b=o,C=d.length,w=0;if(w>=0){let S=Math.abs(u[w]-b);for(;w+1=S)break;S=x,w++}}for(;wS&&(S=_,x=v);let k=0,D=0,E=0,A=0;if(x<=b){let L=x,I=S===0?0:t.charCodeAt(S-1),M=S===0?0:i.get(I),N=!0;for(let z=S;z_&&Vme(I,M,V,ie,c)&&(k=F,D=L),L+=fe,L>b){F>_?(E=F,A=L-fe):(E=z+1,A=L),L-D>f&&(k=0),N=!1;break}I=V,M=ie}if(N){y>0&&(p[y]=d[d.length-1],m[y]=u[d.length-1],y++);break}}if(k===0){let L=x,I=t.charCodeAt(S),M=i.get(I),N=!1;for(let z=S-1;z>=_;z--){let F=z+1,V=t.charCodeAt(z);if(V===9){N=!0;break}let ie,fe;if(Ng(V)?(z--,ie=0,fe=2):(ie=i.get(V),fe=Bf(V)?r:1),L<=b){if(E===0&&(E=F,A=L),L<=b-f)break;if(Vme(V,ie,I,M,c)){k=F,D=L;break}}L-=fe,I=V,M=ie}if(k!==0){let z=f-(A-D);if(z<=n){let F=t.charCodeAt(E),V;Or(F)?V=2:V=TM(F,A,n,r),z-V<0&&(k=0)}}if(N){w--;continue}}if(k===0&&(k=E,D=A),k<=_){let L=t.charCodeAt(_);Or(L)?(k=_+2,D=v+2):(k=_+1,D=v+TM(L,v,n,r))}for(_=k,p[y]=k,v=D,m[y]=D,y++,b=D+f;w<0||w=T)break;T=L,w++}}return y===0?null:(p.length=y,m.length=y,Hme=e.breakOffsets,Bme=e.breakOffsetsVisibleColumn,e.breakOffsets=p,e.breakOffsetsVisibleColumn=m,e.wrappedTextIndentLength=h,e)}function mIt(i,e,t,n,o,r,s,a){let l=fh.applyInjectedText(e,t),c,d;if(t&&t.length>0?(c=t.map(D=>D.options),d=t.map(D=>D.column-1)):(c=null,d=null),o===-1)return c?new w4(d,c,[l.length],[],0):null;let u=l.length;if(u<=1)return c?new w4(d,c,[l.length],[],0):null;let h=a==="keepAll",f=JJe(l,n,o,r,s),p=o-f,m=[],y=[],_=0,v=0,b=0,C=o,w=l.charCodeAt(0),S=i.get(w),x=TM(w,0,n,r),k=1;Or(w)&&(x+=1,w=l.charCodeAt(1),S=i.get(w),k++);for(let D=k;DC&&((v===0||x-b>p)&&(v=E,b=x-L),m[_]=v,y[_]=b,_++,C=b+p,v=0),w=A,S=T}return _===0&&(!t||t.length===0)?null:(m[_]=u,y[_]=x,new w4(d,c,m,y,f))}function TM(i,e,t,n){return i===9?t-e%t:Bf(i)||i<32?n:1}function QJe(i,e){return e-i%e}function Vme(i,e,t,n,o){return t!==32&&(e===2&&n!==2||e!==1&&n===1||!o&&e===3&&n!==2||!o&&n===3&&e!==1)}function JJe(i,e,t,n,o){let r=0;if(o!==0){let s=qr(i);if(s!==-1){for(let l=0;lt&&(r=0)}}return r}var FK,Fme,Hme,Bme,eet=P(()=>{Ri();A5();Dv();zme();FK=class i{static create(e){return new i(e.get(132),e.get(131))}constructor(e,t){this.classifier=new Fme(e,t)}createLineBreaksComputer(e,t,n,o,r){let s=[],a=[],l=[];return{addRequest:(c,d,u)=>{s.push(c),a.push(d),l.push(u)},finalize:()=>{let c=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,d=[];for(let u=0,h=s.length;u=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}},Hme=[],Bme=[]});function gIt(i,e,t,n,o,r,s,a){var l;function c(E){let A=a[E];if(A){let T=fh.applyInjectedText(e[E],A),L=A.map(M=>M.options),I=A.map(M=>M.column-1);return new w4(I,L,[T.length],[],0)}else return null}if(o===-1){let E=[];for(let A=0,T=e.length;Ad?(T=0,L=0):I=d-z}let M=A.substr(T),N=vIt(M,L,n,I,m,f);y[E]=T,_[E]=L,v[E]=M,b[E]=N[0],C[E]=N[1]}let w=m.build(),S=(l=Wme?.createHTML(w))!==null&&l!==void 0?l:w;p.innerHTML=S,p.style.position="absolute",p.style.top="10000",s==="keepAll"?(p.style.wordBreak="keep-all",p.style.overflowWrap="anywhere"):(p.style.wordBreak="inherit",p.style.overflowWrap="break-word"),i.document.body.appendChild(p);let x=document.createRange(),k=Array.prototype.slice.call(p.children,0),D=[];for(let E=0;Eie.options),F=V.map(ie=>ie.column-1)):(z=null,F=null),D[E]=new w4(F,z,T,N,I)}return i.document.body.removeChild(p),D}function vIt(i,e,t,n,o,r){if(r!==0){let h=String(r);o.appendString('
');let s=i.length,a=e,l=0,c=[],d=[],u=0");for(let h=0;h"),c[h]=l,d[h]=a;let f=u;u=h+1"),c[i.length]=l,d[i.length]=a,o.appendString("
"),[c,d]}function _It(i,e,t,n){if(t.length<=1)return null;let o=Array.prototype.slice.call(e.children,0),r=[];try{$me(i,o,n,0,null,t.length-1,null,r)}catch(s){return console.log(s),null}return r.length===0?null:(r.push(t.length),r)}function $me(i,e,t,n,o,r,s,a){if(n===r||(o=o||Ume(i,e,t[n],t[n+1]),s=s||Ume(i,e,t[r],t[r+1]),Math.abs(o[0].top-s[0].top)<=.1))return;if(n+1===r){a.push(r);return}let l=n+(r-n)/2|0,c=Ume(i,e,t[l],t[l+1]);$me(i,e,t,n,o,l,c,a),$me(i,e,t,l,c,r,s,a)}function Ume(i,e,t,n){return i.setStart(e[t/16384|0].firstChild,t%16384),i.setEnd(e[n/16384|0].firstChild,n%16384),i.getClientRects()}var Wme,HK,tet=P(()=>{Vg();Ri();ho();Vf();J0();zme();Dv();Wme=td("domLineBreaksComputer",{createHTML:i=>i}),HK=class i{static create(e){return new i(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,t,n,o,r){let s=[],a=[];return{addRequest:(l,c,d)=>{s.push(l),a.push(c)},finalize:()=>gIt(X1(this.targetWindow.deref()),s,e,t,n,o,r,a)}}}});var BK,iet=P(()=>{Qt();Pi();nt();BK=class extends ue{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new k3),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,n){this._editor=e,this._instantiationService=n;for(let o of t){if(this._pending.has(o.id)){hi(new Error(`Cannot have two contributions with the same id ${o.id}`));continue}this._pending.set(o.id,o)}this._instantiateSome(0),this._register(S5(pi(this._editor.getDomNode()),()=>{this._instantiateSome(1)})),this._register(S5(pi(this._editor.getDomNode()),()=>{this._instantiateSome(2)})),this._register(S5(pi(this._editor.getDomNode()),()=>{this._instantiateSome(3)},5e3))}saveViewState(){let e={};for(let[t,n]of this._instances)typeof n.saveViewState=="function"&&(e[t]=n.saveViewState());return e}restoreViewState(e){for(let[t,n]of this._instances)typeof n.restoreViewState=="function"&&n.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){var e;this._register(S5(pi((e=this._editor)===null||e===void 0?void 0:e.getDomNode()),()=>{this._instantiateSome(1)},50))}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;let t=this._findPendingContributionsByInstantiation(e);for(let n of t)this._instantiateById(n.id)}_findPendingContributionsByInstantiation(e){let t=[];for(let[,n]of this._pending)n.instantiation===e&&t.push(n);return t}_instantiateById(e){let t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{let n=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,n),typeof n.restoreViewState=="function"&&t.instantiation!==0&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(n){hi(n)}}}}});function jme(i){return CIt+encodeURIComponent(i.toString())+wIt}function kIt(i){return xIt+encodeURIComponent(i.toString())+SIt}var bIt,x4,Nb,yIt,qme,S4,VK,nc,Gme,Kme,Yme,Zme,CIt,wIt,xIt,SIt,IM=P(()=>{jKe();qKe();Wt();Qt();Pi();Xt();nt();Nc();ZKe();an();fs();AQe();q1e();Ks();mp();Mi();Kt();zo();vpe();dI();Co();ea();r1();pr();YJe();$o();Xi();_i();Ix();ic();No();Yh();eet();tet();RI();Kr();Vf();Yn();iet();sj();bIt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},x4=function(i,e){return function(t,n){e(t,n,i)}},yIt=0,qme=class{constructor(e,t,n,o,r,s){this.model=e,this.viewModel=t,this.view=n,this.hasRealView=o,this.listenersToRemove=r,this.attachedView=s}dispose(){Nn(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}},S4=Nb=class extends ue{get isSimpleWidget(){return this._configuration.isSimpleWidget}constructor(e,t,n,o,r,s,a,l,c,d,u,h){var f;super(),this.languageConfigurationService=u,this._deliveryQueue=Bje(),this._contributions=this._register(new BK),this._onDidDispose=this._register(new ge),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onWillChangeModel=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onWillChangeModel=this._onWillChangeModel.event,this._onDidChangeModel=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new nc(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new VK({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new VK({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new nc(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new nc(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new nc(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new nc(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new nc(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new nc(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new nc(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new nc(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new nc(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new nc(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new nc(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new nc(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new nc(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new nc(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new nc(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new nc(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new nc(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),r.willCreateCodeEditor();let p={...t};this._domElement=e,this._overflowWidgetsDomNode=p.overflowWidgetsDomNode,delete p.overflowWidgetsDomNode,this._id=++yIt,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=n.telemetryData,this._configuration=this._register(this._createConfiguration(n.isSimpleWidget||!1,p,d)),this._register(this._configuration.onDidChange(_=>{this._onDidChangeConfiguration.fire(_);let v=this._configuration.options;if(_.hasChanged(143)){let b=v.get(143);this._onDidLayoutChange.fire(b)}})),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=c,this._codeEditorService=r,this._commandService=s,this._themeService=l,this._register(new Gme(this,this._contextKeyService)),this._register(new Kme(this,this._contextKeyService,h)),this._instantiationService=o.createChild(new wp([ri,this._contextKeyService])),this._modelData=null,this._focusTracker=new Yme(e,this._overflowWidgetsDomNode),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let m;Array.isArray(n.contributions)?m=n.contributions:m=$3.getEditorContributions(),this._contributions.initialize(this,m,this._instantiationService);for(let _ of $3.getEditorActions()){if(this._actions.has(_.id)){hi(new Error(`Cannot have two actions with the same id ${_.id}`));continue}let v=new ux(_.id,_.label,_.alias,_.metadata,(f=_.precondition)!==null&&f!==void 0?f:void 0,b=>this._instantiationService.invokeFunction(C=>Promise.resolve(_.runEditorCommand(C,this,b))),this._contextKeyService);this._actions.set(v.id,v)}let y=()=>!this._configuration.options.get(90)&&this._configuration.options.get(36).enabled;this._register(new ZU(this._domElement,{onDragOver:_=>{if(!y())return;let v=this.getTargetAtClientPoint(_.clientX,_.clientY);v?.position&&this.showDropIndicatorAt(v.position)},onDrop:async _=>{if(!y()||(this.removeDropIndicator(),!_.dataTransfer))return;let v=this.getTargetAtClientPoint(_.clientX,_.clientY);v?.position&&this._onDropIntoEditor.fire({position:v.position,event:_})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){var t;(t=this._modelData)===null||t===void 0||t.view.writeScreenReaderContent(e)}_createConfiguration(e,t,n){return new aj(e,t,this._domElement,n)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return s4.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?la.getWordAtPosition(this._modelData.model,this._configuration.options.get(129),e):null}getValue(e=null){if(!this._modelData)return"";let t=!!(e&&e.preserveBOM),n=0;return e&&e.lineEnding&&e.lineEnding===` +`)){u=!1;break}}if(u){let h=new O(c,1,c,d);t.push(new ow(null,h,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n,o)}_applyUndo(e,t,n,o){let r=e.map(s=>{let a=this.getPositionAt(s.newPosition),l=this.getPositionAt(s.newEnd);return{range:new O(a.lineNumber,a.column,l.lineNumber,l.column),text:s.oldText}});this._applyUndoRedoEdits(r,t,!0,!1,n,o)}_applyRedo(e,t,n,o){let r=e.map(s=>{let a=this.getPositionAt(s.oldPosition),l=this.getPositionAt(s.oldEnd);return{range:new O(a.lineNumber,a.column,l.lineNumber,l.column),text:s.newText}});this._applyUndoRedoEdits(r,t,!1,!0,n,o)}_applyUndoRedoEdits(e,t,n,o,r,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=o,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(r)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();let n=this._validateEditOperations(e);return this._doApplyEdits(n,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){let n=this._buffer.getLineCount(),o=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),r=this._buffer.getLineCount(),s=o.changes;if(this._trimAutoWhitespaceLines=o.trimAutoWhitespaceLineNumbers,s.length!==0){for(let c=0,d=s.length;c=0;D--){let E=f+D,A=b+D;k.takeFromEndWhile(L=>L.lineNumber>A);let T=k.takeFromEndWhile(L=>L.lineNumber===A);a.push(new _M(E,this.getLineContent(A),T))}if(_z.lineNumberz.lineNumber===N)}a.push(new qG(E+1,f+y,I,L))}l+=v}this._emitContentChangedEvent(new kb(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return o.reverseEdits===null?void 0:o.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(e===null||e.size===0)return;let n=Array.from(e).map(o=>new _M(o,this.getLineContent(o),this._getInjectedTextInLine(o)));this._onDidChangeInjectedText.fire(new kx(n))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){let n={addDecoration:(r,s)=>this._deltaDecorationsImpl(e,[],[{range:r,options:s}])[0],changeDecoration:(r,s)=>{this._changeDecorationImpl(r,s)},changeDecorationOptions:(r,s)=>{this._changeDecorationOptionsImpl(r,MJe(s))},removeDecoration:r=>{this._deltaDecorationsImpl(e,[r],[])},deltaDecorations:(r,s)=>r.length===0&&s.length===0?[]:this._deltaDecorationsImpl(e,r,s)},o=null;try{o=t(n)}catch(r){hi(r)}return n.addDecoration=CM,n.changeDecoration=CM,n.changeDecorationOptions=CM,n.removeDecoration=CM,n.deltaDecorations=CM,o}deltaDecorations(e,t,n=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),hi(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,n){let o=e?this._decorations[e]:null;if(!o)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:IJe[n]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(o),delete this._decorations[o.id],null;let r=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),a=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);return this._decorationsTree.delete(o),o.reset(this.getVersionId(),s,a,r),o.setOptions(IJe[n]),this._decorationsTree.insert(o),o.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;let t=this._decorationsTree.collectNodesFromOwner(e);for(let n=0,o=t.length;nthis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}getLinesDecorations(e,t,n=0,o=!1,r=!1){let s=this.getLineCount(),a=Math.min(s,Math.max(1,e)),l=Math.min(s,Math.max(1,t)),c=this.getLineMaxColumn(l),d=new O(a,1,l,c),u=this._getDecorationsInRange(d,n,o,r);return ZD(u,this._decorationProvider.getDecorationsInRange(d,n,o)),u}getDecorationsInRange(e,t=0,n=!1,o=!1,r=!1){let s=this.validateRange(e),a=this._getDecorationsInRange(s,t,n,r);return ZD(a,this._decorationProvider.getDecorationsInRange(s,t,n,o)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){let t=this._buffer.getOffsetAt(e,1),n=t+this._buffer.getLineLength(e),o=this._decorationsTree.getInjectedTextInInterval(this,t,n,0);return fh.fromDecorations(o).filter(r=>r.lineNumber===e)}getAllDecorations(e=0,t=!1){let n=this._decorationsTree.getAll(this,e,t,!1,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,t)),n}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,n,o){let r=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,r,s,t,n,o)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){let n=this._decorations[e];if(!n)return;if(n.options.after){let a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.endLineNumber)}if(n.options.before){let a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.startLineNumber)}let o=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),s=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,s,o),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.startLineNumber)}_changeDecorationOptionsImpl(e,t){let n=this._decorations[e];if(!n)return;let o=!!(n.options.overviewRuler&&n.options.overviewRuler.color),r=!!(t.overviewRuler&&t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(t),n.options.after||t.after){let l=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(l.endLineNumber)}if(n.options.before||t.before){let l=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(l.startLineNumber)}let s=o!==r,a=lIt(t)!==YG(n);s||a?(this._decorationsTree.delete(n),n.setOptions(t),this._decorationsTree.insert(n)):n.setOptions(t)}_deltaDecorationsImpl(e,t,n,o=!1){let r=this.getVersionId(),s=t.length,a=0,l=n.length,c=0;this._onDidChangeDecorations.beginDeferredEmit();try{let d=new Array(l);for(;athis._setLanguage(e.languageId,t)),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return aIt(this.getLineContent(e))+1}};Cp._MODEL_SYNC_LIMIT=50*1024*1024;Cp.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024;Cp.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3;Cp.LARGE_FILE_HEAP_OPERATION_THRESHOLD=256*1024*1024;Cp.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:Ma.tabSize,indentSize:Ma.indentSize,insertSpaces:Ma.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:Ma.trimAutoWhitespace,largeFileOptimizations:Ma.largeFileOptimizations,bracketPairColorizationOptions:Ma.bracketPairColorizationOptions};Cp=Eb=iIt([ume(4,Iv),ume(5,Kn),ume(6,An)],Cp);ZG=class{constructor(){this._decorationsTree0=new Cx,this._decorationsTree1=new Cx,this._injectedTextDecorationsTree=new Cx}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(let n of t)n.range===null&&(n.range=e.getRangeAt(n.cachedAbsoluteStart,n.cachedAbsoluteEnd));return t}getAllInInterval(e,t,n,o,r,s){let a=e.getVersionId(),l=this._intervalSearch(t,n,o,r,a,s);return this._ensureNodesHaveRanges(e,l)}_intervalSearch(e,t,n,o,r,s){let a=this._decorationsTree0.intervalSearch(e,t,n,o,r,s),l=this._decorationsTree1.intervalSearch(e,t,n,o,r,s),c=this._injectedTextDecorationsTree.intervalSearch(e,t,n,o,r,s);return a.concat(l).concat(c)}getInjectedTextInInterval(e,t,n,o){let r=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,n,o,!1,r,!1);return this._ensureNodesHaveRanges(e,s).filter(a=>a.options.showIfCollapsed||!a.range.isEmpty())}getAllInjectedText(e,t){let n=e.getVersionId(),o=this._injectedTextDecorationsTree.search(t,!1,n,!1);return this._ensureNodesHaveRanges(e,o).filter(r=>r.options.showIfCollapsed||!r.range.isEmpty())}getAll(e,t,n,o,r){let s=e.getVersionId(),a=this._search(t,n,o,s,r);return this._ensureNodesHaveRanges(e,a)}_search(e,t,n,o,r){if(n)return this._decorationsTree1.search(e,t,o,r);{let s=this._decorationsTree0.search(e,t,o,r),a=this._decorationsTree1.search(e,t,o,r),l=this._injectedTextDecorationsTree.search(e,t,o,r);return s.concat(a).concat(l)}}collectNodesFromOwner(e){let t=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e),o=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(n).concat(o)}collectNodesPostOrder(){let e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),n=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(n)}insert(e){YG(e)?this._injectedTextDecorationsTree.insert(e):hme(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){YG(e)?this._injectedTextDecorationsTree.delete(e):hme(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){let n=e.getVersionId();return t.cachedVersionId!==n&&this._resolveNode(t,n),t.range===null&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){YG(e)?this._injectedTextDecorationsTree.resolveNode(e,t):hme(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,n,o){this._decorationsTree0.acceptReplace(e,t,n,o),this._decorationsTree1.acceptReplace(e,t,n,o),this._injectedTextDecorationsTree.acceptReplace(e,t,n,o)}};XG=class{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}},pme=class extends XG{constructor(e){super(e),this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:Sl.Center}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if(typeof e=="string")return e;let n=e?t.getColor(e.id):null;return n?n.toString():""}},mme=class{constructor(e){var t;this.position=(t=e?.position)!==null&&t!==void 0?t:lu.Center,this.persistLane=e?.persistLane}},gme=class extends XG{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return typeof e=="string"?it.fromHex(e):t.getColor(e.id)}},C2=class i{static from(e){return e instanceof i?e:new i(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}},zi=class i{static register(e){return new i(e)}static createDynamic(e){return new i(e)}constructor(e){var t,n,o,r,s,a;this.description=e.description,this.blockClassName=e.blockClassName?y2(e.blockClassName):null,this.blockDoesNotCollapse=(t=e.blockDoesNotCollapse)!==null&&t!==void 0?t:null,this.blockIsAfterEnd=(n=e.blockIsAfterEnd)!==null&&n!==void 0?n:null,this.blockPadding=(o=e.blockPadding)!==null&&o!==void 0?o:null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?y2(e.className):null,this.shouldFillLineOnLineBreak=(r=e.shouldFillLineOnLineBreak)!==null&&r!==void 0?r:null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new pme(e.overviewRuler):null,this.minimap=e.minimap?new gme(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new mme(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?y2(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?y2(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?y2(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?nqe(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?y2(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?y2(e.marginClassName):null,this.inlineClassName=e.inlineClassName?y2(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?y2(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?y2(e.afterContentClassName):null,this.after=e.after?C2.from(e.after):null,this.before=e.before?C2.from(e.before):null,this.hideInCommentTokens=(s=e.hideInCommentTokens)!==null&&s!==void 0?s:!1,this.hideInStringTokens=(a=e.hideInStringTokens)!==null&&a!==void 0?a:!1}};zi.EMPTY=zi.register({description:"empty"});IJe=[zi.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),zi.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),zi.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),zi.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];vme=class extends ue{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new ge),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),(e=this._affectedInjectedTextLines)===null||e===void 0||e.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){var t,n;this._affectsMinimap||(this._affectsMinimap=!!(!((t=e.minimap)===null||t===void 0)&&t.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(!((n=e.overviewRuler)===null||n===void 0)&&n.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!e.glyphMarginClassName),this._affectsLineNumber||(this._affectsLineNumber=!!e.lineNumberClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);let e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}},_me=class extends ue{constructor(){super(),this._fastEmitter=this._register(new ge),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new ge),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;let t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}},bme=class{constructor(){this._onDidChangeVisibleRanges=new ge,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){let e=new yme(t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})});return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}},yme=class{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){let n=e.map(o=>new rn(o.startLineNumber,o.endLineNumber+1));this.handleStateChange({visibleLineRanges:n,stabilized:t})}}});var wM,NJe=P(()=>{s1();Mi();Kt();zo();wM=class i{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new wa(new O(1,1,1,1),0,0,new ke(1,1),0),new wa(new O(1,1,1,1),0,0,new ke(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new Vn(this.modelState,this.viewState)}readSelectionFromMarkers(e){let t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?jt.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):jt.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,n){this._setState(e,t,n)}static _validatePositionWithCache(e,t,n,o){return t.equals(n)?o:e.normalizePosition(t,2)}static _validateViewState(e,t){let n=t.position,o=t.selectionStart.getStartPosition(),r=t.selectionStart.getEndPosition(),s=e.normalizePosition(n,2),a=this._validatePositionWithCache(e,o,n,s),l=this._validatePositionWithCache(e,r,o,a);return n.equals(s)&&o.equals(a)&&r.equals(l)?t:new wa(O.fromPositions(a,l),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+o.column-a.column,s,t.leftoverVisibleColumns+n.column-s.column)}_setState(e,t,n){if(n&&(n=i._validateViewState(e.viewModel,n)),t){let o=e.model.validateRange(t.selectionStart),r=t.selectionStart.equalsRange(o)?t.selectionStartLeftoverVisibleColumns:0,s=e.model.validatePosition(t.position),a=t.position.equals(s)?t.leftoverVisibleColumns:0;t=new wa(o,t.selectionStartKind,r,s,a)}else{if(!n)return;let o=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(n.selectionStart)),r=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(n.position));t=new wa(o,n.selectionStartKind,n.selectionStartLeftoverVisibleColumns,r,n.leftoverVisibleColumns)}if(n){let o=e.coordinatesConverter.validateViewRange(n.selectionStart,t.selectionStart),r=e.coordinatesConverter.validateViewPosition(n.position,t.position);n=new wa(o,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}else{let o=e.coordinatesConverter.convertModelPositionToViewPosition(new ke(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),r=e.coordinatesConverter.convertModelPositionToViewPosition(new ke(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),s=new O(o.lineNumber,o.column,r.lineNumber,r.column),a=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);n=new wa(s,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,a,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=n,this._updateTrackedRange(e)}}});var xM,AJe=P(()=>{Vi();rh();s1();NJe();Mi();Kt();zo();xM=class{constructor(e){this.context=e,this.cursors=[new wM(e)],this.lastAddedCursorIndex=0}dispose(){for(let e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(let e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(let e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(let e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(e=>e.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(e=>e.asCursorState())}getViewPositions(){return this.cursors.map(e=>e.viewState.position)}getTopMostViewPosition(){return QGe(this.cursors,Sc(e=>e.viewState.position,ke.compare)).viewState.position}getBottomMostViewPosition(){return XGe(this.cursors,Sc(e=>e.viewState.position,ke.compare)).viewState.position}getSelections(){return this.cursors.map(e=>e.modelState.selection)}getViewSelections(){return this.cursors.map(e=>e.viewState.selection)}setSelections(e){this.setStates(Vn.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){e!==null&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){let t=this.cursors.length-1,n=e.length;if(tn){let o=t-n;for(let r=0;r=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(this.cursors.length===1)return;let e=this.cursors.slice(0),t=[];for(let n=0,o=e.length;nn.selection,O.compareRangesUsingStarts));for(let n=0;nu&&m.index--;e.splice(u,1),t.splice(d,1),this._removeSecondaryCursor(u-1),n--}}}}});var SM,RJe=P(()=>{SM=class{constructor(e,t,n,o){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=n,this.cursorConfig=o}}});var QG,JG,eK,tK,w2,Db,iK,nK,Tb,kM,Lx,Ex,Mv,oK,rK,sK,aK,lK,cK=P(()=>{QG=class{constructor(){this.type=0}},JG=class{constructor(){this.type=1}},eK=class{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}},tK=class{constructor(e,t,n){this.selections=e,this.modelSelections=t,this.reason=n,this.type=3}},w2=class{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin,this.affectsLineNumber=e.affectsLineNumber):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0,this.affectsLineNumber=!0)}},Db=class{constructor(){this.type=5}},iK=class{constructor(e){this.type=6,this.isFocused=e}},nK=class{constructor(){this.type=7}},Tb=class{constructor(){this.type=8}},kM=class{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}},Lx=class{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}},Ex=class{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}},Mv=class{constructor(e,t,n,o,r,s,a){this.source=e,this.minimalReveal=t,this.range=n,this.selections=o,this.verticalType=r,this.revealHorizontal=s,this.scrollType=a,this.type=12}},oK=class{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}},rK=class{constructor(e){this.theme=e,this.type=14}},sK=class{constructor(e){this.type=15,this.ranges=e}},aK=class{constructor(){this.type=16}},lK=class{constructor(){this.type=17}}});var dK,Cme,uK,hK,fK,pK,mK,gK,vK,_K,bK,yK,CK,wK,xK,SK=P(()=>{Xt();nt();dK=class extends ue{constructor(){super(),this._onEvent=this._register(new ge),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,n=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;let e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,n=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){let e=this._viewEventQueue;this._viewEventQueue=null;let t=this._eventHandlers.slice(0);for(let n of t)n.handleEvents(e)}}},Cme=class{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}},uK=class i{constructor(e,t,n,o){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=n,this.contentHeight=o,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new i(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}},hK=class i{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new i(this.oldHasFocus,e.hasFocus)}},fK=class i{constructor(e,t,n,o,r,s,a,l){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=n,this._oldScrollTop=o,this.scrollWidth=r,this.scrollLeft=s,this.scrollHeight=a,this.scrollTop=l,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new i(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}},pK=class{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}},mK=class{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}},gK=class i{constructor(e,t,n,o,r,s,a){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=n,this.modelVersionId=o,this.source=r,this.reason=s,this.reachedMaxCursorCount=a}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;let n=e.length,o=t.length;if(n!==o)return!1;for(let r=0;r{Pi();Ri();AJe();s1();RJe();gq();Dq();Kt();zo();Tv();cK();nt();SK();kK=class extends ue{constructor(e,t,n,o){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=n,this.context=new SM(this._model,this._viewModel,this._coordinatesConverter,o),this._cursors=new xM(this.context),this._hasFocus=!1,this._isHandling=!1,this._compositionState=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=Nn(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new SM(this._model,this._viewModel,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let e=this._cursors.getSelections();for(let t=0;ts&&(o=o.slice(0,s),r=!0);let a=LM.from(this._model,this);return this._cursors.setStates(o),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,n,a,r)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,n,o,r,s){let a=this._cursors.getViewPositions(),l=null,c=null;a.length>1?c=this._cursors.getViewSelections():l=O.fromPositions(a[0],a[0]),e.emitViewEvent(new Mv(t,n,l,c,o,r,s))}saveState(){let e=[],t=this._cursors.getSelections();for(let n=0,o=t.length;n0){let r=Vn.fromModelSelections(n.resultingSelection);this.setStates(e,"modelChange",n.isUndoing?5:n.isRedoing?6:2,r)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{let r=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,Vn.fromModelSelections(r))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;let e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),n=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:n.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,n)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,n,o){this.setStates(e,t,o,Vn.fromModelSelections(n))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){let n=[],o=[];for(let a=0,l=e.length;a0&&this._pushAutoClosedAction(n,o),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,n,o,r){let s=LM.from(this._model,this);if(s.equals(o))return!1;let a=this._cursors.getSelections(),l=this._cursors.getViewSelections();if(e.emitViewEvent(new tK(l,a,n)),!o||o.cursorState.length!==s.cursorState.length||s.cursorState.some((c,d)=>!c.modelState.equals(o.cursorState[d].modelState))){let c=o?o.cursorState.map(u=>u.modelState.selection):null,d=o?o.modelVersionId:0;e.emitOutgoingEvent(new gK(c,a,d,s.modelVersionId,t||"keyboard",n,r))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;let t=[];for(let n=0,o=e.length;n=0)return null;let s=r.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!s)return null;let a=s[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;let c=l[0].open,d=r.text.length-s[2].length-1,u=r.text.lastIndexOf(c,d-1);if(u===-1)return null;t.push([u,d])}return t}executeEdits(e,t,n,o){let r=null;t==="snippet"&&(r=this._findAutoClosingPairs(n)),r&&(n[0]._isTracked=!0);let s=[],a=[],l=this._model.pushEditOperations(this.getSelections(),n,c=>{if(r)for(let u=0,h=r.length;u0&&this._pushAutoClosedAction(s,a)}_executeEdit(e,t,n,o=0){if(this.context.cursorConfig.readOnly)return;let r=LM.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(s){hi(s)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,n,o,r,!1)&&this.revealPrimary(t,n,!1,0,!0,0)}getAutoClosedCharacters(){return LK.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new Sme(this._model,this.getSelections())}endComposition(e,t){let n=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{t==="keyboard"&&this._executeEditOperation(gu.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,n,this.getSelections(),this.getAutoClosedCharacters()))},e,t)}type(e,t,n){this._executeEdit(()=>{if(n==="keyboard"){let o=t.length,r=0;for(;r{let c=l.getPosition();return new jt(c.lineNumber,c.column+r,c.lineNumber,c.column+r)});this.setSelections(e,s,a,0)}return}this._executeEdit(()=>{this._executeEditOperation(gu.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,n,o,r))},e,s)}paste(e,t,n,o,r){this._executeEdit(()=>{this._executeEditOperation(gu.paste(this.context.cursorConfig,this._model,this.getSelections(),t,n,o||[]))},e,r,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(p4.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,n){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new Tl(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}executeCommands(e,t,n){this._executeEdit(()=>{this._executeEditOperation(new Tl(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}},LM=class i{static from(e,t){return new i(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,n=this.cursorState.length;t=t.length||!t[n].strictContainsRange(e[n]))return!1;return!0}},wme=class{static executeCommands(e,t,n){let o={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},r=this._innerExecuteCommands(o,n);for(let s=0,a=o.trackedRanges.length;s0&&(s[0]._isTracked=!0);let a=e.model.pushEditOperations(e.selectionsBefore,s,c=>{let d=[];for(let f=0;ff.identifier.minor-p.identifier.minor,h=[];for(let f=0;f0?(d[f].sort(u),h[f]=t[f].computeCursorState(e.model,{getInverseEditOperations:()=>d[f],getTrackedSelection:p=>{let m=parseInt(p,10),y=e.model._getTrackedRange(e.trackedRanges[m]);return e.trackedRangesDirection[m]===0?new jt(y.startLineNumber,y.startColumn,y.endLineNumber,y.endColumn):new jt(y.endLineNumber,y.endColumn,y.startLineNumber,y.startColumn)}})):h[f]=e.selectionsBefore[f];return h});a||(a=e.selectionsBefore);let l=[];for(let c in r)r.hasOwnProperty(c)&&l.push(parseInt(c,10));l.sort((c,d)=>d-c);for(let c of l)a.splice(c,1);return a}static _arrayIsEmpty(e){for(let t=0,n=e.length;t{O.isEmpty(u)&&h===""||o.push({identifier:{major:t,minor:r++},range:u,text:h,forceMoveMarkers:f,isAutoWhitespaceEdit:n.insertsAutoWhitespace})},a=!1,d={addEditOperation:s,addTrackedEditOperation:(u,h,f)=>{a=!0,s(u,h,f)},trackSelection:(u,h)=>{let f=jt.liftSelection(u),p;if(f.isEmpty())if(typeof h=="boolean")h?p=2:p=3;else{let _=e.model.getLineMaxColumn(f.startLineNumber);f.startColumn===_?p=2:p=3}else p=1;let m=e.trackedRanges.length,y=e.model._setTrackedRange(null,f,p);return e.trackedRanges[m]=y,e.trackedRangesDirection[m]=f.getDirection(),m.toString()}};try{n.getEditOperations(e.model,d)}catch(u){return hi(u),{operations:[],hadTrackedEditOperation:!1}}return{operations:o,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((n,o)=>-O.compareRangesUsingEnds(n.range,o.range));let t={};for(let n=1;nr.identifier.major?s=o.identifier.major:s=r.identifier.major,t[s.toString()]=!0;for(let a=0;a0&&n--}}return t}},xme=class{constructor(e,t,n){this.text=e,this.startSelection=t,this.endSelection=n}},Sme=class i{static _capture(e,t){let n=[];for(let o of t){if(o.startLineNumber!==o.endLineNumber)return null;n.push(new xme(e.getLineContent(o.startLineNumber),o.startColumn-1,o.endColumn-1))}return n}constructor(e,t){this._original=i._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;let n=i._capture(e,t);if(!n||this._original.length!==n.length)return null;let o=[];for(let r=0,s=this._original.length;r0;)s&&d?(p+=" ",d=!1):(p+=" ",d=!0),y--;break}case 60:p+="<",d=!1;break;case 62:p+=">",d=!1;break;case 38:p+="&",d=!1;break;case 0:p+="�",d=!1;break;case 65279:case 8232:case 8233:case 133:p+="\uFFFD",d=!1;break;case 13:p+="​",d=!1;break;case 32:s&&d?(p+=" ",d=!1):(p+=" ",d=!0);break;default:p+=String.fromCharCode(m),d=!1}}if(a+=`${p}`,f>o||l>=o)break}return a+="",a}function FJe(i,e,t){let n='
',o=Ec(i),r=t.getInitialState();for(let s=0,a=o.length;s0&&(n+="
");let c=t.tokenizeEncoded(l,!0,r);Es.convertToEndOffset(c.tokens,l.length);let u=new Es(c.tokens,l,e).inflate(),h=0;for(let f=0,p=u.getCount();f${p5(l.substring(h,y))}`,h=y}r=c.endState}return n+="
",n}var zJe,kme=P(()=>{Ri();Yg();Pr();mw();zJe={getInitialState:()=>Kg,tokenizeEncoded:(i,e,t)=>av(0,t)}});var Lme,Eme,EM,VJe=P(()=>{Ri();Lme=class{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;let t=this._inserts,n=this._changes,o=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,n,o)}},Eme=class{constructor(e,t,n,o,r){this.id=e,this.afterLineNumber=t,this.ordinal=n,this.height=o,this.minWidth=r,this.prefixSum=0}},EM=class i{constructor(e,t,n,o){this._instanceId=dU(++i.INSTANCE_COUNT),this._pendingChanges=new Lme,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=n,this._paddingBottom=o}static findInsertionIndex(e,t,n){let o=0,r=e.length;for(;o>>1;t===e[s].afterLineNumber?n{t=!0,o=o|0,r=r|0,s=s|0,a=a|0;let l=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new Eme(l,o,r,s,a)),l},changeOneWhitespace:(o,r,s)=>{t=!0,r=r|0,s=s|0,this._pendingChanges.change({id:o,newAfterLineNumber:r,newHeight:s})},removeWhitespace:o=>{t=!0,this._pendingChanges.remove({id:o})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,n){if((e.length>0||n.length>0)&&(this._minWidth=-1),e.length+t.length+n.length<=1){for(let l of e)this._insertWhitespace(l);for(let l of t)this._changeOneWhitespace(l.id,l.newAfterLineNumber,l.newHeight);for(let l of n){let c=this._findWhitespaceIndex(l.id);c!==-1&&this._removeWhitespace(c)}return}let o=new Set;for(let l of n)o.add(l.id);let r=new Map;for(let l of t)r.set(l.id,l);let s=l=>{let c=[];for(let d of l)if(!o.has(d.id)){if(r.has(d.id)){let u=r.get(d.id);d.afterLineNumber=u.newAfterLineNumber,d.height=u.newHeight}c.push(d)}return c},a=s(this._arr).concat(s(e));a.sort((l,c)=>l.afterLineNumber===c.afterLineNumber?l.ordinal-c.ordinal:l.afterLineNumber-c.afterLineNumber),this._arr=a,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){let t=i.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){let t=this._arr;for(let n=0,o=t.length;nt&&(this._arr[n].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e=e|0,t=t|0,this._lineCount+=t-e+1;for(let n=0,o=this._arr.length;n=t.length||t[a+1].afterLineNumber>=e)return a;n=a+1|0}else o=a-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;let n=this._findLastWhitespaceBeforeLineNumber(e)+1;return n1?n=this._lineHeight*(e-1):n=0;let o=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0));return n+o+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){this._checkPendingChanges(),e=e|0;let n=this._lineHeight*e,o=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0));return n+o+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let e=0;for(let t=0,n=this._arr.length;tt}isInTopPadding(e){return this._paddingTop===0?!1:(this._checkPendingChanges(),e=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e=e|0,e<0)return 1;let t=this._lineCount|0,n=this._lineHeight,o=1,r=t;for(;o=a+n)o=s+1;else{if(e>=a)return s;r=s}}return o>t?t:o}getLinesViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;let n=this._lineHeight,o=this.getLineNumberAtOrAfterVerticalOffset(e)|0,r=this.getVerticalOffsetForLineNumber(o)|0,s=this._lineCount|0,a=this.getFirstWhitespaceIndexAfterLineNumber(o)|0,l=this.getWhitespacesCount()|0,c,d;a===-1?(a=l,d=s+1,c=0):(d=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);let u=r,h=u,f=5e5,p=0;r>=f&&(p=Math.floor(r/f)*f,p=Math.floor(p/n)*n,h-=p);let m=[],y=e+(t-e)/2,_=-1;for(let w=o;w<=s;w++){if(_===-1){let S=u,x=u+n;(S<=y&&yy)&&(_=w)}for(u+=n,m[w-o]=h,h+=n;d===w;)h+=c,u+=c,a++,a>=l?d=s+1:(d=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);if(u>=t){s=w;break}}_===-1&&(_=s);let v=this.getVerticalOffsetForLineNumber(s)|0,b=o,C=s;return bt&&C--,{bigNumbersDelta:p,startLineNumber:o,endLineNumber:s,relativeVerticalOffset:m,centeredLineNumber:_,completelyVisibleStartLineNumber:b,completelyVisibleEndLineNumber:C}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e=e|0;let t=this.getAfterLineNumberForWhitespaceIndex(e),n;t>=1?n=this._lineHeight*t:n=0;let o;return e>0?o=this.getWhitespacesAccumulatedHeight(e-1):o=0,n+o+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e=e|0;let t=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;let o=this.getVerticalOffsetForWhitespaceIndex(n),r=this.getHeightForWhitespaceIndex(n);if(e>=o+r)return-1;for(;t=a+l)t=s+1;else{if(e>=a)return s;n=s}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e=e|0;let t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0||t>=this.getWhitespacesCount())return null;let n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;let o=this.getHeightForWhitespaceIndex(t),r=this.getIdForWhitespaceIndex(t),s=this.getAfterLineNumberForWhitespaceIndex(t);return{id:r,afterLineNumber:s,verticalOffset:n,height:o}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;let n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),o=this.getWhitespacesCount()-1;if(n<0)return[];let r=[];for(let s=n;s<=o;s++){let a=this.getVerticalOffsetForWhitespaceIndex(s),l=this.getHeightForWhitespaceIndex(s);if(a>=t)break;r.push({id:this.getIdForWhitespaceIndex(s),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(s),verticalOffset:a,height:l})}return r}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].height}};EM.INSTANCE_COUNT=0});var cIt,Ib,Dme,EK,WJe=P(()=>{Xt();nt();Jw();VJe();ap();SK();cIt=125,Ib=class{constructor(e,t,n,o){e=e|0,t=t|0,n=n|0,o=o|0,e<0&&(e=0),t<0&&(t=0),n<0&&(n=0),o<0&&(o=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=n,this.contentHeight=o,this.scrollHeight=Math.max(n,o)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}},Dme=class extends ue{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new ge),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new Ib(0,0,0,0),this._scrollable=this._register(new n1({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;let t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);let n=t.contentWidth!==e.contentWidth,o=t.contentHeight!==e.contentHeight;(n||o)&&this._onDidContentSizeChange.fire(new uK(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}},EK=class extends ue{constructor(e,t,n){super(),this._configuration=e;let o=this._configuration.options,r=o.get(143),s=o.get(83);this._linesLayout=new EM(t,o.get(66),s.top,s.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new Dme(0,n)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new Ib(r.contentWidth,0,r.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(113)?cIt:0)}onConfigurationChanged(e){let t=this._configuration.options;if(e.hasChanged(66)&&this._linesLayout.setLineHeight(t.get(66)),e.hasChanged(83)){let n=t.get(83);this._linesLayout.setPadding(n.top,n.bottom)}if(e.hasChanged(143)){let n=t.get(143),o=n.contentWidth,r=n.height,s=this._scrollable.getScrollDimensions(),a=s.contentWidth;this._scrollable.setScrollDimensions(new Ib(o,s.contentWidth,r,this._getContentHeight(o,r,a)))}else this._updateHeight();e.hasChanged(113)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){let o=this._configuration.options.get(102);return o.horizontal===2||e>=t?0:o.horizontalScrollbarSize}_getContentHeight(e,t,n){let o=this._configuration.options,r=this._linesLayout.getLinesTotalHeight();return o.get(104)?r+=Math.max(0,t-o.get(66)-o.get(83).bottom):o.get(102).ignoreHorizontalScrollbarInContentHeight||(r+=this._getHorizontalScrollbarHeight(e,n)),r}_updateHeight(){let e=this._scrollable.getScrollDimensions(),t=e.width,n=e.height,o=e.contentWidth;this._scrollable.setScrollDimensions(new Ib(t,e.contentWidth,n,this._getContentHeight(t,n,o)))}getCurrentViewport(){let e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new pI(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){let e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new pI(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){let e=this._configuration.options,t=this._maxLineWidth,n=e.get(144),o=e.get(50),r=e.get(143);if(n.isViewportWrapping){let s=e.get(72);return t>r.contentWidth+o.typicalHalfwidthCharacterWidth&&s.enabled&&s.side==="right"?t+r.verticalScrollbarWidth:t}else{let s=e.get(103)*o.typicalHalfwidthCharacterWidth,a=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+s+r.verticalScrollbarWidth,a,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){let e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Ib(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){let e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),o=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n);return{scrollTop:t,scrollTopWithoutViewZones:t-o,scrollLeft:e.scrollLeft}}changeWhitespace(e){let t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){let e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){let t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){let e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){t===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){let n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})}}});function TK(i,e){return!(e.options.hideInCommentTokens&&IK(i,e)||e.options.hideInStringTokens&&MK(i,e))}function IK(i,e){return UJe(i,e.range,t=>t===1)}function MK(i,e){return UJe(i,e.range,t=>t===2)}function UJe(i,e,t){for(let n=e.startLineNumber;n<=e.endLineNumber;n++){let o=i.tokenization.getLineTokens(n),r=n===e.startLineNumber,s=n===e.endLineNumber,a=r?o.findTokenIndexAtOffset(e.startColumn-1):0;for(;ae.endColumn-1);){if(!t(o.getStandardTokenType(a)))return!1;a++}}return!0}var DK,Tme=P(()=>{Mi();Kt();ap();Ks();DK=class{constructor(e,t,n,o,r){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=o,this._coordinatesConverter=r,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){let t=e.id,n=this._decorationsCache[t];if(!n){let o=e.range,r=e.options,s;if(r.isWholeLine){let a=this._coordinatesConverter.convertModelPositionToViewPosition(new ke(o.startLineNumber,1),0,!1,!0),l=this._coordinatesConverter.convertModelPositionToViewPosition(new ke(o.endLineNumber,this.model.getLineMaxColumn(o.endLineNumber)),1);s=new O(a.lineNumber,a.column,l.lineNumber,l.column)}else s=this._coordinatesConverter.convertModelRangeToViewRange(o,1);n=new bw(s,r),this._decorationsCache[t]=n}return n}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=this._cachedModelDecorationsResolver!==null;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1,n=!1){let o=new O(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(o,t,n).inlineDecorations[0]}_getDecorationsInRange(e,t,n){let o=this._linesCollection.getDecorationsInRange(e,this.editorId,r5(this.configuration.options),t,n),r=e.startLineNumber,s=e.endLineNumber,a=[],l=0,c=[];for(let d=r;d<=s;d++)c[d-r]=[];for(let d=0,u=o.length;d=Ime.length)for(let e=1;e<=i;e++)Ime[e]=dIt(e);return Ime[i]}function dIt(i){return new Array(i+1).join(" ")}var Mme,Dx,Tx,Ime,jJe=P(()=>{Yg();Mi();Tv();ap();Mme=class{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,n){this._assertVisible();let o=n>0?this._projectionData.breakOffsets[n-1]:0,r=this._projectionData.breakOffsets[n],s;if(this._projectionData.injectionOffsets!==null){let a=this._projectionData.injectionOffsets.map((c,d)=>new fh(0,0,c+1,this._projectionData.injectionOptions[d],0));s=fh.applyInjectedText(e.getLineContent(t),a).substring(o,r)}else s=e.getValueInRange({startLineNumber:t,startColumn:o+1,endLineNumber:t,endColumn:r+1});return n>0&&(s=$Je(this._projectionData.wrappedTextIndentLength)+s),s}getViewLineLength(e,t,n){return this._assertVisible(),this._projectionData.getLineLength(n)}getViewLineMinColumn(e,t,n){return this._assertVisible(),this._projectionData.getMinOutputOffset(n)+1}getViewLineMaxColumn(e,t,n){return this._assertVisible(),this._projectionData.getMaxOutputOffset(n)+1}getViewLineData(e,t,n){let o=new Array;return this.getViewLinesData(e,t,n,1,0,[!0],o),o[0]}getViewLinesData(e,t,n,o,r,s,a){this._assertVisible();let l=this._projectionData,c=l.injectionOffsets,d=l.injectionOptions,u=null;if(c){u=[];let f=0,p=0;for(let m=0;m0?l.breakOffsets[m-1]:0,v=l.breakOffsets[m];for(;pv)break;if(_0?l.wrappedTextIndentLength:0,k=x+Math.max(C-_,0),D=x+Math.min(w-_,v-_);k!==D&&y.push(new nj(k,D,S.inlineClassName,S.inlineClassNameAffectsLetterSpacing))}}if(w<=v)f+=b,p++;else break}}}let h;c?h=e.tokenization.getLineTokens(t).withInserted(c.map((f,p)=>({offset:f,text:d[p].content,tokenMetadata:Es.defaultTokenMetadata}))):h=e.tokenization.getLineTokens(t);for(let f=n;f0?o.wrappedTextIndentLength:0,s=n>0?o.breakOffsets[n-1]:0,a=o.breakOffsets[n],l=e.sliceAndInflate(s,a,r),c=l.getLineContent();n>0&&(c=$Je(o.wrappedTextIndentLength)+c);let d=this._projectionData.getMinOutputOffset(n)+1,u=c.length+1,h=n+1o+1?(t.push(new O(n,1,o,1)),n=a.startLineNumber,o=a.endLineNumber):a.endLineNumber>o&&(o=a.endLineNumber)}return t.push(new O(n,1,o,1)),t}var AK,RK,PK,Nme,OK,Ame,qJe=P(()=>{Vi();Mi();Kt();qq();ea();Tv();cK();jJe();cfe();ap();AK=class{constructor(e,t,n,o,r,s,a,l,c,d){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=n,this._monospaceLineBreaksComputerFactory=o,this.fontInfo=r,this.tabSize=s,this.wrappingStrategy=a,this.wrappingColumn=l,this.wrappingIndent=c,this.wordBreak=d,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new Nme(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));let n=this.model.getLinesContent(),o=this.model.getInjectedTextDecorations(this._editorId),r=n.length,s=this.createLineBreaksComputer(),a=new qc(fh.fromDecorations(o));for(let m=0;m_.lineNumber===m+1);s.addRequest(n[m],y,t?t[m]:null)}let l=s.finalize(),c=[],d=this.hiddenAreasDecorationIds.map(m=>this.model.getDecorationRange(m)).sort(O.compareRangesUsingStarts),u=1,h=0,f=-1,p=f+1=u&&y<=h,v=NK(l[m],!_);c[m]=v.getViewLineCount(),this.modelLineProjections[m]=v}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new N$(c)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){let t=e.map(h=>this.model.validateRange(h)),n=uIt(t),o=this.hiddenAreasDecorationIds.map(h=>this.model.getDecorationRange(h)).sort(O.compareRangesUsingStarts);if(n.length===o.length){let h=!1;for(let f=0;f({range:h,options:zi.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,r);let s=n,a=1,l=0,c=-1,d=c+1=a&&f<=l?this.modelLineProjections[h].isVisible()&&(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!1),p=!0):(u=!0,this.modelLineProjections[h].isVisible()||(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!0),p=!0)),p){let m=this.modelLineProjections[h].getViewLineCount();this.projectedModelLineLineCounts.setValue(h,m)}}return u||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return e<1||e>this.modelLineProjections.length?!1:this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,n,o,r){let s=this.fontInfo.equals(e),a=this.wrappingStrategy===t,l=this.wrappingColumn===n,c=this.wrappingIndent===o,d=this.wordBreak===r;if(s&&a&&l&&c&&d)return!1;let u=s&&a&&!l&&c&&d;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=n,this.wrappingIndent=o,this.wordBreak=r;let h=null;if(u){h=[];for(let f=0,p=this.modelLineProjections.length;f2&&!this.modelLineProjections[t-2].isVisible(),s=t===1?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,a=0,l=[],c=[];for(let d=0,u=o.length;dl?(d=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,u=d+l-1,p=u+1,m=p+(r-l)-1,c=!0):rt?t:e|0}getActiveIndentGuide(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);let o=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),r=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),s=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),a=this.model.guides.getActiveIndentGuide(o.lineNumber,r.lineNumber,s.lineNumber),l=this.convertModelPositionToViewPosition(a.startLineNumber,1),c=this.convertModelPositionToViewPosition(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber));return{startLineNumber:l.lineNumber,endLineNumber:c.lineNumber,indent:a.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);let t=this.projectedModelLineLineCounts.getIndexOf(e-1),n=t.index,o=t.remainder;return new RK(n+1,o)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){let t=this.modelLineProjections[e.modelLineNumber-1],n=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),o=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new ke(e.modelLineNumber,o)}getModelEndPositionOfViewLine(e){let t=this.modelLineProjections[e.modelLineNumber-1],n=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),o=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new ke(e.modelLineNumber,o)}getViewLineInfosGroupedByModelRanges(e,t){let n=this.getViewLineInfo(e),o=this.getViewLineInfo(t),r=new Array,s=this.getModelStartPositionOfViewLine(n),a=new Array;for(let l=n.modelLineNumber;l<=o.modelLineNumber;l++){let c=this.modelLineProjections[l-1];if(c.isVisible()){let d=l===n.modelLineNumber?n.modelLineWrappedLineIdx:0,u=l===o.modelLineNumber?o.modelLineWrappedLineIdx+1:c.getViewLineCount();for(let h=d;h{if(f.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,f.forWrappedLinesAfterColumn).lineNumber>=d.modelLineWrappedLineIdx||f.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,f.forWrappedLinesBeforeOrAtColumn).lineNumberd.modelLineWrappedLineIdx)return}let m=this.convertModelPositionToViewPosition(d.modelLineNumber,f.horizontalLine.endColumn),y=this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,f.horizontalLine.endColumn);return y.lineNumber===d.modelLineWrappedLineIdx?new _p(f.visibleColumn,p,f.className,new v4(f.horizontalLine.top,m.column),-1,-1):y.lineNumber!!f))}}return s}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);let n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),r=[],s=[],a=[],l=n.lineNumber-1,c=o.lineNumber-1,d=null;for(let p=l;p<=c;p++){let m=this.modelLineProjections[p];if(m.isVisible()){let y=m.getViewLineNumberOfModelPosition(0,p===l?n.column:1),_=m.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(p+1)),v=_-y+1,b=0;v>1&&m.getViewLineMinColumn(this.model,p+1,_)===1&&(b=y===0?1:2),s.push(v),a.push(b),d===null&&(d=new ke(p+1,0))}else d!==null&&(r=r.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,p)),d=null)}d!==null&&(r=r.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,o.lineNumber)),d=null);let u=t-e+1,h=new Array(u),f=0;for(let p=0,m=r.length;pt&&(p=!0,f=t-r+1),u.getViewLinesData(this.model,c+1,h,f,r-e,n,l),r+=f,p)break}return l}validateViewPosition(e,t,n){e=this._toValidViewLineNumber(e);let o=this.projectedModelLineLineCounts.getIndexOf(e-1),r=o.index,s=o.remainder,a=this.modelLineProjections[r],l=a.getViewLineMinColumn(this.model,r+1,s),c=a.getViewLineMaxColumn(this.model,r+1,s);tc&&(t=c);let d=a.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new ke(r+1,d)).equals(n)?new ke(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)}validateViewRange(e,t){let n=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),o=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new O(n.lineNumber,n.column,o.lineNumber,o.column)}convertViewPositionToModelPosition(e,t){let n=this.getViewLineInfo(e),o=this.modelLineProjections[n.modelLineNumber-1].getModelColumnOfViewPosition(n.modelLineWrappedLineIdx,t);return this.model.validatePosition(new ke(n.modelLineNumber,o))}convertViewRangeToModelRange(e){let t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new O(t.lineNumber,t.column,n.lineNumber,n.column)}convertModelPositionToViewPosition(e,t,n=2,o=!1,r=!1){let s=this.model.validatePosition(new ke(e,t)),a=s.lineNumber,l=s.column,c=a-1,d=!1;if(r)for(;c0&&!this.modelLineProjections[c].isVisible();)c--,d=!0;if(c===0&&!this.modelLineProjections[c].isVisible())return new ke(o?0:1,1);let u=1+this.projectedModelLineLineCounts.getPrefixSum(c),h;return d?r?h=this.modelLineProjections[c].getViewPositionOfModelPosition(u,1,n):h=this.modelLineProjections[c].getViewPositionOfModelPosition(u,this.model.getLineMaxColumn(c+1),n):h=this.modelLineProjections[a-1].getViewPositionOfModelPosition(u,l,n),h}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){let n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return O.fromPositions(n)}else{let n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),o=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new O(n.lineNumber,n.column,o.lineNumber,o.column)}}getViewLineNumberOfModelPosition(e,t){let n=e-1;if(this.modelLineProjections[n].isVisible()){let r=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(r,t)}for(;n>0&&!this.modelLineProjections[n].isVisible();)n--;if(n===0&&!this.modelLineProjections[n].isVisible())return 1;let o=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(o,this.model.getLineMaxColumn(n+1))}getDecorationsInRange(e,t,n,o,r){let s=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),a=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(a.lineNumber-s.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new O(s.lineNumber,1,a.lineNumber,a.column),t,n,o,r);let l=[],c=s.lineNumber-1,d=a.lineNumber-1,u=null;for(let m=c;m<=d;m++)if(this.modelLineProjections[m].isVisible())u===null&&(u=new ke(m+1,m===c?s.column:1));else if(u!==null){let _=this.model.getLineMaxColumn(m);l=l.concat(this.model.getDecorationsInRange(new O(u.lineNumber,u.column,m,_),t,n,o)),u=null}u!==null&&(l=l.concat(this.model.getDecorationsInRange(new O(u.lineNumber,u.column,a.lineNumber,a.column),t,n,o)),u=null),l.sort((m,y)=>{let _=O.compareRangesUsingStarts(m.range,y.range);return _===0?m.idy.id?1:0:_});let h=[],f=0,p=null;for(let m of l){let y=m.id;p!==y&&(p=y,h[f++]=m)}return h}getInjectedTextAt(e){let t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){let n=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[n.modelLineNumber-1].normalizePosition(n.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){let t=this.getViewLineInfo(e);return t.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(t.modelLineNumber):0}};RK=class{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}},PK=class{constructor(e,t){this.modelRange=e,this.viewLines=t}},Nme=class{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,n,o){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,n,o)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}},OK=class{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new Ame(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,n,o){return!1}createLineBreaksComputer(){let e=[];return{addRequest:(t,n,o)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,n){return new Lx(t,n)}onModelLinesInserted(e,t,n,o){return new Ex(t,n)}onModelLineChanged(e,t,n){return[!1,new kM(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,n){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){let n=t-e+1,o=new Array(n);for(let r=0;rt)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}});var Mb,zK,GJe=P(()=>{Ca();Mb=lu.Right,zK=class{constructor(e){this.persist=0,this._requiredLanes=1,this.lanes=new Uint8Array(Math.ceil((e+1)*Mb/8))}reset(e){let t=Math.ceil((e+1)*Mb/8);this.lanes.length>>3]|=1<>>3]&1<>>3]&1<{Vi();Qi();sa();nt();Mn();Ri();Ks();OJe();s1();Mi();Kt();Tv();Pr();Zf();kme();cK();WJe();spe();ap();Tme();SK();qJe();GJe();hIt=!0,FK=class extends ue{constructor(e,t,n,o,r,s,a,l,c){if(super(),this.languageConfigurationService=a,this._themeService=l,this._attachedView=c,this.hiddenAreasModel=new Ome,this.previousHiddenAreas=[],this._editorId=e,this._configuration=t,this.model=n,this._eventDispatcher=new dK,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new f4(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new hn(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=Rme.create(this.model),this.glyphLanes=new zK(0),hIt&&this.model.isTooLargeForTokenization())this._lines=new OK(this.model);else{let d=this._configuration.options,u=d.get(50),h=d.get(137),f=d.get(144),p=d.get(136),m=d.get(128);this._lines=new AK(this._editorId,this.model,o,r,u,this.model.getOptions().tabSize,h,f.wrappingColumn,p,m)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new kK(n,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new EK(this._configuration,this.getLineCount(),s)),this._register(this.viewLayout.onDidScroll(d=>{d.scrollTopChanged&&this._handleVisibleLinesChanged(),d.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new oK(d)),this._eventDispatcher.emitOutgoingEvent(new fK(d.oldScrollWidth,d.oldScrollLeft,d.oldScrollHeight,d.oldScrollTop,d.scrollWidth,d.scrollLeft,d.scrollHeight,d.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(d=>{this._eventDispatcher.emitOutgoingEvent(d)})),this._decorations=new DK(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(d=>{try{let u=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(u,d)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(yb.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new aK)})),this._register(this._themeService.onDidColorThemeChange(d=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new rK(d))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){let e=this.viewLayout.getLinesViewportData(),t=new O(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){let e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){let e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new iK(e)),this._eventDispatcher.emitOutgoingEvent(new hK(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new QG)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new JG)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){let e=new ke(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new HK(t,this._viewportStart.startLineDelta)}return new HK(null,0)}_onConfigurationChanged(e,t){let n=this._captureStableViewport(),o=this._configuration.options,r=o.get(50),s=o.get(137),a=o.get(144),l=o.get(136),c=o.get(128);this._lines.setWrappingSettings(r,s,a.wrappingColumn,l,c)&&(e.emitViewEvent(new Db),e.emitViewEvent(new Tb),e.emitViewEvent(new w2(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(90)&&(this._decorations.reset(),e.emitViewEvent(new w2(null))),t.hasChanged(97)&&(this._decorations.reset(),e.emitViewEvent(new w2(null))),e.emitViewEvent(new eK(t)),this.viewLayout.onConfigurationChanged(t),n.recoverViewportStart(this.coordinatesConverter,this.viewLayout),f4.shouldRecreate(t)&&(this.cursorConfig=new f4(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(e=>{try{let n=this._eventDispatcher.beginEmitViewEvents(),o=!1,r=!1,s=e instanceof Dv?e.rawContentChangedEvent.changes:e.changes,a=e instanceof Dv?e.rawContentChangedEvent.versionId:null,l=this._lines.createLineBreaksComputer();for(let u of s)switch(u.changeType){case 4:{for(let h=0;h!m.ownerId||m.ownerId===this._editorId)),l.addRequest(f,p,null)}break}case 2:{let h=null;u.injectedText&&(h=u.injectedText.filter(f=>!f.ownerId||f.ownerId===this._editorId)),l.addRequest(u.detail,h,null);break}}let c=l.finalize(),d=new qc(c);for(let u of s)switch(u.changeType){case 1:{this._lines.onModelFlushed(),n.emitViewEvent(new Db),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),o=!0;break}case 3:{let h=this._lines.onModelLinesDeleted(a,u.fromLineNumber,u.toLineNumber);h!==null&&(n.emitViewEvent(h),this.viewLayout.onLinesDeleted(h.fromLineNumber,h.toLineNumber)),o=!0;break}case 4:{let h=d.takeCount(u.detail.length),f=this._lines.onModelLinesInserted(a,u.fromLineNumber,u.toLineNumber,h);f!==null&&(n.emitViewEvent(f),this.viewLayout.onLinesInserted(f.fromLineNumber,f.toLineNumber)),o=!0;break}case 2:{let h=d.dequeue(),[f,p,m,y]=this._lines.onModelLineChanged(a,u.lineNumber,h);r=f,p&&n.emitViewEvent(p),m&&(n.emitViewEvent(m),this.viewLayout.onLinesInserted(m.fromLineNumber,m.toLineNumber)),y&&(n.emitViewEvent(y),this.viewLayout.onLinesDeleted(y.fromLineNumber,y.toLineNumber));break}case 5:break}a!==null&&this._lines.acceptVersionId(a),this.viewLayout.onHeightMaybeChanged(),!o&&r&&(n.emitViewEvent(new Tb),n.emitViewEvent(new w2(null)),this._cursor.onLineMappingChanged(n),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}let t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){let n=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(n){let o=this.coordinatesConverter.convertModelPositionToViewPosition(n.getStartPosition()),r=this.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber);this.viewLayout.setScrollPosition({scrollTop:r+this._viewportStart.startLineDelta},1)}}try{let n=this._eventDispatcher.beginEmitViewEvents();e instanceof Dv&&n.emitOutgoingEvent(new CK(e.contentChangedEvent)),this._cursor.onModelContentChanged(n,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(e=>{let t=[];for(let n=0,o=e.ranges.length;n{this._eventDispatcher.emitSingleViewEvent(new nK),this.cursorConfig=new f4(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new yK(e))})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new f4(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new bK(e))})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{let t=this._eventDispatcher.beginEmitViewEvents();t.emitViewEvent(new Db),t.emitViewEvent(new Tb),t.emitViewEvent(new w2(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new f4(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new wK(e))})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new w2(e)),this._eventDispatcher.emitOutgoingEvent(new _K(e))}))}setHiddenAreas(e,t){var n;this.hiddenAreasModel.setHiddenAreas(t,e);let o=this.hiddenAreasModel.getMergedRanges();if(o===this.previousHiddenAreas)return;this.previousHiddenAreas=o;let r=this._captureStableViewport(),s=!1;try{let a=this._eventDispatcher.beginEmitViewEvents();s=this._lines.setHiddenAreas(o),s&&(a.emitViewEvent(new Db),a.emitViewEvent(new Tb),a.emitViewEvent(new w2(null)),this._cursor.onLineMappingChanged(a),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());let l=(n=r.viewportStartModelPosition)===null||n===void 0?void 0:n.lineNumber;l&&o.some(d=>d.startLineNumber<=l&&l<=d.endLineNumber)||r.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),s&&this._eventDispatcher.emitOutgoingEvent(new mK)}getVisibleRangesPlusViewportAboveBelow(){let e=this._configuration.options.get(143),t=this._configuration.options.get(66),n=Math.max(20,Math.round(e.height/t)),o=this.viewLayout.getLinesViewportData(),r=Math.max(1,o.completelyVisibleStartLineNumber-n),s=Math.min(this.getLineCount(),o.completelyVisibleEndLineNumber+n);return this._toModelVisibleRanges(new O(r,this.getLineMinColumn(r),s,this.getLineMaxColumn(s)))}getVisibleRanges(){let e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){let t=this.coordinatesConverter.convertViewRangeToModelRange(e),n=this._lines.getHiddenAreas();if(n.length===0)return[t];let o=[],r=0,s=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,c=t.endColumn;for(let d=0,u=n.length;dl||(s"u")return this._reduceRestoreStateCompatibility(e);let t=this.model.validatePosition(e.firstPosition),n=this.coordinatesConverter.convertModelPositionToViewPosition(t),o=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:o}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,n){this._viewportStart.update(this,e)}getActiveIndentGuide(e,t,n){return this._lines.getActiveIndentGuide(e,t,n)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,n,o){return this._lines.getViewLinesBracketGuides(e,t,n,o)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){let t=qr(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){let t=ql(this.getLineContent(e));return t===-1?0:t+2}getMinimapDecorationsInRange(e){return this._decorations.getMinimapDecorationsInRange(e)}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewportViewLineRenderingData(e,t){let o=this._decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return this._getViewLineRenderingData(t,o)}getViewLineRenderingData(e){let t=this._decorations.getInlineDecorationsOnLine(e);return this._getViewLineRenderingData(e,t)}_getViewLineRenderingData(e,t){let n=this.model.mightContainRTL(),o=this.model.mightContainNonBasicASCII(),r=this.getTabSize(),s=this._lines.getViewLineData(e);return s.inlineDecorations&&(t=[...t,...s.inlineDecorations.map(a=>a.toInlineDecoration(e))]),new Ed(s.minColumn,s.maxColumn,s.content,s.continuesWithWrappedLine,n,o,s.tokens,t,r,s.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,n){let o=this._lines.getViewLinesData(e,t,n);return new ij(this.getTabSize(),o)}getAllOverviewRulerDecorations(e){let t=this.model.getOverviewRulerDecorations(this._editorId,r5(this._configuration.options)),n=new Pme;for(let o of t){let r=o.options,s=r.overviewRuler;if(!s)continue;let a=s.position;if(a===0)continue;let l=s.getColor(e.value),c=this.coordinatesConverter.getViewLineNumberOfModelPosition(o.range.startLineNumber,o.range.startColumn),d=this.coordinatesConverter.getViewLineNumberOfModelPosition(o.range.endLineNumber,o.range.endColumn);n.accept(l,r.zIndex,c,d,a)}return n.asArray}_invalidateDecorationsColorCache(){let e=this.model.getOverviewRulerDecorations();for(let t of e){let n=t.options.overviewRuler;n?.invalidateCachedColor();let o=t.options.minimap;o?.invalidateCachedColor()}}getValueInRange(e,t){let n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(n,t)}getValueLengthInRange(e,t){let n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(n,t)}modifyPosition(e,t){let n=this.coordinatesConverter.convertViewPositionToModelPosition(e),o=this.model.modifyPosition(n,t);return this.coordinatesConverter.convertModelPositionToViewPosition(o)}deduceModelPositionRelativeToViewPosition(e,t,n){let o=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(t<0?t-=n:t+=n);let s=this.model.getOffsetAt(o)+t;return this.model.getPositionAt(s)}getPlainTextToCopy(e,t,n){let o=n?`\r +`:this.model.getEOL();e=e.slice(0),e.sort(O.compareRangesUsingStarts);let r=!1,s=!1;for(let l of e)l.isEmpty()?r=!0:s=!0;if(!s){if(!t)return"";let l=e.map(d=>d.startLineNumber),c="";for(let d=0;d0&&l[d-1]===l[d]||(c+=this.model.getLineContent(l[d])+o);return c}if(r&&t){let l=[],c=0;for(let d of e){let u=d.startLineNumber;d.isEmpty()?u!==c&&l.push(this.model.getLineContent(u)):l.push(this.model.getValueInRange(d,n?2:0)),c=u}return l.length===1?l[0]:l}let a=[];for(let l of e)l.isEmpty()||a.push(this.model.getValueInRange(l,n?2:0));return a.length===1?a[0]:a}getRichTextToCopy(e,t){let n=this.model.getLanguageId();if(n===ra||e.length!==1)return null;let o=e[0];if(o.isEmpty()){if(!t)return null;let d=o.startLineNumber;o=new O(d,this.model.getLineMinColumn(d),d,this.model.getLineMaxColumn(d))}let r=this._configuration.options.get(50),s=this._getColorMap(),l=/[:;\\\/<>]/.test(r.fontFamily)||r.fontFamily===ml.fontFamily,c;return l?c=ml.fontFamily:(c=r.fontFamily,c=c.replace(/"/g,"'"),/[,']/.test(c)||/[+ ]/.test(c)&&(c=`'${c}'`),c=`${c}, ${ml.fontFamily}`),{mode:n,html:`
`+this._getHTMLToCopy(o,s)+"
"}}_getHTMLToCopy(e,t){let n=e.startLineNumber,o=e.startColumn,r=e.endLineNumber,s=e.endColumn,a=this.getTabSize(),l="";for(let c=n;c<=r;c++){let d=this.model.tokenization.getLineTokens(c),u=d.getLineContent(),h=c===n?o-1:0,f=c===r?s-1:u.length;u===""?l+="
":l+=BJe(u,d.inflate(),t,h,f,a,hr)}return l}_getColorMap(){let e=Eo.getColorMap(),t=["#000000"];if(e)for(let n=1,o=e.length;nthis._cursor.setStates(o,e,t,n))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,n=0){this._withViewEventsCollector(o=>this._cursor.setSelections(o,e,t,n))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new vK);return}this._withViewEventsCollector(e)}executeEdits(e,t,n){this._executeCursorEdit(o=>this._cursor.executeEdits(o,e,t,n))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(n=>this._cursor.type(n,e,t))}compositionType(e,t,n,o,r){this._executeCursorEdit(s=>this._cursor.compositionType(s,e,t,n,o,r))}paste(e,t,n,o){this._executeCursorEdit(r=>this._cursor.paste(r,e,t,n,o))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(n=>this._cursor.executeCommand(n,e,t))}executeCommands(e,t){this._executeCursorEdit(n=>this._cursor.executeCommands(n,e,t))}revealPrimaryCursor(e,t,n=!1){this._withViewEventsCollector(o=>this._cursor.revealPrimary(o,e,n,0,t,0))}revealTopMostCursor(e){let t=this._cursor.getTopMostViewPosition(),n=new O(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(o=>o.emitViewEvent(new Mv(e,!1,n,null,0,!0,0)))}revealBottomMostCursor(e){let t=this._cursor.getBottomMostViewPosition(),n=new O(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(o=>o.emitViewEvent(new Mv(e,!1,n,null,0,!0,0)))}revealRange(e,t,n,o,r){this._withViewEventsCollector(s=>s.emitViewEvent(new Mv(e,!1,n,null,o,t,r)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new lK),this._eventDispatcher.emitOutgoingEvent(new pK))}_withViewEventsCollector(e){try{let t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}},Rme=class i{static create(e){let t=e._setTrackedRange(null,new O(1,1,1,1),1);return new i(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,n,o,r){this._model=e,this._viewLineNumber=t,this._isValid=n,this._modelTrackedRange=o,this._startLineDelta=r}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){let n=e.coordinatesConverter.convertViewPositionToModelPosition(new ke(t,e.getLineMinColumn(t))),o=e.model._setTrackedRange(this._modelTrackedRange,new O(n.lineNumber,n.column,n.lineNumber,n.column),1),r=e.viewLayout.getVerticalOffsetForLineNumber(t),s=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=o,this._startLineDelta=s-r}invalidate(){this._isValid=!1}},Pme=class{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,n,o,r){let s=this._asMap[e];if(s){let a=s.data,l=a[a.length-3],c=a[a.length-1];if(l===r&&c+1>=n){o>c&&(a[a.length-1]=o);return}a.push(r,n,o)}else{let a=new W5(e,t,[r,n,o]);this._asMap[e]=a,this.asArray.push(a)}}},Ome=class{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){let n=this.hiddenAreas.get(e);n&&KJe(n,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;let e=Array.from(this.hiddenAreas.values()).reduce((t,n)=>fIt(t,n),[]);return KJe(this.ranges,e)?this.ranges:(this.ranges=e,this.ranges)}};HK=class{constructor(e,t){this.viewportStartModelPosition=e,this.startLineDelta=t}recoverViewportStart(e,t){if(!this.viewportStartModelPosition)return;let n=e.convertModelPositionToViewPosition(this.viewportStartModelPosition),o=t.getVerticalOffsetForLineNumber(n.lineNumber);t.setScrollPosition({scrollTop:o+this.startLineDelta},1)}}});var wp,Ix=P(()=>{wp=class{constructor(...e){this._entries=new Map;for(let[t,n]of e)this.set(t,n)}set(e,t){let n=this._entries.get(e);return this._entries.set(e,t),n}get(e){return this._entries.get(e)}}});var DM,lr,C4=P(()=>{Ri();(function(i){i[i.Ignore=0]="Ignore",i[i.Info=1]="Info",i[i.Warning=2]="Warning",i[i.Error=3]="Error"})(DM||(DM={}));(function(i){let e="error",t="warning",n="warn",o="info",r="ignore";function s(l){return l?G0(e,l)?i.Error:G0(t,l)||G0(n,l)?i.Warning:G0(o,l)?i.Info:i.Ignore:i.Ignore}i.fromValue=s;function a(l){switch(l){case i.Error:return e;case i.Warning:return t;case i.Info:return o;default:return r}}i.toString=a})(DM||(DM={}));lr=DM});var Nv,xo,BK,ic=P(()=>{C4();_i();Nv=lr,xo=vi("notificationService"),BK=class{}});function ZJe(i){return i==null?!0:i===Gh.Right||i===Gh.Both}function XJe(i){return i==null?!0:i===Gh.Left||i===Gh.Both}var w4,Mx,zme=P(()=>{um();Mi();Ca();w4=class{constructor(e,t,n,o,r){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=n,this.breakOffsetsVisibleColumn=o,this.wrappedTextIndentLength=r}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){let t=e>0?this.breakOffsets[e-1]:0,o=this.breakOffsets[e]-t;return e>0&&(o+=this.wrappedTextIndentLength),o}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let o=e===0?t:this.breakOffsets[e-1]+t;if(this.injectionOffsets!==null)for(let r=0;rthis.injectionOffsets[r];r++)o0?this.breakOffsets[r-1]:0,t===0)if(e<=s)o=r-1;else if(e>l)n=r+1;else break;else if(e=l)n=r+1;else break}let a=e-s;return r>0&&(a+=this.wrappedTextIndentLength),new Mx(r,a)}normalizeOutputPosition(e,t,n){if(this.injectionOffsets!==null){let o=this.outputPositionToOffsetInInputWithInjections(e,t),r=this.normalizeOffsetInInputWithInjectionsAroundInjections(o,n);if(r!==o)return this.offsetInInputWithInjectionsToOutputPosition(r,n)}if(n===0){if(e>0&&t===this.getMinOutputOffset(e))return new Mx(e-1,this.getMaxOutputOffset(e-1))}else if(n===1){let o=this.getOutputLineCount()-1;if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){let n=this.getInjectedTextAtOffset(e);if(!n)return e;if(t===2){if(e===n.offsetInInputWithInjections+n.length&&ZJe(this.injectionOptions[n.injectedTextIndex].cursorStops))return n.offsetInInputWithInjections+n.length;{let o=n.offsetInInputWithInjections;if(XJe(this.injectionOptions[n.injectedTextIndex].cursorStops))return o;let r=n.injectedTextIndex-1;for(;r>=0&&this.injectionOffsets[r]===this.injectionOffsets[n.injectedTextIndex]&&!(ZJe(this.injectionOptions[r].cursorStops)||(o-=this.injectionOptions[r].content.length,XJe(this.injectionOptions[r].cursorStops)));)r--;return o}}else if(t===1||t===4){let o=n.offsetInInputWithInjections+n.length,r=n.injectedTextIndex;for(;r+1=0&&this.injectionOffsets[r-1]===this.injectionOffsets[r];)o-=this.injectionOptions[r-1].content.length,r--;return o}O3(t)}getInjectedText(e,t){let n=this.outputPositionToOffsetInInputWithInjections(e,t),o=this.getInjectedTextAtOffset(n);return o?{options:this.injectionOptions[o.injectedTextIndex]}:null}getInjectedTextAtOffset(e){let t=this.injectionOffsets,n=this.injectionOptions;if(t!==null){let o=0;for(let r=0;re)break;if(e<=l)return{injectedTextIndex:r,offsetInInputWithInjections:a,length:s};o+=s}}}};Mx=class{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new ke(e+this.outputLineIndex,this.outputOffset+1)}}});function pIt(i,e,t,n,o,r,s,a){if(o===-1)return null;let l=t.length;if(l<=1)return null;let c=a==="keepAll",d=e.breakOffsets,u=e.breakOffsetsVisibleColumn,h=JJe(t,n,o,r,s),f=o-h,p=Hme,m=Bme,y=0,_=0,v=0,b=o,C=d.length,w=0;if(w>=0){let S=Math.abs(u[w]-b);for(;w+1=S)break;S=x,w++}}for(;wS&&(S=_,x=v);let k=0,D=0,E=0,A=0;if(x<=b){let L=x,I=S===0?0:t.charCodeAt(S-1),M=S===0?0:i.get(I),N=!0;for(let z=S;z_&&Vme(I,M,V,ie,c)&&(k=F,D=L),L+=fe,L>b){F>_?(E=F,A=L-fe):(E=z+1,A=L),L-D>f&&(k=0),N=!1;break}I=V,M=ie}if(N){y>0&&(p[y]=d[d.length-1],m[y]=u[d.length-1],y++);break}}if(k===0){let L=x,I=t.charCodeAt(S),M=i.get(I),N=!1;for(let z=S-1;z>=_;z--){let F=z+1,V=t.charCodeAt(z);if(V===9){N=!0;break}let ie,fe;if(Ng(V)?(z--,ie=0,fe=2):(ie=i.get(V),fe=Bf(V)?r:1),L<=b){if(E===0&&(E=F,A=L),L<=b-f)break;if(Vme(V,ie,I,M,c)){k=F,D=L;break}}L-=fe,I=V,M=ie}if(k!==0){let z=f-(A-D);if(z<=n){let F=t.charCodeAt(E),V;Or(F)?V=2:V=TM(F,A,n,r),z-V<0&&(k=0)}}if(N){w--;continue}}if(k===0&&(k=E,D=A),k<=_){let L=t.charCodeAt(_);Or(L)?(k=_+2,D=v+2):(k=_+1,D=v+TM(L,v,n,r))}for(_=k,p[y]=k,v=D,m[y]=D,y++,b=D+f;w<0||w=T)break;T=L,w++}}return y===0?null:(p.length=y,m.length=y,Hme=e.breakOffsets,Bme=e.breakOffsetsVisibleColumn,e.breakOffsets=p,e.breakOffsetsVisibleColumn=m,e.wrappedTextIndentLength=h,e)}function mIt(i,e,t,n,o,r,s,a){let l=fh.applyInjectedText(e,t),c,d;if(t&&t.length>0?(c=t.map(D=>D.options),d=t.map(D=>D.column-1)):(c=null,d=null),o===-1)return c?new w4(d,c,[l.length],[],0):null;let u=l.length;if(u<=1)return c?new w4(d,c,[l.length],[],0):null;let h=a==="keepAll",f=JJe(l,n,o,r,s),p=o-f,m=[],y=[],_=0,v=0,b=0,C=o,w=l.charCodeAt(0),S=i.get(w),x=TM(w,0,n,r),k=1;Or(w)&&(x+=1,w=l.charCodeAt(1),S=i.get(w),k++);for(let D=k;DC&&((v===0||x-b>p)&&(v=E,b=x-L),m[_]=v,y[_]=b,_++,C=b+p,v=0),w=A,S=T}return _===0&&(!t||t.length===0)?null:(m[_]=u,y[_]=x,new w4(d,c,m,y,f))}function TM(i,e,t,n){return i===9?t-e%t:Bf(i)||i<32?n:1}function QJe(i,e){return e-i%e}function Vme(i,e,t,n,o){return t!==32&&(e===2&&n!==2||e!==1&&n===1||!o&&e===3&&n!==2||!o&&n===3&&e!==1)}function JJe(i,e,t,n,o){let r=0;if(o!==0){let s=qr(i);if(s!==-1){for(let l=0;lt&&(r=0)}}return r}var VK,Fme,Hme,Bme,eet=P(()=>{Ri();A5();Tv();zme();VK=class i{static create(e){return new i(e.get(132),e.get(131))}constructor(e,t){this.classifier=new Fme(e,t)}createLineBreaksComputer(e,t,n,o,r){let s=[],a=[],l=[];return{addRequest:(c,d,u)=>{s.push(c),a.push(d),l.push(u)},finalize:()=>{let c=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,d=[];for(let u=0,h=s.length;u=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}},Hme=[],Bme=[]});function gIt(i,e,t,n,o,r,s,a){var l;function c(E){let A=a[E];if(A){let T=fh.applyInjectedText(e[E],A),L=A.map(M=>M.options),I=A.map(M=>M.column-1);return new w4(I,L,[T.length],[],0)}else return null}if(o===-1){let E=[];for(let A=0,T=e.length;Ad?(T=0,L=0):I=d-z}let M=A.substr(T),N=vIt(M,L,n,I,m,f);y[E]=T,_[E]=L,v[E]=M,b[E]=N[0],C[E]=N[1]}let w=m.build(),S=(l=Wme?.createHTML(w))!==null&&l!==void 0?l:w;p.innerHTML=S,p.style.position="absolute",p.style.top="10000",s==="keepAll"?(p.style.wordBreak="keep-all",p.style.overflowWrap="anywhere"):(p.style.wordBreak="inherit",p.style.overflowWrap="break-word"),i.document.body.appendChild(p);let x=document.createRange(),k=Array.prototype.slice.call(p.children,0),D=[];for(let E=0;Eie.options),F=V.map(ie=>ie.column-1)):(z=null,F=null),D[E]=new w4(F,z,T,N,I)}return i.document.body.removeChild(p),D}function vIt(i,e,t,n,o,r){if(r!==0){let h=String(r);o.appendString('
');let s=i.length,a=e,l=0,c=[],d=[],u=0");for(let h=0;h"),c[h]=l,d[h]=a;let f=u;u=h+1"),c[i.length]=l,d[i.length]=a,o.appendString("
"),[c,d]}function _It(i,e,t,n){if(t.length<=1)return null;let o=Array.prototype.slice.call(e.children,0),r=[];try{$me(i,o,n,0,null,t.length-1,null,r)}catch(s){return console.log(s),null}return r.length===0?null:(r.push(t.length),r)}function $me(i,e,t,n,o,r,s,a){if(n===r||(o=o||Ume(i,e,t[n],t[n+1]),s=s||Ume(i,e,t[r],t[r+1]),Math.abs(o[0].top-s[0].top)<=.1))return;if(n+1===r){a.push(r);return}let l=n+(r-n)/2|0,c=Ume(i,e,t[l],t[l+1]);$me(i,e,t,n,o,l,c,a),$me(i,e,t,l,c,r,s,a)}function Ume(i,e,t,n){return i.setStart(e[t/16384|0].firstChild,t%16384),i.setEnd(e[n/16384|0].firstChild,n%16384),i.getClientRects()}var Wme,WK,tet=P(()=>{Vg();Ri();ho();Vf();J0();zme();Tv();Wme=td("domLineBreaksComputer",{createHTML:i=>i}),WK=class i{static create(e){return new i(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,t,n,o,r){let s=[],a=[];return{addRequest:(l,c,d)=>{s.push(l),a.push(c)},finalize:()=>gIt(X1(this.targetWindow.deref()),s,e,t,n,o,r,a)}}}});var UK,iet=P(()=>{Qt();Pi();nt();UK=class extends ue{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new L3),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,n){this._editor=e,this._instantiationService=n;for(let o of t){if(this._pending.has(o.id)){hi(new Error(`Cannot have two contributions with the same id ${o.id}`));continue}this._pending.set(o.id,o)}this._instantiateSome(0),this._register(S5(pi(this._editor.getDomNode()),()=>{this._instantiateSome(1)})),this._register(S5(pi(this._editor.getDomNode()),()=>{this._instantiateSome(2)})),this._register(S5(pi(this._editor.getDomNode()),()=>{this._instantiateSome(3)},5e3))}saveViewState(){let e={};for(let[t,n]of this._instances)typeof n.saveViewState=="function"&&(e[t]=n.saveViewState());return e}restoreViewState(e){for(let[t,n]of this._instances)typeof n.restoreViewState=="function"&&n.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){var e;this._register(S5(pi((e=this._editor)===null||e===void 0?void 0:e.getDomNode()),()=>{this._instantiateSome(1)},50))}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;let t=this._findPendingContributionsByInstantiation(e);for(let n of t)this._instantiateById(n.id)}_findPendingContributionsByInstantiation(e){let t=[];for(let[,n]of this._pending)n.instantiation===e&&t.push(n);return t}_instantiateById(e){let t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{let n=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,n),typeof n.restoreViewState=="function"&&t.instantiation!==0&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(n){hi(n)}}}}});function jme(i){return CIt+encodeURIComponent(i.toString())+wIt}function kIt(i){return xIt+encodeURIComponent(i.toString())+SIt}var bIt,x4,Nb,yIt,qme,S4,$K,nc,Gme,Kme,Yme,Zme,CIt,wIt,xIt,SIt,IM=P(()=>{jKe();qKe();Wt();Qt();Pi();Xt();nt();Nc();ZKe();an();fs();AQe();q1e();Ks();mp();Mi();Kt();zo();vpe();dI();Co();ea();r1();pr();YJe();$o();Xi();_i();Ix();ic();No();Yh();eet();tet();RI();Kr();Vf();Yn();iet();cj();bIt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},x4=function(i,e){return function(t,n){e(t,n,i)}},yIt=0,qme=class{constructor(e,t,n,o,r,s){this.model=e,this.viewModel=t,this.view=n,this.hasRealView=o,this.listenersToRemove=r,this.attachedView=s}dispose(){Nn(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}},S4=Nb=class extends ue{get isSimpleWidget(){return this._configuration.isSimpleWidget}constructor(e,t,n,o,r,s,a,l,c,d,u,h){var f;super(),this.languageConfigurationService=u,this._deliveryQueue=Bje(),this._contributions=this._register(new UK),this._onDidDispose=this._register(new ge),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onWillChangeModel=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onWillChangeModel=this._onWillChangeModel.event,this._onDidChangeModel=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new nc(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new $K({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new $K({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new nc(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new nc(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new nc(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new nc(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new nc(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new nc(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new nc(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new nc(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new nc(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new nc(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new nc(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new nc(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new nc(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new nc(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new nc(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new nc(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new nc(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new ge({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),r.willCreateCodeEditor();let p={...t};this._domElement=e,this._overflowWidgetsDomNode=p.overflowWidgetsDomNode,delete p.overflowWidgetsDomNode,this._id=++yIt,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=n.telemetryData,this._configuration=this._register(this._createConfiguration(n.isSimpleWidget||!1,p,d)),this._register(this._configuration.onDidChange(_=>{this._onDidChangeConfiguration.fire(_);let v=this._configuration.options;if(_.hasChanged(143)){let b=v.get(143);this._onDidLayoutChange.fire(b)}})),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=c,this._codeEditorService=r,this._commandService=s,this._themeService=l,this._register(new Gme(this,this._contextKeyService)),this._register(new Kme(this,this._contextKeyService,h)),this._instantiationService=o.createChild(new wp([ri,this._contextKeyService])),this._modelData=null,this._focusTracker=new Yme(e,this._overflowWidgetsDomNode),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let m;Array.isArray(n.contributions)?m=n.contributions:m=j3.getEditorContributions(),this._contributions.initialize(this,m,this._instantiationService);for(let _ of j3.getEditorActions()){if(this._actions.has(_.id)){hi(new Error(`Cannot have two actions with the same id ${_.id}`));continue}let v=new ux(_.id,_.label,_.alias,_.metadata,(f=_.precondition)!==null&&f!==void 0?f:void 0,b=>this._instantiationService.invokeFunction(C=>Promise.resolve(_.runEditorCommand(C,this,b))),this._contextKeyService);this._actions.set(v.id,v)}let y=()=>!this._configuration.options.get(90)&&this._configuration.options.get(36).enabled;this._register(new JU(this._domElement,{onDragOver:_=>{if(!y())return;let v=this.getTargetAtClientPoint(_.clientX,_.clientY);v?.position&&this.showDropIndicatorAt(v.position)},onDrop:async _=>{if(!y()||(this.removeDropIndicator(),!_.dataTransfer))return;let v=this.getTargetAtClientPoint(_.clientX,_.clientY);v?.position&&this._onDropIntoEditor.fire({position:v.position,event:_})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){var t;(t=this._modelData)===null||t===void 0||t.view.writeScreenReaderContent(e)}_createConfiguration(e,t,n){return new dj(e,t,this._domElement,n)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return s4.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?la.getWordAtPosition(this._modelData.model,this._configuration.options.get(129),e):null}getValue(e=null){if(!this._modelData)return"";let t=!!(e&&e.preserveBOM),n=0;return e&&e.lineEnding&&e.lineEnding===` `?n=1:e&&e.lineEnding&&e.lineEnding===`\r -`&&(n=2),this._modelData.model.getValue(n,t)}setValue(e){this._modelData&&this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){var t;let n=e;if(this._modelData===null&&n===null||this._modelData&&this._modelData.model===n)return;let o={oldModelUrl:((t=this._modelData)===null||t===void 0?void 0:t.model.uri)||null,newModelUrl:n?.uri||null};this._onWillChangeModel.fire(o);let r=this.hasTextFocus(),s=this._detachModel();this._attachModel(n),r&&this.hasModel()&&this.focus(),this._removeDecorationTypes(),this._onDidChangeModel.fire(o),this._postDetachModelCleanup(s),this._contributions.onAfterModelAttached()}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let e in this._decorationTypeSubtypes){let t=this._decorationTypeSubtypes[e];for(let n in t)this._removeDecorationType(e+"-"+n)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,n,o){let r=e.model.validatePosition({lineNumber:t,column:n}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(r);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(s.lineNumber,o)}getTopForLineNumber(e,t=!1){return this._modelData?Nb._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?Nb._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,n,o=!1){let r=e.model.validatePosition({lineNumber:t,column:n}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(r);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber,o)}getBottomForLineNumber(e,t=!1){return this._modelData?Nb._getVerticalOffsetAfterPosition(this._modelData,e,1,t):-1}setHiddenAreas(e,t){var n;(n=this._modelData)===null||n===void 0||n.viewModel.setHiddenAreas(e.map(o=>O.lift(o)),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;let t=this._modelData.model.validatePosition(e),n=this._modelData.model.getOptions().tabSize;return mr.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,n)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!ke.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,n,o){if(!this._modelData)return;if(!O.isIRange(e))throw new Error("Invalid arguments");let r=this._modelData.model.validateRange(e),s=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(r);this._modelData.viewModel.revealRange("api",n,s,t,o)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,n){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new O(e,1,e,1),t,!1,n)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,n,o){if(!ke.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new O(e.lineNumber,e.column,e.lineNumber,e.column),t,n,o)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){let n=jt.isISelection(e),o=O.isIRange(e);if(!n&&!o)throw new Error("Invalid arguments");if(n)this._setSelectionImpl(e,t);else if(o){let r={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(r,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;let n=new jt(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[n])}revealLines(e,t,n=0){this._revealLines(e,t,0,n)}revealLinesInCenter(e,t,n=0){this._revealLines(e,t,1,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._revealLines(e,t,2,n)}revealLinesNearTop(e,t,n=0){this._revealLines(e,t,5,n)}_revealLines(e,t,n,o){if(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new O(e,1,t,1),n,!1,o)}revealRange(e,t=0,n=!1,o=!0){this._revealRange(e,n?1:0,o,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,n,o){if(!O.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(O.lift(e),t,n,o)}setSelections(e,t="api",n=0){if(this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let o=0,r=e.length;o0&&this._modelData.viewModel.restoreCursorState(n):this._modelData.viewModel.restoreCursorState([n]),this._contributions.restoreViewState(t.contributionsState||{});let o=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(o)}}handleInitialized(){var e;(e=this._getViewModel())===null||e===void 0||e.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter(t=>t.isSupported()),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,n){switch(n=n||{},t){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{let r=n;this._type(e,r.text||"");return}case"replacePreviousChar":{let r=n;this._compositionType(e,r.text||"",r.replaceCharCnt||0,0,0);return}case"compositionType":{let r=n;this._compositionType(e,r.text||"",r.replacePrevCharCnt||0,r.replaceNextCharCnt||0,r.positionDelta||0);return}case"paste":{let r=n;this._paste(e,r.text||"",r.pasteOnNewLine||!1,r.multicursorText||null,r.mode||null);return}case"cut":this._cut(e);return}let o=this.getAction(t);if(o){Promise.resolve(o.run(n)).then(void 0,hi);return}this._modelData&&(this._triggerEditorCommand(e,t,n)||this._triggerCommand(t,n))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){!this._modelData||t.length===0||(e==="keyboard"&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),e==="keyboard"&&this._onDidType.fire(t))}_compositionType(e,t,n,o,r){this._modelData&&this._modelData.viewModel.compositionType(t,n,o,r,e)}_paste(e,t,n,o,r){if(!this._modelData||t.length===0)return;let s=this._modelData.viewModel,a=s.getSelection().getStartPosition();s.paste(t,n,o,e);let l=s.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({range:new O(a.lineNumber,a.column,l.lineNumber,l.column),languageId:r})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,n){let o=$3.getEditorCommand(t);return o?(n=n||{},n.source=e,this._instantiationService.invokeFunction(r=>{Promise.resolve(o.runEditorCommand(r,this,n)).then(void 0,hi)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(90)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(90)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,n){if(!this._modelData||this._configuration.options.get(90))return!1;let o;return n?Array.isArray(n)?o=()=>n:o=n:o=()=>null,this._modelData.viewModel.executeEdits(e,t,o),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new Zme(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,r5(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,r5(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?e.length===0&&t.length===0?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){!this._modelData||e.length===0||this._modelData.model.changeDecorations(t=>{t.deltaDecorations(e,[])})}removeDecorationsByType(e){let t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(143)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,t=!1){this._configuration.observeContainer(e),t||this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){let t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){let t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){let n=this._contentWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(n)}}removeContentWidget(e){let t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){let n=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(n)}}addOverlayWidget(e){let t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){let t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){let n=this._overlayWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(n)}}removeOverlayWidget(e){let t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){let n=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(n)}}addGlyphMarginWidget(e){let t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){let t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){let n=this._glyphMarginWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(n)}}removeGlyphMarginWidget(e){let t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){let n=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(n)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,t)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;let t=this._modelData.model.validatePosition(e),n=this._configuration.options,o=n.get(143),r=Nb._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),s=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+o.glyphMarginWidth+o.lineNumbersWidth+o.decorationsWidth-this.getScrollLeft();return{top:r,left:s,height:n.get(66)}}getOffsetForColumn(e,t){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,t)}render(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,e)}setAriaOptions(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(e)}applyFontInfo(e){Gr(e,this._configuration.options.get(50))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}let t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());let n=e.onBeforeAttached(),o=new PK(this._id,this._configuration,e,HK.create(pi(this._domElement)),FK.create(this._configuration.options),a=>za(pi(this._domElement),a),this.languageConfigurationService,this._themeService,n);t.push(e.onWillDispose(()=>this.setModel(null))),t.push(o.onEvent(a=>{switch(a.kind){case 0:this._onDidContentSizeChange.fire(a);break;case 1:this._editorTextFocus.setValue(a.hasFocus);break;case 2:this._onDidScrollChange.fire(a);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(a.reachedMaxCursorCount){let u=this.getOption(79),h=g("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",u);this._notificationService.prompt(Mv.Warning,h,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:g("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}let l=[];for(let u=0,h=a.selections.length;u{this._paste("keyboard",r,s,a,l)},type:r=>{this._type("keyboard",r)},compositionType:(r,s,a,l)=>{this._compositionType("keyboard",r,s,a,l)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:t={paste:(r,s,a,l)=>{let c={text:r,pasteOnNewLine:s,multicursorText:a,mode:l};this._commandService.executeCommand("paste",c)},type:r=>{let s={text:r};this._commandService.executeCommand("type",s)},compositionType:(r,s,a,l)=>{if(a||l){let c={text:r,replacePrevCharCnt:s,replaceNextCharCnt:a,positionDelta:l};this._commandService.executeCommand("compositionType",c)}else{let c={text:r,replaceCharCnt:s};this._commandService.executeCommand("replacePreviousChar",c)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};let n=new rx(e.coordinatesConverter);return n.onKeyDown=r=>this._onKeyDown.fire(r),n.onKeyUp=r=>this._onKeyUp.fire(r),n.onContextMenu=r=>this._onContextMenu.fire(r),n.onMouseMove=r=>this._onMouseMove.fire(r),n.onMouseLeave=r=>this._onMouseLeave.fire(r),n.onMouseDown=r=>this._onMouseDown.fire(r),n.onMouseUp=r=>this._onMouseUp.fire(r),n.onMouseDrag=r=>this._onMouseDrag.fire(r),n.onMouseDrop=r=>this._onMouseDrop.fire(r),n.onMouseDropCanceled=r=>this._onMouseDropCanceled.fire(r),n.onMouseWheel=r=>this._onMouseWheel.fire(r),[new mG(t,this._configuration,this._themeService.getColorTheme(),e,n,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){e?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;let e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}showDropIndicatorAt(e){let t=[{range:new O(e.lineNumber,e.column,e.lineNumber,e.column),options:Nb.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,t){this._contextKeyService.createKey(e,t)}};S4.dropIntoEditorDecorationOptions=zi.register({description:"workbench-dnd-target",className:"dnd-target"});S4=Nb=bIt([x4(3,qt),x4(4,tn),x4(5,eo),x4(6,ri),x4(7,Mo),x4(8,xo),x4(9,Ba),x4(10,An),x4(11,Rt)],S4);VK=class extends ue{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new ge(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new ge(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){let t=e?2:1;this._value!==t&&(this._value=t,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}},nc=class extends ge{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}},Gme=class extends ue{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=re.editorSimpleInput.bindTo(t),this._editorFocus=re.focus.bindTo(t),this._textInputFocus=re.textInputFocus.bindTo(t),this._editorTextFocus=re.editorTextFocus.bindTo(t),this._tabMovesFocus=re.tabMovesFocus.bindTo(t),this._editorReadonly=re.readOnly.bindTo(t),this._inDiffEditor=re.inDiffEditor.bindTo(t),this._editorColumnSelection=re.columnSelection.bindTo(t),this._hasMultipleSelections=re.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=re.hasNonEmptySelection.bindTo(t),this._canUndo=re.canUndo.bindTo(t),this._canRedo=re.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(c4.onDidChangeTabFocus(n=>this._tabMovesFocus.set(n))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){let e=this._editor.getOptions();this._tabMovesFocus.set(c4.getTabFocusMode()),this._editorReadonly.set(e.get(90)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){let e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(t=>!t.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){let e=this._editor.getModel();this._canUndo.set(!!(e&&e.canUndo())),this._canRedo.set(!!(e&&e.canRedo()))}},Kme=class extends ue{constructor(e,t,n){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=n,this._langId=re.languageId.bindTo(t),this._hasCompletionItemProvider=re.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=re.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=re.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=re.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=re.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=re.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=re.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=re.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=re.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=re.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=re.hasReferenceProvider.bindTo(t),this._hasRenameProvider=re.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=re.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=re.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=re.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=re.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=re.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=re.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=re.isInWalkThroughSnippet.bindTo(t);let o=()=>this._update();this._register(e.onDidChangeModel(o)),this._register(e.onDidChangeModelLanguage(o)),this._register(n.completionProvider.onDidChange(o)),this._register(n.codeActionProvider.onDidChange(o)),this._register(n.codeLensProvider.onDidChange(o)),this._register(n.definitionProvider.onDidChange(o)),this._register(n.declarationProvider.onDidChange(o)),this._register(n.implementationProvider.onDidChange(o)),this._register(n.typeDefinitionProvider.onDidChange(o)),this._register(n.hoverProvider.onDidChange(o)),this._register(n.documentHighlightProvider.onDidChange(o)),this._register(n.documentSymbolProvider.onDidChange(o)),this._register(n.referenceProvider.onDidChange(o)),this._register(n.renameProvider.onDidChange(o)),this._register(n.documentFormattingEditProvider.onDidChange(o)),this._register(n.documentRangeFormattingEditProvider.onDidChange(o)),this._register(n.signatureHelpProvider.onDidChange(o)),this._register(n.inlayHintsProvider.onDidChange(o)),o()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()})}_update(){let e=this._editor.getModel();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===$i.walkThroughSnippet)})}},Yme=class extends ue{constructor(e,t){super(),this._onChange=this._register(new ge),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(Kl(e)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus(()=>{this._hasDomElementFocus=!0,this._update()})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasDomElementFocus=!1,this._update()})),t&&(this._overflowWidgetsDomNode=this._register(Kl(t)),this._register(this._overflowWidgetsDomNode.onDidFocus(()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()})),this._register(this._overflowWidgetsDomNode.onDidBlur(()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()})))}_update(){let e=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==e&&(this._hadFocus=e,this._onChange.fire(void 0))}hasFocus(){var e;return(e=this._hadFocus)!==null&&e!==void 0?e:!1}},Zme=class{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,n){return this._editor.onDidChangeModelDecorations(o=>{this._isChangingDecorations||e.call(t,o)},n)}getRange(e){return!this._editor.hasModel()||e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e])}getRanges(){if(!this._editor.hasModel())return[];let e=this._editor.getModel(),t=[];for(let n of this._decorationIds){let o=e.getDecorationRange(n);o&&t.push(o)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations(t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)})}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let t=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations(n=>{t=n.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(t)})}finally{this._isChangingDecorations=!1}return t}},CIt=encodeURIComponent("");xIt=encodeURIComponent('');Qs((i,e)=>{let t=i.getColor(lp);t&&e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${jme(t)}") repeat-x bottom left; }`);let n=i.getColor(Ll);n&&e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${jme(n)}") repeat-x bottom left; }`);let o=i.getColor(Ql);o&&e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${jme(o)}") repeat-x bottom left; }`);let r=i.getColor(SYe);r&&e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${kIt(r)}") no-repeat bottom left; }`);let s=i.getColor(uXe);s&&e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${s.rgba.a}; }`)})});var LIt,EIt,WK,net=P(()=>{Xt();nt();Hh();No();LIt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},EIt=function(i,e){return function(t,n){e(t,n,i)}},WK=class extends ue{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new ge),this._onCodeEditorAdd=this._register(new ge),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new ge),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new ge),this._onDiffEditorAdd=this._register(new ge),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new ge),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new $r,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null,t=this.listCodeEditors();for(let n of t){if(n.hasTextFocus())return n;n.hasWidgetFocus()&&(e=n)}return e}removeDecorationType(e){let t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(n=>n.removeDecorationsByType(e))))}setModelProperty(e,t,n){let o=e.toString(),r;this._modelProperties.has(o)?r=this._modelProperties.get(o):(r=new Map,this._modelProperties.set(o,r)),r.set(t,n)}getModelProperty(e,t){let n=e.toString();if(this._modelProperties.has(n))return this._modelProperties.get(n).get(t)}async openCodeEditor(e,t,n){for(let o of this._codeEditorOpenHandlers){let r=await o(e,t,n);if(r!==null)return r}return null}registerCodeEditorOpenHandler(e){let t=this._codeEditorOpenHandlers.unshift(e);return Yt(t)}};WK=LIt([EIt(0,Mo)],WK)});var DIt,oet,MM,Xme=P(()=>{Qt();Nc();net();fs();Xi();xl();No();DIt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},oet=function(i,e){return function(t,n){e(t,n,i)}},MM=class extends WK{constructor(e,t){super(t),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler(async(n,o,r)=>o?this.doOpenEditor(o,n):null))}_checkContextKey(){let e=!1;for(let t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){let r=t.resource.scheme;if(r===$i.http||r===$i.https)return n$(t.resource.toString()),e}return null}let o=t.options?t.options.selection:null;if(o)if(typeof o.endLineNumber=="number"&&typeof o.endColumn=="number")e.setSelection(o),e.revealRangeInCenter(o,1);else{let r={lineNumber:o.startLineNumber,column:o.startColumn};e.setPosition(r),e.revealPositionInCenter(r,1)}return e}findModel(e,t){let n=e.getModel();return n&&n.uri.toString()!==t.toString()?null:n}};MM=DIt([oet(0,ri),oet(1,Mo)],MM);ln(tn,MM,0)});var nf,Nv=P(()=>{_i();nf=vi("layoutService")});var ret,set,UK,$K,Qme=P(()=>{Qt();_l();Vi();Xt();fs();xl();Nv();ret=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},set=function(i,e){return function(t,n){e(t,n,i)}},UK=class{get mainContainer(){var e,t;return(t=(e=vC(this._codeEditorService.listCodeEditors()))===null||e===void 0?void 0:e.getContainerDomNode())!==null&&t!==void 0?t:Hn.document.body}get activeContainer(){var e,t;let n=(e=this._codeEditorService.getFocusedCodeEditor())!==null&&e!==void 0?e:this._codeEditorService.getActiveCodeEditor();return(t=n?.getContainerDomNode())!==null&&t!==void 0?t:this.mainContainer}get mainContainerDimension(){return jh(this.mainContainer)}get activeContainerDimension(){return jh(this.activeContainer)}get containers(){return pl(this._codeEditorService.listCodeEditors().map(e=>e.getContainerDomNode()))}getContainer(){return this.activeContainer}focus(){var e;(e=this._codeEditorService.getFocusedCodeEditor())===null||e===void 0||e.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=Et.None,this.onDidLayoutActiveContainer=Et.None,this.onDidLayoutContainer=Et.None,this.onDidChangeActiveContainer=Et.None,this.onDidAddContainer=Et.None,this.whenActiveContainerStylesLoaded=Promise.resolve(),this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};UK=ret([set(0,tn)],UK);$K=class extends UK{get mainContainer(){return this._container}constructor(e,t){super(t),this._container=e}};$K=ret([set(1,tn)],$K);ln(nf,UK,1)});var x2,Nx=P(()=>{_i();x2=vi("dialogService")});function jK(i){return i.scheme===$i.file?i.fsPath:i.path}var TIt,aet,Ax,cet,Rx,qK,GK,Jme,KK,NM,det,ege,Px,uet=P(()=>{Pi();nt();Nc();C4();Wt();Nx();xl();ic();yM();TIt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},aet=function(i,e){return function(t,n){e(t,n,i)}},Ax=!1;cet=0,Rx=class{constructor(e,t,n,o,r,s,a){this.id=++cet,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=n,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=o,this.groupOrder=r,this.sourceId=s,this.sourceOrder=a,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}},qK=class{constructor(e,t){this.resourceLabel=e,this.reason=t}},GK=class{constructor(){this.elements=new Map}createMessage(){let e=[],t=[];for(let[,o]of this.elements)(o.reason===0?e:t).push(o.resourceLabel);let n=[];return e.length>0&&n.push(g({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&n.push(g({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),n.join(` -`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}},Jme=class{constructor(e,t,n,o,r,s,a){this.id=++cet,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=n,this.groupId=o,this.groupOrder=r,this.sourceId=s,this.sourceOrder=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,n){this.removedResources||(this.removedResources=new GK),this.removedResources.has(t)||this.removedResources.set(t,new qK(e,n))}setValid(e,t,n){n?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new GK),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new qK(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}},KK=class{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(let e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(let e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(` -`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(let n of this._past)t(n.actual)&&this._setElementValidFlag(n,e);for(let n of this._future)t(n.actual)&&this._setElementValidFlag(n,e)}pushElement(e){for(let t of this._future)t.type===1&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){let t=[];for(let n=0,o=this._past.length;n=0;n--)t.push(this._future[n].id);return new bM(e,t)}restoreSnapshot(e){let t=e.elements.length,n=!0,o=0,r=-1;for(let a=0,l=this._past.length;a=t||c.id!==e.elements[o])&&(n=!1,r=0),!n&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}let s=-1;for(let a=this._future.length-1;a>=0;a--,o++){let l=this._future[a];n&&(o>=t||l.id!==e.elements[o])&&(n=!1,s=a),!n&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}r!==-1&&(this._past=this._past.slice(0,r)),s!==-1&&(this._future=this._future.slice(s+1)),this.versionId++}getElements(){let e=[],t=[];for(let n of this._past)e.push(n.actual);for(let n of this._future)t.push(n.actual);return{past:e,future:t}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let n=this._past.length-1;n>=0;n--)if(this._past[n]===e){t.has(this.strResource)?this._past[n]=t.get(this.strResource):this._past.splice(n,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let n=this._future.length-1;n>=0;n--)if(this._future[n]===e){t.has(this.strResource)?this._future[n]=t.get(this.strResource):this._future.splice(n,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}},NM=class{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,n=this.editStacks.length;tt.sourceOrder)&&(t=s,n=o)}return[t,n]}canUndo(e){if(e instanceof Rm){let[,n]=this._findClosestUndoElementWithSource(e.id);return!!n}let t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){hi(e);for(let n of t.strResources)this.removeElements(n);this._notificationService.error(e)}_acquireLocks(e){for(let t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(let t of e.editStacks)t.locked=!0;return()=>{for(let t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,n,o,r){let s=this._acquireLocks(n),a;try{a=t()}catch(l){return s(),o.dispose(),this._onError(l,e)}return a?a.then(()=>(s(),o.dispose(),r()),l=>(s(),o.dispose(),this._onError(l,e))):(s(),o.dispose(),r())}async _invokeWorkspacePrepare(e){if(typeof e.actual.prepareUndoRedo>"u")return ue.None;let t=e.actual.prepareUndoRedo();return typeof t>"u"?ue.None:t}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return t(ue.None);let n=e.actual.prepareUndoRedo();return n?EC(n)?t(n):n.then(o=>t(o)):t(ue.None)}_getAffectedEditStacks(e){let t=[];for(let n of e.strResources)t.push(this._editStacks.get(n)||det);return new NM(t)}_tryToSplitAndUndo(e,t,n,o){if(t.canSplit())return this._splitPastWorkspaceElement(t,n),this._notificationService.warn(o),new Px(this._undo(e,0,!0));for(let r of t.strResources)this.removeElements(r);return this._notificationService.warn(o),new Px}_checkWorkspaceUndo(e,t,n,o){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,g({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(o&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,g({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));let r=[];for(let a of n.editStacks)a.getClosestPastElement()!==t&&r.push(a.resourceLabel);if(r.length>0)return this._tryToSplitAndUndo(e,t,null,g({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,r.join(", ")));let s=[];for(let a of n.editStacks)a.locked&&s.push(a.resourceLabel);return s.length>0?this._tryToSplitAndUndo(e,t,null,g({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):n.isValid()?null:this._tryToSplitAndUndo(e,t,null,g({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,n){let o=this._getAffectedEditStacks(t),r=this._checkWorkspaceUndo(e,t,o,!1);return r?r.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,o,n)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(let[,t]of this._editStacks){let n=t.getClosestPastElement();if(n){if(n===e){let o=t.getSecondClosestPastElement();if(o&&o.groupId===e.groupId)return!0}if(n.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,t,n,o){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let a;(function(d){d[d.All=0]="All",d[d.This=1]="This",d[d.Cancel=2]="Cancel"})(a||(a={}));let{result:l}=await this._dialogService.prompt({type:lr.Info,message:g("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),buttons:[{label:g({key:"ok",comment:["{0} denotes a number that is > 1, && denotes a mnemonic"]},"&&Undo in {0} Files",n.editStacks.length),run:()=>a.All},{label:g({key:"nok",comment:["&& denotes a mnemonic"]},"Undo this &&File"),run:()=>a.This}],cancelButton:{run:()=>a.Cancel}});if(l===a.Cancel)return;if(l===a.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);let c=this._checkWorkspaceUndo(e,t,n,!1);if(c)return c.returnValue;o=!0}let r;try{r=await this._invokeWorkspacePrepare(t)}catch(a){return this._onError(a,t)}let s=this._checkWorkspaceUndo(e,t,n,!0);if(s)return r.dispose(),s.returnValue;for(let a of n.editStacks)a.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),n,r,()=>this._continueUndoInGroup(t.groupId,o))}_resourceUndo(e,t,n){if(!t.isValid){e.flushAllElements();return}if(e.locked){let o=g({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(o);return}return this._invokeResourcePrepare(t,o=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new NM([e]),o,()=>this._continueUndoInGroup(t.groupId,n))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(let[o,r]of this._editStacks){let s=r.getClosestPastElement();s&&s.groupId===e&&(!t||s.groupOrder>t.groupOrder)&&(t=s,n=o)}return[t,n]}_continueUndoInGroup(e,t){if(!e)return;let[,n]=this._findClosestUndoElementInGroup(e);if(n)return this._undo(n,0,t)}undo(e){if(e instanceof Rm){let[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return typeof e=="string"?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,n){if(!this._editStacks.has(e))return;let o=this._editStacks.get(e),r=o.getClosestPastElement();if(!r)return;if(r.groupId){let[a,l]=this._findClosestUndoElementInGroup(r.groupId);if(r!==a&&l)return this._undo(l,t,n)}if((r.sourceId!==t||r.confirmBeforeUndo)&&!n)return this._confirmAndContinueUndo(e,t,r);try{return r.type===1?this._workspaceUndo(e,r,n):this._resourceUndo(o,r,n)}finally{Ax&&this._print("undo")}}async _confirmAndContinueUndo(e,t,n){if((await this._dialogService.confirm({message:g("confirmDifferentSource","Would you like to undo '{0}'?",n.label),primaryButton:g({key:"confirmDifferentSource.yes",comment:["&& denotes a mnemonic"]},"&&Yes"),cancelButton:g("confirmDifferentSource.no","No")})).confirmed)return this._undo(e,t,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,n=null;for(let[o,r]of this._editStacks){let s=r.getClosestFutureElement();s&&s.sourceId===e&&(!t||s.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,g({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,r.join(", ")));let s=[];for(let a of n.editStacks)a.locked&&s.push(a.resourceLabel);return s.length>0?this._tryToSplitAndRedo(e,t,null,g({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):n.isValid()?null:this._tryToSplitAndRedo(e,t,null,g({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){let n=this._getAffectedEditStacks(t),o=this._checkWorkspaceRedo(e,t,n,!1);return o?o.returnValue:this._executeWorkspaceRedo(e,t,n)}async _executeWorkspaceRedo(e,t,n){let o;try{o=await this._invokeWorkspacePrepare(t)}catch(s){return this._onError(s,t)}let r=this._checkWorkspaceRedo(e,t,n,!0);if(r)return o.dispose(),r.returnValue;for(let s of n.editStacks)s.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),n,o,()=>this._continueRedoInGroup(t.groupId))}_resourceRedo(e,t){if(!t.isValid){e.flushAllElements();return}if(e.locked){let n=g({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(t,n=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new NM([e]),n,()=>this._continueRedoInGroup(t.groupId))))}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(let[o,r]of this._editStacks){let s=r.getClosestFutureElement();s&&s.groupId===e&&(!t||s.groupOrder{AM=class{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}},YK=class{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){let t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n{_i();zx=vi("environmentService")});var IIt,het,xa,XK,tge,ige,nge,a1=P(()=>{W3();od();Ox();ZK();xl();_i();Ju();Nc();IIt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},het=function(i,e){return function(t,n){e(t,n,i)}},xa=vi("ILanguageFeatureDebounceService");(function(i){let e=new WeakMap,t=0;function n(o){let r=e.get(o);return r===void 0&&(r=++t,e.set(o,r)),r}i.of=n})(XK||(XK={}));tge=class{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}},ige=class{constructor(e,t,n,o,r,s){this._logService=e,this._name=t,this._registry=n,this._default=o,this._min=r,this._max=s,this._cache=new nd(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((t,n)=>FT(XK.of(n),t),0)}get(e){let t=this._key(e),n=this._cache.get(t);return n?Ml(n.value,this._min,this._max):this.default()}update(e,t){let n=this._key(e),o=this._cache.get(n);o||(o=new YK(6),this._cache.set(n,o));let r=Ml(o.update(t),this._min,this._max);return PT(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${r}ms`),r}_overall(){let e=new AM;for(let[,t]of this._cache)e.update(t.value);return e.value}default(){let e=this._overall()|0||this._default;return Ml(e,this._min,this._max)}},nge=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,n){var o,r,s;let a=(o=n?.min)!==null&&o!==void 0?o:50,l=(r=n?.max)!==null&&r!==void 0?r:a**2,c=(s=n?.key)!==null&&s!==void 0?s:void 0,d=`${XK.of(e)},${a}${c?","+c:""}`,u=this._data.get(d);return u||(this._isDev?u=new ige(this._logService,t,e,this._overallAverage()|0||a*1.5,a,l):(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),u=new tge(a*1.5)),this._data.set(d,u)),u}_overallAverage(){let e=new AM;for(let t of this._data.values())e.update(t.default());return e.value}};nge=IIt([het(0,ks),het(1,zx)],nge);ln(xa,nge,1)});var QK,oge,JK,fet=P(()=>{Mi();Kt();Cb();QK=class i{static create(e,t){return new i(e,new oge(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){let e=this._tokens.getRange();return e&&new O(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn)}removeTokens(e){let t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,n,e.endColumn-1),this._updateEndLineNumber()}split(e){let t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber,[o,r,s]=this._tokens.split(t,e.startColumn-1,n,e.endColumn-1);return[new i(this._startLineNumber,o),new i(this._startLineNumber+s,r)]}applyEdit(e,t){let[n,o,r]=Qh(t);this.acceptEdit(e,n,o,r,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,n,o,r){this._acceptDeleteRange(e),this._acceptInsertText(new ke(e.startLineNumber,e.startColumn),t,n,o,r),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;let t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;if(n<0){let r=n-t;this._startLineNumber-=r;return}let o=this._tokens.getMaxDeltaLine();if(!(t>=o+1)){if(t<0&&n>=o+1){this._startLineNumber=0,this._tokens.clear();return}if(t<0){let r=-t;this._startLineNumber-=r,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,t,n,o,r){if(t===0&&n===0)return;let s=e.lineNumber-this._startLineNumber;if(s<0){this._startLineNumber+=t;return}let a=this._tokens.getMaxDeltaLine();s>=a+1||this._tokens.acceptInsertText(s,e.column-1,t,n,o,r)}},oge=class i{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){let t=[];for(let n=0;ne)n=o-1;else{let s=o;for(;s>t&&this._getDeltaLine(s-1)===e;)s--;let a=o;for(;ae||h===e&&p>=t)&&(he||p===e&&y>=t){if(pr?m-=r-n:m=n;else if(f===t&&p===n)if(f===o&&m>r)m-=r-n;else{d=!0;continue}else if(fr)f=t,p=n,m=p+(m-r);else{d=!0;continue}else if(f>o){if(l===0&&!d){c=a;break}f-=l}else if(f===o&&p>=r)e&&f===0&&(p+=e,m+=e),f-=l,p-=r-n,m-=r-n;else throw new Error("Not possible!");let _=4*c;s[_]=f,s[_+1]=p,s[_+2]=m,s[_+3]=y,c++}this._tokenCount=c}acceptInsertText(e,t,n,o,r,s){let a=n===0&&o===1&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),l=this._tokens,c=this._tokenCount;for(let d=0;dd&&n[5*v]===0;)v--;if(v-1===d){let b=u;for(;b+1S)e.warnOverlappingSemanticTokens(w,S+1);else{let A=e.getMetadata(D,E,t);A!==2147483647&&(p===0&&(p=w),h[f]=w-p,h[f+1]=S,h[f+2]=k,h[f+3]=A,f+=4,m=w,y=k)}l=w,c=S,a++}f!==h.length&&(h=h.subarray(0,f));let _=QK.create(p,h);s.push(_)}return s}var MIt,rge,eY,sge,tY,nY=P(()=>{B5();No();Ju();fet();Ha();MIt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},rge=function(i,e){return function(t,n){e(t,n,i)}},eY=class{constructor(e,t,n,o){this._legend=e,this._themeService=t,this._languageService=n,this._logService=o,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new tY}getMetadata(e,t,n){let o=this._languageService.languageIdCodec.encodeLanguageId(n),r=this._hashTable.get(e,t,o),s;if(r)s=r.metadata,this._logService.getLevel()===yl.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${Ls.getForeground(s)}, fontStyle ${Ls.getFontStyle(s).toString(2)}`);else{let a=this._legend.tokenTypes[e],l=[];if(a){let c=t;for(let u=0;c>0&&u>1;c>0&&this._logService.getLevel()===yl.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));let d=this._themeService.getColorTheme().getTokenStyleMetadata(a,l,n);if(typeof d>"u")s=2147483647;else{if(s=0,typeof d.italic<"u"){let u=(d.italic?1:0)<<11;s|=u|1}if(typeof d.bold<"u"){let u=(d.bold?2:0)<<11;s|=u|2}if(typeof d.underline<"u"){let u=(d.underline?4:0)<<11;s|=u|4}if(typeof d.strikethrough<"u"){let u=(d.strikethrough?8:0)<<11;s|=u|8}if(d.foreground){let u=d.foreground<<15;s|=u|16}s===0&&(s=2147483647)}}else this._logService.getLevel()===yl.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),s=2147483647,a="not-in-legend";this._hashTable.add(e,t,o,s),this._logService.getLevel()===yl.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${a}) / ${t} (${l.join(" ")}): foreground ${Ls.getForeground(s)}, fontStyle ${Ls.getFontStyle(s).toString(2)}`)}return s}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,n,o,r){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${n}: The provided start offset ${o} is outside the previous data (length ${r}).`))}};eY=MIt([rge(1,Mo),rge(2,Kn),rge(3,ks)],eY);sge=class{constructor(e,t,n,o){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=n,this.metadata=o,this.next=null}},tY=class i{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=i._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){let r=this._elements;this._currentLengthIndex++,this._currentLength=i._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{_i();Ab=vi("semanticTokensStylingService")});var NIt,age,lge,pet=P(()=>{nt();Ha();No();Ju();nY();oY();xl();NIt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},age=function(i,e){return function(t,n){e(t,n,i)}},lge=class extends ue{constructor(e,t,n){super(),this._themeService=e,this._logService=t,this._languageService=n,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new eY(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};lge=NIt([age(0,Mo),age(1,ks),age(2,Kn)],lge);ln(Ab,lge,1)});function get(i,e){switch(i){case 0:return"";case 1:return`${aY}*?`;default:return`(?:${sY}|${aY}+${sY}${e?`|${sY}${aY}+`:""})*?`}}function vet(i,e){if(!i)return[];let t=[],n=!1,o=!1,r="";for(let s of i){switch(s){case e:if(!n&&!o){t.push(r),r="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1;break}r+=s}return r&&t.push(r),t}function wet(i){if(!i)return"";let e="",t=vet(i,met);if(t.every(n=>n===rY))e=".*";else{let n=!1;t.forEach((o,r)=>{if(o===rY){if(n)return;e+=get(2,r===t.length-1)}else{let s=!1,a="",l=!1,c="";for(let d of o){if(d!=="}"&&s){a+=d;continue}if(l&&(d!=="]"||!c)){let u;d==="-"?u=d:(d==="^"||d==="!")&&!c?u="^":d===met?u="":u=va(d),c+=u;continue}switch(d){case"{":s=!0;continue;case"[":l=!0;continue;case"}":{let h=`(?:${vet(a,",").map(f=>wet(f)).join("|")})`;e+=h,s=!1,a="";break}case"]":{e+="["+c+"]",l=!1,c="";break}case"?":e+=aY;continue;case"*":e+=get(1);continue;default:e+=va(d)}}rdge(a,e)).filter(a=>a!==S2),i),n=t.length;if(!n)return S2;if(n===1)return t[0];let o=function(a,l){for(let c=0,d=t.length;c!!a.allBasenames);r&&(o.allBasenames=r.allBasenames);let s=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return s.length&&(o.allPaths=s),o}function Cet(i,e,t){let n=Zu===hs.sep,o=n?i:i.replace(AIt,Zu),r=Zu+o,s=hs.sep+i,a;return t?a=function(l,c){return typeof l=="string"&&(l===o||l.endsWith(r)||!n&&(l===i||l.endsWith(s)))?e:null}:a=function(l,c){return typeof l=="string"&&(l===o||!n&&l===i)?e:null},a.allPaths=[(t?"*/":"./")+i],a}function UIt(i){try{let e=new RegExp(`^${wet(i)}$`);return function(t){return e.lastIndex=0,typeof t=="string"&&e.test(t)?i:null}}catch{return S2}}function xet(i,e,t){return!i||typeof e!="string"?!1:uge(i)(e,void 0,t)}function uge(i,e={}){if(!i)return bet;if(typeof i=="string"||$It(i)){let t=dge(i,e);if(t===S2)return bet;let n=function(o,r){return!!t(o,r)};return t.allBasenames&&(n.allBasenames=t.allBasenames),t.allPaths&&(n.allPaths=t.allPaths),n}return jIt(i,e)}function $It(i){let e=i;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function jIt(i,e){let t=ket(Object.getOwnPropertyNames(i).map(a=>qIt(a,i[a],e)).filter(a=>a!==S2)),n=t.length;if(!n)return S2;if(!t.some(a=>!!a.requiresSiblings)){if(n===1)return t[0];let a=function(d,u){let h;for(let f=0,p=t.length;f{for(let f of h){let p=await f;if(typeof p=="string")return p}return null})():null},l=t.find(d=>!!d.allBasenames);l&&(a.allBasenames=l.allBasenames);let c=t.reduce((d,u)=>u.allPaths?d.concat(u.allPaths):d,[]);return c.length&&(a.allPaths=c),a}let o=function(a,l,c){let d,u;for(let h=0,f=t.length;h{for(let h of u){let f=await h;if(typeof f=="string")return f}return null})():null},r=t.find(a=>!!a.allBasenames);r&&(o.allBasenames=r.allBasenames);let s=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return s.length&&(o.allPaths=s),o}function qIt(i,e,t){if(e===!1)return S2;let n=dge(i,t);if(n===S2)return S2;if(typeof e=="boolean")return n;if(e){let o=e.when;if(typeof o=="string"){let r=(s,a,l,c)=>{if(!c||!n(s,a))return null;let d=o.replace("$(basename)",()=>l),u=c(d);return BU(u)?u.then(h=>h?i:null):u?i:null};return r.requiresSiblings=!0,r}}return n}function ket(i,e){let t=i.filter(a=>!!a.basenames);if(t.length<2)return i;let n=t.reduce((a,l)=>{let c=l.basenames;return c?a.concat(c):a},[]),o;if(e){o=[];for(let a=0,l=n.length;a{let c=l.patterns;return c?a.concat(c):a},[]);let r=function(a,l){if(typeof a!="string")return null;if(!l){let d;for(d=a.length;d>0;d--){let u=a.charCodeAt(d-1);if(u===47||u===92)break}l=a.substr(d)}let c=n.indexOf(l);return c!==-1?o[c]:null};r.basenames=n,r.patterns=o,r.allBasenames=n;let s=i.filter(a=>!a.basenames);return s.push(r),s}var rY,met,sY,aY,AIt,RIt,PIt,OIt,zIt,FIt,HIt,_et,bet,S2,hge=P(()=>{Qi();IG();od();Dg();Mn();Ri();rY="**",met="/",sY="[/\\\\]",aY="[^/\\\\]",AIt=/\//g;RIt=/^\*\*\/\*\.[\w\.-]+$/,PIt=/^\*\*\/([\w\.-]+)\/?$/,OIt=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,zIt=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,FIt=/^\*\*((\/[\w\.-]+)+)\/?$/,HIt=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,_et=new nd(1e4),bet=function(){return!1},S2=function(){return null}});function RM(i,e,t,n,o,r){if(Array.isArray(i)){let s=0;for(let a of i){let l=RM(a,e,t,n,o,r);if(l===10)return l;l>s&&(s=l)}return s}else{if(typeof i=="string")return n?i==="*"?5:i===t?10:0:0;if(i){let{language:s,pattern:a,scheme:l,hasAccessToAllModels:c,notebookType:d}=i;if(!n&&!c)return 0;d&&o&&(e=o);let u=0;if(l)if(l===e.scheme)u=10;else if(l==="*")u=5;else return 0;if(s)if(s===t)u=10;else if(s==="*")u=Math.max(u,5);else return 0;if(d)if(d===r)u=10;else if(d==="*"&&r!==void 0)u=Math.max(u,5);else return 0;if(a){let h;if(typeof a=="string"?h=a:h={...a,base:sW(a.base)},h===e.fsPath||xet(h,e.fsPath))u=10;else return 0}return u}else return 0}}var fge=P(()=>{hge();Dg()});function Let(i){return typeof i=="string"?!1:Array.isArray(i)?i.every(Let):!!i.exclusive}function PM(i){return typeof i=="string"?!1:Array.isArray(i)?i.some(PM):!!i.isBuiltin}var lY,ls,Eet=P(()=>{Xt();nt();Ca();fge();lY=class{constructor(e,t,n,o){this.uri=e,this.languageId=t,this.notebookUri=n,this.notebookType=o}equals(e){var t,n;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&((t=this.notebookUri)===null||t===void 0?void 0:t.toString())===((n=e.notebookUri)===null||n===void 0?void 0:n.toString())}},ls=class i{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new ge,this.onDidChange=this._onDidChange.event}register(e,t){let n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),Yt(()=>{if(n){let o=this._entries.indexOf(n);o>=0&&(this._entries.splice(o,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);let t=[];for(let n of this._entries)n._score>0&&t.push(n.provider);return t}ordered(e){let t=[];return this._orderedForEach(e,n=>t.push(n.provider)),t}orderedGroups(e){let t=[],n,o;return this._orderedForEach(e,r=>{n&&o===r._score?n.push(r.provider):(o=r._score,n=[r.provider],t.push(n))}),t}_orderedForEach(e,t){this._updateScores(e);for(let n of this._entries)n._score>0&&t(n)}_updateScores(e){var t,n;let o=(t=this._notebookInfoResolver)===null||t===void 0?void 0:t.call(this,e.uri),r=o?new lY(e.uri,e.getLanguageId(),o.uri,o.type):new lY(e.uri,e.getLanguageId(),void 0,void 0);if(!(!((n=this._lastCandidate)===null||n===void 0)&&n.equals(r))){this._lastCandidate=r;for(let s of this._entries)if(s._score=RM(s.selector,r.uri,r.languageId,R$(e),r.notebookUri,r.notebookType),Let(s.selector)&&s._score>0){for(let a of this._entries)a._score=0;s._score=1e3;break}this._entries.sort(i._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:PM(e.selector)&&!PM(t.selector)?1:!PM(e.selector)&&PM(t.selector)?-1:e._timet._time?-1:0}}});var pge,Det=P(()=>{Eet();Yn();xl();pge=class{constructor(){this.referenceProvider=new ls(this._score.bind(this)),this.renameProvider=new ls(this._score.bind(this)),this.codeActionProvider=new ls(this._score.bind(this)),this.definitionProvider=new ls(this._score.bind(this)),this.typeDefinitionProvider=new ls(this._score.bind(this)),this.declarationProvider=new ls(this._score.bind(this)),this.implementationProvider=new ls(this._score.bind(this)),this.documentSymbolProvider=new ls(this._score.bind(this)),this.inlayHintsProvider=new ls(this._score.bind(this)),this.colorProvider=new ls(this._score.bind(this)),this.codeLensProvider=new ls(this._score.bind(this)),this.documentFormattingEditProvider=new ls(this._score.bind(this)),this.documentRangeFormattingEditProvider=new ls(this._score.bind(this)),this.onTypeFormattingEditProvider=new ls(this._score.bind(this)),this.signatureHelpProvider=new ls(this._score.bind(this)),this.hoverProvider=new ls(this._score.bind(this)),this.documentHighlightProvider=new ls(this._score.bind(this)),this.multiDocumentHighlightProvider=new ls(this._score.bind(this)),this.selectionRangeProvider=new ls(this._score.bind(this)),this.foldingRangeProvider=new ls(this._score.bind(this)),this.linkProvider=new ls(this._score.bind(this)),this.inlineCompletionsProvider=new ls(this._score.bind(this)),this.completionProvider=new ls(this._score.bind(this)),this.linkedEditingRangeProvider=new ls(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new ls(this._score.bind(this)),this.documentSemanticTokensProvider=new ls(this._score.bind(this)),this.documentOnDropEditProvider=new ls(this._score.bind(this)),this.documentPasteEditProvider=new ls(this._score.bind(this))}_score(e){var t;return(t=this._notebookTypeResolver)===null||t===void 0?void 0:t.call(this,e)}};ln(Rt,pge,1)});var Fx,cY=P(()=>{_i();Fx=vi("hoverService")});var Pc,ca,Id=P(()=>{_i();Pc=vi("contextViewService"),ca=vi("contextMenuService")});var Tet=P(()=>{});var Iet=P(()=>{});function uY(i,e){return i&&e?g("acessibleViewHint","Inspect this in the accessible view with {0}.",e):i?g("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}var dY,Av,Hx,hY=P(()=>{Qt();Gl();o1();nt();Iet();Wt();dY=pt,Av=class extends ue{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new gp(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}},Hx=class i extends ue{static render(e,t,n){return new i(e,t,n)}constructor(e,t,n){super(),this.actionContainer=ut(e,dY("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=ut(this.actionContainer,dY("a.action")),this.action.setAttribute("role","button"),t.iconClass&&ut(this.action,dY(`span.icon.${t.iconClass}`));let o=ut(this.action,dY("span"));o.textContent=n?`${t.label} (${n})`:t.label,this._register(Xe(this.actionContainer,Lt.CLICK,r=>{r.stopPropagation(),r.preventDefault(),t.run(this.actionContainer)})),this._register(Xe(this.actionContainer,Lt.KEY_DOWN,r=>{let s=new qn(r);(s.equals(3)||s.equals(10))&&(r.stopPropagation(),r.preventDefault(),t.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}});function Met(i){let e,t=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(i.fragment);return t&&(e={startLineNumber:parseInt(t[1]),startColumn:t[2]?parseInt(t[2]):1,endLineNumber:t[4]?parseInt(t[4]):void 0,endColumn:t[4]?t[5]?parseInt(t[5]):1:void 0},i=i.with({fragment:""})),{selection:e,uri:i}}var Xr,sd=P(()=>{_i();Xr=vi("openerService")});function Net(i,e={}){let t=fY(e);return t.textContent=i,t}function Aet(i,e={}){let t=fY(e);return Ret(t,GIt(i,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),t}function fY(i){let e=i.inline?"span":"div",t=document.createElement(e);return i.className&&(t.className=i.className),t}function Ret(i,e,t,n){let o;if(e.type===2)o=document.createTextNode(e.content||"");else if(e.type===3)o=document.createElement("b");else if(e.type===4)o=document.createElement("i");else if(e.type===7&&n)o=document.createElement("code");else if(e.type===5&&t){let r=document.createElement("a");t.disposables.add(go(r,"click",s=>{t.callback(String(e.index),s)})),o=r}else e.type===8?o=document.createElement("br"):e.type===1&&(o=i);o&&i!==o&&i.appendChild(o),o&&Array.isArray(e.children)&&e.children.forEach(r=>{Ret(o,r,t,n)})}function GIt(i,e){let t={type:1,children:[]},n=0,o=t,r=[],s=new mge(i);for(;!s.eos();){let a=s.next(),l=a==="\\"&&gge(s.peek(),e)!==0;if(l&&(a=s.next()),!l&&KIt(a,e)&&a===s.peek()){s.advance(),o.type===2&&(o=r.pop());let c=gge(a,e);if(o.type===c||o.type===5&&c===6)o=r.pop();else{let d={type:c,children:[]};c===5&&(d.index=n,n++),o.children.push(d),r.push(o),o=d}}else if(a===` -`)o.type===2&&(o=r.pop()),o.children.push({type:8});else if(o.type!==2){let c={type:2,content:a};o.children.push(c),r.push(o),o=c}else o.content+=a}return o.type===2&&(o=r.pop()),r.length,t}function KIt(i,e){return gge(i,e)!==0}function gge(i,e){switch(i){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}var mge,vge=P(()=>{Qt();mge=class{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){let e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}});function of(i){let e=new Array,t,n=0,o=0;for(;(t=YIt.exec(i))!==null;){o=t.index||0,n{Qt();or();YIt=new RegExp(`(\\\\)?\\$\\((${ui.iconNameExpression}(?:${ui.iconModifierExpression})?)\\)`,"g")});function Pet(i){let e=ZIt(i);if(e&&e.length>0)return new Uint32Array(e)}function ZIt(i){if(rf=0,k2(i,_ge,4352),rf>0||(k2(i,bge,4449),rf>0)||(k2(i,yge,4520),rf>0)||(k2(i,Rb,12593),rf))return Pv.subarray(0,rf);if(i>=44032&&i<=55203){let e=i-44032,t=e%588,n=Math.floor(e/588),o=Math.floor(t/28),r=t%28-1;if(n<_ge.length?k2(n,_ge,0):4352+n-12593=0&&(r0)return Pv.subarray(0,rf)}}function k2(i,e,t){i>=t&&i>8&&(Pv[rf++]=i>>8&255),i>>16&&(Pv[rf++]=i>>16&255))}var rf,Pv,_ge,bge,yge,Rb,Oet=P(()=>{rf=0,Pv=new Uint32Array(10);_ge=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),bge=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),yge=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),Rb=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108])});function vY(...i){return function(e,t){for(let n=0,o=i.length;n0?[{start:0,end:e.length}]:[]:null}function Ege(i,e){let t=e.toLowerCase().indexOf(i.toLowerCase());return t===-1?null:[{start:t,end:t+i.length}]}function Dge(i,e){return xge(i.toLowerCase(),e.toLowerCase(),0,0)}function xge(i,e,t,n){if(t===i.length)return[];if(n===e.length)return null;if(i[t]===e[n]){let o=null;return(o=xge(i,e,t+1,n+1))?Mge({start:n,end:n+1},o):null}return xge(i,e,t,n+1)}function Tge(i){return 97<=i&&i<=122}function _Y(i){return 65<=i&&i<=90}function Ige(i){return 48<=i&&i<=57}function Wet(i){return i===32||i===9||i===10||i===13}function gY(i){return Wet(i)||Uet.has(i)}function zet(i,e){return i===e||gY(i)&&gY(e)}function Fet(i){if(Cge.has(i))return Cge.get(i);let e,t=Pet(i);return t&&(e=t),Cge.set(i,e),e}function $et(i){return Tge(i)||_Y(i)||Ige(i)}function Mge(i,e){return e.length===0?e=[i]:i.end===e[0].start?e[0].start=i.start:e.unshift(i),e}function jet(i,e){for(let t=e;t0&&!$et(i.charCodeAt(t-1)))return t}return i.length}function Sge(i,e,t,n){if(t===i.length)return[];if(n===e.length)return null;if(i[t]!==e[n].toLowerCase())return null;{let o=null,r=n+1;for(o=Sge(i,e,t+1,n+1);!o&&(r=jet(e,r)).6}function eMt(i){let{upperPercent:e,lowerPercent:t,alphaPercent:n,numericPercent:o}=i;return t>.2&&e<.8&&n>.6&&o<.2}function tMt(i){let e=0,t=0,n=0,o=0;for(let r=0;r60)return null;let t=QIt(e);if(!eMt(t)){if(!JIt(t))return null;e=e.toLowerCase()}let n=null,o=0;for(i=i.toLowerCase();o0&&gY(i.charCodeAt(t-1)))return t;return i.length}function Nge(i,e,t=!1){if(typeof i!="string"||typeof e!="string")return null;let n=Het.get(i);n||(n=new RegExp(rqe(i),"i"),Het.set(i,n));let o=n.exec(e);return o?[{start:o.index,end:o.index+o[0].length}]:t?nMt(i,e):iMt(i,e)}function Yet(i,e){let t=E2(i,i.toLowerCase(),0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return t?Hv(t):null}function Zet(i,e,t,n,o,r){let s=Math.min(13,i.length);for(;t"u")return[];let e=[],t=i[1];for(let n=i.length-1;n>1;n--){let o=i[n]+t,r=e[e.length-1];r&&r.end===o?r.end=o+1:e.push({start:o,end:o+1})}return e}function Age(){let i=[],e=[];for(let t=0;t<=zv;t++)e[t]=0;for(let t=0;t<=zv;t++)i.push(e.slice(0));return i}function Xet(i){let e=[];for(let t=0;t<=i;t++)e[t]=0;return e}function wge(i,e,t,n,o){function r(a,l,c=" "){for(;a.lengthr(a,3)).join("|")} +`&&(n=2),this._modelData.model.getValue(n,t)}setValue(e){this._modelData&&this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){var t;let n=e;if(this._modelData===null&&n===null||this._modelData&&this._modelData.model===n)return;let o={oldModelUrl:((t=this._modelData)===null||t===void 0?void 0:t.model.uri)||null,newModelUrl:n?.uri||null};this._onWillChangeModel.fire(o);let r=this.hasTextFocus(),s=this._detachModel();this._attachModel(n),r&&this.hasModel()&&this.focus(),this._removeDecorationTypes(),this._onDidChangeModel.fire(o),this._postDetachModelCleanup(s),this._contributions.onAfterModelAttached()}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let e in this._decorationTypeSubtypes){let t=this._decorationTypeSubtypes[e];for(let n in t)this._removeDecorationType(e+"-"+n)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,n,o){let r=e.model.validatePosition({lineNumber:t,column:n}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(r);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(s.lineNumber,o)}getTopForLineNumber(e,t=!1){return this._modelData?Nb._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?Nb._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,n,o=!1){let r=e.model.validatePosition({lineNumber:t,column:n}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(r);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber,o)}getBottomForLineNumber(e,t=!1){return this._modelData?Nb._getVerticalOffsetAfterPosition(this._modelData,e,1,t):-1}setHiddenAreas(e,t){var n;(n=this._modelData)===null||n===void 0||n.viewModel.setHiddenAreas(e.map(o=>O.lift(o)),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;let t=this._modelData.model.validatePosition(e),n=this._modelData.model.getOptions().tabSize;return mr.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,n)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!ke.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,n,o){if(!this._modelData)return;if(!O.isIRange(e))throw new Error("Invalid arguments");let r=this._modelData.model.validateRange(e),s=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(r);this._modelData.viewModel.revealRange("api",n,s,t,o)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,n){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new O(e,1,e,1),t,!1,n)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,n,o){if(!ke.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new O(e.lineNumber,e.column,e.lineNumber,e.column),t,n,o)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){let n=jt.isISelection(e),o=O.isIRange(e);if(!n&&!o)throw new Error("Invalid arguments");if(n)this._setSelectionImpl(e,t);else if(o){let r={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(r,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;let n=new jt(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[n])}revealLines(e,t,n=0){this._revealLines(e,t,0,n)}revealLinesInCenter(e,t,n=0){this._revealLines(e,t,1,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._revealLines(e,t,2,n)}revealLinesNearTop(e,t,n=0){this._revealLines(e,t,5,n)}_revealLines(e,t,n,o){if(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new O(e,1,t,1),n,!1,o)}revealRange(e,t=0,n=!1,o=!0){this._revealRange(e,n?1:0,o,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,n,o){if(!O.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(O.lift(e),t,n,o)}setSelections(e,t="api",n=0){if(this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let o=0,r=e.length;o0&&this._modelData.viewModel.restoreCursorState(n):this._modelData.viewModel.restoreCursorState([n]),this._contributions.restoreViewState(t.contributionsState||{});let o=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(o)}}handleInitialized(){var e;(e=this._getViewModel())===null||e===void 0||e.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter(t=>t.isSupported()),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,n){switch(n=n||{},t){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{let r=n;this._type(e,r.text||"");return}case"replacePreviousChar":{let r=n;this._compositionType(e,r.text||"",r.replaceCharCnt||0,0,0);return}case"compositionType":{let r=n;this._compositionType(e,r.text||"",r.replacePrevCharCnt||0,r.replaceNextCharCnt||0,r.positionDelta||0);return}case"paste":{let r=n;this._paste(e,r.text||"",r.pasteOnNewLine||!1,r.multicursorText||null,r.mode||null);return}case"cut":this._cut(e);return}let o=this.getAction(t);if(o){Promise.resolve(o.run(n)).then(void 0,hi);return}this._modelData&&(this._triggerEditorCommand(e,t,n)||this._triggerCommand(t,n))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){!this._modelData||t.length===0||(e==="keyboard"&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),e==="keyboard"&&this._onDidType.fire(t))}_compositionType(e,t,n,o,r){this._modelData&&this._modelData.viewModel.compositionType(t,n,o,r,e)}_paste(e,t,n,o,r){if(!this._modelData||t.length===0)return;let s=this._modelData.viewModel,a=s.getSelection().getStartPosition();s.paste(t,n,o,e);let l=s.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({range:new O(a.lineNumber,a.column,l.lineNumber,l.column),languageId:r})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,n){let o=j3.getEditorCommand(t);return o?(n=n||{},n.source=e,this._instantiationService.invokeFunction(r=>{Promise.resolve(o.runEditorCommand(r,this,n)).then(void 0,hi)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(90)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(90)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,n){if(!this._modelData||this._configuration.options.get(90))return!1;let o;return n?Array.isArray(n)?o=()=>n:o=n:o=()=>null,this._modelData.viewModel.executeEdits(e,t,o),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new Zme(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,r5(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,r5(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?e.length===0&&t.length===0?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){!this._modelData||e.length===0||this._modelData.model.changeDecorations(t=>{t.deltaDecorations(e,[])})}removeDecorationsByType(e){let t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(143)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,t=!1){this._configuration.observeContainer(e),t||this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){let t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){let t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){let n=this._contentWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(n)}}removeContentWidget(e){let t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){let n=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(n)}}addOverlayWidget(e){let t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){let t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){let n=this._overlayWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(n)}}removeOverlayWidget(e){let t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){let n=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(n)}}addGlyphMarginWidget(e){let t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){let t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){let n=this._glyphMarginWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(n)}}removeGlyphMarginWidget(e){let t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){let n=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(n)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,t)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;let t=this._modelData.model.validatePosition(e),n=this._configuration.options,o=n.get(143),r=Nb._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),s=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+o.glyphMarginWidth+o.lineNumbersWidth+o.decorationsWidth-this.getScrollLeft();return{top:r,left:s,height:n.get(66)}}getOffsetForColumn(e,t){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,t)}render(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,e)}setAriaOptions(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(e)}applyFontInfo(e){Gr(e,this._configuration.options.get(50))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}let t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());let n=e.onBeforeAttached(),o=new FK(this._id,this._configuration,e,WK.create(pi(this._domElement)),VK.create(this._configuration.options),a=>za(pi(this._domElement),a),this.languageConfigurationService,this._themeService,n);t.push(e.onWillDispose(()=>this.setModel(null))),t.push(o.onEvent(a=>{switch(a.kind){case 0:this._onDidContentSizeChange.fire(a);break;case 1:this._editorTextFocus.setValue(a.hasFocus);break;case 2:this._onDidScrollChange.fire(a);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(a.reachedMaxCursorCount){let u=this.getOption(79),h=g("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",u);this._notificationService.prompt(Nv.Warning,h,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:g("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}let l=[];for(let u=0,h=a.selections.length;u{this._paste("keyboard",r,s,a,l)},type:r=>{this._type("keyboard",r)},compositionType:(r,s,a,l)=>{this._compositionType("keyboard",r,s,a,l)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:t={paste:(r,s,a,l)=>{let c={text:r,pasteOnNewLine:s,multicursorText:a,mode:l};this._commandService.executeCommand("paste",c)},type:r=>{let s={text:r};this._commandService.executeCommand("type",s)},compositionType:(r,s,a,l)=>{if(a||l){let c={text:r,replacePrevCharCnt:s,replaceNextCharCnt:a,positionDelta:l};this._commandService.executeCommand("compositionType",c)}else{let c={text:r,replaceCharCnt:s};this._commandService.executeCommand("replacePreviousChar",c)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};let n=new rx(e.coordinatesConverter);return n.onKeyDown=r=>this._onKeyDown.fire(r),n.onKeyUp=r=>this._onKeyUp.fire(r),n.onContextMenu=r=>this._onContextMenu.fire(r),n.onMouseMove=r=>this._onMouseMove.fire(r),n.onMouseLeave=r=>this._onMouseLeave.fire(r),n.onMouseDown=r=>this._onMouseDown.fire(r),n.onMouseUp=r=>this._onMouseUp.fire(r),n.onMouseDrag=r=>this._onMouseDrag.fire(r),n.onMouseDrop=r=>this._onMouseDrop.fire(r),n.onMouseDropCanceled=r=>this._onMouseDropCanceled.fire(r),n.onMouseWheel=r=>this._onMouseWheel.fire(r),[new _G(t,this._configuration,this._themeService.getColorTheme(),e,n,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){e?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;let e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}showDropIndicatorAt(e){let t=[{range:new O(e.lineNumber,e.column,e.lineNumber,e.column),options:Nb.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,t){this._contextKeyService.createKey(e,t)}};S4.dropIntoEditorDecorationOptions=zi.register({description:"workbench-dnd-target",className:"dnd-target"});S4=Nb=bIt([x4(3,qt),x4(4,tn),x4(5,eo),x4(6,ri),x4(7,Mo),x4(8,xo),x4(9,Ba),x4(10,An),x4(11,Rt)],S4);$K=class extends ue{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new ge(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new ge(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){let t=e?2:1;this._value!==t&&(this._value=t,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}},nc=class extends ge{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}},Gme=class extends ue{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=re.editorSimpleInput.bindTo(t),this._editorFocus=re.focus.bindTo(t),this._textInputFocus=re.textInputFocus.bindTo(t),this._editorTextFocus=re.editorTextFocus.bindTo(t),this._tabMovesFocus=re.tabMovesFocus.bindTo(t),this._editorReadonly=re.readOnly.bindTo(t),this._inDiffEditor=re.inDiffEditor.bindTo(t),this._editorColumnSelection=re.columnSelection.bindTo(t),this._hasMultipleSelections=re.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=re.hasNonEmptySelection.bindTo(t),this._canUndo=re.canUndo.bindTo(t),this._canRedo=re.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(c4.onDidChangeTabFocus(n=>this._tabMovesFocus.set(n))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){let e=this._editor.getOptions();this._tabMovesFocus.set(c4.getTabFocusMode()),this._editorReadonly.set(e.get(90)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){let e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(t=>!t.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){let e=this._editor.getModel();this._canUndo.set(!!(e&&e.canUndo())),this._canRedo.set(!!(e&&e.canRedo()))}},Kme=class extends ue{constructor(e,t,n){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=n,this._langId=re.languageId.bindTo(t),this._hasCompletionItemProvider=re.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=re.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=re.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=re.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=re.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=re.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=re.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=re.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=re.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=re.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=re.hasReferenceProvider.bindTo(t),this._hasRenameProvider=re.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=re.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=re.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=re.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=re.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=re.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=re.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=re.isInWalkThroughSnippet.bindTo(t);let o=()=>this._update();this._register(e.onDidChangeModel(o)),this._register(e.onDidChangeModelLanguage(o)),this._register(n.completionProvider.onDidChange(o)),this._register(n.codeActionProvider.onDidChange(o)),this._register(n.codeLensProvider.onDidChange(o)),this._register(n.definitionProvider.onDidChange(o)),this._register(n.declarationProvider.onDidChange(o)),this._register(n.implementationProvider.onDidChange(o)),this._register(n.typeDefinitionProvider.onDidChange(o)),this._register(n.hoverProvider.onDidChange(o)),this._register(n.documentHighlightProvider.onDidChange(o)),this._register(n.documentSymbolProvider.onDidChange(o)),this._register(n.referenceProvider.onDidChange(o)),this._register(n.renameProvider.onDidChange(o)),this._register(n.documentFormattingEditProvider.onDidChange(o)),this._register(n.documentRangeFormattingEditProvider.onDidChange(o)),this._register(n.signatureHelpProvider.onDidChange(o)),this._register(n.inlayHintsProvider.onDidChange(o)),o()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()})}_update(){let e=this._editor.getModel();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===$i.walkThroughSnippet)})}},Yme=class extends ue{constructor(e,t){super(),this._onChange=this._register(new ge),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(Kl(e)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus(()=>{this._hasDomElementFocus=!0,this._update()})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasDomElementFocus=!1,this._update()})),t&&(this._overflowWidgetsDomNode=this._register(Kl(t)),this._register(this._overflowWidgetsDomNode.onDidFocus(()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()})),this._register(this._overflowWidgetsDomNode.onDidBlur(()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()})))}_update(){let e=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==e&&(this._hadFocus=e,this._onChange.fire(void 0))}hasFocus(){var e;return(e=this._hadFocus)!==null&&e!==void 0?e:!1}},Zme=class{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,n){return this._editor.onDidChangeModelDecorations(o=>{this._isChangingDecorations||e.call(t,o)},n)}getRange(e){return!this._editor.hasModel()||e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e])}getRanges(){if(!this._editor.hasModel())return[];let e=this._editor.getModel(),t=[];for(let n of this._decorationIds){let o=e.getDecorationRange(n);o&&t.push(o)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations(t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)})}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let t=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations(n=>{t=n.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(t)})}finally{this._isChangingDecorations=!1}return t}},CIt=encodeURIComponent("");xIt=encodeURIComponent('');Qs((i,e)=>{let t=i.getColor(lp);t&&e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${jme(t)}") repeat-x bottom left; }`);let n=i.getColor(Ll);n&&e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${jme(n)}") repeat-x bottom left; }`);let o=i.getColor(Ql);o&&e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${jme(o)}") repeat-x bottom left; }`);let r=i.getColor(SYe);r&&e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${kIt(r)}") no-repeat bottom left; }`);let s=i.getColor(uXe);s&&e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${s.rgba.a}; }`)})});var LIt,EIt,jK,net=P(()=>{Xt();nt();Hh();No();LIt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},EIt=function(i,e){return function(t,n){e(t,n,i)}},jK=class extends ue{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new ge),this._onCodeEditorAdd=this._register(new ge),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new ge),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new ge),this._onDiffEditorAdd=this._register(new ge),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new ge),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new $r,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null,t=this.listCodeEditors();for(let n of t){if(n.hasTextFocus())return n;n.hasWidgetFocus()&&(e=n)}return e}removeDecorationType(e){let t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(n=>n.removeDecorationsByType(e))))}setModelProperty(e,t,n){let o=e.toString(),r;this._modelProperties.has(o)?r=this._modelProperties.get(o):(r=new Map,this._modelProperties.set(o,r)),r.set(t,n)}getModelProperty(e,t){let n=e.toString();if(this._modelProperties.has(n))return this._modelProperties.get(n).get(t)}async openCodeEditor(e,t,n){for(let o of this._codeEditorOpenHandlers){let r=await o(e,t,n);if(r!==null)return r}return null}registerCodeEditorOpenHandler(e){let t=this._codeEditorOpenHandlers.unshift(e);return Yt(t)}};jK=LIt([EIt(0,Mo)],jK)});var DIt,oet,MM,Xme=P(()=>{Qt();Nc();net();fs();Xi();xl();No();DIt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},oet=function(i,e){return function(t,n){e(t,n,i)}},MM=class extends jK{constructor(e,t){super(t),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler(async(n,o,r)=>o?this.doOpenEditor(o,n):null))}_checkContextKey(){let e=!1;for(let t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){let r=t.resource.scheme;if(r===$i.http||r===$i.https)return s$(t.resource.toString()),e}return null}let o=t.options?t.options.selection:null;if(o)if(typeof o.endLineNumber=="number"&&typeof o.endColumn=="number")e.setSelection(o),e.revealRangeInCenter(o,1);else{let r={lineNumber:o.startLineNumber,column:o.startColumn};e.setPosition(r),e.revealPositionInCenter(r,1)}return e}findModel(e,t){let n=e.getModel();return n&&n.uri.toString()!==t.toString()?null:n}};MM=DIt([oet(0,ri),oet(1,Mo)],MM);ln(tn,MM,0)});var nf,Av=P(()=>{_i();nf=vi("layoutService")});var ret,set,qK,GK,Qme=P(()=>{Qt();_l();Vi();Xt();fs();xl();Av();ret=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},set=function(i,e){return function(t,n){e(t,n,i)}},qK=class{get mainContainer(){var e,t;return(t=(e=vC(this._codeEditorService.listCodeEditors()))===null||e===void 0?void 0:e.getContainerDomNode())!==null&&t!==void 0?t:Hn.document.body}get activeContainer(){var e,t;let n=(e=this._codeEditorService.getFocusedCodeEditor())!==null&&e!==void 0?e:this._codeEditorService.getActiveCodeEditor();return(t=n?.getContainerDomNode())!==null&&t!==void 0?t:this.mainContainer}get mainContainerDimension(){return jh(this.mainContainer)}get activeContainerDimension(){return jh(this.activeContainer)}get containers(){return pl(this._codeEditorService.listCodeEditors().map(e=>e.getContainerDomNode()))}getContainer(){return this.activeContainer}focus(){var e;(e=this._codeEditorService.getFocusedCodeEditor())===null||e===void 0||e.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=Et.None,this.onDidLayoutActiveContainer=Et.None,this.onDidLayoutContainer=Et.None,this.onDidChangeActiveContainer=Et.None,this.onDidAddContainer=Et.None,this.whenActiveContainerStylesLoaded=Promise.resolve(),this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};qK=ret([set(0,tn)],qK);GK=class extends qK{get mainContainer(){return this._container}constructor(e,t){super(t),this._container=e}};GK=ret([set(1,tn)],GK);ln(nf,qK,1)});var x2,Nx=P(()=>{_i();x2=vi("dialogService")});function KK(i){return i.scheme===$i.file?i.fsPath:i.path}var TIt,aet,Ax,cet,Rx,YK,ZK,Jme,XK,NM,det,ege,Px,uet=P(()=>{Pi();nt();Nc();C4();Wt();Nx();xl();ic();yM();TIt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},aet=function(i,e){return function(t,n){e(t,n,i)}},Ax=!1;cet=0,Rx=class{constructor(e,t,n,o,r,s,a){this.id=++cet,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=n,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=o,this.groupOrder=r,this.sourceId=s,this.sourceOrder=a,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}},YK=class{constructor(e,t){this.resourceLabel=e,this.reason=t}},ZK=class{constructor(){this.elements=new Map}createMessage(){let e=[],t=[];for(let[,o]of this.elements)(o.reason===0?e:t).push(o.resourceLabel);let n=[];return e.length>0&&n.push(g({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&n.push(g({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),n.join(` +`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}},Jme=class{constructor(e,t,n,o,r,s,a){this.id=++cet,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=n,this.groupId=o,this.groupOrder=r,this.sourceId=s,this.sourceOrder=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,n){this.removedResources||(this.removedResources=new ZK),this.removedResources.has(t)||this.removedResources.set(t,new YK(e,n))}setValid(e,t,n){n?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new ZK),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new YK(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}},XK=class{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(let e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(let e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(` +`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(let n of this._past)t(n.actual)&&this._setElementValidFlag(n,e);for(let n of this._future)t(n.actual)&&this._setElementValidFlag(n,e)}pushElement(e){for(let t of this._future)t.type===1&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){let t=[];for(let n=0,o=this._past.length;n=0;n--)t.push(this._future[n].id);return new bM(e,t)}restoreSnapshot(e){let t=e.elements.length,n=!0,o=0,r=-1;for(let a=0,l=this._past.length;a=t||c.id!==e.elements[o])&&(n=!1,r=0),!n&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}let s=-1;for(let a=this._future.length-1;a>=0;a--,o++){let l=this._future[a];n&&(o>=t||l.id!==e.elements[o])&&(n=!1,s=a),!n&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}r!==-1&&(this._past=this._past.slice(0,r)),s!==-1&&(this._future=this._future.slice(s+1)),this.versionId++}getElements(){let e=[],t=[];for(let n of this._past)e.push(n.actual);for(let n of this._future)t.push(n.actual);return{past:e,future:t}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let n=this._past.length-1;n>=0;n--)if(this._past[n]===e){t.has(this.strResource)?this._past[n]=t.get(this.strResource):this._past.splice(n,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let n=this._future.length-1;n>=0;n--)if(this._future[n]===e){t.has(this.strResource)?this._future[n]=t.get(this.strResource):this._future.splice(n,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}},NM=class{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,n=this.editStacks.length;tt.sourceOrder)&&(t=s,n=o)}return[t,n]}canUndo(e){if(e instanceof Rm){let[,n]=this._findClosestUndoElementWithSource(e.id);return!!n}let t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){hi(e);for(let n of t.strResources)this.removeElements(n);this._notificationService.error(e)}_acquireLocks(e){for(let t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(let t of e.editStacks)t.locked=!0;return()=>{for(let t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,n,o,r){let s=this._acquireLocks(n),a;try{a=t()}catch(l){return s(),o.dispose(),this._onError(l,e)}return a?a.then(()=>(s(),o.dispose(),r()),l=>(s(),o.dispose(),this._onError(l,e))):(s(),o.dispose(),r())}async _invokeWorkspacePrepare(e){if(typeof e.actual.prepareUndoRedo>"u")return ue.None;let t=e.actual.prepareUndoRedo();return typeof t>"u"?ue.None:t}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return t(ue.None);let n=e.actual.prepareUndoRedo();return n?EC(n)?t(n):n.then(o=>t(o)):t(ue.None)}_getAffectedEditStacks(e){let t=[];for(let n of e.strResources)t.push(this._editStacks.get(n)||det);return new NM(t)}_tryToSplitAndUndo(e,t,n,o){if(t.canSplit())return this._splitPastWorkspaceElement(t,n),this._notificationService.warn(o),new Px(this._undo(e,0,!0));for(let r of t.strResources)this.removeElements(r);return this._notificationService.warn(o),new Px}_checkWorkspaceUndo(e,t,n,o){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,g({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(o&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,g({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));let r=[];for(let a of n.editStacks)a.getClosestPastElement()!==t&&r.push(a.resourceLabel);if(r.length>0)return this._tryToSplitAndUndo(e,t,null,g({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,r.join(", ")));let s=[];for(let a of n.editStacks)a.locked&&s.push(a.resourceLabel);return s.length>0?this._tryToSplitAndUndo(e,t,null,g({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):n.isValid()?null:this._tryToSplitAndUndo(e,t,null,g({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,n){let o=this._getAffectedEditStacks(t),r=this._checkWorkspaceUndo(e,t,o,!1);return r?r.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,o,n)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(let[,t]of this._editStacks){let n=t.getClosestPastElement();if(n){if(n===e){let o=t.getSecondClosestPastElement();if(o&&o.groupId===e.groupId)return!0}if(n.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,t,n,o){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let a;(function(d){d[d.All=0]="All",d[d.This=1]="This",d[d.Cancel=2]="Cancel"})(a||(a={}));let{result:l}=await this._dialogService.prompt({type:lr.Info,message:g("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),buttons:[{label:g({key:"ok",comment:["{0} denotes a number that is > 1, && denotes a mnemonic"]},"&&Undo in {0} Files",n.editStacks.length),run:()=>a.All},{label:g({key:"nok",comment:["&& denotes a mnemonic"]},"Undo this &&File"),run:()=>a.This}],cancelButton:{run:()=>a.Cancel}});if(l===a.Cancel)return;if(l===a.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);let c=this._checkWorkspaceUndo(e,t,n,!1);if(c)return c.returnValue;o=!0}let r;try{r=await this._invokeWorkspacePrepare(t)}catch(a){return this._onError(a,t)}let s=this._checkWorkspaceUndo(e,t,n,!0);if(s)return r.dispose(),s.returnValue;for(let a of n.editStacks)a.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),n,r,()=>this._continueUndoInGroup(t.groupId,o))}_resourceUndo(e,t,n){if(!t.isValid){e.flushAllElements();return}if(e.locked){let o=g({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(o);return}return this._invokeResourcePrepare(t,o=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new NM([e]),o,()=>this._continueUndoInGroup(t.groupId,n))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(let[o,r]of this._editStacks){let s=r.getClosestPastElement();s&&s.groupId===e&&(!t||s.groupOrder>t.groupOrder)&&(t=s,n=o)}return[t,n]}_continueUndoInGroup(e,t){if(!e)return;let[,n]=this._findClosestUndoElementInGroup(e);if(n)return this._undo(n,0,t)}undo(e){if(e instanceof Rm){let[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return typeof e=="string"?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,n){if(!this._editStacks.has(e))return;let o=this._editStacks.get(e),r=o.getClosestPastElement();if(!r)return;if(r.groupId){let[a,l]=this._findClosestUndoElementInGroup(r.groupId);if(r!==a&&l)return this._undo(l,t,n)}if((r.sourceId!==t||r.confirmBeforeUndo)&&!n)return this._confirmAndContinueUndo(e,t,r);try{return r.type===1?this._workspaceUndo(e,r,n):this._resourceUndo(o,r,n)}finally{Ax&&this._print("undo")}}async _confirmAndContinueUndo(e,t,n){if((await this._dialogService.confirm({message:g("confirmDifferentSource","Would you like to undo '{0}'?",n.label),primaryButton:g({key:"confirmDifferentSource.yes",comment:["&& denotes a mnemonic"]},"&&Yes"),cancelButton:g("confirmDifferentSource.no","No")})).confirmed)return this._undo(e,t,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,n=null;for(let[o,r]of this._editStacks){let s=r.getClosestFutureElement();s&&s.sourceId===e&&(!t||s.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,g({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,r.join(", ")));let s=[];for(let a of n.editStacks)a.locked&&s.push(a.resourceLabel);return s.length>0?this._tryToSplitAndRedo(e,t,null,g({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):n.isValid()?null:this._tryToSplitAndRedo(e,t,null,g({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){let n=this._getAffectedEditStacks(t),o=this._checkWorkspaceRedo(e,t,n,!1);return o?o.returnValue:this._executeWorkspaceRedo(e,t,n)}async _executeWorkspaceRedo(e,t,n){let o;try{o=await this._invokeWorkspacePrepare(t)}catch(s){return this._onError(s,t)}let r=this._checkWorkspaceRedo(e,t,n,!0);if(r)return o.dispose(),r.returnValue;for(let s of n.editStacks)s.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),n,o,()=>this._continueRedoInGroup(t.groupId))}_resourceRedo(e,t){if(!t.isValid){e.flushAllElements();return}if(e.locked){let n=g({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(t,n=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new NM([e]),n,()=>this._continueRedoInGroup(t.groupId))))}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(let[o,r]of this._editStacks){let s=r.getClosestFutureElement();s&&s.groupId===e&&(!t||s.groupOrder{AM=class{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}},QK=class{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){let t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n{_i();zx=vi("environmentService")});var IIt,het,xa,eY,tge,ige,nge,a1=P(()=>{U3();od();Ox();JK();xl();_i();Ju();Nc();IIt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},het=function(i,e){return function(t,n){e(t,n,i)}},xa=vi("ILanguageFeatureDebounceService");(function(i){let e=new WeakMap,t=0;function n(o){let r=e.get(o);return r===void 0&&(r=++t,e.set(o,r)),r}i.of=n})(eY||(eY={}));tge=class{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}},ige=class{constructor(e,t,n,o,r,s){this._logService=e,this._name=t,this._registry=n,this._default=o,this._min=r,this._max=s,this._cache=new nd(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((t,n)=>FT(eY.of(n),t),0)}get(e){let t=this._key(e),n=this._cache.get(t);return n?Ml(n.value,this._min,this._max):this.default()}update(e,t){let n=this._key(e),o=this._cache.get(n);o||(o=new QK(6),this._cache.set(n,o));let r=Ml(o.update(t),this._min,this._max);return PT(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${r}ms`),r}_overall(){let e=new AM;for(let[,t]of this._cache)e.update(t.value);return e.value}default(){let e=this._overall()|0||this._default;return Ml(e,this._min,this._max)}},nge=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,n){var o,r,s;let a=(o=n?.min)!==null&&o!==void 0?o:50,l=(r=n?.max)!==null&&r!==void 0?r:a**2,c=(s=n?.key)!==null&&s!==void 0?s:void 0,d=`${eY.of(e)},${a}${c?","+c:""}`,u=this._data.get(d);return u||(this._isDev?u=new ige(this._logService,t,e,this._overallAverage()|0||a*1.5,a,l):(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),u=new tge(a*1.5)),this._data.set(d,u)),u}_overallAverage(){let e=new AM;for(let t of this._data.values())e.update(t.default());return e.value}};nge=IIt([het(0,ks),het(1,zx)],nge);ln(xa,nge,1)});var tY,oge,iY,fet=P(()=>{Mi();Kt();Cb();tY=class i{static create(e,t){return new i(e,new oge(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){let e=this._tokens.getRange();return e&&new O(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn)}removeTokens(e){let t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,n,e.endColumn-1),this._updateEndLineNumber()}split(e){let t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber,[o,r,s]=this._tokens.split(t,e.startColumn-1,n,e.endColumn-1);return[new i(this._startLineNumber,o),new i(this._startLineNumber+s,r)]}applyEdit(e,t){let[n,o,r]=Qh(t);this.acceptEdit(e,n,o,r,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,n,o,r){this._acceptDeleteRange(e),this._acceptInsertText(new ke(e.startLineNumber,e.startColumn),t,n,o,r),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;let t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;if(n<0){let r=n-t;this._startLineNumber-=r;return}let o=this._tokens.getMaxDeltaLine();if(!(t>=o+1)){if(t<0&&n>=o+1){this._startLineNumber=0,this._tokens.clear();return}if(t<0){let r=-t;this._startLineNumber-=r,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,t,n,o,r){if(t===0&&n===0)return;let s=e.lineNumber-this._startLineNumber;if(s<0){this._startLineNumber+=t;return}let a=this._tokens.getMaxDeltaLine();s>=a+1||this._tokens.acceptInsertText(s,e.column-1,t,n,o,r)}},oge=class i{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){let t=[];for(let n=0;ne)n=o-1;else{let s=o;for(;s>t&&this._getDeltaLine(s-1)===e;)s--;let a=o;for(;ae||h===e&&p>=t)&&(he||p===e&&y>=t){if(pr?m-=r-n:m=n;else if(f===t&&p===n)if(f===o&&m>r)m-=r-n;else{d=!0;continue}else if(fr)f=t,p=n,m=p+(m-r);else{d=!0;continue}else if(f>o){if(l===0&&!d){c=a;break}f-=l}else if(f===o&&p>=r)e&&f===0&&(p+=e,m+=e),f-=l,p-=r-n,m-=r-n;else throw new Error("Not possible!");let _=4*c;s[_]=f,s[_+1]=p,s[_+2]=m,s[_+3]=y,c++}this._tokenCount=c}acceptInsertText(e,t,n,o,r,s){let a=n===0&&o===1&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),l=this._tokens,c=this._tokenCount;for(let d=0;dd&&n[5*v]===0;)v--;if(v-1===d){let b=u;for(;b+1S)e.warnOverlappingSemanticTokens(w,S+1);else{let A=e.getMetadata(D,E,t);A!==2147483647&&(p===0&&(p=w),h[f]=w-p,h[f+1]=S,h[f+2]=k,h[f+3]=A,f+=4,m=w,y=k)}l=w,c=S,a++}f!==h.length&&(h=h.subarray(0,f));let _=tY.create(p,h);s.push(_)}return s}var MIt,rge,nY,sge,oY,sY=P(()=>{B5();No();Ju();fet();Ha();MIt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},rge=function(i,e){return function(t,n){e(t,n,i)}},nY=class{constructor(e,t,n,o){this._legend=e,this._themeService=t,this._languageService=n,this._logService=o,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new oY}getMetadata(e,t,n){let o=this._languageService.languageIdCodec.encodeLanguageId(n),r=this._hashTable.get(e,t,o),s;if(r)s=r.metadata,this._logService.getLevel()===yl.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${Ls.getForeground(s)}, fontStyle ${Ls.getFontStyle(s).toString(2)}`);else{let a=this._legend.tokenTypes[e],l=[];if(a){let c=t;for(let u=0;c>0&&u>1;c>0&&this._logService.getLevel()===yl.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));let d=this._themeService.getColorTheme().getTokenStyleMetadata(a,l,n);if(typeof d>"u")s=2147483647;else{if(s=0,typeof d.italic<"u"){let u=(d.italic?1:0)<<11;s|=u|1}if(typeof d.bold<"u"){let u=(d.bold?2:0)<<11;s|=u|2}if(typeof d.underline<"u"){let u=(d.underline?4:0)<<11;s|=u|4}if(typeof d.strikethrough<"u"){let u=(d.strikethrough?8:0)<<11;s|=u|8}if(d.foreground){let u=d.foreground<<15;s|=u|16}s===0&&(s=2147483647)}}else this._logService.getLevel()===yl.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),s=2147483647,a="not-in-legend";this._hashTable.add(e,t,o,s),this._logService.getLevel()===yl.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${a}) / ${t} (${l.join(" ")}): foreground ${Ls.getForeground(s)}, fontStyle ${Ls.getFontStyle(s).toString(2)}`)}return s}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,n,o,r){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${n}: The provided start offset ${o} is outside the previous data (length ${r}).`))}};nY=MIt([rge(1,Mo),rge(2,Kn),rge(3,ks)],nY);sge=class{constructor(e,t,n,o){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=n,this.metadata=o,this.next=null}},oY=class i{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=i._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){let r=this._elements;this._currentLengthIndex++,this._currentLength=i._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{_i();Ab=vi("semanticTokensStylingService")});var NIt,age,lge,pet=P(()=>{nt();Ha();No();Ju();sY();aY();xl();NIt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},age=function(i,e){return function(t,n){e(t,n,i)}},lge=class extends ue{constructor(e,t,n){super(),this._themeService=e,this._logService=t,this._languageService=n,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new nY(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};lge=NIt([age(0,Mo),age(1,ks),age(2,Kn)],lge);ln(Ab,lge,1)});function get(i,e){switch(i){case 0:return"";case 1:return`${dY}*?`;default:return`(?:${cY}|${dY}+${cY}${e?`|${cY}${dY}+`:""})*?`}}function vet(i,e){if(!i)return[];let t=[],n=!1,o=!1,r="";for(let s of i){switch(s){case e:if(!n&&!o){t.push(r),r="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1;break}r+=s}return r&&t.push(r),t}function wet(i){if(!i)return"";let e="",t=vet(i,met);if(t.every(n=>n===lY))e=".*";else{let n=!1;t.forEach((o,r)=>{if(o===lY){if(n)return;e+=get(2,r===t.length-1)}else{let s=!1,a="",l=!1,c="";for(let d of o){if(d!=="}"&&s){a+=d;continue}if(l&&(d!=="]"||!c)){let u;d==="-"?u=d:(d==="^"||d==="!")&&!c?u="^":d===met?u="":u=va(d),c+=u;continue}switch(d){case"{":s=!0;continue;case"[":l=!0;continue;case"}":{let h=`(?:${vet(a,",").map(f=>wet(f)).join("|")})`;e+=h,s=!1,a="";break}case"]":{e+="["+c+"]",l=!1,c="";break}case"?":e+=dY;continue;case"*":e+=get(1);continue;default:e+=va(d)}}rdge(a,e)).filter(a=>a!==S2),i),n=t.length;if(!n)return S2;if(n===1)return t[0];let o=function(a,l){for(let c=0,d=t.length;c!!a.allBasenames);r&&(o.allBasenames=r.allBasenames);let s=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return s.length&&(o.allPaths=s),o}function Cet(i,e,t){let n=Zu===hs.sep,o=n?i:i.replace(AIt,Zu),r=Zu+o,s=hs.sep+i,a;return t?a=function(l,c){return typeof l=="string"&&(l===o||l.endsWith(r)||!n&&(l===i||l.endsWith(s)))?e:null}:a=function(l,c){return typeof l=="string"&&(l===o||!n&&l===i)?e:null},a.allPaths=[(t?"*/":"./")+i],a}function UIt(i){try{let e=new RegExp(`^${wet(i)}$`);return function(t){return e.lastIndex=0,typeof t=="string"&&e.test(t)?i:null}}catch{return S2}}function xet(i,e,t){return!i||typeof e!="string"?!1:uge(i)(e,void 0,t)}function uge(i,e={}){if(!i)return bet;if(typeof i=="string"||$It(i)){let t=dge(i,e);if(t===S2)return bet;let n=function(o,r){return!!t(o,r)};return t.allBasenames&&(n.allBasenames=t.allBasenames),t.allPaths&&(n.allPaths=t.allPaths),n}return jIt(i,e)}function $It(i){let e=i;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function jIt(i,e){let t=ket(Object.getOwnPropertyNames(i).map(a=>qIt(a,i[a],e)).filter(a=>a!==S2)),n=t.length;if(!n)return S2;if(!t.some(a=>!!a.requiresSiblings)){if(n===1)return t[0];let a=function(d,u){let h;for(let f=0,p=t.length;f{for(let f of h){let p=await f;if(typeof p=="string")return p}return null})():null},l=t.find(d=>!!d.allBasenames);l&&(a.allBasenames=l.allBasenames);let c=t.reduce((d,u)=>u.allPaths?d.concat(u.allPaths):d,[]);return c.length&&(a.allPaths=c),a}let o=function(a,l,c){let d,u;for(let h=0,f=t.length;h{for(let h of u){let f=await h;if(typeof f=="string")return f}return null})():null},r=t.find(a=>!!a.allBasenames);r&&(o.allBasenames=r.allBasenames);let s=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return s.length&&(o.allPaths=s),o}function qIt(i,e,t){if(e===!1)return S2;let n=dge(i,t);if(n===S2)return S2;if(typeof e=="boolean")return n;if(e){let o=e.when;if(typeof o=="string"){let r=(s,a,l,c)=>{if(!c||!n(s,a))return null;let d=o.replace("$(basename)",()=>l),u=c(d);return UU(u)?u.then(h=>h?i:null):u?i:null};return r.requiresSiblings=!0,r}}return n}function ket(i,e){let t=i.filter(a=>!!a.basenames);if(t.length<2)return i;let n=t.reduce((a,l)=>{let c=l.basenames;return c?a.concat(c):a},[]),o;if(e){o=[];for(let a=0,l=n.length;a{let c=l.patterns;return c?a.concat(c):a},[]);let r=function(a,l){if(typeof a!="string")return null;if(!l){let d;for(d=a.length;d>0;d--){let u=a.charCodeAt(d-1);if(u===47||u===92)break}l=a.substr(d)}let c=n.indexOf(l);return c!==-1?o[c]:null};r.basenames=n,r.patterns=o,r.allBasenames=n;let s=i.filter(a=>!a.basenames);return s.push(r),s}var lY,met,cY,dY,AIt,RIt,PIt,OIt,zIt,FIt,HIt,_et,bet,S2,hge=P(()=>{Qi();AG();od();Dg();Mn();Ri();lY="**",met="/",cY="[/\\\\]",dY="[^/\\\\]",AIt=/\//g;RIt=/^\*\*\/\*\.[\w\.-]+$/,PIt=/^\*\*\/([\w\.-]+)\/?$/,OIt=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,zIt=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,FIt=/^\*\*((\/[\w\.-]+)+)\/?$/,HIt=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,_et=new nd(1e4),bet=function(){return!1},S2=function(){return null}});function RM(i,e,t,n,o,r){if(Array.isArray(i)){let s=0;for(let a of i){let l=RM(a,e,t,n,o,r);if(l===10)return l;l>s&&(s=l)}return s}else{if(typeof i=="string")return n?i==="*"?5:i===t?10:0:0;if(i){let{language:s,pattern:a,scheme:l,hasAccessToAllModels:c,notebookType:d}=i;if(!n&&!c)return 0;d&&o&&(e=o);let u=0;if(l)if(l===e.scheme)u=10;else if(l==="*")u=5;else return 0;if(s)if(s===t)u=10;else if(s==="*")u=Math.max(u,5);else return 0;if(d)if(d===r)u=10;else if(d==="*"&&r!==void 0)u=Math.max(u,5);else return 0;if(a){let h;if(typeof a=="string"?h=a:h={...a,base:cW(a.base)},h===e.fsPath||xet(h,e.fsPath))u=10;else return 0}return u}else return 0}}var fge=P(()=>{hge();Dg()});function Let(i){return typeof i=="string"?!1:Array.isArray(i)?i.every(Let):!!i.exclusive}function PM(i){return typeof i=="string"?!1:Array.isArray(i)?i.some(PM):!!i.isBuiltin}var uY,ls,Eet=P(()=>{Xt();nt();Ca();fge();uY=class{constructor(e,t,n,o){this.uri=e,this.languageId=t,this.notebookUri=n,this.notebookType=o}equals(e){var t,n;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&((t=this.notebookUri)===null||t===void 0?void 0:t.toString())===((n=e.notebookUri)===null||n===void 0?void 0:n.toString())}},ls=class i{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new ge,this.onDidChange=this._onDidChange.event}register(e,t){let n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),Yt(()=>{if(n){let o=this._entries.indexOf(n);o>=0&&(this._entries.splice(o,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);let t=[];for(let n of this._entries)n._score>0&&t.push(n.provider);return t}ordered(e){let t=[];return this._orderedForEach(e,n=>t.push(n.provider)),t}orderedGroups(e){let t=[],n,o;return this._orderedForEach(e,r=>{n&&o===r._score?n.push(r.provider):(o=r._score,n=[r.provider],t.push(n))}),t}_orderedForEach(e,t){this._updateScores(e);for(let n of this._entries)n._score>0&&t(n)}_updateScores(e){var t,n;let o=(t=this._notebookInfoResolver)===null||t===void 0?void 0:t.call(this,e.uri),r=o?new uY(e.uri,e.getLanguageId(),o.uri,o.type):new uY(e.uri,e.getLanguageId(),void 0,void 0);if(!(!((n=this._lastCandidate)===null||n===void 0)&&n.equals(r))){this._lastCandidate=r;for(let s of this._entries)if(s._score=RM(s.selector,r.uri,r.languageId,z$(e),r.notebookUri,r.notebookType),Let(s.selector)&&s._score>0){for(let a of this._entries)a._score=0;s._score=1e3;break}this._entries.sort(i._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:PM(e.selector)&&!PM(t.selector)?1:!PM(e.selector)&&PM(t.selector)?-1:e._timet._time?-1:0}}});var pge,Det=P(()=>{Eet();Yn();xl();pge=class{constructor(){this.referenceProvider=new ls(this._score.bind(this)),this.renameProvider=new ls(this._score.bind(this)),this.codeActionProvider=new ls(this._score.bind(this)),this.definitionProvider=new ls(this._score.bind(this)),this.typeDefinitionProvider=new ls(this._score.bind(this)),this.declarationProvider=new ls(this._score.bind(this)),this.implementationProvider=new ls(this._score.bind(this)),this.documentSymbolProvider=new ls(this._score.bind(this)),this.inlayHintsProvider=new ls(this._score.bind(this)),this.colorProvider=new ls(this._score.bind(this)),this.codeLensProvider=new ls(this._score.bind(this)),this.documentFormattingEditProvider=new ls(this._score.bind(this)),this.documentRangeFormattingEditProvider=new ls(this._score.bind(this)),this.onTypeFormattingEditProvider=new ls(this._score.bind(this)),this.signatureHelpProvider=new ls(this._score.bind(this)),this.hoverProvider=new ls(this._score.bind(this)),this.documentHighlightProvider=new ls(this._score.bind(this)),this.multiDocumentHighlightProvider=new ls(this._score.bind(this)),this.selectionRangeProvider=new ls(this._score.bind(this)),this.foldingRangeProvider=new ls(this._score.bind(this)),this.linkProvider=new ls(this._score.bind(this)),this.inlineCompletionsProvider=new ls(this._score.bind(this)),this.completionProvider=new ls(this._score.bind(this)),this.linkedEditingRangeProvider=new ls(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new ls(this._score.bind(this)),this.documentSemanticTokensProvider=new ls(this._score.bind(this)),this.documentOnDropEditProvider=new ls(this._score.bind(this)),this.documentPasteEditProvider=new ls(this._score.bind(this))}_score(e){var t;return(t=this._notebookTypeResolver)===null||t===void 0?void 0:t.call(this,e)}};ln(Rt,pge,1)});var Fx,hY=P(()=>{_i();Fx=vi("hoverService")});var Pc,ca,Id=P(()=>{_i();Pc=vi("contextViewService"),ca=vi("contextMenuService")});var Tet=P(()=>{});var Iet=P(()=>{});function pY(i,e){return i&&e?g("acessibleViewHint","Inspect this in the accessible view with {0}.",e):i?g("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}var fY,Rv,Hx,mY=P(()=>{Qt();Gl();o1();nt();Iet();Wt();fY=pt,Rv=class extends ue{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new gp(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}},Hx=class i extends ue{static render(e,t,n){return new i(e,t,n)}constructor(e,t,n){super(),this.actionContainer=ut(e,fY("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=ut(this.actionContainer,fY("a.action")),this.action.setAttribute("role","button"),t.iconClass&&ut(this.action,fY(`span.icon.${t.iconClass}`));let o=ut(this.action,fY("span"));o.textContent=n?`${t.label} (${n})`:t.label,this._register(Xe(this.actionContainer,Lt.CLICK,r=>{r.stopPropagation(),r.preventDefault(),t.run(this.actionContainer)})),this._register(Xe(this.actionContainer,Lt.KEY_DOWN,r=>{let s=new qn(r);(s.equals(3)||s.equals(10))&&(r.stopPropagation(),r.preventDefault(),t.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}});function Met(i){let e,t=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(i.fragment);return t&&(e={startLineNumber:parseInt(t[1]),startColumn:t[2]?parseInt(t[2]):1,endLineNumber:t[4]?parseInt(t[4]):void 0,endColumn:t[4]?t[5]?parseInt(t[5]):1:void 0},i=i.with({fragment:""})),{selection:e,uri:i}}var Xr,sd=P(()=>{_i();Xr=vi("openerService")});function Net(i,e={}){let t=gY(e);return t.textContent=i,t}function Aet(i,e={}){let t=gY(e);return Ret(t,GIt(i,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),t}function gY(i){let e=i.inline?"span":"div",t=document.createElement(e);return i.className&&(t.className=i.className),t}function Ret(i,e,t,n){let o;if(e.type===2)o=document.createTextNode(e.content||"");else if(e.type===3)o=document.createElement("b");else if(e.type===4)o=document.createElement("i");else if(e.type===7&&n)o=document.createElement("code");else if(e.type===5&&t){let r=document.createElement("a");t.disposables.add(go(r,"click",s=>{t.callback(String(e.index),s)})),o=r}else e.type===8?o=document.createElement("br"):e.type===1&&(o=i);o&&i!==o&&i.appendChild(o),o&&Array.isArray(e.children)&&e.children.forEach(r=>{Ret(o,r,t,n)})}function GIt(i,e){let t={type:1,children:[]},n=0,o=t,r=[],s=new mge(i);for(;!s.eos();){let a=s.next(),l=a==="\\"&&gge(s.peek(),e)!==0;if(l&&(a=s.next()),!l&&KIt(a,e)&&a===s.peek()){s.advance(),o.type===2&&(o=r.pop());let c=gge(a,e);if(o.type===c||o.type===5&&c===6)o=r.pop();else{let d={type:c,children:[]};c===5&&(d.index=n,n++),o.children.push(d),r.push(o),o=d}}else if(a===` +`)o.type===2&&(o=r.pop()),o.children.push({type:8});else if(o.type!==2){let c={type:2,content:a};o.children.push(c),r.push(o),o=c}else o.content+=a}return o.type===2&&(o=r.pop()),r.length,t}function KIt(i,e){return gge(i,e)!==0}function gge(i,e){switch(i){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}var mge,vge=P(()=>{Qt();mge=class{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){let e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}});function of(i){let e=new Array,t,n=0,o=0;for(;(t=YIt.exec(i))!==null;){o=t.index||0,n{Qt();or();YIt=new RegExp(`(\\\\)?\\$\\((${ui.iconNameExpression}(?:${ui.iconModifierExpression})?)\\)`,"g")});function Pet(i){let e=ZIt(i);if(e&&e.length>0)return new Uint32Array(e)}function ZIt(i){if(rf=0,k2(i,_ge,4352),rf>0||(k2(i,bge,4449),rf>0)||(k2(i,yge,4520),rf>0)||(k2(i,Rb,12593),rf))return Ov.subarray(0,rf);if(i>=44032&&i<=55203){let e=i-44032,t=e%588,n=Math.floor(e/588),o=Math.floor(t/28),r=t%28-1;if(n<_ge.length?k2(n,_ge,0):4352+n-12593=0&&(r0)return Ov.subarray(0,rf)}}function k2(i,e,t){i>=t&&i>8&&(Ov[rf++]=i>>8&255),i>>16&&(Ov[rf++]=i>>16&255))}var rf,Ov,_ge,bge,yge,Rb,Oet=P(()=>{rf=0,Ov=new Uint32Array(10);_ge=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),bge=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),yge=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),Rb=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108])});function yY(...i){return function(e,t){for(let n=0,o=i.length;n0?[{start:0,end:e.length}]:[]:null}function Ege(i,e){let t=e.toLowerCase().indexOf(i.toLowerCase());return t===-1?null:[{start:t,end:t+i.length}]}function Dge(i,e){return xge(i.toLowerCase(),e.toLowerCase(),0,0)}function xge(i,e,t,n){if(t===i.length)return[];if(n===e.length)return null;if(i[t]===e[n]){let o=null;return(o=xge(i,e,t+1,n+1))?Mge({start:n,end:n+1},o):null}return xge(i,e,t,n+1)}function Tge(i){return 97<=i&&i<=122}function CY(i){return 65<=i&&i<=90}function Ige(i){return 48<=i&&i<=57}function Wet(i){return i===32||i===9||i===10||i===13}function bY(i){return Wet(i)||Uet.has(i)}function zet(i,e){return i===e||bY(i)&&bY(e)}function Fet(i){if(Cge.has(i))return Cge.get(i);let e,t=Pet(i);return t&&(e=t),Cge.set(i,e),e}function $et(i){return Tge(i)||CY(i)||Ige(i)}function Mge(i,e){return e.length===0?e=[i]:i.end===e[0].start?e[0].start=i.start:e.unshift(i),e}function jet(i,e){for(let t=e;t0&&!$et(i.charCodeAt(t-1)))return t}return i.length}function Sge(i,e,t,n){if(t===i.length)return[];if(n===e.length)return null;if(i[t]!==e[n].toLowerCase())return null;{let o=null,r=n+1;for(o=Sge(i,e,t+1,n+1);!o&&(r=jet(e,r)).6}function eMt(i){let{upperPercent:e,lowerPercent:t,alphaPercent:n,numericPercent:o}=i;return t>.2&&e<.8&&n>.6&&o<.2}function tMt(i){let e=0,t=0,n=0,o=0;for(let r=0;r60)return null;let t=QIt(e);if(!eMt(t)){if(!JIt(t))return null;e=e.toLowerCase()}let n=null,o=0;for(i=i.toLowerCase();o0&&bY(i.charCodeAt(t-1)))return t;return i.length}function Nge(i,e,t=!1){if(typeof i!="string"||typeof e!="string")return null;let n=Het.get(i);n||(n=new RegExp(rqe(i),"i"),Het.set(i,n));let o=n.exec(e);return o?[{start:o.index,end:o.index+o[0].length}]:t?nMt(i,e):iMt(i,e)}function Yet(i,e){let t=E2(i,i.toLowerCase(),0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return t?Bv(t):null}function Zet(i,e,t,n,o,r){let s=Math.min(13,i.length);for(;t"u")return[];let e=[],t=i[1];for(let n=i.length-1;n>1;n--){let o=i[n]+t,r=e[e.length-1];r&&r.end===o?r.end=o+1:e.push({start:o,end:o+1})}return e}function Age(){let i=[],e=[];for(let t=0;t<=Fv;t++)e[t]=0;for(let t=0;t<=Fv;t++)i.push(e.slice(0));return i}function Xet(i){let e=[];for(let t=0;t<=i;t++)e[t]=0;return e}function wge(i,e,t,n,o){function r(a,l,c=" "){for(;a.lengthr(a,3)).join("|")} `;for(let a=0;a<=t;a++)a===0?s+=" |":s+=`${e[a-1]}|`,s+=i[a].slice(0,o+1).map(l=>r(l.toString(),3)).join("|")+` -`;return s}function rMt(i,e,t,n){i=i.substr(e),t=t.substr(n),console.log(wge(Ov,i,i.length,t,t.length)),console.log(wge(OM,i,i.length,t,t.length)),console.log(wge(L2,i,i.length,t,t.length))}function pY(i,e){if(e<0||e>=i.length)return!1;let t=i.codePointAt(e);switch(t){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!yT(t)}}function Bet(i,e){if(e<0||e>=i.length)return!1;switch(i.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function mY(i,e,t){return e[i]!==t[i]}function sMt(i,e,t,n,o,r,s=!1){for(;ezv?zv:i.length,l=n.length>zv?zv:n.length;if(t>=a||r>=l||a-t>l-r||!sMt(e,t,a,o,r,l,!0))return;aMt(a,l,t,r,e,o);let c=1,d=1,u=t,h=r,f=[!1];for(c=1,u=t;uv,D=k?Ov[c][d-1]+(L2[c][d-1]>0?-5:0):0,E=h>v+1&&L2[c][d-1]>0,A=E?Ov[c][d-2]+(L2[c][d-2]>0?-5:0):0;if(E&&(!k||A>=D)&&(!S||A>=x))Ov[c][d]=A,OM[c][d]=3,L2[c][d]=0;else if(k&&(!S||D>=x))Ov[c][d]=D,OM[c][d]=2,L2[c][d]=0;else if(S)Ov[c][d]=x,OM[c][d]=1,L2[c][d]=L2[c-1][d-1]+1;else throw new Error("not possible")}}if(oMt&&rMt(i,t,n,r),!f[0]&&!s.firstMatchCanBeWeak)return;c--,d--;let p=[Ov[c][d],r],m=0,y=0;for(;c>=1;){let v=d;do{let b=OM[c][v];if(b===3)v=v-2;else if(b===2)v=v-1;else break}while(v>=1);m>1&&e[t+c-1]===o[r+d-1]&&!mY(v+r-1,n,o)&&m+1>L2[c][v]&&(v=d),v===d?m++:m=1,y||(y=v),c--,d=v-1,p.push(d)}l===a&&s.boostFullMatch&&(p[0]+=2);let _=y-a;return p[0]-=_,p}function aMt(i,e,t,n,o,r){let s=i-1,a=e-1;for(;s>=t&&a>=n;)o[s]===r[a]&&(Lge[s]=a,s--),a--}function lMt(i,e,t,n,o,r,s,a,l,c,d){if(e[t]!==r[s])return Number.MIN_SAFE_INTEGER;let u=1,h=!1;return s===t-n?u=i[t]===o[s]?7:5:mY(s,o,r)&&(s===0||!mY(s-1,o,r))?(u=i[t]===o[s]?7:5,h=!0):pY(r,s)&&(s===0||!pY(r,s-1))?u=5:(pY(r,s-1)||Bet(r,s-1))&&(u=5,h=!0),u>1&&t===n&&(d[0]=!0),h||(h=mY(s,o,r)||pY(r,s-1)||Bet(r,s-1)),t===n?s>l&&(u-=h?3:5):c?u+=h?2:0:u+=h?0:1,s+1===a&&(u-=h?3:5),u}function Jet(i,e,t,n,o,r,s){return cMt(i,e,t,n,o,r,!0,s)}function cMt(i,e,t,n,o,r,s,a){let l=E2(i,e,t,n,o,r,a);if(l&&!s)return l;if(i.length>=3){let c=Math.min(7,i.length-1);for(let d=t+1;dl[0])&&(l=h))}}}return l}function dMt(i,e){if(e+1>=i.length)return;let t=i[e],n=i[e+1];if(t!==n)return i.slice(0,e)+n+t+i.slice(e+2)}var AOi,Pb,Uet,Cge,iMt,nMt,Het,zv,Qet,Lge,L2,Ov,OM,oMt,_u,Fv,l1=P(()=>{od();Oet();Ri();AOi=Vet.bind(void 0,!1),Pb=Vet.bind(void 0,!0);Uet=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(i=>Uet.add(i.charCodeAt(0)));Cge=new Map;iMt=vY(Pb,qet,Ege),nMt=vY(Pb,qet,Dge),Het=new nd(1e4);zv=128;Qet=Xet(2*zv),Lge=Xet(2*zv),L2=Age(),Ov=Age(),OM=Age(),oMt=!1;(function(i){i.Default=[-100,0];function e(t){return!t||t.length===2&&t[0]===-100&&t[1]===0}i.isDefault=e})(_u||(_u={}));Fv=class{constructor(e,t){this.firstMatchCanBeWeak=e,this.boostFullMatch=t}};Fv.default={boostFullMatch:!0,firstMatchCanBeWeak:!1}});function ett(i){return i.replace(hMt,(e,t)=>t?e:`\\${e}`)}function ttt(i){return i.replace(fMt,e=>`\\${e}`)}function Vx(i){return i.indexOf(uMt)===-1?i:i.replace(pMt,(e,t,n,o)=>n?e:t||o||"")}function itt(i){return i?i.replace(/\$\((.*?)\)/g,(e,t)=>` ${t} `).trim():""}function Wx(i){Rge.lastIndex=0;let e="",t=[],n=0;for(;;){let o=Rge.lastIndex,r=Rge.exec(i),s=i.substring(o,r?.index);if(s.length>0){e+=s;for(let a=0;a{l1();Ri();or();uMt="$(",Pge=new RegExp(`\\$\\(${ui.iconNameExpression}(?:${ui.iconModifierExpression})?\\)`,"g"),hMt=new RegExp(`(\\\\)?${Pge.source}`,"g");fMt=new RegExp(`\\\\${Pge.source}`,"g");pMt=new RegExp(`(\\s)?(\\\\)?${Pge.source}(\\s)?`,"g");Rge=new RegExp(`\\$\\(${ui.iconNameCharacter}+\\)`,"g")});function k4(i){return sf(i)?!i.value:Array.isArray(i)?i.every(k4):!0}function sf(i){return i instanceof cs?!0:i&&typeof i=="object"?typeof i.value=="string"&&(typeof i.isTrusted=="boolean"||typeof i.isTrusted=="object"||i.isTrusted===void 0)&&(typeof i.supportThemeIcons=="boolean"||i.supportThemeIcons===void 0):!1}function ntt(i,e){return i===e?!0:!i||!e?!1:i.value===e.value&&i.isTrusted===e.isTrusted&&i.supportThemeIcons===e.supportThemeIcons&&i.supportHtml===e.supportHtml&&(i.baseUri===e.baseUri||!!i.baseUri&&!!e.baseUri&&_x(li.from(i.baseUri),li.from(e.baseUri)))}function mMt(i){return i.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}function gMt(i,e){var t,n;let o=(n=(t=i.match(/^`+/gm))===null||t===void 0?void 0:t.reduce((s,a)=>s.length>a.length?s:a).length)!==null&&n!==void 0?n:0,r=o>=3?o+1:3;return[`${"`".repeat(r)}${e}`,i,`${"`".repeat(r)}`].join(` -`)}function zM(i){return i.replace(/"/g,""")}function yY(i){return i&&i.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}function ott(i){let e=[],t=i.split("|").map(o=>o.trim());i=t[0];let n=t[1];if(n){let o=/height=(\d+)/.exec(n),r=/width=(\d+)/.exec(n),s=o?o[1]:"",a=r?r[1]:"",l=isFinite(parseInt(a)),c=isFinite(parseInt(s));l&&e.push(`width="${a}"`),c&&e.push(`height="${s}"`)}return{href:i,dimensions:e}}var cs,Md=P(()=>{Pi();Ob();ec();Ri();Io();cs=class{constructor(e="",t=!1){var n,o,r;if(this.value=e,typeof this.value!="string")throw gl("value");typeof t=="boolean"?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=(n=t.isTrusted)!==null&&n!==void 0?n:void 0,this.supportThemeIcons=(o=t.supportThemeIcons)!==null&&o!==void 0?o:!1,this.supportHtml=(r=t.supportHtml)!==null&&r!==void 0?r:!1)}appendText(e,t=0){return this.value+=mMt(this.supportThemeIcons?ett(e):e).replace(/([ \t]+)/g,(n,o)=>" ".repeat(o.length)).replace(/\>/gm,"\\>").replace(/\n/g,t===1?`\\ +`;return s}function rMt(i,e,t,n){i=i.substr(e),t=t.substr(n),console.log(wge(zv,i,i.length,t,t.length)),console.log(wge(OM,i,i.length,t,t.length)),console.log(wge(L2,i,i.length,t,t.length))}function vY(i,e){if(e<0||e>=i.length)return!1;let t=i.codePointAt(e);switch(t){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!yT(t)}}function Bet(i,e){if(e<0||e>=i.length)return!1;switch(i.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function _Y(i,e,t){return e[i]!==t[i]}function sMt(i,e,t,n,o,r,s=!1){for(;eFv?Fv:i.length,l=n.length>Fv?Fv:n.length;if(t>=a||r>=l||a-t>l-r||!sMt(e,t,a,o,r,l,!0))return;aMt(a,l,t,r,e,o);let c=1,d=1,u=t,h=r,f=[!1];for(c=1,u=t;uv,D=k?zv[c][d-1]+(L2[c][d-1]>0?-5:0):0,E=h>v+1&&L2[c][d-1]>0,A=E?zv[c][d-2]+(L2[c][d-2]>0?-5:0):0;if(E&&(!k||A>=D)&&(!S||A>=x))zv[c][d]=A,OM[c][d]=3,L2[c][d]=0;else if(k&&(!S||D>=x))zv[c][d]=D,OM[c][d]=2,L2[c][d]=0;else if(S)zv[c][d]=x,OM[c][d]=1,L2[c][d]=L2[c-1][d-1]+1;else throw new Error("not possible")}}if(oMt&&rMt(i,t,n,r),!f[0]&&!s.firstMatchCanBeWeak)return;c--,d--;let p=[zv[c][d],r],m=0,y=0;for(;c>=1;){let v=d;do{let b=OM[c][v];if(b===3)v=v-2;else if(b===2)v=v-1;else break}while(v>=1);m>1&&e[t+c-1]===o[r+d-1]&&!_Y(v+r-1,n,o)&&m+1>L2[c][v]&&(v=d),v===d?m++:m=1,y||(y=v),c--,d=v-1,p.push(d)}l===a&&s.boostFullMatch&&(p[0]+=2);let _=y-a;return p[0]-=_,p}function aMt(i,e,t,n,o,r){let s=i-1,a=e-1;for(;s>=t&&a>=n;)o[s]===r[a]&&(Lge[s]=a,s--),a--}function lMt(i,e,t,n,o,r,s,a,l,c,d){if(e[t]!==r[s])return Number.MIN_SAFE_INTEGER;let u=1,h=!1;return s===t-n?u=i[t]===o[s]?7:5:_Y(s,o,r)&&(s===0||!_Y(s-1,o,r))?(u=i[t]===o[s]?7:5,h=!0):vY(r,s)&&(s===0||!vY(r,s-1))?u=5:(vY(r,s-1)||Bet(r,s-1))&&(u=5,h=!0),u>1&&t===n&&(d[0]=!0),h||(h=_Y(s,o,r)||vY(r,s-1)||Bet(r,s-1)),t===n?s>l&&(u-=h?3:5):c?u+=h?2:0:u+=h?0:1,s+1===a&&(u-=h?3:5),u}function Jet(i,e,t,n,o,r,s){return cMt(i,e,t,n,o,r,!0,s)}function cMt(i,e,t,n,o,r,s,a){let l=E2(i,e,t,n,o,r,a);if(l&&!s)return l;if(i.length>=3){let c=Math.min(7,i.length-1);for(let d=t+1;dl[0])&&(l=h))}}}return l}function dMt(i,e){if(e+1>=i.length)return;let t=i[e],n=i[e+1];if(t!==n)return i.slice(0,e)+n+t+i.slice(e+2)}var ROi,Pb,Uet,Cge,iMt,nMt,Het,Fv,Qet,Lge,L2,zv,OM,oMt,_u,Hv,l1=P(()=>{od();Oet();Ri();ROi=Vet.bind(void 0,!1),Pb=Vet.bind(void 0,!0);Uet=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(i=>Uet.add(i.charCodeAt(0)));Cge=new Map;iMt=yY(Pb,qet,Ege),nMt=yY(Pb,qet,Dge),Het=new nd(1e4);Fv=128;Qet=Xet(2*Fv),Lge=Xet(2*Fv),L2=Age(),zv=Age(),OM=Age(),oMt=!1;(function(i){i.Default=[-100,0];function e(t){return!t||t.length===2&&t[0]===-100&&t[1]===0}i.isDefault=e})(_u||(_u={}));Hv=class{constructor(e,t){this.firstMatchCanBeWeak=e,this.boostFullMatch=t}};Hv.default={boostFullMatch:!0,firstMatchCanBeWeak:!1}});function ett(i){return i.replace(hMt,(e,t)=>t?e:`\\${e}`)}function ttt(i){return i.replace(fMt,e=>`\\${e}`)}function Vx(i){return i.indexOf(uMt)===-1?i:i.replace(pMt,(e,t,n,o)=>n?e:t||o||"")}function itt(i){return i?i.replace(/\$\((.*?)\)/g,(e,t)=>` ${t} `).trim():""}function Wx(i){Rge.lastIndex=0;let e="",t=[],n=0;for(;;){let o=Rge.lastIndex,r=Rge.exec(i),s=i.substring(o,r?.index);if(s.length>0){e+=s;for(let a=0;a{l1();Ri();or();uMt="$(",Pge=new RegExp(`\\$\\(${ui.iconNameExpression}(?:${ui.iconModifierExpression})?\\)`,"g"),hMt=new RegExp(`(\\\\)?${Pge.source}`,"g");fMt=new RegExp(`\\\\${Pge.source}`,"g");pMt=new RegExp(`(\\s)?(\\\\)?${Pge.source}(\\s)?`,"g");Rge=new RegExp(`\\$\\(${ui.iconNameCharacter}+\\)`,"g")});function k4(i){return sf(i)?!i.value:Array.isArray(i)?i.every(k4):!0}function sf(i){return i instanceof cs?!0:i&&typeof i=="object"?typeof i.value=="string"&&(typeof i.isTrusted=="boolean"||typeof i.isTrusted=="object"||i.isTrusted===void 0)&&(typeof i.supportThemeIcons=="boolean"||i.supportThemeIcons===void 0):!1}function ntt(i,e){return i===e?!0:!i||!e?!1:i.value===e.value&&i.isTrusted===e.isTrusted&&i.supportThemeIcons===e.supportThemeIcons&&i.supportHtml===e.supportHtml&&(i.baseUri===e.baseUri||!!i.baseUri&&!!e.baseUri&&_x(li.from(i.baseUri),li.from(e.baseUri)))}function mMt(i){return i.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}function gMt(i,e){var t,n;let o=(n=(t=i.match(/^`+/gm))===null||t===void 0?void 0:t.reduce((s,a)=>s.length>a.length?s:a).length)!==null&&n!==void 0?n:0,r=o>=3?o+1:3;return[`${"`".repeat(r)}${e}`,i,`${"`".repeat(r)}`].join(` +`)}function zM(i){return i.replace(/"/g,""")}function xY(i){return i&&i.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}function ott(i){let e=[],t=i.split("|").map(o=>o.trim());i=t[0];let n=t[1];if(n){let o=/height=(\d+)/.exec(n),r=/width=(\d+)/.exec(n),s=o?o[1]:"",a=r?r[1]:"",l=isFinite(parseInt(a)),c=isFinite(parseInt(s));l&&e.push(`width="${a}"`),c&&e.push(`height="${s}"`)}return{href:i,dimensions:e}}var cs,Md=P(()=>{Pi();Ob();ec();Ri();Io();cs=class{constructor(e="",t=!1){var n,o,r;if(this.value=e,typeof this.value!="string")throw gl("value");typeof t=="boolean"?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=(n=t.isTrusted)!==null&&n!==void 0?n:void 0,this.supportThemeIcons=(o=t.supportThemeIcons)!==null&&o!==void 0?o:!1,this.supportHtml=(r=t.supportHtml)!==null&&r!==void 0?r:!1)}appendText(e,t=0){return this.value+=mMt(this.supportThemeIcons?ett(e):e).replace(/([ \t]+)/g,(n,o)=>" ".repeat(o.length)).replace(/\>/gm,"\\>").replace(/\n/g,t===1?`\\ `:` `),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+=` ${gMt(t,e)} -`,this}appendLink(e,t,n){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),n&&(this.value+=` "${this._escape(this._escape(n,'"'),")")}"`),this.value+=")",this}_escape(e,t){let n=new RegExp(va(t),"g");return e.replace(n,(o,r)=>e.charAt(r-1)!=="\\"?`\\${o}`:o)}}});var zb,FM,HM=P(()=>{zb=class{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}},FM=new zb("id#")});var Nd,qOi,GOi,KOi,YOi,ZOi,XOi,QOi,JOi,Pm,ezi,tzi,izi,nzi,ozi,rzi,szi,rtt=P(()=>{Nd={};(function(){function i(e,t){t(Nd)}i.amd=!0,function(e,t){typeof i=="function"&&i.amd?i(["exports"],t):typeof exports=="object"&&typeof module<"u"?t(exports):(e=typeof globalThis<"u"?globalThis:e||self,t(e.marked={}))}(this,function(e){"use strict";function t(_e,$){for(var j=0;j<$.length;j++){var B=$[j];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(_e,B.key,B)}}function n(_e,$,j){return $&&t(_e.prototype,$),j&&t(_e,j),Object.defineProperty(_e,"prototype",{writable:!1}),_e}function o(_e,$){if(_e){if(typeof _e=="string")return r(_e,$);var j=Object.prototype.toString.call(_e).slice(8,-1);if(j==="Object"&&_e.constructor&&(j=_e.constructor.name),j==="Map"||j==="Set")return Array.from(_e);if(j==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j))return r(_e,$)}}function r(_e,$){($==null||$>_e.length)&&($=_e.length);for(var j=0,B=new Array($);j<$;j++)B[j]=_e[j];return B}function s(_e,$){var j=typeof Symbol<"u"&&_e[Symbol.iterator]||_e["@@iterator"];if(j)return(j=j.call(_e)).next.bind(j);if(Array.isArray(_e)||(j=o(_e))||$&&_e&&typeof _e.length=="number"){j&&(_e=j);var B=0;return function(){return B>=_e.length?{done:!0}:{done:!1,value:_e[B++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +`,this}appendLink(e,t,n){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),n&&(this.value+=` "${this._escape(this._escape(n,'"'),")")}"`),this.value+=")",this}_escape(e,t){let n=new RegExp(va(t),"g");return e.replace(n,(o,r)=>e.charAt(r-1)!=="\\"?`\\${o}`:o)}}});var zb,FM,HM=P(()=>{zb=class{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}},FM=new zb("id#")});var Nd,GOi,KOi,YOi,ZOi,XOi,QOi,JOi,ezi,Pm,tzi,izi,nzi,ozi,rzi,szi,azi,rtt=P(()=>{Nd={};(function(){function i(e,t){t(Nd)}i.amd=!0,function(e,t){typeof i=="function"&&i.amd?i(["exports"],t):typeof exports=="object"&&typeof module<"u"?t(exports):(e=typeof globalThis<"u"?globalThis:e||self,t(e.marked={}))}(this,function(e){"use strict";function t(_e,$){for(var j=0;j<$.length;j++){var B=$[j];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(_e,B.key,B)}}function n(_e,$,j){return $&&t(_e.prototype,$),j&&t(_e,j),Object.defineProperty(_e,"prototype",{writable:!1}),_e}function o(_e,$){if(_e){if(typeof _e=="string")return r(_e,$);var j=Object.prototype.toString.call(_e).slice(8,-1);if(j==="Object"&&_e.constructor&&(j=_e.constructor.name),j==="Map"||j==="Set")return Array.from(_e);if(j==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j))return r(_e,$)}}function r(_e,$){($==null||$>_e.length)&&($=_e.length);for(var j=0,B=new Array($);j<$;j++)B[j]=_e[j];return B}function s(_e,$){var j=typeof Symbol<"u"&&_e[Symbol.iterator]||_e["@@iterator"];if(j)return(j=j.call(_e)).next.bind(j);if(Array.isArray(_e)||(j=o(_e))||$&&_e&&typeof _e.length=="number"){j&&(_e=j);var B=0;return function(){return B>=_e.length?{done:!0}:{done:!1,value:_e[B++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.defaults=a();function l(_e){e.defaults=_e}var c=/[&<>"']/,d=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,h=/[<>"']|&(?!#?\w+;)/g,f={"&":"&","<":"<",">":">",'"':""","'":"'"},p=function($){return f[$]};function m(_e,$){if($){if(c.test(_e))return _e.replace(d,p)}else if(u.test(_e))return _e.replace(h,p);return _e}var y=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function _(_e){return _e.replace(y,function($,j){return j=j.toLowerCase(),j==="colon"?":":j.charAt(0)==="#"?j.charAt(1)==="x"?String.fromCharCode(parseInt(j.substring(2),16)):String.fromCharCode(+j.substring(1)):""})}var v=/(^|[^\[])\^/g;function b(_e,$){_e=typeof _e=="string"?_e:_e.source,$=$||"";var j={replace:function(q,le){return le=le.source||le,le=le.replace(v,"$1"),_e=_e.replace(q,le),j},getRegex:function(){return new RegExp(_e,$)}};return j}var C=/[^\w:]/g,w=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function S(_e,$,j){if(_e){var B;try{B=decodeURIComponent(_(j)).replace(C,"").toLowerCase()}catch{return null}if(B.indexOf("javascript:")===0||B.indexOf("vbscript:")===0||B.indexOf("data:")===0)return null}$&&!w.test(j)&&(j=A($,j));try{j=encodeURI(j).replace(/%25/g,"%")}catch{return null}return j}var x={},k=/^[^:]+:\/*[^/]*$/,D=/^([^:]+:)[\s\S]*$/,E=/^([^:]+:\/*[^/]*)[\s\S]*$/;function A(_e,$){x[" "+_e]||(k.test(_e)?x[" "+_e]=_e+"/":x[" "+_e]=M(_e,"/",!0)),_e=x[" "+_e];var j=_e.indexOf(":")===-1;return $.substring(0,2)==="//"?j?$:_e.replace(D,"$1")+$:$.charAt(0)==="/"?j?$:_e.replace(E,"$1")+$:_e+$}var T={exec:function(){}};function L(_e){for(var $=1,j,B;$=0&&Pe[ht]==="\\";)Ue=!Ue;return Ue?"|":" |"}),B=j.split(/ \|/),q=0;if(B[0].trim()||B.shift(),B.length>0&&!B[B.length-1].trim()&&B.pop(),B.length>$)B.splice($);else for(;B.length<$;)B.push("");for(;q1;)$&1&&(j+=_e),$>>=1,_e+=_e;return j+_e}function V(_e,$,j,B){var q=$.href,le=$.title?m($.title):null,ce=_e[1].replace(/\\([\[\]])/g,"$1");if(_e[0].charAt(0)!=="!"){B.state.inLink=!0;var Pe={type:"link",raw:j,href:q,title:le,text:ce,tokens:B.inlineTokens(ce)};return B.state.inLink=!1,Pe}return{type:"image",raw:j,href:q,title:le,text:m(ce)}}function ie(_e,$){var j=_e.match(/^(\s+)(?:```)/);if(j===null)return $;var B=j[1];return $.split(` `).map(function(q){var le=q.match(/^\s+/);if(le===null)return q;var ce=le[0];return ce.length>=B.length?q.slice(B.length):q}).join(` `)}var fe=function(){function _e(j){this.options=j||e.defaults}var $=_e.prototype;return $.space=function(B){var q=this.rules.block.newline.exec(B);if(q&&q[0].length>0)return{type:"space",raw:q[0]}},$.code=function(B){var q=this.rules.block.code.exec(B);if(q){var le=q[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:q[0],codeBlockStyle:"indented",text:this.options.pedantic?le:M(le,` @@ -157,17 +157,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `)},$.strong=function(B){return""+B+""},$.em=function(B){return""+B+""},$.codespan=function(B){return""+B+""},$.br=function(){return this.options.xhtml?"
":"
"},$.del=function(B){return""+B+""},$.link=function(B,q,le){if(B=S(this.options.sanitize,this.options.baseUrl,B),B===null)return le;var ce='",ce},$.image=function(B,q,le){if(B=S(this.options.sanitize,this.options.baseUrl,B),B===null)return le;var ce=''+le+'":">",ce},$.text=function(B){return B},_e}(),ee=function(){function _e(){}var $=_e.prototype;return $.strong=function(B){return B},$.em=function(B){return B},$.codespan=function(B){return B},$.del=function(B){return B},$.html=function(B){return B},$.text=function(B){return B},$.link=function(B,q,le){return""+le},$.image=function(B,q,le){return""+le},$.br=function(){return""},_e}(),Z=function(){function _e(){this.seen={}}var $=_e.prototype;return $.serialize=function(B){return B.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},$.getNextSafeSlug=function(B,q){var le=B,ce=0;if(this.seen.hasOwnProperty(le)){ce=this.seen[B];do ce++,le=B+"-"+ce;while(this.seen.hasOwnProperty(le))}return q||(this.seen[B]=ce,this.seen[le]=0),le},$.slug=function(B,q){q===void 0&&(q={});var le=this.serialize(B);return this.getNextSafeSlug(le,q.dryrun)},_e}(),te=function(){function _e(j){this.options=j||e.defaults,this.options.renderer=this.options.renderer||new Ie,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ee,this.slugger=new Z}_e.parse=function(B,q){var le=new _e(q);return le.parse(B)},_e.parseInline=function(B,q){var le=new _e(q);return le.parseInline(B)};var $=_e.prototype;return $.parse=function(B,q){q===void 0&&(q=!0);var le="",ce,Pe,Ue,ht,_t,Dt,X,We,at,be,lt,oi,pe,Ke,Qe,st,xt,Ct,At,Gt=B.length;for(ce=0;ce0&&Qe.tokens[0].type==="paragraph"?(Qe.tokens[0].text=Ct+" "+Qe.tokens[0].text,Qe.tokens[0].tokens&&Qe.tokens[0].tokens.length>0&&Qe.tokens[0].tokens[0].type==="text"&&(Qe.tokens[0].tokens[0].text=Ct+" "+Qe.tokens[0].tokens[0].text)):Qe.tokens.unshift({type:"text",text:Ct}):Ke+=Ct),Ke+=this.parse(Qe.tokens,pe),at+=this.renderer.listitem(Ke,xt,st);le+=this.renderer.list(at,lt,oi);continue}case"html":{le+=this.renderer.html(be.text);continue}case"paragraph":{le+=this.renderer.paragraph(this.parseInline(be.tokens));continue}case"text":{for(at=be.tokens?this.parseInline(be.tokens):be.text;ce+1"u"||_e===null)throw new Error("marked(): input parameter is undefined or null");if(typeof _e!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(_e)+", string expected");if(typeof $=="function"&&(j=$,$=null),$=L({},W.defaults,$||{}),z($),j){var B=$.highlight,q;try{q=Be.lex(_e,$)}catch(ht){return j(ht)}var le=function(_t){var Dt;if(!_t)try{$.walkTokens&&W.walkTokens(q,$.walkTokens),Dt=te.parse(q,$)}catch(X){_t=X}return $.highlight=B,_t?j(_t):j(null,Dt)};if(!B||B.length<3||(delete $.highlight,!q.length))return le();var ce=0;W.walkTokens(q,function(ht){ht.type==="code"&&(ce++,setTimeout(function(){B(ht.text,ht.lang,function(_t,Dt){if(_t)return le(_t);Dt!=null&&Dt!==ht.text&&(ht.text=Dt,ht.escaped=!0),ce--,ce===0&&le()})},0))}),ce===0&&le();return}function Pe(ht){if(ht.message+=` Please report this to https://github.com/markedjs/marked.`,$.silent)return"

An error occurred:

"+m(ht.message+"",!0)+"
";throw ht}try{var Ue=Be.lex(_e,$);if($.walkTokens){if($.async)return Promise.all(W.walkTokens(Ue,$.walkTokens)).then(function(){return te.parse(Ue,$)}).catch(Pe);W.walkTokens(Ue,$.walkTokens)}return te.parse(Ue,$)}catch(ht){Pe(ht)}}W.options=W.setOptions=function(_e){return L(W.defaults,_e),l(W.defaults),W},W.getDefaults=a,W.defaults=e.defaults,W.use=function(){for(var _e=arguments.length,$=new Array(_e),j=0;j<_e;j++)$[j]=arguments[j];var B=L.apply(void 0,[{}].concat($)),q=W.defaults.extensions||{renderers:{},childTokens:{}},le;$.forEach(function(ce){if(ce.extensions&&(le=!0,ce.extensions.forEach(function(Ue){if(!Ue.name)throw new Error("extension name required");if(Ue.renderer){var ht=q.renderers?q.renderers[Ue.name]:null;ht?q.renderers[Ue.name]=function(){for(var _t=arguments.length,Dt=new Array(_t),X=0;X<_t;X++)Dt[X]=arguments[X];var We=Ue.renderer.apply(this,Dt);return We===!1&&(We=ht.apply(this,Dt)),We}:q.renderers[Ue.name]=Ue.renderer}if(Ue.tokenizer){if(!Ue.level||Ue.level!=="block"&&Ue.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");q[Ue.level]?q[Ue.level].unshift(Ue.tokenizer):q[Ue.level]=[Ue.tokenizer],Ue.start&&(Ue.level==="block"?q.startBlock?q.startBlock.push(Ue.start):q.startBlock=[Ue.start]:Ue.level==="inline"&&(q.startInline?q.startInline.push(Ue.start):q.startInline=[Ue.start]))}Ue.childTokens&&(q.childTokens[Ue.name]=Ue.childTokens)})),ce.renderer&&function(){var Ue=W.defaults.renderer||new Ie,ht=function(X){var We=Ue[X];Ue[X]=function(){for(var at=arguments.length,be=new Array(at),lt=0;lt"u"||_e===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof _e!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(_e)+", string expected");$=L({},W.defaults,$||{}),z($);try{var j=Be.lexInline(_e,$);return $.walkTokens&&W.walkTokens(j,$.walkTokens),te.parseInline(j,$)}catch(B){if(B.message+=` -Please report this to https://github.com/markedjs/marked.`,$.silent)return"

An error occurred:

"+m(B.message+"",!0)+"
";throw B}},W.Parser=te,W.parser=te.parse,W.Renderer=Ie,W.TextRenderer=ee,W.Lexer=Be,W.lexer=Be.lex,W.Tokenizer=fe,W.Slugger=Z,W.parse=W;var Le=W.options,rt=W.setOptions,ae=W.use,Ze=W.walkTokens,Oe=W.parseInline,tt=W,ze=te.parse,Ge=Be.lex;e.Lexer=Be,e.Parser=te,e.Renderer=Ie,e.Slugger=Z,e.TextRenderer=ee,e.Tokenizer=fe,e.getDefaults=a,e.lexer=Ge,e.marked=W,e.options=Le,e.parse=tt,e.parseInline=Oe,e.parser=ze,e.setOptions=rt,e.use=ae,e.walkTokens=Ze,Object.defineProperty(e,"__esModule",{value:!0})})})();qOi=Nd.Lexer||exports.Lexer,GOi=Nd.Parser||exports.Parser,KOi=Nd.Renderer||exports.Renderer,YOi=Nd.Slugger||exports.Slugger,ZOi=Nd.TextRenderer||exports.TextRenderer,XOi=Nd.Tokenizer||exports.Tokenizer,QOi=Nd.getDefaults||exports.getDefaults,JOi=Nd.lexer||exports.lexer,Pm=Nd.marked||exports.marked,ezi=Nd.options||exports.options,tzi=Nd.parse||exports.parse,izi=Nd.parseInline||exports.parseInline,nzi=Nd.parser||exports.parser,ozi=Nd.setOptions||exports.setOptions,rzi=Nd.use||exports.use,szi=Nd.walkTokens||exports.walkTokens});function stt(i){return JSON.stringify(i,vMt)}function BM(i){let e=JSON.parse(i);return e=Oge(e),e}function vMt(i,e){return e instanceof RegExp?{$mid:2,source:e.source,flags:e.flags}:e}function Oge(i,e=0){if(!i||e>200)return i;if(typeof i=="object"){switch(i.$mid){case 1:return li.revive(i);case 2:return new RegExp(i.source,i.flags);case 17:return new Date(i.source)}if(i instanceof JC||i instanceof Uint8Array)return i;if(Array.isArray(i))for(let t=0;t{ew();Io()});function Bv(i,e={},t={}){var n,o;let r=new Ye,s=!1,a=fY(e),l=function(_){let v;try{v=BM(decodeURIComponent(_))}catch{}return v?(v=VV(v,b=>{if(i.uris&&i.uris[b])return li.revive(i.uris[b])}),encodeURIComponent(JSON.stringify(v))):_},c=function(_,v){let b=i.uris&&i.uris[_],C=li.revive(b);return v?_.startsWith($i.data+":")?_:(C||(C=li.parse(_)),KU.uriToBrowserUri(C).toString(!0)):!C||li.parse(_).toString()===C.toString()?_:(C.query&&(C=C.with({query:l(C.query)})),C.toString())},d=new Pm.Renderer;d.image=zge.image,d.link=zge.link,d.paragraph=zge.paragraph;let u=[],h=[];if(e.codeBlockRendererSync?d.code=(_,v)=>{let b=FM.nextId(),C=e.codeBlockRendererSync(att(v),_);return h.push([b,C]),`
${p5(_)}
`}:e.codeBlockRenderer&&(d.code=(_,v)=>{let b=FM.nextId(),C=e.codeBlockRenderer(att(v),_);return u.push(C.then(w=>[b,w])),`
${p5(_)}
`}),e.actionHandler){let _=function(C){let w=C.target;if(!(w.tagName!=="A"&&(w=w.parentElement,!w||w.tagName!=="A")))try{let S=w.dataset.href;S&&(i.baseUri&&(S=Fge(li.from(i.baseUri),S)),e.actionHandler.callback(S,C))}catch(S){hi(S)}finally{C.preventDefault()}},v=e.actionHandler.disposables.add(new _n(a,"click")),b=e.actionHandler.disposables.add(new _n(a,"auxclick"));e.actionHandler.disposables.add(Et.any(v.event,b.event)(C=>{let w=new Oa(pi(a),C);!w.leftButton&&!w.middleButton||_(w)})),e.actionHandler.disposables.add(Xe(a,"keydown",C=>{let w=new qn(C);!w.equals(10)&&!w.equals(3)||_(w)}))}i.supportHtml||(t.sanitizer=_=>(i.isTrusted?_.match(/^(]+>)|(<\/\s*span>)$/):void 0)?_:"",t.sanitize=!0,t.silent=!0),t.renderer=d;let f=(n=i.value)!==null&&n!==void 0?n:"";f.length>1e5&&(f=`${f.substr(0,1e5)}\u2026`),i.supportThemeIcons&&(f=ttt(f));let p;if(e.fillInIncompleteTokens){let _={...Pm.defaults,...t},v=Pm.lexer(f,_),b=SMt(v);p=Pm.parser(b,_)}else p=Pm.parse(f,t);i.supportThemeIcons&&(p=of(p).map(v=>typeof v=="string"?v:v.outerHTML).join(""));let y=new DOMParser().parseFromString(Hge(i,p),"text/html");if(y.body.querySelectorAll("img").forEach(_=>{let v=_.getAttribute("src");if(v){let b=v;try{i.baseUri&&(b=Fge(li.from(i.baseUri),b))}catch{}_.src=c(b,!0)}}),y.body.querySelectorAll("a").forEach(_=>{let v=_.getAttribute("href");if(_.setAttribute("href",""),!v||/^data:|javascript:/i.test(v)||/^command:/i.test(v)&&!i.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(v))_.replaceWith(..._.childNodes);else{let b=c(v,!1);i.baseUri&&(b=Fge(li.from(i.baseUri),v)),_.dataset.href=b}}),a.innerHTML=Hge(i,y.body.innerHTML),u.length>0)Promise.all(u).then(_=>{var v,b;if(s)return;let C=new Map(_),w=a.querySelectorAll("div[data-code]");for(let S of w){let x=C.get((v=S.dataset.code)!==null&&v!==void 0?v:"");x&&ns(S,x)}(b=e.asyncRenderCallback)===null||b===void 0||b.call(e)});else if(h.length>0){let _=new Map(h),v=a.querySelectorAll("div[data-code]");for(let b of v){let C=_.get((o=b.dataset.code)!==null&&o!==void 0?o:"");C&&ns(b,C)}}if(e.asyncRenderCallback)for(let _ of a.getElementsByTagName("img")){let v=r.add(Xe(_,"load",()=>{v.dispose(),e.asyncRenderCallback()}))}return{element:a,dispose:()=>{s=!0,r.dispose()}}}function att(i){if(!i)return"";let e=i.split(/[\s+|:|,|\{|\?]/,1);return e.length?e[0]:i}function Fge(i,e){return/^\w[\w\d+.-]*:/.test(e)?e:i.path.endsWith("/")?Vpe(i,e).toString():Vpe(kv(i),e).toString()}function Hge(i,e){let{config:t,allowedSchemes:n}=bMt(i);RT("uponSanitizeAttribute",(r,s)=>{var a;if(s.attrName==="style"||s.attrName==="class"){if(r.tagName==="SPAN"){if(s.attrName==="style"){s.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(s.attrValue);return}else if(s.attrName==="class"){s.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(s.attrValue);return}}s.keepAttr=!1;return}else if(r.tagName==="INPUT"&&((a=r.attributes.getNamedItem("type"))===null||a===void 0?void 0:a.value)==="checkbox"){if(s.attrName==="type"&&s.attrValue==="checkbox"||s.attrName==="disabled"||s.attrName==="checked"){s.keepAttr=!0;return}s.keepAttr=!1}}),RT("uponSanitizeElement",(r,s)=>{var a,l;s.tagName==="input"&&(((a=r.attributes.getNamedItem("type"))===null||a===void 0?void 0:a.value)==="checkbox"?r.setAttribute("disabled",""):(l=r.parentElement)===null||l===void 0||l.removeChild(r))});let o=dGe(n);try{return $U(e,{...t,RETURN_TRUSTED_TYPE:!0})}finally{jU("uponSanitizeAttribute"),o.dispose()}}function bMt(i){let e=[$i.http,$i.https,$i.mailto,$i.data,$i.file,$i.vscodeFileResource,$i.vscodeRemote,$i.vscodeRemoteResource];return i.isTrusted&&e.push($i.command),{config:{ALLOWED_TAGS:[...uGe],ALLOWED_ATTR:_Mt,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:e}}function ltt(i){return typeof i=="string"?i:yMt(i)}function yMt(i){var e;let t=(e=i.value)!==null&&e!==void 0?e:"";t.length>1e5&&(t=`${t.substr(0,1e5)}\u2026`);let n=Pm.parse(t,{renderer:wMt.value}).replace(/&(#\d+|[a-zA-Z]+);/g,o=>{var r;return(r=CMt.get(o))!==null&&r!==void 0?r:o});return Hge({isTrusted:!1},n).toString()}function Bge(i){let e="";return i.forEach(t=>{e+=t.raw}),e}function xMt(i){var e,t;for(let n=0;nAn error occurred:

"+m(B.message+"",!0)+"
";throw B}},W.Parser=te,W.parser=te.parse,W.Renderer=Ie,W.TextRenderer=ee,W.Lexer=Be,W.lexer=Be.lex,W.Tokenizer=fe,W.Slugger=Z,W.parse=W;var Le=W.options,rt=W.setOptions,ae=W.use,Ze=W.walkTokens,Oe=W.parseInline,tt=W,ze=te.parse,Ge=Be.lex;e.Lexer=Be,e.Parser=te,e.Renderer=Ie,e.Slugger=Z,e.TextRenderer=ee,e.Tokenizer=fe,e.getDefaults=a,e.lexer=Ge,e.marked=W,e.options=Le,e.parse=tt,e.parseInline=Oe,e.parser=ze,e.setOptions=rt,e.use=ae,e.walkTokens=Ze,Object.defineProperty(e,"__esModule",{value:!0})})})();GOi=Nd.Lexer||exports.Lexer,KOi=Nd.Parser||exports.Parser,YOi=Nd.Renderer||exports.Renderer,ZOi=Nd.Slugger||exports.Slugger,XOi=Nd.TextRenderer||exports.TextRenderer,QOi=Nd.Tokenizer||exports.Tokenizer,JOi=Nd.getDefaults||exports.getDefaults,ezi=Nd.lexer||exports.lexer,Pm=Nd.marked||exports.marked,tzi=Nd.options||exports.options,izi=Nd.parse||exports.parse,nzi=Nd.parseInline||exports.parseInline,ozi=Nd.parser||exports.parser,rzi=Nd.setOptions||exports.setOptions,szi=Nd.use||exports.use,azi=Nd.walkTokens||exports.walkTokens});function stt(i){return JSON.stringify(i,vMt)}function BM(i){let e=JSON.parse(i);return e=Oge(e),e}function vMt(i,e){return e instanceof RegExp?{$mid:2,source:e.source,flags:e.flags}:e}function Oge(i,e=0){if(!i||e>200)return i;if(typeof i=="object"){switch(i.$mid){case 1:return li.revive(i);case 2:return new RegExp(i.source,i.flags);case 17:return new Date(i.source)}if(i instanceof JC||i instanceof Uint8Array)return i;if(Array.isArray(i))for(let t=0;t{ew();Io()});function Vv(i,e={},t={}){var n,o;let r=new Ye,s=!1,a=gY(e),l=function(_){let v;try{v=BM(decodeURIComponent(_))}catch{}return v?(v=$V(v,b=>{if(i.uris&&i.uris[b])return li.revive(i.uris[b])}),encodeURIComponent(JSON.stringify(v))):_},c=function(_,v){let b=i.uris&&i.uris[_],C=li.revive(b);return v?_.startsWith($i.data+":")?_:(C||(C=li.parse(_)),XU.uriToBrowserUri(C).toString(!0)):!C||li.parse(_).toString()===C.toString()?_:(C.query&&(C=C.with({query:l(C.query)})),C.toString())},d=new Pm.Renderer;d.image=zge.image,d.link=zge.link,d.paragraph=zge.paragraph;let u=[],h=[];if(e.codeBlockRendererSync?d.code=(_,v)=>{let b=FM.nextId(),C=e.codeBlockRendererSync(att(v),_);return h.push([b,C]),`
${p5(_)}
`}:e.codeBlockRenderer&&(d.code=(_,v)=>{let b=FM.nextId(),C=e.codeBlockRenderer(att(v),_);return u.push(C.then(w=>[b,w])),`
${p5(_)}
`}),e.actionHandler){let _=function(C){let w=C.target;if(!(w.tagName!=="A"&&(w=w.parentElement,!w||w.tagName!=="A")))try{let S=w.dataset.href;S&&(i.baseUri&&(S=Fge(li.from(i.baseUri),S)),e.actionHandler.callback(S,C))}catch(S){hi(S)}finally{C.preventDefault()}},v=e.actionHandler.disposables.add(new _n(a,"click")),b=e.actionHandler.disposables.add(new _n(a,"auxclick"));e.actionHandler.disposables.add(Et.any(v.event,b.event)(C=>{let w=new Oa(pi(a),C);!w.leftButton&&!w.middleButton||_(w)})),e.actionHandler.disposables.add(Xe(a,"keydown",C=>{let w=new qn(C);!w.equals(10)&&!w.equals(3)||_(w)}))}i.supportHtml||(t.sanitizer=_=>(i.isTrusted?_.match(/^(]+>)|(<\/\s*span>)$/):void 0)?_:"",t.sanitize=!0,t.silent=!0),t.renderer=d;let f=(n=i.value)!==null&&n!==void 0?n:"";f.length>1e5&&(f=`${f.substr(0,1e5)}\u2026`),i.supportThemeIcons&&(f=ttt(f));let p;if(e.fillInIncompleteTokens){let _={...Pm.defaults,...t},v=Pm.lexer(f,_),b=SMt(v);p=Pm.parser(b,_)}else p=Pm.parse(f,t);i.supportThemeIcons&&(p=of(p).map(v=>typeof v=="string"?v:v.outerHTML).join(""));let y=new DOMParser().parseFromString(Hge(i,p),"text/html");if(y.body.querySelectorAll("img").forEach(_=>{let v=_.getAttribute("src");if(v){let b=v;try{i.baseUri&&(b=Fge(li.from(i.baseUri),b))}catch{}_.src=c(b,!0)}}),y.body.querySelectorAll("a").forEach(_=>{let v=_.getAttribute("href");if(_.setAttribute("href",""),!v||/^data:|javascript:/i.test(v)||/^command:/i.test(v)&&!i.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(v))_.replaceWith(..._.childNodes);else{let b=c(v,!1);i.baseUri&&(b=Fge(li.from(i.baseUri),v)),_.dataset.href=b}}),a.innerHTML=Hge(i,y.body.innerHTML),u.length>0)Promise.all(u).then(_=>{var v,b;if(s)return;let C=new Map(_),w=a.querySelectorAll("div[data-code]");for(let S of w){let x=C.get((v=S.dataset.code)!==null&&v!==void 0?v:"");x&&ns(S,x)}(b=e.asyncRenderCallback)===null||b===void 0||b.call(e)});else if(h.length>0){let _=new Map(h),v=a.querySelectorAll("div[data-code]");for(let b of v){let C=_.get((o=b.dataset.code)!==null&&o!==void 0?o:"");C&&ns(b,C)}}if(e.asyncRenderCallback)for(let _ of a.getElementsByTagName("img")){let v=r.add(Xe(_,"load",()=>{v.dispose(),e.asyncRenderCallback()}))}return{element:a,dispose:()=>{s=!0,r.dispose()}}}function att(i){if(!i)return"";let e=i.split(/[\s+|:|,|\{|\?]/,1);return e.length?e[0]:i}function Fge(i,e){return/^\w[\w\d+.-]*:/.test(e)?e:i.path.endsWith("/")?Vpe(i,e).toString():Vpe(Lv(i),e).toString()}function Hge(i,e){let{config:t,allowedSchemes:n}=bMt(i);RT("uponSanitizeAttribute",(r,s)=>{var a;if(s.attrName==="style"||s.attrName==="class"){if(r.tagName==="SPAN"){if(s.attrName==="style"){s.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(s.attrValue);return}else if(s.attrName==="class"){s.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(s.attrValue);return}}s.keepAttr=!1;return}else if(r.tagName==="INPUT"&&((a=r.attributes.getNamedItem("type"))===null||a===void 0?void 0:a.value)==="checkbox"){if(s.attrName==="type"&&s.attrValue==="checkbox"||s.attrName==="disabled"||s.attrName==="checked"){s.keepAttr=!0;return}s.keepAttr=!1}}),RT("uponSanitizeElement",(r,s)=>{var a,l;s.tagName==="input"&&(((a=r.attributes.getNamedItem("type"))===null||a===void 0?void 0:a.value)==="checkbox"?r.setAttribute("disabled",""):(l=r.parentElement)===null||l===void 0||l.removeChild(r))});let o=dGe(n);try{return GU(e,{...t,RETURN_TRUSTED_TYPE:!0})}finally{KU("uponSanitizeAttribute"),o.dispose()}}function bMt(i){let e=[$i.http,$i.https,$i.mailto,$i.data,$i.file,$i.vscodeFileResource,$i.vscodeRemote,$i.vscodeRemoteResource];return i.isTrusted&&e.push($i.command),{config:{ALLOWED_TAGS:[...uGe],ALLOWED_ATTR:_Mt,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:e}}function ltt(i){return typeof i=="string"?i:yMt(i)}function yMt(i){var e;let t=(e=i.value)!==null&&e!==void 0?e:"";t.length>1e5&&(t=`${t.substr(0,1e5)}\u2026`);let n=Pm.parse(t,{renderer:wMt.value}).replace(/&(#\d+|[a-zA-Z]+);/g,o=>{var r;return(r=CMt.get(o))!==null&&r!==void 0?r:o});return Hge({isTrusted:!1},n).toString()}function Bge(i){let e="";return i.forEach(t=>{e+=t.raw}),e}function xMt(i){var e,t;for(let n=0;n"u"&&s.match(/^\s*\|/)){let a=s.match(/(\|[^\|]+)(?=\||$)/g);a&&(n=a.length)}else if(typeof n=="number")if(s.match(/^\s*\|/)){if(r!==t.length-1)return;o=!0}else return}if(typeof n=="number"&&n>0){let r=o?t.slice(0,-1).join(` `):e,s=!!r.match(/\|\s*$/),a=r+(s?"":"|")+` -|${" --- |".repeat(n)}`;return Pm.lexer(a)}}var zge,_Mt,CMt,wMt,VM=P(()=>{Qt();qU();vp();vge();Gl();Uh();Rv();Pi();Xt();Md();Ob();HM();j0();nt();rtt();CY();Nc();Gc();ec();Ri();Io();zge=Object.freeze({image:(i,e,t)=>{let n=[],o=[];return i&&({href:i,dimensions:n}=ott(i),o.push(`src="${zM(i)}"`)),t&&o.push(`alt="${zM(t)}"`),e&&o.push(`title="${zM(e)}"`),n.length&&(o=o.concat(n)),""},paragraph:i=>`

${i}

`,link:(i,e,t)=>typeof i!="string"?"":(i===t&&(t=yY(t)),e=typeof e=="string"?zM(yY(e)):"",i=yY(i),i=i.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`
${t}`)});_Mt=["align","autoplay","alt","checked","class","controls","data-code","data-href","disabled","draggable","height","href","loop","muted","playsinline","poster","src","style","target","title","type","width","start"];CMt=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),wMt=new bl(()=>{let i=new Pm.Renderer;return i.code=e=>e,i.blockquote=e=>e,i.html=e=>"",i.heading=(e,t,n)=>e+` +|${" --- |".repeat(n)}`;return Pm.lexer(a)}}var zge,_Mt,CMt,wMt,VM=P(()=>{Qt();YU();vp();vge();Gl();Uh();Pv();Pi();Xt();Md();Ob();HM();j0();nt();rtt();SY();Nc();Gc();ec();Ri();Io();zge=Object.freeze({image:(i,e,t)=>{let n=[],o=[];return i&&({href:i,dimensions:n}=ott(i),o.push(`src="${zM(i)}"`)),t&&o.push(`alt="${zM(t)}"`),e&&o.push(`title="${zM(e)}"`),n.length&&(o=o.concat(n)),""},paragraph:i=>`

${i}

`,link:(i,e,t)=>typeof i!="string"?"":(i===t&&(t=xY(t)),e=typeof e=="string"?zM(xY(e)):"",i=xY(i),i=i.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`${t}`)});_Mt=["align","autoplay","alt","checked","class","controls","data-code","data-href","disabled","draggable","height","href","loop","muted","playsinline","poster","src","style","target","title","type","width","start"];CMt=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),wMt=new bl(()=>{let i=new Pm.Renderer;return i.code=e=>e,i.blockquote=e=>e,i.html=e=>"",i.heading=(e,t,n)=>e+` `,i.hr=()=>"",i.list=(e,t)=>e,i.listitem=e=>e+` `,i.paragraph=e=>e+` `,i.table=(e,t)=>e+t+` `,i.tablerow=e=>e,i.tablecell=(e,t)=>e+" ",i.strong=e=>e,i.em=e=>e,i.codespan=e=>e,i.br=()=>` -`,i.del=e=>e,i.image=(e,t,n)=>"",i.text=e=>e,i.link=(e,t,n)=>n,i})});var ctt=P(()=>{});async function WM(i,e,t){try{return await i.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:OMt(t)})}catch(n){return hi(n),!1}}function OMt(i){return i===!0?!0:i&&Array.isArray(i.enabledCommands)?i.enabledCommands:!1}var PMt,dtt,Vge,Ad,L4=P(()=>{VM();Vg();Pi();Xt();nt();ctt();Vf();Ha();Zf();kme();sd();PMt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},dtt=function(i,e){return function(t,n){e(t,n,i)}},Ad=Vge=class{constructor(e,t,n){this._options=e,this._languageService=t,this._openerService=n,this._onDidRenderAsync=new ge,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};let o=new Ye,r=o.add(Bv(e,{...this._getRenderOptions(e,o),...t},n));return r.element.classList.add("rendered-markdown"),{element:r.element,dispose:()=>o.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:async(n,o)=>{var r,s,a;let l;n?l=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(l=(r=this._options.editor.getModel())===null||r===void 0?void 0:r.getLanguageId()),l||(l=ra);let c=await HJe(this._languageService,o,l),d=document.createElement("span");if(d.innerHTML=(a=(s=Vge._ttpTokenizer)===null||s===void 0?void 0:s.createHTML(c))!==null&&a!==void 0?a:c,this._options.editor){let u=this._options.editor.getOption(50);Gr(d,u)}else this._options.codeBlockFontFamily&&(d.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(d.style.fontSize=this._options.codeBlockFontSize),d},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>WM(this._openerService,n,e.isTrusted),disposables:t}}}};Ad._ttpTokenizer=td("tokenizeToString",{createHTML(i){return i}});Ad=Vge=PMt([dtt(1,Kn),dtt(2,Xr)],Ad)});var zMt,UM,D2,wY,xY,Wge,utt=P(()=>{Tet();nt();Xt();Qt();vs();er();Ks();hY();i1();sd();_i();L4();Md();Wt();Mn();Yh();Xl();zMt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},UM=function(i,e){return function(t,n){e(t,n,i)}},D2=pt,wY=class extends Ds{get _targetWindow(){return pi(this._target.targetElements[0])}get _targetDocumentElement(){return pi(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return this._hoverPosition===2?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this._hoverContainer.classList.toggle("locked",this._isLocked))}constructor(e,t,n,o,r,s){var a,l,c,d,u,h,f,p;super(),this._keybindingService=t,this._configurationService=n,this._openerService=o,this._instantiationService=r,this._accessibilityService=s,this._messageListeners=new Ye,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._onDispose=this._register(new ge),this._onRequestLayout=this._register(new ge),this._linkHandler=e.linkHandler||(C=>WM(this._openerService,C,sf(e.content)?e.content.isTrusted:void 0)),this._target="targetElements"in e.target?e.target:new Wge(e.target),this._hoverPointer=!((a=e.appearance)===null||a===void 0)&&a.showPointer?D2("div.workbench-hover-pointer"):void 0,this._hover=this._register(new Av),this._hover.containerDomNode.classList.add("workbench-hover","fadeIn"),!((l=e.appearance)===null||l===void 0)&&l.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),!((c=e.appearance)===null||c===void 0)&&c.skipFadeInAnimation&&this._hover.containerDomNode.classList.add("skip-fade-in"),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),!((d=e.position)===null||d===void 0)&&d.forcePosition&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0),this._hoverPosition=(h=(u=e.position)===null||u===void 0?void 0:u.hoverPosition)!==null&&h!==void 0?h:3,this.onmousedown(this._hover.containerDomNode,C=>C.stopPropagation()),this.onkeydown(this._hover.containerDomNode,C=>{C.equals(9)&&this.dispose()}),this._register(Xe(this._targetWindow,"blur",()=>this.dispose()));let m=D2("div.hover-row.markdown-hover"),y=D2("div.hover-contents");if(typeof e.content=="string")y.textContent=e.content,y.style.whiteSpace="pre-wrap";else if(e.content instanceof HTMLElement)y.appendChild(e.content),y.classList.add("html-hover-contents");else{let C=e.content,w=this._instantiationService.createInstance(Ad,{codeBlockFontFamily:this._configurationService.getValue("editor").fontFamily||ml.fontFamily}),{element:S}=w.render(C,{actionHandler:{callback:x=>this._linkHandler(x),disposables:this._messageListeners},asyncRenderCallback:()=>{y.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}});y.appendChild(S)}if(m.appendChild(y),this._hover.contentsDomNode.appendChild(m),e.actions&&e.actions.length>0){let C=D2("div.hover-row.status-bar"),w=D2("div.actions");e.actions.forEach(S=>{let x=this._keybindingService.lookupKeybinding(S.commandId),k=x?x.getLabel():null;Hx.render(w,{label:S.label,commandId:S.commandId,run:D=>{S.run(D),this.dispose()},iconClass:S.iconClass},k)}),C.appendChild(w),this._hover.containerDomNode.appendChild(C)}this._hoverContainer=D2("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode);let _;if(e.actions&&e.actions.length>0?_=!1:((f=e.persistence)===null||f===void 0?void 0:f.hideOnHover)===void 0?_=typeof e.content=="string"||sf(e.content)&&!e.content.value.includes("](")&&!e.content.value.includes(""):_=e.persistence.hideOnHover,_&&(!((p=e.appearance)===null||p===void 0)&&p.showHoverHint)){let C=D2("div.hover-row.status-bar"),w=D2("div.info");w.textContent=g("hoverhint","Hold {0} key to mouse over",Wi?"Option":"Alt"),C.appendChild(w),this._hover.containerDomNode.appendChild(C)}let v=[...this._target.targetElements];_||v.push(this._hoverContainer);let b=this._register(new xY(v));if(this._register(b.onMouseOut(()=>{this._isLocked||this.dispose()})),_){let C=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new xY(C)),this._register(this._lockMouseTracker.onMouseOut(()=>{this._isLocked||this.dispose()}))}else this._lockMouseTracker=b}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;let e=this._hover.containerDomNode,t=this.findLastFocusableChild(this._hover.containerDomNode);if(t){let n=ZC(this._hoverContainer,D2("div")),o=ut(this._hoverContainer,D2("div"));n.tabIndex=0,o.tabIndex=0,this._register(Xe(o,"focus",r=>{e.focus(),r.preventDefault()})),this._register(Xe(n,"focus",r=>{t.focus(),r.preventDefault()}))}}findLastFocusableChild(e){if(e.hasChildNodes())for(let t=0;t=0)return r}let o=this.findLastFocusableChild(n);if(o)return o}}render(e){var t;e.appendChild(this._hoverContainer);let o=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement)&&uY(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(t=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||t===void 0?void 0:t.getAriaLabel());o&&hu(o),this.layout(),this.addFocusTrap()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";let e=d=>{let u=QU(d),h=d.getBoundingClientRect();return{top:h.top*u,bottom:h.bottom*u,right:h.right*u,left:h.left*u}},t=this._target.targetElements.map(d=>e(d)),n=Math.min(...t.map(d=>d.top)),o=Math.max(...t.map(d=>d.right)),r=Math.max(...t.map(d=>d.bottom)),s=Math.min(...t.map(d=>d.left)),a=o-s,l=r-n,c={top:n,right:o,bottom:r,left:s,width:a,height:l,center:{x:s+a/2,y:n+l/2}};if(this.adjustHorizontalHoverPosition(c),this.adjustVerticalHoverPosition(c),this.adjustHoverMaxHeight(c),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:c.left+=3,c.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:c.left-=3,c.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:c.top+=3,c.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:c.top-=3,c.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px";break}c.center.x=c.left+a/2,c.center.y=c.top+l/2}this.computeXCordinate(c),this.computeYCordinate(c),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(c)),this._hover.onContentsChanged()}computeXCordinate(e){let t=this._hover.containerDomNode.clientWidth+2;this._target.x!==void 0?this._x=this._target.x:this._hoverPosition===1?this._x=e.right:this._hoverPosition===0?this._x=e.left-t:(this._hoverPointer?this._x=e.center.x-this._hover.containerDomNode.clientWidth/2:this._x=e.left,this._x+t>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(this._targetDocumentElement.clientWidth-t-2,this._targetDocumentElement.clientLeft))),this._xthis._targetWindow.innerHeight&&(this._y=e.bottom)}adjustHorizontalHoverPosition(e){if(this._target.x===void 0){if(this._forcePosition){let t=(this._hoverPointer?3:0)+2;this._hoverPosition===1?this._hover.containerDomNode.style.maxWidth=`${this._targetDocumentElement.clientWidth-e.right-t}px`:this._hoverPosition===0&&(this._hover.containerDomNode.style.maxWidth=`${e.left-t}px`);return}this._hoverPosition===1?this._targetDocumentElement.clientWidth-e.right=this._hover.containerDomNode.clientWidth?this._hoverPosition=0:this._hoverPosition=2):this._hoverPosition===0&&(e.left=this._hover.containerDomNode.clientWidth?this._hoverPosition=1:this._hoverPosition=2),e.left-this._hover.containerDomNode.clientWidth<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1))}}adjustVerticalHoverPosition(e){this._target.y!==void 0||this._forcePosition||(this._hoverPosition===3?e.top-this._hover.containerDomNode.clientHeight<0&&(this._hoverPosition=2):this._hoverPosition===2&&e.bottom+this._hover.containerDomNode.clientHeight>this._targetWindow.innerHeight&&(this._hoverPosition=3))}adjustHoverMaxHeight(e){let t=this._targetWindow.innerHeight/2;if(this._forcePosition){let n=(this._hoverPointer?3:0)+2;this._hoverPosition===3?t=Math.min(t,e.top-n):this._hoverPosition===2&&(t=Math.min(t,this._targetWindow.innerHeight-e.bottom-n))}if(this._hover.containerDomNode.style.maxHeight=`${t}px`,this._hover.contentsDomNode.clientHeighte.height?this._hoverPointer.style.top=`${e.center.y-(this._y-t)-3}px`:this._hoverPointer.style.top=`${Math.round(t/2)-3}px`;break}case 3:case 2:{this._hoverPointer.classList.add(this._hoverPosition===3?"bottom":"top");let t=this._hover.containerDomNode.clientWidth,n=Math.round(t/2)-3,o=this._x+n;(oe.right)&&(n=e.center.x-this._x-3),this._hoverPointer.style.left=`${n}px`;break}}}focus(){this._hover.containerDomNode.focus()}dispose(){this._isDisposed||(this._onDispose.fire(),this._hoverContainer.remove(),this._messageListeners.dispose(),this._target.dispose(),super.dispose()),this._isDisposed=!0}};wY=zMt([UM(1,fn),UM(2,Ni),UM(3,Xr),UM(4,qt),UM(5,Ba)],wY);xY=class extends Ds{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(e){super(),this._elements=e,this._isMouseIn=!0,this._onMouseOut=this._register(new ge),this._elements.forEach(t=>this.onmouseover(t,()=>this._onTargetMouseOver(t))),this._elements.forEach(t=>this.onmouseleave(t,()=>this._onTargetMouseLeave(t)))}_onTargetMouseOver(e){this._isMouseIn=!0,this._clearEvaluateMouseStateTimeout(e)}_onTargetMouseLeave(e){this._isMouseIn=!1,this._evaluateMouseState(e)}_evaluateMouseState(e){this._clearEvaluateMouseStateTimeout(e),this._mouseTimeout=pi(e).setTimeout(()=>this._fireIfMouseOutside(),0)}_clearEvaluateMouseStateTimeout(e){this._mouseTimeout&&(pi(e).clearTimeout(this._mouseTimeout),this._mouseTimeout=void 0)}_fireIfMouseOutside(){this._isMouseIn||this._onMouseOut.fire()}},Wge=class{constructor(e){this._element=e,this.targetElements=[this._element]}dispose(){}}});function htt(i){var e;if(i!==void 0)return(e=i?.id)!==null&&e!==void 0?e:i}var FMt,Ux,Uge,$ge,ftt=P(()=>{xl();No();pr();cY();Id();_i();utt();nt();Qt();vs();Gl();Yh();Nv();_l();FMt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Ux=function(i,e){return function(t,n){e(t,n,i)}},Uge=class{constructor(e,t,n,o,r,s){this._instantiationService=e,this._contextViewService=t,this._keybindingService=o,this._layoutService=r,this._accessibilityService=s,n.onDidShowContextMenu(()=>this.hideHover())}showHover(e,t,n){var o,r,s,a;if(htt(this._currentHoverOptions)===htt(e)||this._currentHover&&(!((r=(o=this._currentHoverOptions)===null||o===void 0?void 0:o.persistence)===null||r===void 0)&&r.sticky))return;this._currentHoverOptions=e,this._lastHoverOptions=e;let l=e.trapFocus||this._accessibilityService.isScreenReaderOptimized(),c=gs();n||(l&&c?this._lastFocusedElementBeforeOpen=c:this._lastFocusedElementBeforeOpen=void 0);let d=new Ye,u=this._instantiationService.createInstance(wY,e);if(!((s=e.persistence)===null||s===void 0)&&s.sticky&&(u.isLocked=!0),u.onDispose(()=>{var f,p;((f=this._currentHover)===null||f===void 0?void 0:f.domNode)&&t$(this._currentHover.domNode)&&((p=this._lastFocusedElementBeforeOpen)===null||p===void 0||p.focus()),this._currentHoverOptions===e&&(this._currentHoverOptions=void 0),d.dispose()}),!e.container){let f=e.target instanceof HTMLElement?e.target:e.target.targetElements[0];e.container=this._layoutService.getContainer(pi(f))}let h=this._contextViewService;if(h.showContextView(new $ge(u,t),e.container),u.onRequestLayout(()=>h.layout()),!((a=e.persistence)===null||a===void 0)&&a.sticky)d.add(Xe(pi(e.container).document,Lt.MOUSE_DOWN,f=>{ms(f.target,u.domNode)||this.doHideHover()}));else{if("targetElements"in e.target)for(let p of e.target.targetElements)d.add(Xe(p,Lt.CLICK,()=>this.hideHover()));else d.add(Xe(e.target,Lt.CLICK,()=>this.hideHover()));let f=gs();if(f){let p=pi(f).document;d.add(Xe(f,Lt.KEY_DOWN,m=>{var y;return this._keyDown(m,u,!!(!((y=e.persistence)===null||y===void 0)&&y.hideOnKeyDown))})),d.add(Xe(p,Lt.KEY_DOWN,m=>{var y;return this._keyDown(m,u,!!(!((y=e.persistence)===null||y===void 0)&&y.hideOnKeyDown))})),d.add(Xe(f,Lt.KEY_UP,m=>this._keyUp(m,u))),d.add(Xe(p,Lt.KEY_UP,m=>this._keyUp(m,u)))}}if("IntersectionObserver"in Hn){let f=new IntersectionObserver(m=>this._intersectionChange(m,u),{threshold:0}),p="targetElements"in e.target?e.target.targetElements[0]:e.target;f.observe(p),d.add(Yt(()=>f.disconnect()))}return this._currentHover=u,u}hideHover(){var e;!((e=this._currentHover)===null||e===void 0)&&e.isLocked||!this._currentHoverOptions||this.doHideHover()}doHideHover(){this._currentHover=void 0,this._currentHoverOptions=void 0,this._contextViewService.hideContextView()}_intersectionChange(e,t){e[e.length-1].isIntersecting||t.dispose()}_keyDown(e,t,n){var o,r;if(e.key==="Alt"){t.isLocked=!0;return}let s=new qn(e);this._keybindingService.resolveKeyboardEvent(s).getSingleModifierDispatchChords().some(l=>!!l)||this._keybindingService.softDispatch(s,s.target).kind!==0||n&&(!(!((o=this._currentHoverOptions)===null||o===void 0)&&o.trapFocus)||e.key!=="Tab")&&(this.hideHover(),(r=this._lastFocusedElementBeforeOpen)===null||r===void 0||r.focus())}_keyUp(e,t){var n;e.key==="Alt"&&(t.isLocked=!1,t.isMouseIn||(this.hideHover(),(n=this._lastFocusedElementBeforeOpen)===null||n===void 0||n.focus()))}};Uge=FMt([Ux(0,qt),Ux(1,Pc),Ux(2,ca),Ux(3,fn),Ux(4,nf),Ux(5,Ba)],Uge);$ge=class{get anchorPosition(){return this._hover.anchor}constructor(e,t=!1){this._hover=e,this._focus=t}render(e){return this._hover.render(e),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}};ln(Fx,Uge,1);Qs((i,e)=>{let t=i.getColor(bj);t&&(e.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`))})});var T2,$x,Wv,SY,Fb=P(()=>{_i();Io();ho();T2=vi("IWorkspaceEditService"),$x=class{constructor(e){this.metadata=e}static convert(e){return e.edits.map(t=>{if(Wv.is(t))return Wv.lift(t);if(SY.is(t))return SY.lift(t);throw new Error("Unsupported edit")})}},Wv=class i extends $x{static is(e){return e instanceof i?!0:Gs(e)&&li.isUri(e.resource)&&Gs(e.textEdit)}static lift(e){return e instanceof i?e:new i(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,n=void 0,o){super(o),this.resource=e,this.textEdit=t,this.versionId=n}},SY=class i extends $x{static is(e){return e instanceof i?!0:Gs(e)&&(!!e.newResource||!!e.oldResource)}static lift(e){return e instanceof i?e:new i(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,n={},o){super(o),this.oldResource=e,this.newResource=t,this.options=n}}});var oc,jge=P(()=>{oc={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0}});function HMt(i){return typeof i.type<"u"||typeof i.anyOf<"u"}function ptt(){return kY===null&&(kY=Object.create(null),Object.keys(LY.properties).forEach(i=>{kY[i]=!0})),kY}function mtt(i){return ptt()[`editor.${i}`]||!1}function gtt(i){return ptt()[`diffEditor.${i}`]||!1}var jx,LY,kY,BMt,EY=P(()=>{jge();Ks();eT();Wt();Wg();Ys();jx=Object.freeze({id:"editor",order:5,type:"object",title:g("editorConfigurationTitle","Editor"),scope:5}),LY={...jx,properties:{"editor.tabSize":{type:"number",default:Ma.tabSize,minimum:1,markdownDescription:g("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:g("indentSize",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:Ma.insertSpaces,markdownDescription:g("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:Ma.detectIndentation,markdownDescription:g("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:Ma.trimAutoWhitespace,description:g("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:Ma.largeFileOptimizations,description:g("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[g("wordBasedSuggestions.off","Turn off Word Based Suggestions."),g("wordBasedSuggestions.currentDocument","Only suggest words from the active document."),g("wordBasedSuggestions.matchingDocuments","Suggest words from all open documents of the same language."),g("wordBasedSuggestions.allDocuments","Suggest words from all open documents.")],description:g("wordBasedSuggestions","Controls whether completions should be computed based on words in the document and from which documents they are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[g("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),g("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),g("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:g("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:g("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:g("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:g("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:g("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:g("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:g("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:g("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:g("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:g("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:g("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:g("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:oc.maxComputationTime,description:g("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:oc.maxFileSize,description:g("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:oc.renderSideBySide,description:g("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:oc.renderSideBySideInlineBreakpoint,description:g("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:oc.useInlineViewWhenSpaceIsLimited,description:g("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:oc.renderMarginRevertIcon,description:g("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:oc.ignoreTrimWhitespace,description:g("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:oc.renderIndicators,description:g("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:oc.diffCodeLens,description:g("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:oc.diffWordWrap,markdownEnumDescriptions:[g("wordWrap.off","Lines will never wrap."),g("wordWrap.on","Lines will wrap at the viewport width."),g("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:oc.diffAlgorithm,markdownEnumDescriptions:[g("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),g("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:oc.hideUnchangedRegions.enabled,markdownDescription:g("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:oc.hideUnchangedRegions.revealLineCount,markdownDescription:g("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:oc.hideUnchangedRegions.minimumLineCount,markdownDescription:g("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:oc.hideUnchangedRegions.contextLineCount,markdownDescription:g("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:oc.experimental.showMoves,markdownDescription:g("showMoves","Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:oc.experimental.showEmptyDecorations,description:g("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")}}};for(let i of x3){let e=i.schema;if(typeof e<"u")if(HMt(e))LY.properties[`editor.${i.name}`]=e;else for(let t in e)Object.hasOwnProperty.call(e,t)&&(LY.properties[t]=e[t])}kY=null;BMt=jn.as(Yl.Configuration);BMt.registerConfiguration(LY)});var So,c1=P(()=>{Kt();So=class{static insert(e,t){return{range:new O(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}});function qge(i){return Object.isFrozen(i)?i:gje(i)}var ad,Gge,Kge,$M,DY,Yge=P(()=>{Vi();od();Gc();ho();Io();er();Wg();Ys();ad=class i{constructor(e={},t=[],n=[],o){this._contents=e,this._keys=t,this._overrides=n,this.raw=o,this.overrideConfigurations=new Map}get rawConfiguration(){var e;if(!this._rawConfiguration)if(!((e=this.raw)===null||e===void 0)&&e.length){let t=this.raw.map(n=>{if(n instanceof i)return n;let o=new Gge("");return o.parseRaw(n),o.configurationModel});this._rawConfiguration=t.reduce((n,o)=>o===n?o:n.merge(o),t[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?Ghe(this.contents,e):this.contents}inspect(e,t){let n=this.rawConfiguration.getValue(e),o=t?this.rawConfiguration.getOverrideValue(e,t):void 0,r=t?this.rawConfiguration.override(t).getValue(e):n;return{value:n,override:o,merged:r}}getOverrideValue(e,t){let n=this.getContentsForOverrideIdentifer(t);return n?e?Ghe(n,e):n:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){var t,n;let o=Q1(this.contents),r=Q1(this.overrides),s=[...this.keys],a=!((t=this.raw)===null||t===void 0)&&t.length?[...this.raw]:[this];for(let l of e)if(a.push(...!((n=l.raw)===null||n===void 0)&&n.length?l.raw:[l]),!l.isEmpty()){this.mergeContents(o,l.contents);for(let c of l.overrides){let[d]=r.filter(u=>uo(u.identifiers,c.identifiers));d?(this.mergeContents(d.contents,c.contents),d.keys.push(...c.keys),d.keys=Oh(d.keys)):r.push(Q1(c))}for(let c of l.keys)s.indexOf(c)===-1&&s.push(c)}return new i(o,s,r,a.every(l=>l instanceof i)?void 0:a)}createOverrideConfigurationModel(e){let t=this.getContentsForOverrideIdentifer(e);if(!t||typeof t!="object"||!Object.keys(t).length)return this;let n={};for(let o of Oh([...Object.keys(this.contents),...Object.keys(t)])){let r=this.contents[o],s=t[o];s&&(typeof r=="object"&&typeof s=="object"?(r=Q1(r),this.mergeContents(r,s)):r=s),n[o]=r}return new i(n,this.keys,this.overrides)}mergeContents(e,t){for(let n of Object.keys(t)){if(n in e&&Gs(e[n])&&Gs(t[n])){this.mergeContents(e[n],t[n]);continue}e[n]=Q1(t[n])}}getContentsForOverrideIdentifer(e){let t=null,n=null,o=r=>{r&&(n?this.mergeContents(n,r):n=Q1(r))};for(let r of this.overrides)r.identifiers.length===1&&r.identifiers[0]===e?t=r.contents:r.identifiers.includes(e)&&o(r.contents);return o(t),n}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(e,t){this.updateValue(e,t,!0)}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){let t=this.keys.indexOf(e);t!==-1&&(this.keys.splice(t,1),IGe(this.contents,e),e4.test(e)&&this.overrides.splice(this.overrides.findIndex(n=>uo(n.identifiers,KT(e))),1))}updateValue(e,t,n){qhe(this.contents,e,t,o=>console.error(o)),n=n||this.keys.indexOf(e)===-1,n&&this.keys.push(e),e4.test(e)&&this.overrides.push({identifiers:KT(e),keys:Object.keys(this.contents[e]),contents:g$(this.contents[e],o=>console.error(o))})}},Gge=class{constructor(e){this._name=e,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new ad}parseRaw(e,t){this._raw=e;let{contents:n,keys:o,overrides:r,restricted:s,hasExcludedProperties:a}=this.doParseRaw(e,t);this._configurationModel=new ad(n,o,r,a?[e]:void 0),this._restrictedConfigurations=s||[]}doParseRaw(e,t){let n=jn.as(Yl.Configuration).getConfigurationProperties(),o=this.filter(e,n,!0,t);e=o.raw;let r=g$(e,l=>console.error(`Conflict in settings file ${this._name}: ${l}`)),s=Object.keys(e),a=this.toOverrides(e,l=>console.error(`Conflict in settings file ${this._name}: ${l}`));return{contents:r,keys:s,overrides:a,restricted:o.restricted,hasExcludedProperties:o.hasExcludedProperties}}filter(e,t,n,o){var r,s,a;let l=!1;if(!o?.scopes&&!o?.skipRestricted&&!(!((r=o?.exclude)===null||r===void 0)&&r.length))return{raw:e,restricted:[],hasExcludedProperties:l};let c={},d=[];for(let u in e)if(e4.test(u)&&n){let h=this.filter(e[u],t,!1,o);c[u]=h.raw,l=l||h.hasExcludedProperties,d.push(...h.restricted)}else{let h=t[u],f=h?typeof h.scope<"u"?h.scope:3:void 0;h?.restricted&&d.push(u),!(!((s=o.exclude)===null||s===void 0)&&s.includes(u))&&(!((a=o.include)===null||a===void 0)&&a.includes(u)||(f===void 0||o.scopes===void 0||o.scopes.includes(f))&&!(o.skipRestricted&&h?.restricted))?c[u]=e[u]:l=!0}return{raw:c,restricted:d,hasExcludedProperties:l}}toOverrides(e,t){let n=[];for(let o of Object.keys(e))if(e4.test(o)){let r={};for(let s in e[o])r[s]=e[o][s];n.push({identifiers:KT(o),keys:Object.keys(r),contents:g$(r,t)})}return n}},Kge=class{constructor(e,t,n,o,r,s,a,l,c,d,u,h,f){this.key=e,this.overrides=t,this._value=n,this.overrideIdentifiers=o,this.defaultConfiguration=r,this.policyConfiguration=s,this.applicationConfiguration=a,this.userConfiguration=l,this.localUserConfiguration=c,this.remoteUserConfiguration=d,this.workspaceConfiguration=u,this.folderConfigurationModel=h,this.memoryConfigurationModel=f}inspect(e,t,n){let o=e.inspect(t,n);return{get value(){return qge(o.value)},get override(){return qge(o.override)},get merged(){return qge(o.merged)}}}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}},$M=class i{constructor(e,t,n,o,r=new ad,s=new ad,a=new rs,l=new ad,c=new rs){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=n,this._localUserConfiguration=o,this._remoteUserConfiguration=r,this._workspaceConfiguration=s,this._folderConfigurations=a,this._memoryConfiguration=l,this._memoryConfigurationByResource=c,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new rs,this._userConfiguration=null}getValue(e,t,n){return this.getConsolidatedConfigurationModel(e,t,n).getValue(e)}updateValue(e,t,n={}){let o;n.resource?(o=this._memoryConfigurationByResource.get(n.resource),o||(o=new ad,this._memoryConfigurationByResource.set(n.resource,o))):o=this._memoryConfiguration,t===void 0?o.removeValue(e):o.setValue(e,t),n.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,n){let o=this.getConsolidatedConfigurationModel(e,t,n),r=this.getFolderConfigurationModelForResource(t.resource,n),s=t.resource?this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration:this._memoryConfiguration,a=new Set;for(let l of o.overrides)for(let c of l.identifiers)o.getOverrideValue(e,c)!==void 0&&a.add(c);return new Kge(e,t,o.getValue(e),a.size?[...a]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,n?this._workspaceConfiguration:void 0,r||void 0,s)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,n){let o=this.getConsolidatedConfigurationModelForResource(t,n);return t.overrideIdentifier&&(o=o.override(t.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(e)!==void 0&&(o=o.merge(this._policyConfiguration)),o}getConsolidatedConfigurationModelForResource({resource:e},t){let n=this.getWorkspaceConsolidatedConfiguration();if(t&&e){let o=t.getFolder(e);o&&(n=this.getFolderConsolidatedConfiguration(o.uri)||n);let r=this._memoryConfigurationByResource.get(e);r&&(n=n.merge(r))}return n}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){let n=this.getWorkspaceConsolidatedConfiguration(),o=this._folderConfigurations.get(e);o?(t=n.merge(o),this._foldersConsolidatedConfigurations.set(e,t)):t=n}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){let n=t.getFolder(e);if(n)return this._folderConfigurations.get(n.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,t)=>{let{contents:n,overrides:o,keys:r}=this._folderConfigurations.get(t);return e.push([t,{contents:n,overrides:o,keys:r}]),e},[])}}static parse(e){let t=this.parseConfigurationModel(e.defaults),n=this.parseConfigurationModel(e.policy),o=this.parseConfigurationModel(e.application),r=this.parseConfigurationModel(e.user),s=this.parseConfigurationModel(e.workspace),a=e.folders.reduce((l,c)=>(l.set(li.revive(c[0]),this.parseConfigurationModel(c[1])),l),new rs);return new i(t,n,o,r,new ad,s,a,new ad,new rs)}static parseConfigurationModel(e){return new ad(e.contents,e.keys,e.overrides)}},DY=class{constructor(e,t,n,o){this.change=e,this.previous=t,this.currentConfiguraiton=n,this.currentWorkspace=o,this._marker=` -`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=46,this.affectedKeys=new Set,this._previousConfiguration=void 0;for(let r of e.keys)this.affectedKeys.add(r);for(let[,r]of e.overrides)for(let s of r)this.affectedKeys.add(s);this._affectsConfigStr=this._marker;for(let r of this.affectedKeys)this._affectsConfigStr+=r+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=$M.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var n;let o=this._marker+e,r=this._affectsConfigStr.indexOf(o);if(r<0)return!1;let s=r+o.length;if(s>=this._affectsConfigStr.length)return!1;let a=this._affectsConfigStr.charCodeAt(s);if(a!==this._markerCode1&&a!==this._markerCode2)return!1;if(t){let l=this.previousConfiguration?this.previousConfiguration.getValue(e,t,(n=this.previous)===null||n===void 0?void 0:n.workspace):void 0,c=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!Za(l,c)}return!0}}});function WMt(i,e,t){return{kind:2,commandId:i,commandArgs:e,isBubble:t}}function vtt(i){return i?`${i.serialize()}`:"no when condition"}function _tt(i){return i.extensionId?i.isBuiltinExtension?`built-in extension ${i.extensionId}`:`user extension ${i.extensionId}`:i.isDefault?"built-in":"user"}var jM,VMt,TY,Zge=P(()=>{Xi();jM={kind:0},VMt={kind:1};TY=class i{constructor(e,t,n){var o;this._log=n,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(let r of e){let s=r.command;s&&s.charAt(0)!=="-"&&this._defaultBoundCommands.set(s,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=i.handleRemovals([].concat(e).concat(t));for(let r=0,s=this._keybindings.length;r"u"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let o=n.length-1;o>=0;o--){let r=n[o];if(r.command===t.command)continue;let s=!0;for(let a=1;a"u"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if(!(typeof t>"u")){for(let n=0,o=t.length;n"u"||n.length===0)return null;if(n.length===1)return n[0];for(let o=n.length-1;o>=0;o--){let r=n[o];if(t.contextMatchesRules(r.when))return r}return n[n.length-1]}resolve(e,t,n){let o=[...t,n];this._log(`| Resolving ${o}`);let r=this._map.get(o[0]);if(r===void 0)return this._log("\\ No keybinding entries."),jM;let s=null;if(o.length<2)s=r;else{s=[];for(let l=0,c=r.length;ld.chords.length)continue;let u=!0;for(let h=1;h=0;n--){let o=t[n];if(i._contextMatchesRules(e,o.when))return o}return null}static _contextMatchesRules(e,t){return t?t.evaluate(e):!0}}});var UMt,IY,Uv,btt=P(()=>{Qi();Pi();Xt();F1e();nt();Wt();Zge();UMt=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/,IY=class extends ue{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:Et.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,n,o,r){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=n,this._notificationService=o,this._logService=r,this._onDidUpdateKeybindings=this._register(new ge),this._currentChords=[],this._currentChordChecker=new H3,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=Uv.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new Zs,this._currentlyDispatchingCommandId=null,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){let n=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(n)return n.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");let n=this.resolveKeyboardEvent(e);if(n.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),jM;let[o]=n.getDispatchChords();if(o===null)return this._log("\\ Keyboard event cannot be dispatched"),jM;let r=this._contextKeyService.getContext(t),s=this._currentChords.map(({keypress:a})=>a);return this._getResolver().resolve(r,s,o)}_scheduleLeaveChordMode(){let e=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-e>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw LC("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(g("first.chord","({0}) was pressed. Waiting for second key of chord...",t));break;default:{let n=this._currentChords.map(({label:o})=>o).join(", ");this._currentChordStatusMessage=this._notificationService.status(g("next.chord","({0}) was pressed. Waiting for next key of chord...",n))}}this._scheduleLeaveChordMode(),ab.enabled&&ab.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],ab.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){let n=this.resolveKeyboardEvent(e),[o]=n.getSingleModifierDispatchChords();if(o)return this._ignoreSingleModifiers.has(o)?(this._log(`+ Ignoring single modifier ${o} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=Uv.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=Uv.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${o}.`),this._currentSingleModifier=o,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):o===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${o} ${o}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(n,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${o}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));let[r]=n.getChords();return this._ignoreSingleModifiers=new Uv(r),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,n=!1){var o;let r=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let s=null,a=null;if(n){let[u]=e.getSingleModifierDispatchChords();s=u,a=u?[u]:[]}else[s]=e.getDispatchChords(),a=this._currentChords.map(({keypress:u})=>u);if(s===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),r;let l=this._contextKeyService.getContext(t),c=e.getLabel(),d=this._getResolver().resolve(l,a,s);switch(d.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",c,"[ No matching keybinding ]"),this.inChordMode){let u=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${u}, ${c}".`),this._notificationService.status(g("missing.chord","The key combination ({0}, {1}) is not a command.",u,c),{hideAfter:10*1e3}),this._leaveChordMode(),r=!0}return r}case 1:return this._logService.trace("KeybindingService#dispatch",c,"[ Several keybindings match - more chords needed ]"),r=!0,this._expectAnotherChord(s,c),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),r;case 2:{if(this._logService.trace("KeybindingService#dispatch",c,`[ Will dispatch command ${d.commandId} ]`),d.commandId===null||d.commandId===""){if(this.inChordMode){let u=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${u}, ${c}".`),this._notificationService.status(g("missing.chord","The key combination ({0}, {1}) is not a command.",u,c),{hideAfter:10*1e3}),this._leaveChordMode(),r=!0}}else{this.inChordMode&&this._leaveChordMode(),d.isBubble||(r=!0),this._log(`+ Invoking command ${d.commandId}.`),this._currentlyDispatchingCommandId=d.commandId;try{typeof d.commandArgs>"u"?this._commandService.executeCommand(d.commandId).then(void 0,u=>this._notificationService.warn(u)):this._commandService.executeCommand(d.commandId,d.commandArgs).then(void 0,u=>this._notificationService.warn(u))}finally{this._currentlyDispatchingCommandId=null}UMt.test(d.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:d.commandId,from:"keybinding",detail:(o=e.getUserSettingsLabel())!==null&&o!==void 0?o:void 0})}return r}}}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}},Uv=class{constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}};Uv.EMPTY=new Uv(null)});function MY(i){let e=[];for(let t=0,n=i.length;t{qM=class{constructor(e,t,n,o,r,s,a){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?MY(e.getDispatchChords()):[],e&&this.chords.length===0&&(this.chords=MY(e.getSingleModifierDispatchChords())),this.bubble=t?t.charCodeAt(0)===94:!1,this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=o,this.isDefault=r,this.extensionId=s,this.isBuiltinExtension=a}}});function $Mt(i,e,t){if(e===null)return"";let n=[];return i.ctrlKey&&n.push(t.ctrlKey),i.shiftKey&&n.push(t.shiftKey),i.altKey&&n.push(t.altKey),i.metaKey&&n.push(t.metaKey),e!==""&&n.push(e),n.join(t.separator)}var qx,Gx,ytt,Ctt,wtt,NY=P(()=>{Wt();qx=class{constructor(e,t,n=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=n}toLabel(e,t,n){if(t.length===0)return null;let o=[];for(let r=0,s=t.length;r{Pi();NY();w5();AY=class extends EU{constructor(e,t){if(super(),t.length===0)throw gl("chords");this._os=e,this._chords=t}getLabel(){return Gx.toLabel(this._os,this._chords,e=>this._getLabel(e))}getAriaLabel(){return ytt.toLabel(this._os,this._chords,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:Ctt.toLabel(this._os,this._chords,e=>this._getElectronAccelerator(e))}getUserSettingsLabel(){return wtt.toLabel(this._os,this._chords,e=>this._getUserSettingsLabel(e))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(e=>this._getChord(e))}_getChord(e){return new LU(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map(e=>this._getChordDispatch(e))}getSingleModifierDispatchChords(){return this._chords.map(e=>this._getSingleModifierChordDispatch(e))}}});var GM,Stt=P(()=>{Bh();w5();xtt();Xge();GM=class i extends AY{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return ep.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":ep.toString(e.keyCode)}_getElectronAccelerator(e){return ep.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";let t=ep.toUserSettingsUS(e.keyCode);return t&&t.toLowerCase()}_getChordDispatch(e){return i.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=ep.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){let t=nW[e];if(t!==-1)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof Uf)return e;let t=this._scanCodeToKeyCode(e.scanCode);return t===0?null:new Uf(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){let n=MY(e.chords.map(o=>this._toKeyCodeChord(o)));return n.length>0?[new i(n,t)]:[]}}});var Om,Kx=P(()=>{_i();Om=vi("labelService")});var RY,pHi,ph,mh,xp=P(()=>{_i();RY=vi("progressService"),pHi=Object.freeze({total(){},worked(){},done(){}}),ph=class{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}};ph.None=Object.freeze({report(){}});mh=vi("editorProgressService")});var Qge,Jge,e2e,t2e,Yx,Hb,PY=P(()=>{Ri();Qge=class{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){let n=this._value.charCodeAt(t);if(!(n===47||this._splitOnBackslash&&n===92))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new i(new t2e(e,t))}static forStrings(){return new i(new Qge)}static forConfigKeys(){return new i(new Jge)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){let n=this._iter.reset(e),o;this._root||(this._root=new Yx,this._root.segment=n.value());let r=[];for(o=this._root;;){let a=n.cmp(o.segment);if(a>0)o.left||(o.left=new Yx,o.left.segment=n.value()),r.push([-1,o]),o=o.left;else if(a<0)o.right||(o.right=new Yx,o.right.segment=n.value()),r.push([1,o]),o=o.right;else if(n.hasNext())n.next(),o.mid||(o.mid=new Yx,o.mid.segment=n.value()),r.push([0,o]),o=o.mid;else break}let s=o.value;o.value=t,o.key=e;for(let a=r.length-1;a>=0;a--){let l=r[a][1];l.updateHeight();let c=l.balanceFactor();if(c<-1||c>1){let d=r[a][0],u=r[a+1][0];if(d===1&&u===1)r[a][1]=l.rotateLeft();else if(d===-1&&u===-1)r[a][1]=l.rotateRight();else if(d===1&&u===-1)l.right=r[a+1][1]=r[a+1][1].rotateRight(),r[a][1]=l.rotateLeft();else if(d===-1&&u===1)l.left=r[a+1][1]=r[a+1][1].rotateLeft(),r[a][1]=l.rotateRight();else throw new Error;if(a>0)switch(r[a-1][0]){case-1:r[a-1][1].left=r[a][1];break;case 1:r[a-1][1].right=r[a][1];break;case 0:r[a-1][1].mid=r[a][1];break}else this._root=r[0][1]}}return s}get(e){var t;return(t=this._getNode(e))===null||t===void 0?void 0:t.value}_getNode(e){let t=this._iter.reset(e),n=this._root;for(;n;){let o=t.cmp(n.segment);if(o>0)n=n.left;else if(o<0)n=n.right;else if(t.hasNext())t.next(),n=n.mid;else break}return n}has(e){let t=this._getNode(e);return!(t?.value===void 0&&t?.mid===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var n;let o=this._iter.reset(e),r=[],s=this._root;for(;s;){let a=o.cmp(s.segment);if(a>0)r.push([-1,s]),s=s.left;else if(a<0)r.push([1,s]),s=s.right;else if(o.hasNext())o.next(),r.push([0,s]),s=s.mid;else break}if(s){if(t?(s.left=void 0,s.mid=void 0,s.right=void 0,s.height=1):(s.key=void 0,s.value=void 0),!s.mid&&!s.value)if(s.left&&s.right){let a=this._min(s.right);if(a.key){let{key:l,value:c,segment:d}=a;this._delete(a.key,!1),s.key=l,s.value=c,s.segment=d}}else{let a=(n=s.left)!==null&&n!==void 0?n:s.right;if(r.length>0){let[l,c]=r[r.length-1];switch(l){case-1:c.left=a;break;case 0:c.mid=a;break;case 1:c.right=a;break}}else this._root=a}for(let a=r.length-1;a>=0;a--){let l=r[a][1];l.updateHeight();let c=l.balanceFactor();if(c>1?(l.right.balanceFactor()>=0||(l.right=l.right.rotateRight()),r[a][1]=l.rotateLeft()):c<-1&&(l.left.balanceFactor()<=0||(l.left=l.left.rotateLeft()),r[a][1]=l.rotateRight()),a>0)switch(r[a-1][0]){case-1:r[a-1][1].left=r[a][1];break;case 1:r[a-1][1].right=r[a][1];break;case 0:r[a-1][1].mid=r[a][1];break}else this._root=r[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){let t=this._iter.reset(e),n=this._root,o;for(;n;){let r=t.cmp(n.segment);if(r>0)n=n.left;else if(r<0)n=n.right;else if(t.hasNext())t.next(),o=n.value||o,n=n.mid;else break}return n&&n.value||o}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){let n=this._iter.reset(e),o=this._root;for(;o;){let r=n.cmp(o.segment);if(r>0)o=o.left;else if(r<0)o=o.right;else if(n.hasNext())n.next(),o=o.mid;else return o.mid?this._entries(o.mid):t?o.value:void 0}}forEach(e){for(let[t,n]of this)e(n,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){let t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}});function zY(i){let e=i;return typeof e?.id=="string"&&li.isUri(e.uri)}function ktt(i){let e=i;return typeof e?.id=="string"&&!zY(i)&&!GMt(i)}function Ltt(i,e){if(typeof i=="string"||typeof i>"u")return typeof i=="string"?{id:tp(i)}:e?jMt:qMt;let t=i;return t.configuration?{id:t.id,configPath:t.configuration}:t.folders.length===1?{id:t.id,uri:t.folders[0].uri}:{id:t.id}}function GMt(i){let e=i;return typeof e?.id=="string"&&li.isUri(e.configPath)}function Ett(i){return i.id===i2e}var zm,jMt,qMt,OY,FY,xHi,i2e,Zx=P(()=>{Wt();Dg();PY();Io();_i();zm=vi("contextService");jMt={id:"ext-dev"},qMt={id:"empty-window"};OY=class{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}},FY="code-workspace",xHi=[{name:g("codeWorkspace","Code Workspace"),extensions:[FY]}],i2e="4064f6ec-cb38-4ad0-af64-ee6467e63c82"});var HY,KM,BY,YM,Xx,ZM,VY,WY,I2=P(()=>{Wt();(function(i){i.inspectTokensAction=g("inspectTokens","Developer: Inspect Tokens")})(HY||(HY={}));(function(i){i.gotoLineActionLabel=g("gotoLineActionLabel","Go to Line/Column...")})(KM||(KM={}));(function(i){i.helpQuickAccessActionLabel=g("helpQuickAccess","Show all Quick Access Providers")})(BY||(BY={}));(function(i){i.quickCommandActionLabel=g("quickCommandActionLabel","Command Palette"),i.quickCommandHelp=g("quickCommandActionHelp","Show And Run Commands")})(YM||(YM={}));(function(i){i.quickOutlineActionLabel=g("quickOutlineActionLabel","Go to Symbol..."),i.quickOutlineByCategoryActionLabel=g("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(Xx||(Xx={}));(function(i){i.editorViewAccessibleLabel=g("editorViewAccessibleLabel","Editor content"),i.accessibilityHelpMessage=g("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(ZM||(ZM={}));(function(i){i.toggleHighContrast=g("toggleHighContrast","Toggle High Contrast Theme")})(VY||(VY={}));(function(i){i.bulkEditServiceSummary=g("bulkEditServiceSummary","Made {0} edits in {1} files")})(WY||(WY={}))});var UY,n2e=P(()=>{_i();UY=vi("workspaceTrustManagementService")});var Ua,XM=P(()=>{(function(i){function e(r,s){if(r.start>=s.end||s.start>=r.end)return{start:0,end:0};let a=Math.max(r.start,s.start),l=Math.min(r.end,s.end);return l-a<=0?{start:0,end:0}:{start:a,end:l}}i.intersect=e;function t(r){return r.end-r.start<=0}i.isEmpty=t;function n(r,s){return!t(e(r,s))}i.intersects=n;function o(r,s){let a=[],l={start:r.start,end:Math.min(s.start,r.end)},c={start:Math.max(s.end,r.start),end:r.end};return t(l)||a.push(l),t(c)||a.push(c),a}i.relativeComplement=o})(Ua||(Ua={}))});var Dtt=P(()=>{});function KMt(i){let e=i;return!!e&&typeof e.x=="number"&&typeof e.y=="number"}function Bb(i,e,t){let n=t.mode===$v.ALIGN?t.offset:t.offset+t.size,o=t.mode===$v.ALIGN?t.offset+t.size:t.offset;return t.position===0?e<=i-n?n:e<=o?o-e:Math.max(i-e,0):e<=o?o-e:e<=i-n?n:0}var $v,Qx,YMt,o2e=P(()=>{PU();Qt();nt();Mn();XM();Dtt();(function(i){i[i.AVOID=0]="AVOID",i[i.ALIGN=1]="ALIGN"})($v||($v={}));Qx=class i extends ue{constructor(e,t){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=ue.None,this.toDisposeOnSetContainer=ue.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=pt(".context-view"),Fa(this.view),this.setContainer(e,t),this._register(Yt(()=>this.setContainer(null,1)))}setContainer(e,t){var n;this.useFixedPosition=t!==1;let o=this.useShadowDOM;if(this.useShadowDOM=t===3,!(e===this.container&&o===this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(n=this.shadowRootHostElement)===null||n===void 0||n.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=pt(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});let s=document.createElement("style");s.textContent=YMt,this.shadowRoot.appendChild(s),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(pt("slot"))}else this.container.appendChild(this.view);let r=new Ye;i.BUBBLE_UP_EVENTS.forEach(s=>{r.add(go(this.container,s,a=>{this.onDOMEvent(a,!1)}))}),i.BUBBLE_DOWN_EVENTS.forEach(s=>{r.add(go(this.container,s,a=>{this.onDOMEvent(a,!0)},!0))}),this.toDisposeOnSetContainer=r}}show(e){var t,n;this.isVisible()&&this.hide(),is(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",el(this.view),this.toDisposeOnClean=e.render(this.view)||ue.None,this.delegate=e,this.doLayout(),(n=(t=this.delegate).focus)===null||n===void 0||n.call(t)}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(Lc&&VC.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;let e=this.delegate.getAnchor(),t;if(e instanceof HTMLElement){let h=Lo(e),f=QU(e);t={top:h.top*f,left:h.left*f,width:h.width*f,height:h.height*f}}else KMt(e)?t={top:e.y,left:e.x,width:e.width||1,height:e.height||2}:t={top:e.posy,left:e.posx,width:2,height:2};let n=wl(this.view),o=Bg(this.view),r=this.delegate.anchorPosition||0,s=this.delegate.anchorAlignment||0,a=this.delegate.anchorAxisAlignment||0,l,c,d=Jqe();if(a===0){let h={offset:t.top-d.pageYOffset,size:t.height,position:r===0?0:1},f={offset:t.left,size:t.width,position:s===0?0:1,mode:$v.ALIGN};l=Bb(d.innerHeight,o,h)+d.pageYOffset,Ua.intersects({start:l,end:l+o},{start:h.offset,end:h.offset+h.size})&&(f.mode=$v.AVOID),c=Bb(d.innerWidth,n,f)}else{let h={offset:t.left,size:t.width,position:s===0?0:1},f={offset:t.top,size:t.height,position:r===0?0:1,mode:$v.ALIGN};c=Bb(d.innerWidth,n,h),Ua.intersects({start:c,end:c+n},{start:h.offset,end:h.offset+h.size})&&(f.mode=$v.AVOID),l=Bb(d.innerHeight,o,f)+d.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(r===0?"bottom":"top"),this.view.classList.add(s===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);let u=Lo(this.container);this.view.style.top=`${l-(this.useFixedPosition?Lo(this.view).top:u.top)}px`,this.view.style.left=`${c-(this.useFixedPosition?Lo(this.view).left:u.left)}px`,this.view.style.width="initial"}hide(e){let t=this.delegate;this.delegate=null,t?.onHide&&t.onHide(e),this.toDisposeOnClean.dispose(),Fa(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,pi(e).document.activeElement):t&&!ms(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}};Qx.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"];Qx.BUBBLE_DOWN_EVENTS=["click"];YMt=` +`,i.del=e=>e,i.image=(e,t,n)=>"",i.text=e=>e,i.link=(e,t,n)=>n,i})});var ctt=P(()=>{});async function WM(i,e,t){try{return await i.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:OMt(t)})}catch(n){return hi(n),!1}}function OMt(i){return i===!0?!0:i&&Array.isArray(i.enabledCommands)?i.enabledCommands:!1}var PMt,dtt,Vge,Ad,L4=P(()=>{VM();Vg();Pi();Xt();nt();ctt();Vf();Ha();Zf();kme();sd();PMt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},dtt=function(i,e){return function(t,n){e(t,n,i)}},Ad=Vge=class{constructor(e,t,n){this._options=e,this._languageService=t,this._openerService=n,this._onDidRenderAsync=new ge,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};let o=new Ye,r=o.add(Vv(e,{...this._getRenderOptions(e,o),...t},n));return r.element.classList.add("rendered-markdown"),{element:r.element,dispose:()=>o.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:async(n,o)=>{var r,s,a;let l;n?l=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(l=(r=this._options.editor.getModel())===null||r===void 0?void 0:r.getLanguageId()),l||(l=ra);let c=await HJe(this._languageService,o,l),d=document.createElement("span");if(d.innerHTML=(a=(s=Vge._ttpTokenizer)===null||s===void 0?void 0:s.createHTML(c))!==null&&a!==void 0?a:c,this._options.editor){let u=this._options.editor.getOption(50);Gr(d,u)}else this._options.codeBlockFontFamily&&(d.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(d.style.fontSize=this._options.codeBlockFontSize),d},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>WM(this._openerService,n,e.isTrusted),disposables:t}}}};Ad._ttpTokenizer=td("tokenizeToString",{createHTML(i){return i}});Ad=Vge=PMt([dtt(1,Kn),dtt(2,Xr)],Ad)});var zMt,UM,D2,kY,LY,Wge,utt=P(()=>{Tet();nt();Xt();Qt();vs();er();Ks();mY();i1();sd();_i();L4();Md();Wt();Mn();Yh();Xl();zMt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},UM=function(i,e){return function(t,n){e(t,n,i)}},D2=pt,kY=class extends Ds{get _targetWindow(){return pi(this._target.targetElements[0])}get _targetDocumentElement(){return pi(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return this._hoverPosition===2?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this._hoverContainer.classList.toggle("locked",this._isLocked))}constructor(e,t,n,o,r,s){var a,l,c,d,u,h,f,p;super(),this._keybindingService=t,this._configurationService=n,this._openerService=o,this._instantiationService=r,this._accessibilityService=s,this._messageListeners=new Ye,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._onDispose=this._register(new ge),this._onRequestLayout=this._register(new ge),this._linkHandler=e.linkHandler||(C=>WM(this._openerService,C,sf(e.content)?e.content.isTrusted:void 0)),this._target="targetElements"in e.target?e.target:new Wge(e.target),this._hoverPointer=!((a=e.appearance)===null||a===void 0)&&a.showPointer?D2("div.workbench-hover-pointer"):void 0,this._hover=this._register(new Rv),this._hover.containerDomNode.classList.add("workbench-hover","fadeIn"),!((l=e.appearance)===null||l===void 0)&&l.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),!((c=e.appearance)===null||c===void 0)&&c.skipFadeInAnimation&&this._hover.containerDomNode.classList.add("skip-fade-in"),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),!((d=e.position)===null||d===void 0)&&d.forcePosition&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0),this._hoverPosition=(h=(u=e.position)===null||u===void 0?void 0:u.hoverPosition)!==null&&h!==void 0?h:3,this.onmousedown(this._hover.containerDomNode,C=>C.stopPropagation()),this.onkeydown(this._hover.containerDomNode,C=>{C.equals(9)&&this.dispose()}),this._register(Xe(this._targetWindow,"blur",()=>this.dispose()));let m=D2("div.hover-row.markdown-hover"),y=D2("div.hover-contents");if(typeof e.content=="string")y.textContent=e.content,y.style.whiteSpace="pre-wrap";else if(e.content instanceof HTMLElement)y.appendChild(e.content),y.classList.add("html-hover-contents");else{let C=e.content,w=this._instantiationService.createInstance(Ad,{codeBlockFontFamily:this._configurationService.getValue("editor").fontFamily||ml.fontFamily}),{element:S}=w.render(C,{actionHandler:{callback:x=>this._linkHandler(x),disposables:this._messageListeners},asyncRenderCallback:()=>{y.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}});y.appendChild(S)}if(m.appendChild(y),this._hover.contentsDomNode.appendChild(m),e.actions&&e.actions.length>0){let C=D2("div.hover-row.status-bar"),w=D2("div.actions");e.actions.forEach(S=>{let x=this._keybindingService.lookupKeybinding(S.commandId),k=x?x.getLabel():null;Hx.render(w,{label:S.label,commandId:S.commandId,run:D=>{S.run(D),this.dispose()},iconClass:S.iconClass},k)}),C.appendChild(w),this._hover.containerDomNode.appendChild(C)}this._hoverContainer=D2("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode);let _;if(e.actions&&e.actions.length>0?_=!1:((f=e.persistence)===null||f===void 0?void 0:f.hideOnHover)===void 0?_=typeof e.content=="string"||sf(e.content)&&!e.content.value.includes("](")&&!e.content.value.includes(""):_=e.persistence.hideOnHover,_&&(!((p=e.appearance)===null||p===void 0)&&p.showHoverHint)){let C=D2("div.hover-row.status-bar"),w=D2("div.info");w.textContent=g("hoverhint","Hold {0} key to mouse over",Wi?"Option":"Alt"),C.appendChild(w),this._hover.containerDomNode.appendChild(C)}let v=[...this._target.targetElements];_||v.push(this._hoverContainer);let b=this._register(new LY(v));if(this._register(b.onMouseOut(()=>{this._isLocked||this.dispose()})),_){let C=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new LY(C)),this._register(this._lockMouseTracker.onMouseOut(()=>{this._isLocked||this.dispose()}))}else this._lockMouseTracker=b}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;let e=this._hover.containerDomNode,t=this.findLastFocusableChild(this._hover.containerDomNode);if(t){let n=ZC(this._hoverContainer,D2("div")),o=ut(this._hoverContainer,D2("div"));n.tabIndex=0,o.tabIndex=0,this._register(Xe(o,"focus",r=>{e.focus(),r.preventDefault()})),this._register(Xe(n,"focus",r=>{t.focus(),r.preventDefault()}))}}findLastFocusableChild(e){if(e.hasChildNodes())for(let t=0;t=0)return r}let o=this.findLastFocusableChild(n);if(o)return o}}render(e){var t;e.appendChild(this._hoverContainer);let o=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement)&&pY(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(t=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||t===void 0?void 0:t.getAriaLabel());o&&hu(o),this.layout(),this.addFocusTrap()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";let e=d=>{let u=t$(d),h=d.getBoundingClientRect();return{top:h.top*u,bottom:h.bottom*u,right:h.right*u,left:h.left*u}},t=this._target.targetElements.map(d=>e(d)),n=Math.min(...t.map(d=>d.top)),o=Math.max(...t.map(d=>d.right)),r=Math.max(...t.map(d=>d.bottom)),s=Math.min(...t.map(d=>d.left)),a=o-s,l=r-n,c={top:n,right:o,bottom:r,left:s,width:a,height:l,center:{x:s+a/2,y:n+l/2}};if(this.adjustHorizontalHoverPosition(c),this.adjustVerticalHoverPosition(c),this.adjustHoverMaxHeight(c),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:c.left+=3,c.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:c.left-=3,c.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:c.top+=3,c.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:c.top-=3,c.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px";break}c.center.x=c.left+a/2,c.center.y=c.top+l/2}this.computeXCordinate(c),this.computeYCordinate(c),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(c)),this._hover.onContentsChanged()}computeXCordinate(e){let t=this._hover.containerDomNode.clientWidth+2;this._target.x!==void 0?this._x=this._target.x:this._hoverPosition===1?this._x=e.right:this._hoverPosition===0?this._x=e.left-t:(this._hoverPointer?this._x=e.center.x-this._hover.containerDomNode.clientWidth/2:this._x=e.left,this._x+t>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(this._targetDocumentElement.clientWidth-t-2,this._targetDocumentElement.clientLeft))),this._xthis._targetWindow.innerHeight&&(this._y=e.bottom)}adjustHorizontalHoverPosition(e){if(this._target.x===void 0){if(this._forcePosition){let t=(this._hoverPointer?3:0)+2;this._hoverPosition===1?this._hover.containerDomNode.style.maxWidth=`${this._targetDocumentElement.clientWidth-e.right-t}px`:this._hoverPosition===0&&(this._hover.containerDomNode.style.maxWidth=`${e.left-t}px`);return}this._hoverPosition===1?this._targetDocumentElement.clientWidth-e.right=this._hover.containerDomNode.clientWidth?this._hoverPosition=0:this._hoverPosition=2):this._hoverPosition===0&&(e.left=this._hover.containerDomNode.clientWidth?this._hoverPosition=1:this._hoverPosition=2),e.left-this._hover.containerDomNode.clientWidth<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1))}}adjustVerticalHoverPosition(e){this._target.y!==void 0||this._forcePosition||(this._hoverPosition===3?e.top-this._hover.containerDomNode.clientHeight<0&&(this._hoverPosition=2):this._hoverPosition===2&&e.bottom+this._hover.containerDomNode.clientHeight>this._targetWindow.innerHeight&&(this._hoverPosition=3))}adjustHoverMaxHeight(e){let t=this._targetWindow.innerHeight/2;if(this._forcePosition){let n=(this._hoverPointer?3:0)+2;this._hoverPosition===3?t=Math.min(t,e.top-n):this._hoverPosition===2&&(t=Math.min(t,this._targetWindow.innerHeight-e.bottom-n))}if(this._hover.containerDomNode.style.maxHeight=`${t}px`,this._hover.contentsDomNode.clientHeighte.height?this._hoverPointer.style.top=`${e.center.y-(this._y-t)-3}px`:this._hoverPointer.style.top=`${Math.round(t/2)-3}px`;break}case 3:case 2:{this._hoverPointer.classList.add(this._hoverPosition===3?"bottom":"top");let t=this._hover.containerDomNode.clientWidth,n=Math.round(t/2)-3,o=this._x+n;(oe.right)&&(n=e.center.x-this._x-3),this._hoverPointer.style.left=`${n}px`;break}}}focus(){this._hover.containerDomNode.focus()}dispose(){this._isDisposed||(this._onDispose.fire(),this._hoverContainer.remove(),this._messageListeners.dispose(),this._target.dispose(),super.dispose()),this._isDisposed=!0}};kY=zMt([UM(1,fn),UM(2,Ni),UM(3,Xr),UM(4,qt),UM(5,Ba)],kY);LY=class extends Ds{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(e){super(),this._elements=e,this._isMouseIn=!0,this._onMouseOut=this._register(new ge),this._elements.forEach(t=>this.onmouseover(t,()=>this._onTargetMouseOver(t))),this._elements.forEach(t=>this.onmouseleave(t,()=>this._onTargetMouseLeave(t)))}_onTargetMouseOver(e){this._isMouseIn=!0,this._clearEvaluateMouseStateTimeout(e)}_onTargetMouseLeave(e){this._isMouseIn=!1,this._evaluateMouseState(e)}_evaluateMouseState(e){this._clearEvaluateMouseStateTimeout(e),this._mouseTimeout=pi(e).setTimeout(()=>this._fireIfMouseOutside(),0)}_clearEvaluateMouseStateTimeout(e){this._mouseTimeout&&(pi(e).clearTimeout(this._mouseTimeout),this._mouseTimeout=void 0)}_fireIfMouseOutside(){this._isMouseIn||this._onMouseOut.fire()}},Wge=class{constructor(e){this._element=e,this.targetElements=[this._element]}dispose(){}}});function htt(i){var e;if(i!==void 0)return(e=i?.id)!==null&&e!==void 0?e:i}var FMt,Ux,Uge,$ge,ftt=P(()=>{xl();No();pr();hY();Id();_i();utt();nt();Qt();vs();Gl();Yh();Av();_l();FMt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Ux=function(i,e){return function(t,n){e(t,n,i)}},Uge=class{constructor(e,t,n,o,r,s){this._instantiationService=e,this._contextViewService=t,this._keybindingService=o,this._layoutService=r,this._accessibilityService=s,n.onDidShowContextMenu(()=>this.hideHover())}showHover(e,t,n){var o,r,s,a;if(htt(this._currentHoverOptions)===htt(e)||this._currentHover&&(!((r=(o=this._currentHoverOptions)===null||o===void 0?void 0:o.persistence)===null||r===void 0)&&r.sticky))return;this._currentHoverOptions=e,this._lastHoverOptions=e;let l=e.trapFocus||this._accessibilityService.isScreenReaderOptimized(),c=gs();n||(l&&c?this._lastFocusedElementBeforeOpen=c:this._lastFocusedElementBeforeOpen=void 0);let d=new Ye,u=this._instantiationService.createInstance(kY,e);if(!((s=e.persistence)===null||s===void 0)&&s.sticky&&(u.isLocked=!0),u.onDispose(()=>{var f,p;((f=this._currentHover)===null||f===void 0?void 0:f.domNode)&&o$(this._currentHover.domNode)&&((p=this._lastFocusedElementBeforeOpen)===null||p===void 0||p.focus()),this._currentHoverOptions===e&&(this._currentHoverOptions=void 0),d.dispose()}),!e.container){let f=e.target instanceof HTMLElement?e.target:e.target.targetElements[0];e.container=this._layoutService.getContainer(pi(f))}let h=this._contextViewService;if(h.showContextView(new $ge(u,t),e.container),u.onRequestLayout(()=>h.layout()),!((a=e.persistence)===null||a===void 0)&&a.sticky)d.add(Xe(pi(e.container).document,Lt.MOUSE_DOWN,f=>{ms(f.target,u.domNode)||this.doHideHover()}));else{if("targetElements"in e.target)for(let p of e.target.targetElements)d.add(Xe(p,Lt.CLICK,()=>this.hideHover()));else d.add(Xe(e.target,Lt.CLICK,()=>this.hideHover()));let f=gs();if(f){let p=pi(f).document;d.add(Xe(f,Lt.KEY_DOWN,m=>{var y;return this._keyDown(m,u,!!(!((y=e.persistence)===null||y===void 0)&&y.hideOnKeyDown))})),d.add(Xe(p,Lt.KEY_DOWN,m=>{var y;return this._keyDown(m,u,!!(!((y=e.persistence)===null||y===void 0)&&y.hideOnKeyDown))})),d.add(Xe(f,Lt.KEY_UP,m=>this._keyUp(m,u))),d.add(Xe(p,Lt.KEY_UP,m=>this._keyUp(m,u)))}}if("IntersectionObserver"in Hn){let f=new IntersectionObserver(m=>this._intersectionChange(m,u),{threshold:0}),p="targetElements"in e.target?e.target.targetElements[0]:e.target;f.observe(p),d.add(Yt(()=>f.disconnect()))}return this._currentHover=u,u}hideHover(){var e;!((e=this._currentHover)===null||e===void 0)&&e.isLocked||!this._currentHoverOptions||this.doHideHover()}doHideHover(){this._currentHover=void 0,this._currentHoverOptions=void 0,this._contextViewService.hideContextView()}_intersectionChange(e,t){e[e.length-1].isIntersecting||t.dispose()}_keyDown(e,t,n){var o,r;if(e.key==="Alt"){t.isLocked=!0;return}let s=new qn(e);this._keybindingService.resolveKeyboardEvent(s).getSingleModifierDispatchChords().some(l=>!!l)||this._keybindingService.softDispatch(s,s.target).kind!==0||n&&(!(!((o=this._currentHoverOptions)===null||o===void 0)&&o.trapFocus)||e.key!=="Tab")&&(this.hideHover(),(r=this._lastFocusedElementBeforeOpen)===null||r===void 0||r.focus())}_keyUp(e,t){var n;e.key==="Alt"&&(t.isLocked=!1,t.isMouseIn||(this.hideHover(),(n=this._lastFocusedElementBeforeOpen)===null||n===void 0||n.focus()))}};Uge=FMt([Ux(0,qt),Ux(1,Pc),Ux(2,ca),Ux(3,fn),Ux(4,nf),Ux(5,Ba)],Uge);$ge=class{get anchorPosition(){return this._hover.anchor}constructor(e,t=!1){this._hover=e,this._focus=t}render(e){return this._hover.render(e),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}};ln(Fx,Uge,1);Qs((i,e)=>{let t=i.getColor(wj);t&&(e.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`))})});var T2,$x,Uv,EY,Fb=P(()=>{_i();Io();ho();T2=vi("IWorkspaceEditService"),$x=class{constructor(e){this.metadata=e}static convert(e){return e.edits.map(t=>{if(Uv.is(t))return Uv.lift(t);if(EY.is(t))return EY.lift(t);throw new Error("Unsupported edit")})}},Uv=class i extends $x{static is(e){return e instanceof i?!0:Gs(e)&&li.isUri(e.resource)&&Gs(e.textEdit)}static lift(e){return e instanceof i?e:new i(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,n=void 0,o){super(o),this.resource=e,this.textEdit=t,this.versionId=n}},EY=class i extends $x{static is(e){return e instanceof i?!0:Gs(e)&&(!!e.newResource||!!e.oldResource)}static lift(e){return e instanceof i?e:new i(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,n={},o){super(o),this.oldResource=e,this.newResource=t,this.options=n}}});var oc,jge=P(()=>{oc={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0}});function HMt(i){return typeof i.type<"u"||typeof i.anyOf<"u"}function ptt(){return DY===null&&(DY=Object.create(null),Object.keys(TY.properties).forEach(i=>{DY[i]=!0})),DY}function mtt(i){return ptt()[`editor.${i}`]||!1}function gtt(i){return ptt()[`diffEditor.${i}`]||!1}var jx,TY,DY,BMt,IY=P(()=>{jge();Ks();eT();Wt();Wg();Ys();jx=Object.freeze({id:"editor",order:5,type:"object",title:g("editorConfigurationTitle","Editor"),scope:5}),TY={...jx,properties:{"editor.tabSize":{type:"number",default:Ma.tabSize,minimum:1,markdownDescription:g("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:g("indentSize",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:Ma.insertSpaces,markdownDescription:g("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:Ma.detectIndentation,markdownDescription:g("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:Ma.trimAutoWhitespace,description:g("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:Ma.largeFileOptimizations,description:g("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[g("wordBasedSuggestions.off","Turn off Word Based Suggestions."),g("wordBasedSuggestions.currentDocument","Only suggest words from the active document."),g("wordBasedSuggestions.matchingDocuments","Suggest words from all open documents of the same language."),g("wordBasedSuggestions.allDocuments","Suggest words from all open documents.")],description:g("wordBasedSuggestions","Controls whether completions should be computed based on words in the document and from which documents they are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[g("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),g("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),g("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:g("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:g("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:g("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:g("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:g("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:g("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:g("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:g("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:g("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:g("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:g("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:g("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:oc.maxComputationTime,description:g("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:oc.maxFileSize,description:g("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:oc.renderSideBySide,description:g("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:oc.renderSideBySideInlineBreakpoint,description:g("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:oc.useInlineViewWhenSpaceIsLimited,description:g("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:oc.renderMarginRevertIcon,description:g("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:oc.ignoreTrimWhitespace,description:g("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:oc.renderIndicators,description:g("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:oc.diffCodeLens,description:g("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:oc.diffWordWrap,markdownEnumDescriptions:[g("wordWrap.off","Lines will never wrap."),g("wordWrap.on","Lines will wrap at the viewport width."),g("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:oc.diffAlgorithm,markdownEnumDescriptions:[g("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),g("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:oc.hideUnchangedRegions.enabled,markdownDescription:g("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:oc.hideUnchangedRegions.revealLineCount,markdownDescription:g("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:oc.hideUnchangedRegions.minimumLineCount,markdownDescription:g("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:oc.hideUnchangedRegions.contextLineCount,markdownDescription:g("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:oc.experimental.showMoves,markdownDescription:g("showMoves","Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:oc.experimental.showEmptyDecorations,description:g("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")}}};for(let i of S3){let e=i.schema;if(typeof e<"u")if(HMt(e))TY.properties[`editor.${i.name}`]=e;else for(let t in e)Object.hasOwnProperty.call(e,t)&&(TY.properties[t]=e[t])}DY=null;BMt=jn.as(Yl.Configuration);BMt.registerConfiguration(TY)});var So,c1=P(()=>{Kt();So=class{static insert(e,t){return{range:new O(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}});function qge(i){return Object.isFrozen(i)?i:gje(i)}var ad,Gge,Kge,$M,MY,Yge=P(()=>{Vi();od();Gc();ho();Io();er();Wg();Ys();ad=class i{constructor(e={},t=[],n=[],o){this._contents=e,this._keys=t,this._overrides=n,this.raw=o,this.overrideConfigurations=new Map}get rawConfiguration(){var e;if(!this._rawConfiguration)if(!((e=this.raw)===null||e===void 0)&&e.length){let t=this.raw.map(n=>{if(n instanceof i)return n;let o=new Gge("");return o.parseRaw(n),o.configurationModel});this._rawConfiguration=t.reduce((n,o)=>o===n?o:n.merge(o),t[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?Ghe(this.contents,e):this.contents}inspect(e,t){let n=this.rawConfiguration.getValue(e),o=t?this.rawConfiguration.getOverrideValue(e,t):void 0,r=t?this.rawConfiguration.override(t).getValue(e):n;return{value:n,override:o,merged:r}}getOverrideValue(e,t){let n=this.getContentsForOverrideIdentifer(t);return n?e?Ghe(n,e):n:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){var t,n;let o=Q1(this.contents),r=Q1(this.overrides),s=[...this.keys],a=!((t=this.raw)===null||t===void 0)&&t.length?[...this.raw]:[this];for(let l of e)if(a.push(...!((n=l.raw)===null||n===void 0)&&n.length?l.raw:[l]),!l.isEmpty()){this.mergeContents(o,l.contents);for(let c of l.overrides){let[d]=r.filter(u=>uo(u.identifiers,c.identifiers));d?(this.mergeContents(d.contents,c.contents),d.keys.push(...c.keys),d.keys=Oh(d.keys)):r.push(Q1(c))}for(let c of l.keys)s.indexOf(c)===-1&&s.push(c)}return new i(o,s,r,a.every(l=>l instanceof i)?void 0:a)}createOverrideConfigurationModel(e){let t=this.getContentsForOverrideIdentifer(e);if(!t||typeof t!="object"||!Object.keys(t).length)return this;let n={};for(let o of Oh([...Object.keys(this.contents),...Object.keys(t)])){let r=this.contents[o],s=t[o];s&&(typeof r=="object"&&typeof s=="object"?(r=Q1(r),this.mergeContents(r,s)):r=s),n[o]=r}return new i(n,this.keys,this.overrides)}mergeContents(e,t){for(let n of Object.keys(t)){if(n in e&&Gs(e[n])&&Gs(t[n])){this.mergeContents(e[n],t[n]);continue}e[n]=Q1(t[n])}}getContentsForOverrideIdentifer(e){let t=null,n=null,o=r=>{r&&(n?this.mergeContents(n,r):n=Q1(r))};for(let r of this.overrides)r.identifiers.length===1&&r.identifiers[0]===e?t=r.contents:r.identifiers.includes(e)&&o(r.contents);return o(t),n}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(e,t){this.updateValue(e,t,!0)}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){let t=this.keys.indexOf(e);t!==-1&&(this.keys.splice(t,1),IGe(this.contents,e),e4.test(e)&&this.overrides.splice(this.overrides.findIndex(n=>uo(n.identifiers,KT(e))),1))}updateValue(e,t,n){qhe(this.contents,e,t,o=>console.error(o)),n=n||this.keys.indexOf(e)===-1,n&&this.keys.push(e),e4.test(e)&&this.overrides.push({identifiers:KT(e),keys:Object.keys(this.contents[e]),contents:b$(this.contents[e],o=>console.error(o))})}},Gge=class{constructor(e){this._name=e,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new ad}parseRaw(e,t){this._raw=e;let{contents:n,keys:o,overrides:r,restricted:s,hasExcludedProperties:a}=this.doParseRaw(e,t);this._configurationModel=new ad(n,o,r,a?[e]:void 0),this._restrictedConfigurations=s||[]}doParseRaw(e,t){let n=jn.as(Yl.Configuration).getConfigurationProperties(),o=this.filter(e,n,!0,t);e=o.raw;let r=b$(e,l=>console.error(`Conflict in settings file ${this._name}: ${l}`)),s=Object.keys(e),a=this.toOverrides(e,l=>console.error(`Conflict in settings file ${this._name}: ${l}`));return{contents:r,keys:s,overrides:a,restricted:o.restricted,hasExcludedProperties:o.hasExcludedProperties}}filter(e,t,n,o){var r,s,a;let l=!1;if(!o?.scopes&&!o?.skipRestricted&&!(!((r=o?.exclude)===null||r===void 0)&&r.length))return{raw:e,restricted:[],hasExcludedProperties:l};let c={},d=[];for(let u in e)if(e4.test(u)&&n){let h=this.filter(e[u],t,!1,o);c[u]=h.raw,l=l||h.hasExcludedProperties,d.push(...h.restricted)}else{let h=t[u],f=h?typeof h.scope<"u"?h.scope:3:void 0;h?.restricted&&d.push(u),!(!((s=o.exclude)===null||s===void 0)&&s.includes(u))&&(!((a=o.include)===null||a===void 0)&&a.includes(u)||(f===void 0||o.scopes===void 0||o.scopes.includes(f))&&!(o.skipRestricted&&h?.restricted))?c[u]=e[u]:l=!0}return{raw:c,restricted:d,hasExcludedProperties:l}}toOverrides(e,t){let n=[];for(let o of Object.keys(e))if(e4.test(o)){let r={};for(let s in e[o])r[s]=e[o][s];n.push({identifiers:KT(o),keys:Object.keys(r),contents:b$(r,t)})}return n}},Kge=class{constructor(e,t,n,o,r,s,a,l,c,d,u,h,f){this.key=e,this.overrides=t,this._value=n,this.overrideIdentifiers=o,this.defaultConfiguration=r,this.policyConfiguration=s,this.applicationConfiguration=a,this.userConfiguration=l,this.localUserConfiguration=c,this.remoteUserConfiguration=d,this.workspaceConfiguration=u,this.folderConfigurationModel=h,this.memoryConfigurationModel=f}inspect(e,t,n){let o=e.inspect(t,n);return{get value(){return qge(o.value)},get override(){return qge(o.override)},get merged(){return qge(o.merged)}}}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}},$M=class i{constructor(e,t,n,o,r=new ad,s=new ad,a=new rs,l=new ad,c=new rs){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=n,this._localUserConfiguration=o,this._remoteUserConfiguration=r,this._workspaceConfiguration=s,this._folderConfigurations=a,this._memoryConfiguration=l,this._memoryConfigurationByResource=c,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new rs,this._userConfiguration=null}getValue(e,t,n){return this.getConsolidatedConfigurationModel(e,t,n).getValue(e)}updateValue(e,t,n={}){let o;n.resource?(o=this._memoryConfigurationByResource.get(n.resource),o||(o=new ad,this._memoryConfigurationByResource.set(n.resource,o))):o=this._memoryConfiguration,t===void 0?o.removeValue(e):o.setValue(e,t),n.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,n){let o=this.getConsolidatedConfigurationModel(e,t,n),r=this.getFolderConfigurationModelForResource(t.resource,n),s=t.resource?this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration:this._memoryConfiguration,a=new Set;for(let l of o.overrides)for(let c of l.identifiers)o.getOverrideValue(e,c)!==void 0&&a.add(c);return new Kge(e,t,o.getValue(e),a.size?[...a]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,n?this._workspaceConfiguration:void 0,r||void 0,s)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,n){let o=this.getConsolidatedConfigurationModelForResource(t,n);return t.overrideIdentifier&&(o=o.override(t.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(e)!==void 0&&(o=o.merge(this._policyConfiguration)),o}getConsolidatedConfigurationModelForResource({resource:e},t){let n=this.getWorkspaceConsolidatedConfiguration();if(t&&e){let o=t.getFolder(e);o&&(n=this.getFolderConsolidatedConfiguration(o.uri)||n);let r=this._memoryConfigurationByResource.get(e);r&&(n=n.merge(r))}return n}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){let n=this.getWorkspaceConsolidatedConfiguration(),o=this._folderConfigurations.get(e);o?(t=n.merge(o),this._foldersConsolidatedConfigurations.set(e,t)):t=n}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){let n=t.getFolder(e);if(n)return this._folderConfigurations.get(n.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,t)=>{let{contents:n,overrides:o,keys:r}=this._folderConfigurations.get(t);return e.push([t,{contents:n,overrides:o,keys:r}]),e},[])}}static parse(e){let t=this.parseConfigurationModel(e.defaults),n=this.parseConfigurationModel(e.policy),o=this.parseConfigurationModel(e.application),r=this.parseConfigurationModel(e.user),s=this.parseConfigurationModel(e.workspace),a=e.folders.reduce((l,c)=>(l.set(li.revive(c[0]),this.parseConfigurationModel(c[1])),l),new rs);return new i(t,n,o,r,new ad,s,a,new ad,new rs)}static parseConfigurationModel(e){return new ad(e.contents,e.keys,e.overrides)}},MY=class{constructor(e,t,n,o){this.change=e,this.previous=t,this.currentConfiguraiton=n,this.currentWorkspace=o,this._marker=` +`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=46,this.affectedKeys=new Set,this._previousConfiguration=void 0;for(let r of e.keys)this.affectedKeys.add(r);for(let[,r]of e.overrides)for(let s of r)this.affectedKeys.add(s);this._affectsConfigStr=this._marker;for(let r of this.affectedKeys)this._affectsConfigStr+=r+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=$M.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var n;let o=this._marker+e,r=this._affectsConfigStr.indexOf(o);if(r<0)return!1;let s=r+o.length;if(s>=this._affectsConfigStr.length)return!1;let a=this._affectsConfigStr.charCodeAt(s);if(a!==this._markerCode1&&a!==this._markerCode2)return!1;if(t){let l=this.previousConfiguration?this.previousConfiguration.getValue(e,t,(n=this.previous)===null||n===void 0?void 0:n.workspace):void 0,c=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!Za(l,c)}return!0}}});function WMt(i,e,t){return{kind:2,commandId:i,commandArgs:e,isBubble:t}}function vtt(i){return i?`${i.serialize()}`:"no when condition"}function _tt(i){return i.extensionId?i.isBuiltinExtension?`built-in extension ${i.extensionId}`:`user extension ${i.extensionId}`:i.isDefault?"built-in":"user"}var jM,VMt,NY,Zge=P(()=>{Xi();jM={kind:0},VMt={kind:1};NY=class i{constructor(e,t,n){var o;this._log=n,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(let r of e){let s=r.command;s&&s.charAt(0)!=="-"&&this._defaultBoundCommands.set(s,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=i.handleRemovals([].concat(e).concat(t));for(let r=0,s=this._keybindings.length;r"u"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let o=n.length-1;o>=0;o--){let r=n[o];if(r.command===t.command)continue;let s=!0;for(let a=1;a"u"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if(!(typeof t>"u")){for(let n=0,o=t.length;n"u"||n.length===0)return null;if(n.length===1)return n[0];for(let o=n.length-1;o>=0;o--){let r=n[o];if(t.contextMatchesRules(r.when))return r}return n[n.length-1]}resolve(e,t,n){let o=[...t,n];this._log(`| Resolving ${o}`);let r=this._map.get(o[0]);if(r===void 0)return this._log("\\ No keybinding entries."),jM;let s=null;if(o.length<2)s=r;else{s=[];for(let l=0,c=r.length;ld.chords.length)continue;let u=!0;for(let h=1;h=0;n--){let o=t[n];if(i._contextMatchesRules(e,o.when))return o}return null}static _contextMatchesRules(e,t){return t?t.evaluate(e):!0}}});var UMt,AY,$v,btt=P(()=>{Qi();Pi();Xt();F1e();nt();Wt();Zge();UMt=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/,AY=class extends ue{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:Et.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,n,o,r){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=n,this._notificationService=o,this._logService=r,this._onDidUpdateKeybindings=this._register(new ge),this._currentChords=[],this._currentChordChecker=new B3,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=$v.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new Zs,this._currentlyDispatchingCommandId=null,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){let n=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(n)return n.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");let n=this.resolveKeyboardEvent(e);if(n.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),jM;let[o]=n.getDispatchChords();if(o===null)return this._log("\\ Keyboard event cannot be dispatched"),jM;let r=this._contextKeyService.getContext(t),s=this._currentChords.map(({keypress:a})=>a);return this._getResolver().resolve(r,s,o)}_scheduleLeaveChordMode(){let e=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-e>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw LC("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(g("first.chord","({0}) was pressed. Waiting for second key of chord...",t));break;default:{let n=this._currentChords.map(({label:o})=>o).join(", ");this._currentChordStatusMessage=this._notificationService.status(g("next.chord","({0}) was pressed. Waiting for next key of chord...",n))}}this._scheduleLeaveChordMode(),ab.enabled&&ab.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],ab.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){let n=this.resolveKeyboardEvent(e),[o]=n.getSingleModifierDispatchChords();if(o)return this._ignoreSingleModifiers.has(o)?(this._log(`+ Ignoring single modifier ${o} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=$v.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=$v.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${o}.`),this._currentSingleModifier=o,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):o===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${o} ${o}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(n,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${o}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));let[r]=n.getChords();return this._ignoreSingleModifiers=new $v(r),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,n=!1){var o;let r=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let s=null,a=null;if(n){let[u]=e.getSingleModifierDispatchChords();s=u,a=u?[u]:[]}else[s]=e.getDispatchChords(),a=this._currentChords.map(({keypress:u})=>u);if(s===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),r;let l=this._contextKeyService.getContext(t),c=e.getLabel(),d=this._getResolver().resolve(l,a,s);switch(d.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",c,"[ No matching keybinding ]"),this.inChordMode){let u=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${u}, ${c}".`),this._notificationService.status(g("missing.chord","The key combination ({0}, {1}) is not a command.",u,c),{hideAfter:10*1e3}),this._leaveChordMode(),r=!0}return r}case 1:return this._logService.trace("KeybindingService#dispatch",c,"[ Several keybindings match - more chords needed ]"),r=!0,this._expectAnotherChord(s,c),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),r;case 2:{if(this._logService.trace("KeybindingService#dispatch",c,`[ Will dispatch command ${d.commandId} ]`),d.commandId===null||d.commandId===""){if(this.inChordMode){let u=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${u}, ${c}".`),this._notificationService.status(g("missing.chord","The key combination ({0}, {1}) is not a command.",u,c),{hideAfter:10*1e3}),this._leaveChordMode(),r=!0}}else{this.inChordMode&&this._leaveChordMode(),d.isBubble||(r=!0),this._log(`+ Invoking command ${d.commandId}.`),this._currentlyDispatchingCommandId=d.commandId;try{typeof d.commandArgs>"u"?this._commandService.executeCommand(d.commandId).then(void 0,u=>this._notificationService.warn(u)):this._commandService.executeCommand(d.commandId,d.commandArgs).then(void 0,u=>this._notificationService.warn(u))}finally{this._currentlyDispatchingCommandId=null}UMt.test(d.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:d.commandId,from:"keybinding",detail:(o=e.getUserSettingsLabel())!==null&&o!==void 0?o:void 0})}return r}}}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}},$v=class{constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}};$v.EMPTY=new $v(null)});function RY(i){let e=[];for(let t=0,n=i.length;t{qM=class{constructor(e,t,n,o,r,s,a){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?RY(e.getDispatchChords()):[],e&&this.chords.length===0&&(this.chords=RY(e.getSingleModifierDispatchChords())),this.bubble=t?t.charCodeAt(0)===94:!1,this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=o,this.isDefault=r,this.extensionId=s,this.isBuiltinExtension=a}}});function $Mt(i,e,t){if(e===null)return"";let n=[];return i.ctrlKey&&n.push(t.ctrlKey),i.shiftKey&&n.push(t.shiftKey),i.altKey&&n.push(t.altKey),i.metaKey&&n.push(t.metaKey),e!==""&&n.push(e),n.join(t.separator)}var qx,Gx,ytt,Ctt,wtt,PY=P(()=>{Wt();qx=class{constructor(e,t,n=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=n}toLabel(e,t,n){if(t.length===0)return null;let o=[];for(let r=0,s=t.length;r{Pi();PY();w5();OY=class extends IU{constructor(e,t){if(super(),t.length===0)throw gl("chords");this._os=e,this._chords=t}getLabel(){return Gx.toLabel(this._os,this._chords,e=>this._getLabel(e))}getAriaLabel(){return ytt.toLabel(this._os,this._chords,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:Ctt.toLabel(this._os,this._chords,e=>this._getElectronAccelerator(e))}getUserSettingsLabel(){return wtt.toLabel(this._os,this._chords,e=>this._getUserSettingsLabel(e))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(e=>this._getChord(e))}_getChord(e){return new TU(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map(e=>this._getChordDispatch(e))}getSingleModifierDispatchChords(){return this._chords.map(e=>this._getSingleModifierChordDispatch(e))}}});var GM,Stt=P(()=>{Bh();w5();xtt();Xge();GM=class i extends OY{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return ep.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":ep.toString(e.keyCode)}_getElectronAccelerator(e){return ep.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";let t=ep.toUserSettingsUS(e.keyCode);return t&&t.toLowerCase()}_getChordDispatch(e){return i.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=ep.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){let t=sW[e];if(t!==-1)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof Uf)return e;let t=this._scanCodeToKeyCode(e.scanCode);return t===0?null:new Uf(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){let n=RY(e.chords.map(o=>this._toKeyCodeChord(o)));return n.length>0?[new i(n,t)]:[]}}});var Om,Kx=P(()=>{_i();Om=vi("labelService")});var zY,mHi,ph,mh,xp=P(()=>{_i();zY=vi("progressService"),mHi=Object.freeze({total(){},worked(){},done(){}}),ph=class{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}};ph.None=Object.freeze({report(){}});mh=vi("editorProgressService")});var Qge,Jge,e2e,t2e,Yx,Hb,FY=P(()=>{Ri();Qge=class{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){let n=this._value.charCodeAt(t);if(!(n===47||this._splitOnBackslash&&n===92))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new i(new t2e(e,t))}static forStrings(){return new i(new Qge)}static forConfigKeys(){return new i(new Jge)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){let n=this._iter.reset(e),o;this._root||(this._root=new Yx,this._root.segment=n.value());let r=[];for(o=this._root;;){let a=n.cmp(o.segment);if(a>0)o.left||(o.left=new Yx,o.left.segment=n.value()),r.push([-1,o]),o=o.left;else if(a<0)o.right||(o.right=new Yx,o.right.segment=n.value()),r.push([1,o]),o=o.right;else if(n.hasNext())n.next(),o.mid||(o.mid=new Yx,o.mid.segment=n.value()),r.push([0,o]),o=o.mid;else break}let s=o.value;o.value=t,o.key=e;for(let a=r.length-1;a>=0;a--){let l=r[a][1];l.updateHeight();let c=l.balanceFactor();if(c<-1||c>1){let d=r[a][0],u=r[a+1][0];if(d===1&&u===1)r[a][1]=l.rotateLeft();else if(d===-1&&u===-1)r[a][1]=l.rotateRight();else if(d===1&&u===-1)l.right=r[a+1][1]=r[a+1][1].rotateRight(),r[a][1]=l.rotateLeft();else if(d===-1&&u===1)l.left=r[a+1][1]=r[a+1][1].rotateLeft(),r[a][1]=l.rotateRight();else throw new Error;if(a>0)switch(r[a-1][0]){case-1:r[a-1][1].left=r[a][1];break;case 1:r[a-1][1].right=r[a][1];break;case 0:r[a-1][1].mid=r[a][1];break}else this._root=r[0][1]}}return s}get(e){var t;return(t=this._getNode(e))===null||t===void 0?void 0:t.value}_getNode(e){let t=this._iter.reset(e),n=this._root;for(;n;){let o=t.cmp(n.segment);if(o>0)n=n.left;else if(o<0)n=n.right;else if(t.hasNext())t.next(),n=n.mid;else break}return n}has(e){let t=this._getNode(e);return!(t?.value===void 0&&t?.mid===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var n;let o=this._iter.reset(e),r=[],s=this._root;for(;s;){let a=o.cmp(s.segment);if(a>0)r.push([-1,s]),s=s.left;else if(a<0)r.push([1,s]),s=s.right;else if(o.hasNext())o.next(),r.push([0,s]),s=s.mid;else break}if(s){if(t?(s.left=void 0,s.mid=void 0,s.right=void 0,s.height=1):(s.key=void 0,s.value=void 0),!s.mid&&!s.value)if(s.left&&s.right){let a=this._min(s.right);if(a.key){let{key:l,value:c,segment:d}=a;this._delete(a.key,!1),s.key=l,s.value=c,s.segment=d}}else{let a=(n=s.left)!==null&&n!==void 0?n:s.right;if(r.length>0){let[l,c]=r[r.length-1];switch(l){case-1:c.left=a;break;case 0:c.mid=a;break;case 1:c.right=a;break}}else this._root=a}for(let a=r.length-1;a>=0;a--){let l=r[a][1];l.updateHeight();let c=l.balanceFactor();if(c>1?(l.right.balanceFactor()>=0||(l.right=l.right.rotateRight()),r[a][1]=l.rotateLeft()):c<-1&&(l.left.balanceFactor()<=0||(l.left=l.left.rotateLeft()),r[a][1]=l.rotateRight()),a>0)switch(r[a-1][0]){case-1:r[a-1][1].left=r[a][1];break;case 1:r[a-1][1].right=r[a][1];break;case 0:r[a-1][1].mid=r[a][1];break}else this._root=r[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){let t=this._iter.reset(e),n=this._root,o;for(;n;){let r=t.cmp(n.segment);if(r>0)n=n.left;else if(r<0)n=n.right;else if(t.hasNext())t.next(),o=n.value||o,n=n.mid;else break}return n&&n.value||o}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){let n=this._iter.reset(e),o=this._root;for(;o;){let r=n.cmp(o.segment);if(r>0)o=o.left;else if(r<0)o=o.right;else if(n.hasNext())n.next(),o=o.mid;else return o.mid?this._entries(o.mid):t?o.value:void 0}}forEach(e){for(let[t,n]of this)e(n,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){let t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}});function BY(i){let e=i;return typeof e?.id=="string"&&li.isUri(e.uri)}function ktt(i){let e=i;return typeof e?.id=="string"&&!BY(i)&&!GMt(i)}function Ltt(i,e){if(typeof i=="string"||typeof i>"u")return typeof i=="string"?{id:tp(i)}:e?jMt:qMt;let t=i;return t.configuration?{id:t.id,configPath:t.configuration}:t.folders.length===1?{id:t.id,uri:t.folders[0].uri}:{id:t.id}}function GMt(i){let e=i;return typeof e?.id=="string"&&li.isUri(e.configPath)}function Ett(i){return i.id===i2e}var zm,jMt,qMt,HY,VY,SHi,i2e,Zx=P(()=>{Wt();Dg();FY();Io();_i();zm=vi("contextService");jMt={id:"ext-dev"},qMt={id:"empty-window"};HY=class{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}},VY="code-workspace",SHi=[{name:g("codeWorkspace","Code Workspace"),extensions:[VY]}],i2e="4064f6ec-cb38-4ad0-af64-ee6467e63c82"});var WY,KM,UY,YM,Xx,ZM,$Y,jY,I2=P(()=>{Wt();(function(i){i.inspectTokensAction=g("inspectTokens","Developer: Inspect Tokens")})(WY||(WY={}));(function(i){i.gotoLineActionLabel=g("gotoLineActionLabel","Go to Line/Column...")})(KM||(KM={}));(function(i){i.helpQuickAccessActionLabel=g("helpQuickAccess","Show all Quick Access Providers")})(UY||(UY={}));(function(i){i.quickCommandActionLabel=g("quickCommandActionLabel","Command Palette"),i.quickCommandHelp=g("quickCommandActionHelp","Show And Run Commands")})(YM||(YM={}));(function(i){i.quickOutlineActionLabel=g("quickOutlineActionLabel","Go to Symbol..."),i.quickOutlineByCategoryActionLabel=g("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(Xx||(Xx={}));(function(i){i.editorViewAccessibleLabel=g("editorViewAccessibleLabel","Editor content"),i.accessibilityHelpMessage=g("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(ZM||(ZM={}));(function(i){i.toggleHighContrast=g("toggleHighContrast","Toggle High Contrast Theme")})($Y||($Y={}));(function(i){i.bulkEditServiceSummary=g("bulkEditServiceSummary","Made {0} edits in {1} files")})(jY||(jY={}))});var qY,n2e=P(()=>{_i();qY=vi("workspaceTrustManagementService")});var Ua,XM=P(()=>{(function(i){function e(r,s){if(r.start>=s.end||s.start>=r.end)return{start:0,end:0};let a=Math.max(r.start,s.start),l=Math.min(r.end,s.end);return l-a<=0?{start:0,end:0}:{start:a,end:l}}i.intersect=e;function t(r){return r.end-r.start<=0}i.isEmpty=t;function n(r,s){return!t(e(r,s))}i.intersects=n;function o(r,s){let a=[],l={start:r.start,end:Math.min(s.start,r.end)},c={start:Math.max(s.end,r.start),end:r.end};return t(l)||a.push(l),t(c)||a.push(c),a}i.relativeComplement=o})(Ua||(Ua={}))});var Dtt=P(()=>{});function KMt(i){let e=i;return!!e&&typeof e.x=="number"&&typeof e.y=="number"}function Bb(i,e,t){let n=t.mode===jv.ALIGN?t.offset:t.offset+t.size,o=t.mode===jv.ALIGN?t.offset+t.size:t.offset;return t.position===0?e<=i-n?n:e<=o?o-e:Math.max(i-e,0):e<=o?o-e:e<=i-n?n:0}var jv,Qx,YMt,o2e=P(()=>{FU();Qt();nt();Mn();XM();Dtt();(function(i){i[i.AVOID=0]="AVOID",i[i.ALIGN=1]="ALIGN"})(jv||(jv={}));Qx=class i extends ue{constructor(e,t){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=ue.None,this.toDisposeOnSetContainer=ue.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=pt(".context-view"),Fa(this.view),this.setContainer(e,t),this._register(Yt(()=>this.setContainer(null,1)))}setContainer(e,t){var n;this.useFixedPosition=t!==1;let o=this.useShadowDOM;if(this.useShadowDOM=t===3,!(e===this.container&&o===this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(n=this.shadowRootHostElement)===null||n===void 0||n.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=pt(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});let s=document.createElement("style");s.textContent=YMt,this.shadowRoot.appendChild(s),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(pt("slot"))}else this.container.appendChild(this.view);let r=new Ye;i.BUBBLE_UP_EVENTS.forEach(s=>{r.add(go(this.container,s,a=>{this.onDOMEvent(a,!1)}))}),i.BUBBLE_DOWN_EVENTS.forEach(s=>{r.add(go(this.container,s,a=>{this.onDOMEvent(a,!0)},!0))}),this.toDisposeOnSetContainer=r}}show(e){var t,n;this.isVisible()&&this.hide(),is(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",el(this.view),this.toDisposeOnClean=e.render(this.view)||ue.None,this.delegate=e,this.doLayout(),(n=(t=this.delegate).focus)===null||n===void 0||n.call(t)}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(Lc&&VC.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;let e=this.delegate.getAnchor(),t;if(e instanceof HTMLElement){let h=Lo(e),f=t$(e);t={top:h.top*f,left:h.left*f,width:h.width*f,height:h.height*f}}else KMt(e)?t={top:e.y,left:e.x,width:e.width||1,height:e.height||2}:t={top:e.posy,left:e.posx,width:2,height:2};let n=wl(this.view),o=Bg(this.view),r=this.delegate.anchorPosition||0,s=this.delegate.anchorAlignment||0,a=this.delegate.anchorAxisAlignment||0,l,c,d=Jqe();if(a===0){let h={offset:t.top-d.pageYOffset,size:t.height,position:r===0?0:1},f={offset:t.left,size:t.width,position:s===0?0:1,mode:jv.ALIGN};l=Bb(d.innerHeight,o,h)+d.pageYOffset,Ua.intersects({start:l,end:l+o},{start:h.offset,end:h.offset+h.size})&&(f.mode=jv.AVOID),c=Bb(d.innerWidth,n,f)}else{let h={offset:t.left,size:t.width,position:s===0?0:1},f={offset:t.top,size:t.height,position:r===0?0:1,mode:jv.ALIGN};c=Bb(d.innerWidth,n,h),Ua.intersects({start:c,end:c+n},{start:h.offset,end:h.offset+h.size})&&(f.mode=jv.AVOID),l=Bb(d.innerHeight,o,f)+d.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(r===0?"bottom":"top"),this.view.classList.add(s===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);let u=Lo(this.container);this.view.style.top=`${l-(this.useFixedPosition?Lo(this.view).top:u.top)}px`,this.view.style.left=`${c-(this.useFixedPosition?Lo(this.view).left:u.left)}px`,this.view.style.width="initial"}hide(e){let t=this.delegate;this.delegate=null,t?.onHide&&t.onHide(e),this.toDisposeOnClean.dispose(),Fa(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,pi(e).document.activeElement):t&&!ms(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}};Qx.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"];Qx.BUBBLE_DOWN_EVENTS=["click"];YMt=` :host { all: initial; /* 1st rule so subsequent properties are reset. */ } @@ -206,7 +206,7 @@ Please report this to https://github.com/markedjs/marked.`,$.silent)return"

An :host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; } :host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; } :host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; } -`});var ZMt,XMt,$Y,Ttt=P(()=>{o2e();nt();Nv();Qt();ZMt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},XMt=function(i,e){return function(t,n){e(t,n,i)}},$Y=class extends ue{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=ue.None,this.contextView=this._register(new Qx(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer(()=>this.layout()))}showContextView(e,t,n){let o;t?t===this.layoutService.getContainer(pi(t))?o=1:n?o=3:o=2:o=1,this.contextView.setContainer(t??this.layoutService.activeContainer,o),this.contextView.show(e);let r=Yt(()=>{this.currentViewDisposable===r&&this.hideContextView()});return this.currentViewDisposable=r,r}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}dispose(){super.dispose(),this.currentViewDisposable.dispose(),this.currentViewDisposable=ue.None}};$Y=ZMt([XMt(0,nf)],$Y)});function QM(i,e=!1){QMt(i,!1,e)}function QMt(i,e,t){let n=JMt(i,e);Jx.push(n),n.userConfigured?Mtt.push(n):r2e.push(n),t&&!n.userConfigured&&Jx.forEach(o=>{o.mime===n.mime||o.userConfigured||(n.extension&&o.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&o.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&o.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&o.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))})}function JMt(i,e){return{id:i.id,mime:i.mime,filename:i.filename,extension:i.extension,filepattern:i.filepattern,firstline:i.firstline,userConfigured:e,filenameLowercase:i.filename?i.filename.toLowerCase():void 0,extensionLowercase:i.extension?i.extension.toLowerCase():void 0,filepatternLowercase:i.filepattern?uge(i.filepattern.toLowerCase()):void 0,filepatternOnPath:i.filepattern?i.filepattern.indexOf(hs.sep)>=0:!1}}function Ntt(){Jx=Jx.filter(i=>i.userConfigured),r2e=[]}function Att(i,e){return eNt(i,e).map(t=>t.id)}function eNt(i,e){let t;if(i)switch(i.scheme){case $i.file:t=i.fsPath;break;case $i.data:{t=h2.parseMetaData(i).get(h2.META_DATA_LABEL);break}case $i.vscodeNotebookCell:t=void 0;break;default:t=i.path}if(!t)return[{id:"unknown",mime:rr.unknown}];t=t.toLowerCase();let n=tp(t),o=Itt(t,n,Mtt);if(o)return[o,{id:ra,mime:rr.text}];let r=Itt(t,n,r2e);if(r)return[r,{id:ra,mime:rr.text}];if(e){let s=tNt(e);if(s)return[s,{id:ra,mime:rr.text}]}return[{id:"unknown",mime:rr.unknown}]}function Itt(i,e,t){var n;let o,r,s;for(let a=t.length-1;a>=0;a--){let l=t[a];if(e===l.filenameLowercase){o=l;break}if(l.filepattern&&(!r||l.filepattern.length>r.filepattern.length)){let c=l.filepatternOnPath?i:e;!((n=l.filepatternLowercase)===null||n===void 0)&&n.call(l,c)&&(r=l)}l.extension&&(!s||l.extension.length>s.extension.length)&&e.endsWith(l.extensionLowercase)&&(s=l)}if(o)return o;if(r)return r;if(s)return s}function tNt(i){if(FC(i)&&(i=i.substr(1)),i.length>0)for(let e=Jx.length-1;e>=0;e--){let t=Jx[e];if(!t.firstline)continue;let n=i.match(t.firstline);if(n&&n.length>0)return t}}var Jx,r2e,Mtt,Rtt=P(()=>{hge();G3();Nc();Dg();ec();Ri();Zf();Jx=[],r2e=[],Mtt=[]});var jY,Ptt,s2e,JM,Ott=P(()=>{Xt();nt();Ri();Rtt();Zf();Wg();Ys();jY=Object.prototype.hasOwnProperty,Ptt="vs.editor.nullLanguage",s2e=class{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(Ptt,0),this._register(ra,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;let t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||Ptt}},JM=class i extends ue{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new ge),this.onDidChange=this._onDidChange.event,i.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new s2e,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(K3.onDidChangeLanguages(n=>{this._initializeFromRegistry()})))}dispose(){i.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Ntt();let e=[].concat(K3.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(let t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(t=>{let n=this._languages[t];n.name&&(this._nameMap[n.name]=n.identifier),n.aliases.forEach(o=>{this._lowercaseNameMap[o.toLowerCase()]=n.identifier}),n.mimetypes.forEach(o=>{this._mimeTypesMap[o]=n.identifier})}),jn.as(Yl.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){let t=e.id,n;jY.call(this._languages,t)?n=this._languages[t]:(this.languageIdCodec.register(t),n={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=n),this._mergeLanguage(n,e)}_mergeLanguage(e,t){let n=t.id,o=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),o=t.mimetypes[0]),o||(o=`text/x-${n}`,e.mimetypes.push(o)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(let a of t.extensions)QM({id:n,mime:o,extension:a},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let a of t.filenames)QM({id:n,mime:o,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(let a of t.filenamePatterns)QM({id:n,mime:o,filepattern:a},this._warnOnOverwrite);if(typeof t.firstLine=="string"&&t.firstLine.length>0){let a=t.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{let l=new RegExp(a);aqe(l)||QM({id:n,mime:o,firstline:l},this._warnOnOverwrite)}catch(l){console.warn(`[${t.id}]: Invalid regular expression \`${a}\`: `,l)}}e.aliases.push(n);let r=null;if(typeof t.aliases<"u"&&Array.isArray(t.aliases)&&(t.aliases.length===0?r=[null]:r=t.aliases),r!==null)for(let a of r)!a||a.length===0||e.aliases.push(a);let s=r!==null&&r.length>0;if(!(s&&r[0]===null)){let a=(s?r[0]:null)||n;(s||!e.name)&&(e.name=a)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return e?jY.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){let t=e.toLowerCase();return jY.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&jY.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return!e&&!t?[]:Att(e,t)}};JM.instanceCount=0});var eN,qY,ztt=P(()=>{Xt();nt();Ott();Vi();Pr();Zf();eN=class i extends ue{constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new ge),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new ge),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new ge({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,i.instanceCount++,this._registry=this._register(new JM(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){i.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){let n=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return vC(n,null)}createById(e){return new qY(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,t){return new qY(this.onDidChange,()=>{let n=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(n)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=ra),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),Eo.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}};eN.instanceCount=0;qY=class{constructor(e,t){this._onDidChangeLanguages=e,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new ge({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var e;let t=this._selector();t!==this.languageId&&(this.languageId=t,(e=this._emitter)===null||e===void 0||e.fire(this.languageId))}}});var jv,GY=P(()=>{G3();jv={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:rr.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}});function Ftt(i,e){qs(e)?i.title=Vx(e):e?.markdownNotSupportedFallback?i.title=e.markdownNotSupportedFallback:i.removeAttribute("title")}function KY(i,e,t,n){let o,r,s=(_,v)=>{var b;let C=r!==void 0;_&&(r?.dispose(),r=void 0),v&&(o?.dispose(),o=void 0),C&&((b=i.onDidHideHover)===null||b===void 0||b.call(i))},a=(_,v,b)=>new Zs(async()=>{(!r||r.isDisposed)&&(r=new a2e(i,b||e,_>0),await r.update(t,v,n))},_),l=!1,c=Xe(e,Lt.MOUSE_DOWN,()=>{l=!0,s(!0,!0)},!0),d=Xe(e,Lt.MOUSE_UP,()=>{l=!1},!0),u=Xe(e,Lt.MOUSE_LEAVE,_=>{l=!1,s(!1,_.fromElement===e)},!0),h=()=>{if(o)return;let _=new Ye,v={targetElements:[e],dispose:()=>{}};if(i.placement===void 0||i.placement==="mouse"){let b=C=>{v.x=C.x+10,C.target instanceof HTMLElement&&C.target.classList.contains("action-label")&&s(!0,!0)};_.add(Xe(e,Lt.MOUSE_MOVE,b,!0))}_.add(a(i.delay,!1,v)),o=_},f=Xe(e,Lt.MOUSE_OVER,h,!0),p=()=>{if(l||o)return;let _={targetElements:[e],dispose:()=>{}},v=new Ye,b=()=>s(!0,!0);v.add(Xe(e,Lt.BLUR,b,!0)),v.add(a(i.delay,!1,_)),o=v},m=Xe(e,Lt.FOCUS,p,!0);return{show:_=>{s(!1,!0),a(0,_)},hide:()=>{s(!0,!0)},update:async(_,v)=>{t=_,await r?.update(t,void 0,v)},dispose:()=>{f.dispose(),u.dispose(),c.dispose(),d.dispose(),m.dispose(),s(!0,!0)}}}var a2e,l2e=P(()=>{Qt();Qi();mo();Md();Ob();nt();ho();Wt();a2e=class{constructor(e,t,n){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=n}async update(e,t,n){var o;if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let r;if(e===void 0||qs(e)||e instanceof HTMLElement)r=e;else if(!v3(e.markdown))r=(o=e.markdown)!==null&&o!==void 0?o:e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(g("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new Jn;let s=this._cancellationTokenSource.token;if(r=await e.markdown(s),r===void 0&&(r=e.markdownNotSupportedFallback),this.isDisposed||s.isCancellationRequested)return}this.show(r,t,n)}show(e,t,n){let o=this._hoverWidget;if(this.hasContent(e)){let r={content:e,target:this.target,appearance:{showPointer:this.hoverDelegate.placement==="element",skipFadeInAnimation:!this.fadeInAnimation||!!o},position:{hoverPosition:2},...n};this._hoverWidget=this.hoverDelegate.showHover(r,t)}o?.dispose()}hasContent(e){return e?sf(e)?!!e.value:!0:!1}get isDisposed(){var e;return(e=this._hoverWidget)===null||e===void 0?void 0:e.isDisposed}dispose(){var e,t;(e=this._hoverWidget)===null||e===void 0||e.dispose(),(t=this._cancellationTokenSource)===null||t===void 0||t.dispose(!0),this._cancellationTokenSource=void 0}}});var YY,Htt=P(()=>{YY=class{constructor(e){this.spliceables=e}splice(e,t,n){this.spliceables.forEach(o=>o.splice(e,t,n))}}});var c2e=P(()=>{});var M2,Btt=P(()=>{M2=class extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}});function Vtt(i,e){let t=[];for(let n of e){if(i.start>=n.range.end)continue;if(i.ende.concat(t),[]))}var tN,Wtt=P(()=>{XM();tN=class{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,t,n=[]){let o=n.length-t,r=Vtt({start:0,end:e},this.groups),s=Vtt({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(l=>({range:ZY(l.range,o),size:l.size})),a=n.map((l,c)=>({range:{start:e+c,end:e+c+1},size:l.size}));this.groups=nNt(r,a,s),this._size=this._paddingTop+this.groups.reduce((l,c)=>l+c.size*(c.range.end-c.range.start),0)}get count(){let e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{Qt();XY=class{constructor(e){this.renderers=e,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(e){let t=this.getTemplateCache(e).pop(),n=!1;if(t)n=this.transactionNodesPendingRemoval.has(t.domNode),n&&this.transactionNodesPendingRemoval.delete(t.domNode);else{let o=pt(".monaco-list-row"),s=this.getRenderer(e).renderTemplate(o);t={domNode:o,templateId:e,templateData:s}}return{row:t,isReusingConnectedDomNode:n}}release(e){e&&this.releaseRow(e)}transact(e){if(this.inTransaction)throw new Error("Already in transaction");this.inTransaction=!0;try{e()}finally{for(let t of this.transactionNodesPendingRemoval)this.doRemoveNode(t);this.transactionNodesPendingRemoval.clear(),this.inTransaction=!1}}releaseRow(e){let{domNode:t,templateId:n}=e;t&&(this.inTransaction?this.transactionNodesPendingRemoval.add(t):this.doRemoveNode(t)),this.getTemplateCache(n).push(e)}doRemoveNode(e){e.classList.remove("scrolling"),oNt(e)}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach((e,t)=>{for(let n of e)this.getRenderer(t).disposeTemplate(n.templateData),n.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){let t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}});function rNt(i,e){return Array.isArray(i)&&Array.isArray(e)?uo(i,e):i===e}var D4,Vb,N2,E4,d2e,u2e,h2e,af,QY=P(()=>{GY();Qt();vp();dh();o1();Vi();Qi();dv();Xt();nt();XM();Jw();Wtt();Utt();Pi();D4=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Vb={CurrentDragAndDropData:void 0},N2={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(i){return[i]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0},E4=class{constructor(e){this.elements=e}update(){}getData(){return this.elements}},d2e=class{constructor(e){this.elements=e}update(){}getData(){return this.elements}},u2e=class{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;to,e?.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(t,n)=>n+1,e?.getRole?this.getRole=e.getRole.bind(e):this.getRole=t=>"listitem",e?.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=t=>{}}},af=class i{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(let t of this.items)this.measureItemWidth(t);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:JU(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,n,o=N2){var r,s,a,l,c,d,u,h,f,p,m,y,_;if(this.virtualDelegate=t,this.domId=`list_id_${++i.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new ba(50),this.splicing=!1,this.dragOverAnimationStopDisposable=ue.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=ue.None,this.onDragLeaveTimeout=ue.None,this.disposables=new Ye,this._onDidChangeContentHeight=new ge,this._onDidChangeContentWidth=new ge,this.onDidChangeContentHeight=Et.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,o.horizontalScrolling&&o.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new tN((r=o.paddingTop)!==null&&r!==void 0?r:0);for(let b of n)this.renderers.set(b.templateId,b);this.cache=this.disposables.add(new XY(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof o.mouseSupport=="boolean"?o.mouseSupport:!0),this._horizontalScrolling=(s=o.horizontalScrolling)!==null&&s!==void 0?s:N2.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=typeof o.paddingBottom>"u"?0:o.paddingBottom,this.accessibilityProvider=new h2e(o.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",((a=o.transformOptimization)!==null&&a!==void 0?a:N2.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(ar.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new n1({forceIntegerValues:!0,smoothScrollDuration:(l=o.smoothScrolling)!==null&&l!==void 0&&l?125:0,scheduleAtNextAnimationFrame:b=>za(pi(this.domNode),b)})),this.scrollableElement=this.disposables.add(new c2(this.rowsContainer,{alwaysConsumeMouseWheel:(c=o.alwaysConsumeMouseWheel)!==null&&c!==void 0?c:N2.alwaysConsumeMouseWheel,horizontal:1,vertical:(d=o.verticalScrollMode)!==null&&d!==void 0?d:N2.verticalScrollMode,useShadows:(u=o.useShadows)!==null&&u!==void 0?u:N2.useShadows,mouseWheelScrollSensitivity:o.mouseWheelScrollSensitivity,fastScrollSensitivity:o.fastScrollSensitivity,scrollByPage:o.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(Xe(this.rowsContainer,vo.Change,b=>this.onTouchChange(b))),this.disposables.add(Xe(this.scrollableElement.getDomNode(),"scroll",b=>b.target.scrollTop=0)),this.disposables.add(Xe(this.domNode,"dragover",b=>this.onDragOver(this.toDragEvent(b)))),this.disposables.add(Xe(this.domNode,"drop",b=>this.onDrop(this.toDragEvent(b)))),this.disposables.add(Xe(this.domNode,"dragleave",b=>this.onDragLeave(this.toDragEvent(b)))),this.disposables.add(Xe(this.domNode,"dragend",b=>this.onDragEnd(b))),this.setRowLineHeight=(h=o.setRowLineHeight)!==null&&h!==void 0?h:N2.setRowLineHeight,this.setRowHeight=(f=o.setRowHeight)!==null&&f!==void 0?f:N2.setRowHeight,this.supportDynamicHeights=(p=o.supportDynamicHeights)!==null&&p!==void 0?p:N2.supportDynamicHeights,this.dnd=(m=o.dnd)!==null&&m!==void 0?m:this.disposables.add(N2.dnd),this.layout((y=o.initialSize)===null||y===void 0?void 0:y.height,(_=o.initialSize)===null||_===void 0?void 0:_.width)}updateOptions(e){e.paddingBottom!==void 0&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling);let t;if(e.scrollByPage!==void 0&&(t={...t??{},scrollByPage:e.scrollByPage}),e.mouseWheelScrollSensitivity!==void 0&&(t={...t??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&(t={...t??{},fastScrollSensitivity:e.fastScrollSensitivity}),t&&this.scrollableElement.updateOptions(t),e.paddingTop!==void 0&&e.paddingTop!==this.rangeMap.paddingTop){let n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(n,Math.max(0,this.lastRenderTop+o),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}splice(e,t,n=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,n)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,n=[]){let o=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),r={start:e,end:e+t},s=Ua.intersect(o,r),a=new Map;for(let S=s.end-1;S>=s.start;S--){let x=this.items[S];if(x.dragStartDisposable.dispose(),x.checkedDisposable.dispose(),x.row){let k=a.get(x.templateId);k||(k=[],a.set(x.templateId,k));let D=this.renderers.get(x.templateId);D&&D.disposeElement&&D.disposeElement(x.element,S,x.row.templateData,x.size),k.push(x.row)}x.row=null}let l={start:e+t,end:this.items.length},c=Ua.intersect(l,o),d=Ua.relativeComplement(l,o),u=n.map(S=>({id:String(this.itemId++),element:S,templateId:this.virtualDelegate.getTemplateId(S),size:this.virtualDelegate.getHeight(S),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(S),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:ue.None,checkedDisposable:ue.None})),h;e===0&&t>=this.items.length?(this.rangeMap=new tN(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,u),h=this.items,this.items=u):(this.rangeMap.splice(e,t,u),h=this.items.splice(e,t,...u));let f=n.length-t,p=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),m=ZY(c,f),y=Ua.intersect(p,m);for(let S=y.start;SZY(S,f)),C=[{start:e,end:e+n.length},...v].map(S=>Ua.intersect(p,S)),w=this.getNextToLastElement(C);for(let S of C)for(let x=S.start;xS.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=za(pi(this.domNode),()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(let t of this.items)typeof t.width<"u"&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(let e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getRenderRange(this.lastRenderTop,this.lastRenderHeight).start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex(t=>t.element===e)}domElement(e){let t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let n={height:typeof e=="number"?e:Xqe(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,n.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(n),typeof t<"u"&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof t=="number"?t:JU(this.domNode)})}render(e,t,n,o,r,s=!1){let a=this.getRenderRange(t,n),l=Ua.relativeComplement(a,e),c=Ua.relativeComplement(e,a),d=this.getNextToLastElement(l);if(s){let u=Ua.intersect(e,a);for(let h=u.start;h{for(let u of c)for(let h=u.start;ho.row.domNode.setAttribute("aria-checked",String(!!u));d(a.value),o.checkedDisposable=a.onDidChange(d)}(r||!o.row.domNode.parentElement)&&(t?this.rowsContainer.insertBefore(o.row.domNode,t):this.rowsContainer.appendChild(o.row.domNode)),this.updateItemInDOM(o,e);let l=this.renderers.get(o.templateId);if(!l)throw new Error(`No renderer found for template id ${o.templateId}`);l?.renderElement(o.element,e,o.row.templateData,o.size);let c=this.dnd.getDragURI(o.element);o.dragStartDisposable.dispose(),o.row.domNode.draggable=!!c,c&&(o.dragStartDisposable=Xe(o.row.domNode,"dragstart",d=>this.onDragStart(o.element,c,d))),this.horizontalScrolling&&(this.measureItemWidth(o),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=JU(e.row.domNode);let t=pi(e.row.domNode).getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){let t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){let n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return Et.map(this.disposables.add(new _n(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return Et.map(this.disposables.add(new _n(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return Et.filter(Et.map(this.disposables.add(new _n(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>e.browserEvent.button===1,this.disposables)}get onMouseDown(){return Et.map(this.disposables.add(new _n(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return Et.map(this.disposables.add(new _n(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOut(){return Et.map(this.disposables.add(new _n(this.domNode,"mouseout")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return Et.any(Et.map(this.disposables.add(new _n(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),Et.map(this.disposables.add(new _n(this.domNode,vo.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return Et.map(this.disposables.add(new _n(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return Et.map(this.disposables.add(new _n(this.rowsContainer,vo.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],o=n&&n.element;return{browserEvent:e,index:t,element:o}}toTouchEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],o=n&&n.element;return{browserEvent:e,index:t,element:o}}toGestureEvent(e){let t=this.getItemIndexFromEventTarget(e.initialTarget||null),n=typeof t>"u"?void 0:this.items[t],o=n&&n.element;return{browserEvent:e,index:t,element:o}}toDragEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],o=n&&n.element,r=this.getTargetSector(e,t);return{browserEvent:e,index:t,element:o,sector:r}}onScroll(e){try{let t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,n){var o,r;if(!n.dataTransfer)return;let s=this.dnd.getDragElements(e);if(n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData(jv.TEXT,t),n.dataTransfer.setDragImage){let a;this.dnd.getDragLabel&&(a=this.dnd.getDragLabel(s,n)),typeof a>"u"&&(a=String(s.length));let l=pt(".monaco-drag-image");l.textContent=a;let d=(u=>{for(;u&&!u.classList.contains("monaco-workbench");)u=u.parentElement;return u||this.domNode.ownerDocument})(this.domNode);d.appendChild(l),n.dataTransfer.setDragImage(l,-10,-10),setTimeout(()=>d.removeChild(l),0)}this.domNode.classList.add("dragging"),this.currentDragData=new E4(s),Vb.CurrentDragAndDropData=new d2e(s),(r=(o=this.dnd).onDragStart)===null||r===void 0||r.call(o,this.currentDragData,n)}onDragOver(e){var t,n;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),Vb.CurrentDragAndDropData&&Vb.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(Vb.CurrentDragAndDropData)this.currentDragData=Vb.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new u2e}let o=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop=typeof o=="boolean"?o:o.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof o!="boolean"&&((t=o.effect)===null||t===void 0?void 0:t.type)===0?"copy":"move";let r;typeof o!="boolean"&&o.feedback?r=o.feedback:typeof e.index>"u"?r=[-1]:r=[e.index],r=Oh(r).filter(a=>a>=-1&&aa-l),r=r[0]===-1?[-1]:r;let s=typeof o!="boolean"&&o.effect&&o.effect.position?o.effect.position:"drop-target";if(rNt(this.currentDragFeedback,r)&&this.currentDragFeedbackPosition===s)return!0;if(this.currentDragFeedback=r,this.currentDragFeedbackPosition=s,this.currentDragFeedbackDisposable.dispose(),r[0]===-1)this.domNode.classList.add(s),this.rowsContainer.classList.add(s),this.currentDragFeedbackDisposable=Yt(()=>{this.domNode.classList.remove(s),this.rowsContainer.classList.remove(s)});else{if(r.length>1&&s!=="drop-target")throw new Error("Can't use multiple feedbacks with position different than 'over'");s==="drop-target-after"&&r[0]{var a;for(let l of r){let c=this.items[l];c.dropTarget=!1,(a=c.row)===null||a===void 0||a.domNode.classList.remove(s)}})}return!0}onDragLeave(e){var t,n;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=$h(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&((n=(t=this.dnd).onDragLeave)===null||n===void 0||n.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;let t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,Vb.CurrentDragAndDropData=void 0,!(!t||!e.browserEvent.dataTransfer)&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.sector,e.browserEvent))}onDragEnd(e){var t,n;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,Vb.CurrentDragAndDropData=void 0,(n=(t=this.dnd).onDragEnd)===null||n===void 0||n.call(t,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=ue.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){let t=XU(this.domNode).top;this.dragOverAnimationDisposable=cGe(pi(this.domNode),this.animateDragAndDropScrollTop.bind(this,t))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=$h(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)return;let t=this.dragOverMouseY-e,n=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>n&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-n))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getTargetSector(e,t){if(t===void 0)return;let n=e.offsetY/this.items[t].size;return Math.floor(n/.25)}getItemIndexFromEventTarget(e){let t=this.scrollableElement.getDomNode(),n=e;for(;n instanceof HTMLElement&&n!==this.rowsContainer&&t.contains(n);){let o=n.getAttribute("data-index");if(o){let r=Number(o);if(!isNaN(r))return r}n=n.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,n){let o=this.getRenderRange(e,t),r,s;e===this.elementTop(o.start)?(r=o.start,s=0):o.end-o.start>1&&(r=o.start+1,s=this.elementTop(r)-e);let a=0;for(;;){let l=this.getRenderRange(e,t),c=!1;for(let d=l.start;d=0&&i[o]===e-(t-o);)n.push(i[o--]);for(n.reverse(),o=t;o=i.length)t.push(e[o++]);else if(o>=e.length)t.push(i[n++]);else if(i[n]===e[o]){t.push(i[n]),n++,o++;continue}else i[n]=i.length)t.push(e[o++]);else if(o>=e.length)t.push(i[n++]);else if(i[n]===e[o]){n++,o++;continue}else i[n]{Qt();vp();Gl();dh();Xl();Htt();Vi();Qi();sa();dv();Xt();l1();nt();Ox();Mn();ho();c2e();Btt();QY();Uh();Wb=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},f2e=class{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,n){let o=this.renderedElements.findIndex(r=>r.templateData===n);if(o>=0){let r=this.renderedElements[o];this.trait.unrender(n),r.index=t}else{let r={index:t,templateData:n};this.renderedElements.push(r)}this.trait.renderIndex(t,n)}splice(e,t,n){let o=[];for(let r of this.renderedElements)r.index=e+t&&o.push({index:r.index+n-t,templateData:r.templateData});this.renderedElements=o}renderIndexes(e){for(let{index:t,templateData:n}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,n)}disposeTemplate(e){let t=this.renderedElements.findIndex(n=>n.templateData===e);t<0||this.renderedElements.splice(t,1)}},iS=class{get name(){return this._trait}get renderer(){return new f2e(this)}constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new ge,this.onChange=this._onChange.event}splice(e,t,n){let o=n.length-t,r=e+t,s=[],a=0;for(;a=r;)s.push(this.sortedIndexes[a++]+o);this.renderer.splice(e,t,n.length),this._set(s,s)}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(jtt),t)}_set(e,t,n){let o=this.indexes,r=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;let s=v2e(r,e);return this.renderer.renderIndexes(s),this._onChange.fire({indexes:e,browserEvent:n}),o}get(){return this.indexes}contains(e){return B0(this.sortedIndexes,e,jtt)>=0}dispose(){Nn(this._onChange)}};Wb([Tr],iS.prototype,"renderer",null);p2e=class extends iS{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}},iN=class{constructor(e,t,n){this.trait=e,this.view=t,this.identityProvider=n}splice(e,t,n){if(!this.identityProvider)return this.trait.splice(e,t,new Array(n.length).fill(!1));let o=this.trait.get().map(a=>this.identityProvider.getId(this.view.element(a)).toString());if(o.length===0)return this.trait.splice(e,t,new Array(n.length).fill(!1));let r=new Set(o),s=n.map(a=>r.has(this.identityProvider.getId(a).toString()));this.trait.splice(e,t,s)}};JY=class{get onKeyDown(){return Et.chain(this.disposables.add(new _n(this.view.domNode,"keydown")).event,e=>e.filter(t=>!T4(t.target)).map(t=>new qn(t)))}constructor(e,t,n){this.list=e,this.view=t,this.disposables=new Ye,this.multipleSelectionDisposables=new Ye,this.multipleSelectionSupport=n.multipleSelectionSupport,this.disposables.add(this.onKeyDown(o=>{switch(o.keyCode){case 3:return this.onEnter(o);case 16:return this.onUpArrow(o);case 18:return this.onDownArrow(o);case 11:return this.onPageUpArrow(o);case 12:return this.onPageDownArrow(o);case 9:return this.onEscape(o);case 31:this.multipleSelectionSupport&&(Wi?o.metaKey:o.ctrlKey)&&this.onCtrlA(o)}}))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Ya(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}};Wb([Tr],JY.prototype,"onKeyDown",null);(function(i){i[i.Automatic=0]="Automatic",i[i.Trigger=1]="Trigger"})(Fm||(Fm={}));(function(i){i[i.Idle=0]="Idle",i[i.Typing=1]="Typing"})(tS||(tS={}));sNt=new class{mightProducePrintableCharacter(i){return i.ctrlKey||i.metaKey||i.altKey?!1:i.keyCode>=31&&i.keyCode<=56||i.keyCode>=21&&i.keyCode<=30||i.keyCode>=98&&i.keyCode<=107||i.keyCode>=85&&i.keyCode<=95}},m2e=class{constructor(e,t,n,o,r){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=n,this.keyboardNavigationEventFilter=o,this.delegate=r,this.enabled=!1,this.state=tS.Idle,this.mode=Fm.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new Ye,this.disposables=new Ye,this.updateOptions(e.options)}updateOptions(e){var t,n;!((t=e.typeNavigationEnabled)!==null&&t!==void 0)||t?this.enable():this.disable(),this.mode=(n=e.typeNavigationMode)!==null&&n!==void 0?n:Fm.Automatic}enable(){if(this.enabled)return;let e=!1,t=Et.chain(this.enabledDisposables.add(new _n(this.view.domNode,"keydown")).event,r=>r.filter(s=>!T4(s.target)).filter(()=>this.mode===Fm.Automatic||this.triggered).map(s=>new qn(s)).filter(s=>e||this.keyboardNavigationEventFilter(s)).filter(s=>this.delegate.mightProducePrintableCharacter(s)).forEach(s=>nn.stop(s,!0)).map(s=>s.browserEvent.key)),n=Et.debounce(t,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);Et.reduce(Et.any(t,n),(r,s)=>s===null?null:(r||"")+s,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),n(this.onClear,this,this.enabledDisposables),t(()=>e=!0,void 0,this.enabledDisposables),n(()=>e=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;let t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){let n=(e=this.list.options.accessibilityProvider)===null||e===void 0?void 0:e.getAriaLabel(this.list.element(t[0]));n&&Hs(n)}this.previouslyFocused=-1}onInput(e){if(!e){this.state=tS.Idle,this.triggered=!1;return}let t=this.list.getFocus(),n=t.length>0?t[0]:0,o=this.state===tS.Idle?1:0;this.state=tS.Typing;for(let r=0;r1&&c.length===1){this.previouslyFocused=n,this.list.setFocus([s]),this.list.reveal(s);return}}}else if(typeof l>"u"||Pb(e,l)){this.previouslyFocused=n,this.list.setFocus([s]),this.list.reveal(s);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}},g2e=class{constructor(e,t){this.list=e,this.view=t,this.disposables=new Ye;let n=Et.chain(this.disposables.add(new _n(t.domNode,"keydown")).event,r=>r.filter(s=>!T4(s.target)).map(s=>new qn(s)));Et.chain(n,r=>r.filter(s=>s.keyCode===2&&!s.ctrlKey&&!s.metaKey&&!s.shiftKey&&!s.altKey))(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;let t=this.list.getFocus();if(t.length===0)return;let n=this.view.domElement(t[0]);if(!n)return;let o=n.querySelector("[tabIndex]");if(!o||!(o instanceof HTMLElement)||o.tabIndex===-1)return;let r=pi(o).getComputedStyle(o);r.visibility==="hidden"||r.display==="none"||(e.preventDefault(),e.stopPropagation(),o.focus())}dispose(){this.disposables.dispose()}};$tt={isSelectionSingleChangeEvent:w2e,isSelectionRangeChangeEvent:x2e},nN=class{constructor(e){this.list=e,this.disposables=new Ye,this._onPointer=new ge,this.onPointer=this._onPointer.event,e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||$tt),this.mouseSupport=typeof e.options.mouseSupport>"u"||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(ar.addTarget(e.getHTMLElement()))),Et.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||$tt))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){eS(e.browserEvent.target)||gs()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(T4(e.browserEvent.target)||eS(e.browserEvent.target))return;let t=typeof e.index>"u"?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||T4(e.browserEvent.target)||eS(e.browserEvent.target)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;let t=e.index;if(typeof t>"u"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),aNt(e.browserEvent)||this.list.setSelection([t],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(T4(e.browserEvent.target)||eS(e.browserEvent.target)||this.isSelectionChangeEvent(e)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;let t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){let t=e.index,n=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(typeof n>"u"){let d=this.list.getFocus()[0];n=d??t,this.list.setAnchor(n)}let o=Math.min(n,t),r=Math.max(n,t),s=Ya(o,r+1),a=this.list.getSelection(),l=cNt(v2e(a,[n]),n);if(l.length===0)return;let c=v2e(s,dNt(a,l));this.list.setSelection(c,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){let o=this.list.getSelection(),r=o.filter(s=>s!==t);this.list.setFocus([t]),this.list.setAnchor(t),o.length===r.length?this.list.setSelection([...r,t],e.browserEvent):this.list.setSelection(r,e.browserEvent)}}dispose(){this.disposables.dispose()}},oN=class{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){var t,n;let o=this.selectorSuffix&&`.${this.selectorSuffix}`,r=[];e.listBackground&&r.push(`.monaco-list${o} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(r.push(`.monaco-list${o}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),r.push(`.monaco-list${o}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&r.push(`.monaco-list${o}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(r.push(`.monaco-list${o}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),r.push(`.monaco-list${o}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&r.push(`.monaco-list${o}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&r.push(`.monaco-list${o}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&r.push(` +`});var ZMt,XMt,GY,Ttt=P(()=>{o2e();nt();Av();Qt();ZMt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},XMt=function(i,e){return function(t,n){e(t,n,i)}},GY=class extends ue{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=ue.None,this.contextView=this._register(new Qx(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer(()=>this.layout()))}showContextView(e,t,n){let o;t?t===this.layoutService.getContainer(pi(t))?o=1:n?o=3:o=2:o=1,this.contextView.setContainer(t??this.layoutService.activeContainer,o),this.contextView.show(e);let r=Yt(()=>{this.currentViewDisposable===r&&this.hideContextView()});return this.currentViewDisposable=r,r}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}dispose(){super.dispose(),this.currentViewDisposable.dispose(),this.currentViewDisposable=ue.None}};GY=ZMt([XMt(0,nf)],GY)});function QM(i,e=!1){QMt(i,!1,e)}function QMt(i,e,t){let n=JMt(i,e);Jx.push(n),n.userConfigured?Mtt.push(n):r2e.push(n),t&&!n.userConfigured&&Jx.forEach(o=>{o.mime===n.mime||o.userConfigured||(n.extension&&o.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&o.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&o.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&o.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))})}function JMt(i,e){return{id:i.id,mime:i.mime,filename:i.filename,extension:i.extension,filepattern:i.filepattern,firstline:i.firstline,userConfigured:e,filenameLowercase:i.filename?i.filename.toLowerCase():void 0,extensionLowercase:i.extension?i.extension.toLowerCase():void 0,filepatternLowercase:i.filepattern?uge(i.filepattern.toLowerCase()):void 0,filepatternOnPath:i.filepattern?i.filepattern.indexOf(hs.sep)>=0:!1}}function Ntt(){Jx=Jx.filter(i=>i.userConfigured),r2e=[]}function Att(i,e){return eNt(i,e).map(t=>t.id)}function eNt(i,e){let t;if(i)switch(i.scheme){case $i.file:t=i.fsPath;break;case $i.data:{t=h2.parseMetaData(i).get(h2.META_DATA_LABEL);break}case $i.vscodeNotebookCell:t=void 0;break;default:t=i.path}if(!t)return[{id:"unknown",mime:rr.unknown}];t=t.toLowerCase();let n=tp(t),o=Itt(t,n,Mtt);if(o)return[o,{id:ra,mime:rr.text}];let r=Itt(t,n,r2e);if(r)return[r,{id:ra,mime:rr.text}];if(e){let s=tNt(e);if(s)return[s,{id:ra,mime:rr.text}]}return[{id:"unknown",mime:rr.unknown}]}function Itt(i,e,t){var n;let o,r,s;for(let a=t.length-1;a>=0;a--){let l=t[a];if(e===l.filenameLowercase){o=l;break}if(l.filepattern&&(!r||l.filepattern.length>r.filepattern.length)){let c=l.filepatternOnPath?i:e;!((n=l.filepatternLowercase)===null||n===void 0)&&n.call(l,c)&&(r=l)}l.extension&&(!s||l.extension.length>s.extension.length)&&e.endsWith(l.extensionLowercase)&&(s=l)}if(o)return o;if(r)return r;if(s)return s}function tNt(i){if(FC(i)&&(i=i.substr(1)),i.length>0)for(let e=Jx.length-1;e>=0;e--){let t=Jx[e];if(!t.firstline)continue;let n=i.match(t.firstline);if(n&&n.length>0)return t}}var Jx,r2e,Mtt,Rtt=P(()=>{hge();K3();Nc();Dg();ec();Ri();Zf();Jx=[],r2e=[],Mtt=[]});var KY,Ptt,s2e,JM,Ott=P(()=>{Xt();nt();Ri();Rtt();Zf();Wg();Ys();KY=Object.prototype.hasOwnProperty,Ptt="vs.editor.nullLanguage",s2e=class{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(Ptt,0),this._register(ra,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;let t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||Ptt}},JM=class i extends ue{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new ge),this.onDidChange=this._onDidChange.event,i.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new s2e,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(Y3.onDidChangeLanguages(n=>{this._initializeFromRegistry()})))}dispose(){i.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Ntt();let e=[].concat(Y3.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(let t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(t=>{let n=this._languages[t];n.name&&(this._nameMap[n.name]=n.identifier),n.aliases.forEach(o=>{this._lowercaseNameMap[o.toLowerCase()]=n.identifier}),n.mimetypes.forEach(o=>{this._mimeTypesMap[o]=n.identifier})}),jn.as(Yl.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){let t=e.id,n;KY.call(this._languages,t)?n=this._languages[t]:(this.languageIdCodec.register(t),n={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=n),this._mergeLanguage(n,e)}_mergeLanguage(e,t){let n=t.id,o=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),o=t.mimetypes[0]),o||(o=`text/x-${n}`,e.mimetypes.push(o)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(let a of t.extensions)QM({id:n,mime:o,extension:a},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let a of t.filenames)QM({id:n,mime:o,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(let a of t.filenamePatterns)QM({id:n,mime:o,filepattern:a},this._warnOnOverwrite);if(typeof t.firstLine=="string"&&t.firstLine.length>0){let a=t.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{let l=new RegExp(a);aqe(l)||QM({id:n,mime:o,firstline:l},this._warnOnOverwrite)}catch(l){console.warn(`[${t.id}]: Invalid regular expression \`${a}\`: `,l)}}e.aliases.push(n);let r=null;if(typeof t.aliases<"u"&&Array.isArray(t.aliases)&&(t.aliases.length===0?r=[null]:r=t.aliases),r!==null)for(let a of r)!a||a.length===0||e.aliases.push(a);let s=r!==null&&r.length>0;if(!(s&&r[0]===null)){let a=(s?r[0]:null)||n;(s||!e.name)&&(e.name=a)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return e?KY.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){let t=e.toLowerCase();return KY.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&KY.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return!e&&!t?[]:Att(e,t)}};JM.instanceCount=0});var eN,YY,ztt=P(()=>{Xt();nt();Ott();Vi();Pr();Zf();eN=class i extends ue{constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new ge),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new ge),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new ge({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,i.instanceCount++,this._registry=this._register(new JM(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){i.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){let n=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return vC(n,null)}createById(e){return new YY(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,t){return new YY(this.onDidChange,()=>{let n=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(n)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=ra),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),Eo.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}};eN.instanceCount=0;YY=class{constructor(e,t){this._onDidChangeLanguages=e,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new ge({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var e;let t=this._selector();t!==this.languageId&&(this.languageId=t,(e=this._emitter)===null||e===void 0||e.fire(this.languageId))}}});var qv,ZY=P(()=>{K3();qv={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:rr.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}});function Ftt(i,e){qs(e)?i.title=Vx(e):e?.markdownNotSupportedFallback?i.title=e.markdownNotSupportedFallback:i.removeAttribute("title")}function XY(i,e,t,n){let o,r,s=(_,v)=>{var b;let C=r!==void 0;_&&(r?.dispose(),r=void 0),v&&(o?.dispose(),o=void 0),C&&((b=i.onDidHideHover)===null||b===void 0||b.call(i))},a=(_,v,b)=>new Zs(async()=>{(!r||r.isDisposed)&&(r=new a2e(i,b||e,_>0),await r.update(t,v,n))},_),l=!1,c=Xe(e,Lt.MOUSE_DOWN,()=>{l=!0,s(!0,!0)},!0),d=Xe(e,Lt.MOUSE_UP,()=>{l=!1},!0),u=Xe(e,Lt.MOUSE_LEAVE,_=>{l=!1,s(!1,_.fromElement===e)},!0),h=()=>{if(o)return;let _=new Ye,v={targetElements:[e],dispose:()=>{}};if(i.placement===void 0||i.placement==="mouse"){let b=C=>{v.x=C.x+10,C.target instanceof HTMLElement&&C.target.classList.contains("action-label")&&s(!0,!0)};_.add(Xe(e,Lt.MOUSE_MOVE,b,!0))}_.add(a(i.delay,!1,v)),o=_},f=Xe(e,Lt.MOUSE_OVER,h,!0),p=()=>{if(l||o)return;let _={targetElements:[e],dispose:()=>{}},v=new Ye,b=()=>s(!0,!0);v.add(Xe(e,Lt.BLUR,b,!0)),v.add(a(i.delay,!1,_)),o=v},m=Xe(e,Lt.FOCUS,p,!0);return{show:_=>{s(!1,!0),a(0,_)},hide:()=>{s(!0,!0)},update:async(_,v)=>{t=_,await r?.update(t,void 0,v)},dispose:()=>{f.dispose(),u.dispose(),c.dispose(),d.dispose(),m.dispose(),s(!0,!0)}}}var a2e,l2e=P(()=>{Qt();Qi();mo();Md();Ob();nt();ho();Wt();a2e=class{constructor(e,t,n){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=n}async update(e,t,n){var o;if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let r;if(e===void 0||qs(e)||e instanceof HTMLElement)r=e;else if(!_3(e.markdown))r=(o=e.markdown)!==null&&o!==void 0?o:e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(g("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new Jn;let s=this._cancellationTokenSource.token;if(r=await e.markdown(s),r===void 0&&(r=e.markdownNotSupportedFallback),this.isDisposed||s.isCancellationRequested)return}this.show(r,t,n)}show(e,t,n){let o=this._hoverWidget;if(this.hasContent(e)){let r={content:e,target:this.target,appearance:{showPointer:this.hoverDelegate.placement==="element",skipFadeInAnimation:!this.fadeInAnimation||!!o},position:{hoverPosition:2},...n};this._hoverWidget=this.hoverDelegate.showHover(r,t)}o?.dispose()}hasContent(e){return e?sf(e)?!!e.value:!0:!1}get isDisposed(){var e;return(e=this._hoverWidget)===null||e===void 0?void 0:e.isDisposed}dispose(){var e,t;(e=this._hoverWidget)===null||e===void 0||e.dispose(),(t=this._cancellationTokenSource)===null||t===void 0||t.dispose(!0),this._cancellationTokenSource=void 0}}});var QY,Htt=P(()=>{QY=class{constructor(e){this.spliceables=e}splice(e,t,n){this.spliceables.forEach(o=>o.splice(e,t,n))}}});var c2e=P(()=>{});var M2,Btt=P(()=>{M2=class extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}});function Vtt(i,e){let t=[];for(let n of e){if(i.start>=n.range.end)continue;if(i.ende.concat(t),[]))}var tN,Wtt=P(()=>{XM();tN=class{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,t,n=[]){let o=n.length-t,r=Vtt({start:0,end:e},this.groups),s=Vtt({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(l=>({range:JY(l.range,o),size:l.size})),a=n.map((l,c)=>({range:{start:e+c,end:e+c+1},size:l.size}));this.groups=nNt(r,a,s),this._size=this._paddingTop+this.groups.reduce((l,c)=>l+c.size*(c.range.end-c.range.start),0)}get count(){let e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{Qt();eZ=class{constructor(e){this.renderers=e,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(e){let t=this.getTemplateCache(e).pop(),n=!1;if(t)n=this.transactionNodesPendingRemoval.has(t.domNode),n&&this.transactionNodesPendingRemoval.delete(t.domNode);else{let o=pt(".monaco-list-row"),s=this.getRenderer(e).renderTemplate(o);t={domNode:o,templateId:e,templateData:s}}return{row:t,isReusingConnectedDomNode:n}}release(e){e&&this.releaseRow(e)}transact(e){if(this.inTransaction)throw new Error("Already in transaction");this.inTransaction=!0;try{e()}finally{for(let t of this.transactionNodesPendingRemoval)this.doRemoveNode(t);this.transactionNodesPendingRemoval.clear(),this.inTransaction=!1}}releaseRow(e){let{domNode:t,templateId:n}=e;t&&(this.inTransaction?this.transactionNodesPendingRemoval.add(t):this.doRemoveNode(t)),this.getTemplateCache(n).push(e)}doRemoveNode(e){e.classList.remove("scrolling"),oNt(e)}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach((e,t)=>{for(let n of e)this.getRenderer(t).disposeTemplate(n.templateData),n.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){let t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}});function rNt(i,e){return Array.isArray(i)&&Array.isArray(e)?uo(i,e):i===e}var D4,Vb,N2,E4,d2e,u2e,h2e,af,tZ=P(()=>{ZY();Qt();vp();dh();o1();Vi();Qi();uv();Xt();nt();XM();Jw();Wtt();Utt();Pi();D4=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Vb={CurrentDragAndDropData:void 0},N2={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(i){return[i]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0},E4=class{constructor(e){this.elements=e}update(){}getData(){return this.elements}},d2e=class{constructor(e){this.elements=e}update(){}getData(){return this.elements}},u2e=class{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;to,e?.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(t,n)=>n+1,e?.getRole?this.getRole=e.getRole.bind(e):this.getRole=t=>"listitem",e?.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=t=>{}}},af=class i{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(let t of this.items)this.measureItemWidth(t);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:i$(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,n,o=N2){var r,s,a,l,c,d,u,h,f,p,m,y,_;if(this.virtualDelegate=t,this.domId=`list_id_${++i.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new ba(50),this.splicing=!1,this.dragOverAnimationStopDisposable=ue.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=ue.None,this.onDragLeaveTimeout=ue.None,this.disposables=new Ye,this._onDidChangeContentHeight=new ge,this._onDidChangeContentWidth=new ge,this.onDidChangeContentHeight=Et.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,o.horizontalScrolling&&o.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new tN((r=o.paddingTop)!==null&&r!==void 0?r:0);for(let b of n)this.renderers.set(b.templateId,b);this.cache=this.disposables.add(new eZ(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof o.mouseSupport=="boolean"?o.mouseSupport:!0),this._horizontalScrolling=(s=o.horizontalScrolling)!==null&&s!==void 0?s:N2.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=typeof o.paddingBottom>"u"?0:o.paddingBottom,this.accessibilityProvider=new h2e(o.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",((a=o.transformOptimization)!==null&&a!==void 0?a:N2.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(ar.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new n1({forceIntegerValues:!0,smoothScrollDuration:(l=o.smoothScrolling)!==null&&l!==void 0&&l?125:0,scheduleAtNextAnimationFrame:b=>za(pi(this.domNode),b)})),this.scrollableElement=this.disposables.add(new c2(this.rowsContainer,{alwaysConsumeMouseWheel:(c=o.alwaysConsumeMouseWheel)!==null&&c!==void 0?c:N2.alwaysConsumeMouseWheel,horizontal:1,vertical:(d=o.verticalScrollMode)!==null&&d!==void 0?d:N2.verticalScrollMode,useShadows:(u=o.useShadows)!==null&&u!==void 0?u:N2.useShadows,mouseWheelScrollSensitivity:o.mouseWheelScrollSensitivity,fastScrollSensitivity:o.fastScrollSensitivity,scrollByPage:o.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(Xe(this.rowsContainer,vo.Change,b=>this.onTouchChange(b))),this.disposables.add(Xe(this.scrollableElement.getDomNode(),"scroll",b=>b.target.scrollTop=0)),this.disposables.add(Xe(this.domNode,"dragover",b=>this.onDragOver(this.toDragEvent(b)))),this.disposables.add(Xe(this.domNode,"drop",b=>this.onDrop(this.toDragEvent(b)))),this.disposables.add(Xe(this.domNode,"dragleave",b=>this.onDragLeave(this.toDragEvent(b)))),this.disposables.add(Xe(this.domNode,"dragend",b=>this.onDragEnd(b))),this.setRowLineHeight=(h=o.setRowLineHeight)!==null&&h!==void 0?h:N2.setRowLineHeight,this.setRowHeight=(f=o.setRowHeight)!==null&&f!==void 0?f:N2.setRowHeight,this.supportDynamicHeights=(p=o.supportDynamicHeights)!==null&&p!==void 0?p:N2.supportDynamicHeights,this.dnd=(m=o.dnd)!==null&&m!==void 0?m:this.disposables.add(N2.dnd),this.layout((y=o.initialSize)===null||y===void 0?void 0:y.height,(_=o.initialSize)===null||_===void 0?void 0:_.width)}updateOptions(e){e.paddingBottom!==void 0&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling);let t;if(e.scrollByPage!==void 0&&(t={...t??{},scrollByPage:e.scrollByPage}),e.mouseWheelScrollSensitivity!==void 0&&(t={...t??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&(t={...t??{},fastScrollSensitivity:e.fastScrollSensitivity}),t&&this.scrollableElement.updateOptions(t),e.paddingTop!==void 0&&e.paddingTop!==this.rangeMap.paddingTop){let n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(n,Math.max(0,this.lastRenderTop+o),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}splice(e,t,n=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,n)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,n=[]){let o=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),r={start:e,end:e+t},s=Ua.intersect(o,r),a=new Map;for(let S=s.end-1;S>=s.start;S--){let x=this.items[S];if(x.dragStartDisposable.dispose(),x.checkedDisposable.dispose(),x.row){let k=a.get(x.templateId);k||(k=[],a.set(x.templateId,k));let D=this.renderers.get(x.templateId);D&&D.disposeElement&&D.disposeElement(x.element,S,x.row.templateData,x.size),k.push(x.row)}x.row=null}let l={start:e+t,end:this.items.length},c=Ua.intersect(l,o),d=Ua.relativeComplement(l,o),u=n.map(S=>({id:String(this.itemId++),element:S,templateId:this.virtualDelegate.getTemplateId(S),size:this.virtualDelegate.getHeight(S),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(S),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:ue.None,checkedDisposable:ue.None})),h;e===0&&t>=this.items.length?(this.rangeMap=new tN(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,u),h=this.items,this.items=u):(this.rangeMap.splice(e,t,u),h=this.items.splice(e,t,...u));let f=n.length-t,p=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),m=JY(c,f),y=Ua.intersect(p,m);for(let S=y.start;SJY(S,f)),C=[{start:e,end:e+n.length},...v].map(S=>Ua.intersect(p,S)),w=this.getNextToLastElement(C);for(let S of C)for(let x=S.start;xS.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=za(pi(this.domNode),()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(let t of this.items)typeof t.width<"u"&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(let e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getRenderRange(this.lastRenderTop,this.lastRenderHeight).start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex(t=>t.element===e)}domElement(e){let t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let n={height:typeof e=="number"?e:Xqe(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,n.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(n),typeof t<"u"&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof t=="number"?t:i$(this.domNode)})}render(e,t,n,o,r,s=!1){let a=this.getRenderRange(t,n),l=Ua.relativeComplement(a,e),c=Ua.relativeComplement(e,a),d=this.getNextToLastElement(l);if(s){let u=Ua.intersect(e,a);for(let h=u.start;h{for(let u of c)for(let h=u.start;ho.row.domNode.setAttribute("aria-checked",String(!!u));d(a.value),o.checkedDisposable=a.onDidChange(d)}(r||!o.row.domNode.parentElement)&&(t?this.rowsContainer.insertBefore(o.row.domNode,t):this.rowsContainer.appendChild(o.row.domNode)),this.updateItemInDOM(o,e);let l=this.renderers.get(o.templateId);if(!l)throw new Error(`No renderer found for template id ${o.templateId}`);l?.renderElement(o.element,e,o.row.templateData,o.size);let c=this.dnd.getDragURI(o.element);o.dragStartDisposable.dispose(),o.row.domNode.draggable=!!c,c&&(o.dragStartDisposable=Xe(o.row.domNode,"dragstart",d=>this.onDragStart(o.element,c,d))),this.horizontalScrolling&&(this.measureItemWidth(o),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=i$(e.row.domNode);let t=pi(e.row.domNode).getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){let t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){let n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return Et.map(this.disposables.add(new _n(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return Et.map(this.disposables.add(new _n(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return Et.filter(Et.map(this.disposables.add(new _n(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>e.browserEvent.button===1,this.disposables)}get onMouseDown(){return Et.map(this.disposables.add(new _n(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return Et.map(this.disposables.add(new _n(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOut(){return Et.map(this.disposables.add(new _n(this.domNode,"mouseout")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return Et.any(Et.map(this.disposables.add(new _n(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),Et.map(this.disposables.add(new _n(this.domNode,vo.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return Et.map(this.disposables.add(new _n(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return Et.map(this.disposables.add(new _n(this.rowsContainer,vo.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],o=n&&n.element;return{browserEvent:e,index:t,element:o}}toTouchEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],o=n&&n.element;return{browserEvent:e,index:t,element:o}}toGestureEvent(e){let t=this.getItemIndexFromEventTarget(e.initialTarget||null),n=typeof t>"u"?void 0:this.items[t],o=n&&n.element;return{browserEvent:e,index:t,element:o}}toDragEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],o=n&&n.element,r=this.getTargetSector(e,t);return{browserEvent:e,index:t,element:o,sector:r}}onScroll(e){try{let t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,n){var o,r;if(!n.dataTransfer)return;let s=this.dnd.getDragElements(e);if(n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData(qv.TEXT,t),n.dataTransfer.setDragImage){let a;this.dnd.getDragLabel&&(a=this.dnd.getDragLabel(s,n)),typeof a>"u"&&(a=String(s.length));let l=pt(".monaco-drag-image");l.textContent=a;let d=(u=>{for(;u&&!u.classList.contains("monaco-workbench");)u=u.parentElement;return u||this.domNode.ownerDocument})(this.domNode);d.appendChild(l),n.dataTransfer.setDragImage(l,-10,-10),setTimeout(()=>d.removeChild(l),0)}this.domNode.classList.add("dragging"),this.currentDragData=new E4(s),Vb.CurrentDragAndDropData=new d2e(s),(r=(o=this.dnd).onDragStart)===null||r===void 0||r.call(o,this.currentDragData,n)}onDragOver(e){var t,n;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),Vb.CurrentDragAndDropData&&Vb.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(Vb.CurrentDragAndDropData)this.currentDragData=Vb.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new u2e}let o=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop=typeof o=="boolean"?o:o.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof o!="boolean"&&((t=o.effect)===null||t===void 0?void 0:t.type)===0?"copy":"move";let r;typeof o!="boolean"&&o.feedback?r=o.feedback:typeof e.index>"u"?r=[-1]:r=[e.index],r=Oh(r).filter(a=>a>=-1&&aa-l),r=r[0]===-1?[-1]:r;let s=typeof o!="boolean"&&o.effect&&o.effect.position?o.effect.position:"drop-target";if(rNt(this.currentDragFeedback,r)&&this.currentDragFeedbackPosition===s)return!0;if(this.currentDragFeedback=r,this.currentDragFeedbackPosition=s,this.currentDragFeedbackDisposable.dispose(),r[0]===-1)this.domNode.classList.add(s),this.rowsContainer.classList.add(s),this.currentDragFeedbackDisposable=Yt(()=>{this.domNode.classList.remove(s),this.rowsContainer.classList.remove(s)});else{if(r.length>1&&s!=="drop-target")throw new Error("Can't use multiple feedbacks with position different than 'over'");s==="drop-target-after"&&r[0]{var a;for(let l of r){let c=this.items[l];c.dropTarget=!1,(a=c.row)===null||a===void 0||a.domNode.classList.remove(s)}})}return!0}onDragLeave(e){var t,n;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=$h(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&((n=(t=this.dnd).onDragLeave)===null||n===void 0||n.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;let t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,Vb.CurrentDragAndDropData=void 0,!(!t||!e.browserEvent.dataTransfer)&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.sector,e.browserEvent))}onDragEnd(e){var t,n;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,Vb.CurrentDragAndDropData=void 0,(n=(t=this.dnd).onDragEnd)===null||n===void 0||n.call(t,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=ue.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){let t=e$(this.domNode).top;this.dragOverAnimationDisposable=cGe(pi(this.domNode),this.animateDragAndDropScrollTop.bind(this,t))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=$h(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)return;let t=this.dragOverMouseY-e,n=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>n&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-n))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getTargetSector(e,t){if(t===void 0)return;let n=e.offsetY/this.items[t].size;return Math.floor(n/.25)}getItemIndexFromEventTarget(e){let t=this.scrollableElement.getDomNode(),n=e;for(;n instanceof HTMLElement&&n!==this.rowsContainer&&t.contains(n);){let o=n.getAttribute("data-index");if(o){let r=Number(o);if(!isNaN(r))return r}n=n.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,n){let o=this.getRenderRange(e,t),r,s;e===this.elementTop(o.start)?(r=o.start,s=0):o.end-o.start>1&&(r=o.start+1,s=this.elementTop(r)-e);let a=0;for(;;){let l=this.getRenderRange(e,t),c=!1;for(let d=l.start;d=0&&i[o]===e-(t-o);)n.push(i[o--]);for(n.reverse(),o=t;o=i.length)t.push(e[o++]);else if(o>=e.length)t.push(i[n++]);else if(i[n]===e[o]){t.push(i[n]),n++,o++;continue}else i[n]=i.length)t.push(e[o++]);else if(o>=e.length)t.push(i[n++]);else if(i[n]===e[o]){n++,o++;continue}else i[n]{Qt();vp();Gl();dh();Xl();Htt();Vi();Qi();sa();uv();Xt();l1();nt();Ox();Mn();ho();c2e();Btt();tZ();Uh();Wb=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},f2e=class{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,n){let o=this.renderedElements.findIndex(r=>r.templateData===n);if(o>=0){let r=this.renderedElements[o];this.trait.unrender(n),r.index=t}else{let r={index:t,templateData:n};this.renderedElements.push(r)}this.trait.renderIndex(t,n)}splice(e,t,n){let o=[];for(let r of this.renderedElements)r.index=e+t&&o.push({index:r.index+n-t,templateData:r.templateData});this.renderedElements=o}renderIndexes(e){for(let{index:t,templateData:n}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,n)}disposeTemplate(e){let t=this.renderedElements.findIndex(n=>n.templateData===e);t<0||this.renderedElements.splice(t,1)}},iS=class{get name(){return this._trait}get renderer(){return new f2e(this)}constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new ge,this.onChange=this._onChange.event}splice(e,t,n){let o=n.length-t,r=e+t,s=[],a=0;for(;a=r;)s.push(this.sortedIndexes[a++]+o);this.renderer.splice(e,t,n.length),this._set(s,s)}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(jtt),t)}_set(e,t,n){let o=this.indexes,r=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;let s=v2e(r,e);return this.renderer.renderIndexes(s),this._onChange.fire({indexes:e,browserEvent:n}),o}get(){return this.indexes}contains(e){return B0(this.sortedIndexes,e,jtt)>=0}dispose(){Nn(this._onChange)}};Wb([Tr],iS.prototype,"renderer",null);p2e=class extends iS{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}},iN=class{constructor(e,t,n){this.trait=e,this.view=t,this.identityProvider=n}splice(e,t,n){if(!this.identityProvider)return this.trait.splice(e,t,new Array(n.length).fill(!1));let o=this.trait.get().map(a=>this.identityProvider.getId(this.view.element(a)).toString());if(o.length===0)return this.trait.splice(e,t,new Array(n.length).fill(!1));let r=new Set(o),s=n.map(a=>r.has(this.identityProvider.getId(a).toString()));this.trait.splice(e,t,s)}};iZ=class{get onKeyDown(){return Et.chain(this.disposables.add(new _n(this.view.domNode,"keydown")).event,e=>e.filter(t=>!T4(t.target)).map(t=>new qn(t)))}constructor(e,t,n){this.list=e,this.view=t,this.disposables=new Ye,this.multipleSelectionDisposables=new Ye,this.multipleSelectionSupport=n.multipleSelectionSupport,this.disposables.add(this.onKeyDown(o=>{switch(o.keyCode){case 3:return this.onEnter(o);case 16:return this.onUpArrow(o);case 18:return this.onDownArrow(o);case 11:return this.onPageUpArrow(o);case 12:return this.onPageDownArrow(o);case 9:return this.onEscape(o);case 31:this.multipleSelectionSupport&&(Wi?o.metaKey:o.ctrlKey)&&this.onCtrlA(o)}}))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Ya(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}};Wb([Tr],iZ.prototype,"onKeyDown",null);(function(i){i[i.Automatic=0]="Automatic",i[i.Trigger=1]="Trigger"})(Fm||(Fm={}));(function(i){i[i.Idle=0]="Idle",i[i.Typing=1]="Typing"})(tS||(tS={}));sNt=new class{mightProducePrintableCharacter(i){return i.ctrlKey||i.metaKey||i.altKey?!1:i.keyCode>=31&&i.keyCode<=56||i.keyCode>=21&&i.keyCode<=30||i.keyCode>=98&&i.keyCode<=107||i.keyCode>=85&&i.keyCode<=95}},m2e=class{constructor(e,t,n,o,r){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=n,this.keyboardNavigationEventFilter=o,this.delegate=r,this.enabled=!1,this.state=tS.Idle,this.mode=Fm.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new Ye,this.disposables=new Ye,this.updateOptions(e.options)}updateOptions(e){var t,n;!((t=e.typeNavigationEnabled)!==null&&t!==void 0)||t?this.enable():this.disable(),this.mode=(n=e.typeNavigationMode)!==null&&n!==void 0?n:Fm.Automatic}enable(){if(this.enabled)return;let e=!1,t=Et.chain(this.enabledDisposables.add(new _n(this.view.domNode,"keydown")).event,r=>r.filter(s=>!T4(s.target)).filter(()=>this.mode===Fm.Automatic||this.triggered).map(s=>new qn(s)).filter(s=>e||this.keyboardNavigationEventFilter(s)).filter(s=>this.delegate.mightProducePrintableCharacter(s)).forEach(s=>nn.stop(s,!0)).map(s=>s.browserEvent.key)),n=Et.debounce(t,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);Et.reduce(Et.any(t,n),(r,s)=>s===null?null:(r||"")+s,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),n(this.onClear,this,this.enabledDisposables),t(()=>e=!0,void 0,this.enabledDisposables),n(()=>e=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;let t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){let n=(e=this.list.options.accessibilityProvider)===null||e===void 0?void 0:e.getAriaLabel(this.list.element(t[0]));n&&Hs(n)}this.previouslyFocused=-1}onInput(e){if(!e){this.state=tS.Idle,this.triggered=!1;return}let t=this.list.getFocus(),n=t.length>0?t[0]:0,o=this.state===tS.Idle?1:0;this.state=tS.Typing;for(let r=0;r1&&c.length===1){this.previouslyFocused=n,this.list.setFocus([s]),this.list.reveal(s);return}}}else if(typeof l>"u"||Pb(e,l)){this.previouslyFocused=n,this.list.setFocus([s]),this.list.reveal(s);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}},g2e=class{constructor(e,t){this.list=e,this.view=t,this.disposables=new Ye;let n=Et.chain(this.disposables.add(new _n(t.domNode,"keydown")).event,r=>r.filter(s=>!T4(s.target)).map(s=>new qn(s)));Et.chain(n,r=>r.filter(s=>s.keyCode===2&&!s.ctrlKey&&!s.metaKey&&!s.shiftKey&&!s.altKey))(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;let t=this.list.getFocus();if(t.length===0)return;let n=this.view.domElement(t[0]);if(!n)return;let o=n.querySelector("[tabIndex]");if(!o||!(o instanceof HTMLElement)||o.tabIndex===-1)return;let r=pi(o).getComputedStyle(o);r.visibility==="hidden"||r.display==="none"||(e.preventDefault(),e.stopPropagation(),o.focus())}dispose(){this.disposables.dispose()}};$tt={isSelectionSingleChangeEvent:w2e,isSelectionRangeChangeEvent:x2e},nN=class{constructor(e){this.list=e,this.disposables=new Ye,this._onPointer=new ge,this.onPointer=this._onPointer.event,e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||$tt),this.mouseSupport=typeof e.options.mouseSupport>"u"||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(ar.addTarget(e.getHTMLElement()))),Et.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||$tt))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){eS(e.browserEvent.target)||gs()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(T4(e.browserEvent.target)||eS(e.browserEvent.target))return;let t=typeof e.index>"u"?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||T4(e.browserEvent.target)||eS(e.browserEvent.target)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;let t=e.index;if(typeof t>"u"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),aNt(e.browserEvent)||this.list.setSelection([t],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(T4(e.browserEvent.target)||eS(e.browserEvent.target)||this.isSelectionChangeEvent(e)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;let t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){let t=e.index,n=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(typeof n>"u"){let d=this.list.getFocus()[0];n=d??t,this.list.setAnchor(n)}let o=Math.min(n,t),r=Math.max(n,t),s=Ya(o,r+1),a=this.list.getSelection(),l=cNt(v2e(a,[n]),n);if(l.length===0)return;let c=v2e(s,dNt(a,l));this.list.setSelection(c,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){let o=this.list.getSelection(),r=o.filter(s=>s!==t);this.list.setFocus([t]),this.list.setAnchor(t),o.length===r.length?this.list.setSelection([...r,t],e.browserEvent):this.list.setSelection(r,e.browserEvent)}}dispose(){this.disposables.dispose()}},oN=class{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){var t,n;let o=this.selectorSuffix&&`.${this.selectorSuffix}`,r=[];e.listBackground&&r.push(`.monaco-list${o} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(r.push(`.monaco-list${o}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),r.push(`.monaco-list${o}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&r.push(`.monaco-list${o}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(r.push(`.monaco-list${o}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),r.push(`.monaco-list${o}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&r.push(`.monaco-list${o}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&r.push(`.monaco-list${o}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&r.push(` .monaco-drag-image, .monaco-list${o}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; } `),e.listFocusAndSelectionForeground&&r.push(` @@ -249,9 +249,9 @@ Please report this to https://github.com/markedjs/marked.`,$.silent)return"

An background-color: ${e.tableOddRowsBackgroundColor}; } `),this.styleElement.textContent=r.join(` -`)}},Ktt={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:it.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:it.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:it.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0},lNt={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};jtt=(i,e)=>i-e,_2e=class{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,n,o){let r=0;for(let s of this.renderers)s.renderElement(e,t,n[r++],o)}disposeElement(e,t,n,o){var r;let s=0;for(let a of this.renderers)(r=a.disposeElement)===null||r===void 0||r.call(a,e,t,n[s],o),s+=1}disposeTemplate(e){let t=0;for(let n of this.renderers)n.disposeTemplate(e[t++])}},b2e=class{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,n){let o=this.accessibilityProvider.getAriaLabel(e);o?n.setAttribute("aria-label",o):n.removeAttribute("aria-label");let r=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof r=="number"?n.setAttribute("aria-level",`${r}`):n.removeAttribute("aria-level")}disposeTemplate(e){}},y2e=class{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){let t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){var n,o;(o=(n=this.dnd).onDragStart)===null||o===void 0||o.call(n,e,t)}onDragOver(e,t,n,o,r){return this.dnd.onDragOver(e,t,n,o,r)}onDragLeave(e,t,n,o){var r,s;(s=(r=this.dnd).onDragLeave)===null||s===void 0||s.call(r,e,t,n,o)}onDragEnd(e){var t,n;(n=(t=this.dnd).onDragEnd)===null||n===void 0||n.call(t,e)}drop(e,t,n,o,r){this.dnd.drop(e,t,n,o,r)}dispose(){this.dnd.dispose()}},Nl=class{get onDidChangeFocus(){return Et.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return Et.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1,t=Et.chain(this.disposables.add(new _n(this.view.domNode,"keydown")).event,r=>r.map(s=>new qn(s)).filter(s=>e=s.keyCode===58||s.shiftKey&&s.keyCode===68).map(s=>nn.stop(s,!0)).filter(()=>!1)),n=Et.chain(this.disposables.add(new _n(this.view.domNode,"keyup")).event,r=>r.forEach(()=>e=!1).map(s=>new qn(s)).filter(s=>s.keyCode===58||s.shiftKey&&s.keyCode===68).map(s=>nn.stop(s,!0)).map(({browserEvent:s})=>{let a=this.getFocus(),l=a.length?a[0]:void 0,c=typeof l<"u"?this.view.element(l):void 0,d=typeof l<"u"?this.view.domElement(l):this.view.domNode;return{index:l,element:c,anchor:d,browserEvent:s}})),o=Et.chain(this.view.onContextMenu,r=>r.filter(s=>!e).map(({element:s,index:a,browserEvent:l})=>({element:s,index:a,anchor:new Oa(pi(this.view.domNode),l),browserEvent:l})));return Et.any(t,n,o)}get onKeyDown(){return this.disposables.add(new _n(this.view.domNode,"keydown")).event}get onDidFocus(){return Et.signal(this.disposables.add(new _n(this.view.domNode,"focus",!0)).event)}constructor(e,t,n,o,r=lNt){var s,a,l,c;this.user=e,this._options=r,this.focus=new iS("focused"),this.anchor=new iS("anchor"),this.eventBufferer=new L3,this._ariaLabel="",this.disposables=new Ye,this._onDidDispose=new ge,this.onDidDispose=this._onDidDispose.event;let d=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(s=this._options.accessibilityProvider)===null||s===void 0?void 0:s.getWidgetRole():"list";this.selection=new p2e(d!=="listbox");let u=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=r.accessibilityProvider,this.accessibilityProvider&&(u.push(new b2e(this.accessibilityProvider)),(l=(a=this.accessibilityProvider).onDidChangeActiveDescendant)===null||l===void 0||l.call(a,this.onDidChangeActiveDescendant,this,this.disposables)),o=o.map(f=>new _2e(f.templateId,[...u,f]));let h={...r,dnd:r.dnd&&new y2e(this,r.dnd)};if(this.view=this.createListView(t,n,o,h),this.view.domNode.setAttribute("role",d),r.styleController)this.styleController=r.styleController(this.view.domId);else{let f=ya(this.view.domNode);this.styleController=new oN(f,this.view.domId)}if(this.spliceable=new YY([new iN(this.focus,this.view,r.identityProvider),new iN(this.selection,this.view,r.identityProvider),new iN(this.anchor,this.view,r.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new g2e(this,this.view)),(typeof r.keyboardSupport!="boolean"||r.keyboardSupport)&&(this.keyboardController=new JY(this,this.view,r),this.disposables.add(this.keyboardController)),r.keyboardNavigationLabelProvider){let f=r.keyboardNavigationDelegate||sNt;this.typeNavigationController=new m2e(this,this.view,r.keyboardNavigationLabelProvider,(c=r.keyboardNavigationEventFilter)!==null&&c!==void 0?c:()=>!0,f),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(r),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,n,o){return new af(e,t,n,o)}createMouseController(e){return new nN(this)}updateOptions(e={}){var t,n;this._options={...this._options,...e},(t=this.typeNavigationController)===null||t===void 0||t.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),(n=this.keyboardController)===null||n===void 0||n.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,n=[]){if(e<0||e>this.view.length)throw new M2(this.user,`Invalid start index: ${e}`);if(t<0)throw new M2(this.user,`Invalid delete count: ${t}`);t===0&&n.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,n))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}indexAt(e){return this.view.indexAt(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(let n of e)if(n<0||n>=this.length)throw new M2(this.user,`Invalid index ${n}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(typeof e>"u"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new M2(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return vC(this.anchor.get(),void 0)}getAnchorElement(){let e=this.getAnchor();return typeof e>"u"?void 0:this.element(e)}setFocus(e,t){for(let n of e)if(n<0||n>=this.length)throw new M2(this.user,`Invalid index ${n}`);this.focus.set(e,t)}focusNext(e=1,t=!1,n,o){if(this.length===0)return;let r=this.focus.get(),s=this.findNextIndex(r.length>0?r[0]+e:0,t,o);s>-1&&this.setFocus([s],n)}focusPrevious(e=1,t=!1,n,o){if(this.length===0)return;let r=this.focus.get(),s=this.findPreviousIndex(r.length>0?r[0]-e:0,t,o);s>-1&&this.setFocus([s],n)}async focusNextPage(e,t){let n=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);n=n===0?0:n-1;let o=this.getFocus()[0];if(o!==n&&(o===void 0||n>o)){let r=this.findPreviousIndex(n,!1,t);r>-1&&o!==r?this.setFocus([r],e):this.setFocus([n],e)}else{let r=this.view.getScrollTop(),s=r+this.view.renderHeight;n>o&&(s-=this.view.elementHeight(n)),this.view.setScrollTop(s),this.view.getScrollTop()!==r&&(this.setFocus([]),await eh(0),await this.focusNextPage(e,t))}}async focusPreviousPage(e,t,n=()=>0){let o,r=n(),s=this.view.getScrollTop()+r;s===0?o=this.view.indexAt(s):o=this.view.indexAfter(s-1);let a=this.getFocus()[0];if(a!==o&&(a===void 0||a>=o)){let l=this.findNextIndex(o,!1,t);l>-1&&a!==l?this.setFocus([l],e):this.setFocus([o],e)}else{let l=s;this.view.setScrollTop(s-this.view.renderHeight-r),this.view.getScrollTop()+n()!==l&&(this.setFocus([]),await eh(0),await this.focusPreviousPage(e,t,n))}}focusLast(e,t){if(this.length===0)return;let n=this.findPreviousIndex(this.length-1,!1,t);n>-1&&this.setFocus([n],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,n){if(this.length===0)return;let o=this.findNextIndex(e,!1,n);o>-1&&this.setFocus([o],t)}findNextIndex(e,t=!1,n){for(let o=0;o=this.length&&!t)return-1;if(e=e%this.length,!n||n(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,n){for(let o=0;othis.view.element(e))}reveal(e,t,n=0){if(e<0||e>=this.length)throw new M2(this.user,`Invalid index ${e}`);let o=this.view.getScrollTop(),r=this.view.elementTop(e),s=this.view.elementHeight(e);if(zh(t)){let a=s-this.view.renderHeight+n;this.view.setScrollTop(a*Ml(t,0,1)+r-n)}else{let a=r+s,l=o+this.view.renderHeight;r=l||(r=l&&s>=this.view.renderHeight?this.view.setScrollTop(r-n):a>=l&&this.view.setScrollTop(a-this.view.renderHeight))}}getRelativeTop(e,t=0){if(e<0||e>=this.length)throw new M2(this.user,`Invalid index ${e}`);let n=this.view.getScrollTop(),o=this.view.elementTop(e),r=this.view.elementHeight(e);if(on+this.view.renderHeight)return null;let s=r-this.view.renderHeight+t;return Math.abs((n+t-o)/s)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(n=>this.view.element(n)),browserEvent:t}}_onFocusChange(){let e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;let t=this.focus.get();if(t.length>0){let n;!((e=this.accessibilityProvider)===null||e===void 0)&&e.getActiveDescendantId&&(n=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",n||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){let e=this.selection.get();this.view.domNode.classList.toggle("selection-none",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}};Wb([Tr],Nl.prototype,"onDidChangeFocus",null);Wb([Tr],Nl.prototype,"onDidChangeSelection",null);Wb([Tr],Nl.prototype,"onContextMenu",null);Wb([Tr],Nl.prototype,"onKeyDown",null);Wb([Tr],Nl.prototype,"onDidFocus",null)});var Ytt=P(()=>{});var Ub,Ztt,S2e,$b,Xtt=P(()=>{Qt();vp();Gl();VM();qv();Vi();Xt();Bh();nt();Mn();Ytt();Wt();Ub=pt,Ztt="selectOption.entry.template",S2e=class{get templateId(){return Ztt}renderTemplate(e){let t=Object.create(null);return t.root=e,t.text=ut(e,Ub(".option-text")),t.detail=ut(e,Ub(".option-detail")),t.decoratorRight=ut(e,Ub(".option-decorator-right")),t}renderElement(e,t,n){let o=n,r=e.text,s=e.detail,a=e.decoratorRight,l=e.isDisabled;o.text.textContent=r,o.detail.textContent=s||"",o.decoratorRight.innerText=a||"",l?o.root.classList.add("option-disabled"):o.root.classList.remove("option-disabled")}disposeTemplate(e){}},$b=class i extends ue{constructor(e,t,n,o,r){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=o,this.selectBoxOptions=r||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=i.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new ge,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(n),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}getHeight(){return 22}getTemplateId(){return Ztt}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=pt(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=ut(this.selectDropDownContainer,Ub(".select-box-details-pane"));let t=ut(this.selectDropDownContainer,Ub(".select-box-dropdown-container-width-control")),n=ut(t,Ub(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",ut(n,this.widthControlElement),this._dropDownPosition=0,this.styleElement=ya(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(Xe(this.selectDropDownContainer,Lt.DRAG_START,o=>{nn.stop(o,!0)}))}registerListeners(){this._register(go(this.selectElement,"change",t=>{this.selected=t.target.selectedIndex,this._onDidSelect.fire({index:t.target.selectedIndex,selected:t.target.value}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)})),this._register(Xe(this.selectElement,Lt.CLICK,t=>{nn.stop(t),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(Xe(this.selectElement,Lt.MOUSE_DOWN,t=>{nn.stop(t)}));let e;this._register(Xe(this.selectElement,"touchstart",t=>{e=this._isVisible})),this._register(Xe(this.selectElement,"touchend",t=>{nn.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(Xe(this.selectElement,Lt.KEY_DOWN,t=>{let n=new qn(t),o=!1;Wi?(n.keyCode===18||n.keyCode===16||n.keyCode===10||n.keyCode===3)&&(o=!0):(n.keyCode===18&&n.altKey||n.keyCode===16&&n.altKey||n.keyCode===10||n.keyCode===3)&&(o=!0),o&&(this.showSelectDropDown(),nn.stop(t,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){uo(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((n,o)=>{this.selectElement.add(this.createOption(n.text,o,n.isDisabled)),typeof n.description=="string"&&(this._hasDetails=!0)})),t!==void 0&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){var e;(e=this.selectList)===null||e===void 0||e.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){let e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join(` -`)}styleSelectElement(){var e,t,n;let o=(e=this.styles.selectBackground)!==null&&e!==void 0?e:"",r=(t=this.styles.selectForeground)!==null&&t!==void 0?t:"",s=(n=this.styles.selectBorder)!==null&&n!==void 0?n:"";this.selectElement.style.backgroundColor=o,this.selectElement.style.color=r,this.selectElement.style.borderColor=s}styleList(){var e,t;let n=(e=this.styles.selectBackground)!==null&&e!==void 0?e:"",o=Gf(this.styles.selectListBackground,n);this.selectDropDownListContainer.style.backgroundColor=o,this.selectionDetailsPane.style.backgroundColor=o;let r=(t=this.styles.focusBorder)!==null&&t!==void 0?t:"";this.selectDropDownContainer.style.outlineColor=r,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,n){let o=document.createElement("option");return o.value=e,o.text=e,o.disabled=!!n,o}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{try{e.removeChild(this.selectDropDownContainer)}catch{}}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((t,n)=>{this.updateDetail(n),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");let t=pi(this.selectElement),n=Lo(this.selectElement),o=pi(this.selectElement).getComputedStyle(this.selectElement),r=parseFloat(o.getPropertyValue("--dropdown-padding-top"))+parseFloat(o.getPropertyValue("--dropdown-padding-bottom")),s=t.innerHeight-n.top-n.height-(this.selectBoxOptions.minBottomMargin||0),a=n.top-i.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,l=this.selectElement.offsetWidth,c=this.setWidthControlElement(this.widthControlElement),d=Math.max(c,Math.round(l)).toString()+"px";this.selectDropDownContainer.style.width=d,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let u=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());let h=this._hasDetails?this._cachedMaxDetailsHeight:0,f=u+r+h,p=Math.floor((s-r-h)/this.getHeight()),m=Math.floor((a-r-h)/this.getHeight());if(e)return n.top+n.height>t.innerHeight-22||n.topp&&this.options.length>p?(this._dropDownPosition=1,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(n.top+n.height>t.innerHeight-22||n.tops&&(u=p*this.getHeight())}else f>a&&(u=m*this.getHeight());return this.selectList.layout(u),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=u+r+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=u+r+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=d,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(e){let t=0;if(e){let n=0,o=0;this.options.forEach((r,s)=>{let a=r.detail?r.detail.length:0,l=r.decoratorRight?r.decoratorRight.length:0,c=r.text.length+a+l;c>o&&(n=s,o=c)}),e.textContent=this.options[n].text+(this.options[n].decoratorRight?this.options[n].decoratorRight+" ":""),t=wl(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=ut(e,Ub(".select-box-dropdown-list-container")),this.listRenderer=new S2e,this.selectList=new Nl("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:o=>{let r=o.text;return o.detail&&(r+=`. ${o.detail}`),o.decoratorRight&&(r+=`. ${o.decoratorRight}`),o.description&&(r+=`. ${o.description}`),r},getWidgetAriaLabel:()=>g({key:"selectBox",comment:["Behave like native select dropdown element."]},"Select Box"),getRole:()=>Wi?"":"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);let t=this._register(new _n(this.selectDropDownListContainer,"keydown")),n=Et.chain(t.event,o=>o.filter(()=>this.selectList.length>0).map(r=>new qn(r)));this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===3))(this.onEnter,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===2))(this.onEnter,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===9))(this.onEscape,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===16))(this.onUpArrow,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===18))(this.onDownArrow,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===12))(this.onPageDown,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===11))(this.onPageUp,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===14))(this.onHome,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===13))(this.onEnd,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode>=21&&r.keyCode<=56||r.keyCode>=85&&r.keyCode<=113))(this.onCharacter,this)),this._register(Xe(this.selectList.getHTMLElement(),Lt.POINTER_UP,o=>this.onPointerUp(o))),this._register(this.selectList.onMouseOver(o=>typeof o.index<"u"&&this.selectList.setFocus([o.index]))),this._register(this.selectList.onDidChangeFocus(o=>this.onListFocus(o))),this._register(Xe(this.selectDropDownContainer,Lt.FOCUS_OUT,o=>{!this._isVisible||ms(o.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;nn.stop(e);let t=e.target;if(!t||t.classList.contains("slider"))return;let n=t.closest(".monaco-list-row");if(!n)return;let o=Number(n.getAttribute("data-index")),r=n.classList.contains("option-disabled");o>=0&&o{for(let s=0;sthis.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(nn.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){nn.stop(e),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(e){nn.stop(e),!(this.options.length<2)&&(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){nn.stop(e),!(this.options.length<2)&&(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){let t=ep.toString(e.keyCode),n=-1;for(let o=0;o{Qt();dh();Vi();Xt();nt();Mn();eZ=class extends ue{constructor(e,t,n,o){super(),this.selected=0,this.selectBoxOptions=o||Object.create(null),this.options=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=this._register(new ge),this.styles=n,this.registerListeners(),this.setOptions(e,t)}registerListeners(){this._register(ar.addTarget(this.selectElement)),[vo.Tap].forEach(e=>{this._register(Xe(this.selectElement,e,t=>{this.selectElement.focus()}))}),this._register(go(this.selectElement,"click",e=>{nn.stop(e,!0)})),this._register(go(this.selectElement,"change",e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),this._register(go(this.selectElement,"keydown",e=>{let t=!1;Wi?(e.keyCode===18||e.keyCode===16||e.keyCode===10)&&(t=!0):(e.keyCode===18&&e.altKey||e.keyCode===10||e.keyCode===3)&&(t=!0),t&&e.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){(!this.options||!uo(this.options,e))&&(this.options=e,this.selectElement.options.length=0,this.options.forEach((n,o)=>{this.selectElement.add(this.createOption(n.text,o,n.isDisabled))})),t!==void 0&&this.select(t)}select(e){this.options.length===0?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{});var tZ,eit=P(()=>{Xtt();Qtt();i1();Mn();Jtt();tZ=class extends Ds{constructor(e,t,n,o,r){super(),Wi&&!r?.useCustomDrawn?this.selectBoxDelegate=new eZ(e,t,o,r):this.selectBoxDelegate=new $b(e,t,n,o,r),this._register(this.selectBoxDelegate)}get onDidSelect(){return this.selectBoxDelegate.onDidSelect}setOptions(e,t){this.selectBoxDelegate.setOptions(e,t)}select(e){this.selectBoxDelegate.select(e)}focus(){this.selectBoxDelegate.focus()}blur(){this.selectBoxDelegate.blur()}setFocusable(e){this.selectBoxDelegate.setFocusable(e)}render(e){this.selectBoxDelegate.render(e)}}});var k2e=P(()=>{});var Rd,d1,iZ,jb=P(()=>{Xc();GY();Qt();dh();l2e();eit();Ra();nt();Mn();ho();k2e();Wt();Rd=class extends ue{get action(){return this._action}constructor(e,t,n={}){super(),this.options=n,this._context=e||this,this._action=t,t instanceof zs&&this._register(t.onDidChange(o=>{this.element&&this.handleActionChangeEvent(o)}))}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new Qu)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){let t=this.element=e;this._register(ar.addTarget(e));let n=this.options&&this.options.draggable;n&&(e.draggable=!0,Aa&&this._register(Xe(e,Lt.DRAG_START,o=>{var r;return(r=o.dataTransfer)===null||r===void 0?void 0:r.setData(jv.TEXT,this._action.label)}))),this._register(Xe(t,vo.Tap,o=>this.onClick(o,!0))),this._register(Xe(t,Lt.MOUSE_DOWN,o=>{n||nn.stop(o,!0),this._action.enabled&&o.button===0&&t.classList.add("active")})),Wi&&this._register(Xe(t,Lt.CONTEXT_MENU,o=>{o.button===0&&o.ctrlKey===!0&&this.onClick(o)})),this._register(Xe(t,Lt.CLICK,o=>{nn.stop(o,!0),this.options&&this.options.isMenu||this.onClick(o)})),this._register(Xe(t,Lt.DBLCLICK,o=>{nn.stop(o,!0)})),[Lt.MOUSE_UP,Lt.MOUSE_OUT].forEach(o=>{this._register(Xe(t,o,r=>{nn.stop(r),t.classList.remove("active")}))})}onClick(e,t=!1){var n;nn.stop(e,!0);let o=kc(this._context)?!((n=this.options)===null||n===void 0)&&n.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,o)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}updateTooltip(){var e;if(!this.element)return;let t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.updateAriaLabel(),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(t):(this.customHover=KY(this.options.hoverDelegate,this.element,t),this._store.add(this.customHover))):this.element.title=t}updateAriaLabel(){var e;if(this.element){let t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.element.setAttribute("aria-label",t)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}},d1=class extends Rd{constructor(e,t,n){super(e,t,n),this.options=n,this.options.icon=n.icon!==void 0?n.icon:!1,this.options.label=n.label!==void 0?n.label:!0,this.cssClass=""}render(e){super.render(e),Bn(this.element);let t=document.createElement("a");if(t.classList.add("action-label"),t.setAttribute("role",this.getDefaultAriaRole()),this.label=t,this.element.appendChild(t),this.options.label&&this.options.keybinding){let n=document.createElement("span");n.classList.add("keybinding"),n.textContent=this.options.keybinding,this.element.appendChild(n)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===zr.ID?"presentation":this.options.isMenu?"menuitem":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=g({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):(e=this.label)===null||e===void 0||e.classList.remove("codicon")}updateEnabled(){var e,t;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),(e=this.element)===null||e===void 0||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),(t=this.element)===null||t===void 0||t.classList.add("disabled"))}updateAriaLabel(){var e;if(this.label){let t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.label.setAttribute("aria-label",t)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox")):(this.label.classList.remove("checked"),this.label.removeAttribute("aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}},iZ=class extends Rd{constructor(e,t,n,o,r,s,a){super(e,t),this.selectBox=new tZ(n,o,r,s,a),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect(e=>this.runAction(e.selected,e.index)))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){var e;(e=this.selectBox)===null||e===void 0||e.focus()}blur(){var e;(e=this.selectBox)===null||e===void 0||e.blur()}render(e){this.selectBox.render(e)}}});var L2e=P(()=>{});var E2e,nZ,tit=P(()=>{Qt();Gl();dh();Ra();Xt();L2e();E2e=class extends Qu{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new ge),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=ut(e,pt(".monaco-dropdown")),this._label=ut(this._element,pt(".dropdown-label"));let n=t.labelRenderer;n||(n=r=>(r.textContent=t.label||"",null));for(let r of[Lt.CLICK,Lt.MOUSE_DOWN,vo.Tap])this._register(Xe(this.element,r,s=>nn.stop(s,!0)));for(let r of[Lt.MOUSE_DOWN,vo.Tap])this._register(Xe(this._label,r,s=>{KC(s)&&(s.detail>1||s.button!==0)||(this.visible?this.hide():this.show())}));this._register(Xe(this._label,Lt.KEY_UP,r=>{let s=new qn(r);(s.equals(3)||s.equals(10))&&(nn.stop(r,!0),this.visible?this.hide():this.show())}));let o=n(this._label);o&&this._register(o),this._register(ar.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}},nZ=class extends E2e{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}});var Gv,D2e=P(()=>{Qt();jb();tit();Xt();L2e();Gv=class extends Rd{constructor(e,t,n,o=Object.create(null)){super(null,e,o),this.actionItem=null,this._onDidChangeVisibility=this._register(new ge),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=n,this.options=o,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;let t=r=>{this.element=ut(r,pt("a.action-label"));let s=[];return typeof this.options.classNames=="string"?s=this.options.classNames.split(/\s+/g).filter(a=>!!a):this.options.classNames&&(s=this.options.classNames),s.find(a=>a==="icon")||s.push("codicon"),this.element.classList.add(...s),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},n=Array.isArray(this.menuActionsOrProvider),o={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:n?this.menuActionsOrProvider:void 0,actionProvider:n?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new nZ(e,o)),this._register(this.dropdownMenu.onDidChangeVisibility(r=>{var s;(s=this.element)===null||s===void 0||s.setAttribute("aria-expanded",`${r}`),this._onDidChangeVisibility.fire(r)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){let r=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return r.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){var e;(e=this.dropdownMenu)===null||e===void 0||e.show()}updateEnabled(){var e,t;let n=!this.action.enabled;(e=this.actionItem)===null||e===void 0||e.classList.toggle("disabled",n),(t=this.element)===null||t===void 0||t.classList.toggle("disabled",n)}}});var iit=P(()=>{});function nit(i){return i?i.condition!==void 0:!1}var oit=P(()=>{});var qb,oS,Gb,rS,rit=P(()=>{Qi();Xt();nt();CY();ho();(function(i){i[i.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",i[i.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(qb||(qb={}));(function(i){i[i.None=0]="None",i[i.Initialized=1]="Initialized",i[i.Closed=2]="Closed"})(oS||(oS={}));Gb=class i extends ue{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new Pf),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=oS.None,this.cache=new Map,this.flushDelayer=this._register(new UC(i.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var t,n;this._onDidChangeStorage.pause();try{(t=e.changed)===null||t===void 0||t.forEach((o,r)=>this.acceptExternal(r,o)),(n=e.deleted)===null||n===void 0||n.forEach(o=>this.acceptExternal(o,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===oS.Closed)return;let n=!1;kc(t)?n=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),n=!0),n&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){let n=this.cache.get(e);return kc(n)?t:n}getBoolean(e,t){let n=this.get(e);return kc(n)?t:n==="true"}getNumber(e,t){let n=this.get(e);return kc(n)?t:parseInt(n,10)}async set(e,t,n=!1){if(this.state===oS.Closed)return;if(kc(t))return this.delete(e,n);let o=Gs(t)||Array.isArray(t)?stt(t):String(t);if(this.cache.get(e)!==o)return this.cache.set(e,o),this.pendingInserts.set(e,o),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:n}),this.doFlush()}async delete(e,t=!1){if(!(this.state===oS.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;let e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{var t;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(t=this.whenFlushedCallbacks.pop())===null||t===void 0||t()})}async doFlush(e){return this.options.hint===qb.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),e)}};Gb.DEFAULT_FLUSH_DELAY=100;rS=class{constructor(){this.onDidChangeItemsExternal=Et.None,this.items=new Map}async updateItems(e){var t,n;(t=e.insert)===null||t===void 0||t.forEach((o,r)=>this.items.set(r,o)),(n=e.delete)===null||n===void 0||n.forEach(o=>this.items.delete(o))}}});function uNt(i){let e=i.get(oZ);if(e)try{return JSON.parse(e)}catch{}return Object.create(null)}var oZ,nl,Kv,rZ,sZ,Hm=P(()=>{Xt();nt();ho();rit();_i();oZ="__$__targetStorageMarker",nl=vi("storageService");(function(i){i[i.NONE=0]="NONE",i[i.SHUTDOWN=1]="SHUTDOWN"})(Kv||(Kv={}));rZ=class i extends ue{constructor(e={flushInterval:i.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new Pf),this._onDidChangeTarget=this._register(new Pf),this._onWillSaveState=this._register(new ge),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,t,n){return Et.filter(this._onDidChangeValue.event,o=>o.scope===e&&(t===void 0||o.key===t),n)}emitDidChangeValue(e,t){let{key:n,external:o}=t;if(n===oZ){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:n,target:this.getKeyTargets(e)[n],external:o})}get(e,t,n){var o;return(o=this.getStorage(t))===null||o===void 0?void 0:o.get(e,n)}getBoolean(e,t,n){var o;return(o=this.getStorage(t))===null||o===void 0?void 0:o.getBoolean(e,n)}getNumber(e,t,n){var o;return(o=this.getStorage(t))===null||o===void 0?void 0:o.getNumber(e,n)}store(e,t,n,o,r=!1){if(kc(t)){this.remove(e,n,r);return}this.withPausedEmitters(()=>{var s;this.updateKeyTarget(e,n,o),(s=this.getStorage(n))===null||s===void 0||s.set(e,t,r)})}remove(e,t,n=!1){this.withPausedEmitters(()=>{var o;this.updateKeyTarget(e,t,void 0),(o=this.getStorage(t))===null||o===void 0||o.delete(e,n)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,n,o=!1){var r,s;let a=this.getKeyTargets(t);typeof n=="number"?a[e]!==n&&(a[e]=n,(r=this.getStorage(t))===null||r===void 0||r.set(oZ,JSON.stringify(a),o)):typeof a[e]=="number"&&(delete a[e],(s=this.getStorage(t))===null||s===void 0||s.set(oZ,JSON.stringify(a),o))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){let t=this.getStorage(e);return t?uNt(t):Object.create(null)}};rZ.DEFAULT_FLUSH_INTERVAL=60*1e3;sZ=class extends rZ{constructor(){super(),this.applicationStorage=this._register(new Gb(new rS,{hint:qb.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new Gb(new rS,{hint:qb.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new Gb(new rS,{hint:qb.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e)))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}});function hNt(i,e){let t={...e};for(let n in i){let o=i[n];t[n]=o!==void 0?ai(o):void 0}return t}function M4(i){return hNt(i,I4)}var sit,ait,lit,sS,DWi,TWi,aS,cit,aZ,IWi,I4,dit,uit,N4=P(()=>{pr();sa();sit={keybindingLabelBackground:ai(TYe),keybindingLabelForeground:ai(IYe),keybindingLabelBorder:ai(MYe),keybindingLabelBottomBorder:ai(NYe),keybindingLabelShadow:ai(Zh)},ait={buttonForeground:ai(Ew),buttonSeparator:ai(gYe),buttonBackground:ai(Dw),buttonHoverBackground:ai(vYe),buttonSecondaryForeground:ai(bYe),buttonSecondaryBackground:ai(cj),buttonSecondaryHoverBackground:ai(yYe),buttonBorder:ai(_Ye)},lit={progressBarBackground:ai(wYe)},sS={inputActiveOptionBorder:ai(Ww),inputActiveOptionForeground:ai(Uw),inputActiveOptionBackground:ai(Lm)},DWi={checkboxBackground:ai(uZe),checkboxBorder:ai(fZe),checkboxForeground:ai(hZe)},TWi={dialogBackground:ai(Fr),dialogForeground:ai(cp),dialogShadow:ai(Zh),dialogBorder:ai(Fn),errorIconForeground:ai(IZe),warningIconForeground:ai(MZe),infoIconForeground:ai(NZe),textLinkForeground:ai(rYe)},aS={inputBackground:ai(mj),inputForeground:ai(gj),inputBorder:ai(vj),inputValidationInfoBorder:ai(lYe),inputValidationInfoBackground:ai(sYe),inputValidationInfoForeground:ai(aYe),inputValidationWarningBorder:ai(uYe),inputValidationWarningBackground:ai(cYe),inputValidationWarningForeground:ai(dYe),inputValidationErrorBorder:ai(pYe),inputValidationErrorBackground:ai(hYe),inputValidationErrorForeground:ai(fYe)},cit={listFilterWidgetBackground:ai(oZe),listFilterWidgetOutline:ai(rZe),listFilterWidgetNoMatchesOutline:ai(sZe),listFilterWidgetShadow:ai(aZe),inputBoxStyles:aS,toggleStyles:sS},aZ={badgeBackground:ai(_I),badgeForeground:ai(CYe),badgeBorder:ai(Fn)},IWi={breadcrumbsBackground:ai(wZe),breadcrumbsForeground:ai(CZe),breadcrumbsHoverForeground:ai(l1e),breadcrumbsFocusForeground:ai(l1e),breadcrumbsFocusAndSelectionForeground:ai(xZe)},I4={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:ai(GYe),listFocusForeground:ai(KYe),listFocusOutline:ai(YYe),listActiveSelectionBackground:ai(o2),listActiveSelectionForeground:ai(Sm),listActiveSelectionIconForeground:ai(Aw),listFocusAndSelectionOutline:ai(ZYe),listFocusAndSelectionBackground:ai(o2),listFocusAndSelectionForeground:ai(Sm),listInactiveSelectionBackground:ai(XYe),listInactiveSelectionIconForeground:ai(JYe),listInactiveSelectionForeground:ai(QYe),listInactiveFocusBackground:ai(eZe),listInactiveFocusOutline:ai(tZe),listHoverBackground:ai(s1e),listHoverForeground:ai(a1e),listDropOverBackground:ai(iZe),listDropBetweenBackground:ai(nZe),listSelectionOutline:ai(Uo),listHoverOutline:ai(Uo),treeIndentGuidesStroke:ai(Rw),treeInactiveIndentGuidesStroke:ai(lZe),tableColumnsBorder:ai(cZe),tableOddRowsBackgroundColor:ai(dZe)};dit={selectBackground:ai(xm),selectListBackground:ai(mYe),selectForeground:ai(e2),decoratorRightForeground:ai(_j),selectBorder:ai(lv),focusBorder:ai(fu),listFocusBackground:ai(s2),listInactiveSelectionIconForeground:ai(u4),listFocusForeground:ai(r2),listFocusOutline:nYe(Uo,it.transparent.toString()),listHoverBackground:ai(s1e),listHoverForeground:ai(a1e),listHoverOutline:ai(Uo),selectListBorder:ai(e1),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropOverBackground:void 0,listDropBetweenBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0},uit={shadowColor:ai(Zh),borderColor:ai(pZe),foregroundColor:ai(mZe),backgroundColor:ai(gZe),selectionForegroundColor:ai(vZe),selectionBackgroundColor:ai(_Ze),selectionBorderColor:ai(bZe),separatorColor:ai(yZe),scrollbarShadow:ai(Tw),scrollbarSliderBackground:ai(Iw),scrollbarSliderHoverBackground:ai(Mw),scrollbarSliderActiveBackground:ai(Nw)}});function hit(i,e,t,n){let o=i.getActions(e),r=Z0.getInstance(),s=r.keyStatus.altKey||(hr||Ar)&&r.keyStatus.shiftKey;fit(o,t,s,n?a=>a===n:a=>a==="navigation")}function lS(i,e,t,n,o,r){let s=i.getActions(e);fit(s,t,!1,typeof n=="string"?l=>l===n:n,o,r)}function fit(i,e,t,n=s=>s==="navigation",o=()=>!1,r=!1){let s,a;Array.isArray(e)?(s=e,a=e):(s=e.primary,a=e.secondary);let l=new Set;for(let[c,d]of i){let u;n(c)?(u=s,u.length>0&&r&&u.push(new zr)):(u=a,u.length>0&&u.push(new zr));for(let h of d){t&&(h=h instanceof ed&&h.alt?h.alt:h);let f=u.push(h);h instanceof Wf&&l.add({group:c,action:h,index:f-1})}}for(let{group:c,action:d,index:u}of l){let h=n(c)?s:a,f=d.actions;o(d,c,h.length)&&h.splice(u,1,...f)}}function pit(i,e,t){return e instanceof ed?i.createInstance(A4,e,t):e instanceof hm?e.item.isSelection?i.createInstance(M2e,e):e.item.rememberDefaultAction?i.createInstance(I2e,e,{...t,persistLastActionId:!0}):i.createInstance(T2e,e,t):void 0}var lZ,bu,A4,T2e,I2e,M2e,Kb=P(()=>{Qt();Gl();jb();D2e();Ra();NY();nt();Mn();iit();Wt();Dr();oit();Xi();Id();_i();vs();ic();Hm();No();or();fp();ho();pr();N4();Yh();lZ=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},bu=function(i,e){return function(t,n){e(t,n,i)}};A4=class extends d1{constructor(e,t,n,o,r,s,a,l){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:t?.draggable,keybinding:t?.keybinding,hoverDelegate:t?.hoverDelegate}),this._keybindingService=n,this._notificationService=o,this._contextKeyService=r,this._themeService=s,this._contextMenuService=a,this._accessibilityService=l,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new To),this._altKey=Z0.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){e.preventDefault(),e.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(t){this._notificationService.error(t)}}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1,n=()=>{var o;let r=!!(!((o=this._menuItemAction.alt)===null||o===void 0)&&o.enabled)&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);r!==this._wantsAltCommand&&(this._wantsAltCommand=r,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(n)),this._register(Xe(e,"mouseleave",o=>{t=!1,n()})),this._register(Xe(e,"mouseenter",o=>{t=!0,n()})),n()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var e;let t=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),n=t&&t.getLabel(),o=this._commandAction.tooltip||this._commandAction.label,r=n?g("titleAndKb","{0} ({1})",o,n):o;if(!this._wantsAltCommand&&(!((e=this._menuItemAction.alt)===null||e===void 0)&&e.enabled)){let s=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,a=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),l=a&&a.getLabel(),c=l?g("titleAndKb","{0} ({1})",s,l):s;r=g("titleAndKbAndAlt",`{0} -[{1}] {2}`,r,Gx.modifierLabels[Xa].altKey,c)}return r}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;let{element:t,label:n}=this;if(!t||!n)return;let o=this._commandAction.checked&&nit(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(o)if(ui.isThemeIcon(o)){let r=ui.asClassNameArray(o);n.classList.add(...r),this._itemClassDispose.value=Yt(()=>{n.classList.remove(...r)})}else n.style.backgroundImage=a2(this._themeService.getColorTheme().type)?rp(o.dark):rp(o.light),n.classList.add("icon"),this._itemClassDispose.value=vl(Yt(()=>{n.style.backgroundImage="",n.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};A4=lZ([bu(2,fn),bu(3,xo),bu(4,ri),bu(5,Mo),bu(6,ca),bu(7,Ba)],A4);T2e=class extends Gv{constructor(e,t,n,o,r){var s,a,l;let c={...t,menuAsChild:(s=t?.menuAsChild)!==null&&s!==void 0?s:!1,classNames:(a=t?.classNames)!==null&&a!==void 0?a:ui.isThemeIcon(e.item.icon)?ui.asClassName(e.item.icon):void 0,keybindingProvider:(l=t?.keybindingProvider)!==null&&l!==void 0?l:d=>n.lookupKeybinding(d.id)};super(e,{getActions:()=>e.actions},o,c),this._keybindingService=n,this._contextMenuService=o,this._themeService=r}render(e){super.render(e),Bn(this.element),e.classList.add("menu-entry");let t=this._action,{icon:n}=t.item;if(n&&!ui.isThemeIcon(n)){this.element.classList.add("icon");let o=()=>{this.element&&(this.element.style.backgroundImage=a2(this._themeService.getColorTheme().type)?rp(n.dark):rp(n.light))};o(),this._register(this._themeService.onDidColorThemeChange(()=>{o()}))}}};T2e=lZ([bu(2,fn),bu(3,ca),bu(4,Mo)],T2e);I2e=class extends Rd{constructor(e,t,n,o,r,s,a,l){var c,d,u;super(null,e),this._keybindingService=n,this._notificationService=o,this._contextMenuService=r,this._menuService=s,this._instaService=a,this._storageService=l,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let h,f=t?.persistLastActionId?l.get(this._storageKey,1):void 0;f&&(h=e.actions.find(m=>f===m.id)),h||(h=e.actions[0]),this._defaultAction=this._instaService.createInstance(A4,h,{keybinding:this._getDefaultActionKeybindingLabel(h)});let p={keybindingProvider:m=>this._keybindingService.lookupKeybinding(m.id),...t,menuAsChild:(c=t?.menuAsChild)!==null&&c!==void 0?c:!0,classNames:(d=t?.classNames)!==null&&d!==void 0?d:["codicon","codicon-chevron-down"],actionRunner:(u=t?.actionRunner)!==null&&u!==void 0?u:new Qu};this._dropdown=new Gv(e,e.actions,this._contextMenuService,p),this._register(this._dropdown.actionRunner.onDidRun(m=>{m.action instanceof ed&&this.update(m.action)}))}update(e){var t;!((t=this._options)===null||t===void 0)&&t.persistLastActionId&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(A4,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends Qu{async runAction(n,o){await n.run(void 0)}},this._container&&this._defaultAction.render(ZC(this._container,pt(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let n;if(!((t=this._options)===null||t===void 0)&&t.renderKeybindingWithDefaultActionLabel){let o=this._keybindingService.lookupKeybinding(e.id);o&&(n=`(${o.getLabel()})`)}return n}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");let t=pt(".action-container");this._defaultAction.render(ut(this._container,t)),this._register(Xe(t,Lt.KEY_DOWN,o=>{let r=new qn(o);r.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),r.stopPropagation())}));let n=pt(".dropdown-action-container");this._dropdown.render(ut(this._container,n)),this._register(Xe(n,Lt.KEY_DOWN,o=>{var r;let s=new qn(o);s.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(r=this._defaultAction.element)===null||r===void 0||r.focus(),s.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};I2e=lZ([bu(2,fn),bu(3,xo),bu(4,ca),bu(5,Mc),bu(6,qt),bu(7,nl)],I2e);M2e=class extends iZ{constructor(e,t){super(null,e,e.actions.map(n=>({text:n.id===zr.ID?"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500":n.label,isDisabled:!n.enabled})),0,t,dit,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex(n=>n.checked)))}render(e){super.render(e),e.style.borderColor=ai(lv)}runAction(e,t){let n=this.action.actions[t];n&&this.actionRunner.run(n)}};M2e=lZ([bu(1,Pc)],M2e)});var Bs,u1=P(()=>{Qt();Gl();jb();Ra();Xt();nt();ho();k2e();Bs=class extends ue{constructor(e,t={}){var n,o,r,s,a,l;super(),this._actionRunnerDisposables=this._register(new Ye),this.viewItemDisposables=this._register(new k3),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new ge),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new ge({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new ge),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new ge),this.onWillRun=this._onWillRun.event,this.options=t,this._context=(n=t.context)!==null&&n!==void 0?n:null,this._orientation=(o=this.options.orientation)!==null&&o!==void 0?o:0,this._triggerKeys={keyDown:(s=(r=this.options.triggerKeys)===null||r===void 0?void 0:r.keyDown)!==null&&s!==void 0?s:!1,keys:(l=(a=this.options.triggerKeys)===null||a===void 0?void 0:a.keys)!==null&&l!==void 0?l:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new Qu,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(u=>this._onDidRun.fire(u))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(u=>this._onWillRun.fire(u))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",t.animated!==!1&&this.domNode.classList.add("animated");let c,d;switch(this._orientation){case 0:c=[15],d=[17];break;case 1:c=[16],d=[18],this.domNode.className+=" vertical";break}this._register(Xe(this.domNode,Lt.KEY_DOWN,u=>{let h=new qn(u),f=!0,p=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;c&&(h.equals(c[0])||h.equals(c[1]))?f=this.focusPrevious():d&&(h.equals(d[0])||h.equals(d[1]))?f=this.focusNext():h.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():h.equals(14)?f=this.focusFirst():h.equals(13)?f=this.focusLast():h.equals(2)&&p instanceof Rd&&p.trapsArrowNavigation?f=this.focusNext():this.isTriggerKeyEvent(h)?this._triggerKeys.keyDown?this.doTrigger(h):this.triggerKeyDown=!0:f=!1,f&&(h.preventDefault(),h.stopPropagation())})),this._register(Xe(this.domNode,Lt.KEY_UP,u=>{let h=new qn(u);this.isTriggerKeyEvent(h)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(h)),h.preventDefault(),h.stopPropagation()):(h.equals(2)||h.equals(1026)||h.equals(16)||h.equals(18)||h.equals(15)||h.equals(17))&&this.updateFocusedItem()})),this.focusTracker=this._register(Kl(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(gs()===this.domNode||!ms(gs(),this.domNode))&&(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){let t=this.viewItems.find(n=>n instanceof Rd&&n.isEnabled());t instanceof Rd&&t.setFocusable(!0)}else this.viewItems.forEach(t=>{t instanceof Rd&&t.setFocusable(!1)})}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(n=>{t=t||e.equals(n)}),t}updateFocusedItem(){var e,t;for(let n=0;nt.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(t=>this._onDidRun.fire(t))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(t=>this._onWillRun.fire(t))),this.viewItems.forEach(t=>t.actionRunner=e)}getContainer(){return this.domNode}getAction(e){var t;if(typeof e=="number")return(t=this.viewItems[e])===null||t===void 0?void 0:t.action;if(e instanceof HTMLElement){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let n=0;n{let s=document.createElement("li");s.className="action-item",s.setAttribute("role","presentation");let a,l={hoverDelegate:this.options.hoverDelegate,...t};this.options.actionViewItemProvider&&(a=this.options.actionViewItemProvider(r,l)),a||(a=new d1(this.context,r,l)),this.options.allowContextMenu||this.viewItemDisposables.set(a,Xe(s,Lt.CONTEXT_MENU,c=>{nn.stop(c,!0)})),a.actionRunner=this._actionRunner,a.setActionContext(this.context),a.render(s),this.focusable&&a instanceof Rd&&this.viewItems.length===0&&a.setFocusable(!0),o===null||o<0||o>=this.actionsList.children.length?(this.actionsList.appendChild(s),this.viewItems.push(a)):(this.actionsList.insertBefore(s,this.actionsList.children[o]),this.viewItems.splice(o,0,a),o++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=Nn(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),is(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(e){let t=!1,n;if(e===void 0?t=!0:typeof e=="number"?n=e:typeof e=="boolean"&&(t=e),t&&typeof this.focusedItem>"u"){let o=this.viewItems.findIndex(r=>r.isEnabled());this.focusedItem=o===-1?void 0:o,this.updateFocus(void 0,void 0,!0)}else n!==void 0&&(this.focusedItem=n),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;let t=this.focusedItem,n;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,n=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===zr.ID));return this.updateFocus(),!0}focusPrevious(e){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;let t=this.focusedItem,n;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}n=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===zr.ID));return this.updateFocus(!0),!0}updateFocus(e,t,n=!1){var o,r;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((o=this.viewItems[this.previouslyFocusedItem])===null||o===void 0||o.blur());let s=this.focusedItem!==void 0?this.viewItems[this.focusedItem]:void 0;if(s){let a=!0;v3(s.focus)||(a=!1),this.options.focusOnlyEnabledItems&&v3(s.isEnabled)&&!s.isEnabled()&&(a=!1),s.action.id===zr.ID&&(a=!1),a?(n||this.previouslyFocusedItem!==this.focusedItem)&&(s.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0),a&&((r=s.showHover)===null||r===void 0||r.call(s))}}doTrigger(e){if(typeof this.focusedItem>"u")return;let t=this.viewItems[this.focusedItem];if(t instanceof Rd){let n=t._context===null||t._context===void 0?e:t._context;this.run(t._action,n)}}async run(e,t){await this._actionRunner.run(e,t)}dispose(){this._context=void 0,this.viewItems=Nn(this.viewItems),this.getContainer().remove(),super.dispose()}}});function fNt(i){let e=A2e,t=e.exec(i);if(!t)return i;let n=!t[1];return i.replace(e,n?"$2$3":"").trim()}function mit(i){let e=cW()[i.id];return`.codicon-${i.id}:before { content: '\\${e.toString(16)}'; }`}function pNt(i,e){let t=` +`)}},Ktt={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:it.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:it.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:it.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0},lNt={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};jtt=(i,e)=>i-e,_2e=class{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,n,o){let r=0;for(let s of this.renderers)s.renderElement(e,t,n[r++],o)}disposeElement(e,t,n,o){var r;let s=0;for(let a of this.renderers)(r=a.disposeElement)===null||r===void 0||r.call(a,e,t,n[s],o),s+=1}disposeTemplate(e){let t=0;for(let n of this.renderers)n.disposeTemplate(e[t++])}},b2e=class{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,n){let o=this.accessibilityProvider.getAriaLabel(e);o?n.setAttribute("aria-label",o):n.removeAttribute("aria-label");let r=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof r=="number"?n.setAttribute("aria-level",`${r}`):n.removeAttribute("aria-level")}disposeTemplate(e){}},y2e=class{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){let t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){var n,o;(o=(n=this.dnd).onDragStart)===null||o===void 0||o.call(n,e,t)}onDragOver(e,t,n,o,r){return this.dnd.onDragOver(e,t,n,o,r)}onDragLeave(e,t,n,o){var r,s;(s=(r=this.dnd).onDragLeave)===null||s===void 0||s.call(r,e,t,n,o)}onDragEnd(e){var t,n;(n=(t=this.dnd).onDragEnd)===null||n===void 0||n.call(t,e)}drop(e,t,n,o,r){this.dnd.drop(e,t,n,o,r)}dispose(){this.dnd.dispose()}},Nl=class{get onDidChangeFocus(){return Et.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return Et.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1,t=Et.chain(this.disposables.add(new _n(this.view.domNode,"keydown")).event,r=>r.map(s=>new qn(s)).filter(s=>e=s.keyCode===58||s.shiftKey&&s.keyCode===68).map(s=>nn.stop(s,!0)).filter(()=>!1)),n=Et.chain(this.disposables.add(new _n(this.view.domNode,"keyup")).event,r=>r.forEach(()=>e=!1).map(s=>new qn(s)).filter(s=>s.keyCode===58||s.shiftKey&&s.keyCode===68).map(s=>nn.stop(s,!0)).map(({browserEvent:s})=>{let a=this.getFocus(),l=a.length?a[0]:void 0,c=typeof l<"u"?this.view.element(l):void 0,d=typeof l<"u"?this.view.domElement(l):this.view.domNode;return{index:l,element:c,anchor:d,browserEvent:s}})),o=Et.chain(this.view.onContextMenu,r=>r.filter(s=>!e).map(({element:s,index:a,browserEvent:l})=>({element:s,index:a,anchor:new Oa(pi(this.view.domNode),l),browserEvent:l})));return Et.any(t,n,o)}get onKeyDown(){return this.disposables.add(new _n(this.view.domNode,"keydown")).event}get onDidFocus(){return Et.signal(this.disposables.add(new _n(this.view.domNode,"focus",!0)).event)}constructor(e,t,n,o,r=lNt){var s,a,l,c;this.user=e,this._options=r,this.focus=new iS("focused"),this.anchor=new iS("anchor"),this.eventBufferer=new E3,this._ariaLabel="",this.disposables=new Ye,this._onDidDispose=new ge,this.onDidDispose=this._onDidDispose.event;let d=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(s=this._options.accessibilityProvider)===null||s===void 0?void 0:s.getWidgetRole():"list";this.selection=new p2e(d!=="listbox");let u=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=r.accessibilityProvider,this.accessibilityProvider&&(u.push(new b2e(this.accessibilityProvider)),(l=(a=this.accessibilityProvider).onDidChangeActiveDescendant)===null||l===void 0||l.call(a,this.onDidChangeActiveDescendant,this,this.disposables)),o=o.map(f=>new _2e(f.templateId,[...u,f]));let h={...r,dnd:r.dnd&&new y2e(this,r.dnd)};if(this.view=this.createListView(t,n,o,h),this.view.domNode.setAttribute("role",d),r.styleController)this.styleController=r.styleController(this.view.domId);else{let f=ya(this.view.domNode);this.styleController=new oN(f,this.view.domId)}if(this.spliceable=new QY([new iN(this.focus,this.view,r.identityProvider),new iN(this.selection,this.view,r.identityProvider),new iN(this.anchor,this.view,r.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new g2e(this,this.view)),(typeof r.keyboardSupport!="boolean"||r.keyboardSupport)&&(this.keyboardController=new iZ(this,this.view,r),this.disposables.add(this.keyboardController)),r.keyboardNavigationLabelProvider){let f=r.keyboardNavigationDelegate||sNt;this.typeNavigationController=new m2e(this,this.view,r.keyboardNavigationLabelProvider,(c=r.keyboardNavigationEventFilter)!==null&&c!==void 0?c:()=>!0,f),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(r),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,n,o){return new af(e,t,n,o)}createMouseController(e){return new nN(this)}updateOptions(e={}){var t,n;this._options={...this._options,...e},(t=this.typeNavigationController)===null||t===void 0||t.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),(n=this.keyboardController)===null||n===void 0||n.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,n=[]){if(e<0||e>this.view.length)throw new M2(this.user,`Invalid start index: ${e}`);if(t<0)throw new M2(this.user,`Invalid delete count: ${t}`);t===0&&n.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,n))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}indexAt(e){return this.view.indexAt(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(let n of e)if(n<0||n>=this.length)throw new M2(this.user,`Invalid index ${n}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(typeof e>"u"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new M2(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return vC(this.anchor.get(),void 0)}getAnchorElement(){let e=this.getAnchor();return typeof e>"u"?void 0:this.element(e)}setFocus(e,t){for(let n of e)if(n<0||n>=this.length)throw new M2(this.user,`Invalid index ${n}`);this.focus.set(e,t)}focusNext(e=1,t=!1,n,o){if(this.length===0)return;let r=this.focus.get(),s=this.findNextIndex(r.length>0?r[0]+e:0,t,o);s>-1&&this.setFocus([s],n)}focusPrevious(e=1,t=!1,n,o){if(this.length===0)return;let r=this.focus.get(),s=this.findPreviousIndex(r.length>0?r[0]-e:0,t,o);s>-1&&this.setFocus([s],n)}async focusNextPage(e,t){let n=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);n=n===0?0:n-1;let o=this.getFocus()[0];if(o!==n&&(o===void 0||n>o)){let r=this.findPreviousIndex(n,!1,t);r>-1&&o!==r?this.setFocus([r],e):this.setFocus([n],e)}else{let r=this.view.getScrollTop(),s=r+this.view.renderHeight;n>o&&(s-=this.view.elementHeight(n)),this.view.setScrollTop(s),this.view.getScrollTop()!==r&&(this.setFocus([]),await eh(0),await this.focusNextPage(e,t))}}async focusPreviousPage(e,t,n=()=>0){let o,r=n(),s=this.view.getScrollTop()+r;s===0?o=this.view.indexAt(s):o=this.view.indexAfter(s-1);let a=this.getFocus()[0];if(a!==o&&(a===void 0||a>=o)){let l=this.findNextIndex(o,!1,t);l>-1&&a!==l?this.setFocus([l],e):this.setFocus([o],e)}else{let l=s;this.view.setScrollTop(s-this.view.renderHeight-r),this.view.getScrollTop()+n()!==l&&(this.setFocus([]),await eh(0),await this.focusPreviousPage(e,t,n))}}focusLast(e,t){if(this.length===0)return;let n=this.findPreviousIndex(this.length-1,!1,t);n>-1&&this.setFocus([n],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,n){if(this.length===0)return;let o=this.findNextIndex(e,!1,n);o>-1&&this.setFocus([o],t)}findNextIndex(e,t=!1,n){for(let o=0;o=this.length&&!t)return-1;if(e=e%this.length,!n||n(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,n){for(let o=0;othis.view.element(e))}reveal(e,t,n=0){if(e<0||e>=this.length)throw new M2(this.user,`Invalid index ${e}`);let o=this.view.getScrollTop(),r=this.view.elementTop(e),s=this.view.elementHeight(e);if(zh(t)){let a=s-this.view.renderHeight+n;this.view.setScrollTop(a*Ml(t,0,1)+r-n)}else{let a=r+s,l=o+this.view.renderHeight;r=l||(r=l&&s>=this.view.renderHeight?this.view.setScrollTop(r-n):a>=l&&this.view.setScrollTop(a-this.view.renderHeight))}}getRelativeTop(e,t=0){if(e<0||e>=this.length)throw new M2(this.user,`Invalid index ${e}`);let n=this.view.getScrollTop(),o=this.view.elementTop(e),r=this.view.elementHeight(e);if(on+this.view.renderHeight)return null;let s=r-this.view.renderHeight+t;return Math.abs((n+t-o)/s)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(n=>this.view.element(n)),browserEvent:t}}_onFocusChange(){let e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;let t=this.focus.get();if(t.length>0){let n;!((e=this.accessibilityProvider)===null||e===void 0)&&e.getActiveDescendantId&&(n=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",n||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){let e=this.selection.get();this.view.domNode.classList.toggle("selection-none",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}};Wb([Tr],Nl.prototype,"onDidChangeFocus",null);Wb([Tr],Nl.prototype,"onDidChangeSelection",null);Wb([Tr],Nl.prototype,"onContextMenu",null);Wb([Tr],Nl.prototype,"onKeyDown",null);Wb([Tr],Nl.prototype,"onDidFocus",null)});var Ytt=P(()=>{});var Ub,Ztt,S2e,$b,Xtt=P(()=>{Qt();vp();Gl();VM();Gv();Vi();Xt();Bh();nt();Mn();Ytt();Wt();Ub=pt,Ztt="selectOption.entry.template",S2e=class{get templateId(){return Ztt}renderTemplate(e){let t=Object.create(null);return t.root=e,t.text=ut(e,Ub(".option-text")),t.detail=ut(e,Ub(".option-detail")),t.decoratorRight=ut(e,Ub(".option-decorator-right")),t}renderElement(e,t,n){let o=n,r=e.text,s=e.detail,a=e.decoratorRight,l=e.isDisabled;o.text.textContent=r,o.detail.textContent=s||"",o.decoratorRight.innerText=a||"",l?o.root.classList.add("option-disabled"):o.root.classList.remove("option-disabled")}disposeTemplate(e){}},$b=class i extends ue{constructor(e,t,n,o,r){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=o,this.selectBoxOptions=r||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=i.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new ge,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(n),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}getHeight(){return 22}getTemplateId(){return Ztt}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=pt(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=ut(this.selectDropDownContainer,Ub(".select-box-details-pane"));let t=ut(this.selectDropDownContainer,Ub(".select-box-dropdown-container-width-control")),n=ut(t,Ub(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",ut(n,this.widthControlElement),this._dropDownPosition=0,this.styleElement=ya(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(Xe(this.selectDropDownContainer,Lt.DRAG_START,o=>{nn.stop(o,!0)}))}registerListeners(){this._register(go(this.selectElement,"change",t=>{this.selected=t.target.selectedIndex,this._onDidSelect.fire({index:t.target.selectedIndex,selected:t.target.value}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)})),this._register(Xe(this.selectElement,Lt.CLICK,t=>{nn.stop(t),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(Xe(this.selectElement,Lt.MOUSE_DOWN,t=>{nn.stop(t)}));let e;this._register(Xe(this.selectElement,"touchstart",t=>{e=this._isVisible})),this._register(Xe(this.selectElement,"touchend",t=>{nn.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(Xe(this.selectElement,Lt.KEY_DOWN,t=>{let n=new qn(t),o=!1;Wi?(n.keyCode===18||n.keyCode===16||n.keyCode===10||n.keyCode===3)&&(o=!0):(n.keyCode===18&&n.altKey||n.keyCode===16&&n.altKey||n.keyCode===10||n.keyCode===3)&&(o=!0),o&&(this.showSelectDropDown(),nn.stop(t,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){uo(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((n,o)=>{this.selectElement.add(this.createOption(n.text,o,n.isDisabled)),typeof n.description=="string"&&(this._hasDetails=!0)})),t!==void 0&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){var e;(e=this.selectList)===null||e===void 0||e.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){let e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join(` +`)}styleSelectElement(){var e,t,n;let o=(e=this.styles.selectBackground)!==null&&e!==void 0?e:"",r=(t=this.styles.selectForeground)!==null&&t!==void 0?t:"",s=(n=this.styles.selectBorder)!==null&&n!==void 0?n:"";this.selectElement.style.backgroundColor=o,this.selectElement.style.color=r,this.selectElement.style.borderColor=s}styleList(){var e,t;let n=(e=this.styles.selectBackground)!==null&&e!==void 0?e:"",o=Gf(this.styles.selectListBackground,n);this.selectDropDownListContainer.style.backgroundColor=o,this.selectionDetailsPane.style.backgroundColor=o;let r=(t=this.styles.focusBorder)!==null&&t!==void 0?t:"";this.selectDropDownContainer.style.outlineColor=r,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,n){let o=document.createElement("option");return o.value=e,o.text=e,o.disabled=!!n,o}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{try{e.removeChild(this.selectDropDownContainer)}catch{}}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((t,n)=>{this.updateDetail(n),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");let t=pi(this.selectElement),n=Lo(this.selectElement),o=pi(this.selectElement).getComputedStyle(this.selectElement),r=parseFloat(o.getPropertyValue("--dropdown-padding-top"))+parseFloat(o.getPropertyValue("--dropdown-padding-bottom")),s=t.innerHeight-n.top-n.height-(this.selectBoxOptions.minBottomMargin||0),a=n.top-i.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,l=this.selectElement.offsetWidth,c=this.setWidthControlElement(this.widthControlElement),d=Math.max(c,Math.round(l)).toString()+"px";this.selectDropDownContainer.style.width=d,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let u=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());let h=this._hasDetails?this._cachedMaxDetailsHeight:0,f=u+r+h,p=Math.floor((s-r-h)/this.getHeight()),m=Math.floor((a-r-h)/this.getHeight());if(e)return n.top+n.height>t.innerHeight-22||n.topp&&this.options.length>p?(this._dropDownPosition=1,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(n.top+n.height>t.innerHeight-22||n.tops&&(u=p*this.getHeight())}else f>a&&(u=m*this.getHeight());return this.selectList.layout(u),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=u+r+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=u+r+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=d,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(e){let t=0;if(e){let n=0,o=0;this.options.forEach((r,s)=>{let a=r.detail?r.detail.length:0,l=r.decoratorRight?r.decoratorRight.length:0,c=r.text.length+a+l;c>o&&(n=s,o=c)}),e.textContent=this.options[n].text+(this.options[n].decoratorRight?this.options[n].decoratorRight+" ":""),t=wl(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=ut(e,Ub(".select-box-dropdown-list-container")),this.listRenderer=new S2e,this.selectList=new Nl("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:o=>{let r=o.text;return o.detail&&(r+=`. ${o.detail}`),o.decoratorRight&&(r+=`. ${o.decoratorRight}`),o.description&&(r+=`. ${o.description}`),r},getWidgetAriaLabel:()=>g({key:"selectBox",comment:["Behave like native select dropdown element."]},"Select Box"),getRole:()=>Wi?"":"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);let t=this._register(new _n(this.selectDropDownListContainer,"keydown")),n=Et.chain(t.event,o=>o.filter(()=>this.selectList.length>0).map(r=>new qn(r)));this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===3))(this.onEnter,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===2))(this.onEnter,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===9))(this.onEscape,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===16))(this.onUpArrow,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===18))(this.onDownArrow,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===12))(this.onPageDown,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===11))(this.onPageUp,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===14))(this.onHome,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode===13))(this.onEnd,this)),this._register(Et.chain(n,o=>o.filter(r=>r.keyCode>=21&&r.keyCode<=56||r.keyCode>=85&&r.keyCode<=113))(this.onCharacter,this)),this._register(Xe(this.selectList.getHTMLElement(),Lt.POINTER_UP,o=>this.onPointerUp(o))),this._register(this.selectList.onMouseOver(o=>typeof o.index<"u"&&this.selectList.setFocus([o.index]))),this._register(this.selectList.onDidChangeFocus(o=>this.onListFocus(o))),this._register(Xe(this.selectDropDownContainer,Lt.FOCUS_OUT,o=>{!this._isVisible||ms(o.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;nn.stop(e);let t=e.target;if(!t||t.classList.contains("slider"))return;let n=t.closest(".monaco-list-row");if(!n)return;let o=Number(n.getAttribute("data-index")),r=n.classList.contains("option-disabled");o>=0&&o{for(let s=0;sthis.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(nn.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){nn.stop(e),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(e){nn.stop(e),!(this.options.length<2)&&(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){nn.stop(e),!(this.options.length<2)&&(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){let t=ep.toString(e.keyCode),n=-1;for(let o=0;o{Qt();dh();Vi();Xt();nt();Mn();nZ=class extends ue{constructor(e,t,n,o){super(),this.selected=0,this.selectBoxOptions=o||Object.create(null),this.options=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=this._register(new ge),this.styles=n,this.registerListeners(),this.setOptions(e,t)}registerListeners(){this._register(ar.addTarget(this.selectElement)),[vo.Tap].forEach(e=>{this._register(Xe(this.selectElement,e,t=>{this.selectElement.focus()}))}),this._register(go(this.selectElement,"click",e=>{nn.stop(e,!0)})),this._register(go(this.selectElement,"change",e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),this._register(go(this.selectElement,"keydown",e=>{let t=!1;Wi?(e.keyCode===18||e.keyCode===16||e.keyCode===10)&&(t=!0):(e.keyCode===18&&e.altKey||e.keyCode===10||e.keyCode===3)&&(t=!0),t&&e.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){(!this.options||!uo(this.options,e))&&(this.options=e,this.selectElement.options.length=0,this.options.forEach((n,o)=>{this.selectElement.add(this.createOption(n.text,o,n.isDisabled))})),t!==void 0&&this.select(t)}select(e){this.options.length===0?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{});var oZ,eit=P(()=>{Xtt();Qtt();i1();Mn();Jtt();oZ=class extends Ds{constructor(e,t,n,o,r){super(),Wi&&!r?.useCustomDrawn?this.selectBoxDelegate=new nZ(e,t,o,r):this.selectBoxDelegate=new $b(e,t,n,o,r),this._register(this.selectBoxDelegate)}get onDidSelect(){return this.selectBoxDelegate.onDidSelect}setOptions(e,t){this.selectBoxDelegate.setOptions(e,t)}select(e){this.selectBoxDelegate.select(e)}focus(){this.selectBoxDelegate.focus()}blur(){this.selectBoxDelegate.blur()}setFocusable(e){this.selectBoxDelegate.setFocusable(e)}render(e){this.selectBoxDelegate.render(e)}}});var k2e=P(()=>{});var Rd,d1,rZ,jb=P(()=>{Xc();ZY();Qt();dh();l2e();eit();Ra();nt();Mn();ho();k2e();Wt();Rd=class extends ue{get action(){return this._action}constructor(e,t,n={}){super(),this.options=n,this._context=e||this,this._action=t,t instanceof zs&&this._register(t.onDidChange(o=>{this.element&&this.handleActionChangeEvent(o)}))}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new Qu)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){let t=this.element=e;this._register(ar.addTarget(e));let n=this.options&&this.options.draggable;n&&(e.draggable=!0,Aa&&this._register(Xe(e,Lt.DRAG_START,o=>{var r;return(r=o.dataTransfer)===null||r===void 0?void 0:r.setData(qv.TEXT,this._action.label)}))),this._register(Xe(t,vo.Tap,o=>this.onClick(o,!0))),this._register(Xe(t,Lt.MOUSE_DOWN,o=>{n||nn.stop(o,!0),this._action.enabled&&o.button===0&&t.classList.add("active")})),Wi&&this._register(Xe(t,Lt.CONTEXT_MENU,o=>{o.button===0&&o.ctrlKey===!0&&this.onClick(o)})),this._register(Xe(t,Lt.CLICK,o=>{nn.stop(o,!0),this.options&&this.options.isMenu||this.onClick(o)})),this._register(Xe(t,Lt.DBLCLICK,o=>{nn.stop(o,!0)})),[Lt.MOUSE_UP,Lt.MOUSE_OUT].forEach(o=>{this._register(Xe(t,o,r=>{nn.stop(r),t.classList.remove("active")}))})}onClick(e,t=!1){var n;nn.stop(e,!0);let o=kc(this._context)?!((n=this.options)===null||n===void 0)&&n.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,o)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}updateTooltip(){var e;if(!this.element)return;let t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.updateAriaLabel(),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(t):(this.customHover=XY(this.options.hoverDelegate,this.element,t),this._store.add(this.customHover))):this.element.title=t}updateAriaLabel(){var e;if(this.element){let t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.element.setAttribute("aria-label",t)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}},d1=class extends Rd{constructor(e,t,n){super(e,t,n),this.options=n,this.options.icon=n.icon!==void 0?n.icon:!1,this.options.label=n.label!==void 0?n.label:!0,this.cssClass=""}render(e){super.render(e),Bn(this.element);let t=document.createElement("a");if(t.classList.add("action-label"),t.setAttribute("role",this.getDefaultAriaRole()),this.label=t,this.element.appendChild(t),this.options.label&&this.options.keybinding){let n=document.createElement("span");n.classList.add("keybinding"),n.textContent=this.options.keybinding,this.element.appendChild(n)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===zr.ID?"presentation":this.options.isMenu?"menuitem":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=g({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):(e=this.label)===null||e===void 0||e.classList.remove("codicon")}updateEnabled(){var e,t;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),(e=this.element)===null||e===void 0||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),(t=this.element)===null||t===void 0||t.classList.add("disabled"))}updateAriaLabel(){var e;if(this.label){let t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.label.setAttribute("aria-label",t)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox")):(this.label.classList.remove("checked"),this.label.removeAttribute("aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}},rZ=class extends Rd{constructor(e,t,n,o,r,s,a){super(e,t),this.selectBox=new oZ(n,o,r,s,a),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect(e=>this.runAction(e.selected,e.index)))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){var e;(e=this.selectBox)===null||e===void 0||e.focus()}blur(){var e;(e=this.selectBox)===null||e===void 0||e.blur()}render(e){this.selectBox.render(e)}}});var L2e=P(()=>{});var E2e,sZ,tit=P(()=>{Qt();Gl();dh();Ra();Xt();L2e();E2e=class extends Qu{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new ge),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=ut(e,pt(".monaco-dropdown")),this._label=ut(this._element,pt(".dropdown-label"));let n=t.labelRenderer;n||(n=r=>(r.textContent=t.label||"",null));for(let r of[Lt.CLICK,Lt.MOUSE_DOWN,vo.Tap])this._register(Xe(this.element,r,s=>nn.stop(s,!0)));for(let r of[Lt.MOUSE_DOWN,vo.Tap])this._register(Xe(this._label,r,s=>{KC(s)&&(s.detail>1||s.button!==0)||(this.visible?this.hide():this.show())}));this._register(Xe(this._label,Lt.KEY_UP,r=>{let s=new qn(r);(s.equals(3)||s.equals(10))&&(nn.stop(r,!0),this.visible?this.hide():this.show())}));let o=n(this._label);o&&this._register(o),this._register(ar.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}},sZ=class extends E2e{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}});var Kv,D2e=P(()=>{Qt();jb();tit();Xt();L2e();Kv=class extends Rd{constructor(e,t,n,o=Object.create(null)){super(null,e,o),this.actionItem=null,this._onDidChangeVisibility=this._register(new ge),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=n,this.options=o,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;let t=r=>{this.element=ut(r,pt("a.action-label"));let s=[];return typeof this.options.classNames=="string"?s=this.options.classNames.split(/\s+/g).filter(a=>!!a):this.options.classNames&&(s=this.options.classNames),s.find(a=>a==="icon")||s.push("codicon"),this.element.classList.add(...s),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},n=Array.isArray(this.menuActionsOrProvider),o={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:n?this.menuActionsOrProvider:void 0,actionProvider:n?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new sZ(e,o)),this._register(this.dropdownMenu.onDidChangeVisibility(r=>{var s;(s=this.element)===null||s===void 0||s.setAttribute("aria-expanded",`${r}`),this._onDidChangeVisibility.fire(r)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){let r=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return r.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){var e;(e=this.dropdownMenu)===null||e===void 0||e.show()}updateEnabled(){var e,t;let n=!this.action.enabled;(e=this.actionItem)===null||e===void 0||e.classList.toggle("disabled",n),(t=this.element)===null||t===void 0||t.classList.toggle("disabled",n)}}});var iit=P(()=>{});function nit(i){return i?i.condition!==void 0:!1}var oit=P(()=>{});var qb,oS,Gb,rS,rit=P(()=>{Qi();Xt();nt();SY();ho();(function(i){i[i.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",i[i.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(qb||(qb={}));(function(i){i[i.None=0]="None",i[i.Initialized=1]="Initialized",i[i.Closed=2]="Closed"})(oS||(oS={}));Gb=class i extends ue{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new Pf),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=oS.None,this.cache=new Map,this.flushDelayer=this._register(new UC(i.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var t,n;this._onDidChangeStorage.pause();try{(t=e.changed)===null||t===void 0||t.forEach((o,r)=>this.acceptExternal(r,o)),(n=e.deleted)===null||n===void 0||n.forEach(o=>this.acceptExternal(o,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===oS.Closed)return;let n=!1;kc(t)?n=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),n=!0),n&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){let n=this.cache.get(e);return kc(n)?t:n}getBoolean(e,t){let n=this.get(e);return kc(n)?t:n==="true"}getNumber(e,t){let n=this.get(e);return kc(n)?t:parseInt(n,10)}async set(e,t,n=!1){if(this.state===oS.Closed)return;if(kc(t))return this.delete(e,n);let o=Gs(t)||Array.isArray(t)?stt(t):String(t);if(this.cache.get(e)!==o)return this.cache.set(e,o),this.pendingInserts.set(e,o),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:n}),this.doFlush()}async delete(e,t=!1){if(!(this.state===oS.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;let e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{var t;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(t=this.whenFlushedCallbacks.pop())===null||t===void 0||t()})}async doFlush(e){return this.options.hint===qb.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),e)}};Gb.DEFAULT_FLUSH_DELAY=100;rS=class{constructor(){this.onDidChangeItemsExternal=Et.None,this.items=new Map}async updateItems(e){var t,n;(t=e.insert)===null||t===void 0||t.forEach((o,r)=>this.items.set(r,o)),(n=e.delete)===null||n===void 0||n.forEach(o=>this.items.delete(o))}}});function uNt(i){let e=i.get(aZ);if(e)try{return JSON.parse(e)}catch{}return Object.create(null)}var aZ,nl,Yv,lZ,cZ,Hm=P(()=>{Xt();nt();ho();rit();_i();aZ="__$__targetStorageMarker",nl=vi("storageService");(function(i){i[i.NONE=0]="NONE",i[i.SHUTDOWN=1]="SHUTDOWN"})(Yv||(Yv={}));lZ=class i extends ue{constructor(e={flushInterval:i.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new Pf),this._onDidChangeTarget=this._register(new Pf),this._onWillSaveState=this._register(new ge),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,t,n){return Et.filter(this._onDidChangeValue.event,o=>o.scope===e&&(t===void 0||o.key===t),n)}emitDidChangeValue(e,t){let{key:n,external:o}=t;if(n===aZ){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:n,target:this.getKeyTargets(e)[n],external:o})}get(e,t,n){var o;return(o=this.getStorage(t))===null||o===void 0?void 0:o.get(e,n)}getBoolean(e,t,n){var o;return(o=this.getStorage(t))===null||o===void 0?void 0:o.getBoolean(e,n)}getNumber(e,t,n){var o;return(o=this.getStorage(t))===null||o===void 0?void 0:o.getNumber(e,n)}store(e,t,n,o,r=!1){if(kc(t)){this.remove(e,n,r);return}this.withPausedEmitters(()=>{var s;this.updateKeyTarget(e,n,o),(s=this.getStorage(n))===null||s===void 0||s.set(e,t,r)})}remove(e,t,n=!1){this.withPausedEmitters(()=>{var o;this.updateKeyTarget(e,t,void 0),(o=this.getStorage(t))===null||o===void 0||o.delete(e,n)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,n,o=!1){var r,s;let a=this.getKeyTargets(t);typeof n=="number"?a[e]!==n&&(a[e]=n,(r=this.getStorage(t))===null||r===void 0||r.set(aZ,JSON.stringify(a),o)):typeof a[e]=="number"&&(delete a[e],(s=this.getStorage(t))===null||s===void 0||s.set(aZ,JSON.stringify(a),o))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){let t=this.getStorage(e);return t?uNt(t):Object.create(null)}};lZ.DEFAULT_FLUSH_INTERVAL=60*1e3;cZ=class extends lZ{constructor(){super(),this.applicationStorage=this._register(new Gb(new rS,{hint:qb.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new Gb(new rS,{hint:qb.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new Gb(new rS,{hint:qb.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e)))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}});function hNt(i,e){let t={...e};for(let n in i){let o=i[n];t[n]=o!==void 0?ai(o):void 0}return t}function M4(i){return hNt(i,I4)}var sit,ait,lit,sS,TWi,IWi,aS,cit,dZ,MWi,I4,dit,uit,N4=P(()=>{pr();sa();sit={keybindingLabelBackground:ai(TYe),keybindingLabelForeground:ai(IYe),keybindingLabelBorder:ai(MYe),keybindingLabelBottomBorder:ai(NYe),keybindingLabelShadow:ai(Zh)},ait={buttonForeground:ai(Ew),buttonSeparator:ai(gYe),buttonBackground:ai(Dw),buttonHoverBackground:ai(vYe),buttonSecondaryForeground:ai(bYe),buttonSecondaryBackground:ai(hj),buttonSecondaryHoverBackground:ai(yYe),buttonBorder:ai(_Ye)},lit={progressBarBackground:ai(wYe)},sS={inputActiveOptionBorder:ai(Ww),inputActiveOptionForeground:ai(Uw),inputActiveOptionBackground:ai(Lm)},TWi={checkboxBackground:ai(uZe),checkboxBorder:ai(fZe),checkboxForeground:ai(hZe)},IWi={dialogBackground:ai(Fr),dialogForeground:ai(cp),dialogShadow:ai(Zh),dialogBorder:ai(Fn),errorIconForeground:ai(IZe),warningIconForeground:ai(MZe),infoIconForeground:ai(NZe),textLinkForeground:ai(rYe)},aS={inputBackground:ai(_j),inputForeground:ai(bj),inputBorder:ai(yj),inputValidationInfoBorder:ai(lYe),inputValidationInfoBackground:ai(sYe),inputValidationInfoForeground:ai(aYe),inputValidationWarningBorder:ai(uYe),inputValidationWarningBackground:ai(cYe),inputValidationWarningForeground:ai(dYe),inputValidationErrorBorder:ai(pYe),inputValidationErrorBackground:ai(hYe),inputValidationErrorForeground:ai(fYe)},cit={listFilterWidgetBackground:ai(oZe),listFilterWidgetOutline:ai(rZe),listFilterWidgetNoMatchesOutline:ai(sZe),listFilterWidgetShadow:ai(aZe),inputBoxStyles:aS,toggleStyles:sS},dZ={badgeBackground:ai(_I),badgeForeground:ai(CYe),badgeBorder:ai(Fn)},MWi={breadcrumbsBackground:ai(wZe),breadcrumbsForeground:ai(CZe),breadcrumbsHoverForeground:ai(l1e),breadcrumbsFocusForeground:ai(l1e),breadcrumbsFocusAndSelectionForeground:ai(xZe)},I4={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:ai(GYe),listFocusForeground:ai(KYe),listFocusOutline:ai(YYe),listActiveSelectionBackground:ai(o2),listActiveSelectionForeground:ai(Sm),listActiveSelectionIconForeground:ai(Aw),listFocusAndSelectionOutline:ai(ZYe),listFocusAndSelectionBackground:ai(o2),listFocusAndSelectionForeground:ai(Sm),listInactiveSelectionBackground:ai(XYe),listInactiveSelectionIconForeground:ai(JYe),listInactiveSelectionForeground:ai(QYe),listInactiveFocusBackground:ai(eZe),listInactiveFocusOutline:ai(tZe),listHoverBackground:ai(s1e),listHoverForeground:ai(a1e),listDropOverBackground:ai(iZe),listDropBetweenBackground:ai(nZe),listSelectionOutline:ai(Uo),listHoverOutline:ai(Uo),treeIndentGuidesStroke:ai(Rw),treeInactiveIndentGuidesStroke:ai(lZe),tableColumnsBorder:ai(cZe),tableOddRowsBackgroundColor:ai(dZe)};dit={selectBackground:ai(xm),selectListBackground:ai(mYe),selectForeground:ai(e2),decoratorRightForeground:ai(Cj),selectBorder:ai(cv),focusBorder:ai(fu),listFocusBackground:ai(s2),listInactiveSelectionIconForeground:ai(u4),listFocusForeground:ai(r2),listFocusOutline:nYe(Uo,it.transparent.toString()),listHoverBackground:ai(s1e),listHoverForeground:ai(a1e),listHoverOutline:ai(Uo),selectListBorder:ai(e1),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropOverBackground:void 0,listDropBetweenBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0},uit={shadowColor:ai(Zh),borderColor:ai(pZe),foregroundColor:ai(mZe),backgroundColor:ai(gZe),selectionForegroundColor:ai(vZe),selectionBackgroundColor:ai(_Ze),selectionBorderColor:ai(bZe),separatorColor:ai(yZe),scrollbarShadow:ai(Tw),scrollbarSliderBackground:ai(Iw),scrollbarSliderHoverBackground:ai(Mw),scrollbarSliderActiveBackground:ai(Nw)}});function hit(i,e,t,n){let o=i.getActions(e),r=Z0.getInstance(),s=r.keyStatus.altKey||(hr||Ar)&&r.keyStatus.shiftKey;fit(o,t,s,n?a=>a===n:a=>a==="navigation")}function lS(i,e,t,n,o,r){let s=i.getActions(e);fit(s,t,!1,typeof n=="string"?l=>l===n:n,o,r)}function fit(i,e,t,n=s=>s==="navigation",o=()=>!1,r=!1){let s,a;Array.isArray(e)?(s=e,a=e):(s=e.primary,a=e.secondary);let l=new Set;for(let[c,d]of i){let u;n(c)?(u=s,u.length>0&&r&&u.push(new zr)):(u=a,u.length>0&&u.push(new zr));for(let h of d){t&&(h=h instanceof ed&&h.alt?h.alt:h);let f=u.push(h);h instanceof Wf&&l.add({group:c,action:h,index:f-1})}}for(let{group:c,action:d,index:u}of l){let h=n(c)?s:a,f=d.actions;o(d,c,h.length)&&h.splice(u,1,...f)}}function pit(i,e,t){return e instanceof ed?i.createInstance(A4,e,t):e instanceof hm?e.item.isSelection?i.createInstance(M2e,e):e.item.rememberDefaultAction?i.createInstance(I2e,e,{...t,persistLastActionId:!0}):i.createInstance(T2e,e,t):void 0}var uZ,bu,A4,T2e,I2e,M2e,Kb=P(()=>{Qt();Gl();jb();D2e();Ra();PY();nt();Mn();iit();Wt();Dr();oit();Xi();Id();_i();vs();ic();Hm();No();or();fp();ho();pr();N4();Yh();uZ=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},bu=function(i,e){return function(t,n){e(t,n,i)}};A4=class extends d1{constructor(e,t,n,o,r,s,a,l){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:t?.draggable,keybinding:t?.keybinding,hoverDelegate:t?.hoverDelegate}),this._keybindingService=n,this._notificationService=o,this._contextKeyService=r,this._themeService=s,this._contextMenuService=a,this._accessibilityService=l,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new To),this._altKey=Z0.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){e.preventDefault(),e.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(t){this._notificationService.error(t)}}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1,n=()=>{var o;let r=!!(!((o=this._menuItemAction.alt)===null||o===void 0)&&o.enabled)&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);r!==this._wantsAltCommand&&(this._wantsAltCommand=r,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(n)),this._register(Xe(e,"mouseleave",o=>{t=!1,n()})),this._register(Xe(e,"mouseenter",o=>{t=!0,n()})),n()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var e;let t=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),n=t&&t.getLabel(),o=this._commandAction.tooltip||this._commandAction.label,r=n?g("titleAndKb","{0} ({1})",o,n):o;if(!this._wantsAltCommand&&(!((e=this._menuItemAction.alt)===null||e===void 0)&&e.enabled)){let s=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,a=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),l=a&&a.getLabel(),c=l?g("titleAndKb","{0} ({1})",s,l):s;r=g("titleAndKbAndAlt",`{0} +[{1}] {2}`,r,Gx.modifierLabels[Xa].altKey,c)}return r}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;let{element:t,label:n}=this;if(!t||!n)return;let o=this._commandAction.checked&&nit(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(o)if(ui.isThemeIcon(o)){let r=ui.asClassNameArray(o);n.classList.add(...r),this._itemClassDispose.value=Yt(()=>{n.classList.remove(...r)})}else n.style.backgroundImage=a2(this._themeService.getColorTheme().type)?rp(o.dark):rp(o.light),n.classList.add("icon"),this._itemClassDispose.value=vl(Yt(()=>{n.style.backgroundImage="",n.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};A4=uZ([bu(2,fn),bu(3,xo),bu(4,ri),bu(5,Mo),bu(6,ca),bu(7,Ba)],A4);T2e=class extends Kv{constructor(e,t,n,o,r){var s,a,l;let c={...t,menuAsChild:(s=t?.menuAsChild)!==null&&s!==void 0?s:!1,classNames:(a=t?.classNames)!==null&&a!==void 0?a:ui.isThemeIcon(e.item.icon)?ui.asClassName(e.item.icon):void 0,keybindingProvider:(l=t?.keybindingProvider)!==null&&l!==void 0?l:d=>n.lookupKeybinding(d.id)};super(e,{getActions:()=>e.actions},o,c),this._keybindingService=n,this._contextMenuService=o,this._themeService=r}render(e){super.render(e),Bn(this.element),e.classList.add("menu-entry");let t=this._action,{icon:n}=t.item;if(n&&!ui.isThemeIcon(n)){this.element.classList.add("icon");let o=()=>{this.element&&(this.element.style.backgroundImage=a2(this._themeService.getColorTheme().type)?rp(n.dark):rp(n.light))};o(),this._register(this._themeService.onDidColorThemeChange(()=>{o()}))}}};T2e=uZ([bu(2,fn),bu(3,ca),bu(4,Mo)],T2e);I2e=class extends Rd{constructor(e,t,n,o,r,s,a,l){var c,d,u;super(null,e),this._keybindingService=n,this._notificationService=o,this._contextMenuService=r,this._menuService=s,this._instaService=a,this._storageService=l,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let h,f=t?.persistLastActionId?l.get(this._storageKey,1):void 0;f&&(h=e.actions.find(m=>f===m.id)),h||(h=e.actions[0]),this._defaultAction=this._instaService.createInstance(A4,h,{keybinding:this._getDefaultActionKeybindingLabel(h)});let p={keybindingProvider:m=>this._keybindingService.lookupKeybinding(m.id),...t,menuAsChild:(c=t?.menuAsChild)!==null&&c!==void 0?c:!0,classNames:(d=t?.classNames)!==null&&d!==void 0?d:["codicon","codicon-chevron-down"],actionRunner:(u=t?.actionRunner)!==null&&u!==void 0?u:new Qu};this._dropdown=new Kv(e,e.actions,this._contextMenuService,p),this._register(this._dropdown.actionRunner.onDidRun(m=>{m.action instanceof ed&&this.update(m.action)}))}update(e){var t;!((t=this._options)===null||t===void 0)&&t.persistLastActionId&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(A4,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends Qu{async runAction(n,o){await n.run(void 0)}},this._container&&this._defaultAction.render(ZC(this._container,pt(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let n;if(!((t=this._options)===null||t===void 0)&&t.renderKeybindingWithDefaultActionLabel){let o=this._keybindingService.lookupKeybinding(e.id);o&&(n=`(${o.getLabel()})`)}return n}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");let t=pt(".action-container");this._defaultAction.render(ut(this._container,t)),this._register(Xe(t,Lt.KEY_DOWN,o=>{let r=new qn(o);r.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),r.stopPropagation())}));let n=pt(".dropdown-action-container");this._dropdown.render(ut(this._container,n)),this._register(Xe(n,Lt.KEY_DOWN,o=>{var r;let s=new qn(o);s.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(r=this._defaultAction.element)===null||r===void 0||r.focus(),s.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};I2e=uZ([bu(2,fn),bu(3,xo),bu(4,ca),bu(5,Mc),bu(6,qt),bu(7,nl)],I2e);M2e=class extends rZ{constructor(e,t){super(null,e,e.actions.map(n=>({text:n.id===zr.ID?"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500":n.label,isDisabled:!n.enabled})),0,t,dit,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex(n=>n.checked)))}render(e){super.render(e),e.style.borderColor=ai(cv)}runAction(e,t){let n=this.action.actions[t];n&&this.actionRunner.run(n)}};M2e=uZ([bu(1,Pc)],M2e)});var Bs,u1=P(()=>{Qt();Gl();jb();Ra();Xt();nt();ho();k2e();Bs=class extends ue{constructor(e,t={}){var n,o,r,s,a,l;super(),this._actionRunnerDisposables=this._register(new Ye),this.viewItemDisposables=this._register(new L3),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new ge),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new ge({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new ge),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new ge),this.onWillRun=this._onWillRun.event,this.options=t,this._context=(n=t.context)!==null&&n!==void 0?n:null,this._orientation=(o=this.options.orientation)!==null&&o!==void 0?o:0,this._triggerKeys={keyDown:(s=(r=this.options.triggerKeys)===null||r===void 0?void 0:r.keyDown)!==null&&s!==void 0?s:!1,keys:(l=(a=this.options.triggerKeys)===null||a===void 0?void 0:a.keys)!==null&&l!==void 0?l:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new Qu,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(u=>this._onDidRun.fire(u))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(u=>this._onWillRun.fire(u))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",t.animated!==!1&&this.domNode.classList.add("animated");let c,d;switch(this._orientation){case 0:c=[15],d=[17];break;case 1:c=[16],d=[18],this.domNode.className+=" vertical";break}this._register(Xe(this.domNode,Lt.KEY_DOWN,u=>{let h=new qn(u),f=!0,p=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;c&&(h.equals(c[0])||h.equals(c[1]))?f=this.focusPrevious():d&&(h.equals(d[0])||h.equals(d[1]))?f=this.focusNext():h.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():h.equals(14)?f=this.focusFirst():h.equals(13)?f=this.focusLast():h.equals(2)&&p instanceof Rd&&p.trapsArrowNavigation?f=this.focusNext():this.isTriggerKeyEvent(h)?this._triggerKeys.keyDown?this.doTrigger(h):this.triggerKeyDown=!0:f=!1,f&&(h.preventDefault(),h.stopPropagation())})),this._register(Xe(this.domNode,Lt.KEY_UP,u=>{let h=new qn(u);this.isTriggerKeyEvent(h)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(h)),h.preventDefault(),h.stopPropagation()):(h.equals(2)||h.equals(1026)||h.equals(16)||h.equals(18)||h.equals(15)||h.equals(17))&&this.updateFocusedItem()})),this.focusTracker=this._register(Kl(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(gs()===this.domNode||!ms(gs(),this.domNode))&&(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){let t=this.viewItems.find(n=>n instanceof Rd&&n.isEnabled());t instanceof Rd&&t.setFocusable(!0)}else this.viewItems.forEach(t=>{t instanceof Rd&&t.setFocusable(!1)})}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(n=>{t=t||e.equals(n)}),t}updateFocusedItem(){var e,t;for(let n=0;nt.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(t=>this._onDidRun.fire(t))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(t=>this._onWillRun.fire(t))),this.viewItems.forEach(t=>t.actionRunner=e)}getContainer(){return this.domNode}getAction(e){var t;if(typeof e=="number")return(t=this.viewItems[e])===null||t===void 0?void 0:t.action;if(e instanceof HTMLElement){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let n=0;n{let s=document.createElement("li");s.className="action-item",s.setAttribute("role","presentation");let a,l={hoverDelegate:this.options.hoverDelegate,...t};this.options.actionViewItemProvider&&(a=this.options.actionViewItemProvider(r,l)),a||(a=new d1(this.context,r,l)),this.options.allowContextMenu||this.viewItemDisposables.set(a,Xe(s,Lt.CONTEXT_MENU,c=>{nn.stop(c,!0)})),a.actionRunner=this._actionRunner,a.setActionContext(this.context),a.render(s),this.focusable&&a instanceof Rd&&this.viewItems.length===0&&a.setFocusable(!0),o===null||o<0||o>=this.actionsList.children.length?(this.actionsList.appendChild(s),this.viewItems.push(a)):(this.actionsList.insertBefore(s,this.actionsList.children[o]),this.viewItems.splice(o,0,a),o++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=Nn(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),is(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(e){let t=!1,n;if(e===void 0?t=!0:typeof e=="number"?n=e:typeof e=="boolean"&&(t=e),t&&typeof this.focusedItem>"u"){let o=this.viewItems.findIndex(r=>r.isEnabled());this.focusedItem=o===-1?void 0:o,this.updateFocus(void 0,void 0,!0)}else n!==void 0&&(this.focusedItem=n),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;let t=this.focusedItem,n;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,n=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===zr.ID));return this.updateFocus(),!0}focusPrevious(e){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;let t=this.focusedItem,n;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}n=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===zr.ID));return this.updateFocus(!0),!0}updateFocus(e,t,n=!1){var o,r;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((o=this.viewItems[this.previouslyFocusedItem])===null||o===void 0||o.blur());let s=this.focusedItem!==void 0?this.viewItems[this.focusedItem]:void 0;if(s){let a=!0;_3(s.focus)||(a=!1),this.options.focusOnlyEnabledItems&&_3(s.isEnabled)&&!s.isEnabled()&&(a=!1),s.action.id===zr.ID&&(a=!1),a?(n||this.previouslyFocusedItem!==this.focusedItem)&&(s.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0),a&&((r=s.showHover)===null||r===void 0||r.call(s))}}doTrigger(e){if(typeof this.focusedItem>"u")return;let t=this.viewItems[this.focusedItem];if(t instanceof Rd){let n=t._context===null||t._context===void 0?e:t._context;this.run(t._action,n)}}async run(e,t){await this._actionRunner.run(e,t)}dispose(){this._context=void 0,this.viewItems=Nn(this.viewItems),this.getContainer().remove(),super.dispose()}}});function fNt(i){let e=A2e,t=e.exec(i);if(!t)return i;let n=!t[1];return i.replace(e,n?"$2$3":"").trim()}function mit(i){let e=hW()[i.id];return`.codicon-${i.id}:before { content: '\\${e.toString(16)}'; }`}function pNt(i,e){let t=` .monaco-menu { font-size: 13px; border-radius: 5px; @@ -619,47 +619,47 @@ ${mit(kt.menuSubmenu)} .monaco-scrollable-element > .scrollbar > .slider.active { background: ${s}; } - `)}return t}var A2e,N2e,cZ,aN,dZ,uZ,hZ,git=P(()=>{Xc();dh();Qt();Gl();Uh();u1();jb();o2e();o1();Ra();Qi();Go();or();Ob();nt();Mn();Ri();A2e=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,N2e=/(&)?(&)([^\s&])/g;(function(i){i[i.Right=0]="Right",i[i.Left=1]="Left"})(cZ||(cZ={}));aN=class i extends Bs{constructor(e,t,n,o){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");let r=document.createElement("div");r.classList.add("monaco-menu"),r.setAttribute("role","presentation"),super(r,{orientation:1,actionViewItemProvider:c=>this.doGetActionViewItem(c,n,s),context:n.context,actionRunner:n.actionRunner,ariaLabel:n.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Wi||Ar?[10]:[]],keyDown:!0}}),this.menuStyles=o,this.menuElement=r,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,o),this._register(ar.addTarget(r)),this._register(Xe(r,Lt.KEY_DOWN,c=>{new qn(c).equals(2)&&c.preventDefault()})),n.enableMnemonics&&this._register(Xe(r,Lt.KEY_DOWN,c=>{let d=c.key.toLocaleLowerCase();if(this.mnemonics.has(d)){nn.stop(c,!0);let u=this.mnemonics.get(d);if(u.length===1&&(u[0]instanceof uZ&&u[0].container&&this.focusItemByElement(u[0].container),u[0].onClick(c)),u.length>1){let h=u.shift();h&&h.container&&(this.focusItemByElement(h.container),u.push(h)),this.mnemonics.set(d,u)}}})),Ar&&this._register(Xe(r,Lt.KEY_DOWN,c=>{let d=new qn(c);d.equals(14)||d.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),nn.stop(c,!0)):(d.equals(13)||d.equals(12))&&(this.focusedItem=0,this.focusPrevious(),nn.stop(c,!0))})),this._register(Xe(this.domNode,Lt.MOUSE_OUT,c=>{let d=c.relatedTarget;ms(d,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),c.stopPropagation())})),this._register(Xe(this.actionsList,Lt.MOUSE_OVER,c=>{let d=c.target;if(!(!d||!ms(d,this.actionsList)||d===this.actionsList)){for(;d.parentElement!==this.actionsList&&d.parentElement!==null;)d=d.parentElement;if(d.classList.contains("action-item")){let u=this.focusedItem;this.setFocusedItem(d),u!==this.focusedItem&&this.updateFocus()}}})),this._register(ar.addTarget(this.actionsList)),this._register(Xe(this.actionsList,vo.Tap,c=>{let d=c.initialTarget;if(!(!d||!ms(d,this.actionsList)||d===this.actionsList)){for(;d.parentElement!==this.actionsList&&d.parentElement!==null;)d=d.parentElement;if(d.classList.contains("action-item")){let u=this.focusedItem;this.setFocusedItem(d),u!==this.focusedItem&&this.updateFocus()}}}));let s={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new gp(r,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));let a=this.scrollableElement.getDomNode();a.style.position="",this.styleScrollElement(a,o),this._register(Xe(r,vo.Change,c=>{nn.stop(c,!0);let d=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:d-c.translationY})})),this._register(Xe(a,Lt.MOUSE_UP,c=>{c.preventDefault()}));let l=pi(e);r.style.maxHeight=`${Math.max(10,l.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter((c,d)=>{var u;return!((u=n.submenuIds)===null||u===void 0)&&u.has(c.id)?(console.warn(`Found submenu cycle: ${c.id}`),!1):!(c instanceof zr&&(d===t.length-1||d===0||t[d-1]instanceof zr))}),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(c=>!(c instanceof hZ)).forEach((c,d,u)=>{c.updatePositionInSet(d+1,u.length)})}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(k5(e)?this.styleSheet=ya(e):(i.globalStyleSheet||(i.globalStyleSheet=ya()),this.styleSheet=i.globalStyleSheet)),this.styleSheet.textContent=pNt(t,k5(e))}styleScrollElement(e,t){var n,o;let r=(n=t.foregroundColor)!==null&&n!==void 0?n:"",s=(o=t.backgroundColor)!==null&&o!==void 0?o:"",a=t.borderColor?`1px solid ${t.borderColor}`:"",l="5px",c=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=a,e.style.borderRadius=l,e.style.color=r,e.style.backgroundColor=s,e.style.boxShadow=c}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){let t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register(Xe(this.element,Lt.MOUSE_UP,r=>{if(nn.stop(r,!0),Aa){if(new Oa(pi(this.element),r).rightButton)return;this.onClick(r)}else setTimeout(()=>{this.onClick(r)},0)})),this._register(Xe(this.element,Lt.CONTEXT_MENU,r=>{nn.stop(r,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=ut(this.element,pt("a.action-menu-item")),this._action.id===zr.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=ut(this.item,pt("span.menu-item-check"+ui.asCSSSelector(kt.menuSelection))),this.check.setAttribute("role","none"),this.label=ut(this.item,pt("span.action-label")),this.options.label&&this.options.keybinding&&(ut(this.item,pt("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var e;super.focus(),(e=this.item)===null||e===void 0||e.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){var e;if(this.label&&this.options.label){is(this.label);let t=Vx(this.action.label);if(t){let n=fNt(t);this.options.enableMnemonics||(t=n),this.label.setAttribute("aria-label",n.replace(/&&/g,"&"));let o=A2e.exec(t);if(o){t=p5(t),N2e.lastIndex=0;let r=N2e.exec(t);for(;r&&r[1];)r=N2e.exec(t);let s=a=>a.replace(/&&/g,"&");r?this.label.append(q0(s(t.substr(0,r.index))," "),pt("u",{"aria-hidden":"true"},r[3]),Hue(s(t.substr(r.index+r[0].length))," ")):this.label.innerText=s(t).trim(),(e=this.item)===null||e===void 0||e.setAttribute("aria-keyshortcuts",(o[1]?o[1]:o[3]).toLocaleLowerCase())}else this.label.innerText=t.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;let e=this.action.checked;this.item.classList.toggle("checked",!!e),e!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){let e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,n=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,o=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",r=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=t??"",this.item.style.backgroundColor=n??"",this.item.style.outline=o,this.item.style.outlineOffset=r),this.check&&(this.check.style.color=t??"")}},uZ=class extends dZ{constructor(e,t,n,o,r){super(e,e,o,r),this.submenuActions=t,this.parentData=n,this.submenuOptions=o,this.mysubmenu=null,this.submenuDisposables=this._register(new Ye),this.mouseOver=!1,this.expandDirection=o&&o.expandDirection!==void 0?o.expandDirection:cZ.Right,this.showScheduler=new hn(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new hn(()=>{this.element&&!ms(gs(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=ut(this.item,pt("span.submenu-indicator"+ui.asCSSSelector(kt.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(Xe(this.element,Lt.KEY_UP,t=>{let n=new qn(t);(n.equals(17)||n.equals(3))&&(nn.stop(t,!0),this.createSubmenu(!0))})),this._register(Xe(this.element,Lt.KEY_DOWN,t=>{let n=new qn(t);gs()===this.item&&(n.equals(17)||n.equals(3))&&nn.stop(t,!0)})),this._register(Xe(this.element,Lt.MOUSE_OVER,t=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(Xe(this.element,Lt.MOUSE_LEAVE,t=>{this.mouseOver=!1})),this._register(Xe(this.element,Lt.FOCUS_OUT,t=>{this.element&&!ms(gs(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(e){nn.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,n,o){let r={top:0,left:0};return r.left=Bb(e.width,t.width,{position:o===cZ.Right?0:1,offset:n.left,size:n.width}),r.left>=n.left&&r.left{new qn(d).equals(15)&&(nn.stop(d,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(Xe(this.submenuContainer,Lt.KEY_DOWN,d=>{new qn(d).equals(15)&&nn.stop(d,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&((t=this.item)===null||t===void 0||t.setAttribute("aria-expanded",e))}applyStyle(){super.applyStyle();let t=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}},hZ=class extends d1{constructor(e,t,n,o){super(e,t,n),this.menuStyles=o}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}});var fZ,vit=P(()=>{Qt();Uh();git();Ra();Pi();nt();N4();fZ=class{constructor(e,t,n,o){this.contextViewService=e,this.telemetryService=t,this.notificationService=n,this.keybindingService=o,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){let t=e.getActions();if(!t.length)return;this.focusToReturn=gs();let n,o=e.domForShadowRoot instanceof HTMLElement?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:r=>{var s;this.lastContainer=r;let a=e.getMenuClassName?e.getMenuClassName():"";a&&(r.className+=" "+a),this.options.blockMouse&&(this.block=r.appendChild(pt(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(s=this.blockDisposable)===null||s===void 0||s.dispose(),this.blockDisposable=Xe(this.block,Lt.MOUSE_DOWN,u=>u.stopPropagation()));let l=new Ye,c=e.actionRunner||new Qu;c.onWillRun(u=>this.onActionRun(u,!e.skipTelemetry),this,l),c.onDidRun(this.onDidActionRun,this,l),n=new aN(r,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:c,getKeyBinding:e.getKeyBinding?e.getKeyBinding:u=>this.keybindingService.lookupKeybinding(u.id)},uit),n.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,l),n.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,l);let d=pi(r);return l.add(Xe(d,Lt.BLUR,()=>this.contextViewService.hideContextView(!0))),l.add(Xe(d,Lt.MOUSE_DOWN,u=>{if(u.defaultPrevented)return;let h=new Oa(d,u),f=h.target;if(!h.rightButton){for(;f;){if(f===r)return;f=f.parentElement}this.contextViewService.hideContextView(!0)}})),vl(l,n)},focus:()=>{n?.focus(!!e.autoSelectFirstItem)},onHide:r=>{var s,a,l;(s=e.onHide)===null||s===void 0||s.call(e,!!r),this.block&&(this.block.remove(),this.block=null),(a=this.blockDisposable)===null||a===void 0||a.dispose(),this.blockDisposable=null,this.lastContainer&&(gs()===this.lastContainer||ms(gs(),this.lastContainer))&&((l=this.focusToReturn)===null||l===void 0||l.focus()),this.lastContainer=null}},o,!!o)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!jl(e.error)&&this.notificationService.error(e.error)}}});var mNt,cS,pZ,R2e,_it=P(()=>{Qt();Ra();Xt();nt();Kb();Dr();Xi();vs();ic();$f();vit();Id();mNt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},cS=function(i,e){return function(t,n){e(t,n,i)}},pZ=class extends ue{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new fZ(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,n,o,r,s){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=n,this.keybindingService=o,this.menuService=r,this.contextKeyService=s,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new ge),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new ge)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=R2e.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:t=>{var n;(n=e.onHide)===null||n===void 0||n.call(e,t),this._onDidHideContextMenu.fire()}}),Z0.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};pZ=mNt([cS(0,Fs),cS(1,xo),cS(2,Pc),cS(3,fn),cS(4,Mc),cS(5,ri)],pZ);(function(i){function e(n){return n&&n.menuId instanceof ne}function t(n,o,r){if(!e(n))return n;let{menuId:s,menuActionOptions:a,contextKeyService:l}=n;return{...n,getActions:()=>{let c=[];if(s){let d=o.createMenu(s,l??r);hit(d,a,c),d.dispose()}return n.getActions?zr.join(n.getActions(),c):c}}}i.transform=t})(R2e||(R2e={}))});var lN,bit=P(()=>{(function(i){i[i.API=0]="API",i[i.USER=1]="USER"})(lN||(lN={}))});var z2e,mZ,P2e,O2e,gZ,yit=P(()=>{Qt();_l();mo();Hh();od();CY();Nc();ec();Io();fs();$o();bit();sd();z2e=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},mZ=function(i,e){return function(t,n){e(t,n,i)}},P2e=class{constructor(e){this._commandService=e}async open(e,t){if(!PT(e,$i.command))return!1;if(!t?.allowCommands||(typeof e=="string"&&(e=li.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path)))return!0;let n=[];try{n=BM(decodeURIComponent(e.query))}catch{try{n=BM(e.query)}catch{}}return Array.isArray(n)||(n=[n]),await this._commandService.executeCommand(e.path,...n),!0}};P2e=z2e([mZ(0,eo)],P2e);O2e=class{constructor(e){this._editorService=e}async open(e,t){typeof e=="string"&&(e=li.parse(e));let{selection:n,uri:o}=Met(e);return e=o,e.scheme===$i.file&&(e=oJe(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:n,source:t?.fromUserGesture?lN.USER:lN.API,...t?.editorOptions}},this._editorService.getFocusedCodeEditor(),t?.openToSide),!0}};O2e=z2e([mZ(0,tn)],O2e);gZ=class{constructor(e,t){this._openers=new $r,this._validators=new $r,this._resolvers=new $r,this._resolvedUriTargets=new rs(n=>n.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new $r,this._defaultExternalOpener={openExternal:async n=>(mhe(n,$i.http,$i.https)?n$(n):Hn.location.href=n,!0)},this._openers.push({open:async(n,o)=>o?.openExternal||mhe(n,$i.mailto,$i.http,$i.https,$i.vsls)?(await this._doOpenExternal(n,o),!0):!1}),this._openers.push(new P2e(t)),this._openers.push(new O2e(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}async open(e,t){var n;let o=typeof e=="string"?li.parse(e):e,r=(n=this._resolvedUriTargets.get(o))!==null&&n!==void 0?n:e;for(let s of this._validators)if(!await s.shouldOpen(r,t))return!1;for(let s of this._openers)if(await s.open(e,t))return!0;return!1}async resolveExternalUri(e,t){for(let n of this._resolvers)try{let o=await n.resolveExternalUri(e,t);if(o)return this._resolvedUriTargets.has(o.resolved)||this._resolvedUriTargets.set(o.resolved,e),o}catch{}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,t){let n=typeof e=="string"?li.parse(e):e,o;try{o=(await this.resolveExternalUri(n,t)).resolved}catch{o=n}let r;if(typeof e=="string"&&n.toString()===o.toString()?r=e:r=encodeURI(o.toString(!0)),t?.allowContributedOpeners){let s=typeof t?.allowContributedOpeners=="string"?t?.allowContributedOpeners:void 0;for(let a of this._externalOpeners)if(await a.openExternal(r,{sourceUri:n,preferredOpenerId:s},Fi.None))return!0}return this._defaultExternalOpener.openExternal(r,{sourceUri:n},Fi.None)}dispose(){this._validators.clear()}};gZ=z2e([mZ(0,tn),mZ(1,eo)],gZ)});var Oc,Yv=P(()=>{_i();Oc=vi("editorWorkerService")});var _r,cN,yu,A2=P(()=>{C4();Wt();_i();(function(i){i[i.Hint=1]="Hint",i[i.Info=2]="Info",i[i.Warning=4]="Warning",i[i.Error=8]="Error"})(_r||(_r={}));(function(i){function e(s,a){return a-s}i.compare=e;let t=Object.create(null);t[i.Error]=g("sev.error","Error"),t[i.Warning]=g("sev.warning","Warning"),t[i.Info]=g("sev.info","Info");function n(s){return t[s]||""}i.toString=n;function o(s){switch(s){case lr.Error:return i.Error;case lr.Warning:return i.Warning;case lr.Info:return i.Info;case lr.Ignore:return i.Hint}}i.fromSeverity=o;function r(s){switch(s){case i.Error:return lr.Error;case i.Warning:return lr.Warning;case i.Info:return lr.Info;case i.Hint:return lr.Ignore}}i.toSeverity=r})(_r||(_r={}));(function(i){let e="";function t(o){return n(o,!0)}i.makeKey=t;function n(o,r){let s=[e];return o.source?s.push(o.source.replace("\xA6","\\\xA6")):s.push(e),o.code?typeof o.code=="string"?s.push(o.code.replace("\xA6","\\\xA6")):s.push(o.code.value.replace("\xA6","\\\xA6")):s.push(e),o.severity!==void 0&&o.severity!==null?s.push(_r.toString(o.severity)):s.push(e),o.message&&r?s.push(o.message.replace("\xA6","\\\xA6")):s.push(e),o.startLineNumber!==void 0&&o.startLineNumber!==null?s.push(o.startLineNumber.toString()):s.push(e),o.startColumn!==void 0&&o.startColumn!==null?s.push(o.startColumn.toString()):s.push(e),o.endLineNumber!==void 0&&o.endLineNumber!==null?s.push(o.endLineNumber.toString()):s.push(e),o.endColumn!==void 0&&o.endColumn!==null?s.push(o.endColumn.toString()):s.push(e),s.push(e),s.join("\xA6")}i.makeKeyOptionalMessage=n})(cN||(cN={}));yu=vi("markerService")});function Cit(i,e){let t=[],n=[];for(let o of i)e.has(o)||t.push(o);for(let o of e)i.has(o)||n.push(o);return{removed:t,added:n}}function wit(i,e){let t=new Set;for(let n of e)i.has(n)&&t.add(n);return t}var F2e=P(()=>{});var gNt,xit,vZ,H2e,Sit=P(()=>{A2();nt();Ca();No();r1();Dc();Kt();Nc();Xt();pr();od();F2e();gNt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},xit=function(i,e){return function(t,n){e(t,n,i)}},vZ=class extends ue{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new ge),this._markerDecorations=new rs,e.getModels().forEach(n=>this._onModelAdded(n)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){let n=this._markerDecorations.get(e);return n&&n.getMarker(t)||null}_handleMarkerChange(e){e.forEach(t=>{let n=this._markerDecorations.get(t);n&&this._updateDecorations(n)})}_onModelAdded(e){let t=new H2e(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){var t;let n=this._markerDecorations.get(e.uri);n&&(n.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===$i.inMemory||e.uri.scheme===$i.internal||e.uri.scheme===$i.vscode)&&((t=this._markerService)===null||t===void 0||t.read({resource:e.uri}).map(o=>o.owner).forEach(o=>this._markerService.remove(o,[e.uri])))}_updateDecorations(e){let t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};vZ=gNt([xit(0,no),xit(1,yu)],vZ);H2e=class extends ue{constructor(e){super(),this.model=e,this._map=new q$,this._register(Yt(()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()}))}update(e){let{added:t,removed:n}=Cit(new Set(this._map.keys()),new Set(e));if(t.length===0&&n.length===0)return!1;let o=n.map(a=>this._map.get(a)),r=t.map(a=>({range:this._createDecorationRange(this.model,a),options:this._createDecorationOption(a)})),s=this.model.deltaDecorations(o,r);for(let a of n)this._map.delete(a);for(let a=0;a=o)return n;let r=e.getWordAtPosition(n.getStartPosition());r&&(n=new O(n.startLineNumber,r.startColumn,n.endLineNumber,r.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&t.startColumn===1&&n.startLineNumber===n.endLineNumber){let o=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);o=0:!1}}});function Yb(i){return i.toString()}var vNt,dN,dS,B2e,_Nt,V2e,uN,_Z,kit=P(()=>{Xt();nt();Mn();ea();eT();Zf();Ha();aI();er();yM();W3();$pe();Nc();Gc();Kr();vNt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},dN=function(i,e){return function(t,n){e(t,n,i)}};B2e=class{constructor(e,t,n){this.model=e,this._modelEventListeners=new Ye,this.model=e,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(o=>n(e,o)))}dispose(){this._modelEventListeners.dispose()}},_Nt=Ar||Wi?1:2,V2e=class{constructor(e,t,n,o,r,s,a,l){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=n,this.sharesUndoRedoStack=o,this.heapSize=r,this.sha1=s,this.versionId=a,this.alternativeVersionId=l}},uN=dS=class extends ue{constructor(e,t,n,o,r){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=n,this._languageService=o,this._languageConfigurationService=r,this._onModelAdded=this._register(new ge),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new ge),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new ge),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(s=>this._updateModelOptions(s))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){var n;let o=Ma.tabSize;if(e.editor&&typeof e.editor.tabSize<"u"){let f=parseInt(e.editor.tabSize,10);isNaN(f)||(o=f),o<1&&(o=1)}let r="tabSize";if(e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"){let f=parseInt(e.editor.indentSize,10);isNaN(f)||(r=Math.max(f,1))}let s=Ma.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(s=e.editor.insertSpaces==="false"?!1:!!e.editor.insertSpaces);let a=_Nt,l=e.eol;l===`\r + `)}return t}var A2e,N2e,hZ,aN,fZ,pZ,mZ,git=P(()=>{Xc();dh();Qt();Gl();Uh();u1();jb();o2e();o1();Ra();Qi();Go();or();Ob();nt();Mn();Ri();A2e=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,N2e=/(&)?(&)([^\s&])/g;(function(i){i[i.Right=0]="Right",i[i.Left=1]="Left"})(hZ||(hZ={}));aN=class i extends Bs{constructor(e,t,n,o){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");let r=document.createElement("div");r.classList.add("monaco-menu"),r.setAttribute("role","presentation"),super(r,{orientation:1,actionViewItemProvider:c=>this.doGetActionViewItem(c,n,s),context:n.context,actionRunner:n.actionRunner,ariaLabel:n.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Wi||Ar?[10]:[]],keyDown:!0}}),this.menuStyles=o,this.menuElement=r,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,o),this._register(ar.addTarget(r)),this._register(Xe(r,Lt.KEY_DOWN,c=>{new qn(c).equals(2)&&c.preventDefault()})),n.enableMnemonics&&this._register(Xe(r,Lt.KEY_DOWN,c=>{let d=c.key.toLocaleLowerCase();if(this.mnemonics.has(d)){nn.stop(c,!0);let u=this.mnemonics.get(d);if(u.length===1&&(u[0]instanceof pZ&&u[0].container&&this.focusItemByElement(u[0].container),u[0].onClick(c)),u.length>1){let h=u.shift();h&&h.container&&(this.focusItemByElement(h.container),u.push(h)),this.mnemonics.set(d,u)}}})),Ar&&this._register(Xe(r,Lt.KEY_DOWN,c=>{let d=new qn(c);d.equals(14)||d.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),nn.stop(c,!0)):(d.equals(13)||d.equals(12))&&(this.focusedItem=0,this.focusPrevious(),nn.stop(c,!0))})),this._register(Xe(this.domNode,Lt.MOUSE_OUT,c=>{let d=c.relatedTarget;ms(d,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),c.stopPropagation())})),this._register(Xe(this.actionsList,Lt.MOUSE_OVER,c=>{let d=c.target;if(!(!d||!ms(d,this.actionsList)||d===this.actionsList)){for(;d.parentElement!==this.actionsList&&d.parentElement!==null;)d=d.parentElement;if(d.classList.contains("action-item")){let u=this.focusedItem;this.setFocusedItem(d),u!==this.focusedItem&&this.updateFocus()}}})),this._register(ar.addTarget(this.actionsList)),this._register(Xe(this.actionsList,vo.Tap,c=>{let d=c.initialTarget;if(!(!d||!ms(d,this.actionsList)||d===this.actionsList)){for(;d.parentElement!==this.actionsList&&d.parentElement!==null;)d=d.parentElement;if(d.classList.contains("action-item")){let u=this.focusedItem;this.setFocusedItem(d),u!==this.focusedItem&&this.updateFocus()}}}));let s={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new gp(r,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));let a=this.scrollableElement.getDomNode();a.style.position="",this.styleScrollElement(a,o),this._register(Xe(r,vo.Change,c=>{nn.stop(c,!0);let d=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:d-c.translationY})})),this._register(Xe(a,Lt.MOUSE_UP,c=>{c.preventDefault()}));let l=pi(e);r.style.maxHeight=`${Math.max(10,l.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter((c,d)=>{var u;return!((u=n.submenuIds)===null||u===void 0)&&u.has(c.id)?(console.warn(`Found submenu cycle: ${c.id}`),!1):!(c instanceof zr&&(d===t.length-1||d===0||t[d-1]instanceof zr))}),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(c=>!(c instanceof mZ)).forEach((c,d,u)=>{c.updatePositionInSet(d+1,u.length)})}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(k5(e)?this.styleSheet=ya(e):(i.globalStyleSheet||(i.globalStyleSheet=ya()),this.styleSheet=i.globalStyleSheet)),this.styleSheet.textContent=pNt(t,k5(e))}styleScrollElement(e,t){var n,o;let r=(n=t.foregroundColor)!==null&&n!==void 0?n:"",s=(o=t.backgroundColor)!==null&&o!==void 0?o:"",a=t.borderColor?`1px solid ${t.borderColor}`:"",l="5px",c=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=a,e.style.borderRadius=l,e.style.color=r,e.style.backgroundColor=s,e.style.boxShadow=c}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){let t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register(Xe(this.element,Lt.MOUSE_UP,r=>{if(nn.stop(r,!0),Aa){if(new Oa(pi(this.element),r).rightButton)return;this.onClick(r)}else setTimeout(()=>{this.onClick(r)},0)})),this._register(Xe(this.element,Lt.CONTEXT_MENU,r=>{nn.stop(r,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=ut(this.element,pt("a.action-menu-item")),this._action.id===zr.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=ut(this.item,pt("span.menu-item-check"+ui.asCSSSelector(kt.menuSelection))),this.check.setAttribute("role","none"),this.label=ut(this.item,pt("span.action-label")),this.options.label&&this.options.keybinding&&(ut(this.item,pt("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var e;super.focus(),(e=this.item)===null||e===void 0||e.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){var e;if(this.label&&this.options.label){is(this.label);let t=Vx(this.action.label);if(t){let n=fNt(t);this.options.enableMnemonics||(t=n),this.label.setAttribute("aria-label",n.replace(/&&/g,"&"));let o=A2e.exec(t);if(o){t=p5(t),N2e.lastIndex=0;let r=N2e.exec(t);for(;r&&r[1];)r=N2e.exec(t);let s=a=>a.replace(/&&/g,"&");r?this.label.append(q0(s(t.substr(0,r.index))," "),pt("u",{"aria-hidden":"true"},r[3]),Hue(s(t.substr(r.index+r[0].length))," ")):this.label.innerText=s(t).trim(),(e=this.item)===null||e===void 0||e.setAttribute("aria-keyshortcuts",(o[1]?o[1]:o[3]).toLocaleLowerCase())}else this.label.innerText=t.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;let e=this.action.checked;this.item.classList.toggle("checked",!!e),e!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){let e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,n=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,o=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",r=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=t??"",this.item.style.backgroundColor=n??"",this.item.style.outline=o,this.item.style.outlineOffset=r),this.check&&(this.check.style.color=t??"")}},pZ=class extends fZ{constructor(e,t,n,o,r){super(e,e,o,r),this.submenuActions=t,this.parentData=n,this.submenuOptions=o,this.mysubmenu=null,this.submenuDisposables=this._register(new Ye),this.mouseOver=!1,this.expandDirection=o&&o.expandDirection!==void 0?o.expandDirection:hZ.Right,this.showScheduler=new hn(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new hn(()=>{this.element&&!ms(gs(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=ut(this.item,pt("span.submenu-indicator"+ui.asCSSSelector(kt.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(Xe(this.element,Lt.KEY_UP,t=>{let n=new qn(t);(n.equals(17)||n.equals(3))&&(nn.stop(t,!0),this.createSubmenu(!0))})),this._register(Xe(this.element,Lt.KEY_DOWN,t=>{let n=new qn(t);gs()===this.item&&(n.equals(17)||n.equals(3))&&nn.stop(t,!0)})),this._register(Xe(this.element,Lt.MOUSE_OVER,t=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(Xe(this.element,Lt.MOUSE_LEAVE,t=>{this.mouseOver=!1})),this._register(Xe(this.element,Lt.FOCUS_OUT,t=>{this.element&&!ms(gs(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(e){nn.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,n,o){let r={top:0,left:0};return r.left=Bb(e.width,t.width,{position:o===hZ.Right?0:1,offset:n.left,size:n.width}),r.left>=n.left&&r.left{new qn(d).equals(15)&&(nn.stop(d,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(Xe(this.submenuContainer,Lt.KEY_DOWN,d=>{new qn(d).equals(15)&&nn.stop(d,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&((t=this.item)===null||t===void 0||t.setAttribute("aria-expanded",e))}applyStyle(){super.applyStyle();let t=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}},mZ=class extends d1{constructor(e,t,n,o){super(e,t,n),this.menuStyles=o}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}});var gZ,vit=P(()=>{Qt();Uh();git();Ra();Pi();nt();N4();gZ=class{constructor(e,t,n,o){this.contextViewService=e,this.telemetryService=t,this.notificationService=n,this.keybindingService=o,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){let t=e.getActions();if(!t.length)return;this.focusToReturn=gs();let n,o=e.domForShadowRoot instanceof HTMLElement?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:r=>{var s;this.lastContainer=r;let a=e.getMenuClassName?e.getMenuClassName():"";a&&(r.className+=" "+a),this.options.blockMouse&&(this.block=r.appendChild(pt(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(s=this.blockDisposable)===null||s===void 0||s.dispose(),this.blockDisposable=Xe(this.block,Lt.MOUSE_DOWN,u=>u.stopPropagation()));let l=new Ye,c=e.actionRunner||new Qu;c.onWillRun(u=>this.onActionRun(u,!e.skipTelemetry),this,l),c.onDidRun(this.onDidActionRun,this,l),n=new aN(r,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:c,getKeyBinding:e.getKeyBinding?e.getKeyBinding:u=>this.keybindingService.lookupKeybinding(u.id)},uit),n.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,l),n.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,l);let d=pi(r);return l.add(Xe(d,Lt.BLUR,()=>this.contextViewService.hideContextView(!0))),l.add(Xe(d,Lt.MOUSE_DOWN,u=>{if(u.defaultPrevented)return;let h=new Oa(d,u),f=h.target;if(!h.rightButton){for(;f;){if(f===r)return;f=f.parentElement}this.contextViewService.hideContextView(!0)}})),vl(l,n)},focus:()=>{n?.focus(!!e.autoSelectFirstItem)},onHide:r=>{var s,a,l;(s=e.onHide)===null||s===void 0||s.call(e,!!r),this.block&&(this.block.remove(),this.block=null),(a=this.blockDisposable)===null||a===void 0||a.dispose(),this.blockDisposable=null,this.lastContainer&&(gs()===this.lastContainer||ms(gs(),this.lastContainer))&&((l=this.focusToReturn)===null||l===void 0||l.focus()),this.lastContainer=null}},o,!!o)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!jl(e.error)&&this.notificationService.error(e.error)}}});var mNt,cS,vZ,R2e,_it=P(()=>{Qt();Ra();Xt();nt();Kb();Dr();Xi();vs();ic();$f();vit();Id();mNt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},cS=function(i,e){return function(t,n){e(t,n,i)}},vZ=class extends ue{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new gZ(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,n,o,r,s){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=n,this.keybindingService=o,this.menuService=r,this.contextKeyService=s,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new ge),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new ge)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=R2e.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:t=>{var n;(n=e.onHide)===null||n===void 0||n.call(e,t),this._onDidHideContextMenu.fire()}}),Z0.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};vZ=mNt([cS(0,Fs),cS(1,xo),cS(2,Pc),cS(3,fn),cS(4,Mc),cS(5,ri)],vZ);(function(i){function e(n){return n&&n.menuId instanceof ne}function t(n,o,r){if(!e(n))return n;let{menuId:s,menuActionOptions:a,contextKeyService:l}=n;return{...n,getActions:()=>{let c=[];if(s){let d=o.createMenu(s,l??r);hit(d,a,c),d.dispose()}return n.getActions?zr.join(n.getActions(),c):c}}}i.transform=t})(R2e||(R2e={}))});var lN,bit=P(()=>{(function(i){i[i.API=0]="API",i[i.USER=1]="USER"})(lN||(lN={}))});var z2e,_Z,P2e,O2e,bZ,yit=P(()=>{Qt();_l();mo();Hh();od();SY();Nc();ec();Io();fs();$o();bit();sd();z2e=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},_Z=function(i,e){return function(t,n){e(t,n,i)}},P2e=class{constructor(e){this._commandService=e}async open(e,t){if(!PT(e,$i.command))return!1;if(!t?.allowCommands||(typeof e=="string"&&(e=li.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path)))return!0;let n=[];try{n=BM(decodeURIComponent(e.query))}catch{try{n=BM(e.query)}catch{}}return Array.isArray(n)||(n=[n]),await this._commandService.executeCommand(e.path,...n),!0}};P2e=z2e([_Z(0,eo)],P2e);O2e=class{constructor(e){this._editorService=e}async open(e,t){typeof e=="string"&&(e=li.parse(e));let{selection:n,uri:o}=Met(e);return e=o,e.scheme===$i.file&&(e=oJe(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:n,source:t?.fromUserGesture?lN.USER:lN.API,...t?.editorOptions}},this._editorService.getFocusedCodeEditor(),t?.openToSide),!0}};O2e=z2e([_Z(0,tn)],O2e);bZ=class{constructor(e,t){this._openers=new $r,this._validators=new $r,this._resolvers=new $r,this._resolvedUriTargets=new rs(n=>n.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new $r,this._defaultExternalOpener={openExternal:async n=>(mhe(n,$i.http,$i.https)?s$(n):Hn.location.href=n,!0)},this._openers.push({open:async(n,o)=>o?.openExternal||mhe(n,$i.mailto,$i.http,$i.https,$i.vsls)?(await this._doOpenExternal(n,o),!0):!1}),this._openers.push(new P2e(t)),this._openers.push(new O2e(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}async open(e,t){var n;let o=typeof e=="string"?li.parse(e):e,r=(n=this._resolvedUriTargets.get(o))!==null&&n!==void 0?n:e;for(let s of this._validators)if(!await s.shouldOpen(r,t))return!1;for(let s of this._openers)if(await s.open(e,t))return!0;return!1}async resolveExternalUri(e,t){for(let n of this._resolvers)try{let o=await n.resolveExternalUri(e,t);if(o)return this._resolvedUriTargets.has(o.resolved)||this._resolvedUriTargets.set(o.resolved,e),o}catch{}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,t){let n=typeof e=="string"?li.parse(e):e,o;try{o=(await this.resolveExternalUri(n,t)).resolved}catch{o=n}let r;if(typeof e=="string"&&n.toString()===o.toString()?r=e:r=encodeURI(o.toString(!0)),t?.allowContributedOpeners){let s=typeof t?.allowContributedOpeners=="string"?t?.allowContributedOpeners:void 0;for(let a of this._externalOpeners)if(await a.openExternal(r,{sourceUri:n,preferredOpenerId:s},Fi.None))return!0}return this._defaultExternalOpener.openExternal(r,{sourceUri:n},Fi.None)}dispose(){this._validators.clear()}};bZ=z2e([_Z(0,tn),_Z(1,eo)],bZ)});var Oc,Zv=P(()=>{_i();Oc=vi("editorWorkerService")});var _r,cN,yu,A2=P(()=>{C4();Wt();_i();(function(i){i[i.Hint=1]="Hint",i[i.Info=2]="Info",i[i.Warning=4]="Warning",i[i.Error=8]="Error"})(_r||(_r={}));(function(i){function e(s,a){return a-s}i.compare=e;let t=Object.create(null);t[i.Error]=g("sev.error","Error"),t[i.Warning]=g("sev.warning","Warning"),t[i.Info]=g("sev.info","Info");function n(s){return t[s]||""}i.toString=n;function o(s){switch(s){case lr.Error:return i.Error;case lr.Warning:return i.Warning;case lr.Info:return i.Info;case lr.Ignore:return i.Hint}}i.fromSeverity=o;function r(s){switch(s){case i.Error:return lr.Error;case i.Warning:return lr.Warning;case i.Info:return lr.Info;case i.Hint:return lr.Ignore}}i.toSeverity=r})(_r||(_r={}));(function(i){let e="";function t(o){return n(o,!0)}i.makeKey=t;function n(o,r){let s=[e];return o.source?s.push(o.source.replace("\xA6","\\\xA6")):s.push(e),o.code?typeof o.code=="string"?s.push(o.code.replace("\xA6","\\\xA6")):s.push(o.code.value.replace("\xA6","\\\xA6")):s.push(e),o.severity!==void 0&&o.severity!==null?s.push(_r.toString(o.severity)):s.push(e),o.message&&r?s.push(o.message.replace("\xA6","\\\xA6")):s.push(e),o.startLineNumber!==void 0&&o.startLineNumber!==null?s.push(o.startLineNumber.toString()):s.push(e),o.startColumn!==void 0&&o.startColumn!==null?s.push(o.startColumn.toString()):s.push(e),o.endLineNumber!==void 0&&o.endLineNumber!==null?s.push(o.endLineNumber.toString()):s.push(e),o.endColumn!==void 0&&o.endColumn!==null?s.push(o.endColumn.toString()):s.push(e),s.push(e),s.join("\xA6")}i.makeKeyOptionalMessage=n})(cN||(cN={}));yu=vi("markerService")});function Cit(i,e){let t=[],n=[];for(let o of i)e.has(o)||t.push(o);for(let o of e)i.has(o)||n.push(o);return{removed:t,added:n}}function wit(i,e){let t=new Set;for(let n of e)i.has(n)&&t.add(n);return t}var F2e=P(()=>{});var gNt,xit,yZ,H2e,Sit=P(()=>{A2();nt();Ca();No();r1();Dc();Kt();Nc();Xt();pr();od();F2e();gNt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},xit=function(i,e){return function(t,n){e(t,n,i)}},yZ=class extends ue{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new ge),this._markerDecorations=new rs,e.getModels().forEach(n=>this._onModelAdded(n)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){let n=this._markerDecorations.get(e);return n&&n.getMarker(t)||null}_handleMarkerChange(e){e.forEach(t=>{let n=this._markerDecorations.get(t);n&&this._updateDecorations(n)})}_onModelAdded(e){let t=new H2e(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){var t;let n=this._markerDecorations.get(e.uri);n&&(n.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===$i.inMemory||e.uri.scheme===$i.internal||e.uri.scheme===$i.vscode)&&((t=this._markerService)===null||t===void 0||t.read({resource:e.uri}).map(o=>o.owner).forEach(o=>this._markerService.remove(o,[e.uri])))}_updateDecorations(e){let t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};yZ=gNt([xit(0,no),xit(1,yu)],yZ);H2e=class extends ue{constructor(e){super(),this.model=e,this._map=new Y$,this._register(Yt(()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()}))}update(e){let{added:t,removed:n}=Cit(new Set(this._map.keys()),new Set(e));if(t.length===0&&n.length===0)return!1;let o=n.map(a=>this._map.get(a)),r=t.map(a=>({range:this._createDecorationRange(this.model,a),options:this._createDecorationOption(a)})),s=this.model.deltaDecorations(o,r);for(let a of n)this._map.delete(a);for(let a=0;a=o)return n;let r=e.getWordAtPosition(n.getStartPosition());r&&(n=new O(n.startLineNumber,r.startColumn,n.endLineNumber,r.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&t.startColumn===1&&n.startLineNumber===n.endLineNumber){let o=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);o=0:!1}}});function Yb(i){return i.toString()}var vNt,dN,dS,B2e,_Nt,V2e,uN,CZ,kit=P(()=>{Xt();nt();Mn();ea();eT();Zf();Ha();aI();er();yM();U3();$pe();Nc();Gc();Kr();vNt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},dN=function(i,e){return function(t,n){e(t,n,i)}};B2e=class{constructor(e,t,n){this.model=e,this._modelEventListeners=new Ye,this.model=e,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(o=>n(e,o)))}dispose(){this._modelEventListeners.dispose()}},_Nt=Ar||Wi?1:2,V2e=class{constructor(e,t,n,o,r,s,a,l){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=n,this.sharesUndoRedoStack=o,this.heapSize=r,this.sha1=s,this.versionId=a,this.alternativeVersionId=l}},uN=dS=class extends ue{constructor(e,t,n,o,r){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=n,this._languageService=o,this._languageConfigurationService=r,this._onModelAdded=this._register(new ge),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new ge),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new ge),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(s=>this._updateModelOptions(s))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){var n;let o=Ma.tabSize;if(e.editor&&typeof e.editor.tabSize<"u"){let f=parseInt(e.editor.tabSize,10);isNaN(f)||(o=f),o<1&&(o=1)}let r="tabSize";if(e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"){let f=parseInt(e.editor.indentSize,10);isNaN(f)||(r=Math.max(f,1))}let s=Ma.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(s=e.editor.insertSpaces==="false"?!1:!!e.editor.insertSpaces);let a=_Nt,l=e.eol;l===`\r `?a=2:l===` `&&(a=1);let c=Ma.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(c=e.editor.trimAutoWhitespace==="false"?!1:!!e.editor.trimAutoWhitespace);let d=Ma.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(d=e.editor.detectIndentation==="false"?!1:!!e.editor.detectIndentation);let u=Ma.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(u=e.editor.largeFileOptimizations==="false"?!1:!!e.editor.largeFileOptimizations);let h=Ma.bracketPairColorizationOptions;return!((n=e.editor)===null||n===void 0)&&n.bracketPairColorization&&typeof e.editor.bracketPairColorization=="object"&&(h={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:o,indentSize:r,insertSpaces:s,detectIndentation:d,defaultEOL:a,trimAutoWhitespace:c,largeFileOptimizations:u,bracketPairColorizationOptions:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);let n=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return n&&typeof n=="string"&&n!=="auto"?n:Xa===3||Xa===2?` `:`\r -`}_shouldRestoreUndoStack(){let e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,n){let o=typeof e=="string"?e:e.languageId,r=this._modelCreationOptionsByLanguageAndResource[o+t];if(!r){let s=this._configurationService.getValue("editor",{overrideIdentifier:o,resource:t}),a=this._getEOL(t,o);r=dS._readModelOptions({editor:s,eol:a},n),this._modelCreationOptionsByLanguageAndResource[o+t]=r}return r}_updateModelOptions(e){let t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);let n=Object.keys(this._models);for(let o=0,r=n.length;oe){let t=[];for(this._disposedModels.forEach(n=>{n.sharesUndoRedoStack||t.push(n)}),t.sort((n,o)=>n.time-o.time);t.length>0&&this._disposedModelsHeapSize>e;){let n=t.shift();this._removeDisposedModel(n.uri),n.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(n.initialUndoRedoSnapshot)}}}_createModelData(e,t,n,o){let r=this.getCreationOptions(t,n,o),s=new Cp(e,t,r,n,this._undoRedoService,this._languageService,this._languageConfigurationService);if(n&&this._disposedModels.has(Yb(n))){let c=this._removeDisposedModel(n),d=this._undoRedoService.getElements(n),u=this._getSHA1Computer(),h=u.canComputeSHA1(s)?u.computeSHA1(s)===c.sha1:!1;if(h||c.sharesUndoRedoStack){for(let f of d.past)f2(f)&&f.matchesResource(n)&&f.setModel(s);for(let f of d.future)f2(f)&&f.matchesResource(n)&&f.setModel(s);this._undoRedoService.setElementsValidFlag(n,!0,f=>f2(f)&&f.matchesResource(n)),h&&(s._overwriteVersionId(c.versionId),s._overwriteAlternativeVersionId(c.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(c.initialUndoRedoSnapshot))}else c.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(c.initialUndoRedoSnapshot)}let a=Yb(s.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");let l=new B2e(s,c=>this._onWillDispose(c),(c,d)=>this._onDidChangeLanguage(c,d));return this._models[a]=l,l}createModel(e,t,n,o=!1){let r;return t?r=this._createModelData(e,t,n,o):r=this._createModelData(e,ra,n,o),this._onModelAdded.fire(r.model),r.model}getModels(){let e=[],t=Object.keys(this._models);for(let n=0,o=t.length;n0||c.future.length>0){for(let d of c.past)f2(d)&&d.matchesResource(e.uri)&&(r=!0,s+=d.heapSize(e.uri),d.setModel(e.uri));for(let d of c.future)f2(d)&&d.matchesResource(e.uri)&&(r=!0,s+=d.heapSize(e.uri),d.setModel(e.uri))}}let a=dS.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,l=this._getSHA1Computer();if(r)if(!o&&(s>a||!l.canComputeSHA1(e))){let c=n.model.getInitialUndoRedoSnapshot();c!==null&&this._undoRedoService.restoreSnapshot(c)}else this._ensureDisposedModelsHeapSize(a-s),this._undoRedoService.setElementsValidFlag(e.uri,!1,c=>f2(c)&&c.matchesResource(e.uri)),this._insertDisposedModel(new V2e(e.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),o,s,l.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!o){let c=n.model.getInitialUndoRedoSnapshot();c!==null&&this._undoRedoService.restoreSnapshot(c)}delete this._models[t],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){let n=t.oldLanguage,o=e.getLanguageId(),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget),s=this.getCreationOptions(o,e.uri,e.isForSimpleWidget);dS._setModelOptionsForModel(e,s,r),this._onModelModeChanged.fire({model:e,oldLanguageId:n})}_getSHA1Computer(){return new _Z}};uN.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024;uN=dS=vNt([dN(0,Ni),dN(1,G$),dN(2,Tv),dN(3,Kn),dN(4,An)],uN);_Z=class i{canComputeSHA1(e){return e.getValueLength()<=i.MAX_MODEL_SIZE}computeSHA1(e){let t=new zT,n=e.createSnapshot(),o;for(;o=n.read();)t.update(o);return t.digest()}};_Z.MAX_MODEL_SIZE=10*1024*1024});var Lit=P(()=>{});function bNt(i,e){return{...e,accessibilityProvider:e.accessibilityProvider&&new U2e(i,e.accessibilityProvider)}}var W2e,U2e,bZ,Eit=P(()=>{Vi();mo();Xt();nt();c2e();qv();W2e=class{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:ue.None}}renderElement(e,t,n,o){var r;if((r=n.disposable)===null||r===void 0||r.dispose(),!n.data)return;let s=this.modelProvider();if(s.isResolved(e))return this.renderer.renderElement(s.get(e),e,n.data,o);let a=new Jn,l=s.resolve(e,a.token);n.disposable={dispose:()=>a.cancel()},this.renderer.renderPlaceholder(e,n.data),l.then(c=>this.renderer.renderElement(c,e,n.data,o))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}},U2e=class{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){let t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}};bZ=class{constructor(e,t,n,o,r={}){let s=()=>this.model,a=o.map(l=>new W2e(l,s));this.list=new Nl(e,t,n,a,bNt(s,r))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return Et.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:n}))}get onPointer(){return Et.map(this.list.onPointer,({element:e,index:t,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:n}))}get onDidChangeSelection(){return Et.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:n})=>({elements:e.map(o=>this._model.get(o)),indexes:t,browserEvent:n}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,Ya(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}});var Dit=P(()=>{});var hS,yNt,hN,CNt,wNt,xNt,SNt,fN,pN,uS,Tit,Cu,fS=P(()=>{Qt();vp();dh();Qi();dv();Xt();nt();Mn();Dit();hS=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},yNt=!1;(function(i){i.North="north",i.South="south",i.East="east",i.West="west"})(hN||(hN={}));CNt=4,wNt=new ge,xNt=300,SNt=new ge,fN=class{constructor(e){this.el=e,this.disposables=new Ye}get onPointerMove(){return this.disposables.add(new _n(pi(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new _n(pi(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}};hS([Tr],fN.prototype,"onPointerMove",null);hS([Tr],fN.prototype,"onPointerUp",null);pN=class{get onPointerMove(){return this.disposables.add(new _n(this.el,vo.Change)).event}get onPointerUp(){return this.disposables.add(new _n(this.el,vo.End)).event}constructor(e){this.el=e,this.disposables=new Ye}dispose(){this.disposables.dispose()}};hS([Tr],pN.prototype,"onPointerMove",null);hS([Tr],pN.prototype,"onPointerUp",null);uS=class{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}};hS([Tr],uS.prototype,"onPointerMove",null);hS([Tr],uS.prototype,"onPointerUp",null);Tit="pointer-events-disabled",Cu=class i extends ue{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){let t=n=>{this.orthogonalStartDragHandleDisposables.clear(),n!==0&&(this._orthogonalStartDragHandle=ut(this.el,pt(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(Yt(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new _n(this._orthogonalStartDragHandle,"mouseenter")).event(()=>i.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new _n(this._orthogonalStartDragHandle,"mouseleave")).event(()=>i.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){let t=n=>{this.orthogonalEndDragHandleDisposables.clear(),n!==0&&(this._orthogonalEndDragHandle=ut(this.el,pt(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(Yt(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new _n(this._orthogonalEndDragHandle,"mouseenter")).event(()=>i.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new _n(this._orthogonalEndDragHandle,"mouseleave")).event(()=>i.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,n){super(),this.hoverDelay=xNt,this.hoverDelayer=this._register(new ba(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new ge),this._onDidStart=this._register(new ge),this._onDidChange=this._register(new ge),this._onDidReset=this._register(new ge),this._onDidEnd=this._register(new ge),this.orthogonalStartSashDisposables=this._register(new Ye),this.orthogonalStartDragHandleDisposables=this._register(new Ye),this.orthogonalEndSashDisposables=this._register(new Ye),this.orthogonalEndDragHandleDisposables=this._register(new Ye),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=ut(e,pt(".monaco-sash")),n.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${n.orthogonalEdge}`),Wi&&this.el.classList.add("mac");let o=this._register(new _n(this.el,"mousedown")).event;this._register(o(u=>this.onPointerStart(u,new fN(e)),this));let r=this._register(new _n(this.el,"dblclick")).event;this._register(r(this.onPointerDoublePress,this));let s=this._register(new _n(this.el,"mouseenter")).event;this._register(s(()=>i.onMouseEnter(this)));let a=this._register(new _n(this.el,"mouseleave")).event;this._register(a(()=>i.onMouseLeave(this))),this._register(ar.addTarget(this.el));let l=this._register(new _n(this.el,vo.Start)).event;this._register(l(u=>this.onPointerStart(u,new pN(this.el)),this));let c=this._register(new _n(this.el,vo.Tap)).event,d;this._register(c(u=>{if(d){clearTimeout(d),d=void 0,this.onPointerDoublePress(u);return}clearTimeout(d),d=setTimeout(()=>d=void 0,250)},this)),typeof n.size=="number"?(this.size=n.size,n.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=CNt,this._register(wNt.event(u=>{this.size=u,this.layout()}))),this._register(SNt.event(u=>this.hoverDelay=u)),this.layoutProvider=t,this.orthogonalStartSash=n.orthogonalStartSash,this.orthogonalEndSash=n.orthogonalEndSash,this.orientation=n.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",yNt),this.layout()}onPointerStart(e,t){nn.stop(e);let n=!1;if(!e.__orthogonalSashEvent){let p=this.getOrthogonalSash(e);p&&(n=!0,e.__orthogonalSashEvent=!0,p.onPointerStart(e,new uS(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new uS(t))),!this.state)return;let o=this.el.ownerDocument.getElementsByTagName("iframe");for(let p of o)p.classList.add(Tit);let r=e.pageX,s=e.pageY,a=e.altKey,l={startX:r,currentX:r,startY:s,currentY:s,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);let c=ya(this.el),d=()=>{let p="";n?p="all-scroll":this.orientation===1?this.state===1?p="s-resize":this.state===2?p="n-resize":p=Wi?"row-resize":"ns-resize":this.state===1?p="e-resize":this.state===2?p="w-resize":p=Wi?"col-resize":"ew-resize",c.textContent=`* { cursor: ${p} !important; }`},u=new Ye;d(),n||this.onDidEnablementChange.event(d,null,u);let h=p=>{nn.stop(p,!1);let m={startX:r,currentX:p.pageX,startY:s,currentY:p.pageY,altKey:a};this._onDidChange.fire(m)},f=p=>{nn.stop(p,!1),this.el.removeChild(c),this.el.classList.remove("active"),this._onDidEnd.fire(),u.dispose();for(let m of o)m.classList.remove(Tit)};t.onPointerMove(h,null,u),t.onPointerUp(f,null,u),u.add(t)}onPointerDoublePress(e){let t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!t&&e.linkedSash&&i.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&i.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){i.onMouseLeave(this)}layout(){if(this.orientation===0){let e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{let e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){var t;let n=(t=e.initialTarget)!==null&&t!==void 0?t:e.target;if(!(!n||!(n instanceof HTMLElement))&&n.classList.contains("orthogonal-drag-handle"))return n.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}});var Iit=P(()=>{});var kNt,yZ,$2e,j2e,R4,mN,pS,q2e=P(()=>{Qt();vp();fS();o1();Vi();sa();Xt();nt();Ox();Jw();ho();Iit();kNt={separatorBorder:it.transparent},yZ=class{set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(e,t){var n,o;if(e!==this.visible){e?(this.size=Ml(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof t=="number"?t:this.size,this.size=0),this.container.classList.toggle("visible",e);try{(o=(n=this.view).setVisible)===null||o===void 0||o.call(n,e)}catch(r){console.error("Splitview: Failed to set visible view"),console.error(r)}}}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){var e;return(e=this.view.proportionalLayout)!==null&&e!==void 0?e:!0}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,n,o){this.container=e,this.view=t,this.disposable=o,this._cachedVisibleSize=void 0,typeof n=="number"?(this._size=n,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=n.cachedVisibleSize)}layout(e,t){this.layoutContainer(e);try{this.view.layout(this.size,e,t)}catch(n){console.error("Splitview: Failed to layout view"),console.error(n)}}dispose(){this.disposable.dispose()}},$2e=class extends yZ{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}},j2e=class extends yZ{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}};(function(i){i[i.Idle=0]="Idle",i[i.Busy=1]="Busy"})(R4||(R4={}));(function(i){i.Distribute={type:"distribute"};function e(o){return{type:"split",index:o}}i.Split=e;function t(o){return{type:"auto",index:o}}i.Auto=t;function n(o){return{type:"invisible",cachedVisibleSize:o}}i.Invisible=n})(mN||(mN={}));pS=class extends ue{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(let t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(let t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){var n,o,r,s,a;super(),this.size=0,this._contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=R4.Idle,this._onDidSashChange=this._register(new ge),this._onDidSashReset=this._register(new ge),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=(n=t.orientation)!==null&&n!==void 0?n:0,this.inverseAltBehavior=(o=t.inverseAltBehavior)!==null&&o!==void 0?o:!1,this.proportionalLayout=(r=t.proportionalLayout)!==null&&r!==void 0?r:!0,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=ut(this.el,pt(".sash-container")),this.viewContainer=pt(".split-view-container"),this.scrollable=this._register(new n1({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:c=>za(pi(this.el),c)})),this.scrollableElement=this._register(new c2(this.viewContainer,{vertical:this.orientation===0?(s=t.scrollbarVisibility)!==null&&s!==void 0?s:1:2,horizontal:this.orientation===1?(a=t.scrollbarVisibility)!==null&&a!==void 0?a:1:2},this.scrollable));let l=this._register(new _n(this.viewContainer,"scroll")).event;this._register(l(c=>{let d=this.scrollableElement.getScrollPosition(),u=Math.abs(this.viewContainer.scrollLeft-d.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,h=Math.abs(this.viewContainer.scrollTop-d.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(u!==void 0||h!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:u,scrollTop:h})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(c=>{c.scrollTopChanged&&(this.viewContainer.scrollTop=c.scrollTop),c.scrollLeftChanged&&(this.viewContainer.scrollLeft=c.scrollLeft)})),ut(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||kNt),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((c,d)=>{let u=$l(c.visible)||c.visible?c.size:{type:"invisible",cachedVisibleSize:c.size},h=c.view;this.doAddView(h,u,d,!0)}),this._contentSize=this.viewItems.reduce((c,d)=>c+d.size,0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,n=this.viewItems.length,o){this.doAddView(e,t,n,o)}layout(e,t){let n=Math.max(this.size,this._contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let o=0;for(let r=0;r0&&(s.size=Ml(Math.round(a*e/o),s.minimumSize,s.maximumSize))}}else{let o=Ya(this.viewItems.length),r=o.filter(a=>this.viewItems[a].priority===1),s=o.filter(a=>this.viewItems[a].priority===2);this.resize(this.viewItems.length-1,e-n,void 0,r,s)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map(e=>e.proportionalLayout&&e.visible?e.size/this._contentSize:void 0))}onSashStart({sash:e,start:t,alt:n}){for(let a of this.viewItems)a.enabled=!1;let o=this.sashItems.findIndex(a=>a.sash===e),r=vl(Xe(this.el.ownerDocument.body,"keydown",a=>s(this.sashDragState.current,a.altKey)),Xe(this.el.ownerDocument.body,"keyup",()=>s(this.sashDragState.current,!1))),s=(a,l)=>{let c=this.viewItems.map(p=>p.size),d=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(l=!l),l)if(o===this.sashItems.length-1){let m=this.viewItems[o];d=(m.minimumSize-m.size)/2,u=(m.maximumSize-m.size)/2}else{let m=this.viewItems[o+1];d=(m.size-m.maximumSize)/2,u=(m.size-m.minimumSize)/2}let h,f;if(!l){let p=Ya(o,-1),m=Ya(o+1,this.viewItems.length),y=p.reduce((k,D)=>k+(this.viewItems[D].minimumSize-c[D]),0),_=p.reduce((k,D)=>k+(this.viewItems[D].viewMaximumSize-c[D]),0),v=m.length===0?Number.POSITIVE_INFINITY:m.reduce((k,D)=>k+(c[D]-this.viewItems[D].minimumSize),0),b=m.length===0?Number.NEGATIVE_INFINITY:m.reduce((k,D)=>k+(c[D]-this.viewItems[D].viewMaximumSize),0),C=Math.max(y,b),w=Math.min(v,_),S=this.findFirstSnapIndex(p),x=this.findFirstSnapIndex(m);if(typeof S=="number"){let k=this.viewItems[S],D=Math.floor(k.viewMinimumSize/2);h={index:S,limitDelta:k.visible?C-D:C+D,size:k.size}}if(typeof x=="number"){let k=this.viewItems[x],D=Math.floor(k.viewMinimumSize/2);f={index:x,limitDelta:k.visible?w+D:w-D,size:k.size}}}this.sashDragState={start:a,current:a,index:o,sizes:c,minDelta:d,maxDelta:u,alt:l,snapBefore:h,snapAfter:f,disposable:r}};s(t,n)}onSashChange({current:e}){let{index:t,start:n,sizes:o,alt:r,minDelta:s,maxDelta:a,snapBefore:l,snapAfter:c}=this.sashDragState;this.sashDragState.current=e;let d=e-n,u=this.resize(t,d,o,void 0,void 0,s,a,l,c);if(r){let h=t===this.sashItems.length-1,f=this.viewItems.map(b=>b.size),p=h?t:t+1,m=this.viewItems[p],y=m.size-m.maximumSize,_=m.size-m.minimumSize,v=h?t-1:t+1;this.resize(v,-u,f,void 0,void 0,y,_)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(let t of this.viewItems)t.enabled=!0}onViewChange(e,t){let n=this.viewItems.indexOf(e);n<0||n>=this.viewItems.length||(t=typeof t=="number"?t:e.size,t=Ml(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&n>0?(this.resize(n-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([n],void 0)))}resizeView(e,t){if(!(e<0||e>=this.viewItems.length)){if(this.state!==R4.Idle)throw new Error("Cant modify splitview");this.state=R4.Busy;try{let n=Ya(this.viewItems.length).filter(a=>a!==e),o=[...n.filter(a=>this.viewItems[a].priority===1),e],r=n.filter(a=>this.viewItems[a].priority===2),s=this.viewItems[e];t=Math.round(t),t=Ml(t,s.minimumSize,Math.min(s.maximumSize,this.size)),s.size=t,this.relayout(o,r)}finally{this.state=R4.Idle}}}distributeViewSizes(){let e=[],t=0;for(let a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),t+=a.size);let n=Math.floor(t/e.length);for(let a of e)a.size=Ml(n,a.minimumSize,a.maximumSize);let o=Ya(this.viewItems.length),r=o.filter(a=>this.viewItems[a].priority===1),s=o.filter(a=>this.viewItems[a].priority===2);this.relayout(r,s)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,n=this.viewItems.length,o){if(this.state!==R4.Idle)throw new Error("Cant modify splitview");this.state=R4.Busy;try{let r=pt(".split-view-view");n===this.viewItems.length?this.viewContainer.appendChild(r):this.viewContainer.insertBefore(r,this.viewContainer.children.item(n));let s=e.onDidChange(h=>this.onViewChange(d,h)),a=Yt(()=>this.viewContainer.removeChild(r)),l=vl(s,a),c;typeof t=="number"?c=t:(t.type==="auto"&&(this.areViewsDistributed()?t={type:"distribute"}:t={type:"split",index:t.index}),t.type==="split"?c=this.getViewSize(t.index)/2:t.type==="invisible"?c={cachedVisibleSize:t.cachedVisibleSize}:c=e.minimumSize);let d=this.orientation===0?new $2e(r,e,c,l):new j2e(r,e,c,l);if(this.viewItems.splice(n,0,d),this.viewItems.length>1){let h={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},f=this.orientation===0?new Cu(this.sashContainer,{getHorizontalSashTop:k=>this.getSashPosition(k),getHorizontalSashWidth:this.getSashOrthogonalSize},{...h,orientation:1}):new Cu(this.sashContainer,{getVerticalSashLeft:k=>this.getSashPosition(k),getVerticalSashHeight:this.getSashOrthogonalSize},{...h,orientation:0}),p=this.orientation===0?k=>({sash:f,start:k.startY,current:k.currentY,alt:k.altKey}):k=>({sash:f,start:k.startX,current:k.currentX,alt:k.altKey}),y=Et.map(f.onDidStart,p)(this.onSashStart,this),v=Et.map(f.onDidChange,p)(this.onSashChange,this),C=Et.map(f.onDidEnd,()=>this.sashItems.findIndex(k=>k.sash===f))(this.onSashEnd,this),w=f.onDidReset(()=>{let k=this.sashItems.findIndex(L=>L.sash===f),D=Ya(k,-1),E=Ya(k+1,this.viewItems.length),A=this.findFirstSnapIndex(D),T=this.findFirstSnapIndex(E);typeof A=="number"&&!this.viewItems[A].visible||typeof T=="number"&&!this.viewItems[T].visible||this._onDidSashReset.fire(k)}),S=vl(y,v,C,w,f),x={sash:f,disposable:S};this.sashItems.splice(n-1,0,x)}r.appendChild(e.element);let u;typeof t!="number"&&t.type==="split"&&(u=[t.index]),o||this.relayout([n],u),!o&&typeof t!="number"&&t.type==="distribute"&&this.distributeViewSizes()}finally{this.state=R4.Idle}}relayout(e,t){let n=this.viewItems.reduce((o,r)=>o+r.size,0);this.resize(this.viewItems.length-1,this.size-n,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,n=this.viewItems.map(d=>d.size),o,r,s=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;let d=Ya(e,-1),u=Ya(e+1,this.viewItems.length);if(r)for(let x of r)FV(d,x),FV(u,x);if(o)for(let x of o)YD(d,x),YD(u,x);let h=d.map(x=>this.viewItems[x]),f=d.map(x=>n[x]),p=u.map(x=>this.viewItems[x]),m=u.map(x=>n[x]),y=d.reduce((x,k)=>x+(this.viewItems[k].minimumSize-n[k]),0),_=d.reduce((x,k)=>x+(this.viewItems[k].maximumSize-n[k]),0),v=u.length===0?Number.POSITIVE_INFINITY:u.reduce((x,k)=>x+(n[k]-this.viewItems[k].minimumSize),0),b=u.length===0?Number.NEGATIVE_INFINITY:u.reduce((x,k)=>x+(n[k]-this.viewItems[k].maximumSize),0),C=Math.max(y,b,s),w=Math.min(v,_,a),S=!1;if(l){let x=this.viewItems[l.index],k=t>=l.limitDelta;S=k!==x.visible,x.setVisible(k,l.size)}if(!S&&c){let x=this.viewItems[c.index],k=ta+l.size,0),n=this.size-t,o=Ya(this.viewItems.length-1,-1),r=o.filter(a=>this.viewItems[a].priority===1),s=o.filter(a=>this.viewItems[a].priority===2);for(let a of s)FV(o,a);for(let a of r)YD(o,a);typeof e=="number"&&YD(o,e);for(let a=0;n!==0&&at+n.size,0);let e=0;for(let t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(t=>t.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this._contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this._contentSize})}updateSashEnablement(){let e=!1,t=this.viewItems.map(l=>e=l.size-l.minimumSize>0||e);e=!1;let n=this.viewItems.map(l=>e=l.maximumSize-l.size>0||e),o=[...this.viewItems].reverse();e=!1;let r=o.map(l=>e=l.size-l.minimumSize>0||e).reverse();e=!1;let s=o.map(l=>e=l.maximumSize-l.size>0||e).reverse(),a=0;for(let l=0;l0||this.startSnappingEnabled)?c.state=1:v&&t[l]&&(a0)return;if(!n.visible&&n.snap)return t}}areViewsDistributed(){let e,t;for(let n of this.viewItems)if(e=e===void 0?n.size:Math.min(e,n.size),t=t===void 0?n.size:Math.max(t,n.size),t-e>2)return!1;return!0}dispose(){var e;(e=this.sashDragState)===null||e===void 0||e.disposable.dispose(),Nn(this.viewItems),this.viewItems=[],this.sashItems.forEach(t=>t.disposable.dispose()),this.sashItems=[],super.dispose()}}});var Mit=P(()=>{});function LNt(i){return{getHeight(e){return i.getHeight(e)},getTemplateId(){return gN.TemplateId}}}var gN,G2e,vN,Nit=P(()=>{Qt();qv();q2e();Xt();nt();Mit();gN=class i{constructor(e,t,n){this.columns=e,this.getColumnSize=n,this.templateId=i.TemplateId,this.renderedTemplates=new Set;let o=new Map(t.map(r=>[r.templateId,r]));this.renderers=[];for(let r of e){let s=o.get(r.templateId);if(!s)throw new Error(`Table cell renderer for template id ${r.templateId} not found.`);this.renderers.push(s)}}renderTemplate(e){let t=ut(e,pt(".monaco-table-tr")),n=[],o=[];for(let s=0;snew G2e(d,u)),l={size:a.reduce((d,u)=>d+u.column.weight,0),views:a.map(d=>({size:d.column.weight,view:d}))};this.splitview=this.disposables.add(new pS(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:l})),this.splitview.el.style.height=`${n.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${n.headerRowHeight}px`;let c=new gN(o,r,d=>this.splitview.getViewSize(d));this.list=this.disposables.add(new Nl(e,this.domNode,LNt(n),[c],s)),Et.any(...a.map(d=>d.onDidLayout))(([d,u])=>c.layoutColumn(d,u),null,this.disposables),this.splitview.onDidSashReset(d=>{let u=o.reduce((f,p)=>f+p.weight,0),h=o[d].weight/u*this.cachedWidth;this.splitview.resizeView(d,h)},null,this.disposables),this.styleElement=ya(this.domNode),this.style(Ktt)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,n=[]){this.list.splice(e,t,n)}getHTMLElement(){return this.domNode}style(e){let t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { +`}_shouldRestoreUndoStack(){let e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,n){let o=typeof e=="string"?e:e.languageId,r=this._modelCreationOptionsByLanguageAndResource[o+t];if(!r){let s=this._configurationService.getValue("editor",{overrideIdentifier:o,resource:t}),a=this._getEOL(t,o);r=dS._readModelOptions({editor:s,eol:a},n),this._modelCreationOptionsByLanguageAndResource[o+t]=r}return r}_updateModelOptions(e){let t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);let n=Object.keys(this._models);for(let o=0,r=n.length;oe){let t=[];for(this._disposedModels.forEach(n=>{n.sharesUndoRedoStack||t.push(n)}),t.sort((n,o)=>n.time-o.time);t.length>0&&this._disposedModelsHeapSize>e;){let n=t.shift();this._removeDisposedModel(n.uri),n.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(n.initialUndoRedoSnapshot)}}}_createModelData(e,t,n,o){let r=this.getCreationOptions(t,n,o),s=new Cp(e,t,r,n,this._undoRedoService,this._languageService,this._languageConfigurationService);if(n&&this._disposedModels.has(Yb(n))){let c=this._removeDisposedModel(n),d=this._undoRedoService.getElements(n),u=this._getSHA1Computer(),h=u.canComputeSHA1(s)?u.computeSHA1(s)===c.sha1:!1;if(h||c.sharesUndoRedoStack){for(let f of d.past)f2(f)&&f.matchesResource(n)&&f.setModel(s);for(let f of d.future)f2(f)&&f.matchesResource(n)&&f.setModel(s);this._undoRedoService.setElementsValidFlag(n,!0,f=>f2(f)&&f.matchesResource(n)),h&&(s._overwriteVersionId(c.versionId),s._overwriteAlternativeVersionId(c.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(c.initialUndoRedoSnapshot))}else c.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(c.initialUndoRedoSnapshot)}let a=Yb(s.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");let l=new B2e(s,c=>this._onWillDispose(c),(c,d)=>this._onDidChangeLanguage(c,d));return this._models[a]=l,l}createModel(e,t,n,o=!1){let r;return t?r=this._createModelData(e,t,n,o):r=this._createModelData(e,ra,n,o),this._onModelAdded.fire(r.model),r.model}getModels(){let e=[],t=Object.keys(this._models);for(let n=0,o=t.length;n0||c.future.length>0){for(let d of c.past)f2(d)&&d.matchesResource(e.uri)&&(r=!0,s+=d.heapSize(e.uri),d.setModel(e.uri));for(let d of c.future)f2(d)&&d.matchesResource(e.uri)&&(r=!0,s+=d.heapSize(e.uri),d.setModel(e.uri))}}let a=dS.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,l=this._getSHA1Computer();if(r)if(!o&&(s>a||!l.canComputeSHA1(e))){let c=n.model.getInitialUndoRedoSnapshot();c!==null&&this._undoRedoService.restoreSnapshot(c)}else this._ensureDisposedModelsHeapSize(a-s),this._undoRedoService.setElementsValidFlag(e.uri,!1,c=>f2(c)&&c.matchesResource(e.uri)),this._insertDisposedModel(new V2e(e.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),o,s,l.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!o){let c=n.model.getInitialUndoRedoSnapshot();c!==null&&this._undoRedoService.restoreSnapshot(c)}delete this._models[t],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){let n=t.oldLanguage,o=e.getLanguageId(),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget),s=this.getCreationOptions(o,e.uri,e.isForSimpleWidget);dS._setModelOptionsForModel(e,s,r),this._onModelModeChanged.fire({model:e,oldLanguageId:n})}_getSHA1Computer(){return new CZ}};uN.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024;uN=dS=vNt([dN(0,Ni),dN(1,Z$),dN(2,Iv),dN(3,Kn),dN(4,An)],uN);CZ=class i{canComputeSHA1(e){return e.getValueLength()<=i.MAX_MODEL_SIZE}computeSHA1(e){let t=new zT,n=e.createSnapshot(),o;for(;o=n.read();)t.update(o);return t.digest()}};CZ.MAX_MODEL_SIZE=10*1024*1024});var Lit=P(()=>{});function bNt(i,e){return{...e,accessibilityProvider:e.accessibilityProvider&&new U2e(i,e.accessibilityProvider)}}var W2e,U2e,wZ,Eit=P(()=>{Vi();mo();Xt();nt();c2e();Gv();W2e=class{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:ue.None}}renderElement(e,t,n,o){var r;if((r=n.disposable)===null||r===void 0||r.dispose(),!n.data)return;let s=this.modelProvider();if(s.isResolved(e))return this.renderer.renderElement(s.get(e),e,n.data,o);let a=new Jn,l=s.resolve(e,a.token);n.disposable={dispose:()=>a.cancel()},this.renderer.renderPlaceholder(e,n.data),l.then(c=>this.renderer.renderElement(c,e,n.data,o))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}},U2e=class{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){let t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}};wZ=class{constructor(e,t,n,o,r={}){let s=()=>this.model,a=o.map(l=>new W2e(l,s));this.list=new Nl(e,t,n,a,bNt(s,r))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return Et.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:n}))}get onPointer(){return Et.map(this.list.onPointer,({element:e,index:t,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:n}))}get onDidChangeSelection(){return Et.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:n})=>({elements:e.map(o=>this._model.get(o)),indexes:t,browserEvent:n}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,Ya(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}});var Dit=P(()=>{});var hS,yNt,hN,CNt,wNt,xNt,SNt,fN,pN,uS,Tit,Cu,fS=P(()=>{Qt();vp();dh();Qi();uv();Xt();nt();Mn();Dit();hS=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},yNt=!1;(function(i){i.North="north",i.South="south",i.East="east",i.West="west"})(hN||(hN={}));CNt=4,wNt=new ge,xNt=300,SNt=new ge,fN=class{constructor(e){this.el=e,this.disposables=new Ye}get onPointerMove(){return this.disposables.add(new _n(pi(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new _n(pi(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}};hS([Tr],fN.prototype,"onPointerMove",null);hS([Tr],fN.prototype,"onPointerUp",null);pN=class{get onPointerMove(){return this.disposables.add(new _n(this.el,vo.Change)).event}get onPointerUp(){return this.disposables.add(new _n(this.el,vo.End)).event}constructor(e){this.el=e,this.disposables=new Ye}dispose(){this.disposables.dispose()}};hS([Tr],pN.prototype,"onPointerMove",null);hS([Tr],pN.prototype,"onPointerUp",null);uS=class{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}};hS([Tr],uS.prototype,"onPointerMove",null);hS([Tr],uS.prototype,"onPointerUp",null);Tit="pointer-events-disabled",Cu=class i extends ue{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){let t=n=>{this.orthogonalStartDragHandleDisposables.clear(),n!==0&&(this._orthogonalStartDragHandle=ut(this.el,pt(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(Yt(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new _n(this._orthogonalStartDragHandle,"mouseenter")).event(()=>i.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new _n(this._orthogonalStartDragHandle,"mouseleave")).event(()=>i.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){let t=n=>{this.orthogonalEndDragHandleDisposables.clear(),n!==0&&(this._orthogonalEndDragHandle=ut(this.el,pt(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(Yt(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new _n(this._orthogonalEndDragHandle,"mouseenter")).event(()=>i.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new _n(this._orthogonalEndDragHandle,"mouseleave")).event(()=>i.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,n){super(),this.hoverDelay=xNt,this.hoverDelayer=this._register(new ba(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new ge),this._onDidStart=this._register(new ge),this._onDidChange=this._register(new ge),this._onDidReset=this._register(new ge),this._onDidEnd=this._register(new ge),this.orthogonalStartSashDisposables=this._register(new Ye),this.orthogonalStartDragHandleDisposables=this._register(new Ye),this.orthogonalEndSashDisposables=this._register(new Ye),this.orthogonalEndDragHandleDisposables=this._register(new Ye),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=ut(e,pt(".monaco-sash")),n.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${n.orthogonalEdge}`),Wi&&this.el.classList.add("mac");let o=this._register(new _n(this.el,"mousedown")).event;this._register(o(u=>this.onPointerStart(u,new fN(e)),this));let r=this._register(new _n(this.el,"dblclick")).event;this._register(r(this.onPointerDoublePress,this));let s=this._register(new _n(this.el,"mouseenter")).event;this._register(s(()=>i.onMouseEnter(this)));let a=this._register(new _n(this.el,"mouseleave")).event;this._register(a(()=>i.onMouseLeave(this))),this._register(ar.addTarget(this.el));let l=this._register(new _n(this.el,vo.Start)).event;this._register(l(u=>this.onPointerStart(u,new pN(this.el)),this));let c=this._register(new _n(this.el,vo.Tap)).event,d;this._register(c(u=>{if(d){clearTimeout(d),d=void 0,this.onPointerDoublePress(u);return}clearTimeout(d),d=setTimeout(()=>d=void 0,250)},this)),typeof n.size=="number"?(this.size=n.size,n.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=CNt,this._register(wNt.event(u=>{this.size=u,this.layout()}))),this._register(SNt.event(u=>this.hoverDelay=u)),this.layoutProvider=t,this.orthogonalStartSash=n.orthogonalStartSash,this.orthogonalEndSash=n.orthogonalEndSash,this.orientation=n.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",yNt),this.layout()}onPointerStart(e,t){nn.stop(e);let n=!1;if(!e.__orthogonalSashEvent){let p=this.getOrthogonalSash(e);p&&(n=!0,e.__orthogonalSashEvent=!0,p.onPointerStart(e,new uS(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new uS(t))),!this.state)return;let o=this.el.ownerDocument.getElementsByTagName("iframe");for(let p of o)p.classList.add(Tit);let r=e.pageX,s=e.pageY,a=e.altKey,l={startX:r,currentX:r,startY:s,currentY:s,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);let c=ya(this.el),d=()=>{let p="";n?p="all-scroll":this.orientation===1?this.state===1?p="s-resize":this.state===2?p="n-resize":p=Wi?"row-resize":"ns-resize":this.state===1?p="e-resize":this.state===2?p="w-resize":p=Wi?"col-resize":"ew-resize",c.textContent=`* { cursor: ${p} !important; }`},u=new Ye;d(),n||this.onDidEnablementChange.event(d,null,u);let h=p=>{nn.stop(p,!1);let m={startX:r,currentX:p.pageX,startY:s,currentY:p.pageY,altKey:a};this._onDidChange.fire(m)},f=p=>{nn.stop(p,!1),this.el.removeChild(c),this.el.classList.remove("active"),this._onDidEnd.fire(),u.dispose();for(let m of o)m.classList.remove(Tit)};t.onPointerMove(h,null,u),t.onPointerUp(f,null,u),u.add(t)}onPointerDoublePress(e){let t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!t&&e.linkedSash&&i.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&i.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){i.onMouseLeave(this)}layout(){if(this.orientation===0){let e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{let e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){var t;let n=(t=e.initialTarget)!==null&&t!==void 0?t:e.target;if(!(!n||!(n instanceof HTMLElement))&&n.classList.contains("orthogonal-drag-handle"))return n.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}});var Iit=P(()=>{});var kNt,xZ,$2e,j2e,R4,mN,pS,q2e=P(()=>{Qt();vp();fS();o1();Vi();sa();Xt();nt();Ox();Jw();ho();Iit();kNt={separatorBorder:it.transparent},xZ=class{set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(e,t){var n,o;if(e!==this.visible){e?(this.size=Ml(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof t=="number"?t:this.size,this.size=0),this.container.classList.toggle("visible",e);try{(o=(n=this.view).setVisible)===null||o===void 0||o.call(n,e)}catch(r){console.error("Splitview: Failed to set visible view"),console.error(r)}}}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){var e;return(e=this.view.proportionalLayout)!==null&&e!==void 0?e:!0}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,n,o){this.container=e,this.view=t,this.disposable=o,this._cachedVisibleSize=void 0,typeof n=="number"?(this._size=n,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=n.cachedVisibleSize)}layout(e,t){this.layoutContainer(e);try{this.view.layout(this.size,e,t)}catch(n){console.error("Splitview: Failed to layout view"),console.error(n)}}dispose(){this.disposable.dispose()}},$2e=class extends xZ{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}},j2e=class extends xZ{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}};(function(i){i[i.Idle=0]="Idle",i[i.Busy=1]="Busy"})(R4||(R4={}));(function(i){i.Distribute={type:"distribute"};function e(o){return{type:"split",index:o}}i.Split=e;function t(o){return{type:"auto",index:o}}i.Auto=t;function n(o){return{type:"invisible",cachedVisibleSize:o}}i.Invisible=n})(mN||(mN={}));pS=class extends ue{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(let t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(let t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){var n,o,r,s,a;super(),this.size=0,this._contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=R4.Idle,this._onDidSashChange=this._register(new ge),this._onDidSashReset=this._register(new ge),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=(n=t.orientation)!==null&&n!==void 0?n:0,this.inverseAltBehavior=(o=t.inverseAltBehavior)!==null&&o!==void 0?o:!1,this.proportionalLayout=(r=t.proportionalLayout)!==null&&r!==void 0?r:!0,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=ut(this.el,pt(".sash-container")),this.viewContainer=pt(".split-view-container"),this.scrollable=this._register(new n1({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:c=>za(pi(this.el),c)})),this.scrollableElement=this._register(new c2(this.viewContainer,{vertical:this.orientation===0?(s=t.scrollbarVisibility)!==null&&s!==void 0?s:1:2,horizontal:this.orientation===1?(a=t.scrollbarVisibility)!==null&&a!==void 0?a:1:2},this.scrollable));let l=this._register(new _n(this.viewContainer,"scroll")).event;this._register(l(c=>{let d=this.scrollableElement.getScrollPosition(),u=Math.abs(this.viewContainer.scrollLeft-d.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,h=Math.abs(this.viewContainer.scrollTop-d.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(u!==void 0||h!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:u,scrollTop:h})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(c=>{c.scrollTopChanged&&(this.viewContainer.scrollTop=c.scrollTop),c.scrollLeftChanged&&(this.viewContainer.scrollLeft=c.scrollLeft)})),ut(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||kNt),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((c,d)=>{let u=$l(c.visible)||c.visible?c.size:{type:"invisible",cachedVisibleSize:c.size},h=c.view;this.doAddView(h,u,d,!0)}),this._contentSize=this.viewItems.reduce((c,d)=>c+d.size,0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,n=this.viewItems.length,o){this.doAddView(e,t,n,o)}layout(e,t){let n=Math.max(this.size,this._contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let o=0;for(let r=0;r0&&(s.size=Ml(Math.round(a*e/o),s.minimumSize,s.maximumSize))}}else{let o=Ya(this.viewItems.length),r=o.filter(a=>this.viewItems[a].priority===1),s=o.filter(a=>this.viewItems[a].priority===2);this.resize(this.viewItems.length-1,e-n,void 0,r,s)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map(e=>e.proportionalLayout&&e.visible?e.size/this._contentSize:void 0))}onSashStart({sash:e,start:t,alt:n}){for(let a of this.viewItems)a.enabled=!1;let o=this.sashItems.findIndex(a=>a.sash===e),r=vl(Xe(this.el.ownerDocument.body,"keydown",a=>s(this.sashDragState.current,a.altKey)),Xe(this.el.ownerDocument.body,"keyup",()=>s(this.sashDragState.current,!1))),s=(a,l)=>{let c=this.viewItems.map(p=>p.size),d=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(l=!l),l)if(o===this.sashItems.length-1){let m=this.viewItems[o];d=(m.minimumSize-m.size)/2,u=(m.maximumSize-m.size)/2}else{let m=this.viewItems[o+1];d=(m.size-m.maximumSize)/2,u=(m.size-m.minimumSize)/2}let h,f;if(!l){let p=Ya(o,-1),m=Ya(o+1,this.viewItems.length),y=p.reduce((k,D)=>k+(this.viewItems[D].minimumSize-c[D]),0),_=p.reduce((k,D)=>k+(this.viewItems[D].viewMaximumSize-c[D]),0),v=m.length===0?Number.POSITIVE_INFINITY:m.reduce((k,D)=>k+(c[D]-this.viewItems[D].minimumSize),0),b=m.length===0?Number.NEGATIVE_INFINITY:m.reduce((k,D)=>k+(c[D]-this.viewItems[D].viewMaximumSize),0),C=Math.max(y,b),w=Math.min(v,_),S=this.findFirstSnapIndex(p),x=this.findFirstSnapIndex(m);if(typeof S=="number"){let k=this.viewItems[S],D=Math.floor(k.viewMinimumSize/2);h={index:S,limitDelta:k.visible?C-D:C+D,size:k.size}}if(typeof x=="number"){let k=this.viewItems[x],D=Math.floor(k.viewMinimumSize/2);f={index:x,limitDelta:k.visible?w+D:w-D,size:k.size}}}this.sashDragState={start:a,current:a,index:o,sizes:c,minDelta:d,maxDelta:u,alt:l,snapBefore:h,snapAfter:f,disposable:r}};s(t,n)}onSashChange({current:e}){let{index:t,start:n,sizes:o,alt:r,minDelta:s,maxDelta:a,snapBefore:l,snapAfter:c}=this.sashDragState;this.sashDragState.current=e;let d=e-n,u=this.resize(t,d,o,void 0,void 0,s,a,l,c);if(r){let h=t===this.sashItems.length-1,f=this.viewItems.map(b=>b.size),p=h?t:t+1,m=this.viewItems[p],y=m.size-m.maximumSize,_=m.size-m.minimumSize,v=h?t-1:t+1;this.resize(v,-u,f,void 0,void 0,y,_)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(let t of this.viewItems)t.enabled=!0}onViewChange(e,t){let n=this.viewItems.indexOf(e);n<0||n>=this.viewItems.length||(t=typeof t=="number"?t:e.size,t=Ml(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&n>0?(this.resize(n-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([n],void 0)))}resizeView(e,t){if(!(e<0||e>=this.viewItems.length)){if(this.state!==R4.Idle)throw new Error("Cant modify splitview");this.state=R4.Busy;try{let n=Ya(this.viewItems.length).filter(a=>a!==e),o=[...n.filter(a=>this.viewItems[a].priority===1),e],r=n.filter(a=>this.viewItems[a].priority===2),s=this.viewItems[e];t=Math.round(t),t=Ml(t,s.minimumSize,Math.min(s.maximumSize,this.size)),s.size=t,this.relayout(o,r)}finally{this.state=R4.Idle}}}distributeViewSizes(){let e=[],t=0;for(let a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),t+=a.size);let n=Math.floor(t/e.length);for(let a of e)a.size=Ml(n,a.minimumSize,a.maximumSize);let o=Ya(this.viewItems.length),r=o.filter(a=>this.viewItems[a].priority===1),s=o.filter(a=>this.viewItems[a].priority===2);this.relayout(r,s)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,n=this.viewItems.length,o){if(this.state!==R4.Idle)throw new Error("Cant modify splitview");this.state=R4.Busy;try{let r=pt(".split-view-view");n===this.viewItems.length?this.viewContainer.appendChild(r):this.viewContainer.insertBefore(r,this.viewContainer.children.item(n));let s=e.onDidChange(h=>this.onViewChange(d,h)),a=Yt(()=>this.viewContainer.removeChild(r)),l=vl(s,a),c;typeof t=="number"?c=t:(t.type==="auto"&&(this.areViewsDistributed()?t={type:"distribute"}:t={type:"split",index:t.index}),t.type==="split"?c=this.getViewSize(t.index)/2:t.type==="invisible"?c={cachedVisibleSize:t.cachedVisibleSize}:c=e.minimumSize);let d=this.orientation===0?new $2e(r,e,c,l):new j2e(r,e,c,l);if(this.viewItems.splice(n,0,d),this.viewItems.length>1){let h={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},f=this.orientation===0?new Cu(this.sashContainer,{getHorizontalSashTop:k=>this.getSashPosition(k),getHorizontalSashWidth:this.getSashOrthogonalSize},{...h,orientation:1}):new Cu(this.sashContainer,{getVerticalSashLeft:k=>this.getSashPosition(k),getVerticalSashHeight:this.getSashOrthogonalSize},{...h,orientation:0}),p=this.orientation===0?k=>({sash:f,start:k.startY,current:k.currentY,alt:k.altKey}):k=>({sash:f,start:k.startX,current:k.currentX,alt:k.altKey}),y=Et.map(f.onDidStart,p)(this.onSashStart,this),v=Et.map(f.onDidChange,p)(this.onSashChange,this),C=Et.map(f.onDidEnd,()=>this.sashItems.findIndex(k=>k.sash===f))(this.onSashEnd,this),w=f.onDidReset(()=>{let k=this.sashItems.findIndex(L=>L.sash===f),D=Ya(k,-1),E=Ya(k+1,this.viewItems.length),A=this.findFirstSnapIndex(D),T=this.findFirstSnapIndex(E);typeof A=="number"&&!this.viewItems[A].visible||typeof T=="number"&&!this.viewItems[T].visible||this._onDidSashReset.fire(k)}),S=vl(y,v,C,w,f),x={sash:f,disposable:S};this.sashItems.splice(n-1,0,x)}r.appendChild(e.element);let u;typeof t!="number"&&t.type==="split"&&(u=[t.index]),o||this.relayout([n],u),!o&&typeof t!="number"&&t.type==="distribute"&&this.distributeViewSizes()}finally{this.state=R4.Idle}}relayout(e,t){let n=this.viewItems.reduce((o,r)=>o+r.size,0);this.resize(this.viewItems.length-1,this.size-n,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,n=this.viewItems.map(d=>d.size),o,r,s=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;let d=Ya(e,-1),u=Ya(e+1,this.viewItems.length);if(r)for(let x of r)VV(d,x),VV(u,x);if(o)for(let x of o)YD(d,x),YD(u,x);let h=d.map(x=>this.viewItems[x]),f=d.map(x=>n[x]),p=u.map(x=>this.viewItems[x]),m=u.map(x=>n[x]),y=d.reduce((x,k)=>x+(this.viewItems[k].minimumSize-n[k]),0),_=d.reduce((x,k)=>x+(this.viewItems[k].maximumSize-n[k]),0),v=u.length===0?Number.POSITIVE_INFINITY:u.reduce((x,k)=>x+(n[k]-this.viewItems[k].minimumSize),0),b=u.length===0?Number.NEGATIVE_INFINITY:u.reduce((x,k)=>x+(n[k]-this.viewItems[k].maximumSize),0),C=Math.max(y,b,s),w=Math.min(v,_,a),S=!1;if(l){let x=this.viewItems[l.index],k=t>=l.limitDelta;S=k!==x.visible,x.setVisible(k,l.size)}if(!S&&c){let x=this.viewItems[c.index],k=ta+l.size,0),n=this.size-t,o=Ya(this.viewItems.length-1,-1),r=o.filter(a=>this.viewItems[a].priority===1),s=o.filter(a=>this.viewItems[a].priority===2);for(let a of s)VV(o,a);for(let a of r)YD(o,a);typeof e=="number"&&YD(o,e);for(let a=0;n!==0&&at+n.size,0);let e=0;for(let t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(t=>t.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this._contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this._contentSize})}updateSashEnablement(){let e=!1,t=this.viewItems.map(l=>e=l.size-l.minimumSize>0||e);e=!1;let n=this.viewItems.map(l=>e=l.maximumSize-l.size>0||e),o=[...this.viewItems].reverse();e=!1;let r=o.map(l=>e=l.size-l.minimumSize>0||e).reverse();e=!1;let s=o.map(l=>e=l.maximumSize-l.size>0||e).reverse(),a=0;for(let l=0;l0||this.startSnappingEnabled)?c.state=1:v&&t[l]&&(a0)return;if(!n.visible&&n.snap)return t}}areViewsDistributed(){let e,t;for(let n of this.viewItems)if(e=e===void 0?n.size:Math.min(e,n.size),t=t===void 0?n.size:Math.max(t,n.size),t-e>2)return!1;return!0}dispose(){var e;(e=this.sashDragState)===null||e===void 0||e.disposable.dispose(),Nn(this.viewItems),this.viewItems=[],this.sashItems.forEach(t=>t.disposable.dispose()),this.sashItems=[],super.dispose()}}});var Mit=P(()=>{});function LNt(i){return{getHeight(e){return i.getHeight(e)},getTemplateId(){return gN.TemplateId}}}var gN,G2e,vN,Nit=P(()=>{Qt();Gv();q2e();Xt();nt();Mit();gN=class i{constructor(e,t,n){this.columns=e,this.getColumnSize=n,this.templateId=i.TemplateId,this.renderedTemplates=new Set;let o=new Map(t.map(r=>[r.templateId,r]));this.renderers=[];for(let r of e){let s=o.get(r.templateId);if(!s)throw new Error(`Table cell renderer for template id ${r.templateId} not found.`);this.renderers.push(s)}}renderTemplate(e){let t=ut(e,pt(".monaco-table-tr")),n=[],o=[];for(let s=0;snew G2e(d,u)),l={size:a.reduce((d,u)=>d+u.column.weight,0),views:a.map(d=>({size:d.column.weight,view:d}))};this.splitview=this.disposables.add(new pS(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:l})),this.splitview.el.style.height=`${n.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${n.headerRowHeight}px`;let c=new gN(o,r,d=>this.splitview.getViewSize(d));this.list=this.disposables.add(new Nl(e,this.domNode,LNt(n),[c],s)),Et.any(...a.map(d=>d.onDidLayout))(([d,u])=>c.layoutColumn(d,u),null,this.disposables),this.splitview.onDidSashReset(d=>{let u=o.reduce((f,p)=>f+p.weight,0),h=o[d].weight/u*this.cachedWidth;this.splitview.resizeView(d,h)},null,this.disposables),this.styleElement=ya(this.domNode),this.style(Ktt)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,n=[]){this.list.splice(e,t,n)}getHTMLElement(){return this.domNode}style(e){let t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { top: ${this.virtualDelegate.headerRowHeight+1}px; height: calc(100% - ${this.virtualDelegate.headerRowHeight}px); }`),this.styleElement.textContent=t.join(` -`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}};vN.InstanceCount=0});var Ait=P(()=>{});var h1,mS=P(()=>{i1();or();Xt();Ait();h1=class extends Ds{constructor(e){super(),this._onChange=this._register(new ge),this.onChange=this._onChange.event,this._onKeyDown=this._register(new ge),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;let t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...ui.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,n=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),n.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,n=>{if(n.keyCode===10||n.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),n.preventDefault(),n.stopPropagation();return}this._onKeyDown.fire(n)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}});var ENt,DNt,TNt,gS,vS,_S,K2e=P(()=>{mS();Go();Wt();ENt=g("caseDescription","Match Case"),DNt=g("wordsDescription","Match Whole Word"),TNt=g("regexDescription","Use Regular Expression"),gS=class extends h1{constructor(e){super({icon:kt.caseSensitive,title:ENt+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},vS=class extends h1{constructor(e){super({icon:kt.wholeWord,title:DNt+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},_S=class extends h1{constructor(e){super({icon:kt.regex,title:TNt+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}});var CZ,Rit=P(()=>{CZ=class{constructor(e,t=0,n=e.length,o=t-1){this.items=e,this.start=t,this.end=n,this.index=o}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}});var wZ,Pit=P(()=>{Rit();wZ=class{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();let e=this._elements;this._navigator=new CZ(e,0,e.length,e.length)}_reduceToLimit(){let e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){let e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(let t of e)this._history.add(t)}get _elements(){let e=[];return this._history.forEach(t=>e.push(t)),e}}});var Oit=P(()=>{});var _N,Y2e,bS,xZ=P(()=>{Qt();vp();vge();u1();Xl();o1();i1();Xt();Pit();Gc();Oit();Wt();_N=pt,Y2e=class extends Ds{constructor(e,t,n){var o;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new ge),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new ge),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=n,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(o=this.options.tooltip)!==null&&o!==void 0?o:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=ut(e,_N(".monaco-inputbox.idle"));let r=this.options.flexibleHeight?"textarea":"input",s=ut(this.element,_N(".ibwrapper"));if(this.input=ut(s,_N(r+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=ut(s,_N("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new ex(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),ut(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(c=>this.input.scrollTop=c.scrollTop));let a=this._register(new _n(e.ownerDocument,"selectionchange")),l=Et.filter(a.event,()=>{let c=e.ownerDocument.getSelection();return c?.anchorNode===s});this._register(l(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new Bs(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:Bg(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return L5(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;let e=this.cachedContentHeight,t=this.cachedHeight,n=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:n})}showMessage(e,t){if(this.state==="open"&&Za(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));let n=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${Gf(n.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e?.type}stylesForType(e){let t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e,t=()=>e.style.width=wl(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:o=>{var r,s;if(!this.message)return null;e=ut(o,_N(".monaco-inputbox-container")),t();let a={inline:!0,className:"monaco-inputbox-message"},l=this.message.formatContent?Aet(this.message.content,a):Net(this.message.content,a);l.classList.add(this.classForType(this.message.type));let c=this.stylesForType(this.message.type);return l.style.backgroundColor=(r=c.background)!==null&&r!==void 0?r:"",l.style.color=(s=c.foreground)!==null&&s!==void 0?s:"",l.style.border=c.border?`1px solid ${c.border}`:"",ut(e,l),null},onHide:()=>{this.state="closed"},layout:t});let n;this.message.type===3?n=g("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?n=g("alertWarningMessage","Warning: {0}",this.message.content):n=g("alertInfoMessage","Info: {0}",this.message.content),Hs(n),this.state="open"}_hideMessage(){this.contextViewProvider&&(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;let e=this.value,n=e.charCodeAt(e.length-1)===10?" ":"";(e+n).replace(/\u000c/g,"")?this.mirror.textContent=e+n:this.mirror.innerText="\xA0",this.layout()}applyStyles(){var e,t,n;let o=this.options.inputBoxStyles,r=(e=o.inputBackground)!==null&&e!==void 0?e:"",s=(t=o.inputForeground)!==null&&t!==void 0?t:"",a=(n=o.inputBorder)!==null&&n!==void 0?n:"";this.element.style.backgroundColor=r,this.element.style.color=s,this.input.style.backgroundColor="inherit",this.input.style.color=s,this.element.style.border=`1px solid ${Gf(a,"transparent")}`}layout(){if(!this.mirror)return;let e=this.cachedContentHeight;this.cachedContentHeight=Bg(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){let t=this.inputElement,n=t.selectionStart,o=t.selectionEnd,r=t.value;n!==null&&o!==null&&(this.value=r.substr(0,n)+e+r.substr(o),t.setSelectionRange(n+1,n+1),this.layout())}dispose(){var e;this._hideMessage(),this.message=null,(e=this.actionbar)===null||e===void 0||e.dispose(),super.dispose()}},bS=class extends Y2e{constructor(e,t,n){let o=g({key:"history.inputbox.hint.suffix.noparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field ends in a closing parenthesis ")", for example "Filter (e.g. text, !exclude)". The character inserted into the final string is \u21C5 to represent the up and down arrow keys.']}," or {0} for history","\u21C5"),r=g({key:"history.inputbox.hint.suffix.inparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field does NOT end in a closing parenthesis (eg. "Find"). The character inserted into the final string is \u21C5 to represent the up and down arrow keys.']}," ({0} for history)","\u21C5");super(e,t,n),this._onDidFocus=this._register(new ge),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new ge),this.onDidBlur=this._onDidBlur.event,this.history=new wZ(n.history,100);let s=()=>{if(n.showHistoryHint&&n.showHistoryHint()&&!this.placeholder.endsWith(o)&&!this.placeholder.endsWith(r)&&this.history.getHistory().length){let a=this.placeholder.endsWith(")")?o:r,l=this.placeholder+a;n.showPlaceholderOnFocus&&!L5(this.input)?this.placeholder=l:this.setPlaceHolder(l)}};this.observer=new MutationObserver((a,l)=>{a.forEach(c=>{c.target.textContent||s()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>s()),this.onblur(this.input,()=>{let a=l=>{if(this.placeholder.endsWith(l)){let c=this.placeholder.slice(0,this.placeholder.length-l.length);return n.showPlaceholderOnFocus?this.placeholder=c:this.setPlaceHolder(c),!0}else return!1};a(r)||a(o)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",hu(this.value?this.value:g("clearedInput","Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,hu(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}});var Z2e=P(()=>{});var INt,Zb,SZ=P(()=>{Qt();K2e();xZ();i1();Xt();Z2e();Wt();nt();INt=g("defaultLabel","input"),Zb=class extends Ds{constructor(e,t,n){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new To),this.additionalToggles=[],this._onDidOptionChange=this._register(new ge),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new ge),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new ge),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new ge),this._onKeyUp=this._register(new ge),this._onCaseSensitiveKeyDown=this._register(new ge),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new ge),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||INt,this.showCommonFindToggles=!!n.showCommonFindToggles;let o=n.appendCaseSensitiveLabel||"",r=n.appendWholeWordsLabel||"",s=n.appendRegexLabel||"",a=n.history||[],l=!!n.flexibleHeight,c=!!n.flexibleWidth,d=n.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new bS(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:a,showHistoryHint:n.showHistoryHint,flexibleHeight:l,flexibleWidth:c,flexibleMaxHeight:d,inputBoxStyles:n.inputBoxStyles})),this.showCommonFindToggles){this.regex=this._register(new _S({appendTitle:s,isChecked:!1,...n.toggleStyles})),this._register(this.regex.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(h=>{this._onRegexKeyDown.fire(h)})),this.wholeWords=this._register(new vS({appendTitle:r,isChecked:!1,...n.toggleStyles})),this._register(this.wholeWords.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new gS({appendTitle:o,isChecked:!1,...n.toggleStyles})),this._register(this.caseSensitive.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(h=>{this._onCaseSensitiveKeyDown.fire(h)}));let u=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){let f=u.indexOf(this.domNode.ownerDocument.activeElement);if(f>=0){let p=-1;h.equals(17)?p=(f+1)%u.length:h.equals(15)&&(f===0?p=u.length-1:p=f-1),h.equals(9)?(u[f].blur(),this.inputBox.focus()):p>=0&&u[p].focus(),nn.stop(h,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(n?.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e?.appendChild(this.domNode),this._register(Xe(this.inputBox.inputElement,"compositionstart",u=>{this.imeSessionInProgress=!0})),this._register(Xe(this.inputBox.inputElement,"compositionend",u=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,u=>this._onKeyDown.fire(u)),this.onkeyup(this.inputBox.inputElement,u=>this._onKeyUp.fire(u)),this.oninput(this.inputBox.inputElement,u=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,u=>this._onMouseDown.fire(u))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){var e,t,n;this.domNode.classList.remove("disabled"),this.inputBox.enable(),(e=this.regex)===null||e===void 0||e.enable(),(t=this.wholeWords)===null||t===void 0||t.enable(),(n=this.caseSensitive)===null||n===void 0||n.enable();for(let o of this.additionalToggles)o.enable()}disable(){var e,t,n;this.domNode.classList.add("disabled"),this.inputBox.disable(),(e=this.regex)===null||e===void 0||e.disable(),(t=this.wholeWords)===null||t===void 0||t.disable(),(n=this.caseSensitive)===null||n===void 0||n.disable();for(let o of this.additionalToggles)o.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(let t of this.additionalToggles)t.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new Ye;for(let t of e??[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange(n=>{this._onDidOptionChange.fire(n),!n&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){var t,n,o,r,s,a;e?this.inputBox.paddingRight=0:this.inputBox.paddingRight=((n=(t=this.caseSensitive)===null||t===void 0?void 0:t.width())!==null&&n!==void 0?n:0)+((r=(o=this.wholeWords)===null||o===void 0?void 0:o.width())!==null&&r!==void 0?r:0)+((a=(s=this.regex)===null||s===void 0?void 0:s.width())!==null&&a!==void 0?a:0)+this.additionalToggles.reduce((l,c)=>l+c.width(),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var e,t;return(t=(e=this.caseSensitive)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){var e,t;return(t=(e=this.wholeWords)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){var e,t;return(t=(e=this.regex)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){var e;(e=this.caseSensitive)===null||e===void 0||e.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}});var wu,Zv,rc,Xb,yS=P(()=>{(function(i){i[i.Expanded=0]="Expanded",i[i.Collapsed=1]="Collapsed",i[i.PreserveOrExpanded=2]="PreserveOrExpanded",i[i.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(wu||(wu={}));(function(i){i[i.Unknown=0]="Unknown",i[i.Twistie=1]="Twistie",i[i.Element=2]="Element",i[i.Filter=3]="Filter"})(Zv||(Zv={}));rc=class extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}},Xb=class{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}});function bN(i){return typeof i=="object"&&"visibility"in i&&"data"in i}function Qb(i){switch(i){case!0:return 1;case!1:return 0;default:return i}}function X2e(i){return typeof i.collapsible=="boolean"}var kZ,LZ=P(()=>{yS();Vi();Qi();nhe();ZT();Xt();Yc();kZ=class{constructor(e,t,n,o={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new L3,this._onDidChangeCollapseState=new ge,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new ge,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new ge,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new ba(zU),this.collapseByDefault=typeof o.collapseByDefault>"u"?!1:o.collapseByDefault,this.filter=o.filter,this.autoExpandSingleChildren=typeof o.autoExpandSingleChildren>"u"?!1:o.autoExpandSingleChildren,this.root={parent:void 0,element:n,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,n=un.empty(),o={}){if(e.length===0)throw new rc(this.user,"Invalid tree location");o.diffIdentityProvider?this.spliceSmart(o.diffIdentityProvider,e,t,n,o):this.spliceSimple(e,t,n,o)}spliceSmart(e,t,n,o,r,s){var a;o===void 0&&(o=un.empty()),s===void 0&&(s=(a=r.diffDepth)!==null&&a!==void 0?a:0);let{parentNode:l}=this.getParentNodeWithListIndex(t);if(!l.lastDiffIds)return this.spliceSimple(t,n,o,r);let c=[...o],d=t[t.length-1],u=new t4({getElements:()=>l.lastDiffIds},{getElements:()=>[...l.children.slice(0,d),...c,...l.children.slice(d+n)].map(y=>e.getId(y.element).toString())}).ComputeDiff(!1);if(u.quitEarly)return l.lastDiffIds=void 0,this.spliceSimple(t,n,c,r);let h=t.slice(0,-1),f=(y,_,v)=>{if(s>0)for(let b=0;bv.originalStart-_.originalStart))f(p,m,p-(y.originalStart+y.originalLength)),p=y.originalStart,m=y.modifiedStart-d,this.spliceSimple([...h,p],y.originalLength,un.slice(c,m,m+y.modifiedLength),r);f(p,m,p)}spliceSimple(e,t,n=un.empty(),{onDidCreateNode:o,onDidDeleteNode:r,diffIdentityProvider:s}){let{parentNode:a,listIndex:l,revealed:c,visible:d}=this.getParentNodeWithListIndex(e),u=[],h=un.map(n,w=>this.createTreeNode(w,a,a.visible?1:0,c,u,o)),f=e[e.length-1],p=0;for(let w=f;w>=0&&ws.getId(w.element).toString())):a.lastDiffIds=a.children.map(w=>s.getId(w.element).toString()):a.lastDiffIds=void 0;let b=0;for(let w of v)w.visible&&b++;if(b!==0)for(let w=f+m.length;wS+(x.visible?x.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(a,_-w),this.list.splice(l,w,u)}if(v.length>0&&r){let w=S=>{r(S),S.children.forEach(w)};v.forEach(w)}this._onDidSplice.fire({insertedNodes:m,deletedNodes:v});let C=a;for(;C;){if(C.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}C=C.parent}}rerender(e){if(e.length===0)throw new rc(this.user,"Invalid tree location");let{node:t,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e);t.visible&&o&&this.list.splice(n,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){let{listIndex:t,visible:n,revealed:o}=this.getTreeNodeWithListIndex(e);return n&&o?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){let n=this.getTreeNode(e);typeof t>"u"&&(t=!n.collapsible);let o={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,o))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,n){let o=this.getTreeNode(e);typeof t>"u"&&(t=!o.collapsed);let r={collapsed:t,recursive:n||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,r))}_setCollapseState(e,t){let{node:n,listIndex:o,revealed:r}=this.getTreeNodeWithListIndex(e),s=this._setListNodeCollapseState(n,o,r,t);if(n!==this.root&&this.autoExpandSingleChildren&&s&&!X2e(t)&&n.collapsible&&!n.collapsed&&!t.recursive){let a=-1;for(let l=0;l-1){a=-1;break}else a=l;a>-1&&this._setCollapseState([...e,a],t)}return s}_setListNodeCollapseState(e,t,n,o){let r=this._setNodeCollapseState(e,o,!1);if(!n||!e.visible||!r)return r;let s=e.renderNodeCount,a=this.updateNodeAfterCollapseChange(e),l=s-(t===-1?0:1);return this.list.splice(t+1,l,a.slice(1)),r}_setNodeCollapseState(e,t,n){let o;if(e===this.root?o=!1:(X2e(t)?(o=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(o=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):o=!1,o&&this._onDidChangeCollapseState.fire({node:e,deep:n})),!X2e(t)&&t.recursive)for(let r of e.children)o=this._setNodeCollapseState(r,t,!0)||o;return o}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){let e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,n,o,r,s){let a={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed<"u",collapsed:typeof e.collapsed>"u"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},l=this._filterNode(a,n);a.visibility=l,o&&r.push(a);let c=e.children||un.empty(),d=o&&l!==0&&!a.collapsed,u=0,h=1;for(let f of c){let p=this.createTreeNode(f,a,l,d,r,s);a.children.push(p),h+=p.renderNodeCount,p.visible&&(p.visibleChildIndex=u++)}return a.collapsible=a.collapsible||a.children.length>0,a.visibleChildrenCount=u,a.visible=l===2?u>0:l===1,a.visible?a.collapsed||(a.renderNodeCount=h):(a.renderNodeCount=0,o&&r.pop()),s?.(a),a}updateNodeAfterCollapseChange(e){let t=e.renderNodeCount,n=[];return this._updateNodeAfterCollapseChange(e,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterCollapseChange(e,t){if(e.visible===!1)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(let n of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(n,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){let t=e.renderNodeCount,n=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterFilterChange(e,t,n,o=!0){let r;if(e!==this.root){if(r=this._filterNode(e,t),r===0)return e.visible=!1,e.renderNodeCount=0,!1;o&&n.push(e)}let s=n.length;e.renderNodeCount=e===this.root?0:1;let a=!1;if(!e.collapsed||r!==0){let l=0;for(let c of e.children)a=this._updateNodeAfterFilterChange(c,r,n,o&&!e.collapsed)||a,c.visible&&(c.visibleChildIndex=l++);e.visibleChildrenCount=l}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=r===2?a:r===1,e.visibility=r),e.visible?e.collapsed||(e.renderNodeCount+=n.length-s):(e.renderNodeCount=0,o&&n.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(t!==0)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){let n=this.filter?this.filter.filter(e.element,t):1;return typeof n=="boolean"?(e.filterData=void 0,n?1:0):bN(n)?(e.filterData=n.data,Qb(n.visibility)):(e.filterData=void 0,Qb(n))}hasTreeNode(e,t=this.root){if(!e||e.length===0)return!0;let[n,...o]=e;return n<0||n>t.children.length?!1:this.hasTreeNode(o,t.children[n])}getTreeNode(e,t=this.root){if(!e||e.length===0)return t;let[n,...o]=e;if(n<0||n>t.children.length)throw new rc(this.user,"Invalid tree location");return this.getTreeNode(o,t.children[n])}getTreeNodeWithListIndex(e){if(e.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};let{parentNode:t,listIndex:n,revealed:o,visible:r}=this.getParentNodeWithListIndex(e),s=e[e.length-1];if(s<0||s>t.children.length)throw new rc(this.user,"Invalid tree location");let a=t.children[s];return{node:a,listIndex:n,revealed:o,visible:r&&a.visible}}getParentNodeWithListIndex(e,t=this.root,n=0,o=!0,r=!0){let[s,...a]=e;if(s<0||s>t.children.length)throw new rc(this.user,"Invalid tree location");for(let l=0;l{});function Q2e(i){return i instanceof E4?new J2e(i):i}function MNt(i,e){return e&&{...e,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new e0e(i,e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent({...t,element:t.element})},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent({...t,element:t.element})}},accessibilityProvider:e.accessibilityProvider&&{...e.accessibilityProvider,getSetSize(t){let n=i(),o=n.getNodeLocation(t),r=n.getParentNodeLocation(o);return n.getNode(r).visibleChildrenCount},getPosInSet(t){return t.visibleChildIndex+1},isChecked:e.accessibilityProvider&&e.accessibilityProvider.isChecked?t=>e.accessibilityProvider.isChecked(t.element):void 0,getRole:e.accessibilityProvider&&e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider&&e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider&&e.accessibilityProvider.getAriaLevel?t=>e.accessibilityProvider.getAriaLevel(t.element):t=>t.depth,getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}}}}function NNt(i,e){return i.position===e.position&&Hit(i,e)}function Hit(i,e){return i.node.element===e.node.element&&i.startIndex===e.startIndex&&i.height===e.height&&i.endIndex===e.endIndex}function Fit(i){let e=Zv.Unknown;return e$(i.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=Zv.Twistie:e$(i.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?e=Zv.Element:e$(i.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(e=Zv.Filter),{browserEvent:i.browserEvent,element:i.element?i.element.element:null,target:e}}function EZ(i,e){e(i),i.children.forEach(t=>EZ(t,e))}var J2e,e0e,CS,CN,t0e,DZ,i0e,R2,Xv,n0e,o0e,r0e,TZ,s0e,a0e,yN,l0e,c0e,wS,wN=P(()=>{Qt();vp();Gl();u1();SZ();xZ();QY();qv();mS();LZ();yS();Ra();Vi();Qi();Go();or();od();Xt();l1();nt();Ox();ho();zit();Wt();J2e=class extends E4{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}};e0e=class{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=ue.None,this.disposables=new Ye}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),t)}onDragStart(e,t){var n,o;(o=(n=this.dnd).onDragStart)===null||o===void 0||o.call(n,Q2e(e),t)}onDragOver(e,t,n,o,r,s=!0){let a=this.dnd.onDragOver(Q2e(e),t&&t.element,n,o,r),l=this.autoExpandNode!==t;if(l&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),typeof t>"u")return a;if(l&&typeof a!="boolean"&&a.autoExpand&&(this.autoExpandDisposable=$h(()=>{let f=this.modelProvider(),p=f.getNodeLocation(t);f.isCollapsed(p)&&f.setCollapsed(p,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof a=="boolean"||!a.accept||typeof a.bubble>"u"||a.feedback){if(!s){let f=typeof a=="boolean"?a:a.accept,p=typeof a=="boolean"?void 0:a.effect;return{accept:f,effect:p,feedback:[n]}}return a}if(a.bubble===1){let f=this.modelProvider(),p=f.getNodeLocation(t),m=f.getParentNodeLocation(p),y=f.getNode(m),_=m&&f.getListIndex(m);return this.onDragOver(e,y,_,o,r,!1)}let c=this.modelProvider(),d=c.getNodeLocation(t),u=c.getListIndex(d),h=c.getListRenderCount(d);return{...a,feedback:Ya(u,u+h)}}drop(e,t,n,o,r){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(Q2e(e),t&&t.element,n,o,r)}onDragEnd(e){var t,n;(n=(t=this.dnd).onDragEnd)===null||n===void 0||n.call(t,e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}};CS=class{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){var n,o;(o=(n=this.delegate).setDynamicHeight)===null||o===void 0||o.call(n,e.element,t)}};(function(i){i.None="none",i.OnHover="onHover",i.Always="always"})(CN||(CN={}));t0e=class{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new Ye,this.onDidChange=Et.forEach(e,n=>this._elements=n,this.disposables)}dispose(){this.disposables.dispose()}},DZ=class i{constructor(e,t,n,o,r,s={}){var a;this.renderer=e,this.modelProvider=t,this.activeNodes=o,this.renderedIndentGuides=r,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=i.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=ue.None,this.disposables=new Ye,this.templateId=e.templateId,this.updateOptions(s),Et.map(n,l=>l.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(a=e.onDidChangeTwistieState)===null||a===void 0||a.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent<"u"){let t=Ml(e.indent,0,40);if(t!==this.indent){this.indent=t;for(let[n,o]of this.renderedNodes)this.renderTreeElement(n,o)}}if(typeof e.renderIndentGuides<"u"){let t=e.renderIndentGuides!==CN.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(let[n,o]of this.renderedNodes)this._renderIndentGuides(n,o);if(this.indentGuidesDisposable.dispose(),t){let n=new Ye;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,n),this.indentGuidesDisposable=n,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof e.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){let t=ut(e,pt(".monaco-tl-row")),n=ut(t,pt(".monaco-tl-indent")),o=ut(t,pt(".monaco-tl-twistie")),r=ut(t,pt(".monaco-tl-contents")),s=this.renderer.renderTemplate(r);return{container:e,indent:n,twistie:o,indentGuidesDisposable:ue.None,templateData:s}}renderElement(e,t,n,o){this.renderedNodes.set(e,n),this.renderedElements.set(e.element,e),this.renderTreeElement(e,n),this.renderer.renderElement(e,t,n.templateData,o)}disposeElement(e,t,n,o){var r,s;n.indentGuidesDisposable.dispose(),(s=(r=this.renderer).disposeElement)===null||s===void 0||s.call(r,e,t,n.templateData,o),typeof o=="number"&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){let t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){let t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){let n=i.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${n}px`,t.indent.style.width=`${n+this.indent-16}px`,e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...ui.asClassNameArray(kt.treeItemExpanded));let o=!1;this.renderer.renderTwistie&&(o=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(o||t.twistie.classList.add(...ui.asClassNameArray(kt.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if(is(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;let n=new Ye,o=this.modelProvider();for(;;){let r=o.getNodeLocation(e),s=o.getParentNodeLocation(r);if(!s)break;let a=o.getNode(s),l=pt(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(a)&&l.classList.add("active"),t.indent.childElementCount===0?t.indent.appendChild(l):t.indent.insertBefore(l,t.indent.firstElementChild),this.renderedIndentGuides.add(a,l),n.add(Yt(()=>this.renderedIndentGuides.delete(a,l))),e=a}t.indentGuidesDisposable=n}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;let t=new Set,n=this.modelProvider();e.forEach(o=>{let r=n.getNodeLocation(o);try{let s=n.getParentNodeLocation(r);o.collapsible&&o.children.length>0&&!o.collapsed?t.add(o):s&&t.add(n.getNode(s))}catch{}}),this.activeIndentNodes.forEach(o=>{t.has(o)||this.renderedIndentGuides.forEach(o,r=>r.classList.remove("active"))}),t.forEach(o=>{this.activeIndentNodes.has(o)||this.renderedIndentGuides.forEach(o,r=>r.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),Nn(this.disposables)}};DZ.DefaultIndent=8;i0e=class{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,n){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=n,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new Ye,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let n=1;if(this._filter){let s=this._filter.filter(e,t);if(typeof s=="boolean"?n=s?1:0:bN(s)?n=Qb(s.visibility):n=s,n===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:_u.Default,visibility:n};let o=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),r=Array.isArray(o)?o:[o];for(let s of r){let a=s&&s.toString();if(typeof a>"u")return{data:_u.Default,visibility:n};let l;if(this.tree.findMatchType===Xv.Contiguous){let c=a.toLowerCase().indexOf(this._lowercasePattern);if(c>-1){l=[Number.MAX_SAFE_INTEGER,0];for(let d=this._lowercasePattern.length;d>0;d--)l.push(c+d-1)}}else l=E2(this._pattern,this._lowercasePattern,0,a,a.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(l)return this._matchCount++,r.length===1?{data:l,visibility:n}:{data:{label:a,score:l},visibility:n}}return this.tree.findMode===R2.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:_u.Default,visibility:n}}reset(){this._totalCount=0,this._matchCount=0}dispose(){Nn(this.disposables)}};(function(i){i[i.Highlight=0]="Highlight",i[i.Filter=1]="Filter"})(R2||(R2={}));(function(i){i[i.Fuzzy=0]="Fuzzy",i[i.Contiguous=1]="Contiguous"})(Xv||(Xv={}));n0e=class{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,n,o,r,s={}){var a,l;this.tree=e,this.view=n,this.filter=o,this.contextViewProvider=r,this.options=s,this._pattern="",this.width=0,this._onDidChangeMode=new ge,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new ge,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new ge,this._onDidChangeOpenState=new ge,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new Ye,this.disposables=new Ye,this._mode=(a=e.options.defaultFindMode)!==null&&a!==void 0?a:R2.Highlight,this._matchType=(l=e.options.defaultFindMatchType)!==null&&l!==void 0?l:Xv.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){e.defaultFindMode!==void 0&&(this.mode=e.defaultFindMode),e.defaultFindMatchType!==void 0&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){var e,t,n,o;let r=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&r?!((e=this.tree.options.showNotFoundMessage)!==null&&e!==void 0)||e?(t=this.widget)===null||t===void 0||t.showMessage({type:2,content:g("not found","No elements found.")}):(n=this.widget)===null||n===void 0||n.showMessage({type:2}):(o=this.widget)===null||o===void 0||o.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!_u.isDefault(e.filterData)}layout(e){var t;this.width=e,(t=this.widget)===null||t===void 0||t.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}};o0e=class{constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return uo(this.stickyNodes,e.stickyNodes,NNt)}lastNodePartiallyVisible(){if(this.count===0)return!1;let e=this.stickyNodes[this.count-1];if(this.count===1)return e.position!==0;let t=this.stickyNodes[this.count-2];return t.position+t.height!==e.position}animationStateChanged(e){if(!uo(this.stickyNodes,e.stickyNodes,Hit)||this.count===0)return!1;let t=this.stickyNodes[this.count-1],n=e.stickyNodes[e.count-1];return t.position!==n.position}},r0e=class{constrainStickyScrollNodes(e,t,n){for(let o=0;on||o>=t)return e.slice(0,o)}return e}},TZ=class extends ue{constructor(e,t,n,o,r,s={}){var a;super(),this.tree=e,this.model=t,this.view=n,this.treeDelegate=r,this.maxWidgetViewRatio=.4;let l=this.validateStickySettings(s);this.stickyScrollMaxItemCount=l.stickyScrollMaxItemCount,this.stickyScrollDelegate=(a=s.stickyScrollDelegate)!==null&&a!==void 0?a:new r0e,this._widget=this._register(new s0e(n.getScrollableElement(),n,e,o,r,s.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(n.onDidScroll(()=>this.update())),this._register(n.onDidChangeContentHeight(()=>this.update())),this._register(e.onDidChangeCollapseState(()=>this.update())),this.update()}getNodeAtHeight(e){let t;if(e===0?t=this.view.firstVisibleIndex:t=this.view.indexAt(e+this.view.scrollTop),!(t<0||t>=this.view.length))return this.view.element(t)}update(){let e=this.getNodeAtHeight(0);if(!e||this.tree.scrollTop===0){this._widget.setState(void 0);return}let t=this.findStickyState(e);this._widget.setState(t)}findStickyState(e){let t=[],n=e,o=0,r=this.getNextStickyNode(n,void 0,o);for(;r&&(t.push(r),o+=r.height,!(t.length<=this.stickyScrollMaxItemCount&&(n=this.getNextVisibleNode(r),!n)));)r=this.getNextStickyNode(n,r.node,o);let s=this.constrainStickyNodes(t);return s.length?new o0e(s):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,t,n){let o=this.getAncestorUnderPrevious(e,t);if(o&&!(o===e&&(!this.nodeIsUncollapsedParent(e)||this.nodeTopAlignsWithStickyNodesBottom(e,n))))return this.createStickyScrollNode(o,n)}nodeTopAlignsWithStickyNodesBottom(e,t){let n=this.getNodeIndex(e),o=this.view.getElementTop(n),r=t;return this.view.scrollTop===o-r}createStickyScrollNode(e,t){let n=this.treeDelegate.getHeight(e),{startIndex:o,endIndex:r}=this.getNodeRange(e),s=this.calculateStickyNodePosition(r,t,n);return{node:e,position:s,height:n,startIndex:o,endIndex:r}}getAncestorUnderPrevious(e,t=void 0){let n=e,o=this.getParentNode(n);for(;o;){if(o===t)return n;n=o,o=this.getParentNode(n)}if(t===void 0)return n}calculateStickyNodePosition(e,t,n){let o=this.view.getRelativeTop(e);if(o===null&&this.view.firstVisibleIndex===e&&e+1l&&t<=l?l-n:t}constrainStickyNodes(e){if(e.length===0)return[];let t=this.view.renderHeight*this.maxWidgetViewRatio,n=e[e.length-1];if(e.length<=this.stickyScrollMaxItemCount&&n.position+n.height<=t)return e;let o=this.stickyScrollDelegate.constrainStickyScrollNodes(e,this.stickyScrollMaxItemCount,t);if(!o.length)return[];let r=o[o.length-1];if(o.length>this.stickyScrollMaxItemCount||r.position+r.height>t)throw new Error("stickyScrollDelegate violates constraints");return o}getParentNode(e){let t=this.model.getNodeLocation(e),n=this.model.getParentNodeLocation(t);return n?this.model.getNode(n):void 0}nodeIsUncollapsedParent(e){let t=this.model.getNodeLocation(e);return this.model.getListRenderCount(t)>1}getNodeIndex(e){let t=this.model.getNodeLocation(e);return this.model.getListIndex(t)}getNodeRange(e){let t=this.model.getNodeLocation(e),n=this.model.getListIndex(t);if(n<0)throw new Error("Node not found in tree");let o=this.model.getListRenderCount(t),r=n+o-1;return{startIndex:n,endIndex:r}}nodePositionTopBelowWidget(e){let t=[],n=this.getParentNode(e);for(;n;)t.push(n),n=this.getParentNode(n);let o=0;for(let r=0;r0,n=!!e&&e.count>0;if(!t&&!n||t&&n&&this._previousState.equal(e))return;if(t!==n&&this.setVisible(n),!n){this._previousState=void 0,this._previousElements=[],this._previousStateDisposables.clear();return}let o=e.stickyNodes[e.count-1];if(this._previousState&&e.animationStateChanged(this._previousState))this._previousElements[this._previousState.count-1].style.top=`${o.position}px`;else{this._previousStateDisposables.clear();let r=Array(e.count);for(let s=e.count-1;s>=0;s--){let a=e.stickyNodes[s],{element:l,disposable:c}=this.createElement(a,s,e.count);r[s]=l,this._rootDomNode.appendChild(l),this._previousStateDisposables.add(c)}this.stickyScrollFocus.updateElements(r,e),this._previousElements=r}this._previousState=e,this._rootDomNode.style.height=`${o.position+o.height}px`}createElement(e,t,n){let o=e.startIndex,r=document.createElement("div");r.style.top=`${e.position}px`,r.style.height=`${e.height}px`,r.style.lineHeight=`${e.height}px`,r.classList.add("monaco-tree-sticky-row"),r.classList.add("monaco-list-row"),r.setAttribute("data-index",`${o}`),r.setAttribute("data-parity",o%2===0?"even":"odd"),r.setAttribute("id",this.view.getElementID(o)),this.setAccessibilityAttributes(r,e.node.element,t,n);let s=this.treeDelegate.getTemplateId(e.node),a=this.treeRenderers.find(u=>u.templateId===s);if(!a)throw new Error(`No renderer found for template id ${s}`);let l=e.node;l===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(l=new Proxy(e.node,{}));let c=a.renderTemplate(r);a.renderElement(l,e.startIndex,c,e.height);let d=Yt(()=>{a.disposeElement(l,e.startIndex,c,e.height),a.disposeTemplate(c),r.remove()});return{element:r,disposable:d}}setAccessibilityAttributes(e,t,n,o){var r;if(!this.accessibilityProvider)return;this.accessibilityProvider.getSetSize&&e.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(t,n,o))),this.accessibilityProvider.getPosInSet&&e.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(t,n))),this.accessibilityProvider.getRole&&e.setAttribute("role",(r=this.accessibilityProvider.getRole(t))!==null&&r!==void 0?r:"treeitem");let s=this.accessibilityProvider.getAriaLabel(t);s&&e.setAttribute("aria-label",s);let a=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(t);typeof a=="number"&&e.setAttribute("aria-level",`${a}`),e.setAttribute("aria-selected",String(!1))}setVisible(e){this._rootDomNode.classList.toggle("empty",!e),e||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}},a0e=class extends ue{get domHasFocus(){return this._domHasFocus}set domHasFocus(e){e!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(e),this._domHasFocus=e)}constructor(e,t){super(),this.container=e,this.view=t,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=new ge,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new ge,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this.container.addEventListener("focus",()=>this.onFocus()),this.container.addEventListener("blur",()=>this.onBlur()),this._register(this.view.onDidFocus(()=>this.toggleStickyScrollFocused(!1))),this._register(this.view.onKeyDown(n=>this.onKeyDown(n))),this._register(this.view.onMouseDown(n=>this.onMouseDown(n))),this._register(this.view.onContextMenu(n=>this.handleContextMenu(n)))}handleContextMenu(e){let t=e.browserEvent.target;if(!sN(t)&&!nS(t)){this.focusedLast()&&this.view.domFocus();return}if(!YC(e.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");let s=this.state.stickyNodes.findIndex(a=>{var l;return a.node.element===((l=e.element)===null||l===void 0?void 0:l.element)});if(s===-1)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");this.container.focus(),this.setFocus(s);return}if(!this.state||this.focusedIndex<0)throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget");let o=this.state.stickyNodes[this.focusedIndex].node.element,r=this.elements[this.focusedIndex];this._onContextMenu.fire({element:o,anchor:r,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state){if(e.key==="ArrowUp")this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if(e.key==="ArrowDown"||e.key==="ArrowRight"){if(this.focusedIndex>=this.state.count-1){let t=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([t]),this.scrollNodeUnderWidget(t,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}}onMouseDown(e){let t=e.browserEvent.target;!sN(t)&&!nS(t)||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,t){if(t&&t.count===0)throw new Error("Sticky scroll state must be undefined when there are no sticky nodes");if(t&&t.count!==e.length)throw new Error("Sticky scroll focus received illigel state");let n=this.focusedIndex;if(this.removeFocus(),this.elements=e,this.state=t,t){let o=Ml(n,0,t.count-1);this.setFocus(o)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=t?0:-1}setFocusedElement(e){let t=this.state;if(!t)throw new Error("Cannot set focus when state is undefined");if(this.setFocus(e),!(e1?t.stickyNodes[t.count-2]:void 0,r=this.view.getElementTop(e),s=o?o.position+o.height+n.height:n.height;this.view.scrollTop=r-s}domFocus(){if(!this.state)throw new Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return this.state?this.view.getHTMLElement().classList.contains("sticky-scroll-focused"):!1}removeFocus(){this.focusedIndex!==-1&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(e){if(0>e)throw new Error("addFocus() can not remove focus");if(!this.state&&e>=0)throw new Error("Cannot set focus index when state is undefined");if(this.state&&e>=this.state.count)throw new Error("Cannot set focus index to an index that does not exist");let t=this.focusedIndex;t>=0&&this.toggleElementFocus(this.elements[t],!1),e>=0&&this.toggleElementFocus(this.elements[e],!0),this.focusedIndex=e}toggleElementFocus(e,t){e.classList.toggle("focused",t)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||this.elements.length===0)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.focusedIndex===-1&&this.setFocus(0)}onBlur(){this.domHasFocus=!1}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}};yN=class{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new ge,this.onDidChange=this._onDidChange.event}set(e,t){!t?.__forceEvent&&uo(this.nodes,e)||this._set(e,!1,t)}_set(e,t,n){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){let o=this;this._onDidChange.fire({get elements(){return o.get()},browserEvent:n})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){let l=this.createNodeSet(),c=d=>l.delete(d);t.forEach(d=>EZ(d,c)),this.set([...l.values()]);return}let n=new Set,o=l=>n.add(this.identityProvider.getId(l.element).toString());t.forEach(l=>EZ(l,o));let r=new Map,s=l=>r.set(this.identityProvider.getId(l.element).toString(),l);e.forEach(l=>EZ(l,s));let a=[];for(let l of this.nodes){let c=this.identityProvider.getId(l.element).toString();if(!n.has(c))a.push(l);else{let u=r.get(c);u&&u.visible&&a.push(u)}}if(this.nodes.length>0&&a.length===0){let l=this.getFirstViewElementWithTrait();l&&a.push(l)}this._set(a,!0)}createNodeSet(){let e=new Set;for(let t of this.nodes)e.add(t);return e}},l0e=class extends nN{constructor(e,t,n){super(e),this.tree=t,this.stickyScrollProvider=n}onViewPointer(e){if(C2e(e.browserEvent.target)||T4(e.browserEvent.target)||eS(e.browserEvent.target)||e.browserEvent.isHandledByList)return;let t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);let n=e.browserEvent.target,o=n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,r=nS(e.browserEvent.target),s=!1;if(r?s=!0:typeof this.tree.expandOnlyOnTwistieClick=="function"?s=this.tree.expandOnlyOnTwistieClick(t.element):s=!!this.tree.expandOnlyOnTwistieClick,r)this.handleStickyScrollMouseEvent(e,t);else{if(s&&!o&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e)}if(t.collapsible&&(!r||o)){let a=this.tree.getNodeLocation(t),l=e.browserEvent.altKey;if(this.tree.setFocus([a]),this.tree.toggleCollapsed(a,l),s&&o){e.browserEvent.isHandledByList=!0;return}}r||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,t){if(qtt(e.browserEvent.target)||Gtt(e.browserEvent.target))return;let n=this.stickyScrollProvider();if(!n)throw new Error("Sticky scroll controller not found");let o=this.list.indexOf(t),r=this.list.getElementTop(o),s=n.nodePositionTopBelowWidget(t);this.tree.scrollTop=r-s,this.list.domFocus(),this.list.setFocus([o]),this.list.setSelection([o])}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||e.browserEvent.isHandledByList||super.onDoubleClick(e)}onMouseDown(e){let t=e.browserEvent.target;if(!sN(t)&&!nS(t)){super.onMouseDown(e);return}}onContextMenu(e){let t=e.browserEvent.target;if(!sN(t)&&!nS(t)){super.onContextMenu(e);return}}},c0e=class extends Nl{constructor(e,t,n,o,r,s,a,l){super(e,t,n,o,l),this.focusTrait=r,this.selectionTrait=s,this.anchorTrait=a}createMouseController(e){return new l0e(this,e.tree,e.stickyScrollProvider)}splice(e,t,n=[]){if(super.splice(e,t,n),n.length===0)return;let o=[],r=[],s;n.forEach((a,l)=>{this.focusTrait.has(a)&&o.push(e+l),this.selectionTrait.has(a)&&r.push(e+l),this.anchorTrait.has(a)&&(s=e+l)}),o.length>0&&super.setFocus(Oh([...super.getFocus(),...o])),r.length>0&&super.setSelection(Oh([...super.getSelection(),...r])),typeof s=="number"&&super.setAnchor(s)}setFocus(e,t,n=!1){super.setFocus(e,t),n||this.focusTrait.set(e.map(o=>this.element(o)),t)}setSelection(e,t,n=!1){super.setSelection(e,t),n||this.selectionTrait.set(e.map(o=>this.element(o)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(typeof e>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}},wS=class{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return Et.filter(Et.map(this.view.onMouseDblClick,Fit),e=>e.target!==Zv.Filter)}get onPointer(){return Et.map(this.view.onPointer,Fit)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return Et.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e,t;return(t=(e=this.findController)===null||e===void 0?void 0:e.mode)!==null&&t!==void 0?t:R2.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){var e,t;return(t=(e=this.findController)===null||e===void 0?void 0:e.matchType)!==null&&t!==void 0?t:Xv.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,n,o,r={}){var s;this._user=e,this._options=r,this.eventBufferer=new L3,this.onDidChangeFindOpenState=Et.None,this.onDidChangeStickyScrollFocused=Et.None,this.disposables=new Ye,this._onWillRefilter=new ge,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new ge,this.treeDelegate=new CS(n);let a=new lT,l=new lT,c=this.disposables.add(new t0e(l.event)),d=new nv;this.renderers=o.map(m=>new DZ(m,()=>this.model,a.event,c,d,r));for(let m of this.renderers)this.disposables.add(m);let u;r.keyboardNavigationLabelProvider&&(u=new i0e(this,r.keyboardNavigationLabelProvider,r.filter),r={...r,filter:u},this.disposables.add(u)),this.focus=new yN(()=>this.view.getFocusedElements()[0],r.identityProvider),this.selection=new yN(()=>this.view.getSelectedElements()[0],r.identityProvider),this.anchor=new yN(()=>this.view.getAnchorElement(),r.identityProvider),this.view=new c0e(e,t,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...MNt(()=>this.model,r),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(e,this.view,r),a.input=this.model.onDidChangeCollapseState;let h=Et.forEach(this.model.onDidSplice,m=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(m),this.selection.onDidModelSplice(m)})},this.disposables);h(()=>null,null,this.disposables);let f=this.disposables.add(new ge),p=this.disposables.add(new ba(0));if(this.disposables.add(Et.any(h,this.focus.onDidChange,this.selection.onDidChange)(()=>{p.trigger(()=>{let m=new Set;for(let y of this.focus.getNodes())m.add(y);for(let y of this.selection.getNodes())m.add(y);f.fire([...m.values()])})})),l.input=f.event,r.keyboardSupport!==!1){let m=Et.chain(this.view.onKeyDown,y=>y.filter(_=>!T4(_.target)).map(_=>new qn(_)));Et.chain(m,y=>y.filter(_=>_.keyCode===15))(this.onLeftArrow,this,this.disposables),Et.chain(m,y=>y.filter(_=>_.keyCode===17))(this.onRightArrow,this,this.disposables),Et.chain(m,y=>y.filter(_=>_.keyCode===10))(this.onSpace,this,this.disposables)}if((!((s=r.findWidgetEnabled)!==null&&s!==void 0)||s)&&r.keyboardNavigationLabelProvider&&r.contextViewProvider){let m=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new n0e(this,this.model,this.view,u,r.contextViewProvider,m),this.focusNavigationFilter=y=>this.findController.shouldAllowFocus(y),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=Et.None,this.onDidChangeFindMatchType=Et.None;r.enableStickyScroll&&(this.stickyScrollController=new TZ(this,this.model,this.view,this.renderers,this.treeDelegate,r),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=ya(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===CN.Always)}updateOptions(e={}){var t;this._options={...this._options,...e};for(let n of this.renderers)n.updateOptions(e);this.view.updateOptions(this._options),(t=this.findController)===null||t===void 0||t.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===CN.Always)}get options(){return this._options}updateStickyScroll(e){var t;!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new TZ(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=Et.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),(t=this.stickyScrollController)===null||t===void 0||t.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}domFocus(){var e;!((e=this.stickyScrollController)===null||e===void 0)&&e.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}layout(e,t){var n;this.view.layout(e,t),zh(t)&&((n=this.findController)===null||n===void 0||n.layout(t))}style(e){var t;let n=`.${this.view.domId}`,o=[];e.treeIndentGuidesStroke&&(o.push(`.monaco-list${n}:hover .monaco-tl-indent > .indent-guide, .monaco-list${n}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),o.push(`.monaco-list${n} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),e.listBackground&&(o.push(`.monaco-list${n} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${e.listBackground}; }`),o.push(`.monaco-list${n} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${e.listBackground}; }`)),e.listFocusForeground&&(o.push(`.monaco-list${n}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),o.push(`.monaco-list${n}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));let r=Gf(e.listFocusAndSelectionOutline,Gf(e.listSelectionOutline,(t=e.listFocusOutline)!==null&&t!==void 0?t:""));r&&(o.push(`.monaco-list${n}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${r}; outline-offset: -1px;}`),o.push(`.monaco-list${n}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(o.push(`.monaco-list${n}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),o.push(`.monaco-list${n}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),o.push(`.monaco-workbench.context-menu-visible .monaco-list${n}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),o.push(`.monaco-workbench.context-menu-visible .monaco-list${n}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=o.join(` -`),this.view.style(e)}getParentElement(e){let t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){this.eventBufferer.bufferEvents(()=>{let n=e.map(r=>this.model.getNode(r));this.selection.set(n,t);let o=e.map(r=>this.model.getListIndex(r)).filter(r=>r>-1);this.view.setSelection(o,t,!0)})}getSelection(){return this.selection.get()}setFocus(e,t){this.eventBufferer.bufferEvents(()=>{let n=e.map(r=>this.model.getNode(r));this.focus.set(n,t);let o=e.map(r=>this.model.getListIndex(r)).filter(r=>r>-1);this.view.setFocus(o,t,!0)})}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);let n=this.model.getListIndex(e);if(n!==-1)if(!this.stickyScrollController)this.view.reveal(n,t);else{let o=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(n,t,o)}}onLeftArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(t.length===0)return;let n=t[0],o=this.model.getNodeLocation(n);if(!this.model.setCollapsed(o,!0)){let s=this.model.getParentNodeLocation(o);if(!s)return;let a=this.model.getListIndex(s);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(t.length===0)return;let n=t[0],o=this.model.getNodeLocation(n);if(!this.model.setCollapsed(o,!1)){if(!n.children.some(l=>l.visible))return;let[s]=this.view.getFocus(),a=s+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(t.length===0)return;let n=t[0],o=this.model.getNodeLocation(n),r=e.browserEvent.altKey;this.model.setCollapsed(o,void 0,r)}dispose(){var e;Nn(this.disposables),(e=this.stickyScrollController)===null||e===void 0||e.dispose(),this.view.dispose()}}});var Qv,IZ=P(()=>{LZ();yS();Yc();Qv=class{constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new kZ(e,t,null,n),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,n.sorter&&(this.sorter={compare(o,r){return n.sorter.compare(o.element,r.element)}}),this.identityProvider=n.identityProvider}setChildren(e,t=un.empty(),n={}){let o=this.getElementLocation(e);this._setChildren(o,this.preserveCollapseState(t),n)}_setChildren(e,t=un.empty(),n){let o=new Set,r=new Set,s=l=>{var c;if(l.element===null)return;let d=l;if(o.add(d.element),this.nodes.set(d.element,d),this.identityProvider){let u=this.identityProvider.getId(d.element).toString();r.add(u),this.nodesByIdentity.set(u,d)}(c=n.onDidCreateNode)===null||c===void 0||c.call(n,d)},a=l=>{var c;if(l.element===null)return;let d=l;if(o.has(d.element)||this.nodes.delete(d.element),this.identityProvider){let u=this.identityProvider.getId(d.element).toString();r.has(u)||this.nodesByIdentity.delete(u)}(c=n.onDidDeleteNode)===null||c===void 0||c.call(n,d)};this.model.splice([...e,0],Number.MAX_VALUE,t,{...n,onDidCreateNode:s,onDidDeleteNode:a})}preserveCollapseState(e=un.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),un.map(e,t=>{let n=this.nodes.get(t.element);if(!n&&this.identityProvider){let s=this.identityProvider.getId(t.element).toString();n=this.nodesByIdentity.get(s)}if(!n){let s;return typeof t.collapsed>"u"?s=void 0:t.collapsed===wu.Collapsed||t.collapsed===wu.PreserveOrCollapsed?s=!0:t.collapsed===wu.Expanded||t.collapsed===wu.PreserveOrExpanded?s=!1:s=!!t.collapsed,{...t,children:this.preserveCollapseState(t.children),collapsed:s}}let o=typeof t.collapsible=="boolean"?t.collapsible:n.collapsible,r;return typeof t.collapsed>"u"||t.collapsed===wu.PreserveOrCollapsed||t.collapsed===wu.PreserveOrExpanded?r=n.collapsed:t.collapsed===wu.Collapsed?r=!0:t.collapsed===wu.Expanded?r=!1:r=!!t.collapsed,{...t,collapsible:o,collapsed:r,children:this.preserveCollapseState(t.children)}})}rerender(e){let t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){let t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){let t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){let t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){let t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){let n=this.getElementLocation(e);return this.model.setCollapsible(n,t)}isCollapsed(e){let t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){let o=this.getElementLocation(e);return this.model.setCollapsed(o,t,n)}expandTo(e){let t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);let t=this.nodes.get(e);if(!t)throw new rc(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new rc(this.user,"Invalid getParentNodeLocation call");let t=this.nodes.get(e);if(!t)throw new rc(this.user,`Tree element not found: ${e}`);let n=this.model.getNodeLocation(t),o=this.model.getParentNodeLocation(n);return this.model.getNode(o).element}getElementLocation(e){if(e===null)return[];let t=this.nodes.get(e);if(!t)throw new rc(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}});function MZ(i){let e=[i.element],t=i.incompressible||!1;return{element:{elements:e,incompressible:t},children:un.map(un.from(i.children),MZ),collapsible:i.collapsible,collapsed:i.collapsed}}function NZ(i){let e=[i.element],t=i.incompressible||!1,n,o;for(;[o,n]=un.consume(un.from(i.children),2),!(o.length!==1||o[0].incompressible);)i=o[0],e.push(i.element);return{element:{elements:e,incompressible:t},children:un.map(un.concat(o,n),NZ),collapsible:i.collapsible,collapsed:i.collapsed}}function d0e(i,e=0){let t;return ed0e(n,0)),e===0&&i.element.incompressible?{element:i.element.elements[e],children:t,incompressible:!0,collapsible:i.collapsible,collapsed:i.collapsed}:{element:i.element.elements[e],children:t,collapsible:i.collapsible,collapsed:i.collapsed}}function Bit(i){return d0e(i,0)}function Vit(i,e,t){return i.element===e?{...i,children:t}:{...i,children:un.map(un.from(i.children),n=>Vit(n,e,t))}}function PNt(i,e){return{splice(t,n,o){e.splice(t,n,o.map(r=>i.map(r)))},updateElementHeight(t,n){e.updateElementHeight(t,n)}}}function ONt(i,e){return{...e,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(i(t))}},sorter:e.sorter&&{compare(t,n){return e.sorter.compare(t.elements[0],n.elements[0])}},filter:e.filter&&{filter(t,n){return e.filter.filter(i(t),n)}}}}var ANt,u0e,RNt,h0e,AZ,Wit=P(()=>{IZ();yS();Vi();Xt();Yc();ANt=i=>({getId(e){return e.elements.map(t=>i.getId(t).toString()).join("\0")}}),u0e=class{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new Qv(e,t,n),this.enabled=typeof n.compressionEnabled>"u"?!0:n.compressionEnabled,this.identityProvider=n.identityProvider}setChildren(e,t=un.empty(),n){let o=n.diffIdentityProvider&&ANt(n.diffIdentityProvider);if(e===null){let p=un.map(t,this.enabled?NZ:MZ);this._setChildren(null,p,{diffIdentityProvider:o,diffDepth:1/0});return}let r=this.nodes.get(e);if(!r)throw new rc(this.user,"Unknown compressed tree node");let s=this.model.getNode(r),a=this.model.getParentNodeLocation(r),l=this.model.getNode(a),c=Bit(s),d=Vit(c,e,t),u=(this.enabled?NZ:MZ)(d),h=n.diffIdentityProvider?(p,m)=>n.diffIdentityProvider.getId(p)===n.diffIdentityProvider.getId(m):void 0;if(uo(u.element.elements,s.element.elements,h)){this._setChildren(r,u.children||un.empty(),{diffIdentityProvider:o,diffDepth:1});return}let f=l.children.map(p=>p===s?u:p);this._setChildren(l.element,f,{diffIdentityProvider:o,diffDepth:s.depth-l.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;let n=this.model.getNode().children,o=un.map(n,Bit),r=un.map(o,e?NZ:MZ);this._setChildren(null,r,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,n){let o=new Set,r=a=>{for(let l of a.element.elements)o.add(l),this.nodes.set(l,a.element)},s=a=>{for(let l of a.element.elements)o.has(l)||this.nodes.delete(l)};this.model.setChildren(e,t,{...n,onDidCreateNode:r,onDidDeleteNode:s})}has(e){return this.nodes.has(e)}getListIndex(e){let t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){let t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(typeof e>"u")return this.model.getNode();let t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){let t=this.model.getNodeLocation(e);return t===null?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){let t=this.getCompressedNode(e),n=this.model.getParentNodeLocation(t);return n===null?null:n.elements[n.elements.length-1]}getFirstElementChild(e){let t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){let t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){let n=this.getCompressedNode(e);return this.model.setCollapsible(n,t)}isCollapsed(e){let t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){let o=this.getCompressedNode(e);return this.model.setCollapsed(o,t,n)}expandTo(e){let t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){let t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(e===null)return null;let t=this.nodes.get(e);if(!t)throw new rc(this.user,`Tree element not found: ${e}`);return t}},RNt=i=>i[i.length-1],h0e=class i{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new i(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}};AZ=class{get onDidSplice(){return Et.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(n=>this.nodeMapper.map(n)),deletedNodes:t.map(n=>this.nodeMapper.map(n))}))}get onDidChangeCollapseState(){return Et.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return Et.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}constructor(e,t,n={}){this.rootRef=null,this.elementMapper=n.elementMapper||RNt;let o=r=>this.elementMapper(r.elements);this.nodeMapper=new Xb(r=>new h0e(o,r)),this.model=new u0e(e,PNt(this.nodeMapper,t),ONt(o,n))}setChildren(e,t=un.empty(),n={}){this.model.setChildren(e,t,n)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){let t=this.model.getFirstElementChild(e);return t===null||typeof t>"u"?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,n){return this.model.setCollapsed(e,t,n)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}});function FNt(i,e){return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(t){let n;try{n=i().getCompressedTreeNode(t)}catch{return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t)}return n.element.elements.length===1?e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t):e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}}}var zNt,Jb,RZ,f0e,xS,p0e=P(()=>{wN();Wit();IZ();dv();Yc();zNt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Jb=class extends wS{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,n,o,r={}){super(e,t,n,o,r),this.user=e}setChildren(e,t=un.empty(),n){this.model.setChildren(e,t,n)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}hasElement(e){return this.model.has(e)}createModel(e,t,n){return new Qv(e,t,n)}},RZ=class{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t,n){this._compressedTreeNodeProvider=e,this.stickyScrollDelegate=t,this.renderer=n,this.templateId=n.templateId,n.onDidChangeTwistieState&&(this.onDidChangeTwistieState=n.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,n,o){let r=this.stickyScrollDelegate.getCompressedNode(e);r||(r=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element)),r.element.elements.length===1?(n.compressedTreeNode=void 0,this.renderer.renderElement(e,t,n.data,o)):(n.compressedTreeNode=r,this.renderer.renderCompressedElements(r,t,n.data,o))}disposeElement(e,t,n,o){var r,s,a,l;n.compressedTreeNode?(s=(r=this.renderer).disposeCompressedElements)===null||s===void 0||s.call(r,n.compressedTreeNode,t,n.data,o):(l=(a=this.renderer).disposeElement)===null||l===void 0||l.call(a,e,t,n.data,o)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return this.renderer.renderTwistie?this.renderer.renderTwistie(e,t):!1}};zNt([Tr],RZ.prototype,"compressedTreeNodeProvider",null);f0e=class{constructor(e){this.modelProvider=e,this.compressedStickyNodes=new Map}getCompressedNode(e){return this.compressedStickyNodes.get(e)}constrainStickyScrollNodes(e,t,n){if(this.compressedStickyNodes.clear(),e.length===0)return[];for(let o=0;on||o>=t-1&&tthis,a=new f0e(()=>this.model),l=o.map(c=>new RZ(s,a,c));super(e,t,n,l,{...FNt(s,r),stickyScrollDelegate:a})}setChildren(e,t=un.empty(),n){this.model.setChildren(e,t,n)}createModel(e,t,n){return new AZ(e,t,n)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled<"u"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}});function m0e(i){return{...i,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function v0e(i,e){return e.parent?e.parent===i?!0:v0e(i,e.parent):!1}function HNt(i,e){return i===e||v0e(i,e)||v0e(e,i)}function Uit(i){return{browserEvent:i.browserEvent,elements:i.elements.map(e=>e.element)}}function $it(i){return{browserEvent:i.browserEvent,element:i.element&&i.element.element,target:i.target}}function g0e(i){return i instanceof E4?new y0e(i):i}function jit(i){return i&&{...i,collapseByDefault:!0,identityProvider:i.identityProvider&&{getId(e){return i.identityProvider.getId(e.element)}},dnd:i.dnd&&new C0e(i.dnd),multipleSelectionController:i.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return i.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element})},isSelectionRangeChangeEvent(e){return i.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})}},accessibilityProvider:i.accessibilityProvider&&{...i.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:i.accessibilityProvider.getRole?e=>i.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:i.accessibilityProvider.isChecked?e=>{var t;return!!(!((t=i.accessibilityProvider)===null||t===void 0)&&t.isChecked(e.element))}:void 0,getAriaLabel(e){return i.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return i.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:i.accessibilityProvider.getWidgetRole?()=>i.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:i.accessibilityProvider.getAriaLevel&&(e=>i.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:i.accessibilityProvider.getActiveDescendantId&&(e=>i.accessibilityProvider.getActiveDescendantId(e.element))},filter:i.filter&&{filter(e,t){return i.filter.filter(e.element,t)}},keyboardNavigationLabelProvider:i.keyboardNavigationLabelProvider&&{...i.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(e){return i.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof i.expandOnlyOnTwistieClick>"u"?void 0:typeof i.expandOnlyOnTwistieClick!="function"?i.expandOnlyOnTwistieClick:e=>i.expandOnlyOnTwistieClick(e.element),defaultFindVisibility:e=>e.hasChildren&&e.stale?1:typeof i.defaultFindVisibility=="number"?i.defaultFindVisibility:typeof i.defaultFindVisibility>"u"?2:i.defaultFindVisibility(e.element)}}function w0e(i,e){e(i),i.children.forEach(t=>w0e(t,e))}function BNt(i){let e=i&&jit(i);return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(t){return i.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(n=>n.element))}}}}function VNt(i){return typeof i=="boolean"?i?1:0:bN(i)?Qb(i.visibility):Qb(i)}var _0e,b0e,y0e,C0e,xN,x0e,S0e,PZ,qit=P(()=>{QY();wN();LZ();p0e();yS();Qi();Go();or();Pi();Xt();Yc();nt();ho();_0e=class i{get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new i(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}},b0e=class{constructor(e,t,n){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,o){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,o)}renderTwistie(e,t){return e.slow?(t.classList.add(...ui.asClassNameArray(kt.treeItemLoading)),!0):(t.classList.remove(...ui.asClassNameArray(kt.treeItemLoading)),!1)}disposeElement(e,t,n,o){var r,s;(s=(r=this.renderer).disposeElement)===null||s===void 0||s.call(r,this.nodeMapper.map(e),t,n.templateData,o)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}};y0e=class extends E4{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}};C0e=class{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),t)}onDragStart(e,t){var n,o;(o=(n=this.dnd).onDragStart)===null||o===void 0||o.call(n,g0e(e),t)}onDragOver(e,t,n,o,r,s=!0){return this.dnd.onDragOver(g0e(e),t&&t.element,n,o,r)}drop(e,t,n,o,r){this.dnd.drop(g0e(e),t&&t.element,n,o,r)}onDragEnd(e){var t,n;(n=(t=this.dnd).onDragEnd)===null||n===void 0||n.call(t,e)}dispose(){this.dnd.dispose()}};xN=class{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return Et.map(this.tree.onDidChangeFocus,Uit)}get onDidChangeSelection(){return Et.map(this.tree.onDidChangeSelection,Uit)}get onMouseDblClick(){return Et.map(this.tree.onMouseDblClick,$it)}get onPointer(){return Et.map(this.tree.onPointer,$it)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,n,o,r,s={}){this.user=e,this.dataSource=r,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new ge,this._onDidChangeNodeSlowState=new ge,this.nodeMapper=new Xb(a=>new _0e(a)),this.disposables=new Ye,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren=typeof s.autoExpandSingleChildren>"u"?!1:s.autoExpandSingleChildren,this.sorter=s.sorter,this.getDefaultCollapseState=a=>s.collapseByDefault?s.collapseByDefault(a)?wu.PreserveOrCollapsed:wu.PreserveOrExpanded:void 0,this.tree=this.createTree(e,t,n,o,s),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType,this.root=m0e({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,t,n,o,r){let s=new CS(n),a=o.map(c=>new b0e(c,this.nodeMapper,this._onDidChangeNodeSlowState.event)),l=jit(r)||{};return new Jb(e,t,s,a,l)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,t){this.refreshPromises.forEach(o=>o.cancel()),this.refreshPromises.clear(),this.root.element=e;let n=t&&{viewState:t,focus:[],selection:[]};await this._updateChildren(e,!0,!1,n),n&&(this.tree.setFocus(n.focus),this.tree.setSelection(n.selection)),t&&typeof t.scrollTop=="number"&&(this.scrollTop=t.scrollTop)}async _updateChildren(e=this.root.element,t=!0,n=!1,o,r){if(typeof this.root.element>"u")throw new rc(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await Et.toPromise(this._onDidRender.event));let s=this.getDataNode(e);if(await this.refreshAndRenderNode(s,t,o,r),n)try{this.tree.rerender(s)}catch{}}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}let t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){let t=this.getDataNode(e),n=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(n)}collapse(e,t=!1){let n=this.getDataNode(e);return this.tree.collapse(n===this.root?null:n,t)}async expand(e,t=!1){if(typeof this.root.element>"u")throw new rc(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await Et.toPromise(this._onDidRender.event));let n=this.getDataNode(e);if(this.tree.hasElement(n)&&!this.tree.isCollapsible(n)||(n.refreshPromise&&(await this.root.refreshPromise,await Et.toPromise(this._onDidRender.event)),n!==this.root&&!n.refreshPromise&&!this.tree.isCollapsed(n)))return!1;let o=this.tree.expand(n===this.root?null:n,t);return n.refreshPromise&&(await this.root.refreshPromise,await Et.toPromise(this._onDidRender.event)),o}setSelection(e,t){let n=e.map(o=>this.getDataNode(o));this.tree.setSelection(n,t)}getSelection(){return this.tree.getSelection().map(t=>t.element)}setFocus(e,t){let n=e.map(o=>this.getDataNode(o));this.tree.setFocus(n,t)}getFocus(){return this.tree.getFocus().map(t=>t.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){let t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){let t=this.getDataNode(e),n=this.tree.getFirstElementChild(t===this.root?null:t);return n&&n.element}getDataNode(e){let t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new rc(this.user,`Data tree node not found: ${e}`);return t}async refreshAndRenderNode(e,t,n,o){await this.refreshNode(e,t,n),!this.disposables.isDisposed&&this.render(e,n,o)}async refreshNode(e,t,n){let o;if(this.subTreeRefreshPromises.forEach((r,s)=>{!o&&HNt(s,e)&&(o=r.then(()=>this.refreshNode(e,t,n)))}),o)return o;if(e!==this.root&&this.tree.getNode(e).collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0;return}return this.doRefreshSubTree(e,t,n)}async doRefreshSubTree(e,t,n){let o;e.refreshPromise=new Promise(r=>o=r),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{let r=await this.doRefreshNode(e,t,n);e.stale=!1,await HU.settled(r.map(s=>this.doRefreshSubTree(s,t,n)))}finally{o()}}async doRefreshNode(e,t,n){e.hasChildren=!!this.dataSource.hasChildren(e.element);let o;if(!e.hasChildren)o=Promise.resolve(un.empty());else{let r=this.doGetChildren(e);if(Ade(r))o=Promise.resolve(r);else{let s=eh(800);s.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},a=>null),o=r.finally(()=>s.cancel())}}try{let r=await o;return this.setChildren(e,r,t,n)}catch(r){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),jl(r))return[];throw r}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;let n=this.dataSource.getChildren(e.element);return Ade(n)?this.processChildren(n):(t=Ho(async()=>this.processChildren(await n)),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){e.element!==null&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(hi))}setChildren(e,t,n,o){let r=[...t];if(e.children.length===0&&r.length===0)return[];let s=new Map,a=new Map;for(let d of e.children)s.set(d.element,d),this.identityProvider&&a.set(d.id,{node:d,collapsed:this.tree.hasElement(d)&&this.tree.isCollapsed(d)});let l=[],c=r.map(d=>{let u=!!this.dataSource.hasChildren(d);if(!this.identityProvider){let m=m0e({element:d,parent:e,hasChildren:u,defaultCollapseState:this.getDefaultCollapseState(d)});return u&&m.defaultCollapseState===wu.PreserveOrExpanded&&l.push(m),m}let h=this.identityProvider.getId(d).toString(),f=a.get(h);if(f){let m=f.node;return s.delete(m.element),this.nodes.delete(m.element),this.nodes.set(d,m),m.element=d,m.hasChildren=u,n?f.collapsed?(m.children.forEach(y=>w0e(y,_=>this.nodes.delete(_.element))),m.children.splice(0,m.children.length),m.stale=!0):l.push(m):u&&!f.collapsed&&l.push(m),m}let p=m0e({element:d,parent:e,id:h,hasChildren:u,defaultCollapseState:this.getDefaultCollapseState(d)});return o&&o.viewState.focus&&o.viewState.focus.indexOf(h)>-1&&o.focus.push(p),o&&o.viewState.selection&&o.viewState.selection.indexOf(h)>-1&&o.selection.push(p),(o&&o.viewState.expanded&&o.viewState.expanded.indexOf(h)>-1||u&&p.defaultCollapseState===wu.PreserveOrExpanded)&&l.push(p),p});for(let d of s.values())w0e(d,u=>this.nodes.delete(u.element));for(let d of c)this.nodes.set(d.element,d);return e.children.splice(0,e.children.length,...c),e!==this.root&&this.autoExpandSingleChildren&&c.length===1&&l.length===0&&(c[0].forceExpanded=!0,l.push(c[0])),l}render(e,t,n){let o=e.children.map(s=>this.asTreeElement(s,t)),r=n&&{...n,diffIdentityProvider:n.diffIdentityProvider&&{getId(s){return n.diffIdentityProvider.getId(s.element)}}};this.tree.setChildren(e===this.root?null:e,o,r),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let n;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?n=!1:e.forceExpanded?(n=!1,e.forceExpanded=!1):n=e.defaultCollapseState,{element:e,children:e.hasChildren?un.map(e.children,o=>this.asTreeElement(o,t)):[],collapsible:e.hasChildren,collapsed:n}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}},x0e=class i{get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new i(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}},S0e=class{constructor(e,t,n,o){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=n,this.onDidChangeTwistieState=o,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,o){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,o)}renderCompressedElements(e,t,n,o){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,o)}renderTwistie(e,t){return e.slow?(t.classList.add(...ui.asClassNameArray(kt.treeItemLoading)),!0):(t.classList.remove(...ui.asClassNameArray(kt.treeItemLoading)),!1)}disposeElement(e,t,n,o){var r,s;(s=(r=this.renderer).disposeElement)===null||s===void 0||s.call(r,this.nodeMapper.map(e),t,n.templateData,o)}disposeCompressedElements(e,t,n,o){var r,s;(s=(r=this.renderer).disposeCompressedElements)===null||s===void 0||s.call(r,this.compressibleNodeMapperProvider().map(e),t,n.templateData,o)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=Nn(this.disposables)}};PZ=class extends xN{constructor(e,t,n,o,r,s,a={}){super(e,t,n,r,s,a),this.compressionDelegate=o,this.compressibleNodeMapper=new Xb(l=>new x0e(l)),this.filter=a.filter}createTree(e,t,n,o,r){let s=new CS(n),a=o.map(c=>new S0e(c,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),l=BNt(r)||{};return new xS(e,t,s,a,l)}asTreeElement(e,t){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,t)}}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t,n){if(!this.identityProvider)return super.render(e,t);let o=f=>this.identityProvider.getId(f).toString(),r=f=>{let p=new Set;for(let m of f){let y=this.tree.getCompressedTreeNode(m===this.root?null:m);if(y.element)for(let _ of y.element.elements)p.add(o(_.element))}return p},s=r(this.tree.getSelection()),a=r(this.tree.getFocus());super.render(e,t,n);let l=this.getSelection(),c=!1,d=this.getFocus(),u=!1,h=f=>{let p=f.element;if(p)for(let m=0;m{let n=this.filter.filter(t,1),o=VNt(n);if(o===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return o===1})),super.processChildren(e)}}});var OZ,Git=P(()=>{wN();IZ();OZ=class extends wS{constructor(e,t,n,o,r,s={}){super(e,t,n,o,s),this.user=e,this.dataSource=r,this.identityProvider=s.identityProvider}createModel(e,t,n){return new Qv(e,t,n)}}});var jGi,qGi,SN,k0e,GGi,KGi,YGi,ZGi,XGi,L0e,QGi,zZ=P(()=>{Mn();Wt();Xi();jGi=new Bt("isMac",Wi,g("isMac","Whether the operating system is macOS")),qGi=new Bt("isLinux",Ar,g("isLinux","Whether the operating system is Linux")),SN=new Bt("isWindows",hr,g("isWindows","Whether the operating system is Windows")),k0e=new Bt("isWeb",Fh,g("isWeb","Whether the platform is a web browser")),GGi=new Bt("isMacNative",Wi&&!Fh,g("isMacNative","Whether the operating system is macOS on a non-browser platform")),KGi=new Bt("isIOS",Lc,g("isIOS","Whether the operating system is iOS")),YGi=new Bt("isMobile",$V,g("isMobile","Whether the platform is a mobile web browser")),ZGi=new Bt("isDevelopment",!1,!0),XGi=new Bt("productQualityType","",g("productQualityType","Quality type of VS Code")),L0e="inputFocus",QGi=new Bt(L0e,!1,g("inputFocus","Whether keyboard focus is inside an input box"))});function QZ(i,e){let t=i.createScoped(e.getHTMLElement());return ent.bindTo(t),t}function JZ(i,e){let t=kN.bindTo(i),n=()=>{let o=e.scrollTop===0,r=e.scrollHeight-e.renderHeight-e.scrollTop<1;o&&r?t.set("both"):o?t.set("top"):r?t.set("bottom"):t.set("none")};return n(),e.onDidScroll(n)}function z2(i){return i.getValue(t7)==="alt"}function eX(i,e){var t;let n=i.get(Ni),o=i.get(fn),r=new Ye;return[{...e,keyboardNavigationDelegate:{mightProducePrintableCharacter(a){return o.mightProducePrintableCharacter(a)}},smoothScrolling:!!n.getValue(Vm),mouseWheelScrollSensitivity:n.getValue(P2),fastScrollSensitivity:n.getValue(O2),multipleSelectionController:(t=e.multipleSelectionController)!==null&&t!==void 0?t:r.add(new E0e(n)),keyboardNavigationEventFilter:qNt(o),scrollByPage:!!n.getValue(Bm)},r]}function qNt(i){let e=!1;return t=>{if(t.toKeyCodeChord().isModifierKey())return!1;if(e)return e=!1,!1;let n=i.softDispatch(t,t.target);return n.kind===1?(e=!0,!1):(e=!1,n.kind===0)}}function ont(i){let e=i.getValue(R0e);if(e==="highlight")return R2.Highlight;if(e==="filter")return R2.Filter;let t=i.getValue(BZ);if(t==="simple"||t==="highlight")return R2.Highlight;if(t==="filter")return R2.Filter}function rnt(i){let e=i.getValue(O0e);if(e==="fuzzy")return Xv.Fuzzy;if(e==="contiguous")return Xv.Contiguous}function DN(i,e){var t;let n=i.get(Ni),o=i.get(Pc),r=i.get(ri),s=i.get(qt),a=()=>{let f=r.getContextKeyValue(int);if(f==="automatic")return Fm.Automatic;if(f==="trigger")return Fm.Trigger;if(r.getContextKeyValue(nnt)===!1)return Fm.Trigger;let m=n.getValue(P0e);if(m==="automatic")return Fm.Automatic;if(m==="trigger")return Fm.Trigger},l=e.horizontalScrolling!==void 0?e.horizontalScrolling:!!n.getValue(f1),[c,d]=s.invokeFunction(eX,e),u=e.paddingBottom,h=e.renderIndentGuides!==void 0?e.renderIndentGuides:n.getValue(VZ);return{getTypeNavigationMode:a,disposable:d,options:{keyboardSupport:!1,...c,indent:typeof n.getValue(LN)=="number"?n.getValue(LN):void 0,renderIndentGuides:h,smoothScrolling:!!n.getValue(Vm),defaultFindMode:ont(n),defaultFindMatchType:rnt(n),horizontalScrolling:l,scrollByPage:!!n.getValue(Bm),paddingBottom:u,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(t=e.expandOnlyOnTwistieClick)!==null&&t!==void 0?t:n.getValue(WZ)==="doubleClick",contextViewProvider:o,findWidgetStyles:cit,enableStickyScroll:!!n.getValue(UZ),stickyScrollMaxItemCount:Number(n.getValue($Z))}}}var P4,br,gh,HZ,kN,yKi,CKi,ent,tnt,KZ,I0e,M0e,N0e,A0e,YZ,WNt,ZZ,UNt,XZ,$Nt,jNt,int,nnt,t7,FZ,f1,R0e,P0e,BZ,Bm,O0e,LN,VZ,Vm,P2,O2,WZ,UZ,$Z,E0e,jZ,Kit,Yit,EN,qZ,D0e,T0e,Zit,Xit,Qit,GZ,Jit,e7,GNt,TN=P(()=>{Qt();Eit();qv();Nit();wN();qit();Git();p0e();Xt();nt();Wt();er();Wg();Xi();zZ();Id();_i();vs();Ys();N4();P4=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},br=function(i,e){return function(t,n){e(t,n,i)}},gh=vi("listService"),HZ=class{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new Ye,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){var t,n;e!==this._lastFocusedWidget&&((t=this._lastFocusedWidget)===null||t===void 0||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,(n=this._lastFocusedWidget)===null||n===void 0||n.getHTMLElement().classList.add("last-focused"))}register(e,t){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new oN(ya(),"").style(I4)),this.lists.some(o=>o.widget===e))throw new Error("Cannot register the same widget multiple times");let n={widget:e,extraContextKeys:t};return this.lists.push(n),L5(e.getHTMLElement())&&this.setLastFocusedList(e),vl(e.onDidFocus(()=>this.setLastFocusedList(e)),Yt(()=>this.lists.splice(this.lists.indexOf(n),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(o=>o!==n),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}},kN=new Bt("listScrollAtBoundary","none"),yKi=mt.or(kN.isEqualTo("top"),kN.isEqualTo("both")),CKi=mt.or(kN.isEqualTo("bottom"),kN.isEqualTo("both")),ent=new Bt("listFocus",!0),tnt=new Bt("treestickyScrollFocused",!1),KZ=new Bt("listSupportsMultiselect",!0),I0e=mt.and(ent,mt.not(L0e),tnt.negate()),M0e=new Bt("listHasSelectionOrFocus",!1),N0e=new Bt("listDoubleSelection",!1),A0e=new Bt("listMultiSelection",!1),YZ=new Bt("listSelectionNavigation",!1),WNt=new Bt("listSupportsFind",!0),ZZ=new Bt("treeElementCanCollapse",!1),UNt=new Bt("treeElementHasParent",!1),XZ=new Bt("treeElementCanExpand",!1),$Nt=new Bt("treeElementHasChild",!1),jNt=new Bt("treeFindOpen",!1),int="listTypeNavigationMode",nnt="listAutomaticKeyboardNavigation";t7="workbench.list.multiSelectModifier",FZ="workbench.list.openMode",f1="workbench.list.horizontalScrolling",R0e="workbench.list.defaultFindMode",P0e="workbench.list.typeNavigationMode",BZ="workbench.list.keyboardNavigation",Bm="workbench.list.scrollByPage",O0e="workbench.list.defaultFindMatchType",LN="workbench.tree.indent",VZ="workbench.tree.renderIndentGuides",Vm="workbench.list.smoothScrolling",P2="workbench.list.mouseWheelScrollSensitivity",O2="workbench.list.fastScrollSensitivity",WZ="workbench.tree.expandMode",UZ="workbench.tree.enableStickyScroll",$Z="workbench.tree.stickyScrollMaxItemCount";E0e=class extends ue{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=z2(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(t7)&&(this.useAltAsMultipleSelectionModifier=z2(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:w2e(e)}isSelectionRangeChangeEvent(e){return x2e(e)}};jZ=class extends Nl{constructor(e,t,n,o,r,s,a,l,c){let d=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!l.getValue(f1),[u,h]=c.invokeFunction(eX,r);super(e,t,n,o,{keyboardSupport:!1,...u,horizontalScrolling:d}),this.disposables.add(h),this.contextKeyService=QZ(s,this),this.disposables.add(JZ(this.contextKeyService,this)),this.listSupportsMultiSelect=KZ.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),YZ.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this.listHasSelectionOrFocus=M0e.bindTo(this.contextKeyService),this.listDoubleSelection=N0e.bindTo(this.contextKeyService),this.listMultiSelection=A0e.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=z2(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(r.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{let p=this.getSelection(),m=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(p.length>0||m.length>0),this.listMultiSelection.set(p.length>1),this.listDoubleSelection.set(p.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{let p=this.getSelection(),m=this.getFocus();this.listHasSelectionOrFocus.set(p.length>0||m.length>0)})),this.disposables.add(l.onDidChangeConfiguration(p=>{p.affectsConfiguration(t7)&&(this._useAltAsMultipleSelectionModifier=z2(l));let m={};if(p.affectsConfiguration(f1)&&this.horizontalScrolling===void 0){let y=!!l.getValue(f1);m={...m,horizontalScrolling:y}}if(p.affectsConfiguration(Bm)){let y=!!l.getValue(Bm);m={...m,scrollByPage:y}}if(p.affectsConfiguration(Vm)){let y=!!l.getValue(Vm);m={...m,smoothScrolling:y}}if(p.affectsConfiguration(P2)){let y=l.getValue(P2);m={...m,mouseWheelScrollSensitivity:y}}if(p.affectsConfiguration(O2)){let y=l.getValue(O2);m={...m,fastScrollSensitivity:y}}Object.keys(m).length>0&&this.updateOptions(m)})),this.navigator=new qZ(this,{configurationService:l,...r}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?M4(e):I4)}};jZ=P4([br(5,ri),br(6,gh),br(7,Ni),br(8,qt)],jZ);Kit=class extends bZ{constructor(e,t,n,o,r,s,a,l,c){let d=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!l.getValue(f1),[u,h]=c.invokeFunction(eX,r);super(e,t,n,o,{keyboardSupport:!1,...u,horizontalScrolling:d}),this.disposables=new Ye,this.disposables.add(h),this.contextKeyService=QZ(s,this),this.disposables.add(JZ(this.contextKeyService,this.widget)),this.horizontalScrolling=r.horizontalScrolling,this.listSupportsMultiSelect=KZ.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),YZ.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this._useAltAsMultipleSelectionModifier=z2(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(r.overrideStyles),this.disposables.add(l.onDidChangeConfiguration(p=>{p.affectsConfiguration(t7)&&(this._useAltAsMultipleSelectionModifier=z2(l));let m={};if(p.affectsConfiguration(f1)&&this.horizontalScrolling===void 0){let y=!!l.getValue(f1);m={...m,horizontalScrolling:y}}if(p.affectsConfiguration(Bm)){let y=!!l.getValue(Bm);m={...m,scrollByPage:y}}if(p.affectsConfiguration(Vm)){let y=!!l.getValue(Vm);m={...m,smoothScrolling:y}}if(p.affectsConfiguration(P2)){let y=l.getValue(P2);m={...m,mouseWheelScrollSensitivity:y}}if(p.affectsConfiguration(O2)){let y=l.getValue(O2);m={...m,fastScrollSensitivity:y}}Object.keys(m).length>0&&this.updateOptions(m)})),this.navigator=new qZ(this,{configurationService:l,...r}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?M4(e):I4)}dispose(){this.disposables.dispose(),super.dispose()}};Kit=P4([br(5,ri),br(6,gh),br(7,Ni),br(8,qt)],Kit);Yit=class extends vN{constructor(e,t,n,o,r,s,a,l,c,d){let u=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:!!c.getValue(f1),[h,f]=d.invokeFunction(eX,s);super(e,t,n,o,r,{keyboardSupport:!1,...h,horizontalScrolling:u}),this.disposables.add(f),this.contextKeyService=QZ(a,this),this.disposables.add(JZ(this.contextKeyService,this)),this.listSupportsMultiSelect=KZ.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),YZ.bindTo(this.contextKeyService).set(!!s.selectionNavigation),this.listHasSelectionOrFocus=M0e.bindTo(this.contextKeyService),this.listDoubleSelection=N0e.bindTo(this.contextKeyService),this.listMultiSelection=A0e.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=z2(c),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{let m=this.getSelection(),y=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(m.length>0||y.length>0),this.listMultiSelection.set(m.length>1),this.listDoubleSelection.set(m.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{let m=this.getSelection(),y=this.getFocus();this.listHasSelectionOrFocus.set(m.length>0||y.length>0)})),this.disposables.add(c.onDidChangeConfiguration(m=>{m.affectsConfiguration(t7)&&(this._useAltAsMultipleSelectionModifier=z2(c));let y={};if(m.affectsConfiguration(f1)&&this.horizontalScrolling===void 0){let _=!!c.getValue(f1);y={...y,horizontalScrolling:_}}if(m.affectsConfiguration(Bm)){let _=!!c.getValue(Bm);y={...y,scrollByPage:_}}if(m.affectsConfiguration(Vm)){let _=!!c.getValue(Vm);y={...y,smoothScrolling:_}}if(m.affectsConfiguration(P2)){let _=c.getValue(P2);y={...y,mouseWheelScrollSensitivity:_}}if(m.affectsConfiguration(O2)){let _=c.getValue(O2);y={...y,fastScrollSensitivity:_}}Object.keys(y).length>0&&this.updateOptions(y)})),this.navigator=new D0e(this,{configurationService:c,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?M4(e):I4)}dispose(){this.disposables.dispose(),super.dispose()}};Yit=P4([br(6,ri),br(7,gh),br(8,Ni),br(9,qt)],Yit);EN=class extends ue{constructor(e,t){var n;super(),this.widget=e,this._onDidOpen=this._register(new ge),this.onDidOpen=this._onDidOpen.event,this._register(Et.filter(this.widget.onDidChangeSelection,o=>YC(o.browserEvent))(o=>this.onSelectionFromKeyboard(o))),this._register(this.widget.onPointer(o=>this.onPointer(o.element,o.browserEvent))),this._register(this.widget.onMouseDblClick(o=>this.onMouseDblClick(o.element,o.browserEvent))),typeof t?.openOnSingleClick!="boolean"&&t?.configurationService?(this.openOnSingleClick=t?.configurationService.getValue(FZ)!=="doubleClick",this._register(t?.configurationService.onDidChangeConfiguration(o=>{o.affectsConfiguration(FZ)&&(this.openOnSingleClick=t?.configurationService.getValue(FZ)!=="doubleClick")}))):this.openOnSingleClick=(n=t?.openOnSingleClick)!==null&&n!==void 0?n:!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;let t=e.browserEvent,n=typeof t.preserveFocus=="boolean"?t.preserveFocus:!0,o=typeof t.pinned=="boolean"?t.pinned:!n;this._open(this.getSelectedElement(),n,o,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick||t.detail===2)return;let o=t.button===1,r=!0,s=o,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,r,s,a,t)}onMouseDblClick(e,t){if(!t)return;let n=t.target;if(n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&t.offsetX<16)return;let r=!1,s=!0,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,r,s,a,t)}_open(e,t,n,o,r){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:n,revealIfVisible:!0},sideBySide:o,element:e,browserEvent:r})}},qZ=class extends EN{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}},D0e=class extends EN{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}},T0e=class extends EN{constructor(e,t){super(e,t)}getSelectedElement(){var e;return(e=this.widget.getSelection()[0])!==null&&e!==void 0?e:void 0}};Zit=class extends Jb{constructor(e,t,n,o,r,s,a,l,c){let{options:d,getTypeNavigationMode:u,disposable:h}=s.invokeFunction(DN,r);super(e,t,n,o,d),this.disposables.add(h),this.internals=new e7(this,r,u,r.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};Zit=P4([br(5,qt),br(6,ri),br(7,gh),br(8,Ni)],Zit);Xit=class extends xS{constructor(e,t,n,o,r,s,a,l,c){let{options:d,getTypeNavigationMode:u,disposable:h}=s.invokeFunction(DN,r);super(e,t,n,o,d),this.disposables.add(h),this.internals=new e7(this,r,u,r.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Xit=P4([br(5,qt),br(6,ri),br(7,gh),br(8,Ni)],Xit);Qit=class extends OZ{constructor(e,t,n,o,r,s,a,l,c,d){let{options:u,getTypeNavigationMode:h,disposable:f}=a.invokeFunction(DN,s);super(e,t,n,o,r,u),this.disposables.add(f),this.internals=new e7(this,s,h,s.overrideStyles,l,c,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles!==void 0&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Qit=P4([br(6,qt),br(7,ri),br(8,gh),br(9,Ni)],Qit);GZ=class extends xN{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,n,o,r,s,a,l,c,d){let{options:u,getTypeNavigationMode:h,disposable:f}=a.invokeFunction(DN,s);super(e,t,n,o,r,u),this.disposables.add(f),this.internals=new e7(this,s,h,s.overrideStyles,l,c,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};GZ=P4([br(6,qt),br(7,ri),br(8,gh),br(9,Ni)],GZ);Jit=class extends PZ{constructor(e,t,n,o,r,s,a,l,c,d,u){let{options:h,getTypeNavigationMode:f,disposable:p}=l.invokeFunction(DN,a);super(e,t,n,o,r,s,h),this.disposables.add(p),this.internals=new e7(this,a,f,a.overrideStyles,c,d,u),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};Jit=P4([br(7,qt),br(8,ri),br(9,gh),br(10,Ni)],Jit);e7=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,n,o,r,s,a){var l;this.tree=e,this.disposables=[],this.contextKeyService=QZ(r,e),this.disposables.push(JZ(this.contextKeyService,e)),this.listSupportsMultiSelect=KZ.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(t.multipleSelectionSupport!==!1),YZ.bindTo(this.contextKeyService).set(!!t.selectionNavigation),this.listSupportFindWidget=WNt.bindTo(this.contextKeyService),this.listSupportFindWidget.set((l=t.findWidgetEnabled)!==null&&l!==void 0?l:!0),this.hasSelectionOrFocus=M0e.bindTo(this.contextKeyService),this.hasDoubleSelection=N0e.bindTo(this.contextKeyService),this.hasMultiSelection=A0e.bindTo(this.contextKeyService),this.treeElementCanCollapse=ZZ.bindTo(this.contextKeyService),this.treeElementHasParent=UNt.bindTo(this.contextKeyService),this.treeElementCanExpand=XZ.bindTo(this.contextKeyService),this.treeElementHasChild=$Nt.bindTo(this.contextKeyService),this.treeFindOpen=jNt.bindTo(this.contextKeyService),this.treeStickyScrollFocused=tnt.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=z2(a),this.updateStyleOverrides(o);let d=()=>{let h=e.getFocus()[0];if(!h)return;let f=e.getNode(h);this.treeElementCanCollapse.set(f.collapsible&&!f.collapsed),this.treeElementHasParent.set(!!e.getParentElement(h)),this.treeElementCanExpand.set(f.collapsible&&f.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(h))},u=new Set;u.add(int),u.add(nnt),this.disposables.push(this.contextKeyService,s.register(e),e.onDidChangeSelection(()=>{let h=e.getSelection(),f=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(h.length>0||f.length>0),this.hasMultiSelection.set(h.length>1),this.hasDoubleSelection.set(h.length===2)})}),e.onDidChangeFocus(()=>{let h=e.getSelection(),f=e.getFocus();this.hasSelectionOrFocus.set(h.length>0||f.length>0),d()}),e.onDidChangeCollapseState(d),e.onDidChangeModel(d),e.onDidChangeFindOpenState(h=>this.treeFindOpen.set(h)),e.onDidChangeStickyScrollFocused(h=>this.treeStickyScrollFocused.set(h)),a.onDidChangeConfiguration(h=>{let f={};if(h.affectsConfiguration(t7)&&(this._useAltAsMultipleSelectionModifier=z2(a)),h.affectsConfiguration(LN)){let p=a.getValue(LN);f={...f,indent:p}}if(h.affectsConfiguration(VZ)&&t.renderIndentGuides===void 0){let p=a.getValue(VZ);f={...f,renderIndentGuides:p}}if(h.affectsConfiguration(Vm)){let p=!!a.getValue(Vm);f={...f,smoothScrolling:p}}if(h.affectsConfiguration(R0e)||h.affectsConfiguration(BZ)){let p=ont(a);f={...f,defaultFindMode:p}}if(h.affectsConfiguration(P0e)||h.affectsConfiguration(BZ)){let p=n();f={...f,typeNavigationMode:p}}if(h.affectsConfiguration(O0e)){let p=rnt(a);f={...f,defaultFindMatchType:p}}if(h.affectsConfiguration(f1)&&t.horizontalScrolling===void 0){let p=!!a.getValue(f1);f={...f,horizontalScrolling:p}}if(h.affectsConfiguration(Bm)){let p=!!a.getValue(Bm);f={...f,scrollByPage:p}}if(h.affectsConfiguration(WZ)&&t.expandOnlyOnTwistieClick===void 0&&(f={...f,expandOnlyOnTwistieClick:a.getValue(WZ)==="doubleClick"}),h.affectsConfiguration(UZ)){let p=a.getValue(UZ);f={...f,enableStickyScroll:p}}if(h.affectsConfiguration($Z)){let p=Math.max(1,a.getValue($Z));f={...f,stickyScrollMaxItemCount:p}}if(h.affectsConfiguration(P2)){let p=a.getValue(P2);f={...f,mouseWheelScrollSensitivity:p}}if(h.affectsConfiguration(O2)){let p=a.getValue(O2);f={...f,fastScrollSensitivity:p}}Object.keys(f).length>0&&e.updateOptions(f)}),this.contextKeyService.onDidChangeContext(h=>{h.affectsSome(u)&&e.updateOptions({typeNavigationMode:n()})})),this.navigator=new T0e(e,{configurationService:a,...t}),this.disposables.push(this.navigator)}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?M4(e):I4)}dispose(){this.disposables=Nn(this.disposables)}};e7=P4([br(4,ri),br(5,gh),br(6,Ni)],e7);GNt=jn.as(Yl.Configuration);GNt.registerConfiguration({id:"workbench",order:7,title:g("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[t7]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[g("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),g("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:g({key:"multiSelectModifier",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 an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[FZ]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:g({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[f1]:{type:"boolean",default:!1,description:g("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[Bm]:{type:"boolean",default:!1,description:g("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[LN]:{type:"number",default:8,minimum:4,maximum:40,description:g("tree indent setting","Controls tree indentation in pixels.")},[VZ]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:g("render tree indent guides","Controls whether the tree should render indent guides.")},[Vm]:{type:"boolean",default:!1,description:g("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[P2]:{type:"number",default:1,markdownDescription:g("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[O2]:{type:"number",default:5,markdownDescription:g("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[R0e]:{type:"string",enum:["highlight","filter"],enumDescriptions:[g("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),g("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:g("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[BZ]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[g("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),g("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),g("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:g("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:g("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and 'workbench.list.typeNavigationMode' instead.")},[O0e]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[g("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),g("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:g("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[WZ]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:g("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[UZ]:{type:"boolean",default:!0,description:g("sticky scroll","Controls whether sticky scrolling is enabled in trees.")},[$Z]:{type:"number",minimum:1,default:7,markdownDescription:g("sticky scroll maximum items","Controls the number of sticky elements displayed in the tree when `#workbench.tree.enableStickyScroll#` is enabled.")},[P0e]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:g("typeNavigationMode2","Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}})});var tX,p1,z0e,i7=P(()=>{Vi();nt();Ys();(function(i){i[i.PRESERVE=0]="PRESERVE",i[i.LAST=1]="LAST"})(tX||(tX={}));p1={Quickaccess:"workbench.contributions.quickaccess"},z0e=class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((t,n)=>n.prefix.length-t.prefix.length),Yt(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return pl([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(n=>e.startsWith(n.prefix))||void 0||this.defaultProvider}};jn.add(p1.Quickaccess,new z0e)});var snt,n7,lf,F0e,zKi,ol,cf=P(()=>{_i();snt={ctrlCmd:!1,alt:!1};(function(i){i[i.Blur=1]="Blur",i[i.Gesture=2]="Gesture",i[i.Other=3]="Other"})(n7||(n7={}));(function(i){i[i.NONE=0]="NONE",i[i.FIRST=1]="FIRST",i[i.SECOND=2]="SECOND",i[i.LAST=3]="LAST"})(lf||(lf={}));F0e=class{constructor(e){this.options=e}},zKi=new F0e,ol=vi("quickInputService")});var KNt,ant,iX,lnt=P(()=>{Qi();mo();Xt();nt();_i();i7();cf();Ys();KNt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},ant=function(i,e){return function(t,n){e(t,n,i)}},iX=class extends ue{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=jn.as(p1.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,n){var o;let[r,s]=this.getOrInstantiateProvider(e),a=this.visibleQuickAccess,l=a?.descriptor;if(a&&s&&l===s){e!==s.prefix&&!n?.preserveValue&&(a.picker.value=e),this.adjustValueSelection(a.picker,s,n);return}if(s&&!n?.preserveValue){let f;if(a&&l&&l!==s){let p=a.value.substr(l.prefix.length);p&&(f=`${s.prefix}${p}`)}if(!f){let p=r?.defaultFilterValue;p===tX.LAST?f=this.lastAcceptedPickerValues.get(s):typeof p=="string"&&(f=`${s.prefix}${p}`)}typeof f=="string"&&(e=f)}let c=new Ye,d=c.add(this.quickInputService.createQuickPick());d.value=e,this.adjustValueSelection(d,s,n),d.placeholder=s?.placeholder,d.quickNavigate=n?.quickNavigateConfiguration,d.hideInput=!!d.quickNavigate&&!a,(typeof n?.itemActivation=="number"||n?.quickNavigateConfiguration)&&(d.itemActivation=(o=n?.itemActivation)!==null&&o!==void 0?o:lf.SECOND),d.contextKey=s?.contextKey,d.filterValue=f=>f.substring(s?s.prefix.length:0);let u;t&&(u=new Fg,c.add(Et.once(d.onWillAccept)(f=>{f.veto(),d.hide()}))),c.add(this.registerPickerListeners(d,r,s,e,n?.providerOptions));let h=c.add(new Jn);if(r&&c.add(r.provide(d,h.token,n?.providerOptions)),Et.once(d.onDidHide)(()=>{d.selectedItems.length===0&&h.cancel(),c.dispose(),u?.complete(d.selectedItems.slice(0))}),d.show(),t)return u?.p}adjustValueSelection(e,t,n){var o;let r;n?.preserveValue?r=[e.value.length,e.value.length]:r=[(o=t?.prefix.length)!==null&&o!==void 0?o:0,e.value.length],e.valueSelection=r}registerPickerListeners(e,t,n,o,r){let s=new Ye,a=this.visibleQuickAccess={picker:e,descriptor:n,value:o};return s.add(Yt(()=>{a===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),s.add(e.onDidChangeValue(l=>{let[c]=this.getOrInstantiateProvider(l);c!==t?this.show(l,{preserveValue:!0,providerOptions:r}):a.value=l})),n&&s.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(n,e.value)})),s}getOrInstantiateProvider(e){let t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let n=this.mapProviderToDescriptor.get(t);return n||(n=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,n)),[n,t]}};iX=KNt([ant(0,ol),ant(1,qt)],iX)});var IN=P(()=>{});var cnt=P(()=>{});var F2,H0e=P(()=>{Qt();Rv();Gc();F2=class i{constructor(e,t){var n;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=(n=t?.supportIcons)!==null&&n!==void 0?n:!1,this.domNode=ut(e,pt("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],n="",o){e||(e=""),o&&(e=i.escapeNewLines(e,t)),!(this.didEverRender&&this.text===e&&this.title===n&&Za(this.highlights,t))&&(this.text=e,this.title=n,this.highlights=t,this.render())}render(){let e=[],t=0;for(let n of this.highlights){if(n.end===n.start)continue;if(t{o=r===`\r -`?-1:0,s+=n;for(let a of t)a.end<=s||(a.start>=s&&(a.start+=o),a.end>=s&&(a.end+=o));return n+=o,"\u23CE"})}}});function YNt(i,e,t){if(!t)return;let n=0;return i.map(o=>{let r={start:n,end:n+o.length},s=t.map(a=>Ua.intersect(r,a)).filter(a=>!Ua.isEmpty(a)).map(({start:a,end:l})=>({start:a-n,end:l-n}));return n=r.end+e.length,s})}var o7,O4,B0e,V0e,nX=P(()=>{cnt();Qt();H0e();l2e();nt();Gc();XM();o7=class{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}},O4=class extends ue{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new o7(ut(e,pt(".monaco-icon-label")))),this.labelContainer=ut(this.domNode.element,pt(".monaco-icon-label-container")),this.nameContainer=ut(this.labelContainer,pt("span.monaco-icon-name-container")),t?.supportHighlights||t?.supportIcons?this.nameNode=new V0e(this.nameContainer,!!t.supportIcons):this.nameNode=new B0e(this.nameContainer),this.hoverDelegate=t?.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,n){var o;let r=["monaco-icon-label"],s=["monaco-icon-label-container"],a="";if(n&&(n.extraClasses&&r.push(...n.extraClasses),n.italic&&r.push("italic"),n.strikethrough&&r.push("strikethrough"),n.disabledCommand&&s.push("disabled"),n.title&&(typeof n.title=="string"?a+=n.title:a+=e)),this.domNode.className=r.join(" "),this.domNode.element.setAttribute("aria-label",a),this.labelContainer.className=s.join(" "),this.setupHover(n?.descriptionTitle?this.labelContainer:this.element,n?.title),this.nameNode.setLabel(e,n),t||this.descriptionNode){let l=this.getOrCreateDescriptionNode();l instanceof F2?(l.set(t||"",n?n.descriptionMatches:void 0,void 0,n?.labelEscapeNewLines),this.setupHover(l.element,n?.descriptionTitle)):(l.textContent=t&&n?.labelEscapeNewLines?F2.escapeNewLines(t,[]):t||"",this.setupHover(l.element,n?.descriptionTitle||""),l.empty=!t)}if(n?.suffix||this.suffixNode){let l=this.getOrCreateSuffixNode();l.textContent=(o=n?.suffix)!==null&&o!==void 0?o:""}}setupHover(e,t){let n=this.customHovers.get(e);if(n&&(n.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}if(!this.hoverDelegate)Ftt(e,t);else{let o=KY(this.hoverDelegate,e,t);o&&this.customHovers.set(e,o)}}dispose(){super.dispose();for(let e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){let e=this._register(new o7(sGe(this.nameContainer,pt("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new o7(ut(e.element,pt("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){var e;if(!this.descriptionNode){let t=this._register(new o7(ut(this.labelContainer,pt("span.monaco-icon-description-container"))));!((e=this.creationOptions)===null||e===void 0)&&e.supportDescriptionHighlights?this.descriptionNode=new F2(ut(t.element,pt("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new o7(ut(t.element,pt("span.label-description"))))}return this.descriptionNode}},B0e=class{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&Za(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=ut(this.container,pt("a.label-name",{id:t?.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let n=0;n{});var oX,unt,Jv,rX=P(()=>{Qt();NY();Gc();dnt();Wt();oX=pt,unt={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0},Jv=class i{constructor(e,t,n){this.os=t,this.keyElements=new Set,this.options=n||Object.create(null);let o=this.options.keybindingLabelForeground;this.domNode=ut(e,oX(".monaco-keybinding")),o&&(this.domNode.style.color=o),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&i.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){var e;if(this.clear(),this.keybinding){let t=this.keybinding.getChords();t[0]&&this.renderChord(this.domNode,t[0],this.matches?this.matches.firstPart:null);for(let o=1;oo.length)return 1}return 0}var hnt,gYi,vYi,pnt=P(()=>{j0();hnt=new bl(()=>{let i=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:i,collatorIsNumeric:i.resolvedOptions().numeric}}),gYi=new bl(()=>({collator:new Intl.Collator(void 0,{numeric:!0})})),vYi=new bl(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}))});function mnt(i){let e=[],t=0,n;for(;n=JNt.exec(i);){n.index-t>0&&e.push(i.substring(t,n.index));let[,o,r,,s]=n;s?e.push({label:o,href:r,title:s}):e.push({label:o,href:r}),t=n.index+n[0].length}return t{dv();QNt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},sX=class{constructor(e){this.nodes=e}toString(){return this.nodes.map(e=>typeof e=="string"?e:e.label).join("")}};QNt([Tr],sX.prototype,"toString",null);JNt=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi});function tAt(i){if(!i)return;let e,t=i.dark.toString();return W0e[t]?e=W0e[t]:(e=eAt.nextId(),GC(`.${e}, .hc-light .${e}`,`background-image: ${rp(i.light||i.dark)}`),GC(`.vs-dark .${e}, .hc-black .${e}`,`background-image: ${rp(i.dark)}`),W0e[t]=e),e}function MN(i,e,t){let n=i.iconClass||tAt(i.iconPath);return i.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible"),{id:e,label:"",tooltip:i.tooltip||"",class:n,enabled:!0,run:t}}function vnt(i,e,t){ns(e);let n=mnt(i),o=0;for(let r of n.nodes)if(typeof r=="string")e.append(...of(r));else{let s=r.title;!s&&r.href.startsWith("command:")?s=g("executeCommand","Click to execute command '{0}'",r.href.substring(8)):s||(s=r.href);let a=pt("a",{href:r.href,title:s,tabIndex:o++},r.label);a.style.textDecoration="underline";let l=f=>{nGe(f)&&nn.stop(f,!0),t.callback(r.href)},c=t.disposables.add(new _n(a,Lt.CLICK)).event,d=t.disposables.add(new _n(a,Lt.KEY_DOWN)).event,u=Et.chain(d,f=>f.filter(p=>{let m=new qn(p);return m.equals(10)||m.equals(3)}));t.disposables.add(ar.addTarget(a));let h=t.disposables.add(new _n(a,vo.Tap)).event;Et.any(c,h,u)(l,null,t.disposables),e.appendChild(a)}}var W0e,eAt,U0e=P(()=>{Qt();vp();Xt();Gl();dh();Rv();HM();gnt();IN();Wt();W0e={},eAt=new zb("quick-input-button-icon-")});function iAt(i,e){let{text:t,iconOffsets:n}=e;if(!n||n.length===0)return _nt(i,t);let o=q0(t," "),r=t.length-o.length,s=_nt(i,o);if(s)for(let a of s){let l=n[a.start+r]+r;a.start+=l,a.end+=l}return s}function _nt(i,e){let t=e.toLowerCase().indexOf(i.toLowerCase());return t!==-1?[{start:t,end:t+i.length}]:null}function nAt(i,e,t){let n=i.labelHighlights||[],o=e.labelHighlights||[];return n.length&&!o.length?-1:!n.length&&o.length?1:n.length===0&&o.length===0?0:fnt(i.saneSortLabel,e.saneSortLabel,t)}var bnt,Wm,$0e,NN,j0e,$a,SS,q0e,G0e=P(()=>{Qt();Gl();u1();nX();rX();Vi();Qi();pnt();dv();Pi();Xt();Ob();nt();Mn();Ri();IN();Wt();U0e();j0();Io();fp();bnt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Wm=pt,$0e=class{constructor(e,t,n,o,r,s,a){var l,c,d;this._checked=!1,this._hidden=!1,this.hasCheckbox=o,this.index=n,this.fireButtonTriggered=r,this.fireSeparatorButtonTriggered=s,this._onChecked=a,this.onChecked=o?Et.map(Et.filter(this._onChecked.event,u=>u.listElement===this),u=>u.checked):Et.None,e.type==="separator"?this._separator=e:(this.item=e,t&&t.type==="separator"&&!t.buttons&&(this._separator=t),this.saneDescription=this.item.description,this.saneDetail=this.item.detail,this._labelHighlights=(l=this.item.highlights)===null||l===void 0?void 0:l.label,this._descriptionHighlights=(c=this.item.highlights)===null||c===void 0?void 0:c.description,this._detailHighlights=(d=this.item.highlights)===null||d===void 0?void 0:d.detail,this.saneTooltip=this.item.tooltip),this._init=new bl(()=>{var u;let h=(u=e.label)!==null&&u!==void 0?u:"",f=Wx(h).text.trim(),p=e.ariaLabel||[h,this.saneDescription,this.saneDetail].map(m=>itt(m)).filter(m=>!!m).join(", ");return{saneLabel:h,saneSortLabel:f,saneAriaLabel:p}})}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({listElement:this,checked:e}))}get separator(){return this._separator}set separator(e){this._separator=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}},NN=class i{constructor(e,t){this.themeService=e,this.hoverDelegate=t}get templateId(){return i.ID}renderTemplate(e){let t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=ut(e,Wm(".quick-input-list-entry"));let n=ut(t.entry,Wm("label.quick-input-list-label"));t.toDisposeTemplate.push(go(n,Lt.CLICK,c=>{t.checkbox.offsetParent||c.preventDefault()})),t.checkbox=ut(n,Wm("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(go(t.checkbox,Lt.CHANGE,c=>{t.element.checked=t.checkbox.checked}));let o=ut(n,Wm(".quick-input-list-rows")),r=ut(o,Wm(".quick-input-list-row")),s=ut(o,Wm(".quick-input-list-row"));t.label=new O4(r,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.push(t.label),t.icon=ZC(t.label.element,Wm(".quick-input-list-icon"));let a=ut(r,Wm(".quick-input-list-entry-keybinding"));t.keybinding=new Jv(a,Xa);let l=ut(s,Wm(".quick-input-list-label-meta"));return t.detail=new O4(l,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.push(t.detail),t.separator=ut(t.entry,Wm(".quick-input-list-separator")),t.actionBar=new Bs(t.entry,this.hoverDelegate?{hoverDelegate:this.hoverDelegate}:void 0),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,n){var o,r,s,a;n.element=e,e.element=(o=n.entry)!==null&&o!==void 0?o:void 0;let l=e.item?e.item:e.separator;n.checkbox.checked=e.checked,n.toDisposeElement.push(e.onChecked(p=>n.checkbox.checked=p));let{labelHighlights:c,descriptionHighlights:d,detailHighlights:u}=e;if(!((r=e.item)===null||r===void 0)&&r.iconPath){let p=a2(this.themeService.getColorTheme().type)?e.item.iconPath.dark:(s=e.item.iconPath.light)!==null&&s!==void 0?s:e.item.iconPath.dark,m=li.revive(p);n.icon.className="quick-input-list-icon",n.icon.style.backgroundImage=rp(m)}else n.icon.style.backgroundImage="",n.icon.className=!((a=e.item)===null||a===void 0)&&a.iconClass?`quick-input-list-icon ${e.item.iconClass}`:"";let h={matches:c||[],descriptionTitle:e.saneTooltip?void 0:e.saneDescription,descriptionMatches:d||[],labelEscapeNewLines:!0};l.type!=="separator"?(h.extraClasses=l.iconClasses,h.italic=l.italic,h.strikethrough=l.strikethrough,n.entry.classList.remove("quick-input-list-separator-as-item")):n.entry.classList.add("quick-input-list-separator-as-item"),n.label.setLabel(e.saneLabel,e.saneDescription,h),n.keybinding.set(l.type==="separator"?void 0:l.keybinding),e.saneDetail?(n.detail.element.style.display="",n.detail.setLabel(e.saneDetail,void 0,{matches:u,title:e.saneTooltip?void 0:e.saneDetail,labelEscapeNewLines:!0})):n.detail.element.style.display="none",e.item&&e.separator&&e.separator.label?(n.separator.textContent=e.separator.label,n.separator.style.display=""):n.separator.style.display="none",n.entry.classList.toggle("quick-input-list-separator-border",!!e.separator);let f=l.buttons;f&&f.length?(n.actionBar.push(f.map((p,m)=>MN(p,`id-${m}`,()=>l.type!=="separator"?e.fireButtonTriggered({button:p,item:l}):e.fireSeparatorButtonTriggered({button:p,separator:l}))),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions")}disposeElement(e,t,n){n.toDisposeElement=Nn(n.toDisposeElement),n.actionBar.clear()}disposeTemplate(e){e.toDisposeElement=Nn(e.toDisposeElement),e.toDisposeTemplate=Nn(e.toDisposeTemplate)}};NN.ID="listelement";j0e=class{getHeight(e){return e.item?e.saneDetail?44:22:24}getTemplateId(e){return NN.ID}};(function(i){i[i.First=1]="First",i[i.Second=2]="Second",i[i.Last=3]="Last",i[i.Next=4]="Next",i[i.Previous=5]="Previous",i[i.NextPage=6]="NextPage",i[i.PreviousPage=7]="PreviousPage"})($a||($a={}));SS=class{constructor(e,t,n,o){this.parent=e,this.options=n,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.sortByLabel=!0,this._onChangedAllVisibleChecked=new ge,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new ge,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new ge,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new ge,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new ge,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new ge,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._onKeyDown=new ge,this.onKeyDown=this._onKeyDown.event,this._onLeave=new ge,this.onLeave=this._onLeave.event,this._listElementChecked=new ge,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=ut(this.parent,Wm(".quick-input-list"));let r=new j0e,s=new q0e;this.list=n.createList("QuickInput",this.container,r,[new NN(o,n.hoverDelegate)],{identityProvider:{getId:l=>{var c,d,u,h,f,p,m,y;return(y=(p=(h=(d=(c=l.item)===null||c===void 0?void 0:c.id)!==null&&d!==void 0?d:(u=l.item)===null||u===void 0?void 0:u.label)!==null&&h!==void 0?h:(f=l.separator)===null||f===void 0?void 0:f.id)!==null&&p!==void 0?p:(m=l.separator)===null||m===void 0?void 0:m.label)!==null&&y!==void 0?y:""}},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:s}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(l=>{let c=new qn(l);switch(c.keyCode){case 10:this.toggleCheckbox();break;case 31:(Wi?l.metaKey:l.ctrlKey)&&this.list.setFocus(Ya(this.list.length));break;case 16:{let d=this.list.getFocus();d.length===1&&d[0]===0&&this._onLeave.fire();break}case 18:{let d=this.list.getFocus();d.length===1&&d[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(c)})),this.disposables.push(this.list.onMouseDown(l=>{l.browserEvent.button!==2&&l.browserEvent.preventDefault()})),this.disposables.push(Xe(this.container,Lt.CLICK,l=>{(l.x||l.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(l=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(l=>{typeof l.index=="number"&&(l.browserEvent.preventDefault(),this.list.setSelection([l.index]))}));let a=new UC(n.hoverDelegate.delay);this.disposables.push(this.list.onMouseOver(async l=>{var c;if(l.browserEvent.target instanceof HTMLAnchorElement){a.cancel();return}if(!(!(l.browserEvent.relatedTarget instanceof HTMLAnchorElement)&&ms(l.browserEvent.relatedTarget,(c=l.element)===null||c===void 0?void 0:c.element)))try{await a.trigger(async()=>{l.element&&this.showHover(l.element)})}catch(d){if(!jl(d))throw d}})),this.disposables.push(this.list.onMouseOut(l=>{var c;ms(l.browserEvent.relatedTarget,(c=l.element)===null||c===void 0?void 0:c.element)||a.cancel()})),this.disposables.push(a),this.disposables.push(this._listElementChecked.event(l=>this.fireCheckedEvents())),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return Et.map(this.list.onDidChangeFocus,e=>e.elements.map(t=>t.item))}get onDidChangeSelection(){return Et.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(t=>t.item),event:e.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}get ariaLabel(){return this.list.getHTMLElement().ariaLabel}set ariaLabel(e){this.list.getHTMLElement().ariaLabel=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let n=0,o=e.length;n{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=Nn(this.elementDisposables);let t=s=>this.fireButtonTriggered(s),n=s=>this.fireSeparatorButtonTriggered(s);this.inputElements=e;let o=new Map,r=this.parent.classList.contains("show-checkboxes");this.elements=e.reduce((s,a,l)=>{var c;let d=l>0?e[l-1]:void 0;if(a.type==="separator"&&!a.buttons)return s;let u=new $0e(a,d,l,r,t,n,this._listElementChecked),h=s.length;return s.push(u),o.set((c=u.item)!==null&&c!==void 0?c:u.separator,h),s},[]),this.elementsToIndexes=o,this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(e=>e.item)}setFocusedElements(e){if(this.list.setFocus(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t))),e.length>0){let t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item).filter(e=>!!e)}setCheckedElements(e){try{this._fireCheckedEvents=!1;let t=new Set;for(let n of e)t.add(n);for(let n of this.elements)n.checked=t.has(n.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===$a.Second&&this.list.length<2&&(e=$a.First),e){case $a.First:this.list.scrollTop=0,this.list.focusFirst(void 0,n=>!!n.item);break;case $a.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,n=>!!n.item);break;case $a.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,n=>!!n.item);break;case $a.Next:{this.list.focusNext(void 0,!0,void 0,o=>!!o.item);let n=this.list.getFocus()[0];n!==0&&!this.elements[n-1].item&&this.list.firstVisibleIndex>n-1&&this.list.reveal(n-1);break}case $a.Previous:{this.list.focusPrevious(void 0,!0,void 0,o=>!!o.item);let n=this.list.getFocus()[0];n!==0&&!this.elements[n-1].item&&this.list.firstVisibleIndex>n-1&&this.list.reveal(n-1);break}case $a.NextPage:this.list.focusNextPage(void 0,n=>!!n.item);break;case $a.PreviousPage:this.list.focusPreviousPage(void 0,n=>!!n.item);break}let t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}showHover(e){var t,n,o;this._lastHover&&!this._lastHover.isDisposed&&((n=(t=this.options.hoverDelegate).onDidHideHover)===null||n===void 0||n.call(t),(o=this._lastHover)===null||o===void 0||o.dispose()),!(!e.element||!e.saneTooltip)&&(this._lastHover=this.options.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:r=>{this.options.linkOpenerDelegate(r)},appearance:{showPointer:!0},container:this.container,position:{hoverPosition:1}},!1))}layout(e){this.list.getHTMLElement().style.maxHeight=e?`${Math.floor(e/44)*44+6}px`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;let t=e;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(o=>{o.labelHighlights=void 0,o.descriptionHighlights=void 0,o.detailHighlights=void 0,o.hidden=!1;let r=o.index&&this.inputElements[o.index-1];o.item&&(o.separator=r&&r.type==="separator"&&!r.buttons?r:void 0)});else{let o;this.elements.forEach(r=>{var s,a,l,c;let d;this.matchOnLabelMode==="fuzzy"?d=this.matchOnLabel&&(s=bY(e,Wx(r.saneLabel)))!==null&&s!==void 0?s:void 0:d=this.matchOnLabel&&(a=iAt(t,Wx(r.saneLabel)))!==null&&a!==void 0?a:void 0;let u=this.matchOnDescription&&(l=bY(e,Wx(r.saneDescription||"")))!==null&&l!==void 0?l:void 0,h=this.matchOnDetail&&(c=bY(e,Wx(r.saneDetail||"")))!==null&&c!==void 0?c:void 0;if(d||u||h?(r.labelHighlights=d,r.descriptionHighlights=u,r.detailHighlights=h,r.hidden=!1):(r.labelHighlights=void 0,r.descriptionHighlights=void 0,r.detailHighlights=void 0,r.hidden=r.item?!r.item.alwaysShow:!0),r.item?r.separator=void 0:r.separator&&(r.hidden=!0),!this.sortByLabel){let f=r.index&&this.inputElements[r.index-1];o=f&&f.type==="separator"?f:o,o&&!r.hidden&&(r.separator=o,o=void 0)}})}let n=this.elements.filter(o=>!o.hidden);if(this.sortByLabel&&e){let o=e.toLowerCase();n.sort((r,s)=>nAt(r,s,o))}return this.elementsToIndexes=n.reduce((o,r,s)=>{var a;return o.set((a=r.item)!==null&&a!==void 0?a:r.separator,s),o},new Map),this.list.splice(0,this.list.length,n),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(n.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;let e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(let n of e)n.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=Nn(this.elementDisposables),this.disposables=Nn(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}fireSeparatorButtonTriggered(e){this._onSeparatorButtonTriggered.fire(e)}style(e){this.list.style(e)}toggleHover(){let e=this.list.getFocusedElements()[0];if(!e?.saneTooltip)return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}let t=this.list.getFocusedElements()[0];if(!t)return;this.showHover(t);let n=new Ye;n.add(this.list.onDidChangeFocus(o=>{o.indexes.length&&this.showHover(o.elements[0])})),this._lastHover&&n.add(this._lastHover),this._toggleHover=n,this.elementDisposables.push(this._toggleHover)}};bnt([Tr],SS.prototype,"onDidChangeFocus",null);bnt([Tr],SS.prototype,"onDidChangeSelection",null);q0e=class{getWidgetAriaLabel(){return g("quickInput","Quick Input")}getAriaLabel(e){var t;return!((t=e.separator)===null||t===void 0)&&t.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(e.hasCheckbox)return{value:e.checked,onDidChange:e.onChecked}}}});var aX,AN,kS,lX,cX,K0e=P(()=>{Qt();Gl();mS();Vi();Qi();Go();Xt();nt();Mn();C4();or();IN();Wt();cf();G0e();U0e();aX={iconClass:ui.asClassName(kt.quickInputBack),tooltip:g("quickInput.back","Back"),handle:-1},AN=class i extends ue{constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=i.noPromptMessage,this._severity=lr.Ignore,this.onDidTriggerButtonEmitter=this._register(new ge),this.onDidHideEmitter=this._register(new ge),this.onDisposeEmitter=this._register(new ge),this.visibleDisposables=this._register(new Ye),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){let t=this._ignoreFocusOut!==e&&!Lc;this._ignoreFocusOut=e&&!Lc,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=e??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=n7.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){var e,t;if(!this.visible)return;let n=this.getTitle();n&&this.ui.title.textContent!==n?this.ui.title.textContent=n:!n&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\xA0");let o=this.getDescription();if(this.ui.description1.textContent!==o&&(this.ui.description1.textContent=o),this.ui.description2.textContent!==o&&(this.ui.description2.textContent=o),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?ns(this.ui.widget,this._widget):ns(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new Zs,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();let s=this.buttons.filter(l=>l===aX).map((l,c)=>MN(l,`id-${c}`,async()=>this.onDidTriggerButtonEmitter.fire(l)));this.ui.leftActionBar.push(s,{icon:!0,label:!1}),this.ui.rightActionBar.clear();let a=this.buttons.filter(l=>l!==aX).map((l,c)=>MN(l,`id-${c}`,async()=>this.onDidTriggerButtonEmitter.fire(l)));this.ui.rightActionBar.push(a,{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;let s=(t=(e=this.toggles)===null||e===void 0?void 0:e.filter(a=>a instanceof h1))!==null&&t!==void 0?t:[];this.ui.inputBox.toggles=s}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);let r=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==r&&(this._lastValidationMessage=r,ns(this.ui.message),vnt(r,this.ui.message,{callback:s=>{this.ui.linkOpenerDelegate(s)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?g("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==lr.Ignore){let t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}};AN.noPromptMessage=g("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");kS=class i extends AN{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new ge),this.onWillAcceptEmitter=this._register(new ge),this.onDidAcceptEmitter=this._register(new ge),this.onDidCustomEmitter=this._register(new ge),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._keepScrollPosition=!1,this._itemActivation=lf.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new ge),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new ge),this.onDidTriggerItemButtonEmitter=this._register(new ge),this.onDidTriggerSeparatorButtonEmitter=this._register(new ge),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?snt:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.canSelectMany||this.ui.list.focus($a.First)}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{this.doSetValue(e,!0)})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(e=>{switch(e.keyCode){case 18:this.ui.list.focus($a.Next),this.canSelectMany&&this.ui.list.domFocus(),nn.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus($a.Previous):this.ui.list.focus($a.Last),this.canSelectMany&&this.ui.list.domFocus(),nn.stop(e,!0);break;case 12:this.ui.list.focus($a.NextPage),this.canSelectMany&&this.ui.list.domFocus(),nn.stop(e,!0);break;case 11:this.ui.list.focus($a.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),nn.stop(e,!0);break;case 17:if(!this._canAcceptInBackground||!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus($a.First),nn.stop(e,!0));break;case 13:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus($a.Last),nn.stop(e,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&uo(e,this._activeItems,(t,n)=>t===n)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&uo(e,this._selectedItems,(n,o)=>n===o)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(KC(t)&&t.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&uo(e,this._selectedItems,(t,n)=>t===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(e=>this.onDidTriggerSeparatorButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return Xe(this.ui.container,Lt.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;let t=new qn(e),n=t.keyCode;this._quickNavigate.keybindings.some(s=>{let a=s.getChords();return a.length>1?!1:a[0].shiftKey&&n===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(a[0].altKey&&n===6||a[0].ctrlKey&&n===5||a[0].metaKey&&n===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;let e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,n={title:!!this.title||!!this.step||!!this.buttons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(n),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let o=this.ariaLabel;if(!o&&n.inputBox&&(o=this.placeholder||i.DEFAULT_ARIA_LABEL,this.title&&(o+=` - ${this.title}`)),this.ui.list.ariaLabel!==o&&(this.ui.list.ariaLabel=o??null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case lf.NONE:this._itemActivation=lf.FIRST;break;case lf.SECOND:this.ui.list.focus($a.Second),this._itemActivation=lf.FIRST;break;case lf.LAST:this.ui.list.focus($a.Last),this._itemActivation=lf.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",n.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus($a.First)),this.keepScrollPosition&&(this.scrollTop=e)}};kS.DEFAULT_ARIA_LABEL=g("quickInputBox.ariaLabel","Type to narrow down results.");lX=class extends AN{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new ge),this.onDidAcceptEmitter=this._register(new ge),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");let e={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}},cX=class{get delay(){return Date.now()-this.lastHoverHideTime<200?0:this.configurationService.getValue("workbench.hover.delay")}constructor(e,t){this.configurationService=e,this.hoverService=t,this.lastHoverHideTime=0,this.placement="element"}showHover(e,t){var n;let o=(e.content instanceof HTMLElement?(n=e.content.textContent)!==null&&n!==void 0?n:"":typeof e.content=="string"?e.content:e.content.value).length>20;return this.hoverService.showHover({...e,persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:o,skipFadeInAnimation:!0}},t)}onDidHideHover(){this.lastHoverHideTime=Date.now()}}});var ynt=P(()=>{});var EZi,z4,dX=P(()=>{Qt();qU();Gl();VM();dh();Rv();sa();Xt();Md();nt();or();ynt();EZi={buttonBackground:"#0E639C",buttonHoverBackground:"#006BB3",buttonSeparator:it.white.toString(),buttonForeground:it.white.toString(),buttonBorder:void 0,buttonSecondaryBackground:void 0,buttonSecondaryForeground:void 0,buttonSecondaryHoverBackground:void 0},z4=class extends ue{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new ge),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);let n=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,o=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=o||"",this._element.style.backgroundColor=n||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),typeof t.ariaLabel=="string"&&this._element.setAttribute("aria-label",t.ariaLabel),e.appendChild(this._element),this._register(ar.addTarget(this._element)),[Lt.CLICK,vo.Tap].forEach(r=>{this._register(Xe(this._element,r,s=>{if(!this.enabled){nn.stop(s);return}this._onDidClick.fire(s)}))}),this._register(Xe(this._element,Lt.KEY_DOWN,r=>{let s=new qn(r),a=!1;this.enabled&&(s.equals(3)||s.equals(10))?(this._onDidClick.fire(r),a=!0):s.equals(9)&&(this._element.blur(),a=!0),a&&nn.stop(s,!0)})),this._register(Xe(this._element,Lt.MOUSE_OVER,r=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register(Xe(this._element,Lt.MOUSE_OUT,r=>{this.updateBackground(!1)})),this.focusTracker=this._register(Kl(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){let t=[];for(let n of of(e))if(typeof n=="string"){if(n=n.trim(),n==="")continue;let o=document.createElement("span");o.textContent=n,t.push(o)}else t.push(n);return t}updateBackground(e){let t;this.options.secondary?t=e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:t=e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){var t;if(this._label===e||sf(this._label)&&sf(e)&&ntt(this._label,e))return;this._element.classList.add("monaco-text-button");let n=this.options.supportShortLabel?this._labelElement:this._element;if(sf(e)){let o=Bv(e,{inline:!0});o.dispose();let r=(t=o.element.querySelector("p"))===null||t===void 0?void 0:t.innerHTML;if(r){let s=$U(r,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});n.innerHTML=s}else ns(n)}else this.options.supportIcons?ns(n,...this.getContentElements(e)):n.textContent=e;typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=ltt(e)),typeof this.options.ariaLabel=="string"?this._element.setAttribute("aria-label",this.options.ariaLabel):this.options.ariaLabel&&this._element.setAttribute("aria-label",this._element.title),this._label=e}get label(){return this._label}set icon(e){this._element.classList.add(...ui.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}});var Cnt=P(()=>{});var r7,Y0e=P(()=>{Qt();Ri();Cnt();r7=class{constructor(e,t,n){this.options=t,this.styles=n,this.count=0,this.element=ut(e,pt(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){var e,t;this.element.textContent=zf(this.countFormat,this.count),this.element.title=zf(this.titleFormat,this.count),this.element.style.backgroundColor=(e=this.styles.badgeBackground)!==null&&e!==void 0?e:"",this.element.style.color=(t=this.styles.badgeForeground)!==null&&t!==void 0?t:"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}});var wnt=P(()=>{});var xnt,Snt,Z0e,X0e,knt,RN,Lnt=P(()=>{Qt();Qi();nt();wnt();xnt="done",Snt="active",Z0e="infinite",X0e="infinite-long-running",knt="discrete",RN=class i extends ue{constructor(e,t){super(),this.workedVal=0,this.showDelayedScheduler=this._register(new hn(()=>el(this.element),0)),this.longRunningScheduler=this._register(new hn(()=>this.infiniteLongRunning(),i.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=t?.progressBarBackground||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(Snt,Z0e,X0e,knt),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(xnt),this.element.classList.contains(Z0e)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(knt,xnt,X0e),this.element.classList.add(Snt,Z0e),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(X0e)}getContainer(){return this.element}};RN.LONG_RUNNING_INFINITE_THRESHOLD=1e4});var oAt,uX,Ent=P(()=>{Qt();SZ();nt();C4();IN();oAt=pt,uX=class extends ue{constructor(e,t,n){super(),this.parent=e,this.onKeyDown=r=>go(this.findInput.inputBox.inputElement,Lt.KEY_DOWN,r),this.onDidChange=r=>this.findInput.onDidChange(r),this.container=ut(this.parent,oAt(".quick-input-box")),this.findInput=this._register(new Zb(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:n}));let o=this.findInput.inputBox.inputElement;o.role="combobox",o.ariaHasPopup="menu",o.ariaAutoComplete="list",o.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}showDecoration(e){e===lr.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===lr.Info?1:e===lr.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===lr.Info?1:e===lr.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}});var vh,PN,Dnt=P(()=>{Qt();u1();dX();Y0e();Lnt();mo();Xt();nt();C4();Wt();cf();Ent();G0e();K0e();_l();vh=pt,PN=class i extends ue{constructor(e,t,n){super(),this.options=e,this.themeService=t,this.layoutService=n,this.enabled=!0,this.onDidAcceptEmitter=this._register(new ge),this.onDidCustomEmitter=this._register(new ge),this.onDidTriggerButtonEmitter=this._register(new ge),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new ge),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new ge),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this._register(Et.runAndSubscribe(x5,({window:o,disposables:r})=>this.registerKeyModsListeners(o,r),{window:Hn,disposables:this._store})),this._register(Gqe(o=>{this.ui&&pi(this.ui.container)===o&&this.reparentUI(this.layoutService.mainContainer)}))}registerKeyModsListeners(e,t){let n=o=>{this.keyMods.ctrlCmd=o.ctrlKey||o.metaKey,this.keyMods.alt=o.altKey};for(let o of[Lt.KEY_DOWN,Lt.KEY_UP,Lt.MOUSE_DOWN])t.add(Xe(e,o,n,!0))}getUI(e){if(this.ui)return e&&this.parentElement.ownerDocument!==this.layoutService.activeContainer.ownerDocument&&this.reparentUI(this.layoutService.activeContainer),this.ui;let t=ut(this.parentElement,vh(".quick-input-widget.show-file-icons"));t.tabIndex=-1,t.style.display="none";let n=ya(t),o=ut(t,vh(".quick-input-titlebar")),r=this._register(new Bs(o,{hoverDelegate:this.options.hoverDelegate}));r.domNode.classList.add("quick-input-left-action-bar");let s=ut(o,vh(".quick-input-title")),a=this._register(new Bs(o,{hoverDelegate:this.options.hoverDelegate}));a.domNode.classList.add("quick-input-right-action-bar");let l=ut(t,vh(".quick-input-header")),c=ut(l,vh("input.quick-input-check-all"));c.type="checkbox",c.setAttribute("aria-label",g("quickInput.checkAll","Toggle all checkboxes")),this._register(go(c,Lt.CHANGE,L=>{let I=c.checked;A.setAllVisibleChecked(I)})),this._register(Xe(c,Lt.CLICK,L=>{(L.x||L.y)&&f.setFocus()}));let d=ut(l,vh(".quick-input-description")),u=ut(l,vh(".quick-input-and-message")),h=ut(u,vh(".quick-input-filter")),f=this._register(new uX(h,this.styles.inputBox,this.styles.toggle));f.setAttribute("aria-describedby",`${this.idPrefix}message`);let p=ut(h,vh(".quick-input-visible-count"));p.setAttribute("aria-live","polite"),p.setAttribute("aria-atomic","true");let m=new r7(p,{countFormat:g({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")},this.styles.countBadge),y=ut(h,vh(".quick-input-count"));y.setAttribute("aria-live","polite");let _=new r7(y,{countFormat:g({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")},this.styles.countBadge),v=ut(l,vh(".quick-input-action")),b=this._register(new z4(v,this.styles.button));b.label=g("ok","OK"),this._register(b.onDidClick(L=>{this.onDidAcceptEmitter.fire()}));let C=ut(l,vh(".quick-input-action")),w=this._register(new z4(C,{...this.styles.button,supportIcons:!0}));w.label=g("custom","Custom"),this._register(w.onDidClick(L=>{this.onDidCustomEmitter.fire()}));let S=ut(u,vh(`#${this.idPrefix}message.quick-input-message`)),x=this._register(new RN(t,this.styles.progressBar));x.getContainer().classList.add("quick-input-progress");let k=ut(t,vh(".quick-input-html-widget"));k.tabIndex=-1;let D=ut(t,vh(".quick-input-description")),E=this.idPrefix+"list",A=this._register(new SS(t,E,this.options,this.themeService));f.setAttribute("aria-controls",E),this._register(A.onDidChangeFocus(()=>{var L;f.setAttribute("aria-activedescendant",(L=A.getActiveDescendant())!==null&&L!==void 0?L:"")})),this._register(A.onChangedAllVisibleChecked(L=>{c.checked=L})),this._register(A.onChangedVisibleCount(L=>{m.setCount(L)})),this._register(A.onChangedCheckedCount(L=>{_.setCount(L)})),this._register(A.onLeave(()=>{setTimeout(()=>{f.setFocus(),this.controller instanceof kS&&this.controller.canSelectMany&&A.clearFocus()},0)}));let T=Kl(t);return this._register(T),this._register(Xe(t,Lt.FOCUS,L=>{ms(L.relatedTarget,t)||(this.previousFocusElement=L.relatedTarget instanceof HTMLElement?L.relatedTarget:void 0)},!0)),this._register(T.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(n7.Blur),this.previousFocusElement=void 0})),this._register(Xe(t,Lt.FOCUS,L=>{f.setFocus()})),this._register(go(t,Lt.KEY_DOWN,L=>{if(!ms(L.target,k))switch(L.keyCode){case 3:nn.stop(L,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:nn.stop(L,!0),this.hide(n7.Gesture);break;case 2:if(!L.altKey&&!L.ctrlKey&&!L.metaKey){let I=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(t.classList.contains("show-checkboxes")?I.push("input"):I.push("input[type=text]"),this.getUI().list.isDisplayed()&&I.push(".monaco-list"),this.getUI().message&&I.push(".quick-input-message a"),this.getUI().widget){if(ms(L.target,this.getUI().widget))break;I.push(".quick-input-html-widget")}let M=t.querySelectorAll(I.join(", "));L.shiftKey&&L.target===M[0]?(nn.stop(L,!0),A.clearFocus()):!L.shiftKey&&ms(L.target,M[M.length-1])&&(nn.stop(L,!0),M[0].focus())}break;case 10:L.ctrlKey&&(nn.stop(L,!0),this.getUI().list.toggleHover());break}})),this.ui={container:t,styleSheet:n,leftActionBar:r,titleBar:o,title:s,description1:D,description2:d,widget:k,rightActionBar:a,checkAll:c,inputContainer:u,filterContainer:h,inputBox:f,visibleCountContainer:p,visibleCount:m,countContainer:y,count:_,okContainer:v,ok:b,message:S,customButtonContainer:C,customButton:w,list:A,progressBar:x,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:L=>this.show(L),hide:()=>this.hide(),setVisibilities:L=>this.setVisibilities(L),setEnabled:L=>this.setEnabled(L),setContextKey:L=>this.options.setContextKey(L),linkOpenerDelegate:L=>this.options.linkOpenerDelegate(L)},this.updateStyles(),this.ui}reparentUI(e){this.ui&&(this.parentElement=e,ut(this.parentElement,this.ui.container))}pick(e,t={},n=Fi.None){return new Promise((o,r)=>{let s=d=>{var u;s=o,(u=t.onKeyMods)===null||u===void 0||u.call(t,a.keyMods),o(d)};if(n.isCancellationRequested){s(void 0);return}let a=this.createQuickPick(),l,c=[a,a.onDidAccept(()=>{if(a.canSelectMany)s(a.selectedItems.slice()),a.hide();else{let d=a.activeItems[0];d&&(s(d),a.hide())}}),a.onDidChangeActive(d=>{let u=d[0];u&&t.onDidFocus&&t.onDidFocus(u)}),a.onDidChangeSelection(d=>{if(!a.canSelectMany){let u=d[0];u&&(s(u),a.hide())}}),a.onDidTriggerItemButton(d=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton({...d,removeItem:()=>{let u=a.items.indexOf(d.item);if(u!==-1){let h=a.items.slice(),f=h.splice(u,1),p=a.activeItems.filter(y=>y!==f[0]),m=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=h,p&&(a.activeItems=p),a.keepScrollPosition=m}}})),a.onDidTriggerSeparatorButton(d=>{var u;return(u=t.onDidTriggerSeparatorButton)===null||u===void 0?void 0:u.call(t,d)}),a.onDidChangeValue(d=>{l&&!d&&(a.activeItems.length!==1||a.activeItems[0]!==l)&&(a.activeItems=[l])}),n.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{Nn(c),s(void 0)})];a.title=t.title,a.canSelectMany=!!t.canPickMany,a.placeholder=t.placeHolder,a.ignoreFocusOut=!!t.ignoreFocusLost,a.matchOnDescription=!!t.matchOnDescription,a.matchOnDetail=!!t.matchOnDetail,a.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,a.quickNavigate=t.quickNavigate,a.hideInput=!!t.hideInput,a.contextKey=t.contextKey,a.busy=!0,Promise.all([e,t.activeItem]).then(([d,u])=>{l=u,a.busy=!1,a.items=d,a.canSelectMany&&(a.selectedItems=d.filter(h=>h.type!=="separator"&&h.picked)),l&&(a.activeItems=[l])}),a.show(),Promise.resolve(e).then(void 0,d=>{r(d),a.hide()})})}createQuickPick(){let e=this.getUI(!0);return new kS(e)}createInputBox(){let e=this.getUI(!0);return new lX(e)}show(e){let t=this.getUI(!0);this.onShowEmitter.fire();let n=this.controller;this.controller=e,n?.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",ns(t.widget),t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(lr.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),ns(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;let o=this.options.backKeybindingLabel();aX.tooltip=o?g("quickInput.backWithKeybinding","Back ({0})",o):g("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}isVisible(){return!!this.ui&&this.ui.container.style.display!=="none"}setVisibilities(e){let t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",t.checkAll.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(let t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(let t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t,n;let o=this.controller;if(!o)return;let r=(t=this.ui)===null||t===void 0?void 0:t.container,s=r&&!t$(r);if(this.controller=null,this.onHideEmitter.fire(),r&&(r.style.display="none"),!s){let a=this.previousFocusElement;for(;a&&!a.offsetParent;)a=(n=a.parentElement)!==null&&n!==void 0?n:void 0;a?.offsetParent?(a.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}o.didHide(e)}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isVisible()){this.ui.container.style.top=`${this.titleBarOffset}px`;let e=this.ui.container.style,t=Math.min(this.dimension.width*.62,i.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){let{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:n,widgetBorder:o,widgetShadow:r}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e??"",this.ui.container.style.backgroundColor=t??"",this.ui.container.style.color=n??"",this.ui.container.style.border=o?`1px solid ${o}`:"",this.ui.container.style.boxShadow=r?`0 0 8px 2px ${r}`:"",this.ui.list.style(this.styles.list);let s=[];this.styles.pickerGroup.pickerGroupBorder&&s.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(s.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&s.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&s.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&s.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&s.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&s.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),s.push("}"));let a=s.join(` -`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}};PN.MAX_WIDTH=600});var rAt,LS,hX,Tnt=P(()=>{mo();Xt();Xi();_i();Nv();TN();sd();lnt();N4();pr();No();K0e();Dnt();er();cY();rAt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},LS=function(i,e){return function(t,n){e(t,n,i)}},hX=class extends Yj{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(iX))),this._quickAccess}constructor(e,t,n,o,r,s){super(n),this.instantiationService=e,this.contextKeyService=t,this.layoutService=o,this.configurationService=r,this.hoverService=s,this._onShow=this._register(new ge),this._onHide=this._register(new ge),this.contexts=new Map}createController(e=this.layoutService,t){let n={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:r=>this.setContextKey(r),linkOpenerDelegate:r=>{this.instantiationService.invokeFunction(s=>{s.get(Xr).open(r,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>e.focus(),createList:(r,s,a,l,c)=>this.instantiationService.createInstance(jZ,r,s,a,l,c),styles:this.computeStyles(),hoverDelegate:new cX(this.configurationService,this.hoverService)},o=this._register(new PN({...n,...t},this.themeService,this.layoutService));return o.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer(r=>o.layout(r,e.activeContainerOffset.quickPickTop))),this._register(e.onDidChangeActiveContainer(()=>{o.isVisible()||o.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop)})),this._register(o.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(o.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),o}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new Bt(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t?.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},n=Fi.None){return this.controller.pick(e,t,n)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:ai(o1e),quickInputForeground:ai(LYe),quickInputTitleBackground:ai(EYe),widgetBorder:ai(Vw),widgetShadow:ai(Zh)},inputBox:aS,toggle:sS,countBadge:aZ,button:ait,progressBar:lit,keybindingLabel:sit,list:M4({listBackground:o1e,listFocusBackground:s2,listFocusForeground:r2,listInactiveFocusForeground:r2,listInactiveSelectionIconForeground:u4,listInactiveFocusBackground:s2,listFocusOutline:Uo,listInactiveFocusOutline:Uo}),pickerGroup:{pickerGroupBorder:ai(DYe),pickerGroupForeground:ai(_j)}}}};hX=rAt([LS(0,qt),LS(1,ri),LS(2,Mo),LS(3,nf),LS(4,Ni),LS(5,Fx)],hX)});var Int,e8,Q0e,fX,ES,pX,Mnt=P(()=>{Lit();Xt();an();No();mo();_i();Xi();Qme();fs();Tnt();S3();er();cY();Int=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},e8=function(i,e){return function(t,n){e(t,n,i)}},Q0e=class extends hX{constructor(e,t,n,o,r,s,a){super(t,n,o,new $K(e.getContainerDomNode(),r),s,a),this.host=void 0;let l=ES.get(e);if(l){let c=l.widget;this.host={_serviceBrand:void 0,get mainContainer(){return c.getDomNode()},getContainer(){return c.getDomNode()},get containers(){return[c.getDomNode()]},get activeContainer(){return c.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return Et.map(e.onDidLayoutChange,d=>({container:c.getDomNode(),dimension:d}))},get onDidChangeActiveContainer(){return Et.None},get onDidAddContainer(){return Et.None},get whenActiveContainerStylesLoaded(){return Promise.resolve()},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};Q0e=Int([e8(1,qt),e8(2,ri),e8(3,Mo),e8(4,tn),e8(5,Ni),e8(6,Fx)],Q0e);fX=class{get activeService(){let e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){let n=t=this.instantiationService.createInstance(Q0e,e);this.mapEditorToService.set(e,t),Gu(e.onDidDispose)(()=>{n.dispose(),this.mapEditorToService.delete(e)})}return t}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t={},n=Fi.None){return this.activeService.pick(e,t,n)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};fX=Int([e8(0,qt),e8(1,tn)],fX);ES=class i{static get(e){return e.getContribution(i.ID)}constructor(e){this.editor=e,this.widget=new pX(this.editor)}dispose(){this.widget.dispose()}};ES.ID="editor.controller.quickInput";pX=class i{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return i.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}};pX.ID="editor.contrib.quickInputWidget";Ii(ES.ID,ES,4)});function sAt(i){if(!i||!Array.isArray(i))return[];let e=[],t=0;for(let n=0,o=i.length;n{let h=uAt(d.token,u.token);return h!==0?h:d.index-u.index});let t=0,n="000000",o="ffffff";for(;i.length>=1&&i[0].token==="";){let d=i.shift();d.fontStyle!==-1&&(t=d.fontStyle),d.foreground!==null&&(n=d.foreground),d.background!==null&&(o=d.background)}let r=new e4e;for(let d of e)r.getId(d);let s=r.getId(n),a=r.getId(o),l=new t4e(t,s,a),c=new i4e(l);for(let d=0,u=i.length;de?1:0}function Nnt(i){let e=[];for(let t=1,n=i.length;t{sa();J0e=class{constructor(e,t,n,o,r){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=n,this.foreground=o,this.background=r}};lAt=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/,e4e=class{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(e===null)return 0;let t=e.match(lAt);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let n=this._color2id.get(e);return n||(n=++this._lastColorId,this._color2id.set(e,n),this._id2color[n]=it.fromHex("#"+e),n)}getColorMap(){return this._id2color.slice(0)}},ON=class{static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(sAt(e),t)}static createFromParsedTokenTheme(e,t){return aAt(e,t)}constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,t){let n=this._cache.get(t);if(typeof n>"u"){let o=this._match(t),r=dAt(t);n=(o.metadata|r<<8)>>>0,this._cache.set(t,n)}return(n|e<<0)>>>0}},cAt=/\b(comment|string|regex|regexp)\b/;t4e=class i{constructor(e,t,n){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new i(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,n){e!==-1&&(this._fontStyle=e),t!==0&&(this._foreground=t),n!==0&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}},i4e=class i{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;let t=e.indexOf("."),n,o;t===-1?(n=e,o=""):(n=e.substring(0,t),o=e.substring(t+1));let r=this._children.get(n);return typeof r<"u"?r.match(o):this._mainRule}insert(e,t,n,o){if(e===""){this._mainRule.acceptOverwrite(t,n,o);return}let r=e.indexOf("."),s,a;r===-1?(s=e,a=""):(s=e.substring(0,r),a=e.substring(r+1));let l=this._children.get(s);typeof l>"u"&&(l=new i(this._mainRule.clone()),this._children.set(s,l)),l.insert(a,t,n,o)}}});var Rnt,Pnt,Ont,znt,Fnt=P(()=>{r1();pr();Rnt={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Xs]:"#FFFFFE",[lh]:"#000000",[r1e]:"#E5EBF1",[ob]:"#D3D3D3",[rb]:"#939393",[CI]:"#ADD6FF4D"}},Pnt={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Xs]:"#1E1E1E",[lh]:"#D4D4D4",[r1e]:"#3A3D41",[ob]:"#404040",[rb]:"#707070",[CI]:"#ADD6FF26"}},Ont={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Xs]:"#000000",[lh]:"#FFFFFF",[ob]:"#FFFFFF",[rb]:"#FFFFFF"}},znt={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Xs]:"#FFFFFF",[lh]:"#292929",[ob]:"#292929",[rb]:"#292929"}}});function Yo(i,e,t,n){return s7.registerIcon(i,e,t,n)}function o4e(){return s7}function fAt(){let i=cW();for(let e in i){let t="\\"+i[e].toString(16);s7.registerIcon(e,{fontCharacter:t})}}var hAt,Hnt,Bnt,n4e,s7,Wnt,Unt,Vnt,mX,eQi,tQi,iQi,nQi,m1=P(()=>{Qi();Go();or();Xt();ho();Io();Wt();_$();Ys();hAt={IconContribution:"base.contributions.icons"};(function(i){function e(t,n){let o=t.defaults;for(;ui.isThemeIcon(o);){let r=s7.getIcon(o.id);if(!r)return;o=r.defaults}return o}i.getDefinition=e})(Hnt||(Hnt={}));(function(i){function e(n){return{weight:n.weight,style:n.style,src:n.src.map(o=>({format:o.format,location:o.location.toString()}))}}i.toJSONObject=e;function t(n){let o=r=>qs(r)?r:void 0;if(n&&Array.isArray(n.src)&&n.src.every(r=>qs(r.format)&&qs(r.location)))return{weight:o(n.weight),style:o(n.style),src:n.src.map(r=>({format:r.format,location:li.parse(r.location)}))}}i.fromJSONObject=t})(Bnt||(Bnt={}));n4e=class{constructor(){this._onDidChange=new ge,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:g("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:g("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${ui.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,n,o){let r=this.iconsById[e];if(r){if(n&&!r.description){r.description=n,this.iconSchema.properties[e].markdownDescription=`${n} $(${e})`;let l=this.iconReferenceSchema.enum.indexOf(e);l!==-1&&(this.iconReferenceSchema.enumDescriptions[l]=n),this._onDidChange.fire()}return r}let s={id:e,description:n,defaults:t,deprecationMessage:o};this.iconsById[e]=s;let a={$ref:"#/definitions/icons"};return o&&(a.deprecationMessage=o),n&&(a.markdownDescription=`${n}: $(${e})`),this.iconSchema.properties[e]=a,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(n||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){let e=(r,s)=>r.id.localeCompare(s.id),t=r=>{for(;ui.isThemeIcon(r.defaults);)r=this.iconsById[r.defaults.id];return`codicon codicon-${r?r.id:""}`},n=[];n.push("| preview | identifier | default codicon ID | description"),n.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");let o=Object.keys(this.iconsById).map(r=>this.iconsById[r]);for(let r of o.filter(s=>!!s.description).sort(e))n.push(`||${r.id}|${ui.isThemeIcon(r.defaults)?r.defaults.id:r.id}|${r.description||""}|`);n.push("| preview | identifier "),n.push("| ----------- | --------------------------------- |");for(let r of o.filter(s=>!ui.isThemeIcon(s.defaults)).sort(e))n.push(`||${r.id}|`);return n.join(` -`)}},s7=new n4e;jn.add(hAt.IconContribution,s7);fAt();Wnt="vscode://schemas/icons",Unt=jn.as(T5.JSONContribution);Unt.registerSchema(Wnt,s7.getIconSchema());Vnt=new hn(()=>Unt.notifySchemaChanged(Wnt),200);s7.onDidChange(()=>{Vnt.isScheduled()||Vnt.schedule()});mX=Yo("widget-close",kt.close,g("widgetClose","Icon for the close action in widgets.")),eQi=Yo("goto-previous-location",kt.arrowUp,g("previousChangeIcon","Icon for goto previous editor location.")),tQi=Yo("goto-next-location",kt.arrowDown,g("nextChangeIcon","Icon for goto next editor location.")),iQi=ui.modify(kt.sync,"spin"),nQi=ui.modify(kt.loading,"spin")});function $nt(i){let e=new Ye,t=e.add(new ge),n=o4e();return e.add(n.onDidChange(()=>t.fire())),i&&e.add(i.onDidProductIconThemeChange(()=>t.fire())),{dispose:()=>e.dispose(),onDidChange:t.event,getCSS(){let o=i?i.getProductIconTheme():new zN,r={},s=l=>{let c=o.getIcon(l);if(!c)return;let d=c.font;return d?(r[d.id]=d.definition,`.codicon-${l.id}:before { content: '${c.fontCharacter}'; font-family: ${She(d.id)}; }`):`.codicon-${l.id}:before { content: '${c.fontCharacter}'; }`},a=[];for(let l of n.getIcons()){let c=s(l);c&&a.push(c)}for(let l in r){let c=r[l],d=c.weight?`font-weight: ${c.weight};`:"",u=c.style?`font-style: ${c.style};`:"",h=c.src.map(f=>`${rp(f.location)} format('${f.format}')`).join(", ");a.push(`@font-face { src: ${h}; font-family: ${She(l)};${d}${u} font-display: block; }`)}return a.join(` -`)}}}var zN,jnt=P(()=>{Qt();Xt();nt();or();m1();zN=class{getIcon(e){let t=o4e(),n=e.defaults;for(;ui.isThemeIcon(n);){let o=t.getIcon(n.id);if(!o)return;n=o.defaults}return n}}});function vX(i){return i===H2||i===a7||i===t8||i===i8}function r4e(i){switch(i){case H2:return Rnt;case a7:return Pnt;case t8:return Ont;case i8:return znt}}function gX(i){let e=r4e(i);return new _X(i,e)}var H2,a7,t8,i8,qnt,pAt,_X,bX,s4e=P(()=>{Qt();Xc();sa();Xt();Pr();B5();Ant();Fnt();Ys();pr();No();nt();fp();jnt();_l();H2="vs",a7="vs-dark",t8="hc-black",i8="hc-light",qnt=jn.as(n1e.ColorContribution),pAt=jn.as(N1e.ThemingContribution),_X=class{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;let n=t.base;e.length>0?(vX(e)?this.id=e:this.id=n+" "+e,this.themeName=e):(this.id=n,this.themeName=n),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){let e=new Map;for(let t in this.themeData.colors)e.set(t,it.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){let t=r4e(this.themeData.base);for(let n in t.colors)e.has(n)||e.set(n,it.fromHex(t.colors[n]))}this.colors=e}return this.colors}getColor(e,t){let n=this.getColors().get(e);if(n)return n;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=qnt.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case H2:return ch.LIGHT;case t8:return ch.HIGH_CONTRAST_DARK;case i8:return ch.HIGH_CONTRAST_LIGHT;default:return ch.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){let r=r4e(this.themeData.base);e=r.rules,r.encodedTokensColors&&(t=r.encodedTokensColors)}let n=this.themeData.colors["editor.foreground"],o=this.themeData.colors["editor.background"];if(n||o){let r={token:""};n&&(r.foreground=n),o&&(r.background=o),e.push(r)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=ON.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,n){let r=this.tokenTheme._match([e].concat(t).join(".")).metadata,s=Ls.getForeground(r),a=Ls.getFontStyle(r);return{foreground:s,italic:!!(a&1),bold:!!(a&2),underline:!!(a&4),strikethrough:!!(a&8)}}};bX=class extends ue{constructor(){super(),this._onColorThemeChange=this._register(new ge),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new ge),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new zN,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(H2,gX(H2)),this._knownThemes.set(a7,gX(a7)),this._knownThemes.set(t8,gX(t8)),this._knownThemes.set(i8,gX(i8));let e=this._register($nt(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} -${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(H2),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),jue(Hn,"(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return k5(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=ya(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),ue.None}_registerShadowDomContainer(e){let t=ya(e,n=>{n.className="monaco-colors",n.textContent=this._allCSS});return this._styleElements.push(t),{dispose:()=>{for(let n=0;n{n.base===e&&n.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(H2),this._updateActualTheme(t)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){let e=Hn.matchMedia("(forced-colors: active)").matches;if(e!==Ac(this._theme.type)){let t;a2(this._theme.type)?t=e?t8:a7:t=e?i8:H2,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){let e=[],t={},n={addRule:s=>{t[s]||(e.push(s),t[s]=!0)}};pAt.getThemingParticipants().forEach(s=>s(this._theme,n,this._environment));let o=[];for(let s of qnt.getColors()){let a=this._theme.getColor(s.id,!0);a&&o.push(`${fj(s.id)}: ${a.toString()};`)}n.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${o.join(` +`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}};vN.InstanceCount=0});var Ait=P(()=>{});var h1,mS=P(()=>{i1();or();Xt();Ait();h1=class extends Ds{constructor(e){super(),this._onChange=this._register(new ge),this.onChange=this._onChange.event,this._onKeyDown=this._register(new ge),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;let t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...ui.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,n=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),n.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,n=>{if(n.keyCode===10||n.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),n.preventDefault(),n.stopPropagation();return}this._onKeyDown.fire(n)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}});var ENt,DNt,TNt,gS,vS,_S,K2e=P(()=>{mS();Go();Wt();ENt=g("caseDescription","Match Case"),DNt=g("wordsDescription","Match Whole Word"),TNt=g("regexDescription","Use Regular Expression"),gS=class extends h1{constructor(e){super({icon:kt.caseSensitive,title:ENt+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},vS=class extends h1{constructor(e){super({icon:kt.wholeWord,title:DNt+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},_S=class extends h1{constructor(e){super({icon:kt.regex,title:TNt+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}});var SZ,Rit=P(()=>{SZ=class{constructor(e,t=0,n=e.length,o=t-1){this.items=e,this.start=t,this.end=n,this.index=o}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}});var kZ,Pit=P(()=>{Rit();kZ=class{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();let e=this._elements;this._navigator=new SZ(e,0,e.length,e.length)}_reduceToLimit(){let e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){let e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(let t of e)this._history.add(t)}get _elements(){let e=[];return this._history.forEach(t=>e.push(t)),e}}});var Oit=P(()=>{});var _N,Y2e,bS,LZ=P(()=>{Qt();vp();vge();u1();Xl();o1();i1();Xt();Pit();Gc();Oit();Wt();_N=pt,Y2e=class extends Ds{constructor(e,t,n){var o;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new ge),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new ge),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=n,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(o=this.options.tooltip)!==null&&o!==void 0?o:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=ut(e,_N(".monaco-inputbox.idle"));let r=this.options.flexibleHeight?"textarea":"input",s=ut(this.element,_N(".ibwrapper"));if(this.input=ut(s,_N(r+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=ut(s,_N("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new ex(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),ut(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(c=>this.input.scrollTop=c.scrollTop));let a=this._register(new _n(e.ownerDocument,"selectionchange")),l=Et.filter(a.event,()=>{let c=e.ownerDocument.getSelection();return c?.anchorNode===s});this._register(l(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new Bs(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:Bg(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return L5(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;let e=this.cachedContentHeight,t=this.cachedHeight,n=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:n})}showMessage(e,t){if(this.state==="open"&&Za(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));let n=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${Gf(n.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e?.type}stylesForType(e){let t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e,t=()=>e.style.width=wl(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:o=>{var r,s;if(!this.message)return null;e=ut(o,_N(".monaco-inputbox-container")),t();let a={inline:!0,className:"monaco-inputbox-message"},l=this.message.formatContent?Aet(this.message.content,a):Net(this.message.content,a);l.classList.add(this.classForType(this.message.type));let c=this.stylesForType(this.message.type);return l.style.backgroundColor=(r=c.background)!==null&&r!==void 0?r:"",l.style.color=(s=c.foreground)!==null&&s!==void 0?s:"",l.style.border=c.border?`1px solid ${c.border}`:"",ut(e,l),null},onHide:()=>{this.state="closed"},layout:t});let n;this.message.type===3?n=g("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?n=g("alertWarningMessage","Warning: {0}",this.message.content):n=g("alertInfoMessage","Info: {0}",this.message.content),Hs(n),this.state="open"}_hideMessage(){this.contextViewProvider&&(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;let e=this.value,n=e.charCodeAt(e.length-1)===10?" ":"";(e+n).replace(/\u000c/g,"")?this.mirror.textContent=e+n:this.mirror.innerText="\xA0",this.layout()}applyStyles(){var e,t,n;let o=this.options.inputBoxStyles,r=(e=o.inputBackground)!==null&&e!==void 0?e:"",s=(t=o.inputForeground)!==null&&t!==void 0?t:"",a=(n=o.inputBorder)!==null&&n!==void 0?n:"";this.element.style.backgroundColor=r,this.element.style.color=s,this.input.style.backgroundColor="inherit",this.input.style.color=s,this.element.style.border=`1px solid ${Gf(a,"transparent")}`}layout(){if(!this.mirror)return;let e=this.cachedContentHeight;this.cachedContentHeight=Bg(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){let t=this.inputElement,n=t.selectionStart,o=t.selectionEnd,r=t.value;n!==null&&o!==null&&(this.value=r.substr(0,n)+e+r.substr(o),t.setSelectionRange(n+1,n+1),this.layout())}dispose(){var e;this._hideMessage(),this.message=null,(e=this.actionbar)===null||e===void 0||e.dispose(),super.dispose()}},bS=class extends Y2e{constructor(e,t,n){let o=g({key:"history.inputbox.hint.suffix.noparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field ends in a closing parenthesis ")", for example "Filter (e.g. text, !exclude)". The character inserted into the final string is \u21C5 to represent the up and down arrow keys.']}," or {0} for history","\u21C5"),r=g({key:"history.inputbox.hint.suffix.inparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field does NOT end in a closing parenthesis (eg. "Find"). The character inserted into the final string is \u21C5 to represent the up and down arrow keys.']}," ({0} for history)","\u21C5");super(e,t,n),this._onDidFocus=this._register(new ge),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new ge),this.onDidBlur=this._onDidBlur.event,this.history=new kZ(n.history,100);let s=()=>{if(n.showHistoryHint&&n.showHistoryHint()&&!this.placeholder.endsWith(o)&&!this.placeholder.endsWith(r)&&this.history.getHistory().length){let a=this.placeholder.endsWith(")")?o:r,l=this.placeholder+a;n.showPlaceholderOnFocus&&!L5(this.input)?this.placeholder=l:this.setPlaceHolder(l)}};this.observer=new MutationObserver((a,l)=>{a.forEach(c=>{c.target.textContent||s()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>s()),this.onblur(this.input,()=>{let a=l=>{if(this.placeholder.endsWith(l)){let c=this.placeholder.slice(0,this.placeholder.length-l.length);return n.showPlaceholderOnFocus?this.placeholder=c:this.setPlaceHolder(c),!0}else return!1};a(r)||a(o)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",hu(this.value?this.value:g("clearedInput","Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,hu(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}});var Z2e=P(()=>{});var INt,Zb,EZ=P(()=>{Qt();K2e();LZ();i1();Xt();Z2e();Wt();nt();INt=g("defaultLabel","input"),Zb=class extends Ds{constructor(e,t,n){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new To),this.additionalToggles=[],this._onDidOptionChange=this._register(new ge),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new ge),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new ge),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new ge),this._onKeyUp=this._register(new ge),this._onCaseSensitiveKeyDown=this._register(new ge),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new ge),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||INt,this.showCommonFindToggles=!!n.showCommonFindToggles;let o=n.appendCaseSensitiveLabel||"",r=n.appendWholeWordsLabel||"",s=n.appendRegexLabel||"",a=n.history||[],l=!!n.flexibleHeight,c=!!n.flexibleWidth,d=n.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new bS(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:a,showHistoryHint:n.showHistoryHint,flexibleHeight:l,flexibleWidth:c,flexibleMaxHeight:d,inputBoxStyles:n.inputBoxStyles})),this.showCommonFindToggles){this.regex=this._register(new _S({appendTitle:s,isChecked:!1,...n.toggleStyles})),this._register(this.regex.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(h=>{this._onRegexKeyDown.fire(h)})),this.wholeWords=this._register(new vS({appendTitle:r,isChecked:!1,...n.toggleStyles})),this._register(this.wholeWords.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new gS({appendTitle:o,isChecked:!1,...n.toggleStyles})),this._register(this.caseSensitive.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(h=>{this._onCaseSensitiveKeyDown.fire(h)}));let u=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){let f=u.indexOf(this.domNode.ownerDocument.activeElement);if(f>=0){let p=-1;h.equals(17)?p=(f+1)%u.length:h.equals(15)&&(f===0?p=u.length-1:p=f-1),h.equals(9)?(u[f].blur(),this.inputBox.focus()):p>=0&&u[p].focus(),nn.stop(h,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(n?.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e?.appendChild(this.domNode),this._register(Xe(this.inputBox.inputElement,"compositionstart",u=>{this.imeSessionInProgress=!0})),this._register(Xe(this.inputBox.inputElement,"compositionend",u=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,u=>this._onKeyDown.fire(u)),this.onkeyup(this.inputBox.inputElement,u=>this._onKeyUp.fire(u)),this.oninput(this.inputBox.inputElement,u=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,u=>this._onMouseDown.fire(u))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){var e,t,n;this.domNode.classList.remove("disabled"),this.inputBox.enable(),(e=this.regex)===null||e===void 0||e.enable(),(t=this.wholeWords)===null||t===void 0||t.enable(),(n=this.caseSensitive)===null||n===void 0||n.enable();for(let o of this.additionalToggles)o.enable()}disable(){var e,t,n;this.domNode.classList.add("disabled"),this.inputBox.disable(),(e=this.regex)===null||e===void 0||e.disable(),(t=this.wholeWords)===null||t===void 0||t.disable(),(n=this.caseSensitive)===null||n===void 0||n.disable();for(let o of this.additionalToggles)o.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(let t of this.additionalToggles)t.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new Ye;for(let t of e??[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange(n=>{this._onDidOptionChange.fire(n),!n&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){var t,n,o,r,s,a;e?this.inputBox.paddingRight=0:this.inputBox.paddingRight=((n=(t=this.caseSensitive)===null||t===void 0?void 0:t.width())!==null&&n!==void 0?n:0)+((r=(o=this.wholeWords)===null||o===void 0?void 0:o.width())!==null&&r!==void 0?r:0)+((a=(s=this.regex)===null||s===void 0?void 0:s.width())!==null&&a!==void 0?a:0)+this.additionalToggles.reduce((l,c)=>l+c.width(),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var e,t;return(t=(e=this.caseSensitive)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){var e,t;return(t=(e=this.wholeWords)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){var e,t;return(t=(e=this.regex)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){var e;(e=this.caseSensitive)===null||e===void 0||e.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}});var wu,Xv,rc,Xb,yS=P(()=>{(function(i){i[i.Expanded=0]="Expanded",i[i.Collapsed=1]="Collapsed",i[i.PreserveOrExpanded=2]="PreserveOrExpanded",i[i.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(wu||(wu={}));(function(i){i[i.Unknown=0]="Unknown",i[i.Twistie=1]="Twistie",i[i.Element=2]="Element",i[i.Filter=3]="Filter"})(Xv||(Xv={}));rc=class extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}},Xb=class{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}});function bN(i){return typeof i=="object"&&"visibility"in i&&"data"in i}function Qb(i){switch(i){case!0:return 1;case!1:return 0;default:return i}}function X2e(i){return typeof i.collapsible=="boolean"}var DZ,TZ=P(()=>{yS();Vi();Qi();nhe();ZT();Xt();Yc();DZ=class{constructor(e,t,n,o={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new E3,this._onDidChangeCollapseState=new ge,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new ge,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new ge,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new ba(BU),this.collapseByDefault=typeof o.collapseByDefault>"u"?!1:o.collapseByDefault,this.filter=o.filter,this.autoExpandSingleChildren=typeof o.autoExpandSingleChildren>"u"?!1:o.autoExpandSingleChildren,this.root={parent:void 0,element:n,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,n=un.empty(),o={}){if(e.length===0)throw new rc(this.user,"Invalid tree location");o.diffIdentityProvider?this.spliceSmart(o.diffIdentityProvider,e,t,n,o):this.spliceSimple(e,t,n,o)}spliceSmart(e,t,n,o,r,s){var a;o===void 0&&(o=un.empty()),s===void 0&&(s=(a=r.diffDepth)!==null&&a!==void 0?a:0);let{parentNode:l}=this.getParentNodeWithListIndex(t);if(!l.lastDiffIds)return this.spliceSimple(t,n,o,r);let c=[...o],d=t[t.length-1],u=new t4({getElements:()=>l.lastDiffIds},{getElements:()=>[...l.children.slice(0,d),...c,...l.children.slice(d+n)].map(y=>e.getId(y.element).toString())}).ComputeDiff(!1);if(u.quitEarly)return l.lastDiffIds=void 0,this.spliceSimple(t,n,c,r);let h=t.slice(0,-1),f=(y,_,v)=>{if(s>0)for(let b=0;bv.originalStart-_.originalStart))f(p,m,p-(y.originalStart+y.originalLength)),p=y.originalStart,m=y.modifiedStart-d,this.spliceSimple([...h,p],y.originalLength,un.slice(c,m,m+y.modifiedLength),r);f(p,m,p)}spliceSimple(e,t,n=un.empty(),{onDidCreateNode:o,onDidDeleteNode:r,diffIdentityProvider:s}){let{parentNode:a,listIndex:l,revealed:c,visible:d}=this.getParentNodeWithListIndex(e),u=[],h=un.map(n,w=>this.createTreeNode(w,a,a.visible?1:0,c,u,o)),f=e[e.length-1],p=0;for(let w=f;w>=0&&ws.getId(w.element).toString())):a.lastDiffIds=a.children.map(w=>s.getId(w.element).toString()):a.lastDiffIds=void 0;let b=0;for(let w of v)w.visible&&b++;if(b!==0)for(let w=f+m.length;wS+(x.visible?x.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(a,_-w),this.list.splice(l,w,u)}if(v.length>0&&r){let w=S=>{r(S),S.children.forEach(w)};v.forEach(w)}this._onDidSplice.fire({insertedNodes:m,deletedNodes:v});let C=a;for(;C;){if(C.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}C=C.parent}}rerender(e){if(e.length===0)throw new rc(this.user,"Invalid tree location");let{node:t,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e);t.visible&&o&&this.list.splice(n,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){let{listIndex:t,visible:n,revealed:o}=this.getTreeNodeWithListIndex(e);return n&&o?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){let n=this.getTreeNode(e);typeof t>"u"&&(t=!n.collapsible);let o={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,o))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,n){let o=this.getTreeNode(e);typeof t>"u"&&(t=!o.collapsed);let r={collapsed:t,recursive:n||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,r))}_setCollapseState(e,t){let{node:n,listIndex:o,revealed:r}=this.getTreeNodeWithListIndex(e),s=this._setListNodeCollapseState(n,o,r,t);if(n!==this.root&&this.autoExpandSingleChildren&&s&&!X2e(t)&&n.collapsible&&!n.collapsed&&!t.recursive){let a=-1;for(let l=0;l-1){a=-1;break}else a=l;a>-1&&this._setCollapseState([...e,a],t)}return s}_setListNodeCollapseState(e,t,n,o){let r=this._setNodeCollapseState(e,o,!1);if(!n||!e.visible||!r)return r;let s=e.renderNodeCount,a=this.updateNodeAfterCollapseChange(e),l=s-(t===-1?0:1);return this.list.splice(t+1,l,a.slice(1)),r}_setNodeCollapseState(e,t,n){let o;if(e===this.root?o=!1:(X2e(t)?(o=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(o=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):o=!1,o&&this._onDidChangeCollapseState.fire({node:e,deep:n})),!X2e(t)&&t.recursive)for(let r of e.children)o=this._setNodeCollapseState(r,t,!0)||o;return o}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){let e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,n,o,r,s){let a={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed<"u",collapsed:typeof e.collapsed>"u"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},l=this._filterNode(a,n);a.visibility=l,o&&r.push(a);let c=e.children||un.empty(),d=o&&l!==0&&!a.collapsed,u=0,h=1;for(let f of c){let p=this.createTreeNode(f,a,l,d,r,s);a.children.push(p),h+=p.renderNodeCount,p.visible&&(p.visibleChildIndex=u++)}return a.collapsible=a.collapsible||a.children.length>0,a.visibleChildrenCount=u,a.visible=l===2?u>0:l===1,a.visible?a.collapsed||(a.renderNodeCount=h):(a.renderNodeCount=0,o&&r.pop()),s?.(a),a}updateNodeAfterCollapseChange(e){let t=e.renderNodeCount,n=[];return this._updateNodeAfterCollapseChange(e,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterCollapseChange(e,t){if(e.visible===!1)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(let n of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(n,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){let t=e.renderNodeCount,n=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterFilterChange(e,t,n,o=!0){let r;if(e!==this.root){if(r=this._filterNode(e,t),r===0)return e.visible=!1,e.renderNodeCount=0,!1;o&&n.push(e)}let s=n.length;e.renderNodeCount=e===this.root?0:1;let a=!1;if(!e.collapsed||r!==0){let l=0;for(let c of e.children)a=this._updateNodeAfterFilterChange(c,r,n,o&&!e.collapsed)||a,c.visible&&(c.visibleChildIndex=l++);e.visibleChildrenCount=l}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=r===2?a:r===1,e.visibility=r),e.visible?e.collapsed||(e.renderNodeCount+=n.length-s):(e.renderNodeCount=0,o&&n.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(t!==0)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){let n=this.filter?this.filter.filter(e.element,t):1;return typeof n=="boolean"?(e.filterData=void 0,n?1:0):bN(n)?(e.filterData=n.data,Qb(n.visibility)):(e.filterData=void 0,Qb(n))}hasTreeNode(e,t=this.root){if(!e||e.length===0)return!0;let[n,...o]=e;return n<0||n>t.children.length?!1:this.hasTreeNode(o,t.children[n])}getTreeNode(e,t=this.root){if(!e||e.length===0)return t;let[n,...o]=e;if(n<0||n>t.children.length)throw new rc(this.user,"Invalid tree location");return this.getTreeNode(o,t.children[n])}getTreeNodeWithListIndex(e){if(e.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};let{parentNode:t,listIndex:n,revealed:o,visible:r}=this.getParentNodeWithListIndex(e),s=e[e.length-1];if(s<0||s>t.children.length)throw new rc(this.user,"Invalid tree location");let a=t.children[s];return{node:a,listIndex:n,revealed:o,visible:r&&a.visible}}getParentNodeWithListIndex(e,t=this.root,n=0,o=!0,r=!0){let[s,...a]=e;if(s<0||s>t.children.length)throw new rc(this.user,"Invalid tree location");for(let l=0;l{});function Q2e(i){return i instanceof E4?new J2e(i):i}function MNt(i,e){return e&&{...e,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new e0e(i,e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent({...t,element:t.element})},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent({...t,element:t.element})}},accessibilityProvider:e.accessibilityProvider&&{...e.accessibilityProvider,getSetSize(t){let n=i(),o=n.getNodeLocation(t),r=n.getParentNodeLocation(o);return n.getNode(r).visibleChildrenCount},getPosInSet(t){return t.visibleChildIndex+1},isChecked:e.accessibilityProvider&&e.accessibilityProvider.isChecked?t=>e.accessibilityProvider.isChecked(t.element):void 0,getRole:e.accessibilityProvider&&e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider&&e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider&&e.accessibilityProvider.getAriaLevel?t=>e.accessibilityProvider.getAriaLevel(t.element):t=>t.depth,getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}}}}function NNt(i,e){return i.position===e.position&&Hit(i,e)}function Hit(i,e){return i.node.element===e.node.element&&i.startIndex===e.startIndex&&i.height===e.height&&i.endIndex===e.endIndex}function Fit(i){let e=Xv.Unknown;return n$(i.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=Xv.Twistie:n$(i.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?e=Xv.Element:n$(i.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(e=Xv.Filter),{browserEvent:i.browserEvent,element:i.element?i.element.element:null,target:e}}function IZ(i,e){e(i),i.children.forEach(t=>IZ(t,e))}var J2e,e0e,CS,CN,t0e,MZ,i0e,R2,Qv,n0e,o0e,r0e,NZ,s0e,a0e,yN,l0e,c0e,wS,wN=P(()=>{Qt();vp();Gl();u1();EZ();LZ();tZ();Gv();mS();TZ();yS();Ra();Vi();Qi();Go();or();od();Xt();l1();nt();Ox();ho();zit();Wt();J2e=class extends E4{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}};e0e=class{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=ue.None,this.disposables=new Ye}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),t)}onDragStart(e,t){var n,o;(o=(n=this.dnd).onDragStart)===null||o===void 0||o.call(n,Q2e(e),t)}onDragOver(e,t,n,o,r,s=!0){let a=this.dnd.onDragOver(Q2e(e),t&&t.element,n,o,r),l=this.autoExpandNode!==t;if(l&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),typeof t>"u")return a;if(l&&typeof a!="boolean"&&a.autoExpand&&(this.autoExpandDisposable=$h(()=>{let f=this.modelProvider(),p=f.getNodeLocation(t);f.isCollapsed(p)&&f.setCollapsed(p,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof a=="boolean"||!a.accept||typeof a.bubble>"u"||a.feedback){if(!s){let f=typeof a=="boolean"?a:a.accept,p=typeof a=="boolean"?void 0:a.effect;return{accept:f,effect:p,feedback:[n]}}return a}if(a.bubble===1){let f=this.modelProvider(),p=f.getNodeLocation(t),m=f.getParentNodeLocation(p),y=f.getNode(m),_=m&&f.getListIndex(m);return this.onDragOver(e,y,_,o,r,!1)}let c=this.modelProvider(),d=c.getNodeLocation(t),u=c.getListIndex(d),h=c.getListRenderCount(d);return{...a,feedback:Ya(u,u+h)}}drop(e,t,n,o,r){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(Q2e(e),t&&t.element,n,o,r)}onDragEnd(e){var t,n;(n=(t=this.dnd).onDragEnd)===null||n===void 0||n.call(t,e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}};CS=class{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){var n,o;(o=(n=this.delegate).setDynamicHeight)===null||o===void 0||o.call(n,e.element,t)}};(function(i){i.None="none",i.OnHover="onHover",i.Always="always"})(CN||(CN={}));t0e=class{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new Ye,this.onDidChange=Et.forEach(e,n=>this._elements=n,this.disposables)}dispose(){this.disposables.dispose()}},MZ=class i{constructor(e,t,n,o,r,s={}){var a;this.renderer=e,this.modelProvider=t,this.activeNodes=o,this.renderedIndentGuides=r,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=i.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=ue.None,this.disposables=new Ye,this.templateId=e.templateId,this.updateOptions(s),Et.map(n,l=>l.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(a=e.onDidChangeTwistieState)===null||a===void 0||a.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent<"u"){let t=Ml(e.indent,0,40);if(t!==this.indent){this.indent=t;for(let[n,o]of this.renderedNodes)this.renderTreeElement(n,o)}}if(typeof e.renderIndentGuides<"u"){let t=e.renderIndentGuides!==CN.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(let[n,o]of this.renderedNodes)this._renderIndentGuides(n,o);if(this.indentGuidesDisposable.dispose(),t){let n=new Ye;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,n),this.indentGuidesDisposable=n,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof e.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){let t=ut(e,pt(".monaco-tl-row")),n=ut(t,pt(".monaco-tl-indent")),o=ut(t,pt(".monaco-tl-twistie")),r=ut(t,pt(".monaco-tl-contents")),s=this.renderer.renderTemplate(r);return{container:e,indent:n,twistie:o,indentGuidesDisposable:ue.None,templateData:s}}renderElement(e,t,n,o){this.renderedNodes.set(e,n),this.renderedElements.set(e.element,e),this.renderTreeElement(e,n),this.renderer.renderElement(e,t,n.templateData,o)}disposeElement(e,t,n,o){var r,s;n.indentGuidesDisposable.dispose(),(s=(r=this.renderer).disposeElement)===null||s===void 0||s.call(r,e,t,n.templateData,o),typeof o=="number"&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){let t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){let t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){let n=i.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${n}px`,t.indent.style.width=`${n+this.indent-16}px`,e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...ui.asClassNameArray(kt.treeItemExpanded));let o=!1;this.renderer.renderTwistie&&(o=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(o||t.twistie.classList.add(...ui.asClassNameArray(kt.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if(is(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;let n=new Ye,o=this.modelProvider();for(;;){let r=o.getNodeLocation(e),s=o.getParentNodeLocation(r);if(!s)break;let a=o.getNode(s),l=pt(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(a)&&l.classList.add("active"),t.indent.childElementCount===0?t.indent.appendChild(l):t.indent.insertBefore(l,t.indent.firstElementChild),this.renderedIndentGuides.add(a,l),n.add(Yt(()=>this.renderedIndentGuides.delete(a,l))),e=a}t.indentGuidesDisposable=n}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;let t=new Set,n=this.modelProvider();e.forEach(o=>{let r=n.getNodeLocation(o);try{let s=n.getParentNodeLocation(r);o.collapsible&&o.children.length>0&&!o.collapsed?t.add(o):s&&t.add(n.getNode(s))}catch{}}),this.activeIndentNodes.forEach(o=>{t.has(o)||this.renderedIndentGuides.forEach(o,r=>r.classList.remove("active"))}),t.forEach(o=>{this.activeIndentNodes.has(o)||this.renderedIndentGuides.forEach(o,r=>r.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),Nn(this.disposables)}};MZ.DefaultIndent=8;i0e=class{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,n){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=n,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new Ye,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let n=1;if(this._filter){let s=this._filter.filter(e,t);if(typeof s=="boolean"?n=s?1:0:bN(s)?n=Qb(s.visibility):n=s,n===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:_u.Default,visibility:n};let o=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),r=Array.isArray(o)?o:[o];for(let s of r){let a=s&&s.toString();if(typeof a>"u")return{data:_u.Default,visibility:n};let l;if(this.tree.findMatchType===Qv.Contiguous){let c=a.toLowerCase().indexOf(this._lowercasePattern);if(c>-1){l=[Number.MAX_SAFE_INTEGER,0];for(let d=this._lowercasePattern.length;d>0;d--)l.push(c+d-1)}}else l=E2(this._pattern,this._lowercasePattern,0,a,a.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(l)return this._matchCount++,r.length===1?{data:l,visibility:n}:{data:{label:a,score:l},visibility:n}}return this.tree.findMode===R2.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:_u.Default,visibility:n}}reset(){this._totalCount=0,this._matchCount=0}dispose(){Nn(this.disposables)}};(function(i){i[i.Highlight=0]="Highlight",i[i.Filter=1]="Filter"})(R2||(R2={}));(function(i){i[i.Fuzzy=0]="Fuzzy",i[i.Contiguous=1]="Contiguous"})(Qv||(Qv={}));n0e=class{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,n,o,r,s={}){var a,l;this.tree=e,this.view=n,this.filter=o,this.contextViewProvider=r,this.options=s,this._pattern="",this.width=0,this._onDidChangeMode=new ge,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new ge,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new ge,this._onDidChangeOpenState=new ge,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new Ye,this.disposables=new Ye,this._mode=(a=e.options.defaultFindMode)!==null&&a!==void 0?a:R2.Highlight,this._matchType=(l=e.options.defaultFindMatchType)!==null&&l!==void 0?l:Qv.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){e.defaultFindMode!==void 0&&(this.mode=e.defaultFindMode),e.defaultFindMatchType!==void 0&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){var e,t,n,o;let r=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&r?!((e=this.tree.options.showNotFoundMessage)!==null&&e!==void 0)||e?(t=this.widget)===null||t===void 0||t.showMessage({type:2,content:g("not found","No elements found.")}):(n=this.widget)===null||n===void 0||n.showMessage({type:2}):(o=this.widget)===null||o===void 0||o.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!_u.isDefault(e.filterData)}layout(e){var t;this.width=e,(t=this.widget)===null||t===void 0||t.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}};o0e=class{constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return uo(this.stickyNodes,e.stickyNodes,NNt)}lastNodePartiallyVisible(){if(this.count===0)return!1;let e=this.stickyNodes[this.count-1];if(this.count===1)return e.position!==0;let t=this.stickyNodes[this.count-2];return t.position+t.height!==e.position}animationStateChanged(e){if(!uo(this.stickyNodes,e.stickyNodes,Hit)||this.count===0)return!1;let t=this.stickyNodes[this.count-1],n=e.stickyNodes[e.count-1];return t.position!==n.position}},r0e=class{constrainStickyScrollNodes(e,t,n){for(let o=0;on||o>=t)return e.slice(0,o)}return e}},NZ=class extends ue{constructor(e,t,n,o,r,s={}){var a;super(),this.tree=e,this.model=t,this.view=n,this.treeDelegate=r,this.maxWidgetViewRatio=.4;let l=this.validateStickySettings(s);this.stickyScrollMaxItemCount=l.stickyScrollMaxItemCount,this.stickyScrollDelegate=(a=s.stickyScrollDelegate)!==null&&a!==void 0?a:new r0e,this._widget=this._register(new s0e(n.getScrollableElement(),n,e,o,r,s.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(n.onDidScroll(()=>this.update())),this._register(n.onDidChangeContentHeight(()=>this.update())),this._register(e.onDidChangeCollapseState(()=>this.update())),this.update()}getNodeAtHeight(e){let t;if(e===0?t=this.view.firstVisibleIndex:t=this.view.indexAt(e+this.view.scrollTop),!(t<0||t>=this.view.length))return this.view.element(t)}update(){let e=this.getNodeAtHeight(0);if(!e||this.tree.scrollTop===0){this._widget.setState(void 0);return}let t=this.findStickyState(e);this._widget.setState(t)}findStickyState(e){let t=[],n=e,o=0,r=this.getNextStickyNode(n,void 0,o);for(;r&&(t.push(r),o+=r.height,!(t.length<=this.stickyScrollMaxItemCount&&(n=this.getNextVisibleNode(r),!n)));)r=this.getNextStickyNode(n,r.node,o);let s=this.constrainStickyNodes(t);return s.length?new o0e(s):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,t,n){let o=this.getAncestorUnderPrevious(e,t);if(o&&!(o===e&&(!this.nodeIsUncollapsedParent(e)||this.nodeTopAlignsWithStickyNodesBottom(e,n))))return this.createStickyScrollNode(o,n)}nodeTopAlignsWithStickyNodesBottom(e,t){let n=this.getNodeIndex(e),o=this.view.getElementTop(n),r=t;return this.view.scrollTop===o-r}createStickyScrollNode(e,t){let n=this.treeDelegate.getHeight(e),{startIndex:o,endIndex:r}=this.getNodeRange(e),s=this.calculateStickyNodePosition(r,t,n);return{node:e,position:s,height:n,startIndex:o,endIndex:r}}getAncestorUnderPrevious(e,t=void 0){let n=e,o=this.getParentNode(n);for(;o;){if(o===t)return n;n=o,o=this.getParentNode(n)}if(t===void 0)return n}calculateStickyNodePosition(e,t,n){let o=this.view.getRelativeTop(e);if(o===null&&this.view.firstVisibleIndex===e&&e+1l&&t<=l?l-n:t}constrainStickyNodes(e){if(e.length===0)return[];let t=this.view.renderHeight*this.maxWidgetViewRatio,n=e[e.length-1];if(e.length<=this.stickyScrollMaxItemCount&&n.position+n.height<=t)return e;let o=this.stickyScrollDelegate.constrainStickyScrollNodes(e,this.stickyScrollMaxItemCount,t);if(!o.length)return[];let r=o[o.length-1];if(o.length>this.stickyScrollMaxItemCount||r.position+r.height>t)throw new Error("stickyScrollDelegate violates constraints");return o}getParentNode(e){let t=this.model.getNodeLocation(e),n=this.model.getParentNodeLocation(t);return n?this.model.getNode(n):void 0}nodeIsUncollapsedParent(e){let t=this.model.getNodeLocation(e);return this.model.getListRenderCount(t)>1}getNodeIndex(e){let t=this.model.getNodeLocation(e);return this.model.getListIndex(t)}getNodeRange(e){let t=this.model.getNodeLocation(e),n=this.model.getListIndex(t);if(n<0)throw new Error("Node not found in tree");let o=this.model.getListRenderCount(t),r=n+o-1;return{startIndex:n,endIndex:r}}nodePositionTopBelowWidget(e){let t=[],n=this.getParentNode(e);for(;n;)t.push(n),n=this.getParentNode(n);let o=0;for(let r=0;r0,n=!!e&&e.count>0;if(!t&&!n||t&&n&&this._previousState.equal(e))return;if(t!==n&&this.setVisible(n),!n){this._previousState=void 0,this._previousElements=[],this._previousStateDisposables.clear();return}let o=e.stickyNodes[e.count-1];if(this._previousState&&e.animationStateChanged(this._previousState))this._previousElements[this._previousState.count-1].style.top=`${o.position}px`;else{this._previousStateDisposables.clear();let r=Array(e.count);for(let s=e.count-1;s>=0;s--){let a=e.stickyNodes[s],{element:l,disposable:c}=this.createElement(a,s,e.count);r[s]=l,this._rootDomNode.appendChild(l),this._previousStateDisposables.add(c)}this.stickyScrollFocus.updateElements(r,e),this._previousElements=r}this._previousState=e,this._rootDomNode.style.height=`${o.position+o.height}px`}createElement(e,t,n){let o=e.startIndex,r=document.createElement("div");r.style.top=`${e.position}px`,r.style.height=`${e.height}px`,r.style.lineHeight=`${e.height}px`,r.classList.add("monaco-tree-sticky-row"),r.classList.add("monaco-list-row"),r.setAttribute("data-index",`${o}`),r.setAttribute("data-parity",o%2===0?"even":"odd"),r.setAttribute("id",this.view.getElementID(o)),this.setAccessibilityAttributes(r,e.node.element,t,n);let s=this.treeDelegate.getTemplateId(e.node),a=this.treeRenderers.find(u=>u.templateId===s);if(!a)throw new Error(`No renderer found for template id ${s}`);let l=e.node;l===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(l=new Proxy(e.node,{}));let c=a.renderTemplate(r);a.renderElement(l,e.startIndex,c,e.height);let d=Yt(()=>{a.disposeElement(l,e.startIndex,c,e.height),a.disposeTemplate(c),r.remove()});return{element:r,disposable:d}}setAccessibilityAttributes(e,t,n,o){var r;if(!this.accessibilityProvider)return;this.accessibilityProvider.getSetSize&&e.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(t,n,o))),this.accessibilityProvider.getPosInSet&&e.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(t,n))),this.accessibilityProvider.getRole&&e.setAttribute("role",(r=this.accessibilityProvider.getRole(t))!==null&&r!==void 0?r:"treeitem");let s=this.accessibilityProvider.getAriaLabel(t);s&&e.setAttribute("aria-label",s);let a=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(t);typeof a=="number"&&e.setAttribute("aria-level",`${a}`),e.setAttribute("aria-selected",String(!1))}setVisible(e){this._rootDomNode.classList.toggle("empty",!e),e||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}},a0e=class extends ue{get domHasFocus(){return this._domHasFocus}set domHasFocus(e){e!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(e),this._domHasFocus=e)}constructor(e,t){super(),this.container=e,this.view=t,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=new ge,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new ge,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this.container.addEventListener("focus",()=>this.onFocus()),this.container.addEventListener("blur",()=>this.onBlur()),this._register(this.view.onDidFocus(()=>this.toggleStickyScrollFocused(!1))),this._register(this.view.onKeyDown(n=>this.onKeyDown(n))),this._register(this.view.onMouseDown(n=>this.onMouseDown(n))),this._register(this.view.onContextMenu(n=>this.handleContextMenu(n)))}handleContextMenu(e){let t=e.browserEvent.target;if(!sN(t)&&!nS(t)){this.focusedLast()&&this.view.domFocus();return}if(!YC(e.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");let s=this.state.stickyNodes.findIndex(a=>{var l;return a.node.element===((l=e.element)===null||l===void 0?void 0:l.element)});if(s===-1)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");this.container.focus(),this.setFocus(s);return}if(!this.state||this.focusedIndex<0)throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget");let o=this.state.stickyNodes[this.focusedIndex].node.element,r=this.elements[this.focusedIndex];this._onContextMenu.fire({element:o,anchor:r,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state){if(e.key==="ArrowUp")this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if(e.key==="ArrowDown"||e.key==="ArrowRight"){if(this.focusedIndex>=this.state.count-1){let t=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([t]),this.scrollNodeUnderWidget(t,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}}onMouseDown(e){let t=e.browserEvent.target;!sN(t)&&!nS(t)||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,t){if(t&&t.count===0)throw new Error("Sticky scroll state must be undefined when there are no sticky nodes");if(t&&t.count!==e.length)throw new Error("Sticky scroll focus received illigel state");let n=this.focusedIndex;if(this.removeFocus(),this.elements=e,this.state=t,t){let o=Ml(n,0,t.count-1);this.setFocus(o)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=t?0:-1}setFocusedElement(e){let t=this.state;if(!t)throw new Error("Cannot set focus when state is undefined");if(this.setFocus(e),!(e1?t.stickyNodes[t.count-2]:void 0,r=this.view.getElementTop(e),s=o?o.position+o.height+n.height:n.height;this.view.scrollTop=r-s}domFocus(){if(!this.state)throw new Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return this.state?this.view.getHTMLElement().classList.contains("sticky-scroll-focused"):!1}removeFocus(){this.focusedIndex!==-1&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(e){if(0>e)throw new Error("addFocus() can not remove focus");if(!this.state&&e>=0)throw new Error("Cannot set focus index when state is undefined");if(this.state&&e>=this.state.count)throw new Error("Cannot set focus index to an index that does not exist");let t=this.focusedIndex;t>=0&&this.toggleElementFocus(this.elements[t],!1),e>=0&&this.toggleElementFocus(this.elements[e],!0),this.focusedIndex=e}toggleElementFocus(e,t){e.classList.toggle("focused",t)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||this.elements.length===0)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.focusedIndex===-1&&this.setFocus(0)}onBlur(){this.domHasFocus=!1}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}};yN=class{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new ge,this.onDidChange=this._onDidChange.event}set(e,t){!t?.__forceEvent&&uo(this.nodes,e)||this._set(e,!1,t)}_set(e,t,n){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){let o=this;this._onDidChange.fire({get elements(){return o.get()},browserEvent:n})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){let l=this.createNodeSet(),c=d=>l.delete(d);t.forEach(d=>IZ(d,c)),this.set([...l.values()]);return}let n=new Set,o=l=>n.add(this.identityProvider.getId(l.element).toString());t.forEach(l=>IZ(l,o));let r=new Map,s=l=>r.set(this.identityProvider.getId(l.element).toString(),l);e.forEach(l=>IZ(l,s));let a=[];for(let l of this.nodes){let c=this.identityProvider.getId(l.element).toString();if(!n.has(c))a.push(l);else{let u=r.get(c);u&&u.visible&&a.push(u)}}if(this.nodes.length>0&&a.length===0){let l=this.getFirstViewElementWithTrait();l&&a.push(l)}this._set(a,!0)}createNodeSet(){let e=new Set;for(let t of this.nodes)e.add(t);return e}},l0e=class extends nN{constructor(e,t,n){super(e),this.tree=t,this.stickyScrollProvider=n}onViewPointer(e){if(C2e(e.browserEvent.target)||T4(e.browserEvent.target)||eS(e.browserEvent.target)||e.browserEvent.isHandledByList)return;let t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);let n=e.browserEvent.target,o=n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,r=nS(e.browserEvent.target),s=!1;if(r?s=!0:typeof this.tree.expandOnlyOnTwistieClick=="function"?s=this.tree.expandOnlyOnTwistieClick(t.element):s=!!this.tree.expandOnlyOnTwistieClick,r)this.handleStickyScrollMouseEvent(e,t);else{if(s&&!o&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e)}if(t.collapsible&&(!r||o)){let a=this.tree.getNodeLocation(t),l=e.browserEvent.altKey;if(this.tree.setFocus([a]),this.tree.toggleCollapsed(a,l),s&&o){e.browserEvent.isHandledByList=!0;return}}r||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,t){if(qtt(e.browserEvent.target)||Gtt(e.browserEvent.target))return;let n=this.stickyScrollProvider();if(!n)throw new Error("Sticky scroll controller not found");let o=this.list.indexOf(t),r=this.list.getElementTop(o),s=n.nodePositionTopBelowWidget(t);this.tree.scrollTop=r-s,this.list.domFocus(),this.list.setFocus([o]),this.list.setSelection([o])}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||e.browserEvent.isHandledByList||super.onDoubleClick(e)}onMouseDown(e){let t=e.browserEvent.target;if(!sN(t)&&!nS(t)){super.onMouseDown(e);return}}onContextMenu(e){let t=e.browserEvent.target;if(!sN(t)&&!nS(t)){super.onContextMenu(e);return}}},c0e=class extends Nl{constructor(e,t,n,o,r,s,a,l){super(e,t,n,o,l),this.focusTrait=r,this.selectionTrait=s,this.anchorTrait=a}createMouseController(e){return new l0e(this,e.tree,e.stickyScrollProvider)}splice(e,t,n=[]){if(super.splice(e,t,n),n.length===0)return;let o=[],r=[],s;n.forEach((a,l)=>{this.focusTrait.has(a)&&o.push(e+l),this.selectionTrait.has(a)&&r.push(e+l),this.anchorTrait.has(a)&&(s=e+l)}),o.length>0&&super.setFocus(Oh([...super.getFocus(),...o])),r.length>0&&super.setSelection(Oh([...super.getSelection(),...r])),typeof s=="number"&&super.setAnchor(s)}setFocus(e,t,n=!1){super.setFocus(e,t),n||this.focusTrait.set(e.map(o=>this.element(o)),t)}setSelection(e,t,n=!1){super.setSelection(e,t),n||this.selectionTrait.set(e.map(o=>this.element(o)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(typeof e>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}},wS=class{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return Et.filter(Et.map(this.view.onMouseDblClick,Fit),e=>e.target!==Xv.Filter)}get onPointer(){return Et.map(this.view.onPointer,Fit)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return Et.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e,t;return(t=(e=this.findController)===null||e===void 0?void 0:e.mode)!==null&&t!==void 0?t:R2.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){var e,t;return(t=(e=this.findController)===null||e===void 0?void 0:e.matchType)!==null&&t!==void 0?t:Qv.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,n,o,r={}){var s;this._user=e,this._options=r,this.eventBufferer=new E3,this.onDidChangeFindOpenState=Et.None,this.onDidChangeStickyScrollFocused=Et.None,this.disposables=new Ye,this._onWillRefilter=new ge,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new ge,this.treeDelegate=new CS(n);let a=new lT,l=new lT,c=this.disposables.add(new t0e(l.event)),d=new ov;this.renderers=o.map(m=>new MZ(m,()=>this.model,a.event,c,d,r));for(let m of this.renderers)this.disposables.add(m);let u;r.keyboardNavigationLabelProvider&&(u=new i0e(this,r.keyboardNavigationLabelProvider,r.filter),r={...r,filter:u},this.disposables.add(u)),this.focus=new yN(()=>this.view.getFocusedElements()[0],r.identityProvider),this.selection=new yN(()=>this.view.getSelectedElements()[0],r.identityProvider),this.anchor=new yN(()=>this.view.getAnchorElement(),r.identityProvider),this.view=new c0e(e,t,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...MNt(()=>this.model,r),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(e,this.view,r),a.input=this.model.onDidChangeCollapseState;let h=Et.forEach(this.model.onDidSplice,m=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(m),this.selection.onDidModelSplice(m)})},this.disposables);h(()=>null,null,this.disposables);let f=this.disposables.add(new ge),p=this.disposables.add(new ba(0));if(this.disposables.add(Et.any(h,this.focus.onDidChange,this.selection.onDidChange)(()=>{p.trigger(()=>{let m=new Set;for(let y of this.focus.getNodes())m.add(y);for(let y of this.selection.getNodes())m.add(y);f.fire([...m.values()])})})),l.input=f.event,r.keyboardSupport!==!1){let m=Et.chain(this.view.onKeyDown,y=>y.filter(_=>!T4(_.target)).map(_=>new qn(_)));Et.chain(m,y=>y.filter(_=>_.keyCode===15))(this.onLeftArrow,this,this.disposables),Et.chain(m,y=>y.filter(_=>_.keyCode===17))(this.onRightArrow,this,this.disposables),Et.chain(m,y=>y.filter(_=>_.keyCode===10))(this.onSpace,this,this.disposables)}if((!((s=r.findWidgetEnabled)!==null&&s!==void 0)||s)&&r.keyboardNavigationLabelProvider&&r.contextViewProvider){let m=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new n0e(this,this.model,this.view,u,r.contextViewProvider,m),this.focusNavigationFilter=y=>this.findController.shouldAllowFocus(y),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=Et.None,this.onDidChangeFindMatchType=Et.None;r.enableStickyScroll&&(this.stickyScrollController=new NZ(this,this.model,this.view,this.renderers,this.treeDelegate,r),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=ya(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===CN.Always)}updateOptions(e={}){var t;this._options={...this._options,...e};for(let n of this.renderers)n.updateOptions(e);this.view.updateOptions(this._options),(t=this.findController)===null||t===void 0||t.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===CN.Always)}get options(){return this._options}updateStickyScroll(e){var t;!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new NZ(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=Et.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),(t=this.stickyScrollController)===null||t===void 0||t.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}domFocus(){var e;!((e=this.stickyScrollController)===null||e===void 0)&&e.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}layout(e,t){var n;this.view.layout(e,t),zh(t)&&((n=this.findController)===null||n===void 0||n.layout(t))}style(e){var t;let n=`.${this.view.domId}`,o=[];e.treeIndentGuidesStroke&&(o.push(`.monaco-list${n}:hover .monaco-tl-indent > .indent-guide, .monaco-list${n}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),o.push(`.monaco-list${n} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),e.listBackground&&(o.push(`.monaco-list${n} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${e.listBackground}; }`),o.push(`.monaco-list${n} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${e.listBackground}; }`)),e.listFocusForeground&&(o.push(`.monaco-list${n}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),o.push(`.monaco-list${n}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));let r=Gf(e.listFocusAndSelectionOutline,Gf(e.listSelectionOutline,(t=e.listFocusOutline)!==null&&t!==void 0?t:""));r&&(o.push(`.monaco-list${n}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${r}; outline-offset: -1px;}`),o.push(`.monaco-list${n}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(o.push(`.monaco-list${n}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),o.push(`.monaco-list${n}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),o.push(`.monaco-workbench.context-menu-visible .monaco-list${n}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),o.push(`.monaco-workbench.context-menu-visible .monaco-list${n}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=o.join(` +`),this.view.style(e)}getParentElement(e){let t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){this.eventBufferer.bufferEvents(()=>{let n=e.map(r=>this.model.getNode(r));this.selection.set(n,t);let o=e.map(r=>this.model.getListIndex(r)).filter(r=>r>-1);this.view.setSelection(o,t,!0)})}getSelection(){return this.selection.get()}setFocus(e,t){this.eventBufferer.bufferEvents(()=>{let n=e.map(r=>this.model.getNode(r));this.focus.set(n,t);let o=e.map(r=>this.model.getListIndex(r)).filter(r=>r>-1);this.view.setFocus(o,t,!0)})}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);let n=this.model.getListIndex(e);if(n!==-1)if(!this.stickyScrollController)this.view.reveal(n,t);else{let o=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(n,t,o)}}onLeftArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(t.length===0)return;let n=t[0],o=this.model.getNodeLocation(n);if(!this.model.setCollapsed(o,!0)){let s=this.model.getParentNodeLocation(o);if(!s)return;let a=this.model.getListIndex(s);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(t.length===0)return;let n=t[0],o=this.model.getNodeLocation(n);if(!this.model.setCollapsed(o,!1)){if(!n.children.some(l=>l.visible))return;let[s]=this.view.getFocus(),a=s+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(t.length===0)return;let n=t[0],o=this.model.getNodeLocation(n),r=e.browserEvent.altKey;this.model.setCollapsed(o,void 0,r)}dispose(){var e;Nn(this.disposables),(e=this.stickyScrollController)===null||e===void 0||e.dispose(),this.view.dispose()}}});var Jv,AZ=P(()=>{TZ();yS();Yc();Jv=class{constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new DZ(e,t,null,n),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,n.sorter&&(this.sorter={compare(o,r){return n.sorter.compare(o.element,r.element)}}),this.identityProvider=n.identityProvider}setChildren(e,t=un.empty(),n={}){let o=this.getElementLocation(e);this._setChildren(o,this.preserveCollapseState(t),n)}_setChildren(e,t=un.empty(),n){let o=new Set,r=new Set,s=l=>{var c;if(l.element===null)return;let d=l;if(o.add(d.element),this.nodes.set(d.element,d),this.identityProvider){let u=this.identityProvider.getId(d.element).toString();r.add(u),this.nodesByIdentity.set(u,d)}(c=n.onDidCreateNode)===null||c===void 0||c.call(n,d)},a=l=>{var c;if(l.element===null)return;let d=l;if(o.has(d.element)||this.nodes.delete(d.element),this.identityProvider){let u=this.identityProvider.getId(d.element).toString();r.has(u)||this.nodesByIdentity.delete(u)}(c=n.onDidDeleteNode)===null||c===void 0||c.call(n,d)};this.model.splice([...e,0],Number.MAX_VALUE,t,{...n,onDidCreateNode:s,onDidDeleteNode:a})}preserveCollapseState(e=un.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),un.map(e,t=>{let n=this.nodes.get(t.element);if(!n&&this.identityProvider){let s=this.identityProvider.getId(t.element).toString();n=this.nodesByIdentity.get(s)}if(!n){let s;return typeof t.collapsed>"u"?s=void 0:t.collapsed===wu.Collapsed||t.collapsed===wu.PreserveOrCollapsed?s=!0:t.collapsed===wu.Expanded||t.collapsed===wu.PreserveOrExpanded?s=!1:s=!!t.collapsed,{...t,children:this.preserveCollapseState(t.children),collapsed:s}}let o=typeof t.collapsible=="boolean"?t.collapsible:n.collapsible,r;return typeof t.collapsed>"u"||t.collapsed===wu.PreserveOrCollapsed||t.collapsed===wu.PreserveOrExpanded?r=n.collapsed:t.collapsed===wu.Collapsed?r=!0:t.collapsed===wu.Expanded?r=!1:r=!!t.collapsed,{...t,collapsible:o,collapsed:r,children:this.preserveCollapseState(t.children)}})}rerender(e){let t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){let t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){let t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){let t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){let t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){let n=this.getElementLocation(e);return this.model.setCollapsible(n,t)}isCollapsed(e){let t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){let o=this.getElementLocation(e);return this.model.setCollapsed(o,t,n)}expandTo(e){let t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);let t=this.nodes.get(e);if(!t)throw new rc(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new rc(this.user,"Invalid getParentNodeLocation call");let t=this.nodes.get(e);if(!t)throw new rc(this.user,`Tree element not found: ${e}`);let n=this.model.getNodeLocation(t),o=this.model.getParentNodeLocation(n);return this.model.getNode(o).element}getElementLocation(e){if(e===null)return[];let t=this.nodes.get(e);if(!t)throw new rc(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}});function RZ(i){let e=[i.element],t=i.incompressible||!1;return{element:{elements:e,incompressible:t},children:un.map(un.from(i.children),RZ),collapsible:i.collapsible,collapsed:i.collapsed}}function PZ(i){let e=[i.element],t=i.incompressible||!1,n,o;for(;[o,n]=un.consume(un.from(i.children),2),!(o.length!==1||o[0].incompressible);)i=o[0],e.push(i.element);return{element:{elements:e,incompressible:t},children:un.map(un.concat(o,n),PZ),collapsible:i.collapsible,collapsed:i.collapsed}}function d0e(i,e=0){let t;return ed0e(n,0)),e===0&&i.element.incompressible?{element:i.element.elements[e],children:t,incompressible:!0,collapsible:i.collapsible,collapsed:i.collapsed}:{element:i.element.elements[e],children:t,collapsible:i.collapsible,collapsed:i.collapsed}}function Bit(i){return d0e(i,0)}function Vit(i,e,t){return i.element===e?{...i,children:t}:{...i,children:un.map(un.from(i.children),n=>Vit(n,e,t))}}function PNt(i,e){return{splice(t,n,o){e.splice(t,n,o.map(r=>i.map(r)))},updateElementHeight(t,n){e.updateElementHeight(t,n)}}}function ONt(i,e){return{...e,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(i(t))}},sorter:e.sorter&&{compare(t,n){return e.sorter.compare(t.elements[0],n.elements[0])}},filter:e.filter&&{filter(t,n){return e.filter.filter(i(t),n)}}}}var ANt,u0e,RNt,h0e,OZ,Wit=P(()=>{AZ();yS();Vi();Xt();Yc();ANt=i=>({getId(e){return e.elements.map(t=>i.getId(t).toString()).join("\0")}}),u0e=class{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new Jv(e,t,n),this.enabled=typeof n.compressionEnabled>"u"?!0:n.compressionEnabled,this.identityProvider=n.identityProvider}setChildren(e,t=un.empty(),n){let o=n.diffIdentityProvider&&ANt(n.diffIdentityProvider);if(e===null){let p=un.map(t,this.enabled?PZ:RZ);this._setChildren(null,p,{diffIdentityProvider:o,diffDepth:1/0});return}let r=this.nodes.get(e);if(!r)throw new rc(this.user,"Unknown compressed tree node");let s=this.model.getNode(r),a=this.model.getParentNodeLocation(r),l=this.model.getNode(a),c=Bit(s),d=Vit(c,e,t),u=(this.enabled?PZ:RZ)(d),h=n.diffIdentityProvider?(p,m)=>n.diffIdentityProvider.getId(p)===n.diffIdentityProvider.getId(m):void 0;if(uo(u.element.elements,s.element.elements,h)){this._setChildren(r,u.children||un.empty(),{diffIdentityProvider:o,diffDepth:1});return}let f=l.children.map(p=>p===s?u:p);this._setChildren(l.element,f,{diffIdentityProvider:o,diffDepth:s.depth-l.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;let n=this.model.getNode().children,o=un.map(n,Bit),r=un.map(o,e?PZ:RZ);this._setChildren(null,r,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,n){let o=new Set,r=a=>{for(let l of a.element.elements)o.add(l),this.nodes.set(l,a.element)},s=a=>{for(let l of a.element.elements)o.has(l)||this.nodes.delete(l)};this.model.setChildren(e,t,{...n,onDidCreateNode:r,onDidDeleteNode:s})}has(e){return this.nodes.has(e)}getListIndex(e){let t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){let t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(typeof e>"u")return this.model.getNode();let t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){let t=this.model.getNodeLocation(e);return t===null?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){let t=this.getCompressedNode(e),n=this.model.getParentNodeLocation(t);return n===null?null:n.elements[n.elements.length-1]}getFirstElementChild(e){let t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){let t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){let n=this.getCompressedNode(e);return this.model.setCollapsible(n,t)}isCollapsed(e){let t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){let o=this.getCompressedNode(e);return this.model.setCollapsed(o,t,n)}expandTo(e){let t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){let t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(e===null)return null;let t=this.nodes.get(e);if(!t)throw new rc(this.user,`Tree element not found: ${e}`);return t}},RNt=i=>i[i.length-1],h0e=class i{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new i(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}};OZ=class{get onDidSplice(){return Et.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(n=>this.nodeMapper.map(n)),deletedNodes:t.map(n=>this.nodeMapper.map(n))}))}get onDidChangeCollapseState(){return Et.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return Et.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}constructor(e,t,n={}){this.rootRef=null,this.elementMapper=n.elementMapper||RNt;let o=r=>this.elementMapper(r.elements);this.nodeMapper=new Xb(r=>new h0e(o,r)),this.model=new u0e(e,PNt(this.nodeMapper,t),ONt(o,n))}setChildren(e,t=un.empty(),n={}){this.model.setChildren(e,t,n)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){let t=this.model.getFirstElementChild(e);return t===null||typeof t>"u"?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,n){return this.model.setCollapsed(e,t,n)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}});function FNt(i,e){return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(t){let n;try{n=i().getCompressedTreeNode(t)}catch{return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t)}return n.element.elements.length===1?e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t):e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}}}var zNt,Jb,zZ,f0e,xS,p0e=P(()=>{wN();Wit();AZ();uv();Yc();zNt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Jb=class extends wS{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,n,o,r={}){super(e,t,n,o,r),this.user=e}setChildren(e,t=un.empty(),n){this.model.setChildren(e,t,n)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}hasElement(e){return this.model.has(e)}createModel(e,t,n){return new Jv(e,t,n)}},zZ=class{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t,n){this._compressedTreeNodeProvider=e,this.stickyScrollDelegate=t,this.renderer=n,this.templateId=n.templateId,n.onDidChangeTwistieState&&(this.onDidChangeTwistieState=n.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,n,o){let r=this.stickyScrollDelegate.getCompressedNode(e);r||(r=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element)),r.element.elements.length===1?(n.compressedTreeNode=void 0,this.renderer.renderElement(e,t,n.data,o)):(n.compressedTreeNode=r,this.renderer.renderCompressedElements(r,t,n.data,o))}disposeElement(e,t,n,o){var r,s,a,l;n.compressedTreeNode?(s=(r=this.renderer).disposeCompressedElements)===null||s===void 0||s.call(r,n.compressedTreeNode,t,n.data,o):(l=(a=this.renderer).disposeElement)===null||l===void 0||l.call(a,e,t,n.data,o)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return this.renderer.renderTwistie?this.renderer.renderTwistie(e,t):!1}};zNt([Tr],zZ.prototype,"compressedTreeNodeProvider",null);f0e=class{constructor(e){this.modelProvider=e,this.compressedStickyNodes=new Map}getCompressedNode(e){return this.compressedStickyNodes.get(e)}constrainStickyScrollNodes(e,t,n){if(this.compressedStickyNodes.clear(),e.length===0)return[];for(let o=0;on||o>=t-1&&tthis,a=new f0e(()=>this.model),l=o.map(c=>new zZ(s,a,c));super(e,t,n,l,{...FNt(s,r),stickyScrollDelegate:a})}setChildren(e,t=un.empty(),n){this.model.setChildren(e,t,n)}createModel(e,t,n){return new OZ(e,t,n)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled<"u"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}});function m0e(i){return{...i,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function v0e(i,e){return e.parent?e.parent===i?!0:v0e(i,e.parent):!1}function HNt(i,e){return i===e||v0e(i,e)||v0e(e,i)}function Uit(i){return{browserEvent:i.browserEvent,elements:i.elements.map(e=>e.element)}}function $it(i){return{browserEvent:i.browserEvent,element:i.element&&i.element.element,target:i.target}}function g0e(i){return i instanceof E4?new y0e(i):i}function jit(i){return i&&{...i,collapseByDefault:!0,identityProvider:i.identityProvider&&{getId(e){return i.identityProvider.getId(e.element)}},dnd:i.dnd&&new C0e(i.dnd),multipleSelectionController:i.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return i.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element})},isSelectionRangeChangeEvent(e){return i.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})}},accessibilityProvider:i.accessibilityProvider&&{...i.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:i.accessibilityProvider.getRole?e=>i.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:i.accessibilityProvider.isChecked?e=>{var t;return!!(!((t=i.accessibilityProvider)===null||t===void 0)&&t.isChecked(e.element))}:void 0,getAriaLabel(e){return i.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return i.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:i.accessibilityProvider.getWidgetRole?()=>i.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:i.accessibilityProvider.getAriaLevel&&(e=>i.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:i.accessibilityProvider.getActiveDescendantId&&(e=>i.accessibilityProvider.getActiveDescendantId(e.element))},filter:i.filter&&{filter(e,t){return i.filter.filter(e.element,t)}},keyboardNavigationLabelProvider:i.keyboardNavigationLabelProvider&&{...i.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(e){return i.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof i.expandOnlyOnTwistieClick>"u"?void 0:typeof i.expandOnlyOnTwistieClick!="function"?i.expandOnlyOnTwistieClick:e=>i.expandOnlyOnTwistieClick(e.element),defaultFindVisibility:e=>e.hasChildren&&e.stale?1:typeof i.defaultFindVisibility=="number"?i.defaultFindVisibility:typeof i.defaultFindVisibility>"u"?2:i.defaultFindVisibility(e.element)}}function w0e(i,e){e(i),i.children.forEach(t=>w0e(t,e))}function BNt(i){let e=i&&jit(i);return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(t){return i.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(n=>n.element))}}}}function VNt(i){return typeof i=="boolean"?i?1:0:bN(i)?Qb(i.visibility):Qb(i)}var _0e,b0e,y0e,C0e,xN,x0e,S0e,FZ,qit=P(()=>{tZ();wN();TZ();p0e();yS();Qi();Go();or();Pi();Xt();Yc();nt();ho();_0e=class i{get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new i(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}},b0e=class{constructor(e,t,n){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,o){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,o)}renderTwistie(e,t){return e.slow?(t.classList.add(...ui.asClassNameArray(kt.treeItemLoading)),!0):(t.classList.remove(...ui.asClassNameArray(kt.treeItemLoading)),!1)}disposeElement(e,t,n,o){var r,s;(s=(r=this.renderer).disposeElement)===null||s===void 0||s.call(r,this.nodeMapper.map(e),t,n.templateData,o)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}};y0e=class extends E4{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}};C0e=class{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),t)}onDragStart(e,t){var n,o;(o=(n=this.dnd).onDragStart)===null||o===void 0||o.call(n,g0e(e),t)}onDragOver(e,t,n,o,r,s=!0){return this.dnd.onDragOver(g0e(e),t&&t.element,n,o,r)}drop(e,t,n,o,r){this.dnd.drop(g0e(e),t&&t.element,n,o,r)}onDragEnd(e){var t,n;(n=(t=this.dnd).onDragEnd)===null||n===void 0||n.call(t,e)}dispose(){this.dnd.dispose()}};xN=class{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return Et.map(this.tree.onDidChangeFocus,Uit)}get onDidChangeSelection(){return Et.map(this.tree.onDidChangeSelection,Uit)}get onMouseDblClick(){return Et.map(this.tree.onMouseDblClick,$it)}get onPointer(){return Et.map(this.tree.onPointer,$it)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,n,o,r,s={}){this.user=e,this.dataSource=r,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new ge,this._onDidChangeNodeSlowState=new ge,this.nodeMapper=new Xb(a=>new _0e(a)),this.disposables=new Ye,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren=typeof s.autoExpandSingleChildren>"u"?!1:s.autoExpandSingleChildren,this.sorter=s.sorter,this.getDefaultCollapseState=a=>s.collapseByDefault?s.collapseByDefault(a)?wu.PreserveOrCollapsed:wu.PreserveOrExpanded:void 0,this.tree=this.createTree(e,t,n,o,s),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType,this.root=m0e({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,t,n,o,r){let s=new CS(n),a=o.map(c=>new b0e(c,this.nodeMapper,this._onDidChangeNodeSlowState.event)),l=jit(r)||{};return new Jb(e,t,s,a,l)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,t){this.refreshPromises.forEach(o=>o.cancel()),this.refreshPromises.clear(),this.root.element=e;let n=t&&{viewState:t,focus:[],selection:[]};await this._updateChildren(e,!0,!1,n),n&&(this.tree.setFocus(n.focus),this.tree.setSelection(n.selection)),t&&typeof t.scrollTop=="number"&&(this.scrollTop=t.scrollTop)}async _updateChildren(e=this.root.element,t=!0,n=!1,o,r){if(typeof this.root.element>"u")throw new rc(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await Et.toPromise(this._onDidRender.event));let s=this.getDataNode(e);if(await this.refreshAndRenderNode(s,t,o,r),n)try{this.tree.rerender(s)}catch{}}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}let t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){let t=this.getDataNode(e),n=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(n)}collapse(e,t=!1){let n=this.getDataNode(e);return this.tree.collapse(n===this.root?null:n,t)}async expand(e,t=!1){if(typeof this.root.element>"u")throw new rc(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await Et.toPromise(this._onDidRender.event));let n=this.getDataNode(e);if(this.tree.hasElement(n)&&!this.tree.isCollapsible(n)||(n.refreshPromise&&(await this.root.refreshPromise,await Et.toPromise(this._onDidRender.event)),n!==this.root&&!n.refreshPromise&&!this.tree.isCollapsed(n)))return!1;let o=this.tree.expand(n===this.root?null:n,t);return n.refreshPromise&&(await this.root.refreshPromise,await Et.toPromise(this._onDidRender.event)),o}setSelection(e,t){let n=e.map(o=>this.getDataNode(o));this.tree.setSelection(n,t)}getSelection(){return this.tree.getSelection().map(t=>t.element)}setFocus(e,t){let n=e.map(o=>this.getDataNode(o));this.tree.setFocus(n,t)}getFocus(){return this.tree.getFocus().map(t=>t.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){let t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){let t=this.getDataNode(e),n=this.tree.getFirstElementChild(t===this.root?null:t);return n&&n.element}getDataNode(e){let t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new rc(this.user,`Data tree node not found: ${e}`);return t}async refreshAndRenderNode(e,t,n,o){await this.refreshNode(e,t,n),!this.disposables.isDisposed&&this.render(e,n,o)}async refreshNode(e,t,n){let o;if(this.subTreeRefreshPromises.forEach((r,s)=>{!o&&HNt(s,e)&&(o=r.then(()=>this.refreshNode(e,t,n)))}),o)return o;if(e!==this.root&&this.tree.getNode(e).collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0;return}return this.doRefreshSubTree(e,t,n)}async doRefreshSubTree(e,t,n){let o;e.refreshPromise=new Promise(r=>o=r),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{let r=await this.doRefreshNode(e,t,n);e.stale=!1,await WU.settled(r.map(s=>this.doRefreshSubTree(s,t,n)))}finally{o()}}async doRefreshNode(e,t,n){e.hasChildren=!!this.dataSource.hasChildren(e.element);let o;if(!e.hasChildren)o=Promise.resolve(un.empty());else{let r=this.doGetChildren(e);if(Ade(r))o=Promise.resolve(r);else{let s=eh(800);s.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},a=>null),o=r.finally(()=>s.cancel())}}try{let r=await o;return this.setChildren(e,r,t,n)}catch(r){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),jl(r))return[];throw r}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;let n=this.dataSource.getChildren(e.element);return Ade(n)?this.processChildren(n):(t=Ho(async()=>this.processChildren(await n)),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){e.element!==null&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(hi))}setChildren(e,t,n,o){let r=[...t];if(e.children.length===0&&r.length===0)return[];let s=new Map,a=new Map;for(let d of e.children)s.set(d.element,d),this.identityProvider&&a.set(d.id,{node:d,collapsed:this.tree.hasElement(d)&&this.tree.isCollapsed(d)});let l=[],c=r.map(d=>{let u=!!this.dataSource.hasChildren(d);if(!this.identityProvider){let m=m0e({element:d,parent:e,hasChildren:u,defaultCollapseState:this.getDefaultCollapseState(d)});return u&&m.defaultCollapseState===wu.PreserveOrExpanded&&l.push(m),m}let h=this.identityProvider.getId(d).toString(),f=a.get(h);if(f){let m=f.node;return s.delete(m.element),this.nodes.delete(m.element),this.nodes.set(d,m),m.element=d,m.hasChildren=u,n?f.collapsed?(m.children.forEach(y=>w0e(y,_=>this.nodes.delete(_.element))),m.children.splice(0,m.children.length),m.stale=!0):l.push(m):u&&!f.collapsed&&l.push(m),m}let p=m0e({element:d,parent:e,id:h,hasChildren:u,defaultCollapseState:this.getDefaultCollapseState(d)});return o&&o.viewState.focus&&o.viewState.focus.indexOf(h)>-1&&o.focus.push(p),o&&o.viewState.selection&&o.viewState.selection.indexOf(h)>-1&&o.selection.push(p),(o&&o.viewState.expanded&&o.viewState.expanded.indexOf(h)>-1||u&&p.defaultCollapseState===wu.PreserveOrExpanded)&&l.push(p),p});for(let d of s.values())w0e(d,u=>this.nodes.delete(u.element));for(let d of c)this.nodes.set(d.element,d);return e.children.splice(0,e.children.length,...c),e!==this.root&&this.autoExpandSingleChildren&&c.length===1&&l.length===0&&(c[0].forceExpanded=!0,l.push(c[0])),l}render(e,t,n){let o=e.children.map(s=>this.asTreeElement(s,t)),r=n&&{...n,diffIdentityProvider:n.diffIdentityProvider&&{getId(s){return n.diffIdentityProvider.getId(s.element)}}};this.tree.setChildren(e===this.root?null:e,o,r),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let n;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?n=!1:e.forceExpanded?(n=!1,e.forceExpanded=!1):n=e.defaultCollapseState,{element:e,children:e.hasChildren?un.map(e.children,o=>this.asTreeElement(o,t)):[],collapsible:e.hasChildren,collapsed:n}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}},x0e=class i{get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new i(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}},S0e=class{constructor(e,t,n,o){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=n,this.onDidChangeTwistieState=o,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,o){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,o)}renderCompressedElements(e,t,n,o){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,o)}renderTwistie(e,t){return e.slow?(t.classList.add(...ui.asClassNameArray(kt.treeItemLoading)),!0):(t.classList.remove(...ui.asClassNameArray(kt.treeItemLoading)),!1)}disposeElement(e,t,n,o){var r,s;(s=(r=this.renderer).disposeElement)===null||s===void 0||s.call(r,this.nodeMapper.map(e),t,n.templateData,o)}disposeCompressedElements(e,t,n,o){var r,s;(s=(r=this.renderer).disposeCompressedElements)===null||s===void 0||s.call(r,this.compressibleNodeMapperProvider().map(e),t,n.templateData,o)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=Nn(this.disposables)}};FZ=class extends xN{constructor(e,t,n,o,r,s,a={}){super(e,t,n,r,s,a),this.compressionDelegate=o,this.compressibleNodeMapper=new Xb(l=>new x0e(l)),this.filter=a.filter}createTree(e,t,n,o,r){let s=new CS(n),a=o.map(c=>new S0e(c,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),l=BNt(r)||{};return new xS(e,t,s,a,l)}asTreeElement(e,t){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,t)}}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t,n){if(!this.identityProvider)return super.render(e,t);let o=f=>this.identityProvider.getId(f).toString(),r=f=>{let p=new Set;for(let m of f){let y=this.tree.getCompressedTreeNode(m===this.root?null:m);if(y.element)for(let _ of y.element.elements)p.add(o(_.element))}return p},s=r(this.tree.getSelection()),a=r(this.tree.getFocus());super.render(e,t,n);let l=this.getSelection(),c=!1,d=this.getFocus(),u=!1,h=f=>{let p=f.element;if(p)for(let m=0;m{let n=this.filter.filter(t,1),o=VNt(n);if(o===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return o===1})),super.processChildren(e)}}});var HZ,Git=P(()=>{wN();AZ();HZ=class extends wS{constructor(e,t,n,o,r,s={}){super(e,t,n,o,s),this.user=e,this.dataSource=r,this.identityProvider=s.identityProvider}createModel(e,t,n){return new Jv(e,t,n)}}});var qGi,GGi,SN,k0e,KGi,YGi,ZGi,XGi,QGi,L0e,JGi,BZ=P(()=>{Mn();Wt();Xi();qGi=new Bt("isMac",Wi,g("isMac","Whether the operating system is macOS")),GGi=new Bt("isLinux",Ar,g("isLinux","Whether the operating system is Linux")),SN=new Bt("isWindows",hr,g("isWindows","Whether the operating system is Windows")),k0e=new Bt("isWeb",Fh,g("isWeb","Whether the platform is a web browser")),KGi=new Bt("isMacNative",Wi&&!Fh,g("isMacNative","Whether the operating system is macOS on a non-browser platform")),YGi=new Bt("isIOS",Lc,g("isIOS","Whether the operating system is iOS")),ZGi=new Bt("isMobile",GV,g("isMobile","Whether the platform is a mobile web browser")),XGi=new Bt("isDevelopment",!1,!0),QGi=new Bt("productQualityType","",g("productQualityType","Quality type of VS Code")),L0e="inputFocus",JGi=new Bt(L0e,!1,g("inputFocus","Whether keyboard focus is inside an input box"))});function tX(i,e){let t=i.createScoped(e.getHTMLElement());return ent.bindTo(t),t}function iX(i,e){let t=kN.bindTo(i),n=()=>{let o=e.scrollTop===0,r=e.scrollHeight-e.renderHeight-e.scrollTop<1;o&&r?t.set("both"):o?t.set("top"):r?t.set("bottom"):t.set("none")};return n(),e.onDidScroll(n)}function z2(i){return i.getValue(t7)==="alt"}function nX(i,e){var t;let n=i.get(Ni),o=i.get(fn),r=new Ye;return[{...e,keyboardNavigationDelegate:{mightProducePrintableCharacter(a){return o.mightProducePrintableCharacter(a)}},smoothScrolling:!!n.getValue(Vm),mouseWheelScrollSensitivity:n.getValue(P2),fastScrollSensitivity:n.getValue(O2),multipleSelectionController:(t=e.multipleSelectionController)!==null&&t!==void 0?t:r.add(new E0e(n)),keyboardNavigationEventFilter:qNt(o),scrollByPage:!!n.getValue(Bm)},r]}function qNt(i){let e=!1;return t=>{if(t.toKeyCodeChord().isModifierKey())return!1;if(e)return e=!1,!1;let n=i.softDispatch(t,t.target);return n.kind===1?(e=!0,!1):(e=!1,n.kind===0)}}function ont(i){let e=i.getValue(R0e);if(e==="highlight")return R2.Highlight;if(e==="filter")return R2.Filter;let t=i.getValue(UZ);if(t==="simple"||t==="highlight")return R2.Highlight;if(t==="filter")return R2.Filter}function rnt(i){let e=i.getValue(O0e);if(e==="fuzzy")return Qv.Fuzzy;if(e==="contiguous")return Qv.Contiguous}function DN(i,e){var t;let n=i.get(Ni),o=i.get(Pc),r=i.get(ri),s=i.get(qt),a=()=>{let f=r.getContextKeyValue(int);if(f==="automatic")return Fm.Automatic;if(f==="trigger")return Fm.Trigger;if(r.getContextKeyValue(nnt)===!1)return Fm.Trigger;let m=n.getValue(P0e);if(m==="automatic")return Fm.Automatic;if(m==="trigger")return Fm.Trigger},l=e.horizontalScrolling!==void 0?e.horizontalScrolling:!!n.getValue(f1),[c,d]=s.invokeFunction(nX,e),u=e.paddingBottom,h=e.renderIndentGuides!==void 0?e.renderIndentGuides:n.getValue($Z);return{getTypeNavigationMode:a,disposable:d,options:{keyboardSupport:!1,...c,indent:typeof n.getValue(LN)=="number"?n.getValue(LN):void 0,renderIndentGuides:h,smoothScrolling:!!n.getValue(Vm),defaultFindMode:ont(n),defaultFindMatchType:rnt(n),horizontalScrolling:l,scrollByPage:!!n.getValue(Bm),paddingBottom:u,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(t=e.expandOnlyOnTwistieClick)!==null&&t!==void 0?t:n.getValue(jZ)==="doubleClick",contextViewProvider:o,findWidgetStyles:cit,enableStickyScroll:!!n.getValue(qZ),stickyScrollMaxItemCount:Number(n.getValue(GZ))}}}var P4,br,gh,WZ,kN,CKi,wKi,ent,tnt,XZ,I0e,M0e,N0e,A0e,QZ,WNt,JZ,UNt,eX,$Nt,jNt,int,nnt,t7,VZ,f1,R0e,P0e,UZ,Bm,O0e,LN,$Z,Vm,P2,O2,jZ,qZ,GZ,E0e,KZ,Kit,Yit,EN,YZ,D0e,T0e,Zit,Xit,Qit,ZZ,Jit,e7,GNt,TN=P(()=>{Qt();Eit();Gv();Nit();wN();qit();Git();p0e();Xt();nt();Wt();er();Wg();Xi();BZ();Id();_i();vs();Ys();N4();P4=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},br=function(i,e){return function(t,n){e(t,n,i)}},gh=vi("listService"),WZ=class{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new Ye,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){var t,n;e!==this._lastFocusedWidget&&((t=this._lastFocusedWidget)===null||t===void 0||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,(n=this._lastFocusedWidget)===null||n===void 0||n.getHTMLElement().classList.add("last-focused"))}register(e,t){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new oN(ya(),"").style(I4)),this.lists.some(o=>o.widget===e))throw new Error("Cannot register the same widget multiple times");let n={widget:e,extraContextKeys:t};return this.lists.push(n),L5(e.getHTMLElement())&&this.setLastFocusedList(e),vl(e.onDidFocus(()=>this.setLastFocusedList(e)),Yt(()=>this.lists.splice(this.lists.indexOf(n),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(o=>o!==n),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}},kN=new Bt("listScrollAtBoundary","none"),CKi=mt.or(kN.isEqualTo("top"),kN.isEqualTo("both")),wKi=mt.or(kN.isEqualTo("bottom"),kN.isEqualTo("both")),ent=new Bt("listFocus",!0),tnt=new Bt("treestickyScrollFocused",!1),XZ=new Bt("listSupportsMultiselect",!0),I0e=mt.and(ent,mt.not(L0e),tnt.negate()),M0e=new Bt("listHasSelectionOrFocus",!1),N0e=new Bt("listDoubleSelection",!1),A0e=new Bt("listMultiSelection",!1),QZ=new Bt("listSelectionNavigation",!1),WNt=new Bt("listSupportsFind",!0),JZ=new Bt("treeElementCanCollapse",!1),UNt=new Bt("treeElementHasParent",!1),eX=new Bt("treeElementCanExpand",!1),$Nt=new Bt("treeElementHasChild",!1),jNt=new Bt("treeFindOpen",!1),int="listTypeNavigationMode",nnt="listAutomaticKeyboardNavigation";t7="workbench.list.multiSelectModifier",VZ="workbench.list.openMode",f1="workbench.list.horizontalScrolling",R0e="workbench.list.defaultFindMode",P0e="workbench.list.typeNavigationMode",UZ="workbench.list.keyboardNavigation",Bm="workbench.list.scrollByPage",O0e="workbench.list.defaultFindMatchType",LN="workbench.tree.indent",$Z="workbench.tree.renderIndentGuides",Vm="workbench.list.smoothScrolling",P2="workbench.list.mouseWheelScrollSensitivity",O2="workbench.list.fastScrollSensitivity",jZ="workbench.tree.expandMode",qZ="workbench.tree.enableStickyScroll",GZ="workbench.tree.stickyScrollMaxItemCount";E0e=class extends ue{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=z2(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(t7)&&(this.useAltAsMultipleSelectionModifier=z2(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:w2e(e)}isSelectionRangeChangeEvent(e){return x2e(e)}};KZ=class extends Nl{constructor(e,t,n,o,r,s,a,l,c){let d=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!l.getValue(f1),[u,h]=c.invokeFunction(nX,r);super(e,t,n,o,{keyboardSupport:!1,...u,horizontalScrolling:d}),this.disposables.add(h),this.contextKeyService=tX(s,this),this.disposables.add(iX(this.contextKeyService,this)),this.listSupportsMultiSelect=XZ.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),QZ.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this.listHasSelectionOrFocus=M0e.bindTo(this.contextKeyService),this.listDoubleSelection=N0e.bindTo(this.contextKeyService),this.listMultiSelection=A0e.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=z2(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(r.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{let p=this.getSelection(),m=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(p.length>0||m.length>0),this.listMultiSelection.set(p.length>1),this.listDoubleSelection.set(p.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{let p=this.getSelection(),m=this.getFocus();this.listHasSelectionOrFocus.set(p.length>0||m.length>0)})),this.disposables.add(l.onDidChangeConfiguration(p=>{p.affectsConfiguration(t7)&&(this._useAltAsMultipleSelectionModifier=z2(l));let m={};if(p.affectsConfiguration(f1)&&this.horizontalScrolling===void 0){let y=!!l.getValue(f1);m={...m,horizontalScrolling:y}}if(p.affectsConfiguration(Bm)){let y=!!l.getValue(Bm);m={...m,scrollByPage:y}}if(p.affectsConfiguration(Vm)){let y=!!l.getValue(Vm);m={...m,smoothScrolling:y}}if(p.affectsConfiguration(P2)){let y=l.getValue(P2);m={...m,mouseWheelScrollSensitivity:y}}if(p.affectsConfiguration(O2)){let y=l.getValue(O2);m={...m,fastScrollSensitivity:y}}Object.keys(m).length>0&&this.updateOptions(m)})),this.navigator=new YZ(this,{configurationService:l,...r}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?M4(e):I4)}};KZ=P4([br(5,ri),br(6,gh),br(7,Ni),br(8,qt)],KZ);Kit=class extends wZ{constructor(e,t,n,o,r,s,a,l,c){let d=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!l.getValue(f1),[u,h]=c.invokeFunction(nX,r);super(e,t,n,o,{keyboardSupport:!1,...u,horizontalScrolling:d}),this.disposables=new Ye,this.disposables.add(h),this.contextKeyService=tX(s,this),this.disposables.add(iX(this.contextKeyService,this.widget)),this.horizontalScrolling=r.horizontalScrolling,this.listSupportsMultiSelect=XZ.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),QZ.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this._useAltAsMultipleSelectionModifier=z2(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(r.overrideStyles),this.disposables.add(l.onDidChangeConfiguration(p=>{p.affectsConfiguration(t7)&&(this._useAltAsMultipleSelectionModifier=z2(l));let m={};if(p.affectsConfiguration(f1)&&this.horizontalScrolling===void 0){let y=!!l.getValue(f1);m={...m,horizontalScrolling:y}}if(p.affectsConfiguration(Bm)){let y=!!l.getValue(Bm);m={...m,scrollByPage:y}}if(p.affectsConfiguration(Vm)){let y=!!l.getValue(Vm);m={...m,smoothScrolling:y}}if(p.affectsConfiguration(P2)){let y=l.getValue(P2);m={...m,mouseWheelScrollSensitivity:y}}if(p.affectsConfiguration(O2)){let y=l.getValue(O2);m={...m,fastScrollSensitivity:y}}Object.keys(m).length>0&&this.updateOptions(m)})),this.navigator=new YZ(this,{configurationService:l,...r}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?M4(e):I4)}dispose(){this.disposables.dispose(),super.dispose()}};Kit=P4([br(5,ri),br(6,gh),br(7,Ni),br(8,qt)],Kit);Yit=class extends vN{constructor(e,t,n,o,r,s,a,l,c,d){let u=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:!!c.getValue(f1),[h,f]=d.invokeFunction(nX,s);super(e,t,n,o,r,{keyboardSupport:!1,...h,horizontalScrolling:u}),this.disposables.add(f),this.contextKeyService=tX(a,this),this.disposables.add(iX(this.contextKeyService,this)),this.listSupportsMultiSelect=XZ.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),QZ.bindTo(this.contextKeyService).set(!!s.selectionNavigation),this.listHasSelectionOrFocus=M0e.bindTo(this.contextKeyService),this.listDoubleSelection=N0e.bindTo(this.contextKeyService),this.listMultiSelection=A0e.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=z2(c),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{let m=this.getSelection(),y=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(m.length>0||y.length>0),this.listMultiSelection.set(m.length>1),this.listDoubleSelection.set(m.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{let m=this.getSelection(),y=this.getFocus();this.listHasSelectionOrFocus.set(m.length>0||y.length>0)})),this.disposables.add(c.onDidChangeConfiguration(m=>{m.affectsConfiguration(t7)&&(this._useAltAsMultipleSelectionModifier=z2(c));let y={};if(m.affectsConfiguration(f1)&&this.horizontalScrolling===void 0){let _=!!c.getValue(f1);y={...y,horizontalScrolling:_}}if(m.affectsConfiguration(Bm)){let _=!!c.getValue(Bm);y={...y,scrollByPage:_}}if(m.affectsConfiguration(Vm)){let _=!!c.getValue(Vm);y={...y,smoothScrolling:_}}if(m.affectsConfiguration(P2)){let _=c.getValue(P2);y={...y,mouseWheelScrollSensitivity:_}}if(m.affectsConfiguration(O2)){let _=c.getValue(O2);y={...y,fastScrollSensitivity:_}}Object.keys(y).length>0&&this.updateOptions(y)})),this.navigator=new D0e(this,{configurationService:c,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?M4(e):I4)}dispose(){this.disposables.dispose(),super.dispose()}};Yit=P4([br(6,ri),br(7,gh),br(8,Ni),br(9,qt)],Yit);EN=class extends ue{constructor(e,t){var n;super(),this.widget=e,this._onDidOpen=this._register(new ge),this.onDidOpen=this._onDidOpen.event,this._register(Et.filter(this.widget.onDidChangeSelection,o=>YC(o.browserEvent))(o=>this.onSelectionFromKeyboard(o))),this._register(this.widget.onPointer(o=>this.onPointer(o.element,o.browserEvent))),this._register(this.widget.onMouseDblClick(o=>this.onMouseDblClick(o.element,o.browserEvent))),typeof t?.openOnSingleClick!="boolean"&&t?.configurationService?(this.openOnSingleClick=t?.configurationService.getValue(VZ)!=="doubleClick",this._register(t?.configurationService.onDidChangeConfiguration(o=>{o.affectsConfiguration(VZ)&&(this.openOnSingleClick=t?.configurationService.getValue(VZ)!=="doubleClick")}))):this.openOnSingleClick=(n=t?.openOnSingleClick)!==null&&n!==void 0?n:!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;let t=e.browserEvent,n=typeof t.preserveFocus=="boolean"?t.preserveFocus:!0,o=typeof t.pinned=="boolean"?t.pinned:!n;this._open(this.getSelectedElement(),n,o,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick||t.detail===2)return;let o=t.button===1,r=!0,s=o,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,r,s,a,t)}onMouseDblClick(e,t){if(!t)return;let n=t.target;if(n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&t.offsetX<16)return;let r=!1,s=!0,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,r,s,a,t)}_open(e,t,n,o,r){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:n,revealIfVisible:!0},sideBySide:o,element:e,browserEvent:r})}},YZ=class extends EN{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}},D0e=class extends EN{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}},T0e=class extends EN{constructor(e,t){super(e,t)}getSelectedElement(){var e;return(e=this.widget.getSelection()[0])!==null&&e!==void 0?e:void 0}};Zit=class extends Jb{constructor(e,t,n,o,r,s,a,l,c){let{options:d,getTypeNavigationMode:u,disposable:h}=s.invokeFunction(DN,r);super(e,t,n,o,d),this.disposables.add(h),this.internals=new e7(this,r,u,r.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};Zit=P4([br(5,qt),br(6,ri),br(7,gh),br(8,Ni)],Zit);Xit=class extends xS{constructor(e,t,n,o,r,s,a,l,c){let{options:d,getTypeNavigationMode:u,disposable:h}=s.invokeFunction(DN,r);super(e,t,n,o,d),this.disposables.add(h),this.internals=new e7(this,r,u,r.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Xit=P4([br(5,qt),br(6,ri),br(7,gh),br(8,Ni)],Xit);Qit=class extends HZ{constructor(e,t,n,o,r,s,a,l,c,d){let{options:u,getTypeNavigationMode:h,disposable:f}=a.invokeFunction(DN,s);super(e,t,n,o,r,u),this.disposables.add(f),this.internals=new e7(this,s,h,s.overrideStyles,l,c,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles!==void 0&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Qit=P4([br(6,qt),br(7,ri),br(8,gh),br(9,Ni)],Qit);ZZ=class extends xN{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,n,o,r,s,a,l,c,d){let{options:u,getTypeNavigationMode:h,disposable:f}=a.invokeFunction(DN,s);super(e,t,n,o,r,u),this.disposables.add(f),this.internals=new e7(this,s,h,s.overrideStyles,l,c,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};ZZ=P4([br(6,qt),br(7,ri),br(8,gh),br(9,Ni)],ZZ);Jit=class extends FZ{constructor(e,t,n,o,r,s,a,l,c,d,u){let{options:h,getTypeNavigationMode:f,disposable:p}=l.invokeFunction(DN,a);super(e,t,n,o,r,s,h),this.disposables.add(p),this.internals=new e7(this,a,f,a.overrideStyles,c,d,u),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};Jit=P4([br(7,qt),br(8,ri),br(9,gh),br(10,Ni)],Jit);e7=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,n,o,r,s,a){var l;this.tree=e,this.disposables=[],this.contextKeyService=tX(r,e),this.disposables.push(iX(this.contextKeyService,e)),this.listSupportsMultiSelect=XZ.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(t.multipleSelectionSupport!==!1),QZ.bindTo(this.contextKeyService).set(!!t.selectionNavigation),this.listSupportFindWidget=WNt.bindTo(this.contextKeyService),this.listSupportFindWidget.set((l=t.findWidgetEnabled)!==null&&l!==void 0?l:!0),this.hasSelectionOrFocus=M0e.bindTo(this.contextKeyService),this.hasDoubleSelection=N0e.bindTo(this.contextKeyService),this.hasMultiSelection=A0e.bindTo(this.contextKeyService),this.treeElementCanCollapse=JZ.bindTo(this.contextKeyService),this.treeElementHasParent=UNt.bindTo(this.contextKeyService),this.treeElementCanExpand=eX.bindTo(this.contextKeyService),this.treeElementHasChild=$Nt.bindTo(this.contextKeyService),this.treeFindOpen=jNt.bindTo(this.contextKeyService),this.treeStickyScrollFocused=tnt.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=z2(a),this.updateStyleOverrides(o);let d=()=>{let h=e.getFocus()[0];if(!h)return;let f=e.getNode(h);this.treeElementCanCollapse.set(f.collapsible&&!f.collapsed),this.treeElementHasParent.set(!!e.getParentElement(h)),this.treeElementCanExpand.set(f.collapsible&&f.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(h))},u=new Set;u.add(int),u.add(nnt),this.disposables.push(this.contextKeyService,s.register(e),e.onDidChangeSelection(()=>{let h=e.getSelection(),f=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(h.length>0||f.length>0),this.hasMultiSelection.set(h.length>1),this.hasDoubleSelection.set(h.length===2)})}),e.onDidChangeFocus(()=>{let h=e.getSelection(),f=e.getFocus();this.hasSelectionOrFocus.set(h.length>0||f.length>0),d()}),e.onDidChangeCollapseState(d),e.onDidChangeModel(d),e.onDidChangeFindOpenState(h=>this.treeFindOpen.set(h)),e.onDidChangeStickyScrollFocused(h=>this.treeStickyScrollFocused.set(h)),a.onDidChangeConfiguration(h=>{let f={};if(h.affectsConfiguration(t7)&&(this._useAltAsMultipleSelectionModifier=z2(a)),h.affectsConfiguration(LN)){let p=a.getValue(LN);f={...f,indent:p}}if(h.affectsConfiguration($Z)&&t.renderIndentGuides===void 0){let p=a.getValue($Z);f={...f,renderIndentGuides:p}}if(h.affectsConfiguration(Vm)){let p=!!a.getValue(Vm);f={...f,smoothScrolling:p}}if(h.affectsConfiguration(R0e)||h.affectsConfiguration(UZ)){let p=ont(a);f={...f,defaultFindMode:p}}if(h.affectsConfiguration(P0e)||h.affectsConfiguration(UZ)){let p=n();f={...f,typeNavigationMode:p}}if(h.affectsConfiguration(O0e)){let p=rnt(a);f={...f,defaultFindMatchType:p}}if(h.affectsConfiguration(f1)&&t.horizontalScrolling===void 0){let p=!!a.getValue(f1);f={...f,horizontalScrolling:p}}if(h.affectsConfiguration(Bm)){let p=!!a.getValue(Bm);f={...f,scrollByPage:p}}if(h.affectsConfiguration(jZ)&&t.expandOnlyOnTwistieClick===void 0&&(f={...f,expandOnlyOnTwistieClick:a.getValue(jZ)==="doubleClick"}),h.affectsConfiguration(qZ)){let p=a.getValue(qZ);f={...f,enableStickyScroll:p}}if(h.affectsConfiguration(GZ)){let p=Math.max(1,a.getValue(GZ));f={...f,stickyScrollMaxItemCount:p}}if(h.affectsConfiguration(P2)){let p=a.getValue(P2);f={...f,mouseWheelScrollSensitivity:p}}if(h.affectsConfiguration(O2)){let p=a.getValue(O2);f={...f,fastScrollSensitivity:p}}Object.keys(f).length>0&&e.updateOptions(f)}),this.contextKeyService.onDidChangeContext(h=>{h.affectsSome(u)&&e.updateOptions({typeNavigationMode:n()})})),this.navigator=new T0e(e,{configurationService:a,...t}),this.disposables.push(this.navigator)}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?M4(e):I4)}dispose(){this.disposables=Nn(this.disposables)}};e7=P4([br(4,ri),br(5,gh),br(6,Ni)],e7);GNt=jn.as(Yl.Configuration);GNt.registerConfiguration({id:"workbench",order:7,title:g("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[t7]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[g("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),g("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:g({key:"multiSelectModifier",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 an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[VZ]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:g({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[f1]:{type:"boolean",default:!1,description:g("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[Bm]:{type:"boolean",default:!1,description:g("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[LN]:{type:"number",default:8,minimum:4,maximum:40,description:g("tree indent setting","Controls tree indentation in pixels.")},[$Z]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:g("render tree indent guides","Controls whether the tree should render indent guides.")},[Vm]:{type:"boolean",default:!1,description:g("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[P2]:{type:"number",default:1,markdownDescription:g("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[O2]:{type:"number",default:5,markdownDescription:g("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[R0e]:{type:"string",enum:["highlight","filter"],enumDescriptions:[g("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),g("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:g("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[UZ]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[g("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),g("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),g("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:g("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:g("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and 'workbench.list.typeNavigationMode' instead.")},[O0e]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[g("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),g("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:g("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[jZ]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:g("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[qZ]:{type:"boolean",default:!0,description:g("sticky scroll","Controls whether sticky scrolling is enabled in trees.")},[GZ]:{type:"number",minimum:1,default:7,markdownDescription:g("sticky scroll maximum items","Controls the number of sticky elements displayed in the tree when `#workbench.tree.enableStickyScroll#` is enabled.")},[P0e]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:g("typeNavigationMode2","Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}})});var oX,p1,z0e,i7=P(()=>{Vi();nt();Ys();(function(i){i[i.PRESERVE=0]="PRESERVE",i[i.LAST=1]="LAST"})(oX||(oX={}));p1={Quickaccess:"workbench.contributions.quickaccess"},z0e=class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((t,n)=>n.prefix.length-t.prefix.length),Yt(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return pl([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(n=>e.startsWith(n.prefix))||void 0||this.defaultProvider}};jn.add(p1.Quickaccess,new z0e)});var snt,n7,lf,F0e,FKi,ol,cf=P(()=>{_i();snt={ctrlCmd:!1,alt:!1};(function(i){i[i.Blur=1]="Blur",i[i.Gesture=2]="Gesture",i[i.Other=3]="Other"})(n7||(n7={}));(function(i){i[i.NONE=0]="NONE",i[i.FIRST=1]="FIRST",i[i.SECOND=2]="SECOND",i[i.LAST=3]="LAST"})(lf||(lf={}));F0e=class{constructor(e){this.options=e}},FKi=new F0e,ol=vi("quickInputService")});var KNt,ant,rX,lnt=P(()=>{Qi();mo();Xt();nt();_i();i7();cf();Ys();KNt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},ant=function(i,e){return function(t,n){e(t,n,i)}},rX=class extends ue{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=jn.as(p1.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,n){var o;let[r,s]=this.getOrInstantiateProvider(e),a=this.visibleQuickAccess,l=a?.descriptor;if(a&&s&&l===s){e!==s.prefix&&!n?.preserveValue&&(a.picker.value=e),this.adjustValueSelection(a.picker,s,n);return}if(s&&!n?.preserveValue){let f;if(a&&l&&l!==s){let p=a.value.substr(l.prefix.length);p&&(f=`${s.prefix}${p}`)}if(!f){let p=r?.defaultFilterValue;p===oX.LAST?f=this.lastAcceptedPickerValues.get(s):typeof p=="string"&&(f=`${s.prefix}${p}`)}typeof f=="string"&&(e=f)}let c=new Ye,d=c.add(this.quickInputService.createQuickPick());d.value=e,this.adjustValueSelection(d,s,n),d.placeholder=s?.placeholder,d.quickNavigate=n?.quickNavigateConfiguration,d.hideInput=!!d.quickNavigate&&!a,(typeof n?.itemActivation=="number"||n?.quickNavigateConfiguration)&&(d.itemActivation=(o=n?.itemActivation)!==null&&o!==void 0?o:lf.SECOND),d.contextKey=s?.contextKey,d.filterValue=f=>f.substring(s?s.prefix.length:0);let u;t&&(u=new Fg,c.add(Et.once(d.onWillAccept)(f=>{f.veto(),d.hide()}))),c.add(this.registerPickerListeners(d,r,s,e,n?.providerOptions));let h=c.add(new Jn);if(r&&c.add(r.provide(d,h.token,n?.providerOptions)),Et.once(d.onDidHide)(()=>{d.selectedItems.length===0&&h.cancel(),c.dispose(),u?.complete(d.selectedItems.slice(0))}),d.show(),t)return u?.p}adjustValueSelection(e,t,n){var o;let r;n?.preserveValue?r=[e.value.length,e.value.length]:r=[(o=t?.prefix.length)!==null&&o!==void 0?o:0,e.value.length],e.valueSelection=r}registerPickerListeners(e,t,n,o,r){let s=new Ye,a=this.visibleQuickAccess={picker:e,descriptor:n,value:o};return s.add(Yt(()=>{a===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),s.add(e.onDidChangeValue(l=>{let[c]=this.getOrInstantiateProvider(l);c!==t?this.show(l,{preserveValue:!0,providerOptions:r}):a.value=l})),n&&s.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(n,e.value)})),s}getOrInstantiateProvider(e){let t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let n=this.mapProviderToDescriptor.get(t);return n||(n=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,n)),[n,t]}};rX=KNt([ant(0,ol),ant(1,qt)],rX)});var IN=P(()=>{});var cnt=P(()=>{});var F2,H0e=P(()=>{Qt();Pv();Gc();F2=class i{constructor(e,t){var n;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=(n=t?.supportIcons)!==null&&n!==void 0?n:!1,this.domNode=ut(e,pt("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],n="",o){e||(e=""),o&&(e=i.escapeNewLines(e,t)),!(this.didEverRender&&this.text===e&&this.title===n&&Za(this.highlights,t))&&(this.text=e,this.title=n,this.highlights=t,this.render())}render(){let e=[],t=0;for(let n of this.highlights){if(n.end===n.start)continue;if(t{o=r===`\r +`?-1:0,s+=n;for(let a of t)a.end<=s||(a.start>=s&&(a.start+=o),a.end>=s&&(a.end+=o));return n+=o,"\u23CE"})}}});function YNt(i,e,t){if(!t)return;let n=0;return i.map(o=>{let r={start:n,end:n+o.length},s=t.map(a=>Ua.intersect(r,a)).filter(a=>!Ua.isEmpty(a)).map(({start:a,end:l})=>({start:a-n,end:l-n}));return n=r.end+e.length,s})}var o7,O4,B0e,V0e,sX=P(()=>{cnt();Qt();H0e();l2e();nt();Gc();XM();o7=class{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}},O4=class extends ue{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new o7(ut(e,pt(".monaco-icon-label")))),this.labelContainer=ut(this.domNode.element,pt(".monaco-icon-label-container")),this.nameContainer=ut(this.labelContainer,pt("span.monaco-icon-name-container")),t?.supportHighlights||t?.supportIcons?this.nameNode=new V0e(this.nameContainer,!!t.supportIcons):this.nameNode=new B0e(this.nameContainer),this.hoverDelegate=t?.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,n){var o;let r=["monaco-icon-label"],s=["monaco-icon-label-container"],a="";if(n&&(n.extraClasses&&r.push(...n.extraClasses),n.italic&&r.push("italic"),n.strikethrough&&r.push("strikethrough"),n.disabledCommand&&s.push("disabled"),n.title&&(typeof n.title=="string"?a+=n.title:a+=e)),this.domNode.className=r.join(" "),this.domNode.element.setAttribute("aria-label",a),this.labelContainer.className=s.join(" "),this.setupHover(n?.descriptionTitle?this.labelContainer:this.element,n?.title),this.nameNode.setLabel(e,n),t||this.descriptionNode){let l=this.getOrCreateDescriptionNode();l instanceof F2?(l.set(t||"",n?n.descriptionMatches:void 0,void 0,n?.labelEscapeNewLines),this.setupHover(l.element,n?.descriptionTitle)):(l.textContent=t&&n?.labelEscapeNewLines?F2.escapeNewLines(t,[]):t||"",this.setupHover(l.element,n?.descriptionTitle||""),l.empty=!t)}if(n?.suffix||this.suffixNode){let l=this.getOrCreateSuffixNode();l.textContent=(o=n?.suffix)!==null&&o!==void 0?o:""}}setupHover(e,t){let n=this.customHovers.get(e);if(n&&(n.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}if(!this.hoverDelegate)Ftt(e,t);else{let o=XY(this.hoverDelegate,e,t);o&&this.customHovers.set(e,o)}}dispose(){super.dispose();for(let e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){let e=this._register(new o7(sGe(this.nameContainer,pt("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new o7(ut(e.element,pt("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){var e;if(!this.descriptionNode){let t=this._register(new o7(ut(this.labelContainer,pt("span.monaco-icon-description-container"))));!((e=this.creationOptions)===null||e===void 0)&&e.supportDescriptionHighlights?this.descriptionNode=new F2(ut(t.element,pt("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new o7(ut(t.element,pt("span.label-description"))))}return this.descriptionNode}},B0e=class{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&Za(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=ut(this.container,pt("a.label-name",{id:t?.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let n=0;n{});var aX,unt,e8,lX=P(()=>{Qt();PY();Gc();dnt();Wt();aX=pt,unt={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0},e8=class i{constructor(e,t,n){this.os=t,this.keyElements=new Set,this.options=n||Object.create(null);let o=this.options.keybindingLabelForeground;this.domNode=ut(e,aX(".monaco-keybinding")),o&&(this.domNode.style.color=o),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&i.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){var e;if(this.clear(),this.keybinding){let t=this.keybinding.getChords();t[0]&&this.renderChord(this.domNode,t[0],this.matches?this.matches.firstPart:null);for(let o=1;oo.length)return 1}return 0}var hnt,vYi,_Yi,pnt=P(()=>{j0();hnt=new bl(()=>{let i=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:i,collatorIsNumeric:i.resolvedOptions().numeric}}),vYi=new bl(()=>({collator:new Intl.Collator(void 0,{numeric:!0})})),_Yi=new bl(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}))});function mnt(i){let e=[],t=0,n;for(;n=JNt.exec(i);){n.index-t>0&&e.push(i.substring(t,n.index));let[,o,r,,s]=n;s?e.push({label:o,href:r,title:s}):e.push({label:o,href:r}),t=n.index+n[0].length}return t{uv();QNt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},cX=class{constructor(e){this.nodes=e}toString(){return this.nodes.map(e=>typeof e=="string"?e:e.label).join("")}};QNt([Tr],cX.prototype,"toString",null);JNt=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi});function tAt(i){if(!i)return;let e,t=i.dark.toString();return W0e[t]?e=W0e[t]:(e=eAt.nextId(),GC(`.${e}, .hc-light .${e}`,`background-image: ${rp(i.light||i.dark)}`),GC(`.vs-dark .${e}, .hc-black .${e}`,`background-image: ${rp(i.dark)}`),W0e[t]=e),e}function MN(i,e,t){let n=i.iconClass||tAt(i.iconPath);return i.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible"),{id:e,label:"",tooltip:i.tooltip||"",class:n,enabled:!0,run:t}}function vnt(i,e,t){ns(e);let n=mnt(i),o=0;for(let r of n.nodes)if(typeof r=="string")e.append(...of(r));else{let s=r.title;!s&&r.href.startsWith("command:")?s=g("executeCommand","Click to execute command '{0}'",r.href.substring(8)):s||(s=r.href);let a=pt("a",{href:r.href,title:s,tabIndex:o++},r.label);a.style.textDecoration="underline";let l=f=>{nGe(f)&&nn.stop(f,!0),t.callback(r.href)},c=t.disposables.add(new _n(a,Lt.CLICK)).event,d=t.disposables.add(new _n(a,Lt.KEY_DOWN)).event,u=Et.chain(d,f=>f.filter(p=>{let m=new qn(p);return m.equals(10)||m.equals(3)}));t.disposables.add(ar.addTarget(a));let h=t.disposables.add(new _n(a,vo.Tap)).event;Et.any(c,h,u)(l,null,t.disposables),e.appendChild(a)}}var W0e,eAt,U0e=P(()=>{Qt();vp();Xt();Gl();dh();Pv();HM();gnt();IN();Wt();W0e={},eAt=new zb("quick-input-button-icon-")});function iAt(i,e){let{text:t,iconOffsets:n}=e;if(!n||n.length===0)return _nt(i,t);let o=q0(t," "),r=t.length-o.length,s=_nt(i,o);if(s)for(let a of s){let l=n[a.start+r]+r;a.start+=l,a.end+=l}return s}function _nt(i,e){let t=e.toLowerCase().indexOf(i.toLowerCase());return t!==-1?[{start:t,end:t+i.length}]:null}function nAt(i,e,t){let n=i.labelHighlights||[],o=e.labelHighlights||[];return n.length&&!o.length?-1:!n.length&&o.length?1:n.length===0&&o.length===0?0:fnt(i.saneSortLabel,e.saneSortLabel,t)}var bnt,Wm,$0e,NN,j0e,$a,SS,q0e,G0e=P(()=>{Qt();Gl();u1();sX();lX();Vi();Qi();pnt();uv();Pi();Xt();Ob();nt();Mn();Ri();IN();Wt();U0e();j0();Io();fp();bnt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Wm=pt,$0e=class{constructor(e,t,n,o,r,s,a){var l,c,d;this._checked=!1,this._hidden=!1,this.hasCheckbox=o,this.index=n,this.fireButtonTriggered=r,this.fireSeparatorButtonTriggered=s,this._onChecked=a,this.onChecked=o?Et.map(Et.filter(this._onChecked.event,u=>u.listElement===this),u=>u.checked):Et.None,e.type==="separator"?this._separator=e:(this.item=e,t&&t.type==="separator"&&!t.buttons&&(this._separator=t),this.saneDescription=this.item.description,this.saneDetail=this.item.detail,this._labelHighlights=(l=this.item.highlights)===null||l===void 0?void 0:l.label,this._descriptionHighlights=(c=this.item.highlights)===null||c===void 0?void 0:c.description,this._detailHighlights=(d=this.item.highlights)===null||d===void 0?void 0:d.detail,this.saneTooltip=this.item.tooltip),this._init=new bl(()=>{var u;let h=(u=e.label)!==null&&u!==void 0?u:"",f=Wx(h).text.trim(),p=e.ariaLabel||[h,this.saneDescription,this.saneDetail].map(m=>itt(m)).filter(m=>!!m).join(", ");return{saneLabel:h,saneSortLabel:f,saneAriaLabel:p}})}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({listElement:this,checked:e}))}get separator(){return this._separator}set separator(e){this._separator=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}},NN=class i{constructor(e,t){this.themeService=e,this.hoverDelegate=t}get templateId(){return i.ID}renderTemplate(e){let t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=ut(e,Wm(".quick-input-list-entry"));let n=ut(t.entry,Wm("label.quick-input-list-label"));t.toDisposeTemplate.push(go(n,Lt.CLICK,c=>{t.checkbox.offsetParent||c.preventDefault()})),t.checkbox=ut(n,Wm("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(go(t.checkbox,Lt.CHANGE,c=>{t.element.checked=t.checkbox.checked}));let o=ut(n,Wm(".quick-input-list-rows")),r=ut(o,Wm(".quick-input-list-row")),s=ut(o,Wm(".quick-input-list-row"));t.label=new O4(r,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.push(t.label),t.icon=ZC(t.label.element,Wm(".quick-input-list-icon"));let a=ut(r,Wm(".quick-input-list-entry-keybinding"));t.keybinding=new e8(a,Xa);let l=ut(s,Wm(".quick-input-list-label-meta"));return t.detail=new O4(l,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.push(t.detail),t.separator=ut(t.entry,Wm(".quick-input-list-separator")),t.actionBar=new Bs(t.entry,this.hoverDelegate?{hoverDelegate:this.hoverDelegate}:void 0),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,n){var o,r,s,a;n.element=e,e.element=(o=n.entry)!==null&&o!==void 0?o:void 0;let l=e.item?e.item:e.separator;n.checkbox.checked=e.checked,n.toDisposeElement.push(e.onChecked(p=>n.checkbox.checked=p));let{labelHighlights:c,descriptionHighlights:d,detailHighlights:u}=e;if(!((r=e.item)===null||r===void 0)&&r.iconPath){let p=a2(this.themeService.getColorTheme().type)?e.item.iconPath.dark:(s=e.item.iconPath.light)!==null&&s!==void 0?s:e.item.iconPath.dark,m=li.revive(p);n.icon.className="quick-input-list-icon",n.icon.style.backgroundImage=rp(m)}else n.icon.style.backgroundImage="",n.icon.className=!((a=e.item)===null||a===void 0)&&a.iconClass?`quick-input-list-icon ${e.item.iconClass}`:"";let h={matches:c||[],descriptionTitle:e.saneTooltip?void 0:e.saneDescription,descriptionMatches:d||[],labelEscapeNewLines:!0};l.type!=="separator"?(h.extraClasses=l.iconClasses,h.italic=l.italic,h.strikethrough=l.strikethrough,n.entry.classList.remove("quick-input-list-separator-as-item")):n.entry.classList.add("quick-input-list-separator-as-item"),n.label.setLabel(e.saneLabel,e.saneDescription,h),n.keybinding.set(l.type==="separator"?void 0:l.keybinding),e.saneDetail?(n.detail.element.style.display="",n.detail.setLabel(e.saneDetail,void 0,{matches:u,title:e.saneTooltip?void 0:e.saneDetail,labelEscapeNewLines:!0})):n.detail.element.style.display="none",e.item&&e.separator&&e.separator.label?(n.separator.textContent=e.separator.label,n.separator.style.display=""):n.separator.style.display="none",n.entry.classList.toggle("quick-input-list-separator-border",!!e.separator);let f=l.buttons;f&&f.length?(n.actionBar.push(f.map((p,m)=>MN(p,`id-${m}`,()=>l.type!=="separator"?e.fireButtonTriggered({button:p,item:l}):e.fireSeparatorButtonTriggered({button:p,separator:l}))),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions")}disposeElement(e,t,n){n.toDisposeElement=Nn(n.toDisposeElement),n.actionBar.clear()}disposeTemplate(e){e.toDisposeElement=Nn(e.toDisposeElement),e.toDisposeTemplate=Nn(e.toDisposeTemplate)}};NN.ID="listelement";j0e=class{getHeight(e){return e.item?e.saneDetail?44:22:24}getTemplateId(e){return NN.ID}};(function(i){i[i.First=1]="First",i[i.Second=2]="Second",i[i.Last=3]="Last",i[i.Next=4]="Next",i[i.Previous=5]="Previous",i[i.NextPage=6]="NextPage",i[i.PreviousPage=7]="PreviousPage"})($a||($a={}));SS=class{constructor(e,t,n,o){this.parent=e,this.options=n,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.sortByLabel=!0,this._onChangedAllVisibleChecked=new ge,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new ge,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new ge,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new ge,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new ge,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new ge,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._onKeyDown=new ge,this.onKeyDown=this._onKeyDown.event,this._onLeave=new ge,this.onLeave=this._onLeave.event,this._listElementChecked=new ge,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=ut(this.parent,Wm(".quick-input-list"));let r=new j0e,s=new q0e;this.list=n.createList("QuickInput",this.container,r,[new NN(o,n.hoverDelegate)],{identityProvider:{getId:l=>{var c,d,u,h,f,p,m,y;return(y=(p=(h=(d=(c=l.item)===null||c===void 0?void 0:c.id)!==null&&d!==void 0?d:(u=l.item)===null||u===void 0?void 0:u.label)!==null&&h!==void 0?h:(f=l.separator)===null||f===void 0?void 0:f.id)!==null&&p!==void 0?p:(m=l.separator)===null||m===void 0?void 0:m.label)!==null&&y!==void 0?y:""}},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:s}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(l=>{let c=new qn(l);switch(c.keyCode){case 10:this.toggleCheckbox();break;case 31:(Wi?l.metaKey:l.ctrlKey)&&this.list.setFocus(Ya(this.list.length));break;case 16:{let d=this.list.getFocus();d.length===1&&d[0]===0&&this._onLeave.fire();break}case 18:{let d=this.list.getFocus();d.length===1&&d[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(c)})),this.disposables.push(this.list.onMouseDown(l=>{l.browserEvent.button!==2&&l.browserEvent.preventDefault()})),this.disposables.push(Xe(this.container,Lt.CLICK,l=>{(l.x||l.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(l=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(l=>{typeof l.index=="number"&&(l.browserEvent.preventDefault(),this.list.setSelection([l.index]))}));let a=new UC(n.hoverDelegate.delay);this.disposables.push(this.list.onMouseOver(async l=>{var c;if(l.browserEvent.target instanceof HTMLAnchorElement){a.cancel();return}if(!(!(l.browserEvent.relatedTarget instanceof HTMLAnchorElement)&&ms(l.browserEvent.relatedTarget,(c=l.element)===null||c===void 0?void 0:c.element)))try{await a.trigger(async()=>{l.element&&this.showHover(l.element)})}catch(d){if(!jl(d))throw d}})),this.disposables.push(this.list.onMouseOut(l=>{var c;ms(l.browserEvent.relatedTarget,(c=l.element)===null||c===void 0?void 0:c.element)||a.cancel()})),this.disposables.push(a),this.disposables.push(this._listElementChecked.event(l=>this.fireCheckedEvents())),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return Et.map(this.list.onDidChangeFocus,e=>e.elements.map(t=>t.item))}get onDidChangeSelection(){return Et.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(t=>t.item),event:e.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}get ariaLabel(){return this.list.getHTMLElement().ariaLabel}set ariaLabel(e){this.list.getHTMLElement().ariaLabel=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let n=0,o=e.length;n{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=Nn(this.elementDisposables);let t=s=>this.fireButtonTriggered(s),n=s=>this.fireSeparatorButtonTriggered(s);this.inputElements=e;let o=new Map,r=this.parent.classList.contains("show-checkboxes");this.elements=e.reduce((s,a,l)=>{var c;let d=l>0?e[l-1]:void 0;if(a.type==="separator"&&!a.buttons)return s;let u=new $0e(a,d,l,r,t,n,this._listElementChecked),h=s.length;return s.push(u),o.set((c=u.item)!==null&&c!==void 0?c:u.separator,h),s},[]),this.elementsToIndexes=o,this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(e=>e.item)}setFocusedElements(e){if(this.list.setFocus(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t))),e.length>0){let t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item).filter(e=>!!e)}setCheckedElements(e){try{this._fireCheckedEvents=!1;let t=new Set;for(let n of e)t.add(n);for(let n of this.elements)n.checked=t.has(n.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===$a.Second&&this.list.length<2&&(e=$a.First),e){case $a.First:this.list.scrollTop=0,this.list.focusFirst(void 0,n=>!!n.item);break;case $a.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,n=>!!n.item);break;case $a.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,n=>!!n.item);break;case $a.Next:{this.list.focusNext(void 0,!0,void 0,o=>!!o.item);let n=this.list.getFocus()[0];n!==0&&!this.elements[n-1].item&&this.list.firstVisibleIndex>n-1&&this.list.reveal(n-1);break}case $a.Previous:{this.list.focusPrevious(void 0,!0,void 0,o=>!!o.item);let n=this.list.getFocus()[0];n!==0&&!this.elements[n-1].item&&this.list.firstVisibleIndex>n-1&&this.list.reveal(n-1);break}case $a.NextPage:this.list.focusNextPage(void 0,n=>!!n.item);break;case $a.PreviousPage:this.list.focusPreviousPage(void 0,n=>!!n.item);break}let t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}showHover(e){var t,n,o;this._lastHover&&!this._lastHover.isDisposed&&((n=(t=this.options.hoverDelegate).onDidHideHover)===null||n===void 0||n.call(t),(o=this._lastHover)===null||o===void 0||o.dispose()),!(!e.element||!e.saneTooltip)&&(this._lastHover=this.options.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:r=>{this.options.linkOpenerDelegate(r)},appearance:{showPointer:!0},container:this.container,position:{hoverPosition:1}},!1))}layout(e){this.list.getHTMLElement().style.maxHeight=e?`${Math.floor(e/44)*44+6}px`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;let t=e;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(o=>{o.labelHighlights=void 0,o.descriptionHighlights=void 0,o.detailHighlights=void 0,o.hidden=!1;let r=o.index&&this.inputElements[o.index-1];o.item&&(o.separator=r&&r.type==="separator"&&!r.buttons?r:void 0)});else{let o;this.elements.forEach(r=>{var s,a,l,c;let d;this.matchOnLabelMode==="fuzzy"?d=this.matchOnLabel&&(s=wY(e,Wx(r.saneLabel)))!==null&&s!==void 0?s:void 0:d=this.matchOnLabel&&(a=iAt(t,Wx(r.saneLabel)))!==null&&a!==void 0?a:void 0;let u=this.matchOnDescription&&(l=wY(e,Wx(r.saneDescription||"")))!==null&&l!==void 0?l:void 0,h=this.matchOnDetail&&(c=wY(e,Wx(r.saneDetail||"")))!==null&&c!==void 0?c:void 0;if(d||u||h?(r.labelHighlights=d,r.descriptionHighlights=u,r.detailHighlights=h,r.hidden=!1):(r.labelHighlights=void 0,r.descriptionHighlights=void 0,r.detailHighlights=void 0,r.hidden=r.item?!r.item.alwaysShow:!0),r.item?r.separator=void 0:r.separator&&(r.hidden=!0),!this.sortByLabel){let f=r.index&&this.inputElements[r.index-1];o=f&&f.type==="separator"?f:o,o&&!r.hidden&&(r.separator=o,o=void 0)}})}let n=this.elements.filter(o=>!o.hidden);if(this.sortByLabel&&e){let o=e.toLowerCase();n.sort((r,s)=>nAt(r,s,o))}return this.elementsToIndexes=n.reduce((o,r,s)=>{var a;return o.set((a=r.item)!==null&&a!==void 0?a:r.separator,s),o},new Map),this.list.splice(0,this.list.length,n),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(n.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;let e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(let n of e)n.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=Nn(this.elementDisposables),this.disposables=Nn(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}fireSeparatorButtonTriggered(e){this._onSeparatorButtonTriggered.fire(e)}style(e){this.list.style(e)}toggleHover(){let e=this.list.getFocusedElements()[0];if(!e?.saneTooltip)return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}let t=this.list.getFocusedElements()[0];if(!t)return;this.showHover(t);let n=new Ye;n.add(this.list.onDidChangeFocus(o=>{o.indexes.length&&this.showHover(o.elements[0])})),this._lastHover&&n.add(this._lastHover),this._toggleHover=n,this.elementDisposables.push(this._toggleHover)}};bnt([Tr],SS.prototype,"onDidChangeFocus",null);bnt([Tr],SS.prototype,"onDidChangeSelection",null);q0e=class{getWidgetAriaLabel(){return g("quickInput","Quick Input")}getAriaLabel(e){var t;return!((t=e.separator)===null||t===void 0)&&t.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(e.hasCheckbox)return{value:e.checked,onDidChange:e.onChecked}}}});var dX,AN,kS,uX,hX,K0e=P(()=>{Qt();Gl();mS();Vi();Qi();Go();Xt();nt();Mn();C4();or();IN();Wt();cf();G0e();U0e();dX={iconClass:ui.asClassName(kt.quickInputBack),tooltip:g("quickInput.back","Back"),handle:-1},AN=class i extends ue{constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=i.noPromptMessage,this._severity=lr.Ignore,this.onDidTriggerButtonEmitter=this._register(new ge),this.onDidHideEmitter=this._register(new ge),this.onDisposeEmitter=this._register(new ge),this.visibleDisposables=this._register(new Ye),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){let t=this._ignoreFocusOut!==e&&!Lc;this._ignoreFocusOut=e&&!Lc,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=e??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=n7.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){var e,t;if(!this.visible)return;let n=this.getTitle();n&&this.ui.title.textContent!==n?this.ui.title.textContent=n:!n&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\xA0");let o=this.getDescription();if(this.ui.description1.textContent!==o&&(this.ui.description1.textContent=o),this.ui.description2.textContent!==o&&(this.ui.description2.textContent=o),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?ns(this.ui.widget,this._widget):ns(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new Zs,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();let s=this.buttons.filter(l=>l===dX).map((l,c)=>MN(l,`id-${c}`,async()=>this.onDidTriggerButtonEmitter.fire(l)));this.ui.leftActionBar.push(s,{icon:!0,label:!1}),this.ui.rightActionBar.clear();let a=this.buttons.filter(l=>l!==dX).map((l,c)=>MN(l,`id-${c}`,async()=>this.onDidTriggerButtonEmitter.fire(l)));this.ui.rightActionBar.push(a,{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;let s=(t=(e=this.toggles)===null||e===void 0?void 0:e.filter(a=>a instanceof h1))!==null&&t!==void 0?t:[];this.ui.inputBox.toggles=s}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);let r=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==r&&(this._lastValidationMessage=r,ns(this.ui.message),vnt(r,this.ui.message,{callback:s=>{this.ui.linkOpenerDelegate(s)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?g("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==lr.Ignore){let t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}};AN.noPromptMessage=g("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");kS=class i extends AN{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new ge),this.onWillAcceptEmitter=this._register(new ge),this.onDidAcceptEmitter=this._register(new ge),this.onDidCustomEmitter=this._register(new ge),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._keepScrollPosition=!1,this._itemActivation=lf.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new ge),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new ge),this.onDidTriggerItemButtonEmitter=this._register(new ge),this.onDidTriggerSeparatorButtonEmitter=this._register(new ge),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?snt:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.canSelectMany||this.ui.list.focus($a.First)}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{this.doSetValue(e,!0)})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(e=>{switch(e.keyCode){case 18:this.ui.list.focus($a.Next),this.canSelectMany&&this.ui.list.domFocus(),nn.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus($a.Previous):this.ui.list.focus($a.Last),this.canSelectMany&&this.ui.list.domFocus(),nn.stop(e,!0);break;case 12:this.ui.list.focus($a.NextPage),this.canSelectMany&&this.ui.list.domFocus(),nn.stop(e,!0);break;case 11:this.ui.list.focus($a.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),nn.stop(e,!0);break;case 17:if(!this._canAcceptInBackground||!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus($a.First),nn.stop(e,!0));break;case 13:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus($a.Last),nn.stop(e,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&uo(e,this._activeItems,(t,n)=>t===n)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&uo(e,this._selectedItems,(n,o)=>n===o)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(KC(t)&&t.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&uo(e,this._selectedItems,(t,n)=>t===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(e=>this.onDidTriggerSeparatorButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return Xe(this.ui.container,Lt.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;let t=new qn(e),n=t.keyCode;this._quickNavigate.keybindings.some(s=>{let a=s.getChords();return a.length>1?!1:a[0].shiftKey&&n===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(a[0].altKey&&n===6||a[0].ctrlKey&&n===5||a[0].metaKey&&n===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;let e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,n={title:!!this.title||!!this.step||!!this.buttons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(n),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let o=this.ariaLabel;if(!o&&n.inputBox&&(o=this.placeholder||i.DEFAULT_ARIA_LABEL,this.title&&(o+=` - ${this.title}`)),this.ui.list.ariaLabel!==o&&(this.ui.list.ariaLabel=o??null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case lf.NONE:this._itemActivation=lf.FIRST;break;case lf.SECOND:this.ui.list.focus($a.Second),this._itemActivation=lf.FIRST;break;case lf.LAST:this.ui.list.focus($a.Last),this._itemActivation=lf.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",n.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus($a.First)),this.keepScrollPosition&&(this.scrollTop=e)}};kS.DEFAULT_ARIA_LABEL=g("quickInputBox.ariaLabel","Type to narrow down results.");uX=class extends AN{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new ge),this.onDidAcceptEmitter=this._register(new ge),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");let e={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}},hX=class{get delay(){return Date.now()-this.lastHoverHideTime<200?0:this.configurationService.getValue("workbench.hover.delay")}constructor(e,t){this.configurationService=e,this.hoverService=t,this.lastHoverHideTime=0,this.placement="element"}showHover(e,t){var n;let o=(e.content instanceof HTMLElement?(n=e.content.textContent)!==null&&n!==void 0?n:"":typeof e.content=="string"?e.content:e.content.value).length>20;return this.hoverService.showHover({...e,persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:o,skipFadeInAnimation:!0}},t)}onDidHideHover(){this.lastHoverHideTime=Date.now()}}});var ynt=P(()=>{});var DZi,z4,fX=P(()=>{Qt();YU();Gl();VM();dh();Pv();sa();Xt();Md();nt();or();ynt();DZi={buttonBackground:"#0E639C",buttonHoverBackground:"#006BB3",buttonSeparator:it.white.toString(),buttonForeground:it.white.toString(),buttonBorder:void 0,buttonSecondaryBackground:void 0,buttonSecondaryForeground:void 0,buttonSecondaryHoverBackground:void 0},z4=class extends ue{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new ge),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);let n=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,o=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=o||"",this._element.style.backgroundColor=n||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),typeof t.ariaLabel=="string"&&this._element.setAttribute("aria-label",t.ariaLabel),e.appendChild(this._element),this._register(ar.addTarget(this._element)),[Lt.CLICK,vo.Tap].forEach(r=>{this._register(Xe(this._element,r,s=>{if(!this.enabled){nn.stop(s);return}this._onDidClick.fire(s)}))}),this._register(Xe(this._element,Lt.KEY_DOWN,r=>{let s=new qn(r),a=!1;this.enabled&&(s.equals(3)||s.equals(10))?(this._onDidClick.fire(r),a=!0):s.equals(9)&&(this._element.blur(),a=!0),a&&nn.stop(s,!0)})),this._register(Xe(this._element,Lt.MOUSE_OVER,r=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register(Xe(this._element,Lt.MOUSE_OUT,r=>{this.updateBackground(!1)})),this.focusTracker=this._register(Kl(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){let t=[];for(let n of of(e))if(typeof n=="string"){if(n=n.trim(),n==="")continue;let o=document.createElement("span");o.textContent=n,t.push(o)}else t.push(n);return t}updateBackground(e){let t;this.options.secondary?t=e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:t=e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){var t;if(this._label===e||sf(this._label)&&sf(e)&&ntt(this._label,e))return;this._element.classList.add("monaco-text-button");let n=this.options.supportShortLabel?this._labelElement:this._element;if(sf(e)){let o=Vv(e,{inline:!0});o.dispose();let r=(t=o.element.querySelector("p"))===null||t===void 0?void 0:t.innerHTML;if(r){let s=GU(r,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});n.innerHTML=s}else ns(n)}else this.options.supportIcons?ns(n,...this.getContentElements(e)):n.textContent=e;typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=ltt(e)),typeof this.options.ariaLabel=="string"?this._element.setAttribute("aria-label",this.options.ariaLabel):this.options.ariaLabel&&this._element.setAttribute("aria-label",this._element.title),this._label=e}get label(){return this._label}set icon(e){this._element.classList.add(...ui.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}});var Cnt=P(()=>{});var r7,Y0e=P(()=>{Qt();Ri();Cnt();r7=class{constructor(e,t,n){this.options=t,this.styles=n,this.count=0,this.element=ut(e,pt(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){var e,t;this.element.textContent=zf(this.countFormat,this.count),this.element.title=zf(this.titleFormat,this.count),this.element.style.backgroundColor=(e=this.styles.badgeBackground)!==null&&e!==void 0?e:"",this.element.style.color=(t=this.styles.badgeForeground)!==null&&t!==void 0?t:"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}});var wnt=P(()=>{});var xnt,Snt,Z0e,X0e,knt,RN,Lnt=P(()=>{Qt();Qi();nt();wnt();xnt="done",Snt="active",Z0e="infinite",X0e="infinite-long-running",knt="discrete",RN=class i extends ue{constructor(e,t){super(),this.workedVal=0,this.showDelayedScheduler=this._register(new hn(()=>el(this.element),0)),this.longRunningScheduler=this._register(new hn(()=>this.infiniteLongRunning(),i.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=t?.progressBarBackground||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(Snt,Z0e,X0e,knt),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(xnt),this.element.classList.contains(Z0e)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(knt,xnt,X0e),this.element.classList.add(Snt,Z0e),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(X0e)}getContainer(){return this.element}};RN.LONG_RUNNING_INFINITE_THRESHOLD=1e4});var oAt,pX,Ent=P(()=>{Qt();EZ();nt();C4();IN();oAt=pt,pX=class extends ue{constructor(e,t,n){super(),this.parent=e,this.onKeyDown=r=>go(this.findInput.inputBox.inputElement,Lt.KEY_DOWN,r),this.onDidChange=r=>this.findInput.onDidChange(r),this.container=ut(this.parent,oAt(".quick-input-box")),this.findInput=this._register(new Zb(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:n}));let o=this.findInput.inputBox.inputElement;o.role="combobox",o.ariaHasPopup="menu",o.ariaAutoComplete="list",o.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}showDecoration(e){e===lr.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===lr.Info?1:e===lr.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===lr.Info?1:e===lr.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}});var vh,PN,Dnt=P(()=>{Qt();u1();fX();Y0e();Lnt();mo();Xt();nt();C4();Wt();cf();Ent();G0e();K0e();_l();vh=pt,PN=class i extends ue{constructor(e,t,n){super(),this.options=e,this.themeService=t,this.layoutService=n,this.enabled=!0,this.onDidAcceptEmitter=this._register(new ge),this.onDidCustomEmitter=this._register(new ge),this.onDidTriggerButtonEmitter=this._register(new ge),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new ge),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new ge),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this._register(Et.runAndSubscribe(x5,({window:o,disposables:r})=>this.registerKeyModsListeners(o,r),{window:Hn,disposables:this._store})),this._register(Gqe(o=>{this.ui&&pi(this.ui.container)===o&&this.reparentUI(this.layoutService.mainContainer)}))}registerKeyModsListeners(e,t){let n=o=>{this.keyMods.ctrlCmd=o.ctrlKey||o.metaKey,this.keyMods.alt=o.altKey};for(let o of[Lt.KEY_DOWN,Lt.KEY_UP,Lt.MOUSE_DOWN])t.add(Xe(e,o,n,!0))}getUI(e){if(this.ui)return e&&this.parentElement.ownerDocument!==this.layoutService.activeContainer.ownerDocument&&this.reparentUI(this.layoutService.activeContainer),this.ui;let t=ut(this.parentElement,vh(".quick-input-widget.show-file-icons"));t.tabIndex=-1,t.style.display="none";let n=ya(t),o=ut(t,vh(".quick-input-titlebar")),r=this._register(new Bs(o,{hoverDelegate:this.options.hoverDelegate}));r.domNode.classList.add("quick-input-left-action-bar");let s=ut(o,vh(".quick-input-title")),a=this._register(new Bs(o,{hoverDelegate:this.options.hoverDelegate}));a.domNode.classList.add("quick-input-right-action-bar");let l=ut(t,vh(".quick-input-header")),c=ut(l,vh("input.quick-input-check-all"));c.type="checkbox",c.setAttribute("aria-label",g("quickInput.checkAll","Toggle all checkboxes")),this._register(go(c,Lt.CHANGE,L=>{let I=c.checked;A.setAllVisibleChecked(I)})),this._register(Xe(c,Lt.CLICK,L=>{(L.x||L.y)&&f.setFocus()}));let d=ut(l,vh(".quick-input-description")),u=ut(l,vh(".quick-input-and-message")),h=ut(u,vh(".quick-input-filter")),f=this._register(new pX(h,this.styles.inputBox,this.styles.toggle));f.setAttribute("aria-describedby",`${this.idPrefix}message`);let p=ut(h,vh(".quick-input-visible-count"));p.setAttribute("aria-live","polite"),p.setAttribute("aria-atomic","true");let m=new r7(p,{countFormat:g({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")},this.styles.countBadge),y=ut(h,vh(".quick-input-count"));y.setAttribute("aria-live","polite");let _=new r7(y,{countFormat:g({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")},this.styles.countBadge),v=ut(l,vh(".quick-input-action")),b=this._register(new z4(v,this.styles.button));b.label=g("ok","OK"),this._register(b.onDidClick(L=>{this.onDidAcceptEmitter.fire()}));let C=ut(l,vh(".quick-input-action")),w=this._register(new z4(C,{...this.styles.button,supportIcons:!0}));w.label=g("custom","Custom"),this._register(w.onDidClick(L=>{this.onDidCustomEmitter.fire()}));let S=ut(u,vh(`#${this.idPrefix}message.quick-input-message`)),x=this._register(new RN(t,this.styles.progressBar));x.getContainer().classList.add("quick-input-progress");let k=ut(t,vh(".quick-input-html-widget"));k.tabIndex=-1;let D=ut(t,vh(".quick-input-description")),E=this.idPrefix+"list",A=this._register(new SS(t,E,this.options,this.themeService));f.setAttribute("aria-controls",E),this._register(A.onDidChangeFocus(()=>{var L;f.setAttribute("aria-activedescendant",(L=A.getActiveDescendant())!==null&&L!==void 0?L:"")})),this._register(A.onChangedAllVisibleChecked(L=>{c.checked=L})),this._register(A.onChangedVisibleCount(L=>{m.setCount(L)})),this._register(A.onChangedCheckedCount(L=>{_.setCount(L)})),this._register(A.onLeave(()=>{setTimeout(()=>{f.setFocus(),this.controller instanceof kS&&this.controller.canSelectMany&&A.clearFocus()},0)}));let T=Kl(t);return this._register(T),this._register(Xe(t,Lt.FOCUS,L=>{ms(L.relatedTarget,t)||(this.previousFocusElement=L.relatedTarget instanceof HTMLElement?L.relatedTarget:void 0)},!0)),this._register(T.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(n7.Blur),this.previousFocusElement=void 0})),this._register(Xe(t,Lt.FOCUS,L=>{f.setFocus()})),this._register(go(t,Lt.KEY_DOWN,L=>{if(!ms(L.target,k))switch(L.keyCode){case 3:nn.stop(L,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:nn.stop(L,!0),this.hide(n7.Gesture);break;case 2:if(!L.altKey&&!L.ctrlKey&&!L.metaKey){let I=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(t.classList.contains("show-checkboxes")?I.push("input"):I.push("input[type=text]"),this.getUI().list.isDisplayed()&&I.push(".monaco-list"),this.getUI().message&&I.push(".quick-input-message a"),this.getUI().widget){if(ms(L.target,this.getUI().widget))break;I.push(".quick-input-html-widget")}let M=t.querySelectorAll(I.join(", "));L.shiftKey&&L.target===M[0]?(nn.stop(L,!0),A.clearFocus()):!L.shiftKey&&ms(L.target,M[M.length-1])&&(nn.stop(L,!0),M[0].focus())}break;case 10:L.ctrlKey&&(nn.stop(L,!0),this.getUI().list.toggleHover());break}})),this.ui={container:t,styleSheet:n,leftActionBar:r,titleBar:o,title:s,description1:D,description2:d,widget:k,rightActionBar:a,checkAll:c,inputContainer:u,filterContainer:h,inputBox:f,visibleCountContainer:p,visibleCount:m,countContainer:y,count:_,okContainer:v,ok:b,message:S,customButtonContainer:C,customButton:w,list:A,progressBar:x,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:L=>this.show(L),hide:()=>this.hide(),setVisibilities:L=>this.setVisibilities(L),setEnabled:L=>this.setEnabled(L),setContextKey:L=>this.options.setContextKey(L),linkOpenerDelegate:L=>this.options.linkOpenerDelegate(L)},this.updateStyles(),this.ui}reparentUI(e){this.ui&&(this.parentElement=e,ut(this.parentElement,this.ui.container))}pick(e,t={},n=Fi.None){return new Promise((o,r)=>{let s=d=>{var u;s=o,(u=t.onKeyMods)===null||u===void 0||u.call(t,a.keyMods),o(d)};if(n.isCancellationRequested){s(void 0);return}let a=this.createQuickPick(),l,c=[a,a.onDidAccept(()=>{if(a.canSelectMany)s(a.selectedItems.slice()),a.hide();else{let d=a.activeItems[0];d&&(s(d),a.hide())}}),a.onDidChangeActive(d=>{let u=d[0];u&&t.onDidFocus&&t.onDidFocus(u)}),a.onDidChangeSelection(d=>{if(!a.canSelectMany){let u=d[0];u&&(s(u),a.hide())}}),a.onDidTriggerItemButton(d=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton({...d,removeItem:()=>{let u=a.items.indexOf(d.item);if(u!==-1){let h=a.items.slice(),f=h.splice(u,1),p=a.activeItems.filter(y=>y!==f[0]),m=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=h,p&&(a.activeItems=p),a.keepScrollPosition=m}}})),a.onDidTriggerSeparatorButton(d=>{var u;return(u=t.onDidTriggerSeparatorButton)===null||u===void 0?void 0:u.call(t,d)}),a.onDidChangeValue(d=>{l&&!d&&(a.activeItems.length!==1||a.activeItems[0]!==l)&&(a.activeItems=[l])}),n.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{Nn(c),s(void 0)})];a.title=t.title,a.canSelectMany=!!t.canPickMany,a.placeholder=t.placeHolder,a.ignoreFocusOut=!!t.ignoreFocusLost,a.matchOnDescription=!!t.matchOnDescription,a.matchOnDetail=!!t.matchOnDetail,a.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,a.quickNavigate=t.quickNavigate,a.hideInput=!!t.hideInput,a.contextKey=t.contextKey,a.busy=!0,Promise.all([e,t.activeItem]).then(([d,u])=>{l=u,a.busy=!1,a.items=d,a.canSelectMany&&(a.selectedItems=d.filter(h=>h.type!=="separator"&&h.picked)),l&&(a.activeItems=[l])}),a.show(),Promise.resolve(e).then(void 0,d=>{r(d),a.hide()})})}createQuickPick(){let e=this.getUI(!0);return new kS(e)}createInputBox(){let e=this.getUI(!0);return new uX(e)}show(e){let t=this.getUI(!0);this.onShowEmitter.fire();let n=this.controller;this.controller=e,n?.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",ns(t.widget),t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(lr.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),ns(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;let o=this.options.backKeybindingLabel();dX.tooltip=o?g("quickInput.backWithKeybinding","Back ({0})",o):g("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}isVisible(){return!!this.ui&&this.ui.container.style.display!=="none"}setVisibilities(e){let t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",t.checkAll.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(let t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(let t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t,n;let o=this.controller;if(!o)return;let r=(t=this.ui)===null||t===void 0?void 0:t.container,s=r&&!o$(r);if(this.controller=null,this.onHideEmitter.fire(),r&&(r.style.display="none"),!s){let a=this.previousFocusElement;for(;a&&!a.offsetParent;)a=(n=a.parentElement)!==null&&n!==void 0?n:void 0;a?.offsetParent?(a.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}o.didHide(e)}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isVisible()){this.ui.container.style.top=`${this.titleBarOffset}px`;let e=this.ui.container.style,t=Math.min(this.dimension.width*.62,i.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){let{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:n,widgetBorder:o,widgetShadow:r}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e??"",this.ui.container.style.backgroundColor=t??"",this.ui.container.style.color=n??"",this.ui.container.style.border=o?`1px solid ${o}`:"",this.ui.container.style.boxShadow=r?`0 0 8px 2px ${r}`:"",this.ui.list.style(this.styles.list);let s=[];this.styles.pickerGroup.pickerGroupBorder&&s.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(s.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&s.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&s.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&s.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&s.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&s.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),s.push("}"));let a=s.join(` +`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}};PN.MAX_WIDTH=600});var rAt,LS,mX,Tnt=P(()=>{mo();Xt();Xi();_i();Av();TN();sd();lnt();N4();pr();No();K0e();Dnt();er();hY();rAt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},LS=function(i,e){return function(t,n){e(t,n,i)}},mX=class extends Qj{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(rX))),this._quickAccess}constructor(e,t,n,o,r,s){super(n),this.instantiationService=e,this.contextKeyService=t,this.layoutService=o,this.configurationService=r,this.hoverService=s,this._onShow=this._register(new ge),this._onHide=this._register(new ge),this.contexts=new Map}createController(e=this.layoutService,t){let n={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:r=>this.setContextKey(r),linkOpenerDelegate:r=>{this.instantiationService.invokeFunction(s=>{s.get(Xr).open(r,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>e.focus(),createList:(r,s,a,l,c)=>this.instantiationService.createInstance(KZ,r,s,a,l,c),styles:this.computeStyles(),hoverDelegate:new hX(this.configurationService,this.hoverService)},o=this._register(new PN({...n,...t},this.themeService,this.layoutService));return o.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer(r=>o.layout(r,e.activeContainerOffset.quickPickTop))),this._register(e.onDidChangeActiveContainer(()=>{o.isVisible()||o.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop)})),this._register(o.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(o.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),o}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new Bt(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t?.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},n=Fi.None){return this.controller.pick(e,t,n)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:ai(o1e),quickInputForeground:ai(LYe),quickInputTitleBackground:ai(EYe),widgetBorder:ai(Vw),widgetShadow:ai(Zh)},inputBox:aS,toggle:sS,countBadge:dZ,button:ait,progressBar:lit,keybindingLabel:sit,list:M4({listBackground:o1e,listFocusBackground:s2,listFocusForeground:r2,listInactiveFocusForeground:r2,listInactiveSelectionIconForeground:u4,listInactiveFocusBackground:s2,listFocusOutline:Uo,listInactiveFocusOutline:Uo}),pickerGroup:{pickerGroupBorder:ai(DYe),pickerGroupForeground:ai(Cj)}}}};mX=rAt([LS(0,qt),LS(1,ri),LS(2,Mo),LS(3,nf),LS(4,Ni),LS(5,Fx)],mX)});var Int,t8,Q0e,gX,ES,vX,Mnt=P(()=>{Lit();Xt();an();No();mo();_i();Xi();Qme();fs();Tnt();k3();er();hY();Int=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},t8=function(i,e){return function(t,n){e(t,n,i)}},Q0e=class extends mX{constructor(e,t,n,o,r,s,a){super(t,n,o,new GK(e.getContainerDomNode(),r),s,a),this.host=void 0;let l=ES.get(e);if(l){let c=l.widget;this.host={_serviceBrand:void 0,get mainContainer(){return c.getDomNode()},getContainer(){return c.getDomNode()},get containers(){return[c.getDomNode()]},get activeContainer(){return c.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return Et.map(e.onDidLayoutChange,d=>({container:c.getDomNode(),dimension:d}))},get onDidChangeActiveContainer(){return Et.None},get onDidAddContainer(){return Et.None},get whenActiveContainerStylesLoaded(){return Promise.resolve()},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};Q0e=Int([t8(1,qt),t8(2,ri),t8(3,Mo),t8(4,tn),t8(5,Ni),t8(6,Fx)],Q0e);gX=class{get activeService(){let e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){let n=t=this.instantiationService.createInstance(Q0e,e);this.mapEditorToService.set(e,t),Gu(e.onDidDispose)(()=>{n.dispose(),this.mapEditorToService.delete(e)})}return t}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t={},n=Fi.None){return this.activeService.pick(e,t,n)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};gX=Int([t8(0,qt),t8(1,tn)],gX);ES=class i{static get(e){return e.getContribution(i.ID)}constructor(e){this.editor=e,this.widget=new vX(this.editor)}dispose(){this.widget.dispose()}};ES.ID="editor.controller.quickInput";vX=class i{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return i.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}};vX.ID="editor.contrib.quickInputWidget";Ii(ES.ID,ES,4)});function sAt(i){if(!i||!Array.isArray(i))return[];let e=[],t=0;for(let n=0,o=i.length;n{let h=uAt(d.token,u.token);return h!==0?h:d.index-u.index});let t=0,n="000000",o="ffffff";for(;i.length>=1&&i[0].token==="";){let d=i.shift();d.fontStyle!==-1&&(t=d.fontStyle),d.foreground!==null&&(n=d.foreground),d.background!==null&&(o=d.background)}let r=new e4e;for(let d of e)r.getId(d);let s=r.getId(n),a=r.getId(o),l=new t4e(t,s,a),c=new i4e(l);for(let d=0,u=i.length;de?1:0}function Nnt(i){let e=[];for(let t=1,n=i.length;t{sa();J0e=class{constructor(e,t,n,o,r){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=n,this.foreground=o,this.background=r}};lAt=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/,e4e=class{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(e===null)return 0;let t=e.match(lAt);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let n=this._color2id.get(e);return n||(n=++this._lastColorId,this._color2id.set(e,n),this._id2color[n]=it.fromHex("#"+e),n)}getColorMap(){return this._id2color.slice(0)}},ON=class{static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(sAt(e),t)}static createFromParsedTokenTheme(e,t){return aAt(e,t)}constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,t){let n=this._cache.get(t);if(typeof n>"u"){let o=this._match(t),r=dAt(t);n=(o.metadata|r<<8)>>>0,this._cache.set(t,n)}return(n|e<<0)>>>0}},cAt=/\b(comment|string|regex|regexp)\b/;t4e=class i{constructor(e,t,n){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new i(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,n){e!==-1&&(this._fontStyle=e),t!==0&&(this._foreground=t),n!==0&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}},i4e=class i{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;let t=e.indexOf("."),n,o;t===-1?(n=e,o=""):(n=e.substring(0,t),o=e.substring(t+1));let r=this._children.get(n);return typeof r<"u"?r.match(o):this._mainRule}insert(e,t,n,o){if(e===""){this._mainRule.acceptOverwrite(t,n,o);return}let r=e.indexOf("."),s,a;r===-1?(s=e,a=""):(s=e.substring(0,r),a=e.substring(r+1));let l=this._children.get(s);typeof l>"u"&&(l=new i(this._mainRule.clone()),this._children.set(s,l)),l.insert(a,t,n,o)}}});var Rnt,Pnt,Ont,znt,Fnt=P(()=>{r1();pr();Rnt={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Xs]:"#FFFFFE",[lh]:"#000000",[r1e]:"#E5EBF1",[ob]:"#D3D3D3",[rb]:"#939393",[CI]:"#ADD6FF4D"}},Pnt={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Xs]:"#1E1E1E",[lh]:"#D4D4D4",[r1e]:"#3A3D41",[ob]:"#404040",[rb]:"#707070",[CI]:"#ADD6FF26"}},Ont={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Xs]:"#000000",[lh]:"#FFFFFF",[ob]:"#FFFFFF",[rb]:"#FFFFFF"}},znt={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Xs]:"#FFFFFF",[lh]:"#292929",[ob]:"#292929",[rb]:"#292929"}}});function Yo(i,e,t,n){return s7.registerIcon(i,e,t,n)}function o4e(){return s7}function fAt(){let i=hW();for(let e in i){let t="\\"+i[e].toString(16);s7.registerIcon(e,{fontCharacter:t})}}var hAt,Hnt,Bnt,n4e,s7,Wnt,Unt,Vnt,_X,tQi,iQi,nQi,oQi,m1=P(()=>{Qi();Go();or();Xt();ho();Io();Wt();C$();Ys();hAt={IconContribution:"base.contributions.icons"};(function(i){function e(t,n){let o=t.defaults;for(;ui.isThemeIcon(o);){let r=s7.getIcon(o.id);if(!r)return;o=r.defaults}return o}i.getDefinition=e})(Hnt||(Hnt={}));(function(i){function e(n){return{weight:n.weight,style:n.style,src:n.src.map(o=>({format:o.format,location:o.location.toString()}))}}i.toJSONObject=e;function t(n){let o=r=>qs(r)?r:void 0;if(n&&Array.isArray(n.src)&&n.src.every(r=>qs(r.format)&&qs(r.location)))return{weight:o(n.weight),style:o(n.style),src:n.src.map(r=>({format:r.format,location:li.parse(r.location)}))}}i.fromJSONObject=t})(Bnt||(Bnt={}));n4e=class{constructor(){this._onDidChange=new ge,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:g("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:g("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${ui.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,n,o){let r=this.iconsById[e];if(r){if(n&&!r.description){r.description=n,this.iconSchema.properties[e].markdownDescription=`${n} $(${e})`;let l=this.iconReferenceSchema.enum.indexOf(e);l!==-1&&(this.iconReferenceSchema.enumDescriptions[l]=n),this._onDidChange.fire()}return r}let s={id:e,description:n,defaults:t,deprecationMessage:o};this.iconsById[e]=s;let a={$ref:"#/definitions/icons"};return o&&(a.deprecationMessage=o),n&&(a.markdownDescription=`${n}: $(${e})`),this.iconSchema.properties[e]=a,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(n||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){let e=(r,s)=>r.id.localeCompare(s.id),t=r=>{for(;ui.isThemeIcon(r.defaults);)r=this.iconsById[r.defaults.id];return`codicon codicon-${r?r.id:""}`},n=[];n.push("| preview | identifier | default codicon ID | description"),n.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");let o=Object.keys(this.iconsById).map(r=>this.iconsById[r]);for(let r of o.filter(s=>!!s.description).sort(e))n.push(`||${r.id}|${ui.isThemeIcon(r.defaults)?r.defaults.id:r.id}|${r.description||""}|`);n.push("| preview | identifier "),n.push("| ----------- | --------------------------------- |");for(let r of o.filter(s=>!ui.isThemeIcon(s.defaults)).sort(e))n.push(`||${r.id}|`);return n.join(` +`)}},s7=new n4e;jn.add(hAt.IconContribution,s7);fAt();Wnt="vscode://schemas/icons",Unt=jn.as(T5.JSONContribution);Unt.registerSchema(Wnt,s7.getIconSchema());Vnt=new hn(()=>Unt.notifySchemaChanged(Wnt),200);s7.onDidChange(()=>{Vnt.isScheduled()||Vnt.schedule()});_X=Yo("widget-close",kt.close,g("widgetClose","Icon for the close action in widgets.")),tQi=Yo("goto-previous-location",kt.arrowUp,g("previousChangeIcon","Icon for goto previous editor location.")),iQi=Yo("goto-next-location",kt.arrowDown,g("nextChangeIcon","Icon for goto next editor location.")),nQi=ui.modify(kt.sync,"spin"),oQi=ui.modify(kt.loading,"spin")});function $nt(i){let e=new Ye,t=e.add(new ge),n=o4e();return e.add(n.onDidChange(()=>t.fire())),i&&e.add(i.onDidProductIconThemeChange(()=>t.fire())),{dispose:()=>e.dispose(),onDidChange:t.event,getCSS(){let o=i?i.getProductIconTheme():new zN,r={},s=l=>{let c=o.getIcon(l);if(!c)return;let d=c.font;return d?(r[d.id]=d.definition,`.codicon-${l.id}:before { content: '${c.fontCharacter}'; font-family: ${She(d.id)}; }`):`.codicon-${l.id}:before { content: '${c.fontCharacter}'; }`},a=[];for(let l of n.getIcons()){let c=s(l);c&&a.push(c)}for(let l in r){let c=r[l],d=c.weight?`font-weight: ${c.weight};`:"",u=c.style?`font-style: ${c.style};`:"",h=c.src.map(f=>`${rp(f.location)} format('${f.format}')`).join(", ");a.push(`@font-face { src: ${h}; font-family: ${She(l)};${d}${u} font-display: block; }`)}return a.join(` +`)}}}var zN,jnt=P(()=>{Qt();Xt();nt();or();m1();zN=class{getIcon(e){let t=o4e(),n=e.defaults;for(;ui.isThemeIcon(n);){let o=t.getIcon(n.id);if(!o)return;n=o.defaults}return n}}});function yX(i){return i===H2||i===a7||i===i8||i===n8}function r4e(i){switch(i){case H2:return Rnt;case a7:return Pnt;case i8:return Ont;case n8:return znt}}function bX(i){let e=r4e(i);return new CX(i,e)}var H2,a7,i8,n8,qnt,pAt,CX,wX,s4e=P(()=>{Qt();Xc();sa();Xt();Pr();B5();Ant();Fnt();Ys();pr();No();nt();fp();jnt();_l();H2="vs",a7="vs-dark",i8="hc-black",n8="hc-light",qnt=jn.as(n1e.ColorContribution),pAt=jn.as(N1e.ThemingContribution),CX=class{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;let n=t.base;e.length>0?(yX(e)?this.id=e:this.id=n+" "+e,this.themeName=e):(this.id=n,this.themeName=n),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){let e=new Map;for(let t in this.themeData.colors)e.set(t,it.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){let t=r4e(this.themeData.base);for(let n in t.colors)e.has(n)||e.set(n,it.fromHex(t.colors[n]))}this.colors=e}return this.colors}getColor(e,t){let n=this.getColors().get(e);if(n)return n;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=qnt.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case H2:return ch.LIGHT;case i8:return ch.HIGH_CONTRAST_DARK;case n8:return ch.HIGH_CONTRAST_LIGHT;default:return ch.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){let r=r4e(this.themeData.base);e=r.rules,r.encodedTokensColors&&(t=r.encodedTokensColors)}let n=this.themeData.colors["editor.foreground"],o=this.themeData.colors["editor.background"];if(n||o){let r={token:""};n&&(r.foreground=n),o&&(r.background=o),e.push(r)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=ON.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,n){let r=this.tokenTheme._match([e].concat(t).join(".")).metadata,s=Ls.getForeground(r),a=Ls.getFontStyle(r);return{foreground:s,italic:!!(a&1),bold:!!(a&2),underline:!!(a&4),strikethrough:!!(a&8)}}};wX=class extends ue{constructor(){super(),this._onColorThemeChange=this._register(new ge),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new ge),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new zN,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(H2,bX(H2)),this._knownThemes.set(a7,bX(a7)),this._knownThemes.set(i8,bX(i8)),this._knownThemes.set(n8,bX(n8));let e=this._register($nt(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} +${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(H2),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),jue(Hn,"(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return k5(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=ya(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),ue.None}_registerShadowDomContainer(e){let t=ya(e,n=>{n.className="monaco-colors",n.textContent=this._allCSS});return this._styleElements.push(t),{dispose:()=>{for(let n=0;n{n.base===e&&n.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(H2),this._updateActualTheme(t)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){let e=Hn.matchMedia("(forced-colors: active)").matches;if(e!==Ac(this._theme.type)){let t;a2(this._theme.type)?t=e?i8:a7:t=e?n8:H2,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){let e=[],t={},n={addRule:s=>{t[s]||(e.push(s),t[s]=!0)}};pAt.getThemingParticipants().forEach(s=>s(this._theme,n,this._environment));let o=[];for(let s of qnt.getColors()){let a=this._theme.getColor(s.id,!0);a&&o.push(`${gj(s.id)}: ${a.toString()};`)}n.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${o.join(` `)} }`);let r=this._colorMapOverride||this._theme.tokenTheme.getColorMap();n.addRule(Nnt(r)),this._themeCSS=e.join(` `),this._updateCSS(),Eo.setColorMap(r),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS} -${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}});var sc,l7=P(()=>{_i();sc=vi("themeService")});var mAt,a4e,yX,Gnt=P(()=>{Qt();_l();Xt();nt();Yh();er();Xi();Nv();mAt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},a4e=function(i,e){return function(t,n){e(t,n,i)}},yX=class extends ue{constructor(e,t,n){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=n,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new ge,this._onDidChangeReducedMotion=new ge,this._accessibilityModeEnabledContext=G5.bindTo(this._contextKeyService);let o=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(s=>{s.affectsConfiguration("editor.accessibilitySupport")&&(o(),this._onDidChangeScreenReaderOptimized.fire()),s.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),o(),this._register(this.onDidChangeScreenReaderOptimized(()=>o()));let r=Hn.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=r.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(r)}initReducedMotionListeners(e){this._register(Xe(e,"change",()=>{this._systemMotionReduced=e.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));let t=()=>{let n=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("reduce-motion",n),this._layoutService.mainContainer.classList.toggle("enable-motion",!n)};t(),this._register(this.onDidChangeReducedMotion(()=>t()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){let e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){let e=this._configMotionReduced;return e==="on"||e==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};yX=mAt([a4e(0,ri),a4e(1,nf),a4e(2,Ni)],yX)});function gAt(i,e,t){let n=kqe(e)?e.submenu.id:e.id,o=typeof e.title=="string"?e.title:e.title.value,r=K0({id:`hide/${i.id}/${n}`,label:g("hide.label","Hide '{0}'",o),run(){t.updateHidden(i,n,!0)}}),s=K0({id:`toggle/${i.id}/${n}`,label:o,get checked(){return!t.isHidden(i,n)},run(){t.updateHidden(i,n,!!this.checked)}});return{hide:r,toggle:s,get isHidden(){return!s.checked}}}var xX,c7,DS,n8,CX,wX,l4e,c4e,Knt=P(()=>{Qi();Xt();nt();Dr();$o();Xi();Ra();Hm();Vi();Wt();xX=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},c7=function(i,e){return function(t,n){e(t,n,i)}},CX=class{constructor(e,t){this._commandService=e,this._hiddenStates=new wX(t)}createMenu(e,t,n){return new c4e(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...n},this._commandService,t)}resetHiddenStates(e){this._hiddenStates.reset(e)}};CX=xX([c7(0,eo),c7(1,nl)],CX);wX=DS=class{constructor(e){this._storageService=e,this._disposables=new Ye,this._onDidChange=new ge,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{let t=e.get(DS._key,0,"{}");this._data=JSON.parse(t)}catch{this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,DS._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{let t=e.get(DS._key,0,"{}");this._data=JSON.parse(t)}catch(t){console.log("FAILED to read storage after UPDATE",t)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){var n;return(n=this._hiddenByDefaultCache.get(`${e.id}/${t}`))!==null&&n!==void 0?n:!1}setDefaultState(e,t,n){this._hiddenByDefaultCache.set(`${e.id}/${t}`,n)}isHidden(e,t){var n,o;let r=this._isHiddenByDefault(e,t),s=(o=(n=this._data[e.id])===null||n===void 0?void 0:n.includes(t))!==null&&o!==void 0?o:!1;return r?!s:s}updateHidden(e,t,n){this._isHiddenByDefault(e,t)&&(n=!n);let r=this._data[e.id];if(n)r?r.indexOf(t)<0&&r.push(t):this._data[e.id]=[t];else if(r){let s=r.indexOf(t);s>=0&&cje(r,s),r.length===0&&delete this._data[e.id]}this._persist()}reset(e){if(e===void 0)this._data=Object.create(null),this._persist();else{for(let{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;let e=JSON.stringify(this._data);this._storageService.store(DS._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};wX._key="menu.hiddenCommands";wX=DS=xX([c7(0,nl)],wX);l4e=n8=class{constructor(e,t,n,o,r){this._id=e,this._hiddenStates=t,this._collectContextKeysForSubmenus=n,this._commandService=o,this._contextKeyService=r,this._menuGroups=[],this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();let e=ps.getMenuItems(this._id),t;e.sort(n8._compareMenuItems);for(let n of e){let o=n.group||"";(!t||t[0]!==o)&&(t=[o,[]],this._menuGroups.push(t)),t[1].push(n),this._collectContextKeys(n)}}_collectContextKeys(e){if(n8._fillInKbExprKeys(e.when,this._structureContextKeys),F3(e)){if(e.command.precondition&&n8._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){let t=e.command.toggled.condition||e.command.toggled;n8._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&ps.getMenuItems(e.submenu).forEach(this._collectContextKeys,this)}createActionGroups(e){let t=[];for(let n of this._menuGroups){let[o,r]=n,s=[];for(let a of r)if(this._contextKeyService.contextMatchesRules(a.when)){let l=F3(a);l&&this._hiddenStates.setDefaultState(this._id,a.command.id,!!a.isHiddenByDefault);let c=gAt(this._id,l?a.command:a,this._hiddenStates);if(l)s.push(new ed(a.command,a.alt,e,c,this._contextKeyService,this._commandService));else{let d=new n8(a.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(e),u=zr.join(...d.map(h=>h[1]));u.length>0&&s.push(new hm(a,c,u))}}s.length>0&&t.push([o,s])}return t}static _fillInKbExprKeys(e,t){if(e)for(let n of e.keys())t.add(n)}static _compareMenuItems(e,t){let n=e.group,o=t.group;if(n!==o){if(n){if(!o)return-1}else return 1;if(n==="navigation")return-1;if(o==="navigation")return 1;let a=n.localeCompare(o);if(a!==0)return a}let r=e.order||0,s=t.order||0;return rs?1:n8._compareTitles(F3(e)?e.command.title:e.title,F3(t)?t.command.title:t.title)}static _compareTitles(e,t){let n=typeof e=="string"?e:e.original,o=typeof t=="string"?t:t.original;return n.localeCompare(o)}};l4e=n8=xX([c7(3,eo),c7(4,ri)],l4e);c4e=class{constructor(e,t,n,o,r){this._disposables=new Ye,this._menuInfo=new l4e(e,t,n.emitEventsForSubmenuChanges,o,r);let s=new hn(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},n.eventDebounceDelay);this._disposables.add(s),this._disposables.add(ps.onDidChangeMenu(d=>{d.has(e)&&s.schedule()}));let a=this._disposables.add(new Ye),l=d=>{let u=!1,h=!1,f=!1;for(let p of d)if(u=u||p.isStructuralChange,h=h||p.isEnablementChange,f=f||p.isToggleChange,u&&h&&f)break;return{menu:this,isStructuralChange:u,isEnablementChange:h,isToggleChange:f}},c=()=>{a.add(r.onDidChangeContext(d=>{let u=d.affectsSome(this._menuInfo.structureContextKeys),h=d.affectsSome(this._menuInfo.preconditionContextKeys),f=d.affectsSome(this._menuInfo.toggledContextKeys);(u||h||f)&&this._onDidChange.fire({menu:this,isStructuralChange:u,isEnablementChange:h,isToggleChange:f})})),a.add(t.onDidChange(d=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new TC({onWillAddFirstListener:c,onDidRemoveLastListener:a.clear.bind(a),delay:n.eventDebounceDelay,merge:l}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};c4e=xX([c7(3,eo),c7(4,ri)],c4e)});var vAt,Ynt,d4e,FN,Znt=P(()=>{Xc();Qt();_l();Qi();Xt();W3();nt();Nv();Ju();vAt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Ynt=function(i,e){return function(t,n){e(t,n,i)}},FN=d4e=class extends ue{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,(Xu||dU)&&this.installWebKitWriteTextWorkaround(),this._register(Et.runAndSubscribe(x5,({window:n,disposables:o})=>{o.add(Xe(n.document,"copy",()=>this.clearResources()))},{window:Hn,disposables:this._store}))}installWebKitWriteTextWorkaround(){let e=()=>{let t=new Fg;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=t,navigator.clipboard.write([new ClipboardItem({"text/plain":t.p})]).catch(async n=>{(!(n instanceof Error)||n.name!=="NotAllowedError"||!t.isRejected)&&this.logService.error(n)})};this._register(Et.runAndSubscribe(this.layoutService.onDidAddContainer,({container:t,disposables:n})=>{n.add(Xe(t,"click",e)),n.add(Xe(t,"keydown",e))},{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,t){if(this.writeResources([]),t){this.mapTextToType.set(t,e);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return await navigator.clipboard.writeText(e)}catch(n){console.error(n)}this.fallbackWriteText(e)}fallbackWriteText(e){let t=X0(),n=t.activeElement,o=t.body.appendChild(pt("textarea",{"aria-hidden":!0}));o.style.height="1px",o.style.width="1px",o.style.position="absolute",o.value=e,o.focus(),o.select(),t.execCommand("copy"),n instanceof HTMLElement&&n.focus(),t.body.removeChild(o)}async readText(e){if(e)return this.mapTextToType.get(e)||"";try{return await navigator.clipboard.readText()}catch(t){console.error(t)}return""}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}async writeResources(e){e.length===0?this.clearResources():(this.resources=e,this.resourcesStateHash=await this.computeResourcesStateHash())}async readResources(){let e=await this.computeResourcesStateHash();return this.resourcesStateHash!==e&&this.clearResources(),this.resources}async computeResourcesStateHash(){if(this.resources.length===0)return;let e=await this.readText();return V3(e.substring(0,d4e.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearResources(){this.resources=[],this.resourcesStateHash=void 0}};FN.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3;FN=d4e=vAt([Ynt(0,nf),Ynt(1,ks)],FN)});var Pd,F4=P(()=>{_i();Pd=vi("clipboardService")});function yAt(i,e){return i.allKeysContainedIn(new Set(Object.keys(e)))}function CAt(i){for(;i;){if(i.hasAttribute(HN)){let e=i.getAttribute(HN);return e?parseInt(e,10):NaN}i=i.parentElement}return 0}function wAt(i,e,t){i.get(ri).createKey(String(e),xAt(t))}function xAt(i){return VV(i,e=>{if(typeof e=="object"&&e.$mid===1)return li.revive(e).toString();if(e instanceof li)return e.toString()})}var _At,bAt,HN,BN,o8,SX,u4e,kX,LX,h4e,EX,DX,f4e,Xnt=P(()=>{Xt();Yc();nt();Gc();PY();Io();Wt();$o();er();Xi();_At=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},bAt=function(i,e){return function(t,n){e(t,n,i)}},HN="data-keybinding-context",BN=class{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return{...this._value}}setValue(e,t){return this._value[e]!==t?(this._value[e]=t,!0):!1}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){let t=this._value[e];return typeof t>"u"&&this._parent?this._parent.getValue(e):t}},o8=class extends BN{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}};o8.INSTANCE=new o8;SX=class i extends BN{constructor(e,t,n){super(e,null),this._configurationService=t,this._values=Hb.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(o=>{if(o.source===7){let r=Array.from(this._values,([s])=>s);this._values.clear(),n.fire(new LX(r))}else{let r=[];for(let s of o.affectedKeys){let a=`config.${s}`,l=this._values.findSuperstr(a);l!==void 0&&(r.push(...un.map(l,([c])=>c)),this._values.deleteSuperstr(a)),this._values.has(a)&&(r.push(a),this._values.delete(a))}n.fire(new LX(r))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(i._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);let t=e.substr(i._keyPrefix.length),n=this._configurationService.getValue(t),o;switch(typeof n){case"number":case"boolean":case"string":o=n;break;default:Array.isArray(n)?o=JSON.stringify(n):o=n}return this._values.set(e,o),o}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}};SX._keyPrefix="config.";u4e=class{constructor(e,t,n){this._service=e,this._key=t,this._defaultValue=n,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}},kX=class{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}},LX=class{constructor(e){this.keys=e}affectsSome(e){for(let t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every(t=>e.has(t))}},h4e=class{constructor(e){this.events=e}affectsSome(e){for(let t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every(t=>t.allKeysContainedIn(e))}};EX=class extends ue{constructor(e){super(),this._onDidChangeContext=this._register(new Pf({merge:t=>new h4e(t)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new u4e(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new f4e(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");let t=this.getContextValuesContainer(this._myContextId);return e?e.evaluate(t):!0}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;let n=this.getContextValuesContainer(this._myContextId);n&&n.setValue(e,t)&&this._onDidChangeContext.fire(new kX(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new kX(e))}getContext(e){return this._isDisposed?o8.INSTANCE:this.getContextValuesContainer(CAt(e))}dispose(){super.dispose(),this._isDisposed=!0}},DX=class extends EX{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;let t=this._register(new SX(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t)}getContextValuesContainer(e){return this._isDisposed?o8.INSTANCE:this._contexts.get(e)||o8.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId;return this._contexts.set(t,new BN(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};DX=_At([bAt(0,Ni)],DX);f4e=class extends EX{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new To),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(HN)){let n="";this._domNode.classList&&(n=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${n?": "+n:""}`)}this._domNode.setAttribute(HN,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(e=>{let n=this._parent.getContextValuesContainer(this._myContextId).value;yAt(e,n)||this._onDidChangeContext.fire(e)})}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(HN),super.dispose())}getContextValuesContainer(e){return this._isDisposed?o8.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}};Zi.registerCommand("_setContext",wAt);Zi.registerCommand({id:"getContextKeyInfo",handler(){return[...Bt.all()].sort((i,e)=>i.key.localeCompare(e.key))},metadata:{description:g("getContextKeyInfo","A command that returns information about context keys"),args:[]}});Zi.registerCommand("_generateContextKeyInfo",function(){let i=[],e=new Set;for(let t of Bt.all())e.has(t.key)||(e.add(t.key),i.push(t));i.sort((t,n)=>t.key.localeCompare(n.key)),console.log(JSON.stringify(i,void 0,2))})});var p4e,VN,Qnt=P(()=>{p4e=class{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}},VN=class{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){let e=[];for(let t of this._nodes.values())t.outgoing.size===0&&e.push(t);return e}insertEdge(e,t){let n=this.lookupOrInsertNode(e),o=this.lookupOrInsertNode(t);n.outgoing.set(o.key,o),o.incoming.set(n.key,n)}removeNode(e){let t=this._hashFn(e);this._nodes.delete(t);for(let n of this._nodes.values())n.outgoing.delete(t),n.incoming.delete(t)}lookupOrInsertNode(e){let t=this._hashFn(e),n=this._nodes.get(t);return n||(n=new p4e(t,e),this._nodes.set(t,n)),n}isEmpty(){return this._nodes.size===0}toString(){let e=[];for(let[t,n]of this._nodes)e.push(`${t} +${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}});var sc,l7=P(()=>{_i();sc=vi("themeService")});var mAt,a4e,xX,Gnt=P(()=>{Qt();_l();Xt();nt();Yh();er();Xi();Av();mAt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},a4e=function(i,e){return function(t,n){e(t,n,i)}},xX=class extends ue{constructor(e,t,n){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=n,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new ge,this._onDidChangeReducedMotion=new ge,this._accessibilityModeEnabledContext=G5.bindTo(this._contextKeyService);let o=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(s=>{s.affectsConfiguration("editor.accessibilitySupport")&&(o(),this._onDidChangeScreenReaderOptimized.fire()),s.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),o(),this._register(this.onDidChangeScreenReaderOptimized(()=>o()));let r=Hn.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=r.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(r)}initReducedMotionListeners(e){this._register(Xe(e,"change",()=>{this._systemMotionReduced=e.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));let t=()=>{let n=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("reduce-motion",n),this._layoutService.mainContainer.classList.toggle("enable-motion",!n)};t(),this._register(this.onDidChangeReducedMotion(()=>t()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){let e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){let e=this._configMotionReduced;return e==="on"||e==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};xX=mAt([a4e(0,ri),a4e(1,nf),a4e(2,Ni)],xX)});function gAt(i,e,t){let n=kqe(e)?e.submenu.id:e.id,o=typeof e.title=="string"?e.title:e.title.value,r=K0({id:`hide/${i.id}/${n}`,label:g("hide.label","Hide '{0}'",o),run(){t.updateHidden(i,n,!0)}}),s=K0({id:`toggle/${i.id}/${n}`,label:o,get checked(){return!t.isHidden(i,n)},run(){t.updateHidden(i,n,!!this.checked)}});return{hide:r,toggle:s,get isHidden(){return!s.checked}}}var LX,c7,DS,o8,SX,kX,l4e,c4e,Knt=P(()=>{Qi();Xt();nt();Dr();$o();Xi();Ra();Hm();Vi();Wt();LX=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},c7=function(i,e){return function(t,n){e(t,n,i)}},SX=class{constructor(e,t){this._commandService=e,this._hiddenStates=new kX(t)}createMenu(e,t,n){return new c4e(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...n},this._commandService,t)}resetHiddenStates(e){this._hiddenStates.reset(e)}};SX=LX([c7(0,eo),c7(1,nl)],SX);kX=DS=class{constructor(e){this._storageService=e,this._disposables=new Ye,this._onDidChange=new ge,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{let t=e.get(DS._key,0,"{}");this._data=JSON.parse(t)}catch{this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,DS._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{let t=e.get(DS._key,0,"{}");this._data=JSON.parse(t)}catch(t){console.log("FAILED to read storage after UPDATE",t)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){var n;return(n=this._hiddenByDefaultCache.get(`${e.id}/${t}`))!==null&&n!==void 0?n:!1}setDefaultState(e,t,n){this._hiddenByDefaultCache.set(`${e.id}/${t}`,n)}isHidden(e,t){var n,o;let r=this._isHiddenByDefault(e,t),s=(o=(n=this._data[e.id])===null||n===void 0?void 0:n.includes(t))!==null&&o!==void 0?o:!1;return r?!s:s}updateHidden(e,t,n){this._isHiddenByDefault(e,t)&&(n=!n);let r=this._data[e.id];if(n)r?r.indexOf(t)<0&&r.push(t):this._data[e.id]=[t];else if(r){let s=r.indexOf(t);s>=0&&cje(r,s),r.length===0&&delete this._data[e.id]}this._persist()}reset(e){if(e===void 0)this._data=Object.create(null),this._persist();else{for(let{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;let e=JSON.stringify(this._data);this._storageService.store(DS._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};kX._key="menu.hiddenCommands";kX=DS=LX([c7(0,nl)],kX);l4e=o8=class{constructor(e,t,n,o,r){this._id=e,this._hiddenStates=t,this._collectContextKeysForSubmenus=n,this._commandService=o,this._contextKeyService=r,this._menuGroups=[],this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();let e=ps.getMenuItems(this._id),t;e.sort(o8._compareMenuItems);for(let n of e){let o=n.group||"";(!t||t[0]!==o)&&(t=[o,[]],this._menuGroups.push(t)),t[1].push(n),this._collectContextKeys(n)}}_collectContextKeys(e){if(o8._fillInKbExprKeys(e.when,this._structureContextKeys),H3(e)){if(e.command.precondition&&o8._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){let t=e.command.toggled.condition||e.command.toggled;o8._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&ps.getMenuItems(e.submenu).forEach(this._collectContextKeys,this)}createActionGroups(e){let t=[];for(let n of this._menuGroups){let[o,r]=n,s=[];for(let a of r)if(this._contextKeyService.contextMatchesRules(a.when)){let l=H3(a);l&&this._hiddenStates.setDefaultState(this._id,a.command.id,!!a.isHiddenByDefault);let c=gAt(this._id,l?a.command:a,this._hiddenStates);if(l)s.push(new ed(a.command,a.alt,e,c,this._contextKeyService,this._commandService));else{let d=new o8(a.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(e),u=zr.join(...d.map(h=>h[1]));u.length>0&&s.push(new hm(a,c,u))}}s.length>0&&t.push([o,s])}return t}static _fillInKbExprKeys(e,t){if(e)for(let n of e.keys())t.add(n)}static _compareMenuItems(e,t){let n=e.group,o=t.group;if(n!==o){if(n){if(!o)return-1}else return 1;if(n==="navigation")return-1;if(o==="navigation")return 1;let a=n.localeCompare(o);if(a!==0)return a}let r=e.order||0,s=t.order||0;return rs?1:o8._compareTitles(H3(e)?e.command.title:e.title,H3(t)?t.command.title:t.title)}static _compareTitles(e,t){let n=typeof e=="string"?e:e.original,o=typeof t=="string"?t:t.original;return n.localeCompare(o)}};l4e=o8=LX([c7(3,eo),c7(4,ri)],l4e);c4e=class{constructor(e,t,n,o,r){this._disposables=new Ye,this._menuInfo=new l4e(e,t,n.emitEventsForSubmenuChanges,o,r);let s=new hn(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},n.eventDebounceDelay);this._disposables.add(s),this._disposables.add(ps.onDidChangeMenu(d=>{d.has(e)&&s.schedule()}));let a=this._disposables.add(new Ye),l=d=>{let u=!1,h=!1,f=!1;for(let p of d)if(u=u||p.isStructuralChange,h=h||p.isEnablementChange,f=f||p.isToggleChange,u&&h&&f)break;return{menu:this,isStructuralChange:u,isEnablementChange:h,isToggleChange:f}},c=()=>{a.add(r.onDidChangeContext(d=>{let u=d.affectsSome(this._menuInfo.structureContextKeys),h=d.affectsSome(this._menuInfo.preconditionContextKeys),f=d.affectsSome(this._menuInfo.toggledContextKeys);(u||h||f)&&this._onDidChange.fire({menu:this,isStructuralChange:u,isEnablementChange:h,isToggleChange:f})})),a.add(t.onDidChange(d=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new TC({onWillAddFirstListener:c,onDidRemoveLastListener:a.clear.bind(a),delay:n.eventDebounceDelay,merge:l}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};c4e=LX([c7(3,eo),c7(4,ri)],c4e)});var vAt,Ynt,d4e,FN,Znt=P(()=>{Xc();Qt();_l();Qi();Xt();U3();nt();Av();Ju();vAt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Ynt=function(i,e){return function(t,n){e(t,n,i)}},FN=d4e=class extends ue{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,(Xu||fU)&&this.installWebKitWriteTextWorkaround(),this._register(Et.runAndSubscribe(x5,({window:n,disposables:o})=>{o.add(Xe(n.document,"copy",()=>this.clearResources()))},{window:Hn,disposables:this._store}))}installWebKitWriteTextWorkaround(){let e=()=>{let t=new Fg;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=t,navigator.clipboard.write([new ClipboardItem({"text/plain":t.p})]).catch(async n=>{(!(n instanceof Error)||n.name!=="NotAllowedError"||!t.isRejected)&&this.logService.error(n)})};this._register(Et.runAndSubscribe(this.layoutService.onDidAddContainer,({container:t,disposables:n})=>{n.add(Xe(t,"click",e)),n.add(Xe(t,"keydown",e))},{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,t){if(this.writeResources([]),t){this.mapTextToType.set(t,e);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return await navigator.clipboard.writeText(e)}catch(n){console.error(n)}this.fallbackWriteText(e)}fallbackWriteText(e){let t=X0(),n=t.activeElement,o=t.body.appendChild(pt("textarea",{"aria-hidden":!0}));o.style.height="1px",o.style.width="1px",o.style.position="absolute",o.value=e,o.focus(),o.select(),t.execCommand("copy"),n instanceof HTMLElement&&n.focus(),t.body.removeChild(o)}async readText(e){if(e)return this.mapTextToType.get(e)||"";try{return await navigator.clipboard.readText()}catch(t){console.error(t)}return""}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}async writeResources(e){e.length===0?this.clearResources():(this.resources=e,this.resourcesStateHash=await this.computeResourcesStateHash())}async readResources(){let e=await this.computeResourcesStateHash();return this.resourcesStateHash!==e&&this.clearResources(),this.resources}async computeResourcesStateHash(){if(this.resources.length===0)return;let e=await this.readText();return W3(e.substring(0,d4e.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearResources(){this.resources=[],this.resourcesStateHash=void 0}};FN.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3;FN=d4e=vAt([Ynt(0,nf),Ynt(1,ks)],FN)});var Pd,F4=P(()=>{_i();Pd=vi("clipboardService")});function yAt(i,e){return i.allKeysContainedIn(new Set(Object.keys(e)))}function CAt(i){for(;i;){if(i.hasAttribute(HN)){let e=i.getAttribute(HN);return e?parseInt(e,10):NaN}i=i.parentElement}return 0}function wAt(i,e,t){i.get(ri).createKey(String(e),xAt(t))}function xAt(i){return $V(i,e=>{if(typeof e=="object"&&e.$mid===1)return li.revive(e).toString();if(e instanceof li)return e.toString()})}var _At,bAt,HN,BN,r8,EX,u4e,DX,TX,h4e,IX,MX,f4e,Xnt=P(()=>{Xt();Yc();nt();Gc();FY();Io();Wt();$o();er();Xi();_At=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},bAt=function(i,e){return function(t,n){e(t,n,i)}},HN="data-keybinding-context",BN=class{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return{...this._value}}setValue(e,t){return this._value[e]!==t?(this._value[e]=t,!0):!1}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){let t=this._value[e];return typeof t>"u"&&this._parent?this._parent.getValue(e):t}},r8=class extends BN{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}};r8.INSTANCE=new r8;EX=class i extends BN{constructor(e,t,n){super(e,null),this._configurationService=t,this._values=Hb.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(o=>{if(o.source===7){let r=Array.from(this._values,([s])=>s);this._values.clear(),n.fire(new TX(r))}else{let r=[];for(let s of o.affectedKeys){let a=`config.${s}`,l=this._values.findSuperstr(a);l!==void 0&&(r.push(...un.map(l,([c])=>c)),this._values.deleteSuperstr(a)),this._values.has(a)&&(r.push(a),this._values.delete(a))}n.fire(new TX(r))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(i._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);let t=e.substr(i._keyPrefix.length),n=this._configurationService.getValue(t),o;switch(typeof n){case"number":case"boolean":case"string":o=n;break;default:Array.isArray(n)?o=JSON.stringify(n):o=n}return this._values.set(e,o),o}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}};EX._keyPrefix="config.";u4e=class{constructor(e,t,n){this._service=e,this._key=t,this._defaultValue=n,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}},DX=class{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}},TX=class{constructor(e){this.keys=e}affectsSome(e){for(let t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every(t=>e.has(t))}},h4e=class{constructor(e){this.events=e}affectsSome(e){for(let t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every(t=>t.allKeysContainedIn(e))}};IX=class extends ue{constructor(e){super(),this._onDidChangeContext=this._register(new Pf({merge:t=>new h4e(t)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new u4e(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new f4e(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");let t=this.getContextValuesContainer(this._myContextId);return e?e.evaluate(t):!0}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;let n=this.getContextValuesContainer(this._myContextId);n&&n.setValue(e,t)&&this._onDidChangeContext.fire(new DX(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new DX(e))}getContext(e){return this._isDisposed?r8.INSTANCE:this.getContextValuesContainer(CAt(e))}dispose(){super.dispose(),this._isDisposed=!0}},MX=class extends IX{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;let t=this._register(new EX(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t)}getContextValuesContainer(e){return this._isDisposed?r8.INSTANCE:this._contexts.get(e)||r8.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId;return this._contexts.set(t,new BN(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};MX=_At([bAt(0,Ni)],MX);f4e=class extends IX{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new To),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(HN)){let n="";this._domNode.classList&&(n=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${n?": "+n:""}`)}this._domNode.setAttribute(HN,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(e=>{let n=this._parent.getContextValuesContainer(this._myContextId).value;yAt(e,n)||this._onDidChangeContext.fire(e)})}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(HN),super.dispose())}getContextValuesContainer(e){return this._isDisposed?r8.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}};Zi.registerCommand("_setContext",wAt);Zi.registerCommand({id:"getContextKeyInfo",handler(){return[...Bt.all()].sort((i,e)=>i.key.localeCompare(e.key))},metadata:{description:g("getContextKeyInfo","A command that returns information about context keys"),args:[]}});Zi.registerCommand("_generateContextKeyInfo",function(){let i=[],e=new Set;for(let t of Bt.all())e.has(t.key)||(e.add(t.key),i.push(t));i.sort((t,n)=>t.key.localeCompare(n.key)),console.log(JSON.stringify(i,void 0,2))})});var p4e,VN,Qnt=P(()=>{p4e=class{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}},VN=class{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){let e=[];for(let t of this._nodes.values())t.outgoing.size===0&&e.push(t);return e}insertEdge(e,t){let n=this.lookupOrInsertNode(e),o=this.lookupOrInsertNode(t);n.outgoing.set(o.key,o),o.incoming.set(n.key,n)}removeNode(e){let t=this._hashFn(e);this._nodes.delete(t);for(let n of this._nodes.values())n.outgoing.delete(t),n.incoming.delete(t)}lookupOrInsertNode(e){let t=this._hashFn(e),n=this._nodes.get(t);return n||(n=new p4e(t,e),this._nodes.set(t,n)),n}isEmpty(){return this._nodes.size===0}toString(){let e=[];for(let[t,n]of this._nodes)e.push(`${t} (-> incoming)[${[...n.incoming.keys()].join(", ")}] (outgoing ->)[${[...n.outgoing.keys()].join(",")}] `);return e.join(` -`)}findCycleSlow(){for(let[e,t]of this._nodes){let n=new Set([e]),o=this._findCycle(t,n);if(o)return o}}_findCycle(e,t){for(let[n,o]of e.outgoing){if(t.has(n))return[...t,n].join(" -> ");t.add(n);let r=this._findCycle(o,t);if(r)return r;t.delete(n)}}}});var SAt,TX,IX,H4,Jnt=P(()=>{Qi();Pi();nt();v$();Qnt();_i();Ix();Hh();SAt=!1,TX=class extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=(t=e.findCycleSlow())!==null&&t!==void 0?t:`UNABLE to detect cycle, dumping graph: -${e.toString()}`}},IX=class i{constructor(e=new wp,t=!1,n,o=SAt){var r;this._services=e,this._strict=t,this._parent=n,this._enableTracing=o,this._activeInstantiations=new Set,this._services.set(qt,this),this._globalGraph=o?(r=n?._globalGraph)!==null&&r!==void 0?r:new VN(s=>s):void 0}createChild(e){return new i(e,this._strict,this,this._enableTracing)}invokeFunction(e,...t){let n=H4.traceInvocation(this._enableTracing,e),o=!1;try{return e({get:s=>{if(o)throw LC("service accessor is only valid during the invocation of its target method");let a=this._getOrCreateServiceInstance(s,n);if(!a)throw new Error(`[invokeFunction] unknown service '${s}'`);return a}},...t)}finally{o=!0,n.stop()}}createInstance(e,...t){let n,o;return e instanceof oh?(n=H4.traceCreation(this._enableTracing,e.ctor),o=this._createInstance(e.ctor,e.staticArguments.concat(t),n)):(n=H4.traceCreation(this._enableTracing,e),o=this._createInstance(e,t,n)),n.stop(),o}_createInstance(e,t=[],n){let o=np.getServiceDependencies(e).sort((a,l)=>a.index-l.index),r=[];for(let a of o){let l=this._getOrCreateServiceInstance(a.id,n);l||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`,!1),r.push(l)}let s=o.length>0?o[0].index:t.length;if(t.length!==s){console.trace(`[createInstance] First service dependency of ${e.name} at position ${s+1} conflicts with ${t.length} static arguments`);let a=s-t.length;a>0?t=t.concat(new Array(a)):t=t.slice(0,s)}return Reflect.construct(e,t.concat(r))}_setServiceInstance(e,t){if(this._services.get(e)instanceof oh)this._services.set(e,t);else if(this._parent)this._parent._setServiceInstance(e,t);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));let n=this._getServiceInstanceOrDescriptor(e);return n instanceof oh?this._safeCreateAndCacheServiceInstance(e,n,t.branch(e,!0)):(t.branch(e,!1),n)}_safeCreateAndCacheServiceInstance(e,t,n){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,n)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,n){var o;let r=new VN(l=>l.id.toString()),s=0,a=[{id:e,desc:t,_trace:n}];for(;a.length;){let l=a.pop();if(r.lookupOrInsertNode(l),s++>1e3)throw new TX(r);for(let c of np.getServiceDependencies(l.desc.ctor)){let d=this._getServiceInstanceOrDescriptor(c.id);if(d||this._throwIfStrict(`[createInstance] ${e} depends on ${c.id} which is NOT registered.`,!0),(o=this._globalGraph)===null||o===void 0||o.insertEdge(String(l.id),String(c.id)),d instanceof oh){let u={id:c.id,desc:d,_trace:l._trace.branch(c.id,!0)};r.insertEdge(l,u),a.push(u)}}}for(;;){let l=r.roots();if(l.length===0){if(!r.isEmpty())throw new TX(r);break}for(let{data:c}of l){if(this._getServiceInstanceOrDescriptor(c.id)instanceof oh){let u=this._createServiceInstanceWithOwner(c.id,c.desc.ctor,c.desc.staticArguments,c.desc.supportsDelayedInstantiation,c._trace);this._setServiceInstance(c.id,u)}r.removeNode(c)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,n=[],o,r){if(this._services.get(e)instanceof oh)return this._createServiceInstance(e,t,n,o,r);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,n,o,r);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,n=[],o,r){if(o){let s=new i(void 0,this._strict,this,this._enableTracing);s._globalGraphImplicitDependency=String(e);let a=new Map,l=new FU(()=>{let c=s._createInstance(t,n,r);for(let[d,u]of a){let h=c[d];if(typeof h=="function")for(let f of u)f.disposable=h.apply(c,f.listener)}return a.clear(),c});return new Proxy(Object.create(null),{get(c,d){if(!l.isInitialized&&typeof d=="string"&&(d.startsWith("onDid")||d.startsWith("onWill"))){let f=a.get(d);return f||(f=new $r,a.set(d,f)),(m,y,_)=>{if(l.isInitialized)return l.value[d](m,y,_);{let v={listener:[m,y,_],disposable:void 0},b=f.push(v);return Yt(()=>{var w;b(),(w=v.disposable)===null||w===void 0||w.dispose()})}}}if(d in c)return c[d];let u=l.value,h=u[d];return typeof h!="function"||(h=h.bind(u),c[d]=h),h},set(c,d,u){return l.value[d]=u,!0},getPrototypeOf(c){return t.prototype}})}else return this._createInstance(t,n,r)}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}},H4=class i{static traceInvocation(e,t){return e?new i(2,t.name||new Error().stack.split(` +`)}findCycleSlow(){for(let[e,t]of this._nodes){let n=new Set([e]),o=this._findCycle(t,n);if(o)return o}}_findCycle(e,t){for(let[n,o]of e.outgoing){if(t.has(n))return[...t,n].join(" -> ");t.add(n);let r=this._findCycle(o,t);if(r)return r;t.delete(n)}}}});var SAt,NX,AX,H4,Jnt=P(()=>{Qi();Pi();nt();y$();Qnt();_i();Ix();Hh();SAt=!1,NX=class extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=(t=e.findCycleSlow())!==null&&t!==void 0?t:`UNABLE to detect cycle, dumping graph: +${e.toString()}`}},AX=class i{constructor(e=new wp,t=!1,n,o=SAt){var r;this._services=e,this._strict=t,this._parent=n,this._enableTracing=o,this._activeInstantiations=new Set,this._services.set(qt,this),this._globalGraph=o?(r=n?._globalGraph)!==null&&r!==void 0?r:new VN(s=>s):void 0}createChild(e){return new i(e,this._strict,this,this._enableTracing)}invokeFunction(e,...t){let n=H4.traceInvocation(this._enableTracing,e),o=!1;try{return e({get:s=>{if(o)throw LC("service accessor is only valid during the invocation of its target method");let a=this._getOrCreateServiceInstance(s,n);if(!a)throw new Error(`[invokeFunction] unknown service '${s}'`);return a}},...t)}finally{o=!0,n.stop()}}createInstance(e,...t){let n,o;return e instanceof oh?(n=H4.traceCreation(this._enableTracing,e.ctor),o=this._createInstance(e.ctor,e.staticArguments.concat(t),n)):(n=H4.traceCreation(this._enableTracing,e),o=this._createInstance(e,t,n)),n.stop(),o}_createInstance(e,t=[],n){let o=np.getServiceDependencies(e).sort((a,l)=>a.index-l.index),r=[];for(let a of o){let l=this._getOrCreateServiceInstance(a.id,n);l||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`,!1),r.push(l)}let s=o.length>0?o[0].index:t.length;if(t.length!==s){console.trace(`[createInstance] First service dependency of ${e.name} at position ${s+1} conflicts with ${t.length} static arguments`);let a=s-t.length;a>0?t=t.concat(new Array(a)):t=t.slice(0,s)}return Reflect.construct(e,t.concat(r))}_setServiceInstance(e,t){if(this._services.get(e)instanceof oh)this._services.set(e,t);else if(this._parent)this._parent._setServiceInstance(e,t);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));let n=this._getServiceInstanceOrDescriptor(e);return n instanceof oh?this._safeCreateAndCacheServiceInstance(e,n,t.branch(e,!0)):(t.branch(e,!1),n)}_safeCreateAndCacheServiceInstance(e,t,n){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,n)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,n){var o;let r=new VN(l=>l.id.toString()),s=0,a=[{id:e,desc:t,_trace:n}];for(;a.length;){let l=a.pop();if(r.lookupOrInsertNode(l),s++>1e3)throw new NX(r);for(let c of np.getServiceDependencies(l.desc.ctor)){let d=this._getServiceInstanceOrDescriptor(c.id);if(d||this._throwIfStrict(`[createInstance] ${e} depends on ${c.id} which is NOT registered.`,!0),(o=this._globalGraph)===null||o===void 0||o.insertEdge(String(l.id),String(c.id)),d instanceof oh){let u={id:c.id,desc:d,_trace:l._trace.branch(c.id,!0)};r.insertEdge(l,u),a.push(u)}}}for(;;){let l=r.roots();if(l.length===0){if(!r.isEmpty())throw new NX(r);break}for(let{data:c}of l){if(this._getServiceInstanceOrDescriptor(c.id)instanceof oh){let u=this._createServiceInstanceWithOwner(c.id,c.desc.ctor,c.desc.staticArguments,c.desc.supportsDelayedInstantiation,c._trace);this._setServiceInstance(c.id,u)}r.removeNode(c)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,n=[],o,r){if(this._services.get(e)instanceof oh)return this._createServiceInstance(e,t,n,o,r);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,n,o,r);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,n=[],o,r){if(o){let s=new i(void 0,this._strict,this,this._enableTracing);s._globalGraphImplicitDependency=String(e);let a=new Map,l=new VU(()=>{let c=s._createInstance(t,n,r);for(let[d,u]of a){let h=c[d];if(typeof h=="function")for(let f of u)f.disposable=h.apply(c,f.listener)}return a.clear(),c});return new Proxy(Object.create(null),{get(c,d){if(!l.isInitialized&&typeof d=="string"&&(d.startsWith("onDid")||d.startsWith("onWill"))){let f=a.get(d);return f||(f=new $r,a.set(d,f)),(m,y,_)=>{if(l.isInitialized)return l.value[d](m,y,_);{let v={listener:[m,y,_],disposable:void 0},b=f.push(v);return Yt(()=>{var w;b(),(w=v.disposable)===null||w===void 0||w.dispose()})}}}if(d in c)return c[d];let u=l.value,h=u[d];return typeof h!="function"||(h=h.bind(u),c[d]=h),h},set(c,d,u){return l.value[d]=u,!0},getPrototypeOf(c){return t.prototype}})}else return this._createInstance(t,n,r)}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}},H4=class i{static traceInvocation(e,t){return e?new i(2,t.name||new Error().stack.split(` `).slice(3,4).join(` `)):i._None}static traceCreation(e,t){return e?new i(1,t.name):i._None}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){let n=new i(3,e.toString());return this._dep.push([e,t,n]),n}stop(){let e=Date.now()-this._start;i._totals+=e;let t=!1;function n(r,s){let a=[],l=new Array(r+1).join(" ");for(let[c,d,u]of s._dep)if(d&&u){t=!0,a.push(`${l}CREATES -> ${c}`);let h=n(r+1,u);h&&a.push(h)}else a.push(`${l}uses -> ${c}`);return a.join(` `)}let o=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${n(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${i._totals.toFixed(2)}ms)`];(e>2||t)&&i.all.add(o.join(` -`))}};H4.all=new Set;H4._None=new class extends H4{constructor(){super(0,null)}stop(){}branch(){return this}};H4._totals=0});var kAt,m4e,g4e,MX,eot=P(()=>{Vi();Xt();Yc();od();Nc();Io();A2();kAt=new Set([$i.inMemory,$i.vscodeSourceControl,$i.walkThrough,$i.walkThroughSnippet]),m4e=class{constructor(){this._byResource=new rs,this._byOwner=new Map}set(e,t,n){let o=this._byResource.get(e);o||(o=new Map,this._byResource.set(e,o)),o.set(t,n);let r=this._byOwner.get(t);r||(r=new rs,this._byOwner.set(t,r)),r.set(e,n)}get(e,t){let n=this._byResource.get(e);return n?.get(t)}delete(e,t){let n=!1,o=!1,r=this._byResource.get(e);r&&(n=r.delete(t));let s=this._byOwner.get(t);if(s&&(o=s.delete(e)),n!==o)throw new Error("illegal state");return n&&o}values(e){var t,n,o,r;return typeof e=="string"?(n=(t=this._byOwner.get(e))===null||t===void 0?void 0:t.values())!==null&&n!==void 0?n:un.empty():li.isUri(e)?(r=(o=this._byResource.get(e))===null||o===void 0?void 0:o.values())!==null&&r!==void 0?r:un.empty():un.map(un.concat(...this._byOwner.values()),s=>s[1])}},g4e=class{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new rs,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(let t of e){let n=this._data.get(t);n&&this._substract(n);let o=this._resourceStats(t);this._add(o),this._data.set(t,o)}}_resourceStats(e){let t={errors:0,warnings:0,infos:0,unknowns:0};if(kAt.has(e.scheme))return t;for(let{severity:n}of this._service.read({resource:e}))n===_r.Error?t.errors+=1:n===_r.Warning?t.warnings+=1:n===_r.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}},MX=class i{constructor(){this._onMarkerChanged=new TC({delay:0,merge:i._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new m4e,this._stats=new g4e(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(let n of t||[])this.changeOne(e,n,[])}changeOne(e,t,n){if(zV(n))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{let o=[];for(let r of n){let s=i._toMarker(e,t,r);s&&o.push(s)}this._data.set(t,e,o),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,n){let{code:o,severity:r,message:s,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:u,relatedInformation:h,tags:f}=n;if(s)return l=l>0?l:1,c=c>0?c:1,d=d>=l?d:l,u=u>0?u:c,{resource:t,owner:e,code:o,severity:r,message:s,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:u,relatedInformation:h,tags:f}}changeAll(e,t){let n=[],o=this._data.values(e);if(o)for(let r of o){let s=un.first(r);s&&(n.push(s.resource),this._data.delete(s.resource,e))}if(Nr(t)){let r=new rs;for(let{resource:s,marker:a}of t){let l=i._toMarker(e,s,a);if(!l)continue;let c=r.get(s);c?c.push(l):(r.set(s,[l]),n.push(s))}for(let[s,a]of r)this._data.set(s,e,a)}n.length>0&&this._onMarkerChanged.fire(n)}read(e=Object.create(null)){let{owner:t,resource:n,severities:o,take:r}=e;if((!r||r<0)&&(r=-1),t&&n){let s=this._data.get(n,t);if(s){let a=[];for(let l of s)if(i._accept(l,o)){let c=a.push(l);if(r>0&&c===r)break}return a}else return[]}else if(!t&&!n){let s=[];for(let a of this._data.values())for(let l of a)if(i._accept(l,o)){let c=s.push(l);if(r>0&&c===r)return s}return s}else{let s=this._data.values(n??t),a=[];for(let l of s)for(let c of l)if(i._accept(c,o)){let d=a.push(c);if(r>0&&d===r)return a}return a}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){let t=new rs;for(let n of e)for(let o of n)t.set(o,!0);return Array.from(t.keys())}}});var NX,tot=P(()=>{nt();Yge();Wg();Ys();NX=class extends ue{constructor(){super(...arguments),this._configurationModel=new ad}get configurationModel(){return this._configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=new ad;let e=jn.as(Yl.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){let n=this.getConfigurationDefaultOverrides();for(let o of e){let r=n[o],s=t[o];r!==void 0?this._configurationModel.addValue(o,r):s?this._configurationModel.addValue(o,s.default):this._configurationModel.removeValue(o)}}}});var _h,mn,v4e,Cn,r8=P(()=>{_i();Wt();_h=vi("audioCue"),mn=class i{static register(e){return new i(e.fileName)}constructor(e){this.fileName=e}};mn.error=mn.register({fileName:"error.mp3"});mn.warning=mn.register({fileName:"warning.mp3"});mn.foldedArea=mn.register({fileName:"foldedAreas.mp3"});mn.break=mn.register({fileName:"break.mp3"});mn.quickFixes=mn.register({fileName:"quickFixes.mp3"});mn.taskCompleted=mn.register({fileName:"taskCompleted.mp3"});mn.taskFailed=mn.register({fileName:"taskFailed.mp3"});mn.terminalBell=mn.register({fileName:"terminalBell.mp3"});mn.diffLineInserted=mn.register({fileName:"diffLineInserted.mp3"});mn.diffLineDeleted=mn.register({fileName:"diffLineDeleted.mp3"});mn.diffLineModified=mn.register({fileName:"diffLineModified.mp3"});mn.chatRequestSent=mn.register({fileName:"chatRequestSent.mp3"});mn.chatResponsePending=mn.register({fileName:"chatResponsePending.mp3"});mn.chatResponseReceived1=mn.register({fileName:"chatResponseReceived1.mp3"});mn.chatResponseReceived2=mn.register({fileName:"chatResponseReceived2.mp3"});mn.chatResponseReceived3=mn.register({fileName:"chatResponseReceived3.mp3"});mn.chatResponseReceived4=mn.register({fileName:"chatResponseReceived4.mp3"});mn.clear=mn.register({fileName:"clear.mp3"});mn.save=mn.register({fileName:"save.mp3"});mn.format=mn.register({fileName:"format.mp3"});v4e=class{constructor(e){this.randomOneOf=e}},Cn=class i{static register(e){let t=new v4e("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),n=new i(t,e.name,e.settingsKey,e.alertSettingsKey,e.alertMessage);return i._audioCues.add(n),n}constructor(e,t,n,o,r){this.sound=e,this.name=t,this.settingsKey=n,this.alertSettingsKey=o,this.alertMessage=r}};Cn._audioCues=new Set;Cn.error=Cn.register({name:g("audioCues.lineHasError.name","Error on Line"),sound:mn.error,settingsKey:"audioCues.lineHasError",alertSettingsKey:"accessibility.alert.error",alertMessage:g("audioCues.lineHasError.alertMessage","Error")});Cn.warning=Cn.register({name:g("audioCues.lineHasWarning.name","Warning on Line"),sound:mn.warning,settingsKey:"audioCues.lineHasWarning",alertSettingsKey:"accessibility.alert.warning",alertMessage:g("audioCues.lineHasWarning.alertMessage","Warning")});Cn.foldedArea=Cn.register({name:g("audioCues.lineHasFoldedArea.name","Folded Area on Line"),sound:mn.foldedArea,settingsKey:"audioCues.lineHasFoldedArea",alertSettingsKey:"accessibility.alert.foldedArea",alertMessage:g("audioCues.lineHasFoldedArea.alertMessage","Folded")});Cn.break=Cn.register({name:g("audioCues.lineHasBreakpoint.name","Breakpoint on Line"),sound:mn.break,settingsKey:"audioCues.lineHasBreakpoint",alertSettingsKey:"accessibility.alert.breakpoint",alertMessage:g("audioCues.lineHasBreakpoint.alertMessage","Breakpoint")});Cn.inlineSuggestion=Cn.register({name:g("audioCues.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:mn.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"});Cn.terminalQuickFix=Cn.register({name:g("audioCues.terminalQuickFix.name","Terminal Quick Fix"),sound:mn.quickFixes,settingsKey:"audioCues.terminalQuickFix",alertSettingsKey:"accessibility.alert.terminalQuickFix",alertMessage:g("audioCues.terminalQuickFix.alertMessage","Quick Fix")});Cn.onDebugBreak=Cn.register({name:g("audioCues.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:mn.break,settingsKey:"audioCues.onDebugBreak",alertSettingsKey:"accessibility.alert.onDebugBreak",alertMessage:g("audioCues.onDebugBreak.alertMessage","Breakpoint")});Cn.noInlayHints=Cn.register({name:g("audioCues.noInlayHints","No Inlay Hints on Line"),sound:mn.error,settingsKey:"audioCues.noInlayHints",alertSettingsKey:"accessibility.alert.noInlayHints",alertMessage:g("audioCues.noInlayHints.alertMessage","No Inlay Hints")});Cn.taskCompleted=Cn.register({name:g("audioCues.taskCompleted","Task Completed"),sound:mn.taskCompleted,settingsKey:"audioCues.taskCompleted",alertSettingsKey:"accessibility.alert.taskCompleted",alertMessage:g("audioCues.taskCompleted.alertMessage","Task Completed")});Cn.taskFailed=Cn.register({name:g("audioCues.taskFailed","Task Failed"),sound:mn.taskFailed,settingsKey:"audioCues.taskFailed",alertSettingsKey:"accessibility.alert.taskFailed",alertMessage:g("audioCues.taskFailed.alertMessage","Task Failed")});Cn.terminalCommandFailed=Cn.register({name:g("audioCues.terminalCommandFailed","Terminal Command Failed"),sound:mn.error,settingsKey:"audioCues.terminalCommandFailed",alertSettingsKey:"accessibility.alert.terminalCommandFailed",alertMessage:g("audioCues.terminalCommandFailed.alertMessage","Command Failed")});Cn.terminalBell=Cn.register({name:g("audioCues.terminalBell","Terminal Bell"),sound:mn.terminalBell,settingsKey:"audioCues.terminalBell",alertSettingsKey:"accessibility.alert.terminalBell",alertMessage:g("audioCues.terminalBell.alertMessage","Terminal Bell")});Cn.notebookCellCompleted=Cn.register({name:g("audioCues.notebookCellCompleted","Notebook Cell Completed"),sound:mn.taskCompleted,settingsKey:"audioCues.notebookCellCompleted",alertSettingsKey:"accessibility.alert.notebookCellCompleted",alertMessage:g("audioCues.notebookCellCompleted.alertMessage","Notebook Cell Completed")});Cn.notebookCellFailed=Cn.register({name:g("audioCues.notebookCellFailed","Notebook Cell Failed"),sound:mn.taskFailed,settingsKey:"audioCues.notebookCellFailed",alertSettingsKey:"accessibility.alert.notebookCellFailed",alertMessage:g("audioCues.notebookCellFailed.alertMessage","Notebook Cell Failed")});Cn.diffLineInserted=Cn.register({name:g("audioCues.diffLineInserted","Diff Line Inserted"),sound:mn.diffLineInserted,settingsKey:"audioCues.diffLineInserted"});Cn.diffLineDeleted=Cn.register({name:g("audioCues.diffLineDeleted","Diff Line Deleted"),sound:mn.diffLineDeleted,settingsKey:"audioCues.diffLineDeleted"});Cn.diffLineModified=Cn.register({name:g("audioCues.diffLineModified","Diff Line Modified"),sound:mn.diffLineModified,settingsKey:"audioCues.diffLineModified"});Cn.chatRequestSent=Cn.register({name:g("audioCues.chatRequestSent","Chat Request Sent"),sound:mn.chatRequestSent,settingsKey:"audioCues.chatRequestSent",alertSettingsKey:"accessibility.alert.chatRequestSent",alertMessage:g("audioCues.chatRequestSent.alertMessage","Chat Request Sent")});Cn.chatResponseReceived=Cn.register({name:g("audioCues.chatResponseReceived","Chat Response Received"),settingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[mn.chatResponseReceived1,mn.chatResponseReceived2,mn.chatResponseReceived3,mn.chatResponseReceived4]}});Cn.chatResponsePending=Cn.register({name:g("audioCues.chatResponsePending","Chat Response Pending"),sound:mn.chatResponsePending,settingsKey:"audioCues.chatResponsePending",alertSettingsKey:"accessibility.alert.chatResponsePending",alertMessage:g("audioCues.chatResponsePending.alertMessage","Chat Response Pending")});Cn.clear=Cn.register({name:g("audioCues.clear","Clear"),sound:mn.clear,settingsKey:"audioCues.clear",alertSettingsKey:"accessibility.alert.clear",alertMessage:g("audioCues.clear.alertMessage","Clear")});Cn.save=Cn.register({name:g("audioCues.save","Save"),sound:mn.save,settingsKey:"audioCues.save",alertSettingsKey:"accessibility.alert.save",alertMessage:g("audioCues.save.alertMessage","Save")});Cn.format=Cn.register({name:g("audioCues.format","Format"),sound:mn.format,settingsKey:"audioCues.format",alertSettingsKey:"accessibility.alert.format",alertMessage:g("audioCues.format.alertMessage","Format")})});var AX,iot=P(()=>{nt();Ju();AX=class extends ue{constructor(e,t=[]){super(),this.logger=new RU([e,...t]),this._register(e.onDidChangeLogLevel(n=>this.setLevel(n)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}});function B2(i){not.push(i)}function oot(){return not.slice(0)}var not,d7=P(()=>{not=[]});function rot(i){return i&&typeof i=="object"&&(!i.overrideIdentifier||typeof i.overrideIdentifier=="string")&&(!i.resource||i.resource instanceof li)}function WN(i,e,t){if(!e||!(i instanceof OX))return;let n=[];Object.keys(e).forEach(o=>{mtt(o)&&n.push([`editor.${o}`,e[o]]),t&>t(o)&&n.push([`diffEditor.${o}`,e[o]])}),n.length>0&&i.updateValues(n)}var a8,Al,_4e,b4e,RX,y4e,C4e,w4e,PX,x4e,s8,S4e,OX,k4e,L4e,E4e,zX,D4e,T4e,I4e,M4e,N4e,A4e,R4e,P4e,Ki,FX=P(()=>{Kr();Xme();Qme();uet();a1();pet();Det();ftt();Ri();Qt();Gl();Xt();w5();nt();Mn();C4();Io();Fb();EY();c1();Mi();Kt();Dc();Wh();aI();$o();er();Yge();Xi();Nx();_i();btt();vs();Zge();O3();Xge();Stt();Kx();ic();xp();$f();Zx();Nv();I2();ec();fs();Ju();n2e();Id();Ttt();ztt();_it();xl();yit();Yv();Z$();Ha();Sit();rj();kit();Mnt();s4e();l7();Gnt();Yh();Dr();Knt();Znt();F4();Xnt();v$();Jnt();Ix();TN();A2();eot();sd();cf();Hm();tot();r8();iot();d7();Pi();ZK();_l();a8=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Al=function(i,e){return function(t,n){e(t,n,i)}},_4e=class{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new ge}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}},b4e=class{constructor(e){this.modelService=e}createModelReference(e){let t=this.modelService.getModel(e);return t?Promise.resolve(new QV(new _4e(t))):Promise.reject(new Error("Model not found"))}};b4e=a8([Al(0,no)],b4e);RX=class i{show(){return i.NULL_PROGRESS_RUNNER}async showWhile(e,t){await e}};RX.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};y4e=class{withProgress(e,t,n){return t({report:()=>{}})}},C4e=class{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}},w4e=class{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,t){let n=e;return t&&(n=n+` +`))}};H4.all=new Set;H4._None=new class extends H4{constructor(){super(0,null)}stop(){}branch(){return this}};H4._totals=0});var kAt,m4e,g4e,RX,eot=P(()=>{Vi();Xt();Yc();od();Nc();Io();A2();kAt=new Set([$i.inMemory,$i.vscodeSourceControl,$i.walkThrough,$i.walkThroughSnippet]),m4e=class{constructor(){this._byResource=new rs,this._byOwner=new Map}set(e,t,n){let o=this._byResource.get(e);o||(o=new Map,this._byResource.set(e,o)),o.set(t,n);let r=this._byOwner.get(t);r||(r=new rs,this._byOwner.set(t,r)),r.set(e,n)}get(e,t){let n=this._byResource.get(e);return n?.get(t)}delete(e,t){let n=!1,o=!1,r=this._byResource.get(e);r&&(n=r.delete(t));let s=this._byOwner.get(t);if(s&&(o=s.delete(e)),n!==o)throw new Error("illegal state");return n&&o}values(e){var t,n,o,r;return typeof e=="string"?(n=(t=this._byOwner.get(e))===null||t===void 0?void 0:t.values())!==null&&n!==void 0?n:un.empty():li.isUri(e)?(r=(o=this._byResource.get(e))===null||o===void 0?void 0:o.values())!==null&&r!==void 0?r:un.empty():un.map(un.concat(...this._byOwner.values()),s=>s[1])}},g4e=class{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new rs,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(let t of e){let n=this._data.get(t);n&&this._substract(n);let o=this._resourceStats(t);this._add(o),this._data.set(t,o)}}_resourceStats(e){let t={errors:0,warnings:0,infos:0,unknowns:0};if(kAt.has(e.scheme))return t;for(let{severity:n}of this._service.read({resource:e}))n===_r.Error?t.errors+=1:n===_r.Warning?t.warnings+=1:n===_r.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}},RX=class i{constructor(){this._onMarkerChanged=new TC({delay:0,merge:i._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new m4e,this._stats=new g4e(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(let n of t||[])this.changeOne(e,n,[])}changeOne(e,t,n){if(BV(n))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{let o=[];for(let r of n){let s=i._toMarker(e,t,r);s&&o.push(s)}this._data.set(t,e,o),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,n){let{code:o,severity:r,message:s,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:u,relatedInformation:h,tags:f}=n;if(s)return l=l>0?l:1,c=c>0?c:1,d=d>=l?d:l,u=u>0?u:c,{resource:t,owner:e,code:o,severity:r,message:s,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:u,relatedInformation:h,tags:f}}changeAll(e,t){let n=[],o=this._data.values(e);if(o)for(let r of o){let s=un.first(r);s&&(n.push(s.resource),this._data.delete(s.resource,e))}if(Nr(t)){let r=new rs;for(let{resource:s,marker:a}of t){let l=i._toMarker(e,s,a);if(!l)continue;let c=r.get(s);c?c.push(l):(r.set(s,[l]),n.push(s))}for(let[s,a]of r)this._data.set(s,e,a)}n.length>0&&this._onMarkerChanged.fire(n)}read(e=Object.create(null)){let{owner:t,resource:n,severities:o,take:r}=e;if((!r||r<0)&&(r=-1),t&&n){let s=this._data.get(n,t);if(s){let a=[];for(let l of s)if(i._accept(l,o)){let c=a.push(l);if(r>0&&c===r)break}return a}else return[]}else if(!t&&!n){let s=[];for(let a of this._data.values())for(let l of a)if(i._accept(l,o)){let c=s.push(l);if(r>0&&c===r)return s}return s}else{let s=this._data.values(n??t),a=[];for(let l of s)for(let c of l)if(i._accept(c,o)){let d=a.push(c);if(r>0&&d===r)return a}return a}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){let t=new rs;for(let n of e)for(let o of n)t.set(o,!0);return Array.from(t.keys())}}});var PX,tot=P(()=>{nt();Yge();Wg();Ys();PX=class extends ue{constructor(){super(...arguments),this._configurationModel=new ad}get configurationModel(){return this._configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=new ad;let e=jn.as(Yl.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){let n=this.getConfigurationDefaultOverrides();for(let o of e){let r=n[o],s=t[o];r!==void 0?this._configurationModel.addValue(o,r):s?this._configurationModel.addValue(o,s.default):this._configurationModel.removeValue(o)}}}});var _h,mn,v4e,Cn,s8=P(()=>{_i();Wt();_h=vi("audioCue"),mn=class i{static register(e){return new i(e.fileName)}constructor(e){this.fileName=e}};mn.error=mn.register({fileName:"error.mp3"});mn.warning=mn.register({fileName:"warning.mp3"});mn.foldedArea=mn.register({fileName:"foldedAreas.mp3"});mn.break=mn.register({fileName:"break.mp3"});mn.quickFixes=mn.register({fileName:"quickFixes.mp3"});mn.taskCompleted=mn.register({fileName:"taskCompleted.mp3"});mn.taskFailed=mn.register({fileName:"taskFailed.mp3"});mn.terminalBell=mn.register({fileName:"terminalBell.mp3"});mn.diffLineInserted=mn.register({fileName:"diffLineInserted.mp3"});mn.diffLineDeleted=mn.register({fileName:"diffLineDeleted.mp3"});mn.diffLineModified=mn.register({fileName:"diffLineModified.mp3"});mn.chatRequestSent=mn.register({fileName:"chatRequestSent.mp3"});mn.chatResponsePending=mn.register({fileName:"chatResponsePending.mp3"});mn.chatResponseReceived1=mn.register({fileName:"chatResponseReceived1.mp3"});mn.chatResponseReceived2=mn.register({fileName:"chatResponseReceived2.mp3"});mn.chatResponseReceived3=mn.register({fileName:"chatResponseReceived3.mp3"});mn.chatResponseReceived4=mn.register({fileName:"chatResponseReceived4.mp3"});mn.clear=mn.register({fileName:"clear.mp3"});mn.save=mn.register({fileName:"save.mp3"});mn.format=mn.register({fileName:"format.mp3"});v4e=class{constructor(e){this.randomOneOf=e}},Cn=class i{static register(e){let t=new v4e("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),n=new i(t,e.name,e.settingsKey,e.alertSettingsKey,e.alertMessage);return i._audioCues.add(n),n}constructor(e,t,n,o,r){this.sound=e,this.name=t,this.settingsKey=n,this.alertSettingsKey=o,this.alertMessage=r}};Cn._audioCues=new Set;Cn.error=Cn.register({name:g("audioCues.lineHasError.name","Error on Line"),sound:mn.error,settingsKey:"audioCues.lineHasError",alertSettingsKey:"accessibility.alert.error",alertMessage:g("audioCues.lineHasError.alertMessage","Error")});Cn.warning=Cn.register({name:g("audioCues.lineHasWarning.name","Warning on Line"),sound:mn.warning,settingsKey:"audioCues.lineHasWarning",alertSettingsKey:"accessibility.alert.warning",alertMessage:g("audioCues.lineHasWarning.alertMessage","Warning")});Cn.foldedArea=Cn.register({name:g("audioCues.lineHasFoldedArea.name","Folded Area on Line"),sound:mn.foldedArea,settingsKey:"audioCues.lineHasFoldedArea",alertSettingsKey:"accessibility.alert.foldedArea",alertMessage:g("audioCues.lineHasFoldedArea.alertMessage","Folded")});Cn.break=Cn.register({name:g("audioCues.lineHasBreakpoint.name","Breakpoint on Line"),sound:mn.break,settingsKey:"audioCues.lineHasBreakpoint",alertSettingsKey:"accessibility.alert.breakpoint",alertMessage:g("audioCues.lineHasBreakpoint.alertMessage","Breakpoint")});Cn.inlineSuggestion=Cn.register({name:g("audioCues.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:mn.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"});Cn.terminalQuickFix=Cn.register({name:g("audioCues.terminalQuickFix.name","Terminal Quick Fix"),sound:mn.quickFixes,settingsKey:"audioCues.terminalQuickFix",alertSettingsKey:"accessibility.alert.terminalQuickFix",alertMessage:g("audioCues.terminalQuickFix.alertMessage","Quick Fix")});Cn.onDebugBreak=Cn.register({name:g("audioCues.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:mn.break,settingsKey:"audioCues.onDebugBreak",alertSettingsKey:"accessibility.alert.onDebugBreak",alertMessage:g("audioCues.onDebugBreak.alertMessage","Breakpoint")});Cn.noInlayHints=Cn.register({name:g("audioCues.noInlayHints","No Inlay Hints on Line"),sound:mn.error,settingsKey:"audioCues.noInlayHints",alertSettingsKey:"accessibility.alert.noInlayHints",alertMessage:g("audioCues.noInlayHints.alertMessage","No Inlay Hints")});Cn.taskCompleted=Cn.register({name:g("audioCues.taskCompleted","Task Completed"),sound:mn.taskCompleted,settingsKey:"audioCues.taskCompleted",alertSettingsKey:"accessibility.alert.taskCompleted",alertMessage:g("audioCues.taskCompleted.alertMessage","Task Completed")});Cn.taskFailed=Cn.register({name:g("audioCues.taskFailed","Task Failed"),sound:mn.taskFailed,settingsKey:"audioCues.taskFailed",alertSettingsKey:"accessibility.alert.taskFailed",alertMessage:g("audioCues.taskFailed.alertMessage","Task Failed")});Cn.terminalCommandFailed=Cn.register({name:g("audioCues.terminalCommandFailed","Terminal Command Failed"),sound:mn.error,settingsKey:"audioCues.terminalCommandFailed",alertSettingsKey:"accessibility.alert.terminalCommandFailed",alertMessage:g("audioCues.terminalCommandFailed.alertMessage","Command Failed")});Cn.terminalBell=Cn.register({name:g("audioCues.terminalBell","Terminal Bell"),sound:mn.terminalBell,settingsKey:"audioCues.terminalBell",alertSettingsKey:"accessibility.alert.terminalBell",alertMessage:g("audioCues.terminalBell.alertMessage","Terminal Bell")});Cn.notebookCellCompleted=Cn.register({name:g("audioCues.notebookCellCompleted","Notebook Cell Completed"),sound:mn.taskCompleted,settingsKey:"audioCues.notebookCellCompleted",alertSettingsKey:"accessibility.alert.notebookCellCompleted",alertMessage:g("audioCues.notebookCellCompleted.alertMessage","Notebook Cell Completed")});Cn.notebookCellFailed=Cn.register({name:g("audioCues.notebookCellFailed","Notebook Cell Failed"),sound:mn.taskFailed,settingsKey:"audioCues.notebookCellFailed",alertSettingsKey:"accessibility.alert.notebookCellFailed",alertMessage:g("audioCues.notebookCellFailed.alertMessage","Notebook Cell Failed")});Cn.diffLineInserted=Cn.register({name:g("audioCues.diffLineInserted","Diff Line Inserted"),sound:mn.diffLineInserted,settingsKey:"audioCues.diffLineInserted"});Cn.diffLineDeleted=Cn.register({name:g("audioCues.diffLineDeleted","Diff Line Deleted"),sound:mn.diffLineDeleted,settingsKey:"audioCues.diffLineDeleted"});Cn.diffLineModified=Cn.register({name:g("audioCues.diffLineModified","Diff Line Modified"),sound:mn.diffLineModified,settingsKey:"audioCues.diffLineModified"});Cn.chatRequestSent=Cn.register({name:g("audioCues.chatRequestSent","Chat Request Sent"),sound:mn.chatRequestSent,settingsKey:"audioCues.chatRequestSent",alertSettingsKey:"accessibility.alert.chatRequestSent",alertMessage:g("audioCues.chatRequestSent.alertMessage","Chat Request Sent")});Cn.chatResponseReceived=Cn.register({name:g("audioCues.chatResponseReceived","Chat Response Received"),settingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[mn.chatResponseReceived1,mn.chatResponseReceived2,mn.chatResponseReceived3,mn.chatResponseReceived4]}});Cn.chatResponsePending=Cn.register({name:g("audioCues.chatResponsePending","Chat Response Pending"),sound:mn.chatResponsePending,settingsKey:"audioCues.chatResponsePending",alertSettingsKey:"accessibility.alert.chatResponsePending",alertMessage:g("audioCues.chatResponsePending.alertMessage","Chat Response Pending")});Cn.clear=Cn.register({name:g("audioCues.clear","Clear"),sound:mn.clear,settingsKey:"audioCues.clear",alertSettingsKey:"accessibility.alert.clear",alertMessage:g("audioCues.clear.alertMessage","Clear")});Cn.save=Cn.register({name:g("audioCues.save","Save"),sound:mn.save,settingsKey:"audioCues.save",alertSettingsKey:"accessibility.alert.save",alertMessage:g("audioCues.save.alertMessage","Save")});Cn.format=Cn.register({name:g("audioCues.format","Format"),sound:mn.format,settingsKey:"audioCues.format",alertSettingsKey:"accessibility.alert.format",alertMessage:g("audioCues.format.alertMessage","Format")})});var OX,iot=P(()=>{nt();Ju();OX=class extends ue{constructor(e,t=[]){super(),this.logger=new zU([e,...t]),this._register(e.onDidChangeLogLevel(n=>this.setLevel(n)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}});function B2(i){not.push(i)}function oot(){return not.slice(0)}var not,d7=P(()=>{not=[]});function rot(i){return i&&typeof i=="object"&&(!i.overrideIdentifier||typeof i.overrideIdentifier=="string")&&(!i.resource||i.resource instanceof li)}function WN(i,e,t){if(!e||!(i instanceof HX))return;let n=[];Object.keys(e).forEach(o=>{mtt(o)&&n.push([`editor.${o}`,e[o]]),t&>t(o)&&n.push([`diffEditor.${o}`,e[o]])}),n.length>0&&i.updateValues(n)}var l8,Al,_4e,b4e,zX,y4e,C4e,w4e,FX,x4e,a8,S4e,HX,k4e,L4e,E4e,BX,D4e,T4e,I4e,M4e,N4e,A4e,R4e,P4e,Ki,VX=P(()=>{Kr();Xme();Qme();uet();a1();pet();Det();ftt();Ri();Qt();Gl();Xt();w5();nt();Mn();C4();Io();Fb();IY();c1();Mi();Kt();Dc();Wh();aI();$o();er();Yge();Xi();Nx();_i();btt();vs();Zge();z3();Xge();Stt();Kx();ic();xp();$f();Zx();Av();I2();ec();fs();Ju();n2e();Id();Ttt();ztt();_it();xl();yit();Zv();J$();Ha();Sit();lj();kit();Mnt();s4e();l7();Gnt();Yh();Dr();Knt();Znt();F4();Xnt();y$();Jnt();Ix();TN();A2();eot();sd();cf();Hm();tot();s8();iot();d7();Pi();JK();_l();l8=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Al=function(i,e){return function(t,n){e(t,n,i)}},_4e=class{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new ge}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}},b4e=class{constructor(e){this.modelService=e}createModelReference(e){let t=this.modelService.getModel(e);return t?Promise.resolve(new tW(new _4e(t))):Promise.reject(new Error("Model not found"))}};b4e=l8([Al(0,no)],b4e);zX=class i{show(){return i.NULL_PROGRESS_RUNNER}async showWhile(e,t){await e}};zX.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};y4e=class{withProgress(e,t,n){return t({report:()=>{}})}},C4e=class{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}},w4e=class{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,t){let n=e;return t&&(n=n+` -`+t),Hn.confirm(n)}async prompt(e){var t,n;let o;if(this.doConfirm(e.message,e.detail)){let s=[...(t=e.buttons)!==null&&t!==void 0?t:[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&s.push(e.cancelButton),o=await((n=s[0])===null||n===void 0?void 0:n.run({checkboxChecked:!1}))}return{result:o}}async error(e,t){await this.prompt({type:lr.Error,message:e,detail:t})}},PX=class i{info(e){return this.notify({severity:lr.Info,message:e})}warn(e){return this.notify({severity:lr.Warning,message:e})}error(e){return this.notify({severity:lr.Error,message:e})}notify(e){switch(e.severity){case lr.Error:console.error(e.message);break;case lr.Warning:console.warn(e.message);break;default:console.log(e.message);break}return i.NO_OP}prompt(e,t,n,o){return i.NO_OP}status(e,t){return ue.None}};PX.NO_OP=new zK;x4e=class{constructor(e){this._onWillExecuteCommand=new ge,this._onDidExecuteCommand=new ge,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){let n=Zi.getCommand(e);if(!n)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});let o=this._instantiationService.invokeFunction.apply(this._instantiationService,[n.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(o)}catch(o){return Promise.reject(o)}}};x4e=a8([Al(0,qt)],x4e);s8=class extends IY{constructor(e,t,n,o,r,s){super(e,t,n,o,r),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];let a=f=>{let p=new Ye;p.add(Xe(f,Lt.KEY_DOWN,m=>{let y=new qn(m);this._dispatch(y,y.target)&&(y.preventDefault(),y.stopPropagation())})),p.add(Xe(f,Lt.KEY_UP,m=>{let y=new qn(m);this._singleModifierDispatch(y,y.target)&&y.preventDefault()})),this._domNodeListeners.push(new S4e(f,p))},l=f=>{for(let p=0;p{f.getOption(61)||a(f.getContainerDomNode())},d=f=>{f.getOption(61)||l(f.getContainerDomNode())};this._register(s.onCodeEditorAdd(c)),this._register(s.onCodeEditorRemove(d)),s.listCodeEditors().forEach(c);let u=f=>{a(f.getContainerDomNode())},h=f=>{l(f.getContainerDomNode())};this._register(s.onDiffEditorAdd(u)),this._register(s.onDiffEditorRemove(h)),s.listDiffEditors().forEach(u)}addDynamicKeybinding(e,t,n,o){return vl(Zi.registerCommand(e,n),this.addDynamicKeybindings([{keybinding:t,command:e,when:o}]))}addDynamicKeybindings(e){let t=e.map(n=>{var o;return{keybinding:TT(n.keybinding,Xa),command:(o=n.command)!==null&&o!==void 0?o:null,commandArgs:n.commandArgs,when:n.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}});return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),Yt(()=>{for(let n=0;nthis._log(n))}return this._cachedResolver}_documentHasFocus(){return Hn.document.hasFocus()}_toNormalizedKeybindingItems(e,t){let n=[],o=0;for(let r of e){let s=r.when||void 0,a=r.keybinding;if(!a)n[o++]=new qM(void 0,r.command,r.commandArgs,s,t,null,!1);else{let l=GM.resolveKeybinding(a,Xa);for(let c of l)n[o++]=new qM(c,r.command,r.commandArgs,s,t,null,!1)}}return n}resolveKeyboardEvent(e){let t=new Uf(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new GM([t],Xa)}};s8=a8([Al(0,ri),Al(1,eo),Al(2,Fs),Al(3,xo),Al(4,ks),Al(5,tn)],s8);S4e=class extends ue{constructor(e,t){super(),this.domNode=e,this._register(t)}};OX=class{constructor(){this._onDidChangeConfiguration=new ge,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;let e=new NX;this._configuration=new $M(e.reload(),new ad,new ad,new ad),e.dispose()}getValue(e,t){let n=typeof e=="string"?e:void 0,o=rot(e)?e:rot(t)?t:{};return this._configuration.getValue(n,o,void 0)}updateValues(e){let t={data:this._configuration.toData()},n=[];for(let o of e){let[r,s]=o;this.getValue(r)!==s&&(this._configuration.updateValue(r,s),n.push(r))}if(n.length>0){let o=new DY({keys:n,overrides:[]},t,this._configuration);o.source=8,this._onDidChangeConfiguration.fire(o)}return Promise.resolve()}updateValue(e,t,n,o){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}},k4e=class{constructor(e,t,n){this.configurationService=e,this.modelService=t,this.languageService=n,this._onDidChangeConfiguration=new ge,this.configurationService.onDidChangeConfiguration(o=>{this._onDidChangeConfiguration.fire({affectedKeys:o.affectedKeys,affectsConfiguration:(r,s)=>o.affectsConfiguration(s)})})}getValue(e,t,n){let o=ke.isIPosition(t)?t:null,r=o?typeof n=="string"?n:void 0:typeof t=="string"?t:void 0,s=e?this.getLanguage(e,o):void 0;return typeof r>"u"?this.configurationService.getValue({resource:e,overrideIdentifier:s}):this.configurationService.getValue(r,{resource:e,overrideIdentifier:s})}getLanguage(e,t){let n=this.modelService.getModel(e);return n?t?n.getLanguageIdAtPosition(t.lineNumber,t.column):n.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};k4e=a8([Al(0,Ni),Al(1,no),Al(2,Kn)],k4e);L4e=class{constructor(e){this.configurationService=e}getEOL(e,t){let n=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return n&&typeof n=="string"&&n!=="auto"?n:Ar||Wi?` +`+t),Hn.confirm(n)}async prompt(e){var t,n;let o;if(this.doConfirm(e.message,e.detail)){let s=[...(t=e.buttons)!==null&&t!==void 0?t:[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&s.push(e.cancelButton),o=await((n=s[0])===null||n===void 0?void 0:n.run({checkboxChecked:!1}))}return{result:o}}async error(e,t){await this.prompt({type:lr.Error,message:e,detail:t})}},FX=class i{info(e){return this.notify({severity:lr.Info,message:e})}warn(e){return this.notify({severity:lr.Warning,message:e})}error(e){return this.notify({severity:lr.Error,message:e})}notify(e){switch(e.severity){case lr.Error:console.error(e.message);break;case lr.Warning:console.warn(e.message);break;default:console.log(e.message);break}return i.NO_OP}prompt(e,t,n,o){return i.NO_OP}status(e,t){return ue.None}};FX.NO_OP=new BK;x4e=class{constructor(e){this._onWillExecuteCommand=new ge,this._onDidExecuteCommand=new ge,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){let n=Zi.getCommand(e);if(!n)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});let o=this._instantiationService.invokeFunction.apply(this._instantiationService,[n.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(o)}catch(o){return Promise.reject(o)}}};x4e=l8([Al(0,qt)],x4e);a8=class extends AY{constructor(e,t,n,o,r,s){super(e,t,n,o,r),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];let a=f=>{let p=new Ye;p.add(Xe(f,Lt.KEY_DOWN,m=>{let y=new qn(m);this._dispatch(y,y.target)&&(y.preventDefault(),y.stopPropagation())})),p.add(Xe(f,Lt.KEY_UP,m=>{let y=new qn(m);this._singleModifierDispatch(y,y.target)&&y.preventDefault()})),this._domNodeListeners.push(new S4e(f,p))},l=f=>{for(let p=0;p{f.getOption(61)||a(f.getContainerDomNode())},d=f=>{f.getOption(61)||l(f.getContainerDomNode())};this._register(s.onCodeEditorAdd(c)),this._register(s.onCodeEditorRemove(d)),s.listCodeEditors().forEach(c);let u=f=>{a(f.getContainerDomNode())},h=f=>{l(f.getContainerDomNode())};this._register(s.onDiffEditorAdd(u)),this._register(s.onDiffEditorRemove(h)),s.listDiffEditors().forEach(u)}addDynamicKeybinding(e,t,n,o){return vl(Zi.registerCommand(e,n),this.addDynamicKeybindings([{keybinding:t,command:e,when:o}]))}addDynamicKeybindings(e){let t=e.map(n=>{var o;return{keybinding:TT(n.keybinding,Xa),command:(o=n.command)!==null&&o!==void 0?o:null,commandArgs:n.commandArgs,when:n.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}});return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),Yt(()=>{for(let n=0;nthis._log(n))}return this._cachedResolver}_documentHasFocus(){return Hn.document.hasFocus()}_toNormalizedKeybindingItems(e,t){let n=[],o=0;for(let r of e){let s=r.when||void 0,a=r.keybinding;if(!a)n[o++]=new qM(void 0,r.command,r.commandArgs,s,t,null,!1);else{let l=GM.resolveKeybinding(a,Xa);for(let c of l)n[o++]=new qM(c,r.command,r.commandArgs,s,t,null,!1)}}return n}resolveKeyboardEvent(e){let t=new Uf(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new GM([t],Xa)}};a8=l8([Al(0,ri),Al(1,eo),Al(2,Fs),Al(3,xo),Al(4,ks),Al(5,tn)],a8);S4e=class extends ue{constructor(e,t){super(),this.domNode=e,this._register(t)}};HX=class{constructor(){this._onDidChangeConfiguration=new ge,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;let e=new PX;this._configuration=new $M(e.reload(),new ad,new ad,new ad),e.dispose()}getValue(e,t){let n=typeof e=="string"?e:void 0,o=rot(e)?e:rot(t)?t:{};return this._configuration.getValue(n,o,void 0)}updateValues(e){let t={data:this._configuration.toData()},n=[];for(let o of e){let[r,s]=o;this.getValue(r)!==s&&(this._configuration.updateValue(r,s),n.push(r))}if(n.length>0){let o=new MY({keys:n,overrides:[]},t,this._configuration);o.source=8,this._onDidChangeConfiguration.fire(o)}return Promise.resolve()}updateValue(e,t,n,o){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}},k4e=class{constructor(e,t,n){this.configurationService=e,this.modelService=t,this.languageService=n,this._onDidChangeConfiguration=new ge,this.configurationService.onDidChangeConfiguration(o=>{this._onDidChangeConfiguration.fire({affectedKeys:o.affectedKeys,affectsConfiguration:(r,s)=>o.affectsConfiguration(s)})})}getValue(e,t,n){let o=ke.isIPosition(t)?t:null,r=o?typeof n=="string"?n:void 0:typeof t=="string"?t:void 0,s=e?this.getLanguage(e,o):void 0;return typeof r>"u"?this.configurationService.getValue({resource:e,overrideIdentifier:s}):this.configurationService.getValue(r,{resource:e,overrideIdentifier:s})}getLanguage(e,t){let n=this.modelService.getModel(e);return n?t?n.getLanguageIdAtPosition(t.lineNumber,t.column):n.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};k4e=l8([Al(0,Ni),Al(1,no),Al(2,Kn)],k4e);L4e=class{constructor(e){this.configurationService=e}getEOL(e,t){let n=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return n&&typeof n=="string"&&n!=="auto"?n:Ar||Wi?` `:`\r -`}};L4e=a8([Al(0,Ni)],L4e);E4e=class{publicLog2(){}},zX=class i{constructor(){let e=li.from({scheme:i.SCHEME,authority:"model",path:"/"});this.workspace={id:i2e,folders:[new OY({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===i.SCHEME?this.workspace.folders[0]:null}};zX.SCHEME="inmemory";D4e=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){let n=Array.isArray(e)?e:$x.convert(e),o=new Map;for(let a of n){if(!(a instanceof Wv))throw new Error("bad edit - only text edits are supported");let l=this._modelService.getModel(a.resource);if(!l)throw new Error("bad edit - model not found");if(typeof a.versionId=="number"&&l.getVersionId()!==a.versionId)throw new Error("bad state - model changed in the meantime");let c=o.get(l);c||(c=[],o.set(l,c)),c.push(So.replaceMove(O.lift(a.textEdit.range),a.textEdit.text))}let r=0,s=0;for(let[a,l]of o)a.pushStackElement(),a.pushEditOperations([],l,()=>[]),a.pushStackElement(),s+=1,r+=l.length;return{ariaSummary:zf(WY.bulkEditServiceSummary,r,s),isApplied:r>0}}};D4e=a8([Al(0,no)],D4e);T4e=class{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return Il(e)}},I4e=class extends $Y{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,n){if(!t){let o=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();o&&(t=o.getContainerDomNode())}return super.showContextView(e,t,n)}};I4e=a8([Al(0,nf),Al(1,tn)],I4e);M4e=class{constructor(){this._neverEmitter=new ge,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}},N4e=class extends eN{constructor(){super()}},A4e=class extends AX{constructor(){super(new AU)}},R4e=class extends pZ{constructor(e,t,n,o,r,s){super(e,t,n,o,r,s),this.configure({blockMouse:!1})}};R4e=a8([Al(0,Fs),Al(1,xo),Al(2,Pc),Al(3,fn),Al(4,Mc),Al(5,ri)],R4e);P4e=class{async playAudioCue(e,t){}};ln(Ni,OX,0);ln(fw,k4e,0);ln(G$,L4e,0);ln(zm,zX,0);ln(Om,T4e,0);ln(Fs,E4e,0);ln(x2,w4e,0);ln(zx,C4e,0);ln(xo,PX,0);ln(yu,MX,0);ln(Kn,N4e,0);ln(sc,bX,0);ln(ks,A4e,0);ln(no,uN,0);ln(xw,vZ,0);ln(ri,DX,0);ln(RY,y4e,0);ln(mh,RX,0);ln(nl,sZ,0);ln(Oc,K$,0);ln(T2,D4e,0);ln(UY,M4e,0);ln(xs,b4e,0);ln(Ba,yX,0);ln(gh,HZ,0);ln(eo,x4e,0);ln(fn,s8,0);ln(ol,fX,0);ln(Pc,I4e,0);ln(Xr,gZ,0);ln(Pd,FN,0);ln(ca,R4e,0);ln(Mc,CX,0);ln(_h,P4e,0);(function(i){let e=new wp;for(let[l,c]of Khe())e.set(l,c);let t=new IX(e,!0);e.set(qt,t);function n(l){o||s({});let c=e.get(l);if(!c)throw new Error("Missing service "+l);return c instanceof oh?t.invokeFunction(d=>d.get(l)):c}i.get=n;let o=!1,r=new ge;function s(l){if(o)return t;o=!0;for(let[d,u]of Khe())e.get(d)||e.set(d,u);for(let d in l)if(l.hasOwnProperty(d)){let u=vi(d);e.get(u)instanceof oh&&e.set(u,l[d])}let c=oot();for(let d of c)try{t.createInstance(d)}catch(u){hi(u)}return r.fire(),t}i.initialize=s;function a(l){if(o)return l();let c=new Ye,d=c.add(r.event(()=>{d.dispose(),c.add(l())}));return c}i.withServices=a})(Ki||(Ki={}))});function aot(i){sot=i}function df(){return sot}function LAt(i){let e=new Array,t=[],n="";function o(s){if("length"in s)for(let a of s)a&&o(a);else"text"in s?(n+=`%c${s.text}`,e.push(s.style),s.data&&t.push(...s.data)):"data"in s&&t.push(...s.data)}o(i);let r=[n,...e];return r.push(...t),r}function TS(i){return Um(i,{color:"black"})}function UN(i){return Um(IAt(`${i}: `,10),{color:"black",bold:!0})}function Um(i,e={color:"black"}){function t(o){return Object.entries(o).reduce((r,[s,a])=>`${r}${s}:${a};`,"")}let n={color:e.color};return e.strikeThrough&&(n["text-decoration"]="line-through"),e.bold&&(n["font-weight"]="bold"),{text:i,style:t(n)}}function $N(i,e){switch(typeof i){case"number":return""+i;case"string":return i.length+2<=e?`"${i}"`:`"${i.substr(0,e-7)}"+...`;case"boolean":return i?"true":"false";case"undefined":return"undefined";case"object":return i===null?"null":Array.isArray(i)?EAt(i,e):DAt(i,e);case"symbol":return i.toString();case"function":return`[[Function${i.name?" "+i.name:""}]]`;default:return""+i}}function EAt(i,e){let t="[ ",n=!0;for(let o of i){if(n||(t+=", "),t.length-5>e){t+="...";break}n=!1,t+=`${$N(o,e-t.length)}`}return t+=" ]",t}function DAt(i,e){let t="{ ",n=!0;for(let[o,r]of Object.entries(i)){if(n||(t+=", "),t.length-5>e){t+="...";break}n=!1,t+=`${o}: ${$N(r,e-t.length)}`}return t+=" }",t}function TAt(i,e){let t="";for(let n=1;n<=e;n++)t+=i;return t}function IAt(i,e){for(;i.length{HX=class{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(e){return LAt([TS(TAt("| ",this.indentation)),e])}formatInfo(e){return e.hadValue?e.didChange?[TS(" "),Um($N(e.oldValue,70),{color:"red",strikeThrough:!0}),TS(" "),Um($N(e.newValue,60),{color:"green"})]:[TS(" (unchanged)")]:[TS(" "),Um($N(e.newValue,60),{color:"green"}),TS(" (initial)")]}handleObservableChanged(e,t){console.log(...this.textToConsoleArgs([UN("observable value changed"),Um(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}formatChanges(e){if(e.size!==0)return Um(" (changed deps: "+[...e].map(t=>t.debugName).join(", ")+")",{color:"gray"})}handleDerivedCreated(e){let t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,o)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,o]))}handleDerivedRecomputed(e,t){let n=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([UN("derived recomputed"),Um(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(n),{data:[{fn:e._computeFn}]}])),n.clear()}handleFromEventObservableTriggered(e,t){console.log(...this.textToConsoleArgs([UN("observable from event triggered"),Um(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),{data:[{fn:e._getValue}]}]))}handleAutorunCreated(e){let t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,o)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,o]))}handleAutorunTriggered(e){let t=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([UN("autorun"),Um(e.debugName,{color:"BlueViolet"}),this.formatChanges(t),{data:[{fn:e._runFn}]}])),t.clear(),this.indentation++}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let t=e.getDebugName();t===void 0&&(t=""),console.log(...this.textToConsoleArgs([UN("transaction"),Um(t,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}});function hot(i){uot=i}function fot(i){MAt=i}function mot(i){pot=i}function lo(i,e){let t=new MS(i,e);try{i(t)}finally{t.finish()}}function NS(i){if(BX)i(BX);else{let e=new MS(i,void 0);BX=e;try{i(e)}finally{e.finish(),BX=void 0}}}async function got(i,e){let t=new MS(i,e);try{await i(t)}finally{t.finish()}}function V2(i,e,t){i?e(i):lo(e,t)}function GN(i,e,t,n){var o;let r=O4e.get(i);if(r)return r;let s=NAt(i,e,t,n);if(s){let a=(o=lot.get(s))!==null&&o!==void 0?o:0;a++,lot.set(s,a);let l=a===1?s:`${s}#${a}`;return O4e.set(i,l),l}}function NAt(i,e,t,n){let o=O4e.get(i);if(o)return o;let r=n?AAt(n)+".":"",s;if(e!==void 0)if(typeof e=="function"){if(s=e(),s!==void 0)return r+s}else return r+e;if(t!==void 0&&(s=$m(t),s!==void 0))return r+s;if(n!==void 0){for(let a in n)if(n[a]===i)return r+a}}function AAt(i){var e;let t=dot.get(i);if(t)return t;let n=RAt(i),o=(e=cot.get(n))!==null&&e!==void 0?e:0;o++,cot.set(n,o);let r=o===1?n:`${n}#${o}`;return dot.set(i,r),r}function RAt(i){let e=i.constructor;return e?e.name:"Object"}function $m(i){let e=i.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(e),o=n?n[1]:void 0;return o?.trim()}function kn(i,e){return typeof i=="string"?new qN(void 0,i,e):new qN(i,void 0,e)}function l8(i,e){return typeof i=="string"?new VX(void 0,i,e):new VX(i,void 0,e)}var uot,MAt,pot,jN,B4,BX,MS,lot,O4e,cot,dot,qN,VX,c8=P(()=>{IS();jN=class{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){let n=t===void 0?void 0:e,o=t===void 0?e:t;return pot({owner:n,debugName:()=>{let r=$m(o);if(r!==void 0)return r;let a=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(o.toString());if(a)return`${this.debugName}.${a[2]}`;if(!n)return`${this.debugName} (mapped)`}},r=>o(this.read(r),r))}recomputeInitiallyAndOnChange(e,t){return e.add(uot(this,t)),this}},B4=class extends jN{constructor(){super(...arguments),this.observers=new Set}addObserver(e){let t=this.observers.size;this.observers.add(e),t===0&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}};MS=class{constructor(e,t){var n;this._fn=e,this._getDebugName=t,this.updatingObservers=[],(n=df())===null||n===void 0||n.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():$m(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){var e;let t=this.updatingObservers;for(let n=0;n{},()=>`Setting ${this.debugName}`));try{let s=this._value;this._setValue(e),(o=df())===null||o===void 0||o.handleObservableChanged(this,{oldValue:s,newValue:e,change:n,didChange:!0,hadValue:!0});for(let a of this.observers)t.updateObserver(a,this),a.handleChange(this,n)}finally{r&&r.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}};VX=class extends qN{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;(e=this._value)===null||e===void 0||e.dispose()}}});function Hi(i,e){return e!==void 0?new d8(i,void 0,e,void 0,void 0,void 0,AS):new d8(void 0,void 0,i,void 0,void 0,void 0,AS)}function RS(i,e){var t;return new d8(i.owner,i.debugName,e,void 0,void 0,i.onLastObserverRemoved,(t=i.equalityComparer)!==null&&t!==void 0?t:AS)}function z4e(i,e){var t;return new d8(i.owner,i.debugName,e,i.createEmptyChangeSummary,i.handleChange,void 0,(t=i.equalityComparer)!==null&&t!==void 0?t:AS)}function g1(i,e){let t,n;e===void 0?(t=i,n=void 0):(n=i,t=e);let o=new Ye;return new d8(n,()=>{var r;return(r=$m(t))!==null&&r!==void 0?r:"(anonymous)"},r=>(o.clear(),t(r,o)),void 0,void 0,()=>o.dispose(),AS)}function W2(i,e){let t,n;e===void 0?(t=i,n=void 0):(n=i,t=e);let o=new Ye;return new d8(n,()=>{var r;return(r=$m(t))!==null&&r!==void 0?r:"(anonymous)"},r=>{o.clear();let s=t(r);return s&&o.add(s),s},void 0,void 0,()=>o.dispose(),AS)}var AS,d8,KN=P(()=>{um();nt();c8();IS();AS=(i,e)=>i===e;mot(RS);d8=class extends B4{get debugName(){var e;return(e=GN(this,this._debugName,this._computeFn,this._owner))!==null&&e!==void 0?e:"(anonymous)"}constructor(e,t,n,o,r,s=void 0,a){var l,c;super(),this._owner=e,this._debugName=t,this._computeFn=n,this.createChangeSummary=o,this._handleChange=r,this._handleLastObserverRemoved=s,this._equalityComparator=a,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=(l=this.createChangeSummary)===null||l===void 0?void 0:l.call(this),(c=df())===null||c===void 0||c.handleDerivedCreated(this)}onLastObserverRemoved(){var e;this.state=0,this.value=void 0;for(let t of this.dependencies)t.removeObserver(this);this.dependencies.clear(),(e=this._handleLastObserverRemoved)===null||e===void 0||e.call(this)}get(){var e;if(this.observers.size===0){let t=this._computeFn(this,(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this));return this.onLastObserverRemoved(),t}else{do{if(this.state===1){for(let t of this.dependencies)if(t.reportChanges(),this.state===2)break}this.state===1&&(this.state=3),this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var e,t;if(this.state===3)return;let n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n;let o=this.state!==0,r=this.value;this.state=3;let s=this.changeSummary;this.changeSummary=(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this);try{this.value=this._computeFn(this,s)}finally{for(let l of this.dependenciesToBeRemoved)l.removeObserver(this);this.dependenciesToBeRemoved.clear()}let a=o&&!this._equalityComparator(r,this.value);if((t=df())===null||t===void 0||t.handleDerivedRecomputed(this,{oldValue:r,newValue:this.value,change:void 0,didChange:a,hadValue:o}),a)for(let l of this.observers)l.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;let t=this.updateCount===1;if(this.state===3&&(this.state=1,!t))for(let n of this.observers)n.handlePossibleChange(this);if(t)for(let n of this.observers)n.beginUpdate(this)}endUpdate(e){if(this.updateCount--,this.updateCount===0){let t=[...this.observers];for(let n of t)n.endUpdate(this)}zg(()=>this.updateCount>=0)}handlePossibleChange(e){if(this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(let t of this.observers)t.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){let n=this._handleChange?this._handleChange({changedObservable:e,change:t,didChange:r=>r===e},this.changeSummary):!0,o=this.state===3;if(n&&(this.state===1||o)&&(this.state=2,o))for(let r of this.observers)r.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);let t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){let t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){let t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}});function Ln(i){return new PS(void 0,i,void 0,void 0)}function u7(i,e){return new PS(i.debugName,e,void 0,void 0)}function U2(i,e){return new PS(i.debugName,e,i.createEmptyChangeSummary,i.handleChange)}function Rl(i){let e=new Ye,t=u7({debugName:()=>$m(i)||"(anonymous)"},n=>{e.clear(),i(n,e)});return Yt(()=>{t.dispose(),e.dispose()})}var PS,F4e=P(()=>{um();nt();c8();IS();PS=class{get debugName(){if(typeof this._debugName=="string")return this._debugName;if(typeof this._debugName=="function"){let t=this._debugName();if(t!==void 0)return t}let e=$m(this._runFn);return e!==void 0?e:"(anonymous)"}constructor(e,t,n,o){var r,s;this._debugName=e,this._runFn=t,this.createChangeSummary=n,this._handleChange=o,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=(r=this.createChangeSummary)===null||r===void 0?void 0:r.call(this),(s=df())===null||s===void 0||s.handleAutorunCreated(this),this._runIfNeeded(),s5(this)}dispose(){this.disposed=!0;for(let e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),a5(this)}_runIfNeeded(){var e,t,n;if(this.state===3)return;let o=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=o,this.state=3;let r=this.disposed;try{if(!r){(e=df())===null||e===void 0||e.handleAutorunTriggered(this);let s=this.changeSummary;this.changeSummary=(t=this.createChangeSummary)===null||t===void 0?void 0:t.call(this),this._runFn(this,s)}}finally{r||(n=df())===null||n===void 0||n.handleAutorunFinished(this);for(let s of this.dependenciesToBeRemoved)s.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(let e of this.dependencies)if(e.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,zg(()=>this.updateCount>=0)}handlePossibleChange(e){this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:o=>o===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);let t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}};(function(i){i.Observer=PS})(Ln||(Ln={}))});function u8(i){return new H4e(i)}function V4e(i,e){return new Promise(t=>{let n=!1,o=!1,r=i.map(a=>({isFinished:e(a),state:a})),s=Ln(a=>{let{isFinished:l,state:c}=r.read(a);l&&(n?s.dispose():o=!0,t(c))});n=!0,o&&s.dispose()})}function Ao(i,e){return new h7(i,e)}function Pl(i,e){return new B4e(i,e)}function f7(i){return typeof i=="string"?new WX(i):new WX(void 0,i)}function vot(i){let e=new UX(!1,void 0);return i.addObserver(e),Yt(()=>{i.removeObserver(e)})}function $2(i,e){let t=new UX(!0,e);return i.addObserver(t),e?e(i.get()):i.reportChanges(),Yt(()=>{i.removeObserver(t)})}function W4e(i){let e;return Hi(n=>(e=i(n,e),e))}var H4e,h7,B4e,WX,UX,_ot=P(()=>{nt();F4e();c8();KN();IS();H4e=class extends jN{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}};h7=class i extends B4{constructor(e,t){super(),this.event=e,this._getValue=t,this.hasValue=!1,this.handleEvent=n=>{var o;let r=this._getValue(n),s=this.value,a=!this.hasValue||s!==r,l=!1;a&&(this.value=r,this.hasValue&&(l=!0,V2(i.globalTransaction,c=>{var d;(d=df())===null||d===void 0||d.handleFromEventObservableTriggered(this,{oldValue:s,newValue:r,change:void 0,didChange:a,hadValue:this.hasValue});for(let u of this.observers)c.updateObserver(u,this),u.handleChange(this,void 0)},()=>{let c=this.getDebugName();return"Event fired"+(c?`: ${c}`:"")})),this.hasValue=!0),l||(o=df())===null||o===void 0||o.handleFromEventObservableTriggered(this,{oldValue:s,newValue:r,change:void 0,didChange:a,hadValue:this.hasValue})}}getDebugName(){return $m(this._getValue)}get debugName(){let e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}};(function(i){i.Observer=h7;function e(t,n){let o=!1;h7.globalTransaction===void 0&&(h7.globalTransaction=t,o=!0);try{n()}finally{o&&(h7.globalTransaction=void 0)}}i.batchEventsGlobally=e})(Ao||(Ao={}));B4e=class extends B4{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{lo(n=>{for(let o of this.observers)n.updateObserver(o,this),o.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}};WX=class extends B4{get debugName(){var e;return(e=GN(this,this._debugName,void 0,this._owner))!==null&&e!==void 0?e:"Observable Signal"}constructor(e,t){super(),this._debugName=e,this._owner=t}trigger(e,t){if(!e){lo(n=>{this.trigger(n,t)},()=>`Trigger signal ${this.debugName}`);return}for(let n of this.observers)e.updateObserver(n,this),n.handleChange(this,t)}get(){}};fot(vot);hot($2);UX=class{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,this._counter===0&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}}});var PAt,Is=P(()=>{c8();KN();F4e();_ot();IS();PAt=!1;PAt&&aot(new HX)});var bot=P(()=>{});var xu,p7=P(()=>{xu=class i{static capture(e){if(e.getScrollTop()===0||e.hasPendingScrollAnimation())return new i(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,n=0,o=e.getVisibleRanges();if(o.length>0){t=o[0].getStartPosition();let r=e.getTopForPosition(t.lineNumber,t.column);n=e.getScrollTop()-r}return new i(e.getScrollTop(),e.getContentHeight(),t,n,e.getPosition())}constructor(e,t,n,o,r){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=n,this._visiblePositionScrollDelta=o,this._cursorPosition=r}restore(e){if(!(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())&&this._visiblePosition){let t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;let t=e.getPosition();if(!this._cursorPosition||!t)return;let n=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+n)}}});function jX(){return uT&&!!uT.VSCODE_DEV}function U4e(i){if(jX()){let e=OAt();return e.add(i),{dispose(){e.delete(i)}}}else return{dispose(){}}}function OAt(){$X||($X=new Set);let i=globalThis;return i.$hotReload_applyNewExports||(i.$hotReload_applyNewExports=e=>{for(let t of $X){let n=t(e);if(n)return n}}),$X}var $X,yot=P(()=>{Tue();jX()&&U4e(({oldExports:i,newSrc:e})=>{if(e.indexOf("/* hot-reload:patch-prototype-methods */")!==-1)return t=>{var n,o;for(let r in t){let s=t[r];if(console.log(`[hot-reload] Patching prototype methods of '${r}'`,{exportedItem:s}),typeof s=="function"&&s.prototype){let a=i[r];if(a){for(let l of Object.getOwnPropertyNames(s.prototype)){let c=Object.getOwnPropertyDescriptor(s.prototype,l),d=Object.getOwnPropertyDescriptor(a.prototype,l);((n=c?.value)===null||n===void 0?void 0:n.toString())!==((o=d?.value)===null||o===void 0?void 0:o.toString())&&console.log(`[hot-reload] Patching prototype method '${r}.${l}'`),Object.defineProperty(a.prototype,l,c)}t[r]=a}}}return!0}})});function Cot(i,e,t,n){if(i.length===0)return e;if(e.length===0)return i;let o=[],r=0,s=0;for(;rd?(o.push(l),s++):(o.push(n(a,l)),r++,s++)}for(;r`Apply decorations from ${e.debugName}`},o=>{let r=e.read(o);n.set(r)})),t.add({dispose:()=>{n.clear()}}),t}function YN(i,e){return i.appendChild(e),Yt(()=>{i.removeChild(e)})}function $4e(i,e,t){let n=e.get(),o=n,r=n,s=kn("animatedValue",n),a=-1,l=300,c;t.add(U2({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(u,h)=>(u.didChange(e)&&(h.animate=h.animate||u.change),!0)},(u,h)=>{c!==void 0&&(i.cancelAnimationFrame(c),c=void 0),o=r,n=e.read(u),a=Date.now()-(h.animate?0:l),d()}));function d(){let u=Date.now()-a;r=Math.floor(zAt(u,o,n-o,l)),u{for(let[n,o]of Object.entries(e))o&&typeof o=="object"&&"read"in o&&(o=o.read(t)),typeof o=="number"&&(o=`${o}px`),n=n.replace(/[A-Z]/g,r=>"-"+r.toLowerCase()),i.style[n]=o})}function v1(i,e){return FAt([i],e),i}function FAt(i,e){jX()&&Pl("reload",n=>U4e(({oldExports:o})=>{if([...Object.values(o)].some(r=>i.includes(r)))return r=>(n(void 0),!0)})).read(e)}function HS(i,e,t,n){let o=new Ye,r=[];return o.add(Rl((s,a)=>{let l=e.read(s),c=new Map,d=new Map;t&&t(!0),i.changeViewZones(u=>{for(let h of r)u.removeZone(h),n?.delete(h);r.length=0;for(let h of l){let f=u.addZone(h);h.setZoneId&&h.setZoneId(f),r.push(f),n?.add(f),c.set(h,f)}}),t&&t(!1),a.add(U2({createEmptyChangeSummary(){return{zoneIds:[]}},handleChange(u,h){let f=d.get(u.changedObservable);return f!==void 0&&h.zoneIds.push(f),!0}},(u,h)=>{for(let f of l)f.onChange&&(d.set(f.onChange,c.get(f)),f.onChange.read(u));t&&t(!0),i.changeViewZones(f=>{for(let p of h.zoneIds)f.layoutZone(p)}),t&&t(!1)}))})),o.add({dispose(){t&&t(!0),i.changeViewZones(s=>{for(let a of r)s.removeZone(a)}),n?.clear(),t&&t(!1)}}),o}function j4e(i,e){let t=o4(e,o=>o.original.startLineNumber<=i.lineNumber);if(!t)return O.fromPositions(i);if(t.original.endLineNumberExclusive<=i.lineNumber){let o=i.lineNumber-t.original.endLineNumberExclusive+t.modified.endLineNumberExclusive;return O.fromPositions(new ke(o,i.column))}if(!t.innerChanges)return O.fromPositions(new ke(t.modified.startLineNumber,1));let n=o4(t.innerChanges,o=>o.originalRange.getStartPosition().isBeforeOrEqual(i));if(!n){let o=i.lineNumber-t.original.startLineNumber+t.modified.startLineNumber;return O.fromPositions(new ke(o,i.column))}if(n.originalRange.containsPosition(i))return n.modifiedRange;{let o=HAt(n.originalRange.getEndPosition(),i);return O.fromPositions(BAt(n.modifiedRange.getEndPosition(),o))}}function HAt(i,e){return i.lineNumber===e.lineNumber?new yv(0,e.column-i.column):new yv(e.lineNumber-i.lineNumber,e.column-1)}function BAt(i,e){return e.lineCount===0?new ke(i.lineNumber,i.column+e.columnCount):new ke(i.lineNumber+e.lineCount,e.columnCount+1)}function ZN(i,e,t){let n=i.bindTo(e);return u7({debugName:()=>`Update ${i.key}`},o=>{n.set(t(o))})}function wot(i,e){let t;return i.filter(n=>{let o=e(n,t);return t=n,o})}var OS,zS,h8,qX,GX,kp=P(()=>{rh();mo();yot();nt();Is();Xfe();Mi();Kt();Tm();OS=class extends ue{get width(){return this._width}get height(){return this._height}constructor(e,t){super(),this.elementSizeObserver=this._register(new Sw(e,t)),this._width=kn(this,this.elementSizeObserver.getWidth()),this._height=kn(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(n=>lo(o=>{this._width.set(this.elementSizeObserver.getWidth(),o),this._height.set(this.elementSizeObserver.getHeight(),o)})))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}};zS=class extends ue{constructor(e,t,n){super(),this._register(new qX(e,n)),this._register(Sp(n,{height:t.actualHeight,top:t.actualTop}))}},h8=class{get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,t){this._afterLineNumber=e,this.heightInPx=t,this.domNode=document.createElement("div"),this._actualTop=kn(this,void 0),this._actualHeight=kn(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=n=>{this._actualTop.set(n,void 0)},this.onComputedHeight=n=>{this._actualHeight.set(n,void 0)}}},qX=class i{constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId=`managedOverlayWidget-${i._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}};qX._counter=0;GX=class extends Jn{dispose(){super.dispose(!0)}}});var xot=P(()=>{});function $At(i,e,t){let n=[];for(let o of gC(i,(r,s)=>s.modified.startLineNumber-r.modified.endLineNumberExclusive<2*XN)){let r=[];r.push(new K4e);let s=new rn(Math.max(1,o[0].original.startLineNumber-XN),Math.min(o[o.length-1].original.endLineNumberExclusive+XN,e+1)),a=new rn(Math.max(1,o[0].modified.startLineNumber-XN),Math.min(o[o.length-1].modified.endLineNumberExclusive+XN,t+1));OV(o,(d,u)=>{let h=new rn(d?d.original.endLineNumberExclusive:s.startLineNumber,u?u.original.startLineNumber:s.endLineNumberExclusive),f=new rn(d?d.modified.endLineNumberExclusive:a.startLineNumber,u?u.modified.startLineNumber:a.endLineNumberExclusive);h.forEach(p=>{r.push(new X4e(p,f.startLineNumber+(p-h.startLineNumber)))}),u&&(u.original.forEach(p=>{r.push(new Y4e(u,p))}),u.modified.forEach(p=>{r.push(new Z4e(u,p))}))});let l=o[0].modified.join(o[o.length-1].modified),c=o[0].original.join(o[o.length-1].original);n.push(new G4e(new cu(l,c),r))}return n}var J4e,e6e,VAt,WAt,UAt,V4,q4e,XN,Od,G4e,K4e,Y4e,Z4e,X4e,Q4e,Sot=P(()=>{Qt();Vg();u1();o1();Ra();Vi();Go();nt();Is();or();Vf();kp();Ks();sh();Xf();Mi();Kt();iv();Ha();Yg();av();ap();Wt();r8();_i();m1();xot();J4e=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},e6e=function(i,e){return function(t,n){e(t,n,i)}},VAt=Yo("diff-review-insert",kt.add,g("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer.")),WAt=Yo("diff-review-remove",kt.remove,g("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer.")),UAt=Yo("diff-review-close",kt.close,g("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer.")),V4=class extends ue{constructor(e,t,n,o,r,s,a,l,c){super(),this._parentNode=e,this._visible=t,this._setVisible=n,this._canClose=o,this._width=r,this._height=s,this._diffs=a,this._editors=l,this._instantiationService=c,this._state=g1(this,(d,u)=>{let h=this._visible.read(d);if(this._parentNode.style.visibility=h?"visible":"hidden",!h)return null;let f=u.add(this._instantiationService.createInstance(q4e,this._diffs,this._editors,this._setVisible,this._canClose)),p=u.add(this._instantiationService.createInstance(Q4e,this._parentNode,f,this._width,this._height,this._editors));return{model:f,view:p}}).recomputeInitiallyAndOnChange(this._store)}next(){lo(e=>{let t=this._visible.get();this._setVisible(!0,e),t&&this._state.get().model.nextGroup(e)})}prev(){lo(e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)})}close(){lo(e=>{this._setVisible(!1,e)})}};V4._ttPolicy=td("diffReview",{createHTML:i=>i});V4=J4e([e6e(8,qt)],V4);q4e=class extends ue{constructor(e,t,n,o,r){super(),this._diffs=e,this._editors=t,this._setVisible=n,this.canClose=o,this._audioCueService=r,this._groups=kn(this,[]),this._currentGroupIdx=kn(this,0),this._currentElementIdx=kn(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((s,a)=>this._groups.read(a)[s]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((s,a)=>{var l;return(l=this.currentGroup.read(a))===null||l===void 0?void 0:l.lines[s]}),this._register(Ln(s=>{let a=this._diffs.read(s);if(!a){this._groups.set([],void 0);return}let l=$At(a,this._editors.original.getModel().getLineCount(),this._editors.modified.getModel().getLineCount());lo(c=>{let d=this._editors.modified.getPosition();if(d){let u=l.findIndex(h=>d?.lineNumber{let a=this.currentElement.read(s);a?.type===Od.Deleted?this._audioCueService.playAudioCue(Cn.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):a?.type===Od.Added&&this._audioCueService.playAudioCue(Cn.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register(Ln(s=>{var a;let l=this.currentElement.read(s);if(l&&l.type!==Od.Header){let c=(a=l.modifiedLineNumber)!==null&&a!==void 0?a:l.diff.modified.startLineNumber;this._editors.modified.setSelection(O.fromPositions(new ke(c,1)))}}))}_goToGroupDelta(e,t){let n=this.groups.get();!n||n.length<=1||V2(t,o=>{this._currentGroupIdx.set(Pn.ofLength(n.length).clipCyclic(this._currentGroupIdx.get()+e),o),this._currentElementIdx.set(0,o)})}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){let t=this.currentGroup.get();!t||t.lines.length<=1||lo(n=>{this._currentElementIdx.set(Pn.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),n)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){let t=this.currentGroup.get();if(!t)return;let n=t.lines.indexOf(e);n!==-1&&lo(o=>{this._currentElementIdx.set(n,o)})}revealCurrentElementInEditor(){this._setVisible(!1,void 0);let e=this.currentElement.get();e&&(e.type===Od.Deleted?(this._editors.original.setSelection(O.fromPositions(new ke(e.originalLineNumber,1))),this._editors.original.revealLine(e.originalLineNumber),this._editors.original.focus()):(e.type!==Od.Header&&(this._editors.modified.setSelection(O.fromPositions(new ke(e.modifiedLineNumber,1))),this._editors.modified.revealLine(e.modifiedLineNumber)),this._editors.modified.focus()))}close(){this._setVisible(!1,void 0),this._editors.modified.focus()}};q4e=J4e([e6e(4,_h)],q4e);XN=3;(function(i){i[i.Header=0]="Header",i[i.Unchanged=1]="Unchanged",i[i.Deleted=2]="Deleted",i[i.Added=3]="Added"})(Od||(Od={}));G4e=class{constructor(e,t){this.range=e,this.lines=t}},K4e=class{constructor(){this.type=Od.Header}},Y4e=class{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=Od.Deleted,this.modifiedLineNumber=void 0}},Z4e=class{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=Od.Added,this.originalLineNumber=void 0}},X4e=class{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=Od.Unchanged}},Q4e=class extends ue{constructor(e,t,n,o,r,s){super(),this._element=e,this._model=t,this._width=n,this._height=o,this._editors=r,this._languageService=s,this.domNode=this._element,this.domNode.className="diff-review monaco-editor-background";let a=document.createElement("div");a.className="diff-review-actions",this._actionBar=this._register(new Bs(a)),this._register(Ln(l=>{this._actionBar.clear(),this._model.canClose.read(l)&&this._actionBar.push(new zs("diffreview.close",g("label.close","Close"),"close-diff-review "+ui.asClassName(UAt),!0,async()=>t.close()),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new gp(this._content,{})),ns(this.domNode,this._scrollbar.getDomNode(),a),this._register(Yt(()=>{ns(this.domNode)})),this._register(Sp(this.domNode,{width:this._width,height:this._height})),this._register(Sp(this._content,{width:this._width,height:this._height})),this._register(Rl((l,c)=>{this._model.currentGroup.read(l),this._render(c)})),this._register(go(this.domNode,"keydown",l=>{(l.equals(18)||l.equals(2066)||l.equals(530))&&(l.preventDefault(),this._model.goToNextLine()),(l.equals(16)||l.equals(2064)||l.equals(528))&&(l.preventDefault(),this._model.goToPreviousLine()),(l.equals(9)||l.equals(2057)||l.equals(521)||l.equals(1033))&&(l.preventDefault(),this._model.close()),(l.equals(10)||l.equals(3))&&(l.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(e){let t=this._editors.original.getOptions(),n=this._editors.modified.getOptions(),o=document.createElement("div");o.className="diff-review-table",o.setAttribute("role","list"),o.setAttribute("aria-label",g("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate.")),Gr(o,n.get(50)),ns(this._content,o);let r=this._editors.original.getModel(),s=this._editors.modified.getModel();if(!r||!s)return;let a=r.getOptions(),l=s.getOptions(),c=n.get(66),d=this._model.currentGroup.get();for(let u of d?.lines||[]){if(!d)break;let h;if(u.type===Od.Header){let p=document.createElement("div");p.className="diff-review-row",p.setAttribute("role","listitem");let m=d.range,y=this._model.currentGroupIndex.get(),_=this._model.groups.get().length,v=S=>S===0?g("no_lines_changed","no lines changed"):S===1?g("one_line_changed","1 line changed"):g("more_lines_changed","{0} lines changed",S),b=v(m.original.length),C=v(m.modified.length);p.setAttribute("aria-label",g({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",y+1,_,m.original.startLineNumber,b,m.modified.startLineNumber,C));let w=document.createElement("div");w.className="diff-review-cell diff-review-summary",w.appendChild(document.createTextNode(`${y+1}/${_}: @@ -${m.original.startLineNumber},${m.original.length} +${m.modified.startLineNumber},${m.modified.length} @@`)),p.appendChild(w),h=p}else h=this._createRow(u,c,this._width.get(),t,r,a,n,s,l);o.appendChild(h);let f=Hi(p=>this._model.currentElement.read(p)===u);e.add(Ln(p=>{let m=f.read(p);h.tabIndex=m?0:-1,m&&h.focus()})),e.add(Xe(h,"focus",()=>{this._model.goToLine(u)}))}this._scrollbar.scanDomNode()}_createRow(e,t,n,o,r,s,a,l,c){let d=o.get(143),u=d.glyphMarginWidth+d.lineNumbersWidth,h=a.get(143),f=10+h.glyphMarginWidth+h.lineNumbersWidth,p="diff-review-row",m="",y="diff-review-spacer",_=null;switch(e.type){case Od.Added:p="diff-review-row line-insert",m=" char-insert",_=VAt;break;case Od.Deleted:p="diff-review-row line-delete",m=" char-delete",_=WAt;break}let v=document.createElement("div");v.style.minWidth=n+"px",v.className=p,v.setAttribute("role","listitem"),v.ariaLevel="";let b=document.createElement("div");b.className="diff-review-cell",b.style.height=`${t}px`,v.appendChild(b);let C=document.createElement("span");C.style.width=u+"px",C.style.minWidth=u+"px",C.className="diff-review-line-number"+m,e.originalLineNumber!==void 0?C.appendChild(document.createTextNode(String(e.originalLineNumber))):C.innerText="\xA0",b.appendChild(C);let w=document.createElement("span");w.style.width=f+"px",w.style.minWidth=f+"px",w.style.paddingRight="10px",w.className="diff-review-line-number"+m,e.modifiedLineNumber!==void 0?w.appendChild(document.createTextNode(String(e.modifiedLineNumber))):w.innerText="\xA0",b.appendChild(w);let S=document.createElement("span");if(S.className=y,_){let D=document.createElement("span");D.className=ui.asClassName(_),D.innerText="\xA0\xA0",S.appendChild(D)}else S.innerText="\xA0\xA0";b.appendChild(S);let x;if(e.modifiedLineNumber!==void 0){let D=this._getLineHtml(l,a,c.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);V4._ttPolicy&&(D=V4._ttPolicy.createHTML(D)),b.insertAdjacentHTML("beforeend",D),x=l.getLineContent(e.modifiedLineNumber)}else{let D=this._getLineHtml(r,o,s.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);V4._ttPolicy&&(D=V4._ttPolicy.createHTML(D)),b.insertAdjacentHTML("beforeend",D),x=r.getLineContent(e.originalLineNumber)}x.length===0&&(x=g("blankLine","blank"));let k="";switch(e.type){case Od.Unchanged:e.originalLineNumber===e.modifiedLineNumber?k=g({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",x,e.originalLineNumber):k=g("equalLine","{0} original line {1} modified line {2}",x,e.originalLineNumber,e.modifiedLineNumber);break;case Od.Added:k=g("insertLine","+ {0} modified line {1}",x,e.modifiedLineNumber);break;case Od.Deleted:k=g("deleteLine","- {0} original line {1}",x,e.originalLineNumber);break}return v.setAttribute("aria-label",k),v}_getLineHtml(e,t,n,o,r){let s=e.getLineContent(o),a=t.get(50),l=Es.createEmpty(s,r),c=Ed.isBasicASCII(s,e.mightContainNonBasicASCII()),d=Ed.containsRTL(s,c,e.mightContainRTL());return _w(new uu(a.isMonospace&&!t.get(33),a.canUseHalfwidthRightwardsArrow,s,!1,c,d,0,l,[],n,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,t.get(116),t.get(98),t.get(93),t.get(51)!==qu.OFF,null)).html}};Q4e=J4e([e6e(5,Kn)],Q4e)});var W4,t6e,KX,i6e=P(()=>{Qt();u1();Ra();Vi();rh();Go();nt();Is();or();kp();Xf();Wt();W4=class i extends ue{constructor(e,t,n,o,r){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=n,this._modifiedEditorLayoutInfo=o,this._editors=r,this._originalScrollTop=Ao(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Ao(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=Pl("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=kn(this,0),this._modifiedViewZonesChangedSignal=Pl("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=Pl("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=g1(this,(h,f)=>{var p;this._element.replaceChildren();let m=this._diffModel.read(h),y=(p=m?.diff.read(h))===null||p===void 0?void 0:p.movedTexts;if(!y||y.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(h);let _=this._originalEditorLayoutInfo.read(h),v=this._modifiedEditorLayoutInfo.read(h);if(!_||!v){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(h),this._originalViewZonesChangedSignal.read(h);let b=y.map(E=>{function A(ie,fe){let K=fe.getTopForLineNumber(ie.startLineNumber,!0),oe=fe.getTopForLineNumber(ie.endLineNumberExclusive,!0);return(K+oe)/2}let T=A(E.lineRangeMapping.original,this._editors.original),L=this._originalScrollTop.read(h),I=A(E.lineRangeMapping.modified,this._editors.modified),M=this._modifiedScrollTop.read(h),N=T-L,z=I-M,F=Math.min(T,I),V=Math.max(T,I);return{range:new Pn(F,V),from:N,to:z,fromWithoutScroll:T,toWithoutScroll:I,move:E}});b.sort(hje(Sc(E=>E.fromWithoutScroll>E.toWithoutScroll,fje),Sc(E=>E.fromWithoutScroll>E.toWithoutScroll?E.fromWithoutScroll:-E.toWithoutScroll,Nf)));let C=t6e.compute(b.map(E=>E.range)),w=10,S=_.verticalScrollbarWidth,x=(C.getTrackCount()-1)*10+w*2,k=S+x+(v.contentLeft-i.movedCodeBlockPadding),D=0;for(let E of b){let A=C.getTrack(D),T=S+w+A*10,L=15,I=15,M=k,N=v.glyphMarginWidth+v.lineNumbersWidth,z=18,F=document.createElementNS("http://www.w3.org/2000/svg","rect");F.classList.add("arrow-rectangle"),F.setAttribute("x",`${M-N}`),F.setAttribute("y",`${E.to-z/2}`),F.setAttribute("width",`${N}`),F.setAttribute("height",`${z}`),this._element.appendChild(F);let V=document.createElementNS("http://www.w3.org/2000/svg","g"),ie=document.createElementNS("http://www.w3.org/2000/svg","path");ie.setAttribute("d",`M 0 ${E.from} L ${T} ${E.from} L ${T} ${E.to} L ${M-I} ${E.to}`),ie.setAttribute("fill","none"),V.appendChild(ie);let fe=document.createElementNS("http://www.w3.org/2000/svg","polygon");fe.classList.add("arrow"),f.add(Ln(K=>{ie.classList.toggle("currentMove",E.move===m.activeMovedText.read(K)),fe.classList.toggle("currentMove",E.move===m.activeMovedText.read(K))})),fe.setAttribute("points",`${M-I},${E.to-L/2} ${M},${E.to} ${M-I},${E.to+L/2}`),V.appendChild(fe),this._element.appendChild(V),D++}this.width.set(x,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register(Yt(()=>this._element.remove())),this._register(Ln(h=>{let f=this._originalEditorLayoutInfo.read(h),p=this._modifiedEditorLayoutInfo.read(h);!f||!p||(this._element.style.left=`${f.width-f.verticalScrollbarWidth}px`,this._element.style.height=`${f.height}px`,this._element.style.width=`${f.verticalScrollbarWidth+f.contentLeft-i.movedCodeBlockPadding+this.width.read(h)}px`)})),this._register($2(this._state));let s=Hi(h=>{let f=this._diffModel.read(h),p=f?.diff.read(h);return p?p.movedTexts.map(m=>({move:m,original:new h8(u8(m.lineRangeMapping.original.startLineNumber-1),18),modified:new h8(u8(m.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register(HS(this._editors.original,s.map(h=>h.map(f=>f.original)))),this._register(HS(this._editors.modified,s.map(h=>h.map(f=>f.modified)))),this._register(Rl((h,f)=>{let p=s.read(h);for(let m of p)f.add(new KX(this._editors.original,m.original,m.move,"original",this._diffModel.get())),f.add(new KX(this._editors.modified,m.modified,m.move,"modified",this._diffModel.get()))}));let a=Ao(this._editors.original.onDidChangeCursorPosition,()=>this._editors.original.getPosition()),l=Ao(this._editors.modified.onDidChangeCursorPosition,()=>this._editors.modified.getPosition()),c=Pl("original.onDidFocusEditorWidget",h=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>h(void 0),0))),d=Pl("modified.onDidFocusEditorWidget",h=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>h(void 0),0))),u="modified";this._register(U2({createEmptyChangeSummary:()=>{},handleChange:(h,f)=>(h.didChange(c)&&(u="original"),h.didChange(d)&&(u="modified"),!0)},h=>{c.read(h),d.read(h);let f=this._diffModel.read(h);if(!f)return;let p=f.diff.read(h),m;if(p&&u==="original"){let y=a.read(h);y&&(m=p.movedTexts.find(_=>_.lineRangeMapping.original.contains(y.lineNumber)))}if(p&&u==="modified"){let y=l.read(h);y&&(m=p.movedTexts.find(_=>_.lineRangeMapping.modified.contains(y.lineNumber)))}m!==f.movedTextToCompare.get()&&f.movedTextToCompare.set(void 0,void 0),f.setActiveMovedText(m)}))}};W4.movedCodeBlockPadding=4;t6e=class i{static compute(e){let t=[],n=[];for(let o of e){let r=t.findIndex(s=>!s.intersectsStrict(o));r===-1&&(t.length>=6?r=JGe(t,Sc(a=>a.intersectWithRangeLength(o),Nf)):(r=t.length,t.push(new H$))),t[r].addRange(o),n.push(r)}return new i(t.length,n)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}},KX=class extends zS{constructor(e,t,n,o,r){let s=Do("div.diff-hidden-lines-widget");super(e,t,s.root),this._editor=e,this._move=n,this._kind=o,this._diffModel=r,this._nodes=Do("div.diff-moved-code-block",{style:{marginRight:"4px"}},[Do("div.text-content@textContent"),Do("div.action-bar@actionBar")]),s.root.appendChild(this._nodes.root);let a=Ao(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register(Sp(this._nodes.root,{paddingRight:a.map(h=>h.verticalScrollbarWidth)}));let l;n.changes.length>0?l=this._kind==="original"?g("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):g("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):l=this._kind==="original"?g("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):g("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);let c=this._register(new Bs(this._nodes.actionBar,{highlightToggledItems:!0})),d=new zs("",l,"",!1);c.push(d,{icon:!1,label:!0});let u=new zs("","Compare",ui.asClassName(kt.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===n?void 0:this._move,void 0)});this._register(Ln(h=>{let f=this._diffModel.movedTextToCompare.read(h)===n;u.checked=f})),c.push(u,{icon:!1,label:!0})}}});var Snn,knn,Lnn,jAt,n6e,o6e,r6e,s6e,a6e,l6e,kot,Lot,QN,Eot,Dot,YX=P(()=>{Go();or();ea();Wt();pr();m1();Snn=me("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},g("diffEditor.move.border","The border color for text that got moved in the diff editor.")),knn=me("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},g("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor.")),Lnn=me("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},g("diffEditor.unchangedRegionShadow","The color of the shadow around unchanged region widgets.")),jAt=Yo("diff-insert",kt.add,g("diffInsertIcon","Line decoration for inserts in the diff editor.")),n6e=Yo("diff-remove",kt.remove,g("diffRemoveIcon","Line decoration for removals in the diff editor.")),o6e=zi.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+ui.asClassName(jAt),marginClassName:"gutter-insert"}),r6e=zi.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+ui.asClassName(n6e),marginClassName:"gutter-delete"}),s6e=zi.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),a6e=zi.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),l6e=zi.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),kot=zi.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),Lot=zi.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),QN=zi.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),Eot=zi.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),Dot=zi.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"})});var ZX,Tot=P(()=>{nt();Is();i6e();YX();kp();ZX=class extends ue{constructor(e,t,n,o){super(),this._editors=e,this._diffModel=t,this._options=n,this._decorations=Hi(this,r=>{var s;let a=(s=this._diffModel.read(r))===null||s===void 0?void 0:s.diff.read(r);if(!a)return null;let l=this._diffModel.read(r).movedTextToCompare.read(r),c=this._options.renderIndicators.read(r),d=this._options.showEmptyDecorations.read(r),u=[],h=[];if(!l)for(let p of a.mappings)if(p.lineRangeMapping.original.isEmpty||u.push({range:p.lineRangeMapping.original.toInclusiveRange(),options:c?r6e:a6e}),p.lineRangeMapping.modified.isEmpty||h.push({range:p.lineRangeMapping.modified.toInclusiveRange(),options:c?o6e:s6e}),p.lineRangeMapping.modified.isEmpty||p.lineRangeMapping.original.isEmpty)p.lineRangeMapping.original.isEmpty||u.push({range:p.lineRangeMapping.original.toInclusiveRange(),options:Eot}),p.lineRangeMapping.modified.isEmpty||h.push({range:p.lineRangeMapping.modified.toInclusiveRange(),options:kot});else for(let m of p.lineRangeMapping.innerChanges||[])p.lineRangeMapping.original.contains(m.originalRange.startLineNumber)&&u.push({range:m.originalRange,options:m.originalRange.isEmpty()&&d?Dot:QN}),p.lineRangeMapping.modified.contains(m.modifiedRange.startLineNumber)&&h.push({range:m.modifiedRange,options:m.modifiedRange.isEmpty()&&d?Lot:l6e});if(l)for(let p of l.changes){let m=p.original.toInclusiveRange();m&&u.push({range:m,options:c?r6e:a6e});let y=p.modified.toInclusiveRange();y&&h.push({range:y,options:c?o6e:s6e});for(let _ of p.innerChanges||[])u.push({range:_.originalRange,options:QN}),h.push({range:_.modifiedRange,options:l6e})}let f=this._diffModel.read(r).activeMovedText.read(r);for(let p of a.movedTexts)u.push({range:p.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(p===f?" currentMove":""),blockPadding:[W4.movedCodeBlockPadding,0,W4.movedCodeBlockPadding,W4.movedCodeBlockPadding]}}),h.push({range:p.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(p===f?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:u,modifiedDecorations:h}}),this._register(FS(this._editors.original,this._decorations.map(r=>r?.originalDecorations||[]))),this._register(FS(this._editors.modified,this._decorations.map(r=>r?.modifiedDecorations||[])))}}});var XX,Iot=P(()=>{fS();nt();Is();XX=class extends ue{constructor(e,t,n,o){super(),this._options=e,this._domNode=t,this._dimensions=n,this._sashes=o,this._sashRatio=kn(this,void 0),this.sashLeft=Hi(this,r=>{var s;let a=(s=this._sashRatio.read(r))!==null&&s!==void 0?s:this._options.splitViewDefaultRatio.read(r);return this._computeSashLeft(a,r)}),this._sash=this._register(new Cu(this._domNode,{getVerticalSashTop:r=>0,getVerticalSashLeft:r=>this.sashLeft.get(),getVerticalSashHeight:r=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(r=>{let s=this._dimensions.width.get(),a=this._computeSashLeft((this._startSashPosition+(r.currentX-r.startX))/s,void 0);this._sashRatio.set(a/s,void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._sashRatio.set(void 0,void 0))),this._register(Ln(r=>{let s=this._sashes.read(r);s&&(this._sash.orthogonalEndSash=s.bottom)})),this._register(Ln(r=>{let s=this._options.enableSplitViewResizing.read(r);this._sash.state=s?3:0,this.sashLeft.read(r),this._dimensions.height.read(r),this._sash.layout()}))}_computeSashLeft(e,t){let n=this._dimensions.width.read(t),o=Math.floor(this._options.splitViewDefaultRatio.read(t)*n),r=this._options.enableSplitViewResizing.read(t)?Math.floor(e*n):o,s=100;return n<=s*2?o:rn-s?n-s:r}}});var qAt,GAt,c6e,m7,QX,d6e=P(()=>{Qt();Rv();Go();Md();nt();Is();KN();or();ho();kp();sh();Mi();Kt();Pr();Wt();_i();qAt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},GAt=function(i,e){return function(t,n){e(t,n,i)}},m7=c6e=class extends ue{static setBreadcrumbsSourceFactory(e){this._breadcrumbsSourceFactory.set(e,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,t,n,o){super(),this._editors=e,this._diffModel=t,this._options=n,this._instantiationService=o,this._modifiedOutlineSource=W2(this,l=>{let c=this._editors.modifiedModel.read(l),d=c6e._breadcrumbsSourceFactory.read(l);return!c||!d?void 0:d(c,this._instantiationService)}),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition(l=>{if(l.reason===3){let c=this._diffModel.get();lo(d=>{for(let u of this._editors.original.getSelections()||[])c?.ensureOriginalLineIsVisible(u.getStartPosition().lineNumber,0,d),c?.ensureOriginalLineIsVisible(u.getEndPosition().lineNumber,0,d)})}})),this._register(this._editors.modified.onDidChangeCursorPosition(l=>{if(l.reason===3){let c=this._diffModel.get();lo(d=>{for(let u of this._editors.modified.getSelections()||[])c?.ensureModifiedLineIsVisible(u.getStartPosition().lineNumber,0,d),c?.ensureModifiedLineIsVisible(u.getEndPosition().lineNumber,0,d)})}}));let r=this._diffModel.map((l,c)=>{var d,u;let h=(d=l?.unchangedRegions.read(c))!==null&&d!==void 0?d:[];return h.length===1&&h[0].modifiedLineNumber===1&&h[0].lineCount===((u=this._editors.modifiedModel.read(c))===null||u===void 0?void 0:u.getLineCount())?[]:h});this.viewZones=g1(this,(l,c)=>{let d=this._modifiedOutlineSource.read(l);if(!d)return{origViewZones:[],modViewZones:[]};let u=[],h=[],f=this._options.renderSideBySide.read(l),p=r.read(l);for(let m of p)if(!m.shouldHideControls(l)){{let y=Hi(this,v=>m.getHiddenOriginalRange(v).startLineNumber-1),_=new h8(y,24);u.push(_),c.add(new QX(this._editors.original,_,m,m.originalUnchangedRange,!f,d,v=>this._diffModel.get().ensureModifiedLineIsVisible(v,2,void 0),this._options))}{let y=Hi(this,v=>m.getHiddenModifiedRange(v).startLineNumber-1),_=new h8(y,24);h.push(_),c.add(new QX(this._editors.modified,_,m,m.modifiedUnchangedRange,!1,d,v=>this._diffModel.get().ensureModifiedLineIsVisible(v,2,void 0),this._options))}}return{origViewZones:u,modViewZones:h}});let s={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},a={description:"Fold Unchanged",glyphMarginHoverMessage:new cs(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(g("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+ui.asClassName(kt.fold),zIndex:10001};this._register(FS(this._editors.original,Hi(this,l=>{let c=r.read(l),d=c.map(u=>({range:u.originalUnchangedRange.toInclusiveRange(),options:s}));for(let u of c)u.shouldHideControls(l)&&d.push({range:O.fromPositions(new ke(u.originalLineNumber,1)),options:a});return d}))),this._register(FS(this._editors.modified,Hi(this,l=>{let c=r.read(l),d=c.map(u=>({range:u.modifiedUnchangedRange.toInclusiveRange(),options:s}));for(let u of c)u.shouldHideControls(l)&&d.push({range:rn.ofLength(u.modifiedLineNumber,1).toInclusiveRange(),options:a});return d}))),this._register(Ln(l=>{let c=r.read(l);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(c.map(d=>d.getHiddenOriginalRange(l).toInclusiveRange()).filter(om)),this._editors.modified.setHiddenAreas(c.map(d=>d.getHiddenModifiedRange(l).toInclusiveRange()).filter(om))}finally{this._isUpdatingHiddenAreas=!1}})),this._register(this._editors.modified.onMouseUp(l=>{var c;if(!l.event.rightButton&&l.target.position&&(!((c=l.target.element)===null||c===void 0)&&c.className.includes("fold-unchanged"))){let d=l.target.position.lineNumber,u=this._diffModel.get();if(!u)return;let h=u.unchangedRegions.get().find(f=>f.modifiedUnchangedRange.includes(d));if(!h)return;h.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(l=>{var c;if(!l.event.rightButton&&l.target.position&&(!((c=l.target.element)===null||c===void 0)&&c.className.includes("fold-unchanged"))){let d=l.target.position.lineNumber,u=this._diffModel.get();if(!u)return;let h=u.unchangedRegions.get().find(f=>f.originalUnchangedRange.includes(d));if(!h)return;h.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}}))}};m7._breadcrumbsSourceFactory=kn("breadcrumbsSourceFactory",void 0);m7=c6e=qAt([GAt(3,qt)],m7);QX=class extends zS{constructor(e,t,n,o,r,s,a,l){let c=Do("div.diff-hidden-lines-widget");super(e,t,c.root),this._editor=e,this._unchangedRegion=n,this._unchangedRegionRange=o,this._hide=r,this._modifiedOutlineSource=s,this._revealModifiedHiddenLine=a,this._options=l,this._nodes=Do("div.diff-hidden-lines",[Do("div.top@top",{title:g("diff.hiddenLines.top","Click or drag to show more above")}),Do("div.center@content",{style:{display:"flex"}},[Do("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[pt("a",{title:g("showUnchangedRegion","Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...of("$(unfold)"))]),Do("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),Do("div.bottom@bottom",{title:g("diff.bottom","Click or drag to show more below"),role:"button"})]),c.root.appendChild(this._nodes.root);let d=Ao(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._hide?ns(this._nodes.first):this._register(Sp(this._nodes.first,{width:d.map(h=>h.contentLeft)})),this._register(Ln(h=>{let f=this._unchangedRegion.visibleLineCountTop.read(h)+this._unchangedRegion.visibleLineCountBottom.read(h)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!f),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(h)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(h)>0),this._nodes.top.classList.toggle("canMoveBottom",!f);let p=this._unchangedRegion.isDragged.read(h),m=this._editor.getDomNode();m&&(m.classList.toggle("draggingUnchangedRegion",!!p),p==="top"?(m.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(h)>0),m.classList.toggle("canMoveBottom",!f)):p==="bottom"?(m.classList.toggle("canMoveTop",!f),m.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(h)>0)):(m.classList.toggle("canMoveTop",!1),m.classList.toggle("canMoveBottom",!1)))}));let u=this._editor;this._register(Xe(this._nodes.top,"mousedown",h=>{if(h.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),h.preventDefault();let f=h.clientY,p=!1,m=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);let y=pi(this._nodes.top),_=Xe(y,"mousemove",b=>{let w=b.clientY-f;p=p||Math.abs(w)>2;let S=Math.round(w/u.getOption(66)),x=Math.max(0,Math.min(m+S,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(x,void 0)}),v=Xe(y,"mouseup",b=>{p||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),_.dispose(),v.dispose()})})),this._register(Xe(this._nodes.bottom,"mousedown",h=>{if(h.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),h.preventDefault();let f=h.clientY,p=!1,m=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);let y=pi(this._nodes.bottom),_=Xe(y,"mousemove",b=>{let w=b.clientY-f;p=p||Math.abs(w)>2;let S=Math.round(w/u.getOption(66)),x=Math.max(0,Math.min(m-S,this._unchangedRegion.getMaxVisibleLineCountBottom())),k=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(x,void 0);let D=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);u.setScrollTop(u.getScrollTop()+(D-k))}),v=Xe(y,"mouseup",b=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!p){let C=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);let w=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);u.setScrollTop(u.getScrollTop()+(w-C))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),_.dispose(),v.dispose()})})),this._register(Ln(h=>{let f=[];if(!this._hide){let p=n.getHiddenModifiedRange(h).length,m=g("hiddenLines","{0} hidden lines",p),y=pt("span",{title:g("diff.hiddenLines.expandAll","Double click to unfold")},m);y.addEventListener("dblclick",b=>{b.button===0&&(b.preventDefault(),this._unchangedRegion.showAll(void 0))}),f.push(y);let _=this._unchangedRegion.getHiddenModifiedRange(h),v=this._modifiedOutlineSource.getBreadcrumbItems(_,h);if(v.length>0){f.push(pt("span",void 0,"\xA0\xA0|\xA0\xA0"));for(let b=0;b{this._revealModifiedHiddenLine(C.startLineNumber)}}}}ns(this._nodes.others,...f)}))}}});var Mot,u6e,g7,f6e,h6e,JX,Not=P(()=>{xl();_i();Xt();Yu();sh();iv();Yv();$f();Mot=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},u6e=function(i,e){return function(t,n){e(t,n,i)}},f6e=vi("diffProviderFactoryService"),h6e=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(JX,e)}};h6e=Mot([u6e(0,qt)],h6e);ln(f6e,h6e,1);JX=g7=class{constructor(e,t,n){this.editorWorkerService=t,this.telemetryService=n,this.onDidChangeEventEmitter=new ge,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){var e;(e=this.diffAlgorithmOnDidChangeSubscription)===null||e===void 0||e.dispose()}async computeDiff(e,t,n,o){var r,s;if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(e,t,n,o);if(e.getLineCount()===1&&e.getLineMaxColumn(1)===1)return t.getLineCount()===1&&t.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new du(new rn(1,2),new rn(1,t.getLineCount()+1),[new Qf(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};let a=JSON.stringify([e.uri.toString(),t.uri.toString()]),l=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(n)]),c=g7.diffCache.get(a);if(c&&c.context===l)return c.result;let d=Er.create(),u=await this.editorWorkerService.computeDiff(e.uri,t.uri,n,this.diffAlgorithm),h=d.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:h,timedOut:(r=u?.quitEarly)!==null&&r!==void 0?r:!0,detectedMoves:n.computeMoves?(s=u?.moves.length)!==null&&s!==void 0?s:0:-1}),o.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!u)throw new Error("no diff result available");return g7.diffCache.size>10&&g7.diffCache.delete(g7.diffCache.keys().next().value),g7.diffCache.set(a,{result:u,context:l}),u}setOptions(e){var t;let n=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&((t=this.diffAlgorithmOnDidChangeSubscription)===null||t===void 0||t.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,typeof e.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),n=!0),n&&this.onDidChangeEventEmitter.fire()}};JX.diffCache=new Map;JX=g7=Mot([u6e(1,Oc),u6e(2,Fs)],JX)});function ZAt(i,e,t){return{changes:i.changes.map(n=>new du(n.original,n.modified,n.innerChanges?n.innerChanges.map(o=>XAt(o,e,t)):void 0)),moves:i.moves,identical:i.identical,quitEarly:i.quitEarly}}function XAt(i,e,t){let n=i.originalRange,o=i.modifiedRange;return(n.endColumn!==1||o.endColumn!==1)&&n.endColumn===e.getLineMaxColumn(n.endLineNumber)&&o.endColumn===t.getLineMaxColumn(o.endLineNumber)&&n.endLineNumber{Qi();mo();nt();Is();Not();kp();sh();Dfe();iv();ZI();Npe();Efe();ho();Vi();um();KAt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},YAt=function(i,e){return function(t,n){e(t,n,i)}},eQ=class extends ue{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,n){super(),this.model=e,this._options=t,this._diffProviderFactoryService=n,this._isDiffUpToDate=kn(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=kn(this,void 0),this.diff=this._diff,this._unchangedRegions=kn(this,void 0),this.unchangedRegions=Hi(this,a=>{var l,c;return this._options.hideUnchangedRegions.read(a)?(c=(l=this._unchangedRegions.read(a))===null||l===void 0?void 0:l.regions)!==null&&c!==void 0?c:[]:(lo(d=>{var u;for(let h of((u=this._unchangedRegions.get())===null||u===void 0?void 0:u.regions)||[])h.collapseAll(d)}),[])}),this.movedTextToCompare=kn(this,void 0),this._activeMovedText=kn(this,void 0),this._hoveredMovedText=kn(this,void 0),this.activeMovedText=Hi(this,a=>{var l,c;return(c=(l=this.movedTextToCompare.read(a))!==null&&l!==void 0?l:this._hoveredMovedText.read(a))!==null&&c!==void 0?c:this._activeMovedText.read(a)}),this._cancellationTokenSource=new Jn,this._diffProvider=Hi(this,a=>{let l=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(a)}),c=Pl("onDidChange",l.onDidChange);return{diffProvider:l,onChangeSignal:c}}),this._register(Yt(()=>this._cancellationTokenSource.cancel()));let o=f7("contentChangedSignal"),r=this._register(new hn(()=>o.trigger(void 0),200));this._register(Ln(a=>{let l=this._unchangedRegions.read(a);if(!l||l.regions.some(p=>p.isDragged.read(a)))return;let c=l.originalDecorationIds.map(p=>e.original.getDecorationRange(p)).map(p=>p?rn.fromRangeInclusive(p):void 0),d=l.modifiedDecorationIds.map(p=>e.modified.getDecorationRange(p)).map(p=>p?rn.fromRangeInclusive(p):void 0),u=l.regions.map((p,m)=>!c[m]||!d[m]?void 0:new BS(c[m].startLineNumber,d[m].startLineNumber,c[m].length,p.visibleLineCountTop.read(a),p.visibleLineCountBottom.read(a))).filter(om),h=[],f=!1;for(let p of gC(u,(m,y)=>m.getHiddenModifiedRange(a).endLineNumberExclusive===y.getHiddenModifiedRange(a).startLineNumber))if(p.length>1){f=!0;let m=p.reduce((_,v)=>_+v.lineCount,0),y=new BS(p[0].originalLineNumber,p[0].modifiedLineNumber,m,p[0].visibleLineCountTop.get(),p[p.length-1].visibleLineCountBottom.get());h.push(y)}else h.push(p[0]);if(f){let p=e.original.deltaDecorations(l.originalDecorationIds,h.map(y=>({range:y.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),m=e.modified.deltaDecorations(l.modifiedDecorationIds,h.map(y=>({range:y.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));lo(y=>{this._unchangedRegions.set({regions:h,originalDecorationIds:p,modifiedDecorationIds:m},y)})}}));let s=(a,l,c)=>{let d=BS.fromDiffs(a.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(c),this._options.hideUnchangedRegionsContextLineCount.read(c)),u,h=this._unchangedRegions.get();if(h){let y=h.originalDecorationIds.map(C=>e.original.getDecorationRange(C)).map(C=>C?rn.fromRangeInclusive(C):void 0),_=h.modifiedDecorationIds.map(C=>e.modified.getDecorationRange(C)).map(C=>C?rn.fromRangeInclusive(C):void 0),b=wot(h.regions.map((C,w)=>{if(!y[w]||!_[w])return;let S=y[w].length;return new BS(y[w].startLineNumber,_[w].startLineNumber,S,Math.min(C.visibleLineCountTop.get(),S),Math.min(C.visibleLineCountBottom.get(),S-C.visibleLineCountTop.get()))}).filter(om),(C,w)=>!w||C.modifiedLineNumber>=w.modifiedLineNumber+w.lineCount&&C.originalLineNumber>=w.originalLineNumber+w.lineCount).map(C=>new cu(C.getHiddenOriginalRange(c),C.getHiddenModifiedRange(c)));b=cu.clip(b,rn.ofLength(1,e.original.getLineCount()),rn.ofLength(1,e.modified.getLineCount())),u=cu.inverse(b,e.original.getLineCount(),e.modified.getLineCount())}let f=[];if(u)for(let y of d){let _=u.filter(v=>v.original.intersectsStrict(y.originalUnchangedRange)&&v.modified.intersectsStrict(y.modifiedUnchangedRange));f.push(...y.setVisibleRanges(_,l))}else f.push(...d);let p=e.original.deltaDecorations(h?.originalDecorationIds||[],f.map(y=>({range:y.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),m=e.modified.deltaDecorations(h?.modifiedDecorationIds||[],f.map(y=>({range:y.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));this._unchangedRegions.set({regions:f,originalDecorationIds:p,modifiedDecorationIds:m},l)};this._register(e.modified.onDidChangeContent(a=>{if(this._diff.get()){let c=yp.fromModelContentChanges(a.changes),d=(this._lastDiff,e.original,e.modified,void 0);d&&(this._lastDiff=d,lo(u=>{this._diff.set(JN.fromDiffResult(this._lastDiff),u),s(d,u);let h=this.movedTextToCompare.get();this.movedTextToCompare.set(h?this._lastDiff.moves.find(f=>f.lineRangeMapping.modified.intersect(h.lineRangeMapping.modified)):void 0,u)}))}this._isDiffUpToDate.set(!1,void 0),r.schedule()})),this._register(e.original.onDidChangeContent(a=>{if(this._diff.get()){let c=yp.fromModelContentChanges(a.changes),d=(this._lastDiff,e.original,e.modified,void 0);d&&(this._lastDiff=d,lo(u=>{this._diff.set(JN.fromDiffResult(this._lastDiff),u),s(d,u);let h=this.movedTextToCompare.get();this.movedTextToCompare.set(h?this._lastDiff.moves.find(f=>f.lineRangeMapping.modified.intersect(h.lineRangeMapping.modified)):void 0,u)}))}this._isDiffUpToDate.set(!1,void 0),r.schedule()})),this._register(Rl(async(a,l)=>{var c,d;this._options.hideUnchangedRegionsMinimumLineCount.read(a),this._options.hideUnchangedRegionsContextLineCount.read(a),r.cancel(),o.read(a);let u=this._diffProvider.read(a);u.onChangeSignal.read(a),v1(hw,a),v1(nI,a),this._isDiffUpToDate.set(!1,void 0);let h=[];l.add(e.original.onDidChangeContent(m=>{let y=yp.fromModelContentChanges(m.changes);h=vx(h,y)}));let f=[];l.add(e.modified.onDidChangeContent(m=>{let y=yp.fromModelContentChanges(m.changes);f=vx(f,y)}));let p=await u.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(a),maxComputationTimeMs:this._options.maxComputationTimeMs.read(a),computeMoves:this._options.showMoves.read(a)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||(p=ZAt(p,e.original,e.modified),p=(c=(e.original,e.modified,void 0))!==null&&c!==void 0?c:p,p=(d=(e.original,e.modified,void 0))!==null&&d!==void 0?d:p,lo(m=>{s(p,m),this._lastDiff=p;let y=JN.fromDiffResult(p);this._diff.set(y,m),this._isDiffUpToDate.set(!0,m);let _=this.movedTextToCompare.get();this.movedTextToCompare.set(_?this._lastDiff.moves.find(v=>v.lineRangeMapping.modified.intersect(_.lineRangeMapping.modified)):void 0,m)}))}))}ensureModifiedLineIsVisible(e,t,n){var o,r;if(((o=this.diff.get())===null||o===void 0?void 0:o.mappings.length)===0)return;let s=((r=this._unchangedRegions.get())===null||r===void 0?void 0:r.regions)||[];for(let a of s)if(a.getHiddenModifiedRange(void 0).contains(e)){a.showModifiedLine(e,t,n);return}}ensureOriginalLineIsVisible(e,t,n){var o,r;if(((o=this.diff.get())===null||o===void 0?void 0:o.mappings.length)===0)return;let s=((r=this._unchangedRegions.get())===null||r===void 0?void 0:r.regions)||[];for(let a of s)if(a.getHiddenOriginalRange(void 0).contains(e)){a.showOriginalLine(e,t,n);return}}async waitForDiff(){await V4e(this.isDiffUpToDate,e=>e)}serializeState(){let e=this._unchangedRegions.get();return{collapsedRegions:e?.regions.map(t=>({range:t.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(e){var t;let n=(t=e.collapsedRegions)===null||t===void 0?void 0:t.map(r=>rn.deserialize(r.range)),o=this._unchangedRegions.get();!o||!n||lo(r=>{for(let s of o.regions)for(let a of n)if(s.modifiedUnchangedRange.intersect(a)){s.setHiddenModifiedRange(a,r);break}})}};eQ=KAt([YAt(2,f6e)],eQ);JN=class i{static fromDiffResult(e){return new i(e.changes.map(t=>new eA(t)),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,n,o){this.mappings=e,this.movedTexts=t,this.identical=n,this.quitEarly=o}},eA=class{constructor(e){this.lineRangeMapping=e}},BS=class i{static fromDiffs(e,t,n,o,r){let s=du.inverse(e,t,n),a=[];for(let l of s){let c=l.original.startLineNumber,d=l.modified.startLineNumber,u=l.original.length,h=c===1&&d===1,f=c+u===t+1&&d+u===n+1;(h||f)&&u>=r+o?(h&&!f&&(u-=r),f&&!h&&(c+=r,d+=r,u-=r),a.push(new i(c,d,u,0,0))):u>=r*2+o&&(c+=r,d+=r,u-=r*2,a.push(new i(c,d,u,0,0)))}return a}get originalUnchangedRange(){return rn.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return rn.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,n,o,r){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=n,this._visibleLineCountTop=kn(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=kn(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=Hi(this,l=>this.visibleLineCountTop.read(l)+this.visibleLineCountBottom.read(l)===this.lineCount&&!this.isDragged.read(l)),this.isDragged=kn(this,void 0);let s=Math.max(Math.min(o,this.lineCount),0),a=Math.max(Math.min(r,this.lineCount-o),0);ehe(o===s),ehe(r===a),this._visibleLineCountTop.set(s,void 0),this._visibleLineCountBottom.set(a,void 0)}setVisibleRanges(e,t){let n=[],o=new _m(e.map(l=>l.modified)).subtractFrom(this.modifiedUnchangedRange),r=this.originalLineNumber,s=this.modifiedLineNumber,a=this.modifiedLineNumber+this.lineCount;if(o.ranges.length===0)this.showAll(t),n.push(this);else{let l=0;for(let c of o.ranges){let d=l===o.ranges.length-1;l++;let u=(d?a:c.endLineNumberExclusive)-s,h=new i(r,s,u,0,0);h.setHiddenModifiedRange(c,t),n.push(h),r=h.originalUnchangedRange.endLineNumberExclusive,s=h.modifiedUnchangedRange.endLineNumberExclusive}}return n}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return rn.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return rn.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){let n=e.startLineNumber-this.modifiedLineNumber,o=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(n,o,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){let n=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,n),t)}showMoreBelow(e=10,t){let n=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,n),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t,n){let o=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),r=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;t===0&&o{Qt();Ra();Go();nt();Mn();or();Wt();tQ=class extends ue{get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}constructor(e,t,n,o,r,s,a,l,c){super(),this._getViewZoneId=e,this._marginDomNode=t,this._modifiedEditor=n,this._diff=o,this._editor=r,this._viewLineCounts=s,this._originalTextModel=a,this._contextMenuService=l,this._clipboardService=c,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=ui.asClassName(kt.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";let d=this._modifiedEditor.getOption(66);this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${d}px`,this._diffActions.style.lineHeight=`${d}px`,this._marginDomNode.appendChild(this._diffActions);let u=0,h=n.getOption(126)&&!Lc,f=(p,m)=>{var y;this._contextMenuService.showContextMenu({domForShadowRoot:h&&(y=n.getDomNode())!==null&&y!==void 0?y:void 0,getAnchor:()=>({x:p,y:m}),getActions:()=>{let _=[],v=o.modified.isEmpty;return _.push(new zs("diff.clipboard.copyDeletedContent",v?o.original.length>1?g("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):g("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):o.original.length>1?g("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):g("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,async()=>{let C=this._originalTextModel.getValueInRange(o.original.toExclusiveRange());await this._clipboardService.writeText(C)})),o.original.length>1&&_.push(new zs("diff.clipboard.copyDeletedLineContent",v?g("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",o.original.startLineNumber+u):g("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",o.original.startLineNumber+u),void 0,!0,async()=>{let C=this._originalTextModel.getLineContent(o.original.startLineNumber+u);C===""&&(C=this._originalTextModel.getEndOfLineSequence()===0?` +`}};L4e=l8([Al(0,Ni)],L4e);E4e=class{publicLog2(){}},BX=class i{constructor(){let e=li.from({scheme:i.SCHEME,authority:"model",path:"/"});this.workspace={id:i2e,folders:[new HY({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===i.SCHEME?this.workspace.folders[0]:null}};BX.SCHEME="inmemory";D4e=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){let n=Array.isArray(e)?e:$x.convert(e),o=new Map;for(let a of n){if(!(a instanceof Uv))throw new Error("bad edit - only text edits are supported");let l=this._modelService.getModel(a.resource);if(!l)throw new Error("bad edit - model not found");if(typeof a.versionId=="number"&&l.getVersionId()!==a.versionId)throw new Error("bad state - model changed in the meantime");let c=o.get(l);c||(c=[],o.set(l,c)),c.push(So.replaceMove(O.lift(a.textEdit.range),a.textEdit.text))}let r=0,s=0;for(let[a,l]of o)a.pushStackElement(),a.pushEditOperations([],l,()=>[]),a.pushStackElement(),s+=1,r+=l.length;return{ariaSummary:zf(jY.bulkEditServiceSummary,r,s),isApplied:r>0}}};D4e=l8([Al(0,no)],D4e);T4e=class{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return Il(e)}},I4e=class extends GY{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,n){if(!t){let o=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();o&&(t=o.getContainerDomNode())}return super.showContextView(e,t,n)}};I4e=l8([Al(0,nf),Al(1,tn)],I4e);M4e=class{constructor(){this._neverEmitter=new ge,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}},N4e=class extends eN{constructor(){super()}},A4e=class extends OX{constructor(){super(new OU)}},R4e=class extends vZ{constructor(e,t,n,o,r,s){super(e,t,n,o,r,s),this.configure({blockMouse:!1})}};R4e=l8([Al(0,Fs),Al(1,xo),Al(2,Pc),Al(3,fn),Al(4,Mc),Al(5,ri)],R4e);P4e=class{async playAudioCue(e,t){}};ln(Ni,HX,0);ln(fw,k4e,0);ln(Z$,L4e,0);ln(zm,BX,0);ln(Om,T4e,0);ln(Fs,E4e,0);ln(x2,w4e,0);ln(zx,C4e,0);ln(xo,FX,0);ln(yu,RX,0);ln(Kn,N4e,0);ln(sc,wX,0);ln(ks,A4e,0);ln(no,uN,0);ln(xw,yZ,0);ln(ri,MX,0);ln(zY,y4e,0);ln(mh,zX,0);ln(nl,cZ,0);ln(Oc,X$,0);ln(T2,D4e,0);ln(qY,M4e,0);ln(xs,b4e,0);ln(Ba,xX,0);ln(gh,WZ,0);ln(eo,x4e,0);ln(fn,a8,0);ln(ol,gX,0);ln(Pc,I4e,0);ln(Xr,bZ,0);ln(Pd,FN,0);ln(ca,R4e,0);ln(Mc,SX,0);ln(_h,P4e,0);(function(i){let e=new wp;for(let[l,c]of Khe())e.set(l,c);let t=new AX(e,!0);e.set(qt,t);function n(l){o||s({});let c=e.get(l);if(!c)throw new Error("Missing service "+l);return c instanceof oh?t.invokeFunction(d=>d.get(l)):c}i.get=n;let o=!1,r=new ge;function s(l){if(o)return t;o=!0;for(let[d,u]of Khe())e.get(d)||e.set(d,u);for(let d in l)if(l.hasOwnProperty(d)){let u=vi(d);e.get(u)instanceof oh&&e.set(u,l[d])}let c=oot();for(let d of c)try{t.createInstance(d)}catch(u){hi(u)}return r.fire(),t}i.initialize=s;function a(l){if(o)return l();let c=new Ye,d=c.add(r.event(()=>{d.dispose(),c.add(l())}));return c}i.withServices=a})(Ki||(Ki={}))});function aot(i){sot=i}function df(){return sot}function LAt(i){let e=new Array,t=[],n="";function o(s){if("length"in s)for(let a of s)a&&o(a);else"text"in s?(n+=`%c${s.text}`,e.push(s.style),s.data&&t.push(...s.data)):"data"in s&&t.push(...s.data)}o(i);let r=[n,...e];return r.push(...t),r}function TS(i){return Um(i,{color:"black"})}function UN(i){return Um(IAt(`${i}: `,10),{color:"black",bold:!0})}function Um(i,e={color:"black"}){function t(o){return Object.entries(o).reduce((r,[s,a])=>`${r}${s}:${a};`,"")}let n={color:e.color};return e.strikeThrough&&(n["text-decoration"]="line-through"),e.bold&&(n["font-weight"]="bold"),{text:i,style:t(n)}}function $N(i,e){switch(typeof i){case"number":return""+i;case"string":return i.length+2<=e?`"${i}"`:`"${i.substr(0,e-7)}"+...`;case"boolean":return i?"true":"false";case"undefined":return"undefined";case"object":return i===null?"null":Array.isArray(i)?EAt(i,e):DAt(i,e);case"symbol":return i.toString();case"function":return`[[Function${i.name?" "+i.name:""}]]`;default:return""+i}}function EAt(i,e){let t="[ ",n=!0;for(let o of i){if(n||(t+=", "),t.length-5>e){t+="...";break}n=!1,t+=`${$N(o,e-t.length)}`}return t+=" ]",t}function DAt(i,e){let t="{ ",n=!0;for(let[o,r]of Object.entries(i)){if(n||(t+=", "),t.length-5>e){t+="...";break}n=!1,t+=`${o}: ${$N(r,e-t.length)}`}return t+=" }",t}function TAt(i,e){let t="";for(let n=1;n<=e;n++)t+=i;return t}function IAt(i,e){for(;i.length{WX=class{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(e){return LAt([TS(TAt("| ",this.indentation)),e])}formatInfo(e){return e.hadValue?e.didChange?[TS(" "),Um($N(e.oldValue,70),{color:"red",strikeThrough:!0}),TS(" "),Um($N(e.newValue,60),{color:"green"})]:[TS(" (unchanged)")]:[TS(" "),Um($N(e.newValue,60),{color:"green"}),TS(" (initial)")]}handleObservableChanged(e,t){console.log(...this.textToConsoleArgs([UN("observable value changed"),Um(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}formatChanges(e){if(e.size!==0)return Um(" (changed deps: "+[...e].map(t=>t.debugName).join(", ")+")",{color:"gray"})}handleDerivedCreated(e){let t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,o)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,o]))}handleDerivedRecomputed(e,t){let n=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([UN("derived recomputed"),Um(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(n),{data:[{fn:e._computeFn}]}])),n.clear()}handleFromEventObservableTriggered(e,t){console.log(...this.textToConsoleArgs([UN("observable from event triggered"),Um(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),{data:[{fn:e._getValue}]}]))}handleAutorunCreated(e){let t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,o)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,o]))}handleAutorunTriggered(e){let t=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([UN("autorun"),Um(e.debugName,{color:"BlueViolet"}),this.formatChanges(t),{data:[{fn:e._runFn}]}])),t.clear(),this.indentation++}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let t=e.getDebugName();t===void 0&&(t=""),console.log(...this.textToConsoleArgs([UN("transaction"),Um(t,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}});function hot(i){uot=i}function fot(i){MAt=i}function mot(i){pot=i}function lo(i,e){let t=new MS(i,e);try{i(t)}finally{t.finish()}}function NS(i){if(UX)i(UX);else{let e=new MS(i,void 0);UX=e;try{i(e)}finally{e.finish(),UX=void 0}}}async function got(i,e){let t=new MS(i,e);try{await i(t)}finally{t.finish()}}function V2(i,e,t){i?e(i):lo(e,t)}function GN(i,e,t,n){var o;let r=O4e.get(i);if(r)return r;let s=NAt(i,e,t,n);if(s){let a=(o=lot.get(s))!==null&&o!==void 0?o:0;a++,lot.set(s,a);let l=a===1?s:`${s}#${a}`;return O4e.set(i,l),l}}function NAt(i,e,t,n){let o=O4e.get(i);if(o)return o;let r=n?AAt(n)+".":"",s;if(e!==void 0)if(typeof e=="function"){if(s=e(),s!==void 0)return r+s}else return r+e;if(t!==void 0&&(s=$m(t),s!==void 0))return r+s;if(n!==void 0){for(let a in n)if(n[a]===i)return r+a}}function AAt(i){var e;let t=dot.get(i);if(t)return t;let n=RAt(i),o=(e=cot.get(n))!==null&&e!==void 0?e:0;o++,cot.set(n,o);let r=o===1?n:`${n}#${o}`;return dot.set(i,r),r}function RAt(i){let e=i.constructor;return e?e.name:"Object"}function $m(i){let e=i.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(e),o=n?n[1]:void 0;return o?.trim()}function kn(i,e){return typeof i=="string"?new qN(void 0,i,e):new qN(i,void 0,e)}function c8(i,e){return typeof i=="string"?new $X(void 0,i,e):new $X(i,void 0,e)}var uot,MAt,pot,jN,B4,UX,MS,lot,O4e,cot,dot,qN,$X,d8=P(()=>{IS();jN=class{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){let n=t===void 0?void 0:e,o=t===void 0?e:t;return pot({owner:n,debugName:()=>{let r=$m(o);if(r!==void 0)return r;let a=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(o.toString());if(a)return`${this.debugName}.${a[2]}`;if(!n)return`${this.debugName} (mapped)`}},r=>o(this.read(r),r))}recomputeInitiallyAndOnChange(e,t){return e.add(uot(this,t)),this}},B4=class extends jN{constructor(){super(...arguments),this.observers=new Set}addObserver(e){let t=this.observers.size;this.observers.add(e),t===0&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}};MS=class{constructor(e,t){var n;this._fn=e,this._getDebugName=t,this.updatingObservers=[],(n=df())===null||n===void 0||n.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():$m(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){var e;let t=this.updatingObservers;for(let n=0;n{},()=>`Setting ${this.debugName}`));try{let s=this._value;this._setValue(e),(o=df())===null||o===void 0||o.handleObservableChanged(this,{oldValue:s,newValue:e,change:n,didChange:!0,hadValue:!0});for(let a of this.observers)t.updateObserver(a,this),a.handleChange(this,n)}finally{r&&r.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}};$X=class extends qN{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;(e=this._value)===null||e===void 0||e.dispose()}}});function Hi(i,e){return e!==void 0?new u8(i,void 0,e,void 0,void 0,void 0,AS):new u8(void 0,void 0,i,void 0,void 0,void 0,AS)}function RS(i,e){var t;return new u8(i.owner,i.debugName,e,void 0,void 0,i.onLastObserverRemoved,(t=i.equalityComparer)!==null&&t!==void 0?t:AS)}function z4e(i,e){var t;return new u8(i.owner,i.debugName,e,i.createEmptyChangeSummary,i.handleChange,void 0,(t=i.equalityComparer)!==null&&t!==void 0?t:AS)}function g1(i,e){let t,n;e===void 0?(t=i,n=void 0):(n=i,t=e);let o=new Ye;return new u8(n,()=>{var r;return(r=$m(t))!==null&&r!==void 0?r:"(anonymous)"},r=>(o.clear(),t(r,o)),void 0,void 0,()=>o.dispose(),AS)}function W2(i,e){let t,n;e===void 0?(t=i,n=void 0):(n=i,t=e);let o=new Ye;return new u8(n,()=>{var r;return(r=$m(t))!==null&&r!==void 0?r:"(anonymous)"},r=>{o.clear();let s=t(r);return s&&o.add(s),s},void 0,void 0,()=>o.dispose(),AS)}var AS,u8,KN=P(()=>{um();nt();d8();IS();AS=(i,e)=>i===e;mot(RS);u8=class extends B4{get debugName(){var e;return(e=GN(this,this._debugName,this._computeFn,this._owner))!==null&&e!==void 0?e:"(anonymous)"}constructor(e,t,n,o,r,s=void 0,a){var l,c;super(),this._owner=e,this._debugName=t,this._computeFn=n,this.createChangeSummary=o,this._handleChange=r,this._handleLastObserverRemoved=s,this._equalityComparator=a,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=(l=this.createChangeSummary)===null||l===void 0?void 0:l.call(this),(c=df())===null||c===void 0||c.handleDerivedCreated(this)}onLastObserverRemoved(){var e;this.state=0,this.value=void 0;for(let t of this.dependencies)t.removeObserver(this);this.dependencies.clear(),(e=this._handleLastObserverRemoved)===null||e===void 0||e.call(this)}get(){var e;if(this.observers.size===0){let t=this._computeFn(this,(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this));return this.onLastObserverRemoved(),t}else{do{if(this.state===1){for(let t of this.dependencies)if(t.reportChanges(),this.state===2)break}this.state===1&&(this.state=3),this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var e,t;if(this.state===3)return;let n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n;let o=this.state!==0,r=this.value;this.state=3;let s=this.changeSummary;this.changeSummary=(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this);try{this.value=this._computeFn(this,s)}finally{for(let l of this.dependenciesToBeRemoved)l.removeObserver(this);this.dependenciesToBeRemoved.clear()}let a=o&&!this._equalityComparator(r,this.value);if((t=df())===null||t===void 0||t.handleDerivedRecomputed(this,{oldValue:r,newValue:this.value,change:void 0,didChange:a,hadValue:o}),a)for(let l of this.observers)l.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;let t=this.updateCount===1;if(this.state===3&&(this.state=1,!t))for(let n of this.observers)n.handlePossibleChange(this);if(t)for(let n of this.observers)n.beginUpdate(this)}endUpdate(e){if(this.updateCount--,this.updateCount===0){let t=[...this.observers];for(let n of t)n.endUpdate(this)}zg(()=>this.updateCount>=0)}handlePossibleChange(e){if(this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(let t of this.observers)t.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){let n=this._handleChange?this._handleChange({changedObservable:e,change:t,didChange:r=>r===e},this.changeSummary):!0,o=this.state===3;if(n&&(this.state===1||o)&&(this.state=2,o))for(let r of this.observers)r.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);let t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){let t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){let t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}});function Ln(i){return new PS(void 0,i,void 0,void 0)}function u7(i,e){return new PS(i.debugName,e,void 0,void 0)}function U2(i,e){return new PS(i.debugName,e,i.createEmptyChangeSummary,i.handleChange)}function Rl(i){let e=new Ye,t=u7({debugName:()=>$m(i)||"(anonymous)"},n=>{e.clear(),i(n,e)});return Yt(()=>{t.dispose(),e.dispose()})}var PS,F4e=P(()=>{um();nt();d8();IS();PS=class{get debugName(){if(typeof this._debugName=="string")return this._debugName;if(typeof this._debugName=="function"){let t=this._debugName();if(t!==void 0)return t}let e=$m(this._runFn);return e!==void 0?e:"(anonymous)"}constructor(e,t,n,o){var r,s;this._debugName=e,this._runFn=t,this.createChangeSummary=n,this._handleChange=o,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=(r=this.createChangeSummary)===null||r===void 0?void 0:r.call(this),(s=df())===null||s===void 0||s.handleAutorunCreated(this),this._runIfNeeded(),s5(this)}dispose(){this.disposed=!0;for(let e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),a5(this)}_runIfNeeded(){var e,t,n;if(this.state===3)return;let o=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=o,this.state=3;let r=this.disposed;try{if(!r){(e=df())===null||e===void 0||e.handleAutorunTriggered(this);let s=this.changeSummary;this.changeSummary=(t=this.createChangeSummary)===null||t===void 0?void 0:t.call(this),this._runFn(this,s)}}finally{r||(n=df())===null||n===void 0||n.handleAutorunFinished(this);for(let s of this.dependenciesToBeRemoved)s.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(let e of this.dependencies)if(e.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,zg(()=>this.updateCount>=0)}handlePossibleChange(e){this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:o=>o===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);let t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}};(function(i){i.Observer=PS})(Ln||(Ln={}))});function h8(i){return new H4e(i)}function V4e(i,e){return new Promise(t=>{let n=!1,o=!1,r=i.map(a=>({isFinished:e(a),state:a})),s=Ln(a=>{let{isFinished:l,state:c}=r.read(a);l&&(n?s.dispose():o=!0,t(c))});n=!0,o&&s.dispose()})}function Ao(i,e){return new h7(i,e)}function Pl(i,e){return new B4e(i,e)}function f7(i){return typeof i=="string"?new jX(i):new jX(void 0,i)}function vot(i){let e=new qX(!1,void 0);return i.addObserver(e),Yt(()=>{i.removeObserver(e)})}function $2(i,e){let t=new qX(!0,e);return i.addObserver(t),e?e(i.get()):i.reportChanges(),Yt(()=>{i.removeObserver(t)})}function W4e(i){let e;return Hi(n=>(e=i(n,e),e))}var H4e,h7,B4e,jX,qX,_ot=P(()=>{nt();F4e();d8();KN();IS();H4e=class extends jN{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}};h7=class i extends B4{constructor(e,t){super(),this.event=e,this._getValue=t,this.hasValue=!1,this.handleEvent=n=>{var o;let r=this._getValue(n),s=this.value,a=!this.hasValue||s!==r,l=!1;a&&(this.value=r,this.hasValue&&(l=!0,V2(i.globalTransaction,c=>{var d;(d=df())===null||d===void 0||d.handleFromEventObservableTriggered(this,{oldValue:s,newValue:r,change:void 0,didChange:a,hadValue:this.hasValue});for(let u of this.observers)c.updateObserver(u,this),u.handleChange(this,void 0)},()=>{let c=this.getDebugName();return"Event fired"+(c?`: ${c}`:"")})),this.hasValue=!0),l||(o=df())===null||o===void 0||o.handleFromEventObservableTriggered(this,{oldValue:s,newValue:r,change:void 0,didChange:a,hadValue:this.hasValue})}}getDebugName(){return $m(this._getValue)}get debugName(){let e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}};(function(i){i.Observer=h7;function e(t,n){let o=!1;h7.globalTransaction===void 0&&(h7.globalTransaction=t,o=!0);try{n()}finally{o&&(h7.globalTransaction=void 0)}}i.batchEventsGlobally=e})(Ao||(Ao={}));B4e=class extends B4{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{lo(n=>{for(let o of this.observers)n.updateObserver(o,this),o.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}};jX=class extends B4{get debugName(){var e;return(e=GN(this,this._debugName,void 0,this._owner))!==null&&e!==void 0?e:"Observable Signal"}constructor(e,t){super(),this._debugName=e,this._owner=t}trigger(e,t){if(!e){lo(n=>{this.trigger(n,t)},()=>`Trigger signal ${this.debugName}`);return}for(let n of this.observers)e.updateObserver(n,this),n.handleChange(this,t)}get(){}};fot(vot);hot($2);qX=class{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,this._counter===0&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}}});var PAt,Is=P(()=>{d8();KN();F4e();_ot();IS();PAt=!1;PAt&&aot(new WX)});var bot=P(()=>{});var xu,p7=P(()=>{xu=class i{static capture(e){if(e.getScrollTop()===0||e.hasPendingScrollAnimation())return new i(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,n=0,o=e.getVisibleRanges();if(o.length>0){t=o[0].getStartPosition();let r=e.getTopForPosition(t.lineNumber,t.column);n=e.getScrollTop()-r}return new i(e.getScrollTop(),e.getContentHeight(),t,n,e.getPosition())}constructor(e,t,n,o,r){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=n,this._visiblePositionScrollDelta=o,this._cursorPosition=r}restore(e){if(!(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())&&this._visiblePosition){let t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;let t=e.getPosition();if(!this._cursorPosition||!t)return;let n=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+n)}}});function KX(){return uT&&!!uT.VSCODE_DEV}function U4e(i){if(KX()){let e=OAt();return e.add(i),{dispose(){e.delete(i)}}}else return{dispose(){}}}function OAt(){GX||(GX=new Set);let i=globalThis;return i.$hotReload_applyNewExports||(i.$hotReload_applyNewExports=e=>{for(let t of GX){let n=t(e);if(n)return n}}),GX}var GX,yot=P(()=>{Tue();KX()&&U4e(({oldExports:i,newSrc:e})=>{if(e.indexOf("/* hot-reload:patch-prototype-methods */")!==-1)return t=>{var n,o;for(let r in t){let s=t[r];if(console.log(`[hot-reload] Patching prototype methods of '${r}'`,{exportedItem:s}),typeof s=="function"&&s.prototype){let a=i[r];if(a){for(let l of Object.getOwnPropertyNames(s.prototype)){let c=Object.getOwnPropertyDescriptor(s.prototype,l),d=Object.getOwnPropertyDescriptor(a.prototype,l);((n=c?.value)===null||n===void 0?void 0:n.toString())!==((o=d?.value)===null||o===void 0?void 0:o.toString())&&console.log(`[hot-reload] Patching prototype method '${r}.${l}'`),Object.defineProperty(a.prototype,l,c)}t[r]=a}}}return!0}})});function Cot(i,e,t,n){if(i.length===0)return e;if(e.length===0)return i;let o=[],r=0,s=0;for(;rd?(o.push(l),s++):(o.push(n(a,l)),r++,s++)}for(;r`Apply decorations from ${e.debugName}`},o=>{let r=e.read(o);n.set(r)})),t.add({dispose:()=>{n.clear()}}),t}function YN(i,e){return i.appendChild(e),Yt(()=>{i.removeChild(e)})}function $4e(i,e,t){let n=e.get(),o=n,r=n,s=kn("animatedValue",n),a=-1,l=300,c;t.add(U2({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(u,h)=>(u.didChange(e)&&(h.animate=h.animate||u.change),!0)},(u,h)=>{c!==void 0&&(i.cancelAnimationFrame(c),c=void 0),o=r,n=e.read(u),a=Date.now()-(h.animate?0:l),d()}));function d(){let u=Date.now()-a;r=Math.floor(zAt(u,o,n-o,l)),u{for(let[n,o]of Object.entries(e))o&&typeof o=="object"&&"read"in o&&(o=o.read(t)),typeof o=="number"&&(o=`${o}px`),n=n.replace(/[A-Z]/g,r=>"-"+r.toLowerCase()),i.style[n]=o})}function v1(i,e){return FAt([i],e),i}function FAt(i,e){KX()&&Pl("reload",n=>U4e(({oldExports:o})=>{if([...Object.values(o)].some(r=>i.includes(r)))return r=>(n(void 0),!0)})).read(e)}function HS(i,e,t,n){let o=new Ye,r=[];return o.add(Rl((s,a)=>{let l=e.read(s),c=new Map,d=new Map;t&&t(!0),i.changeViewZones(u=>{for(let h of r)u.removeZone(h),n?.delete(h);r.length=0;for(let h of l){let f=u.addZone(h);h.setZoneId&&h.setZoneId(f),r.push(f),n?.add(f),c.set(h,f)}}),t&&t(!1),a.add(U2({createEmptyChangeSummary(){return{zoneIds:[]}},handleChange(u,h){let f=d.get(u.changedObservable);return f!==void 0&&h.zoneIds.push(f),!0}},(u,h)=>{for(let f of l)f.onChange&&(d.set(f.onChange,c.get(f)),f.onChange.read(u));t&&t(!0),i.changeViewZones(f=>{for(let p of h.zoneIds)f.layoutZone(p)}),t&&t(!1)}))})),o.add({dispose(){t&&t(!0),i.changeViewZones(s=>{for(let a of r)s.removeZone(a)}),n?.clear(),t&&t(!1)}}),o}function j4e(i,e){let t=o4(e,o=>o.original.startLineNumber<=i.lineNumber);if(!t)return O.fromPositions(i);if(t.original.endLineNumberExclusive<=i.lineNumber){let o=i.lineNumber-t.original.endLineNumberExclusive+t.modified.endLineNumberExclusive;return O.fromPositions(new ke(o,i.column))}if(!t.innerChanges)return O.fromPositions(new ke(t.modified.startLineNumber,1));let n=o4(t.innerChanges,o=>o.originalRange.getStartPosition().isBeforeOrEqual(i));if(!n){let o=i.lineNumber-t.original.startLineNumber+t.modified.startLineNumber;return O.fromPositions(new ke(o,i.column))}if(n.originalRange.containsPosition(i))return n.modifiedRange;{let o=HAt(n.originalRange.getEndPosition(),i);return O.fromPositions(BAt(n.modifiedRange.getEndPosition(),o))}}function HAt(i,e){return i.lineNumber===e.lineNumber?new Cv(0,e.column-i.column):new Cv(e.lineNumber-i.lineNumber,e.column-1)}function BAt(i,e){return e.lineCount===0?new ke(i.lineNumber,i.column+e.columnCount):new ke(i.lineNumber+e.lineCount,e.columnCount+1)}function ZN(i,e,t){let n=i.bindTo(e);return u7({debugName:()=>`Update ${i.key}`},o=>{n.set(t(o))})}function wot(i,e){let t;return i.filter(n=>{let o=e(n,t);return t=n,o})}var OS,zS,f8,YX,ZX,kp=P(()=>{rh();mo();yot();nt();Is();Xfe();Mi();Kt();Tm();OS=class extends ue{get width(){return this._width}get height(){return this._height}constructor(e,t){super(),this.elementSizeObserver=this._register(new Sw(e,t)),this._width=kn(this,this.elementSizeObserver.getWidth()),this._height=kn(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(n=>lo(o=>{this._width.set(this.elementSizeObserver.getWidth(),o),this._height.set(this.elementSizeObserver.getHeight(),o)})))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}};zS=class extends ue{constructor(e,t,n){super(),this._register(new YX(e,n)),this._register(Sp(n,{height:t.actualHeight,top:t.actualTop}))}},f8=class{get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,t){this._afterLineNumber=e,this.heightInPx=t,this.domNode=document.createElement("div"),this._actualTop=kn(this,void 0),this._actualHeight=kn(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=n=>{this._actualTop.set(n,void 0)},this.onComputedHeight=n=>{this._actualHeight.set(n,void 0)}}},YX=class i{constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId=`managedOverlayWidget-${i._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}};YX._counter=0;ZX=class extends Jn{dispose(){super.dispose(!0)}}});var xot=P(()=>{});function $At(i,e,t){let n=[];for(let o of gC(i,(r,s)=>s.modified.startLineNumber-r.modified.endLineNumberExclusive<2*XN)){let r=[];r.push(new K4e);let s=new rn(Math.max(1,o[0].original.startLineNumber-XN),Math.min(o[o.length-1].original.endLineNumberExclusive+XN,e+1)),a=new rn(Math.max(1,o[0].modified.startLineNumber-XN),Math.min(o[o.length-1].modified.endLineNumberExclusive+XN,t+1));HV(o,(d,u)=>{let h=new rn(d?d.original.endLineNumberExclusive:s.startLineNumber,u?u.original.startLineNumber:s.endLineNumberExclusive),f=new rn(d?d.modified.endLineNumberExclusive:a.startLineNumber,u?u.modified.startLineNumber:a.endLineNumberExclusive);h.forEach(p=>{r.push(new X4e(p,f.startLineNumber+(p-h.startLineNumber)))}),u&&(u.original.forEach(p=>{r.push(new Y4e(u,p))}),u.modified.forEach(p=>{r.push(new Z4e(u,p))}))});let l=o[0].modified.join(o[o.length-1].modified),c=o[0].original.join(o[o.length-1].original);n.push(new G4e(new cu(l,c),r))}return n}var J4e,e6e,VAt,WAt,UAt,V4,q4e,XN,Od,G4e,K4e,Y4e,Z4e,X4e,Q4e,Sot=P(()=>{Qt();Vg();u1();o1();Ra();Vi();Go();nt();Is();or();Vf();kp();Ks();sh();Xf();Mi();Kt();nv();Ha();Yg();lv();ap();Wt();s8();_i();m1();xot();J4e=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},e6e=function(i,e){return function(t,n){e(t,n,i)}},VAt=Yo("diff-review-insert",kt.add,g("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer.")),WAt=Yo("diff-review-remove",kt.remove,g("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer.")),UAt=Yo("diff-review-close",kt.close,g("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer.")),V4=class extends ue{constructor(e,t,n,o,r,s,a,l,c){super(),this._parentNode=e,this._visible=t,this._setVisible=n,this._canClose=o,this._width=r,this._height=s,this._diffs=a,this._editors=l,this._instantiationService=c,this._state=g1(this,(d,u)=>{let h=this._visible.read(d);if(this._parentNode.style.visibility=h?"visible":"hidden",!h)return null;let f=u.add(this._instantiationService.createInstance(q4e,this._diffs,this._editors,this._setVisible,this._canClose)),p=u.add(this._instantiationService.createInstance(Q4e,this._parentNode,f,this._width,this._height,this._editors));return{model:f,view:p}}).recomputeInitiallyAndOnChange(this._store)}next(){lo(e=>{let t=this._visible.get();this._setVisible(!0,e),t&&this._state.get().model.nextGroup(e)})}prev(){lo(e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)})}close(){lo(e=>{this._setVisible(!1,e)})}};V4._ttPolicy=td("diffReview",{createHTML:i=>i});V4=J4e([e6e(8,qt)],V4);q4e=class extends ue{constructor(e,t,n,o,r){super(),this._diffs=e,this._editors=t,this._setVisible=n,this.canClose=o,this._audioCueService=r,this._groups=kn(this,[]),this._currentGroupIdx=kn(this,0),this._currentElementIdx=kn(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((s,a)=>this._groups.read(a)[s]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((s,a)=>{var l;return(l=this.currentGroup.read(a))===null||l===void 0?void 0:l.lines[s]}),this._register(Ln(s=>{let a=this._diffs.read(s);if(!a){this._groups.set([],void 0);return}let l=$At(a,this._editors.original.getModel().getLineCount(),this._editors.modified.getModel().getLineCount());lo(c=>{let d=this._editors.modified.getPosition();if(d){let u=l.findIndex(h=>d?.lineNumber{let a=this.currentElement.read(s);a?.type===Od.Deleted?this._audioCueService.playAudioCue(Cn.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):a?.type===Od.Added&&this._audioCueService.playAudioCue(Cn.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register(Ln(s=>{var a;let l=this.currentElement.read(s);if(l&&l.type!==Od.Header){let c=(a=l.modifiedLineNumber)!==null&&a!==void 0?a:l.diff.modified.startLineNumber;this._editors.modified.setSelection(O.fromPositions(new ke(c,1)))}}))}_goToGroupDelta(e,t){let n=this.groups.get();!n||n.length<=1||V2(t,o=>{this._currentGroupIdx.set(Pn.ofLength(n.length).clipCyclic(this._currentGroupIdx.get()+e),o),this._currentElementIdx.set(0,o)})}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){let t=this.currentGroup.get();!t||t.lines.length<=1||lo(n=>{this._currentElementIdx.set(Pn.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),n)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){let t=this.currentGroup.get();if(!t)return;let n=t.lines.indexOf(e);n!==-1&&lo(o=>{this._currentElementIdx.set(n,o)})}revealCurrentElementInEditor(){this._setVisible(!1,void 0);let e=this.currentElement.get();e&&(e.type===Od.Deleted?(this._editors.original.setSelection(O.fromPositions(new ke(e.originalLineNumber,1))),this._editors.original.revealLine(e.originalLineNumber),this._editors.original.focus()):(e.type!==Od.Header&&(this._editors.modified.setSelection(O.fromPositions(new ke(e.modifiedLineNumber,1))),this._editors.modified.revealLine(e.modifiedLineNumber)),this._editors.modified.focus()))}close(){this._setVisible(!1,void 0),this._editors.modified.focus()}};q4e=J4e([e6e(4,_h)],q4e);XN=3;(function(i){i[i.Header=0]="Header",i[i.Unchanged=1]="Unchanged",i[i.Deleted=2]="Deleted",i[i.Added=3]="Added"})(Od||(Od={}));G4e=class{constructor(e,t){this.range=e,this.lines=t}},K4e=class{constructor(){this.type=Od.Header}},Y4e=class{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=Od.Deleted,this.modifiedLineNumber=void 0}},Z4e=class{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=Od.Added,this.originalLineNumber=void 0}},X4e=class{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=Od.Unchanged}},Q4e=class extends ue{constructor(e,t,n,o,r,s){super(),this._element=e,this._model=t,this._width=n,this._height=o,this._editors=r,this._languageService=s,this.domNode=this._element,this.domNode.className="diff-review monaco-editor-background";let a=document.createElement("div");a.className="diff-review-actions",this._actionBar=this._register(new Bs(a)),this._register(Ln(l=>{this._actionBar.clear(),this._model.canClose.read(l)&&this._actionBar.push(new zs("diffreview.close",g("label.close","Close"),"close-diff-review "+ui.asClassName(UAt),!0,async()=>t.close()),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new gp(this._content,{})),ns(this.domNode,this._scrollbar.getDomNode(),a),this._register(Yt(()=>{ns(this.domNode)})),this._register(Sp(this.domNode,{width:this._width,height:this._height})),this._register(Sp(this._content,{width:this._width,height:this._height})),this._register(Rl((l,c)=>{this._model.currentGroup.read(l),this._render(c)})),this._register(go(this.domNode,"keydown",l=>{(l.equals(18)||l.equals(2066)||l.equals(530))&&(l.preventDefault(),this._model.goToNextLine()),(l.equals(16)||l.equals(2064)||l.equals(528))&&(l.preventDefault(),this._model.goToPreviousLine()),(l.equals(9)||l.equals(2057)||l.equals(521)||l.equals(1033))&&(l.preventDefault(),this._model.close()),(l.equals(10)||l.equals(3))&&(l.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(e){let t=this._editors.original.getOptions(),n=this._editors.modified.getOptions(),o=document.createElement("div");o.className="diff-review-table",o.setAttribute("role","list"),o.setAttribute("aria-label",g("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate.")),Gr(o,n.get(50)),ns(this._content,o);let r=this._editors.original.getModel(),s=this._editors.modified.getModel();if(!r||!s)return;let a=r.getOptions(),l=s.getOptions(),c=n.get(66),d=this._model.currentGroup.get();for(let u of d?.lines||[]){if(!d)break;let h;if(u.type===Od.Header){let p=document.createElement("div");p.className="diff-review-row",p.setAttribute("role","listitem");let m=d.range,y=this._model.currentGroupIndex.get(),_=this._model.groups.get().length,v=S=>S===0?g("no_lines_changed","no lines changed"):S===1?g("one_line_changed","1 line changed"):g("more_lines_changed","{0} lines changed",S),b=v(m.original.length),C=v(m.modified.length);p.setAttribute("aria-label",g({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",y+1,_,m.original.startLineNumber,b,m.modified.startLineNumber,C));let w=document.createElement("div");w.className="diff-review-cell diff-review-summary",w.appendChild(document.createTextNode(`${y+1}/${_}: @@ -${m.original.startLineNumber},${m.original.length} +${m.modified.startLineNumber},${m.modified.length} @@`)),p.appendChild(w),h=p}else h=this._createRow(u,c,this._width.get(),t,r,a,n,s,l);o.appendChild(h);let f=Hi(p=>this._model.currentElement.read(p)===u);e.add(Ln(p=>{let m=f.read(p);h.tabIndex=m?0:-1,m&&h.focus()})),e.add(Xe(h,"focus",()=>{this._model.goToLine(u)}))}this._scrollbar.scanDomNode()}_createRow(e,t,n,o,r,s,a,l,c){let d=o.get(143),u=d.glyphMarginWidth+d.lineNumbersWidth,h=a.get(143),f=10+h.glyphMarginWidth+h.lineNumbersWidth,p="diff-review-row",m="",y="diff-review-spacer",_=null;switch(e.type){case Od.Added:p="diff-review-row line-insert",m=" char-insert",_=VAt;break;case Od.Deleted:p="diff-review-row line-delete",m=" char-delete",_=WAt;break}let v=document.createElement("div");v.style.minWidth=n+"px",v.className=p,v.setAttribute("role","listitem"),v.ariaLevel="";let b=document.createElement("div");b.className="diff-review-cell",b.style.height=`${t}px`,v.appendChild(b);let C=document.createElement("span");C.style.width=u+"px",C.style.minWidth=u+"px",C.className="diff-review-line-number"+m,e.originalLineNumber!==void 0?C.appendChild(document.createTextNode(String(e.originalLineNumber))):C.innerText="\xA0",b.appendChild(C);let w=document.createElement("span");w.style.width=f+"px",w.style.minWidth=f+"px",w.style.paddingRight="10px",w.className="diff-review-line-number"+m,e.modifiedLineNumber!==void 0?w.appendChild(document.createTextNode(String(e.modifiedLineNumber))):w.innerText="\xA0",b.appendChild(w);let S=document.createElement("span");if(S.className=y,_){let D=document.createElement("span");D.className=ui.asClassName(_),D.innerText="\xA0\xA0",S.appendChild(D)}else S.innerText="\xA0\xA0";b.appendChild(S);let x;if(e.modifiedLineNumber!==void 0){let D=this._getLineHtml(l,a,c.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);V4._ttPolicy&&(D=V4._ttPolicy.createHTML(D)),b.insertAdjacentHTML("beforeend",D),x=l.getLineContent(e.modifiedLineNumber)}else{let D=this._getLineHtml(r,o,s.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);V4._ttPolicy&&(D=V4._ttPolicy.createHTML(D)),b.insertAdjacentHTML("beforeend",D),x=r.getLineContent(e.originalLineNumber)}x.length===0&&(x=g("blankLine","blank"));let k="";switch(e.type){case Od.Unchanged:e.originalLineNumber===e.modifiedLineNumber?k=g({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",x,e.originalLineNumber):k=g("equalLine","{0} original line {1} modified line {2}",x,e.originalLineNumber,e.modifiedLineNumber);break;case Od.Added:k=g("insertLine","+ {0} modified line {1}",x,e.modifiedLineNumber);break;case Od.Deleted:k=g("deleteLine","- {0} original line {1}",x,e.originalLineNumber);break}return v.setAttribute("aria-label",k),v}_getLineHtml(e,t,n,o,r){let s=e.getLineContent(o),a=t.get(50),l=Es.createEmpty(s,r),c=Ed.isBasicASCII(s,e.mightContainNonBasicASCII()),d=Ed.containsRTL(s,c,e.mightContainRTL());return _w(new uu(a.isMonospace&&!t.get(33),a.canUseHalfwidthRightwardsArrow,s,!1,c,d,0,l,[],n,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,t.get(116),t.get(98),t.get(93),t.get(51)!==qu.OFF,null)).html}};Q4e=J4e([e6e(5,Kn)],Q4e)});var W4,t6e,XX,i6e=P(()=>{Qt();u1();Ra();Vi();rh();Go();nt();Is();or();kp();Xf();Wt();W4=class i extends ue{constructor(e,t,n,o,r){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=n,this._modifiedEditorLayoutInfo=o,this._editors=r,this._originalScrollTop=Ao(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Ao(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=Pl("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=kn(this,0),this._modifiedViewZonesChangedSignal=Pl("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=Pl("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=g1(this,(h,f)=>{var p;this._element.replaceChildren();let m=this._diffModel.read(h),y=(p=m?.diff.read(h))===null||p===void 0?void 0:p.movedTexts;if(!y||y.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(h);let _=this._originalEditorLayoutInfo.read(h),v=this._modifiedEditorLayoutInfo.read(h);if(!_||!v){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(h),this._originalViewZonesChangedSignal.read(h);let b=y.map(E=>{function A(ie,fe){let K=fe.getTopForLineNumber(ie.startLineNumber,!0),oe=fe.getTopForLineNumber(ie.endLineNumberExclusive,!0);return(K+oe)/2}let T=A(E.lineRangeMapping.original,this._editors.original),L=this._originalScrollTop.read(h),I=A(E.lineRangeMapping.modified,this._editors.modified),M=this._modifiedScrollTop.read(h),N=T-L,z=I-M,F=Math.min(T,I),V=Math.max(T,I);return{range:new Pn(F,V),from:N,to:z,fromWithoutScroll:T,toWithoutScroll:I,move:E}});b.sort(hje(Sc(E=>E.fromWithoutScroll>E.toWithoutScroll,fje),Sc(E=>E.fromWithoutScroll>E.toWithoutScroll?E.fromWithoutScroll:-E.toWithoutScroll,Nf)));let C=t6e.compute(b.map(E=>E.range)),w=10,S=_.verticalScrollbarWidth,x=(C.getTrackCount()-1)*10+w*2,k=S+x+(v.contentLeft-i.movedCodeBlockPadding),D=0;for(let E of b){let A=C.getTrack(D),T=S+w+A*10,L=15,I=15,M=k,N=v.glyphMarginWidth+v.lineNumbersWidth,z=18,F=document.createElementNS("http://www.w3.org/2000/svg","rect");F.classList.add("arrow-rectangle"),F.setAttribute("x",`${M-N}`),F.setAttribute("y",`${E.to-z/2}`),F.setAttribute("width",`${N}`),F.setAttribute("height",`${z}`),this._element.appendChild(F);let V=document.createElementNS("http://www.w3.org/2000/svg","g"),ie=document.createElementNS("http://www.w3.org/2000/svg","path");ie.setAttribute("d",`M 0 ${E.from} L ${T} ${E.from} L ${T} ${E.to} L ${M-I} ${E.to}`),ie.setAttribute("fill","none"),V.appendChild(ie);let fe=document.createElementNS("http://www.w3.org/2000/svg","polygon");fe.classList.add("arrow"),f.add(Ln(K=>{ie.classList.toggle("currentMove",E.move===m.activeMovedText.read(K)),fe.classList.toggle("currentMove",E.move===m.activeMovedText.read(K))})),fe.setAttribute("points",`${M-I},${E.to-L/2} ${M},${E.to} ${M-I},${E.to+L/2}`),V.appendChild(fe),this._element.appendChild(V),D++}this.width.set(x,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register(Yt(()=>this._element.remove())),this._register(Ln(h=>{let f=this._originalEditorLayoutInfo.read(h),p=this._modifiedEditorLayoutInfo.read(h);!f||!p||(this._element.style.left=`${f.width-f.verticalScrollbarWidth}px`,this._element.style.height=`${f.height}px`,this._element.style.width=`${f.verticalScrollbarWidth+f.contentLeft-i.movedCodeBlockPadding+this.width.read(h)}px`)})),this._register($2(this._state));let s=Hi(h=>{let f=this._diffModel.read(h),p=f?.diff.read(h);return p?p.movedTexts.map(m=>({move:m,original:new f8(h8(m.lineRangeMapping.original.startLineNumber-1),18),modified:new f8(h8(m.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register(HS(this._editors.original,s.map(h=>h.map(f=>f.original)))),this._register(HS(this._editors.modified,s.map(h=>h.map(f=>f.modified)))),this._register(Rl((h,f)=>{let p=s.read(h);for(let m of p)f.add(new XX(this._editors.original,m.original,m.move,"original",this._diffModel.get())),f.add(new XX(this._editors.modified,m.modified,m.move,"modified",this._diffModel.get()))}));let a=Ao(this._editors.original.onDidChangeCursorPosition,()=>this._editors.original.getPosition()),l=Ao(this._editors.modified.onDidChangeCursorPosition,()=>this._editors.modified.getPosition()),c=Pl("original.onDidFocusEditorWidget",h=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>h(void 0),0))),d=Pl("modified.onDidFocusEditorWidget",h=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>h(void 0),0))),u="modified";this._register(U2({createEmptyChangeSummary:()=>{},handleChange:(h,f)=>(h.didChange(c)&&(u="original"),h.didChange(d)&&(u="modified"),!0)},h=>{c.read(h),d.read(h);let f=this._diffModel.read(h);if(!f)return;let p=f.diff.read(h),m;if(p&&u==="original"){let y=a.read(h);y&&(m=p.movedTexts.find(_=>_.lineRangeMapping.original.contains(y.lineNumber)))}if(p&&u==="modified"){let y=l.read(h);y&&(m=p.movedTexts.find(_=>_.lineRangeMapping.modified.contains(y.lineNumber)))}m!==f.movedTextToCompare.get()&&f.movedTextToCompare.set(void 0,void 0),f.setActiveMovedText(m)}))}};W4.movedCodeBlockPadding=4;t6e=class i{static compute(e){let t=[],n=[];for(let o of e){let r=t.findIndex(s=>!s.intersectsStrict(o));r===-1&&(t.length>=6?r=JGe(t,Sc(a=>a.intersectWithRangeLength(o),Nf)):(r=t.length,t.push(new W$))),t[r].addRange(o),n.push(r)}return new i(t.length,n)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}},XX=class extends zS{constructor(e,t,n,o,r){let s=Do("div.diff-hidden-lines-widget");super(e,t,s.root),this._editor=e,this._move=n,this._kind=o,this._diffModel=r,this._nodes=Do("div.diff-moved-code-block",{style:{marginRight:"4px"}},[Do("div.text-content@textContent"),Do("div.action-bar@actionBar")]),s.root.appendChild(this._nodes.root);let a=Ao(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register(Sp(this._nodes.root,{paddingRight:a.map(h=>h.verticalScrollbarWidth)}));let l;n.changes.length>0?l=this._kind==="original"?g("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):g("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):l=this._kind==="original"?g("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):g("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);let c=this._register(new Bs(this._nodes.actionBar,{highlightToggledItems:!0})),d=new zs("",l,"",!1);c.push(d,{icon:!1,label:!0});let u=new zs("","Compare",ui.asClassName(kt.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===n?void 0:this._move,void 0)});this._register(Ln(h=>{let f=this._diffModel.movedTextToCompare.read(h)===n;u.checked=f})),c.push(u,{icon:!1,label:!0})}}});var knn,Lnn,Enn,jAt,n6e,o6e,r6e,s6e,a6e,l6e,kot,Lot,QN,Eot,Dot,QX=P(()=>{Go();or();ea();Wt();pr();m1();knn=me("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},g("diffEditor.move.border","The border color for text that got moved in the diff editor.")),Lnn=me("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},g("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor.")),Enn=me("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},g("diffEditor.unchangedRegionShadow","The color of the shadow around unchanged region widgets.")),jAt=Yo("diff-insert",kt.add,g("diffInsertIcon","Line decoration for inserts in the diff editor.")),n6e=Yo("diff-remove",kt.remove,g("diffRemoveIcon","Line decoration for removals in the diff editor.")),o6e=zi.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+ui.asClassName(jAt),marginClassName:"gutter-insert"}),r6e=zi.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+ui.asClassName(n6e),marginClassName:"gutter-delete"}),s6e=zi.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),a6e=zi.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),l6e=zi.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),kot=zi.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),Lot=zi.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),QN=zi.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),Eot=zi.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),Dot=zi.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"})});var JX,Tot=P(()=>{nt();Is();i6e();QX();kp();JX=class extends ue{constructor(e,t,n,o){super(),this._editors=e,this._diffModel=t,this._options=n,this._decorations=Hi(this,r=>{var s;let a=(s=this._diffModel.read(r))===null||s===void 0?void 0:s.diff.read(r);if(!a)return null;let l=this._diffModel.read(r).movedTextToCompare.read(r),c=this._options.renderIndicators.read(r),d=this._options.showEmptyDecorations.read(r),u=[],h=[];if(!l)for(let p of a.mappings)if(p.lineRangeMapping.original.isEmpty||u.push({range:p.lineRangeMapping.original.toInclusiveRange(),options:c?r6e:a6e}),p.lineRangeMapping.modified.isEmpty||h.push({range:p.lineRangeMapping.modified.toInclusiveRange(),options:c?o6e:s6e}),p.lineRangeMapping.modified.isEmpty||p.lineRangeMapping.original.isEmpty)p.lineRangeMapping.original.isEmpty||u.push({range:p.lineRangeMapping.original.toInclusiveRange(),options:Eot}),p.lineRangeMapping.modified.isEmpty||h.push({range:p.lineRangeMapping.modified.toInclusiveRange(),options:kot});else for(let m of p.lineRangeMapping.innerChanges||[])p.lineRangeMapping.original.contains(m.originalRange.startLineNumber)&&u.push({range:m.originalRange,options:m.originalRange.isEmpty()&&d?Dot:QN}),p.lineRangeMapping.modified.contains(m.modifiedRange.startLineNumber)&&h.push({range:m.modifiedRange,options:m.modifiedRange.isEmpty()&&d?Lot:l6e});if(l)for(let p of l.changes){let m=p.original.toInclusiveRange();m&&u.push({range:m,options:c?r6e:a6e});let y=p.modified.toInclusiveRange();y&&h.push({range:y,options:c?o6e:s6e});for(let _ of p.innerChanges||[])u.push({range:_.originalRange,options:QN}),h.push({range:_.modifiedRange,options:l6e})}let f=this._diffModel.read(r).activeMovedText.read(r);for(let p of a.movedTexts)u.push({range:p.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(p===f?" currentMove":""),blockPadding:[W4.movedCodeBlockPadding,0,W4.movedCodeBlockPadding,W4.movedCodeBlockPadding]}}),h.push({range:p.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(p===f?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:u,modifiedDecorations:h}}),this._register(FS(this._editors.original,this._decorations.map(r=>r?.originalDecorations||[]))),this._register(FS(this._editors.modified,this._decorations.map(r=>r?.modifiedDecorations||[])))}}});var eQ,Iot=P(()=>{fS();nt();Is();eQ=class extends ue{constructor(e,t,n,o){super(),this._options=e,this._domNode=t,this._dimensions=n,this._sashes=o,this._sashRatio=kn(this,void 0),this.sashLeft=Hi(this,r=>{var s;let a=(s=this._sashRatio.read(r))!==null&&s!==void 0?s:this._options.splitViewDefaultRatio.read(r);return this._computeSashLeft(a,r)}),this._sash=this._register(new Cu(this._domNode,{getVerticalSashTop:r=>0,getVerticalSashLeft:r=>this.sashLeft.get(),getVerticalSashHeight:r=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(r=>{let s=this._dimensions.width.get(),a=this._computeSashLeft((this._startSashPosition+(r.currentX-r.startX))/s,void 0);this._sashRatio.set(a/s,void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._sashRatio.set(void 0,void 0))),this._register(Ln(r=>{let s=this._sashes.read(r);s&&(this._sash.orthogonalEndSash=s.bottom)})),this._register(Ln(r=>{let s=this._options.enableSplitViewResizing.read(r);this._sash.state=s?3:0,this.sashLeft.read(r),this._dimensions.height.read(r),this._sash.layout()}))}_computeSashLeft(e,t){let n=this._dimensions.width.read(t),o=Math.floor(this._options.splitViewDefaultRatio.read(t)*n),r=this._options.enableSplitViewResizing.read(t)?Math.floor(e*n):o,s=100;return n<=s*2?o:rn-s?n-s:r}}});var qAt,GAt,c6e,m7,tQ,d6e=P(()=>{Qt();Pv();Go();Md();nt();Is();KN();or();ho();kp();sh();Mi();Kt();Pr();Wt();_i();qAt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},GAt=function(i,e){return function(t,n){e(t,n,i)}},m7=c6e=class extends ue{static setBreadcrumbsSourceFactory(e){this._breadcrumbsSourceFactory.set(e,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,t,n,o){super(),this._editors=e,this._diffModel=t,this._options=n,this._instantiationService=o,this._modifiedOutlineSource=W2(this,l=>{let c=this._editors.modifiedModel.read(l),d=c6e._breadcrumbsSourceFactory.read(l);return!c||!d?void 0:d(c,this._instantiationService)}),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition(l=>{if(l.reason===3){let c=this._diffModel.get();lo(d=>{for(let u of this._editors.original.getSelections()||[])c?.ensureOriginalLineIsVisible(u.getStartPosition().lineNumber,0,d),c?.ensureOriginalLineIsVisible(u.getEndPosition().lineNumber,0,d)})}})),this._register(this._editors.modified.onDidChangeCursorPosition(l=>{if(l.reason===3){let c=this._diffModel.get();lo(d=>{for(let u of this._editors.modified.getSelections()||[])c?.ensureModifiedLineIsVisible(u.getStartPosition().lineNumber,0,d),c?.ensureModifiedLineIsVisible(u.getEndPosition().lineNumber,0,d)})}}));let r=this._diffModel.map((l,c)=>{var d,u;let h=(d=l?.unchangedRegions.read(c))!==null&&d!==void 0?d:[];return h.length===1&&h[0].modifiedLineNumber===1&&h[0].lineCount===((u=this._editors.modifiedModel.read(c))===null||u===void 0?void 0:u.getLineCount())?[]:h});this.viewZones=g1(this,(l,c)=>{let d=this._modifiedOutlineSource.read(l);if(!d)return{origViewZones:[],modViewZones:[]};let u=[],h=[],f=this._options.renderSideBySide.read(l),p=r.read(l);for(let m of p)if(!m.shouldHideControls(l)){{let y=Hi(this,v=>m.getHiddenOriginalRange(v).startLineNumber-1),_=new f8(y,24);u.push(_),c.add(new tQ(this._editors.original,_,m,m.originalUnchangedRange,!f,d,v=>this._diffModel.get().ensureModifiedLineIsVisible(v,2,void 0),this._options))}{let y=Hi(this,v=>m.getHiddenModifiedRange(v).startLineNumber-1),_=new f8(y,24);h.push(_),c.add(new tQ(this._editors.modified,_,m,m.modifiedUnchangedRange,!1,d,v=>this._diffModel.get().ensureModifiedLineIsVisible(v,2,void 0),this._options))}}return{origViewZones:u,modViewZones:h}});let s={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},a={description:"Fold Unchanged",glyphMarginHoverMessage:new cs(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(g("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+ui.asClassName(kt.fold),zIndex:10001};this._register(FS(this._editors.original,Hi(this,l=>{let c=r.read(l),d=c.map(u=>({range:u.originalUnchangedRange.toInclusiveRange(),options:s}));for(let u of c)u.shouldHideControls(l)&&d.push({range:O.fromPositions(new ke(u.originalLineNumber,1)),options:a});return d}))),this._register(FS(this._editors.modified,Hi(this,l=>{let c=r.read(l),d=c.map(u=>({range:u.modifiedUnchangedRange.toInclusiveRange(),options:s}));for(let u of c)u.shouldHideControls(l)&&d.push({range:rn.ofLength(u.modifiedLineNumber,1).toInclusiveRange(),options:a});return d}))),this._register(Ln(l=>{let c=r.read(l);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(c.map(d=>d.getHiddenOriginalRange(l).toInclusiveRange()).filter(om)),this._editors.modified.setHiddenAreas(c.map(d=>d.getHiddenModifiedRange(l).toInclusiveRange()).filter(om))}finally{this._isUpdatingHiddenAreas=!1}})),this._register(this._editors.modified.onMouseUp(l=>{var c;if(!l.event.rightButton&&l.target.position&&(!((c=l.target.element)===null||c===void 0)&&c.className.includes("fold-unchanged"))){let d=l.target.position.lineNumber,u=this._diffModel.get();if(!u)return;let h=u.unchangedRegions.get().find(f=>f.modifiedUnchangedRange.includes(d));if(!h)return;h.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(l=>{var c;if(!l.event.rightButton&&l.target.position&&(!((c=l.target.element)===null||c===void 0)&&c.className.includes("fold-unchanged"))){let d=l.target.position.lineNumber,u=this._diffModel.get();if(!u)return;let h=u.unchangedRegions.get().find(f=>f.originalUnchangedRange.includes(d));if(!h)return;h.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}}))}};m7._breadcrumbsSourceFactory=kn("breadcrumbsSourceFactory",void 0);m7=c6e=qAt([GAt(3,qt)],m7);tQ=class extends zS{constructor(e,t,n,o,r,s,a,l){let c=Do("div.diff-hidden-lines-widget");super(e,t,c.root),this._editor=e,this._unchangedRegion=n,this._unchangedRegionRange=o,this._hide=r,this._modifiedOutlineSource=s,this._revealModifiedHiddenLine=a,this._options=l,this._nodes=Do("div.diff-hidden-lines",[Do("div.top@top",{title:g("diff.hiddenLines.top","Click or drag to show more above")}),Do("div.center@content",{style:{display:"flex"}},[Do("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[pt("a",{title:g("showUnchangedRegion","Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...of("$(unfold)"))]),Do("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),Do("div.bottom@bottom",{title:g("diff.bottom","Click or drag to show more below"),role:"button"})]),c.root.appendChild(this._nodes.root);let d=Ao(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._hide?ns(this._nodes.first):this._register(Sp(this._nodes.first,{width:d.map(h=>h.contentLeft)})),this._register(Ln(h=>{let f=this._unchangedRegion.visibleLineCountTop.read(h)+this._unchangedRegion.visibleLineCountBottom.read(h)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!f),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(h)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(h)>0),this._nodes.top.classList.toggle("canMoveBottom",!f);let p=this._unchangedRegion.isDragged.read(h),m=this._editor.getDomNode();m&&(m.classList.toggle("draggingUnchangedRegion",!!p),p==="top"?(m.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(h)>0),m.classList.toggle("canMoveBottom",!f)):p==="bottom"?(m.classList.toggle("canMoveTop",!f),m.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(h)>0)):(m.classList.toggle("canMoveTop",!1),m.classList.toggle("canMoveBottom",!1)))}));let u=this._editor;this._register(Xe(this._nodes.top,"mousedown",h=>{if(h.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),h.preventDefault();let f=h.clientY,p=!1,m=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);let y=pi(this._nodes.top),_=Xe(y,"mousemove",b=>{let w=b.clientY-f;p=p||Math.abs(w)>2;let S=Math.round(w/u.getOption(66)),x=Math.max(0,Math.min(m+S,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(x,void 0)}),v=Xe(y,"mouseup",b=>{p||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),_.dispose(),v.dispose()})})),this._register(Xe(this._nodes.bottom,"mousedown",h=>{if(h.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),h.preventDefault();let f=h.clientY,p=!1,m=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);let y=pi(this._nodes.bottom),_=Xe(y,"mousemove",b=>{let w=b.clientY-f;p=p||Math.abs(w)>2;let S=Math.round(w/u.getOption(66)),x=Math.max(0,Math.min(m-S,this._unchangedRegion.getMaxVisibleLineCountBottom())),k=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(x,void 0);let D=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);u.setScrollTop(u.getScrollTop()+(D-k))}),v=Xe(y,"mouseup",b=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!p){let C=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);let w=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);u.setScrollTop(u.getScrollTop()+(w-C))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),_.dispose(),v.dispose()})})),this._register(Ln(h=>{let f=[];if(!this._hide){let p=n.getHiddenModifiedRange(h).length,m=g("hiddenLines","{0} hidden lines",p),y=pt("span",{title:g("diff.hiddenLines.expandAll","Double click to unfold")},m);y.addEventListener("dblclick",b=>{b.button===0&&(b.preventDefault(),this._unchangedRegion.showAll(void 0))}),f.push(y);let _=this._unchangedRegion.getHiddenModifiedRange(h),v=this._modifiedOutlineSource.getBreadcrumbItems(_,h);if(v.length>0){f.push(pt("span",void 0,"\xA0\xA0|\xA0\xA0"));for(let b=0;b{this._revealModifiedHiddenLine(C.startLineNumber)}}}}ns(this._nodes.others,...f)}))}}});var Mot,u6e,g7,f6e,h6e,iQ,Not=P(()=>{xl();_i();Xt();Yu();sh();nv();Zv();$f();Mot=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},u6e=function(i,e){return function(t,n){e(t,n,i)}},f6e=vi("diffProviderFactoryService"),h6e=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(iQ,e)}};h6e=Mot([u6e(0,qt)],h6e);ln(f6e,h6e,1);iQ=g7=class{constructor(e,t,n){this.editorWorkerService=t,this.telemetryService=n,this.onDidChangeEventEmitter=new ge,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){var e;(e=this.diffAlgorithmOnDidChangeSubscription)===null||e===void 0||e.dispose()}async computeDiff(e,t,n,o){var r,s;if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(e,t,n,o);if(e.getLineCount()===1&&e.getLineMaxColumn(1)===1)return t.getLineCount()===1&&t.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new du(new rn(1,2),new rn(1,t.getLineCount()+1),[new Qf(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};let a=JSON.stringify([e.uri.toString(),t.uri.toString()]),l=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(n)]),c=g7.diffCache.get(a);if(c&&c.context===l)return c.result;let d=Er.create(),u=await this.editorWorkerService.computeDiff(e.uri,t.uri,n,this.diffAlgorithm),h=d.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:h,timedOut:(r=u?.quitEarly)!==null&&r!==void 0?r:!0,detectedMoves:n.computeMoves?(s=u?.moves.length)!==null&&s!==void 0?s:0:-1}),o.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!u)throw new Error("no diff result available");return g7.diffCache.size>10&&g7.diffCache.delete(g7.diffCache.keys().next().value),g7.diffCache.set(a,{result:u,context:l}),u}setOptions(e){var t;let n=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&((t=this.diffAlgorithmOnDidChangeSubscription)===null||t===void 0||t.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,typeof e.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),n=!0),n&&this.onDidChangeEventEmitter.fire()}};iQ.diffCache=new Map;iQ=g7=Mot([u6e(1,Oc),u6e(2,Fs)],iQ)});function ZAt(i,e,t){return{changes:i.changes.map(n=>new du(n.original,n.modified,n.innerChanges?n.innerChanges.map(o=>XAt(o,e,t)):void 0)),moves:i.moves,identical:i.identical,quitEarly:i.quitEarly}}function XAt(i,e,t){let n=i.originalRange,o=i.modifiedRange;return(n.endColumn!==1||o.endColumn!==1)&&n.endColumn===e.getLineMaxColumn(n.endLineNumber)&&o.endColumn===t.getLineMaxColumn(o.endLineNumber)&&n.endLineNumber{Qi();mo();nt();Is();Not();kp();sh();Dfe();nv();ZI();Npe();Efe();ho();Vi();um();KAt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},YAt=function(i,e){return function(t,n){e(t,n,i)}},nQ=class extends ue{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,n){super(),this.model=e,this._options=t,this._diffProviderFactoryService=n,this._isDiffUpToDate=kn(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=kn(this,void 0),this.diff=this._diff,this._unchangedRegions=kn(this,void 0),this.unchangedRegions=Hi(this,a=>{var l,c;return this._options.hideUnchangedRegions.read(a)?(c=(l=this._unchangedRegions.read(a))===null||l===void 0?void 0:l.regions)!==null&&c!==void 0?c:[]:(lo(d=>{var u;for(let h of((u=this._unchangedRegions.get())===null||u===void 0?void 0:u.regions)||[])h.collapseAll(d)}),[])}),this.movedTextToCompare=kn(this,void 0),this._activeMovedText=kn(this,void 0),this._hoveredMovedText=kn(this,void 0),this.activeMovedText=Hi(this,a=>{var l,c;return(c=(l=this.movedTextToCompare.read(a))!==null&&l!==void 0?l:this._hoveredMovedText.read(a))!==null&&c!==void 0?c:this._activeMovedText.read(a)}),this._cancellationTokenSource=new Jn,this._diffProvider=Hi(this,a=>{let l=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(a)}),c=Pl("onDidChange",l.onDidChange);return{diffProvider:l,onChangeSignal:c}}),this._register(Yt(()=>this._cancellationTokenSource.cancel()));let o=f7("contentChangedSignal"),r=this._register(new hn(()=>o.trigger(void 0),200));this._register(Ln(a=>{let l=this._unchangedRegions.read(a);if(!l||l.regions.some(p=>p.isDragged.read(a)))return;let c=l.originalDecorationIds.map(p=>e.original.getDecorationRange(p)).map(p=>p?rn.fromRangeInclusive(p):void 0),d=l.modifiedDecorationIds.map(p=>e.modified.getDecorationRange(p)).map(p=>p?rn.fromRangeInclusive(p):void 0),u=l.regions.map((p,m)=>!c[m]||!d[m]?void 0:new BS(c[m].startLineNumber,d[m].startLineNumber,c[m].length,p.visibleLineCountTop.read(a),p.visibleLineCountBottom.read(a))).filter(om),h=[],f=!1;for(let p of gC(u,(m,y)=>m.getHiddenModifiedRange(a).endLineNumberExclusive===y.getHiddenModifiedRange(a).startLineNumber))if(p.length>1){f=!0;let m=p.reduce((_,v)=>_+v.lineCount,0),y=new BS(p[0].originalLineNumber,p[0].modifiedLineNumber,m,p[0].visibleLineCountTop.get(),p[p.length-1].visibleLineCountBottom.get());h.push(y)}else h.push(p[0]);if(f){let p=e.original.deltaDecorations(l.originalDecorationIds,h.map(y=>({range:y.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),m=e.modified.deltaDecorations(l.modifiedDecorationIds,h.map(y=>({range:y.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));lo(y=>{this._unchangedRegions.set({regions:h,originalDecorationIds:p,modifiedDecorationIds:m},y)})}}));let s=(a,l,c)=>{let d=BS.fromDiffs(a.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(c),this._options.hideUnchangedRegionsContextLineCount.read(c)),u,h=this._unchangedRegions.get();if(h){let y=h.originalDecorationIds.map(C=>e.original.getDecorationRange(C)).map(C=>C?rn.fromRangeInclusive(C):void 0),_=h.modifiedDecorationIds.map(C=>e.modified.getDecorationRange(C)).map(C=>C?rn.fromRangeInclusive(C):void 0),b=wot(h.regions.map((C,w)=>{if(!y[w]||!_[w])return;let S=y[w].length;return new BS(y[w].startLineNumber,_[w].startLineNumber,S,Math.min(C.visibleLineCountTop.get(),S),Math.min(C.visibleLineCountBottom.get(),S-C.visibleLineCountTop.get()))}).filter(om),(C,w)=>!w||C.modifiedLineNumber>=w.modifiedLineNumber+w.lineCount&&C.originalLineNumber>=w.originalLineNumber+w.lineCount).map(C=>new cu(C.getHiddenOriginalRange(c),C.getHiddenModifiedRange(c)));b=cu.clip(b,rn.ofLength(1,e.original.getLineCount()),rn.ofLength(1,e.modified.getLineCount())),u=cu.inverse(b,e.original.getLineCount(),e.modified.getLineCount())}let f=[];if(u)for(let y of d){let _=u.filter(v=>v.original.intersectsStrict(y.originalUnchangedRange)&&v.modified.intersectsStrict(y.modifiedUnchangedRange));f.push(...y.setVisibleRanges(_,l))}else f.push(...d);let p=e.original.deltaDecorations(h?.originalDecorationIds||[],f.map(y=>({range:y.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),m=e.modified.deltaDecorations(h?.modifiedDecorationIds||[],f.map(y=>({range:y.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));this._unchangedRegions.set({regions:f,originalDecorationIds:p,modifiedDecorationIds:m},l)};this._register(e.modified.onDidChangeContent(a=>{if(this._diff.get()){let c=yp.fromModelContentChanges(a.changes),d=(this._lastDiff,e.original,e.modified,void 0);d&&(this._lastDiff=d,lo(u=>{this._diff.set(JN.fromDiffResult(this._lastDiff),u),s(d,u);let h=this.movedTextToCompare.get();this.movedTextToCompare.set(h?this._lastDiff.moves.find(f=>f.lineRangeMapping.modified.intersect(h.lineRangeMapping.modified)):void 0,u)}))}this._isDiffUpToDate.set(!1,void 0),r.schedule()})),this._register(e.original.onDidChangeContent(a=>{if(this._diff.get()){let c=yp.fromModelContentChanges(a.changes),d=(this._lastDiff,e.original,e.modified,void 0);d&&(this._lastDiff=d,lo(u=>{this._diff.set(JN.fromDiffResult(this._lastDiff),u),s(d,u);let h=this.movedTextToCompare.get();this.movedTextToCompare.set(h?this._lastDiff.moves.find(f=>f.lineRangeMapping.modified.intersect(h.lineRangeMapping.modified)):void 0,u)}))}this._isDiffUpToDate.set(!1,void 0),r.schedule()})),this._register(Rl(async(a,l)=>{var c,d;this._options.hideUnchangedRegionsMinimumLineCount.read(a),this._options.hideUnchangedRegionsContextLineCount.read(a),r.cancel(),o.read(a);let u=this._diffProvider.read(a);u.onChangeSignal.read(a),v1(hw,a),v1(nI,a),this._isDiffUpToDate.set(!1,void 0);let h=[];l.add(e.original.onDidChangeContent(m=>{let y=yp.fromModelContentChanges(m.changes);h=vx(h,y)}));let f=[];l.add(e.modified.onDidChangeContent(m=>{let y=yp.fromModelContentChanges(m.changes);f=vx(f,y)}));let p=await u.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(a),maxComputationTimeMs:this._options.maxComputationTimeMs.read(a),computeMoves:this._options.showMoves.read(a)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||(p=ZAt(p,e.original,e.modified),p=(c=(e.original,e.modified,void 0))!==null&&c!==void 0?c:p,p=(d=(e.original,e.modified,void 0))!==null&&d!==void 0?d:p,lo(m=>{s(p,m),this._lastDiff=p;let y=JN.fromDiffResult(p);this._diff.set(y,m),this._isDiffUpToDate.set(!0,m);let _=this.movedTextToCompare.get();this.movedTextToCompare.set(_?this._lastDiff.moves.find(v=>v.lineRangeMapping.modified.intersect(_.lineRangeMapping.modified)):void 0,m)}))}))}ensureModifiedLineIsVisible(e,t,n){var o,r;if(((o=this.diff.get())===null||o===void 0?void 0:o.mappings.length)===0)return;let s=((r=this._unchangedRegions.get())===null||r===void 0?void 0:r.regions)||[];for(let a of s)if(a.getHiddenModifiedRange(void 0).contains(e)){a.showModifiedLine(e,t,n);return}}ensureOriginalLineIsVisible(e,t,n){var o,r;if(((o=this.diff.get())===null||o===void 0?void 0:o.mappings.length)===0)return;let s=((r=this._unchangedRegions.get())===null||r===void 0?void 0:r.regions)||[];for(let a of s)if(a.getHiddenOriginalRange(void 0).contains(e)){a.showOriginalLine(e,t,n);return}}async waitForDiff(){await V4e(this.isDiffUpToDate,e=>e)}serializeState(){let e=this._unchangedRegions.get();return{collapsedRegions:e?.regions.map(t=>({range:t.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(e){var t;let n=(t=e.collapsedRegions)===null||t===void 0?void 0:t.map(r=>rn.deserialize(r.range)),o=this._unchangedRegions.get();!o||!n||lo(r=>{for(let s of o.regions)for(let a of n)if(s.modifiedUnchangedRange.intersect(a)){s.setHiddenModifiedRange(a,r);break}})}};nQ=KAt([YAt(2,f6e)],nQ);JN=class i{static fromDiffResult(e){return new i(e.changes.map(t=>new eA(t)),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,n,o){this.mappings=e,this.movedTexts=t,this.identical=n,this.quitEarly=o}},eA=class{constructor(e){this.lineRangeMapping=e}},BS=class i{static fromDiffs(e,t,n,o,r){let s=du.inverse(e,t,n),a=[];for(let l of s){let c=l.original.startLineNumber,d=l.modified.startLineNumber,u=l.original.length,h=c===1&&d===1,f=c+u===t+1&&d+u===n+1;(h||f)&&u>=r+o?(h&&!f&&(u-=r),f&&!h&&(c+=r,d+=r,u-=r),a.push(new i(c,d,u,0,0))):u>=r*2+o&&(c+=r,d+=r,u-=r*2,a.push(new i(c,d,u,0,0)))}return a}get originalUnchangedRange(){return rn.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return rn.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,n,o,r){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=n,this._visibleLineCountTop=kn(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=kn(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=Hi(this,l=>this.visibleLineCountTop.read(l)+this.visibleLineCountBottom.read(l)===this.lineCount&&!this.isDragged.read(l)),this.isDragged=kn(this,void 0);let s=Math.max(Math.min(o,this.lineCount),0),a=Math.max(Math.min(r,this.lineCount-o),0);ehe(o===s),ehe(r===a),this._visibleLineCountTop.set(s,void 0),this._visibleLineCountBottom.set(a,void 0)}setVisibleRanges(e,t){let n=[],o=new _m(e.map(l=>l.modified)).subtractFrom(this.modifiedUnchangedRange),r=this.originalLineNumber,s=this.modifiedLineNumber,a=this.modifiedLineNumber+this.lineCount;if(o.ranges.length===0)this.showAll(t),n.push(this);else{let l=0;for(let c of o.ranges){let d=l===o.ranges.length-1;l++;let u=(d?a:c.endLineNumberExclusive)-s,h=new i(r,s,u,0,0);h.setHiddenModifiedRange(c,t),n.push(h),r=h.originalUnchangedRange.endLineNumberExclusive,s=h.modifiedUnchangedRange.endLineNumberExclusive}}return n}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return rn.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return rn.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){let n=e.startLineNumber-this.modifiedLineNumber,o=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(n,o,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){let n=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,n),t)}showMoreBelow(e=10,t){let n=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,n),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t,n){let o=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),r=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;t===0&&o{Qt();Ra();Go();nt();Mn();or();Wt();oQ=class extends ue{get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}constructor(e,t,n,o,r,s,a,l,c){super(),this._getViewZoneId=e,this._marginDomNode=t,this._modifiedEditor=n,this._diff=o,this._editor=r,this._viewLineCounts=s,this._originalTextModel=a,this._contextMenuService=l,this._clipboardService=c,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=ui.asClassName(kt.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";let d=this._modifiedEditor.getOption(66);this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${d}px`,this._diffActions.style.lineHeight=`${d}px`,this._marginDomNode.appendChild(this._diffActions);let u=0,h=n.getOption(126)&&!Lc,f=(p,m)=>{var y;this._contextMenuService.showContextMenu({domForShadowRoot:h&&(y=n.getDomNode())!==null&&y!==void 0?y:void 0,getAnchor:()=>({x:p,y:m}),getActions:()=>{let _=[],v=o.modified.isEmpty;return _.push(new zs("diff.clipboard.copyDeletedContent",v?o.original.length>1?g("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):g("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):o.original.length>1?g("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):g("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,async()=>{let C=this._originalTextModel.getValueInRange(o.original.toExclusiveRange());await this._clipboardService.writeText(C)})),o.original.length>1&&_.push(new zs("diff.clipboard.copyDeletedLineContent",v?g("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",o.original.startLineNumber+u):g("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",o.original.startLineNumber+u),void 0,!0,async()=>{let C=this._originalTextModel.getLineContent(o.original.startLineNumber+u);C===""&&(C=this._originalTextModel.getEndOfLineSequence()===0?` `:`\r -`),await this._clipboardService.writeText(C)})),n.getOption(90)||_.push(new zs("diff.inline.revertChange",g("diff.inline.revertChange.label","Revert this change"),void 0,!0,async()=>{this._editor.revert(this._diff)})),_},autoSelectFirstItem:!0})};this._register(go(this._diffActions,"mousedown",p=>{if(!p.leftButton)return;let{top:m,height:y}=Lo(this._diffActions),_=Math.floor(d/3);p.preventDefault(),f(p.posx,m+y+_)})),this._register(n.onMouseMove(p=>{(p.target.type===8||p.target.type===5)&&p.target.detail.viewZoneId===this._getViewZoneId()?(u=this._updateLightBulbPosition(this._marginDomNode,p.event.browserEvent.y,d),this.visibility=!0):this.visibility=!1})),this._register(n.onMouseDown(p=>{p.event.leftButton&&(p.target.type===8||p.target.type===5)&&p.target.detail.viewZoneId===this._getViewZoneId()&&(p.event.preventDefault(),u=this._updateLightBulbPosition(this._marginDomNode,p.event.browserEvent.y,d),f(p.event.posx,p.event.posy+d))}))}_updateLightBulbPosition(e,t,n){let{top:o}=Lo(e),r=t-o,s=Math.floor(r/n),a=s*n;if(this._diffActions.style.top=`${a}px`,this._viewLineCounts){let l=0;for(let c=0;c0,r=new qh(1e4),s=0,a=0,l=[];for(let h=0;h');let l=e.getLineContent(),c=Ed.isBasicASCII(l,o),d=Ed.containsRTL(l,c,r),u=a4(new uu(s.fontInfo.isMonospace&&!s.disableMonospaceOptimizations,s.fontInfo.canUseHalfwidthRightwardsArrow,l,!1,c,d,0,e,t,s.tabSize,0,s.fontInfo.spaceWidth,s.fontInfo.middotWidth,s.fontInfo.wsmiddotWidth,s.stopRenderingLineAfter,s.renderWhitespace,s.renderControlCharacters,s.fontLigatures!==qu.OFF,null),a);return a.appendString(""),u.characterMapping.getHorizontalOffset(u.characterMapping.length)}var Rot,iQ,nQ,zot=P(()=>{Vg();Vf();Ks();J0();gw();av();ap();Rot=td("diffEditorWidget",{createHTML:i=>i});iQ=class{constructor(e,t,n,o){this.lineTokens=e,this.lineBreakData=t,this.mightContainNonBasicASCII=n,this.mightContainRTL=o}},nQ=class i{static fromEditor(e){var t;let n=e.getOptions(),o=n.get(50),r=n.get(143);return new i(((t=e.getModel())===null||t===void 0?void 0:t.getOptions().tabSize)||0,o,n.get(33),o.typicalHalfwidthCharacterWidth,n.get(103),n.get(66),r.decorationsWidth,n.get(116),n.get(98),n.get(93),n.get(51))}constructor(e,t,n,o,r,s,a,l,c,d,u){this.tabSize=e,this.fontInfo=t,this.disableMonospaceOptimizations=n,this.typicalHalfwidthCharacterWidth=o,this.scrollBeyondLastColumn=r,this.lineHeight=s,this.lineDecorationsWidth=a,this.stopRenderingLineAfter=l,this.renderWhitespace=c,this.renderControlCharacters=d,this.fontLigatures=u}}});function Hot(i,e,t,n,o,r){let s=new qc(Bot(i,n)),a=new qc(Bot(e,o)),l=i.getOption(66),c=e.getOption(66),d=[],u=0,h=0;function f(p,m){for(;;){let y=s.peek(),_=a.peek();if(y&&y.lineNumber>=p&&(y=void 0),_&&_.lineNumber>=m&&(_=void 0),!y&&!_)break;let v=y?y.lineNumber-u:Number.MAX_VALUE,b=_?_.lineNumber-h:Number.MAX_VALUE;vb?(a.dequeue(),y={lineNumber:_.lineNumber-h+u,heightInPx:0}):(s.dequeue(),a.dequeue()),d.push({originalRange:rn.ofLength(y.lineNumber,1),modifiedRange:rn.ofLength(_.lineNumber,1),originalHeightInPx:l+y.heightInPx,modifiedHeightInPx:c+_.heightInPx,diff:void 0})}}for(let p of t){let b=function(C,w){var S,x,k,D;if(CI.lineNumberI+M.heightInPx,0))!==null&&x!==void 0?x:0,L=(D=(k=a.takeWhile(I=>I.lineNumberI+M.heightInPx,0))!==null&&D!==void 0?D:0;d.push({originalRange:E,modifiedRange:A,originalHeightInPx:E.length*l+T,modifiedHeightInPx:A.length*c+L,diff:p.lineRangeMapping}),v=C,_=w},m=p.lineRangeMapping;f(m.original.startLineNumber,m.modified.startLineNumber);let y=!0,_=m.modified.startLineNumber,v=m.original.startLineNumber;if(r)for(let C of m.innerChanges||[]){C.originalRange.startColumn>1&&C.modifiedRange.startColumn>1&&b(C.originalRange.startLineNumber,C.modifiedRange.startLineNumber);let w=i.getModel(),S=C.originalRange.endLineNumber<=w.getLineCount()?w.getLineMaxColumn(C.originalRange.endLineNumber):Number.MAX_SAFE_INTEGER;C.originalRange.endColumn1&&n.push({lineNumber:l,heightInPx:s*(c-1)})}for(let l of i.getWhitespaces()){if(e.has(l.id))continue;let c=l.afterLineNumber===0?0:r.convertViewPositionToModelPosition(new ke(l.afterLineNumber,1)).lineNumber;t.push({lineNumber:c,heightInPx:l.height})}return Cot(t,n,l=>l.lineNumber,(l,c)=>({lineNumber:l.lineNumber,heightInPx:l.heightInPx+c.heightInPx}))}var QAt,Fot,oQ,Vot=P(()=>{Qt();Vi();Qi();Go();nt();Is();or();ho();Vf();YX();p6e();Aot();zot();kp();sh();Mi();ap();F4();Id();QAt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Fot=function(i,e){return function(t,n){e(t,n,i)}},oQ=class extends ue{constructor(e,t,n,o,r,s,a,l,c,d){super(),this._targetWindow=e,this._editors=t,this._diffModel=n,this._options=o,this._diffEditorWidget=r,this._canIgnoreViewZoneUpdateEvent=s,this._origViewZonesToIgnore=a,this._modViewZonesToIgnore=l,this._clipboardService=c,this._contextMenuService=d,this._originalTopPadding=kn(this,0),this._originalScrollOffset=kn(this,0),this._originalScrollOffsetAnimated=$4e(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=kn(this,0),this._modifiedScrollOffset=kn(this,0),this._modifiedScrollOffsetAnimated=$4e(this._targetWindow,this._modifiedScrollOffset,this._store);let u=kn("invalidateAlignmentsState",0),h=this._register(new hn(()=>{u.set(u.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(b=>{this._canIgnoreViewZoneUpdateEvent()||h.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(b=>{this._canIgnoreViewZoneUpdateEvent()||h.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(b=>{(b.hasChanged(144)||b.hasChanged(66))&&h.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(b=>{(b.hasChanged(144)||b.hasChanged(66))&&h.schedule()}));let f=this._diffModel.map(b=>b?Ao(b.model.original.onDidChangeTokens,()=>b.model.original.tokenization.backgroundTokenizationState===2):void 0).map((b,C)=>b?.read(C)),p=Hi(b=>{let C=this._diffModel.read(b),w=C?.diff.read(b);if(!C||!w)return null;u.read(b);let x=this._options.renderSideBySide.read(b);return Hot(this._editors.original,this._editors.modified,w.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,x)}),m=Hi(b=>{var C;let w=(C=this._diffModel.read(b))===null||C===void 0?void 0:C.movedTextToCompare.read(b);if(!w)return null;u.read(b);let S=w.changes.map(x=>new eA(x));return Hot(this._editors.original,this._editors.modified,S,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)});function y(){let b=document.createElement("div");return b.className="diagonal-fill",b}let _=this._register(new Ye);this.viewZones=g1(this,(b,C)=>{var w,S,x,k,D,E,A,T;_.clear();let L=p.read(b)||[],I=[],M=[],N=this._modifiedTopPadding.read(b);N>0&&M.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:N,showInHiddenAreas:!0,suppressMouseDown:!0});let z=this._originalTopPadding.read(b);z>0&&I.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:z,showInHiddenAreas:!0,suppressMouseDown:!0});let F=this._options.renderSideBySide.read(b),V=F||(w=this._editors.modified._getViewModel())===null||w===void 0?void 0:w.createLineBreaksComputer();if(V){let Ie=this._editors.original.getModel();for(let ee of L)if(ee.diff)for(let Z=ee.originalRange.startLineNumber;ZIe.getLineCount())return{orig:I,mod:M};V?.addRequest(Ie.getLineContent(Z),null,null)}}let ie=(S=V?.finalize())!==null&&S!==void 0?S:[],fe=0,K=this._editors.modified.getOption(66),oe=(x=this._diffModel.read(b))===null||x===void 0?void 0:x.movedTextToCompare.read(b),je=(D=(k=this._editors.original.getModel())===null||k===void 0?void 0:k.mightContainNonBasicASCII())!==null&&D!==void 0?D:!1,Ae=(A=(E=this._editors.original.getModel())===null||E===void 0?void 0:E.mightContainRTL())!==null&&A!==void 0?A:!1,Be=nQ.fromEditor(this._editors.modified);for(let Ie of L)if(Ie.diff&&!F){if(!Ie.originalRange.isEmpty){f.read(b);let Z=document.createElement("div");Z.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");let te=this._editors.original.getModel();if(Ie.originalRange.endLineNumberExclusive-1>te.getLineCount())return{orig:I,mod:M};let W=new iQ(Ie.originalRange.mapToLineArray(Oe=>te.tokenization.getLineTokens(Oe)),Ie.originalRange.mapToLineArray(Oe=>ie[fe++]),je,Ae),Le=[];for(let Oe of Ie.diff.innerChanges||[])Le.push(new l4(Oe.originalRange.delta(-(Ie.diff.original.startLineNumber-1)),QN.className,0));let rt=Oot(W,Be,Le,Z),ae=document.createElement("div");if(ae.className="inline-deleted-margin-view-zone",Gr(ae,Be.fontInfo),this._options.renderIndicators.read(b))for(let Oe=0;OeX1(Ze),ae,this._editors.modified,Ie.diff,this._diffEditorWidget,rt.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let Oe=0;Oe1&&I.push({afterLineNumber:Ie.originalRange.startLineNumber+Oe,domNode:y(),heightInPx:(tt-1)*K,showInHiddenAreas:!0,suppressMouseDown:!0})}M.push({afterLineNumber:Ie.modifiedRange.startLineNumber-1,domNode:Z,heightInPx:rt.heightInLines*K,minWidthInPx:rt.minWidthInPx,marginDomNode:ae,setZoneId(Oe){Ze=Oe},showInHiddenAreas:!0,suppressMouseDown:!0})}let ee=document.createElement("div");ee.className="gutter-delete",I.push({afterLineNumber:Ie.originalRange.endLineNumberExclusive-1,domNode:y(),heightInPx:Ie.modifiedHeightInPx,marginDomNode:ee,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let ee=Ie.modifiedHeightInPx-Ie.originalHeightInPx;if(ee>0){if(oe?.lineRangeMapping.original.delta(-1).deltaLength(2).contains(Ie.originalRange.endLineNumberExclusive-1))continue;I.push({afterLineNumber:Ie.originalRange.endLineNumberExclusive-1,domNode:y(),heightInPx:ee,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let Z=function(){let W=document.createElement("div");return W.className="arrow-revert-change "+ui.asClassName(kt.arrowRight),C.add(Xe(W,"mousedown",Le=>Le.stopPropagation())),C.add(Xe(W,"click",Le=>{Le.stopPropagation(),r.revert(Ie.diff)})),pt("div",{},W)};if(oe?.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(Ie.modifiedRange.endLineNumberExclusive-1))continue;let te;Ie.diff&&Ie.diff.modified.isEmpty&&this._options.shouldRenderRevertArrows.read(b)&&(te=Z()),M.push({afterLineNumber:Ie.modifiedRange.endLineNumberExclusive-1,domNode:y(),heightInPx:-ee,marginDomNode:te,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(let Ie of(T=m.read(b))!==null&&T!==void 0?T:[]){if(!oe?.lineRangeMapping.original.intersect(Ie.originalRange)||!oe?.lineRangeMapping.modified.intersect(Ie.modifiedRange))continue;let ee=Ie.modifiedHeightInPx-Ie.originalHeightInPx;ee>0?I.push({afterLineNumber:Ie.originalRange.endLineNumberExclusive-1,domNode:y(),heightInPx:ee,showInHiddenAreas:!0,suppressMouseDown:!0}):M.push({afterLineNumber:Ie.modifiedRange.endLineNumberExclusive-1,domNode:y(),heightInPx:-ee,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:I,mod:M}});let v=!1;this._register(this._editors.original.onDidScrollChange(b=>{b.scrollLeftChanged&&!v&&(v=!0,this._editors.modified.setScrollLeft(b.scrollLeft),v=!1)})),this._register(this._editors.modified.onDidScrollChange(b=>{b.scrollLeftChanged&&!v&&(v=!0,this._editors.original.setScrollLeft(b.scrollLeft),v=!1)})),this._originalScrollTop=Ao(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Ao(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register(Ln(b=>{let C=this._originalScrollTop.read(b)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(b))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(b));C!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(C,1)})),this._register(Ln(b=>{let C=this._modifiedScrollTop.read(b)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(b))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(b));C!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(C,1)})),this._register(Ln(b=>{var C;let w=(C=this._diffModel.read(b))===null||C===void 0?void 0:C.movedTextToCompare.read(b),S=0;if(w){let x=this._editors.original.getTopForLineNumber(w.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();S=this._editors.modified.getTopForLineNumber(w.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-x}S>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(S,void 0)):S<0?(this._modifiedTopPadding.set(-S,void 0),this._originalTopPadding.set(0,void 0)):setTimeout(()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)},400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-S,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+S,void 0,!0)}))}};oQ=QAt([Fot(8,Pd),Fot(9,ca)],oQ)});var JAt,eRt,Lp,U4,m6e=P(()=>{Qt();_a();Fj();nt();Is();kp();Mi();fpe();pr();No();JAt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},eRt=function(i,e){return function(t,n){e(t,n,i)}},U4=Lp=class extends ue{constructor(e,t,n,o,r,s,a){super(),this._editors=e,this._rootElement=t,this._diffModel=n,this._rootWidth=o,this._rootHeight=r,this._modifiedEditorLayoutInfo=s,this._themeService=a,this.width=Lp.ENTIRE_DIFF_OVERVIEW_WIDTH;let l=Ao(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),c=Hi(h=>{let f=l.read(h),p=f.getColor(jYe)||(f.getColor(UYe)||dj).transparent(2),m=f.getColor(qYe)||(f.getColor($Ye)||uj).transparent(2);return{insertColor:p,removeColor:m}}),d=vn(document.createElement("div"));d.setClassName("diffViewport"),d.setPosition("absolute");let u=Do("div.diffOverview",{style:{position:"absolute",top:"0px",width:Lp.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register(YN(u,d.domNode)),this._register(go(u,Lt.POINTER_DOWN,h=>{this._editors.modified.delegateVerticalScrollbarPointerDown(h)})),this._register(Xe(u,Lt.MOUSE_WHEEL,h=>{this._editors.modified.delegateScrollFromMouseWheelEvent(h)},{passive:!1})),this._register(YN(this._rootElement,u)),this._register(Rl((h,f)=>{let p=this._diffModel.read(h),m=this._editors.original.createOverviewRuler("original diffOverviewRuler");m&&(f.add(m),f.add(YN(u,m.getDomNode())));let y=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(y&&(f.add(y),f.add(YN(u,y.getDomNode()))),!m||!y)return;let _=Pl("viewZoneChanged",this._editors.original.onDidChangeViewZones),v=Pl("viewZoneChanged",this._editors.modified.onDidChangeViewZones),b=Pl("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),C=Pl("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);f.add(Ln(w=>{var S;_.read(w),v.read(w),b.read(w),C.read(w);let x=c.read(w),k=(S=p?.diff.read(w))===null||S===void 0?void 0:S.mappings;function D(T,L,I){let M=I._getViewModel();return M?T.filter(N=>N.length>0).map(N=>{let z=M.coordinatesConverter.convertModelPositionToViewPosition(new ke(N.startLineNumber,1)),F=M.coordinatesConverter.convertModelPositionToViewPosition(new ke(N.endLineNumberExclusive,1)),V=F.lineNumber-z.lineNumber;return new jI(z.lineNumber,F.lineNumber,V,L.toString())}):[]}let E=D((k||[]).map(T=>T.lineRangeMapping.original),x.removeColor,this._editors.original),A=D((k||[]).map(T=>T.lineRangeMapping.modified),x.insertColor,this._editors.modified);m?.setZones(E),y?.setZones(A)})),f.add(Ln(w=>{let S=this._rootHeight.read(w),x=this._rootWidth.read(w),k=this._modifiedEditorLayoutInfo.read(w);if(k){let D=Lp.ENTIRE_DIFF_OVERVIEW_WIDTH-2*Lp.ONE_OVERVIEW_WIDTH;m.setLayout({top:0,height:S,right:D+Lp.ONE_OVERVIEW_WIDTH,width:Lp.ONE_OVERVIEW_WIDTH}),y.setLayout({top:0,height:S,right:0,width:Lp.ONE_OVERVIEW_WIDTH});let E=this._editors.modifiedScrollTop.read(w),A=this._editors.modifiedScrollHeight.read(w),T=this._editors.modified.getOption(102),L=new hv(T.verticalHasArrows?T.arrowSize:0,T.verticalScrollbarSize,0,k.height,A,E);d.setTop(L.getSliderPosition()),d.setHeight(L.getSliderSize())}else d.setTop(0),d.setHeight(0);u.style.height=S+"px",u.style.left=x-Lp.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",d.setWidth(Lp.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}};U4.ONE_OVERVIEW_WIDTH=15;U4.ENTIRE_DIFF_OVERVIEW_WIDTH=Lp.ONE_OVERVIEW_WIDTH*2;U4=Lp=JAt([eRt(6,Mo)],U4)});var tA,Wot=P(()=>{Xt();nt();tA=class i extends ue{constructor(){super(...arguments),this._id=++i.idCounter,this._onDidDispose=this._register(new ge),this.onDidDispose=this._onDidDispose.event}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,n=0){this._targetEditor.revealLines(e,t,n)}revealLinesInCenter(e,t,n=0){this._targetEditor.revealLinesInCenter(e,t,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,n)}revealLinesNearTop(e,t,n=0){this._targetEditor.revealLinesNearTop(e,t,n)}revealRange(e,t=0,n=!1,o=!0){this._targetEditor.revealRange(e,t,n,o)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,n){this._targetEditor.trigger(e,t,n)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}};tA.idCounter=0});var tRt,Uot,rQ,$ot=P(()=>{Xt();nt();Is();m6e();Ks();Wt();_i();vs();Mi();tRt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Uot=function(i,e){return function(t,n){e(t,n,i)}},rQ=class extends ue{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,t,n,o,r,s,a){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=n,this._createInnerEditor=r,this._instantiationService=s,this._keybindingService=a,this._onDidContentSizeChange=this._register(new ge),this.original=this._register(this._createLeftHandSideEditor(n.editorOptions.get(),o.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(n.editorOptions.get(),o.modifiedEditor||{})),this.modifiedModel=Ao(this.modified.onDidChangeModel,()=>this.modified.getModel()),this.modifiedScrollTop=Ao(this.modified.onDidScrollChange,()=>this.modified.getScrollTop()),this.modifiedScrollHeight=Ao(this.modified.onDidScrollChange,()=>this.modified.getScrollHeight()),this.modifiedSelections=Ao(this.modified.onDidChangeCursorSelection,()=>{var l;return(l=this.modified.getSelections())!==null&&l!==void 0?l:[]}),this.modifiedCursor=Ao(this.modified.onDidChangeCursorPosition,()=>{var l;return(l=this.modified.getPosition())!==null&&l!==void 0?l:new ke(1,1)}),this._register(U2({createEmptyChangeSummary:()=>({}),handleChange:(l,c)=>(l.didChange(n.editorOptions)&&Object.assign(c,l.change.changedOptions),!0)},(l,c)=>{n.editorOptions.read(l),this._options.renderSideBySide.read(l),this.modified.updateOptions(this._adjustOptionsForRightHandSide(l,c)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(l,c))}))}_createLeftHandSideEditor(e,t){let n=this._adjustOptionsForLeftHandSide(void 0,e),o=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,n,t);return o.setContextValue("isInDiffLeftEditor",!0),o}_createRightHandSideEditor(e,t){let n=this._adjustOptionsForRightHandSide(void 0,e),o=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,n,t);return o.setContextValue("isInDiffRightEditor",!0),o}_constructInnerEditor(e,t,n,o){let r=this._createInnerEditor(e,t,n,o);return this._register(r.onDidContentSizeChange(s=>{let a=this.original.getContentWidth()+this.modified.getContentWidth()+U4.ENTIRE_DIFF_OVERVIEW_WIDTH,l=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:l,contentWidth:a,contentHeightChanged:s.contentHeightChanged,contentWidthChanged:s.contentWidthChanged})})),r}_adjustOptionsForLeftHandSide(e,t){let n=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(n.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},n.wordWrapOverride1=this._options.diffWordWrap.get()):(n.wordWrapOverride1="off",n.wordWrapOverride2="off",n.stickyScroll={enabled:!1},n.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),n.glyphMargin=this._options.renderSideBySide.get(),t.originalAriaLabel&&(n.ariaLabel=t.originalAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.readOnly=!this._options.originalEditable.get(),n.dropIntoEditor={enabled:!n.readOnly},n.extraEditorClassName="original-in-monaco-diff-editor",n}_adjustOptionsForRightHandSide(e,t){let n=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(n.ariaLabel=t.modifiedAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.wordWrapOverride1=this._options.diffWordWrap.get(),n.revealHorizontalRightPadding=nu.revealHorizontalRightPadding.defaultValue+U4.ENTIRE_DIFF_OVERVIEW_WIDTH,n.scrollbar.verticalHasArrows=!1,n.extraEditorClassName="modified-in-monaco-diff-editor",n}_adjustOptionsForSubEditor(e){let t={...e,dimension:{height:0,width:0}};return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar={...t.scrollbar||{}},t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap={...t.minimap||{}},t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){var t;e||(e="");let n=g("diff-aria-navigation-tip"," use {0} to open the accessibility help.",(t=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))===null||t===void 0?void 0:t.getAriaLabel());return this._options.accessibilityVerbose.get()?e+n:e?e.replaceAll(n,""):""}};rQ=tRt([Uot(5,qt),Uot(6,fn)],rQ)});function jot(i,e){var t,n,o,r,s,a,l,c;return{enableSplitViewResizing:Ti(i.enableSplitViewResizing,e.enableSplitViewResizing),splitViewDefaultRatio:Rje(i.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:Ti(i.renderSideBySide,e.renderSideBySide),renderMarginRevertIcon:Ti(i.renderMarginRevertIcon,e.renderMarginRevertIcon),maxComputationTime:w3(i.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:w3(i.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:Ti(i.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:Ti(i.renderIndicators,e.renderIndicators),originalEditable:Ti(i.originalEditable,e.originalEditable),diffCodeLens:Ti(i.diffCodeLens,e.diffCodeLens),renderOverviewRuler:Ti(i.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:ws(i.diffWordWrap,e.diffWordWrap,["off","on","inherit"]),diffAlgorithm:ws(i.diffAlgorithm,e.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:Ti(i.accessibilityVerbose,e.accessibilityVerbose),experimental:{showMoves:Ti((t=i.experimental)===null||t===void 0?void 0:t.showMoves,e.experimental.showMoves),showEmptyDecorations:Ti((n=i.experimental)===null||n===void 0?void 0:n.showEmptyDecorations,e.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:Ti((r=(o=i.hideUnchangedRegions)===null||o===void 0?void 0:o.enabled)!==null&&r!==void 0?r:(s=i.experimental)===null||s===void 0?void 0:s.collapseUnchangedRegions,e.hideUnchangedRegions.enabled),contextLineCount:w3((a=i.hideUnchangedRegions)===null||a===void 0?void 0:a.contextLineCount,e.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:w3((l=i.hideUnchangedRegions)===null||l===void 0?void 0:l.minimumLineCount,e.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:w3((c=i.hideUnchangedRegions)===null||c===void 0?void 0:c.revealLineCount,e.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:Ti(i.isInEmbeddedEditor,e.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:Ti(i.onlyShowAccessibleDiffViewer,e.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:w3(i.renderSideBySideInlineBreakpoint,e.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:Ti(i.useInlineViewWhenSpaceIsLimited,e.useInlineViewWhenSpaceIsLimited)}}var sQ,qot=P(()=>{Is();jge();Ks();sQ=class{get editorOptions(){return this._options}constructor(e){this._diffEditorWidth=kn(this,0),this.couldShowInlineViewBecauseOfSize=Hi(this,n=>this._options.read(n).renderSideBySide&&this._diffEditorWidth.read(n)<=this._options.read(n).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=Hi(this,n=>this._options.read(n).renderOverviewRuler),this.renderSideBySide=Hi(this,n=>this._options.read(n).renderSideBySide&&!(this._options.read(n).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(n))),this.readOnly=Hi(this,n=>this._options.read(n).readOnly),this.shouldRenderRevertArrows=Hi(this,n=>!(!this._options.read(n).renderMarginRevertIcon||!this.renderSideBySide.read(n)||this.readOnly.read(n))),this.renderIndicators=Hi(this,n=>this._options.read(n).renderIndicators),this.enableSplitViewResizing=Hi(this,n=>this._options.read(n).enableSplitViewResizing),this.splitViewDefaultRatio=Hi(this,n=>this._options.read(n).splitViewDefaultRatio),this.ignoreTrimWhitespace=Hi(this,n=>this._options.read(n).ignoreTrimWhitespace),this.maxComputationTimeMs=Hi(this,n=>this._options.read(n).maxComputationTime),this.showMoves=Hi(this,n=>this._options.read(n).experimental.showMoves&&this.renderSideBySide.read(n)),this.isInEmbeddedEditor=Hi(this,n=>this._options.read(n).isInEmbeddedEditor),this.diffWordWrap=Hi(this,n=>this._options.read(n).diffWordWrap),this.originalEditable=Hi(this,n=>this._options.read(n).originalEditable),this.diffCodeLens=Hi(this,n=>this._options.read(n).diffCodeLens),this.accessibilityVerbose=Hi(this,n=>this._options.read(n).accessibilityVerbose),this.diffAlgorithm=Hi(this,n=>this._options.read(n).diffAlgorithm),this.showEmptyDecorations=Hi(this,n=>this._options.read(n).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=Hi(this,n=>this._options.read(n).onlyShowAccessibleDiffViewer),this.hideUnchangedRegions=Hi(this,n=>this._options.read(n).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=Hi(this,n=>this._options.read(n).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=Hi(this,n=>this._options.read(n).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=Hi(this,n=>this._options.read(n).hideUnchangedRegions.minimumLineCount);let t={...e,...jot(e,oc)};this._options=kn(this,t)}updateOptions(e){let t=jot(e,this._options.get()),n={...this._options.get(),...e,...t};this._options.set(n,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}}});var aQ,iA,Got=P(()=>{Qt();Rv();Go();nt();Is();sh();Kt();Ca();Wt();aQ=class extends ue{constructor(e,t,n,o){super(),this._editors=e,this._diffModel=t,this._options=n,this._widget=o;let r=[],s=Hi(this,a=>{let l=this._diffModel.read(a),c=l?.diff.read(a);if(!c)return r;let d=this._editors.modifiedSelections.read(a);if(d.every(p=>p.isEmpty()))return r;let u=new _m(d.map(p=>rn.fromRangeInclusive(p))),f=c.mappings.filter(p=>p.lineRangeMapping.innerChanges&&u.intersects(p.lineRangeMapping.modified)).map(p=>({mapping:p,rangeMappings:p.lineRangeMapping.innerChanges.filter(m=>d.some(y=>O.areIntersecting(m.modifiedRange,y)))}));return f.length===0||f.every(p=>p.rangeMappings.length===0)?r:f});this._register(Rl((a,l)=>{let c=this._diffModel.read(a),d=c?.diff.read(a);if(!c||!d||this._diffModel.read(a).movedTextToCompare.read(a)||!this._options.shouldRenderRevertArrows.read(a))return;let h=[],f=s.read(a),p=new Set(f.map(m=>m.mapping));if(f.length>0){let m=this._editors.modifiedSelections.read(a),y=l.add(new iA(m[m.length-1].positionLineNumber,this._widget,f.flatMap(_=>_.rangeMappings),!0));this._editors.modified.addGlyphMarginWidget(y),h.push(y)}for(let m of d.mappings)if(!p.has(m)&&!m.lineRangeMapping.modified.isEmpty&&m.lineRangeMapping.innerChanges){let y=l.add(new iA(m.lineRangeMapping.modified.startLineNumber,this._widget,m.lineRangeMapping.innerChanges,!1));this._editors.modified.addGlyphMarginWidget(y),h.push(y)}l.add(Yt(()=>{for(let m of h)this._editors.modified.removeGlyphMarginWidget(m)}))}))}},iA=class i extends ue{getId(){return this._id}constructor(e,t,n,o){super(),this._lineNumber=e,this._widget=t,this._diffs=n,this._selection=o,this._id=`revertButton${i.counter++}`,this._domNode=Do("div.revertButton",{title:this._selection?g("revertSelectedChanges","Revert Selected Changes"):g("revertChange","Revert Change")},[Bx(kt.arrowRight)]).root,this._register(Xe(this._domNode,Lt.MOUSE_DOWN,r=>{r.button!==2&&(r.stopPropagation(),r.preventDefault())})),this._register(Xe(this._domNode,Lt.MOUSE_UP,r=>{r.stopPropagation(),r.preventDefault()})),this._register(Xe(this._domNode,Lt.CLICK,r=>{this._widget.revertRangeMappings(this._diffs),r.stopPropagation(),r.preventDefault()}))}getDomNode(){return this._domNode}getPosition(){return{lane:lu.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}};iA.counter=0});function nRt(i){return i.mappings.map(e=>{let t=e.lineRangeMapping,n,o,r,s,a=t.innerChanges;return t.original.isEmpty?(n=t.original.startLineNumber-1,o=0,a=void 0):(n=t.original.startLineNumber,o=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(r=t.modified.startLineNumber-1,s=0,a=void 0):(r=t.modified.startLineNumber,s=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:n,originalEndLineNumber:o,modifiedStartLineNumber:r,modifiedEndLineNumber:s,charChanges:a?.map(l=>({originalStartLineNumber:l.originalRange.startLineNumber,originalStartColumn:l.originalRange.startColumn,originalEndLineNumber:l.originalRange.endLineNumber,originalEndColumn:l.originalRange.endColumn,modifiedStartLineNumber:l.modifiedRange.startLineNumber,modifiedStartColumn:l.modifiedRange.startColumn,modifiedEndLineNumber:l.modifiedRange.endLineNumber,modifiedEndColumn:l.modifiedRange.endColumn}))}})}var iRt,nA,jm,lQ=P(()=>{Qt();rh();Pi();Xt();nt();Is();KN();bot();an();fs();p7();IM();Sot();Tot();Iot();d6e();Vot();i6e();m6e();kp();Mi();Kt();dI();Co();r8();Xi();_i();Ix();xp();Wot();$ot();qot();p6e();Got();iRt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},nA=function(i,e){return function(t,n){e(t,n,i)}},jm=class extends tA{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,t,n,o,r,s,a,l){var c;super(),this._domElement=e,this._parentContextKeyService=o,this._parentInstantiationService=r,this._audioCueService=a,this._editorProgressService=l,this.elements=Do("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[Do("div.noModificationsOverlay@overlay",{style:{position:"absolute",height:"100%",visibility:"hidden"}},[pt("span",{},"No Changes")]),Do("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),Do("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),Do("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModel=kn(this,void 0),this._shouldDisposeDiffModel=!1,this.onDidChangeModel=Et.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._parentInstantiationService.createChild(new wp([ri,this._contextKeyService])),this._boundarySashes=kn(this,void 0),this._accessibleDiffViewerShouldBeVisible=kn(this,!1),this._accessibleDiffViewerVisible=Hi(this,C=>this._options.onlyShowAccessibleDiffViewer.read(C)?!0:this._accessibleDiffViewerShouldBeVisible.read(C)),this._movedBlocksLinesPart=kn(this,void 0),this._layoutInfo=Hi(this,C=>{var w,S,x,k,D;let E=this._rootSizeObserver.width.read(C),A=this._rootSizeObserver.height.read(C),T=(w=this._sash.read(C))===null||w===void 0?void 0:w.sashLeft.read(C),L=T??Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),I=E-L-((x=(S=this._overviewRulerPart.read(C))===null||S===void 0?void 0:S.width)!==null&&x!==void 0?x:0),M=(D=(k=this._movedBlocksLinesPart.read(C))===null||k===void 0?void 0:k.width.read(C))!==null&&D!==void 0?D:0,N=L-M;return this.elements.original.style.width=N+"px",this.elements.original.style.left="0px",this.elements.modified.style.width=I+"px",this.elements.modified.style.left=L+"px",this._editors.original.layout({width:N,height:A},!0),this._editors.modified.layout({width:I,height:A},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((C,w)=>C?.diff.read(w)),this.onDidUpdateDiff=Et.fromObservableLight(this._diffValue),s.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(Yt(()=>this._domElement.removeChild(this.elements.root))),this._rootSizeObserver=this._register(new OS(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout((c=t.automaticLayout)!==null&&c!==void 0?c:!1),this._options=new sQ(t),this._register(Ln(C=>{this._options.setWidth(this._rootSizeObserver.width.read(C))})),this._contextKeyService.createKey(re.isEmbeddedDiffEditor.key,!1),this._register(ZN(re.isEmbeddedDiffEditor,this._contextKeyService,C=>this._options.isInEmbeddedEditor.read(C))),this._register(ZN(re.comparingMovedCode,this._contextKeyService,C=>{var w;return!!(!((w=this._diffModel.read(C))===null||w===void 0)&&w.movedTextToCompare.read(C))})),this._register(ZN(re.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,C=>this._options.couldShowInlineViewBecauseOfSize.read(C))),this._register(ZN(re.hasChanges,this._contextKeyService,C=>{var w,S,x;return((x=(S=(w=this._diffModel.read(C))===null||w===void 0?void 0:w.diff.read(C))===null||S===void 0?void 0:S.mappings.length)!==null&&x!==void 0?x:0)>0})),this._editors=this._register(this._instantiationService.createInstance(rQ,this.elements.original,this.elements.modified,this._options,n,(C,w,S,x)=>this._createInnerEditor(C,w,S,x))),this._overviewRulerPart=W2(this,C=>this._options.renderOverviewRuler.read(C)?this._instantiationService.createInstance(v1(U4,C),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(w=>w.modifiedEditor)):void 0).recomputeInitiallyAndOnChange(this._store),this._sash=W2(this,C=>{let w=this._options.renderSideBySide.read(C);return this.elements.root.classList.toggle("side-by-side",w),w?new XX(this._options,this.elements.root,{height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((S,x)=>{var k,D;return S-((D=(k=this._overviewRulerPart.read(x))===null||k===void 0?void 0:k.width)!==null&&D!==void 0?D:0)})},this._boundarySashes):void 0}).recomputeInitiallyAndOnChange(this._store);let d=W2(this,C=>this._instantiationService.createInstance(v1(m7,C),this._editors,this._diffModel,this._options)).recomputeInitiallyAndOnChange(this._store);W2(this,C=>this._instantiationService.createInstance(v1(ZX,C),this._editors,this._diffModel,this._options,this)).recomputeInitiallyAndOnChange(this._store);let u=new Set,h=new Set,f=!1,p=W2(this,C=>this._instantiationService.createInstance(v1(oQ,C),pi(this._domElement),this._editors,this._diffModel,this._options,this,()=>f||d.get().isUpdatingHiddenAreas,u,h)).recomputeInitiallyAndOnChange(this._store),m=Hi(this,C=>{let w=p.read(C).viewZones.read(C).orig,S=d.read(C).viewZones.read(C).origViewZones;return w.concat(S)}),y=Hi(this,C=>{let w=p.read(C).viewZones.read(C).mod,S=d.read(C).viewZones.read(C).modViewZones;return w.concat(S)});this._register(HS(this._editors.original,m,C=>{f=C},u));let _;this._register(HS(this._editors.modified,y,C=>{f=C,f?_=xu.capture(this._editors.modified):(_?.restore(this._editors.modified),_=void 0)},h)),this._accessibleDiffViewer=W2(this,C=>this._instantiationService.createInstance(v1(V4,C),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(w,S)=>this._accessibleDiffViewerShouldBeVisible.set(w,S),this._options.onlyShowAccessibleDiffViewer.map(w=>!w),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((w,S)=>{var x;return(x=w?.diff.read(S))===null||x===void 0?void 0:x.mappings.map(k=>k.lineRangeMapping)}),this._editors)).recomputeInitiallyAndOnChange(this._store);let v=this._accessibleDiffViewerVisible.map(C=>C?"hidden":"visible");this._register(Sp(this.elements.modified,{visibility:v})),this._register(Sp(this.elements.original,{visibility:v})),this._createDiffEditorContributions(),s.addDiffEditor(this),this._register($2(this._layoutInfo)),W2(this,C=>new(v1(W4,C))(this.elements.root,this._diffModel,this._layoutInfo.map(w=>w.originalEditor),this._layoutInfo.map(w=>w.modifiedEditor),this._editors)).recomputeInitiallyAndOnChange(this._store,C=>{this._movedBlocksLinesPart.set(C,void 0)}),this._register(Sp(this.elements.overlay,{width:this._layoutInfo.map((C,w)=>C.originalEditor.width+(this._options.renderSideBySide.read(w)?0:C.modifiedEditor.width)),visibility:Hi(C=>{var w,S;return this._options.hideUnchangedRegions.read(C)&&((S=(w=this._diffModel.read(C))===null||w===void 0?void 0:w.diff.read(C))===null||S===void 0?void 0:S.mappings.length)===0?"visible":"hidden"})})),this._register(Et.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,C=>{var w,S;if(C?.reason===3){let x=(S=(w=this._diffModel.get())===null||w===void 0?void 0:w.diff.get())===null||S===void 0?void 0:S.mappings.find(k=>k.lineRangeMapping.modified.contains(C.position.lineNumber));x?.lineRangeMapping.modified.isEmpty?this._audioCueService.playAudioCue(Cn.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):x?.lineRangeMapping.original.isEmpty?this._audioCueService.playAudioCue(Cn.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):x&&this._audioCueService.playAudioCue(Cn.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}));let b=this._diffModel.map(this,(C,w)=>{if(C)return C.diff.read(w)===void 0&&!C.isDiffUpToDate.read(w)});this._register(Rl((C,w)=>{if(b.read(C)===!0){let S=this._editorProgressService.show(!0,1e3);w.add(Yt(()=>S.done()))}})),this._register(Yt(()=>{var C;this._shouldDisposeDiffModel&&((C=this._diffModel.get())===null||C===void 0||C.dispose())})),this._register(new aQ(this._editors,this._diffModel,this._options,this))}_createInnerEditor(e,t,n,o){return e.createInstance(S4,t,n,o)}_createDiffEditorContributions(){let e=$3.getDiffEditorContributions();for(let t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(n){hi(n)}}get _targetEditor(){return this._editors.modified}getEditorType(){return s4.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var e;let t=this._editors.original.saveViewState(),n=this._editors.modified.saveViewState();return{original:t,modified:n,modelState:(e=this._diffModel.get())===null||e===void 0?void 0:e.serializeState()}}restoreViewState(e){var t;if(e&&e.original&&e.modified){let n=e;this._editors.original.restoreViewState(n.original),this._editors.modified.restoreViewState(n.modified),n.modelState&&((t=this._diffModel.get())===null||t===void 0||t.restoreSerializedState(n.modelState))}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(eQ,e,this._options)}getModel(){var e,t;return(t=(e=this._diffModel.get())===null||e===void 0?void 0:e.model)!==null&&t!==void 0?t:null}setModel(e,t){!e&&this._diffModel.get()&&this._accessibleDiffViewer.get().close();let n=e?"model"in e?{model:e,shouldDispose:!1}:{model:this.createViewModel(e),shouldDispose:!0}:void 0;this._diffModel.get()!==n?.model&&V2(t,o=>{var r;Ao.batchEventsGlobally(o,()=>{this._editors.original.setModel(n?n.model.model.original:null),this._editors.modified.setModel(n?n.model.model.modified:null)});let s=this._diffModel.get(),a=this._shouldDisposeDiffModel;this._shouldDisposeDiffModel=(r=n?.shouldDispose)!==null&&r!==void 0?r:!1,this._diffModel.set(n?.model,o),a&&s?.dispose()})}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var e;let t=(e=this._diffModel.get())===null||e===void 0?void 0:e.diff.get();return t?nRt(t):null}revert(e){if(e.innerChanges){this.revertRangeMappings(e.innerChanges);return}let t=this._diffModel.get();!t||!t.isDiffUpToDate.get()||this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:t.model.original.getValueInRange(e.original.toExclusiveRange())}])}revertRangeMappings(e){let t=this._diffModel.get();if(!t||!t.isDiffUpToDate.get())return;let n=e.map(o=>({range:o.modifiedRange,text:t.model.original.getValueInRange(o.originalRange)}));this._editors.modified.executeEdits("diffEditor",n)}_goTo(e){this._editors.modified.setPosition(new ke(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){var t,n,o,r;let s=(n=(t=this._diffModel.get())===null||t===void 0?void 0:t.diff.get())===null||n===void 0?void 0:n.mappings;if(!s||s.length===0)return;let a=this._editors.modified.getPosition().lineNumber,l;e==="next"?l=(o=s.find(c=>c.lineRangeMapping.modified.startLineNumber>a))!==null&&o!==void 0?o:s[0]:l=(r=o4(s,c=>c.lineRangeMapping.modified.startLineNumber{var t;let n=(t=e.diff.get())===null||t===void 0?void 0:t.mappings;!n||n.length===0||this._goTo(n[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){let e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){var e,t;let n=this._editors.modified.hasWidgetFocus(),o=n?this._editors.modified:this._editors.original,r=n?this._editors.original:this._editors.modified,s,a=o.getSelection();if(a){let l=(t=(e=this._diffModel.get())===null||e===void 0?void 0:e.diff.get())===null||t===void 0?void 0:t.mappings.map(c=>n?c.lineRangeMapping.flip():c.lineRangeMapping);if(l){let c=j4e(a.getStartPosition(),l),d=j4e(a.getEndPosition(),l);s=O.plusRange(c,d)}}return{destination:r,destinationSelection:s}}switchSide(){let{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){let e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){var e;let t=(e=this._diffModel.get())===null||e===void 0?void 0:e.unchangedRegions.get();t&&lo(n=>{for(let o of t)o.collapseAll(n)})}showAllUnchangedRegions(){var e;let t=(e=this._diffModel.get())===null||e===void 0?void 0:e.unchangedRegions.get();t&&lo(n=>{for(let o of t)o.showAll(n)})}};jm=iRt([nA(3,ri),nA(4,qt),nA(5,tn),nA(6,_h),nA(7,mh)],jm)});function rRt(i){if(!i){if(Kot)return;Kot=!0}$Ke(i||Hn.document.body)}function v6e(i,e,t,n,o){if(t=t||"",!n){let r=t.indexOf(` -`),s=t;return r!==-1&&(s=t.substring(0,r)),Yot(i,t,e.createByFilepathOrFirstLine(o||null,s),o)}return Yot(i,t,e.createById(n),o)}function Yot(i,e,t,n){return i.createModel(e,t,n)}var g6e,Hr,oRt,Kot,cQ,dQ,uQ,Zot=P(()=>{Xl();nt();fs();IM();vpe();FX();l7();Dr();$o();er();Xi();Id();_i();vs();ic();No();Yh();I2();F4();xp();Dc();Ha();Xme();Zf();Kr();Yn();lQ();r8();_l();g6e=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Hr=function(i,e){return function(t,n){e(t,n,i)}},oRt=0,Kot=!1;cQ=class extends S4{constructor(e,t,n,o,r,s,a,l,c,d,u,h){let f={...t};f.ariaLabel=f.ariaLabel||ZM.editorViewAccessibleLabel,f.ariaLabel=f.ariaLabel+";"+ZM.accessibilityHelpMessage,super(e,f,{},n,o,r,s,l,c,d,u,h),a instanceof s8?this._standaloneKeybindingService=a:this._standaloneKeybindingService=null,rRt(f.ariaContainerElement)}addCommand(e,t,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;let o="DYNAMIC_"+ ++oRt,r=mt.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(o,e,t,r),o}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),ue.None;let t=e.id,n=e.label,o=mt.and(mt.equals("editorId",this.getId()),mt.deserialize(e.precondition)),r=e.keybindings,s=mt.and(o,mt.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=(f,...p)=>Promise.resolve(e.run(this,...p)),d=new Ye,u=this.getId()+":"+t;if(d.add(Zi.registerCommand(u,c)),a){let f={command:{id:u,title:n},when:o,group:a,order:l};d.add(ps.appendMenuItem(ne.EditorContext,f))}if(Array.isArray(r))for(let f of r)d.add(this._standaloneKeybindingService.addDynamicKeybinding(u,f,c,s));let h=new ux(u,n,n,void 0,o,(...f)=>Promise.resolve(e.run(this,...f)),this._contextKeyService);return this._actions.set(t,h),d.add(Yt(()=>{this._actions.delete(t)})),d}_triggerCommand(e,t){if(this._codeEditorService instanceof MM)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};cQ=g6e([Hr(2,qt),Hr(3,tn),Hr(4,eo),Hr(5,ri),Hr(6,fn),Hr(7,Mo),Hr(8,xo),Hr(9,Ba),Hr(10,An),Hr(11,Rt)],cQ);dQ=class extends cQ{constructor(e,t,n,o,r,s,a,l,c,d,u,h,f,p,m){let y={...t};WN(d,y,!1);let _=l.registerEditorContainer(e);typeof y.theme=="string"&&l.setTheme(y.theme),typeof y.autoDetectHighContrast<"u"&&l.setAutoDetectHighContrast(!!y.autoDetectHighContrast);let v=y.model;delete y.model,super(e,y,n,o,r,s,a,l,c,u,p,m),this._configurationService=d,this._standaloneThemeService=l,this._register(_);let b;if(typeof v>"u"){let C=f.getLanguageIdByMimeType(y.language)||y.language||ra;b=v6e(h,f,y.value||"",C,void 0),this._ownsModel=!0}else b=v,this._ownsModel=!1;if(this._attachModel(b),b){let C={oldModelUrl:null,newModelUrl:b.uri};this._onDidChangeModel.fire(C)}}dispose(){super.dispose()}updateOptions(e){WN(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};dQ=g6e([Hr(2,qt),Hr(3,tn),Hr(4,eo),Hr(5,ri),Hr(6,fn),Hr(7,sc),Hr(8,xo),Hr(9,Ni),Hr(10,Ba),Hr(11,no),Hr(12,Kn),Hr(13,An),Hr(14,Rt)],dQ);uQ=class extends jm{constructor(e,t,n,o,r,s,a,l,c,d,u,h){let f={...t};WN(l,f,!0);let p=s.registerEditorContainer(e);typeof f.theme=="string"&&s.setTheme(f.theme),typeof f.autoDetectHighContrast<"u"&&s.setAutoDetectHighContrast(!!f.autoDetectHighContrast),super(e,f,{},o,n,r,h,d),this._configurationService=l,this._standaloneThemeService=s,this._register(p)}dispose(){super.dispose()}updateOptions(e){WN(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,t,n){return e.createInstance(cQ,t,n)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,n){return this.getModifiedEditor().addCommand(e,t,n)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};uQ=g6e([Hr(2,qt),Hr(3,ri),Hr(4,tn),Hr(5,sc),Hr(6,xo),Hr(7,Ni),Hr(8,ca),Hr(9,mh),Hr(10,Pd),Hr(11,_h)],uQ)});var Xot=P(()=>{});var Qot=P(()=>{});var hQ,oA,Jot=P(()=>{u1();D2e();Ra();Go();or();Xt();nt();Qot();Wt();hQ=class extends ue{constructor(e,t,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new tW),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new Ye),this.options=n,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new oA(()=>{var o;return(o=this.toggleMenuActionViewItem)===null||o===void 0?void 0:o.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new Bs(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,highlightToggledItems:n.highlightToggledItems,actionViewItemProvider:(o,r)=>{var s;if(o.id===oA.ID)return this.toggleMenuActionViewItem=new Gv(o,o.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:ui.asClassNameArray((s=n.moreIcon)!==null&&s!==void 0?s:kt.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){let a=n.actionViewItemProvider(o,r);if(a)return a}if(o instanceof Wf){let a=new Gv(o,o.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:o.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return a.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(a),this.disposables.add(this._onDidChangeDropdownVisibility.add(a.onDidChangeVisibility)),a}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();let n=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),n.push(this.toggleMenuAction)),n.forEach(o=>{this.actionBar.push(o,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(o)})})}getKeybindingLabel(e){var t,n,o;let r=this.lookupKeybindings?(n=(t=this.options).getKeyBinding)===null||n===void 0?void 0:n.call(t,e):void 0;return(o=r?.getLabel())!==null&&o!==void 0?o:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}},oA=class i extends zs{constructor(e,t){t=t||g("moreActions","More Actions..."),super(i.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}};oA.ID="toolbar.toggle.more"});var ert,j2,rA,fQ,_6e=P(()=>{Qt();Uh();Jot();Ra();Vi();F2e();Pi();Xt();Yc();nt();Wt();Kb();Dr();Xi();Id();vs();$f();ert=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},j2=function(i,e){return function(t,n){e(t,n,i)}},rA=class extends hQ{constructor(e,t,n,o,r,s,a){super(e,r,{getKeyBinding:c=>{var d;return(d=s.lookupKeybinding(c.id))!==null&&d!==void 0?d:void 0},...t,allowContextMenu:!0,skipTelemetry:typeof t?.telemetrySource=="string"}),this._options=t,this._menuService=n,this._contextKeyService=o,this._contextMenuService=r,this._sessionDisposables=this._store.add(new Ye);let l=t?.telemetrySource;l&&this._store.add(this.actionBar.onDidRun(c=>a.publicLog2("workbenchActionExecuted",{id:c.action.id,from:l})))}setActions(e,t=[],n){var o,r,s;this._sessionDisposables.clear();let a=e.slice(),l=t.slice(),c=[],d=0,u=[],h=!1;if(((o=this._options)===null||o===void 0?void 0:o.hiddenItemStrategy)!==-1)for(let f=0;fy?.id)),p=this._options.overflowBehavior.maxItems-f.size,m=0;for(let y=0;y=p&&(a[y]=void 0,u[y]=_))}}Mde(a),Mde(u),super.setActions(a,zr.join(u,l)),c.length>0&&this._sessionDisposables.add(Xe(this.getElement(),"contextmenu",f=>{var p,m,y,_,v;let b=new Oa(pi(this.getElement()),f),C=this.getItemAction(b.target);if(!C)return;b.preventDefault(),b.stopPropagation();let w=!1;if(d===1&&((p=this._options)===null||p===void 0?void 0:p.hiddenItemStrategy)===0){w=!0;for(let k=0;kthis._menuService.resetHiddenStates(n)}))),this._contextMenuService.showContextMenu({getAnchor:()=>b,getActions:()=>x,menuId:(y=this._options)===null||y===void 0?void 0:y.contextMenu,menuActionOptions:{renderShortTitle:!0,...(_=this._options)===null||_===void 0?void 0:_.menuOptions},skipTelemetry:typeof((v=this._options)===null||v===void 0?void 0:v.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};rA=ert([j2(2,Mc),j2(3,ri),j2(4,ca),j2(5,fn),j2(6,Fs)],rA);fQ=class extends rA{constructor(e,t,n,o,r,s,a,l){super(e,{resetMenu:t,...n},o,r,s,a,l),this._onDidChangeMenuItems=this._store.add(new ge);let c=this._store.add(o.createMenu(t,r,{emitEventsForSubmenuChanges:!0})),d=()=>{var u,h,f;let p=[],m=[];lS(c,n?.menuOptions,{primary:p,secondary:m},(u=n?.toolbarOptions)===null||u===void 0?void 0:u.primaryGroup,(h=n?.toolbarOptions)===null||h===void 0?void 0:h.shouldInlineSubmenu,(f=n?.toolbarOptions)===null||f===void 0?void 0:f.useSeparatorsInPrimaryActions),e.classList.toggle("has-no-actions",p.length===0&&m.length===0),super.setActions(p,m)};this._store.add(c.onDidChange(()=>{d(),this._onDidChangeMenuItems.fire(this)})),d()}setActions(){throw new fo("This toolbar is populated from a menu.")}};fQ=ert([j2(3,Mc),j2(4,ri),j2(5,ca),j2(6,fn),j2(7,Fs)],fQ)});var pQ,trt=P(()=>{Ra();pQ=class extends Qu{constructor(e){super(),this._getContext=e}runAction(e,t){return super.runAction(e,this._getContext())}}});function irt(i){return Ao(e=>{let t=new Ye;return t.add(i.onDidFocusEditorWidget(()=>e(!0))),t.add(i.onDidBlurEditorWidget(()=>e(!1))),t},()=>i.hasWidgetFocus())}var sRt,aRt,mQ,VS,b6e=P(()=>{Qt();dX();Go();nt();Is();c8();lQ();_6e();Dr();_i();trt();sRt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},aRt=function(i,e){return function(t,n){e(t,n,i)}},mQ=class{constructor(e){this.viewModel=e}getId(){return this.viewModel}},VS=class extends ue{constructor(e,t,n,o){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=n,this._instantiationService=o,this._viewModel=kn(this,void 0),this._collapsed=Hi(this,s=>{var a;return(a=this._viewModel.read(s))===null||a===void 0?void 0:a.collapsed.read(s)}),this._editorContentHeight=kn(this,500),this.contentHeight=Hi(this,s=>(this._collapsed.read(s)?0:this._editorContentHeight.read(s))+this._outerEditorHeight),this._modifiedContentWidth=kn(this,0),this._modifiedWidth=kn(this,0),this._originalContentWidth=kn(this,0),this._originalWidth=kn(this,0),this.maxScroll=Hi(this,s=>{let a=this._modifiedContentWidth.read(s)-this._modifiedWidth.read(s),l=this._originalContentWidth.read(s)-this._originalWidth.read(s);return a>l?{maxScroll:a,width:this._modifiedWidth.read(s)}:{maxScroll:l,width:this._originalWidth.read(s)}}),this._elements=Do("div.multiDiffEntry",[Do("div.header@header",[Do("div.collapse-button@collapseButton"),Do("div.file-path",[Do("div.title.modified.show-file-icons@primaryPath",[]),Do("div.status.deleted@status",["R"]),Do("div.title.original.show-file-icons@secondaryPath",[])]),Do("div.actions@actions")]),Do("div.editorParent",[Do("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(jm,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=irt(this.editor.getModifiedEditor()),this.isOriginalFocused=irt(this.editor.getOriginalEditor()),this.isFocused=Hi(this,s=>this.isModifedFocused.read(s)||this.isOriginalFocused.read(s)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=new Ye,this._headerHeight=38;let r=new z4(this._elements.collapseButton,{});this._register(Ln(s=>{r.element.className="",r.icon=this._collapsed.read(s)?kt.chevronRight:kt.chevronDown})),this._register(r.onDidClick(()=>{var s;(s=this._viewModel.get())===null||s===void 0||s.collapsed.set(!this._collapsed.get(),void 0)})),this._register(Ln(s=>{this._elements.editor.style.display=this._collapsed.read(s)?"none":"block"})),this.editor.getModifiedEditor().onDidLayoutChange(s=>{let a=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(a,void 0)}),this.editor.getOriginalEditor().onDidLayoutChange(s=>{let a=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(a,void 0)}),this._register(this.editor.onDidContentSizeChange(s=>{NS(a=>{this._editorContentHeight.set(s.contentHeight,a),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),a),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),a)})})),this._register(Ln(s=>{let a=this.isFocused.read(s);this._elements.root.classList.toggle("focused",a)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=38,this._register(this._instantiationService.createInstance(fQ,this._elements.actions,ne.MultiDiffEditorFileToolbar,{actionRunner:this._register(new pQ(()=>{var s;return(s=this._viewModel.get())===null||s===void 0?void 0:s.modifiedUri})),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:s=>s.startsWith("navigation")}}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){function t(o){return{...o,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}let n=e.viewModel.entry.value;n.onOptionsDidChange&&this._dataStore.add(n.onOptionsDidChange(()=>{var o;this.editor.updateOptions(t((o=n.options)!==null&&o!==void 0?o:{}))})),NS(o=>{var r,s,a,l;(r=this._resourceLabel)===null||r===void 0||r.setUri((s=e.viewModel.modifiedUri)!==null&&s!==void 0?s:e.viewModel.originalUri,{strikethrough:e.viewModel.modifiedUri===void 0});let c=!1,d=!1,u=!1,h="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(h="R",c=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(h="A",u=!0):(h="D",d=!0),this._elements.status.classList.toggle("renamed",c),this._elements.status.classList.toggle("deleted",d),this._elements.status.classList.toggle("added",u),this._elements.status.innerText=h,(a=this._resourceLabel2)===null||a===void 0||a.setUri(c?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,o),this.editor.setModel(e.viewModel.diffEditorViewModel,o),this.editor.updateOptions(t((l=n.options)!==null&&l!==void 0?l:{}))})}render(e,t,n,o){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${t}px`,this._elements.root.style.position="absolute";let r=Math.max(0,Math.min(e.length-this._headerHeight,o.start-e.start));this._elements.header.style.transform=`translateY(${r}px)`,NS(s=>{this.editor.layout({width:t,height:e.length-this._outerEditorHeight})}),this.editor.getOriginalEditor().setScrollTop(n),this._elements.header.classList.toggle("shadow",r>0||n>0)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};VS=sRt([aRt(3,qt)],VS)});var gQ,nrt=P(()=>{gQ=class{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){var t;let n;if(this._unused.size===0)n=this._create(e),this._itemData.set(n,e);else{let o=[...this._unused.values()];n=(t=o.find(r=>this._itemData.get(r).getId()===e.getId()))!==null&&t!==void 0?t:o[0],this._unused.delete(n),this._itemData.set(n,e),n.setData(e)}return this._used.add(n),{object:n,dispose:()=>{this._used.delete(n),this._unused.size>5?n.dispose():this._unused.add(n)}}}dispose(){for(let e of this._used)e.dispose();for(let e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}});var lRt,ort,vQ,y6e,rrt=P(()=>{Qt();o1();rh();nt();Is();c8();Jw();Xot();kp();Xf();_i();b6e();nrt();Xi();Ix();Co();zo();lRt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},ort=function(i,e){return function(t,n){e(t,n,i)}},vQ=class extends ue{constructor(e,t,n,o,r,s){super(),this._element=e,this._dimension=t,this._viewModel=n,this._workbenchUIElementFactory=o,this._parentContextKeyService=r,this._parentInstantiationService=s,this._elements=Do("div.monaco-component.multiDiffEditor",[Do("div@content",{style:{overflow:"hidden"}}),Do("div.monaco-editor@overflowWidgetsDomNode",{})]),this._sizeObserver=this._register(new OS(this._element,void 0)),this._objectPool=this._register(new gQ(l=>{let c=this._instantiationService.createInstance(VS,this._elements.content,this._elements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return c.setData(l),c})),this._scrollable=this._register(new n1({forceIntegerValues:!1,scheduleAtNextAnimationFrame:l=>za(pi(this._element),l),smoothScrollDuration:100})),this._scrollableElement=this._register(new c2(this._elements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this.scrollTop=Ao(this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=Ao(this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItems=g1(this,(l,c)=>{let d=this._viewModel.read(l);return d?d.items.read(l).map(h=>{var f;let p=c.add(new y6e(h,this._objectPool,this.scrollLeft)),m=(f=this._lastDocStates)===null||f===void 0?void 0:f[p.getKey()];return m&&lo(y=>{p.setViewState(m,y)}),p}):[]}),this._spaceBetweenPx=10,this._totalHeight=this._viewItems.map(this,(l,c)=>l.reduce((d,u)=>d+u.contentHeight.read(c)+this._spaceBetweenPx,0)),this.activeDiffItem=Hi(this,l=>this._viewItems.read(l).find(c=>{var d;return(d=c.template.read(l))===null||d===void 0?void 0:d.isFocused.read(l)})),this.lastActiveDiffItem=W4e((l,c)=>{var d;return(d=this.activeDiffItem.read(l))!==null&&d!==void 0?d:c}),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._parentInstantiationService.createChild(new wp([ri,this._contextKeyService])),this._lastDocStates={},this._contextKeyService.createKey(re.inMultiDiffEditor.key,!0),this._register(Rl((l,c)=>{let d=this._viewModel.read(l);if(d&&d.contextKeys)for(let[u,h]of Object.entries(d.contextKeys)){let f=this._contextKeyService.createKey(u,void 0);f.set(h),c.add(Yt(()=>f.reset()))}}));let a=this._parentContextKeyService.createKey(re.multiDiffEditorAllCollapsed.key,!1);this._register(Ln(l=>{let c=this._viewModel.read(l);if(c){let d=c.items.read(l).every(u=>u.collapsed.read(l));a.set(d)}})),this._register(Ln(l=>{let c=this.lastActiveDiffItem.read(l);lo(d=>{var u;(u=this._viewModel.read(l))===null||u===void 0||u.activeDiffItem.set(c?.viewModel,d)})})),this._register(Ln(l=>{let c=this._dimension.read(l);this._sizeObserver.observe(c)})),this._elements.content.style.position="relative",this._register(Ln(l=>{let c=this._sizeObserver.height.read(l);this._elements.root.style.height=`${c}px`;let d=this._totalHeight.read(l);this._elements.content.style.height=`${d}px`;let u=this._sizeObserver.width.read(l),h=u,f=this._viewItems.read(l),p=eI(f,m=>m.maxScroll.read(l).maxScroll);if(p){let m=p.maxScroll.read(l);h=u+m.maxScroll}this._scrollableElement.setScrollDimensions({width:u,height:c,scrollHeight:d,scrollWidth:h})})),e.replaceChildren(this._scrollableElement.getDomNode()),this._register(Yt(()=>{e.replaceChildren()})),this._register(this._register(Ln(l=>{NS(c=>{this.render(l)})})))}render(e){let t=this.scrollTop.read(e),n=0,o=0,r=0,s=this._sizeObserver.height.read(e),a=Pn.ofStartAndLength(t,s),l=this._sizeObserver.width.read(e);for(let c of this._viewItems.read(e)){let d=c.contentHeight.read(e),u=Math.min(d,s),h=Pn.ofStartAndLength(o,u),f=Pn.ofStartAndLength(r,d);if(f.isBefore(a))n-=d-u,c.hide();else if(f.isAfter(a))c.hide();else{let p=Math.max(0,Math.min(a.start-f.start,d-u));n-=p;let m=Pn.ofStartAndLength(t+n,s);c.render(h,p,l,m)}o+=u+this._spaceBetweenPx,r+=d+this._spaceBetweenPx}this._elements.content.style.transform=`translateY(${-(t+n)}px)`}};vQ=lRt([ort(4,ri),ort(5,qt)],vQ);y6e=class extends ue{constructor(e,t,n){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=n,this._templateRef=this._register(l8(this,void 0)),this.contentHeight=Hi(this,o=>{var r,s,a;return(a=(s=(r=this._templateRef.read(o))===null||r===void 0?void 0:r.object.contentHeight)===null||s===void 0?void 0:s.read(o))!==null&&a!==void 0?a:this.viewModel.lastTemplateData.read(o).contentHeight}),this.maxScroll=Hi(this,o=>{var r,s;return(s=(r=this._templateRef.read(o))===null||r===void 0?void 0:r.object.maxScroll.read(o))!==null&&s!==void 0?s:{maxScroll:0,scrollWidth:0}}),this.template=Hi(this,o=>{var r;return(r=this._templateRef.read(o))===null||r===void 0?void 0:r.object}),this._isHidden=kn(this,!1),this._register(Ln(o=>{var r;let s=this._scrollLeft.read(o);(r=this._templateRef.read(o))===null||r===void 0||r.object.setScrollLeft(s)})),this._register(Ln(o=>{let r=this._templateRef.read(o);!r||!this._isHidden.read(o)||r.object.isFocused.read(o)||this._clear()}))}dispose(){this._clear(),super.dispose()}toString(){var e;return`VirtualViewItem(${(e=this.viewModel.entry.value.modified)===null||e===void 0?void 0:e.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,t){var n;this.viewModel.collapsed.set(e.collapsed,t),this._updateTemplateData(t);let o=this.viewModel.lastTemplateData.get(),r=(n=e.selections)===null||n===void 0?void 0:n.map(jt.liftSelection);this.viewModel.lastTemplateData.set({...o,selections:r},t);let s=this._templateRef.get();s&&r&&s.object.editor.setSelections(r)}_updateTemplateData(e){var t;let n=this._templateRef.get();n&&this.viewModel.lastTemplateData.set({contentHeight:n.object.contentHeight.get(),selections:(t=n.object.editor.getSelections())!==null&&t!==void 0?t:void 0},e)}_clear(){let e=this._templateRef.get();e&&lo(t=>{this._updateTemplateData(t),e.object.hide(),this._templateRef.set(void 0,t)})}hide(){this._isHidden.set(!0,void 0)}render(e,t,n,o){this._isHidden.set(!1,void 0);let r=this._templateRef.get();if(!r){r=this._objectPool.getUnusedObj(new mQ(this.viewModel)),this._templateRef.set(r,void 0);let s=this.viewModel.lastTemplateData.get().selections;s&&r.object.editor.setSelections(s)}r.object.render(e,n,t,o)}}});var Tln,Iln,Mln,srt=P(()=>{Wt();pr();Tln=me("multiDiffEditor.headerBackground",{dark:"#808080",light:"#b4b4b4",hcDark:"#808080",hcLight:"#b4b4b4"},g("multiDiffEditor.headerBackground","The background color of the diff editor's header")),Iln=me("multiDiffEditor.background",{dark:"#000000",light:"#e5e5e5",hcDark:"#000000",hcLight:"#e5e5e5"},g("multiDiffEditor.background","The background color of the multi file diff editor")),Mln=me("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},g("multiDiffEditor.border","The border color of the multi file diff editor"))});var cRt,dRt,_Q,art=P(()=>{nt();Is();kp();rrt();_i();srt();b6e();cRt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},dRt=function(i,e){return function(t,n){e(t,n,i)}},_Q=class extends ue{constructor(e,t,n){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=n,this._dimension=kn(this,void 0),this._viewModel=kn(this,void 0),this._widgetImpl=g1(this,(o,r)=>(v1(VS,o),r.add(this._instantiationService.createInstance(v1(vQ,o),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory)))),this._register($2(this._widgetImpl))}};_Q=cRt([dRt(2,qt)],_Q)});function uRt(i,e,t){return Ki.initialize(t||{}).createInstance(dQ,i,e)}function hRt(i){return Ki.get(tn).onCodeEditorAdd(t=>{i(t)})}function fRt(i){return Ki.get(tn).onDiffEditorAdd(t=>{i(t)})}function pRt(){return Ki.get(tn).listCodeEditors()}function mRt(){return Ki.get(tn).listDiffEditors()}function gRt(i,e,t){return Ki.initialize(t||{}).createInstance(uQ,i,e)}function vRt(i,e){let t=Ki.initialize(e||{});return new _Q(i,{},t)}function _Rt(i){if(typeof i.id!="string"||typeof i.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return Zi.registerCommand(i.id,i.run)}function bRt(i){if(typeof i.id!="string"||typeof i.label!="string"||typeof i.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");let e=mt.deserialize(i.precondition),t=(o,...r)=>Jo.runEditorCommand(o,r,e,(s,a,l)=>Promise.resolve(i.run(a,...l))),n=new Ye;if(n.add(Zi.registerCommand(i.id,t)),i.contextMenuGroupId){let o={command:{id:i.id,title:i.label},when:e,group:i.contextMenuGroupId,order:i.contextMenuOrder||0};n.add(ps.appendMenuItem(ne.EditorContext,o))}if(Array.isArray(i.keybindings)){let o=Ki.get(fn);if(!(o instanceof s8))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{let r=mt.and(e,mt.deserialize(i.keybindingContext));n.add(o.addDynamicKeybindings(i.keybindings.map(s=>({keybinding:s,command:i.id,when:r}))))}}return n}function yRt(i){return lrt([i])}function lrt(i){let e=Ki.get(fn);return e instanceof s8?e.addDynamicKeybindings(i.map(t=>({keybinding:t.keybinding,command:t.command,commandArgs:t.commandArgs,when:mt.deserialize(t.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),ue.None)}function CRt(i,e,t){let n=Ki.get(Kn),o=n.getLanguageIdByMimeType(e)||e;return v6e(Ki.get(no),n,i,o,t)}function wRt(i,e){let t=Ki.get(Kn),n=t.getLanguageIdByMimeType(e)||e||ra;i.setLanguage(t.createById(n))}function xRt(i,e,t){i&&Ki.get(yu).changeOne(e,i.uri,t)}function SRt(i){Ki.get(yu).changeAll(i,[])}function kRt(i){return Ki.get(yu).read(i)}function LRt(i){return Ki.get(yu).onMarkerChanged(i)}function ERt(i){return Ki.get(no).getModel(i)}function DRt(){return Ki.get(no).getModels()}function TRt(i){return Ki.get(no).onModelAdded(i)}function IRt(i){return Ki.get(no).onModelRemoved(i)}function MRt(i){return Ki.get(no).onModelLanguageChanged(t=>{i({model:t.model,oldLanguage:t.oldLanguageId})})}function NRt(i){return IKe(Ki.get(no),Ki.get(An),i)}function ARt(i,e){let t=Ki.get(Kn),n=Ki.get(sc);return ww.colorizeElement(n,t,i,e).then(()=>{n.registerEditorContainer(i)})}function RRt(i,e,t){let n=Ki.get(Kn);return Ki.get(sc).registerEditorContainer(Hn.document.body),ww.colorize(n,i,e,t)}function PRt(i,e,t=4){return Ki.get(sc).registerEditorContainer(Hn.document.body),ww.colorizeModelLine(i,e,t)}function ORt(i){let e=Eo.get(i);return e||{getInitialState:()=>Kg,tokenize:(t,n,o)=>pw(i,o)}}function zRt(i,e){Eo.getOrCreate(e);let t=ORt(e),n=Ec(i),o=[],r=t.getInitialState();for(let s=0,a=n.length;s{var r;if(!n)return null;let s=(r=t.options)===null||r===void 0?void 0:r.selection,a;return s&&typeof s.endLineNumber=="number"&&typeof s.endColumn=="number"?a=s:s&&(a={lineNumber:s.startLineNumber,column:s.startColumn}),await i.openCodeEditor(n,t.resource,a)?n:null})}function crt(){return{create:uRt,getEditors:pRt,getDiffEditors:mRt,onDidCreateEditor:hRt,onDidCreateDiffEditor:fRt,createDiffEditor:gRt,addCommand:_Rt,addEditorAction:bRt,addKeybindingRule:yRt,addKeybindingRules:lrt,createModel:CRt,setModelLanguage:wRt,setModelMarkers:xRt,getModelMarkers:kRt,removeAllMarkers:SRt,onDidChangeMarkers:LRt,getModels:DRt,getModel:ERt,onDidCreateModel:TRt,onWillDisposeModel:IRt,onDidChangeModelLanguage:MRt,createWebWorker:NRt,colorizeElement:ARt,colorize:RRt,colorizeModelLine:PRt,tokenize:zRt,defineTheme:FRt,setTheme:HRt,remeasureFonts:BRt,registerCommand:VRt,registerLinkOpener:WRt,registerEditorOpener:URt,AccessibilitySupport:fW,ContentWidgetPositionPreference:bW,CursorChangeReason:yW,DefaultEndOfLine:CW,EditorAutoIndentStrategy:xW,EditorOption:SW,EndOfLinePreference:kW,EndOfLineSequence:LW,MinimapPosition:PW,MouseTargetType:OW,OverlayWidgetPositionPreference:zW,OverviewRulerLane:FW,GlyphMarginLane:EW,RenderLineNumbersType:BW,RenderMinimap:VW,ScrollbarVisibility:UW,ScrollType:WW,TextEditorCursorBlinkingStyle:YW,TextEditorCursorStyle:ZW,TrackedRangeStickiness:XW,WrappingIndent:QW,InjectedTextCursorStops:TW,PositionAffinity:HW,ShowLightbulbIconMode:jW,ConfigurationChangedEvent:SC,BareFontInfo:g5,FontInfo:v5,TextModelResolvedOptions:Q3,FindMatch:Ug,ApplyUpdateResult:b3,EditorZoom:Qc,createMultiFileDiffEditor:vRt,EditorType:s4,EditorOptions:nu}}var drt=P(()=>{_l();nt();Ri();Io();hqe();Zue();an();fs();MKe();Ks();BC();hU();dI();Pr();Ha();Kr();Zf();mw();Ca();Dc();JW();VKe();Zot();FX();l7();Dr();$o();Xi();vs();A2();sd();art()});function $Rt(i,e){if(!e||!Array.isArray(e))return!1;for(let t of e)if(!i(t))return!1;return!0}function bQ(i,e){return typeof i=="boolean"?i:e}function urt(i,e){return typeof i=="string"?i:e}function jRt(i){let e={};for(let t of i)e[t]=!0;return e}function hrt(i,e=!1){e&&(i=i.map(function(n){return n.toLowerCase()}));let t=jRt(i);return e?function(n){return t[n.toLowerCase()]!==void 0&&t.hasOwnProperty(n.toLowerCase())}:function(n){return t[n]!==void 0&&t.hasOwnProperty(n)}}function C6e(i,e){e=e.replace(/@@/g,"");let t=0,n;do n=!1,e=e.replace(/@(\w+)/g,function(r,s){n=!0;let a="";if(typeof i[s]=="string")a=i[s];else if(i[s]&&i[s]instanceof RegExp)a=i[s].source;else throw i[s]===void 0?sr(i,"language definition does not contain attribute '"+s+"', used at: "+e):sr(i,"attribute reference '"+s+"' must be a string, used at: "+e);return U5(a)?"":"(?:"+a+")"}),t++;while(n&&t<5);e=e.replace(/\x01/g,"@");let o=(i.ignoreCase?"i":"")+(i.unicode?"u":"");return new RegExp(e,o)}function qRt(i,e,t,n){if(n<0)return i;if(n=100){n=n-100;let o=t.split(".");if(o.unshift(t),n=0&&(n.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")n.bracket=1;else if(t.bracket==="@close")n.bracket=-1;else throw sr(i,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw sr(i,"the next state must be a string value in rule: "+e);{let o=t.next;if(!/^(@pop|@push|@popall)$/.test(o)&&(o[0]==="@"&&(o=o.substr(1)),o.indexOf("$")<0&&!zKe(i,Xg(i,o,"",[],""))))throw sr(i,"the next state '"+t.next+"' is not defined in rule: "+e);n.next=o}}return typeof t.goBack=="number"&&(n.goBack=t.goBack),typeof t.switchTo=="string"&&(n.switchTo=t.switchTo),typeof t.log=="string"&&(n.log=t.log),typeof t.nextEmbedded=="string"&&(n.nextEmbedded=t.nextEmbedded,i.usesEmbedded=!0),n}}else if(Array.isArray(t)){let n=[];for(let o=0,r=t.length;o=1&&c.length<=3)if(u.setRegex(n,c[0]),c.length>=3)if(typeof c[1]=="string")u.setAction(n,{token:c[1],next:c[2]});else if(typeof c[1]=="object"){let h=c[1];h.next=c[2],u.setAction(n,h)}else throw sr(t,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+s);else u.setAction(n,c[1]);else{if(!c.regex)throw sr(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+s);c.name&&typeof c.name=="string"&&(u.name=c.name),c.matchOnlyAtStart&&(u.matchOnlyAtLineStart=bQ(c.matchOnlyAtLineStart,!1)),u.setRegex(n,c.regex),u.setAction(n,c.action)}a.push(u)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw sr(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(let s in e.tokenizer)if(e.tokenizer.hasOwnProperty(s)){t.start||(t.start=s);let a=e.tokenizer[s];t.tokenizer[s]=new Array,o("tokenizer."+s,t.tokenizer[s],a)}if(t.usesEmbedded=n.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw sr(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let r=[];for(let s of e.brackets){let a=s;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw sr(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+` - hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")r.push({token:a.token+t.tokenPostfix,open:Zg(t,a.open),close:Zg(t,a.close)});else throw sr(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=r,t.noThrow=!0,t}var x6e,frt=P(()=>{Ufe();x6e=class{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,t){let n;if(typeof t=="string")n=t;else if(t instanceof RegExp)n=t.source;else throw sr(e,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=n.length>0&&n[0]==="^",this.name=this.name+": "+n,this.regex=C6e(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")")}setAction(e,t){this.action=w6e(e,this.name,t)}}});function KRt(i){K3.registerLanguage(i)}function YRt(){let i=[];return i=i.concat(K3.getLanguages()),i}function ZRt(i){return Ki.get(Kn).languageIdCodec.encodeLanguageId(i)}function XRt(i,e){return Ki.withServices(()=>{let n=Ki.get(Kn).onDidRequestRichLanguageFeatures(o=>{o===i&&(n.dispose(),e())});return n})}function QRt(i,e){return Ki.withServices(()=>{let n=Ki.get(Kn).onDidRequestBasicLanguageFeatures(o=>{o===i&&(n.dispose(),e())});return n})}function JRt(i,e){if(!Ki.get(Kn).isRegisteredLanguageId(i))throw new Error(`Cannot set configuration for unknown language ${i}`);return Ki.get(An).register(i,e,100)}function ePt(i){return typeof i.getInitialState=="function"}function tPt(i){return"tokenizeEncoded"in i}function prt(i){return i&&typeof i.then=="function"}function iPt(i){let e=Ki.get(sc);if(i){let t=[null];for(let n=1,o=i.length;n{let n=await Promise.resolve(e.create());return n?ePt(n)?mrt(i,n):new j5(Ki.get(Kn),Ki.get(sc),i,S6e(i,n),Ki.get(Ni)):null});return Eo.registerFactory(i,t)}function nPt(i,e){if(!Ki.get(Kn).isRegisteredLanguageId(i))throw new Error(`Cannot set tokens provider for unknown language ${i}`);return prt(e)?L6e(i,{create:()=>e}):Eo.register(i,mrt(i,e))}function oPt(i,e){let t=n=>new j5(Ki.get(Kn),Ki.get(sc),i,S6e(i,n),Ki.get(Ni));return prt(e)?L6e(i,{create:()=>e}):Eo.register(i,t(e))}function rPt(i,e){return Ki.get(Rt).referenceProvider.register(i,e)}function sPt(i,e){return Ki.get(Rt).renameProvider.register(i,e)}function aPt(i,e){return Ki.get(Rt).signatureHelpProvider.register(i,e)}function lPt(i,e){return Ki.get(Rt).hoverProvider.register(i,{provideHover:(n,o,r)=>{let s=n.getWordAtPosition(o);return Promise.resolve(e.provideHover(n,o,r)).then(a=>{if(a)return!a.range&&s&&(a.range=new O(o.lineNumber,s.startColumn,o.lineNumber,s.endColumn)),a.range||(a.range=new O(o.lineNumber,o.column,o.lineNumber,o.column)),a})}})}function cPt(i,e){return Ki.get(Rt).documentSymbolProvider.register(i,e)}function dPt(i,e){return Ki.get(Rt).documentHighlightProvider.register(i,e)}function uPt(i,e){return Ki.get(Rt).linkedEditingRangeProvider.register(i,e)}function hPt(i,e){return Ki.get(Rt).definitionProvider.register(i,e)}function fPt(i,e){return Ki.get(Rt).implementationProvider.register(i,e)}function pPt(i,e){return Ki.get(Rt).typeDefinitionProvider.register(i,e)}function mPt(i,e){return Ki.get(Rt).codeLensProvider.register(i,e)}function gPt(i,e,t){return Ki.get(Rt).codeActionProvider.register(i,{providedCodeActionKinds:t?.providedCodeActionKinds,documentation:t?.documentation,provideCodeActions:(o,r,s,a)=>{let c=Ki.get(yu).read({resource:o.uri}).filter(d=>O.areIntersectingOrTouching(d,r));return e.provideCodeActions(o,r,{markers:c,only:s.only,trigger:s.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function vPt(i,e){return Ki.get(Rt).documentFormattingEditProvider.register(i,e)}function _Pt(i,e){return Ki.get(Rt).documentRangeFormattingEditProvider.register(i,e)}function bPt(i,e){return Ki.get(Rt).onTypeFormattingEditProvider.register(i,e)}function yPt(i,e){return Ki.get(Rt).linkProvider.register(i,e)}function CPt(i,e){return Ki.get(Rt).completionProvider.register(i,e)}function wPt(i,e){return Ki.get(Rt).colorProvider.register(i,e)}function xPt(i,e){return Ki.get(Rt).foldingRangeProvider.register(i,e)}function SPt(i,e){return Ki.get(Rt).declarationProvider.register(i,e)}function kPt(i,e){return Ki.get(Rt).selectionRangeProvider.register(i,e)}function LPt(i,e){return Ki.get(Rt).documentSemanticTokensProvider.register(i,e)}function EPt(i,e){return Ki.get(Rt).documentRangeSemanticTokensProvider.register(i,e)}function DPt(i,e){return Ki.get(Rt).inlineCompletionsProvider.register(i,e)}function TPt(i,e){return Ki.get(Rt).inlayHintsProvider.register(i,e)}function grt(){return{register:KRt,getLanguages:YRt,onLanguage:XRt,onLanguageEncountered:QRt,getEncodedLanguageId:ZRt,setLanguageConfiguration:JRt,setColorMap:iPt,registerTokensProviderFactory:L6e,setTokensProvider:nPt,setMonarchTokensProvider:oPt,registerReferenceProvider:rPt,registerRenameProvider:sPt,registerCompletionItemProvider:CPt,registerSignatureHelpProvider:aPt,registerHoverProvider:lPt,registerDocumentSymbolProvider:cPt,registerDocumentHighlightProvider:dPt,registerLinkedEditingRangeProvider:uPt,registerDefinitionProvider:hPt,registerImplementationProvider:fPt,registerTypeDefinitionProvider:pPt,registerCodeLensProvider:mPt,registerCodeActionProvider:gPt,registerDocumentFormattingEditProvider:vPt,registerDocumentRangeFormattingEditProvider:_Pt,registerOnTypeFormattingEditProvider:bPt,registerLinkProvider:yPt,registerColorProvider:wPt,registerFoldingRangeProvider:xPt,registerDeclarationProvider:SPt,registerSelectionRangeProvider:kPt,registerDocumentSemanticTokensProvider:LPt,registerDocumentRangeSemanticTokensProvider:EPt,registerInlineCompletionsProvider:DPt,registerInlayHintsProvider:TPt,DocumentHighlightKind:wW,CompletionItemKind:gW,CompletionItemTag:vW,CompletionItemInsertTextRule:mW,SymbolKind:GW,SymbolTag:KW,IndentAction:DW,CompletionTriggerKind:_W,SignatureHelpTriggerKind:qW,InlayHintKind:IW,InlineCompletionTriggerKind:MW,CodeActionTriggerType:pW,FoldingRangeKind:ru,SelectedSuggestionInfo:NC}}var k6e,yQ,vrt=P(()=>{sa();Kt();Pr();Kr();Zf();Ha();JW();FX();frt();Gfe();l7();A2();Yn();er();k6e=class{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,n){if(typeof this._actual.tokenize=="function")return yQ.adaptTokenize(this._languageId,this._actual,e,n);throw new Error("Not supported!")}tokenizeEncoded(e,t,n){let o=this._actual.tokenizeEncoded(e,n);return new U0(o.tokens,o.endState)}},yQ=class i{constructor(e,t,n,o){this._languageId=e,this._actual=t,this._languageService=n,this._standaloneThemeService=o}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){let n=[],o=0;for(let r=0,s=e.length;r0&&r[s-1]===h)continue;let f=u.startIndex;c===0?f=0:f{an();Xi();mo();Hh();_i();xl();Wt();E6e=vi("IEditorCancelService"),_rt=new Bt("cancellableOperation",!1,g("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));ln(E6e,class{constructor(){this._tokens=new WeakMap}add(i,e){let t=this._tokens.get(i);t||(t=i.invokeWithinContext(o=>{let r=_rt.bindTo(o.get(ri)),s=new $r;return{key:r,tokens:s}}),this._tokens.set(i,t));let n;return t.key.set(!0),n=t.tokens.push(e),()=>{n&&(n(),t.key.set(!t.tokens.isEmpty()),n=void 0)}}cancel(i){let e=this._tokens.get(i);if(!e)return;let t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},1);CQ=class extends Jn{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(n=>n.get(E6e).add(e,this))}dispose(){this._unregister(),super.dispose()}};zt(new class extends Jo{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:_rt})}runEditorCommand(i,e){i.get(E6e).cancel(e)}})});var WS,bh,v7,$4=P(()=>{Ri();Kt();mo();nt();brt();WS=class i{constructor(e,t){if(this.flags=t,this.flags&1){let n=e.getModel();this.modelVersionId=n?zf("{0}#{1}",n.uri.toString(),n.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=e.getPosition():this.position=null,this.flags&2?this.selection=e.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof i))return!1;let t=e;return!(this.modelVersionId!==t.modelVersionId||this.scrollLeft!==t.scrollLeft||this.scrollTop!==t.scrollTop||!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position)||!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new i(e,this.flags))}},bh=class extends CQ{constructor(e,t,n,o){super(e,o),this._listener=new Ye,t&4&&this._listener.add(e.onDidChangeCursorPosition(r=>{(!n||!O.containsPosition(n,r.position))&&this.cancel()})),t&2&&this._listener.add(e.onDidChangeCursorSelection(r=>{(!n||!O.containsRange(n,r.selection))&&this.cancel()})),t&8&&this._listener.add(e.onDidScrollChange(r=>this.cancel())),t&1&&(this._listener.add(e.onDidChangeModel(r=>this.cancel())),this._listener.add(e.onDidChangeModelContent(r=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}},v7=class extends Jn{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}});function Ep(i){return i&&typeof i.getEditorType=="function"?i.getEditorType()===s4.ICodeEditor:!1}function sA(i){return i&&typeof i.getEditorType=="function"?i.getEditorType()===s4.IDiffEditor:!1}function IPt(i){return!!i&&typeof i=="object"&&typeof i.onDidChangeActiveEditor=="function"}function wQ(i){return Ep(i)?i:sA(i)?i.getModifiedEditor():IPt(i)&&Ep(i.activeCodeEditor)?i.activeCodeEditor:null}var US=P(()=>{dI()});var _7,D6e=P(()=>{c1();Kt();p7();_7=class i{static _handleEolEdits(e,t){let n,o=[];for(let r of t)typeof r.eol=="number"&&(n=r.eol),r.range&&typeof r.text=="string"&&o.push(r);return typeof n=="number"&&e.hasModel()&&e.getModel().pushEOL(n),o}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;let n=e.getModel(),o=n.validateRange(t.range);return n.getFullModelRange().equalsRange(o)}static execute(e,t,n){n&&e.pushUndoStop();let o=xu.capture(e),r=i._handleEolEdits(e,t);r.length===1&&i._isFullModelReplaceEdit(e,r[0])?e.executeEdits("formatEditsCommand",r.map(s=>So.replace(O.lift(s.range),s.text))):e.executeEdits("formatEditsCommand",r.map(s=>So.replaceMove(O.lift(s.range),s.text))),n&&e.pushUndoStop(),o.restoreRelativeVerticalPositionOfCursor(e)}}});var xQ,SQ,yrt=P(()=>{xQ=class{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}},SQ=class{constructor(e){if(this._set=new Set,e)for(let t of e)this.add(t)}add(e){this._set.add(xQ.toKey(e))}has(e){return this._set.has(xQ.toKey(e))}}});function Crt(i,e,t){let n=[],o=new SQ,r=i.ordered(t);for(let a of r)n.push(a),a.extensionId&&o.add(a.extensionId);let s=e.ordered(t);for(let a of s){if(a.extensionId){if(o.has(a.extensionId))continue;o.add(a.extensionId)}n.push({displayName:a.displayName,extensionId:a.extensionId,provideDocumentFormattingEdits(l,c,d){return a.provideDocumentRangeFormattingEdits(l,l.getFullModelRange(),c,d)}})}return n}async function T6e(i,e,t,n,o,r,s){let a=i.get(qt),{documentRangeFormattingEditProvider:l}=i.get(Rt),c=Ep(e)?e.getModel():e,d=l.ordered(c),u=await b7.select(d,c,n,2);u&&(o.report(u),await a.invokeFunction(MPt,u,e,t,r,s))}async function MPt(i,e,t,n,o,r){var s,a;let l=i.get(Oc),c=i.get(ks),d=i.get(_h),u,h;Ep(t)?(u=t.getModel(),h=new bh(t,5,void 0,o)):(u=t,h=new v7(t,o));let f=[],p=0;for(let b of _C(n).sort(O.compareRangesUsingStarts))p>0&&O.areIntersectingOrTouching(f[p-1],b)?f[p-1]=O.fromPositions(f[p-1].getStartPosition(),b.getEndPosition()):p=f.push(b);let m=async b=>{var C,w;c.trace("[format][provideDocumentRangeFormattingEdits] (request)",(C=e.extensionId)===null||C===void 0?void 0:C.value,b);let S=await e.provideDocumentRangeFormattingEdits(u,b,u.getFormattingOptions(),h.token)||[];return c.trace("[format][provideDocumentRangeFormattingEdits] (response)",(w=e.extensionId)===null||w===void 0?void 0:w.value,S),S},y=(b,C)=>{if(!b.length||!C.length)return!1;let w=b.reduce((S,x)=>O.plusRange(S,x.range),b[0].range);if(!C.some(S=>O.intersectRanges(w,S.range)))return!1;for(let S of b)for(let x of C)if(O.intersectRanges(S.range,x.range))return!0;return!1},_=[],v=[];try{if(typeof e.provideDocumentRangesFormattingEdits=="function"){c.trace("[format][provideDocumentRangeFormattingEdits] (request)",(s=e.extensionId)===null||s===void 0?void 0:s.value,f);let b=await e.provideDocumentRangesFormattingEdits(u,f,u.getFormattingOptions(),h.token)||[];c.trace("[format][provideDocumentRangeFormattingEdits] (response)",(a=e.extensionId)===null||a===void 0?void 0:a.value,b),v.push(b)}else{for(let b of f){if(h.token.isCancellationRequested)return!0;v.push(await m(b))}for(let b=0;b({text:w.text,range:O.lift(w.range),forceMoveMarkers:!0})),w=>{for(let{range:S}of w)if(O.areIntersectingOrTouching(S,C))return[new jt(S.startLineNumber,S.startColumn,S.endLineNumber,S.endColumn)];return null})}return d.playAudioCue(Cn.format,{userGesture:r}),!0}async function wrt(i,e,t,n,o,r){let s=i.get(qt),a=i.get(Rt),l=Ep(e)?e.getModel():e,c=Crt(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,l),d=await b7.select(c,l,t,1);d&&(n.report(d),await s.invokeFunction(NPt,d,e,t,o,r))}async function NPt(i,e,t,n,o,r){let s=i.get(Oc),a=i.get(_h),l,c;Ep(t)?(l=t.getModel(),c=new bh(t,5,void 0,o)):(l=t,c=new v7(t,o));let d;try{let u=await e.provideDocumentFormattingEdits(l,l.getFormattingOptions(),c.token);if(d=await s.computeMoreMinimalEdits(l.uri,u),c.token.isCancellationRequested)return!0}finally{c.dispose()}if(!d||d.length===0)return!1;if(Ep(t))_7.execute(t,d,n!==2),n!==2&&t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1);else{let[{range:u}]=d,h=new jt(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn);l.pushEditOperations([h],d.map(f=>({text:f.text,range:O.lift(f.range),forceMoveMarkers:!0})),f=>{for(let{range:p}of f)if(O.areIntersectingOrTouching(p,h))return[new jt(p.startLineNumber,p.startColumn,p.endLineNumber,p.endColumn)];return null})}return a.playAudioCue(Cn.format,{userGesture:r}),!0}async function APt(i,e,t,n,o,r){let s=e.documentRangeFormattingEditProvider.ordered(t);for(let a of s){let l=await Promise.resolve(a.provideDocumentRangeFormattingEdits(t,n,o,r)).catch(po);if(Nr(l))return await i.computeMoreMinimalEdits(t.uri,l)}}async function RPt(i,e,t,n,o){let r=Crt(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,t);for(let s of r){let a=await Promise.resolve(s.provideDocumentFormattingEdits(t,n,o)).catch(po);if(Nr(a))return await i.computeMoreMinimalEdits(t.uri,a)}}function I6e(i,e,t,n,o,r,s){let a=e.onTypeFormattingEditProvider.ordered(t);return a.length===0||a[0].autoFormatTriggerCharacters.indexOf(o)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,n,o,r,s)).catch(po).then(l=>i.computeMoreMinimalEdits(t.uri,l))}var b7,M6e=P(()=>{Vi();mo();Pi();Yc();Hh();ho();Io();$4();US();Mi();Kt();zo();Yv();Wh();D6e();$o();yrt();_i();Yn();Ju();r8();b7=class i{static setFormatterSelector(e){return{dispose:i._selectors.unshift(e)}}static async select(e,t,n,o){if(e.length===0)return;let r=un.first(i._selectors);if(r)return await r(e,t,n,o)}};b7._selectors=new $r;Zi.registerCommand("_executeFormatRangeProvider",async function(i,...e){let[t,n,o]=e;Bn(li.isUri(t)),Bn(O.isIRange(n));let r=i.get(xs),s=i.get(Oc),a=i.get(Rt),l=await r.createModelReference(t);try{return APt(s,a,l.object.textEditorModel,O.lift(n),o,Fi.None)}finally{l.dispose()}});Zi.registerCommand("_executeFormatDocumentProvider",async function(i,...e){let[t,n]=e;Bn(li.isUri(t));let o=i.get(xs),r=i.get(Oc),s=i.get(Rt),a=await o.createModelReference(t);try{return RPt(r,s,a.object.textEditorModel,n,Fi.None)}finally{a.dispose()}});Zi.registerCommand("_executeFormatOnTypeProvider",async function(i,...e){let[t,n,o,r]=e;Bn(li.isUri(t)),Bn(ke.isIPosition(n)),Bn(typeof o=="string");let s=i.get(xs),a=i.get(Oc),l=i.get(Rt),c=await s.createModelReference(t);try{return I6e(a,l,c.object.textEditorModel,ke.lift(n),o,r,Fi.None)}finally{c.dispose()}})});var ir={};Ai(ir,{CancellationTokenSource:()=>PPt,Emitter:()=>A6e,KeyCode:()=>R6e,KeyMod:()=>P6e,MarkerSeverity:()=>BPt,MarkerTag:()=>VPt,Position:()=>OPt,Range:()=>zPt,Selection:()=>FPt,SelectionDirection:()=>HPt,Token:()=>UPt,Uri:()=>WPt,editor:()=>$S,languages:()=>aA});var zd,PPt,A6e,R6e,P6e,OPt,zPt,FPt,HPt,BPt,VPt,WPt,UPt,$S,aA,N6e,ta=P(()=>{Ks();Oue();drt();vrt();M6e();nu.wrappingIndent.defaultValue=0;nu.glyphMargin.defaultValue=!1;nu.autoIndent.defaultValue=3;nu.overviewRulerLanes.defaultValue=2;b7.setFormatterSelector((i,e,t)=>Promise.resolve(i[0]));zd=eU();zd.editor=crt();zd.languages=grt();PPt=zd.CancellationTokenSource,A6e=zd.Emitter,R6e=zd.KeyCode,P6e=zd.KeyMod,OPt=zd.Position,zPt=zd.Range,FPt=zd.Selection,HPt=zd.SelectionDirection,BPt=zd.MarkerSeverity,VPt=zd.MarkerTag,WPt=zd.Uri,UPt=zd.Token,$S=zd.editor,aA=zd.languages,N6e=globalThis.MonacoEnvironment;(N6e?.globalAPI||typeof define=="function"&&define.amd)&&(globalThis.monaco=zd);typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})});var Lrt={};Ai(Lrt,{conf:()=>ZPt,language:()=>XPt});var ZPt,XPt,Ert=P(()=>{ZPt={comments:{lineComment:"*"},brackets:[["[","]"],["(",")"]]},XPt={defaultToken:"invalid",ignoreCase:!0,tokenPostfix:".abap",keywords:["abap-source","abbreviated","abstract","accept","accepting","according","activation","actual","add","add-corresponding","adjacent","after","alias","aliases","align","all","allocate","alpha","analysis","analyzer","and","append","appendage","appending","application","archive","area","arithmetic","as","ascending","aspect","assert","assign","assigned","assigning","association","asynchronous","at","attributes","authority","authority-check","avg","back","background","backup","backward","badi","base","before","begin","between","big","binary","bintohex","bit","black","blank","blanks","blob","block","blocks","blue","bound","boundaries","bounds","boxed","break-point","buffer","by","bypassing","byte","byte-order","call","calling","case","cast","casting","catch","center","centered","chain","chain-input","chain-request","change","changing","channels","character","char-to-hex","check","checkbox","ci_","circular","class","class-coding","class-data","class-events","class-methods","class-pool","cleanup","clear","client","clob","clock","close","coalesce","code","coding","col_background","col_group","col_heading","col_key","col_negative","col_normal","col_positive","col_total","collect","color","column","columns","comment","comments","commit","common","communication","comparing","component","components","compression","compute","concat","concat_with_space","concatenate","cond","condense","condition","connect","connection","constants","context","contexts","continue","control","controls","conv","conversion","convert","copies","copy","corresponding","country","cover","cpi","create","creating","critical","currency","currency_conversion","current","cursor","cursor-selection","customer","customer-function","dangerous","data","database","datainfo","dataset","date","dats_add_days","dats_add_months","dats_days_between","dats_is_valid","daylight","dd/mm/yy","dd/mm/yyyy","ddmmyy","deallocate","decimal_shift","decimals","declarations","deep","default","deferred","define","defining","definition","delete","deleting","demand","department","descending","describe","destination","detail","dialog","directory","disconnect","display","display-mode","distinct","divide","divide-corresponding","division","do","dummy","duplicate","duplicates","duration","during","dynamic","dynpro","edit","editor-call","else","elseif","empty","enabled","enabling","encoding","end","endat","endcase","endcatch","endchain","endclass","enddo","endenhancement","end-enhancement-section","endexec","endform","endfunction","endian","endif","ending","endinterface","end-lines","endloop","endmethod","endmodule","end-of-definition","end-of-editing","end-of-file","end-of-page","end-of-selection","endon","endprovide","endselect","end-test-injection","end-test-seam","endtry","endwhile","endwith","engineering","enhancement","enhancement-point","enhancements","enhancement-section","entries","entry","enum","environment","equiv","errormessage","errors","escaping","event","events","exact","except","exception","exceptions","exception-table","exclude","excluding","exec","execute","exists","exit","exit-command","expand","expanding","expiration","explicit","exponent","export","exporting","extend","extended","extension","extract","fail","fetch","field","field-groups","fields","field-symbol","field-symbols","file","filter","filters","filter-table","final","find","first","first-line","fixed-point","fkeq","fkge","flush","font","for","form","format","forward","found","frame","frames","free","friends","from","function","functionality","function-pool","further","gaps","generate","get","giving","gkeq","gkge","global","grant","green","group","groups","handle","handler","harmless","hashed","having","hdb","header","headers","heading","head-lines","help-id","help-request","hextobin","hide","high","hint","hold","hotspot","icon","id","identification","identifier","ids","if","ignore","ignoring","immediately","implementation","implementations","implemented","implicit","import","importing","in","inactive","incl","include","includes","including","increment","index","index-line","infotypes","inheriting","init","initial","initialization","inner","inout","input","insert","instance","instances","instr","intensified","interface","interface-pool","interfaces","internal","intervals","into","inverse","inverted-date","is","iso","job","join","keep","keeping","kernel","key","keys","keywords","kind","language","last","late","layout","leading","leave","left","left-justified","leftplus","leftspace","legacy","length","let","level","levels","like","line","lines","line-count","linefeed","line-selection","line-size","list","listbox","list-processing","little","llang","load","load-of-program","lob","local","locale","locator","logfile","logical","log-point","long","loop","low","lower","lpad","lpi","ltrim","mail","main","major-id","mapping","margin","mark","mask","match","matchcode","max","maximum","medium","members","memory","mesh","message","message-id","messages","messaging","method","methods","min","minimum","minor-id","mm/dd/yy","mm/dd/yyyy","mmddyy","mode","modif","modifier","modify","module","move","move-corresponding","multiply","multiply-corresponding","name","nametab","native","nested","nesting","new","new-line","new-page","new-section","next","no","no-display","no-extension","no-gap","no-gaps","no-grouping","no-heading","no-scrolling","no-sign","no-title","no-topofpage","no-zero","node","nodes","non-unicode","non-unique","not","null","number","object","objects","obligatory","occurrence","occurrences","occurs","of","off","offset","ole","on","only","open","option","optional","options","or","order","other","others","out","outer","output","output-length","overflow","overlay","pack","package","pad","padding","page","pages","parameter","parameters","parameter-table","part","partially","pattern","percentage","perform","performing","person","pf1","pf10","pf11","pf12","pf13","pf14","pf15","pf2","pf3","pf4","pf5","pf6","pf7","pf8","pf9","pf-status","pink","places","pool","pos_high","pos_low","position","pragmas","precompiled","preferred","preserving","primary","print","print-control","priority","private","procedure","process","program","property","protected","provide","public","push","pushbutton","put","queue-only","quickinfo","radiobutton","raise","raising","range","ranges","read","reader","read-only","receive","received","receiver","receiving","red","redefinition","reduce","reduced","ref","reference","refresh","regex","reject","remote","renaming","replace","replacement","replacing","report","request","requested","reserve","reset","resolution","respecting","responsible","result","results","resumable","resume","retry","return","returncode","returning","returns","right","right-justified","rightplus","rightspace","risk","rmc_communication_failure","rmc_invalid_status","rmc_system_failure","role","rollback","rows","rpad","rtrim","run","sap","sap-spool","saving","scale_preserving","scale_preserving_scientific","scan","scientific","scientific_with_leading_zero","scroll","scroll-boundary","scrolling","search","secondary","seconds","section","select","selection","selections","selection-screen","selection-set","selection-sets","selection-table","select-options","send","separate","separated","set","shared","shift","short","shortdump-id","sign_as_postfix","single","size","skip","skipping","smart","some","sort","sortable","sorted","source","specified","split","spool","spots","sql","sqlscript","stable","stamp","standard","starting","start-of-editing","start-of-selection","state","statement","statements","static","statics","statusinfo","step-loop","stop","structure","structures","style","subkey","submatches","submit","subroutine","subscreen","subtract","subtract-corresponding","suffix","sum","summary","summing","supplied","supply","suppress","switch","switchstates","symbol","syncpoints","syntax","syntax-check","syntax-trace","system-call","system-exceptions","system-exit","tab","tabbed","table","tables","tableview","tabstrip","target","task","tasks","test","testing","test-injection","test-seam","text","textpool","then","throw","time","times","timestamp","timezone","tims_is_valid","title","titlebar","title-lines","to","tokenization","tokens","top-lines","top-of-page","trace-file","trace-table","trailing","transaction","transfer","transformation","translate","transporting","trmac","truncate","truncation","try","tstmp_add_seconds","tstmp_current_utctimestamp","tstmp_is_valid","tstmp_seconds_between","type","type-pool","type-pools","types","uline","unassign","under","unicode","union","unique","unit_conversion","unix","unpack","until","unwind","up","update","upper","user","user-command","using","utf-8","valid","value","value-request","values","vary","varying","verification-message","version","via","view","visible","wait","warning","when","whenever","where","while","width","window","windows","with","with-heading","without","with-title","word","work","write","writer","xml","xsd","yellow","yes","yymmdd","zero","zone","abap_system_timezone","abap_user_timezone","access","action","adabas","adjust_numbers","allow_precision_loss","allowed","amdp","applicationuser","as_geo_json","as400","associations","balance","behavior","breakup","bulk","cds","cds_client","check_before_save","child","clients","corr","corr_spearman","cross","cycles","datn_add_days","datn_add_months","datn_days_between","dats_from_datn","dats_tims_to_tstmp","dats_to_datn","db2","db6","ddl","dense_rank","depth","deterministic","discarding","entities","entity","error","failed","finalize","first_value","fltp_to_dec","following","fractional","full","graph","grouping","hierarchy","hierarchy_ancestors","hierarchy_ancestors_aggregate","hierarchy_descendants","hierarchy_descendants_aggregate","hierarchy_siblings","incremental","indicators","lag","last_value","lead","leaves","like_regexpr","link","locale_sap","lock","locks","many","mapped","matched","measures","median","mssqlnt","multiple","nodetype","ntile","nulls","occurrences_regexpr","one","operations","oracle","orphans","over","parent","parents","partition","pcre","period","pfcg_mapping","preceding","privileged","product","projection","rank","redirected","replace_regexpr","reported","response","responses","root","row","row_number","sap_system_date","save","schema","session","sets","shortdump","siblings","spantree","start","stddev","string_agg","subtotal","sybase","tims_from_timn","tims_to_timn","to_blob","to_clob","total","trace-entry","tstmp_to_dats","tstmp_to_dst","tstmp_to_tims","tstmpl_from_utcl","tstmpl_to_utcl","unbounded","utcl_add_seconds","utcl_current","utcl_seconds_between","uuid","var","verbatim"],builtinFunctions:["abs","acos","asin","atan","bit-set","boolc","boolx","ceil","char_off","charlen","cmax","cmin","concat_lines_of","contains","contains_any_not_of","contains_any_of","cos","cosh","count","count_any_not_of","count_any_of","dbmaxlen","distance","escape","exp","find_any_not_of","find_any_of","find_end","floor","frac","from_mixed","ipow","line_exists","line_index","log","log10","matches","nmax","nmin","numofchar","repeat","rescale","reverse","round","segment","shift_left","shift_right","sign","sin","sinh","sqrt","strlen","substring","substring_after","substring_before","substring_from","substring_to","tan","tanh","to_lower","to_mixed","to_upper","trunc","utclong_add","utclong_current","utclong_diff","xsdbool","xstrlen"],typeKeywords:["b","c","d","decfloat16","decfloat34","f","i","int8","n","p","s","string","t","utclong","x","xstring","any","clike","csequence","decfloat","numeric","simple","xsequence","accp","char","clnt","cuky","curr","datn","dats","d16d","d16n","d16r","d34d","d34n","d34r","dec","df16_dec","df16_raw","df34_dec","df34_raw","fltp","geom_ewkb","int1","int2","int4","lang","lchr","lraw","numc","quan","raw","rawstring","sstring","timn","tims","unit","utcl","df16_scl","df34_scl","prec","varc","abap_bool","abap_false","abap_true","abap_undefined","me","screen","space","super","sy","syst","table_line","*sys*"],builtinMethods:["class_constructor","constructor"],derivedTypes:["%CID","%CID_REF","%CONTROL","%DATA","%ELEMENT","%FAIL","%KEY","%MSG","%PARAM","%PID","%PID_ASSOC","%PID_PARENT","%_HINTS"],cdsLanguage:["@AbapAnnotation","@AbapCatalog","@AccessControl","@API","@ClientDependent","@ClientHandling","@CompatibilityContract","@DataAging","@EndUserText","@Environment","@LanguageDependency","@MappingRole","@Metadata","@MetadataExtension","@ObjectModel","@Scope","@Semantics","$EXTENSION","$SELF"],selectors:["->","->*","=>","~","~*"],operators:[" +"," -","/","*","**","div","mod","=","#","@","+=","-=","*=","/=","**=","&&=","?=","&","&&","bit-and","bit-not","bit-or","bit-xor","m","o","z","<"," >","<=",">=","<>","><","=<","=>","bt","byte-ca","byte-cn","byte-co","byte-cs","byte-na","byte-ns","ca","cn","co","cp","cs","eq","ge","gt","le","lt","na","nb","ne","np","ns","*/","*:","--","/*","//"],symbols:/[=>))*/,{cases:{"@typeKeywords":"type","@keywords":"keyword","@cdsLanguage":"annotation","@derivedTypes":"type","@builtinFunctions":"type","@builtinMethods":"type","@operators":"key","@default":"identifier"}}],[/<[\w]+>/,"identifier"],[/##[\w|_]+/,"comment"],{include:"@whitespace"},[/[:,.]/,"delimiter"],[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@selectors":"tag","@operators":"key","@default":""}}],[/'/,{token:"string",bracket:"@open",next:"@stringquote"}],[/`/,{token:"string",bracket:"@open",next:"@stringping"}],[/\|/,{token:"string",bracket:"@open",next:"@stringtemplate"}],[/\d+/,"number"]],stringtemplate:[[/[^\\\|]+/,"string"],[/\\\|/,"string"],[/\|/,{token:"string",bracket:"@close",next:"@pop"}]],stringping:[[/[^\\`]+/,"string"],[/`/,{token:"string",bracket:"@close",next:"@pop"}]],stringquote:[[/[^\\']+/,"string"],[/'/,{token:"string",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/^\*.*$/,"comment"],[/\".*$/,"comment"]]}}});var Drt={};Ai(Drt,{conf:()=>QPt,language:()=>tOt});var QPt,JPt,eOt,kQ,tOt,Trt=P(()=>{QPt={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},JPt=["abstract","activate","and","any","array","as","asc","assert","autonomous","begin","bigdecimal","blob","boolean","break","bulk","by","case","cast","catch","char","class","collect","commit","const","continue","convertcurrency","decimal","default","delete","desc","do","double","else","end","enum","exception","exit","export","extends","false","final","finally","float","for","from","future","get","global","goto","group","having","hint","if","implements","import","in","inner","insert","instanceof","int","interface","into","join","last_90_days","last_month","last_n_days","last_week","like","limit","list","long","loop","map","merge","native","new","next_90_days","next_month","next_n_days","next_week","not","null","nulls","number","object","of","on","or","outer","override","package","parallel","pragma","private","protected","public","retrieve","return","returning","rollback","savepoint","search","select","set","short","sort","stat","static","strictfp","super","switch","synchronized","system","testmethod","then","this","this_month","this_week","throw","throws","today","tolabel","tomorrow","transaction","transient","trigger","true","try","type","undelete","update","upsert","using","virtual","void","volatile","webservice","when","where","while","yesterday"],eOt=i=>i.charAt(0).toUpperCase()+i.substr(1),kQ=[];JPt.forEach(i=>{kQ.push(i),kQ.push(i.toUpperCase()),kQ.push(eOt(i))});tOt={defaultToken:"",tokenPostfix:".apex",keywords:kQ,operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@apexdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],apexdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}});var Irt={};Ai(Irt,{conf:()=>iOt,language:()=>nOt});var iOt,nOt,Mrt=P(()=>{iOt={comments:{lineComment:"#"}},nOt={defaultToken:"keyword",ignoreCase:!0,tokenPostfix:".azcli",str:/[^#\s]/,tokenizer:{root:[{include:"@comment"},[/\s-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}],[/^-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}]],type:[{include:"@comment"},[/-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":"key.identifier"}}],[/@str+\s*/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}]],comment:[[/#.*$/,{cases:{"@eos":{token:"comment",next:"@popall"}}}]]}}});var Nrt={};Ai(Nrt,{conf:()=>oOt,language:()=>rOt});var oOt,rOt,Art=P(()=>{oOt={comments:{lineComment:"REM"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|REM\\s+)#region"),end:new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")}}},rOt={defaultToken:"",ignoreCase:!0,tokenPostfix:".bat",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:/call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,symbols:/[=>pOt,language:()=>mOt});var sOt,aOt,lOt,cOt,dOt,uOt,hOt,fOt,pOt,mOt,Prt=P(()=>{sOt=i=>`\\b${i}\\b`,aOt="[_a-zA-Z]",lOt="[_a-zA-Z0-9]",cOt=sOt(`${aOt}${lOt}*`),dOt=["targetScope","resource","module","param","var","output","for","in","if","existing"],uOt=["true","false","null"],hOt="[ \\t\\r\\n]",fOt="[0-9]+",pOt={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:"'''",close:"'''"}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:"'''",close:"'''",notIn:["string","comment"]}],autoCloseBefore:`:.,=}])' +`),await this._clipboardService.writeText(C)})),n.getOption(90)||_.push(new zs("diff.inline.revertChange",g("diff.inline.revertChange.label","Revert this change"),void 0,!0,async()=>{this._editor.revert(this._diff)})),_},autoSelectFirstItem:!0})};this._register(go(this._diffActions,"mousedown",p=>{if(!p.leftButton)return;let{top:m,height:y}=Lo(this._diffActions),_=Math.floor(d/3);p.preventDefault(),f(p.posx,m+y+_)})),this._register(n.onMouseMove(p=>{(p.target.type===8||p.target.type===5)&&p.target.detail.viewZoneId===this._getViewZoneId()?(u=this._updateLightBulbPosition(this._marginDomNode,p.event.browserEvent.y,d),this.visibility=!0):this.visibility=!1})),this._register(n.onMouseDown(p=>{p.event.leftButton&&(p.target.type===8||p.target.type===5)&&p.target.detail.viewZoneId===this._getViewZoneId()&&(p.event.preventDefault(),u=this._updateLightBulbPosition(this._marginDomNode,p.event.browserEvent.y,d),f(p.event.posx,p.event.posy+d))}))}_updateLightBulbPosition(e,t,n){let{top:o}=Lo(e),r=t-o,s=Math.floor(r/n),a=s*n;if(this._diffActions.style.top=`${a}px`,this._viewLineCounts){let l=0;for(let c=0;c0,r=new qh(1e4),s=0,a=0,l=[];for(let h=0;h');let l=e.getLineContent(),c=Ed.isBasicASCII(l,o),d=Ed.containsRTL(l,c,r),u=a4(new uu(s.fontInfo.isMonospace&&!s.disableMonospaceOptimizations,s.fontInfo.canUseHalfwidthRightwardsArrow,l,!1,c,d,0,e,t,s.tabSize,0,s.fontInfo.spaceWidth,s.fontInfo.middotWidth,s.fontInfo.wsmiddotWidth,s.stopRenderingLineAfter,s.renderWhitespace,s.renderControlCharacters,s.fontLigatures!==qu.OFF,null),a);return a.appendString(""),u.characterMapping.getHorizontalOffset(u.characterMapping.length)}var Rot,rQ,sQ,zot=P(()=>{Vg();Vf();Ks();J0();gw();lv();ap();Rot=td("diffEditorWidget",{createHTML:i=>i});rQ=class{constructor(e,t,n,o){this.lineTokens=e,this.lineBreakData=t,this.mightContainNonBasicASCII=n,this.mightContainRTL=o}},sQ=class i{static fromEditor(e){var t;let n=e.getOptions(),o=n.get(50),r=n.get(143);return new i(((t=e.getModel())===null||t===void 0?void 0:t.getOptions().tabSize)||0,o,n.get(33),o.typicalHalfwidthCharacterWidth,n.get(103),n.get(66),r.decorationsWidth,n.get(116),n.get(98),n.get(93),n.get(51))}constructor(e,t,n,o,r,s,a,l,c,d,u){this.tabSize=e,this.fontInfo=t,this.disableMonospaceOptimizations=n,this.typicalHalfwidthCharacterWidth=o,this.scrollBeyondLastColumn=r,this.lineHeight=s,this.lineDecorationsWidth=a,this.stopRenderingLineAfter=l,this.renderWhitespace=c,this.renderControlCharacters=d,this.fontLigatures=u}}});function Hot(i,e,t,n,o,r){let s=new qc(Bot(i,n)),a=new qc(Bot(e,o)),l=i.getOption(66),c=e.getOption(66),d=[],u=0,h=0;function f(p,m){for(;;){let y=s.peek(),_=a.peek();if(y&&y.lineNumber>=p&&(y=void 0),_&&_.lineNumber>=m&&(_=void 0),!y&&!_)break;let v=y?y.lineNumber-u:Number.MAX_VALUE,b=_?_.lineNumber-h:Number.MAX_VALUE;vb?(a.dequeue(),y={lineNumber:_.lineNumber-h+u,heightInPx:0}):(s.dequeue(),a.dequeue()),d.push({originalRange:rn.ofLength(y.lineNumber,1),modifiedRange:rn.ofLength(_.lineNumber,1),originalHeightInPx:l+y.heightInPx,modifiedHeightInPx:c+_.heightInPx,diff:void 0})}}for(let p of t){let b=function(C,w){var S,x,k,D;if(CI.lineNumberI+M.heightInPx,0))!==null&&x!==void 0?x:0,L=(D=(k=a.takeWhile(I=>I.lineNumberI+M.heightInPx,0))!==null&&D!==void 0?D:0;d.push({originalRange:E,modifiedRange:A,originalHeightInPx:E.length*l+T,modifiedHeightInPx:A.length*c+L,diff:p.lineRangeMapping}),v=C,_=w},m=p.lineRangeMapping;f(m.original.startLineNumber,m.modified.startLineNumber);let y=!0,_=m.modified.startLineNumber,v=m.original.startLineNumber;if(r)for(let C of m.innerChanges||[]){C.originalRange.startColumn>1&&C.modifiedRange.startColumn>1&&b(C.originalRange.startLineNumber,C.modifiedRange.startLineNumber);let w=i.getModel(),S=C.originalRange.endLineNumber<=w.getLineCount()?w.getLineMaxColumn(C.originalRange.endLineNumber):Number.MAX_SAFE_INTEGER;C.originalRange.endColumn1&&n.push({lineNumber:l,heightInPx:s*(c-1)})}for(let l of i.getWhitespaces()){if(e.has(l.id))continue;let c=l.afterLineNumber===0?0:r.convertViewPositionToModelPosition(new ke(l.afterLineNumber,1)).lineNumber;t.push({lineNumber:c,heightInPx:l.height})}return Cot(t,n,l=>l.lineNumber,(l,c)=>({lineNumber:l.lineNumber,heightInPx:l.heightInPx+c.heightInPx}))}var QAt,Fot,aQ,Vot=P(()=>{Qt();Vi();Qi();Go();nt();Is();or();ho();Vf();QX();p6e();Aot();zot();kp();sh();Mi();ap();F4();Id();QAt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Fot=function(i,e){return function(t,n){e(t,n,i)}},aQ=class extends ue{constructor(e,t,n,o,r,s,a,l,c,d){super(),this._targetWindow=e,this._editors=t,this._diffModel=n,this._options=o,this._diffEditorWidget=r,this._canIgnoreViewZoneUpdateEvent=s,this._origViewZonesToIgnore=a,this._modViewZonesToIgnore=l,this._clipboardService=c,this._contextMenuService=d,this._originalTopPadding=kn(this,0),this._originalScrollOffset=kn(this,0),this._originalScrollOffsetAnimated=$4e(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=kn(this,0),this._modifiedScrollOffset=kn(this,0),this._modifiedScrollOffsetAnimated=$4e(this._targetWindow,this._modifiedScrollOffset,this._store);let u=kn("invalidateAlignmentsState",0),h=this._register(new hn(()=>{u.set(u.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(b=>{this._canIgnoreViewZoneUpdateEvent()||h.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(b=>{this._canIgnoreViewZoneUpdateEvent()||h.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(b=>{(b.hasChanged(144)||b.hasChanged(66))&&h.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(b=>{(b.hasChanged(144)||b.hasChanged(66))&&h.schedule()}));let f=this._diffModel.map(b=>b?Ao(b.model.original.onDidChangeTokens,()=>b.model.original.tokenization.backgroundTokenizationState===2):void 0).map((b,C)=>b?.read(C)),p=Hi(b=>{let C=this._diffModel.read(b),w=C?.diff.read(b);if(!C||!w)return null;u.read(b);let x=this._options.renderSideBySide.read(b);return Hot(this._editors.original,this._editors.modified,w.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,x)}),m=Hi(b=>{var C;let w=(C=this._diffModel.read(b))===null||C===void 0?void 0:C.movedTextToCompare.read(b);if(!w)return null;u.read(b);let S=w.changes.map(x=>new eA(x));return Hot(this._editors.original,this._editors.modified,S,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)});function y(){let b=document.createElement("div");return b.className="diagonal-fill",b}let _=this._register(new Ye);this.viewZones=g1(this,(b,C)=>{var w,S,x,k,D,E,A,T;_.clear();let L=p.read(b)||[],I=[],M=[],N=this._modifiedTopPadding.read(b);N>0&&M.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:N,showInHiddenAreas:!0,suppressMouseDown:!0});let z=this._originalTopPadding.read(b);z>0&&I.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:z,showInHiddenAreas:!0,suppressMouseDown:!0});let F=this._options.renderSideBySide.read(b),V=F||(w=this._editors.modified._getViewModel())===null||w===void 0?void 0:w.createLineBreaksComputer();if(V){let Ie=this._editors.original.getModel();for(let ee of L)if(ee.diff)for(let Z=ee.originalRange.startLineNumber;ZIe.getLineCount())return{orig:I,mod:M};V?.addRequest(Ie.getLineContent(Z),null,null)}}let ie=(S=V?.finalize())!==null&&S!==void 0?S:[],fe=0,K=this._editors.modified.getOption(66),oe=(x=this._diffModel.read(b))===null||x===void 0?void 0:x.movedTextToCompare.read(b),je=(D=(k=this._editors.original.getModel())===null||k===void 0?void 0:k.mightContainNonBasicASCII())!==null&&D!==void 0?D:!1,Ae=(A=(E=this._editors.original.getModel())===null||E===void 0?void 0:E.mightContainRTL())!==null&&A!==void 0?A:!1,Be=sQ.fromEditor(this._editors.modified);for(let Ie of L)if(Ie.diff&&!F){if(!Ie.originalRange.isEmpty){f.read(b);let Z=document.createElement("div");Z.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");let te=this._editors.original.getModel();if(Ie.originalRange.endLineNumberExclusive-1>te.getLineCount())return{orig:I,mod:M};let W=new rQ(Ie.originalRange.mapToLineArray(Oe=>te.tokenization.getLineTokens(Oe)),Ie.originalRange.mapToLineArray(Oe=>ie[fe++]),je,Ae),Le=[];for(let Oe of Ie.diff.innerChanges||[])Le.push(new l4(Oe.originalRange.delta(-(Ie.diff.original.startLineNumber-1)),QN.className,0));let rt=Oot(W,Be,Le,Z),ae=document.createElement("div");if(ae.className="inline-deleted-margin-view-zone",Gr(ae,Be.fontInfo),this._options.renderIndicators.read(b))for(let Oe=0;OeX1(Ze),ae,this._editors.modified,Ie.diff,this._diffEditorWidget,rt.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let Oe=0;Oe1&&I.push({afterLineNumber:Ie.originalRange.startLineNumber+Oe,domNode:y(),heightInPx:(tt-1)*K,showInHiddenAreas:!0,suppressMouseDown:!0})}M.push({afterLineNumber:Ie.modifiedRange.startLineNumber-1,domNode:Z,heightInPx:rt.heightInLines*K,minWidthInPx:rt.minWidthInPx,marginDomNode:ae,setZoneId(Oe){Ze=Oe},showInHiddenAreas:!0,suppressMouseDown:!0})}let ee=document.createElement("div");ee.className="gutter-delete",I.push({afterLineNumber:Ie.originalRange.endLineNumberExclusive-1,domNode:y(),heightInPx:Ie.modifiedHeightInPx,marginDomNode:ee,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let ee=Ie.modifiedHeightInPx-Ie.originalHeightInPx;if(ee>0){if(oe?.lineRangeMapping.original.delta(-1).deltaLength(2).contains(Ie.originalRange.endLineNumberExclusive-1))continue;I.push({afterLineNumber:Ie.originalRange.endLineNumberExclusive-1,domNode:y(),heightInPx:ee,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let Z=function(){let W=document.createElement("div");return W.className="arrow-revert-change "+ui.asClassName(kt.arrowRight),C.add(Xe(W,"mousedown",Le=>Le.stopPropagation())),C.add(Xe(W,"click",Le=>{Le.stopPropagation(),r.revert(Ie.diff)})),pt("div",{},W)};if(oe?.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(Ie.modifiedRange.endLineNumberExclusive-1))continue;let te;Ie.diff&&Ie.diff.modified.isEmpty&&this._options.shouldRenderRevertArrows.read(b)&&(te=Z()),M.push({afterLineNumber:Ie.modifiedRange.endLineNumberExclusive-1,domNode:y(),heightInPx:-ee,marginDomNode:te,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(let Ie of(T=m.read(b))!==null&&T!==void 0?T:[]){if(!oe?.lineRangeMapping.original.intersect(Ie.originalRange)||!oe?.lineRangeMapping.modified.intersect(Ie.modifiedRange))continue;let ee=Ie.modifiedHeightInPx-Ie.originalHeightInPx;ee>0?I.push({afterLineNumber:Ie.originalRange.endLineNumberExclusive-1,domNode:y(),heightInPx:ee,showInHiddenAreas:!0,suppressMouseDown:!0}):M.push({afterLineNumber:Ie.modifiedRange.endLineNumberExclusive-1,domNode:y(),heightInPx:-ee,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:I,mod:M}});let v=!1;this._register(this._editors.original.onDidScrollChange(b=>{b.scrollLeftChanged&&!v&&(v=!0,this._editors.modified.setScrollLeft(b.scrollLeft),v=!1)})),this._register(this._editors.modified.onDidScrollChange(b=>{b.scrollLeftChanged&&!v&&(v=!0,this._editors.original.setScrollLeft(b.scrollLeft),v=!1)})),this._originalScrollTop=Ao(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Ao(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register(Ln(b=>{let C=this._originalScrollTop.read(b)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(b))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(b));C!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(C,1)})),this._register(Ln(b=>{let C=this._modifiedScrollTop.read(b)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(b))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(b));C!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(C,1)})),this._register(Ln(b=>{var C;let w=(C=this._diffModel.read(b))===null||C===void 0?void 0:C.movedTextToCompare.read(b),S=0;if(w){let x=this._editors.original.getTopForLineNumber(w.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();S=this._editors.modified.getTopForLineNumber(w.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-x}S>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(S,void 0)):S<0?(this._modifiedTopPadding.set(-S,void 0),this._originalTopPadding.set(0,void 0)):setTimeout(()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)},400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-S,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+S,void 0,!0)}))}};aQ=QAt([Fot(8,Pd),Fot(9,ca)],aQ)});var JAt,eRt,Lp,U4,m6e=P(()=>{Qt();_a();Vj();nt();Is();kp();Mi();fpe();pr();No();JAt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},eRt=function(i,e){return function(t,n){e(t,n,i)}},U4=Lp=class extends ue{constructor(e,t,n,o,r,s,a){super(),this._editors=e,this._rootElement=t,this._diffModel=n,this._rootWidth=o,this._rootHeight=r,this._modifiedEditorLayoutInfo=s,this._themeService=a,this.width=Lp.ENTIRE_DIFF_OVERVIEW_WIDTH;let l=Ao(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),c=Hi(h=>{let f=l.read(h),p=f.getColor(jYe)||(f.getColor(UYe)||fj).transparent(2),m=f.getColor(qYe)||(f.getColor($Ye)||pj).transparent(2);return{insertColor:p,removeColor:m}}),d=vn(document.createElement("div"));d.setClassName("diffViewport"),d.setPosition("absolute");let u=Do("div.diffOverview",{style:{position:"absolute",top:"0px",width:Lp.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register(YN(u,d.domNode)),this._register(go(u,Lt.POINTER_DOWN,h=>{this._editors.modified.delegateVerticalScrollbarPointerDown(h)})),this._register(Xe(u,Lt.MOUSE_WHEEL,h=>{this._editors.modified.delegateScrollFromMouseWheelEvent(h)},{passive:!1})),this._register(YN(this._rootElement,u)),this._register(Rl((h,f)=>{let p=this._diffModel.read(h),m=this._editors.original.createOverviewRuler("original diffOverviewRuler");m&&(f.add(m),f.add(YN(u,m.getDomNode())));let y=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(y&&(f.add(y),f.add(YN(u,y.getDomNode()))),!m||!y)return;let _=Pl("viewZoneChanged",this._editors.original.onDidChangeViewZones),v=Pl("viewZoneChanged",this._editors.modified.onDidChangeViewZones),b=Pl("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),C=Pl("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);f.add(Ln(w=>{var S;_.read(w),v.read(w),b.read(w),C.read(w);let x=c.read(w),k=(S=p?.diff.read(w))===null||S===void 0?void 0:S.mappings;function D(T,L,I){let M=I._getViewModel();return M?T.filter(N=>N.length>0).map(N=>{let z=M.coordinatesConverter.convertModelPositionToViewPosition(new ke(N.startLineNumber,1)),F=M.coordinatesConverter.convertModelPositionToViewPosition(new ke(N.endLineNumberExclusive,1)),V=F.lineNumber-z.lineNumber;return new jI(z.lineNumber,F.lineNumber,V,L.toString())}):[]}let E=D((k||[]).map(T=>T.lineRangeMapping.original),x.removeColor,this._editors.original),A=D((k||[]).map(T=>T.lineRangeMapping.modified),x.insertColor,this._editors.modified);m?.setZones(E),y?.setZones(A)})),f.add(Ln(w=>{let S=this._rootHeight.read(w),x=this._rootWidth.read(w),k=this._modifiedEditorLayoutInfo.read(w);if(k){let D=Lp.ENTIRE_DIFF_OVERVIEW_WIDTH-2*Lp.ONE_OVERVIEW_WIDTH;m.setLayout({top:0,height:S,right:D+Lp.ONE_OVERVIEW_WIDTH,width:Lp.ONE_OVERVIEW_WIDTH}),y.setLayout({top:0,height:S,right:0,width:Lp.ONE_OVERVIEW_WIDTH});let E=this._editors.modifiedScrollTop.read(w),A=this._editors.modifiedScrollHeight.read(w),T=this._editors.modified.getOption(102),L=new fv(T.verticalHasArrows?T.arrowSize:0,T.verticalScrollbarSize,0,k.height,A,E);d.setTop(L.getSliderPosition()),d.setHeight(L.getSliderSize())}else d.setTop(0),d.setHeight(0);u.style.height=S+"px",u.style.left=x-Lp.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",d.setWidth(Lp.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}};U4.ONE_OVERVIEW_WIDTH=15;U4.ENTIRE_DIFF_OVERVIEW_WIDTH=Lp.ONE_OVERVIEW_WIDTH*2;U4=Lp=JAt([eRt(6,Mo)],U4)});var tA,Wot=P(()=>{Xt();nt();tA=class i extends ue{constructor(){super(...arguments),this._id=++i.idCounter,this._onDidDispose=this._register(new ge),this.onDidDispose=this._onDidDispose.event}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,n=0){this._targetEditor.revealLines(e,t,n)}revealLinesInCenter(e,t,n=0){this._targetEditor.revealLinesInCenter(e,t,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,n)}revealLinesNearTop(e,t,n=0){this._targetEditor.revealLinesNearTop(e,t,n)}revealRange(e,t=0,n=!1,o=!0){this._targetEditor.revealRange(e,t,n,o)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,n){this._targetEditor.trigger(e,t,n)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}};tA.idCounter=0});var tRt,Uot,lQ,$ot=P(()=>{Xt();nt();Is();m6e();Ks();Wt();_i();vs();Mi();tRt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Uot=function(i,e){return function(t,n){e(t,n,i)}},lQ=class extends ue{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,t,n,o,r,s,a){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=n,this._createInnerEditor=r,this._instantiationService=s,this._keybindingService=a,this._onDidContentSizeChange=this._register(new ge),this.original=this._register(this._createLeftHandSideEditor(n.editorOptions.get(),o.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(n.editorOptions.get(),o.modifiedEditor||{})),this.modifiedModel=Ao(this.modified.onDidChangeModel,()=>this.modified.getModel()),this.modifiedScrollTop=Ao(this.modified.onDidScrollChange,()=>this.modified.getScrollTop()),this.modifiedScrollHeight=Ao(this.modified.onDidScrollChange,()=>this.modified.getScrollHeight()),this.modifiedSelections=Ao(this.modified.onDidChangeCursorSelection,()=>{var l;return(l=this.modified.getSelections())!==null&&l!==void 0?l:[]}),this.modifiedCursor=Ao(this.modified.onDidChangeCursorPosition,()=>{var l;return(l=this.modified.getPosition())!==null&&l!==void 0?l:new ke(1,1)}),this._register(U2({createEmptyChangeSummary:()=>({}),handleChange:(l,c)=>(l.didChange(n.editorOptions)&&Object.assign(c,l.change.changedOptions),!0)},(l,c)=>{n.editorOptions.read(l),this._options.renderSideBySide.read(l),this.modified.updateOptions(this._adjustOptionsForRightHandSide(l,c)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(l,c))}))}_createLeftHandSideEditor(e,t){let n=this._adjustOptionsForLeftHandSide(void 0,e),o=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,n,t);return o.setContextValue("isInDiffLeftEditor",!0),o}_createRightHandSideEditor(e,t){let n=this._adjustOptionsForRightHandSide(void 0,e),o=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,n,t);return o.setContextValue("isInDiffRightEditor",!0),o}_constructInnerEditor(e,t,n,o){let r=this._createInnerEditor(e,t,n,o);return this._register(r.onDidContentSizeChange(s=>{let a=this.original.getContentWidth()+this.modified.getContentWidth()+U4.ENTIRE_DIFF_OVERVIEW_WIDTH,l=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:l,contentWidth:a,contentHeightChanged:s.contentHeightChanged,contentWidthChanged:s.contentWidthChanged})})),r}_adjustOptionsForLeftHandSide(e,t){let n=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(n.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},n.wordWrapOverride1=this._options.diffWordWrap.get()):(n.wordWrapOverride1="off",n.wordWrapOverride2="off",n.stickyScroll={enabled:!1},n.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),n.glyphMargin=this._options.renderSideBySide.get(),t.originalAriaLabel&&(n.ariaLabel=t.originalAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.readOnly=!this._options.originalEditable.get(),n.dropIntoEditor={enabled:!n.readOnly},n.extraEditorClassName="original-in-monaco-diff-editor",n}_adjustOptionsForRightHandSide(e,t){let n=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(n.ariaLabel=t.modifiedAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.wordWrapOverride1=this._options.diffWordWrap.get(),n.revealHorizontalRightPadding=nu.revealHorizontalRightPadding.defaultValue+U4.ENTIRE_DIFF_OVERVIEW_WIDTH,n.scrollbar.verticalHasArrows=!1,n.extraEditorClassName="modified-in-monaco-diff-editor",n}_adjustOptionsForSubEditor(e){let t={...e,dimension:{height:0,width:0}};return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar={...t.scrollbar||{}},t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap={...t.minimap||{}},t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){var t;e||(e="");let n=g("diff-aria-navigation-tip"," use {0} to open the accessibility help.",(t=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))===null||t===void 0?void 0:t.getAriaLabel());return this._options.accessibilityVerbose.get()?e+n:e?e.replaceAll(n,""):""}};lQ=tRt([Uot(5,qt),Uot(6,fn)],lQ)});function jot(i,e){var t,n,o,r,s,a,l,c;return{enableSplitViewResizing:Ti(i.enableSplitViewResizing,e.enableSplitViewResizing),splitViewDefaultRatio:Rje(i.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:Ti(i.renderSideBySide,e.renderSideBySide),renderMarginRevertIcon:Ti(i.renderMarginRevertIcon,e.renderMarginRevertIcon),maxComputationTime:x3(i.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:x3(i.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:Ti(i.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:Ti(i.renderIndicators,e.renderIndicators),originalEditable:Ti(i.originalEditable,e.originalEditable),diffCodeLens:Ti(i.diffCodeLens,e.diffCodeLens),renderOverviewRuler:Ti(i.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:ws(i.diffWordWrap,e.diffWordWrap,["off","on","inherit"]),diffAlgorithm:ws(i.diffAlgorithm,e.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:Ti(i.accessibilityVerbose,e.accessibilityVerbose),experimental:{showMoves:Ti((t=i.experimental)===null||t===void 0?void 0:t.showMoves,e.experimental.showMoves),showEmptyDecorations:Ti((n=i.experimental)===null||n===void 0?void 0:n.showEmptyDecorations,e.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:Ti((r=(o=i.hideUnchangedRegions)===null||o===void 0?void 0:o.enabled)!==null&&r!==void 0?r:(s=i.experimental)===null||s===void 0?void 0:s.collapseUnchangedRegions,e.hideUnchangedRegions.enabled),contextLineCount:x3((a=i.hideUnchangedRegions)===null||a===void 0?void 0:a.contextLineCount,e.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:x3((l=i.hideUnchangedRegions)===null||l===void 0?void 0:l.minimumLineCount,e.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:x3((c=i.hideUnchangedRegions)===null||c===void 0?void 0:c.revealLineCount,e.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:Ti(i.isInEmbeddedEditor,e.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:Ti(i.onlyShowAccessibleDiffViewer,e.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:x3(i.renderSideBySideInlineBreakpoint,e.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:Ti(i.useInlineViewWhenSpaceIsLimited,e.useInlineViewWhenSpaceIsLimited)}}var cQ,qot=P(()=>{Is();jge();Ks();cQ=class{get editorOptions(){return this._options}constructor(e){this._diffEditorWidth=kn(this,0),this.couldShowInlineViewBecauseOfSize=Hi(this,n=>this._options.read(n).renderSideBySide&&this._diffEditorWidth.read(n)<=this._options.read(n).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=Hi(this,n=>this._options.read(n).renderOverviewRuler),this.renderSideBySide=Hi(this,n=>this._options.read(n).renderSideBySide&&!(this._options.read(n).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(n))),this.readOnly=Hi(this,n=>this._options.read(n).readOnly),this.shouldRenderRevertArrows=Hi(this,n=>!(!this._options.read(n).renderMarginRevertIcon||!this.renderSideBySide.read(n)||this.readOnly.read(n))),this.renderIndicators=Hi(this,n=>this._options.read(n).renderIndicators),this.enableSplitViewResizing=Hi(this,n=>this._options.read(n).enableSplitViewResizing),this.splitViewDefaultRatio=Hi(this,n=>this._options.read(n).splitViewDefaultRatio),this.ignoreTrimWhitespace=Hi(this,n=>this._options.read(n).ignoreTrimWhitespace),this.maxComputationTimeMs=Hi(this,n=>this._options.read(n).maxComputationTime),this.showMoves=Hi(this,n=>this._options.read(n).experimental.showMoves&&this.renderSideBySide.read(n)),this.isInEmbeddedEditor=Hi(this,n=>this._options.read(n).isInEmbeddedEditor),this.diffWordWrap=Hi(this,n=>this._options.read(n).diffWordWrap),this.originalEditable=Hi(this,n=>this._options.read(n).originalEditable),this.diffCodeLens=Hi(this,n=>this._options.read(n).diffCodeLens),this.accessibilityVerbose=Hi(this,n=>this._options.read(n).accessibilityVerbose),this.diffAlgorithm=Hi(this,n=>this._options.read(n).diffAlgorithm),this.showEmptyDecorations=Hi(this,n=>this._options.read(n).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=Hi(this,n=>this._options.read(n).onlyShowAccessibleDiffViewer),this.hideUnchangedRegions=Hi(this,n=>this._options.read(n).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=Hi(this,n=>this._options.read(n).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=Hi(this,n=>this._options.read(n).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=Hi(this,n=>this._options.read(n).hideUnchangedRegions.minimumLineCount);let t={...e,...jot(e,oc)};this._options=kn(this,t)}updateOptions(e){let t=jot(e,this._options.get()),n={...this._options.get(),...e,...t};this._options.set(n,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}}});var dQ,iA,Got=P(()=>{Qt();Pv();Go();nt();Is();sh();Kt();Ca();Wt();dQ=class extends ue{constructor(e,t,n,o){super(),this._editors=e,this._diffModel=t,this._options=n,this._widget=o;let r=[],s=Hi(this,a=>{let l=this._diffModel.read(a),c=l?.diff.read(a);if(!c)return r;let d=this._editors.modifiedSelections.read(a);if(d.every(p=>p.isEmpty()))return r;let u=new _m(d.map(p=>rn.fromRangeInclusive(p))),f=c.mappings.filter(p=>p.lineRangeMapping.innerChanges&&u.intersects(p.lineRangeMapping.modified)).map(p=>({mapping:p,rangeMappings:p.lineRangeMapping.innerChanges.filter(m=>d.some(y=>O.areIntersecting(m.modifiedRange,y)))}));return f.length===0||f.every(p=>p.rangeMappings.length===0)?r:f});this._register(Rl((a,l)=>{let c=this._diffModel.read(a),d=c?.diff.read(a);if(!c||!d||this._diffModel.read(a).movedTextToCompare.read(a)||!this._options.shouldRenderRevertArrows.read(a))return;let h=[],f=s.read(a),p=new Set(f.map(m=>m.mapping));if(f.length>0){let m=this._editors.modifiedSelections.read(a),y=l.add(new iA(m[m.length-1].positionLineNumber,this._widget,f.flatMap(_=>_.rangeMappings),!0));this._editors.modified.addGlyphMarginWidget(y),h.push(y)}for(let m of d.mappings)if(!p.has(m)&&!m.lineRangeMapping.modified.isEmpty&&m.lineRangeMapping.innerChanges){let y=l.add(new iA(m.lineRangeMapping.modified.startLineNumber,this._widget,m.lineRangeMapping.innerChanges,!1));this._editors.modified.addGlyphMarginWidget(y),h.push(y)}l.add(Yt(()=>{for(let m of h)this._editors.modified.removeGlyphMarginWidget(m)}))}))}},iA=class i extends ue{getId(){return this._id}constructor(e,t,n,o){super(),this._lineNumber=e,this._widget=t,this._diffs=n,this._selection=o,this._id=`revertButton${i.counter++}`,this._domNode=Do("div.revertButton",{title:this._selection?g("revertSelectedChanges","Revert Selected Changes"):g("revertChange","Revert Change")},[Bx(kt.arrowRight)]).root,this._register(Xe(this._domNode,Lt.MOUSE_DOWN,r=>{r.button!==2&&(r.stopPropagation(),r.preventDefault())})),this._register(Xe(this._domNode,Lt.MOUSE_UP,r=>{r.stopPropagation(),r.preventDefault()})),this._register(Xe(this._domNode,Lt.CLICK,r=>{this._widget.revertRangeMappings(this._diffs),r.stopPropagation(),r.preventDefault()}))}getDomNode(){return this._domNode}getPosition(){return{lane:lu.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}};iA.counter=0});function nRt(i){return i.mappings.map(e=>{let t=e.lineRangeMapping,n,o,r,s,a=t.innerChanges;return t.original.isEmpty?(n=t.original.startLineNumber-1,o=0,a=void 0):(n=t.original.startLineNumber,o=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(r=t.modified.startLineNumber-1,s=0,a=void 0):(r=t.modified.startLineNumber,s=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:n,originalEndLineNumber:o,modifiedStartLineNumber:r,modifiedEndLineNumber:s,charChanges:a?.map(l=>({originalStartLineNumber:l.originalRange.startLineNumber,originalStartColumn:l.originalRange.startColumn,originalEndLineNumber:l.originalRange.endLineNumber,originalEndColumn:l.originalRange.endColumn,modifiedStartLineNumber:l.modifiedRange.startLineNumber,modifiedStartColumn:l.modifiedRange.startColumn,modifiedEndLineNumber:l.modifiedRange.endLineNumber,modifiedEndColumn:l.modifiedRange.endColumn}))}})}var iRt,nA,jm,uQ=P(()=>{Qt();rh();Pi();Xt();nt();Is();KN();bot();an();fs();p7();IM();Sot();Tot();Iot();d6e();Vot();i6e();m6e();kp();Mi();Kt();dI();Co();s8();Xi();_i();Ix();xp();Wot();$ot();qot();p6e();Got();iRt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},nA=function(i,e){return function(t,n){e(t,n,i)}},jm=class extends tA{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,t,n,o,r,s,a,l){var c;super(),this._domElement=e,this._parentContextKeyService=o,this._parentInstantiationService=r,this._audioCueService=a,this._editorProgressService=l,this.elements=Do("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[Do("div.noModificationsOverlay@overlay",{style:{position:"absolute",height:"100%",visibility:"hidden"}},[pt("span",{},"No Changes")]),Do("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),Do("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),Do("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModel=kn(this,void 0),this._shouldDisposeDiffModel=!1,this.onDidChangeModel=Et.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._parentInstantiationService.createChild(new wp([ri,this._contextKeyService])),this._boundarySashes=kn(this,void 0),this._accessibleDiffViewerShouldBeVisible=kn(this,!1),this._accessibleDiffViewerVisible=Hi(this,C=>this._options.onlyShowAccessibleDiffViewer.read(C)?!0:this._accessibleDiffViewerShouldBeVisible.read(C)),this._movedBlocksLinesPart=kn(this,void 0),this._layoutInfo=Hi(this,C=>{var w,S,x,k,D;let E=this._rootSizeObserver.width.read(C),A=this._rootSizeObserver.height.read(C),T=(w=this._sash.read(C))===null||w===void 0?void 0:w.sashLeft.read(C),L=T??Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),I=E-L-((x=(S=this._overviewRulerPart.read(C))===null||S===void 0?void 0:S.width)!==null&&x!==void 0?x:0),M=(D=(k=this._movedBlocksLinesPart.read(C))===null||k===void 0?void 0:k.width.read(C))!==null&&D!==void 0?D:0,N=L-M;return this.elements.original.style.width=N+"px",this.elements.original.style.left="0px",this.elements.modified.style.width=I+"px",this.elements.modified.style.left=L+"px",this._editors.original.layout({width:N,height:A},!0),this._editors.modified.layout({width:I,height:A},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((C,w)=>C?.diff.read(w)),this.onDidUpdateDiff=Et.fromObservableLight(this._diffValue),s.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(Yt(()=>this._domElement.removeChild(this.elements.root))),this._rootSizeObserver=this._register(new OS(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout((c=t.automaticLayout)!==null&&c!==void 0?c:!1),this._options=new cQ(t),this._register(Ln(C=>{this._options.setWidth(this._rootSizeObserver.width.read(C))})),this._contextKeyService.createKey(re.isEmbeddedDiffEditor.key,!1),this._register(ZN(re.isEmbeddedDiffEditor,this._contextKeyService,C=>this._options.isInEmbeddedEditor.read(C))),this._register(ZN(re.comparingMovedCode,this._contextKeyService,C=>{var w;return!!(!((w=this._diffModel.read(C))===null||w===void 0)&&w.movedTextToCompare.read(C))})),this._register(ZN(re.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,C=>this._options.couldShowInlineViewBecauseOfSize.read(C))),this._register(ZN(re.hasChanges,this._contextKeyService,C=>{var w,S,x;return((x=(S=(w=this._diffModel.read(C))===null||w===void 0?void 0:w.diff.read(C))===null||S===void 0?void 0:S.mappings.length)!==null&&x!==void 0?x:0)>0})),this._editors=this._register(this._instantiationService.createInstance(lQ,this.elements.original,this.elements.modified,this._options,n,(C,w,S,x)=>this._createInnerEditor(C,w,S,x))),this._overviewRulerPart=W2(this,C=>this._options.renderOverviewRuler.read(C)?this._instantiationService.createInstance(v1(U4,C),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(w=>w.modifiedEditor)):void 0).recomputeInitiallyAndOnChange(this._store),this._sash=W2(this,C=>{let w=this._options.renderSideBySide.read(C);return this.elements.root.classList.toggle("side-by-side",w),w?new eQ(this._options,this.elements.root,{height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((S,x)=>{var k,D;return S-((D=(k=this._overviewRulerPart.read(x))===null||k===void 0?void 0:k.width)!==null&&D!==void 0?D:0)})},this._boundarySashes):void 0}).recomputeInitiallyAndOnChange(this._store);let d=W2(this,C=>this._instantiationService.createInstance(v1(m7,C),this._editors,this._diffModel,this._options)).recomputeInitiallyAndOnChange(this._store);W2(this,C=>this._instantiationService.createInstance(v1(JX,C),this._editors,this._diffModel,this._options,this)).recomputeInitiallyAndOnChange(this._store);let u=new Set,h=new Set,f=!1,p=W2(this,C=>this._instantiationService.createInstance(v1(aQ,C),pi(this._domElement),this._editors,this._diffModel,this._options,this,()=>f||d.get().isUpdatingHiddenAreas,u,h)).recomputeInitiallyAndOnChange(this._store),m=Hi(this,C=>{let w=p.read(C).viewZones.read(C).orig,S=d.read(C).viewZones.read(C).origViewZones;return w.concat(S)}),y=Hi(this,C=>{let w=p.read(C).viewZones.read(C).mod,S=d.read(C).viewZones.read(C).modViewZones;return w.concat(S)});this._register(HS(this._editors.original,m,C=>{f=C},u));let _;this._register(HS(this._editors.modified,y,C=>{f=C,f?_=xu.capture(this._editors.modified):(_?.restore(this._editors.modified),_=void 0)},h)),this._accessibleDiffViewer=W2(this,C=>this._instantiationService.createInstance(v1(V4,C),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(w,S)=>this._accessibleDiffViewerShouldBeVisible.set(w,S),this._options.onlyShowAccessibleDiffViewer.map(w=>!w),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((w,S)=>{var x;return(x=w?.diff.read(S))===null||x===void 0?void 0:x.mappings.map(k=>k.lineRangeMapping)}),this._editors)).recomputeInitiallyAndOnChange(this._store);let v=this._accessibleDiffViewerVisible.map(C=>C?"hidden":"visible");this._register(Sp(this.elements.modified,{visibility:v})),this._register(Sp(this.elements.original,{visibility:v})),this._createDiffEditorContributions(),s.addDiffEditor(this),this._register($2(this._layoutInfo)),W2(this,C=>new(v1(W4,C))(this.elements.root,this._diffModel,this._layoutInfo.map(w=>w.originalEditor),this._layoutInfo.map(w=>w.modifiedEditor),this._editors)).recomputeInitiallyAndOnChange(this._store,C=>{this._movedBlocksLinesPart.set(C,void 0)}),this._register(Sp(this.elements.overlay,{width:this._layoutInfo.map((C,w)=>C.originalEditor.width+(this._options.renderSideBySide.read(w)?0:C.modifiedEditor.width)),visibility:Hi(C=>{var w,S;return this._options.hideUnchangedRegions.read(C)&&((S=(w=this._diffModel.read(C))===null||w===void 0?void 0:w.diff.read(C))===null||S===void 0?void 0:S.mappings.length)===0?"visible":"hidden"})})),this._register(Et.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,C=>{var w,S;if(C?.reason===3){let x=(S=(w=this._diffModel.get())===null||w===void 0?void 0:w.diff.get())===null||S===void 0?void 0:S.mappings.find(k=>k.lineRangeMapping.modified.contains(C.position.lineNumber));x?.lineRangeMapping.modified.isEmpty?this._audioCueService.playAudioCue(Cn.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):x?.lineRangeMapping.original.isEmpty?this._audioCueService.playAudioCue(Cn.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):x&&this._audioCueService.playAudioCue(Cn.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}));let b=this._diffModel.map(this,(C,w)=>{if(C)return C.diff.read(w)===void 0&&!C.isDiffUpToDate.read(w)});this._register(Rl((C,w)=>{if(b.read(C)===!0){let S=this._editorProgressService.show(!0,1e3);w.add(Yt(()=>S.done()))}})),this._register(Yt(()=>{var C;this._shouldDisposeDiffModel&&((C=this._diffModel.get())===null||C===void 0||C.dispose())})),this._register(new dQ(this._editors,this._diffModel,this._options,this))}_createInnerEditor(e,t,n,o){return e.createInstance(S4,t,n,o)}_createDiffEditorContributions(){let e=j3.getDiffEditorContributions();for(let t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(n){hi(n)}}get _targetEditor(){return this._editors.modified}getEditorType(){return s4.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var e;let t=this._editors.original.saveViewState(),n=this._editors.modified.saveViewState();return{original:t,modified:n,modelState:(e=this._diffModel.get())===null||e===void 0?void 0:e.serializeState()}}restoreViewState(e){var t;if(e&&e.original&&e.modified){let n=e;this._editors.original.restoreViewState(n.original),this._editors.modified.restoreViewState(n.modified),n.modelState&&((t=this._diffModel.get())===null||t===void 0||t.restoreSerializedState(n.modelState))}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(nQ,e,this._options)}getModel(){var e,t;return(t=(e=this._diffModel.get())===null||e===void 0?void 0:e.model)!==null&&t!==void 0?t:null}setModel(e,t){!e&&this._diffModel.get()&&this._accessibleDiffViewer.get().close();let n=e?"model"in e?{model:e,shouldDispose:!1}:{model:this.createViewModel(e),shouldDispose:!0}:void 0;this._diffModel.get()!==n?.model&&V2(t,o=>{var r;Ao.batchEventsGlobally(o,()=>{this._editors.original.setModel(n?n.model.model.original:null),this._editors.modified.setModel(n?n.model.model.modified:null)});let s=this._diffModel.get(),a=this._shouldDisposeDiffModel;this._shouldDisposeDiffModel=(r=n?.shouldDispose)!==null&&r!==void 0?r:!1,this._diffModel.set(n?.model,o),a&&s?.dispose()})}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var e;let t=(e=this._diffModel.get())===null||e===void 0?void 0:e.diff.get();return t?nRt(t):null}revert(e){if(e.innerChanges){this.revertRangeMappings(e.innerChanges);return}let t=this._diffModel.get();!t||!t.isDiffUpToDate.get()||this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:t.model.original.getValueInRange(e.original.toExclusiveRange())}])}revertRangeMappings(e){let t=this._diffModel.get();if(!t||!t.isDiffUpToDate.get())return;let n=e.map(o=>({range:o.modifiedRange,text:t.model.original.getValueInRange(o.originalRange)}));this._editors.modified.executeEdits("diffEditor",n)}_goTo(e){this._editors.modified.setPosition(new ke(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){var t,n,o,r;let s=(n=(t=this._diffModel.get())===null||t===void 0?void 0:t.diff.get())===null||n===void 0?void 0:n.mappings;if(!s||s.length===0)return;let a=this._editors.modified.getPosition().lineNumber,l;e==="next"?l=(o=s.find(c=>c.lineRangeMapping.modified.startLineNumber>a))!==null&&o!==void 0?o:s[0]:l=(r=o4(s,c=>c.lineRangeMapping.modified.startLineNumber{var t;let n=(t=e.diff.get())===null||t===void 0?void 0:t.mappings;!n||n.length===0||this._goTo(n[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){let e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){var e,t;let n=this._editors.modified.hasWidgetFocus(),o=n?this._editors.modified:this._editors.original,r=n?this._editors.original:this._editors.modified,s,a=o.getSelection();if(a){let l=(t=(e=this._diffModel.get())===null||e===void 0?void 0:e.diff.get())===null||t===void 0?void 0:t.mappings.map(c=>n?c.lineRangeMapping.flip():c.lineRangeMapping);if(l){let c=j4e(a.getStartPosition(),l),d=j4e(a.getEndPosition(),l);s=O.plusRange(c,d)}}return{destination:r,destinationSelection:s}}switchSide(){let{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){let e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){var e;let t=(e=this._diffModel.get())===null||e===void 0?void 0:e.unchangedRegions.get();t&&lo(n=>{for(let o of t)o.collapseAll(n)})}showAllUnchangedRegions(){var e;let t=(e=this._diffModel.get())===null||e===void 0?void 0:e.unchangedRegions.get();t&&lo(n=>{for(let o of t)o.showAll(n)})}};jm=iRt([nA(3,ri),nA(4,qt),nA(5,tn),nA(6,_h),nA(7,mh)],jm)});function rRt(i){if(!i){if(Kot)return;Kot=!0}$Ke(i||Hn.document.body)}function v6e(i,e,t,n,o){if(t=t||"",!n){let r=t.indexOf(` +`),s=t;return r!==-1&&(s=t.substring(0,r)),Yot(i,t,e.createByFilepathOrFirstLine(o||null,s),o)}return Yot(i,t,e.createById(n),o)}function Yot(i,e,t,n){return i.createModel(e,t,n)}var g6e,Hr,oRt,Kot,hQ,fQ,pQ,Zot=P(()=>{Xl();nt();fs();IM();vpe();VX();l7();Dr();$o();er();Xi();Id();_i();vs();ic();No();Yh();I2();F4();xp();Dc();Ha();Xme();Zf();Kr();Yn();uQ();s8();_l();g6e=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Hr=function(i,e){return function(t,n){e(t,n,i)}},oRt=0,Kot=!1;hQ=class extends S4{constructor(e,t,n,o,r,s,a,l,c,d,u,h){let f={...t};f.ariaLabel=f.ariaLabel||ZM.editorViewAccessibleLabel,f.ariaLabel=f.ariaLabel+";"+ZM.accessibilityHelpMessage,super(e,f,{},n,o,r,s,l,c,d,u,h),a instanceof a8?this._standaloneKeybindingService=a:this._standaloneKeybindingService=null,rRt(f.ariaContainerElement)}addCommand(e,t,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;let o="DYNAMIC_"+ ++oRt,r=mt.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(o,e,t,r),o}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),ue.None;let t=e.id,n=e.label,o=mt.and(mt.equals("editorId",this.getId()),mt.deserialize(e.precondition)),r=e.keybindings,s=mt.and(o,mt.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=(f,...p)=>Promise.resolve(e.run(this,...p)),d=new Ye,u=this.getId()+":"+t;if(d.add(Zi.registerCommand(u,c)),a){let f={command:{id:u,title:n},when:o,group:a,order:l};d.add(ps.appendMenuItem(ne.EditorContext,f))}if(Array.isArray(r))for(let f of r)d.add(this._standaloneKeybindingService.addDynamicKeybinding(u,f,c,s));let h=new ux(u,n,n,void 0,o,(...f)=>Promise.resolve(e.run(this,...f)),this._contextKeyService);return this._actions.set(t,h),d.add(Yt(()=>{this._actions.delete(t)})),d}_triggerCommand(e,t){if(this._codeEditorService instanceof MM)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};hQ=g6e([Hr(2,qt),Hr(3,tn),Hr(4,eo),Hr(5,ri),Hr(6,fn),Hr(7,Mo),Hr(8,xo),Hr(9,Ba),Hr(10,An),Hr(11,Rt)],hQ);fQ=class extends hQ{constructor(e,t,n,o,r,s,a,l,c,d,u,h,f,p,m){let y={...t};WN(d,y,!1);let _=l.registerEditorContainer(e);typeof y.theme=="string"&&l.setTheme(y.theme),typeof y.autoDetectHighContrast<"u"&&l.setAutoDetectHighContrast(!!y.autoDetectHighContrast);let v=y.model;delete y.model,super(e,y,n,o,r,s,a,l,c,u,p,m),this._configurationService=d,this._standaloneThemeService=l,this._register(_);let b;if(typeof v>"u"){let C=f.getLanguageIdByMimeType(y.language)||y.language||ra;b=v6e(h,f,y.value||"",C,void 0),this._ownsModel=!0}else b=v,this._ownsModel=!1;if(this._attachModel(b),b){let C={oldModelUrl:null,newModelUrl:b.uri};this._onDidChangeModel.fire(C)}}dispose(){super.dispose()}updateOptions(e){WN(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};fQ=g6e([Hr(2,qt),Hr(3,tn),Hr(4,eo),Hr(5,ri),Hr(6,fn),Hr(7,sc),Hr(8,xo),Hr(9,Ni),Hr(10,Ba),Hr(11,no),Hr(12,Kn),Hr(13,An),Hr(14,Rt)],fQ);pQ=class extends jm{constructor(e,t,n,o,r,s,a,l,c,d,u,h){let f={...t};WN(l,f,!0);let p=s.registerEditorContainer(e);typeof f.theme=="string"&&s.setTheme(f.theme),typeof f.autoDetectHighContrast<"u"&&s.setAutoDetectHighContrast(!!f.autoDetectHighContrast),super(e,f,{},o,n,r,h,d),this._configurationService=l,this._standaloneThemeService=s,this._register(p)}dispose(){super.dispose()}updateOptions(e){WN(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,t,n){return e.createInstance(hQ,t,n)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,n){return this.getModifiedEditor().addCommand(e,t,n)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};pQ=g6e([Hr(2,qt),Hr(3,ri),Hr(4,tn),Hr(5,sc),Hr(6,xo),Hr(7,Ni),Hr(8,ca),Hr(9,mh),Hr(10,Pd),Hr(11,_h)],pQ)});var Xot=P(()=>{});var Qot=P(()=>{});var mQ,oA,Jot=P(()=>{u1();D2e();Ra();Go();or();Xt();nt();Qot();Wt();mQ=class extends ue{constructor(e,t,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new oW),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new Ye),this.options=n,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new oA(()=>{var o;return(o=this.toggleMenuActionViewItem)===null||o===void 0?void 0:o.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new Bs(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,highlightToggledItems:n.highlightToggledItems,actionViewItemProvider:(o,r)=>{var s;if(o.id===oA.ID)return this.toggleMenuActionViewItem=new Kv(o,o.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:ui.asClassNameArray((s=n.moreIcon)!==null&&s!==void 0?s:kt.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){let a=n.actionViewItemProvider(o,r);if(a)return a}if(o instanceof Wf){let a=new Kv(o,o.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:o.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return a.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(a),this.disposables.add(this._onDidChangeDropdownVisibility.add(a.onDidChangeVisibility)),a}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();let n=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),n.push(this.toggleMenuAction)),n.forEach(o=>{this.actionBar.push(o,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(o)})})}getKeybindingLabel(e){var t,n,o;let r=this.lookupKeybindings?(n=(t=this.options).getKeyBinding)===null||n===void 0?void 0:n.call(t,e):void 0;return(o=r?.getLabel())!==null&&o!==void 0?o:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}},oA=class i extends zs{constructor(e,t){t=t||g("moreActions","More Actions..."),super(i.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}};oA.ID="toolbar.toggle.more"});var ert,j2,rA,gQ,_6e=P(()=>{Qt();Uh();Jot();Ra();Vi();F2e();Pi();Xt();Yc();nt();Wt();Kb();Dr();Xi();Id();vs();$f();ert=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},j2=function(i,e){return function(t,n){e(t,n,i)}},rA=class extends mQ{constructor(e,t,n,o,r,s,a){super(e,r,{getKeyBinding:c=>{var d;return(d=s.lookupKeybinding(c.id))!==null&&d!==void 0?d:void 0},...t,allowContextMenu:!0,skipTelemetry:typeof t?.telemetrySource=="string"}),this._options=t,this._menuService=n,this._contextKeyService=o,this._contextMenuService=r,this._sessionDisposables=this._store.add(new Ye);let l=t?.telemetrySource;l&&this._store.add(this.actionBar.onDidRun(c=>a.publicLog2("workbenchActionExecuted",{id:c.action.id,from:l})))}setActions(e,t=[],n){var o,r,s;this._sessionDisposables.clear();let a=e.slice(),l=t.slice(),c=[],d=0,u=[],h=!1;if(((o=this._options)===null||o===void 0?void 0:o.hiddenItemStrategy)!==-1)for(let f=0;fy?.id)),p=this._options.overflowBehavior.maxItems-f.size,m=0;for(let y=0;y=p&&(a[y]=void 0,u[y]=_))}}Mde(a),Mde(u),super.setActions(a,zr.join(u,l)),c.length>0&&this._sessionDisposables.add(Xe(this.getElement(),"contextmenu",f=>{var p,m,y,_,v;let b=new Oa(pi(this.getElement()),f),C=this.getItemAction(b.target);if(!C)return;b.preventDefault(),b.stopPropagation();let w=!1;if(d===1&&((p=this._options)===null||p===void 0?void 0:p.hiddenItemStrategy)===0){w=!0;for(let k=0;kthis._menuService.resetHiddenStates(n)}))),this._contextMenuService.showContextMenu({getAnchor:()=>b,getActions:()=>x,menuId:(y=this._options)===null||y===void 0?void 0:y.contextMenu,menuActionOptions:{renderShortTitle:!0,...(_=this._options)===null||_===void 0?void 0:_.menuOptions},skipTelemetry:typeof((v=this._options)===null||v===void 0?void 0:v.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};rA=ert([j2(2,Mc),j2(3,ri),j2(4,ca),j2(5,fn),j2(6,Fs)],rA);gQ=class extends rA{constructor(e,t,n,o,r,s,a,l){super(e,{resetMenu:t,...n},o,r,s,a,l),this._onDidChangeMenuItems=this._store.add(new ge);let c=this._store.add(o.createMenu(t,r,{emitEventsForSubmenuChanges:!0})),d=()=>{var u,h,f;let p=[],m=[];lS(c,n?.menuOptions,{primary:p,secondary:m},(u=n?.toolbarOptions)===null||u===void 0?void 0:u.primaryGroup,(h=n?.toolbarOptions)===null||h===void 0?void 0:h.shouldInlineSubmenu,(f=n?.toolbarOptions)===null||f===void 0?void 0:f.useSeparatorsInPrimaryActions),e.classList.toggle("has-no-actions",p.length===0&&m.length===0),super.setActions(p,m)};this._store.add(c.onDidChange(()=>{d(),this._onDidChangeMenuItems.fire(this)})),d()}setActions(){throw new fo("This toolbar is populated from a menu.")}};gQ=ert([j2(3,Mc),j2(4,ri),j2(5,ca),j2(6,fn),j2(7,Fs)],gQ)});var vQ,trt=P(()=>{Ra();vQ=class extends Qu{constructor(e){super(),this._getContext=e}runAction(e,t){return super.runAction(e,this._getContext())}}});function irt(i){return Ao(e=>{let t=new Ye;return t.add(i.onDidFocusEditorWidget(()=>e(!0))),t.add(i.onDidBlurEditorWidget(()=>e(!1))),t},()=>i.hasWidgetFocus())}var sRt,aRt,_Q,VS,b6e=P(()=>{Qt();fX();Go();nt();Is();d8();uQ();_6e();Dr();_i();trt();sRt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},aRt=function(i,e){return function(t,n){e(t,n,i)}},_Q=class{constructor(e){this.viewModel=e}getId(){return this.viewModel}},VS=class extends ue{constructor(e,t,n,o){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=n,this._instantiationService=o,this._viewModel=kn(this,void 0),this._collapsed=Hi(this,s=>{var a;return(a=this._viewModel.read(s))===null||a===void 0?void 0:a.collapsed.read(s)}),this._editorContentHeight=kn(this,500),this.contentHeight=Hi(this,s=>(this._collapsed.read(s)?0:this._editorContentHeight.read(s))+this._outerEditorHeight),this._modifiedContentWidth=kn(this,0),this._modifiedWidth=kn(this,0),this._originalContentWidth=kn(this,0),this._originalWidth=kn(this,0),this.maxScroll=Hi(this,s=>{let a=this._modifiedContentWidth.read(s)-this._modifiedWidth.read(s),l=this._originalContentWidth.read(s)-this._originalWidth.read(s);return a>l?{maxScroll:a,width:this._modifiedWidth.read(s)}:{maxScroll:l,width:this._originalWidth.read(s)}}),this._elements=Do("div.multiDiffEntry",[Do("div.header@header",[Do("div.collapse-button@collapseButton"),Do("div.file-path",[Do("div.title.modified.show-file-icons@primaryPath",[]),Do("div.status.deleted@status",["R"]),Do("div.title.original.show-file-icons@secondaryPath",[])]),Do("div.actions@actions")]),Do("div.editorParent",[Do("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(jm,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=irt(this.editor.getModifiedEditor()),this.isOriginalFocused=irt(this.editor.getOriginalEditor()),this.isFocused=Hi(this,s=>this.isModifedFocused.read(s)||this.isOriginalFocused.read(s)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=new Ye,this._headerHeight=38;let r=new z4(this._elements.collapseButton,{});this._register(Ln(s=>{r.element.className="",r.icon=this._collapsed.read(s)?kt.chevronRight:kt.chevronDown})),this._register(r.onDidClick(()=>{var s;(s=this._viewModel.get())===null||s===void 0||s.collapsed.set(!this._collapsed.get(),void 0)})),this._register(Ln(s=>{this._elements.editor.style.display=this._collapsed.read(s)?"none":"block"})),this.editor.getModifiedEditor().onDidLayoutChange(s=>{let a=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(a,void 0)}),this.editor.getOriginalEditor().onDidLayoutChange(s=>{let a=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(a,void 0)}),this._register(this.editor.onDidContentSizeChange(s=>{NS(a=>{this._editorContentHeight.set(s.contentHeight,a),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),a),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),a)})})),this._register(Ln(s=>{let a=this.isFocused.read(s);this._elements.root.classList.toggle("focused",a)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=38,this._register(this._instantiationService.createInstance(gQ,this._elements.actions,ne.MultiDiffEditorFileToolbar,{actionRunner:this._register(new vQ(()=>{var s;return(s=this._viewModel.get())===null||s===void 0?void 0:s.modifiedUri})),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:s=>s.startsWith("navigation")}}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){function t(o){return{...o,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}let n=e.viewModel.entry.value;n.onOptionsDidChange&&this._dataStore.add(n.onOptionsDidChange(()=>{var o;this.editor.updateOptions(t((o=n.options)!==null&&o!==void 0?o:{}))})),NS(o=>{var r,s,a,l;(r=this._resourceLabel)===null||r===void 0||r.setUri((s=e.viewModel.modifiedUri)!==null&&s!==void 0?s:e.viewModel.originalUri,{strikethrough:e.viewModel.modifiedUri===void 0});let c=!1,d=!1,u=!1,h="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(h="R",c=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(h="A",u=!0):(h="D",d=!0),this._elements.status.classList.toggle("renamed",c),this._elements.status.classList.toggle("deleted",d),this._elements.status.classList.toggle("added",u),this._elements.status.innerText=h,(a=this._resourceLabel2)===null||a===void 0||a.setUri(c?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,o),this.editor.setModel(e.viewModel.diffEditorViewModel,o),this.editor.updateOptions(t((l=n.options)!==null&&l!==void 0?l:{}))})}render(e,t,n,o){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${t}px`,this._elements.root.style.position="absolute";let r=Math.max(0,Math.min(e.length-this._headerHeight,o.start-e.start));this._elements.header.style.transform=`translateY(${r}px)`,NS(s=>{this.editor.layout({width:t,height:e.length-this._outerEditorHeight})}),this.editor.getOriginalEditor().setScrollTop(n),this._elements.header.classList.toggle("shadow",r>0||n>0)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};VS=sRt([aRt(3,qt)],VS)});var bQ,nrt=P(()=>{bQ=class{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){var t;let n;if(this._unused.size===0)n=this._create(e),this._itemData.set(n,e);else{let o=[...this._unused.values()];n=(t=o.find(r=>this._itemData.get(r).getId()===e.getId()))!==null&&t!==void 0?t:o[0],this._unused.delete(n),this._itemData.set(n,e),n.setData(e)}return this._used.add(n),{object:n,dispose:()=>{this._used.delete(n),this._unused.size>5?n.dispose():this._unused.add(n)}}}dispose(){for(let e of this._used)e.dispose();for(let e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}});var lRt,ort,yQ,y6e,rrt=P(()=>{Qt();o1();rh();nt();Is();d8();Jw();Xot();kp();Xf();_i();b6e();nrt();Xi();Ix();Co();zo();lRt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},ort=function(i,e){return function(t,n){e(t,n,i)}},yQ=class extends ue{constructor(e,t,n,o,r,s){super(),this._element=e,this._dimension=t,this._viewModel=n,this._workbenchUIElementFactory=o,this._parentContextKeyService=r,this._parentInstantiationService=s,this._elements=Do("div.monaco-component.multiDiffEditor",[Do("div@content",{style:{overflow:"hidden"}}),Do("div.monaco-editor@overflowWidgetsDomNode",{})]),this._sizeObserver=this._register(new OS(this._element,void 0)),this._objectPool=this._register(new bQ(l=>{let c=this._instantiationService.createInstance(VS,this._elements.content,this._elements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return c.setData(l),c})),this._scrollable=this._register(new n1({forceIntegerValues:!1,scheduleAtNextAnimationFrame:l=>za(pi(this._element),l),smoothScrollDuration:100})),this._scrollableElement=this._register(new c2(this._elements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this.scrollTop=Ao(this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=Ao(this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItems=g1(this,(l,c)=>{let d=this._viewModel.read(l);return d?d.items.read(l).map(h=>{var f;let p=c.add(new y6e(h,this._objectPool,this.scrollLeft)),m=(f=this._lastDocStates)===null||f===void 0?void 0:f[p.getKey()];return m&&lo(y=>{p.setViewState(m,y)}),p}):[]}),this._spaceBetweenPx=10,this._totalHeight=this._viewItems.map(this,(l,c)=>l.reduce((d,u)=>d+u.contentHeight.read(c)+this._spaceBetweenPx,0)),this.activeDiffItem=Hi(this,l=>this._viewItems.read(l).find(c=>{var d;return(d=c.template.read(l))===null||d===void 0?void 0:d.isFocused.read(l)})),this.lastActiveDiffItem=W4e((l,c)=>{var d;return(d=this.activeDiffItem.read(l))!==null&&d!==void 0?d:c}),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._parentInstantiationService.createChild(new wp([ri,this._contextKeyService])),this._lastDocStates={},this._contextKeyService.createKey(re.inMultiDiffEditor.key,!0),this._register(Rl((l,c)=>{let d=this._viewModel.read(l);if(d&&d.contextKeys)for(let[u,h]of Object.entries(d.contextKeys)){let f=this._contextKeyService.createKey(u,void 0);f.set(h),c.add(Yt(()=>f.reset()))}}));let a=this._parentContextKeyService.createKey(re.multiDiffEditorAllCollapsed.key,!1);this._register(Ln(l=>{let c=this._viewModel.read(l);if(c){let d=c.items.read(l).every(u=>u.collapsed.read(l));a.set(d)}})),this._register(Ln(l=>{let c=this.lastActiveDiffItem.read(l);lo(d=>{var u;(u=this._viewModel.read(l))===null||u===void 0||u.activeDiffItem.set(c?.viewModel,d)})})),this._register(Ln(l=>{let c=this._dimension.read(l);this._sizeObserver.observe(c)})),this._elements.content.style.position="relative",this._register(Ln(l=>{let c=this._sizeObserver.height.read(l);this._elements.root.style.height=`${c}px`;let d=this._totalHeight.read(l);this._elements.content.style.height=`${d}px`;let u=this._sizeObserver.width.read(l),h=u,f=this._viewItems.read(l),p=eI(f,m=>m.maxScroll.read(l).maxScroll);if(p){let m=p.maxScroll.read(l);h=u+m.maxScroll}this._scrollableElement.setScrollDimensions({width:u,height:c,scrollHeight:d,scrollWidth:h})})),e.replaceChildren(this._scrollableElement.getDomNode()),this._register(Yt(()=>{e.replaceChildren()})),this._register(this._register(Ln(l=>{NS(c=>{this.render(l)})})))}render(e){let t=this.scrollTop.read(e),n=0,o=0,r=0,s=this._sizeObserver.height.read(e),a=Pn.ofStartAndLength(t,s),l=this._sizeObserver.width.read(e);for(let c of this._viewItems.read(e)){let d=c.contentHeight.read(e),u=Math.min(d,s),h=Pn.ofStartAndLength(o,u),f=Pn.ofStartAndLength(r,d);if(f.isBefore(a))n-=d-u,c.hide();else if(f.isAfter(a))c.hide();else{let p=Math.max(0,Math.min(a.start-f.start,d-u));n-=p;let m=Pn.ofStartAndLength(t+n,s);c.render(h,p,l,m)}o+=u+this._spaceBetweenPx,r+=d+this._spaceBetweenPx}this._elements.content.style.transform=`translateY(${-(t+n)}px)`}};yQ=lRt([ort(4,ri),ort(5,qt)],yQ);y6e=class extends ue{constructor(e,t,n){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=n,this._templateRef=this._register(c8(this,void 0)),this.contentHeight=Hi(this,o=>{var r,s,a;return(a=(s=(r=this._templateRef.read(o))===null||r===void 0?void 0:r.object.contentHeight)===null||s===void 0?void 0:s.read(o))!==null&&a!==void 0?a:this.viewModel.lastTemplateData.read(o).contentHeight}),this.maxScroll=Hi(this,o=>{var r,s;return(s=(r=this._templateRef.read(o))===null||r===void 0?void 0:r.object.maxScroll.read(o))!==null&&s!==void 0?s:{maxScroll:0,scrollWidth:0}}),this.template=Hi(this,o=>{var r;return(r=this._templateRef.read(o))===null||r===void 0?void 0:r.object}),this._isHidden=kn(this,!1),this._register(Ln(o=>{var r;let s=this._scrollLeft.read(o);(r=this._templateRef.read(o))===null||r===void 0||r.object.setScrollLeft(s)})),this._register(Ln(o=>{let r=this._templateRef.read(o);!r||!this._isHidden.read(o)||r.object.isFocused.read(o)||this._clear()}))}dispose(){this._clear(),super.dispose()}toString(){var e;return`VirtualViewItem(${(e=this.viewModel.entry.value.modified)===null||e===void 0?void 0:e.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,t){var n;this.viewModel.collapsed.set(e.collapsed,t),this._updateTemplateData(t);let o=this.viewModel.lastTemplateData.get(),r=(n=e.selections)===null||n===void 0?void 0:n.map(jt.liftSelection);this.viewModel.lastTemplateData.set({...o,selections:r},t);let s=this._templateRef.get();s&&r&&s.object.editor.setSelections(r)}_updateTemplateData(e){var t;let n=this._templateRef.get();n&&this.viewModel.lastTemplateData.set({contentHeight:n.object.contentHeight.get(),selections:(t=n.object.editor.getSelections())!==null&&t!==void 0?t:void 0},e)}_clear(){let e=this._templateRef.get();e&&lo(t=>{this._updateTemplateData(t),e.object.hide(),this._templateRef.set(void 0,t)})}hide(){this._isHidden.set(!0,void 0)}render(e,t,n,o){this._isHidden.set(!1,void 0);let r=this._templateRef.get();if(!r){r=this._objectPool.getUnusedObj(new _Q(this.viewModel)),this._templateRef.set(r,void 0);let s=this.viewModel.lastTemplateData.get().selections;s&&r.object.editor.setSelections(s)}r.object.render(e,n,t,o)}}});var Iln,Mln,Nln,srt=P(()=>{Wt();pr();Iln=me("multiDiffEditor.headerBackground",{dark:"#808080",light:"#b4b4b4",hcDark:"#808080",hcLight:"#b4b4b4"},g("multiDiffEditor.headerBackground","The background color of the diff editor's header")),Mln=me("multiDiffEditor.background",{dark:"#000000",light:"#e5e5e5",hcDark:"#000000",hcLight:"#e5e5e5"},g("multiDiffEditor.background","The background color of the multi file diff editor")),Nln=me("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},g("multiDiffEditor.border","The border color of the multi file diff editor"))});var cRt,dRt,CQ,art=P(()=>{nt();Is();kp();rrt();_i();srt();b6e();cRt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},dRt=function(i,e){return function(t,n){e(t,n,i)}},CQ=class extends ue{constructor(e,t,n){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=n,this._dimension=kn(this,void 0),this._viewModel=kn(this,void 0),this._widgetImpl=g1(this,(o,r)=>(v1(VS,o),r.add(this._instantiationService.createInstance(v1(yQ,o),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory)))),this._register($2(this._widgetImpl))}};CQ=cRt([dRt(2,qt)],CQ)});function uRt(i,e,t){return Ki.initialize(t||{}).createInstance(fQ,i,e)}function hRt(i){return Ki.get(tn).onCodeEditorAdd(t=>{i(t)})}function fRt(i){return Ki.get(tn).onDiffEditorAdd(t=>{i(t)})}function pRt(){return Ki.get(tn).listCodeEditors()}function mRt(){return Ki.get(tn).listDiffEditors()}function gRt(i,e,t){return Ki.initialize(t||{}).createInstance(pQ,i,e)}function vRt(i,e){let t=Ki.initialize(e||{});return new CQ(i,{},t)}function _Rt(i){if(typeof i.id!="string"||typeof i.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return Zi.registerCommand(i.id,i.run)}function bRt(i){if(typeof i.id!="string"||typeof i.label!="string"||typeof i.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");let e=mt.deserialize(i.precondition),t=(o,...r)=>Jo.runEditorCommand(o,r,e,(s,a,l)=>Promise.resolve(i.run(a,...l))),n=new Ye;if(n.add(Zi.registerCommand(i.id,t)),i.contextMenuGroupId){let o={command:{id:i.id,title:i.label},when:e,group:i.contextMenuGroupId,order:i.contextMenuOrder||0};n.add(ps.appendMenuItem(ne.EditorContext,o))}if(Array.isArray(i.keybindings)){let o=Ki.get(fn);if(!(o instanceof a8))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{let r=mt.and(e,mt.deserialize(i.keybindingContext));n.add(o.addDynamicKeybindings(i.keybindings.map(s=>({keybinding:s,command:i.id,when:r}))))}}return n}function yRt(i){return lrt([i])}function lrt(i){let e=Ki.get(fn);return e instanceof a8?e.addDynamicKeybindings(i.map(t=>({keybinding:t.keybinding,command:t.command,commandArgs:t.commandArgs,when:mt.deserialize(t.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),ue.None)}function CRt(i,e,t){let n=Ki.get(Kn),o=n.getLanguageIdByMimeType(e)||e;return v6e(Ki.get(no),n,i,o,t)}function wRt(i,e){let t=Ki.get(Kn),n=t.getLanguageIdByMimeType(e)||e||ra;i.setLanguage(t.createById(n))}function xRt(i,e,t){i&&Ki.get(yu).changeOne(e,i.uri,t)}function SRt(i){Ki.get(yu).changeAll(i,[])}function kRt(i){return Ki.get(yu).read(i)}function LRt(i){return Ki.get(yu).onMarkerChanged(i)}function ERt(i){return Ki.get(no).getModel(i)}function DRt(){return Ki.get(no).getModels()}function TRt(i){return Ki.get(no).onModelAdded(i)}function IRt(i){return Ki.get(no).onModelRemoved(i)}function MRt(i){return Ki.get(no).onModelLanguageChanged(t=>{i({model:t.model,oldLanguage:t.oldLanguageId})})}function NRt(i){return IKe(Ki.get(no),Ki.get(An),i)}function ARt(i,e){let t=Ki.get(Kn),n=Ki.get(sc);return ww.colorizeElement(n,t,i,e).then(()=>{n.registerEditorContainer(i)})}function RRt(i,e,t){let n=Ki.get(Kn);return Ki.get(sc).registerEditorContainer(Hn.document.body),ww.colorize(n,i,e,t)}function PRt(i,e,t=4){return Ki.get(sc).registerEditorContainer(Hn.document.body),ww.colorizeModelLine(i,e,t)}function ORt(i){let e=Eo.get(i);return e||{getInitialState:()=>Kg,tokenize:(t,n,o)=>pw(i,o)}}function zRt(i,e){Eo.getOrCreate(e);let t=ORt(e),n=Ec(i),o=[],r=t.getInitialState();for(let s=0,a=n.length;s{var r;if(!n)return null;let s=(r=t.options)===null||r===void 0?void 0:r.selection,a;return s&&typeof s.endLineNumber=="number"&&typeof s.endColumn=="number"?a=s:s&&(a={lineNumber:s.startLineNumber,column:s.startColumn}),await i.openCodeEditor(n,t.resource,a)?n:null})}function crt(){return{create:uRt,getEditors:pRt,getDiffEditors:mRt,onDidCreateEditor:hRt,onDidCreateDiffEditor:fRt,createDiffEditor:gRt,addCommand:_Rt,addEditorAction:bRt,addKeybindingRule:yRt,addKeybindingRules:lrt,createModel:CRt,setModelLanguage:wRt,setModelMarkers:xRt,getModelMarkers:kRt,removeAllMarkers:SRt,onDidChangeMarkers:LRt,getModels:DRt,getModel:ERt,onDidCreateModel:TRt,onWillDisposeModel:IRt,onDidChangeModelLanguage:MRt,createWebWorker:NRt,colorizeElement:ARt,colorize:RRt,colorizeModelLine:PRt,tokenize:zRt,defineTheme:FRt,setTheme:HRt,remeasureFonts:BRt,registerCommand:VRt,registerLinkOpener:WRt,registerEditorOpener:URt,AccessibilitySupport:gW,ContentWidgetPositionPreference:wW,CursorChangeReason:xW,DefaultEndOfLine:SW,EditorAutoIndentStrategy:LW,EditorOption:EW,EndOfLinePreference:DW,EndOfLineSequence:TW,MinimapPosition:FW,MouseTargetType:HW,OverlayWidgetPositionPreference:BW,OverviewRulerLane:VW,GlyphMarginLane:IW,RenderLineNumbersType:UW,RenderMinimap:$W,ScrollbarVisibility:qW,ScrollType:jW,TextEditorCursorBlinkingStyle:QW,TextEditorCursorStyle:JW,TrackedRangeStickiness:eU,WrappingIndent:tU,InjectedTextCursorStops:NW,PositionAffinity:WW,ShowLightbulbIconMode:KW,ConfigurationChangedEvent:SC,BareFontInfo:g5,FontInfo:v5,TextModelResolvedOptions:J3,FindMatch:Ug,ApplyUpdateResult:y3,EditorZoom:Qc,createMultiFileDiffEditor:vRt,EditorType:s4,EditorOptions:nu}}var drt=P(()=>{_l();nt();Ri();Io();hqe();Zue();an();fs();MKe();Ks();BC();mU();dI();Pr();Ha();Kr();Zf();mw();Ca();Dc();iU();VKe();Zot();VX();l7();Dr();$o();Xi();vs();A2();sd();art()});function $Rt(i,e){if(!e||!Array.isArray(e))return!1;for(let t of e)if(!i(t))return!1;return!0}function wQ(i,e){return typeof i=="boolean"?i:e}function urt(i,e){return typeof i=="string"?i:e}function jRt(i){let e={};for(let t of i)e[t]=!0;return e}function hrt(i,e=!1){e&&(i=i.map(function(n){return n.toLowerCase()}));let t=jRt(i);return e?function(n){return t[n.toLowerCase()]!==void 0&&t.hasOwnProperty(n.toLowerCase())}:function(n){return t[n]!==void 0&&t.hasOwnProperty(n)}}function C6e(i,e){e=e.replace(/@@/g,"");let t=0,n;do n=!1,e=e.replace(/@(\w+)/g,function(r,s){n=!0;let a="";if(typeof i[s]=="string")a=i[s];else if(i[s]&&i[s]instanceof RegExp)a=i[s].source;else throw i[s]===void 0?sr(i,"language definition does not contain attribute '"+s+"', used at: "+e):sr(i,"attribute reference '"+s+"' must be a string, used at: "+e);return U5(a)?"":"(?:"+a+")"}),t++;while(n&&t<5);e=e.replace(/\x01/g,"@");let o=(i.ignoreCase?"i":"")+(i.unicode?"u":"");return new RegExp(e,o)}function qRt(i,e,t,n){if(n<0)return i;if(n=100){n=n-100;let o=t.split(".");if(o.unshift(t),n=0&&(n.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")n.bracket=1;else if(t.bracket==="@close")n.bracket=-1;else throw sr(i,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw sr(i,"the next state must be a string value in rule: "+e);{let o=t.next;if(!/^(@pop|@push|@popall)$/.test(o)&&(o[0]==="@"&&(o=o.substr(1)),o.indexOf("$")<0&&!zKe(i,Xg(i,o,"",[],""))))throw sr(i,"the next state '"+t.next+"' is not defined in rule: "+e);n.next=o}}return typeof t.goBack=="number"&&(n.goBack=t.goBack),typeof t.switchTo=="string"&&(n.switchTo=t.switchTo),typeof t.log=="string"&&(n.log=t.log),typeof t.nextEmbedded=="string"&&(n.nextEmbedded=t.nextEmbedded,i.usesEmbedded=!0),n}}else if(Array.isArray(t)){let n=[];for(let o=0,r=t.length;o=1&&c.length<=3)if(u.setRegex(n,c[0]),c.length>=3)if(typeof c[1]=="string")u.setAction(n,{token:c[1],next:c[2]});else if(typeof c[1]=="object"){let h=c[1];h.next=c[2],u.setAction(n,h)}else throw sr(t,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+s);else u.setAction(n,c[1]);else{if(!c.regex)throw sr(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+s);c.name&&typeof c.name=="string"&&(u.name=c.name),c.matchOnlyAtStart&&(u.matchOnlyAtLineStart=wQ(c.matchOnlyAtLineStart,!1)),u.setRegex(n,c.regex),u.setAction(n,c.action)}a.push(u)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw sr(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(let s in e.tokenizer)if(e.tokenizer.hasOwnProperty(s)){t.start||(t.start=s);let a=e.tokenizer[s];t.tokenizer[s]=new Array,o("tokenizer."+s,t.tokenizer[s],a)}if(t.usesEmbedded=n.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw sr(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let r=[];for(let s of e.brackets){let a=s;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw sr(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+` + hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")r.push({token:a.token+t.tokenPostfix,open:Zg(t,a.open),close:Zg(t,a.close)});else throw sr(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=r,t.noThrow=!0,t}var x6e,frt=P(()=>{Ufe();x6e=class{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,t){let n;if(typeof t=="string")n=t;else if(t instanceof RegExp)n=t.source;else throw sr(e,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=n.length>0&&n[0]==="^",this.name=this.name+": "+n,this.regex=C6e(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")")}setAction(e,t){this.action=w6e(e,this.name,t)}}});function KRt(i){Y3.registerLanguage(i)}function YRt(){let i=[];return i=i.concat(Y3.getLanguages()),i}function ZRt(i){return Ki.get(Kn).languageIdCodec.encodeLanguageId(i)}function XRt(i,e){return Ki.withServices(()=>{let n=Ki.get(Kn).onDidRequestRichLanguageFeatures(o=>{o===i&&(n.dispose(),e())});return n})}function QRt(i,e){return Ki.withServices(()=>{let n=Ki.get(Kn).onDidRequestBasicLanguageFeatures(o=>{o===i&&(n.dispose(),e())});return n})}function JRt(i,e){if(!Ki.get(Kn).isRegisteredLanguageId(i))throw new Error(`Cannot set configuration for unknown language ${i}`);return Ki.get(An).register(i,e,100)}function ePt(i){return typeof i.getInitialState=="function"}function tPt(i){return"tokenizeEncoded"in i}function prt(i){return i&&typeof i.then=="function"}function iPt(i){let e=Ki.get(sc);if(i){let t=[null];for(let n=1,o=i.length;n{let n=await Promise.resolve(e.create());return n?ePt(n)?mrt(i,n):new j5(Ki.get(Kn),Ki.get(sc),i,S6e(i,n),Ki.get(Ni)):null});return Eo.registerFactory(i,t)}function nPt(i,e){if(!Ki.get(Kn).isRegisteredLanguageId(i))throw new Error(`Cannot set tokens provider for unknown language ${i}`);return prt(e)?L6e(i,{create:()=>e}):Eo.register(i,mrt(i,e))}function oPt(i,e){let t=n=>new j5(Ki.get(Kn),Ki.get(sc),i,S6e(i,n),Ki.get(Ni));return prt(e)?L6e(i,{create:()=>e}):Eo.register(i,t(e))}function rPt(i,e){return Ki.get(Rt).referenceProvider.register(i,e)}function sPt(i,e){return Ki.get(Rt).renameProvider.register(i,e)}function aPt(i,e){return Ki.get(Rt).signatureHelpProvider.register(i,e)}function lPt(i,e){return Ki.get(Rt).hoverProvider.register(i,{provideHover:(n,o,r)=>{let s=n.getWordAtPosition(o);return Promise.resolve(e.provideHover(n,o,r)).then(a=>{if(a)return!a.range&&s&&(a.range=new O(o.lineNumber,s.startColumn,o.lineNumber,s.endColumn)),a.range||(a.range=new O(o.lineNumber,o.column,o.lineNumber,o.column)),a})}})}function cPt(i,e){return Ki.get(Rt).documentSymbolProvider.register(i,e)}function dPt(i,e){return Ki.get(Rt).documentHighlightProvider.register(i,e)}function uPt(i,e){return Ki.get(Rt).linkedEditingRangeProvider.register(i,e)}function hPt(i,e){return Ki.get(Rt).definitionProvider.register(i,e)}function fPt(i,e){return Ki.get(Rt).implementationProvider.register(i,e)}function pPt(i,e){return Ki.get(Rt).typeDefinitionProvider.register(i,e)}function mPt(i,e){return Ki.get(Rt).codeLensProvider.register(i,e)}function gPt(i,e,t){return Ki.get(Rt).codeActionProvider.register(i,{providedCodeActionKinds:t?.providedCodeActionKinds,documentation:t?.documentation,provideCodeActions:(o,r,s,a)=>{let c=Ki.get(yu).read({resource:o.uri}).filter(d=>O.areIntersectingOrTouching(d,r));return e.provideCodeActions(o,r,{markers:c,only:s.only,trigger:s.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function vPt(i,e){return Ki.get(Rt).documentFormattingEditProvider.register(i,e)}function _Pt(i,e){return Ki.get(Rt).documentRangeFormattingEditProvider.register(i,e)}function bPt(i,e){return Ki.get(Rt).onTypeFormattingEditProvider.register(i,e)}function yPt(i,e){return Ki.get(Rt).linkProvider.register(i,e)}function CPt(i,e){return Ki.get(Rt).completionProvider.register(i,e)}function wPt(i,e){return Ki.get(Rt).colorProvider.register(i,e)}function xPt(i,e){return Ki.get(Rt).foldingRangeProvider.register(i,e)}function SPt(i,e){return Ki.get(Rt).declarationProvider.register(i,e)}function kPt(i,e){return Ki.get(Rt).selectionRangeProvider.register(i,e)}function LPt(i,e){return Ki.get(Rt).documentSemanticTokensProvider.register(i,e)}function EPt(i,e){return Ki.get(Rt).documentRangeSemanticTokensProvider.register(i,e)}function DPt(i,e){return Ki.get(Rt).inlineCompletionsProvider.register(i,e)}function TPt(i,e){return Ki.get(Rt).inlayHintsProvider.register(i,e)}function grt(){return{register:KRt,getLanguages:YRt,onLanguage:XRt,onLanguageEncountered:QRt,getEncodedLanguageId:ZRt,setLanguageConfiguration:JRt,setColorMap:iPt,registerTokensProviderFactory:L6e,setTokensProvider:nPt,setMonarchTokensProvider:oPt,registerReferenceProvider:rPt,registerRenameProvider:sPt,registerCompletionItemProvider:CPt,registerSignatureHelpProvider:aPt,registerHoverProvider:lPt,registerDocumentSymbolProvider:cPt,registerDocumentHighlightProvider:dPt,registerLinkedEditingRangeProvider:uPt,registerDefinitionProvider:hPt,registerImplementationProvider:fPt,registerTypeDefinitionProvider:pPt,registerCodeLensProvider:mPt,registerCodeActionProvider:gPt,registerDocumentFormattingEditProvider:vPt,registerDocumentRangeFormattingEditProvider:_Pt,registerOnTypeFormattingEditProvider:bPt,registerLinkProvider:yPt,registerColorProvider:wPt,registerFoldingRangeProvider:xPt,registerDeclarationProvider:SPt,registerSelectionRangeProvider:kPt,registerDocumentSemanticTokensProvider:LPt,registerDocumentRangeSemanticTokensProvider:EPt,registerInlineCompletionsProvider:DPt,registerInlayHintsProvider:TPt,DocumentHighlightKind:kW,CompletionItemKind:bW,CompletionItemTag:yW,CompletionItemInsertTextRule:_W,SymbolKind:ZW,SymbolTag:XW,IndentAction:MW,CompletionTriggerKind:CW,SignatureHelpTriggerKind:YW,InlayHintKind:AW,InlineCompletionTriggerKind:RW,CodeActionTriggerType:vW,FoldingRangeKind:ru,SelectedSuggestionInfo:NC}}var k6e,xQ,vrt=P(()=>{sa();Kt();Pr();Kr();Zf();Ha();iU();VX();frt();Gfe();l7();A2();Yn();er();k6e=class{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,n){if(typeof this._actual.tokenize=="function")return xQ.adaptTokenize(this._languageId,this._actual,e,n);throw new Error("Not supported!")}tokenizeEncoded(e,t,n){let o=this._actual.tokenizeEncoded(e,n);return new U0(o.tokens,o.endState)}},xQ=class i{constructor(e,t,n,o){this._languageId=e,this._actual=t,this._languageService=n,this._standaloneThemeService=o}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){let n=[],o=0;for(let r=0,s=e.length;r0&&r[s-1]===h)continue;let f=u.startIndex;c===0?f=0:f{an();Xi();mo();Hh();_i();xl();Wt();E6e=vi("IEditorCancelService"),_rt=new Bt("cancellableOperation",!1,g("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));ln(E6e,class{constructor(){this._tokens=new WeakMap}add(i,e){let t=this._tokens.get(i);t||(t=i.invokeWithinContext(o=>{let r=_rt.bindTo(o.get(ri)),s=new $r;return{key:r,tokens:s}}),this._tokens.set(i,t));let n;return t.key.set(!0),n=t.tokens.push(e),()=>{n&&(n(),t.key.set(!t.tokens.isEmpty()),n=void 0)}}cancel(i){let e=this._tokens.get(i);if(!e)return;let t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},1);SQ=class extends Jn{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(n=>n.get(E6e).add(e,this))}dispose(){this._unregister(),super.dispose()}};zt(new class extends Jo{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:_rt})}runEditorCommand(i,e){i.get(E6e).cancel(e)}})});var WS,bh,v7,$4=P(()=>{Ri();Kt();mo();nt();brt();WS=class i{constructor(e,t){if(this.flags=t,this.flags&1){let n=e.getModel();this.modelVersionId=n?zf("{0}#{1}",n.uri.toString(),n.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=e.getPosition():this.position=null,this.flags&2?this.selection=e.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof i))return!1;let t=e;return!(this.modelVersionId!==t.modelVersionId||this.scrollLeft!==t.scrollLeft||this.scrollTop!==t.scrollTop||!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position)||!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new i(e,this.flags))}},bh=class extends SQ{constructor(e,t,n,o){super(e,o),this._listener=new Ye,t&4&&this._listener.add(e.onDidChangeCursorPosition(r=>{(!n||!O.containsPosition(n,r.position))&&this.cancel()})),t&2&&this._listener.add(e.onDidChangeCursorSelection(r=>{(!n||!O.containsRange(n,r.selection))&&this.cancel()})),t&8&&this._listener.add(e.onDidScrollChange(r=>this.cancel())),t&1&&(this._listener.add(e.onDidChangeModel(r=>this.cancel())),this._listener.add(e.onDidChangeModelContent(r=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}},v7=class extends Jn{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}});function Ep(i){return i&&typeof i.getEditorType=="function"?i.getEditorType()===s4.ICodeEditor:!1}function sA(i){return i&&typeof i.getEditorType=="function"?i.getEditorType()===s4.IDiffEditor:!1}function IPt(i){return!!i&&typeof i=="object"&&typeof i.onDidChangeActiveEditor=="function"}function kQ(i){return Ep(i)?i:sA(i)?i.getModifiedEditor():IPt(i)&&Ep(i.activeCodeEditor)?i.activeCodeEditor:null}var US=P(()=>{dI()});var _7,D6e=P(()=>{c1();Kt();p7();_7=class i{static _handleEolEdits(e,t){let n,o=[];for(let r of t)typeof r.eol=="number"&&(n=r.eol),r.range&&typeof r.text=="string"&&o.push(r);return typeof n=="number"&&e.hasModel()&&e.getModel().pushEOL(n),o}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;let n=e.getModel(),o=n.validateRange(t.range);return n.getFullModelRange().equalsRange(o)}static execute(e,t,n){n&&e.pushUndoStop();let o=xu.capture(e),r=i._handleEolEdits(e,t);r.length===1&&i._isFullModelReplaceEdit(e,r[0])?e.executeEdits("formatEditsCommand",r.map(s=>So.replace(O.lift(s.range),s.text))):e.executeEdits("formatEditsCommand",r.map(s=>So.replaceMove(O.lift(s.range),s.text))),n&&e.pushUndoStop(),o.restoreRelativeVerticalPositionOfCursor(e)}}});var LQ,EQ,yrt=P(()=>{LQ=class{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}},EQ=class{constructor(e){if(this._set=new Set,e)for(let t of e)this.add(t)}add(e){this._set.add(LQ.toKey(e))}has(e){return this._set.has(LQ.toKey(e))}}});function Crt(i,e,t){let n=[],o=new EQ,r=i.ordered(t);for(let a of r)n.push(a),a.extensionId&&o.add(a.extensionId);let s=e.ordered(t);for(let a of s){if(a.extensionId){if(o.has(a.extensionId))continue;o.add(a.extensionId)}n.push({displayName:a.displayName,extensionId:a.extensionId,provideDocumentFormattingEdits(l,c,d){return a.provideDocumentRangeFormattingEdits(l,l.getFullModelRange(),c,d)}})}return n}async function T6e(i,e,t,n,o,r,s){let a=i.get(qt),{documentRangeFormattingEditProvider:l}=i.get(Rt),c=Ep(e)?e.getModel():e,d=l.ordered(c),u=await b7.select(d,c,n,2);u&&(o.report(u),await a.invokeFunction(MPt,u,e,t,r,s))}async function MPt(i,e,t,n,o,r){var s,a;let l=i.get(Oc),c=i.get(ks),d=i.get(_h),u,h;Ep(t)?(u=t.getModel(),h=new bh(t,5,void 0,o)):(u=t,h=new v7(t,o));let f=[],p=0;for(let b of _C(n).sort(O.compareRangesUsingStarts))p>0&&O.areIntersectingOrTouching(f[p-1],b)?f[p-1]=O.fromPositions(f[p-1].getStartPosition(),b.getEndPosition()):p=f.push(b);let m=async b=>{var C,w;c.trace("[format][provideDocumentRangeFormattingEdits] (request)",(C=e.extensionId)===null||C===void 0?void 0:C.value,b);let S=await e.provideDocumentRangeFormattingEdits(u,b,u.getFormattingOptions(),h.token)||[];return c.trace("[format][provideDocumentRangeFormattingEdits] (response)",(w=e.extensionId)===null||w===void 0?void 0:w.value,S),S},y=(b,C)=>{if(!b.length||!C.length)return!1;let w=b.reduce((S,x)=>O.plusRange(S,x.range),b[0].range);if(!C.some(S=>O.intersectRanges(w,S.range)))return!1;for(let S of b)for(let x of C)if(O.intersectRanges(S.range,x.range))return!0;return!1},_=[],v=[];try{if(typeof e.provideDocumentRangesFormattingEdits=="function"){c.trace("[format][provideDocumentRangeFormattingEdits] (request)",(s=e.extensionId)===null||s===void 0?void 0:s.value,f);let b=await e.provideDocumentRangesFormattingEdits(u,f,u.getFormattingOptions(),h.token)||[];c.trace("[format][provideDocumentRangeFormattingEdits] (response)",(a=e.extensionId)===null||a===void 0?void 0:a.value,b),v.push(b)}else{for(let b of f){if(h.token.isCancellationRequested)return!0;v.push(await m(b))}for(let b=0;b({text:w.text,range:O.lift(w.range),forceMoveMarkers:!0})),w=>{for(let{range:S}of w)if(O.areIntersectingOrTouching(S,C))return[new jt(S.startLineNumber,S.startColumn,S.endLineNumber,S.endColumn)];return null})}return d.playAudioCue(Cn.format,{userGesture:r}),!0}async function wrt(i,e,t,n,o,r){let s=i.get(qt),a=i.get(Rt),l=Ep(e)?e.getModel():e,c=Crt(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,l),d=await b7.select(c,l,t,1);d&&(n.report(d),await s.invokeFunction(NPt,d,e,t,o,r))}async function NPt(i,e,t,n,o,r){let s=i.get(Oc),a=i.get(_h),l,c;Ep(t)?(l=t.getModel(),c=new bh(t,5,void 0,o)):(l=t,c=new v7(t,o));let d;try{let u=await e.provideDocumentFormattingEdits(l,l.getFormattingOptions(),c.token);if(d=await s.computeMoreMinimalEdits(l.uri,u),c.token.isCancellationRequested)return!0}finally{c.dispose()}if(!d||d.length===0)return!1;if(Ep(t))_7.execute(t,d,n!==2),n!==2&&t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1);else{let[{range:u}]=d,h=new jt(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn);l.pushEditOperations([h],d.map(f=>({text:f.text,range:O.lift(f.range),forceMoveMarkers:!0})),f=>{for(let{range:p}of f)if(O.areIntersectingOrTouching(p,h))return[new jt(p.startLineNumber,p.startColumn,p.endLineNumber,p.endColumn)];return null})}return a.playAudioCue(Cn.format,{userGesture:r}),!0}async function APt(i,e,t,n,o,r){let s=e.documentRangeFormattingEditProvider.ordered(t);for(let a of s){let l=await Promise.resolve(a.provideDocumentRangeFormattingEdits(t,n,o,r)).catch(po);if(Nr(l))return await i.computeMoreMinimalEdits(t.uri,l)}}async function RPt(i,e,t,n,o){let r=Crt(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,t);for(let s of r){let a=await Promise.resolve(s.provideDocumentFormattingEdits(t,n,o)).catch(po);if(Nr(a))return await i.computeMoreMinimalEdits(t.uri,a)}}function I6e(i,e,t,n,o,r,s){let a=e.onTypeFormattingEditProvider.ordered(t);return a.length===0||a[0].autoFormatTriggerCharacters.indexOf(o)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,n,o,r,s)).catch(po).then(l=>i.computeMoreMinimalEdits(t.uri,l))}var b7,M6e=P(()=>{Vi();mo();Pi();Yc();Hh();ho();Io();$4();US();Mi();Kt();zo();Zv();Wh();D6e();$o();yrt();_i();Yn();Ju();s8();b7=class i{static setFormatterSelector(e){return{dispose:i._selectors.unshift(e)}}static async select(e,t,n,o){if(e.length===0)return;let r=un.first(i._selectors);if(r)return await r(e,t,n,o)}};b7._selectors=new $r;Zi.registerCommand("_executeFormatRangeProvider",async function(i,...e){let[t,n,o]=e;Bn(li.isUri(t)),Bn(O.isIRange(n));let r=i.get(xs),s=i.get(Oc),a=i.get(Rt),l=await r.createModelReference(t);try{return APt(s,a,l.object.textEditorModel,O.lift(n),o,Fi.None)}finally{l.dispose()}});Zi.registerCommand("_executeFormatDocumentProvider",async function(i,...e){let[t,n]=e;Bn(li.isUri(t));let o=i.get(xs),r=i.get(Oc),s=i.get(Rt),a=await o.createModelReference(t);try{return RPt(r,s,a.object.textEditorModel,n,Fi.None)}finally{a.dispose()}});Zi.registerCommand("_executeFormatOnTypeProvider",async function(i,...e){let[t,n,o,r]=e;Bn(li.isUri(t)),Bn(ke.isIPosition(n)),Bn(typeof o=="string");let s=i.get(xs),a=i.get(Oc),l=i.get(Rt),c=await s.createModelReference(t);try{return I6e(a,l,c.object.textEditorModel,ke.lift(n),o,r,Fi.None)}finally{c.dispose()}})});var ir={};Ai(ir,{CancellationTokenSource:()=>PPt,Emitter:()=>A6e,KeyCode:()=>R6e,KeyMod:()=>P6e,MarkerSeverity:()=>BPt,MarkerTag:()=>VPt,Position:()=>OPt,Range:()=>zPt,Selection:()=>FPt,SelectionDirection:()=>HPt,Token:()=>UPt,Uri:()=>WPt,editor:()=>$S,languages:()=>aA});var zd,PPt,A6e,R6e,P6e,OPt,zPt,FPt,HPt,BPt,VPt,WPt,UPt,$S,aA,N6e,ta=P(()=>{Ks();Oue();drt();vrt();M6e();nu.wrappingIndent.defaultValue=0;nu.glyphMargin.defaultValue=!1;nu.autoIndent.defaultValue=3;nu.overviewRulerLanes.defaultValue=2;b7.setFormatterSelector((i,e,t)=>Promise.resolve(i[0]));zd=nU();zd.editor=crt();zd.languages=grt();PPt=zd.CancellationTokenSource,A6e=zd.Emitter,R6e=zd.KeyCode,P6e=zd.KeyMod,OPt=zd.Position,zPt=zd.Range,FPt=zd.Selection,HPt=zd.SelectionDirection,BPt=zd.MarkerSeverity,VPt=zd.MarkerTag,WPt=zd.Uri,UPt=zd.Token,$S=zd.editor,aA=zd.languages,N6e=globalThis.MonacoEnvironment;(N6e?.globalAPI||typeof define=="function"&&define.amd)&&(globalThis.monaco=zd);typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})});var Lrt={};Ai(Lrt,{conf:()=>ZPt,language:()=>XPt});var ZPt,XPt,Ert=P(()=>{ZPt={comments:{lineComment:"*"},brackets:[["[","]"],["(",")"]]},XPt={defaultToken:"invalid",ignoreCase:!0,tokenPostfix:".abap",keywords:["abap-source","abbreviated","abstract","accept","accepting","according","activation","actual","add","add-corresponding","adjacent","after","alias","aliases","align","all","allocate","alpha","analysis","analyzer","and","append","appendage","appending","application","archive","area","arithmetic","as","ascending","aspect","assert","assign","assigned","assigning","association","asynchronous","at","attributes","authority","authority-check","avg","back","background","backup","backward","badi","base","before","begin","between","big","binary","bintohex","bit","black","blank","blanks","blob","block","blocks","blue","bound","boundaries","bounds","boxed","break-point","buffer","by","bypassing","byte","byte-order","call","calling","case","cast","casting","catch","center","centered","chain","chain-input","chain-request","change","changing","channels","character","char-to-hex","check","checkbox","ci_","circular","class","class-coding","class-data","class-events","class-methods","class-pool","cleanup","clear","client","clob","clock","close","coalesce","code","coding","col_background","col_group","col_heading","col_key","col_negative","col_normal","col_positive","col_total","collect","color","column","columns","comment","comments","commit","common","communication","comparing","component","components","compression","compute","concat","concat_with_space","concatenate","cond","condense","condition","connect","connection","constants","context","contexts","continue","control","controls","conv","conversion","convert","copies","copy","corresponding","country","cover","cpi","create","creating","critical","currency","currency_conversion","current","cursor","cursor-selection","customer","customer-function","dangerous","data","database","datainfo","dataset","date","dats_add_days","dats_add_months","dats_days_between","dats_is_valid","daylight","dd/mm/yy","dd/mm/yyyy","ddmmyy","deallocate","decimal_shift","decimals","declarations","deep","default","deferred","define","defining","definition","delete","deleting","demand","department","descending","describe","destination","detail","dialog","directory","disconnect","display","display-mode","distinct","divide","divide-corresponding","division","do","dummy","duplicate","duplicates","duration","during","dynamic","dynpro","edit","editor-call","else","elseif","empty","enabled","enabling","encoding","end","endat","endcase","endcatch","endchain","endclass","enddo","endenhancement","end-enhancement-section","endexec","endform","endfunction","endian","endif","ending","endinterface","end-lines","endloop","endmethod","endmodule","end-of-definition","end-of-editing","end-of-file","end-of-page","end-of-selection","endon","endprovide","endselect","end-test-injection","end-test-seam","endtry","endwhile","endwith","engineering","enhancement","enhancement-point","enhancements","enhancement-section","entries","entry","enum","environment","equiv","errormessage","errors","escaping","event","events","exact","except","exception","exceptions","exception-table","exclude","excluding","exec","execute","exists","exit","exit-command","expand","expanding","expiration","explicit","exponent","export","exporting","extend","extended","extension","extract","fail","fetch","field","field-groups","fields","field-symbol","field-symbols","file","filter","filters","filter-table","final","find","first","first-line","fixed-point","fkeq","fkge","flush","font","for","form","format","forward","found","frame","frames","free","friends","from","function","functionality","function-pool","further","gaps","generate","get","giving","gkeq","gkge","global","grant","green","group","groups","handle","handler","harmless","hashed","having","hdb","header","headers","heading","head-lines","help-id","help-request","hextobin","hide","high","hint","hold","hotspot","icon","id","identification","identifier","ids","if","ignore","ignoring","immediately","implementation","implementations","implemented","implicit","import","importing","in","inactive","incl","include","includes","including","increment","index","index-line","infotypes","inheriting","init","initial","initialization","inner","inout","input","insert","instance","instances","instr","intensified","interface","interface-pool","interfaces","internal","intervals","into","inverse","inverted-date","is","iso","job","join","keep","keeping","kernel","key","keys","keywords","kind","language","last","late","layout","leading","leave","left","left-justified","leftplus","leftspace","legacy","length","let","level","levels","like","line","lines","line-count","linefeed","line-selection","line-size","list","listbox","list-processing","little","llang","load","load-of-program","lob","local","locale","locator","logfile","logical","log-point","long","loop","low","lower","lpad","lpi","ltrim","mail","main","major-id","mapping","margin","mark","mask","match","matchcode","max","maximum","medium","members","memory","mesh","message","message-id","messages","messaging","method","methods","min","minimum","minor-id","mm/dd/yy","mm/dd/yyyy","mmddyy","mode","modif","modifier","modify","module","move","move-corresponding","multiply","multiply-corresponding","name","nametab","native","nested","nesting","new","new-line","new-page","new-section","next","no","no-display","no-extension","no-gap","no-gaps","no-grouping","no-heading","no-scrolling","no-sign","no-title","no-topofpage","no-zero","node","nodes","non-unicode","non-unique","not","null","number","object","objects","obligatory","occurrence","occurrences","occurs","of","off","offset","ole","on","only","open","option","optional","options","or","order","other","others","out","outer","output","output-length","overflow","overlay","pack","package","pad","padding","page","pages","parameter","parameters","parameter-table","part","partially","pattern","percentage","perform","performing","person","pf1","pf10","pf11","pf12","pf13","pf14","pf15","pf2","pf3","pf4","pf5","pf6","pf7","pf8","pf9","pf-status","pink","places","pool","pos_high","pos_low","position","pragmas","precompiled","preferred","preserving","primary","print","print-control","priority","private","procedure","process","program","property","protected","provide","public","push","pushbutton","put","queue-only","quickinfo","radiobutton","raise","raising","range","ranges","read","reader","read-only","receive","received","receiver","receiving","red","redefinition","reduce","reduced","ref","reference","refresh","regex","reject","remote","renaming","replace","replacement","replacing","report","request","requested","reserve","reset","resolution","respecting","responsible","result","results","resumable","resume","retry","return","returncode","returning","returns","right","right-justified","rightplus","rightspace","risk","rmc_communication_failure","rmc_invalid_status","rmc_system_failure","role","rollback","rows","rpad","rtrim","run","sap","sap-spool","saving","scale_preserving","scale_preserving_scientific","scan","scientific","scientific_with_leading_zero","scroll","scroll-boundary","scrolling","search","secondary","seconds","section","select","selection","selections","selection-screen","selection-set","selection-sets","selection-table","select-options","send","separate","separated","set","shared","shift","short","shortdump-id","sign_as_postfix","single","size","skip","skipping","smart","some","sort","sortable","sorted","source","specified","split","spool","spots","sql","sqlscript","stable","stamp","standard","starting","start-of-editing","start-of-selection","state","statement","statements","static","statics","statusinfo","step-loop","stop","structure","structures","style","subkey","submatches","submit","subroutine","subscreen","subtract","subtract-corresponding","suffix","sum","summary","summing","supplied","supply","suppress","switch","switchstates","symbol","syncpoints","syntax","syntax-check","syntax-trace","system-call","system-exceptions","system-exit","tab","tabbed","table","tables","tableview","tabstrip","target","task","tasks","test","testing","test-injection","test-seam","text","textpool","then","throw","time","times","timestamp","timezone","tims_is_valid","title","titlebar","title-lines","to","tokenization","tokens","top-lines","top-of-page","trace-file","trace-table","trailing","transaction","transfer","transformation","translate","transporting","trmac","truncate","truncation","try","tstmp_add_seconds","tstmp_current_utctimestamp","tstmp_is_valid","tstmp_seconds_between","type","type-pool","type-pools","types","uline","unassign","under","unicode","union","unique","unit_conversion","unix","unpack","until","unwind","up","update","upper","user","user-command","using","utf-8","valid","value","value-request","values","vary","varying","verification-message","version","via","view","visible","wait","warning","when","whenever","where","while","width","window","windows","with","with-heading","without","with-title","word","work","write","writer","xml","xsd","yellow","yes","yymmdd","zero","zone","abap_system_timezone","abap_user_timezone","access","action","adabas","adjust_numbers","allow_precision_loss","allowed","amdp","applicationuser","as_geo_json","as400","associations","balance","behavior","breakup","bulk","cds","cds_client","check_before_save","child","clients","corr","corr_spearman","cross","cycles","datn_add_days","datn_add_months","datn_days_between","dats_from_datn","dats_tims_to_tstmp","dats_to_datn","db2","db6","ddl","dense_rank","depth","deterministic","discarding","entities","entity","error","failed","finalize","first_value","fltp_to_dec","following","fractional","full","graph","grouping","hierarchy","hierarchy_ancestors","hierarchy_ancestors_aggregate","hierarchy_descendants","hierarchy_descendants_aggregate","hierarchy_siblings","incremental","indicators","lag","last_value","lead","leaves","like_regexpr","link","locale_sap","lock","locks","many","mapped","matched","measures","median","mssqlnt","multiple","nodetype","ntile","nulls","occurrences_regexpr","one","operations","oracle","orphans","over","parent","parents","partition","pcre","period","pfcg_mapping","preceding","privileged","product","projection","rank","redirected","replace_regexpr","reported","response","responses","root","row","row_number","sap_system_date","save","schema","session","sets","shortdump","siblings","spantree","start","stddev","string_agg","subtotal","sybase","tims_from_timn","tims_to_timn","to_blob","to_clob","total","trace-entry","tstmp_to_dats","tstmp_to_dst","tstmp_to_tims","tstmpl_from_utcl","tstmpl_to_utcl","unbounded","utcl_add_seconds","utcl_current","utcl_seconds_between","uuid","var","verbatim"],builtinFunctions:["abs","acos","asin","atan","bit-set","boolc","boolx","ceil","char_off","charlen","cmax","cmin","concat_lines_of","contains","contains_any_not_of","contains_any_of","cos","cosh","count","count_any_not_of","count_any_of","dbmaxlen","distance","escape","exp","find_any_not_of","find_any_of","find_end","floor","frac","from_mixed","ipow","line_exists","line_index","log","log10","matches","nmax","nmin","numofchar","repeat","rescale","reverse","round","segment","shift_left","shift_right","sign","sin","sinh","sqrt","strlen","substring","substring_after","substring_before","substring_from","substring_to","tan","tanh","to_lower","to_mixed","to_upper","trunc","utclong_add","utclong_current","utclong_diff","xsdbool","xstrlen"],typeKeywords:["b","c","d","decfloat16","decfloat34","f","i","int8","n","p","s","string","t","utclong","x","xstring","any","clike","csequence","decfloat","numeric","simple","xsequence","accp","char","clnt","cuky","curr","datn","dats","d16d","d16n","d16r","d34d","d34n","d34r","dec","df16_dec","df16_raw","df34_dec","df34_raw","fltp","geom_ewkb","int1","int2","int4","lang","lchr","lraw","numc","quan","raw","rawstring","sstring","timn","tims","unit","utcl","df16_scl","df34_scl","prec","varc","abap_bool","abap_false","abap_true","abap_undefined","me","screen","space","super","sy","syst","table_line","*sys*"],builtinMethods:["class_constructor","constructor"],derivedTypes:["%CID","%CID_REF","%CONTROL","%DATA","%ELEMENT","%FAIL","%KEY","%MSG","%PARAM","%PID","%PID_ASSOC","%PID_PARENT","%_HINTS"],cdsLanguage:["@AbapAnnotation","@AbapCatalog","@AccessControl","@API","@ClientDependent","@ClientHandling","@CompatibilityContract","@DataAging","@EndUserText","@Environment","@LanguageDependency","@MappingRole","@Metadata","@MetadataExtension","@ObjectModel","@Scope","@Semantics","$EXTENSION","$SELF"],selectors:["->","->*","=>","~","~*"],operators:[" +"," -","/","*","**","div","mod","=","#","@","+=","-=","*=","/=","**=","&&=","?=","&","&&","bit-and","bit-not","bit-or","bit-xor","m","o","z","<"," >","<=",">=","<>","><","=<","=>","bt","byte-ca","byte-cn","byte-co","byte-cs","byte-na","byte-ns","ca","cn","co","cp","cs","eq","ge","gt","le","lt","na","nb","ne","np","ns","*/","*:","--","/*","//"],symbols:/[=>))*/,{cases:{"@typeKeywords":"type","@keywords":"keyword","@cdsLanguage":"annotation","@derivedTypes":"type","@builtinFunctions":"type","@builtinMethods":"type","@operators":"key","@default":"identifier"}}],[/<[\w]+>/,"identifier"],[/##[\w|_]+/,"comment"],{include:"@whitespace"},[/[:,.]/,"delimiter"],[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@selectors":"tag","@operators":"key","@default":""}}],[/'/,{token:"string",bracket:"@open",next:"@stringquote"}],[/`/,{token:"string",bracket:"@open",next:"@stringping"}],[/\|/,{token:"string",bracket:"@open",next:"@stringtemplate"}],[/\d+/,"number"]],stringtemplate:[[/[^\\\|]+/,"string"],[/\\\|/,"string"],[/\|/,{token:"string",bracket:"@close",next:"@pop"}]],stringping:[[/[^\\`]+/,"string"],[/`/,{token:"string",bracket:"@close",next:"@pop"}]],stringquote:[[/[^\\']+/,"string"],[/'/,{token:"string",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/^\*.*$/,"comment"],[/\".*$/,"comment"]]}}});var Drt={};Ai(Drt,{conf:()=>QPt,language:()=>tOt});var QPt,JPt,eOt,DQ,tOt,Trt=P(()=>{QPt={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},JPt=["abstract","activate","and","any","array","as","asc","assert","autonomous","begin","bigdecimal","blob","boolean","break","bulk","by","case","cast","catch","char","class","collect","commit","const","continue","convertcurrency","decimal","default","delete","desc","do","double","else","end","enum","exception","exit","export","extends","false","final","finally","float","for","from","future","get","global","goto","group","having","hint","if","implements","import","in","inner","insert","instanceof","int","interface","into","join","last_90_days","last_month","last_n_days","last_week","like","limit","list","long","loop","map","merge","native","new","next_90_days","next_month","next_n_days","next_week","not","null","nulls","number","object","of","on","or","outer","override","package","parallel","pragma","private","protected","public","retrieve","return","returning","rollback","savepoint","search","select","set","short","sort","stat","static","strictfp","super","switch","synchronized","system","testmethod","then","this","this_month","this_week","throw","throws","today","tolabel","tomorrow","transaction","transient","trigger","true","try","type","undelete","update","upsert","using","virtual","void","volatile","webservice","when","where","while","yesterday"],eOt=i=>i.charAt(0).toUpperCase()+i.substr(1),DQ=[];JPt.forEach(i=>{DQ.push(i),DQ.push(i.toUpperCase()),DQ.push(eOt(i))});tOt={defaultToken:"",tokenPostfix:".apex",keywords:DQ,operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@apexdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],apexdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}});var Irt={};Ai(Irt,{conf:()=>iOt,language:()=>nOt});var iOt,nOt,Mrt=P(()=>{iOt={comments:{lineComment:"#"}},nOt={defaultToken:"keyword",ignoreCase:!0,tokenPostfix:".azcli",str:/[^#\s]/,tokenizer:{root:[{include:"@comment"},[/\s-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}],[/^-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}]],type:[{include:"@comment"},[/-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":"key.identifier"}}],[/@str+\s*/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}]],comment:[[/#.*$/,{cases:{"@eos":{token:"comment",next:"@popall"}}}]]}}});var Nrt={};Ai(Nrt,{conf:()=>oOt,language:()=>rOt});var oOt,rOt,Art=P(()=>{oOt={comments:{lineComment:"REM"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|REM\\s+)#region"),end:new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")}}},rOt={defaultToken:"",ignoreCase:!0,tokenPostfix:".bat",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:/call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,symbols:/[=>pOt,language:()=>mOt});var sOt,aOt,lOt,cOt,dOt,uOt,hOt,fOt,pOt,mOt,Prt=P(()=>{sOt=i=>`\\b${i}\\b`,aOt="[_a-zA-Z]",lOt="[_a-zA-Z0-9]",cOt=sOt(`${aOt}${lOt}*`),dOt=["targetScope","resource","module","param","var","output","for","in","if","existing"],uOt=["true","false","null"],hOt="[ \\t\\r\\n]",fOt="[0-9]+",pOt={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:"'''",close:"'''"}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:"'''",close:"'''",notIn:["string","comment"]}],autoCloseBefore:`:.,=}])' `,indentationRules:{increaseIndentPattern:new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),decreaseIndentPattern:new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")}},mOt={defaultToken:"",tokenPostfix:".bicep",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=>gOt,language:()=>vOt});var gOt,vOt,zrt=P(()=>{gOt={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}]},vOt={defaultToken:"",tokenPostfix:".cameligo",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["abs","assert","block","Bytes","case","Crypto","Current","else","failwith","false","for","fun","if","in","let","let%entry","let%init","List","list","Map","map","match","match%nat","mod","not","operation","Operation","of","record","Set","set","sender","skip","source","String","then","to","true","type","with"],typeKeywords:["int","unit","string","tz","nat","bool"],operators:["=",">","<","<=",">=","<>",":",":=","and","mod","or","+","-","*","/","@","&","^","%","->","<-","&&","||"],symbols:/[=><:@\^&|+\-*\/\^%]+/,tokenizer:{root:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\$[0-9a-fA-F]{1,16}/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'/,"string","@string"],[/'[^\\']'/,"string"],[/'/,"string.invalid"],[/\#\d+/,"string"]],comment:[[/[^\(\*]+/,"comment"],[/\*\)/,"comment","@pop"],[/\(\*/,"comment"]],string:[[/[^\\']+/,"string"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}});var Frt={};Ai(Frt,{conf:()=>_Ot,language:()=>bOt});var _Ot,bOt,Hrt=P(()=>{_Ot={comments:{lineComment:";;"},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:"[",close:"]"},{open:'"',close:'"'},{open:"(",close:")"},{open:"{",close:"}"}],surroundingPairs:[{open:"[",close:"]"},{open:'"',close:'"'},{open:"(",close:")"},{open:"{",close:"}"}]},bOt={defaultToken:"",ignoreCase:!0,tokenPostfix:".clj",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"}],constants:["true","false","nil"],numbers:/^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/,characters:/^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/,escapes:/^\\(?:["'\\bfnrt]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,qualifiedSymbols:/^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/,specialForms:[".","catch","def","do","if","monitor-enter","monitor-exit","new","quote","recur","set!","throw","try","var"],coreSymbols:["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Inst","StackTraceElement->vec","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","any?","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case","cast","cat","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","indexed?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","qualified-ident?","qualified-keyword?","qualified-symbol?","quot","rand","rand-int","rand-nth","random-sample","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","reset-vals!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seqable?","seque","sequence","sequential?","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","simple-ident?","simple-keyword?","simple-symbol?","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","swap-vals!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-proxy","uri?","use","uuid?","val","vals","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"],tokenizer:{root:[{include:"@whitespace"},[/@numbers/,"number"],[/@characters/,"string"],{include:"@string"},[/[()\[\]{}]/,"@brackets"],[/\/#"(?:\.|(?:")|[^"\n])*"\/g/,"regexp"],[/[#'@^`~]/,"meta"],[/@qualifiedSymbols/,{cases:{"^:.+$":"constant","@specialForms":"keyword","@coreSymbols":"keyword","@constants":"constant","@default":"identifier"}}]],whitespace:[[/[\s,]+/,"white"],[/;.*$/,"comment"],[/\(comment\b/,"comment","@comment"]],comment:[[/\(/,"comment","@push"],[/\)/,"comment","@pop"],[/[^()]/,"comment"]],string:[[/"/,"string","@multiLineString"]],multiLineString:[[/"/,"string","@popall"],[/@escapes/,"string.escape"],[/./,"string"]]}}});var Brt={};Ai(Brt,{conf:()=>yOt,language:()=>COt});var yOt,COt,Vrt=P(()=>{yOt={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{blockComment:["###","###"],lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},COt={defaultToken:"",ignoreCase:!0,tokenPostfix:".coffee",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],regEx:/\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,keywords:["and","or","is","isnt","not","on","yes","@","no","off","true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super","undefined","then","unless","until","loop","of","by","when"],symbols:/[=>wOt,language:()=>xOt});var wOt,xOt,F6e=P(()=>{wOt={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},xOt={defaultToken:"",tokenPostfix:".cpp",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m512","__m512d","__m512i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>="],symbols:/[=>\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*\\$/,"comment","@linecomment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],linecomment:[[/.*[^\\]$/,"comment","@pop"],[/[^]+/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],raw:[[/(.*)(\))(?:([^ ()\\\t"]*))(\")/,{cases:{"$3==$S2":["string.raw","string.raw.end","string.raw.end",{token:"string.raw.end",next:"@pop"}],"@default":["string.raw","string.raw","string.raw","string.raw"]}}],[/.*/,"string.raw"]],annotation:[{include:"@whitespace"},[/using|alignas/,"keyword"],[/[a-zA-Z0-9_]+/,"annotation"],[/[,:]/,"delimiter"],[/[()]/,"@brackets"],[/\]\s*\]/,{token:"annotation",next:"@pop"}]],include:[[/(\s*)(<)([^<>]*)(>)/,["","keyword.directive.include.begin","string.include.identifier",{token:"keyword.directive.include.end",next:"@pop"}]],[/(\s*)(")([^"]*)(")/,["","keyword.directive.include.begin","string.include.identifier",{token:"keyword.directive.include.end",next:"@pop"}]]]}}});var Wrt={};Ai(Wrt,{conf:()=>SOt,language:()=>kOt});var SOt,kOt,Urt=P(()=>{SOt={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},kOt={defaultToken:"",tokenPostfix:".cs",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["extern","alias","using","bool","decimal","sbyte","byte","short","ushort","int","uint","long","ulong","char","float","double","object","dynamic","string","assembly","is","as","ref","out","this","base","new","typeof","void","checked","unchecked","default","delegate","var","const","if","else","switch","case","while","do","for","foreach","in","break","continue","goto","return","throw","try","catch","finally","lock","yield","from","let","where","join","on","equals","into","orderby","ascending","descending","select","group","by","namespace","partial","class","field","event","method","param","public","protected","internal","private","abstract","sealed","static","struct","readonly","volatile","virtual","override","params","get","set","add","remove","operator","true","false","implicit","explicit","interface","enum","null","async","await","fixed","sizeof","stackalloc","unsafe","nameof","when"],namespaceFollows:["namespace","using"],parenFollows:["if","for","while","switch","foreach","using","catch","when"],operators:["=","??","||","&&","|","^","&","==","!=","<=",">=","<<","+","-","*","/","%","!","~","++","--","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=",">>","=>"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01_]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",next:"@string"}],[/\$\@"/,{token:"string.quote",next:"@litinterpstring"}],[/\@"/,{token:"string.quote",next:"@litstring"}],[/\$"/,{token:"string.quote",next:"@interpolatedstring"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],qualified:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/\./,"delimiter"],["","","@pop"]],namespace:[{include:"@whitespace"},[/[A-Z]\w*/,"namespace"],[/[\.=]/,"delimiter"],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]],litinterpstring:[[/[^"{]+/,"string"],[/""/,"string.escape"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.litinterpstring"}],[/"/,{token:"string.quote",next:"@pop"}]],interpolatedstring:[[/[^\\"{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.interpolatedstring"}],[/"/,{token:"string.quote",next:"@pop"}]],whitespace:[[/^[ \t\v\f]*#((r)|(load))(?=\s)/,"directive.csx"],[/^[ \t\v\f]*#\w.*$/,"namespace.cpp"],[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}});var $rt={};Ai($rt,{conf:()=>LOt,language:()=>EOt});var LOt,EOt,jrt=P(()=>{LOt={brackets:[],autoClosingPairs:[],surroundingPairs:[]},EOt={keywords:[],typeKeywords:[],tokenPostfix:".csp",operators:[],symbols:/[=>DOt,language:()=>TOt});var DOt,TOt,Grt=P(()=>{DOt={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},TOt={defaultToken:"",tokenPostfix:".css",ws:`[ \r\f]*`,identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.bracket"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},{include:"@strings"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},[`[^)\r -]+`,"string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}}});var Krt={};Ai(Krt,{conf:()=>IOt,language:()=>MOt});var IOt,MOt,Yrt=P(()=>{IOt={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},MOt={defaultToken:"",tokenPostfix:".cypher",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ALL","AND","AS","ASC","ASCENDING","BY","CALL","CASE","CONTAINS","CREATE","DELETE","DESC","DESCENDING","DETACH","DISTINCT","ELSE","END","ENDS","EXISTS","IN","IS","LIMIT","MANDATORY","MATCH","MERGE","NOT","ON","ON","OPTIONAL","OR","ORDER","REMOVE","RETURN","SET","SKIP","STARTS","THEN","UNION","UNWIND","WHEN","WHERE","WITH","XOR","YIELD"],builtinLiterals:["true","TRUE","false","FALSE","null","NULL"],builtinFunctions:["abs","acos","asin","atan","atan2","avg","ceil","coalesce","collect","cos","cot","count","degrees","e","endNode","exists","exp","floor","head","id","keys","labels","last","left","length","log","log10","lTrim","max","min","nodes","percentileCont","percentileDisc","pi","properties","radians","rand","range","relationships","replace","reverse","right","round","rTrim","sign","sin","size","split","sqrt","startNode","stDev","stDevP","substring","sum","tail","tan","timestamp","toBoolean","toFloat","toInteger","toLower","toString","toUpper","trim","type"],operators:["+","-","*","/","%","^","=","<>","<",">","<=",">=","->","<-","-->","<--"],escapes:/\\(?:[tbnrf\\"'`]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+/,octaldigits:/[0-7]+/,hexdigits:/[0-9a-fA-F]+/,tokenizer:{root:[[/[{}[\]()]/,"@brackets"],{include:"common"}],common:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/:[a-zA-Z_][\w]*/,"type.identifier"],[/[a-zA-Z_][\w]*(?=\()/,{cases:{"@builtinFunctions":"predefined.function"}}],[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":"keyword","@builtinLiterals":"predefined.literal","@default":"identifier"}}],[/`/,"identifier.escape","@identifierBacktick"],[/[;,.:|]/,"delimiter"],[/[<>=%+\-*/^]+/,{cases:{"@operators":"delimiter","@default":""}}]],numbers:[[/-?(@digits)[eE](-?(@digits))?/,"number.float"],[/-?(@digits)?\.(@digits)([eE]-?(@digits))?/,"number.float"],[/-?0x(@hexdigits)/,"number.hex"],[/-?0(@octaldigits)/,"number.octal"],[/-?(@digits)/,"number"]],strings:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@stringDouble"],[/'/,"string","@stringSingle"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/\/\/.*/,"comment"],[/[^/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[/*]/,"comment"]],stringDouble:[[/[^\\"]+/,"string"],[/@escapes/,"string"],[/\\./,"string.invalid"],[/"/,"string","@pop"]],stringSingle:[[/[^\\']+/,"string"],[/@escapes/,"string"],[/\\./,"string.invalid"],[/'/,"string","@pop"]],identifierBacktick:[[/[^\\`]+/,"identifier.escape"],[/@escapes/,"identifier.escape"],[/\\./,"identifier.escape.invalid"],[/`/,"identifier.escape","@pop"]]}}});var Zrt={};Ai(Zrt,{conf:()=>NOt,language:()=>AOt});var NOt,AOt,Xrt=P(()=>{NOt={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:"(",close:")"},{open:'"',close:'"'},{open:"`",close:"`"}],folding:{markers:{start:/^\s*\s*#?region\b/,end:/^\s*\s*#?endregion\b/}}},AOt={defaultToken:"invalid",tokenPostfix:".dart",keywords:["abstract","dynamic","implements","show","as","else","import","static","assert","enum","in","super","async","export","interface","switch","await","extends","is","sync","break","external","library","this","case","factory","mixin","throw","catch","false","new","true","class","final","null","try","const","finally","on","typedef","continue","for","operator","var","covariant","Function","part","void","default","get","rethrow","while","deferred","hide","return","with","do","if","set","yield"],typeKeywords:["int","double","String","bool"],operators:["+","-","*","/","~/","%","++","--","==","!=",">","<",">=","<=","=","-=","/=","%=",">>=","^=","+=","*=","~/=","<<=","&=","!=","||","&&","&","|","^","~","<<",">>","!",">>>","??","?",":","|="],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/\/.*$/,"comment.doc"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"\$]+/,"string"],[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"],[/\$\w+/,"identifier"]],string_single:[[/[^\\'\$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"],[/\$\w+/,"identifier"]]}}});var Qrt={};Ai(Qrt,{conf:()=>ROt,language:()=>POt});var ROt,POt,Jrt=P(()=>{ROt={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},POt={defaultToken:"",tokenPostfix:".dockerfile",variable:/\${?[\w]+}?/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/(ONBUILD)(\s+)/,["keyword",""]],[/(ENV)(\s+)([\w]+)/,["keyword","",{token:"variable",next:"@arguments"}]],[/(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ARG|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|HEALTHCHECK|ENTRYPOINT)/,{token:"keyword",next:"@arguments"}]],arguments:[{include:"@whitespace"},{include:"@strings"},[/(@variable)/,{cases:{"@eos":{token:"variable",next:"@popall"},"@default":"variable"}}],[/\\/,{cases:{"@eos":"","@default":""}}],[/./,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],whitespace:[[/\s+/,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],comment:[[/(^#.*$)/,"comment","@popall"]],strings:[[/\\'$/,"","@popall"],[/\\'/,""],[/'$/,"string","@popall"],[/'/,"string","@stringBody"],[/"$/,"string","@popall"],[/"/,"string","@dblStringBody"]],stringBody:[[/[^\\\$']/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/'$/,"string","@popall"],[/'/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]],dblStringBody:[[/[^\\\$"]/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/"$/,"string","@popall"],[/"/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]]}}});var est={};Ai(est,{conf:()=>OOt,language:()=>zOt});var OOt,zOt,tst=P(()=>{OOt={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}]},zOt={defaultToken:"",tokenPostfix:".ecl",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],pounds:["append","break","declare","demangle","end","for","getdatatype","if","inmodule","loop","mangle","onwarning","option","set","stored","uniquename"].join("|"),keywords:["__compressed__","after","all","and","any","as","atmost","before","beginc","best","between","case","cluster","compressed","compression","const","counter","csv","default","descend","embed","encoding","encrypt","end","endc","endembed","endmacro","enum","escape","except","exclusive","expire","export","extend","fail","few","fileposition","first","flat","forward","from","full","function","functionmacro","group","grouped","heading","hole","ifblock","import","in","inner","interface","internal","joined","keep","keyed","last","left","limit","linkcounted","literal","little_endian","load","local","locale","lookup","lzw","macro","many","maxcount","maxlength","min skew","module","mofn","multiple","named","namespace","nocase","noroot","noscan","nosort","not","noxpath","of","onfail","only","opt","or","outer","overwrite","packed","partition","penalty","physicallength","pipe","prefetch","quote","record","repeat","retry","return","right","right1","right2","rows","rowset","scan","scope","self","separator","service","shared","skew","skip","smart","soapaction","sql","stable","store","terminator","thor","threshold","timelimit","timeout","token","transform","trim","type","unicodeorder","unordered","unsorted","unstable","update","use","validate","virtual","whole","width","wild","within","wnotrim","xml","xpath"],functions:["abs","acos","aggregate","allnodes","apply","ascii","asin","assert","asstring","atan","atan2","ave","build","buildindex","case","catch","choose","choosen","choosesets","clustersize","combine","correlation","cos","cosh","count","covariance","cron","dataset","dedup","define","denormalize","dictionary","distribute","distributed","distribution","ebcdic","enth","error","evaluate","event","eventextra","eventname","exists","exp","fail","failcode","failmessage","fetch","fromunicode","fromxml","getenv","getisvalid","global","graph","group","hash","hash32","hash64","hashcrc","hashmd5","having","httpcall","httpheader","if","iff","index","intformat","isvalid","iterate","join","keydiff","keypatch","keyunicode","length","library","limit","ln","loadxml","local","log","loop","map","matched","matchlength","matchposition","matchtext","matchunicode","max","merge","mergejoin","min","nofold","nolocal","nonempty","normalize","nothor","notify","output","parallel","parse","pipe","power","preload","process","project","pull","random","range","rank","ranked","realformat","recordof","regexfind","regexreplace","regroup","rejected","rollup","round","roundup","row","rowdiff","sample","sequential","set","sin","sinh","sizeof","soapcall","sort","sorted","sqrt","stepped","stored","sum","table","tan","tanh","thisnode","topn","tounicode","toxml","transfer","transform","trim","truncate","typeof","ungroup","unicodeorder","variance","wait","which","workunit","xmldecode","xmlencode","xmltext","xmlunicode"],typesint:["integer","unsigned"].join("|"),typesnum:["data","qstring","string","unicode","utf8","varstring","varunicode"],typesone:["ascii","big_endian","boolean","data","decimal","ebcdic","grouped","integer","linkcounted","pattern","qstring","real","record","rule","set of","streamed","string","token","udecimal","unicode","unsigned","utf8","varstring","varunicode"].join("|"),operators:["+","-","/",":=","<","<>","=",">","\\","and","in","not","or"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]]}}});var ist={};Ai(ist,{conf:()=>FOt,language:()=>HOt});var FOt,HOt,nst=P(()=>{FOt={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:'"',close:'"'}],autoClosingPairs:[{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["comment"]},{open:'"""',close:'"""'},{open:"`",close:"`",notIn:["string","comment"]},{open:"(",close:")"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"<<",close:">>"}],indentationRules:{increaseIndentPattern:/^\s*(after|else|catch|rescue|fn|[^#]*(do|<\-|\->|\{|\[|\=))\s*$/,decreaseIndentPattern:/^\s*((\}|\])\s*$|(after|else|catch|rescue|end)\b)/}},HOt={defaultToken:"source",tokenPostfix:".elixir",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"<<",close:">>",token:"delimiter.angle.special"}],declarationKeywords:["def","defp","defn","defnp","defguard","defguardp","defmacro","defmacrop","defdelegate","defcallback","defmacrocallback","defmodule","defprotocol","defexception","defimpl","defstruct"],operatorKeywords:["and","in","not","or","when"],namespaceKeywords:["alias","import","require","use"],otherKeywords:["after","case","catch","cond","do","else","end","fn","for","if","quote","raise","receive","rescue","super","throw","try","unless","unquote_splicing","unquote","with"],constants:["true","false","nil"],nameBuiltin:["__MODULE__","__DIR__","__ENV__","__CALLER__","__STACKTRACE__"],operator:/-[->]?|!={0,2}|\*{1,2}|\/|\\\\|&{1,3}|\.\.?|\^(?:\^\^)?|\+\+?|<(?:-|<<|=|>|\|>|~>?)?|=~|={1,3}|>(?:=|>>)?|\|~>|\|>|\|{1,3}|~>>?|~~~|::/,variableName:/[a-z_][a-zA-Z0-9_]*[?!]?/,atomName:/[a-zA-Z_][a-zA-Z0-9_@]*[?!]?|@specialAtomName|@operator/,specialAtomName:/\.\.\.|<<>>|%\{\}|%|\{\}/,aliasPart:/[A-Z][a-zA-Z0-9_]*/,moduleName:/@aliasPart(?:\.@aliasPart)*/,sigilSymmetricDelimiter:/"""|'''|"|'|\/|\|/,sigilStartDelimiter:/@sigilSymmetricDelimiter|<|\{|\[|\(/,sigilEndDelimiter:/@sigilSymmetricDelimiter|>|\}|\]|\)/,sigilModifiers:/[a-zA-Z0-9]*/,decimal:/\d(?:_?\d)*/,hex:/[0-9a-fA-F](_?[0-9a-fA-F])*/,octal:/[0-7](_?[0-7])*/,binary:/[01](_?[01])*/,escape:/\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2}|\\./,tokenizer:{root:[{include:"@whitespace"},{include:"@comments"},{include:"@keywordsShorthand"},{include:"@numbers"},{include:"@identifiers"},{include:"@strings"},{include:"@atoms"},{include:"@sigils"},{include:"@attributes"},{include:"@symbols"}],whitespace:[[/\s+/,"white"]],comments:[[/(#)(.*)/,["comment.punctuation","comment"]]],keywordsShorthand:[[/(@atomName)(:)(\s+)/,["constant","constant.punctuation","white"]],[/"(?=([^"]|#\{.*?\}|\\")*":)/,{token:"constant.delimiter",next:"@doubleQuotedStringKeyword"}],[/'(?=([^']|#\{.*?\}|\\')*':)/,{token:"constant.delimiter",next:"@singleQuotedStringKeyword"}]],doubleQuotedStringKeyword:[[/":/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],singleQuotedStringKeyword:[[/':/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],numbers:[[/0b@binary/,"number.binary"],[/0o@octal/,"number.octal"],[/0x@hex/,"number.hex"],[/@decimal\.@decimal([eE]-?@decimal)?/,"number.float"],[/@decimal/,"number"]],identifiers:[[/\b(defp?|defnp?|defmacrop?|defguardp?|defdelegate)(\s+)(@variableName)(?!\s+@operator)/,["keyword.declaration","white",{cases:{unquote:"keyword","@default":"function"}}]],[/(@variableName)(?=\s*\.?\s*\()/,{cases:{"@declarationKeywords":"keyword.declaration","@namespaceKeywords":"keyword","@otherKeywords":"keyword","@default":"function.call"}}],[/(@moduleName)(\s*)(\.)(\s*)(@variableName)/,["type.identifier","white","operator","white","function.call"]],[/(:)(@atomName)(\s*)(\.)(\s*)(@variableName)/,["constant.punctuation","constant","white","operator","white","function.call"]],[/(\|>)(\s*)(@variableName)/,["operator","white",{cases:{"@otherKeywords":"keyword","@default":"function.call"}}]],[/(&)(\s*)(@variableName)/,["operator","white","function.call"]],[/@variableName/,{cases:{"@declarationKeywords":"keyword.declaration","@operatorKeywords":"keyword.operator","@namespaceKeywords":"keyword","@otherKeywords":"keyword","@constants":"constant.language","@nameBuiltin":"variable.language","_.*":"comment.unused","@default":"identifier"}}],[/@moduleName/,"type.identifier"]],strings:[[/"""/,{token:"string.delimiter",next:"@doubleQuotedHeredoc"}],[/'''/,{token:"string.delimiter",next:"@singleQuotedHeredoc"}],[/"/,{token:"string.delimiter",next:"@doubleQuotedString"}],[/'/,{token:"string.delimiter",next:"@singleQuotedString"}]],doubleQuotedHeredoc:[[/"""/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],singleQuotedHeredoc:[[/'''/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],doubleQuotedString:[[/"/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],singleQuotedString:[[/'/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],atoms:[[/(:)(@atomName)/,["constant.punctuation","constant"]],[/:"/,{token:"constant.delimiter",next:"@doubleQuotedStringAtom"}],[/:'/,{token:"constant.delimiter",next:"@singleQuotedStringAtom"}]],doubleQuotedStringAtom:[[/"/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],singleQuotedStringAtom:[[/'/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],sigils:[[/~[a-z]@sigilStartDelimiter/,{token:"@rematch",next:"@sigil.interpol"}],[/~([A-Z]+)@sigilStartDelimiter/,{token:"@rematch",next:"@sigil.noInterpol"}]],sigil:[[/~([a-z]|[A-Z]+)\{/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.{.}"}],[/~([a-z]|[A-Z]+)\[/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.[.]"}],[/~([a-z]|[A-Z]+)\(/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.(.)"}],[/~([a-z]|[A-Z]+)\"}],[/~([a-z]|[A-Z]+)(@sigilSymmetricDelimiter)/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.$2.$2"}]],"sigilStart.interpol.s":[[/~s@sigilStartDelimiter/,{token:"string.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol.s":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"string.delimiter",next:"@pop"},"@default":"string"}}],{include:"@stringContentInterpol"}],"sigilStart.noInterpol.S":[[/~S@sigilStartDelimiter/,{token:"string.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol.S":[[/(^|[^\\])\\@sigilEndDelimiter/,"string"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"string.delimiter",next:"@pop"},"@default":"string"}}],{include:"@stringContent"}],"sigilStart.interpol.r":[[/~r@sigilStartDelimiter/,{token:"regexp.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol.r":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"regexp.delimiter",next:"@pop"},"@default":"regexp"}}],{include:"@regexpContentInterpol"}],"sigilStart.noInterpol.R":[[/~R@sigilStartDelimiter/,{token:"regexp.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol.R":[[/(^|[^\\])\\@sigilEndDelimiter/,"regexp"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"regexp.delimiter",next:"@pop"},"@default":"regexp"}}],{include:"@regexpContent"}],"sigilStart.interpol":[[/~([a-z]|[A-Z]+)@sigilStartDelimiter/,{token:"sigil.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"sigil.delimiter",next:"@pop"},"@default":"sigil"}}],{include:"@sigilContentInterpol"}],"sigilStart.noInterpol":[[/~([a-z]|[A-Z]+)@sigilStartDelimiter/,{token:"sigil.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol":[[/(^|[^\\])\\@sigilEndDelimiter/,"sigil"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"sigil.delimiter",next:"@pop"},"@default":"sigil"}}],{include:"@sigilContent"}],attributes:[[/\@(module|type)?doc (~[sS])?"""/,{token:"comment.block.documentation",next:"@doubleQuotedHeredocDocstring"}],[/\@(module|type)?doc (~[sS])?'''/,{token:"comment.block.documentation",next:"@singleQuotedHeredocDocstring"}],[/\@(module|type)?doc (~[sS])?"/,{token:"comment.block.documentation",next:"@doubleQuotedStringDocstring"}],[/\@(module|type)?doc (~[sS])?'/,{token:"comment.block.documentation",next:"@singleQuotedStringDocstring"}],[/\@(module|type)?doc false/,"comment.block.documentation"],[/\@(@variableName)/,"variable"]],doubleQuotedHeredocDocstring:[[/"""/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],singleQuotedHeredocDocstring:[[/'''/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],doubleQuotedStringDocstring:[[/"/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],singleQuotedStringDocstring:[[/'/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],symbols:[[/\?(\\.|[^\\\s])/,"number.constant"],[/&\d+/,"operator"],[/<<<|>>>/,"operator"],[/[()\[\]\{\}]|<<|>>/,"@brackets"],[/\.\.\./,"identifier"],[/=>/,"punctuation"],[/@operator/,"operator"],[/[:;,.%]/,"punctuation"]],stringContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@stringContent"}],stringContent:[[/./,"string"]],stringConstantContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@stringConstantContent"}],stringConstantContent:[[/./,"constant"]],regexpContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@regexpContent"}],regexpContent:[[/(\s)(#)(\s.*)$/,["white","comment.punctuation","comment"]],[/./,"regexp"]],sigilContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@sigilContent"}],sigilContent:[[/./,"sigil"]],docstringContent:[[/./,"comment.block.documentation"]],escapeChar:[[/@escape/,"constant.character.escape"]],interpolation:[[/#{/,{token:"delimiter.bracket.embed",next:"@interpolationContinue"}]],interpolationContinue:[[/}/,{token:"delimiter.bracket.embed",next:"@pop"}],{include:"@root"}]}}});var ost={};Ai(ost,{conf:()=>BOt,language:()=>VOt});var BOt,VOt,rst=P(()=>{BOt={comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:"(",close:")",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}]},VOt={defaultToken:"",tokenPostfix:".flow",keywords:["import","require","export","forbid","native","if","else","cast","unsafe","switch","default"],types:["io","mutable","bool","int","double","string","flow","void","ref","true","false","with"],operators:["=",">","<","<=",">=","==","!","!=",":=","::=","&&","||","+","-","*","/","@","&","%",":","->","\\","$","??","^"],symbols:/[@$=>](?!@symbols)/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}});var sst={};Ai(sst,{conf:()=>WOt,language:()=>UOt});var WOt,UOt,ast=P(()=>{WOt={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)"),end:new RegExp("^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)")}}},UOt={defaultToken:"",tokenPostfix:".fs",keywords:["abstract","and","atomic","as","assert","asr","base","begin","break","checked","component","const","constraint","constructor","continue","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","eager","event","external","extern","false","finally","for","fun","function","fixed","functor","global","if","in","include","inherit","inline","interface","internal","land","lor","lsl","lsr","lxor","lazy","let","match","member","mod","module","mutable","namespace","method","mixin","new","not","null","of","open","or","object","override","private","parallel","process","protected","pure","public","rec","return","static","sealed","struct","sig","then","to","true","tailcall","trait","try","type","upcast","use","val","void","virtual","volatile","when","while","with","yield"],symbols:/[=>\]/,"annotation"],[/^#(if|else|endif)/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0x[0-9a-fA-F]+LF/,"number.float"],[/0x[0-9a-fA-F]+(@integersuffix)/,"number.hex"],[/0b[0-1]+(@integersuffix)/,"number.bin"],[/\d+(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string",'@string."""'],[/"/,"string",'@string."'],[/\@"/,{token:"string.quote",next:"@litstring"}],[/'[^\\']'B?/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\(\*(?!\))/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^*(]+/,"comment"],[/\*\)/,"comment","@pop"],[/\*/,"comment"],[/\(\*\)/,"comment"],[/\(/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/("""|"B?)/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]]}}});var f8={};Ai(f8,{TagAngleInterpolationBracket:()=>QOt,TagAngleInterpolationDollar:()=>ZOt,TagAutoInterpolationBracket:()=>tzt,TagAutoInterpolationDollar:()=>ezt,TagBracketInterpolationBracket:()=>JOt,TagBracketInterpolationDollar:()=>XOt});function DQ(i){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${i.open}--`,`--${i.close}`]},autoCloseBefore:` -\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${i.open}#(?:${EQ.join("|")})([^/${i.close}]*(?!/)${i.close})[^${i.open}]*$`),end:new RegExp(`${i.open}/#(?:${EQ.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${i.open}#(?!(?:${LQ.join("|")}))([a-zA-Z_]+)([^/${i.close}]*(?!/)${i.close})[^${i.open}]*$`),afterText:new RegExp(`^${i.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${i.close}$`),action:{indentAction:cA.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${i.open}#(?!(?:${LQ.join("|")}))([a-zA-Z_]+)([^/${i.close}]*(?!/)${i.close})[^${i.open}]*$`),action:{indentAction:cA.languages.IndentAction.Indent}}]}}function cst(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:` -\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${EQ.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${EQ.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${LQ.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:cA.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${LQ.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:cA.languages.IndentAction.Indent}}]}}function y7(i,e){let t=`_${i.id}_${e.id}`,n=r=>r.replace(/__id__/g,t),o=r=>{let s=r.source.replace(/__id__/g,t);return new RegExp(s,r.flags)};return{unicode:!0,includeLF:!1,start:n("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[n("open__id__")]:new RegExp(i.open),[n("close__id__")]:new RegExp(i.close),[n("iOpen1__id__")]:new RegExp(e.open1),[n("iOpen2__id__")]:new RegExp(e.open2),[n("iClose__id__")]:new RegExp(e.close),[n("startTag__id__")]:o(/(@open__id__)(#)/),[n("endTag__id__")]:o(/(@open__id__)(\/#)/),[n("startOrEndTag__id__")]:o(/(@open__id__)(\/?#)/),[n("closeTag1__id__")]:o(/((?:@blank)*)(@close__id__)/),[n("closeTag2__id__")]:o(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","->"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[n("default__id__")]:[{include:n("@directive_token__id__")},{include:n("@interpolation_and_text_token__id__")}],[n("fmExpression__id__.directive")]:[{include:n("@blank_and_expression_comment_token__id__")},{include:n("@directive_end_token__id__")},{include:n("@expression_token__id__")}],[n("fmExpression__id__.interpolation")]:[{include:n("@blank_and_expression_comment_token__id__")},{include:n("@expression_token__id__")},{include:n("@greater_operators_token__id__")}],[n("inParen__id__.plain")]:[{include:n("@blank_and_expression_comment_token__id__")},{include:n("@directive_end_token__id__")},{include:n("@expression_token__id__")}],[n("inParen__id__.gt")]:[{include:n("@blank_and_expression_comment_token__id__")},{include:n("@expression_token__id__")},{include:n("@greater_operators_token__id__")}],[n("noSpaceExpression__id__")]:[{include:n("@no_space_expression_end_token__id__")},{include:n("@directive_end_token__id__")},{include:n("@expression_token__id__")}],[n("unifiedCall__id__")]:[{include:n("@unified_call_token__id__")}],[n("singleString__id__")]:[{include:n("@string_single_token__id__")}],[n("doubleString__id__")]:[{include:n("@string_double_token__id__")}],[n("rawSingleString__id__")]:[{include:n("@string_single_raw_token__id__")}],[n("rawDoubleString__id__")]:[{include:n("@string_double_raw_token__id__")}],[n("expressionComment__id__")]:[{include:n("@expression_comment_token__id__")}],[n("noParse__id__")]:[{include:n("@no_parse_token__id__")}],[n("terseComment__id__")]:[{include:n("@terse_comment_token__id__")}],[n("directive_token__id__")]:[[o(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),i.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:n("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),i.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),i.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:n("@fmExpression__id__.directive")}]],[o(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),i.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)(@)/),i.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:n("@unifiedCall__id__")}]],[o(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)#--/),i.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:{token:"comment",next:n("@terseComment__id__")}],[o(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),i.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:n("@fmExpression__id__.directive")}]]],[n("interpolation_and_text_token__id__")]:[[o(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:e.id==="bracket"?"@brackets.interpolation":"delimiter.interpolation"},{token:e.id==="bracket"?"delimiter.interpolation":"@brackets.interpolation",next:n("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[n("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[n("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[n("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[n("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[n("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:n("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:n("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:n("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:n("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:n("@inParen__id__.gt")},"@default":{token:"@brackets",next:n("@inParen__id__.plain")}}},"\\]":{cases:{...e.id==="bracket"?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},...i.id==="bracket"?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[n("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:n("@inParen__id__.gt")},"\\)":{cases:{[n("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:n("@inParen__id__.gt")},"@default":{token:"@brackets",next:n("@inParen__id__.plain")}}},"\\}":{cases:{...e.id==="bracket"?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[n("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[n("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:n("@expressionComment__id__")}]],[n("directive_end_token__id__")]:[[/>/,i.id==="bracket"?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[o(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[n("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[n("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:n("@fmExpression__id__.directive")}]],[n("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:n("@fmExpression__id__.directive")}]],[o(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:n("@noSpaceExpression__id__")}]],[n("no_parse_token__id__")]:[[o(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[n("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[n("terse_comment_token__id__")]:[[o(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function dst(i){let e=y7(dA,i),t=y7(uA,i),n=y7(YOt,i);return{...e,...t,...n,unicode:!0,includeLF:!1,start:`default_auto_${i.id}`,ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...e.tokenizer,...t.tokenizer,...n.tokenizer}}}var $Ot,jOt,qOt,GOt,lst,KOt,cA,LQ,EQ,dA,uA,YOt,H6e,B6e,ZOt,XOt,QOt,JOt,ezt,tzt,p8=P(()=>{ta();$Ot=Object.defineProperty,jOt=Object.getOwnPropertyDescriptor,qOt=Object.getOwnPropertyNames,GOt=Object.prototype.hasOwnProperty,lst=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of qOt(e))!GOt.call(i,o)&&o!==t&&$Ot(i,o,{get:()=>e[o],enumerable:!(n=jOt(e,o))||n.enumerable});return i},KOt=(i,e,t)=>(lst(i,e,"default"),t&&lst(t,e,"default")),cA={};KOt(cA,ir);LQ=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],EQ=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],dA={close:">",id:"angle",open:"<"},uA={close:"\\]",id:"bracket",open:"\\["},YOt={close:"[>\\]]",id:"auto",open:"[<\\[]"},H6e={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},B6e={close:"\\]",id:"bracket",open1:"\\[",open2:"="};ZOt={conf:DQ(dA),language:y7(dA,H6e)},XOt={conf:DQ(uA),language:y7(uA,H6e)},QOt={conf:DQ(dA),language:y7(dA,B6e)},JOt={conf:DQ(uA),language:y7(uA,B6e)},ezt={conf:cst(),language:dst(H6e)},tzt={conf:cst(),language:dst(B6e)}});var ust={};Ai(ust,{conf:()=>izt,language:()=>nzt});var izt,nzt,hst=P(()=>{izt={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"}]},nzt={defaultToken:"",tokenPostfix:".go",keywords:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var","bool","true","false","uint8","uint16","uint32","uint64","int8","int16","int32","int64","float32","float64","complex64","complex128","byte","rune","uint","int","uintptr","string","nil"],operators:["+","-","*","/","%","&","|","^","<<",">>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(",")","","]","{","}",",",";",".",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex"],[/0[0-7']*[0-7]/,"number.octal"],[/0[bB][0-1']*[0-1]/,"number.binary"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/`/,"string","@rawstring"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],rawstring:[[/[^\`]/,"string"],[/`/,"string","@pop"]]}}});var fst={};Ai(fst,{conf:()=>ozt,language:()=>rzt});var ozt,rzt,pst=P(()=>{ozt={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""',notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""'},{open:'"',close:'"'}],folding:{offSide:!0}},rzt={defaultToken:"invalid",tokenPostfix:".gql",keywords:["null","true","false","query","mutation","subscription","extend","schema","directive","scalar","type","interface","union","enum","input","implements","fragment","on"],typeKeywords:["Int","Float","String","Boolean","ID"],directiveLocations:["SCHEMA","SCALAR","OBJECT","FIELD_DEFINITION","ARGUMENT_DEFINITION","INTERFACE","UNION","ENUM","ENUM_VALUE","INPUT_OBJECT","INPUT_FIELD_DEFINITION","QUERY","MUTATION","SUBSCRIPTION","FIELD","FRAGMENT_DEFINITION","FRAGMENT_SPREAD","INLINE_FRAGMENT","VARIABLE_DEFINITION"],operators:["=","!","?",":","&","|"],symbols:/[=!?:&|]+/,escapes:/\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,tokenizer:{root:[[/[a-z_][\w$]*/,{cases:{"@keywords":"keyword","@default":"key.identifier"}}],[/[$][\w$]*/,{cases:{"@keywords":"keyword","@default":"argument.identifier"}}],[/[A-Z][\w\$]*/,{cases:{"@typeKeywords":"keyword","@default":"type.identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,{token:"annotation",log:"annotation token: $0"}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"""/,{token:"string",next:"@mlstring",nextEmbedded:"markdown"}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}]],mlstring:[[/[^"]+/,"string"],['"""',{token:"string",next:"@pop",nextEmbedded:"@pop"}]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/#.*$/,"comment"]]}}});var vst={};Ai(vst,{conf:()=>uzt,language:()=>hzt});var szt,azt,lzt,czt,mst,dzt,V6e,gst,uzt,hzt,_st=P(()=>{ta();szt=Object.defineProperty,azt=Object.getOwnPropertyDescriptor,lzt=Object.getOwnPropertyNames,czt=Object.prototype.hasOwnProperty,mst=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of lzt(e))!czt.call(i,o)&&o!==t&&szt(i,o,{get:()=>e[o],enumerable:!(n=azt(e,o))||n.enumerable});return i},dzt=(i,e,t)=>(mst(i,e,"default"),t&&mst(t,e,"default")),V6e={};dzt(V6e,ir);gst=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],uzt={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[[""],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${gst.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:V6e.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${gst.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:V6e.languages.IndentAction.Indent}}]},hzt={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}}});var bst={};Ai(bst,{conf:()=>fzt,language:()=>pzt});var fzt,pzt,yst=P(()=>{fzt={comments:{lineComment:"#",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},pzt={defaultToken:"",tokenPostfix:".hcl",keywords:["var","local","path","for_each","any","string","number","bool","true","false","null","if ","else ","endif ","for ","in","endfor"],operators:["=",">=","<=","==","!=","+","-","*","/","%","&&","||","!","<",">","?","...",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"/,"string","@string"],[/'/,"invalid"]],heredoc:[[/<<[-]*\s*["]?([\w\-]+)["]?/,{token:"string.heredoc.delimiter",next:"@heredocBody.$1"}]],heredocBody:[[/([\w\-]+)$/,{cases:{"$1==$S2":[{token:"string.heredoc.delimiter",next:"@popall"}],"@default":"string.heredoc"}}],[/./,"string.heredoc"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"],[/#.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/\$\{/,{token:"delimiter",next:"@stringExpression"}],[/[^\\"\$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@popall"]],stringInsideExpression:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],stringExpression:[[/\}/,{token:"delimiter",next:"@pop"}],[/"/,"string","@stringInsideExpression"],{include:"@terraform"}]}}});var xst={};Ai(xst,{conf:()=>yzt,language:()=>Czt});var mzt,gzt,vzt,_zt,Cst,bzt,W6e,wst,yzt,Czt,Sst=P(()=>{ta();mzt=Object.defineProperty,gzt=Object.getOwnPropertyDescriptor,vzt=Object.getOwnPropertyNames,_zt=Object.prototype.hasOwnProperty,Cst=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of vzt(e))!_zt.call(i,o)&&o!==t&&mzt(i,o,{get:()=>e[o],enumerable:!(n=gzt(e,o))||n.enumerable});return i},bzt=(i,e,t)=>(Cst(i,e,"default"),t&&Cst(t,e,"default")),W6e={};bzt(W6e,ir);wst=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],yzt={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${wst.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:W6e.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${wst.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:W6e.languages.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},Czt={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}}});var kst={};Ai(kst,{conf:()=>wzt,language:()=>xzt});var wzt,xzt,Lst=P(()=>{wzt={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},xzt={defaultToken:"",tokenPostfix:".ini",escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^\[[^\]]*\]/,"metatag"],[/(^\w+)(\s*)(\=)/,["key","","delimiter"]],{include:"@whitespace"},[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,""],[/^\s*[#;].*$/,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}});var Est={};Ai(Est,{conf:()=>Szt,language:()=>kzt});var Szt,kzt,Dst=P(()=>{Szt={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},kzt={defaultToken:"",tokenPostfix:".java",keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false","yield","record","sealed","non-sealed","permits"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/0[xX](@hexdigits)[Ll]?/,"number.hex"],[/0(@octaldigits)[Ll]?/,"number.octal"],[/0[bB](@binarydigits)[Ll]?/,"number.binary"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string","@multistring"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],multistring:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"""/,"string","@pop"],[/./,"string"]]}}});var Ist={};Ai(Ist,{conf:()=>U6e,language:()=>Dp});var Lzt,Ezt,Dzt,Tzt,Tst,Izt,hA,U6e,Dp,$6e=P(()=>{ta();Lzt=Object.defineProperty,Ezt=Object.getOwnPropertyDescriptor,Dzt=Object.getOwnPropertyNames,Tzt=Object.prototype.hasOwnProperty,Tst=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Dzt(e))!Tzt.call(i,o)&&o!==t&&Lzt(i,o,{get:()=>e[o],enumerable:!(n=Ezt(e,o))||n.enumerable});return i},Izt=(i,e,t)=>(Tst(i,e,"default"),t&&Tst(t,e,"default")),hA={};Izt(hA,ir);U6e={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:hA.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:hA.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:hA.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:hA.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},Dp={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}}});var Mst={};Ai(Mst,{conf:()=>Mzt,language:()=>Nzt});var Mzt,Nzt,Nst=P(()=>{$6e();Mzt=U6e,Nzt={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:Dp.operators,symbols:Dp.symbols,escapes:Dp.escapes,digits:Dp.digits,octaldigits:Dp.octaldigits,binarydigits:Dp.binarydigits,hexdigits:Dp.hexdigits,regexpctl:Dp.regexpctl,regexpesc:Dp.regexpesc,tokenizer:Dp.tokenizer}});var Ast={};Ai(Ast,{conf:()=>Azt,language:()=>Rzt});var Azt,Rzt,Rst=P(()=>{Azt={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},Rzt={tokenPostfix:".julia",keywords:["begin","while","if","for","try","return","break","continue","function","macro","quote","let","local","global","const","do","struct","module","baremodule","using","import","export","end","else","elseif","catch","finally","mutable","primitive","abstract","type","in","isa","where","new"],types:["LinRange","LineNumberNode","LinearIndices","LoadError","MIME","Matrix","Method","MethodError","Missing","MissingException","Module","NTuple","NamedTuple","Nothing","Number","OrdinalRange","OutOfMemoryError","OverflowError","Pair","PartialQuickSort","PermutedDimsArray","Pipe","Ptr","QuoteNode","Rational","RawFD","ReadOnlyMemoryError","Real","ReentrantLock","Ref","Regex","RegexMatch","RoundingMode","SegmentationFault","Set","Signed","Some","StackOverflowError","StepRange","StepRangeLen","StridedArray","StridedMatrix","StridedVecOrMat","StridedVector","String","StringIndexError","SubArray","SubString","SubstitutionString","Symbol","SystemError","Task","Text","TextDisplay","Timer","Tuple","Type","TypeError","TypeVar","UInt","UInt128","UInt16","UInt32","UInt64","UInt8","UndefInitializer","AbstractArray","UndefKeywordError","AbstractChannel","UndefRefError","AbstractChar","UndefVarError","AbstractDict","Union","AbstractDisplay","UnionAll","AbstractFloat","UnitRange","AbstractIrrational","Unsigned","AbstractMatrix","AbstractRange","Val","AbstractSet","Vararg","AbstractString","VecElement","AbstractUnitRange","VecOrMat","AbstractVecOrMat","Vector","AbstractVector","VersionNumber","Any","WeakKeyDict","ArgumentError","WeakRef","Array","AssertionError","BigFloat","BigInt","BitArray","BitMatrix","BitSet","BitVector","Bool","BoundsError","CapturedException","CartesianIndex","CartesianIndices","Cchar","Cdouble","Cfloat","Channel","Char","Cint","Cintmax_t","Clong","Clonglong","Cmd","Colon","Complex","ComplexF16","ComplexF32","ComplexF64","CompositeException","Condition","Cptrdiff_t","Cshort","Csize_t","Cssize_t","Cstring","Cuchar","Cuint","Cuintmax_t","Culong","Culonglong","Cushort","Cvoid","Cwchar_t","Cwstring","DataType","DenseArray","DenseMatrix","DenseVecOrMat","DenseVector","Dict","DimensionMismatch","Dims","DivideError","DomainError","EOFError","Enum","ErrorException","Exception","ExponentialBackOff","Expr","Float16","Float32","Float64","Function","GlobalRef","HTML","IO","IOBuffer","IOContext","IOStream","IdDict","IndexCartesian","IndexLinear","IndexStyle","InexactError","InitError","Int","Int128","Int16","Int32","Int64","Int8","Integer","InterruptException","InvalidStateException","Irrational","KeyError"],keywordops:["<:",">:",":","=>","...",".","->","?"],allops:/[^\w\d\s()\[\]{}"'#]+/,constants:["true","false","nothing","missing","undef","Inf","pi","NaN","\u03C0","\u212F","ans","PROGRAM_FILE","ARGS","C_NULL","VERSION","DEPOT_PATH","LOAD_PATH"],operators:["!","!=","!==","%","&","*","+","-","/","//","<","<<","<=","==","===","=>",">",">=",">>",">>>","\\","^","|","|>","~","\xF7","\u2208","\u2209","\u220B","\u220C","\u2218","\u221A","\u221B","\u2229","\u222A","\u2248","\u2249","\u2260","\u2261","\u2262","\u2264","\u2265","\u2286","\u2287","\u2288","\u2289","\u228A","\u228B","\u22BB"],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],ident:/π|ℯ|\b(?!\d)\w+\b/,escape:/(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,escapes:/\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,tokenizer:{root:[[/(::)\s*|\b(isa)\s+/,"keyword","@typeanno"],[/\b(isa)(\s*\(@ident\s*,\s*)/,["keyword",{token:"",next:"@typeanno"}]],[/\b(type|struct)[ \t]+/,"keyword","@typeanno"],[/^\s*:@ident[!?]?/,"metatag"],[/(return)(\s*:@ident[!?]?)/,["keyword","metatag"]],[/(\(|\[|\{|@allops)(\s*:@ident[!?]?)/,["","metatag"]],[/:\(/,"metatag","@quote"],[/r"""/,"regexp.delim","@tregexp"],[/r"/,"regexp.delim","@sregexp"],[/raw"""/,"string.delim","@rtstring"],[/[bv]?"""/,"string.delim","@dtstring"],[/raw"/,"string.delim","@rsstring"],[/[bv]?"/,"string.delim","@dsstring"],[/(@ident)\{/,{cases:{"$1@types":{token:"type",next:"@gen"},"@default":{token:"type",next:"@gen"}}}],[/@ident[!?'']?(?=\.?\()/,{cases:{"@types":"type","@keywords":"keyword","@constants":"variable","@default":"keyword.flow"}}],[/@ident[!?']?/,{cases:{"@types":"type","@keywords":"keyword","@constants":"variable","@default":"identifier"}}],[/\$\w+/,"key"],[/\$\(/,"key","@paste"],[/@@@ident/,"annotation"],{include:"@whitespace"},[/'(?:@escapes|.)'/,"string.character"],[/[()\[\]{}]/,"@brackets"],[/@allops/,{cases:{"@keywordops":"keyword","@operators":"operator"}}],[/[;,]/,"delimiter"],[/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/,"number.hex"],[/0[_oO][0-7](_?[0-7])*/,"number.octal"],[/0[bB][01](_?[01])*/,"number.binary"],[/[+\-]?\d+(\.\d+)?(im?|[eE][+\-]?\d+(\.\d+)?)?/,"number"]],typeanno:[[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/,"type","@gen"],[/([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(\s*<:\s*)/,["type","keyword"]],[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/,"type","@pop"],["","","@pop"]],gen:[[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/,"type","@push"],[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/,"type"],[/<:/,"keyword"],[/(\})(\s*<:\s*)/,["type",{token:"keyword",next:"@pop"}]],[/\}/,"type","@pop"],{include:"@root"}],quote:[[/\$\(/,"key","@paste"],[/\(/,"@brackets","@paren"],[/\)/,"metatag","@pop"],{include:"@root"}],paste:[[/:\(/,"metatag","@quote"],[/\(/,"@brackets","@paren"],[/\)/,"key","@pop"],{include:"@root"}],paren:[[/\$\(/,"key","@paste"],[/:\(/,"metatag","@quote"],[/\(/,"@brackets","@push"],[/\)/,"@brackets","@pop"],{include:"@root"}],sregexp:[[/^.*/,"invalid"],[/[^\\"()\[\]{}]/,"regexp"],[/[()\[\]{}]/,"@brackets"],[/\\./,"operator.scss"],[/"[imsx]*/,"regexp.delim","@pop"]],tregexp:[[/[^\\"()\[\]{}]/,"regexp"],[/[()\[\]{}]/,"@brackets"],[/\\./,"operator.scss"],[/"(?!"")/,"string"],[/"""[imsx]*/,"regexp.delim","@pop"]],rsstring:[[/^.*/,"invalid"],[/[^\\"]/,"string"],[/\\./,"string.escape"],[/"/,"string.delim","@pop"]],rtstring:[[/[^\\"]/,"string"],[/\\./,"string.escape"],[/"(?!"")/,"string"],[/"""/,"string.delim","@pop"]],dsstring:[[/^.*/,"invalid"],[/[^\\"\$]/,"string"],[/\$/,"","@interpolated"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string.delim","@pop"]],dtstring:[[/[^\\"\$]/,"string"],[/\$/,"","@interpolated"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"(?!"")/,"string"],[/"""/,"string.delim","@pop"]],interpolated:[[/\(/,{token:"",switchTo:"@interpolated_compound"}],[/[a-zA-Z_]\w*/,"identifier"],["","","@pop"]],interpolated_compound:[[/\)/,"","@pop"],{include:"@root"}],whitespace:[[/[ \t\r\n]+/,""],[/#=/,"comment","@multi_comment"],[/#.*$/,"comment"]],multi_comment:[[/#=/,"comment","@push"],[/=#/,"comment","@pop"],[/=(?!#)|#(?!=)/,"comment"],[/[^#=]+/,"comment"]]}}});var Pst={};Ai(Pst,{conf:()=>Pzt,language:()=>Ozt});var Pzt,Ozt,Ost=P(()=>{Pzt={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},Ozt={defaultToken:"",tokenPostfix:".kt",keywords:["as","as?","break","class","continue","do","else","false","for","fun","if","in","!in","interface","is","!is","null","object","package","return","super","this","throw","true","try","typealias","val","var","when","while","by","catch","constructor","delegate","dynamic","field","file","finally","get","import","init","param","property","receiver","set","setparam","where","actual","abstract","annotation","companion","const","crossinline","data","enum","expect","external","final","infix","inline","inner","internal","lateinit","noinline","open","operator","out","override","private","protected","public","reified","sealed","suspend","tailrec","vararg","field","it"],operators:["+","-","*","/","%","=","+=","-=","*=","/=","%=","++","--","&&","||","!","==","!=","===","!==",">","<","<=",">=","[","]","!!","?.","?:","::","..",":","?","->","@",";","$","_"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/0[xX](@hexdigits)[Ll]?/,"number.hex"],[/0(@octaldigits)[Ll]?/,"number.octal"],[/0[bB](@binarydigits)[Ll]?/,"number.binary"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string","@multistring"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc","@push"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],multistring:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"""/,"string","@pop"],[/./,"string"]]}}});var zst={};Ai(zst,{conf:()=>zzt,language:()=>Fzt});var zzt,Fzt,Fst=P(()=>{zzt={wordPattern:/(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},Fzt={defaultToken:"",tokenPostfix:".less",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",identifierPlus:"-?-?([a-zA-Z:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@nestedJSBegin"},["[ \\t\\r\\n]+",""],{include:"@comments"},{include:"@keyword"},{include:"@strings"},{include:"@numbers"},["[*_]?[a-zA-Z\\-\\s]+(?=:.*(;|(\\\\$)))","attribute.name","@attribute"],["url(\\-prefix)?\\(",{token:"tag",next:"@urldeclaration"}],["[{}()\\[\\]]","@brackets"],["[,:;]","delimiter"],["#@identifierPlus","tag.id"],["&","tag"],["\\.@identifierPlus(?=\\()","tag.class","@attribute"],["\\.@identifierPlus","tag.class"],["@identifierPlus","tag"],{include:"@operators"},["@(@identifier(?=[:,\\)]))","variable","@attribute"],["@(@identifier)","variable"],["@","key","@atRules"]],nestedJSBegin:[["``","delimiter.backtick"],["`",{token:"delimiter.backtick",next:"@nestedJSEnd",nextEmbedded:"text/javascript"}]],nestedJSEnd:[["`",{token:"delimiter.backtick",next:"@pop",nextEmbedded:"@pop"}]],operators:[["[<>=\\+\\-\\*\\/\\^\\|\\~]","operator"]],keyword:[["(@[\\s]*import|![\\s]*important|true|false|when|iscolor|isnumber|isstring|iskeyword|isurl|ispixel|ispercentage|isem|hue|saturation|lightness|alpha|lighten|darken|saturate|desaturate|fadein|fadeout|fade|spin|mix|round|ceil|floor|percentage)\\b","keyword"]],urldeclaration:[{include:"@strings"},[`[^)\r +]+`,"string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}}});var Krt={};Ai(Krt,{conf:()=>IOt,language:()=>MOt});var IOt,MOt,Yrt=P(()=>{IOt={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},MOt={defaultToken:"",tokenPostfix:".cypher",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ALL","AND","AS","ASC","ASCENDING","BY","CALL","CASE","CONTAINS","CREATE","DELETE","DESC","DESCENDING","DETACH","DISTINCT","ELSE","END","ENDS","EXISTS","IN","IS","LIMIT","MANDATORY","MATCH","MERGE","NOT","ON","ON","OPTIONAL","OR","ORDER","REMOVE","RETURN","SET","SKIP","STARTS","THEN","UNION","UNWIND","WHEN","WHERE","WITH","XOR","YIELD"],builtinLiterals:["true","TRUE","false","FALSE","null","NULL"],builtinFunctions:["abs","acos","asin","atan","atan2","avg","ceil","coalesce","collect","cos","cot","count","degrees","e","endNode","exists","exp","floor","head","id","keys","labels","last","left","length","log","log10","lTrim","max","min","nodes","percentileCont","percentileDisc","pi","properties","radians","rand","range","relationships","replace","reverse","right","round","rTrim","sign","sin","size","split","sqrt","startNode","stDev","stDevP","substring","sum","tail","tan","timestamp","toBoolean","toFloat","toInteger","toLower","toString","toUpper","trim","type"],operators:["+","-","*","/","%","^","=","<>","<",">","<=",">=","->","<-","-->","<--"],escapes:/\\(?:[tbnrf\\"'`]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+/,octaldigits:/[0-7]+/,hexdigits:/[0-9a-fA-F]+/,tokenizer:{root:[[/[{}[\]()]/,"@brackets"],{include:"common"}],common:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/:[a-zA-Z_][\w]*/,"type.identifier"],[/[a-zA-Z_][\w]*(?=\()/,{cases:{"@builtinFunctions":"predefined.function"}}],[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":"keyword","@builtinLiterals":"predefined.literal","@default":"identifier"}}],[/`/,"identifier.escape","@identifierBacktick"],[/[;,.:|]/,"delimiter"],[/[<>=%+\-*/^]+/,{cases:{"@operators":"delimiter","@default":""}}]],numbers:[[/-?(@digits)[eE](-?(@digits))?/,"number.float"],[/-?(@digits)?\.(@digits)([eE]-?(@digits))?/,"number.float"],[/-?0x(@hexdigits)/,"number.hex"],[/-?0(@octaldigits)/,"number.octal"],[/-?(@digits)/,"number"]],strings:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@stringDouble"],[/'/,"string","@stringSingle"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/\/\/.*/,"comment"],[/[^/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[/*]/,"comment"]],stringDouble:[[/[^\\"]+/,"string"],[/@escapes/,"string"],[/\\./,"string.invalid"],[/"/,"string","@pop"]],stringSingle:[[/[^\\']+/,"string"],[/@escapes/,"string"],[/\\./,"string.invalid"],[/'/,"string","@pop"]],identifierBacktick:[[/[^\\`]+/,"identifier.escape"],[/@escapes/,"identifier.escape"],[/\\./,"identifier.escape.invalid"],[/`/,"identifier.escape","@pop"]]}}});var Zrt={};Ai(Zrt,{conf:()=>NOt,language:()=>AOt});var NOt,AOt,Xrt=P(()=>{NOt={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:"(",close:")"},{open:'"',close:'"'},{open:"`",close:"`"}],folding:{markers:{start:/^\s*\s*#?region\b/,end:/^\s*\s*#?endregion\b/}}},AOt={defaultToken:"invalid",tokenPostfix:".dart",keywords:["abstract","dynamic","implements","show","as","else","import","static","assert","enum","in","super","async","export","interface","switch","await","extends","is","sync","break","external","library","this","case","factory","mixin","throw","catch","false","new","true","class","final","null","try","const","finally","on","typedef","continue","for","operator","var","covariant","Function","part","void","default","get","rethrow","while","deferred","hide","return","with","do","if","set","yield"],typeKeywords:["int","double","String","bool"],operators:["+","-","*","/","~/","%","++","--","==","!=",">","<",">=","<=","=","-=","/=","%=",">>=","^=","+=","*=","~/=","<<=","&=","!=","||","&&","&","|","^","~","<<",">>","!",">>>","??","?",":","|="],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/\/.*$/,"comment.doc"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"\$]+/,"string"],[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"],[/\$\w+/,"identifier"]],string_single:[[/[^\\'\$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"],[/\$\w+/,"identifier"]]}}});var Qrt={};Ai(Qrt,{conf:()=>ROt,language:()=>POt});var ROt,POt,Jrt=P(()=>{ROt={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},POt={defaultToken:"",tokenPostfix:".dockerfile",variable:/\${?[\w]+}?/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/(ONBUILD)(\s+)/,["keyword",""]],[/(ENV)(\s+)([\w]+)/,["keyword","",{token:"variable",next:"@arguments"}]],[/(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ARG|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|HEALTHCHECK|ENTRYPOINT)/,{token:"keyword",next:"@arguments"}]],arguments:[{include:"@whitespace"},{include:"@strings"},[/(@variable)/,{cases:{"@eos":{token:"variable",next:"@popall"},"@default":"variable"}}],[/\\/,{cases:{"@eos":"","@default":""}}],[/./,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],whitespace:[[/\s+/,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],comment:[[/(^#.*$)/,"comment","@popall"]],strings:[[/\\'$/,"","@popall"],[/\\'/,""],[/'$/,"string","@popall"],[/'/,"string","@stringBody"],[/"$/,"string","@popall"],[/"/,"string","@dblStringBody"]],stringBody:[[/[^\\\$']/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/'$/,"string","@popall"],[/'/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]],dblStringBody:[[/[^\\\$"]/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/"$/,"string","@popall"],[/"/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]]}}});var est={};Ai(est,{conf:()=>OOt,language:()=>zOt});var OOt,zOt,tst=P(()=>{OOt={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}]},zOt={defaultToken:"",tokenPostfix:".ecl",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],pounds:["append","break","declare","demangle","end","for","getdatatype","if","inmodule","loop","mangle","onwarning","option","set","stored","uniquename"].join("|"),keywords:["__compressed__","after","all","and","any","as","atmost","before","beginc","best","between","case","cluster","compressed","compression","const","counter","csv","default","descend","embed","encoding","encrypt","end","endc","endembed","endmacro","enum","escape","except","exclusive","expire","export","extend","fail","few","fileposition","first","flat","forward","from","full","function","functionmacro","group","grouped","heading","hole","ifblock","import","in","inner","interface","internal","joined","keep","keyed","last","left","limit","linkcounted","literal","little_endian","load","local","locale","lookup","lzw","macro","many","maxcount","maxlength","min skew","module","mofn","multiple","named","namespace","nocase","noroot","noscan","nosort","not","noxpath","of","onfail","only","opt","or","outer","overwrite","packed","partition","penalty","physicallength","pipe","prefetch","quote","record","repeat","retry","return","right","right1","right2","rows","rowset","scan","scope","self","separator","service","shared","skew","skip","smart","soapaction","sql","stable","store","terminator","thor","threshold","timelimit","timeout","token","transform","trim","type","unicodeorder","unordered","unsorted","unstable","update","use","validate","virtual","whole","width","wild","within","wnotrim","xml","xpath"],functions:["abs","acos","aggregate","allnodes","apply","ascii","asin","assert","asstring","atan","atan2","ave","build","buildindex","case","catch","choose","choosen","choosesets","clustersize","combine","correlation","cos","cosh","count","covariance","cron","dataset","dedup","define","denormalize","dictionary","distribute","distributed","distribution","ebcdic","enth","error","evaluate","event","eventextra","eventname","exists","exp","fail","failcode","failmessage","fetch","fromunicode","fromxml","getenv","getisvalid","global","graph","group","hash","hash32","hash64","hashcrc","hashmd5","having","httpcall","httpheader","if","iff","index","intformat","isvalid","iterate","join","keydiff","keypatch","keyunicode","length","library","limit","ln","loadxml","local","log","loop","map","matched","matchlength","matchposition","matchtext","matchunicode","max","merge","mergejoin","min","nofold","nolocal","nonempty","normalize","nothor","notify","output","parallel","parse","pipe","power","preload","process","project","pull","random","range","rank","ranked","realformat","recordof","regexfind","regexreplace","regroup","rejected","rollup","round","roundup","row","rowdiff","sample","sequential","set","sin","sinh","sizeof","soapcall","sort","sorted","sqrt","stepped","stored","sum","table","tan","tanh","thisnode","topn","tounicode","toxml","transfer","transform","trim","truncate","typeof","ungroup","unicodeorder","variance","wait","which","workunit","xmldecode","xmlencode","xmltext","xmlunicode"],typesint:["integer","unsigned"].join("|"),typesnum:["data","qstring","string","unicode","utf8","varstring","varunicode"],typesone:["ascii","big_endian","boolean","data","decimal","ebcdic","grouped","integer","linkcounted","pattern","qstring","real","record","rule","set of","streamed","string","token","udecimal","unicode","unsigned","utf8","varstring","varunicode"].join("|"),operators:["+","-","/",":=","<","<>","=",">","\\","and","in","not","or"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]]}}});var ist={};Ai(ist,{conf:()=>FOt,language:()=>HOt});var FOt,HOt,nst=P(()=>{FOt={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:'"',close:'"'}],autoClosingPairs:[{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["comment"]},{open:'"""',close:'"""'},{open:"`",close:"`",notIn:["string","comment"]},{open:"(",close:")"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"<<",close:">>"}],indentationRules:{increaseIndentPattern:/^\s*(after|else|catch|rescue|fn|[^#]*(do|<\-|\->|\{|\[|\=))\s*$/,decreaseIndentPattern:/^\s*((\}|\])\s*$|(after|else|catch|rescue|end)\b)/}},HOt={defaultToken:"source",tokenPostfix:".elixir",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"<<",close:">>",token:"delimiter.angle.special"}],declarationKeywords:["def","defp","defn","defnp","defguard","defguardp","defmacro","defmacrop","defdelegate","defcallback","defmacrocallback","defmodule","defprotocol","defexception","defimpl","defstruct"],operatorKeywords:["and","in","not","or","when"],namespaceKeywords:["alias","import","require","use"],otherKeywords:["after","case","catch","cond","do","else","end","fn","for","if","quote","raise","receive","rescue","super","throw","try","unless","unquote_splicing","unquote","with"],constants:["true","false","nil"],nameBuiltin:["__MODULE__","__DIR__","__ENV__","__CALLER__","__STACKTRACE__"],operator:/-[->]?|!={0,2}|\*{1,2}|\/|\\\\|&{1,3}|\.\.?|\^(?:\^\^)?|\+\+?|<(?:-|<<|=|>|\|>|~>?)?|=~|={1,3}|>(?:=|>>)?|\|~>|\|>|\|{1,3}|~>>?|~~~|::/,variableName:/[a-z_][a-zA-Z0-9_]*[?!]?/,atomName:/[a-zA-Z_][a-zA-Z0-9_@]*[?!]?|@specialAtomName|@operator/,specialAtomName:/\.\.\.|<<>>|%\{\}|%|\{\}/,aliasPart:/[A-Z][a-zA-Z0-9_]*/,moduleName:/@aliasPart(?:\.@aliasPart)*/,sigilSymmetricDelimiter:/"""|'''|"|'|\/|\|/,sigilStartDelimiter:/@sigilSymmetricDelimiter|<|\{|\[|\(/,sigilEndDelimiter:/@sigilSymmetricDelimiter|>|\}|\]|\)/,sigilModifiers:/[a-zA-Z0-9]*/,decimal:/\d(?:_?\d)*/,hex:/[0-9a-fA-F](_?[0-9a-fA-F])*/,octal:/[0-7](_?[0-7])*/,binary:/[01](_?[01])*/,escape:/\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2}|\\./,tokenizer:{root:[{include:"@whitespace"},{include:"@comments"},{include:"@keywordsShorthand"},{include:"@numbers"},{include:"@identifiers"},{include:"@strings"},{include:"@atoms"},{include:"@sigils"},{include:"@attributes"},{include:"@symbols"}],whitespace:[[/\s+/,"white"]],comments:[[/(#)(.*)/,["comment.punctuation","comment"]]],keywordsShorthand:[[/(@atomName)(:)(\s+)/,["constant","constant.punctuation","white"]],[/"(?=([^"]|#\{.*?\}|\\")*":)/,{token:"constant.delimiter",next:"@doubleQuotedStringKeyword"}],[/'(?=([^']|#\{.*?\}|\\')*':)/,{token:"constant.delimiter",next:"@singleQuotedStringKeyword"}]],doubleQuotedStringKeyword:[[/":/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],singleQuotedStringKeyword:[[/':/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],numbers:[[/0b@binary/,"number.binary"],[/0o@octal/,"number.octal"],[/0x@hex/,"number.hex"],[/@decimal\.@decimal([eE]-?@decimal)?/,"number.float"],[/@decimal/,"number"]],identifiers:[[/\b(defp?|defnp?|defmacrop?|defguardp?|defdelegate)(\s+)(@variableName)(?!\s+@operator)/,["keyword.declaration","white",{cases:{unquote:"keyword","@default":"function"}}]],[/(@variableName)(?=\s*\.?\s*\()/,{cases:{"@declarationKeywords":"keyword.declaration","@namespaceKeywords":"keyword","@otherKeywords":"keyword","@default":"function.call"}}],[/(@moduleName)(\s*)(\.)(\s*)(@variableName)/,["type.identifier","white","operator","white","function.call"]],[/(:)(@atomName)(\s*)(\.)(\s*)(@variableName)/,["constant.punctuation","constant","white","operator","white","function.call"]],[/(\|>)(\s*)(@variableName)/,["operator","white",{cases:{"@otherKeywords":"keyword","@default":"function.call"}}]],[/(&)(\s*)(@variableName)/,["operator","white","function.call"]],[/@variableName/,{cases:{"@declarationKeywords":"keyword.declaration","@operatorKeywords":"keyword.operator","@namespaceKeywords":"keyword","@otherKeywords":"keyword","@constants":"constant.language","@nameBuiltin":"variable.language","_.*":"comment.unused","@default":"identifier"}}],[/@moduleName/,"type.identifier"]],strings:[[/"""/,{token:"string.delimiter",next:"@doubleQuotedHeredoc"}],[/'''/,{token:"string.delimiter",next:"@singleQuotedHeredoc"}],[/"/,{token:"string.delimiter",next:"@doubleQuotedString"}],[/'/,{token:"string.delimiter",next:"@singleQuotedString"}]],doubleQuotedHeredoc:[[/"""/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],singleQuotedHeredoc:[[/'''/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],doubleQuotedString:[[/"/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],singleQuotedString:[[/'/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],atoms:[[/(:)(@atomName)/,["constant.punctuation","constant"]],[/:"/,{token:"constant.delimiter",next:"@doubleQuotedStringAtom"}],[/:'/,{token:"constant.delimiter",next:"@singleQuotedStringAtom"}]],doubleQuotedStringAtom:[[/"/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],singleQuotedStringAtom:[[/'/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],sigils:[[/~[a-z]@sigilStartDelimiter/,{token:"@rematch",next:"@sigil.interpol"}],[/~([A-Z]+)@sigilStartDelimiter/,{token:"@rematch",next:"@sigil.noInterpol"}]],sigil:[[/~([a-z]|[A-Z]+)\{/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.{.}"}],[/~([a-z]|[A-Z]+)\[/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.[.]"}],[/~([a-z]|[A-Z]+)\(/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.(.)"}],[/~([a-z]|[A-Z]+)\"}],[/~([a-z]|[A-Z]+)(@sigilSymmetricDelimiter)/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.$2.$2"}]],"sigilStart.interpol.s":[[/~s@sigilStartDelimiter/,{token:"string.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol.s":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"string.delimiter",next:"@pop"},"@default":"string"}}],{include:"@stringContentInterpol"}],"sigilStart.noInterpol.S":[[/~S@sigilStartDelimiter/,{token:"string.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol.S":[[/(^|[^\\])\\@sigilEndDelimiter/,"string"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"string.delimiter",next:"@pop"},"@default":"string"}}],{include:"@stringContent"}],"sigilStart.interpol.r":[[/~r@sigilStartDelimiter/,{token:"regexp.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol.r":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"regexp.delimiter",next:"@pop"},"@default":"regexp"}}],{include:"@regexpContentInterpol"}],"sigilStart.noInterpol.R":[[/~R@sigilStartDelimiter/,{token:"regexp.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol.R":[[/(^|[^\\])\\@sigilEndDelimiter/,"regexp"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"regexp.delimiter",next:"@pop"},"@default":"regexp"}}],{include:"@regexpContent"}],"sigilStart.interpol":[[/~([a-z]|[A-Z]+)@sigilStartDelimiter/,{token:"sigil.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"sigil.delimiter",next:"@pop"},"@default":"sigil"}}],{include:"@sigilContentInterpol"}],"sigilStart.noInterpol":[[/~([a-z]|[A-Z]+)@sigilStartDelimiter/,{token:"sigil.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol":[[/(^|[^\\])\\@sigilEndDelimiter/,"sigil"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"sigil.delimiter",next:"@pop"},"@default":"sigil"}}],{include:"@sigilContent"}],attributes:[[/\@(module|type)?doc (~[sS])?"""/,{token:"comment.block.documentation",next:"@doubleQuotedHeredocDocstring"}],[/\@(module|type)?doc (~[sS])?'''/,{token:"comment.block.documentation",next:"@singleQuotedHeredocDocstring"}],[/\@(module|type)?doc (~[sS])?"/,{token:"comment.block.documentation",next:"@doubleQuotedStringDocstring"}],[/\@(module|type)?doc (~[sS])?'/,{token:"comment.block.documentation",next:"@singleQuotedStringDocstring"}],[/\@(module|type)?doc false/,"comment.block.documentation"],[/\@(@variableName)/,"variable"]],doubleQuotedHeredocDocstring:[[/"""/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],singleQuotedHeredocDocstring:[[/'''/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],doubleQuotedStringDocstring:[[/"/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],singleQuotedStringDocstring:[[/'/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],symbols:[[/\?(\\.|[^\\\s])/,"number.constant"],[/&\d+/,"operator"],[/<<<|>>>/,"operator"],[/[()\[\]\{\}]|<<|>>/,"@brackets"],[/\.\.\./,"identifier"],[/=>/,"punctuation"],[/@operator/,"operator"],[/[:;,.%]/,"punctuation"]],stringContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@stringContent"}],stringContent:[[/./,"string"]],stringConstantContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@stringConstantContent"}],stringConstantContent:[[/./,"constant"]],regexpContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@regexpContent"}],regexpContent:[[/(\s)(#)(\s.*)$/,["white","comment.punctuation","comment"]],[/./,"regexp"]],sigilContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@sigilContent"}],sigilContent:[[/./,"sigil"]],docstringContent:[[/./,"comment.block.documentation"]],escapeChar:[[/@escape/,"constant.character.escape"]],interpolation:[[/#{/,{token:"delimiter.bracket.embed",next:"@interpolationContinue"}]],interpolationContinue:[[/}/,{token:"delimiter.bracket.embed",next:"@pop"}],{include:"@root"}]}}});var ost={};Ai(ost,{conf:()=>BOt,language:()=>VOt});var BOt,VOt,rst=P(()=>{BOt={comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:"(",close:")",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}]},VOt={defaultToken:"",tokenPostfix:".flow",keywords:["import","require","export","forbid","native","if","else","cast","unsafe","switch","default"],types:["io","mutable","bool","int","double","string","flow","void","ref","true","false","with"],operators:["=",">","<","<=",">=","==","!","!=",":=","::=","&&","||","+","-","*","/","@","&","%",":","->","\\","$","??","^"],symbols:/[@$=>](?!@symbols)/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}});var sst={};Ai(sst,{conf:()=>WOt,language:()=>UOt});var WOt,UOt,ast=P(()=>{WOt={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)"),end:new RegExp("^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)")}}},UOt={defaultToken:"",tokenPostfix:".fs",keywords:["abstract","and","atomic","as","assert","asr","base","begin","break","checked","component","const","constraint","constructor","continue","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","eager","event","external","extern","false","finally","for","fun","function","fixed","functor","global","if","in","include","inherit","inline","interface","internal","land","lor","lsl","lsr","lxor","lazy","let","match","member","mod","module","mutable","namespace","method","mixin","new","not","null","of","open","or","object","override","private","parallel","process","protected","pure","public","rec","return","static","sealed","struct","sig","then","to","true","tailcall","trait","try","type","upcast","use","val","void","virtual","volatile","when","while","with","yield"],symbols:/[=>\]/,"annotation"],[/^#(if|else|endif)/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0x[0-9a-fA-F]+LF/,"number.float"],[/0x[0-9a-fA-F]+(@integersuffix)/,"number.hex"],[/0b[0-1]+(@integersuffix)/,"number.bin"],[/\d+(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string",'@string."""'],[/"/,"string",'@string."'],[/\@"/,{token:"string.quote",next:"@litstring"}],[/'[^\\']'B?/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\(\*(?!\))/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^*(]+/,"comment"],[/\*\)/,"comment","@pop"],[/\*/,"comment"],[/\(\*\)/,"comment"],[/\(/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/("""|"B?)/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]]}}});var p8={};Ai(p8,{TagAngleInterpolationBracket:()=>QOt,TagAngleInterpolationDollar:()=>ZOt,TagAutoInterpolationBracket:()=>tzt,TagAutoInterpolationDollar:()=>ezt,TagBracketInterpolationBracket:()=>JOt,TagBracketInterpolationDollar:()=>XOt});function MQ(i){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${i.open}--`,`--${i.close}`]},autoCloseBefore:` +\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${i.open}#(?:${IQ.join("|")})([^/${i.close}]*(?!/)${i.close})[^${i.open}]*$`),end:new RegExp(`${i.open}/#(?:${IQ.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${i.open}#(?!(?:${TQ.join("|")}))([a-zA-Z_]+)([^/${i.close}]*(?!/)${i.close})[^${i.open}]*$`),afterText:new RegExp(`^${i.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${i.close}$`),action:{indentAction:cA.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${i.open}#(?!(?:${TQ.join("|")}))([a-zA-Z_]+)([^/${i.close}]*(?!/)${i.close})[^${i.open}]*$`),action:{indentAction:cA.languages.IndentAction.Indent}}]}}function cst(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:` +\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${IQ.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${IQ.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${TQ.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:cA.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${TQ.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:cA.languages.IndentAction.Indent}}]}}function y7(i,e){let t=`_${i.id}_${e.id}`,n=r=>r.replace(/__id__/g,t),o=r=>{let s=r.source.replace(/__id__/g,t);return new RegExp(s,r.flags)};return{unicode:!0,includeLF:!1,start:n("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[n("open__id__")]:new RegExp(i.open),[n("close__id__")]:new RegExp(i.close),[n("iOpen1__id__")]:new RegExp(e.open1),[n("iOpen2__id__")]:new RegExp(e.open2),[n("iClose__id__")]:new RegExp(e.close),[n("startTag__id__")]:o(/(@open__id__)(#)/),[n("endTag__id__")]:o(/(@open__id__)(\/#)/),[n("startOrEndTag__id__")]:o(/(@open__id__)(\/?#)/),[n("closeTag1__id__")]:o(/((?:@blank)*)(@close__id__)/),[n("closeTag2__id__")]:o(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","->"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[n("default__id__")]:[{include:n("@directive_token__id__")},{include:n("@interpolation_and_text_token__id__")}],[n("fmExpression__id__.directive")]:[{include:n("@blank_and_expression_comment_token__id__")},{include:n("@directive_end_token__id__")},{include:n("@expression_token__id__")}],[n("fmExpression__id__.interpolation")]:[{include:n("@blank_and_expression_comment_token__id__")},{include:n("@expression_token__id__")},{include:n("@greater_operators_token__id__")}],[n("inParen__id__.plain")]:[{include:n("@blank_and_expression_comment_token__id__")},{include:n("@directive_end_token__id__")},{include:n("@expression_token__id__")}],[n("inParen__id__.gt")]:[{include:n("@blank_and_expression_comment_token__id__")},{include:n("@expression_token__id__")},{include:n("@greater_operators_token__id__")}],[n("noSpaceExpression__id__")]:[{include:n("@no_space_expression_end_token__id__")},{include:n("@directive_end_token__id__")},{include:n("@expression_token__id__")}],[n("unifiedCall__id__")]:[{include:n("@unified_call_token__id__")}],[n("singleString__id__")]:[{include:n("@string_single_token__id__")}],[n("doubleString__id__")]:[{include:n("@string_double_token__id__")}],[n("rawSingleString__id__")]:[{include:n("@string_single_raw_token__id__")}],[n("rawDoubleString__id__")]:[{include:n("@string_double_raw_token__id__")}],[n("expressionComment__id__")]:[{include:n("@expression_comment_token__id__")}],[n("noParse__id__")]:[{include:n("@no_parse_token__id__")}],[n("terseComment__id__")]:[{include:n("@terse_comment_token__id__")}],[n("directive_token__id__")]:[[o(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),i.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:n("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),i.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),i.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:n("@fmExpression__id__.directive")}]],[o(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),i.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)(@)/),i.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:n("@unifiedCall__id__")}]],[o(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)#--/),i.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:{token:"comment",next:n("@terseComment__id__")}],[o(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),i.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:n("@fmExpression__id__.directive")}]]],[n("interpolation_and_text_token__id__")]:[[o(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:e.id==="bracket"?"@brackets.interpolation":"delimiter.interpolation"},{token:e.id==="bracket"?"delimiter.interpolation":"@brackets.interpolation",next:n("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[n("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[n("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[n("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[n("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[n("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:n("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:n("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:n("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:n("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:n("@inParen__id__.gt")},"@default":{token:"@brackets",next:n("@inParen__id__.plain")}}},"\\]":{cases:{...e.id==="bracket"?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},...i.id==="bracket"?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[n("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:n("@inParen__id__.gt")},"\\)":{cases:{[n("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:n("@inParen__id__.gt")},"@default":{token:"@brackets",next:n("@inParen__id__.plain")}}},"\\}":{cases:{...e.id==="bracket"?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[n("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[n("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:n("@expressionComment__id__")}]],[n("directive_end_token__id__")]:[[/>/,i.id==="bracket"?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[o(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[n("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[n("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:n("@fmExpression__id__.directive")}]],[n("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:n("@fmExpression__id__.directive")}]],[o(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:n("@noSpaceExpression__id__")}]],[n("no_parse_token__id__")]:[[o(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[n("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[n("terse_comment_token__id__")]:[[o(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function dst(i){let e=y7(dA,i),t=y7(uA,i),n=y7(YOt,i);return{...e,...t,...n,unicode:!0,includeLF:!1,start:`default_auto_${i.id}`,ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...e.tokenizer,...t.tokenizer,...n.tokenizer}}}var $Ot,jOt,qOt,GOt,lst,KOt,cA,TQ,IQ,dA,uA,YOt,H6e,B6e,ZOt,XOt,QOt,JOt,ezt,tzt,m8=P(()=>{ta();$Ot=Object.defineProperty,jOt=Object.getOwnPropertyDescriptor,qOt=Object.getOwnPropertyNames,GOt=Object.prototype.hasOwnProperty,lst=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of qOt(e))!GOt.call(i,o)&&o!==t&&$Ot(i,o,{get:()=>e[o],enumerable:!(n=jOt(e,o))||n.enumerable});return i},KOt=(i,e,t)=>(lst(i,e,"default"),t&&lst(t,e,"default")),cA={};KOt(cA,ir);TQ=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],IQ=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],dA={close:">",id:"angle",open:"<"},uA={close:"\\]",id:"bracket",open:"\\["},YOt={close:"[>\\]]",id:"auto",open:"[<\\[]"},H6e={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},B6e={close:"\\]",id:"bracket",open1:"\\[",open2:"="};ZOt={conf:MQ(dA),language:y7(dA,H6e)},XOt={conf:MQ(uA),language:y7(uA,H6e)},QOt={conf:MQ(dA),language:y7(dA,B6e)},JOt={conf:MQ(uA),language:y7(uA,B6e)},ezt={conf:cst(),language:dst(H6e)},tzt={conf:cst(),language:dst(B6e)}});var ust={};Ai(ust,{conf:()=>izt,language:()=>nzt});var izt,nzt,hst=P(()=>{izt={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"}]},nzt={defaultToken:"",tokenPostfix:".go",keywords:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var","bool","true","false","uint8","uint16","uint32","uint64","int8","int16","int32","int64","float32","float64","complex64","complex128","byte","rune","uint","int","uintptr","string","nil"],operators:["+","-","*","/","%","&","|","^","<<",">>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(",")","","]","{","}",",",";",".",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex"],[/0[0-7']*[0-7]/,"number.octal"],[/0[bB][0-1']*[0-1]/,"number.binary"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/`/,"string","@rawstring"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],rawstring:[[/[^\`]/,"string"],[/`/,"string","@pop"]]}}});var fst={};Ai(fst,{conf:()=>ozt,language:()=>rzt});var ozt,rzt,pst=P(()=>{ozt={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""',notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""'},{open:'"',close:'"'}],folding:{offSide:!0}},rzt={defaultToken:"invalid",tokenPostfix:".gql",keywords:["null","true","false","query","mutation","subscription","extend","schema","directive","scalar","type","interface","union","enum","input","implements","fragment","on"],typeKeywords:["Int","Float","String","Boolean","ID"],directiveLocations:["SCHEMA","SCALAR","OBJECT","FIELD_DEFINITION","ARGUMENT_DEFINITION","INTERFACE","UNION","ENUM","ENUM_VALUE","INPUT_OBJECT","INPUT_FIELD_DEFINITION","QUERY","MUTATION","SUBSCRIPTION","FIELD","FRAGMENT_DEFINITION","FRAGMENT_SPREAD","INLINE_FRAGMENT","VARIABLE_DEFINITION"],operators:["=","!","?",":","&","|"],symbols:/[=!?:&|]+/,escapes:/\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,tokenizer:{root:[[/[a-z_][\w$]*/,{cases:{"@keywords":"keyword","@default":"key.identifier"}}],[/[$][\w$]*/,{cases:{"@keywords":"keyword","@default":"argument.identifier"}}],[/[A-Z][\w\$]*/,{cases:{"@typeKeywords":"keyword","@default":"type.identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,{token:"annotation",log:"annotation token: $0"}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"""/,{token:"string",next:"@mlstring",nextEmbedded:"markdown"}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}]],mlstring:[[/[^"]+/,"string"],['"""',{token:"string",next:"@pop",nextEmbedded:"@pop"}]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/#.*$/,"comment"]]}}});var vst={};Ai(vst,{conf:()=>uzt,language:()=>hzt});var szt,azt,lzt,czt,mst,dzt,V6e,gst,uzt,hzt,_st=P(()=>{ta();szt=Object.defineProperty,azt=Object.getOwnPropertyDescriptor,lzt=Object.getOwnPropertyNames,czt=Object.prototype.hasOwnProperty,mst=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of lzt(e))!czt.call(i,o)&&o!==t&&szt(i,o,{get:()=>e[o],enumerable:!(n=azt(e,o))||n.enumerable});return i},dzt=(i,e,t)=>(mst(i,e,"default"),t&&mst(t,e,"default")),V6e={};dzt(V6e,ir);gst=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],uzt={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[[""],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${gst.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:V6e.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${gst.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:V6e.languages.IndentAction.Indent}}]},hzt={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}}});var bst={};Ai(bst,{conf:()=>fzt,language:()=>pzt});var fzt,pzt,yst=P(()=>{fzt={comments:{lineComment:"#",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},pzt={defaultToken:"",tokenPostfix:".hcl",keywords:["var","local","path","for_each","any","string","number","bool","true","false","null","if ","else ","endif ","for ","in","endfor"],operators:["=",">=","<=","==","!=","+","-","*","/","%","&&","||","!","<",">","?","...",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"/,"string","@string"],[/'/,"invalid"]],heredoc:[[/<<[-]*\s*["]?([\w\-]+)["]?/,{token:"string.heredoc.delimiter",next:"@heredocBody.$1"}]],heredocBody:[[/([\w\-]+)$/,{cases:{"$1==$S2":[{token:"string.heredoc.delimiter",next:"@popall"}],"@default":"string.heredoc"}}],[/./,"string.heredoc"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"],[/#.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/\$\{/,{token:"delimiter",next:"@stringExpression"}],[/[^\\"\$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@popall"]],stringInsideExpression:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],stringExpression:[[/\}/,{token:"delimiter",next:"@pop"}],[/"/,"string","@stringInsideExpression"],{include:"@terraform"}]}}});var xst={};Ai(xst,{conf:()=>yzt,language:()=>Czt});var mzt,gzt,vzt,_zt,Cst,bzt,W6e,wst,yzt,Czt,Sst=P(()=>{ta();mzt=Object.defineProperty,gzt=Object.getOwnPropertyDescriptor,vzt=Object.getOwnPropertyNames,_zt=Object.prototype.hasOwnProperty,Cst=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of vzt(e))!_zt.call(i,o)&&o!==t&&mzt(i,o,{get:()=>e[o],enumerable:!(n=gzt(e,o))||n.enumerable});return i},bzt=(i,e,t)=>(Cst(i,e,"default"),t&&Cst(t,e,"default")),W6e={};bzt(W6e,ir);wst=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],yzt={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${wst.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:W6e.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${wst.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:W6e.languages.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},Czt={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}}});var kst={};Ai(kst,{conf:()=>wzt,language:()=>xzt});var wzt,xzt,Lst=P(()=>{wzt={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},xzt={defaultToken:"",tokenPostfix:".ini",escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^\[[^\]]*\]/,"metatag"],[/(^\w+)(\s*)(\=)/,["key","","delimiter"]],{include:"@whitespace"},[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,""],[/^\s*[#;].*$/,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}});var Est={};Ai(Est,{conf:()=>Szt,language:()=>kzt});var Szt,kzt,Dst=P(()=>{Szt={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},kzt={defaultToken:"",tokenPostfix:".java",keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false","yield","record","sealed","non-sealed","permits"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/0[xX](@hexdigits)[Ll]?/,"number.hex"],[/0(@octaldigits)[Ll]?/,"number.octal"],[/0[bB](@binarydigits)[Ll]?/,"number.binary"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string","@multistring"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],multistring:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"""/,"string","@pop"],[/./,"string"]]}}});var Ist={};Ai(Ist,{conf:()=>U6e,language:()=>Dp});var Lzt,Ezt,Dzt,Tzt,Tst,Izt,hA,U6e,Dp,$6e=P(()=>{ta();Lzt=Object.defineProperty,Ezt=Object.getOwnPropertyDescriptor,Dzt=Object.getOwnPropertyNames,Tzt=Object.prototype.hasOwnProperty,Tst=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Dzt(e))!Tzt.call(i,o)&&o!==t&&Lzt(i,o,{get:()=>e[o],enumerable:!(n=Ezt(e,o))||n.enumerable});return i},Izt=(i,e,t)=>(Tst(i,e,"default"),t&&Tst(t,e,"default")),hA={};Izt(hA,ir);U6e={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:hA.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:hA.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:hA.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:hA.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},Dp={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}}});var Mst={};Ai(Mst,{conf:()=>Mzt,language:()=>Nzt});var Mzt,Nzt,Nst=P(()=>{$6e();Mzt=U6e,Nzt={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:Dp.operators,symbols:Dp.symbols,escapes:Dp.escapes,digits:Dp.digits,octaldigits:Dp.octaldigits,binarydigits:Dp.binarydigits,hexdigits:Dp.hexdigits,regexpctl:Dp.regexpctl,regexpesc:Dp.regexpesc,tokenizer:Dp.tokenizer}});var Ast={};Ai(Ast,{conf:()=>Azt,language:()=>Rzt});var Azt,Rzt,Rst=P(()=>{Azt={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},Rzt={tokenPostfix:".julia",keywords:["begin","while","if","for","try","return","break","continue","function","macro","quote","let","local","global","const","do","struct","module","baremodule","using","import","export","end","else","elseif","catch","finally","mutable","primitive","abstract","type","in","isa","where","new"],types:["LinRange","LineNumberNode","LinearIndices","LoadError","MIME","Matrix","Method","MethodError","Missing","MissingException","Module","NTuple","NamedTuple","Nothing","Number","OrdinalRange","OutOfMemoryError","OverflowError","Pair","PartialQuickSort","PermutedDimsArray","Pipe","Ptr","QuoteNode","Rational","RawFD","ReadOnlyMemoryError","Real","ReentrantLock","Ref","Regex","RegexMatch","RoundingMode","SegmentationFault","Set","Signed","Some","StackOverflowError","StepRange","StepRangeLen","StridedArray","StridedMatrix","StridedVecOrMat","StridedVector","String","StringIndexError","SubArray","SubString","SubstitutionString","Symbol","SystemError","Task","Text","TextDisplay","Timer","Tuple","Type","TypeError","TypeVar","UInt","UInt128","UInt16","UInt32","UInt64","UInt8","UndefInitializer","AbstractArray","UndefKeywordError","AbstractChannel","UndefRefError","AbstractChar","UndefVarError","AbstractDict","Union","AbstractDisplay","UnionAll","AbstractFloat","UnitRange","AbstractIrrational","Unsigned","AbstractMatrix","AbstractRange","Val","AbstractSet","Vararg","AbstractString","VecElement","AbstractUnitRange","VecOrMat","AbstractVecOrMat","Vector","AbstractVector","VersionNumber","Any","WeakKeyDict","ArgumentError","WeakRef","Array","AssertionError","BigFloat","BigInt","BitArray","BitMatrix","BitSet","BitVector","Bool","BoundsError","CapturedException","CartesianIndex","CartesianIndices","Cchar","Cdouble","Cfloat","Channel","Char","Cint","Cintmax_t","Clong","Clonglong","Cmd","Colon","Complex","ComplexF16","ComplexF32","ComplexF64","CompositeException","Condition","Cptrdiff_t","Cshort","Csize_t","Cssize_t","Cstring","Cuchar","Cuint","Cuintmax_t","Culong","Culonglong","Cushort","Cvoid","Cwchar_t","Cwstring","DataType","DenseArray","DenseMatrix","DenseVecOrMat","DenseVector","Dict","DimensionMismatch","Dims","DivideError","DomainError","EOFError","Enum","ErrorException","Exception","ExponentialBackOff","Expr","Float16","Float32","Float64","Function","GlobalRef","HTML","IO","IOBuffer","IOContext","IOStream","IdDict","IndexCartesian","IndexLinear","IndexStyle","InexactError","InitError","Int","Int128","Int16","Int32","Int64","Int8","Integer","InterruptException","InvalidStateException","Irrational","KeyError"],keywordops:["<:",">:",":","=>","...",".","->","?"],allops:/[^\w\d\s()\[\]{}"'#]+/,constants:["true","false","nothing","missing","undef","Inf","pi","NaN","\u03C0","\u212F","ans","PROGRAM_FILE","ARGS","C_NULL","VERSION","DEPOT_PATH","LOAD_PATH"],operators:["!","!=","!==","%","&","*","+","-","/","//","<","<<","<=","==","===","=>",">",">=",">>",">>>","\\","^","|","|>","~","\xF7","\u2208","\u2209","\u220B","\u220C","\u2218","\u221A","\u221B","\u2229","\u222A","\u2248","\u2249","\u2260","\u2261","\u2262","\u2264","\u2265","\u2286","\u2287","\u2288","\u2289","\u228A","\u228B","\u22BB"],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],ident:/π|ℯ|\b(?!\d)\w+\b/,escape:/(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,escapes:/\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,tokenizer:{root:[[/(::)\s*|\b(isa)\s+/,"keyword","@typeanno"],[/\b(isa)(\s*\(@ident\s*,\s*)/,["keyword",{token:"",next:"@typeanno"}]],[/\b(type|struct)[ \t]+/,"keyword","@typeanno"],[/^\s*:@ident[!?]?/,"metatag"],[/(return)(\s*:@ident[!?]?)/,["keyword","metatag"]],[/(\(|\[|\{|@allops)(\s*:@ident[!?]?)/,["","metatag"]],[/:\(/,"metatag","@quote"],[/r"""/,"regexp.delim","@tregexp"],[/r"/,"regexp.delim","@sregexp"],[/raw"""/,"string.delim","@rtstring"],[/[bv]?"""/,"string.delim","@dtstring"],[/raw"/,"string.delim","@rsstring"],[/[bv]?"/,"string.delim","@dsstring"],[/(@ident)\{/,{cases:{"$1@types":{token:"type",next:"@gen"},"@default":{token:"type",next:"@gen"}}}],[/@ident[!?'']?(?=\.?\()/,{cases:{"@types":"type","@keywords":"keyword","@constants":"variable","@default":"keyword.flow"}}],[/@ident[!?']?/,{cases:{"@types":"type","@keywords":"keyword","@constants":"variable","@default":"identifier"}}],[/\$\w+/,"key"],[/\$\(/,"key","@paste"],[/@@@ident/,"annotation"],{include:"@whitespace"},[/'(?:@escapes|.)'/,"string.character"],[/[()\[\]{}]/,"@brackets"],[/@allops/,{cases:{"@keywordops":"keyword","@operators":"operator"}}],[/[;,]/,"delimiter"],[/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/,"number.hex"],[/0[_oO][0-7](_?[0-7])*/,"number.octal"],[/0[bB][01](_?[01])*/,"number.binary"],[/[+\-]?\d+(\.\d+)?(im?|[eE][+\-]?\d+(\.\d+)?)?/,"number"]],typeanno:[[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/,"type","@gen"],[/([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(\s*<:\s*)/,["type","keyword"]],[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/,"type","@pop"],["","","@pop"]],gen:[[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/,"type","@push"],[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/,"type"],[/<:/,"keyword"],[/(\})(\s*<:\s*)/,["type",{token:"keyword",next:"@pop"}]],[/\}/,"type","@pop"],{include:"@root"}],quote:[[/\$\(/,"key","@paste"],[/\(/,"@brackets","@paren"],[/\)/,"metatag","@pop"],{include:"@root"}],paste:[[/:\(/,"metatag","@quote"],[/\(/,"@brackets","@paren"],[/\)/,"key","@pop"],{include:"@root"}],paren:[[/\$\(/,"key","@paste"],[/:\(/,"metatag","@quote"],[/\(/,"@brackets","@push"],[/\)/,"@brackets","@pop"],{include:"@root"}],sregexp:[[/^.*/,"invalid"],[/[^\\"()\[\]{}]/,"regexp"],[/[()\[\]{}]/,"@brackets"],[/\\./,"operator.scss"],[/"[imsx]*/,"regexp.delim","@pop"]],tregexp:[[/[^\\"()\[\]{}]/,"regexp"],[/[()\[\]{}]/,"@brackets"],[/\\./,"operator.scss"],[/"(?!"")/,"string"],[/"""[imsx]*/,"regexp.delim","@pop"]],rsstring:[[/^.*/,"invalid"],[/[^\\"]/,"string"],[/\\./,"string.escape"],[/"/,"string.delim","@pop"]],rtstring:[[/[^\\"]/,"string"],[/\\./,"string.escape"],[/"(?!"")/,"string"],[/"""/,"string.delim","@pop"]],dsstring:[[/^.*/,"invalid"],[/[^\\"\$]/,"string"],[/\$/,"","@interpolated"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string.delim","@pop"]],dtstring:[[/[^\\"\$]/,"string"],[/\$/,"","@interpolated"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"(?!"")/,"string"],[/"""/,"string.delim","@pop"]],interpolated:[[/\(/,{token:"",switchTo:"@interpolated_compound"}],[/[a-zA-Z_]\w*/,"identifier"],["","","@pop"]],interpolated_compound:[[/\)/,"","@pop"],{include:"@root"}],whitespace:[[/[ \t\r\n]+/,""],[/#=/,"comment","@multi_comment"],[/#.*$/,"comment"]],multi_comment:[[/#=/,"comment","@push"],[/=#/,"comment","@pop"],[/=(?!#)|#(?!=)/,"comment"],[/[^#=]+/,"comment"]]}}});var Pst={};Ai(Pst,{conf:()=>Pzt,language:()=>Ozt});var Pzt,Ozt,Ost=P(()=>{Pzt={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},Ozt={defaultToken:"",tokenPostfix:".kt",keywords:["as","as?","break","class","continue","do","else","false","for","fun","if","in","!in","interface","is","!is","null","object","package","return","super","this","throw","true","try","typealias","val","var","when","while","by","catch","constructor","delegate","dynamic","field","file","finally","get","import","init","param","property","receiver","set","setparam","where","actual","abstract","annotation","companion","const","crossinline","data","enum","expect","external","final","infix","inline","inner","internal","lateinit","noinline","open","operator","out","override","private","protected","public","reified","sealed","suspend","tailrec","vararg","field","it"],operators:["+","-","*","/","%","=","+=","-=","*=","/=","%=","++","--","&&","||","!","==","!=","===","!==",">","<","<=",">=","[","]","!!","?.","?:","::","..",":","?","->","@",";","$","_"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/0[xX](@hexdigits)[Ll]?/,"number.hex"],[/0(@octaldigits)[Ll]?/,"number.octal"],[/0[bB](@binarydigits)[Ll]?/,"number.binary"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string","@multistring"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc","@push"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],multistring:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"""/,"string","@pop"],[/./,"string"]]}}});var zst={};Ai(zst,{conf:()=>zzt,language:()=>Fzt});var zzt,Fzt,Fst=P(()=>{zzt={wordPattern:/(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},Fzt={defaultToken:"",tokenPostfix:".less",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",identifierPlus:"-?-?([a-zA-Z:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@nestedJSBegin"},["[ \\t\\r\\n]+",""],{include:"@comments"},{include:"@keyword"},{include:"@strings"},{include:"@numbers"},["[*_]?[a-zA-Z\\-\\s]+(?=:.*(;|(\\\\$)))","attribute.name","@attribute"],["url(\\-prefix)?\\(",{token:"tag",next:"@urldeclaration"}],["[{}()\\[\\]]","@brackets"],["[,:;]","delimiter"],["#@identifierPlus","tag.id"],["&","tag"],["\\.@identifierPlus(?=\\()","tag.class","@attribute"],["\\.@identifierPlus","tag.class"],["@identifierPlus","tag"],{include:"@operators"},["@(@identifier(?=[:,\\)]))","variable","@attribute"],["@(@identifier)","variable"],["@","key","@atRules"]],nestedJSBegin:[["``","delimiter.backtick"],["`",{token:"delimiter.backtick",next:"@nestedJSEnd",nextEmbedded:"text/javascript"}]],nestedJSEnd:[["`",{token:"delimiter.backtick",next:"@pop",nextEmbedded:"@pop"}]],operators:[["[<>=\\+\\-\\*\\/\\^\\|\\~]","operator"]],keyword:[["(@[\\s]*import|![\\s]*important|true|false|when|iscolor|isnumber|isstring|iskeyword|isurl|ispixel|ispercentage|isem|hue|saturation|lightness|alpha|lighten|darken|saturate|desaturate|fadein|fadeout|fade|spin|mix|round|ceil|floor|percentage)\\b","keyword"]],urldeclaration:[{include:"@strings"},[`[^)\r ]+`,"string"],["\\)",{token:"tag",next:"@pop"}]],attribute:[{include:"@nestedJSBegin"},{include:"@comments"},{include:"@strings"},{include:"@numbers"},{include:"@keyword"},["[a-zA-Z\\-]+(?=\\()","attribute.value","@attribute"],[">","operator","@pop"],["@identifier","attribute.value"],{include:"@operators"},["@(@identifier)","variable"],["[)\\}]","@brackets","@pop"],["[{}()\\[\\]>]","@brackets"],["[;]","delimiter","@pop"],["[,=:]","delimiter"],["\\s",""],[".","attribute.value"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],strings:[['~?"',{token:"string.delimiter",next:"@stringsEndDoubleQuote"}],["~?'",{token:"string.delimiter",next:"@stringsEndQuote"}]],stringsEndDoubleQuote:[['\\\\"',"string"],['"',{token:"string.delimiter",next:"@popall"}],[".","string"]],stringsEndQuote:[["\\\\'","string"],["'",{token:"string.delimiter",next:"@popall"}],[".","string"]],atRules:[{include:"@comments"},{include:"@strings"},["[()]","delimiter"],["[\\{;]","delimiter","@pop"],[".","key"]]}}});var Hst={};Ai(Hst,{conf:()=>Hzt,language:()=>Bzt});var Hzt,Bzt,Bst=P(()=>{Hzt={comments:{lineComment:"COMMENT"},brackets:[["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:":",close:"."}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"},{open:":",close:"."}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|COMMENT\\s+)#region"),end:new RegExp("^\\s*(::\\s*|COMMENT\\s+)#endregion")}}},Bzt={tokenPostfix:".lexon",ignoreCase:!0,keywords:["lexon","lex","clause","terms","contracts","may","pay","pays","appoints","into","to"],typeKeywords:["amount","person","key","time","date","asset","text"],operators:["less","greater","equal","le","gt","or","and","add","added","subtract","subtracted","multiply","multiplied","times","divide","divided","is","be","certified"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\.\d*\.\d*/,"number.semver"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"]],quoted_identifier:[[/[^\\"]+/,"identifier"],[/"/,{token:"identifier.quote",bracket:"@close",next:"@pop"}]],space_identifier_until_period:[[":","delimiter"],[" ",{token:"white",next:"@identifier_rest"}]],identifier_until_period:[{include:"@whitespace"},[":",{token:"delimiter",next:"@identifier_rest"}],[/[^\\.]+/,"identifier"],[/\./,{token:"delimiter",bracket:"@close",next:"@pop"}]],identifier_rest:[[/[^\\.]+/,"identifier"],[/\./,{token:"delimiter",bracket:"@close",next:"@pop"}]],semver:[{include:"@whitespace"},[":","delimiter"],[/\d*\.\d*\.\d*/,{token:"number.semver",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"]]}}});var Vst={};Ai(Vst,{conf:()=>Vzt,language:()=>Wzt});var Vzt,Wzt,Wst=P(()=>{Vzt={comments:{lineComment:"--",blockComment:["--[[","]]"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},Wzt={defaultToken:"",tokenPostfix:".lua",keywords:["and","break","do","else","elseif","end","false","for","function","goto","if","in","local","nil","not","or","repeat","return","then","true","until","while"],brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],operators:["+","-","*","/","%","^","#","==","~=","<=",">=","<",">","=",";",":",",",".","..","..."],symbols:/[=>Kzt,language:()=>Yzt});var Uzt,$zt,jzt,qzt,Ust,Gzt,j6e,$st,Kzt,Yzt,qst=P(()=>{ta();Uzt=Object.defineProperty,$zt=Object.getOwnPropertyDescriptor,jzt=Object.getOwnPropertyNames,qzt=Object.prototype.hasOwnProperty,Ust=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of jzt(e))!qzt.call(i,o)&&o!==t&&Uzt(i,o,{get:()=>e[o],enumerable:!(n=$zt(e,o))||n.enumerable});return i},Gzt=(i,e,t)=>(Ust(i,e,"default"),t&&Ust(t,e,"default")),j6e={};Gzt(j6e,ir);$st=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],Kzt={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,brackets:[[""],["<",">"],["{{","}}"],["{%","%}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"%",close:"%"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${$st.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:j6e.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${$st.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:j6e.languages.IndentAction.Indent}}]},Yzt={defaultToken:"",tokenPostfix:"",builtinTags:["if","else","elseif","endif","render","assign","capture","endcapture","case","endcase","comment","endcomment","cycle","decrement","for","endfor","include","increment","layout","raw","endraw","render","tablerow","endtablerow","unless","endunless"],builtinFilters:["abs","append","at_least","at_most","capitalize","ceil","compact","date","default","divided_by","downcase","escape","escape_once","first","floor","join","json","last","lstrip","map","minus","modulo","newline_to_br","plus","prepend","remove","remove_first","replace","replace_first","reverse","round","rstrip","size","slice","sort","sort_natural","split","strip","strip_html","strip_newlines","times","truncate","truncatewords","uniq","upcase","url_decode","url_encode","where"],constants:["true","false"],operators:["==","!=",">","<",">=","<="],symbol:/[=>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[//,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,"delimiter.output.liquid"],[/\}\}/,{token:"delimiter.output.liquid",switchTo:"@$S2.$S3"}],[/\{\%/,"delimiter.tag.liquid"],[/raw\s*\%\}/,"delimiter.tag.liquid","@liquidRaw"],[/\%\}/,{token:"delimiter.tag.liquid",switchTo:"@$S2.$S3"}],{include:"liquidRoot"}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,"delimiter.tag.liquid"],[/@identifier/],[/\%\}/,{token:"delimiter.tag.liquid",next:"@root"}]],liquidRoot:[[/\d+(\.\d+)?/,"number.liquid"],[/"[^"]*"/,"string.liquid"],[/'[^']*'/,"string.liquid"],[/\s+/],[/@symbol/,{cases:{"@operators":"operator.liquid","@default":""}}],[/\./],[/@identifier/,{cases:{"@constants":"keyword.liquid","@builtinFilters":"predefined.liquid","@builtinTags":"predefined.liquid","@default":"variable.liquid"}}],[/[^}|%]/,"variable.liquid"]]}}});var Gst={};Ai(Gst,{conf:()=>Zzt,language:()=>Xzt});var Zzt,Xzt,Kst=P(()=>{Zzt={comments:{blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"(*",close:"*)"},{open:"<*",close:"*>"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}]},Xzt={defaultToken:"",tokenPostfix:".m3",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["AND","ANY","ARRAY","AS","BEGIN","BITS","BRANDED","BY","CASE","CONST","DIV","DO","ELSE","ELSIF","END","EVAL","EXCEPT","EXCEPTION","EXIT","EXPORTS","FINALLY","FOR","FROM","GENERIC","IF","IMPORT","IN","INTERFACE","LOCK","LOOP","METHODS","MOD","MODULE","NOT","OBJECT","OF","OR","OVERRIDES","PROCEDURE","RAISE","RAISES","READONLY","RECORD","REF","REPEAT","RETURN","REVEAL","SET","THEN","TO","TRY","TYPE","TYPECASE","UNSAFE","UNTIL","UNTRACED","VALUE","VAR","WHILE","WITH"],reservedConstNames:["ABS","ADR","ADRSIZE","BITSIZE","BYTESIZE","CEILING","DEC","DISPOSE","FALSE","FIRST","FLOAT","FLOOR","INC","ISTYPE","LAST","LOOPHOLE","MAX","MIN","NARROW","NEW","NIL","NUMBER","ORD","ROUND","SUBARRAY","TRUE","TRUNC","TYPECODE","VAL"],reservedTypeNames:["ADDRESS","ANY","BOOLEAN","CARDINAL","CHAR","EXTENDED","INTEGER","LONGCARD","LONGINT","LONGREAL","MUTEX","NULL","REAL","REFANY","ROOT","TEXT"],operators:["+","-","*","/","&","^","."],relations:["=","#","<","<=",">",">=","<:",":"],delimiters:["|","..","=>",",",";",":="],symbols:/[>=<#.,:;+\-*/&^]+/,escapes:/\\(?:[\\fnrt"']|[0-7]{3})/,tokenizer:{root:[[/_\w*/,"invalid"],[/[a-zA-Z][a-zA-Z0-9_]*/,{cases:{"@keywords":{token:"keyword.$0"},"@reservedConstNames":{token:"constant.reserved.$0"},"@reservedTypeNames":{token:"type.reserved.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[0-9]+\.[0-9]+(?:[DdEeXx][\+\-]?[0-9]+)?/,"number.float"],[/[0-9]+(?:\_[0-9a-fA-F]+)?L?/,"number"],[/@symbols/,{cases:{"@operators":"operators","@relations":"operators","@delimiters":"delimiter","@default":"invalid"}}],[/'[^\\']'/,"string.char"],[/(')(@escapes)(')/,["string.char","string.escape","string.char"]],[/'/,"invalid"],[/"([^"\\]|\\.)*$/,"invalid"],[/"/,"string.text","@text"]],text:[[/[^\\"]+/,"string.text"],[/@escapes/,"string.escape"],[/\\./,"invalid"],[/"/,"string.text","@pop"]],comment:[[/\(\*/,"comment","@push"],[/\*\)/,"comment","@pop"],[/./,"comment"]],pragma:[[/<\*/,"keyword.pragma","@push"],[/\*>/,"keyword.pragma","@pop"],[/./,"keyword.pragma"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/<\*/,"keyword.pragma","@pragma"]]}}});var Yst={};Ai(Yst,{conf:()=>Qzt,language:()=>Jzt});var Qzt,Jzt,Zst=P(()=>{Qzt={comments:{blockComment:[""]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},Jzt={defaultToken:"",tokenPostfix:".md",control:/[\\`*_\[\]{}()#+\-\.!]/,noncontrol:/[^\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,jsescapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],tokenizer:{root:[[/^\s*\|/,"@rematch","@table_header"],[/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/,["white","keyword","keyword","keyword"]],[/^\s*(=+|\-+)\s*$/,"keyword"],[/^\s*((\*[ ]?)+)\s*$/,"meta.separator"],[/^\s*>+/,"comment"],[/^\s*([\*\-+:]|\d+\.)\s/,"keyword"],[/^(\t|[ ]{4})[^ ].*$/,"string"],[/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/,{token:"string",next:"@codeblock"}],[/^\s*```\s*((?:\w|[\/\-#])+).*$/,{token:"string",next:"@codeblockgh",nextEmbedded:"$1"}],[/^\s*```\s*$/,{token:"string",next:"@codeblock"}],{include:"@linecontent"}],table_header:[{include:"@table_common"},[/[^\|]+/,"keyword.table.header"]],table_body:[{include:"@table_common"},{include:"@linecontent"}],table_common:[[/\s*[\-:]+\s*/,{token:"keyword",switchTo:"table_body"}],[/^\s*\|/,"keyword.table.left"],[/^\s*[^\|]/,"@rematch","@pop"],[/^\s*$/,"@rematch","@pop"],[/\|/,{cases:{"@eos":"keyword.table.right","@default":"keyword.table.middle"}}]],codeblock:[[/^\s*~~~\s*$/,{token:"string",next:"@pop"}],[/^\s*```\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblockgh:[[/```\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/[^`]+/,"variable.source"]],linecontent:[[/&\w+;/,"string.escape"],[/@escapes/,"escape"],[/\b__([^\\_]|@escapes|_(?!_))+__\b/,"strong"],[/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/,"strong"],[/\b_[^_]+_\b/,"emphasis"],[/\*([^\\*]|@escapes)+\*/,"emphasis"],[/`([^\\`]|@escapes)+`/,"variable"],[/\{+[^}]+\}+/,"string.target"],[/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/,["string.link","","string.link"]],[/(!?\[)((?:[^\]\\]|@escapes)*)(\])/,"string.link"],{include:"html"}],html:[[/<(\w+)\/>/,"tag"],[/<(\w+)(\-|\w)*/,{cases:{"@empty":{token:"tag",next:"@tag.$1"},"@default":{token:"tag",next:"@tag.$1"}}}],[/<\/(\w+)(\-|\w)*\s*>/,{token:"tag"}],[//,"comment","@pop"],[//,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],phpInSimpleState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3"}],{include:"phpRoot"}],phpInEmbeddedState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"phpRoot"}],phpRoot:[[/[a-zA-Z_]\w*/,{cases:{"@phpKeywords":{token:"keyword.php"},"@phpCompileTimeConstants":{token:"constant.php"},"@default":"identifier.php"}}],[/[$a-zA-Z_]\w*/,{cases:{"@phpPreDefinedVariables":{token:"variable.predefined.php"},"@default":"variable.php"}}],[/[{}]/,"delimiter.bracket.php"],[/[\[\]]/,"delimiter.array.php"],[/[()]/,"delimiter.parenthesis.php"],[/[ \t\r\n]+/],[/(#|\/\/)$/,"comment.php"],[/(#|\/\/)/,"comment.php","@phpLineComment"],[/\/\*/,"comment.php","@phpComment"],[/"/,"string.php","@phpDoubleQuoteString"],[/'/,"string.php","@phpSingleQuoteString"],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,\@]/,"delimiter.php"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.php"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.php"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.php"],[/0[0-7']*[0-7]/,"number.octal.php"],[/0[bB][0-1']*[0-1]/,"number.binary.php"],[/\d[\d']*/,"number.php"],[/\d/,"number.php"]],phpComment:[[/\*\//,"comment.php","@pop"],[/[^*]+/,"comment.php"],[/./,"comment.php"]],phpLineComment:[[/\?>/,{token:"@rematch",next:"@pop"}],[/.$/,"comment.php","@pop"],[/[^?]+$/,"comment.php","@pop"],[/[^?]+/,"comment.php"],[/./,"comment.php"]],phpDoubleQuoteString:[[/[^\\"]+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/"/,"string.php","@pop"]],phpSingleQuoteString:[[/[^\\']+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/'/,"string.php","@pop"]]},phpKeywords:["abstract","and","array","as","break","callable","case","catch","cfunction","class","clone","const","continue","declare","default","do","else","elseif","enddeclare","endfor","endforeach","endif","endswitch","endwhile","extends","false","final","for","foreach","function","global","goto","if","implements","interface","instanceof","insteadof","namespace","new","null","object","old_function","or","private","protected","public","resource","static","switch","throw","trait","try","true","use","var","while","xor","die","echo","empty","exit","eval","include","include_once","isset","list","require","require_once","return","print","unset","yield","__construct"],phpCompileTimeConstants:["__CLASS__","__DIR__","__FILE__","__LINE__","__NAMESPACE__","__METHOD__","__FUNCTION__","__TRAIT__"],phpPreDefinedVariables:["$GLOBALS","$_SERVER","$_GET","$_POST","$_FILES","$_REQUEST","$_SESSION","$_ENV","$_COOKIE","$php_errormsg","$HTTP_RAW_POST_DATA","$http_response_header","$argc","$argv"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/}});var _at={};Ai(_at,{conf:()=>kFt,language:()=>LFt});var kFt,LFt,bat=P(()=>{kFt={comments:{lineComment:"#"},brackets:[["[","]"],["<",">"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"<",close:">"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"<",close:">"},{open:"(",close:")"}]},LFt={defaultToken:"",tokenPostfix:".pla",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"<",close:">",token:"delimiter.angle"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:[".i",".o",".mv",".ilb",".ob",".label",".type",".phase",".pair",".symbolic",".symbolic-output",".kiss",".p",".e",".end"],comment:/#.*$/,identifier:/[a-zA-Z]+[a-zA-Z0-9_\-]*/,plaContent:/[01\-~\|]+/,tokenizer:{root:[{include:"@whitespace"},[/@comment/,"comment"],[/\.([a-zA-Z_\-]+)/,{cases:{"@eos":{token:"keyword.$1"},"@keywords":{cases:{".type":{token:"keyword.$1",next:"@type"},"@default":{token:"keyword.$1",next:"@keywordArg"}}},"@default":{token:"keyword.$1"}}}],[/@identifier/,"identifier"],[/@plaContent/,"string"]],whitespace:[[/[ \t\r\n]+/,""]],type:[{include:"@whitespace"},[/\w+/,{token:"type",next:"@pop"}]],keywordArg:[[/[ \t\r\n]+/,{cases:{"@eos":{token:"",next:"@pop"},"@default":""}}],[/@comment/,"comment","@pop"],[/[<>()\[\]]/,{cases:{"@eos":{token:"@brackets",next:"@pop"},"@default":"@brackets"}}],[/\-?\d+/,{cases:{"@eos":{token:"number",next:"@pop"},"@default":"number"}}],[/@identifier/,{cases:{"@eos":{token:"identifier",next:"@pop"},"@default":"identifier"}}],[/[;=]/,{cases:{"@eos":{token:"delimiter",next:"@pop"},"@default":"delimiter"}}]]}}});var yat={};Ai(yat,{conf:()=>EFt,language:()=>DFt});var EFt,DFt,Cat=P(()=>{EFt={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},DFt={tokenPostfix:".pats",defaultToken:"invalid",keywords:["abstype","abst0ype","absprop","absview","absvtype","absviewtype","absvt0ype","absviewt0ype","as","and","assume","begin","classdec","datasort","datatype","dataprop","dataview","datavtype","dataviewtype","do","end","extern","extype","extvar","exception","fn","fnx","fun","prfn","prfun","praxi","castfn","if","then","else","ifcase","in","infix","infixl","infixr","prefix","postfix","implmnt","implement","primplmnt","primplement","import","let","local","macdef","macrodef","nonfix","symelim","symintr","overload","of","op","rec","sif","scase","sortdef","sta","stacst","stadef","static","staload","dynload","try","tkindef","typedef","propdef","viewdef","vtypedef","viewtypedef","prval","var","prvar","when","where","with","withtype","withprop","withview","withvtype","withviewtype"],keywords_dlr:["$delay","$ldelay","$arrpsz","$arrptrsize","$d2ctype","$effmask","$effmask_ntm","$effmask_exn","$effmask_ref","$effmask_wrt","$effmask_all","$extern","$extkind","$extype","$extype_struct","$extval","$extfcall","$extmcall","$literal","$myfilename","$mylocation","$myfunction","$lst","$lst_t","$lst_vt","$list","$list_t","$list_vt","$rec","$rec_t","$rec_vt","$record","$record_t","$record_vt","$tup","$tup_t","$tup_vt","$tuple","$tuple_t","$tuple_vt","$break","$continue","$raise","$showtype","$vcopyenv_v","$vcopyenv_vt","$tempenver","$solver_assert","$solver_verify"],keywords_srp:["#if","#ifdef","#ifndef","#then","#elif","#elifdef","#elifndef","#else","#endif","#error","#prerr","#print","#assert","#undef","#define","#include","#require","#pragma","#codegen2","#codegen3"],irregular_keyword_list:["val+","val-","val","case+","case-","case","addr@","addr","fold@","free@","fix@","fix","lam@","lam","llam@","llam","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","view+","view-","view@","view","type+","type-","type","vtype+","vtype-","vtype","vt@ype+","vt@ype-","vt@ype","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","prop+","prop-","prop","type+","type-","type","t@ype","t@ype+","t@ype-","abst@ype","abstype","absviewt@ype","absvt@ype","for*","for","while*","while"],keywords_types:["bool","double","byte","int","short","char","void","unit","long","float","string","strptr"],keywords_effects:["0","fun","clo","prf","funclo","cloptr","cloref","ref","ntm","1"],operators:["@","!","|","`",":","$",".","=","#","~","..","...","=>","=<>","=/=>","=>>","=/=>>","<",">","><",".<",">.",".<>.","->","-<>"],brackets:[{open:",(",close:")",token:"delimiter.parenthesis"},{open:"`(",close:")",token:"delimiter.parenthesis"},{open:"%(",close:")",token:"delimiter.parenthesis"},{open:"'(",close:")",token:"delimiter.parenthesis"},{open:"'{",close:"}",token:"delimiter.parenthesis"},{open:"@(",close:")",token:"delimiter.parenthesis"},{open:"@{",close:"}",token:"delimiter.brace"},{open:"@[",close:"]",token:"delimiter.square"},{open:"#[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],symbols:/[=>]/,digit:/[0-9]/,digitseq0:/@digit*/,xdigit:/[0-9A-Za-z]/,xdigitseq0:/@xdigit*/,INTSP:/[lLuU]/,FLOATSP:/[fFlL]/,fexponent:/[eE][+-]?[0-9]+/,fexponent_bin:/[pP][+-]?[0-9]+/,deciexp:/\.[0-9]*@fexponent?/,hexiexp:/\.[0-9a-zA-Z]*@fexponent_bin?/,irregular_keywords:/val[+-]?|case[+-]?|addr\@?|fold\@|free\@|fix\@?|lam\@?|llam\@?|prop[+-]?|type[+-]?|view[+-@]?|viewt@?ype[+-]?|t@?ype[+-]?|v(iew)?t@?ype[+-]?|abst@?ype|absv(iew)?t@?ype|for\*?|while\*?/,ESCHAR:/[ntvbrfa\\\?'"\(\[\{]/,start:"root",tokenizer:{root:[{regex:/[ \t\r\n]+/,action:{token:""}},{regex:/\(\*\)/,action:{token:"invalid"}},{regex:/\(\*/,action:{token:"comment",next:"lexing_COMMENT_block_ml"}},{regex:/\(/,action:"@brackets"},{regex:/\)/,action:"@brackets"},{regex:/\[/,action:"@brackets"},{regex:/\]/,action:"@brackets"},{regex:/\{/,action:"@brackets"},{regex:/\}/,action:"@brackets"},{regex:/,\(/,action:"@brackets"},{regex:/,/,action:{token:"delimiter.comma"}},{regex:/;/,action:{token:"delimiter.semicolon"}},{regex:/@\(/,action:"@brackets"},{regex:/@\[/,action:"@brackets"},{regex:/@\{/,action:"@brackets"},{regex:/:/,action:{token:"@rematch",next:"@pop"}}],lexing_EXTCODE:[{regex:/^%}/,action:{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}},{regex:/[^%]+/,action:""}],lexing_DQUOTE:[{regex:/"/,action:{token:"string.quote",next:"@pop"}},{regex:/(\{\$)(@IDENTFST@IDENTRST*)(\})/,action:[{token:"string.escape"},{token:"identifier"},{token:"string.escape"}]},{regex:/\\$/,action:{token:"string.escape"}},{regex:/\\(@ESCHAR|[xX]@xdigit+|@digit+)/,action:{token:"string.escape"}},{regex:/[^\\"]+/,action:{token:"string"}}]}}});var wat={};Ai(wat,{conf:()=>TFt,language:()=>IFt});var TFt,IFt,xat=P(()=>{TFt={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment","identifier"]},{open:"[",close:"]",notIn:["string","comment","identifier"]},{open:"(",close:")",notIn:["string","comment","identifier"]},{open:"{",close:"}",notIn:["string","comment","identifier"]}]},IFt={defaultToken:"",tokenPostfix:".pq",ignoreCase:!1,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.brackets"},{open:"(",close:")",token:"delimiter.parenthesis"}],operatorKeywords:["and","not","or"],keywords:["as","each","else","error","false","if","in","is","let","meta","otherwise","section","shared","then","true","try","type"],constructors:["#binary","#date","#datetime","#datetimezone","#duration","#table","#time"],constants:["#infinity","#nan","#sections","#shared"],typeKeywords:["action","any","anynonnull","none","null","logical","number","time","date","datetime","datetimezone","duration","text","binary","list","record","table","function"],builtinFunctions:["Access.Database","Action.Return","Action.Sequence","Action.Try","ActiveDirectory.Domains","AdoDotNet.DataSource","AdoDotNet.Query","AdobeAnalytics.Cubes","AnalysisServices.Database","AnalysisServices.Databases","AzureStorage.BlobContents","AzureStorage.Blobs","AzureStorage.Tables","Binary.Buffer","Binary.Combine","Binary.Compress","Binary.Decompress","Binary.End","Binary.From","Binary.FromList","Binary.FromText","Binary.InferContentType","Binary.Length","Binary.ToList","Binary.ToText","BinaryFormat.7BitEncodedSignedInteger","BinaryFormat.7BitEncodedUnsignedInteger","BinaryFormat.Binary","BinaryFormat.Byte","BinaryFormat.ByteOrder","BinaryFormat.Choice","BinaryFormat.Decimal","BinaryFormat.Double","BinaryFormat.Group","BinaryFormat.Length","BinaryFormat.List","BinaryFormat.Null","BinaryFormat.Record","BinaryFormat.SignedInteger16","BinaryFormat.SignedInteger32","BinaryFormat.SignedInteger64","BinaryFormat.Single","BinaryFormat.Text","BinaryFormat.Transform","BinaryFormat.UnsignedInteger16","BinaryFormat.UnsignedInteger32","BinaryFormat.UnsignedInteger64","Byte.From","Character.FromNumber","Character.ToNumber","Combiner.CombineTextByDelimiter","Combiner.CombineTextByEachDelimiter","Combiner.CombineTextByLengths","Combiner.CombineTextByPositions","Combiner.CombineTextByRanges","Comparer.Equals","Comparer.FromCulture","Comparer.Ordinal","Comparer.OrdinalIgnoreCase","Csv.Document","Cube.AddAndExpandDimensionColumn","Cube.AddMeasureColumn","Cube.ApplyParameter","Cube.AttributeMemberId","Cube.AttributeMemberProperty","Cube.CollapseAndRemoveColumns","Cube.Dimensions","Cube.DisplayFolders","Cube.Measures","Cube.Parameters","Cube.Properties","Cube.PropertyKey","Cube.ReplaceDimensions","Cube.Transform","Currency.From","DB2.Database","Date.AddDays","Date.AddMonths","Date.AddQuarters","Date.AddWeeks","Date.AddYears","Date.Day","Date.DayOfWeek","Date.DayOfWeekName","Date.DayOfYear","Date.DaysInMonth","Date.EndOfDay","Date.EndOfMonth","Date.EndOfQuarter","Date.EndOfWeek","Date.EndOfYear","Date.From","Date.FromText","Date.IsInCurrentDay","Date.IsInCurrentMonth","Date.IsInCurrentQuarter","Date.IsInCurrentWeek","Date.IsInCurrentYear","Date.IsInNextDay","Date.IsInNextMonth","Date.IsInNextNDays","Date.IsInNextNMonths","Date.IsInNextNQuarters","Date.IsInNextNWeeks","Date.IsInNextNYears","Date.IsInNextQuarter","Date.IsInNextWeek","Date.IsInNextYear","Date.IsInPreviousDay","Date.IsInPreviousMonth","Date.IsInPreviousNDays","Date.IsInPreviousNMonths","Date.IsInPreviousNQuarters","Date.IsInPreviousNWeeks","Date.IsInPreviousNYears","Date.IsInPreviousQuarter","Date.IsInPreviousWeek","Date.IsInPreviousYear","Date.IsInYearToDate","Date.IsLeapYear","Date.Month","Date.MonthName","Date.QuarterOfYear","Date.StartOfDay","Date.StartOfMonth","Date.StartOfQuarter","Date.StartOfWeek","Date.StartOfYear","Date.ToRecord","Date.ToText","Date.WeekOfMonth","Date.WeekOfYear","Date.Year","DateTime.AddZone","DateTime.Date","DateTime.FixedLocalNow","DateTime.From","DateTime.FromFileTime","DateTime.FromText","DateTime.IsInCurrentHour","DateTime.IsInCurrentMinute","DateTime.IsInCurrentSecond","DateTime.IsInNextHour","DateTime.IsInNextMinute","DateTime.IsInNextNHours","DateTime.IsInNextNMinutes","DateTime.IsInNextNSeconds","DateTime.IsInNextSecond","DateTime.IsInPreviousHour","DateTime.IsInPreviousMinute","DateTime.IsInPreviousNHours","DateTime.IsInPreviousNMinutes","DateTime.IsInPreviousNSeconds","DateTime.IsInPreviousSecond","DateTime.LocalNow","DateTime.Time","DateTime.ToRecord","DateTime.ToText","DateTimeZone.FixedLocalNow","DateTimeZone.FixedUtcNow","DateTimeZone.From","DateTimeZone.FromFileTime","DateTimeZone.FromText","DateTimeZone.LocalNow","DateTimeZone.RemoveZone","DateTimeZone.SwitchZone","DateTimeZone.ToLocal","DateTimeZone.ToRecord","DateTimeZone.ToText","DateTimeZone.ToUtc","DateTimeZone.UtcNow","DateTimeZone.ZoneHours","DateTimeZone.ZoneMinutes","Decimal.From","Diagnostics.ActivityId","Diagnostics.Trace","DirectQueryCapabilities.From","Double.From","Duration.Days","Duration.From","Duration.FromText","Duration.Hours","Duration.Minutes","Duration.Seconds","Duration.ToRecord","Duration.ToText","Duration.TotalDays","Duration.TotalHours","Duration.TotalMinutes","Duration.TotalSeconds","Embedded.Value","Error.Record","Excel.CurrentWorkbook","Excel.Workbook","Exchange.Contents","Expression.Constant","Expression.Evaluate","Expression.Identifier","Facebook.Graph","File.Contents","Folder.Contents","Folder.Files","Function.From","Function.Invoke","Function.InvokeAfter","Function.IsDataSource","GoogleAnalytics.Accounts","Guid.From","HdInsight.Containers","HdInsight.Contents","HdInsight.Files","Hdfs.Contents","Hdfs.Files","Informix.Database","Int16.From","Int32.From","Int64.From","Int8.From","ItemExpression.From","Json.Document","Json.FromValue","Lines.FromBinary","Lines.FromText","Lines.ToBinary","Lines.ToText","List.Accumulate","List.AllTrue","List.Alternate","List.AnyTrue","List.Average","List.Buffer","List.Combine","List.Contains","List.ContainsAll","List.ContainsAny","List.Count","List.Covariance","List.DateTimeZones","List.DateTimes","List.Dates","List.Difference","List.Distinct","List.Durations","List.FindText","List.First","List.FirstN","List.Generate","List.InsertRange","List.Intersect","List.IsDistinct","List.IsEmpty","List.Last","List.LastN","List.MatchesAll","List.MatchesAny","List.Max","List.MaxN","List.Median","List.Min","List.MinN","List.Mode","List.Modes","List.NonNullCount","List.Numbers","List.PositionOf","List.PositionOfAny","List.Positions","List.Product","List.Random","List.Range","List.RemoveFirstN","List.RemoveItems","List.RemoveLastN","List.RemoveMatchingItems","List.RemoveNulls","List.RemoveRange","List.Repeat","List.ReplaceMatchingItems","List.ReplaceRange","List.ReplaceValue","List.Reverse","List.Select","List.Single","List.SingleOrDefault","List.Skip","List.Sort","List.StandardDeviation","List.Sum","List.Times","List.Transform","List.TransformMany","List.Union","List.Zip","Logical.From","Logical.FromText","Logical.ToText","MQ.Queue","MySQL.Database","Number.Abs","Number.Acos","Number.Asin","Number.Atan","Number.Atan2","Number.BitwiseAnd","Number.BitwiseNot","Number.BitwiseOr","Number.BitwiseShiftLeft","Number.BitwiseShiftRight","Number.BitwiseXor","Number.Combinations","Number.Cos","Number.Cosh","Number.Exp","Number.Factorial","Number.From","Number.FromText","Number.IntegerDivide","Number.IsEven","Number.IsNaN","Number.IsOdd","Number.Ln","Number.Log","Number.Log10","Number.Mod","Number.Permutations","Number.Power","Number.Random","Number.RandomBetween","Number.Round","Number.RoundAwayFromZero","Number.RoundDown","Number.RoundTowardZero","Number.RoundUp","Number.Sign","Number.Sin","Number.Sinh","Number.Sqrt","Number.Tan","Number.Tanh","Number.ToText","OData.Feed","Odbc.DataSource","Odbc.Query","OleDb.DataSource","OleDb.Query","Oracle.Database","Percentage.From","PostgreSQL.Database","RData.FromBinary","Record.AddField","Record.Combine","Record.Field","Record.FieldCount","Record.FieldNames","Record.FieldOrDefault","Record.FieldValues","Record.FromList","Record.FromTable","Record.HasFields","Record.RemoveFields","Record.RenameFields","Record.ReorderFields","Record.SelectFields","Record.ToList","Record.ToTable","Record.TransformFields","Replacer.ReplaceText","Replacer.ReplaceValue","RowExpression.Column","RowExpression.From","Salesforce.Data","Salesforce.Reports","SapBusinessWarehouse.Cubes","SapHana.Database","SharePoint.Contents","SharePoint.Files","SharePoint.Tables","Single.From","Soda.Feed","Splitter.SplitByNothing","Splitter.SplitTextByAnyDelimiter","Splitter.SplitTextByDelimiter","Splitter.SplitTextByEachDelimiter","Splitter.SplitTextByLengths","Splitter.SplitTextByPositions","Splitter.SplitTextByRanges","Splitter.SplitTextByRepeatedLengths","Splitter.SplitTextByWhitespace","Sql.Database","Sql.Databases","SqlExpression.SchemaFrom","SqlExpression.ToExpression","Sybase.Database","Table.AddColumn","Table.AddIndexColumn","Table.AddJoinColumn","Table.AddKey","Table.AggregateTableColumn","Table.AlternateRows","Table.Buffer","Table.Column","Table.ColumnCount","Table.ColumnNames","Table.ColumnsOfType","Table.Combine","Table.CombineColumns","Table.Contains","Table.ContainsAll","Table.ContainsAny","Table.DemoteHeaders","Table.Distinct","Table.DuplicateColumn","Table.ExpandListColumn","Table.ExpandRecordColumn","Table.ExpandTableColumn","Table.FillDown","Table.FillUp","Table.FilterWithDataTable","Table.FindText","Table.First","Table.FirstN","Table.FirstValue","Table.FromColumns","Table.FromList","Table.FromPartitions","Table.FromRecords","Table.FromRows","Table.FromValue","Table.Group","Table.HasColumns","Table.InsertRows","Table.IsDistinct","Table.IsEmpty","Table.Join","Table.Keys","Table.Last","Table.LastN","Table.MatchesAllRows","Table.MatchesAnyRows","Table.Max","Table.MaxN","Table.Min","Table.MinN","Table.NestedJoin","Table.Partition","Table.PartitionValues","Table.Pivot","Table.PositionOf","Table.PositionOfAny","Table.PrefixColumns","Table.Profile","Table.PromoteHeaders","Table.Range","Table.RemoveColumns","Table.RemoveFirstN","Table.RemoveLastN","Table.RemoveMatchingRows","Table.RemoveRows","Table.RemoveRowsWithErrors","Table.RenameColumns","Table.ReorderColumns","Table.Repeat","Table.ReplaceErrorValues","Table.ReplaceKeys","Table.ReplaceMatchingRows","Table.ReplaceRelationshipIdentity","Table.ReplaceRows","Table.ReplaceValue","Table.ReverseRows","Table.RowCount","Table.Schema","Table.SelectColumns","Table.SelectRows","Table.SelectRowsWithErrors","Table.SingleRow","Table.Skip","Table.Sort","Table.SplitColumn","Table.ToColumns","Table.ToList","Table.ToRecords","Table.ToRows","Table.TransformColumnNames","Table.TransformColumnTypes","Table.TransformColumns","Table.TransformRows","Table.Transpose","Table.Unpivot","Table.UnpivotOtherColumns","Table.View","Table.ViewFunction","TableAction.DeleteRows","TableAction.InsertRows","TableAction.UpdateRows","Tables.GetRelationships","Teradata.Database","Text.AfterDelimiter","Text.At","Text.BeforeDelimiter","Text.BetweenDelimiters","Text.Clean","Text.Combine","Text.Contains","Text.End","Text.EndsWith","Text.Format","Text.From","Text.FromBinary","Text.Insert","Text.Length","Text.Lower","Text.Middle","Text.NewGuid","Text.PadEnd","Text.PadStart","Text.PositionOf","Text.PositionOfAny","Text.Proper","Text.Range","Text.Remove","Text.RemoveRange","Text.Repeat","Text.Replace","Text.ReplaceRange","Text.Select","Text.Split","Text.SplitAny","Text.Start","Text.StartsWith","Text.ToBinary","Text.ToList","Text.Trim","Text.TrimEnd","Text.TrimStart","Text.Upper","Time.EndOfHour","Time.From","Time.FromText","Time.Hour","Time.Minute","Time.Second","Time.StartOfHour","Time.ToRecord","Time.ToText","Type.AddTableKey","Type.ClosedRecord","Type.Facets","Type.ForFunction","Type.ForRecord","Type.FunctionParameters","Type.FunctionRequiredParameters","Type.FunctionReturn","Type.Is","Type.IsNullable","Type.IsOpenRecord","Type.ListItem","Type.NonNullable","Type.OpenRecord","Type.RecordFields","Type.ReplaceFacets","Type.ReplaceTableKeys","Type.TableColumn","Type.TableKeys","Type.TableRow","Type.TableSchema","Type.Union","Uri.BuildQueryString","Uri.Combine","Uri.EscapeDataString","Uri.Parts","Value.Add","Value.As","Value.Compare","Value.Divide","Value.Equals","Value.Firewall","Value.FromText","Value.Is","Value.Metadata","Value.Multiply","Value.NativeQuery","Value.NullableEquals","Value.RemoveMetadata","Value.ReplaceMetadata","Value.ReplaceType","Value.Subtract","Value.Type","ValueAction.NativeStatement","ValueAction.Replace","Variable.Value","Web.Contents","Web.Page","WebAction.Request","Xml.Document","Xml.Tables"],builtinConstants:["BinaryEncoding.Base64","BinaryEncoding.Hex","BinaryOccurrence.Optional","BinaryOccurrence.Repeating","BinaryOccurrence.Required","ByteOrder.BigEndian","ByteOrder.LittleEndian","Compression.Deflate","Compression.GZip","CsvStyle.QuoteAfterDelimiter","CsvStyle.QuoteAlways","Culture.Current","Day.Friday","Day.Monday","Day.Saturday","Day.Sunday","Day.Thursday","Day.Tuesday","Day.Wednesday","ExtraValues.Error","ExtraValues.Ignore","ExtraValues.List","GroupKind.Global","GroupKind.Local","JoinAlgorithm.Dynamic","JoinAlgorithm.LeftHash","JoinAlgorithm.LeftIndex","JoinAlgorithm.PairwiseHash","JoinAlgorithm.RightHash","JoinAlgorithm.RightIndex","JoinAlgorithm.SortMerge","JoinKind.FullOuter","JoinKind.Inner","JoinKind.LeftAnti","JoinKind.LeftOuter","JoinKind.RightAnti","JoinKind.RightOuter","JoinSide.Left","JoinSide.Right","MissingField.Error","MissingField.Ignore","MissingField.UseNull","Number.E","Number.Epsilon","Number.NaN","Number.NegativeInfinity","Number.PI","Number.PositiveInfinity","Occurrence.All","Occurrence.First","Occurrence.Last","Occurrence.Optional","Occurrence.Repeating","Occurrence.Required","Order.Ascending","Order.Descending","Precision.Decimal","Precision.Double","QuoteStyle.Csv","QuoteStyle.None","RelativePosition.FromEnd","RelativePosition.FromStart","RoundingMode.AwayFromZero","RoundingMode.Down","RoundingMode.ToEven","RoundingMode.TowardZero","RoundingMode.Up","SapHanaDistribution.All","SapHanaDistribution.Connection","SapHanaDistribution.Off","SapHanaDistribution.Statement","SapHanaRangeOperator.Equals","SapHanaRangeOperator.GreaterThan","SapHanaRangeOperator.GreaterThanOrEquals","SapHanaRangeOperator.LessThan","SapHanaRangeOperator.LessThanOrEquals","SapHanaRangeOperator.NotEquals","TextEncoding.Ascii","TextEncoding.BigEndianUnicode","TextEncoding.Unicode","TextEncoding.Utf16","TextEncoding.Utf8","TextEncoding.Windows","TraceLevel.Critical","TraceLevel.Error","TraceLevel.Information","TraceLevel.Verbose","TraceLevel.Warning","WebMethod.Delete","WebMethod.Get","WebMethod.Head","WebMethod.Patch","WebMethod.Post","WebMethod.Put"],builtinTypes:["Action.Type","Any.Type","Binary.Type","BinaryEncoding.Type","BinaryOccurrence.Type","Byte.Type","ByteOrder.Type","Character.Type","Compression.Type","CsvStyle.Type","Currency.Type","Date.Type","DateTime.Type","DateTimeZone.Type","Day.Type","Decimal.Type","Double.Type","Duration.Type","ExtraValues.Type","Function.Type","GroupKind.Type","Guid.Type","Int16.Type","Int32.Type","Int64.Type","Int8.Type","JoinAlgorithm.Type","JoinKind.Type","JoinSide.Type","List.Type","Logical.Type","MissingField.Type","None.Type","Null.Type","Number.Type","Occurrence.Type","Order.Type","Password.Type","Percentage.Type","Precision.Type","QuoteStyle.Type","Record.Type","RelativePosition.Type","RoundingMode.Type","SapHanaDistribution.Type","SapHanaRangeOperator.Type","Single.Type","Table.Type","Text.Type","TextEncoding.Type","Time.Type","TraceLevel.Type","Type.Type","Uri.Type","WebMethod.Type"],tokenizer:{root:[[/#"[\w \.]+"/,"identifier.quote"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+([eE][\-+]?\d+)?/,"number"],[/(#?[a-z]+)\b/,{cases:{"@typeKeywords":"type","@keywords":"keyword","@constants":"constant","@constructors":"constructor","@operatorKeywords":"operators","@default":"identifier"}}],[/\b([A-Z][a-zA-Z0-9]+\.Type)\b/,{cases:{"@builtinTypes":"type","@default":"identifier"}}],[/\b([A-Z][a-zA-Z0-9]+\.[A-Z][a-zA-Z0-9]+)\b/,{cases:{"@builtinFunctions":"keyword.function","@builtinConstants":"constant","@default":"identifier"}}],[/\b([a-zA-Z_][\w\.]*)\b/,"identifier"],{include:"@whitespace"},{include:"@comments"},{include:"@strings"},[/[{}()\[\]]/,"@brackets"],[/([=\+<>\-\*&@\?\/!])|([<>]=)|(<>)|(=>)|(\.\.\.)|(\.\.)/,"operators"],[/[,;]/,"delimiter"]],whitespace:[[/\s+/,"white"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],strings:[['"',"string","@string"]],string:[['""',"string.escape"],['"',"string","@pop"],[".","string"]]}}});var Sat={};Ai(Sat,{conf:()=>MFt,language:()=>NFt});var MFt,NFt,kat=P(()=>{MFt={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"#",blockComment:["<#","#>"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},NFt={defaultToken:"",ignoreCase:!0,tokenPostfix:".ps1",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["begin","break","catch","class","continue","data","define","do","dynamicparam","else","elseif","end","exit","filter","finally","for","foreach","from","function","if","in","param","process","return","switch","throw","trap","try","until","using","var","while","workflow","parallel","sequence","inlinescript","configuration"],helpKeywords:/SYNOPSIS|DESCRIPTION|PARAMETER|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|ROLE|FUNCTIONALITY|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP/,symbols:/[=>/,"comment","@pop"],[/(\.)(@helpKeywords)(?!\w)/,{token:"comment.keyword.$2"}],[/[\.#]/,"comment"]]}}});var Lat={};Ai(Lat,{conf:()=>RFt,language:()=>PFt});var AFt,RFt,PFt,Eat=P(()=>{AFt=["true","false"],RFt={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],autoCloseBefore:`.,=}])>' `,indentationRules:{increaseIndentPattern:new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),decreaseIndentPattern:new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")}},PFt={defaultToken:"",tokenPostfix:".proto",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],symbols:/[=>/,{token:"@brackets",bracket:"@close",switchTo:"identifier"}]],field:[{include:"@whitespace"},["group",{cases:{"$S2==proto2":{token:"keyword",switchTo:"@groupDecl.$S2"}}}],[/(@identifier)(\s*)(=)/,["identifier","white",{token:"delimiter",next:"@pop"}]],[/@fullIdentifier|\./,{cases:{"@builtinTypes":"keyword","@default":"type.identifier"}}]],groupDecl:[{include:"@whitespace"},[/@identifier/,"identifier"],["=","operator"],[/{/,{token:"@brackets",bracket:"@open",switchTo:"@messageBody.$S2"}],{include:"@constant"}],type:[{include:"@whitespace"},[/@identifier/,"type.identifier","@pop"],[/./,"delimiter"]],identifier:[{include:"@whitespace"},[/@identifier/,"identifier","@pop"]],serviceDecl:[{include:"@whitespace"},[/@identifier/,"identifier"],[/{/,{token:"@brackets",bracket:"@open",switchTo:"@serviceBody.$S2"}]],serviceBody:[{include:"@whitespace"},{include:"@constant"},[/;/,"delimiter"],[/option\b/,"keyword","@option.$S2"],[/rpc\b/,"keyword","@rpc.$S2"],[/\[/,{token:"@brackets",bracket:"@open",next:"@options.$S2"}],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]],rpc:[{include:"@whitespace"},[/@identifier/,"identifier"],[/\(/,{token:"@brackets",bracket:"@open",switchTo:"@request.$S2"}],[/{/,{token:"@brackets",bracket:"@open",next:"@methodOptions.$S2"}],[/;/,"delimiter","@pop"]],request:[{include:"@whitespace"},[/@messageType/,{cases:{stream:{token:"keyword",next:"@type.$S2"},"@default":"type.identifier"}}],[/\)/,{token:"@brackets",bracket:"@close",switchTo:"@returns.$S2"}]],returns:[{include:"@whitespace"},[/returns\b/,"keyword"],[/\(/,{token:"@brackets",bracket:"@open",switchTo:"@response.$S2"}]],response:[{include:"@whitespace"},[/@messageType/,{cases:{stream:{token:"keyword",next:"@type.$S2"},"@default":"type.identifier"}}],[/\)/,{token:"@brackets",bracket:"@close",switchTo:"@rpc.$S2"}]],methodOptions:[{include:"@whitespace"},{include:"@constant"},[/;/,"delimiter"],["option","keyword"],[/@optionName/,"annotation"],[/[()]/,"annotation.brackets"],[/=/,"operator"],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringSingle:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],constant:[["@boolLit","keyword.constant"],["@hexLit","number.hex"],["@octalLit","number.octal"],["@decimalLit","number"],["@floatLit","number.float"],[/("([^"\\]|\\.)*|'([^'\\]|\\.)*)$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/'/,{token:"string.quote",bracket:"@open",next:"@stringSingle"}],[/{/,{token:"@brackets",bracket:"@open",next:"@prototext"}],[/identifier/,"identifier"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],prototext:[{include:"@whitespace"},{include:"@constant"},[/@identifier/,"identifier"],[/[:;]/,"delimiter"],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]]}}});var Dat={};Ai(Dat,{conf:()=>OFt,language:()=>zFt});var OFt,zFt,Tat=P(()=>{OFt={comments:{lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}],folding:{offSide:!0}},zFt={defaultToken:"",tokenPostfix:".pug",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["append","block","case","default","doctype","each","else","extends","for","if","in","include","mixin","typeof","unless","var","when"],tags:["a","abbr","acronym","address","area","article","aside","audio","b","base","basefont","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","li","link","map","mark","menu","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","tracks","tt","u","ul","video","wbr"],symbols:/[\+\-\*\%\&\|\!\=\/\.\,\:]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)([a-zA-Z_-][\w-]*)/,{cases:{"$2@tags":{cases:{"@eos":["","tag"],"@default":["",{token:"tag",next:"@tag.$1"}]}},"$2@keywords":["",{token:"keyword.$2"}],"@default":["",""]}}],[/^(\s*)(#[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.id"],"@default":["",{token:"tag.id",next:"@tag.$1"}]}}],[/^(\s*)(\.[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.class"],"@default":["",{token:"tag.class",next:"@tag.$1"}]}}],[/^(\s*)(\|.*)$/,""],{include:"@whitespace"},[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":""}}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d+/,"number"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],tag:[[/(\.)(\s*$)/,[{token:"delimiter",next:"@blockText.$S2."},""]],[/\s+/,{token:"",next:"@simpleText"}],[/#[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.id",next:"@pop"},"@default":"tag.id"}}],[/\.[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.class",next:"@pop"},"@default":"tag.class"}}],[/\(/,{token:"delimiter.parenthesis",next:"@attributeList"}]],simpleText:[[/[^#]+$/,{token:"",next:"@popall"}],[/[^#]+/,{token:""}],[/(#{)([^}]*)(})/,{cases:{"@eos":["interpolation.delimiter","interpolation",{token:"interpolation.delimiter",next:"@popall"}],"@default":["interpolation.delimiter","interpolation","interpolation.delimiter"]}}],[/#$/,{token:"",next:"@popall"}],[/#/,""]],attributeList:[[/\s+/,""],[/(\w+)(\s*=\s*)("|')/,["attribute.name","delimiter",{token:"attribute.value",next:"@value.$3"}]],[/\w+/,"attribute.name"],[/,/,{cases:{"@eos":{token:"attribute.delimiter",next:"@popall"},"@default":"attribute.delimiter"}}],[/\)$/,{token:"delimiter.parenthesis",next:"@popall"}],[/\)/,{token:"delimiter.parenthesis",next:"@pop"}]],whitespace:[[/^(\s*)(\/\/.*)$/,{token:"comment",next:"@blockText.$1.comment"}],[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/"]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${Hat.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:q6e.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${Hat.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:q6e.languages.IndentAction.Indent}}]},tHt={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/}});var Wat={};Ai(Wat,{conf:()=>iHt,language:()=>nHt});var iHt,nHt,Uat=P(()=>{iHt={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},nHt={defaultToken:"",tokenPostfix:".redis",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["APPEND","AUTH","BGREWRITEAOF","BGSAVE","BITCOUNT","BITFIELD","BITOP","BITPOS","BLPOP","BRPOP","BRPOPLPUSH","CLIENT","KILL","LIST","GETNAME","PAUSE","REPLY","SETNAME","CLUSTER","ADDSLOTS","COUNT-FAILURE-REPORTS","COUNTKEYSINSLOT","DELSLOTS","FAILOVER","FORGET","GETKEYSINSLOT","INFO","KEYSLOT","MEET","NODES","REPLICATE","RESET","SAVECONFIG","SET-CONFIG-EPOCH","SETSLOT","SLAVES","SLOTS","COMMAND","COUNT","GETKEYS","CONFIG","GET","REWRITE","SET","RESETSTAT","DBSIZE","DEBUG","OBJECT","SEGFAULT","DECR","DECRBY","DEL","DISCARD","DUMP","ECHO","EVAL","EVALSHA","EXEC","EXISTS","EXPIRE","EXPIREAT","FLUSHALL","FLUSHDB","GEOADD","GEOHASH","GEOPOS","GEODIST","GEORADIUS","GEORADIUSBYMEMBER","GETBIT","GETRANGE","GETSET","HDEL","HEXISTS","HGET","HGETALL","HINCRBY","HINCRBYFLOAT","HKEYS","HLEN","HMGET","HMSET","HSET","HSETNX","HSTRLEN","HVALS","INCR","INCRBY","INCRBYFLOAT","KEYS","LASTSAVE","LINDEX","LINSERT","LLEN","LPOP","LPUSH","LPUSHX","LRANGE","LREM","LSET","LTRIM","MGET","MIGRATE","MONITOR","MOVE","MSET","MSETNX","MULTI","PERSIST","PEXPIRE","PEXPIREAT","PFADD","PFCOUNT","PFMERGE","PING","PSETEX","PSUBSCRIBE","PUBSUB","PTTL","PUBLISH","PUNSUBSCRIBE","QUIT","RANDOMKEY","READONLY","READWRITE","RENAME","RENAMENX","RESTORE","ROLE","RPOP","RPOPLPUSH","RPUSH","RPUSHX","SADD","SAVE","SCARD","SCRIPT","FLUSH","LOAD","SDIFF","SDIFFSTORE","SELECT","SETBIT","SETEX","SETNX","SETRANGE","SHUTDOWN","SINTER","SINTERSTORE","SISMEMBER","SLAVEOF","SLOWLOG","SMEMBERS","SMOVE","SORT","SPOP","SRANDMEMBER","SREM","STRLEN","SUBSCRIBE","SUNION","SUNIONSTORE","SWAPDB","SYNC","TIME","TOUCH","TTL","TYPE","UNSUBSCRIBE","UNLINK","UNWATCH","WAIT","WATCH","ZADD","ZCARD","ZCOUNT","ZINCRBY","ZINTERSTORE","ZLEXCOUNT","ZRANGE","ZRANGEBYLEX","ZREVRANGEBYLEX","ZRANGEBYSCORE","ZRANK","ZREM","ZREMRANGEBYLEX","ZREMRANGEBYRANK","ZREMRANGEBYSCORE","ZREVRANGE","ZREVRANGEBYSCORE","ZREVRANK","ZSCORE","ZUNIONSTORE","SCAN","SSCAN","HSCAN","ZSCAN"],operators:[],builtinFunctions:[],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}],[/"/,{token:"string.double",next:"@stringDouble"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],stringDouble:[[/[^"]+/,"string.double"],[/""/,"string.double"],[/"/,{token:"string.double",next:"@pop"}]],scopes:[]}}});var $at={};Ai($at,{conf:()=>oHt,language:()=>rHt});var oHt,rHt,jat=P(()=>{oHt={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},rHt={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["AES128","AES256","ALL","ALLOWOVERWRITE","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","AUTHORIZATION","AZ64","BACKUP","BETWEEN","BINARY","BLANKSASNULL","BOTH","BYTEDICT","BZIP2","CASE","CAST","CHECK","COLLATE","COLUMN","CONSTRAINT","CREATE","CREDENTIALS","CROSS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURRENT_USER_ID","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DELTA","DELTA32K","DESC","DISABLE","DISTINCT","DO","ELSE","EMPTYASNULL","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","END","EXCEPT","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FROM","FULL","GLOBALDICT256","GLOBALDICT64K","GRANT","GROUP","GZIP","HAVING","IDENTITY","IGNORE","ILIKE","IN","INITIALLY","INNER","INTERSECT","INTO","IS","ISNULL","JOIN","LANGUAGE","LEADING","LEFT","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","LZO","LZOP","MINUS","MOSTLY16","MOSTLY32","MOSTLY8","NATURAL","NEW","NOT","NOTNULL","NULL","NULLS","OFF","OFFLINE","OFFSET","OID","OLD","ON","ONLY","OPEN","OR","ORDER","OUTER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RAW","READRATIO","RECOVER","REFERENCES","RESPECT","REJECTLOG","RESORT","RESTORE","RIGHT","SELECT","SESSION_USER","SIMILAR","SNAPSHOT","SOME","SYSDATE","SYSTEM","TABLE","TAG","TDES","TEXT255","TEXT32K","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","TRUNCATECOLUMNS","UNION","UNIQUE","USER","USING","VERBOSE","WALLET","WHEN","WHERE","WITH","WITHOUT"],operators:["AND","BETWEEN","IN","LIKE","NOT","OR","IS","NULL","INTERSECT","UNION","INNER","JOIN","LEFT","OUTER","RIGHT"],builtinFunctions:["current_schema","current_schemas","has_database_privilege","has_schema_privilege","has_table_privilege","age","current_time","current_timestamp","localtime","isfinite","now","ascii","get_bit","get_byte","set_bit","set_byte","to_ascii","approximate percentile_disc","avg","count","listagg","max","median","min","percentile_cont","stddev_samp","stddev_pop","sum","var_samp","var_pop","bit_and","bit_or","bool_and","bool_or","cume_dist","first_value","lag","last_value","lead","nth_value","ratio_to_report","dense_rank","ntile","percent_rank","rank","row_number","case","coalesce","decode","greatest","least","nvl","nvl2","nullif","add_months","at time zone","convert_timezone","current_date","date_cmp","date_cmp_timestamp","date_cmp_timestamptz","date_part_year","dateadd","datediff","date_part","date_trunc","extract","getdate","interval_cmp","last_day","months_between","next_day","sysdate","timeofday","timestamp_cmp","timestamp_cmp_date","timestamp_cmp_timestamptz","timestamptz_cmp","timestamptz_cmp_date","timestamptz_cmp_timestamp","timezone","to_timestamp","trunc","abs","acos","asin","atan","atan2","cbrt","ceil","ceiling","checksum","cos","cot","degrees","dexp","dlog1","dlog10","exp","floor","ln","log","mod","pi","power","radians","random","round","sin","sign","sqrt","tan","to_hex","bpcharcmp","btrim","bttext_pattern_cmp","char_length","character_length","charindex","chr","concat","crc32","func_sha1","initcap","left and rights","len","length","lower","lpad and rpads","ltrim","md5","octet_length","position","quote_ident","quote_literal","regexp_count","regexp_instr","regexp_replace","regexp_substr","repeat","replace","replicate","reverse","rtrim","split_part","strpos","strtol","substring","textlen","translate","trim","upper","cast","convert","to_char","to_date","to_number","json_array_length","json_extract_array_element_text","json_extract_path_text","current_setting","pg_cancel_backend","pg_terminate_backend","set_config","current_database","current_user","current_user_id","pg_backend_pid","pg_last_copy_count","pg_last_copy_id","pg_last_query_id","pg_last_unload_count","session_user","slice_num","user","version","abbrev","acosd","any","area","array_agg","array_append","array_cat","array_dims","array_fill","array_length","array_lower","array_ndims","array_position","array_positions","array_prepend","array_remove","array_replace","array_to_json","array_to_string","array_to_tsvector","array_upper","asind","atan2d","atand","bit","bit_length","bound_box","box","brin_summarize_new_values","broadcast","cardinality","center","circle","clock_timestamp","col_description","concat_ws","convert_from","convert_to","corr","cosd","cotd","covar_pop","covar_samp","current_catalog","current_query","current_role","currval","cursor_to_xml","diameter","div","encode","enum_first","enum_last","enum_range","every","family","format","format_type","generate_series","generate_subscripts","get_current_ts_config","gin_clean_pending_list","grouping","has_any_column_privilege","has_column_privilege","has_foreign_data_wrapper_privilege","has_function_privilege","has_language_privilege","has_sequence_privilege","has_server_privilege","has_tablespace_privilege","has_type_privilege","height","host","hostmask","inet_client_addr","inet_client_port","inet_merge","inet_same_family","inet_server_addr","inet_server_port","isclosed","isempty","isopen","json_agg","json_object","json_object_agg","json_populate_record","json_populate_recordset","json_to_record","json_to_recordset","jsonb_agg","jsonb_object_agg","justify_days","justify_hours","justify_interval","lastval","left","line","localtimestamp","lower_inc","lower_inf","lpad","lseg","make_date","make_interval","make_time","make_timestamp","make_timestamptz","masklen","mode","netmask","network","nextval","npoints","num_nonnulls","num_nulls","numnode","obj_description","overlay","parse_ident","path","pclose","percentile_disc","pg_advisory_lock","pg_advisory_lock_shared","pg_advisory_unlock","pg_advisory_unlock_all","pg_advisory_unlock_shared","pg_advisory_xact_lock","pg_advisory_xact_lock_shared","pg_backup_start_time","pg_blocking_pids","pg_client_encoding","pg_collation_is_visible","pg_column_size","pg_conf_load_time","pg_control_checkpoint","pg_control_init","pg_control_recovery","pg_control_system","pg_conversion_is_visible","pg_create_logical_replication_slot","pg_create_physical_replication_slot","pg_create_restore_point","pg_current_xlog_flush_location","pg_current_xlog_insert_location","pg_current_xlog_location","pg_database_size","pg_describe_object","pg_drop_replication_slot","pg_export_snapshot","pg_filenode_relation","pg_function_is_visible","pg_get_constraintdef","pg_get_expr","pg_get_function_arguments","pg_get_function_identity_arguments","pg_get_function_result","pg_get_functiondef","pg_get_indexdef","pg_get_keywords","pg_get_object_address","pg_get_owned_sequence","pg_get_ruledef","pg_get_serial_sequence","pg_get_triggerdef","pg_get_userbyid","pg_get_viewdef","pg_has_role","pg_identify_object","pg_identify_object_as_address","pg_index_column_has_property","pg_index_has_property","pg_indexam_has_property","pg_indexes_size","pg_is_in_backup","pg_is_in_recovery","pg_is_other_temp_schema","pg_is_xlog_replay_paused","pg_last_committed_xact","pg_last_xact_replay_timestamp","pg_last_xlog_receive_location","pg_last_xlog_replay_location","pg_listening_channels","pg_logical_emit_message","pg_logical_slot_get_binary_changes","pg_logical_slot_get_changes","pg_logical_slot_peek_binary_changes","pg_logical_slot_peek_changes","pg_ls_dir","pg_my_temp_schema","pg_notification_queue_usage","pg_opclass_is_visible","pg_operator_is_visible","pg_opfamily_is_visible","pg_options_to_table","pg_postmaster_start_time","pg_read_binary_file","pg_read_file","pg_relation_filenode","pg_relation_filepath","pg_relation_size","pg_reload_conf","pg_replication_origin_create","pg_replication_origin_drop","pg_replication_origin_oid","pg_replication_origin_progress","pg_replication_origin_session_is_setup","pg_replication_origin_session_progress","pg_replication_origin_session_reset","pg_replication_origin_session_setup","pg_replication_origin_xact_reset","pg_replication_origin_xact_setup","pg_rotate_logfile","pg_size_bytes","pg_size_pretty","pg_sleep","pg_sleep_for","pg_sleep_until","pg_start_backup","pg_stat_file","pg_stop_backup","pg_switch_xlog","pg_table_is_visible","pg_table_size","pg_tablespace_databases","pg_tablespace_location","pg_tablespace_size","pg_total_relation_size","pg_trigger_depth","pg_try_advisory_lock","pg_try_advisory_lock_shared","pg_try_advisory_xact_lock","pg_try_advisory_xact_lock_shared","pg_ts_config_is_visible","pg_ts_dict_is_visible","pg_ts_parser_is_visible","pg_ts_template_is_visible","pg_type_is_visible","pg_typeof","pg_xact_commit_timestamp","pg_xlog_location_diff","pg_xlog_replay_pause","pg_xlog_replay_resume","pg_xlogfile_name","pg_xlogfile_name_offset","phraseto_tsquery","plainto_tsquery","point","polygon","popen","pqserverversion","query_to_xml","querytree","quote_nullable","radius","range_merge","regexp_matches","regexp_split_to_array","regexp_split_to_table","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","right","row_security_active","row_to_json","rpad","scale","set_masklen","setseed","setval","setweight","shobj_description","sind","sprintf","statement_timestamp","stddev","string_agg","string_to_array","strip","substr","table_to_xml","table_to_xml_and_xmlschema","tand","text","to_json","to_regclass","to_regnamespace","to_regoper","to_regoperator","to_regproc","to_regprocedure","to_regrole","to_regtype","to_tsquery","to_tsvector","transaction_timestamp","ts_debug","ts_delete","ts_filter","ts_headline","ts_lexize","ts_parse","ts_rank","ts_rank_cd","ts_rewrite","ts_stat","ts_token_type","tsquery_phrase","tsvector_to_array","tsvector_update_trigger","tsvector_update_trigger_column","txid_current","txid_current_snapshot","txid_snapshot_xip","txid_snapshot_xmax","txid_snapshot_xmin","txid_visible_in_snapshot","unnest","upper_inc","upper_inf","variance","width","width_bucket","xml_is_well_formed","xml_is_well_formed_content","xml_is_well_formed_document","xmlagg","xmlcomment","xmlconcat","xmlelement","xmlexists","xmlforest","xmlparse","xmlpi","xmlroot","xmlserialize","xpath","xpath_exists"],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[]}}});var qat={};Ai(qat,{conf:()=>sHt,language:()=>aHt});var sHt,aHt,Gat=P(()=>{sHt={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},aHt={defaultToken:"",tokenPostfix:".rst",control:/[\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],alphanumerics:/[A-Za-z0-9]/,simpleRefNameWithoutBq:/(?:@alphanumerics[-_+:.]*@alphanumerics)+|(?:@alphanumerics+)/,simpleRefName:/(?:`@phrase`|@simpleRefNameWithoutBq)/,phrase:/@simpleRefNameWithoutBq(?:\s@simpleRefNameWithoutBq)*/,citationName:/[A-Za-z][A-Za-z0-9-_.]*/,blockLiteralStart:/(?:[!"#$%&'()*+,-./:;<=>?@\[\]^_`{|}~]|[\s])/,precedingChars:/(?:[ -:/'"<([{])/,followingChars:/(?:[ -.,:;!?/'")\]}>]|$)/,punctuation:/(=|-|~|`|#|"|\^|\+|\*|:|\.|'|_|\+)/,tokenizer:{root:[[/^(@punctuation{3,}$){1,1}?/,"keyword"],[/^\s*([\*\-+‣•]|[a-zA-Z0-9]+\.|\([a-zA-Z0-9]+\)|[a-zA-Z0-9]+\))\s/,"keyword"],[/([ ]::)\s*$/,"keyword","@blankLineOfLiteralBlocks"],[/(::)\s*$/,"keyword","@blankLineOfLiteralBlocks"],{include:"@tables"},{include:"@explicitMarkupBlocks"},{include:"@inlineMarkup"}],explicitMarkupBlocks:[{include:"@citations"},{include:"@footnotes"},[/^(\.\.\s)(@simpleRefName)(::\s)(.*)$/,[{token:"",next:"subsequentLines"},"keyword","",""]],[/^(\.\.)(\s+)(_)(@simpleRefName)(:)(\s+)(.*)/,[{token:"",next:"hyperlinks"},"","","string.link","","","string.link"]],[/^((?:(?:\.\.)(?:\s+))?)(__)(:)(\s+)(.*)/,[{token:"",next:"subsequentLines"},"","","","string.link"]],[/^(__\s+)(.+)/,["","string.link"]],[/^(\.\.)( \|)([^| ]+[^|]*[^| ]*)(\| )(@simpleRefName)(:: .*)/,[{token:"",next:"subsequentLines"},"","string.link","","keyword",""],"@rawBlocks"],[/(\|)([^| ]+[^|]*[^| ]*)(\|_{0,2})/,["","string.link",""]],[/^(\.\.)([ ].*)$/,[{token:"",next:"@comments"},"comment"]]],inlineMarkup:[{include:"@citationsReference"},{include:"@footnotesReference"},[/(@simpleRefName)(_{1,2})/,["string.link",""]],[/(`)([^<`]+\s+)(<)(.*)(>)(`)(_)/,["","string.link","","string.link","","",""]],[/\*\*([^\\*]|\*(?!\*))+\*\*/,"strong"],[/\*[^*]+\*/,"emphasis"],[/(``)((?:[^`]|\`(?!`))+)(``)/,["","keyword",""]],[/(__\s+)(.+)/,["","keyword"]],[/(:)((?:@simpleRefNameWithoutBq)?)(:`)([^`]+)(`)/,["","keyword","","",""]],[/(`)([^`]+)(`:)((?:@simpleRefNameWithoutBq)?)(:)/,["","","","keyword",""]],[/(`)([^`]+)(`)/,""],[/(_`)(@phrase)(`)/,["","string.link",""]]],citations:[[/^(\.\.\s+\[)((?:@citationName))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]]],citationsReference:[[/(\[)(@citationName)(\]_)/,["","string.link",""]]],footnotes:[[/^(\.\.\s+\[)((?:[0-9]+))(\]\s+.*)/,[{token:"",next:"@subsequentLines"},"string.link",""]],[/^(\.\.\s+\[)((?:#@simpleRefName?))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]],[/^(\.\.\s+\[)((?:\*))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]]],footnotesReference:[[/(\[)([0-9]+)(\])(_)/,["","string.link","",""]],[/(\[)(#@simpleRefName?)(\])(_)/,["","string.link","",""]],[/(\[)(\*)(\])(_)/,["","string.link","",""]]],blankLineOfLiteralBlocks:[[/^$/,"","@subsequentLinesOfLiteralBlocks"],[/^.*$/,"","@pop"]],subsequentLinesOfLiteralBlocks:[[/(@blockLiteralStart+)(.*)/,["keyword",""]],[/^(?!blockLiteralStart)/,"","@popall"]],subsequentLines:[[/^[\s]+.*/,""],[/^(?!\s)/,"","@pop"]],hyperlinks:[[/^[\s]+.*/,"string.link"],[/^(?!\s)/,"","@pop"]],comments:[[/^[\s]+.*/,"comment"],[/^(?!\s)/,"","@pop"]],tables:[[/\+-[+-]+/,"keyword"],[/\+=[+=]+/,"keyword"]]}}});var Kat={};Ai(Kat,{conf:()=>lHt,language:()=>cHt});var lHt,cHt,Yat=P(()=>{lHt={comments:{lineComment:"#",blockComment:["=begin","=end"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],indentationRules:{increaseIndentPattern:new RegExp(`^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|("|'|/).*\\4)*(#.*)?$`),decreaseIndentPattern:new RegExp("^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)")}},cHt={tokenPostfix:".ruby",keywords:["__LINE__","__ENCODING__","__FILE__","BEGIN","END","alias","and","begin","break","case","class","def","defined?","do","else","elsif","end","ensure","for","false","if","in","module","next","nil","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield"],keywordops:["::","..","...","?",":","=>"],builtins:["require","public","private","include","extend","attr_reader","protected","private_class_method","protected_class_method","new"],declarations:["module","class","def","case","do","begin","for","if","while","until","unless"],linedecls:["def","case","do","begin","for","if","while","until","unless"],operators:["^","&","|","<=>","==","===","!~","=~",">",">=","<","<=","<<",">>","+","-","*","/","%","**","~","+@","-@","[]","[]=","`","+=","-=","*=","**=","/=","^=","%=","<<=",">>=","&=","&&=","||=","|="],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],symbols:/[=>"}],[/%([qws])(@delim)/,{token:"string.$1.delim",switchTo:"@qstring.$1.$2.$2"}],[/%r\(/,{token:"regexp.delim",switchTo:"@pregexp.(.)"}],[/%r\[/,{token:"regexp.delim",switchTo:"@pregexp.[.]"}],[/%r\{/,{token:"regexp.delim",switchTo:"@pregexp.{.}"}],[/%r"}],[/%r(@delim)/,{token:"regexp.delim",switchTo:"@pregexp.$1.$1"}],[/%(x|W|Q?)\(/,{token:"string.$1.delim",switchTo:"@qqstring.$1.(.)"}],[/%(x|W|Q?)\[/,{token:"string.$1.delim",switchTo:"@qqstring.$1.[.]"}],[/%(x|W|Q?)\{/,{token:"string.$1.delim",switchTo:"@qqstring.$1.{.}"}],[/%(x|W|Q?)"}],[/%(x|W|Q?)(@delim)/,{token:"string.$1.delim",switchTo:"@qqstring.$1.$2.$2"}],[/%([rqwsxW]|Q?)./,{token:"invalid",next:"@pop"}],[/./,{token:"invalid",next:"@pop"}]],qstring:[[/\\$/,"string.$S2.escape"],[/\\./,"string.$S2.escape"],[/./,{cases:{"$#==$S4":{token:"string.$S2.delim",next:"@pop"},"$#==$S3":{token:"string.$S2.delim",next:"@push"},"@default":"string.$S2"}}]],qqstring:[[/#/,"string.$S2.escape","@interpolated"],{include:"@qstring"}],whitespace:[[/[ \t\r\n]+/,""],[/^\s*=begin\b/,"comment","@comment"],[/#.*$/,"comment"]],comment:[[/[^=]+/,"comment"],[/^\s*=begin\b/,"comment.invalid"],[/^\s*=end\b.*/,"comment","@pop"],[/[=]/,"comment"]]}}});var Zat={};Ai(Zat,{conf:()=>dHt,language:()=>uHt});var dHt,uHt,Xat=P(()=>{dHt={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},uHt={tokenPostfix:".rust",defaultToken:"invalid",keywords:["as","async","await","box","break","const","continue","crate","dyn","else","enum","extern","false","fn","for","if","impl","in","let","loop","match","mod","move","mut","pub","ref","return","self","static","struct","super","trait","true","try","type","unsafe","use","where","while","catch","default","union","static","abstract","alignof","become","do","final","macro","offsetof","override","priv","proc","pure","sizeof","typeof","unsized","virtual","yield"],typeKeywords:["Self","m32","m64","m128","f80","f16","f128","int","uint","float","char","bool","u8","u16","u32","u64","f32","f64","i8","i16","i32","i64","str","Option","Either","c_float","c_double","c_void","FILE","fpos_t","DIR","dirent","c_char","c_schar","c_uchar","c_short","c_ushort","c_int","c_uint","c_long","c_ulong","size_t","ptrdiff_t","clock_t","time_t","c_longlong","c_ulonglong","intptr_t","uintptr_t","off_t","dev_t","ino_t","pid_t","mode_t","ssize_t"],constants:["true","false","Some","None","Left","Right","Ok","Err"],supportConstants:["EXIT_FAILURE","EXIT_SUCCESS","RAND_MAX","EOF","SEEK_SET","SEEK_CUR","SEEK_END","_IOFBF","_IONBF","_IOLBF","BUFSIZ","FOPEN_MAX","FILENAME_MAX","L_tmpnam","TMP_MAX","O_RDONLY","O_WRONLY","O_RDWR","O_APPEND","O_CREAT","O_EXCL","O_TRUNC","S_IFIFO","S_IFCHR","S_IFBLK","S_IFDIR","S_IFREG","S_IFMT","S_IEXEC","S_IWRITE","S_IREAD","S_IRWXU","S_IXUSR","S_IWUSR","S_IRUSR","F_OK","R_OK","W_OK","X_OK","STDIN_FILENO","STDOUT_FILENO","STDERR_FILENO"],supportMacros:["format!","print!","println!","panic!","format_args!","unreachable!","write!","writeln!"],operators:["!","!=","%","%=","&","&=","&&","*","*=","+","+=","-","-=","->",".","..","...","/","/=",":",";","<<","<<=","<","<=","=","==","=>",">",">=",">>",">>=","@","^","^=","|","|=","||","_","?","#"],escapes:/\\([nrt0\"''\\]|x\h{2}|u\{\h{1,6}\})/,delimiters:/[,]/,symbols:/[\#\!\%\&\*\+\-\.\/\:\;\<\=\>\@\^\|_\?]+/,intSuffixes:/[iu](8|16|32|64|128|size)/,floatSuffixes:/f(32|64)/,tokenizer:{root:[[/r(#*)"/,{token:"string.quote",bracket:"@open",next:"@stringraw.$1"}],[/[a-zA-Z][a-zA-Z0-9_]*!?|_[a-zA-Z0-9_]+/,{cases:{"@typeKeywords":"keyword.type","@keywords":"keyword","@supportConstants":"keyword","@supportMacros":"keyword","@constants":"keyword","@default":"identifier"}}],[/\$/,"identifier"],[/'[a-zA-Z_][a-zA-Z0-9_]*(?=[^\'])/,"identifier"],[/'(\S|@escapes)'/,"string.byteliteral"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],{include:"@numbers"},{include:"@whitespace"},[/@delimiters/,{cases:{"@keywords":"keyword","@default":"delimiter"}}],[/[{}()\[\]<>]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringraw:[[/[^"#]+/,{token:"string"}],[/"(#*)/,{cases:{"$1==$S2":{token:"string.quote",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["#]/,{token:"string"}]],numbers:[[/(0o[0-7_]+)(@intSuffixes)?/,{token:"number"}],[/(0b[0-1_]+)(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(\.[\d][\d_]*)?[eE][+-][\d_]+(@floatSuffixes)?/,{token:"number"}],[/\b(\d\.?[\d_]*)(@floatSuffixes)?\b/,{token:"number"}],[/(0x[\da-fA-F]+)_?(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(@intSuffixes?)?/,{token:"number"}]]}}});var Qat={};Ai(Qat,{conf:()=>hHt,language:()=>fHt});var hHt,fHt,Jat=P(()=>{hHt={comments:{lineComment:"'"},brackets:[["(",")"],["[","]"],["If","EndIf"],["While","EndWhile"],["For","EndFor"],["Sub","EndSub"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]}]},fHt={defaultToken:"",tokenPostfix:".sb",ignoreCase:!0,brackets:[{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"keyword.tag-if",open:"If",close:"EndIf"},{token:"keyword.tag-while",open:"While",close:"EndWhile"},{token:"keyword.tag-for",open:"For",close:"EndFor"},{token:"keyword.tag-sub",open:"Sub",close:"EndSub"}],keywords:["Else","ElseIf","EndFor","EndIf","EndSub","EndWhile","For","Goto","If","Step","Sub","Then","To","While"],tagwords:["If","Sub","While","For"],operators:[">","<","<>","<=",">=","And","Or","+","-","*","/","="],identifier:/[a-zA-Z_][\w]*/,symbols:/[=><:+\-*\/%\.,]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},[/(@identifier)(?=[.])/,"type"],[/@identifier/,{cases:{"@keywords":{token:"keyword.$0"},"@operators":"operator","@default":"variable.name"}}],[/([.])(@identifier)/,{cases:{$2:["delimiter","type.member"],"@default":""}}],[/\d*\.\d+/,"number.float"],[/\d+/,"number"],[/[()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/(\').*$/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"C?/,"string","@pop"]]}}});var elt={};Ai(elt,{conf:()=>pHt,language:()=>mHt});var pHt,mHt,tlt=P(()=>{pHt={wordPattern:/(unary_[@~!#%^&*()\-=+\\|:<>\/?]+)|([a-zA-Z_$][\w$]*?_=)|(`[^`]+`)|([a-zA-Z_$][\w$]*)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},mHt={tokenPostfix:".scala",keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],softKeywords:["as","export","extension","end","derives","on"],constants:["true","false","null","this","super"],modifiers:["abstract","final","implicit","lazy","override","private","protected","sealed"],softModifiers:["inline","opaque","open","transparent","using"],name:/(?:[a-z_$][\w$]*|`[^`]+`)/,type:/(?:[A-Z][\w$]*)/,symbols:/[=>))/,["@brackets","white","variable"]],[/@name/,{cases:{"@keywords":"keyword","@softKeywords":"keyword","@modifiers":"keyword.modifier","@softModifiers":"keyword.modifier","@constants":{token:"constant",next:"@allowMethod"},"@default":{token:"identifier",next:"@allowMethod"}}}],[/@type/,"type","@allowMethod"],{include:"@whitespace"},[/@[a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*/,"annotation"],[/[{(]/,"@brackets"],[/[})]/,"@brackets","@allowMethod"],[/\[/,"operator.square"],[/](?!\s*(?:va[rl]|def|type)\b)/,"operator.square","@allowMethod"],[/]/,"operator.square"],[/([=-]>|<-|>:|<:|:>|<%)(?=[\s\w()[\]{},\."'`])/,"keyword"],[/@symbols/,"operator"],[/[;,\.]/,"delimiter"],[/'[a-zA-Z$][\w$]*(?!')/,"attribute.name"],[/'[^\\']'/,"string","@allowMethod"],[/(')(@escapes)(')/,["string","string.escape",{token:"string",next:"@allowMethod"}]],[/'/,"string.invalid"]],import:[[/;/,"delimiter","@pop"],[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/@name|@type/,"type"],[/[(){}]/,"@brackets"],[/[[\]]/,"operator.square"],[/[\.,]/,"delimiter"]],allowMethod:[[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/(?==>[\s\w([{])/,"keyword","@pop"],[/(@name|@symbols)(?=[ \t]*[[({"'`]|[ \t]+(?:[+-]?\.?\d|\w))/,{cases:{"@keywords":{token:"keyword",next:"@pop"},"->|<-|>:|<:|<%":{token:"keyword",next:"@pop"},"@default":{token:"@rematch",next:"@pop"}}}],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],case:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword","@allowMethod"],[/\bif\b|=>/,"keyword","@pop"],[/`[^`]+`/,"identifier","@allowMethod"],[/@name/,"variable","@allowMethod"],[/:::?|\||@(?![a-z_$])/,"keyword"],{include:"@root"}],vardef:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword"],[/@name/,"variable"],[/:::?|\||@(?![a-z_$])/,"keyword"],[/=|:(?!:)/,"operator","@pop"],[/$/,"white","@pop"],{include:"@root"}],string:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],stringt:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],fstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([\-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([\-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],fstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([\-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([\-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],sstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],sstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],interp:[[/{/,"operator","@push"],[/}/,"operator","@pop"],{include:"@root"}],rawstring:[[/[^"]/,"string"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],rawstringt:[[/[^"]/,"string"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}});var ilt={};Ai(ilt,{conf:()=>gHt,language:()=>vHt});var gHt,vHt,nlt=P(()=>{gHt={comments:{lineComment:";",blockComment:["#|","|#"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},vHt={defaultToken:"",ignoreCase:!0,tokenPostfix:".scheme",brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],keywords:["case","do","let","loop","if","else","when","cons","car","cdr","cond","lambda","lambda*","syntax-rules","format","set!","quote","eval","append","list","list?","member?","load"],constants:["#t","#f"],operators:["eq?","eqv?","equal?","and","or","not","null?"],tokenizer:{root:[[/#[xXoObB][0-9a-fA-F]+/,"number.hex"],[/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?/,"number.float"],[/(?:\b(?:(define|define-syntax|define-macro))\b)(\s+)((?:\w|\-|\!|\?)*)/,["keyword","white","variable"]],{include:"@whitespace"},{include:"@strings"},[/[a-zA-Z_#][a-zA-Z0-9_\-\?\!\*]*/,{cases:{"@keywords":"keyword","@constants":"constant","@operators":"operators","@default":"identifier"}}]],comment:[[/[^\|#]+/,"comment"],[/#\|/,"comment","@push"],[/\|#/,"comment","@pop"],[/[\|#]/,"comment"]],whitespace:[[/[ \t\r\n]+/,"white"],[/#\|/,"comment","@comment"],[/;.*$/,"comment"]],strings:[[/"$/,"string","@popall"],[/"(?=.)/,"string","@multiLineString"]],multiLineString:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string.escape"],[/"/,"string","@popall"],[/\\$/,"string"]]}}});var olt={};Ai(olt,{conf:()=>_Ht,language:()=>bHt});var _Ht,bHt,rlt=P(()=>{_Ht={wordPattern:/(#?-?\d*\.\d\w*%?)|([@$#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},bHt={defaultToken:"",tokenPostfix:".scss",ws:`[ \r\f]*`,identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@variabledeclaration"},{include:"@warndebug"},["[@](include)",{token:"keyword",next:"@includedeclaration"}],["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["[@](function)",{token:"keyword",next:"@functiondeclaration"}],["[@](mixin)",{token:"keyword",next:"@mixindeclaration"}],["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@controlstatement"},{include:"@selectorname"},["[&\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.curly",next:"@selectorbody"}]],selectorbody:[["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],{include:"@selector"},["[@](extend)",{token:"keyword",next:"@extendbody"}],["[@](return)",{token:"keyword",next:"@declarationbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],selectorname:[["#{",{token:"meta",next:"@variableinterpolation"}],["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@functioninvocation"},{include:"@numbers"},{include:"@strings"},{include:"@variablereference"},["(and\\b|or\\b|not\\b)","operator"],{include:"@name"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","operator"],[",","delimiter"],["!default","literal"],["\\(",{token:"delimiter.parenthesis",next:"@parenthizedterm"}]],rulevalue:[{include:"@term"},["!important","literal"],[";","delimiter","@pop"],["{",{token:"delimiter.curly",switchTo:"@nestedproperty"}],["(?=})",{token:"",next:"@pop"}]],nestedproperty:[["[*_]?@identifier@ws:","attribute.name","@rulevalue"],{include:"@comments"},["}",{token:"delimiter.curly",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],variabledeclaration:[["\\$@identifier@ws:","variable.decl","@declarationbody"]],urldeclaration:[{include:"@strings"},[`[^)\r @@ -960,20 +960,20 @@ ${e.toString()}`}},IX=class i{constructor(e=new wp,t=!1,n,o=SAt){var r;this._ser ^= >>= <<= - `),QHt=/enable|requires|diagnostic/,Llt=/[_\p{XID_Start}]\p{XID_Continue}*/u,jS="variable.predefined",JHt={tokenPostfix:".wgsl",defaultToken:"invalid",unicode:!0,atoms:UHt,keywords:$Ht,reserved:jHt,predeclared_enums:qHt,predeclared_types:GHt,predeclared_type_generators:KHt,predeclared_type_aliases:YHt,predeclared_intrinsics:ZHt,operators:XHt,symbols:/[!%&*+\-\.\/:;<=>^|_~,]+/,tokenizer:{root:[[QHt,"keyword","@directive"],[Llt,{cases:{"@atoms":jS,"@keywords":"keyword","@reserved":"invalid","@predeclared_enums":jS,"@predeclared_types":jS,"@predeclared_type_generators":jS,"@predeclared_type_aliases":jS,"@predeclared_intrinsics":jS,"@default":"identifier"}}],{include:"@commentOrSpace"},{include:"@numbers"},[/[{}()\[\]]/,"@brackets"],["@","annotation","@attribute"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/./,"invalid"]],commentOrSpace:[[/\s+/,"white"],[/\/\*/,"comment","@blockComment"],[/\/\/.*$/,"comment"]],blockComment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],attribute:[{include:"@commentOrSpace"},[/\w+/,"annotation","@pop"]],directive:[{include:"@commentOrSpace"},[/[()]/,"@brackets"],[/,/,"delimiter"],[Llt,"meta.content"],[/;/,"delimiter","@pop"]],numbers:[[/0[fh]/,"number.float"],[/[1-9][0-9]*[fh]/,"number.float"],[/[0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[fh]?/,"number.float"],[/[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?[fh]?/,"number.float"],[/[0-9]+[eE][+-]?[0-9]+[fh]?/,"number.float"],[/0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+(?:[pP][+-]?[0-9]+[fh]?)?/,"number.hex"],[/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*(?:[pP][+-]?[0-9]+[fh]?)?/,"number.hex"],[/0[xX][0-9a-fA-F]+[pP][+-]?[0-9]+[fh]?/,"number.hex"],[/0[xX][0-9a-fA-F]+[iu]?/,"number.hex"],[/[1-9][0-9]*[iu]?/,"number"],[/0[iu]?/,"number"]]}}});var Ilt={};Ai(Ilt,{conf:()=>rBt,language:()=>sBt});var eBt,tBt,iBt,nBt,Tlt,oBt,Y6e,rBt,sBt,Mlt=P(()=>{ta();eBt=Object.defineProperty,tBt=Object.getOwnPropertyDescriptor,iBt=Object.getOwnPropertyNames,nBt=Object.prototype.hasOwnProperty,Tlt=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of iBt(e))!nBt.call(i,o)&&o!==t&&eBt(i,o,{get:()=>e[o],enumerable:!(n=tBt(e,o))||n.enumerable});return i},oBt=(i,e,t)=>(Tlt(i,e,"default"),t&&Tlt(t,e,"default")),Y6e={};oBt(Y6e,ir);rBt={comments:{blockComment:[""]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:Y6e.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:Y6e.languages.IndentAction.Indent}}]},sBt={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:Y6e.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:Y6e.languages.IndentAction.Indent}}]},sBt={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/=0&&l.resolve(Fi.None)}return t}};d7e=N1t([RP(5,Wk)],d7e);var u7e=class extends ue{constructor(e,t,n,o){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=n,this._editorService=o,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,n,o){var r;if(n.selectedSuggestionInfo)return;let s;for(let p of this._editorService.listCodeEditors())if(p.getModel()===e){s=p;break}if(!s)return;let a=s.getOption(88);if(r0.isAllOff(a))return;e.tokenization.tokenizeIfCheap(t.lineNumber);let l=e.tokenization.getLineTokens(t.lineNumber),c=l.getStandardTokenType(l.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(r0.valueFor(a,c)!=="inline")return;let d=e.getWordAtPosition(t),u;if(d?.word||(u=this._getTriggerCharacterInfo(e,t)),!d?.word&&!u||(d||(d=e.getWordUntilPosition(t)),d.endColumn!==t.column))return;let h,f=e.getValueInRange(new O(t.lineNumber,1,t.lineNumber,t.column));if(!u&&(!((r=this._lastResult)===null||r===void 0)&&r.canBeReused(e,t.lineNumber,d))){let p=new eP(f,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=p,this._lastResult.acquire(),h=this._lastResult}else{let p=await VR(this._languageFeatureService.completionProvider,e,t,new a6(void 0,jk.createSuggestFilter(s).itemKind,u?.providers),u&&{triggerKind:1,triggerCharacter:u.ch},o),m;p.needsClipboard&&(m=await this._clipboardService.readText());let y=new $k(p.items,t.column,new eP(f,0),z8.None,s.getOption(117),s.getOption(111),{boostFullMatch:!1,firstMatchCanBeWeak:!1},m);h=new d7e(e,t.lineNumber,d,y,p,this._suggestMemoryService)}return this._lastResult=h,h}handleItemDidShow(e,t){t.completion.resolve(Fi.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var n;let o=e.getValueInRange(O.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),r=new Set;for(let s of this._languageFeatureService.completionProvider.all(e))!((n=s.triggerCharacters)===null||n===void 0)&&n.includes(o)&&r.add(s);if(r.size!==0)return{providers:r,ch:o}}};u7e=N1t([RP(0,Rt),RP(1,Pd),RP(2,Wk),RP(3,tn)],u7e);B2(u7e);Yu();an();Wt();var h7e=class extends Ot{constructor(){super({id:"editor.action.forceRetokenize",label:g("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getModel();n.tokenization.resetTokenization();let o=new Er;n.tokenization.forceTokenization(n.getLineCount()),o.stop(),console.log(`tokenization took ${o.elapsed()}`)}};yt(h7e);Xl();sj();Wt();Dr();var mie=class i extends Ja{constructor(){super({id:i.ID,title:{value:g({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(){let t=!c4.getTabFocusMode();c4.setTabFocusMode(t),t?Hs(g("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):Hs(g("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}};mie.ID="editor.action.toggleTabFocusMode";Fo(mie);Qi();Go();Md();nt();Mn();Ri();an();Ks();ea();mfe();Yv();Ha();Tme();Qt();u1();Ra();nt();L4();_i();Qt();vp();Gl();dh();Xt();nt();sd();var rqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},sqt=function(i,e){return function(t,n){e(t,n,i)}},gie=class extends ue{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,n={},o){var r;super(),this._link=t,this._enabled=!0,this.el=ut(e,pt("a.monaco-link",{tabIndex:(r=t.tabIndex)!==null&&r!==void 0?r:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");let s=this._register(new _n(this.el,"click")),a=this._register(new _n(this.el,"keypress")),l=Et.chain(a.event,u=>u.map(h=>new qn(h)).filter(h=>h.keyCode===3)),c=this._register(new _n(this.el,vo.Tap)).event;this._register(ar.addTarget(this.el));let d=Et.any(s.event,l,c);this._register(d(u=>{this.enabled&&(nn.stop(u,!0),n?.opener?n.opener(this._link.href):o.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};gie=rqt([sqt(3,Xr)],gie);m1();or();var A1t=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},R1t=function(i,e){return function(t,n){e(t,n,i)}},aqt=26,vie=class extends ue{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(f7e))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{var t;this.hide(),(t=e.onClose)===null||t===void 0||t.call(e)}}),this._editor.setBanner(this.banner.element,aqt)}};vie=A1t([R1t(1,qt)],vie);var f7e=class extends ue{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(Ad,{}),this.element=pt("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){let t=pt("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){is(this.element)}show(e){is(this.element);let t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);let n=ut(this.element,pt("div.icon-container"));n.setAttribute("aria-hidden","true"),e.icon&&n.appendChild(pt(`div${ui.asCSSSelector(e.icon)}`));let o=ut(this.element,pt("div.message-container"));if(o.setAttribute("aria-hidden","true"),o.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=ut(this.element,pt("div.message-actions-container")),e.actions)for(let s of e.actions)this._register(this.instantiationService.createInstance(gie,this.messageActionsContainer,{...s,tabIndex:-1},{}));let r=ut(this.element,pt("div.action-container"));this.actionBar=this._register(new Bs(r)),this.actionBar.push(this._register(new zs("banner.close","Close Banner",ui.asClassName(mX),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};f7e=A1t([R1t(0,qt)],f7e);Wt();er();_i();sd();cf();m1();n2e();var C7e=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},oL=function(i,e){return function(t,n){e(t,n,i)}},lqt=Yo("extensions-warning-message",kt.warning,g("warningIcon","Icon shown with a warning message in the extensions editor.")),rL=class extends ue{constructor(e,t,n,o){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=n,this._highlighter=null,this._bannerClosed=!1,this._updateState=r=>{if(r&&r.hasMore){if(this._bannerClosed)return;let s=Math.max(r.ambiguousCharacterCount,r.nonBasicAsciiCharacterCount,r.invisibleCharacterCount),a;if(r.nonBasicAsciiCharacterCount>=s)a={message:g("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new lL};else if(r.ambiguousCharacterCount>=s)a={message:g("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new Y8};else if(r.invisibleCharacterCount>=s)a={message:g("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new aL};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:lqt,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(o.createInstance(vie,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(124),this._register(n.onDidChangeTrust(r=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(r=>{r.hasChanged(124)&&(this._options=e.getOption(124),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;let e=cqt(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(n=>n===!1))return;let t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(n=>n.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(n=>n==="_os"?new Intl.NumberFormat().resolvedOptions().locale:n==="_vscode"?Eje:n)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new m7e(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new g7e(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};rL.ID="editor.contrib.unicodeHighlighter";rL=C7e([oL(1,Oc),oL(2,UY),oL(3,qt)],rL);function cqt(i,e){return{nonBasicASCII:e.nonBasicASCII===ju?!i:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===ju?!i:e.includeComments,includeStrings:e.includeStrings===ju?!i:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}var m7e=class extends ue{constructor(e,t,n,o){super(),this._editor=e,this._options=t,this._updateState=n,this._editorWorkerService=o,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new hn(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);let n=[];if(!t.hasMore)for(let o of t.ranges)n.push({range:o,options:sL.instance.getDecorationFromOptions(this._options)});this._decorations.set(n)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel();if(!LK(t,e))return null;let n=t.getValueInRange(e.range);return{reason:O1t(n,this._options),inComment:EK(t,e),inString:DK(t,e)}}};m7e=C7e([oL(3,Oc)],m7e);var g7e=class extends ue{constructor(e,t,n){super(),this._editor=e,this._options=t,this._updateState=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new hn(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._editor.getVisibleRanges(),t=[],n={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(let o of e){let r=P5.computeUnicodeHighlights(this._model,this._options,o);for(let s of r.ranges)n.ranges.push(s);n.ambiguousCharacterCount+=n.ambiguousCharacterCount,n.invisibleCharacterCount+=n.invisibleCharacterCount,n.nonBasicAsciiCharacterCount+=n.nonBasicAsciiCharacterCount,n.hasMore=n.hasMore||r.hasMore}if(!n.hasMore)for(let o of n.ranges)t.push({range:o,options:sL.instance.getDecorationFromOptions(this._options)});this._updateState(n),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel(),n=t.getValueInRange(e.range);return LK(t,e)?{reason:O1t(n,this._options),inComment:EK(t,e),inString:DK(t,e)}:null}},P1t=g("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options"),v7e=class{constructor(e,t,n){this._editor=e,this._languageService=t,this._openerService=n,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let n=this._editor.getModel(),o=this._editor.getContribution(rL.ID);if(!o)return[];let r=[],s=new Set,a=300;for(let l of t){let c=o.getDecorationInfo(l);if(!c)continue;let u=n.getValueInRange(l.range).codePointAt(0),h=p7e(u),f;switch(c.reason.kind){case 0:{Ag(c.reason.confusableWith)?f=g("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,p7e(c.reason.confusableWith.codePointAt(0))):f=g("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,p7e(c.reason.confusableWith.codePointAt(0)));break}case 1:f=g("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:f=g("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}if(s.has(f))continue;s.add(f);let p={codePoint:u,reason:c.reason,inComment:c.inComment,inString:c.inString},m=g("unicodeHighlight.adjustSettings","Adjust settings"),y=`command:${PP.ID}?${encodeURIComponent(JSON.stringify(p))}`,_=new cs("",!0).appendMarkdown(f).appendText(" ").appendLink(y,m,P1t);r.push(new wh(this,l.range,[_],!1,a++))}return r}renderHoverParts(e,t){return b8e(e,t,this._editor,this._languageService,this._openerService)}};v7e=C7e([oL(1,Kn),oL(2,Xr)],v7e);function _7e(i){return`U+${i.toString(16).padStart(4,"0")}`}function p7e(i){let e=`\`${_7e(i)}\``;return Mg.isInvisibleCharacter(i)||(e+=` "${`${dqt(i)}`}"`),e}function dqt(i){return i===96?"`` ` ``":"`"+String.fromCodePoint(i)+"`"}function O1t(i,e){return P5.computeUnicodeHighlightReason(i,e)}var sL=class{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){let n=`${e}${t}`,o=this.map.get(n);return o||(o=zi.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(n,o)),o}};sL.instance=new sL;var b7e=class extends Ot{constructor(){super({id:Y8.ID,label:g("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=g("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}async run(e,t,n){let o=e?.get(Ni);o&&this.runAction(o)}async runAction(e){await e.updateValue(Sd.includeComments,!1,2)}},y7e=class extends Ot{constructor(){super({id:Y8.ID,label:g("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=g("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}async run(e,t,n){let o=e?.get(Ni);o&&this.runAction(o)}async runAction(e){await e.updateValue(Sd.includeStrings,!1,2)}},Y8=class i extends Ot{constructor(){super({id:i.ID,label:g("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=g("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}async run(e,t,n){let o=e?.get(Ni);o&&this.runAction(o)}async runAction(e){await e.updateValue(Sd.ambiguousCharacters,!1,2)}};Y8.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";var aL=class i extends Ot{constructor(){super({id:i.ID,label:g("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=g("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}async run(e,t,n){let o=e?.get(Ni);o&&this.runAction(o)}async runAction(e){await e.updateValue(Sd.invisibleCharacters,!1,2)}};aL.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";var lL=class i extends Ot{constructor(){super({id:i.ID,label:g("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=g("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}async run(e,t,n){let o=e?.get(Ni);o&&this.runAction(o)}async runAction(e){await e.updateValue(Sd.nonBasicASCII,!1,2)}};lL.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";var PP=class i extends Ot{constructor(){super({id:i.ID,label:g("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}async run(e,t,n){let{codePoint:o,reason:r,inString:s,inComment:a}=n,l=String.fromCodePoint(o),c=e.get(ol),d=e.get(Ni);function u(p){return Mg.isInvisibleCharacter(p)?g("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",_7e(p)):g("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${_7e(p)} "${l}"`)}let h=[];if(r.kind===0)for(let p of r.notAmbiguousInLocales)h.push({label:g("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',p),run:async()=>{hqt(d,[p])}});if(h.push({label:u(o),run:()=>uqt(d,[o])}),a){let p=new b7e;h.push({label:p.label,run:async()=>p.runAction(d)})}else if(s){let p=new y7e;h.push({label:p.label,run:async()=>p.runAction(d)})}if(r.kind===0){let p=new Y8;h.push({label:p.label,run:async()=>p.runAction(d)})}else if(r.kind===1){let p=new aL;h.push({label:p.label,run:async()=>p.runAction(d)})}else if(r.kind===2){let p=new lL;h.push({label:p.label,run:async()=>p.runAction(d)})}else fqt(r);let f=await c.pick(h,{title:P1t});f&&await f.run()}};PP.ID="editor.action.unicodeHighlight.showExcludeOptions";async function uqt(i,e){let t=i.getValue(Sd.allowedCharacters),n;typeof t=="object"&&t?n=t:n={};for(let o of e)n[String.fromCodePoint(o)]=!0;await i.updateValue(Sd.allowedCharacters,n,2)}async function hqt(i,e){var t;let n=(t=i.inspect(Sd.allowedLocales).user)===null||t===void 0?void 0:t.value,o;typeof n=="object"&&n?o=Object.assign({},n):o={};for(let r of e)o[r]=!0;await i.updateValue(Sd.allowedLocales,o,2)}function fqt(i){throw new Error(`Unexpected value: ${i}`)}yt(Y8);yt(aL);yt(lL);yt(PP);Ii(rL.ID,rL,1);y1.register(v7e);nt();ec();an();fs();Wt();Nx();var pqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},z1t=function(i,e){return function(t,n){e(t,n,i)}},F1t="ignoreUnusualLineTerminators";function mqt(i,e,t){i.setModelProperty(e.uri,F1t,t)}function gqt(i,e){return i.getModelProperty(e.uri,F1t)}var OP=class extends ue{constructor(e,t,n){super(),this._editor=e,this._dialogService=t,this._codeEditorService=n,this._isPresentingDialog=!1,this._config=this._editor.getOption(125),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(125)&&(this._config=this._editor.getOption(125),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(o=>{o.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;let e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||gqt(this._codeEditorService,e)===!0||this._editor.getOption(90))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let n;try{this._isPresentingDialog=!0,n=await this._dialogService.confirm({title:g("unusualLineTerminators.title","Unusual Line Terminators"),message:g("unusualLineTerminators.message","Detected unusual line terminators"),detail:g("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",Il(e.uri)),primaryButton:g({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:g("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!n.confirmed){mqt(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}};OP.ID="editor.contrib.unusualLineTerminatorsDetector";OP=pqt([z1t(1,x2),z1t(2,tn)],OP);Ii(OP.ID,OP,1);Wt();Vi();Xl();Qi();mo();Pi();nt();US();an();fs();Kt();Co();Pr();Ca();Yn();Xi();Nc();od();fge();var H1t=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},_ie=function(i,e){return function(t,n){e(t,n,i)}},Vs,w7e,Cie=new Bt("hasWordHighlights",!1);function B1t(i,e,t,n){let o=i.ordered(e);return MT(o.map(r=>()=>Promise.resolve(r.provideDocumentHighlights(e,t,n)).then(void 0,po)),Nr).then(r=>{if(r){let s=new rs;return s.set(e.uri,r),s}return new rs})}function vqt(i,e,t,n,o,r){let s=i.ordered(e);return MT(s.map(a=>()=>{let l=r.filter(c=>R$(c)).filter(c=>RM(a.selector,c.uri,c.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(a.provideMultiDocumentHighlights(e,t,l,o)).then(void 0,po)}),a=>a instanceof rs&&a.size>0)}var zP=class{constructor(e,t,n){this._model=e,this._selection=t,this._wordSeparators=n,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Ho(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){let n=e.getWordAtPosition(t.getPosition());return n?new O(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):null}isValid(e,t,n){let o=t.startLineNumber,r=t.startColumn,s=t.endColumn,a=this._getCurrentWordRange(e,t),l=!!(this._wordRange&&this._wordRange.equalsRange(a));for(let c=0,d=n.length;!l&&c=s&&(l=!0)}return l}cancel(){this.result.cancel()}},x7e=class extends zP{constructor(e,t,n,o){super(e,t,n),this._providers=o}_compute(e,t,n,o){return B1t(this._providers,e,t.getPosition(),o).then(r=>r||new rs)}},S7e=class extends zP{constructor(e,t,n,o,r){super(e,t,n),this._providers=o,this._otherModels=r}_compute(e,t,n,o){return vqt(this._providers,e,t.getPosition(),n,o,this._otherModels).then(r=>r||new rs)}},bie=class extends zP{constructor(e,t,n,o,r){super(e,t,o),this._otherModels=r,this._selectionIsEmpty=t.isEmpty(),this._word=n}_compute(e,t,n,o){return eh(250,o).then(()=>{let r=new rs,s;if(this._word?s=this._word:s=e.getWordAtPosition(t.getPosition()),!s)return new rs;let a=[e,...this._otherModels];for(let l of a){if(l.isDisposed())continue;let d=l.findMatches(s.word,!0,!1,!0,n,!1).map(u=>({range:u.range,kind:d5.Text}));d&&r.set(l.uri,d)}return r})}isValid(e,t,n){let o=t.isEmpty();return this._selectionIsEmpty!==o?!1:super.isValid(e,t,n)}};function _qt(i,e,t,n,o){return i.has(e)?new x7e(e,t,o,i):new bie(e,t,n,o,[])}function bqt(i,e,t,n,o,r){return i.has(e)?new S7e(e,t,o,i,r):new bie(e,t,n,o,r)}nh("_executeDocumentHighlights",async(i,e,t)=>{let n=i.get(Rt),o=await B1t(n.documentHighlightProvider,e,t,Fi.None);return o?.get(e.uri)});var FP=Vs=class{constructor(e,t,n,o,r){this.toUnhook=new Ye,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new rs,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this.multiDocumentProviders=n,this.codeEditorService=r,this._hasWordHighlights=Cie.bindTo(o),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(80),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(s=>{this._ignorePositionChangeEvent||this.occurrencesHighlight!=="off"&&this._onPositionChanged(s)})),this.toUnhook.add(e.onDidChangeModelContent(s=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(s=>{!s.newModelUrl&&s.oldModelUrl?this._stopSingular():Vs.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(s=>{let a=this.editor.getOption(80);this.occurrencesHighlight!==a&&(this.occurrencesHighlight=a,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,Vs.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight!=="off"&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(O.compareRangesUsingStarts)}moveNext(){let e=this._getSortedHighlights(),n=(e.findIndex(r=>r.containsPosition(this.editor.getPosition()))+1)%e.length,o=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(o.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(o);let r=this._getWord();if(r){let s=this.editor.getModel().getLineContent(o.startLineNumber);Hs(`${s}, ${n+1} of ${e.length} for '${r.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),n=(e.findIndex(r=>r.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,o=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(o.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(o);let r=this._getWord();if(r){let s=this.editor.getModel().getLineContent(o.startLineNumber);Hs(`${s}, ${n+1} of ${e.length} for '${r.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;let e=Vs.storedDecorations.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),Vs.storedDecorations.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(){let e=this.codeEditorService.listCodeEditors();for(let t of e){if(!t.hasModel())continue;let n=Vs.storedDecorations.get(t.getModel().uri);if(!n)continue;t.removeDecorations(n),Vs.storedDecorations.delete(t.getModel().uri);let o=f6.get(t);o?.wordHighlighter&&o.wordHighlighter.decorations.length>0&&(o.wordHighlighter.decorations.clear(),o.wordHighlighter._hasWordHighlights.set(!1))}}_stopSingular(){var e,t,n,o;this._removeSingleDecorations(),this.editor.hasWidgetFocus()&&(((e=this.editor.getModel())===null||e===void 0?void 0:e.uri.scheme)!==$i.vscodeNotebookCell&&((n=(t=Vs.query)===null||t===void 0?void 0:t.modelInfo)===null||n===void 0?void 0:n.model.uri.scheme)!==$i.vscodeNotebookCell?(Vs.query=null,this._run()):!((o=Vs.query)===null||o===void 0)&&o.modelInfo&&(Vs.query.modelInfo=null)),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(){this._removeAllDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){var t;if(this.occurrencesHighlight==="off"){this._stopAll();return}if(e.reason!==3&&((t=this.editor.getModel())===null||t===void 0?void 0:t.uri.scheme)!==$i.vscodeNotebookCell){this._stopAll();return}this._run()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,n=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:n})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===$i.vscodeNotebookCell){let r=[],s=this.codeEditorService.listCodeEditors();for(let a of s){let l=a.getModel();l&&l!==e&&l.uri.scheme===$i.vscodeNotebookCell&&r.push(l)}return r}let n=[],o=this.codeEditorService.listCodeEditors();for(let r of o){if(!sA(r))continue;let s=r.getModel();s&&e===s.modified&&n.push(s.modified)}if(n.length)return n;if(this.occurrencesHighlight==="singleFile")return[];for(let r of o){let s=r.getModel();s&&s!==e&&n.push(s)}return n}_run(){var e,t;let n;if(this.editor.hasWidgetFocus()){let o=this.editor.getSelection();if(!o||o.startLineNumber!==o.endLineNumber){this._stopAll();return}let r=o.startColumn,s=o.endColumn,a=this._getWord();if(!a||a.startColumn>r||a.endColumn{o===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations())},hi)}}computeWithModel(e,t,n,o){return o.length?bqt(this.multiDocumentProviders,e,t,n,this.editor.getOption(129),o):_qt(this.providers,e,t,n,this.editor.getOption(129))}_beginRenderDecorations(){let e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){var e,t,n;this.renderDecorationsTimer=-1;let o=this.codeEditorService.listCodeEditors();for(let r of o){let s=f6.get(r);if(!s)continue;let a=[],l=(e=r.getModel())===null||e===void 0?void 0:e.uri;if(l&&this.workerRequestValue.has(l)){let c=Vs.storedDecorations.get(l),d=this.workerRequestValue.get(l);if(d)for(let h of d)a.push({range:h.range,options:_1t(h.kind)});let u=[];r.changeDecorations(h=>{u=h.deltaDecorations(c??[],a)}),Vs.storedDecorations=Vs.storedDecorations.set(l,u),a.length>0&&((t=s.wordHighlighter)===null||t===void 0||t.decorations.set(a),(n=s.wordHighlighter)===null||n===void 0||n._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}};FP.storedDecorations=new rs;FP.query=null;FP=Vs=H1t([_ie(4,tn)],FP);var f6=w7e=class extends ue{static get(e){return e.getContribution(w7e.ID)}constructor(e,t,n,o){super(),this._wordHighlighter=null;let r=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new FP(e,n.documentHighlightProvider,n.multiDocumentHighlightProvider,t,o))};this._register(e.onDidChangeModel(s=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),r()})),r()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){var e;(e=this._wordHighlighter)===null||e===void 0||e.moveNext()}moveBack(){var e;(e=this._wordHighlighter)===null||e===void 0||e.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};f6.ID="editor.contrib.wordHighlighter";f6=w7e=H1t([_ie(1,ri),_ie(2,Rt),_ie(3,tn)],f6);var yie=class extends Ot{constructor(e,t){super(t),this._isNext=e}run(e,t){let n=f6.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}},k7e=class extends yie{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:g("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:Cie,kbOpts:{kbExpr:re.editorTextFocus,primary:65,weight:100}})}},L7e=class extends yie{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:g("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:Cie,kbOpts:{kbExpr:re.editorTextFocus,primary:1089,weight:100}})}},E7e=class extends Ot{constructor(){super({id:"editor.action.wordHighlight.trigger",label:g("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:Cie.toNegated(),kbOpts:{kbExpr:re.editorTextFocus,primary:0,weight:100}})}run(e,t,n){let o=f6.get(t);o&&o.restoreViewState(!0)}};Ii(f6.ID,f6,0);yt(k7e);yt(L7e);yt(E7e);an();ub();Ks();s1();RI();nw();Mi();Kt();zo();Co();Kr();Wt();Yh();Xi();zZ();var o9=class extends Jo{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;let o=id(t.getOption(129)),r=t.getModel(),a=t.getSelections().map(l=>{let c=new ke(l.positionLineNumber,l.positionColumn),d=this._move(o,r,c,this._wordNavigationType);return this._moveTo(l,d,this._inSelectionMode)});if(r.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>Vn.fromModelSelection(l))),a.length===1){let l=new ke(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,n){return n?new jt(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new jt(t.lineNumber,t.column,t.lineNumber,t.column)}},c0=class extends o9{_move(e,t,n,o){return la.moveWordLeft(e,t,n,o)}},d0=class extends o9{_move(e,t,n,o){return la.moveWordRight(e,t,n,o)}},D7e=class extends c0{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}},T7e=class extends c0{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}},I7e=class extends c0{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:mt.and(re.textInputFocus,(e=mt.and(G5,SN))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}},M7e=class extends c0{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}},N7e=class extends c0{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}},A7e=class extends c0{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:mt.and(re.textInputFocus,(e=mt.and(G5,SN))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}},R7e=class extends c0{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,n,o){return super._move(id(nu.wordSeparators.defaultValue),t,n,o)}},P7e=class extends c0{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,n,o){return super._move(id(nu.wordSeparators.defaultValue),t,n,o)}},O7e=class extends d0{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}},z7e=class extends d0{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:mt.and(re.textInputFocus,(e=mt.and(G5,SN))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}},F7e=class extends d0{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}},H7e=class extends d0{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}},B7e=class extends d0{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:mt.and(re.textInputFocus,(e=mt.and(G5,SN))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}},V7e=class extends d0{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}},W7e=class extends d0{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,n,o){return super._move(id(nu.wordSeparators.defaultValue),t,n,o)}},U7e=class extends d0{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,n,o){return super._move(id(nu.wordSeparators.defaultValue),t,n,o)}},r9=class extends Jo{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){let o=e.get(An);if(!t.hasModel())return;let r=id(t.getOption(129)),s=t.getModel(),a=t.getSelections(),l=t.getOption(6),c=t.getOption(11),d=o.getLanguageConfiguration(s.getLanguageId()).getAutoClosingPairs(),u=t._getViewModel(),h=a.map(f=>{let p=this._delete({wordSeparators:r,model:s,selection:f,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:d,autoClosedCharacters:u.getCursorAutoClosedCharacters()},this._wordNavigationType);return new Ts(p,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}},HP=class extends r9{_delete(e,t){let n=la.deleteWordLeft(e,t);return n||new O(1,1,1,1)}},BP=class extends r9{_delete(e,t){let n=la.deleteWordRight(e,t);if(n)return n;let o=e.model.getLineCount(),r=e.model.getLineMaxColumn(o);return new O(o,r,o,r)}},$7e=class extends HP{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:re.writable})}},j7e=class extends HP{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:re.writable})}},q7e=class extends HP{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:re.writable,kbOpts:{kbExpr:re.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}},G7e=class extends BP{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:re.writable})}},K7e=class extends BP{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:re.writable})}},Y7e=class extends BP{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:re.writable,kbOpts:{kbExpr:re.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}},Z7e=class extends Ot{constructor(){super({id:"deleteInsideWord",precondition:re.writable,label:g("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,n){if(!t.hasModel())return;let o=id(t.getOption(129)),r=t.getModel(),a=t.getSelections().map(l=>{let c=la.deleteInsideWord(o,r,l);return new Ts(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}};zt(new D7e);zt(new T7e);zt(new I7e);zt(new M7e);zt(new N7e);zt(new A7e);zt(new O7e);zt(new z7e);zt(new F7e);zt(new H7e);zt(new B7e);zt(new V7e);zt(new R7e);zt(new P7e);zt(new W7e);zt(new U7e);zt(new $7e);zt(new j7e);zt(new q7e);zt(new G7e);zt(new K7e);zt(new Y7e);yt(Z7e);an();RI();Kt();Co();$o();var X7e=class extends r9{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:re.writable,kbOpts:{kbExpr:re.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let n=hb.deleteWordPartLeft(e);return n||new O(1,1,1,1)}},Q7e=class extends r9{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:re.writable,kbOpts:{kbExpr:re.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let n=hb.deleteWordPartRight(e);if(n)return n;let o=e.model.getLineCount(),r=e.model.getLineMaxColumn(o);return new O(o,r,o,r)}},wie=class extends o9{_move(e,t,n,o){return hb.moveWordPartLeft(e,t,n)}},J7e=class extends wie{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:re.textInputFocus,primary:0,mac:{primary:783},weight:100}})}};Zi.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");var e9e=class extends wie{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:re.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}};Zi.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");var xie=class extends o9{_move(e,t,n,o){return hb.moveWordPartRight(e,t,n)}},t9e=class extends xie{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:re.textInputFocus,primary:0,mac:{primary:785},weight:100}})}},i9e=class extends xie{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:re.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}};zt(new X7e);zt(new Q7e);zt(new J7e);zt(new e9e);zt(new t9e);zt(new i9e);Md();nt();an();Wt();var VP=class extends ue{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){let e=rl.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(91);t||(this.editor.isSimpleWidget?t=new cs(g("editor.simple.readonly","Cannot edit in read-only input")):t=new cs(g("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}};VP.ID="editor.contrib.readOnlyMessageController";Ii(VP.ID,VP,2);var Nqn=vt(W1t());I2();Qt();nt();an();Mn();var UP=class extends ue{constructor(e){super(),this.editor=e,this.widget=null,Lc&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){let e=!this.editor.getOption(90);!this.widget&&e?this.widget=new Sie(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}};UP.ID="editor.contrib.iPadShowKeyboard";var Sie=class i extends ue{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(Xe(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(Xe(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};Sie.ID="editor.contrib.ShowKeyboardWidget";Ii(UP.ID,UP,3);var TYn=vt(j1t());Ys();i7();I2();Wt();Ys();nt();vs();i7();cf();var Sqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},q1t=function(i,e){return function(t,n){e(t,n,i)}},jP,qP=jP=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=jn.as(p1.Quickaccess)}provide(e){let t=new Ye;return t.add(e.onDidAccept(()=>{let[n]=e.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(n=>{let o=this.registry.getQuickAccessProvider(n.substr(jP.PREFIX.length));o&&o.prefix&&o.prefix!==jP.PREFIX&&this.quickInputService.quickAccess.show(o.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(n=>n.prefix!==jP.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,n)=>t.prefix.localeCompare(n.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{let n=t.prefix||e.prefix,o=n||"\u2026";return{prefix:n,label:o,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:g("helpPickAriaLabel","{0}, {1}",o,t.description),description:t.description}})}};qP.PREFIX="?";qP=jP=Sqt([q1t(0,ol),q1t(1,fn)],qP);jn.as(p1.Quickaccess).registerQuickAccessProvider({ctor:qP,prefix:"",helpEntries:[{description:BY.helpQuickAccessActionLabel}]});nt();US();S3();nt();US();Ca();r1();No();Xl();var dL=class{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var n;let o=new Ye;e.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let r=o.add(new To);return r.value=this.doProvide(e,t),o.add(this.onDidActiveTextEditorControlChange(()=>{r.value=void 0,r.value=this.doProvide(e,t)})),o}doProvide(e,t){var n;let o=new Ye,r=this.activeTextEditorControl;if(r&&this.canProvideWithTextEditor(r)){let s={editor:r},a=wQ(r);if(a){let l=(n=r.saveViewState())!==null&&n!==void 0?n:void 0;o.add(a.onDidChangeCursorPosition(()=>{var c;l=(c=r.saveViewState())!==null&&c!==void 0?c:void 0})),s.restoreViewState=()=>{l&&r===this.activeTextEditorControl&&r.restoreViewState(l)},o.add(Gu(t.onCancellationRequested)(()=>{var c;return(c=s.restoreViewState)===null||c===void 0?void 0:c.call(s)}))}o.add(Yt(()=>this.clearDecorations(r))),o.add(this.provideWithTextEditor(s,e,t))}else o.add(this.provideWithoutTextEditor(e,t));return o}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();let n=e.getModel();n&&"getLineContent"in n&&hu(`${n.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return sA(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(n=>{let o=[];this.rangeHighlightDecorationId&&(o.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),o.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);let r=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Ko(tq),position:Sl.Full}}}],[s,a]=n.deltaDecorations(o,r);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:a}})}clearDecorations(e){let t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(n=>{n.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}};Wt();var GP=class i extends dL{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){let t=g("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,ue.None}provideWithTextEditor(e,t,n){let o=e.editor,r=new Ye;r.add(t.onDidAccept(l=>{let[c]=t.selectedItems;if(c){if(!this.isValidLineNumber(o,c.lineNumber))return;this.gotoLocation(e,{range:this.toRange(c.lineNumber,c.column),keyMods:t.keyMods,preserveFocus:l.inBackground}),l.inBackground||t.hide()}}));let s=()=>{let l=this.parsePosition(o,t.value.trim().substr(i.PREFIX.length)),c=this.getPickLabel(o,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:c}],t.ariaLabel=c,!this.isValidLineNumber(o,l.lineNumber)){this.clearDecorations(o);return}let d=this.toRange(l.lineNumber,l.column);o.revealRangeInCenter(d,0),this.addDecorations(o,d)};s(),r.add(t.onDidChangeValue(()=>s()));let a=wQ(o);return a&&a.getOptions().get(67).renderType===2&&(a.updateOptions({lineNumbers:"on"}),r.add(Yt(()=>a.updateOptions({lineNumbers:"relative"})))),r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){let n=t.split(/,|:|#/).map(r=>parseInt(r,10)).filter(r=>!isNaN(r)),o=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:o+n[0],column:n[1]}}getPickLabel(e,t,n){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,n)?g("gotoLineColumnLabel","Go to line {0} and character {1}.",t,n):g("gotoLineLabel","Go to line {0}.",t);let o=e.getPosition()||{lineNumber:1,column:1},r=this.lineCount(e);return r>1?g("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",o.lineNumber,o.column,r):g("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",o.lineNumber,o.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,n){if(!n||typeof n!="number")return!1;let o=this.getModel(e);if(!o)return!1;let r={lineNumber:t,column:n};return o.validatePosition(r).equals(r)}lineCount(e){var t,n;return(n=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&n!==void 0?n:0}};GP.PREFIX=":";Ys();i7();fs();I2();Xt();an();Co();cf();var kqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Lqt=function(i,e){return function(t,n){e(t,n,i)}},KP=class extends GP{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=Et.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};KP=kqt([Lqt(0,tn)],KP);var YP=class i extends Ot{constructor(){super({id:i.ID,label:KM.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:re.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(ol).quickAccess.show(KP.PREFIX)}};YP.ID="editor.action.gotoLine";yt(YP);jn.as(p1.Quickaccess).registerQuickAccessProvider({ctor:KP,prefix:KP.PREFIX,helpEntries:[{description:KM.gotoLineActionLabel,commandId:YP.ID}]});Qi();mo();Go();or();l1();Dg();Mn();Ri();var Y1t=[void 0,[]];function Eie(i,e,t=0,n=0){let o=e;return o.values&&o.values.length>1?Eqt(i,o.values,t,n):Z1t(i,e,t,n)}function Eqt(i,e,t,n){let o=0,r=[];for(let s of e){let[a,l]=Z1t(i,s,t,n);if(typeof a!="number")return Y1t;o+=a,r.push(...l)}return[o,Dqt(r)]}function Z1t(i,e,t,n){let o=E2(e.original,e.originalLowercase,t,i,i.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return o?[o[0],Hv(o)]:Y1t}var UGn=Object.freeze({score:0});function Dqt(i){let e=i.sort((o,r)=>o.start-r.start),t=[],n;for(let o of e)!n||!Tqt(n,o)?(n=o,t.push(o)):(n.start=Math.min(n.start,o.start),n.end=Math.max(n.end,o.end));return t}function Tqt(i,e){return!(i.end=0,s=G1t(i),a,l=i.split(X1t);if(l.length>1)for(let c of l){let d=G1t(c),{pathNormalized:u,normalized:h,normalizedLowercase:f}=K1t(c);h&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:u,normalized:h,normalizedLowercase:f,expectContiguousMatch:d}))}return{original:i,originalLowercase:e,pathNormalized:t,normalized:n,normalizedLowercase:o,values:a,containsPathSeparator:r,expectContiguousMatch:s}}function K1t(i){let e;hr?e=i.replace(/\//g,Zu):e=i.replace(/\\/g,Zu);let t=sqe(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function s9e(i){return Array.isArray(i)?Lie(i.map(e=>e.original).join(X1t)):Lie(i.original)}nt();Ri();Kt();Pr();Ok();Wt();Yn();rh();var Iqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Q1t=function(i,e){return function(t,n){e(t,n,i)}},uL,ig=uL=class extends dL{constructor(e,t,n=Object.create(null)){super(n),this._languageFeaturesService=e,this._outlineModelService=t,this.options=n,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,g("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),ue.None}provideWithTextEditor(e,t,n){let o=e.editor,r=this.getModel(o);return r?this._languageFeaturesService.documentSymbolProvider.has(r)?this.doProvideWithEditorSymbols(e,r,t,n):this.doProvideWithoutEditorSymbols(e,r,t,n):ue.None}doProvideWithoutEditorSymbols(e,t,n,o){let r=new Ye;return this.provideLabelPick(n,g("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(async()=>!await this.waitForLanguageSymbolRegistry(t,r)||o.isCancellationRequested||r.add(this.doProvideWithEditorSymbols(e,t,n,o)))(),r}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;let n=new Fg,o=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(o.dispose(),n.complete(!0))}));return t.add(Yt(()=>n.complete(!1))),n.p}doProvideWithEditorSymbols(e,t,n,o){var r;let s=e.editor,a=new Ye;a.add(n.onDidAccept(u=>{let[h]=n.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:n.keyMods,preserveFocus:u.inBackground}),u.inBackground||n.hide())})),a.add(n.onDidTriggerItemButton(({item:u})=>{u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));let l=this.getDocumentSymbols(t,o),c,d=async u=>{c?.dispose(!0),n.busy=!1,c=new Jn(o),n.busy=!0;try{let h=Lie(n.value.substr(uL.PREFIX.length).trim()),f=await this.doGetSymbolPicks(l,h,void 0,c.token);if(o.isCancellationRequested)return;if(f.length>0){if(n.items=f,u&&h.original.length===0){let p=o4(f,m=>!!(m.type!=="separator"&&m.range&&O.containsPosition(m.range.decoration,u)));p&&(n.activeItems=[p])}}else h.original.length>0?this.provideLabelPick(n,g("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,g("noSymbolResults","No editor symbols"))}finally{o.isCancellationRequested||(n.busy=!1)}};return a.add(n.onDidChangeValue(()=>d(void 0))),d((r=s.getSelection())===null||r===void 0?void 0:r.getPosition()),a.add(n.onDidChangeActive(()=>{let[u]=n.activeItems;u&&u.range&&(s.revealRangeInCenter(u.range.selection,0),this.addDecorations(s,u.range.decoration))})),a}async doGetSymbolPicks(e,t,n,o){var r,s;let a=await e;if(o.isCancellationRequested)return[];let l=t.original.indexOf(uL.SCOPE_PREFIX)===0,c=l?1:0,d,u;t.values&&t.values.length>1?(d=s9e(t.values[0]),u=s9e(t.values.slice(1))):d=t;let h,f=(s=(r=this.options)===null||r===void 0?void 0:r.openSideBySideDirection)===null||s===void 0?void 0:s.call(r);f&&(h=[{iconClass:f==="right"?ui.asClassName(kt.splitHorizontal):ui.asClassName(kt.splitVertical),tooltip:f==="right"?g("openToSide","Open to the Side"):g("openToBottom","Open to the Bottom")}]);let p=[];for(let _=0;_c){let T=!1;if(d!==t&&([x,k]=Eie(C,{...t,values:void 0},c,w),typeof x=="number"&&(T=!0)),typeof x!="number"&&([x,k]=Eie(C,d,c,w),typeof x!="number"))continue;if(!T&&u){if(S&&u.original.length>0&&([D,E]=Eie(S,u)),typeof D!="number")continue;typeof x=="number"&&(x+=D)}}let A=v.tags&&v.tags.indexOf(1)>=0;p.push({index:_,kind:v.kind,score:x,label:C,ariaLabel:eqe(v.name,v.kind),description:S,highlights:A?void 0:{label:k,description:E},range:{selection:O.collapseToStart(v.selectionRange),decoration:v.range},strikethrough:A,buttons:h})}let m=p.sort((_,v)=>l?this.compareByKindAndScore(_,v):this.compareByScore(_,v)),y=[];if(l){let C=function(){v&&typeof _=="number"&&b>0&&(v.label=zf(l9e[_]||a9e,b))},_,v,b=0;for(let w of m)_!==w.kind?(C(),_=w.kind,b=1,v={type:"separator"},y.push(v)):b++,y.push(w);C()}else m.length>0&&(y=[{label:g("symbols","symbols ({0})",p.length),type:"separator"},...m]);return y}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){let n=l9e[e.kind]||a9e,o=l9e[t.kind]||a9e,r=n.localeCompare(o);return r===0?this.compareByScore(e,t):r}async getDocumentSymbols(e,t){let n=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:n.asListOfDocumentSymbols()}};ig.PREFIX="@";ig.SCOPE_PREFIX=":";ig.PREFIX_BY_CATEGORY=`${uL.PREFIX}${uL.SCOPE_PREFIX}`;ig=uL=Iqt([Q1t(0,Rt),Q1t(1,s6)],ig);var a9e=g("property","properties ({0})"),l9e={5:g("method","methods ({0})"),11:g("function","functions ({0})"),8:g("_constructor","constructors ({0})"),12:g("variable","variables ({0})"),4:g("class","classes ({0})"),22:g("struct","structs ({0})"),23:g("event","events ({0})"),24:g("operator","operators ({0})"),10:g("interface","interfaces ({0})"),2:g("namespace","namespaces ({0})"),3:g("package","packages ({0})"),25:g("typeParameter","type parameters ({0})"),1:g("modules","modules ({0})"),6:g("property","properties ({0})"),9:g("enum","enumerations ({0})"),21:g("enumMember","enumeration members ({0})"),14:g("string","strings ({0})"),0:g("file","files ({0})"),17:g("array","arrays ({0})"),15:g("number","numbers ({0})"),16:g("boolean","booleans ({0})"),18:g("object","objects ({0})"),19:g("key","keys ({0})"),7:g("field","fields ({0})"),13:g("constant","constants ({0})")};Ys();i7();fs();I2();Xt();an();Co();cf();Ok();Yn();var Mqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},c9e=function(i,e){return function(t,n){e(t,n,i)}},d9e=class extends ig{constructor(e,t,n){super(t,n),this.editorService=e,this.onDidActiveTextEditorControlChange=Et.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};d9e=Mqt([c9e(0,tn),c9e(1,Rt),c9e(2,s6)],d9e);var ZP=class i extends Ot{constructor(){super({id:i.ID,label:Xx.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:re.hasDocumentSymbolProvider,kbOpts:{kbExpr:re.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(ol).quickAccess.show(ig.PREFIX,{itemActivation:lf.NONE})}};ZP.ID="editor.action.quickOutline";yt(ZP);jn.as(p1.Quickaccess).registerQuickAccessProvider({ctor:d9e,prefix:ig.PREFIX,helpEntries:[{description:Xx.quickOutlineActionLabel,prefix:ig.PREFIX,commandId:ZP.ID},{description:Xx.quickOutlineByCategoryActionLabel,prefix:ig.PREFIX_BY_CATEGORY}]});Ys();i7();I2();fs();Ob();Vi();ho();Wt();function u9e(i,e){return e&&(i.stack||i.stacktrace)?g("stackTrace.format","{0}: {1}",ept(i),J1t(i.stack)||J1t(i.stacktrace)):ept(i)}function J1t(i){return Array.isArray(i)?i.join(` -`):i}function ept(i){return i.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${i.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof i.code=="string"&&typeof i.errno=="number"&&typeof i.syscall=="string"?g("nodeExceptionMessage","A system error occurred ({0})",i.message):i.message||g("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function h9e(i=null,e=!1){if(!i)return g("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(i)){let t=pl(i),n=h9e(t[0],e);return t.length>1?g("error.moreErrors","{0} ({1} errors in total)",n,t.length):n}if(qs(i))return i;if(i.detail){let t=i.detail;if(t.error)return u9e(t.error,e);if(t.exception)return u9e(t.exception,e)}return i.stack?u9e(i,e):i.message?i.message:g("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}Pi();l1();S3();nt();od();function Nqt(i){var e;let t=new Map;for(let n of i)t.set(n,((e=t.get(n))!==null&&e!==void 0?e:0)+1);return t}var Die=class i{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){let n=this.computeEmbedding(e),o=new Map,r=[];for(let[s,a]of this.documents){if(t.isCancellationRequested)return[];for(let l of a.chunks){let c=this.computeSimilarityScore(l,n,o);c>0&&r.push({key:s,score:c})}}return r}static termFrequencies(e){return Nqt(i.splitTerms(e))}static*splitTerms(e){let t=n=>n.toLowerCase();for(let[n]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(n);let o=n.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(o.length>1)for(let r of o)r.length>2&&/\p{Letter}{3,}/gu.test(r)&&(yield t(r))}}updateDocuments(e){var t;for(let{key:n}of e)this.deleteDocument(n);for(let n of e){let o=[];for(let r of n.textChunks){let s=i.termFrequencies(r);for(let a of s.keys())this.chunkOccurrences.set(a,((t=this.chunkOccurrences.get(a))!==null&&t!==void 0?t:0)+1);o.push({text:r,tf:s})}this.chunkCount+=o.length,this.documents.set(n.key,{chunks:o})}return this}deleteDocument(e){let t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(let n of t.chunks)for(let o of n.tf.keys()){let r=this.chunkOccurrences.get(o);if(typeof r=="number"){let s=r-1;s<=0?this.chunkOccurrences.delete(o):this.chunkOccurrences.set(o,s)}}}}computeSimilarityScore(e,t,n){let o=0;for(let[r,s]of Object.entries(t)){let a=e.tf.get(r);if(!a)continue;let l=n.get(r);typeof l!="number"&&(l=this.computeIdf(r),n.set(r,l));let c=a*l;o+=c*s}return o}computeEmbedding(e){let t=i.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){var t;let n=(t=this.chunkOccurrences.get(e))!==null&&t!==void 0?t:0;return n>0?Math.log((this.chunkCount+1)/n):0}computeTfidf(e){let t=Object.create(null);for(let[n,o]of e){let r=this.computeIdf(n);r>0&&(t[n]=o*r)}return t}};function tpt(i){var e,t;let n=i.slice(0);n.sort((r,s)=>s.score-r.score);let o=(t=(e=n[0])===null||e===void 0?void 0:e.score)!==null&&t!==void 0?t:0;if(o>0)for(let r of n)r.score/=o;return n}Wt();$o();er();Nx();_i();vs();Qi();mo();nt();ho();var hL;(function(i){i[i.NO_ACTION=0]="NO_ACTION",i[i.CLOSE_PICKER=1]="CLOSE_PICKER",i[i.REFRESH_PICKER=2]="REFRESH_PICKER",i[i.REMOVE_ITEM=3]="REMOVE_ITEM"})(hL||(hL={}));function f9e(i){let e=i;return Array.isArray(e.items)}function ipt(i){let e=i;return!!e.picks&&e.additionalPicks instanceof Promise}var Tie=class extends ue{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,n){var o;let r=new Ye;e.canAcceptInBackground=!!(!((o=this.options)===null||o===void 0)&&o.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s,a=r.add(new To),l=async()=>{var c;let d=a.value=new Ye;s?.dispose(!0),e.busy=!1,s=new Jn(t);let u=s.token,h=e.value.substring(this.prefix.length);!((c=this.options)===null||c===void 0)&&c.shouldSkipTrimPickFilter||(h=h.trim());let f=this._getPicks(h,d,u,n),p=(y,_)=>{var v;let b,C;if(f9e(y)?(b=y.items,C=y.active):b=y,b.length===0){if(_)return!1;(h.length>0||e.hideInput)&&(!((v=this.options)===null||v===void 0)&&v.noResultsPick)&&(v3(this.options.noResultsPick)?b=[this.options.noResultsPick(h)]:b=[this.options.noResultsPick])}return e.items=b,C&&(e.activeItems=[C]),!0},m=async y=>{let _=!1,v=!1;await Promise.all([(async()=>{typeof y.mergeDelay=="number"&&(await eh(y.mergeDelay),u.isCancellationRequested)||v||(_=p(y.picks,!0))})(),(async()=>{e.busy=!0;try{let b=await y.additionalPicks;if(u.isCancellationRequested)return;let C,w;f9e(y.picks)?(C=y.picks.items,w=y.picks.active):C=y.picks;let S,x;if(f9e(b)?(S=b.items,x=b.active):S=b,S.length>0||!_){let k;if(!w&&!x){let D=e.activeItems[0];D&&C.indexOf(D)!==-1&&(k=D)}p({items:[...C,...S],active:w||x||k})}}finally{u.isCancellationRequested||(e.busy=!1),v=!0}})()])};if(f!==null)if(ipt(f))await m(f);else if(!(f instanceof Promise))p(f);else{e.busy=!0;try{let y=await f;if(u.isCancellationRequested)return;ipt(y)?await m(y):p(y)}finally{u.isCancellationRequested||(e.busy=!1)}}};return r.add(e.onDidChangeValue(()=>l())),l(),r.add(e.onDidAccept(c=>{let[d]=e.selectedItems;typeof d?.accept=="function"&&(c.inBackground||e.hide(),d.accept(e.keyMods,c))})),r.add(e.onDidTriggerItemButton(async({button:c,item:d})=>{var u,h;if(typeof d.trigger=="function"){let f=(h=(u=d.buttons)===null||u===void 0?void 0:u.indexOf(c))!==null&&h!==void 0?h:-1;if(f>=0){let p=d.trigger(f,e.keyMods),m=typeof p=="number"?p:await p;if(t.isCancellationRequested)return;switch(m){case hL.NO_ACTION:break;case hL.CLOSE_PICKER:e.hide();break;case hL.REFRESH_PICKER:l();break;case hL.REMOVE_ITEM:{let y=e.items.indexOf(d);if(y!==-1){let _=e.items.slice(),v=_.splice(y,1),b=e.activeItems.filter(w=>w!==v[0]),C=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=_,b&&(e.activeItems=b),e.keepScrollPosition=C}break}}}}})),r}};Hm();$f();var npt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},a9=function(i,e){return function(t,n){e(t,n,i)}},s9,da,Z8=s9=class extends Tie{constructor(e,t,n,o,r,s){super(s9.PREFIX,e),this.instantiationService=t,this.keybindingService=n,this.commandService=o,this.telemetryService=r,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(X8)),this.options=e}async _getPicks(e,t,n,o){var r,s,a,l;let c=await this.getCommandPicks(n);if(n.isCancellationRequested)return[];let d=Gu(()=>{let _=new Die;_.updateDocuments(c.map(b=>({key:b.commandId,textChunks:[this.getTfIdfChunk(b)]})));let v=_.calculateScores(e,n);return tpt(v).filter(b=>b.score>s9.TFIDF_THRESHOLD).slice(0,s9.TFIDF_MAX_RESULTS)}),u=[];for(let _ of c){let v=(r=s9.WORD_FILTER(e,_.label))!==null&&r!==void 0?r:void 0,b=_.commandAlias&&(s=s9.WORD_FILTER(e,_.commandAlias))!==null&&s!==void 0?s:void 0;if(v||b)_.highlights={label:v,detail:this.options.showAlias?b:void 0},u.push(_);else if(e===_.commandId)u.push(_);else if(e.length>=3){let C=d();if(n.isCancellationRequested)return[];let w=C.find(S=>S.key===_.commandId);w&&(_.tfIdfScore=w.score,u.push(_))}}let h=new Map;for(let _ of u){let v=h.get(_.label);v?(_.description=_.commandId,v.description=v.commandId):h.set(_.label,_)}u.sort((_,v)=>{if(_.tfIdfScore&&v.tfIdfScore)return _.tfIdfScore===v.tfIdfScore?_.label.localeCompare(v.label):v.tfIdfScore-_.tfIdfScore;if(_.tfIdfScore)return 1;if(v.tfIdfScore)return-1;let b=this.commandsHistory.peek(_.commandId),C=this.commandsHistory.peek(v.commandId);if(b&&C)return b>C?-1:1;if(b)return-1;if(C)return 1;if(this.options.suggestedCommandIds){let w=this.options.suggestedCommandIds.has(_.commandId),S=this.options.suggestedCommandIds.has(v.commandId);if(w&&S)return 0;if(w)return-1;if(S)return 1}return _.label.localeCompare(v.label)});let f=[],p=!1,m=!0,y=!!this.options.suggestedCommandIds;for(let _=0;_{var _;let v=await this.getAdditionalCommandPicks(c,u,e,n);if(n.isCancellationRequested)return[];let b=v.map(C=>this.toCommandPick(C,o));return m&&((_=b[0])===null||_===void 0?void 0:_.type)!=="separator"&&b.unshift({type:"separator",label:g("suggested","similar commands")}),b})()}:f}toCommandPick(e,t){if(e.type==="separator")return e;let n=this.keybindingService.lookupKeybinding(e.commandId),o=n?g("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,n.getAriaLabel()):e.label;return{...e,ariaLabel:o,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:n,accept:async()=>{var r,s;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:(r=t?.from)!==null&&r!==void 0?r:"quick open"});try{!((s=e.args)===null||s===void 0)&&s.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(a){jl(a)||this.dialogService.error(g("canNotRun","Command '{0}' resulted in an error",e.label),h9e(a))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:n}){let o=e;return t&&t!==e&&(o+=` - ${t}`),n&&n.value!==e&&(o+=` - ${n.value===n.original?n.value:`${n.value} (${n.original})`}`),o}};Z8.PREFIX=">";Z8.TFIDF_THRESHOLD=.5;Z8.TFIDF_MAX_RESULTS=5;Z8.WORD_FILTER=vY(Pb,Get,Ege);Z8=s9=npt([a9(1,qt),a9(2,fn),a9(3,eo),a9(4,Fs),a9(5,x2)],Z8);var X8=da=class extends ue{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===Kv.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=da.getConfiguredCommandHistoryLength(this.configurationService),da.cache&&da.cache.limit!==this.configuredCommandsHistoryLength&&(da.cache.limit=this.configuredCommandsHistoryLength,da.hasChanges=!0))}load(){let e=this.storageService.get(da.PREF_KEY_CACHE,0),t;if(e)try{t=JSON.parse(e)}catch{}let n=da.cache=new nd(this.configuredCommandsHistoryLength,1);if(t){let o;t.usesLRU?o=t.entries:o=t.entries.sort((r,s)=>r.value-s.value),o.forEach(r=>n.set(r.key,r.value))}da.counter=this.storageService.getNumber(da.PREF_KEY_COUNTER,0,da.counter)}push(e){da.cache&&(da.cache.set(e,da.counter++),da.hasChanges=!0)}peek(e){var t;return(t=da.cache)===null||t===void 0?void 0:t.peek(e)}saveState(){if(!da.cache||!da.hasChanges)return;let e={usesLRU:!0,entries:[]};da.cache.forEach((t,n)=>e.entries.push({key:n,value:t})),this.storageService.store(da.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(da.PREF_KEY_COUNTER,da.counter,0,0),da.hasChanges=!1}static getConfiguredCommandHistoryLength(e){var t,n;let r=(n=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||n===void 0?void 0:n.history;return typeof r=="number"?r:da.DEFAULT_COMMANDS_HISTORY_LENGTH}};X8.DEFAULT_COMMANDS_HISTORY_LENGTH=50;X8.PREF_KEY_CACHE="commandPalette.mru.cache";X8.PREF_KEY_COUNTER="commandPalette.mru.counter";X8.counter=1;X8.hasChanges=!1;X8=da=npt([a9(0,nl),a9(1,Ni)],X8);var Iie=class extends Z8{constructor(e,t,n,o,r,s){super(e,t,n,o,r,s)}getCodeEditorCommandPicks(){let e=this.activeTextEditorControl;if(!e)return[];let t=[];for(let n of e.getSupportedActions())t.push({commandId:n.id,commandAlias:n.alias,label:Vx(n.label)||n.id});return t}};_i();vs();$o();$f();Nx();an();Co();cf();var Aqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},fL=function(i,e){return function(t,n){e(t,n,i)}},XP=class extends Iie{get activeTextEditorControl(){var e;return(e=this.codeEditorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}constructor(e,t,n,o,r,s){super({showAlias:!1},e,n,o,r,s),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};XP=Aqt([fL(0,qt),fL(1,tn),fL(2,fn),fL(3,eo),fL(4,Fs),fL(5,x2)],XP);var QP=class i extends Ot{constructor(){super({id:i.ID,label:YM.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:re.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(ol).quickAccess.show(XP.PREFIX)}};QP.ID="editor.action.quickCommand";yt(QP);jn.as(p1.Quickaccess).registerQuickAccessProvider({ctor:XP,prefix:XP.PREFIX,helpEntries:[{description:YM.quickCommandHelp,commandId:QP.ID}]});an();fs();er();Xi();_i();ic();Hm();var Rqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},pL=function(i,e){return function(t,n){e(t,n,i)}},p9e=class extends Q2{constructor(e,t,n,o,r,s,a){super(!0,e,t,n,o,r,s,a)}};p9e=Rqt([pL(1,ri),pL(2,tn),pL(3,xo),pL(4,qt),pL(5,nl),pL(6,Ni)],p9e);Ii(Q2.ID,p9e,4);an();l7();I2();fp();s4e();var m9e=class extends Ot{constructor(){super({id:"editor.action.toggleHighContrast",label:VY.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){let n=e.get(sc),o=n.getColorTheme();Ac(o.type)?(n.setTheme(this._originalThemeName||(a2(o.type)?a7:H2)),this._originalThemeName=null):(n.setTheme(a2(o.type)?t8:i8),this._originalThemeName=o.themeName)}};yt(m9e);ta();var rpt=vt(xi()),JP=vt(xi());window.MonacoEnvironment={getWorker:(i,e)=>new Worker("editor.worker.js",{type:"module"})};var mL=class{constructor(e="",t=null,n="text"){PO(this,"model");PO(this,"readOnly");PO(this,"viewState",null);this.model=$S.createModel(e||"",n),this.readOnly=t===null,this.readOnly||this.model.onDidChangeContent(o=>t(this.model.getValue()))}get text(){return this.model.getValue()}set text(e){this.readOnly?this.model.setValue(e):this.model.pushEditOperations([],[{range:this.model.getFullModelRange(),text:e}],()=>null)}dispose(){this.model.dispose()}};function Mie({state:i,actions:e=[],padding:t,focus:n=!1}){let o=(0,JP.useRef)(null),r=(0,JP.useRef)(null);return(0,JP.useEffect)(()=>{o.current=$S.create(r.current,{model:i.model,readOnly:i.readOnly,padding:t}),e.forEach(a=>o.current?.addAction(a));let s=new ResizeObserver(a=>o.current?.layout());return s.observe(r.current),o.current.restoreViewState(i.viewState),n&&o.current.focus(),()=>{i.viewState=o.current.saveViewState(),s.disconnect(),o.current?.dispose()}},[e]),rpt.createElement("div",{style:{height:"100%"},ref:r})}var Mmt=vt(xi()),Q8=vt(xi()),Nmt=vt(C9e()),Amt=vt(Imt());function Rmt(i){let e=(0,Q8.useRef)(null),t=(0,Q8.useRef)(null),n=(0,Q8.useId)();return(0,Q8.useEffect)(()=>{e.current===null&&(e.current=new Amt.WaveGraph(Nmt.select(`[id="${n}"]`))),e.current.setSizes();let o=new ResizeObserver(r=>e.current.setSizes());return o.observe(t.current),()=>o.disconnect()},[]),(0,Q8.useEffect)(()=>e.current?.bindData(i.data),[i.data]),Mmt.createElement("svg",{width:"100%",height:"100%",style:{display:"block"},id:n,ref:t})}var Pmt=`app.worker.js?hash=${"e2d41f268900953eed77ca775745f0917566ff52".substr(0,8)}`,tO=class extends Error{},J8,_L,w9e=class{constructor(){yne(this,J8,new Worker(Pmt,{type:"module"}));yne(this,_L,null)}initializeWorker(e){return JSON.stringify(c_(this,_L))!==JSON.stringify(e)&&(c_(this,J8)!==null&&c_(this,_L)!==null&&(c_(this,J8).terminate(),Cne(this,J8,new Worker(Pmt,{type:"module"}))),c_(this,J8).postMessage({type:"loadPackages",pkgs:e}),Cne(this,_L,e)),c_(this,J8)}preloadPackages(e){this.initializeWorker(e)}runPython(e,t){console.log("[Host] Running",{packages:t.packages,code:e});let n=this.initializeWorker(t.packages);return new Promise((o,r)=>{function s(l){console.log("[Host] Received",l.data),l.data.type==="stdoutWrite"?t.onStdout(l.data.text):l.data.type==="stderrWrite"?t.onStderr(l.data.text):l.data.type==="showRtlil"?t.onShowRtlil(l.data.code):l.data.type==="showVerilog"?t.onShowVerilog(l.data.code):l.data.type==="showWaveforms"?t.onShowWaveforms(l.data.data):l.data.type==="pythonDone"?(n.removeEventListener("message",s),n.removeEventListener("error",a),l.data.error===null?o():r(new tO(l.data.error))):r(new Error(`[Host] Unexpected message ${l.data.type}`))}function a(l){console.log("[Host] Failure",l.error),n.removeEventListener("message",s),r(l.error)}n.addEventListener("message",s),n.addEventListener("error",a,{once:!0}),n.postMessage({type:"runPython",code:e})})}};J8=new WeakMap,_L=new WeakMap;var Omt=new w9e;var mne="https://files.pythonhosted.org/packages/ff/9a/9afaade874b2fa6c752c36f1548f718b5b83af81ed9b76628329dab81c1b/rfc3986-2.0.0-py2.py3-none-any.whl",gne="https://files.pythonhosted.org/packages/ce/b1/31f454a2ac0d23b0a47283d115f0af4abe2a1ea391f5ccb223e02d685b82/jschon-0.11.1-py3-none-any.whl",e_="https://files.pythonhosted.org/packages/98/8d/a0d8fb2b9611f3ae22ddc98890b346833fa2c645ad21fd282e61ccdad477/pyvcd-0.4.0-py2.py3-none-any.whl",Oqt="https://files.pythonhosted.org/packages/27/1c/39881fbd48f9de91d64955f206a7f32fd912d306d18e8c5f74126ee5962f/amaranth-0.4.2-py3-none-any.whl",zqt="https://files.pythonhosted.org/packages/72/34/82f76a59f4155e26f42cf9f9d04d80befe774aa8af6d9b6e48d3e7b9f060/amaranth-0.4.3-py3-none-any.whl",Fqt="https://files.pythonhosted.org/packages/ee/66/bbb766873059d8051ddb7e760de80beefd286979bc9a786e7ec4ac524336/amaranth-0.4.4-py3-none-any.whl",Hqt="https://files.pythonhosted.org/packages/1a/bf/cff5c705f2f5978889e1fa0fc2a70e0fadbb9f2a51db2d3315c3bda7c3ea/amaranth-0.4.5-py3-none-any.whl",Bqt="https://files.pythonhosted.org/packages/d3/34/8a21cc1765f1952eb35766cf76ec8a1b3e73f32ae78d9bf1c1a88313bdcd/amaranth-0.5.0-py3-none-any.whl",Vqt="https://files.pythonhosted.org/packages/46/1c/74dc024e77038a273160dd1d70a79371142ba9ebeac4b2fb89c272ce6859/amaranth-0.5.1-py3-none-any.whl",Wqt="https://files.pythonhosted.org/packages/e1/60/f787f05fe9684ce80aeb9fe23238248461ef42783e53712092ad55a97eec/amaranth-0.5.2-py3-none-any.whl",Uqt="https://files.pythonhosted.org/packages/3a/8d/889014b45ecf68727d8c8c1d88d5b858f0b43a42c5b1e51fa2c875ffd4d5/amaranth-0.5.3-py3-none-any.whl",zmt={"v0.5.3":[mne,gne,e_,Uqt],"v0.5.2":[mne,gne,e_,Wqt],"v0.5.1":[mne,gne,e_,Vqt],"v0.5.0":[mne,gne,e_,Bqt],"v0.4.5":[e_,Hqt],"v0.4.4":[e_,Fqt],"v0.4.3":[e_,zqt],"v0.4.2":[e_,Oqt]},vne=`from amaranth import * +`)};let s=await r.provideRenameEdits(this.model,this.position,e,o);if(s){if(s.rejectReason)return this._provideRenameEdits(e,t+1,n.concat(s.rejectReason),o)}else return this._provideRenameEdits(e,t+1,n.concat(g("no result","No result.")),o);return s}};async function Gjt(i,e,t,n){let o=new SP(e,t,i),r=await o.resolveRenameLocation(Fi.None);return r?.rejectReason?{edits:[],rejectReason:r.rejectReason}:o.provideRenameEdits(n,Fi.None)}var i9=Bbe=class{static get(e){return e.getContribution(Bbe.ID)}constructor(e,t,n,o,r,s,a,l){this.editor=e,this._instaService=t,this._notificationService=n,this._bulkEditService=o,this._progressService=r,this._logService=s,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new Ye,this._cts=new Jn,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(tie,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){var e,t;if(this._cts.dispose(!0),this._cts=new Jn,!this.editor.hasModel())return;let n=this.editor.getPosition(),o=new SP(this.editor.getModel(),n,this._languageFeaturesService.renameProvider);if(!o.hasProvider())return;let r=new bh(this.editor,5,void 0,this._cts.token),s;try{let p=o.resolveRenameLocation(r.token);this._progressService.showWhile(p,250),s=await p}catch(p){(e=rl.get(this.editor))===null||e===void 0||e.showMessage(p||g("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),n);return}finally{r.dispose()}if(!s)return;if(s.rejectReason){(t=rl.get(this.editor))===null||t===void 0||t.showMessage(s.rejectReason,n);return}if(r.token.isCancellationRequested)return;let a=new bh(this.editor,5,s.range,this._cts.token),l=this.editor.getSelection(),c=0,d=s.text.length;!O.isEmpty(l)&&!O.spansMultipleLines(l)&&O.containsRange(s.range,l)&&(c=Math.max(0,l.startColumn-s.range.startColumn),d=Math.min(s.range.endColumn,l.endColumn)-s.range.startColumn);let u=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),h=await this._renameInputField.getInput(s.range,s.text,c,d,u,a.token);if(typeof h=="boolean"){h&&this.editor.focus(),a.dispose();return}this.editor.focus();let f=V3(o.provideRenameEdits(h.newName,a.token),a.token).then(async p=>{if(!(!p||!this.editor.hasModel())){if(p.rejectReason){this._notificationService.info(p.rejectReason);return}this.editor.setSelection(O.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(p,{editor:this.editor,showPreview:h.wantsPreview,label:g("label","Renaming '{0}' to '{1}'",s?.text,h.newName),code:"undoredo.rename",quotableLabel:g("quotableLabel","Renaming {0} to {1}",s?.text,h.newName),respectAutoSaveConfig:!0}).then(m=>{m.ariaSummary&&Hs(g("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",s.text,h.newName,m.ariaSummary))}).catch(m=>{this._notificationService.error(g("rename.failedApply","Rename failed to apply edits")),this._logService.error(m)})}},p=>{this._notificationService.error(g("rename.failed","Rename failed to compute edits")),this._logService.error(p)}).finally(()=>{a.dispose()});return this._progressService.showWhile(f,250),f}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};i9.ID="editor.contrib.renameController";i9=Bbe=qjt([t9(1,qt),t9(2,xo),t9(3,T2),t9(4,mh),t9(5,ks),t9(6,fw),t9(7,Rt)],i9);var Vbe=class extends Ot{constructor(){super({id:"editor.action.rename",label:g("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:mt.and(re.writable,re.hasRenameProvider),kbOpts:{kbExpr:re.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){let n=e.get(tn),[o,r]=Array.isArray(t)&&t||[void 0,void 0];return li.isUri(o)&&ke.isIPosition(r)?n.openCodeEditor({resource:o},n.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(r),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},hi):super.runCommand(e,t)}run(e,t){let n=i9.get(t);return n?n.run():Promise.resolve()}};Ii(i9.ID,i9,4);yt(Vbe);var Wbe=Jo.bindToContribution(i9.get);zt(new Wbe({id:"acceptRenameInput",precondition:xP,handler:i=>i.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:mt.and(re.focus,mt.not("isComposing")),primary:3}}));zt(new Wbe({id:"acceptRenameInputWithPreview",precondition:mt.and(xP,mt.has("config.editor.rename.enablePreview")),handler:i=>i.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:mt.and(re.focus,mt.not("isComposing")),primary:1027}}));zt(new Wbe({id:"cancelRenameInput",precondition:xP,handler:i=>i.cancelRenameInput(),kbOpts:{weight:199,kbExpr:re.focus,primary:9,secondary:[1033]}}));nh("_executeDocumentRenameProvider",function(i,e,t,...n){let[o]=n;Bn(typeof o=="string");let{renameProvider:r}=i.get(Rt);return Gjt(r,e,t,o)});nh("_executePrepareRename",async function(i,e,t){let{renameProvider:n}=i.get(Rt),r=await new SP(e,t,n).resolveRenameLocation(Fi.None);if(r?.rejectReason)throw new Error(r.rejectReason);return r});jn.as(Yl.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:g("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});nt();Pi();Dc();er();Qi();mo();No();sY();mo();Pi();Io();Dc();$o();ho();ew();Mn();function Kjt(i){for(let e=0,t=i.length;e0?t[0]:[]}async function Kbe(i,e,t,n,o){let r=Xjt(i,e),s=await Promise.all(r.map(async a=>{let l,c=null;try{l=await a.provideDocumentSemanticTokens(e,a===t?n:null,o)}catch(d){c=d,l=null}return(!l||!kP(l)&&!qbe(l))&&(l=null),new $be(a,l,c)}));for(let a of s){if(a.error)throw a.error;if(a.tokens)return a}return s.length>0?s[0]:null}function Qjt(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:null}var jbe=class{constructor(e,t){this.provider=e,this.tokens=t}};function x1t(i,e){return i.has(e)}function S1t(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}async function iie(i,e,t,n){let o=S1t(i,e),r=await Promise.all(o.map(async s=>{let a;try{a=await s.provideDocumentRangeSemanticTokens(e,t,n)}catch(l){po(l),a=null}return(!a||!kP(a))&&(a=null),new jbe(s,a)}));for(let s of r)if(s.tokens)return s;return r.length>0?r[0]:null}Zi.registerCommand("_provideDocumentSemanticTokensLegend",async(i,...e)=>{let[t]=e;Bn(t instanceof li);let n=i.get(no).getModel(t);if(!n)return;let{documentSemanticTokensProvider:o}=i.get(Rt),r=Qjt(o,n);return r?r[0].getLegend():i.get(eo).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)});Zi.registerCommand("_provideDocumentSemanticTokens",async(i,...e)=>{let[t]=e;Bn(t instanceof li);let n=i.get(no).getModel(t);if(!n)return;let{documentSemanticTokensProvider:o}=i.get(Rt);if(!Gbe(o,n))return i.get(eo).executeCommand("_provideDocumentRangeSemanticTokens",t,n.getFullModelRange());let r=await Kbe(o,n,null,null,Fi.None);if(!r)return;let{provider:s,tokens:a}=r;if(!a||!kP(a))return;let l=Ube({id:0,type:"full",data:a.data});return a.resultId&&s.releaseDocumentSemanticTokens(a.resultId),l});Zi.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(i,...e)=>{let[t,n]=e;Bn(t instanceof li);let o=i.get(no).getModel(t);if(!o)return;let{documentRangeSemanticTokensProvider:r}=i.get(Rt),s=S1t(r,o);if(s.length===0)return;if(s.length===1)return s[0].getLegend();if(!n||!O.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),s[0].getLegend();let a=await iie(r,o,O.lift(n),Fi.None);if(a)return a.provider.getLegend()});Zi.registerCommand("_provideDocumentRangeSemanticTokens",async(i,...e)=>{let[t,n]=e;Bn(t instanceof li),Bn(O.isIRange(n));let o=i.get(no).getModel(t);if(!o)return;let{documentRangeSemanticTokensProvider:r}=i.get(Rt),s=await iie(r,o,O.lift(n),Fi.None);if(!(!s||!s.tokens))return Ube({id:0,type:"full",data:s.tokens.data})});a1();Yu();Yn();aY();d7();var LP="editor.semanticHighlighting";function tL(i,e,t){var n;let o=(n=t.getValue(LP,{overrideIdentifier:i.getLanguageId(),resource:i.uri}))===null||n===void 0?void 0:n.enabled;return typeof o=="boolean"?o:e.getColorTheme().semanticHighlighting}var k1t=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},l0=function(i,e){return function(t,n){e(t,n,i)}},K8,Ybe=class extends ue{constructor(e,t,n,o,r,s){super(),this._watchers=Object.create(null);let a=d=>{this._watchers[d.uri.toString()]=new EP(d,e,n,r,s)},l=(d,u)=>{u.dispose(),delete this._watchers[d.uri.toString()]},c=()=>{for(let d of t.getModels()){let u=this._watchers[d.uri.toString()];tL(d,n,o)?u||a(d):u&&l(d,u)}};t.getModels().forEach(d=>{tL(d,n,o)&&a(d)}),this._register(t.onModelAdded(d=>{tL(d,n,o)&&a(d)})),this._register(t.onModelRemoved(d=>{let u=this._watchers[d.uri.toString()];u&&l(d,u)})),this._register(o.onDidChangeConfiguration(d=>{d.affectsConfiguration(LP)&&c()})),this._register(n.onDidColorThemeChange(c))}dispose(){for(let e of Object.values(this._watchers))e.dispose();super.dispose()}};Ybe=k1t([l0(0,Ab),l0(1,no),l0(2,Mo),l0(3,Ni),l0(4,xa),l0(5,Rt)],Ybe);var EP=K8=class extends ue{constructor(e,t,n,o,r){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=r.documentSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentSemanticTokens",{min:K8.REQUEST_MIN_DELAY,max:K8.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new hn(()=>this._fetchDocumentSemanticTokensNow(),K8.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));let s=()=>{Nn(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(let a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};s(),this._register(this._provider.onDidChange(()=>{s(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(a=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),Nn(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!Gbe(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;let e=new Jn,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,o=Kbe(this._provider,this._model,t,n,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;let r=[],s=this._model.onDidChangeContent(l=>{r.push(l)}),a=new Er(!1);o.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,r);else{let{provider:c,tokens:d}=l,u=this._semanticTokensStylingService.getStyling(c);this._setDocumentSemanticTokens(c,d||null,u,r)}},l=>{l&&(jl(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||hi(l),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),(r.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,n,o,r){r=Math.min(r,n.length-o,e.length-t);for(let s=0;s{(o.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!n){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),s();return}if(qbe(t)){if(!r){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:r.data};else{let a=0;for(let h of t.edits)a+=(h.data?h.data.length:0)-h.deleteCount;let l=r.data,c=new Uint32Array(l.length+a),d=l.length,u=c.length;for(let h=t.edits.length-1;h>=0;h--){let f=t.edits[h];if(f.start>l.length){n.warnInvalidEditStart(r.resultId,t.resultId,h,f.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}let p=d-(f.start+f.deleteCount);p>0&&(K8._copy(l,d-p,c,u-p,p),u-=p),f.data&&(K8._copy(f.data,0,c,u-f.data.length,f.data.length),u-=f.data.length),d=f.start}d>0&&K8._copy(l,0,c,0,d),t={resultId:t.resultId,data:c}}}if(kP(t)){this._currentDocumentResponse=new Zbe(e,t.resultId,t.data);let a=rY(t,n,this._model.getLanguageId());if(o.length>0)for(let l of o)for(let c of a)for(let d of l.changes)c.applyEdit(d.range,d.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);s()}};EP.REQUEST_MIN_DELAY=300;EP.REQUEST_MAX_DELAY=2e3;EP=K8=k1t([l0(1,Ab),l0(2,Mo),l0(3,xa),l0(4,Rt)],EP);var Zbe=class{constructor(e,t,n){this.provider=e,this.resultId=t,this.data=n}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}};B2(Ybe);Qi();nt();an();sY();er();No();a1();Yu();Yn();aY();var Jjt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},DP=function(i,e){return function(t,n){e(t,n,i)}},TP=class extends ue{constructor(e,t,n,o,r,s){super(),this._semanticTokensStylingService=t,this._themeService=n,this._configurationService=o,this._editor=e,this._provider=s.documentRangeSemanticTokensProvider,this._debounceInformation=r.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new hn(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];let a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(l=>{this._cancelAll(),a()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration(LP)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()})),a()}_cancelAll(){for(let e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,n=this._outstandingRequests.length;tthis._requestRange(e,n)))}_requestRange(e,t){let n=e.getVersionId(),o=Ho(s=>Promise.resolve(iie(this._provider,e,t,s))),r=new Er(!1);return o.then(s=>{if(this._debounceInformation.update(e,r.elapsed()),!s||!s.tokens||e.isDisposed()||e.getVersionId()!==n)return;let{provider:a,tokens:l}=s,c=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(t,rY(l,c,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(o),()=>this._removeOutstandingRequest(o)),o}};TP.ID="editor.contrib.viewportSemanticTokens";TP=Jjt([DP(1,Ab),DP(2,Mo),DP(3,Ni),DP(4,xa),DP(5,Rt)],TP);Ii(TP.ID,TP,1);Vi();mo();Pi();an();Mi();Kt();zo();Co();Ri();Kt();var nie=class{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){let n=[];for(let o of t){let r=[];n.push(r),this.selectSubwords&&this._addInWordRanges(r,e,o),this._addWordRanges(r,e,o),this._addWhitespaceLine(r,e,o),r.push({range:e.getFullModelRange()})}return n}_addInWordRanges(e,t,n){let o=t.getWordAtPosition(n);if(!o)return;let{word:r,startColumn:s}=o,a=n.column-s,l=a,c=a,d=0;for(;l>=0;l--){let u=r.charCodeAt(l);if(l!==a&&(u===95||u===45))break;if(Tg(u)&&Ff(d))break;d=u}for(l+=1;c0&&t.getLineFirstNonWhitespaceColumn(n.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(n.lineNumber)===0&&e.push({range:new O(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}};Wt();Dr();$o();Yn();Wh();ho();Io();var eqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},tqt=function(i,e){return function(t,n){e(t,n,i)}},Xbe,Qbe=class i{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;let n=new i(t,this.ranges);return n.ranges[t].equalsRange(this.ranges[this.index])?n.mov(e):n}},iL=Xbe=class{static get(e){return e.getContribution(Xbe.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}async run(e){if(!this._editor.hasModel())return;let t=this._editor.getSelections(),n=this._editor.getModel();if(this._state||await L1t(this._languageFeaturesService.selectionRangeProvider,n,t.map(r=>r.getPosition()),this._editor.getOption(112),Fi.None).then(r=>{var s;if(!(!Nr(r)||r.length!==t.length)&&!(!this._editor.hasModel()||!uo(this._editor.getSelections(),t,(a,l)=>a.equalsSelection(l)))){for(let a=0;al.containsPosition(t[a].getStartPosition())&&l.containsPosition(t[a].getEndPosition())),r[a].unshift(t[a]);this._state=r.map(a=>new Qbe(0,a)),(s=this._selectionListener)===null||s===void 0||s.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var a;this._ignoreSelection||((a=this._selectionListener)===null||a===void 0||a.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(r=>r.mov(e));let o=this._state.map(r=>jt.fromPositions(r.ranges[r.index].getStartPosition(),r.ranges[r.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(o)}finally{this._ignoreSelection=!1}}};iL.ID="editor.contrib.smartSelectController";iL=Xbe=eqt([tqt(1,Rt)],iL);var oie=class extends Ot{constructor(e,t){super(t),this._forward=e}async run(e,t){let n=iL.get(t);n&&await n.run(this._forward)}},Jbe=class extends oie{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:g("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:re.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:ne.MenubarSelectionMenu,group:"1_basic",title:g({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}};Zi.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");var e7e=class extends oie{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:g("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:re.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:ne.MenubarSelectionMenu,group:"1_basic",title:g({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}};Ii(iL.ID,iL,4);yt(Jbe);yt(e7e);async function L1t(i,e,t,n,o){let r=i.all(e).concat(new nie(n.selectSubwords));r.length===1&&r.unshift(new z8);let s=[],a=[];for(let l of r)s.push(Promise.resolve(l.provideSelectionRanges(e,t,o)).then(c=>{if(Nr(c)&&c.length===t.length)for(let d=0;d{if(l.length===0)return[];l.sort((h,f)=>ke.isBefore(h.getStartPosition(),f.getStartPosition())?1:ke.isBefore(f.getStartPosition(),h.getStartPosition())||ke.isBefore(h.getEndPosition(),f.getEndPosition())?-1:ke.isBefore(f.getEndPosition(),h.getEndPosition())?1:0);let c=[],d;for(let h of l)(!d||O.containsRange(h,d)&&!O.equalsRange(h,d))&&(c.push(h),d=h);if(!n.selectLeadingAndTrailingWhitespace)return c;let u=[c[0]];for(let h=1;hi}),t7e="data-sticky-line-index",T1t="data-sticky-is-line",iqt="data-sticky-is-line-number",I1t="data-sticky-is-folding-icon",rie=class extends ue{constructor(e){super(),this._editor=e,this._foldingIconStore=new Ye,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(66),this._renderedStickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof _1),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);let t=()=>{this._linesDomNode.style.left=this._editor.getOption(114).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(114)&&t(),n.hasChanged(66)&&(this._lineHeight=this._editor.getOption(66))})),this._register(this._editor.onDidScrollChange(n=>{n.scrollLeftChanged&&t(),n.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{t(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange(n=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getRenderedStickyLine(e){return this._renderedStickyLines.find(t=>t.lineNumber===e)}getCurrentLines(){return this._lineNumbers}setState(e,t,n){if(n===void 0&&(!this._previousState&&!e||this._previousState&&this._previousState.equals(e)))return;let o=this._isWidgetHeightZero(e),r=o?void 0:e,s=o?0:this._findLineToRebuildWidgetFrom(e,n);this._renderRootNode(r,t,s),this._previousState=e}_isWidgetHeightZero(e){if(!e)return!0;let t=e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition;if(t>0){this._lastLineRelativePosition=e.lastLineRelativePosition;let n=[...e.startLineNumbers];e.showEndForLine!==null&&(n[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=n}else this._lastLineRelativePosition=0,this._lineNumbers=[];return t===0}_findLineToRebuildWidgetFrom(e,t){if(!e||!this._previousState)return 0;if(t!==void 0)return t;let n=this._previousState,o=e.startLineNumbers.findIndex(r=>!n.startLineNumbers.includes(r));return o===-1?0:o}_updateWidgetWidth(){let e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-e.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${e.width-e.verticalScrollbarWidth}px`}_clearStickyLinesFromLine(e){this._foldingIconStore.clear();for(let t=e;ta.scrollWidth))+o.verticalScrollbarWidth,this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){this._editor.getOption(109)==="mouseover"&&(this._foldingIconStore.add(Xe(this._lineNumbersDomNode,Lt.MOUSE_ENTER,()=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(Xe(this._lineNumbersDomNode,Lt.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,t,n,o){let r=this._editor._getViewModel();if(!r)return;let s=r.coordinatesConverter.convertModelPositionToViewPosition(new ke(t,1)).lineNumber,a=r.getViewLineRenderingData(s),l=this._editor.getOption(67),c;try{c=Ld.filter(a.inlineDecorations,s,a.minColumn,a.maxColumn)}catch{c=[]}let d=new uu(!0,!0,a.content,a.continuesWithWrappedLine,a.isBasicASCII,a.containsRTL,0,a.tokens,c,a.tabSize,a.startVisibleColumn,1,1,1,500,"none",!0,!0,null),u=new qh(2e3),h=a4(d,u),f;D1t?f=D1t.createHTML(u.build()):f=u.build();let p=document.createElement("span");p.setAttribute(t7e,String(e)),p.setAttribute(T1t,""),p.setAttribute("role","listitem"),p.tabIndex=0,p.className="sticky-line-content",p.classList.add(`stickyLine${t}`),p.style.lineHeight=`${this._lineHeight}px`,p.innerHTML=f;let m=document.createElement("span");m.setAttribute(t7e,String(e)),m.setAttribute(iqt,""),m.className="sticky-line-number",m.style.lineHeight=`${this._lineHeight}px`;let y=o.contentLeft;m.style.width=`${y}px`;let _=document.createElement("span");l.renderType===1||l.renderType===3&&t%10===0?_.innerText=t.toString():l.renderType===2&&(_.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),_.className="sticky-line-number-inner",_.style.lineHeight=`${this._lineHeight}px`,_.style.width=`${o.lineNumbersWidth}px`,_.style.paddingLeft=`${o.lineNumbersLeft}px`,m.appendChild(_);let v=this._renderFoldingIconForLine(n,t);v&&m.appendChild(v.domNode),this._editor.applyFontInfo(p),this._editor.applyFontInfo(_),m.style.lineHeight=`${this._lineHeight}px`,p.style.lineHeight=`${this._lineHeight}px`,m.style.height=`${this._lineHeight}px`,p.style.height=`${this._lineHeight}px`;let b=new i7e(e,t,p,m,v,h.characterMapping,p.scrollWidth);return this._updateTopAndZIndexOfStickyLine(b)}_updateTopAndZIndexOfStickyLine(e){var t;let n=e.index,o=e.lineDomNode,r=e.lineNumberDomNode,s=n===this._lineNumbers.length-1,a="0",l="1";o.style.zIndex=s?a:l,r.style.zIndex=s?a:l;let c=`${n*this._lineHeight+this._lastLineRelativePosition+(!((t=e.foldingIcon)===null||t===void 0)&&t.isCollapsed?1:0)}px`,d=`${n*this._lineHeight}px`;return o.style.top=s?c:d,r.style.top=s?c:d,e}_renderFoldingIconForLine(e,t){let n=this._editor.getOption(109);if(!e||n==="never")return;let o=e.regions,r=o.findRange(t),s=o.getStartLineNumber(r);if(!(t===s))return;let l=o.isCollapsed(r),c=new n7e(l,s,o.getEndLineNumber(r),this._lineHeight);return c.setVisible(this._isOnGlyphMargin?!0:l||n==="always"),c.domNode.setAttribute(I1t,""),c}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;let t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;let n=Aj(t.characterMapping,e,0);return new ke(t.lineNumber,n)}getLineNumberFromChildDomNode(e){var t,n;return(n=(t=this._getRenderedStickyLineFromChildDomNode(e))===null||t===void 0?void 0:t.lineNumber)!==null&&n!==void 0?n:null}_getRenderedStickyLineFromChildDomNode(e){let t=this.getLineIndexFromChildDomNode(e);return t===null||t<0||t>=this._renderedStickyLines.length?null:this._renderedStickyLines[t]}getLineIndexFromChildDomNode(e){let t=this._getAttributeValue(e,t7e);return t?parseInt(t,10):null}isInStickyLine(e){return this._getAttributeValue(e,T1t)!==void 0}isInFoldingIconDomNode(e){return this._getAttributeValue(e,I1t)!==void 0}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){let n=e.getAttribute(t);if(n!==null)return n;e=e.parentElement}}},i7e=class{constructor(e,t,n,o,r,s,a){this.index=e,this.lineNumber=t,this.lineDomNode=n,this.lineNumberDomNode=o,this.foldingIcon=r,this.characterMapping=s,this.scrollWidth=a}},n7e=class{constructor(e,t,n,o){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=n,this.dimension=o,this.domNode=document.createElement("div"),this.domNode.style.width=`${o}px`,this.domNode.style.height=`${o}px`,this.domNode.className=ui.asClassName(e?MR:IR)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}};nt();Yn();mo();Qi();Vi();Xt();Kr();nt();Yn();Ok();Qi();Kr();Pi();var h6=class{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}},n9=class{constructor(e,t,n){this.range=e,this.children=t,this.parent=n}},MP=class{constructor(e,t,n,o){this.uri=e,this.version=t,this.element=n,this.outlineProviderId=o}};Yc();var cie=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},AP=function(i,e){return function(t,n){e(t,n,i)}},NP;(function(i){i.OUTLINE_MODEL="outlineModel",i.FOLDING_PROVIDER_MODEL="foldingProviderModel",i.INDENTATION_MODEL="indentationModel"})(NP||(NP={}));var Y8;(function(i){i[i.VALID=0]="VALID",i[i.INVALID=1]="INVALID",i[i.CANCELED=2]="CANCELED"})(Y8||(Y8={}));var sie=class extends ue{constructor(e,t,n,o){super(),this._editor=e,this._languageConfigurationService=t,this._languageFeaturesService=n,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new ba(300)),this._updateOperation=this._register(new Ye);let r=new o7e(n),s=new s7e(this._editor,n),a=new r7e(this._editor,t);switch(o){case NP.OUTLINE_MODEL:this._modelProviders.push(r),this._modelProviders.push(s),this._modelProviders.push(a);break;case NP.FOLDING_PROVIDER_MODEL:this._modelProviders.push(s),this._modelProviders.push(a);break;case NP.INDENTATION_MODEL:this._modelProviders.push(a);break}}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(e,t,n){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger(async()=>{for(let o of this._modelProviders){let{statusPromise:r,modelPromise:s}=o.computeStickyModel(e,t,n);this._modelPromise=s;let a=await r;if(this._modelPromise!==s)return null;switch(a){case Y8.CANCELED:return this._updateOperation.clear(),null;case Y8.VALID:return o.stickyModel}}return null}).catch(o=>(hi(o),null))}};sie=cie([AP(1,An),AP(2,Rt)],sie);var aie=class{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,Y8.INVALID}computeStickyModel(e,t,n){if(n.isCancellationRequested||!this.isProviderValid(e))return{statusPromise:this._invalid(),modelPromise:null};let o=Ho(r=>this.createModelFromProvider(e,t,r));return{statusPromise:o.then(r=>this.isModelValid(r)?n.isCancellationRequested?Y8.CANCELED:(this._stickyModel=this.createStickyModel(e,t,n,r),Y8.VALID):this._invalid()).then(void 0,r=>(hi(r),Y8.CANCELED)),modelPromise:o}}isModelValid(e){return!0}isProviderValid(e){return!0}},o7e=class extends aie{constructor(e){super(),this._languageFeaturesService=e}createModelFromProvider(e,t,n){return FR.create(this._languageFeaturesService.documentSymbolProvider,e,n)}createStickyModel(e,t,n,o){var r;let{stickyOutlineElement:s,providerID:a}=this._stickyModelFromOutlineModel(o,(r=this._stickyModel)===null||r===void 0?void 0:r.outlineProviderId);return new MP(e.uri,t,s,a)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let n;if(un.first(e.children.values())instanceof zR){let a=un.find(e.children.values(),l=>l.id===t);if(a)n=a.children;else{let l="",c=-1,d;for(let[u,h]of e.children.entries()){let f=this._findSumOfRangesOfGroup(h);f>c&&(d=h,c=f,l=h.id)}t=l,n=d.children}}else n=e.children;let o=[],r=Array.from(n.values()).sort((a,l)=>{let c=new h6(a.symbol.range.startLineNumber,a.symbol.range.endLineNumber),d=new h6(l.symbol.range.startLineNumber,l.symbol.range.endLineNumber);return this._comparator(c,d)});for(let a of r)o.push(this._stickyModelFromOutlineElement(a,a.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new n9(void 0,o,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){let n=[];for(let r of e.children.values())if(r.symbol.selectionRange.startLineNumber!==r.symbol.range.endLineNumber)if(r.symbol.selectionRange.startLineNumber!==t)n.push(this._stickyModelFromOutlineElement(r,r.symbol.selectionRange.startLineNumber));else for(let s of r.children.values())n.push(this._stickyModelFromOutlineElement(s,r.symbol.selectionRange.startLineNumber));n.sort((r,s)=>this._comparator(r.range,s.range));let o=new h6(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new n9(o,n,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(let n of e.children.values())t+=this._findSumOfRangesOfGroup(n);return e instanceof Pk?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};o7e=cie([AP(0,Rt)],o7e);var lie=class extends aie{constructor(e){super(),this._foldingLimitReporter=new AR(e)}createStickyModel(e,t,n,o){let r=this._fromFoldingRegions(o);return new MP(e.uri,t,r,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){let t=e.length,n=[],o=new n9(void 0,[],void 0);for(let r=0;r0}createModelFromProvider(e,t,n){let o=Ap.getFoldingRangeProviders(this._languageFeaturesService,e);return new q7(e,o,()=>this.createModelFromProvider(e,t,n),this._foldingLimitReporter,void 0).compute(n)}};s7e=cie([AP(1,Rt)],s7e);var nqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},M1t=function(i,e){return function(t,n){e(t,n,i)}},a7e=class{constructor(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=n}},die=class extends ue{constructor(e,t,n){super(),this._languageFeaturesService=t,this._languageConfigurationService=n,this._onDidChangeStickyScroll=this._register(new ge),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new Ye),this._updateSoon=this._register(new hn(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(114)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._stickyModelProvider=null,this._sessionStore.clear(),this._options=this._editor.getOption(114),this._options.enabled&&(this._stickyModelProvider=this._sessionStore.add(new sie(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel)),this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this._onDidChangeStickyScroll.fire(),this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this.update())}getVersionId(){var e;return(e=this._model)===null||e===void 0?void 0:e.version}async update(){var e;(e=this._cts)===null||e===void 0||e.dispose(!0),this._cts=new Jn,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(e){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization()){this._model=null;return}let t=this._editor.getModel(),n=t.getVersionId(),o=await this._stickyModelProvider.update(t,n,e);e.isCancellationRequested||(this._model=o)}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,n,o,r){if(t.children.length===0)return;let s=r,a=[];for(let d=0;dd-u)),c=this.updateIndex(B0(a,e.startLineNumber+o,(d,u)=>d-u));for(let d=l;d<=c;d++){let u=t.children[d];if(!u)return;if(u.range){let h=u.range.startLineNumber,f=u.range.endLineNumber;e.startLineNumber<=f+1&&h-1<=e.endLineNumber&&h!==s&&(s=h,n.push(new a7e(h,f-1,o+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,n,o+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,n,o,r)}}getCandidateStickyLinesIntersecting(e){var t,n;if(!(!((t=this._model)===null||t===void 0)&&t.element))return[];let o=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,o,0,-1);let r=(n=this._editor._getViewModel())===null||n===void 0?void 0:n.getHiddenAreas();if(r)for(let s of r)o=o.filter(a=>!(a.startLineNumber>=s.startLineNumber&&a.endLineNumber<=s.endLineNumber+1));return o}};die=nqt([M1t(1,Rt),M1t(2,An)],die);_i();Id();Dr();Xi();Co();Kt();Mi();mo();Kr();a1();Qt();Uh();var oqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},nL=function(i,e){return function(t,n){e(t,n,i)}},l7e,Pp=l7e=class extends ue{constructor(e,t,n,o,r,s,a){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=n,this._instaService=o,this._contextKeyService=a,this._sessionStore=new Ye,this._foldingModel=null,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._showEndForLine=null,this._stickyScrollWidget=new rie(this._editor),this._stickyLineCandidateProvider=new die(this._editor,n,r),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new IP([],[],0),this._readConfiguration();let l=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(d=>{(d.hasChanged(114)||d.hasChanged(72)||d.hasChanged(66)||d.hasChanged(109))&&this._readConfiguration()})),this._register(Xe(l,Lt.CONTEXT_MENU,async d=>{this._onContextMenu(pi(l),d)})),this._stickyScrollFocusedContextKey=re.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=re.stickyScrollVisible.bindTo(this._contextKeyService);let c=this._register(Kl(l));this._register(c.onDidBlur(d=>{this._positionRevealed===!1&&l.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(c.onDidFocus(d=>{this.focus()})),this._registerMouseListeners(),this._register(Xe(l,Lt.MOUSE_DOWN,d=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(l7e.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),(e=this._focusDisposableStore)===null||e===void 0||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new Ye,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){let e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,()=>this._editor.revealPosition(e))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(O.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){let e=this._register(new Ye),t=this._register(new X2(this._editor,{extractLineNumberFromMouseEvent:r=>{let s=this._stickyScrollWidget.getEditorPositionFromNode(r.target.element);return s?s.lineNumber:0}})),n=r=>{if(!this._editor.hasModel()||r.target.type!==12||r.target.detail!==this._stickyScrollWidget.getId())return null;let s=r.target.element;if(!s||s.innerText!==s.innerHTML)return null;let a=this._stickyScrollWidget.getEditorPositionFromNode(s);return a?{range:new O(a.lineNumber,a.column,a.lineNumber,a.column+s.innerText.length),textElement:s}:null},o=this._stickyScrollWidget.getDomNode();this._register(go(o,Lt.CLICK,r=>{if(r.ctrlKey||r.altKey||r.metaKey||!r.leftButton)return;if(r.shiftKey){let c=this._stickyScrollWidget.getLineIndexFromChildDomNode(r.target);if(c===null)return;let d=new ke(this._endLineNumbers[c],1);this._revealLineInCenterIfOutsideViewport(d);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(r.target)){let c=this._stickyScrollWidget.getLineNumberFromChildDomNode(r.target);this._toggleFoldingRegionForLine(c);return}if(!this._stickyScrollWidget.isInStickyLine(r.target))return;let l=this._stickyScrollWidget.getEditorPositionFromNode(r.target);if(!l){let c=this._stickyScrollWidget.getLineNumberFromChildDomNode(r.target);if(c===null)return;l=new ke(c,1)}this._revealPosition(l)})),this._register(go(o,Lt.MOUSE_MOVE,r=>{if(r.shiftKey){let s=this._stickyScrollWidget.getLineIndexFromChildDomNode(r.target);if(s===null||this._showEndForLine!==null&&this._showEndForLine===s)return;this._showEndForLine=s,this._renderStickyScroll();return}this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(Xe(o,Lt.MOUSE_LEAVE,r=>{this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(t.onMouseMoveOrRelevantKeyDown(([r,s])=>{let a=n(r);if(!a||!r.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}let{range:l,textElement:c}=a;if(!l.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=l,e.clear();else if(c.style.textDecoration==="underline")return;let d=new Jn;e.add(Yt(()=>d.dispose(!0)));let u;R7(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new ke(l.startLineNumber,l.startColumn+1),d.token).then(h=>{if(!d.token.isCancellationRequested)if(h.length!==0){this._candidateDefinitionsLength=h.length;let f=c;u!==f?(e.clear(),u=f,u.style.textDecoration="underline",e.add(Yt(()=>{u.style.textDecoration="none"}))):u||(u=f,u.style.textDecoration="underline",e.add(Yt(()=>{u.style.textDecoration="none"})))}else e.clear()})})),this._register(t.onCancel(()=>{e.clear()})),this._register(t.onExecute(async r=>{if(r.target.type!==12||r.target.detail!==this._stickyScrollWidget.getId())return;let s=this._stickyScrollWidget.getEditorPositionFromNode(r.target.element);s&&(!this._editor.hasModel()||!this._stickyRangeProjectedOnEditor||(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:s.lineNumber,column:1})),this._instaService.invokeFunction(Pte,r,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor})))}))}_onContextMenu(e,t){let n=new Oa(e,t);this._contextMenuService.showContextMenu({menuId:ne.StickyScrollContext,getAnchor:()=>n})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||e===null)return;let t=this._stickyScrollWidget.getRenderedStickyLine(e),n=t?.foldingIcon;if(!n)return;tte(this._foldingModel,Number.MAX_VALUE,[e]),n.isCollapsed=!n.isCollapsed;let o=(n.isCollapsed?this._editor.getTopForLineNumber(n.foldingEndLine):this._editor.getTopForLineNumber(n.foldingStartLine))-this._editor.getOption(66)*t.index+1;this._editor.setScrollTop(o),this._renderStickyScroll(e)}_readConfiguration(){let e=this._editor.getOption(114);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&(this._showEndForLine=null,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(n=>this._onTokensChange(n))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=null,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(67).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=null,this._renderStickyScroll(0)}))}_needsUpdate(e){let t=this._stickyScrollWidget.getCurrentLines();for(let n of t)for(let o of e.ranges)if(n>=o.fromLineNumber&&n<=o.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(0)}_onDidResize(){let t=this._editor.getLayoutInfo().height/this._editor.getOption(66);this._maxStickyLines=Math.round(t*.25)}async _renderStickyScroll(e){var t,n;let o=this._editor.getModel();if(!o||o.isTooLargeForTokenization()){this._foldingModel=null,this._stickyScrollWidget.setState(void 0,null);return}let r=this._stickyLineCandidateProvider.getVersionId();if(r===void 0||r===o.getVersionId())if(this._foldingModel=(n=await((t=Ap.get(this._editor))===null||t===void 0?void 0:t.getFoldingModel()))!==null&&n!==void 0?n:null,this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.startLineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e);else if(this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{let s=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(s)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}}findScrollWidgetState(){let e=this._editor.getOption(66),t=Math.min(this._maxStickyLines,this._editor.getOption(114).maxLineCount),n=this._editor.getScrollTop(),o=0,r=[],s=[],a=this._editor.getVisibleRanges();if(a.length!==0){let l=new h6(a[0].startLineNumber,a[a.length-1].endLineNumber),c=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(l);for(let d of c){let u=d.startLineNumber,h=d.endLineNumber,f=d.nestingDepth;if(h-u>0){let p=(f-1)*e,m=f*e,y=this._editor.getBottomForLineNumber(u)-n,_=this._editor.getTopForLineNumber(h)-n,v=this._editor.getBottomForLineNumber(h)-n;if(p>_&&p<=v){r.push(u),s.push(h+1),o=v-m;break}else m>y&&m<=v&&(r.push(u),s.push(h+1));if(r.length===t)break}}}return this._endLineNumbers=s,new IP(r,s,o,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};Pp.ID="store.contrib.stickyScrollController";Pp=l7e=oqt([nL(1,ca),nL(2,Rt),nL(3,qt),nL(4,An),nL(5,xa),nL(6,ri)],Pp);var uie=class extends Ja{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:g("toggleEditorStickyScroll","Toggle Editor Sticky Scroll"),mnemonicTitle:g({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Editor Sticky Scroll"),original:"Toggle Editor Sticky Scroll"},category:E1t.View,toggled:{condition:mt.equals("config.editor.stickyScroll.enabled",!0),title:g("stickyScroll","Sticky Scroll"),mnemonicTitle:g({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:ne.CommandPalette},{id:ne.MenubarAppearanceMenu,group:"4_editor",order:3},{id:ne.StickyScrollContext}]})}async run(e){let t=e.get(Ni),n=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",n)}},vie=100,hie=class extends kd{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:g("focusStickyScroll","Focus Sticky Scroll"),mnemonicTitle:g({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll"),original:"Focus Sticky Scroll"},precondition:mt.and(mt.has("config.editor.stickyScroll.enabled"),re.stickyScrollVisible),menu:[{id:ne.CommandPalette}]})}runEditorCommand(e,t){var n;(n=Pp.get(t))===null||n===void 0||n.focus()}},fie=class extends kd{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:g("selectNextStickyScrollLine.title","Select next sticky scroll line"),original:"Select next sticky scroll line"},precondition:re.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:vie,primary:18}})}runEditorCommand(e,t){var n;(n=Pp.get(t))===null||n===void 0||n.focusNext()}},pie=class extends kd{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:g("selectPreviousStickyScrollLine.title","Select previous sticky scroll line"),original:"Select previous sticky scroll line"},precondition:re.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:vie,primary:16}})}runEditorCommand(e,t){var n;(n=Pp.get(t))===null||n===void 0||n.focusPrevious()}},mie=class extends kd{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:g("goToFocusedStickyScrollLine.title","Go to focused sticky scroll line"),original:"Go to focused sticky scroll line"},precondition:re.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:vie,primary:3}})}runEditorCommand(e,t){var n;(n=Pp.get(t))===null||n===void 0||n.goToFocused()}},gie=class extends kd{constructor(){super({id:"editor.action.selectEditor",title:{value:g("selectEditor.title","Select Editor"),original:"Select Editor"},precondition:re.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:vie,primary:9}})}runEditorCommand(e,t){var n;(n=Pp.get(t))===null||n===void 0||n.selectEditor()}};Dr();Ii(Pp.ID,Pp,1);Fo(uie);Fo(hie);Fo(pie);Fo(fie);Fo(mie);Fo(gie);mo();l1();Yc();nt();fs();Kt();d7();Yn();F4();var N1t=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},RP=function(i,e){return function(t,n){e(t,n,i)}},c7e=class{constructor(e,t,n,o,r,s){this.range=e,this.insertText=t,this.filterText=n,this.additionalTextEdits=o,this.command=r,this.completion=s}},d7e=class extends eW{constructor(e,t,n,o,r,s){super(r.disposable),this.model=e,this.line=t,this.word=n,this.completionModel=o,this._suggestMemoryService=s}canBeReused(e,t,n){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===n.startColumn&&this.word.endColumn=0&&l.resolve(Fi.None)}return t}};d7e=N1t([RP(5,Wk)],d7e);var u7e=class extends ue{constructor(e,t,n,o){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=n,this._editorService=o,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,n,o){var r;if(n.selectedSuggestionInfo)return;let s;for(let p of this._editorService.listCodeEditors())if(p.getModel()===e){s=p;break}if(!s)return;let a=s.getOption(88);if(r0.isAllOff(a))return;e.tokenization.tokenizeIfCheap(t.lineNumber);let l=e.tokenization.getLineTokens(t.lineNumber),c=l.getStandardTokenType(l.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(r0.valueFor(a,c)!=="inline")return;let d=e.getWordAtPosition(t),u;if(d?.word||(u=this._getTriggerCharacterInfo(e,t)),!d?.word&&!u||(d||(d=e.getWordUntilPosition(t)),d.endColumn!==t.column))return;let h,f=e.getValueInRange(new O(t.lineNumber,1,t.lineNumber,t.column));if(!u&&(!((r=this._lastResult)===null||r===void 0)&&r.canBeReused(e,t.lineNumber,d))){let p=new eP(f,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=p,this._lastResult.acquire(),h=this._lastResult}else{let p=await VR(this._languageFeatureService.completionProvider,e,t,new a6(void 0,jk.createSuggestFilter(s).itemKind,u?.providers),u&&{triggerKind:1,triggerCharacter:u.ch},o),m;p.needsClipboard&&(m=await this._clipboardService.readText());let y=new $k(p.items,t.column,new eP(f,0),F8.None,s.getOption(117),s.getOption(111),{boostFullMatch:!1,firstMatchCanBeWeak:!1},m);h=new d7e(e,t.lineNumber,d,y,p,this._suggestMemoryService)}return this._lastResult=h,h}handleItemDidShow(e,t){t.completion.resolve(Fi.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var n;let o=e.getValueInRange(O.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),r=new Set;for(let s of this._languageFeatureService.completionProvider.all(e))!((n=s.triggerCharacters)===null||n===void 0)&&n.includes(o)&&r.add(s);if(r.size!==0)return{providers:r,ch:o}}};u7e=N1t([RP(0,Rt),RP(1,Pd),RP(2,Wk),RP(3,tn)],u7e);B2(u7e);Yu();an();Wt();var h7e=class extends Ot{constructor(){super({id:"editor.action.forceRetokenize",label:g("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getModel();n.tokenization.resetTokenization();let o=new Er;n.tokenization.forceTokenization(n.getLineCount()),o.stop(),console.log(`tokenization took ${o.elapsed()}`)}};yt(h7e);Xl();cj();Wt();Dr();var _ie=class i extends Ja{constructor(){super({id:i.ID,title:{value:g({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(){let t=!c4.getTabFocusMode();c4.setTabFocusMode(t),t?Hs(g("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):Hs(g("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}};_ie.ID="editor.action.toggleTabFocusMode";Fo(_ie);Qi();Go();Md();nt();Mn();Ri();an();Ks();ea();mfe();Zv();Ha();Tme();Qt();u1();Ra();nt();L4();_i();Qt();vp();Gl();dh();Xt();nt();sd();var rqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},sqt=function(i,e){return function(t,n){e(t,n,i)}},bie=class extends ue{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,n={},o){var r;super(),this._link=t,this._enabled=!0,this.el=ut(e,pt("a.monaco-link",{tabIndex:(r=t.tabIndex)!==null&&r!==void 0?r:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");let s=this._register(new _n(this.el,"click")),a=this._register(new _n(this.el,"keypress")),l=Et.chain(a.event,u=>u.map(h=>new qn(h)).filter(h=>h.keyCode===3)),c=this._register(new _n(this.el,vo.Tap)).event;this._register(ar.addTarget(this.el));let d=Et.any(s.event,l,c);this._register(d(u=>{this.enabled&&(nn.stop(u,!0),n?.opener?n.opener(this._link.href):o.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};bie=rqt([sqt(3,Xr)],bie);m1();or();var A1t=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},R1t=function(i,e){return function(t,n){e(t,n,i)}},aqt=26,yie=class extends ue{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(f7e))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{var t;this.hide(),(t=e.onClose)===null||t===void 0||t.call(e)}}),this._editor.setBanner(this.banner.element,aqt)}};yie=A1t([R1t(1,qt)],yie);var f7e=class extends ue{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(Ad,{}),this.element=pt("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){let t=pt("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){is(this.element)}show(e){is(this.element);let t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);let n=ut(this.element,pt("div.icon-container"));n.setAttribute("aria-hidden","true"),e.icon&&n.appendChild(pt(`div${ui.asCSSSelector(e.icon)}`));let o=ut(this.element,pt("div.message-container"));if(o.setAttribute("aria-hidden","true"),o.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=ut(this.element,pt("div.message-actions-container")),e.actions)for(let s of e.actions)this._register(this.instantiationService.createInstance(bie,this.messageActionsContainer,{...s,tabIndex:-1},{}));let r=ut(this.element,pt("div.action-container"));this.actionBar=this._register(new Bs(r)),this.actionBar.push(this._register(new zs("banner.close","Close Banner",ui.asClassName(_X),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};f7e=A1t([R1t(0,qt)],f7e);Wt();er();_i();sd();cf();m1();n2e();var C7e=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},oL=function(i,e){return function(t,n){e(t,n,i)}},lqt=Yo("extensions-warning-message",kt.warning,g("warningIcon","Icon shown with a warning message in the extensions editor.")),rL=class extends ue{constructor(e,t,n,o){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=n,this._highlighter=null,this._bannerClosed=!1,this._updateState=r=>{if(r&&r.hasMore){if(this._bannerClosed)return;let s=Math.max(r.ambiguousCharacterCount,r.nonBasicAsciiCharacterCount,r.invisibleCharacterCount),a;if(r.nonBasicAsciiCharacterCount>=s)a={message:g("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new lL};else if(r.ambiguousCharacterCount>=s)a={message:g("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new Z8};else if(r.invisibleCharacterCount>=s)a={message:g("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new aL};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:lqt,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(o.createInstance(yie,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(124),this._register(n.onDidChangeTrust(r=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(r=>{r.hasChanged(124)&&(this._options=e.getOption(124),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;let e=cqt(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(n=>n===!1))return;let t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(n=>n.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(n=>n==="_os"?new Intl.NumberFormat().resolvedOptions().locale:n==="_vscode"?Eje:n)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new m7e(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new g7e(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};rL.ID="editor.contrib.unicodeHighlighter";rL=C7e([oL(1,Oc),oL(2,qY),oL(3,qt)],rL);function cqt(i,e){return{nonBasicASCII:e.nonBasicASCII===ju?!i:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===ju?!i:e.includeComments,includeStrings:e.includeStrings===ju?!i:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}var m7e=class extends ue{constructor(e,t,n,o){super(),this._editor=e,this._options=t,this._updateState=n,this._editorWorkerService=o,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new hn(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);let n=[];if(!t.hasMore)for(let o of t.ranges)n.push({range:o,options:sL.instance.getDecorationFromOptions(this._options)});this._decorations.set(n)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel();if(!TK(t,e))return null;let n=t.getValueInRange(e.range);return{reason:O1t(n,this._options),inComment:IK(t,e),inString:MK(t,e)}}};m7e=C7e([oL(3,Oc)],m7e);var g7e=class extends ue{constructor(e,t,n){super(),this._editor=e,this._options=t,this._updateState=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new hn(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._editor.getVisibleRanges(),t=[],n={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(let o of e){let r=P5.computeUnicodeHighlights(this._model,this._options,o);for(let s of r.ranges)n.ranges.push(s);n.ambiguousCharacterCount+=n.ambiguousCharacterCount,n.invisibleCharacterCount+=n.invisibleCharacterCount,n.nonBasicAsciiCharacterCount+=n.nonBasicAsciiCharacterCount,n.hasMore=n.hasMore||r.hasMore}if(!n.hasMore)for(let o of n.ranges)t.push({range:o,options:sL.instance.getDecorationFromOptions(this._options)});this._updateState(n),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel(),n=t.getValueInRange(e.range);return TK(t,e)?{reason:O1t(n,this._options),inComment:IK(t,e),inString:MK(t,e)}:null}},P1t=g("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options"),v7e=class{constructor(e,t,n){this._editor=e,this._languageService=t,this._openerService=n,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let n=this._editor.getModel(),o=this._editor.getContribution(rL.ID);if(!o)return[];let r=[],s=new Set,a=300;for(let l of t){let c=o.getDecorationInfo(l);if(!c)continue;let u=n.getValueInRange(l.range).codePointAt(0),h=p7e(u),f;switch(c.reason.kind){case 0:{Ag(c.reason.confusableWith)?f=g("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,p7e(c.reason.confusableWith.codePointAt(0))):f=g("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,p7e(c.reason.confusableWith.codePointAt(0)));break}case 1:f=g("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:f=g("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}if(s.has(f))continue;s.add(f);let p={codePoint:u,reason:c.reason,inComment:c.inComment,inString:c.inString},m=g("unicodeHighlight.adjustSettings","Adjust settings"),y=`command:${PP.ID}?${encodeURIComponent(JSON.stringify(p))}`,_=new cs("",!0).appendMarkdown(f).appendText(" ").appendLink(y,m,P1t);r.push(new wh(this,l.range,[_],!1,a++))}return r}renderHoverParts(e,t){return b8e(e,t,this._editor,this._languageService,this._openerService)}};v7e=C7e([oL(1,Kn),oL(2,Xr)],v7e);function _7e(i){return`U+${i.toString(16).padStart(4,"0")}`}function p7e(i){let e=`\`${_7e(i)}\``;return Mg.isInvisibleCharacter(i)||(e+=` "${`${dqt(i)}`}"`),e}function dqt(i){return i===96?"`` ` ``":"`"+String.fromCodePoint(i)+"`"}function O1t(i,e){return P5.computeUnicodeHighlightReason(i,e)}var sL=class{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){let n=`${e}${t}`,o=this.map.get(n);return o||(o=zi.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(n,o)),o}};sL.instance=new sL;var b7e=class extends Ot{constructor(){super({id:Z8.ID,label:g("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=g("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}async run(e,t,n){let o=e?.get(Ni);o&&this.runAction(o)}async runAction(e){await e.updateValue(Sd.includeComments,!1,2)}},y7e=class extends Ot{constructor(){super({id:Z8.ID,label:g("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=g("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}async run(e,t,n){let o=e?.get(Ni);o&&this.runAction(o)}async runAction(e){await e.updateValue(Sd.includeStrings,!1,2)}},Z8=class i extends Ot{constructor(){super({id:i.ID,label:g("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=g("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}async run(e,t,n){let o=e?.get(Ni);o&&this.runAction(o)}async runAction(e){await e.updateValue(Sd.ambiguousCharacters,!1,2)}};Z8.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";var aL=class i extends Ot{constructor(){super({id:i.ID,label:g("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=g("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}async run(e,t,n){let o=e?.get(Ni);o&&this.runAction(o)}async runAction(e){await e.updateValue(Sd.invisibleCharacters,!1,2)}};aL.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";var lL=class i extends Ot{constructor(){super({id:i.ID,label:g("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=g("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}async run(e,t,n){let o=e?.get(Ni);o&&this.runAction(o)}async runAction(e){await e.updateValue(Sd.nonBasicASCII,!1,2)}};lL.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";var PP=class i extends Ot{constructor(){super({id:i.ID,label:g("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}async run(e,t,n){let{codePoint:o,reason:r,inString:s,inComment:a}=n,l=String.fromCodePoint(o),c=e.get(ol),d=e.get(Ni);function u(p){return Mg.isInvisibleCharacter(p)?g("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",_7e(p)):g("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${_7e(p)} "${l}"`)}let h=[];if(r.kind===0)for(let p of r.notAmbiguousInLocales)h.push({label:g("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',p),run:async()=>{hqt(d,[p])}});if(h.push({label:u(o),run:()=>uqt(d,[o])}),a){let p=new b7e;h.push({label:p.label,run:async()=>p.runAction(d)})}else if(s){let p=new y7e;h.push({label:p.label,run:async()=>p.runAction(d)})}if(r.kind===0){let p=new Z8;h.push({label:p.label,run:async()=>p.runAction(d)})}else if(r.kind===1){let p=new aL;h.push({label:p.label,run:async()=>p.runAction(d)})}else if(r.kind===2){let p=new lL;h.push({label:p.label,run:async()=>p.runAction(d)})}else fqt(r);let f=await c.pick(h,{title:P1t});f&&await f.run()}};PP.ID="editor.action.unicodeHighlight.showExcludeOptions";async function uqt(i,e){let t=i.getValue(Sd.allowedCharacters),n;typeof t=="object"&&t?n=t:n={};for(let o of e)n[String.fromCodePoint(o)]=!0;await i.updateValue(Sd.allowedCharacters,n,2)}async function hqt(i,e){var t;let n=(t=i.inspect(Sd.allowedLocales).user)===null||t===void 0?void 0:t.value,o;typeof n=="object"&&n?o=Object.assign({},n):o={};for(let r of e)o[r]=!0;await i.updateValue(Sd.allowedLocales,o,2)}function fqt(i){throw new Error(`Unexpected value: ${i}`)}yt(Z8);yt(aL);yt(lL);yt(PP);Ii(rL.ID,rL,1);y1.register(v7e);nt();ec();an();fs();Wt();Nx();var pqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},z1t=function(i,e){return function(t,n){e(t,n,i)}},F1t="ignoreUnusualLineTerminators";function mqt(i,e,t){i.setModelProperty(e.uri,F1t,t)}function gqt(i,e){return i.getModelProperty(e.uri,F1t)}var OP=class extends ue{constructor(e,t,n){super(),this._editor=e,this._dialogService=t,this._codeEditorService=n,this._isPresentingDialog=!1,this._config=this._editor.getOption(125),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(125)&&(this._config=this._editor.getOption(125),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(o=>{o.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;let e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||gqt(this._codeEditorService,e)===!0||this._editor.getOption(90))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let n;try{this._isPresentingDialog=!0,n=await this._dialogService.confirm({title:g("unusualLineTerminators.title","Unusual Line Terminators"),message:g("unusualLineTerminators.message","Detected unusual line terminators"),detail:g("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",Il(e.uri)),primaryButton:g({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:g("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!n.confirmed){mqt(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}};OP.ID="editor.contrib.unusualLineTerminatorsDetector";OP=pqt([z1t(1,x2),z1t(2,tn)],OP);Ii(OP.ID,OP,1);Wt();Vi();Xl();Qi();mo();Pi();nt();US();an();fs();Kt();Co();Pr();Ca();Yn();Xi();Nc();od();fge();var H1t=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Cie=function(i,e){return function(t,n){e(t,n,i)}},Vs,w7e,Sie=new Bt("hasWordHighlights",!1);function B1t(i,e,t,n){let o=i.ordered(e);return MT(o.map(r=>()=>Promise.resolve(r.provideDocumentHighlights(e,t,n)).then(void 0,po)),Nr).then(r=>{if(r){let s=new rs;return s.set(e.uri,r),s}return new rs})}function vqt(i,e,t,n,o,r){let s=i.ordered(e);return MT(s.map(a=>()=>{let l=r.filter(c=>z$(c)).filter(c=>RM(a.selector,c.uri,c.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(a.provideMultiDocumentHighlights(e,t,l,o)).then(void 0,po)}),a=>a instanceof rs&&a.size>0)}var zP=class{constructor(e,t,n){this._model=e,this._selection=t,this._wordSeparators=n,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Ho(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){let n=e.getWordAtPosition(t.getPosition());return n?new O(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):null}isValid(e,t,n){let o=t.startLineNumber,r=t.startColumn,s=t.endColumn,a=this._getCurrentWordRange(e,t),l=!!(this._wordRange&&this._wordRange.equalsRange(a));for(let c=0,d=n.length;!l&&c=s&&(l=!0)}return l}cancel(){this.result.cancel()}},x7e=class extends zP{constructor(e,t,n,o){super(e,t,n),this._providers=o}_compute(e,t,n,o){return B1t(this._providers,e,t.getPosition(),o).then(r=>r||new rs)}},S7e=class extends zP{constructor(e,t,n,o,r){super(e,t,n),this._providers=o,this._otherModels=r}_compute(e,t,n,o){return vqt(this._providers,e,t.getPosition(),n,o,this._otherModels).then(r=>r||new rs)}},wie=class extends zP{constructor(e,t,n,o,r){super(e,t,o),this._otherModels=r,this._selectionIsEmpty=t.isEmpty(),this._word=n}_compute(e,t,n,o){return eh(250,o).then(()=>{let r=new rs,s;if(this._word?s=this._word:s=e.getWordAtPosition(t.getPosition()),!s)return new rs;let a=[e,...this._otherModels];for(let l of a){if(l.isDisposed())continue;let d=l.findMatches(s.word,!0,!1,!0,n,!1).map(u=>({range:u.range,kind:d5.Text}));d&&r.set(l.uri,d)}return r})}isValid(e,t,n){let o=t.isEmpty();return this._selectionIsEmpty!==o?!1:super.isValid(e,t,n)}};function _qt(i,e,t,n,o){return i.has(e)?new x7e(e,t,o,i):new wie(e,t,n,o,[])}function bqt(i,e,t,n,o,r){return i.has(e)?new S7e(e,t,o,i,r):new wie(e,t,n,o,r)}nh("_executeDocumentHighlights",async(i,e,t)=>{let n=i.get(Rt),o=await B1t(n.documentHighlightProvider,e,t,Fi.None);return o?.get(e.uri)});var FP=Vs=class{constructor(e,t,n,o,r){this.toUnhook=new Ye,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new rs,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this.multiDocumentProviders=n,this.codeEditorService=r,this._hasWordHighlights=Sie.bindTo(o),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(80),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(s=>{this._ignorePositionChangeEvent||this.occurrencesHighlight!=="off"&&this._onPositionChanged(s)})),this.toUnhook.add(e.onDidChangeModelContent(s=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(s=>{!s.newModelUrl&&s.oldModelUrl?this._stopSingular():Vs.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(s=>{let a=this.editor.getOption(80);this.occurrencesHighlight!==a&&(this.occurrencesHighlight=a,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,Vs.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight!=="off"&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(O.compareRangesUsingStarts)}moveNext(){let e=this._getSortedHighlights(),n=(e.findIndex(r=>r.containsPosition(this.editor.getPosition()))+1)%e.length,o=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(o.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(o);let r=this._getWord();if(r){let s=this.editor.getModel().getLineContent(o.startLineNumber);Hs(`${s}, ${n+1} of ${e.length} for '${r.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),n=(e.findIndex(r=>r.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,o=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(o.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(o);let r=this._getWord();if(r){let s=this.editor.getModel().getLineContent(o.startLineNumber);Hs(`${s}, ${n+1} of ${e.length} for '${r.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;let e=Vs.storedDecorations.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),Vs.storedDecorations.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(){let e=this.codeEditorService.listCodeEditors();for(let t of e){if(!t.hasModel())continue;let n=Vs.storedDecorations.get(t.getModel().uri);if(!n)continue;t.removeDecorations(n),Vs.storedDecorations.delete(t.getModel().uri);let o=f6.get(t);o?.wordHighlighter&&o.wordHighlighter.decorations.length>0&&(o.wordHighlighter.decorations.clear(),o.wordHighlighter._hasWordHighlights.set(!1))}}_stopSingular(){var e,t,n,o;this._removeSingleDecorations(),this.editor.hasWidgetFocus()&&(((e=this.editor.getModel())===null||e===void 0?void 0:e.uri.scheme)!==$i.vscodeNotebookCell&&((n=(t=Vs.query)===null||t===void 0?void 0:t.modelInfo)===null||n===void 0?void 0:n.model.uri.scheme)!==$i.vscodeNotebookCell?(Vs.query=null,this._run()):!((o=Vs.query)===null||o===void 0)&&o.modelInfo&&(Vs.query.modelInfo=null)),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(){this._removeAllDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){var t;if(this.occurrencesHighlight==="off"){this._stopAll();return}if(e.reason!==3&&((t=this.editor.getModel())===null||t===void 0?void 0:t.uri.scheme)!==$i.vscodeNotebookCell){this._stopAll();return}this._run()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,n=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:n})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===$i.vscodeNotebookCell){let r=[],s=this.codeEditorService.listCodeEditors();for(let a of s){let l=a.getModel();l&&l!==e&&l.uri.scheme===$i.vscodeNotebookCell&&r.push(l)}return r}let n=[],o=this.codeEditorService.listCodeEditors();for(let r of o){if(!sA(r))continue;let s=r.getModel();s&&e===s.modified&&n.push(s.modified)}if(n.length)return n;if(this.occurrencesHighlight==="singleFile")return[];for(let r of o){let s=r.getModel();s&&s!==e&&n.push(s)}return n}_run(){var e,t;let n;if(this.editor.hasWidgetFocus()){let o=this.editor.getSelection();if(!o||o.startLineNumber!==o.endLineNumber){this._stopAll();return}let r=o.startColumn,s=o.endColumn,a=this._getWord();if(!a||a.startColumn>r||a.endColumn{o===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations())},hi)}}computeWithModel(e,t,n,o){return o.length?bqt(this.multiDocumentProviders,e,t,n,this.editor.getOption(129),o):_qt(this.providers,e,t,n,this.editor.getOption(129))}_beginRenderDecorations(){let e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){var e,t,n;this.renderDecorationsTimer=-1;let o=this.codeEditorService.listCodeEditors();for(let r of o){let s=f6.get(r);if(!s)continue;let a=[],l=(e=r.getModel())===null||e===void 0?void 0:e.uri;if(l&&this.workerRequestValue.has(l)){let c=Vs.storedDecorations.get(l),d=this.workerRequestValue.get(l);if(d)for(let h of d)a.push({range:h.range,options:_1t(h.kind)});let u=[];r.changeDecorations(h=>{u=h.deltaDecorations(c??[],a)}),Vs.storedDecorations=Vs.storedDecorations.set(l,u),a.length>0&&((t=s.wordHighlighter)===null||t===void 0||t.decorations.set(a),(n=s.wordHighlighter)===null||n===void 0||n._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}};FP.storedDecorations=new rs;FP.query=null;FP=Vs=H1t([Cie(4,tn)],FP);var f6=w7e=class extends ue{static get(e){return e.getContribution(w7e.ID)}constructor(e,t,n,o){super(),this._wordHighlighter=null;let r=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new FP(e,n.documentHighlightProvider,n.multiDocumentHighlightProvider,t,o))};this._register(e.onDidChangeModel(s=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),r()})),r()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){var e;(e=this._wordHighlighter)===null||e===void 0||e.moveNext()}moveBack(){var e;(e=this._wordHighlighter)===null||e===void 0||e.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};f6.ID="editor.contrib.wordHighlighter";f6=w7e=H1t([Cie(1,ri),Cie(2,Rt),Cie(3,tn)],f6);var xie=class extends Ot{constructor(e,t){super(t),this._isNext=e}run(e,t){let n=f6.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}},k7e=class extends xie{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:g("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:Sie,kbOpts:{kbExpr:re.editorTextFocus,primary:65,weight:100}})}},L7e=class extends xie{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:g("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:Sie,kbOpts:{kbExpr:re.editorTextFocus,primary:1089,weight:100}})}},E7e=class extends Ot{constructor(){super({id:"editor.action.wordHighlight.trigger",label:g("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:Sie.toNegated(),kbOpts:{kbExpr:re.editorTextFocus,primary:0,weight:100}})}run(e,t,n){let o=f6.get(t);o&&o.restoreViewState(!0)}};Ii(f6.ID,f6,0);yt(k7e);yt(L7e);yt(E7e);an();ub();Ks();s1();RI();nw();Mi();Kt();zo();Co();Kr();Wt();Yh();Xi();BZ();var o9=class extends Jo{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;let o=id(t.getOption(129)),r=t.getModel(),a=t.getSelections().map(l=>{let c=new ke(l.positionLineNumber,l.positionColumn),d=this._move(o,r,c,this._wordNavigationType);return this._moveTo(l,d,this._inSelectionMode)});if(r.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>Vn.fromModelSelection(l))),a.length===1){let l=new ke(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,n){return n?new jt(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new jt(t.lineNumber,t.column,t.lineNumber,t.column)}},c0=class extends o9{_move(e,t,n,o){return la.moveWordLeft(e,t,n,o)}},d0=class extends o9{_move(e,t,n,o){return la.moveWordRight(e,t,n,o)}},D7e=class extends c0{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}},T7e=class extends c0{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}},I7e=class extends c0{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:mt.and(re.textInputFocus,(e=mt.and(G5,SN))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}},M7e=class extends c0{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}},N7e=class extends c0{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}},A7e=class extends c0{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:mt.and(re.textInputFocus,(e=mt.and(G5,SN))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}},R7e=class extends c0{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,n,o){return super._move(id(nu.wordSeparators.defaultValue),t,n,o)}},P7e=class extends c0{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,n,o){return super._move(id(nu.wordSeparators.defaultValue),t,n,o)}},O7e=class extends d0{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}},z7e=class extends d0{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:mt.and(re.textInputFocus,(e=mt.and(G5,SN))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}},F7e=class extends d0{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}},H7e=class extends d0{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}},B7e=class extends d0{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:mt.and(re.textInputFocus,(e=mt.and(G5,SN))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}},V7e=class extends d0{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}},W7e=class extends d0{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,n,o){return super._move(id(nu.wordSeparators.defaultValue),t,n,o)}},U7e=class extends d0{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,n,o){return super._move(id(nu.wordSeparators.defaultValue),t,n,o)}},r9=class extends Jo{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){let o=e.get(An);if(!t.hasModel())return;let r=id(t.getOption(129)),s=t.getModel(),a=t.getSelections(),l=t.getOption(6),c=t.getOption(11),d=o.getLanguageConfiguration(s.getLanguageId()).getAutoClosingPairs(),u=t._getViewModel(),h=a.map(f=>{let p=this._delete({wordSeparators:r,model:s,selection:f,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:d,autoClosedCharacters:u.getCursorAutoClosedCharacters()},this._wordNavigationType);return new Ts(p,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}},HP=class extends r9{_delete(e,t){let n=la.deleteWordLeft(e,t);return n||new O(1,1,1,1)}},BP=class extends r9{_delete(e,t){let n=la.deleteWordRight(e,t);if(n)return n;let o=e.model.getLineCount(),r=e.model.getLineMaxColumn(o);return new O(o,r,o,r)}},$7e=class extends HP{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:re.writable})}},j7e=class extends HP{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:re.writable})}},q7e=class extends HP{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:re.writable,kbOpts:{kbExpr:re.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}},G7e=class extends BP{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:re.writable})}},K7e=class extends BP{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:re.writable})}},Y7e=class extends BP{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:re.writable,kbOpts:{kbExpr:re.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}},Z7e=class extends Ot{constructor(){super({id:"deleteInsideWord",precondition:re.writable,label:g("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,n){if(!t.hasModel())return;let o=id(t.getOption(129)),r=t.getModel(),a=t.getSelections().map(l=>{let c=la.deleteInsideWord(o,r,l);return new Ts(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}};zt(new D7e);zt(new T7e);zt(new I7e);zt(new M7e);zt(new N7e);zt(new A7e);zt(new O7e);zt(new z7e);zt(new F7e);zt(new H7e);zt(new B7e);zt(new V7e);zt(new R7e);zt(new P7e);zt(new W7e);zt(new U7e);zt(new $7e);zt(new j7e);zt(new q7e);zt(new G7e);zt(new K7e);zt(new Y7e);yt(Z7e);an();RI();Kt();Co();$o();var X7e=class extends r9{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:re.writable,kbOpts:{kbExpr:re.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let n=hb.deleteWordPartLeft(e);return n||new O(1,1,1,1)}},Q7e=class extends r9{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:re.writable,kbOpts:{kbExpr:re.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let n=hb.deleteWordPartRight(e);if(n)return n;let o=e.model.getLineCount(),r=e.model.getLineMaxColumn(o);return new O(o,r,o,r)}},kie=class extends o9{_move(e,t,n,o){return hb.moveWordPartLeft(e,t,n)}},J7e=class extends kie{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:re.textInputFocus,primary:0,mac:{primary:783},weight:100}})}};Zi.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");var e9e=class extends kie{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:re.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}};Zi.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");var Lie=class extends o9{_move(e,t,n,o){return hb.moveWordPartRight(e,t,n)}},t9e=class extends Lie{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:re.textInputFocus,primary:0,mac:{primary:785},weight:100}})}},i9e=class extends Lie{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:re.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}};zt(new X7e);zt(new Q7e);zt(new J7e);zt(new e9e);zt(new t9e);zt(new i9e);Md();nt();an();Wt();var VP=class extends ue{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){let e=rl.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(91);t||(this.editor.isSimpleWidget?t=new cs(g("editor.simple.readonly","Cannot edit in read-only input")):t=new cs(g("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}};VP.ID="editor.contrib.readOnlyMessageController";Ii(VP.ID,VP,2);var Aqn=vt(W1t());I2();Qt();nt();an();Mn();var UP=class extends ue{constructor(e){super(),this.editor=e,this.widget=null,Lc&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){let e=!this.editor.getOption(90);!this.widget&&e?this.widget=new Eie(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}};UP.ID="editor.contrib.iPadShowKeyboard";var Eie=class i extends ue{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(Xe(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(Xe(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};Eie.ID="editor.contrib.ShowKeyboardWidget";Ii(UP.ID,UP,3);var IYn=vt(j1t());Ys();i7();I2();Wt();Ys();nt();vs();i7();cf();var Sqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},q1t=function(i,e){return function(t,n){e(t,n,i)}},jP,qP=jP=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=jn.as(p1.Quickaccess)}provide(e){let t=new Ye;return t.add(e.onDidAccept(()=>{let[n]=e.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(n=>{let o=this.registry.getQuickAccessProvider(n.substr(jP.PREFIX.length));o&&o.prefix&&o.prefix!==jP.PREFIX&&this.quickInputService.quickAccess.show(o.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(n=>n.prefix!==jP.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,n)=>t.prefix.localeCompare(n.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{let n=t.prefix||e.prefix,o=n||"\u2026";return{prefix:n,label:o,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:g("helpPickAriaLabel","{0}, {1}",o,t.description),description:t.description}})}};qP.PREFIX="?";qP=jP=Sqt([q1t(0,ol),q1t(1,fn)],qP);jn.as(p1.Quickaccess).registerQuickAccessProvider({ctor:qP,prefix:"",helpEntries:[{description:UY.helpQuickAccessActionLabel}]});nt();US();k3();nt();US();Ca();r1();No();Xl();var dL=class{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var n;let o=new Ye;e.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let r=o.add(new To);return r.value=this.doProvide(e,t),o.add(this.onDidActiveTextEditorControlChange(()=>{r.value=void 0,r.value=this.doProvide(e,t)})),o}doProvide(e,t){var n;let o=new Ye,r=this.activeTextEditorControl;if(r&&this.canProvideWithTextEditor(r)){let s={editor:r},a=kQ(r);if(a){let l=(n=r.saveViewState())!==null&&n!==void 0?n:void 0;o.add(a.onDidChangeCursorPosition(()=>{var c;l=(c=r.saveViewState())!==null&&c!==void 0?c:void 0})),s.restoreViewState=()=>{l&&r===this.activeTextEditorControl&&r.restoreViewState(l)},o.add(Gu(t.onCancellationRequested)(()=>{var c;return(c=s.restoreViewState)===null||c===void 0?void 0:c.call(s)}))}o.add(Yt(()=>this.clearDecorations(r))),o.add(this.provideWithTextEditor(s,e,t))}else o.add(this.provideWithoutTextEditor(e,t));return o}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();let n=e.getModel();n&&"getLineContent"in n&&hu(`${n.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return sA(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(n=>{let o=[];this.rangeHighlightDecorationId&&(o.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),o.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);let r=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Ko(oq),position:Sl.Full}}}],[s,a]=n.deltaDecorations(o,r);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:a}})}clearDecorations(e){let t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(n=>{n.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}};Wt();var GP=class i extends dL{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){let t=g("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,ue.None}provideWithTextEditor(e,t,n){let o=e.editor,r=new Ye;r.add(t.onDidAccept(l=>{let[c]=t.selectedItems;if(c){if(!this.isValidLineNumber(o,c.lineNumber))return;this.gotoLocation(e,{range:this.toRange(c.lineNumber,c.column),keyMods:t.keyMods,preserveFocus:l.inBackground}),l.inBackground||t.hide()}}));let s=()=>{let l=this.parsePosition(o,t.value.trim().substr(i.PREFIX.length)),c=this.getPickLabel(o,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:c}],t.ariaLabel=c,!this.isValidLineNumber(o,l.lineNumber)){this.clearDecorations(o);return}let d=this.toRange(l.lineNumber,l.column);o.revealRangeInCenter(d,0),this.addDecorations(o,d)};s(),r.add(t.onDidChangeValue(()=>s()));let a=kQ(o);return a&&a.getOptions().get(67).renderType===2&&(a.updateOptions({lineNumbers:"on"}),r.add(Yt(()=>a.updateOptions({lineNumbers:"relative"})))),r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){let n=t.split(/,|:|#/).map(r=>parseInt(r,10)).filter(r=>!isNaN(r)),o=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:o+n[0],column:n[1]}}getPickLabel(e,t,n){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,n)?g("gotoLineColumnLabel","Go to line {0} and character {1}.",t,n):g("gotoLineLabel","Go to line {0}.",t);let o=e.getPosition()||{lineNumber:1,column:1},r=this.lineCount(e);return r>1?g("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",o.lineNumber,o.column,r):g("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",o.lineNumber,o.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,n){if(!n||typeof n!="number")return!1;let o=this.getModel(e);if(!o)return!1;let r={lineNumber:t,column:n};return o.validatePosition(r).equals(r)}lineCount(e){var t,n;return(n=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&n!==void 0?n:0}};GP.PREFIX=":";Ys();i7();fs();I2();Xt();an();Co();cf();var kqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Lqt=function(i,e){return function(t,n){e(t,n,i)}},KP=class extends GP{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=Et.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};KP=kqt([Lqt(0,tn)],KP);var YP=class i extends Ot{constructor(){super({id:i.ID,label:KM.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:re.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(ol).quickAccess.show(KP.PREFIX)}};YP.ID="editor.action.gotoLine";yt(YP);jn.as(p1.Quickaccess).registerQuickAccessProvider({ctor:KP,prefix:KP.PREFIX,helpEntries:[{description:KM.gotoLineActionLabel,commandId:YP.ID}]});Qi();mo();Go();or();l1();Dg();Mn();Ri();var Y1t=[void 0,[]];function Iie(i,e,t=0,n=0){let o=e;return o.values&&o.values.length>1?Eqt(i,o.values,t,n):Z1t(i,e,t,n)}function Eqt(i,e,t,n){let o=0,r=[];for(let s of e){let[a,l]=Z1t(i,s,t,n);if(typeof a!="number")return Y1t;o+=a,r.push(...l)}return[o,Dqt(r)]}function Z1t(i,e,t,n){let o=E2(e.original,e.originalLowercase,t,i,i.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return o?[o[0],Bv(o)]:Y1t}var $Gn=Object.freeze({score:0});function Dqt(i){let e=i.sort((o,r)=>o.start-r.start),t=[],n;for(let o of e)!n||!Tqt(n,o)?(n=o,t.push(o)):(n.start=Math.min(n.start,o.start),n.end=Math.max(n.end,o.end));return t}function Tqt(i,e){return!(i.end=0,s=G1t(i),a,l=i.split(X1t);if(l.length>1)for(let c of l){let d=G1t(c),{pathNormalized:u,normalized:h,normalizedLowercase:f}=K1t(c);h&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:u,normalized:h,normalizedLowercase:f,expectContiguousMatch:d}))}return{original:i,originalLowercase:e,pathNormalized:t,normalized:n,normalizedLowercase:o,values:a,containsPathSeparator:r,expectContiguousMatch:s}}function K1t(i){let e;hr?e=i.replace(/\//g,Zu):e=i.replace(/\\/g,Zu);let t=sqe(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function s9e(i){return Array.isArray(i)?Tie(i.map(e=>e.original).join(X1t)):Tie(i.original)}nt();Ri();Kt();Pr();Ok();Wt();Yn();rh();var Iqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},Q1t=function(i,e){return function(t,n){e(t,n,i)}},uL,ig=uL=class extends dL{constructor(e,t,n=Object.create(null)){super(n),this._languageFeaturesService=e,this._outlineModelService=t,this.options=n,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,g("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),ue.None}provideWithTextEditor(e,t,n){let o=e.editor,r=this.getModel(o);return r?this._languageFeaturesService.documentSymbolProvider.has(r)?this.doProvideWithEditorSymbols(e,r,t,n):this.doProvideWithoutEditorSymbols(e,r,t,n):ue.None}doProvideWithoutEditorSymbols(e,t,n,o){let r=new Ye;return this.provideLabelPick(n,g("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(async()=>!await this.waitForLanguageSymbolRegistry(t,r)||o.isCancellationRequested||r.add(this.doProvideWithEditorSymbols(e,t,n,o)))(),r}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;let n=new Fg,o=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(o.dispose(),n.complete(!0))}));return t.add(Yt(()=>n.complete(!1))),n.p}doProvideWithEditorSymbols(e,t,n,o){var r;let s=e.editor,a=new Ye;a.add(n.onDidAccept(u=>{let[h]=n.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:n.keyMods,preserveFocus:u.inBackground}),u.inBackground||n.hide())})),a.add(n.onDidTriggerItemButton(({item:u})=>{u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));let l=this.getDocumentSymbols(t,o),c,d=async u=>{c?.dispose(!0),n.busy=!1,c=new Jn(o),n.busy=!0;try{let h=Tie(n.value.substr(uL.PREFIX.length).trim()),f=await this.doGetSymbolPicks(l,h,void 0,c.token);if(o.isCancellationRequested)return;if(f.length>0){if(n.items=f,u&&h.original.length===0){let p=o4(f,m=>!!(m.type!=="separator"&&m.range&&O.containsPosition(m.range.decoration,u)));p&&(n.activeItems=[p])}}else h.original.length>0?this.provideLabelPick(n,g("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,g("noSymbolResults","No editor symbols"))}finally{o.isCancellationRequested||(n.busy=!1)}};return a.add(n.onDidChangeValue(()=>d(void 0))),d((r=s.getSelection())===null||r===void 0?void 0:r.getPosition()),a.add(n.onDidChangeActive(()=>{let[u]=n.activeItems;u&&u.range&&(s.revealRangeInCenter(u.range.selection,0),this.addDecorations(s,u.range.decoration))})),a}async doGetSymbolPicks(e,t,n,o){var r,s;let a=await e;if(o.isCancellationRequested)return[];let l=t.original.indexOf(uL.SCOPE_PREFIX)===0,c=l?1:0,d,u;t.values&&t.values.length>1?(d=s9e(t.values[0]),u=s9e(t.values.slice(1))):d=t;let h,f=(s=(r=this.options)===null||r===void 0?void 0:r.openSideBySideDirection)===null||s===void 0?void 0:s.call(r);f&&(h=[{iconClass:f==="right"?ui.asClassName(kt.splitHorizontal):ui.asClassName(kt.splitVertical),tooltip:f==="right"?g("openToSide","Open to the Side"):g("openToBottom","Open to the Bottom")}]);let p=[];for(let _=0;_c){let T=!1;if(d!==t&&([x,k]=Iie(C,{...t,values:void 0},c,w),typeof x=="number"&&(T=!0)),typeof x!="number"&&([x,k]=Iie(C,d,c,w),typeof x!="number"))continue;if(!T&&u){if(S&&u.original.length>0&&([D,E]=Iie(S,u)),typeof D!="number")continue;typeof x=="number"&&(x+=D)}}let A=v.tags&&v.tags.indexOf(1)>=0;p.push({index:_,kind:v.kind,score:x,label:C,ariaLabel:eqe(v.name,v.kind),description:S,highlights:A?void 0:{label:k,description:E},range:{selection:O.collapseToStart(v.selectionRange),decoration:v.range},strikethrough:A,buttons:h})}let m=p.sort((_,v)=>l?this.compareByKindAndScore(_,v):this.compareByScore(_,v)),y=[];if(l){let C=function(){v&&typeof _=="number"&&b>0&&(v.label=zf(l9e[_]||a9e,b))},_,v,b=0;for(let w of m)_!==w.kind?(C(),_=w.kind,b=1,v={type:"separator"},y.push(v)):b++,y.push(w);C()}else m.length>0&&(y=[{label:g("symbols","symbols ({0})",p.length),type:"separator"},...m]);return y}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){let n=l9e[e.kind]||a9e,o=l9e[t.kind]||a9e,r=n.localeCompare(o);return r===0?this.compareByScore(e,t):r}async getDocumentSymbols(e,t){let n=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:n.asListOfDocumentSymbols()}};ig.PREFIX="@";ig.SCOPE_PREFIX=":";ig.PREFIX_BY_CATEGORY=`${uL.PREFIX}${uL.SCOPE_PREFIX}`;ig=uL=Iqt([Q1t(0,Rt),Q1t(1,s6)],ig);var a9e=g("property","properties ({0})"),l9e={5:g("method","methods ({0})"),11:g("function","functions ({0})"),8:g("_constructor","constructors ({0})"),12:g("variable","variables ({0})"),4:g("class","classes ({0})"),22:g("struct","structs ({0})"),23:g("event","events ({0})"),24:g("operator","operators ({0})"),10:g("interface","interfaces ({0})"),2:g("namespace","namespaces ({0})"),3:g("package","packages ({0})"),25:g("typeParameter","type parameters ({0})"),1:g("modules","modules ({0})"),6:g("property","properties ({0})"),9:g("enum","enumerations ({0})"),21:g("enumMember","enumeration members ({0})"),14:g("string","strings ({0})"),0:g("file","files ({0})"),17:g("array","arrays ({0})"),15:g("number","numbers ({0})"),16:g("boolean","booleans ({0})"),18:g("object","objects ({0})"),19:g("key","keys ({0})"),7:g("field","fields ({0})"),13:g("constant","constants ({0})")};Ys();i7();fs();I2();Xt();an();Co();cf();Ok();Yn();var Mqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},c9e=function(i,e){return function(t,n){e(t,n,i)}},d9e=class extends ig{constructor(e,t,n){super(t,n),this.editorService=e,this.onDidActiveTextEditorControlChange=Et.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};d9e=Mqt([c9e(0,tn),c9e(1,Rt),c9e(2,s6)],d9e);var ZP=class i extends Ot{constructor(){super({id:i.ID,label:Xx.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:re.hasDocumentSymbolProvider,kbOpts:{kbExpr:re.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(ol).quickAccess.show(ig.PREFIX,{itemActivation:lf.NONE})}};ZP.ID="editor.action.quickOutline";yt(ZP);jn.as(p1.Quickaccess).registerQuickAccessProvider({ctor:d9e,prefix:ig.PREFIX,helpEntries:[{description:Xx.quickOutlineActionLabel,prefix:ig.PREFIX,commandId:ZP.ID},{description:Xx.quickOutlineByCategoryActionLabel,prefix:ig.PREFIX_BY_CATEGORY}]});Ys();i7();I2();fs();Ob();Vi();ho();Wt();function u9e(i,e){return e&&(i.stack||i.stacktrace)?g("stackTrace.format","{0}: {1}",ept(i),J1t(i.stack)||J1t(i.stacktrace)):ept(i)}function J1t(i){return Array.isArray(i)?i.join(` +`):i}function ept(i){return i.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${i.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof i.code=="string"&&typeof i.errno=="number"&&typeof i.syscall=="string"?g("nodeExceptionMessage","A system error occurred ({0})",i.message):i.message||g("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function h9e(i=null,e=!1){if(!i)return g("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(i)){let t=pl(i),n=h9e(t[0],e);return t.length>1?g("error.moreErrors","{0} ({1} errors in total)",n,t.length):n}if(qs(i))return i;if(i.detail){let t=i.detail;if(t.error)return u9e(t.error,e);if(t.exception)return u9e(t.exception,e)}return i.stack?u9e(i,e):i.message?i.message:g("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}Pi();l1();k3();nt();od();function Nqt(i){var e;let t=new Map;for(let n of i)t.set(n,((e=t.get(n))!==null&&e!==void 0?e:0)+1);return t}var Mie=class i{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){let n=this.computeEmbedding(e),o=new Map,r=[];for(let[s,a]of this.documents){if(t.isCancellationRequested)return[];for(let l of a.chunks){let c=this.computeSimilarityScore(l,n,o);c>0&&r.push({key:s,score:c})}}return r}static termFrequencies(e){return Nqt(i.splitTerms(e))}static*splitTerms(e){let t=n=>n.toLowerCase();for(let[n]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(n);let o=n.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(o.length>1)for(let r of o)r.length>2&&/\p{Letter}{3,}/gu.test(r)&&(yield t(r))}}updateDocuments(e){var t;for(let{key:n}of e)this.deleteDocument(n);for(let n of e){let o=[];for(let r of n.textChunks){let s=i.termFrequencies(r);for(let a of s.keys())this.chunkOccurrences.set(a,((t=this.chunkOccurrences.get(a))!==null&&t!==void 0?t:0)+1);o.push({text:r,tf:s})}this.chunkCount+=o.length,this.documents.set(n.key,{chunks:o})}return this}deleteDocument(e){let t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(let n of t.chunks)for(let o of n.tf.keys()){let r=this.chunkOccurrences.get(o);if(typeof r=="number"){let s=r-1;s<=0?this.chunkOccurrences.delete(o):this.chunkOccurrences.set(o,s)}}}}computeSimilarityScore(e,t,n){let o=0;for(let[r,s]of Object.entries(t)){let a=e.tf.get(r);if(!a)continue;let l=n.get(r);typeof l!="number"&&(l=this.computeIdf(r),n.set(r,l));let c=a*l;o+=c*s}return o}computeEmbedding(e){let t=i.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){var t;let n=(t=this.chunkOccurrences.get(e))!==null&&t!==void 0?t:0;return n>0?Math.log((this.chunkCount+1)/n):0}computeTfidf(e){let t=Object.create(null);for(let[n,o]of e){let r=this.computeIdf(n);r>0&&(t[n]=o*r)}return t}};function tpt(i){var e,t;let n=i.slice(0);n.sort((r,s)=>s.score-r.score);let o=(t=(e=n[0])===null||e===void 0?void 0:e.score)!==null&&t!==void 0?t:0;if(o>0)for(let r of n)r.score/=o;return n}Wt();$o();er();Nx();_i();vs();Qi();mo();nt();ho();var hL;(function(i){i[i.NO_ACTION=0]="NO_ACTION",i[i.CLOSE_PICKER=1]="CLOSE_PICKER",i[i.REFRESH_PICKER=2]="REFRESH_PICKER",i[i.REMOVE_ITEM=3]="REMOVE_ITEM"})(hL||(hL={}));function f9e(i){let e=i;return Array.isArray(e.items)}function ipt(i){let e=i;return!!e.picks&&e.additionalPicks instanceof Promise}var Nie=class extends ue{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,n){var o;let r=new Ye;e.canAcceptInBackground=!!(!((o=this.options)===null||o===void 0)&&o.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s,a=r.add(new To),l=async()=>{var c;let d=a.value=new Ye;s?.dispose(!0),e.busy=!1,s=new Jn(t);let u=s.token,h=e.value.substring(this.prefix.length);!((c=this.options)===null||c===void 0)&&c.shouldSkipTrimPickFilter||(h=h.trim());let f=this._getPicks(h,d,u,n),p=(y,_)=>{var v;let b,C;if(f9e(y)?(b=y.items,C=y.active):b=y,b.length===0){if(_)return!1;(h.length>0||e.hideInput)&&(!((v=this.options)===null||v===void 0)&&v.noResultsPick)&&(_3(this.options.noResultsPick)?b=[this.options.noResultsPick(h)]:b=[this.options.noResultsPick])}return e.items=b,C&&(e.activeItems=[C]),!0},m=async y=>{let _=!1,v=!1;await Promise.all([(async()=>{typeof y.mergeDelay=="number"&&(await eh(y.mergeDelay),u.isCancellationRequested)||v||(_=p(y.picks,!0))})(),(async()=>{e.busy=!0;try{let b=await y.additionalPicks;if(u.isCancellationRequested)return;let C,w;f9e(y.picks)?(C=y.picks.items,w=y.picks.active):C=y.picks;let S,x;if(f9e(b)?(S=b.items,x=b.active):S=b,S.length>0||!_){let k;if(!w&&!x){let D=e.activeItems[0];D&&C.indexOf(D)!==-1&&(k=D)}p({items:[...C,...S],active:w||x||k})}}finally{u.isCancellationRequested||(e.busy=!1),v=!0}})()])};if(f!==null)if(ipt(f))await m(f);else if(!(f instanceof Promise))p(f);else{e.busy=!0;try{let y=await f;if(u.isCancellationRequested)return;ipt(y)?await m(y):p(y)}finally{u.isCancellationRequested||(e.busy=!1)}}};return r.add(e.onDidChangeValue(()=>l())),l(),r.add(e.onDidAccept(c=>{let[d]=e.selectedItems;typeof d?.accept=="function"&&(c.inBackground||e.hide(),d.accept(e.keyMods,c))})),r.add(e.onDidTriggerItemButton(async({button:c,item:d})=>{var u,h;if(typeof d.trigger=="function"){let f=(h=(u=d.buttons)===null||u===void 0?void 0:u.indexOf(c))!==null&&h!==void 0?h:-1;if(f>=0){let p=d.trigger(f,e.keyMods),m=typeof p=="number"?p:await p;if(t.isCancellationRequested)return;switch(m){case hL.NO_ACTION:break;case hL.CLOSE_PICKER:e.hide();break;case hL.REFRESH_PICKER:l();break;case hL.REMOVE_ITEM:{let y=e.items.indexOf(d);if(y!==-1){let _=e.items.slice(),v=_.splice(y,1),b=e.activeItems.filter(w=>w!==v[0]),C=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=_,b&&(e.activeItems=b),e.keepScrollPosition=C}break}}}}})),r}};Hm();$f();var npt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},a9=function(i,e){return function(t,n){e(t,n,i)}},s9,da,X8=s9=class extends Nie{constructor(e,t,n,o,r,s){super(s9.PREFIX,e),this.instantiationService=t,this.keybindingService=n,this.commandService=o,this.telemetryService=r,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(Q8)),this.options=e}async _getPicks(e,t,n,o){var r,s,a,l;let c=await this.getCommandPicks(n);if(n.isCancellationRequested)return[];let d=Gu(()=>{let _=new Mie;_.updateDocuments(c.map(b=>({key:b.commandId,textChunks:[this.getTfIdfChunk(b)]})));let v=_.calculateScores(e,n);return tpt(v).filter(b=>b.score>s9.TFIDF_THRESHOLD).slice(0,s9.TFIDF_MAX_RESULTS)}),u=[];for(let _ of c){let v=(r=s9.WORD_FILTER(e,_.label))!==null&&r!==void 0?r:void 0,b=_.commandAlias&&(s=s9.WORD_FILTER(e,_.commandAlias))!==null&&s!==void 0?s:void 0;if(v||b)_.highlights={label:v,detail:this.options.showAlias?b:void 0},u.push(_);else if(e===_.commandId)u.push(_);else if(e.length>=3){let C=d();if(n.isCancellationRequested)return[];let w=C.find(S=>S.key===_.commandId);w&&(_.tfIdfScore=w.score,u.push(_))}}let h=new Map;for(let _ of u){let v=h.get(_.label);v?(_.description=_.commandId,v.description=v.commandId):h.set(_.label,_)}u.sort((_,v)=>{if(_.tfIdfScore&&v.tfIdfScore)return _.tfIdfScore===v.tfIdfScore?_.label.localeCompare(v.label):v.tfIdfScore-_.tfIdfScore;if(_.tfIdfScore)return 1;if(v.tfIdfScore)return-1;let b=this.commandsHistory.peek(_.commandId),C=this.commandsHistory.peek(v.commandId);if(b&&C)return b>C?-1:1;if(b)return-1;if(C)return 1;if(this.options.suggestedCommandIds){let w=this.options.suggestedCommandIds.has(_.commandId),S=this.options.suggestedCommandIds.has(v.commandId);if(w&&S)return 0;if(w)return-1;if(S)return 1}return _.label.localeCompare(v.label)});let f=[],p=!1,m=!0,y=!!this.options.suggestedCommandIds;for(let _=0;_{var _;let v=await this.getAdditionalCommandPicks(c,u,e,n);if(n.isCancellationRequested)return[];let b=v.map(C=>this.toCommandPick(C,o));return m&&((_=b[0])===null||_===void 0?void 0:_.type)!=="separator"&&b.unshift({type:"separator",label:g("suggested","similar commands")}),b})()}:f}toCommandPick(e,t){if(e.type==="separator")return e;let n=this.keybindingService.lookupKeybinding(e.commandId),o=n?g("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,n.getAriaLabel()):e.label;return{...e,ariaLabel:o,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:n,accept:async()=>{var r,s;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:(r=t?.from)!==null&&r!==void 0?r:"quick open"});try{!((s=e.args)===null||s===void 0)&&s.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(a){jl(a)||this.dialogService.error(g("canNotRun","Command '{0}' resulted in an error",e.label),h9e(a))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:n}){let o=e;return t&&t!==e&&(o+=` - ${t}`),n&&n.value!==e&&(o+=` - ${n.value===n.original?n.value:`${n.value} (${n.original})`}`),o}};X8.PREFIX=">";X8.TFIDF_THRESHOLD=.5;X8.TFIDF_MAX_RESULTS=5;X8.WORD_FILTER=yY(Pb,Get,Ege);X8=s9=npt([a9(1,qt),a9(2,fn),a9(3,eo),a9(4,Fs),a9(5,x2)],X8);var Q8=da=class extends ue{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===Yv.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=da.getConfiguredCommandHistoryLength(this.configurationService),da.cache&&da.cache.limit!==this.configuredCommandsHistoryLength&&(da.cache.limit=this.configuredCommandsHistoryLength,da.hasChanges=!0))}load(){let e=this.storageService.get(da.PREF_KEY_CACHE,0),t;if(e)try{t=JSON.parse(e)}catch{}let n=da.cache=new nd(this.configuredCommandsHistoryLength,1);if(t){let o;t.usesLRU?o=t.entries:o=t.entries.sort((r,s)=>r.value-s.value),o.forEach(r=>n.set(r.key,r.value))}da.counter=this.storageService.getNumber(da.PREF_KEY_COUNTER,0,da.counter)}push(e){da.cache&&(da.cache.set(e,da.counter++),da.hasChanges=!0)}peek(e){var t;return(t=da.cache)===null||t===void 0?void 0:t.peek(e)}saveState(){if(!da.cache||!da.hasChanges)return;let e={usesLRU:!0,entries:[]};da.cache.forEach((t,n)=>e.entries.push({key:n,value:t})),this.storageService.store(da.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(da.PREF_KEY_COUNTER,da.counter,0,0),da.hasChanges=!1}static getConfiguredCommandHistoryLength(e){var t,n;let r=(n=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||n===void 0?void 0:n.history;return typeof r=="number"?r:da.DEFAULT_COMMANDS_HISTORY_LENGTH}};Q8.DEFAULT_COMMANDS_HISTORY_LENGTH=50;Q8.PREF_KEY_CACHE="commandPalette.mru.cache";Q8.PREF_KEY_COUNTER="commandPalette.mru.counter";Q8.counter=1;Q8.hasChanges=!1;Q8=da=npt([a9(0,nl),a9(1,Ni)],Q8);var Aie=class extends X8{constructor(e,t,n,o,r,s){super(e,t,n,o,r,s)}getCodeEditorCommandPicks(){let e=this.activeTextEditorControl;if(!e)return[];let t=[];for(let n of e.getSupportedActions())t.push({commandId:n.id,commandAlias:n.alias,label:Vx(n.label)||n.id});return t}};_i();vs();$o();$f();Nx();an();Co();cf();var Aqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},fL=function(i,e){return function(t,n){e(t,n,i)}},XP=class extends Aie{get activeTextEditorControl(){var e;return(e=this.codeEditorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}constructor(e,t,n,o,r,s){super({showAlias:!1},e,n,o,r,s),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};XP=Aqt([fL(0,qt),fL(1,tn),fL(2,fn),fL(3,eo),fL(4,Fs),fL(5,x2)],XP);var QP=class i extends Ot{constructor(){super({id:i.ID,label:YM.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:re.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(ol).quickAccess.show(XP.PREFIX)}};QP.ID="editor.action.quickCommand";yt(QP);jn.as(p1.Quickaccess).registerQuickAccessProvider({ctor:XP,prefix:XP.PREFIX,helpEntries:[{description:YM.quickCommandHelp,commandId:QP.ID}]});an();fs();er();Xi();_i();ic();Hm();var Rqt=function(i,e,t,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(o<3?s(r):o>3?s(e,t,r):s(e,t))||r);return o>3&&r&&Object.defineProperty(e,t,r),r},pL=function(i,e){return function(t,n){e(t,n,i)}},p9e=class extends Q2{constructor(e,t,n,o,r,s,a){super(!0,e,t,n,o,r,s,a)}};p9e=Rqt([pL(1,ri),pL(2,tn),pL(3,xo),pL(4,qt),pL(5,nl),pL(6,Ni)],p9e);Ii(Q2.ID,p9e,4);an();l7();I2();fp();s4e();var m9e=class extends Ot{constructor(){super({id:"editor.action.toggleHighContrast",label:$Y.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){let n=e.get(sc),o=n.getColorTheme();Ac(o.type)?(n.setTheme(this._originalThemeName||(a2(o.type)?a7:H2)),this._originalThemeName=null):(n.setTheme(a2(o.type)?i8:n8),this._originalThemeName=o.themeName)}};yt(m9e);ta();var rpt=vt(xi()),JP=vt(xi());window.MonacoEnvironment={getWorker:(i,e)=>new Worker("editor.worker.js",{type:"module"})};var mL=class{constructor(e="",t=null,n="text"){FO(this,"model");FO(this,"readOnly");FO(this,"viewState",null);this.model=$S.createModel(e||"",n),this.readOnly=t===null,this.readOnly||this.model.onDidChangeContent(o=>t(this.model.getValue()))}get text(){return this.model.getValue()}set text(e){this.readOnly?this.model.setValue(e):this.model.pushEditOperations([],[{range:this.model.getFullModelRange(),text:e}],()=>null)}dispose(){this.model.dispose()}};function Rie({state:i,actions:e=[],padding:t,focus:n=!1}){let o=(0,JP.useRef)(null),r=(0,JP.useRef)(null);return(0,JP.useEffect)(()=>{o.current=$S.create(r.current,{model:i.model,readOnly:i.readOnly,padding:t}),e.forEach(a=>o.current?.addAction(a));let s=new ResizeObserver(a=>o.current?.layout());return s.observe(r.current),o.current.restoreViewState(i.viewState),n&&o.current.focus(),()=>{i.viewState=o.current.saveViewState(),s.disconnect(),o.current?.dispose()}},[e]),rpt.createElement("div",{style:{height:"100%"},ref:r})}var Mmt=vt(xi()),J8=vt(xi()),Nmt=vt(C9e()),Amt=vt(Imt());function Rmt(i){let e=(0,J8.useRef)(null),t=(0,J8.useRef)(null),n=(0,J8.useId)();return(0,J8.useEffect)(()=>{e.current===null&&(e.current=new Amt.WaveGraph(Nmt.select(`[id="${n}"]`))),e.current.setSizes();let o=new ResizeObserver(r=>e.current.setSizes());return o.observe(t.current),()=>o.disconnect()},[]),(0,J8.useEffect)(()=>e.current?.bindData(i.data),[i.data]),Mmt.createElement("svg",{width:"100%",height:"100%",style:{display:"block"},id:n,ref:t})}var Pmt=`app.worker.js?hash=${"b8ce2f8108a3a54fb69b724955dde37fbd482bac".substr(0,8)}`,tO=class extends Error{},e_,_L,w9e=class{constructor(){yne(this,e_,new Worker(Pmt,{type:"module"}));yne(this,_L,null)}initializeWorker(e){return JSON.stringify(c_(this,_L))!==JSON.stringify(e)&&(c_(this,e_)!==null&&c_(this,_L)!==null&&(c_(this,e_).terminate(),Cne(this,e_,new Worker(Pmt,{type:"module"}))),c_(this,e_).postMessage({type:"loadPackages",pkgs:e}),Cne(this,_L,e)),c_(this,e_)}preloadPackages(e){this.initializeWorker(e)}runPython(e,t){console.log("[Host] Running",{packages:t.packages,code:e});let n=this.initializeWorker(t.packages);return new Promise((o,r)=>{function s(l){console.log("[Host] Received",l.data),l.data.type==="stdoutWrite"?t.onStdout(l.data.text):l.data.type==="stderrWrite"?t.onStderr(l.data.text):l.data.type==="showRtlil"?t.onShowRtlil(l.data.code):l.data.type==="showVerilog"?t.onShowVerilog(l.data.code):l.data.type==="showWaveforms"?t.onShowWaveforms(l.data.data):l.data.type==="pythonDone"?(n.removeEventListener("message",s),n.removeEventListener("error",a),l.data.error===null?o():r(new tO(l.data.error))):r(new Error(`[Host] Unexpected message ${l.data.type}`))}function a(l){console.log("[Host] Failure",l.error),n.removeEventListener("message",s),r(l.error)}n.addEventListener("message",s),n.addEventListener("error",a,{once:!0}),n.postMessage({type:"runPython",code:e})})}};e_=new WeakMap,_L=new WeakMap;var Omt=new w9e;var iO="https://files.pythonhosted.org/packages/ff/9a/9afaade874b2fa6c752c36f1548f718b5b83af81ed9b76628329dab81c1b/rfc3986-2.0.0-py2.py3-none-any.whl",nO="https://files.pythonhosted.org/packages/ce/b1/31f454a2ac0d23b0a47283d115f0af4abe2a1ea391f5ccb223e02d685b82/jschon-0.11.1-py3-none-any.whl",p6="https://files.pythonhosted.org/packages/98/8d/a0d8fb2b9611f3ae22ddc98890b346833fa2c645ad21fd282e61ccdad477/pyvcd-0.4.0-py2.py3-none-any.whl",Oqt="https://files.pythonhosted.org/packages/27/1c/39881fbd48f9de91d64955f206a7f32fd912d306d18e8c5f74126ee5962f/amaranth-0.4.2-py3-none-any.whl",zqt="https://files.pythonhosted.org/packages/72/34/82f76a59f4155e26f42cf9f9d04d80befe774aa8af6d9b6e48d3e7b9f060/amaranth-0.4.3-py3-none-any.whl",Fqt="https://files.pythonhosted.org/packages/ee/66/bbb766873059d8051ddb7e760de80beefd286979bc9a786e7ec4ac524336/amaranth-0.4.4-py3-none-any.whl",Hqt="https://files.pythonhosted.org/packages/1a/bf/cff5c705f2f5978889e1fa0fc2a70e0fadbb9f2a51db2d3315c3bda7c3ea/amaranth-0.4.5-py3-none-any.whl",Bqt="https://files.pythonhosted.org/packages/d3/34/8a21cc1765f1952eb35766cf76ec8a1b3e73f32ae78d9bf1c1a88313bdcd/amaranth-0.5.0-py3-none-any.whl",Vqt="https://files.pythonhosted.org/packages/46/1c/74dc024e77038a273160dd1d70a79371142ba9ebeac4b2fb89c272ce6859/amaranth-0.5.1-py3-none-any.whl",Wqt="https://files.pythonhosted.org/packages/e1/60/f787f05fe9684ce80aeb9fe23238248461ef42783e53712092ad55a97eec/amaranth-0.5.2-py3-none-any.whl",Uqt="https://files.pythonhosted.org/packages/3a/8d/889014b45ecf68727d8c8c1d88d5b858f0b43a42c5b1e51fa2c875ffd4d5/amaranth-0.5.3-py3-none-any.whl",$qt="https://files.pythonhosted.org/packages/f4/c3/a7124071d8cf2dfc958a13fd6d32efb075ce203d275df8fcbb00cbe82ad7/amaranth-0.5.4-py3-none-any.whl",zmt={"v0.5.4":[iO,nO,p6,$qt],"v0.5.3":[iO,nO,p6,Uqt],"v0.5.2":[iO,nO,p6,Wqt],"v0.5.1":[iO,nO,p6,Vqt],"v0.5.0":[iO,nO,p6,Bqt],"v0.4.5":[p6,Hqt],"v0.4.4":[p6,Fqt],"v0.4.3":[p6,zqt],"v0.4.2":[p6,Oqt]},_ne=`from amaranth import * from amaranth.sim import Simulator, Tick from amaranth.back import rtlil, verilog import amaranth_playground @@ -1372,7 +1372,7 @@ with amaranth_playground.show_waveforms(sim): amaranth_playground.show_verilog(verilog.convert(m, ports=[count])) # amaranth_playground.show_rtlil(rtlil.convert(m, ports=[count])) -`,_ne=`from amaranth import * +`,oO=`from amaranth import * from amaranth.sim import Simulator from amaranth.back import rtlil, verilog import amaranth_playground @@ -1399,7 +1399,7 @@ with amaranth_playground.show_waveforms(sim): amaranth_playground.show_verilog(verilog.convert(m, ports=[count])) # amaranth_playground.show_rtlil(rtlil.convert(m, ports=[count])) -`,$qt={"v0.5.3":_ne,"v0.5.2":_ne,"v0.5.1":_ne,"v0.5.0":_ne,"v0.4.5":vne,"v0.4.4":vne,"v0.4.3":vne,"v0.4.2":vne},t_={amaranthVersions:Array.from(Object.keys(zmt)),pythonPackages:zmt,demoCode:$qt};function jqt(){let{hash:i}=window.location;if(i!==""){history.replaceState(null,""," ");let e=i.substring(1);try{return JSON.parse(atob(e))}catch{try{return JSON.parse(decodeURIComponent(e.replace("+","%20")))}catch{}}}}function qqt(i,e){return e.map((t,n)=>yi.createElement("span",{key:`${i}-${n}`,className:`terminal-${t.stream}`},t.text))}function Gqt(){let{mode:i,setMode:e}=rce();(0,Ms.useEffect)(()=>$S.setTheme(i==="light"?"vs":"vs-dark"),[i]);let t=jqt(),[n,o]=(0,Ms.useState)(t?.av??localStorage.getItem("amaranth-playground.amaranthVersion")??t_.amaranthVersions[0]);(0,Ms.useEffect)(()=>localStorage.setItem("amaranth-playground.amaranthVersion",n),[n]);let[r,s]=(0,Ms.useState)(!1),[a,l]=(0,Ms.useState)(!1),[c,d]=(0,Ms.useState)(localStorage.getItem("amaranth-playground.tutorialDone")!==null);(0,Ms.useEffect)(()=>c?localStorage.setItem("amaranth-playground.tutorialDone",""):void 0,[c]);let[u,h]=(0,Ms.useState)(c?"amaranth-source":"tutorial"),[f,p]=(0,Ms.useState)(t?.s??localStorage.getItem("amaranth-playground.source")??t_.demoCode[n]);(0,Ms.useEffect)(()=>localStorage.setItem("amaranth-playground.source",f),[f]);let[m,y]=(0,Ms.useState)(null),[_,v]=(0,Ms.useState)(!0),[b,C]=(0,Ms.useState)(null),[w,S]=(0,Ms.useState)(!1),[x,k]=(0,Ms.useState)(!1),[D,E]=(0,Ms.useState)(null),[A,T]=(0,Ms.useState)(null),L=(0,Ms.useRef)(new mL(f,p,"python")),I=(0,Ms.useRef)(new mL(D,null,"rtlil"));(0,Ms.useEffect)(()=>{I.current.text=D??""},[D]);let M=(0,Ms.useRef)(new mL(A,null,"verilog"));(0,Ms.useEffect)(()=>{M.current.text=A??""},[A]);function N(){L.current.text=t_.demoCode[n],h("amaranth-source")}function z(oe){let je=L.current.text==t_.demoCode[n];o(oe),je&&(L.current.text=t_.demoCode[oe])}function F(){d(!0),h("amaranth-source")}let V=yi.useCallback(async()=>{if(!r)try{s(!0),m!==null&&y([]);let oe=!1,je=!1,Ae=!1;await Omt.runPython(f,{packages:t_.pythonPackages[n],onStdout:Be=>y(Ie=>(Ie??[]).concat([{stream:"stdout",text:Be}])),onStderr:Be=>y(Ie=>(Ie??[]).concat([{stream:"stderr",text:Be}])),onShowRtlil:Be=>{oe=!0,E(Be)},onShowVerilog:Be=>{je=!0,T(Be)},onShowWaveforms:Be=>{Ae=!0,C(Be)}}),D&&!oe&&(E(null),h(u==="rtlil-product"?"amaranth-source":u)),A&&!je&&(T(null),h(u==="verilog-product"?"amaranth-source":u)),b&&!Ae&&(C(null),h(u==="waveforms-product"?"amaranth-source":u)),k(!1)}catch(oe){if(oe instanceof tO)y(je=>(je??[]).concat([{stream:"stderr",text:oe.message}])),h("python-output");else throw oe}finally{s(!1),S(!1)}},[f,n]);function ie({key:oe,title:je,titleStyle:Ae={},content:Be}){return[yi.createElement(sde,{key:`${oe}-tab`,value:oe,style:Ae},je),yi.createElement(lde,{key:`${oe}-tabpanel`,value:oe,sx:{padding:0}},Be)]}let fe=[ie({key:"tutorial",title:yi.createElement(bne.default,null),content:yi.createElement(Ah,{sx:{padding:2,maxWidth:"80em"}},yi.createElement("p",null,"Hi there!"),yi.createElement("p",null,"On this page, you can experiment with the ",yi.createElement(Rh,{href:"https://amaranth-lang.org/"},"Amaranth")," hardware definition language: run a small program, watch its output, see the waveforms a simulation generates, look at the RTL the compiler produces, and share it with friends, if you like!"),yi.createElement("p",null,'To switch between views, use the tab bar right above this text. The tab with the "',yi.createElement(bne.default,{fontSize:"small"}),'" icon shows this tutorial. When you open this page, the only other visible tab will be "Amaranth Source", containing a demonstration program. Go ahead and open it! Then switch back to the tutorial by clicking ',yi.createElement(bne.default,{fontSize:"small"}),". (If the demonstration program doesn't appear, or if you edited it and now want to go back, you can ",yi.createElement(Rh,{onClick:N},"reload it"),".)"),yi.createElement("p",null,'The code you enter in the "Amaranth Source" tab is ordinary Python code that runs in an environment where the Amaranth Python package and its dependencies are already installed. You can write ',yi.createElement("code",null,"import amaranth"),` and start experimenting without any distractions. Once you're done, click the "`,yi.createElement(iO.default,{fontSize:"small"}),' Run" button in the top left, or press ',yi.createElement("kbd",null,"Ctrl"),"+",yi.createElement("kbd",null,"Enter")," while the editor is focused. Go ahead and try!"),yi.createElement("p",null,"You will see several new tabs appear:"),yi.createElement("ul",null,yi.createElement("li",null,'The "Python Output" tab contains the text from the standard output and standard error streams of the Python interpreter. If you run the ',yi.createElement("code",null,"print()")," function, this tab will contain the output. Any exceptions raised by the Python code will also be shown here."),yi.createElement("li",null,'The "Waveforms" tab visualizes how the values of signals change during the simulation. It appears only if the code includes a ',yi.createElement("code",null,"with amaranth_playground.show_waveforms(sim):")," statement. When you open the tab, the waveform viewer will display an overview of the entire simulation. You can scroll the mouse wheel to zoom, and drag the area with the waveforms with the left mouse button to move the viewport."),yi.createElement("li",null,'The "Generated Verilog" tab shows the output of the Amaranth compiler. It appears only if the code includes a ',yi.createElement("code",null,"amaranth_playground.show_verilog(...)")," ","statement.")),yi.createElement("p",null,`The contents of these tabs isn't automatically updated: you need to click the "`,yi.createElement(iO.default,{fontSize:"small"}),' Run" button every time you modify the code to see how the changes in it affect the results. Try changing something and clicking "',yi.createElement(iO.default,{fontSize:"small"}),' Run" now!'),yi.createElement("p",null,`The code you write in the "Amaranth Source" tab is automatically saved when you change it, so if you leave this page and come back to it later, it should be exactly as you left it. However, don't rely on it to save your important code: only one copy of the code is saved, so if you open this page in several browser tabs or windows, all but one programs will be lost.`),yi.createElement("p",null,'If you click the "',yi.createElement(x9e.default,{fontSize:"small"}),` Share" button in the top right corner of this page, a popup with a link will appear right there. This link contains a copy of the source code you entered (and the Amaranth version you're using). You can bookmark it, or send it to someone else. When you click on the link, the code you're currently editing will be erased and replaced with the code contained in the link.`),yi.createElement("p",null,'The button with the "',i==="light"?yi.createElement(S9e.default,{fontSize:"small"}):yi.createElement(k9e.default,{fontSize:"small"}),'" icon in the top right corner switches the color theme to use a ',i==="light"?"dark":"light"," background instead. For now, the waveform viewer always uses a dark background."),yi.createElement("p",null,"Have fun! You can now ",yi.createElement(Rh,{onClick:F},"mark the tutorial as complete")," ","and start experimenting, or continue reading if you want to know more details. If you want to see your design run on a real development board, try the ",yi.createElement(Rh,{href:"https://marketplace.visualstudio.com/items?itemName=yowasp.toolchain"},"YoWASP Toolchain")," extension for Visual Studio Code; it provides an end-to-end FPGA toolchain for the popular iCE40 and ECP5 FPGA families entirely in the browser. ","usb"in navigator?yi.createElement(yi.Fragment,null):yi.createElement(yi.Fragment,null,"(Your browser does not support WebUSB, so you will need to use a different browser or install a flashing utility separately.)")),yi.createElement("p",null,"The only functionality available in this playground that isn't a part of the Amaranth Python package or its dependencies is the ",yi.createElement("code",null,"amaranth_playground")," Python module. This built-in module provides three functions that are used to display the results of running a program in a separate tab and in the suitable format:"),yi.createElement("ul",null,yi.createElement("li",null,yi.createElement("code",null,"with amaranth_playground.show_waveforms(sim):")," displays waveforms by calling ",yi.createElement("code",null,"with sim.write_vcd(vcd_file=...)")," internally and then converting the VCD data to a format suitable for the interactive viewer."),yi.createElement("li",null,yi.createElement("code",null,"amaranth_playground.show_verilog(verilog.convert(m))")," displays Verilog code. This code is accepted by all FPGA and ASIC toolchains, and can be used to run Amaranth on essentially any hardware platform or RTL simulator."),yi.createElement("li",null,yi.createElement("code",null,"amaranth_playground.show_rtlil(rtlil.convert(m))")," displays ",yi.createElement(Rh,{href:"https://yosyshq.readthedocs.io/projects/yosys/en/latest/yosys_internals/formats/rtlil_rep.html"},"RTLIL code"),", the ",yi.createElement(Rh,{href:"https://yosyshq.net"},"Yosys")," intermediate representation. This code is accepted by the open-source FPGA toolchain, and is used internally by the Amaranth compiler to produce Verilog code. Unless you are investigating a problem with the Amaranth compiler itself, the only reason to look at it is curiosity. (Which is a very good reason; try uncommenting the line with ",yi.createElement("code",null,"show_rtlil")," ","in the demonstration program and comparing the Verilog and RTLIL code side-by-side!)")),yi.createElement("p",null,"The demonstration program includes examples of using all three functions. (Remember, you can always ",yi.createElement(Rh,{onClick:N},"reload it")," if you changed the source.)"),yi.createElement("p",null,"\u2014 ",yi.createElement(Rh,{href:"https://github.com/whitequark"},'Catherine "whitequark"')),yi.createElement("p",null,"P.S.: Everything you see on this page works within your browser, and the code you enter is never sent over the network. Yes, I run Python, Amaranth, and Yosys in the browser using ",yi.createElement(Rh,{href:"https://webassembly.org/"},"WebAssembly"),". How cool is that?"),yi.createElement("p",null,"The source code of the playground itself is ",yi.createElement(Rh,{href:"https://github.com/amaranth-lang/playground"},"available on GitHub"),"."))}),ie({key:"amaranth-source",title:"Amaranth Source",content:yi.createElement(Mie,{state:L.current,actions:[{id:"amaranth-playground.run",label:"Run Code",keybindings:[P6e.CtrlCmd|R6e.Enter],run:V}],padding:{top:10,bottom:10},focus:!0})})],K=(0,Ms.useRef)(f);return(0,Ms.useEffect)(()=>{f!=K.current&&(S(!0),k(!0)),K.current=f},[f]),m!==null&&fe.push(ie({key:"python-output",title:"Python Output",titleStyle:w?{textDecoration:"line-through"}:{},content:yi.createElement(Ah,{sx:{display:"flex",flexDirection:"column",height:"100%"}},w&&yi.createElement(nC,{variant:"soft",color:"warning",sx:{borderRadius:0}},"The Python output is out of date. Run the program again to refresh it."),yi.createElement(Ah,{className:"terminal-output",sx:{flexGrow:1,paddingX:2,paddingY:1}},qqt("python-output",m)))})),(0,Ms.useEffect)(()=>{m!==null&&_&&h("python-output"),v(m===null)},[m]),b!==null&&fe.push(ie({key:"waveforms",title:"Waveforms",titleStyle:x?{textDecoration:"line-through"}:{},content:yi.createElement(Ah,{sx:{display:"flex",flexDirection:"column",height:"100%"}},x&&yi.createElement(nC,{variant:"soft",color:"warning",sx:{borderRadius:0}},"The waveforms are out of date. Run the program again to refresh them."),yi.createElement(Ah,{sx:{flexGrow:1}},yi.createElement(Rmt,{data:b})))})),D!==null&&fe.push(ie({key:"rtlil-product",title:"Generated RTLIL",titleStyle:x?{textDecoration:"line-through"}:{},content:yi.createElement(Ah,{sx:{display:"flex",flexDirection:"column",height:"100%"}},x&&yi.createElement(nC,{variant:"soft",color:"warning",sx:{borderRadius:0}},"The generated RTLIL is out of date. Run the program again to refresh it."),yi.createElement(Ah,{sx:{flexGrow:1}},yi.createElement(Mie,{state:I.current,padding:{top:10,bottom:10},focus:!0})))})),A!==null&&fe.push(ie({key:"verilog-product",title:"Generated Verilog",titleStyle:x?{textDecoration:"line-through"}:{},content:yi.createElement(Ah,{sx:{display:"flex",flexDirection:"column",height:"100%"}},x&&yi.createElement(nC,{variant:"soft",color:"warning",sx:{borderRadius:0}},"The generated Verilog is out of date. Run the program again to refresh it."),yi.createElement(Ah,{sx:{flexGrow:1}},yi.createElement(Mie,{state:M.current,padding:{top:10,bottom:10},focus:!0})))})),yi.createElement(yi.Fragment,null,yi.createElement(Ah,{sx:{display:"flex",flexDirection:"column",width:"100vw",height:"100vh",padding:2,gap:2}},yi.createElement(Ah,{sx:{display:"flex",flexDirection:"row",gap:2}},yi.createElement(wB,{size:"lg",sx:{borderRadius:10},variant:"outlined",startDecorator:yi.createElement(iO.default,null),loading:r,onClick:()=>V()},"Run"),yi.createElement(Zce,{size:"lg",sx:{borderRadius:10},variant:"outlined",value:n,onChange:(oe,je)=>z(je)},t_.amaranthVersions.map(oe=>yi.createElement(Xce,{key:oe,value:oe},"Amaranth ",oe))),yi.createElement(Rh,{href:`https://amaranth-lang.org/docs/amaranth/${n}/`,target:"_blank"},"Open documentation")," ",yi.createElement(Ah,{sx:{flexGrow:1}}),yi.createElement(wB,{size:"lg",sx:{borderRadius:10},color:"neutral",variant:"outlined",endDecorator:yi.createElement(x9e.default,null),onClick:()=>l(!0)},"Share"),yi.createElement(tde,{anchorOrigin:{vertical:"top",horizontal:"right"},open:a,onClose:(oe,je)=>l(!1)},yi.createElement(Rh,{href:new URL("#"+btoa(JSON.stringify({av:n,s:f})),window.location.href).toString()},"Copy this link to share the source code")),yi.createElement(Gce,{size:"lg",sx:{borderRadius:10},variant:"outlined",onClick:()=>e(i==="light"?"dark":"light")},i==="light"?yi.createElement(S9e.default,null):yi.createElement(k9e.default,null))),yi.createElement(nde,{sx:{height:"100%"},value:u,onChange:(oe,je)=>h(je)},yi.createElement(ode,null,fe.map(([oe,je])=>oe)),fe.map(([oe,je])=>je))))}(0,Fmt.createRoot)(document.getElementById("root")).render(yi.createElement(oce,{defaultMode:"system"},yi.createElement(ace,null),yi.createElement(Gqt,null)));console.log("Build ID:","e2d41f268900953eed77ca775745f0917566ff52"); +`,jqt={"v0.5.4":oO,"v0.5.3":oO,"v0.5.2":oO,"v0.5.1":oO,"v0.5.0":oO,"v0.4.5":_ne,"v0.4.4":_ne,"v0.4.3":_ne,"v0.4.2":_ne},t_={amaranthVersions:Array.from(Object.keys(zmt)),pythonPackages:zmt,demoCode:jqt};function qqt(){let{hash:i}=window.location;if(i!==""){history.replaceState(null,""," ");let e=i.substring(1);try{return JSON.parse(atob(e))}catch{try{return JSON.parse(decodeURIComponent(e.replace("+","%20")))}catch{}}}}function Gqt(i,e){return e.map((t,n)=>yi.createElement("span",{key:`${i}-${n}`,className:`terminal-${t.stream}`},t.text))}function Kqt(){let{mode:i,setMode:e}=rce();(0,Ms.useEffect)(()=>$S.setTheme(i==="light"?"vs":"vs-dark"),[i]);let t=qqt(),[n,o]=(0,Ms.useState)(t?.av??localStorage.getItem("amaranth-playground.amaranthVersion")??t_.amaranthVersions[0]);(0,Ms.useEffect)(()=>localStorage.setItem("amaranth-playground.amaranthVersion",n),[n]);let[r,s]=(0,Ms.useState)(!1),[a,l]=(0,Ms.useState)(!1),[c,d]=(0,Ms.useState)(localStorage.getItem("amaranth-playground.tutorialDone")!==null);(0,Ms.useEffect)(()=>c?localStorage.setItem("amaranth-playground.tutorialDone",""):void 0,[c]);let[u,h]=(0,Ms.useState)(c?"amaranth-source":"tutorial"),[f,p]=(0,Ms.useState)(t?.s??localStorage.getItem("amaranth-playground.source")??t_.demoCode[n]);(0,Ms.useEffect)(()=>localStorage.setItem("amaranth-playground.source",f),[f]);let[m,y]=(0,Ms.useState)(null),[_,v]=(0,Ms.useState)(!0),[b,C]=(0,Ms.useState)(null),[w,S]=(0,Ms.useState)(!1),[x,k]=(0,Ms.useState)(!1),[D,E]=(0,Ms.useState)(null),[A,T]=(0,Ms.useState)(null),L=(0,Ms.useRef)(new mL(f,p,"python")),I=(0,Ms.useRef)(new mL(D,null,"rtlil"));(0,Ms.useEffect)(()=>{I.current.text=D??""},[D]);let M=(0,Ms.useRef)(new mL(A,null,"verilog"));(0,Ms.useEffect)(()=>{M.current.text=A??""},[A]);function N(){L.current.text=t_.demoCode[n],h("amaranth-source")}function z(oe){let je=L.current.text==t_.demoCode[n];o(oe),je&&(L.current.text=t_.demoCode[oe])}function F(){d(!0),h("amaranth-source")}let V=yi.useCallback(async()=>{if(!r)try{s(!0),m!==null&&y([]);let oe=!1,je=!1,Ae=!1;await Omt.runPython(f,{packages:t_.pythonPackages[n],onStdout:Be=>y(Ie=>(Ie??[]).concat([{stream:"stdout",text:Be}])),onStderr:Be=>y(Ie=>(Ie??[]).concat([{stream:"stderr",text:Be}])),onShowRtlil:Be=>{oe=!0,E(Be)},onShowVerilog:Be=>{je=!0,T(Be)},onShowWaveforms:Be=>{Ae=!0,C(Be)}}),D&&!oe&&(E(null),h(u==="rtlil-product"?"amaranth-source":u)),A&&!je&&(T(null),h(u==="verilog-product"?"amaranth-source":u)),b&&!Ae&&(C(null),h(u==="waveforms-product"?"amaranth-source":u)),k(!1)}catch(oe){if(oe instanceof tO)y(je=>(je??[]).concat([{stream:"stderr",text:oe.message}])),h("python-output");else throw oe}finally{s(!1),S(!1)}},[f,n]);function ie({key:oe,title:je,titleStyle:Ae={},content:Be}){return[yi.createElement(sde,{key:`${oe}-tab`,value:oe,style:Ae},je),yi.createElement(lde,{key:`${oe}-tabpanel`,value:oe,sx:{padding:0}},Be)]}let fe=[ie({key:"tutorial",title:yi.createElement(bne.default,null),content:yi.createElement(Ah,{sx:{padding:2,maxWidth:"80em"}},yi.createElement("p",null,"Hi there!"),yi.createElement("p",null,"On this page, you can experiment with the ",yi.createElement(Rh,{href:"https://amaranth-lang.org/"},"Amaranth")," hardware definition language: run a small program, watch its output, see the waveforms a simulation generates, look at the RTL the compiler produces, and share it with friends, if you like!"),yi.createElement("p",null,'To switch between views, use the tab bar right above this text. The tab with the "',yi.createElement(bne.default,{fontSize:"small"}),'" icon shows this tutorial. When you open this page, the only other visible tab will be "Amaranth Source", containing a demonstration program. Go ahead and open it! Then switch back to the tutorial by clicking ',yi.createElement(bne.default,{fontSize:"small"}),". (If the demonstration program doesn't appear, or if you edited it and now want to go back, you can ",yi.createElement(Rh,{onClick:N},"reload it"),".)"),yi.createElement("p",null,'The code you enter in the "Amaranth Source" tab is ordinary Python code that runs in an environment where the Amaranth Python package and its dependencies are already installed. You can write ',yi.createElement("code",null,"import amaranth"),` and start experimenting without any distractions. Once you're done, click the "`,yi.createElement(rO.default,{fontSize:"small"}),' Run" button in the top left, or press ',yi.createElement("kbd",null,"Ctrl"),"+",yi.createElement("kbd",null,"Enter")," while the editor is focused. Go ahead and try!"),yi.createElement("p",null,"You will see several new tabs appear:"),yi.createElement("ul",null,yi.createElement("li",null,'The "Python Output" tab contains the text from the standard output and standard error streams of the Python interpreter. If you run the ',yi.createElement("code",null,"print()")," function, this tab will contain the output. Any exceptions raised by the Python code will also be shown here."),yi.createElement("li",null,'The "Waveforms" tab visualizes how the values of signals change during the simulation. It appears only if the code includes a ',yi.createElement("code",null,"with amaranth_playground.show_waveforms(sim):")," statement. When you open the tab, the waveform viewer will display an overview of the entire simulation. You can scroll the mouse wheel to zoom, and drag the area with the waveforms with the left mouse button to move the viewport."),yi.createElement("li",null,'The "Generated Verilog" tab shows the output of the Amaranth compiler. It appears only if the code includes a ',yi.createElement("code",null,"amaranth_playground.show_verilog(...)")," ","statement.")),yi.createElement("p",null,`The contents of these tabs isn't automatically updated: you need to click the "`,yi.createElement(rO.default,{fontSize:"small"}),' Run" button every time you modify the code to see how the changes in it affect the results. Try changing something and clicking "',yi.createElement(rO.default,{fontSize:"small"}),' Run" now!'),yi.createElement("p",null,`The code you write in the "Amaranth Source" tab is automatically saved when you change it, so if you leave this page and come back to it later, it should be exactly as you left it. However, don't rely on it to save your important code: only one copy of the code is saved, so if you open this page in several browser tabs or windows, all but one programs will be lost.`),yi.createElement("p",null,'If you click the "',yi.createElement(x9e.default,{fontSize:"small"}),` Share" button in the top right corner of this page, a popup with a link will appear right there. This link contains a copy of the source code you entered (and the Amaranth version you're using). You can bookmark it, or send it to someone else. When you click on the link, the code you're currently editing will be erased and replaced with the code contained in the link.`),yi.createElement("p",null,'The button with the "',i==="light"?yi.createElement(S9e.default,{fontSize:"small"}):yi.createElement(k9e.default,{fontSize:"small"}),'" icon in the top right corner switches the color theme to use a ',i==="light"?"dark":"light"," background instead. For now, the waveform viewer always uses a dark background."),yi.createElement("p",null,"Have fun! You can now ",yi.createElement(Rh,{onClick:F},"mark the tutorial as complete")," ","and start experimenting, or continue reading if you want to know more details. If you want to see your design run on a real development board, try the ",yi.createElement(Rh,{href:"https://marketplace.visualstudio.com/items?itemName=yowasp.toolchain"},"YoWASP Toolchain")," extension for Visual Studio Code; it provides an end-to-end FPGA toolchain for the popular iCE40 and ECP5 FPGA families entirely in the browser. ","usb"in navigator?yi.createElement(yi.Fragment,null):yi.createElement(yi.Fragment,null,"(Your browser does not support WebUSB, so you will need to use a different browser or install a flashing utility separately.)")),yi.createElement("p",null,"The only functionality available in this playground that isn't a part of the Amaranth Python package or its dependencies is the ",yi.createElement("code",null,"amaranth_playground")," Python module. This built-in module provides three functions that are used to display the results of running a program in a separate tab and in the suitable format:"),yi.createElement("ul",null,yi.createElement("li",null,yi.createElement("code",null,"with amaranth_playground.show_waveforms(sim):")," displays waveforms by calling ",yi.createElement("code",null,"with sim.write_vcd(vcd_file=...)")," internally and then converting the VCD data to a format suitable for the interactive viewer."),yi.createElement("li",null,yi.createElement("code",null,"amaranth_playground.show_verilog(verilog.convert(m))")," displays Verilog code. This code is accepted by all FPGA and ASIC toolchains, and can be used to run Amaranth on essentially any hardware platform or RTL simulator."),yi.createElement("li",null,yi.createElement("code",null,"amaranth_playground.show_rtlil(rtlil.convert(m))")," displays ",yi.createElement(Rh,{href:"https://yosyshq.readthedocs.io/projects/yosys/en/latest/yosys_internals/formats/rtlil_rep.html"},"RTLIL code"),", the ",yi.createElement(Rh,{href:"https://yosyshq.net"},"Yosys")," intermediate representation. This code is accepted by the open-source FPGA toolchain, and is used internally by the Amaranth compiler to produce Verilog code. Unless you are investigating a problem with the Amaranth compiler itself, the only reason to look at it is curiosity. (Which is a very good reason; try uncommenting the line with ",yi.createElement("code",null,"show_rtlil")," ","in the demonstration program and comparing the Verilog and RTLIL code side-by-side!)")),yi.createElement("p",null,"The demonstration program includes examples of using all three functions. (Remember, you can always ",yi.createElement(Rh,{onClick:N},"reload it")," if you changed the source.)"),yi.createElement("p",null,"\u2014 ",yi.createElement(Rh,{href:"https://github.com/whitequark"},'Catherine "whitequark"')),yi.createElement("p",null,"P.S.: Everything you see on this page works within your browser, and the code you enter is never sent over the network. Yes, I run Python, Amaranth, and Yosys in the browser using ",yi.createElement(Rh,{href:"https://webassembly.org/"},"WebAssembly"),". How cool is that?"),yi.createElement("p",null,"The source code of the playground itself is ",yi.createElement(Rh,{href:"https://github.com/amaranth-lang/playground"},"available on GitHub"),"."))}),ie({key:"amaranth-source",title:"Amaranth Source",content:yi.createElement(Rie,{state:L.current,actions:[{id:"amaranth-playground.run",label:"Run Code",keybindings:[P6e.CtrlCmd|R6e.Enter],run:V}],padding:{top:10,bottom:10},focus:!0})})],K=(0,Ms.useRef)(f);return(0,Ms.useEffect)(()=>{f!=K.current&&(S(!0),k(!0)),K.current=f},[f]),m!==null&&fe.push(ie({key:"python-output",title:"Python Output",titleStyle:w?{textDecoration:"line-through"}:{},content:yi.createElement(Ah,{sx:{display:"flex",flexDirection:"column",height:"100%"}},w&&yi.createElement(nC,{variant:"soft",color:"warning",sx:{borderRadius:0}},"The Python output is out of date. Run the program again to refresh it."),yi.createElement(Ah,{className:"terminal-output",sx:{flexGrow:1,paddingX:2,paddingY:1}},Gqt("python-output",m)))})),(0,Ms.useEffect)(()=>{m!==null&&_&&h("python-output"),v(m===null)},[m]),b!==null&&fe.push(ie({key:"waveforms",title:"Waveforms",titleStyle:x?{textDecoration:"line-through"}:{},content:yi.createElement(Ah,{sx:{display:"flex",flexDirection:"column",height:"100%"}},x&&yi.createElement(nC,{variant:"soft",color:"warning",sx:{borderRadius:0}},"The waveforms are out of date. Run the program again to refresh them."),yi.createElement(Ah,{sx:{flexGrow:1}},yi.createElement(Rmt,{data:b})))})),D!==null&&fe.push(ie({key:"rtlil-product",title:"Generated RTLIL",titleStyle:x?{textDecoration:"line-through"}:{},content:yi.createElement(Ah,{sx:{display:"flex",flexDirection:"column",height:"100%"}},x&&yi.createElement(nC,{variant:"soft",color:"warning",sx:{borderRadius:0}},"The generated RTLIL is out of date. Run the program again to refresh it."),yi.createElement(Ah,{sx:{flexGrow:1}},yi.createElement(Rie,{state:I.current,padding:{top:10,bottom:10},focus:!0})))})),A!==null&&fe.push(ie({key:"verilog-product",title:"Generated Verilog",titleStyle:x?{textDecoration:"line-through"}:{},content:yi.createElement(Ah,{sx:{display:"flex",flexDirection:"column",height:"100%"}},x&&yi.createElement(nC,{variant:"soft",color:"warning",sx:{borderRadius:0}},"The generated Verilog is out of date. Run the program again to refresh it."),yi.createElement(Ah,{sx:{flexGrow:1}},yi.createElement(Rie,{state:M.current,padding:{top:10,bottom:10},focus:!0})))})),yi.createElement(yi.Fragment,null,yi.createElement(Ah,{sx:{display:"flex",flexDirection:"column",width:"100vw",height:"100vh",padding:2,gap:2}},yi.createElement(Ah,{sx:{display:"flex",flexDirection:"row",gap:2}},yi.createElement(kB,{size:"lg",sx:{borderRadius:10},variant:"outlined",startDecorator:yi.createElement(rO.default,null),loading:r,onClick:()=>V()},"Run"),yi.createElement(Zce,{size:"lg",sx:{borderRadius:10},variant:"outlined",value:n,onChange:(oe,je)=>z(je)},t_.amaranthVersions.map(oe=>yi.createElement(Xce,{key:oe,value:oe},"Amaranth ",oe))),yi.createElement(Rh,{href:`https://amaranth-lang.org/docs/amaranth/${n}/`,target:"_blank"},"Open documentation")," ",yi.createElement(Ah,{sx:{flexGrow:1}}),yi.createElement(kB,{size:"lg",sx:{borderRadius:10},color:"neutral",variant:"outlined",endDecorator:yi.createElement(x9e.default,null),onClick:()=>l(!0)},"Share"),yi.createElement(tde,{anchorOrigin:{vertical:"top",horizontal:"right"},open:a,onClose:(oe,je)=>l(!1)},yi.createElement(Rh,{href:new URL("#"+btoa(JSON.stringify({av:n,s:f})),window.location.href).toString()},"Copy this link to share the source code")),yi.createElement(Gce,{size:"lg",sx:{borderRadius:10},variant:"outlined",onClick:()=>e(i==="light"?"dark":"light")},i==="light"?yi.createElement(S9e.default,null):yi.createElement(k9e.default,null))),yi.createElement(nde,{sx:{height:"100%"},value:u,onChange:(oe,je)=>h(je)},yi.createElement(ode,null,fe.map(([oe,je])=>oe)),fe.map(([oe,je])=>je))))}(0,Fmt.createRoot)(document.getElementById("root")).render(yi.createElement(oce,{defaultMode:"system"},yi.createElement(ace,null),yi.createElement(Kqt,null)));console.log("Build ID:","b8ce2f8108a3a54fb69b724955dde37fbd482bac"); /*! Bundled license information: react/cjs/react.production.min.js: diff --git a/play/app.js.map b/play/app.js.map index 49b89d18..ef12a440 100644 --- a/play/app.js.map +++ b/play/app.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../node_modules/react/cjs/react.production.min.js", "../node_modules/react/index.js", "../node_modules/scheduler/cjs/scheduler.production.min.js", "../node_modules/scheduler/index.js", "../node_modules/react-dom/cjs/react-dom.production.min.js", "../node_modules/react-dom/index.js", "../node_modules/react-dom/client.js", "../node_modules/@babel/runtime/helpers/interopRequireDefault.js", "../node_modules/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.js", "../node_modules/@mui/utils/formatMuiErrorMessage/index.js", "../node_modules/@babel/runtime/helpers/esm/extends.js", "../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js", "../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js", "../node_modules/@emotion/sheet/dist/emotion-sheet.esm.js", "../node_modules/stylis/src/Enum.js", "../node_modules/stylis/src/Utility.js", "../node_modules/stylis/src/Tokenizer.js", "../node_modules/stylis/src/Parser.js", "../node_modules/stylis/src/Prefixer.js", "../node_modules/stylis/src/Serializer.js", "../node_modules/stylis/src/Middleware.js", "../node_modules/stylis/index.js", "../node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js", "../node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js", "../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js", "../node_modules/hoist-non-react-statics/node_modules/react-is/index.js", "../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js", "../node_modules/@emotion/react/_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js", "../node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js", "../node_modules/@emotion/hash/dist/emotion-hash.esm.js", "../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js", "../node_modules/@emotion/serialize/dist/emotion-serialize.esm.js", "../node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js", "../node_modules/@emotion/react/dist/emotion-element-5486c51c.browser.esm.js", "../node_modules/@emotion/react/dist/emotion-react.browser.esm.js", "../node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js", "../node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js", "../node_modules/prop-types/lib/ReactPropTypesSecret.js", "../node_modules/prop-types/factoryWithThrowingShims.js", "../node_modules/prop-types/index.js", "../node_modules/react/cjs/react-jsx-runtime.production.min.js", "../node_modules/react/jsx-runtime.js", "../node_modules/@mui/styled-engine/node/StyledEngineProvider/StyledEngineProvider.js", "../node_modules/@mui/styled-engine/node/StyledEngineProvider/index.js", "../node_modules/@mui/styled-engine/node/GlobalStyles/GlobalStyles.js", "../node_modules/@mui/styled-engine/node/GlobalStyles/index.js", "../node_modules/@mui/styled-engine/node/index.js", "../node_modules/@babel/runtime/helpers/extends.js", "../node_modules/@mui/utils/deepmerge/deepmerge.js", "../node_modules/@mui/utils/deepmerge/index.js", "../node_modules/@mui/utils/capitalize/capitalize.js", "../node_modules/@mui/utils/capitalize/index.js", "../node_modules/@mui/utils/ClassNameGenerator/ClassNameGenerator.js", "../node_modules/@mui/utils/ClassNameGenerator/index.js", "../node_modules/@mui/utils/generateUtilityClass/generateUtilityClass.js", "../node_modules/@mui/utils/generateUtilityClass/index.js", "../node_modules/@mui/utils/generateUtilityClasses/generateUtilityClasses.js", "../node_modules/@mui/utils/generateUtilityClasses/index.js", "../node_modules/react-is/cjs/react-is.production.min.js", "../node_modules/react-is/index.js", "../node_modules/@mui/utils/getDisplayName/getDisplayName.js", "../node_modules/@mui/utils/getDisplayName/index.js", "../node_modules/@mui/utils/resolveProps/resolveProps.js", "../node_modules/@mui/utils/resolveProps/index.js", "../node_modules/@mui/utils/useEnhancedEffect/useEnhancedEffect.js", "../node_modules/@mui/utils/useEnhancedEffect/index.js", "../node_modules/@mui/utils/clamp/clamp.js", "../node_modules/@mui/utils/clamp/index.js", "../node_modules/@mui/utils/chainPropTypes/chainPropTypes.js", "../node_modules/@mui/utils/chainPropTypes/index.js", "../node_modules/@mui/utils/elementAcceptingRef/elementAcceptingRef.js", "../node_modules/@mui/utils/elementAcceptingRef/index.js", "../node_modules/@mui/utils/elementTypeAcceptingRef/elementTypeAcceptingRef.js", "../node_modules/@mui/utils/elementTypeAcceptingRef/index.js", "../node_modules/@mui/utils/exactProp/exactProp.js", "../node_modules/@mui/utils/exactProp/index.js", "../node_modules/@mui/utils/HTMLElementType/HTMLElementType.js", "../node_modules/@mui/utils/HTMLElementType/index.js", "../node_modules/@mui/utils/ponyfillGlobal/ponyfillGlobal.js", "../node_modules/@mui/utils/ponyfillGlobal/index.js", "../node_modules/@mui/utils/refType/refType.js", "../node_modules/@mui/utils/refType/index.js", "../node_modules/@mui/utils/createChainedFunction/createChainedFunction.js", "../node_modules/@mui/utils/createChainedFunction/index.js", "../node_modules/@mui/utils/debounce/debounce.js", "../node_modules/@mui/utils/debounce/index.js", "../node_modules/@mui/utils/deprecatedPropType/deprecatedPropType.js", "../node_modules/@mui/utils/deprecatedPropType/index.js", "../node_modules/@mui/utils/isMuiElement/isMuiElement.js", "../node_modules/@mui/utils/isMuiElement/index.js", "../node_modules/@mui/utils/ownerDocument/ownerDocument.js", "../node_modules/@mui/utils/ownerDocument/index.js", "../node_modules/@mui/utils/ownerWindow/ownerWindow.js", "../node_modules/@mui/utils/ownerWindow/index.js", "../node_modules/@mui/utils/requirePropFactory/requirePropFactory.js", "../node_modules/@mui/utils/requirePropFactory/index.js", "../node_modules/@mui/utils/setRef/setRef.js", "../node_modules/@mui/utils/setRef/index.js", "../node_modules/@mui/utils/useId/useId.js", "../node_modules/@mui/utils/useId/index.js", "../node_modules/@mui/utils/unsupportedProp/unsupportedProp.js", "../node_modules/@mui/utils/unsupportedProp/index.js", "../node_modules/@mui/utils/useControlled/useControlled.js", "../node_modules/@mui/utils/useControlled/index.js", "../node_modules/@mui/utils/useEventCallback/useEventCallback.js", "../node_modules/@mui/utils/useEventCallback/index.js", "../node_modules/@mui/utils/useForkRef/useForkRef.js", "../node_modules/@mui/utils/useForkRef/index.js", "../node_modules/@mui/utils/useLazyRef/useLazyRef.js", "../node_modules/@mui/utils/useLazyRef/index.js", "../node_modules/@mui/utils/useOnMount/useOnMount.js", "../node_modules/@mui/utils/useTimeout/useTimeout.js", "../node_modules/@mui/utils/useTimeout/index.js", "../node_modules/@mui/utils/useOnMount/index.js", "../node_modules/@mui/utils/useIsFocusVisible/useIsFocusVisible.js", "../node_modules/@mui/utils/useIsFocusVisible/index.js", "../node_modules/@mui/utils/getScrollbarSize/getScrollbarSize.js", "../node_modules/@mui/utils/getScrollbarSize/index.js", "../node_modules/@mui/utils/scrollLeft/scrollLeft.js", "../node_modules/@mui/utils/scrollLeft/index.js", "../node_modules/@mui/utils/usePreviousProps/usePreviousProps.js", "../node_modules/@mui/utils/usePreviousProps/index.js", "../node_modules/@mui/utils/getValidReactChildren/getValidReactChildren.js", "../node_modules/@mui/utils/getValidReactChildren/index.js", "../node_modules/@mui/utils/visuallyHidden/visuallyHidden.js", "../node_modules/@mui/utils/visuallyHidden/index.js", "../node_modules/@mui/utils/integerPropType/integerPropType.js", "../node_modules/@mui/utils/integerPropType/index.js", "../node_modules/@mui/utils/composeClasses/composeClasses.js", "../node_modules/@mui/utils/composeClasses/index.js", "../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js", "../node_modules/@mui/utils/isHostComponent/isHostComponent.js", "../node_modules/@mui/utils/isHostComponent/index.js", "../node_modules/@mui/utils/appendOwnerState/appendOwnerState.js", "../node_modules/@mui/utils/appendOwnerState/index.js", "../node_modules/clsx/dist/clsx.js", "../node_modules/@mui/utils/extractEventHandlers/extractEventHandlers.js", "../node_modules/@mui/utils/extractEventHandlers/index.js", "../node_modules/@mui/utils/omitEventHandlers/omitEventHandlers.js", "../node_modules/@mui/utils/omitEventHandlers/index.js", "../node_modules/@mui/utils/mergeSlotProps/mergeSlotProps.js", "../node_modules/@mui/utils/mergeSlotProps/index.js", "../node_modules/@mui/utils/resolveComponentProps/resolveComponentProps.js", "../node_modules/@mui/utils/resolveComponentProps/index.js", "../node_modules/@mui/utils/useSlotProps/useSlotProps.js", "../node_modules/@mui/utils/useSlotProps/index.js", "../node_modules/@mui/utils/types.js", "../node_modules/@mui/utils/index.js", "../node_modules/@mui/system/createTheme/createBreakpoints.js", "../node_modules/@mui/system/createTheme/shape.js", "../node_modules/@mui/system/responsivePropType.js", "../node_modules/@mui/system/merge.js", "../node_modules/@mui/system/breakpoints.js", "../node_modules/@mui/system/style.js", "../node_modules/@mui/system/memoize.js", "../node_modules/@mui/system/spacing.js", "../node_modules/@mui/system/createTheme/createSpacing.js", "../node_modules/@mui/system/compose.js", "../node_modules/@mui/system/borders.js", "../node_modules/@mui/system/cssGrid.js", "../node_modules/@mui/system/palette.js", "../node_modules/@mui/system/sizing.js", "../node_modules/@mui/system/styleFunctionSx/defaultSxConfig.js", "../node_modules/@mui/system/styleFunctionSx/styleFunctionSx.js", "../node_modules/@mui/system/createTheme/applyStyles.js", "../node_modules/@mui/system/createTheme/createTheme.js", "../node_modules/@mui/system/createTheme/index.js", "../node_modules/@mui/material/node/utils/capitalize.js", "../node_modules/@mui/material/node/utils/createChainedFunction.js", "../node_modules/@mui/system/DefaultPropsProvider/DefaultPropsProvider.js", "../node_modules/@mui/system/DefaultPropsProvider/index.js", "../node_modules/@mui/material/node/DefaultPropsProvider/DefaultPropsProvider.js", "../node_modules/@mui/material/node/DefaultPropsProvider/index.js", "../node_modules/@mui/system/styleFunctionSx/extendSxProp.js", "../node_modules/@mui/system/styleFunctionSx/index.js", "../node_modules/@mui/system/createStyled.js", "../node_modules/@mui/material/node/styles/createMixins.js", "../node_modules/@mui/system/colorManipulator.js", "../node_modules/@mui/material/node/colors/common.js", "../node_modules/@mui/material/node/colors/grey.js", "../node_modules/@mui/material/node/colors/purple.js", "../node_modules/@mui/material/node/colors/red.js", "../node_modules/@mui/material/node/colors/orange.js", "../node_modules/@mui/material/node/colors/blue.js", "../node_modules/@mui/material/node/colors/lightBlue.js", "../node_modules/@mui/material/node/colors/green.js", "../node_modules/@mui/material/node/styles/createPalette.js", "../node_modules/@mui/material/node/styles/createTypography.js", "../node_modules/@mui/material/node/styles/shadows.js", "../node_modules/@mui/material/node/styles/createTransitions.js", "../node_modules/@mui/material/node/styles/zIndex.js", "../node_modules/@mui/material/node/styles/createTheme.js", "../node_modules/@mui/material/node/styles/defaultTheme.js", "../node_modules/@mui/material/node/styles/identifier.js", "../node_modules/@mui/material/node/styles/slotShouldForwardProp.js", "../node_modules/@mui/material/node/styles/rootShouldForwardProp.js", "../node_modules/@mui/material/node/styles/styled.js", "../node_modules/@mui/material/node/SvgIcon/svgIconClasses.js", "../node_modules/@mui/material/node/SvgIcon/SvgIcon.js", "../node_modules/@mui/material/node/SvgIcon/index.js", "../node_modules/@mui/material/node/utils/createSvgIcon.js", "../node_modules/@mui/material/node/utils/debounce.js", "../node_modules/@mui/material/node/utils/deprecatedPropType.js", "../node_modules/@mui/material/node/utils/isMuiElement.js", "../node_modules/@mui/material/node/utils/ownerDocument.js", "../node_modules/@mui/material/node/utils/ownerWindow.js", "../node_modules/@mui/material/node/utils/requirePropFactory.js", "../node_modules/@mui/material/node/utils/setRef.js", "../node_modules/@mui/material/node/utils/useEnhancedEffect.js", "../node_modules/@mui/material/node/utils/useId.js", "../node_modules/@mui/material/node/utils/unsupportedProp.js", "../node_modules/@mui/material/node/utils/useControlled.js", "../node_modules/@mui/material/node/utils/useEventCallback.js", "../node_modules/@mui/material/node/utils/useForkRef.js", "../node_modules/@mui/material/node/utils/useIsFocusVisible.js", "../node_modules/@mui/material/node/utils/index.js", "../node_modules/@mui/icons-material/utils/createSvgIcon.js", "../node_modules/@mui/icons-material/PlayArrow.js", "../node_modules/@mui/icons-material/Share.js", "../node_modules/@mui/icons-material/DarkMode.js", "../node_modules/@mui/icons-material/LightMode.js", "../node_modules/@mui/icons-material/QuestionMark.js", "../node_modules/monaco-editor/esm/vs/base/common/arrays.js", "../node_modules/monaco-editor/esm/vs/base/common/types.js", "../node_modules/monaco-editor/esm/vs/base/common/objects.js", "../node_modules/monaco-editor/esm/vs/nls.js", "../node_modules/monaco-editor/esm/vs/base/common/platform.js", "../node_modules/monaco-editor/esm/vs/editor/common/core/textModelDefaults.js", "../node_modules/monaco-editor/esm/vs/base/common/iterator.js", "../node_modules/monaco-editor/esm/vs/base/common/linkedList.js", "../node_modules/monaco-editor/esm/vs/editor/common/core/wordHelper.js", "../node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js", "../node_modules/monaco-editor/esm/vs/base/common/errors.js", "../node_modules/monaco-editor/esm/vs/base/common/functional.js", "../node_modules/monaco-editor/esm/vs/base/common/lifecycle.js", "../node_modules/monaco-editor/esm/vs/base/common/stopwatch.js", "../node_modules/monaco-editor/esm/vs/base/common/event.js", "../node_modules/monaco-editor/esm/vs/base/common/cancellation.js", "../node_modules/monaco-editor/esm/vs/base/common/keyCodes.js", "../node_modules/monaco-editor/esm/vs/base/common/process.js", "../node_modules/monaco-editor/esm/vs/base/common/path.js", "../node_modules/monaco-editor/esm/vs/base/common/uri.js", "../node_modules/monaco-editor/esm/vs/editor/common/core/position.js", "../node_modules/monaco-editor/esm/vs/editor/common/core/range.js", "../node_modules/monaco-editor/esm/vs/editor/common/core/selection.js", "../node_modules/monaco-editor/esm/vs/base/common/codicons.js", "../node_modules/monaco-editor/esm/vs/editor/common/tokenizationRegistry.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages.js", "../node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/editorBaseApi.js", "../node_modules/monaco-editor/esm/vs/base/browser/window.js", "../node_modules/monaco-editor/esm/vs/base/common/cache.js", "../node_modules/monaco-editor/esm/vs/base/common/lazy.js", "../node_modules/monaco-editor/esm/vs/base/common/strings.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css", "../node_modules/monaco-editor/esm/vs/base/browser/browser.js", "../node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js", "../node_modules/monaco-editor/esm/vs/editor/browser/config/domFontInfo.js", "../node_modules/monaco-editor/esm/vs/editor/browser/config/charWidthReader.js", "../node_modules/monaco-editor/esm/vs/editor/common/config/editorZoom.js", "../node_modules/monaco-editor/esm/vs/editor/common/config/fontInfo.js", "../node_modules/monaco-editor/esm/vs/editor/browser/config/fontMeasurements.js", "../node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js", "../node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/model.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js", "../node_modules/monaco-editor/esm/vs/base/common/actions.js", "../node_modules/monaco-editor/esm/vs/base/common/themables.js", "../node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js", "../node_modules/monaco-editor/esm/vs/platform/contextkey/common/scanner.js", "../node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js", "../node_modules/monaco-editor/esm/vs/base/common/keybindings.js", "../node_modules/monaco-editor/esm/vs/base/common/assert.js", "../node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js", "../node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js", "../node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js", "../node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js", "../node_modules/monaco-editor/esm/vs/platform/log/common/log.js", "../node_modules/monaco-editor/esm/vs/base/browser/canIUse.js", "../node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js", "../node_modules/monaco-editor/esm/vs/base/browser/iframe.js", "../node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js", "../node_modules/monaco-editor/esm/vs/base/common/symbols.js", "../node_modules/monaco-editor/esm/vs/base/common/async.js", "../node_modules/monaco-editor/esm/vs/base/browser/dompurify/dompurify.js", "../node_modules/monaco-editor/esm/vs/base/common/network.js", "../node_modules/monaco-editor/esm/vs/base/common/hash.js", "../node_modules/monaco-editor/esm/vs/base/browser/dom.js", "../node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js", "../node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js", "../node_modules/monaco-editor/esm/vs/base/browser/trustedTypes.js", "../node_modules/monaco-editor/esm/vs/base/browser/defaultWorkerFactory.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/languageConfiguration.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/supports.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/supports/characterPair.js", "../node_modules/monaco-editor/esm/vs/base/common/buffer.js", "../node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/supports/richEditBrackets.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/supports/electricCharacter.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/supports/indentRules.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/supports/onEnter.js", "../node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/language.js", "../node_modules/monaco-editor/esm/vs/platform/instantiation/common/descriptors.js", "../node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js", "../node_modules/monaco-editor/esm/vs/base/common/mime.js", "../node_modules/monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js", "../node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/modesRegistry.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/supports/languageBracketsConfiguration.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/languageConfigurationRegistry.js", "../node_modules/monaco-editor/esm/vs/base/common/diff/diffChange.js", "../node_modules/monaco-editor/esm/vs/base/common/diff/diff.js", "../node_modules/monaco-editor/esm/vs/base/common/uint.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/prefixSumComputer.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/mirrorTextModel.js", "../node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/linkComputer.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/supports/inplaceReplaceSupport.js", "../node_modules/monaco-editor/esm/vs/editor/common/core/wordCharacterClassifier.js", "../node_modules/monaco-editor/esm/vs/editor/common/model.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter.js", "../node_modules/monaco-editor/esm/vs/editor/common/diff/linesDiffComputer.js", "../node_modules/monaco-editor/esm/vs/editor/common/core/offsetRange.js", "../node_modules/monaco-editor/esm/vs/base/common/arraysFind.js", "../node_modules/monaco-editor/esm/vs/editor/common/core/lineRange.js", "../node_modules/monaco-editor/esm/vs/editor/common/diff/rangeMapping.js", "../node_modules/monaco-editor/esm/vs/editor/common/diff/legacyLinesDiffComputer.js", "../node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/diffAlgorithm.js", "../node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/utils.js", "../node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/dynamicProgrammingDiffing.js", "../node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/myersDiffAlgorithm.js", "../node_modules/monaco-editor/esm/vs/base/common/map.js", "../node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence.js", "../node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/computeMovedLines.js", "../node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations.js", "../node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/lineSequence.js", "../node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js", "../node_modules/monaco-editor/esm/vs/editor/common/diff/linesDiffComputers.js", "../node_modules/monaco-editor/esm/vs/base/common/color.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/languageFeatures.js", "../node_modules/monaco-editor/esm/vs/editor/browser/services/editorWorkerService.js", "../node_modules/monaco-editor/esm/vs/editor/browser/services/webWorker.js", "../node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/nullTokenize.js", "../node_modules/monaco-editor/esm/vs/editor/common/encodedTokenAttributes.js", "../node_modules/monaco-editor/esm/vs/editor/common/tokens/lineTokens.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewLayout/lineDecorations.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewLayout/linePart.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLineRenderer.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewModel.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCommon.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchLexer.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/colorizer.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/markerDecorations.js", "../node_modules/monaco-editor/esm/vs/editor/browser/services/markerDecorations.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css", "../node_modules/monaco-editor/esm/vs/editor/browser/config/elementSizeObserver.js", "../node_modules/monaco-editor/esm/vs/editor/browser/config/migrateOptions.js", "../node_modules/monaco-editor/esm/vs/editor/browser/config/tabFocus.js", "../node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js", "../node_modules/monaco-editor/esm/vs/editor/browser/config/editorConfiguration.js", "../node_modules/monaco-editor/esm/vs/base/browser/performance.js", "../node_modules/monaco-editor/esm/vs/base/browser/globalPointerMoveMonitor.js", "../node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js", "../node_modules/monaco-editor/esm/vs/editor/browser/editorDom.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewEventHandler.js", "../node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js", "../node_modules/monaco-editor/esm/vs/editor/browser/view/renderingContext.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/rangeUtil.js", "../node_modules/monaco-editor/esm/vs/platform/theme/common/theme.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLine.js", "../node_modules/monaco-editor/esm/vs/editor/common/core/cursorColumns.js", "../node_modules/monaco-editor/esm/vs/editor/common/cursor/cursorAtomicMoveOperations.js", "../node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js", "../node_modules/monaco-editor/esm/vs/base/common/decorators.js", "../node_modules/monaco-editor/esm/vs/base/browser/touch.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/abstractScrollbar.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarState.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/horizontalScrollbar.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/verticalScrollbar.js", "../node_modules/monaco-editor/esm/vs/base/common/scrollable.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js", "../node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseHandler.js", "../node_modules/monaco-editor/esm/vs/base/browser/event.js", "../node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaState.js", "../node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaInput.js", "../node_modules/monaco-editor/esm/vs/editor/browser/controller/pointerHandler.js", "../node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css", "../node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js", "../node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js", "../node_modules/monaco-editor/esm/vs/editor/common/core/editorColorRegistry.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/margin/margin.css", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/margin/margin.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js", "../node_modules/monaco-editor/esm/vs/base/common/ime.js", "../node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js", "../node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.js", "../node_modules/monaco-editor/esm/vs/editor/common/core/indentation.js", "../node_modules/monaco-editor/esm/vs/editor/common/cursorCommon.js", "../node_modules/monaco-editor/esm/vs/editor/common/cursor/cursorColumnSelection.js", "../node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js", "../node_modules/monaco-editor/esm/vs/editor/common/cursor/cursorMoveOperations.js", "../node_modules/monaco-editor/esm/vs/editor/common/cursor/cursorDeleteOperations.js", "../node_modules/monaco-editor/esm/vs/editor/common/cursor/cursorWordOperations.js", "../node_modules/monaco-editor/esm/vs/editor/common/cursor/cursorMoveCommands.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/enterAction.js", "../node_modules/monaco-editor/esm/vs/editor/common/commands/shiftCommand.js", "../node_modules/monaco-editor/esm/vs/editor/common/commands/surroundSelectionCommand.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/autoIndent.js", "../node_modules/monaco-editor/esm/vs/editor/common/cursor/cursorTypeOperations.js", "../node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js", "../node_modules/monaco-editor/esm/vs/editor/browser/coreCommands.js", "../node_modules/monaco-editor/esm/vs/editor/browser/view/viewController.js", "../node_modules/monaco-editor/esm/vs/editor/browser/view/viewLayer.js", "../node_modules/monaco-editor/esm/vs/editor/browser/view/viewOverlays.js", "../node_modules/monaco-editor/esm/vs/editor/browser/view/viewUserInputEvents.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/blockDecorations/blockDecorations.css", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/blockDecorations/blockDecorations.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css", "../node_modules/monaco-editor/esm/vs/editor/common/model/textModelPart.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/utils.js", "../node_modules/monaco-editor/esm/vs/editor/common/textModelGuides.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/guidesTextModelPart.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/domReadingContext.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css", "../node_modules/monaco-editor/esm/vs/editor/common/core/rgba.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewModel/minimapTokensColorTracker.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharSheet.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRenderer.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapPreBaked.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRendererFactory.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewModel/overviewZoneManager.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewZones/viewZones.js", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/whitespace/whitespace.css", "../node_modules/monaco-editor/esm/vs/editor/browser/viewParts/whitespace/whitespace.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLinesViewportData.js", "../node_modules/monaco-editor/esm/vs/editor/common/editorTheme.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewContext.js", "../node_modules/monaco-editor/esm/vs/editor/browser/view.js", "../node_modules/monaco-editor/esm/vs/editor/common/editorAction.js", "../node_modules/monaco-editor/esm/vs/editor/common/core/eolCounter.js", "../node_modules/monaco-editor/esm/vs/editor/common/textModelBracketPairs.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/beforeEditPositionMapper.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/ast.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/tokenizer.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/brackets.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/concat23Trees.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/nodeReader.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/parser.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/combineTextEditInfos.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/bracketPairsTree.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/colorizedBracketPairsDecorationProvider.js", "../node_modules/monaco-editor/esm/vs/editor/common/core/textChange.js", "../node_modules/monaco-editor/esm/vs/base/common/extpath.js", "../node_modules/monaco-editor/esm/vs/base/common/resources.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/editStack.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/indentationGuesser.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/intervalTree.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/fixedArray.js", "../node_modules/monaco-editor/esm/vs/editor/common/tokens/contiguousMultilineTokens.js", "../node_modules/monaco-editor/esm/vs/editor/common/tokens/contiguousMultilineTokensBuilder.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/textModelTokens.js", "../node_modules/monaco-editor/esm/vs/editor/common/tokens/contiguousTokensEditing.js", "../node_modules/monaco-editor/esm/vs/editor/common/tokens/contiguousTokensStore.js", "../node_modules/monaco-editor/esm/vs/editor/common/tokens/sparseTokensStore.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/tokenizationTextModelPart.js", "../node_modules/monaco-editor/esm/vs/editor/common/textModelEvents.js", "../node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedo.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js", "../node_modules/monaco-editor/esm/vs/editor/common/cursor/oneCursor.js", "../node_modules/monaco-editor/esm/vs/editor/common/cursor/cursorCollection.js", "../node_modules/monaco-editor/esm/vs/editor/common/cursor/cursorContext.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewEvents.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewModelEventDispatcher.js", "../node_modules/monaco-editor/esm/vs/editor/common/cursor/cursor.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/textToHtmlTokenizer.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewLayout/linesLayout.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLayout.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelDecorations.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewModel/modelLineProjection.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelLines.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewModel/glyphLanesModel.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelImpl.js", "../node_modules/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js", "../node_modules/monaco-editor/esm/vs/base/common/severity.js", "../node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js", "../node_modules/monaco-editor/esm/vs/editor/common/modelLineProjectionData.js", "../node_modules/monaco-editor/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js", "../node_modules/monaco-editor/esm/vs/editor/browser/view/domLineBreaksComputer.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorContributions.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js", "../node_modules/monaco-editor/esm/vs/editor/browser/services/abstractCodeEditorService.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditorService.js", "../node_modules/monaco-editor/esm/vs/platform/layout/browser/layoutService.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneLayoutService.js", "../node_modules/monaco-editor/esm/vs/platform/dialogs/common/dialogs.js", "../node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedoService.js", "../node_modules/monaco-editor/esm/vs/base/common/numbers.js", "../node_modules/monaco-editor/esm/vs/platform/environment/common/environment.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce.js", "../node_modules/monaco-editor/esm/vs/editor/common/tokens/sparseMultilineTokens.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensStyling.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService.js", "../node_modules/monaco-editor/esm/vs/base/common/glob.js", "../node_modules/monaco-editor/esm/vs/editor/common/languageSelector.js", "../node_modules/monaco-editor/esm/vs/editor/common/languageFeatureRegistry.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/languageFeaturesService.js", "../node_modules/monaco-editor/esm/vs/platform/hover/browser/hover.js", "../node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/hoverWidget/hover.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hoverWidget.js", "../node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js", "../node_modules/monaco-editor/esm/vs/base/browser/formattedTextRenderer.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabels.js", "../node_modules/monaco-editor/esm/vs/base/common/naturalLanguage/korean.js", "../node_modules/monaco-editor/esm/vs/base/common/filters.js", "../node_modules/monaco-editor/esm/vs/base/common/iconLabels.js", "../node_modules/monaco-editor/esm/vs/base/common/htmlContent.js", "../node_modules/monaco-editor/esm/vs/base/common/idGenerator.js", "../node_modules/monaco-editor/esm/vs/base/common/marked/marked.js", "../node_modules/monaco-editor/esm/vs/base/common/marshalling.js", "../node_modules/monaco-editor/esm/vs/base/browser/markdownRenderer.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/markdownRenderer/browser/renderedMarkdown.css", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/hoverWidget/hoverWidget.js", "../node_modules/monaco-editor/esm/vs/editor/browser/services/hoverService.js", "../node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js", "../node_modules/monaco-editor/esm/vs/editor/common/config/diffEditor.js", "../node_modules/monaco-editor/esm/vs/editor/common/config/editorConfigurationSchema.js", "../node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js", "../node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationModels.js", "../node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingResolver.js", "../node_modules/monaco-editor/esm/vs/platform/keybinding/common/abstractKeybindingService.js", "../node_modules/monaco-editor/esm/vs/platform/keybinding/common/resolvedKeybindingItem.js", "../node_modules/monaco-editor/esm/vs/base/common/keybindingLabels.js", "../node_modules/monaco-editor/esm/vs/platform/keybinding/common/baseResolvedKeybinding.js", "../node_modules/monaco-editor/esm/vs/platform/keybinding/common/usLayoutResolvedKeybinding.js", "../node_modules/monaco-editor/esm/vs/platform/label/common/label.js", "../node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js", "../node_modules/monaco-editor/esm/vs/base/common/ternarySearchTree.js", "../node_modules/monaco-editor/esm/vs/platform/workspace/common/workspace.js", "../node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js", "../node_modules/monaco-editor/esm/vs/platform/workspace/common/workspaceTrust.js", "../node_modules/monaco-editor/esm/vs/base/common/range.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.js", "../node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextViewService.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/languagesAssociations.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/languagesRegistry.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/languageService.js", "../node_modules/monaco-editor/esm/vs/base/browser/dnd.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabelHover.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/list/splice.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/list/rangeMap.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/list/rowCache.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/selectBox/selectBoxCustom.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/selectBox/selectBoxNative.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/selectBox/selectBox.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/selectBox/selectBox.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js", "../node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.css", "../node_modules/monaco-editor/esm/vs/platform/action/common/action.js", "../node_modules/monaco-editor/esm/vs/base/parts/storage/common/storage.js", "../node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js", "../node_modules/monaco-editor/esm/vs/platform/theme/browser/defaultStyles.js", "../node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/menu/menu.js", "../node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.js", "../node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuService.js", "../node_modules/monaco-editor/esm/vs/platform/editor/common/editor.js", "../node_modules/monaco-editor/esm/vs/editor/browser/services/openerService.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/editorWorker.js", "../node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js", "../node_modules/monaco-editor/esm/vs/base/common/collections.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/markerDecorationsService.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/list/listPaging.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/table/table.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/table/tableWidget.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/toggle/toggle.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/toggle/toggle.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInputToggles.js", "../node_modules/monaco-editor/esm/vs/base/common/navigator.js", "../node_modules/monaco-editor/esm/vs/base/common/history.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/tree/indexTreeModel.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/tree/abstractTree.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTreeModel.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTree.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/tree/asyncDataTree.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/tree/dataTree.js", "../node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkeys.js", "../node_modules/monaco-editor/esm/vs/platform/list/browser/listService.js", "../node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js", "../node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js", "../node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickAccess.js", "../node_modules/monaco-editor/esm/vs/platform/quickinput/browser/media/quickInput.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/highlightedlabel/highlightedLabel.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.js", "../node_modules/monaco-editor/esm/vs/base/common/comparers.js", "../node_modules/monaco-editor/esm/vs/base/common/linkedText.js", "../node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInputUtils.js", "../node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInputList.js", "../node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInput.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.js", "../node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInputBox.js", "../node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInputController.js", "../node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInputService.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js", "../node_modules/monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/common/themes.js", "../node_modules/monaco-editor/esm/vs/platform/theme/common/iconRegistry.js", "../node_modules/monaco-editor/esm/vs/platform/theme/browser/iconsStyleSheet.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneThemeService.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js", "../node_modules/monaco-editor/esm/vs/platform/accessibility/browser/accessibilityService.js", "../node_modules/monaco-editor/esm/vs/platform/actions/common/menuService.js", "../node_modules/monaco-editor/esm/vs/platform/clipboard/browser/clipboardService.js", "../node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js", "../node_modules/monaco-editor/esm/vs/platform/contextkey/browser/contextKeyService.js", "../node_modules/monaco-editor/esm/vs/platform/instantiation/common/graph.js", "../node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiationService.js", "../node_modules/monaco-editor/esm/vs/platform/markers/common/markerService.js", "../node_modules/monaco-editor/esm/vs/platform/configuration/common/configurations.js", "../node_modules/monaco-editor/esm/vs/platform/audioCues/browser/audioCueService.js", "../node_modules/monaco-editor/esm/vs/platform/log/common/logService.js", "../node_modules/monaco-editor/esm/vs/editor/common/editorFeatures.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js", "../node_modules/monaco-editor/esm/vs/base/common/observableInternal/logging.js", "../node_modules/monaco-editor/esm/vs/base/common/observableInternal/base.js", "../node_modules/monaco-editor/esm/vs/base/common/observableInternal/derived.js", "../node_modules/monaco-editor/esm/vs/base/common/observableInternal/autorun.js", "../node_modules/monaco-editor/esm/vs/base/common/observableInternal/utils.js", "../node_modules/monaco-editor/esm/vs/base/common/observable.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/style.css", "../node_modules/monaco-editor/esm/vs/editor/browser/stableEditorScroll.js", "../node_modules/monaco-editor/esm/vs/base/common/hotReload.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/utils.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.css", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/registrations.contribution.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/components/diffEditorDecorations.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/components/diffEditorSash.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/multiDiffEditorWidget/style.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/toolbar/toolbar.css", "../node_modules/monaco-editor/esm/vs/base/browser/ui/toolbar/toolbar.js", "../node_modules/monaco-editor/esm/vs/platform/actions/browser/toolbar.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/multiDiffEditorWidget/utils.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/multiDiffEditorWidget/diffEditorItemTemplate.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/multiDiffEditorWidget/objectPool.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/multiDiffEditorWidget/multiDiffEditorWidgetImpl.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/multiDiffEditorWidget/colors.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/multiDiffEditorWidget/multiDiffEditorWidget.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneEditor.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCompile.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneLanguages.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/editorState/browser/editorState.js", "../node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/format/browser/formattingEdit.js", "../node_modules/monaco-editor/esm/vs/platform/extensions/common/extensions.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/format/browser/format.js", "../node_modules/monaco-editor/esm/vs/editor/editor.api.js", "../node_modules/monaco-editor/esm/vs/basic-languages/abap/abap.js", "../node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.js", "../node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.js", "../node_modules/monaco-editor/esm/vs/basic-languages/bat/bat.js", "../node_modules/monaco-editor/esm/vs/basic-languages/bicep/bicep.js", "../node_modules/monaco-editor/esm/vs/basic-languages/cameligo/cameligo.js", "../node_modules/monaco-editor/esm/vs/basic-languages/clojure/clojure.js", "../node_modules/monaco-editor/esm/vs/basic-languages/coffee/coffee.js", "../node_modules/monaco-editor/esm/vs/basic-languages/cpp/cpp.js", "../node_modules/monaco-editor/esm/vs/basic-languages/csharp/csharp.js", "../node_modules/monaco-editor/esm/vs/basic-languages/csp/csp.js", "../node_modules/monaco-editor/esm/vs/basic-languages/css/css.js", "../node_modules/monaco-editor/esm/vs/basic-languages/cypher/cypher.js", "../node_modules/monaco-editor/esm/vs/basic-languages/dart/dart.js", "../node_modules/monaco-editor/esm/vs/basic-languages/dockerfile/dockerfile.js", "../node_modules/monaco-editor/esm/vs/basic-languages/ecl/ecl.js", "../node_modules/monaco-editor/esm/vs/basic-languages/elixir/elixir.js", "../node_modules/monaco-editor/esm/vs/basic-languages/flow9/flow9.js", "../node_modules/monaco-editor/esm/vs/basic-languages/fsharp/fsharp.js", "../node_modules/monaco-editor/esm/vs/basic-languages/freemarker2/freemarker2.js", "../node_modules/monaco-editor/esm/vs/basic-languages/go/go.js", "../node_modules/monaco-editor/esm/vs/basic-languages/graphql/graphql.js", "../node_modules/monaco-editor/esm/vs/basic-languages/handlebars/handlebars.js", "../node_modules/monaco-editor/esm/vs/basic-languages/hcl/hcl.js", "../node_modules/monaco-editor/esm/vs/basic-languages/html/html.js", "../node_modules/monaco-editor/esm/vs/basic-languages/ini/ini.js", "../node_modules/monaco-editor/esm/vs/basic-languages/java/java.js", "../node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.js", "../node_modules/monaco-editor/esm/vs/basic-languages/javascript/javascript.js", "../node_modules/monaco-editor/esm/vs/basic-languages/julia/julia.js", "../node_modules/monaco-editor/esm/vs/basic-languages/kotlin/kotlin.js", "../node_modules/monaco-editor/esm/vs/basic-languages/less/less.js", "../node_modules/monaco-editor/esm/vs/basic-languages/lexon/lexon.js", "../node_modules/monaco-editor/esm/vs/basic-languages/lua/lua.js", "../node_modules/monaco-editor/esm/vs/basic-languages/liquid/liquid.js", "../node_modules/monaco-editor/esm/vs/basic-languages/m3/m3.js", "../node_modules/monaco-editor/esm/vs/basic-languages/markdown/markdown.js", "../node_modules/monaco-editor/esm/vs/basic-languages/mdx/mdx.js", "../node_modules/monaco-editor/esm/vs/basic-languages/mips/mips.js", "../node_modules/monaco-editor/esm/vs/basic-languages/msdax/msdax.js", "../node_modules/monaco-editor/esm/vs/basic-languages/mysql/mysql.js", "../node_modules/monaco-editor/esm/vs/basic-languages/objective-c/objective-c.js", "../node_modules/monaco-editor/esm/vs/basic-languages/pascal/pascal.js", "../node_modules/monaco-editor/esm/vs/basic-languages/pascaligo/pascaligo.js", "../node_modules/monaco-editor/esm/vs/basic-languages/perl/perl.js", "../node_modules/monaco-editor/esm/vs/basic-languages/pgsql/pgsql.js", "../node_modules/monaco-editor/esm/vs/basic-languages/php/php.js", "../node_modules/monaco-editor/esm/vs/basic-languages/pla/pla.js", "../node_modules/monaco-editor/esm/vs/basic-languages/postiats/postiats.js", "../node_modules/monaco-editor/esm/vs/basic-languages/powerquery/powerquery.js", "../node_modules/monaco-editor/esm/vs/basic-languages/powershell/powershell.js", "../node_modules/monaco-editor/esm/vs/basic-languages/protobuf/protobuf.js", "../node_modules/monaco-editor/esm/vs/basic-languages/pug/pug.js", "../node_modules/monaco-editor/esm/vs/basic-languages/python/python.js", "../node_modules/monaco-editor/esm/vs/basic-languages/qsharp/qsharp.js", "../node_modules/monaco-editor/esm/vs/basic-languages/r/r.js", "../node_modules/monaco-editor/esm/vs/basic-languages/razor/razor.js", "../node_modules/monaco-editor/esm/vs/basic-languages/redis/redis.js", "../node_modules/monaco-editor/esm/vs/basic-languages/redshift/redshift.js", "../node_modules/monaco-editor/esm/vs/basic-languages/restructuredtext/restructuredtext.js", "../node_modules/monaco-editor/esm/vs/basic-languages/ruby/ruby.js", "../node_modules/monaco-editor/esm/vs/basic-languages/rust/rust.js", "../node_modules/monaco-editor/esm/vs/basic-languages/sb/sb.js", "../node_modules/monaco-editor/esm/vs/basic-languages/scala/scala.js", "../node_modules/monaco-editor/esm/vs/basic-languages/scheme/scheme.js", "../node_modules/monaco-editor/esm/vs/basic-languages/scss/scss.js", "../node_modules/monaco-editor/esm/vs/basic-languages/shell/shell.js", "../node_modules/monaco-editor/esm/vs/basic-languages/solidity/solidity.js", "../node_modules/monaco-editor/esm/vs/basic-languages/sophia/sophia.js", "../node_modules/monaco-editor/esm/vs/basic-languages/sparql/sparql.js", "../node_modules/monaco-editor/esm/vs/basic-languages/sql/sql.js", "../node_modules/monaco-editor/esm/vs/basic-languages/st/st.js", "../node_modules/monaco-editor/esm/vs/basic-languages/swift/swift.js", "../node_modules/monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.js", "../node_modules/monaco-editor/esm/vs/basic-languages/tcl/tcl.js", "../node_modules/monaco-editor/esm/vs/basic-languages/twig/twig.js", "../node_modules/monaco-editor/esm/vs/basic-languages/vb/vb.js", "../node_modules/monaco-editor/esm/vs/basic-languages/wgsl/wgsl.js", "../node_modules/monaco-editor/esm/vs/basic-languages/xml/xml.js", "../node_modules/monaco-editor/esm/vs/basic-languages/yaml/yaml.js", "../node_modules/monaco-editor/esm/vs/language/css/cssMode.js", "../node_modules/monaco-editor/esm/vs/language/html/htmlMode.js", "../node_modules/monaco-editor/esm/vs/language/json/jsonMode.js", "../node_modules/monaco-editor/esm/vs/language/typescript/tsMode.js", "../node_modules/monaco-editor/esm/vs/language/typescript/monaco.contribution.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/browser/outlineModel.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplaceCommand.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.css", "../node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js", "../node_modules/d3-array/dist/d3-array.js", "../node_modules/d3-axis/dist/d3-axis.js", "../node_modules/d3-dispatch/dist/d3-dispatch.js", "../node_modules/d3-selection/dist/d3-selection.js", "../node_modules/d3-drag/dist/d3-drag.js", "../node_modules/d3-color/dist/d3-color.js", "../node_modules/d3-interpolate/dist/d3-interpolate.js", "../node_modules/d3-timer/dist/d3-timer.js", "../node_modules/d3-ease/dist/d3-ease.js", "../node_modules/d3-transition/dist/d3-transition.js", "../node_modules/d3-brush/dist/d3-brush.js", "../node_modules/d3-path/dist/d3-path.js", "../node_modules/d3-chord/dist/d3-chord.js", "../node_modules/d3-contour/dist/d3-contour.js", "../node_modules/d3-delaunay/dist/d3-delaunay.js", "../node_modules/d3-dsv/dist/d3-dsv.js", "../node_modules/d3-fetch/dist/d3-fetch.js", "../node_modules/d3-quadtree/dist/d3-quadtree.js", "../node_modules/d3-force/dist/d3-force.js", "../node_modules/d3-format/dist/d3-format.js", "../node_modules/d3-geo/dist/d3-geo.js", "../node_modules/d3-hierarchy/dist/d3-hierarchy.js", "../node_modules/d3-polygon/dist/d3-polygon.js", "../node_modules/d3-random/dist/d3-random.js", "../node_modules/d3-time/dist/d3-time.js", "../node_modules/d3-time-format/dist/d3-time-format.js", "../node_modules/d3-scale/dist/d3-scale.js", "../node_modules/d3-scale-chromatic/dist/d3-scale-chromatic.js", "../node_modules/d3-shape/dist/d3-shape.js", "../node_modules/d3-zoom/dist/d3-zoom.js", "../node_modules/d3/dist/d3.node.js", "../node_modules/@fortawesome/free-solid-svg-icons/index.js", "../node_modules/d3-wave/dist/d3-wave.js", "../src/app.tsx", "../node_modules/@mui/joy/styles/identifier.js", "../node_modules/@mui/system/esm/index.js", "../node_modules/@mui/system/esm/GlobalStyles/GlobalStyles.js", "../node_modules/@mui/system/esm/createTheme/createTheme.js", "../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js", "../node_modules/@mui/system/esm/createTheme/createBreakpoints.js", "../node_modules/@mui/system/esm/createTheme/shape.js", "../node_modules/@mui/system/esm/breakpoints.js", "../node_modules/@mui/system/esm/merge.js", "../node_modules/@mui/system/esm/style.js", "../node_modules/@mui/system/esm/memoize.js", "../node_modules/@mui/system/esm/spacing.js", "../node_modules/@mui/system/esm/createTheme/createSpacing.js", "../node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js", "../node_modules/@mui/system/esm/compose.js", "../node_modules/@mui/system/esm/borders.js", "../node_modules/@mui/system/esm/cssGrid.js", "../node_modules/@mui/system/esm/palette.js", "../node_modules/@mui/system/esm/sizing.js", "../node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js", "../node_modules/@mui/system/esm/createTheme/applyStyles.js", "../node_modules/@mui/system/esm/useThemeWithoutDefault.js", "../node_modules/@mui/system/esm/useTheme.js", "../node_modules/@mui/system/esm/styleFunctionSx/extendSxProp.js", "../node_modules/@mui/system/esm/createBox.js", "../node_modules/clsx/dist/clsx.mjs", "../node_modules/@mui/system/esm/createStyled.js", "../node_modules/@mui/system/esm/useThemeProps/getThemeProps.js", "../node_modules/@mui/system/esm/useThemeProps/useThemeProps.js", "../node_modules/@mui/system/esm/colorManipulator.js", "../node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js", "../node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.js", "../node_modules/@mui/private-theming/useTheme/ThemeContext.js", "../node_modules/@mui/private-theming/useTheme/useTheme.js", "../node_modules/@mui/private-theming/ThemeProvider/nested.js", "../node_modules/@mui/system/esm/RtlProvider/index.js", "../node_modules/@mui/system/esm/DefaultPropsProvider/DefaultPropsProvider.js", "../node_modules/@mui/system/esm/cssVars/createCssVarsProvider.js", "../node_modules/@mui/system/esm/InitColorSchemeScript/InitColorSchemeScript.js", "../node_modules/@mui/system/esm/cssVars/useCurrentColorScheme.js", "../node_modules/@mui/system/esm/cssVars/createGetCssVar.js", "../node_modules/@mui/system/esm/cssVars/cssVarsParser.js", "../node_modules/@mui/system/esm/cssVars/prepareCssVars.js", "../node_modules/@babel/runtime/helpers/esm/typeof.js", "../node_modules/@babel/runtime/helpers/esm/toPrimitive.js", "../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js", "../node_modules/@mui/joy/styles/extendTheme.js", "../node_modules/@mui/joy/styles/sxConfig.js", "../node_modules/@mui/joy/colors/colors.js", "../node_modules/@mui/joy/styles/shouldSkipGeneratingVar.js", "../node_modules/@mui/joy/className/index.js", "../node_modules/@mui/joy/styles/variantUtils.js", "../node_modules/@mui/joy/styles/defaultTheme.js", "../node_modules/@mui/joy/InitColorSchemeScript/InitColorSchemeScript.js", "../node_modules/@mui/joy/styles/CssVarsProvider.js", "../node_modules/@mui/joy/styles/styled.js", "../node_modules/@mui/joy/styles/useThemeProps.js", "../node_modules/@mui/joy/CssBaseline/CssBaseline.js", "../node_modules/@mui/joy/GlobalStyles/GlobalStyles.js", "../node_modules/@mui/joy/Box/boxClasses.js", "../node_modules/@mui/joy/Box/Box.js", "../node_modules/@mui/joy/Button/Button.js", "../node_modules/@mui/base/useButton/useButton.js", "../node_modules/@mui/base/utils/extractEventHandlers.js", "../node_modules/@mui/base/utils/useRootElementName.js", "../node_modules/@mui/base/composeClasses/index.js", "../node_modules/@mui/joy/utils/useSlot.js", "../node_modules/@mui/base/utils/appendOwnerState.js", "../node_modules/@mui/base/utils/isHostComponent.js", "../node_modules/@mui/base/utils/areArraysEqual.js", "../node_modules/@mui/base/utils/ClassNameConfigurator.js", "../node_modules/@mui/base/utils/resolveComponentProps.js", "../node_modules/@mui/base/utils/useSlotProps.js", "../node_modules/@mui/base/utils/mergeSlotProps.js", "../node_modules/@mui/base/utils/omitEventHandlers.js", "../node_modules/@mui/joy/CircularProgress/CircularProgress.js", "../node_modules/@mui/base/generateUtilityClass/index.js", "../node_modules/@mui/base/generateUtilityClasses/index.js", "../node_modules/@mui/base/ClickAwayListener/ClickAwayListener.js", "../node_modules/@mui/base/utils/useControllableReducer.js", "../node_modules/@mui/base/useList/useList.js", "../node_modules/@mui/base/useList/listActions.types.js", "../node_modules/@mui/base/useList/listReducer.js", "../node_modules/@mui/base/utils/useTextNavigation.js", "../node_modules/@mui/base/useList/useListItem.js", "../node_modules/@mui/base/useList/ListContext.js", "../node_modules/@mui/base/useCompound/useCompoundParent.js", "../node_modules/@mui/base/useCompound/useCompoundItem.js", "../node_modules/@mui/base/utils/combineHooksSlotProps.js", "../node_modules/@mui/base/Portal/Portal.js", "../node_modules/@mui/base/useOption/useOption.js", "../node_modules/@mui/base/useOption/useOptionContextStabilizer.js", "../node_modules/@mui/base/Popper/Popper.js", "../node_modules/@popperjs/core/lib/enums.js", "../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js", "../node_modules/@popperjs/core/lib/dom-utils/getWindow.js", "../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js", "../node_modules/@popperjs/core/lib/modifiers/applyStyles.js", "../node_modules/@popperjs/core/lib/utils/getBasePlacement.js", "../node_modules/@popperjs/core/lib/utils/math.js", "../node_modules/@popperjs/core/lib/utils/userAgent.js", "../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js", "../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js", "../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js", "../node_modules/@popperjs/core/lib/dom-utils/contains.js", "../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js", "../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js", "../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js", "../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js", "../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js", "../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js", "../node_modules/@popperjs/core/lib/utils/within.js", "../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js", "../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js", "../node_modules/@popperjs/core/lib/utils/expandToHashMap.js", "../node_modules/@popperjs/core/lib/modifiers/arrow.js", "../node_modules/@popperjs/core/lib/utils/getVariation.js", "../node_modules/@popperjs/core/lib/modifiers/computeStyles.js", "../node_modules/@popperjs/core/lib/modifiers/eventListeners.js", "../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js", "../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js", "../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js", "../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js", "../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js", "../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js", "../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js", "../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js", "../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js", "../node_modules/@popperjs/core/lib/utils/rectToClientRect.js", "../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js", "../node_modules/@popperjs/core/lib/utils/computeOffsets.js", "../node_modules/@popperjs/core/lib/utils/detectOverflow.js", "../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js", "../node_modules/@popperjs/core/lib/modifiers/flip.js", "../node_modules/@popperjs/core/lib/modifiers/hide.js", "../node_modules/@popperjs/core/lib/modifiers/offset.js", "../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js", "../node_modules/@popperjs/core/lib/utils/getAltAxis.js", "../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js", "../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js", "../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js", "../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js", "../node_modules/@popperjs/core/lib/utils/orderModifiers.js", "../node_modules/@popperjs/core/lib/utils/debounce.js", "../node_modules/@popperjs/core/lib/utils/mergeByName.js", "../node_modules/@popperjs/core/lib/createPopper.js", "../node_modules/@popperjs/core/lib/popper.js", "../node_modules/@mui/base/Popper/popperClasses.js", "../node_modules/@mui/base/useSelect/useSelect.js", "../node_modules/@mui/base/useSelect/useSelect.types.js", "../node_modules/@mui/base/useSelect/defaultOptionStringifier.js", "../node_modules/@mui/base/useSelect/selectReducer.js", "../node_modules/@mui/base/useSelect/SelectProvider.js", "../node_modules/@mui/base/useSnackbar/useSnackbar.js", "../node_modules/@mui/base/useTabPanel/useTabPanel.js", "../node_modules/@mui/base/useTabs/useTabs.js", "../node_modules/@mui/base/useTabs/TabsProvider.js", "../node_modules/@mui/base/Tabs/TabsContext.js", "../node_modules/@mui/base/useTabsList/useTabsList.js", "../node_modules/@mui/base/useTabsList/useTabsList.types.js", "../node_modules/@mui/base/useTabsList/tabsListReducer.js", "../node_modules/@mui/base/useTabsList/TabsListProvider.js", "../node_modules/@mui/base/useTab/useTab.js", "../node_modules/@mui/joy/CircularProgress/circularProgressClasses.js", "../node_modules/@mui/joy/Button/buttonClasses.js", "../node_modules/@mui/joy/ButtonGroup/ButtonGroupContext.js", "../node_modules/@mui/joy/ToggleButtonGroup/ToggleButtonGroupContext.js", "../node_modules/@mui/joy/IconButton/IconButton.js", "../node_modules/@mui/joy/IconButton/iconButtonClasses.js", "../node_modules/@mui/joy/Select/Select.js", "../node_modules/@mui/joy/List/List.js", "../node_modules/@mui/joy/styles/styleUtils.js", "../node_modules/@mui/joy/List/NestedListContext.js", "../node_modules/@mui/joy/List/GroupListContext.js", "../node_modules/@mui/joy/List/ListProvider.js", "../node_modules/@mui/joy/List/RowListContext.js", "../node_modules/@mui/joy/List/WrapListContext.js", "../node_modules/@mui/joy/internal/svg-icons/Unfold.js", "../node_modules/@mui/joy/utils/createSvgIcon.js", "../node_modules/@mui/joy/SvgIcon/SvgIcon.js", "../node_modules/@mui/joy/SvgIcon/svgIconClasses.js", "../node_modules/@mui/joy/Select/selectClasses.js", "../node_modules/@mui/joy/FormControl/FormControlContext.js", "../node_modules/@mui/joy/styles/variantColorInheritance.js", "../node_modules/@mui/joy/Option/Option.js", "../node_modules/@mui/joy/ListItemButton/ListItemButton.js", "../node_modules/@mui/joy/ListItem/listItemClasses.js", "../node_modules/@mui/joy/ListItemButton/listItemButtonClasses.js", "../node_modules/@mui/joy/ListItemButton/ListItemButtonOrientationContext.js", "../node_modules/@mui/joy/Option/optionClasses.js", "../node_modules/@mui/joy/Link/Link.js", "../node_modules/@mui/joy/Link/linkClasses.js", "../node_modules/@mui/joy/Typography/Typography.js", "../node_modules/@mui/joy/Typography/typographyClasses.js", "../node_modules/@mui/joy/Snackbar/Snackbar.js", "../node_modules/@mui/joy/colorInversion/colorInversionUtils.js", "../node_modules/@mui/joy/Snackbar/snackbarClasses.js", "../node_modules/@mui/joy/Alert/Alert.js", "../node_modules/@mui/joy/Alert/alertClasses.js", "../node_modules/@mui/joy/Tabs/Tabs.js", "../node_modules/@mui/joy/Tabs/SizeTabsContext.js", "../node_modules/@mui/joy/Tabs/tabsClasses.js", "../node_modules/@mui/joy/TabList/TabList.js", "../node_modules/@mui/joy/TabList/tabListClasses.js", "../node_modules/@mui/joy/Tab/tabClasses.js", "../node_modules/@mui/joy/Tab/Tab.js", "../node_modules/@mui/joy/TabPanel/TabPanel.js", "../node_modules/@mui/joy/TabPanel/tabPanelClasses.js", "../node_modules/monaco-editor/esm/vs/basic-languages/monaco.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/abap/abap.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/bat/bat.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/bicep/bicep.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/cameligo/cameligo.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/clojure/clojure.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/coffee/coffee.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/cpp/cpp.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/csharp/csharp.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/csp/csp.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/css/css.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/cypher/cypher.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/dart/dart.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/dockerfile/dockerfile.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/ecl/ecl.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/elixir/elixir.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/flow9/flow9.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/fsharp/fsharp.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/freemarker2/freemarker2.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/go/go.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/graphql/graphql.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/handlebars/handlebars.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/hcl/hcl.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/html/html.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/ini/ini.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/java/java.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/julia/julia.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/kotlin/kotlin.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/less/less.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/lexon/lexon.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/lua/lua.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/liquid/liquid.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/m3/m3.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/markdown/markdown.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/mdx/mdx.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/mips/mips.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/msdax/msdax.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/mysql/mysql.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/objective-c/objective-c.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/pascal/pascal.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/pascaligo/pascaligo.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/perl/perl.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/pgsql/pgsql.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/php/php.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/pla/pla.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/postiats/postiats.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/powerquery/powerquery.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/powershell/powershell.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/protobuf/protobuf.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/pug/pug.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/python/python.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/qsharp/qsharp.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/r/r.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/razor/razor.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/redis/redis.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/redshift/redshift.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/restructuredtext/restructuredtext.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/ruby/ruby.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/rust/rust.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/sb/sb.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/scala/scala.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/scheme/scheme.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/scss/scss.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/shell/shell.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/solidity/solidity.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/sophia/sophia.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/sparql/sparql.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/sql/sql.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/st/st.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/swift/swift.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/tcl/tcl.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/twig/twig.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/vb/vb.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/wgsl/wgsl.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/xml/xml.contribution.js", "../node_modules/monaco-editor/esm/vs/basic-languages/yaml/yaml.contribution.js", "../node_modules/monaco-editor/esm/vs/language/css/monaco.contribution.js", "../node_modules/monaco-editor/esm/vs/language/html/monaco.contribution.js", "../node_modules/monaco-editor/esm/vs/language/json/monaco.contribution.js", "../node_modules/monaco-editor/esm/vs/editor/editor.main.js", "../node_modules/monaco-editor/esm/vs/editor/editor.all.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/browser/moveCaretCommand.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/browser/transpose.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/browser/clipboard.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js", "../node_modules/monaco-editor/esm/vs/base/common/dataTransfer.js", "../node_modules/monaco-editor/esm/vs/base/common/uuid.js", "../node_modules/monaco-editor/esm/vs/editor/browser/dnd.js", "../node_modules/monaco-editor/esm/vs/platform/dnd/browser/dnd.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/dropOrPasteInto/browser/edit.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/snippet/browser/snippetParser.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlineProgress/browser/inlineProgress.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/message/browser/messageController.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/browser/codeAction.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/common/types.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/browser/codeActionController.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/browser/codeActionKeybindingResolver.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js", "../node_modules/monaco-editor/esm/vs/platform/actionWidget/browser/actionWidget.js", "../node_modules/monaco-editor/esm/vs/platform/actionWidget/browser/actionList.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/browser/codeActionModel.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/codelens/browser/codelensController.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/codelens/browser/codelens.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/codelens/browser/codeLensCache.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/codelens/browser/codelensWidget.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/colorContributions.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/color.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/defaultDocumentColorProvider.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/colorHoverParticipant.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/colorPickerModel.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/colorPickerWidget.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/hover.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/peekView/browser/peekView.js", "../node_modules/monaco-editor/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/browser/zoneWidget.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/browser/goToSymbol.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/contentHover.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/hoverOperation.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/hoverTypes.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/resizable/resizable.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/resizableContentWidget.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/marginHover.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/getHover.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/browser/gotoError.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/browser/markerNavigationService.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js", "../node_modules/monaco-editor/esm/vs/platform/severityIcon/browser/severityIcon.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/commandIds.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPickerWidget.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/comment/browser/comment.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/comment/browser/blockCommentCommand.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/comment/browser/lineCommentCommand.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/dnd/browser/dnd.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/dnd/browser/dragAndDropCommand.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/treeViewsDnd.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/treeViewsDndService.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/find/browser/findController.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/find/browser/findModel.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/find/browser/findDecorations.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/find/browser/replaceAllCommand.js", "../node_modules/monaco-editor/esm/vs/base/common/search.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/find/browser/replacePattern.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/find/browser/findOptionsWidget.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/find/browser/findState.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/find/browser/findWidget.js", "../node_modules/monaco-editor/esm/vs/platform/history/browser/contextScopedHistoryWidget.js", "../node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/replaceInput.js", "../node_modules/monaco-editor/esm/vs/platform/history/browser/historyWidgetKeybindingHint.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/folding/browser/folding.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/folding/browser/foldingModel.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/folding/browser/foldingRanges.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/folding/browser/hiddenRangeModel.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/folding/browser/indentRangeProvider.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/folding/browser/foldingDecorations.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/folding/browser/syntaxRangeProvider.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/format/browser/formatActions.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/browser/documentSymbols.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/commands.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/ghostTextWidget.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/utils.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/ghostText.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsSource.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/provideInlineCompletions.js", "../node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/fixBrackets.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/singleTextEdit.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/snippet/browser/snippetController2.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggest.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/snippet/browser/snippetSession.js", "../node_modules/monaco-editor/esm/vs/base/common/labels.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/snippet/browser/snippetVariables.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestController.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestMemory.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/wordContextKey.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestAlternatives.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestCommitCharacters.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestModel.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/wordDistance.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/browser/bracketSelections.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/completionModel.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestOvertypingCapturer.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestWidget.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestWidgetStatus.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/getIconClasses.js", "../node_modules/monaco-editor/esm/vs/platform/files/common/files.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/hoverParticipant.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/indentation/browser/indentation.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/indentation/browser/indentUtils.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlayHints/browser/inlayHintsContribution.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlayHints/browser/inlayHints.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js", "../node_modules/monaco-editor/esm/vs/editor/common/commands/trimTrailingWhitespaceCommand.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/browser/copyLinesCommand.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/browser/moveLinesCommand.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/browser/sortLinesCommand.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/links/browser/links.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/links/browser/getLinks.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/longLinesHelper/browser/longLinesHelper.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/browser/multicursor.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/browser/provideSignatureHelp.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/rename/browser/rename.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/rename/browser/renameInputField.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/semanticTokens/common/getSemanticTokens.js", "../node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensDto.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/semanticTokens/common/semanticTokensConfig.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/semanticTokens/browser/viewportSemanticTokens.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/browser/wordSelections.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollContribution.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js", "../node_modules/monaco-editor/esm/vs/platform/action/common/actionCommonCategories.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollElement.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/tokenization/browser/tokenization.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js", "../node_modules/monaco-editor/esm/vs/platform/opener/browser/link.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/wordPartOperations/browser/wordPartOperations.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js", "../node_modules/monaco-editor/esm/vs/editor/edcore.main.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess.js", "../node_modules/monaco-editor/esm/vs/platform/quickinput/browser/helpQuickAccess.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js", "../node_modules/monaco-editor/esm/vs/base/common/fuzzyScorer.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.js", "../node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/browser/commandsQuickAccess.js", "../node_modules/monaco-editor/esm/vs/base/common/errorMessage.js", "../node_modules/monaco-editor/esm/vs/platform/quickinput/browser/commandsQuickAccess.js", "../node_modules/monaco-editor/esm/vs/base/common/tfIdf.js", "../node_modules/monaco-editor/esm/vs/platform/quickinput/browser/pickerQuickAccess.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js", "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast.js", "../src/monaco.tsx", "../src/d3wave.tsx", "../src/runner.ts", "../src/config.ts"], - "sourcesContent": ["/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),p=Symbol.for(\"react.fragment\"),q=Symbol.for(\"react.strict_mode\"),r=Symbol.for(\"react.profiler\"),t=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),v=Symbol.for(\"react.forward_ref\"),w=Symbol.for(\"react.suspense\"),x=Symbol.for(\"react.memo\"),y=Symbol.for(\"react.lazy\"),z=Symbol.iterator;function A(a){if(null===a||\"object\"!==typeof a)return null;a=z&&a[z]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,a,b,\"setState\")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n", "/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),ca=require(\"scheduler\");function p(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(ra,\nsa);z[b]=new v(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Ma(a):\"\"}\nfunction Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return\"\"}}\nfunction Qa(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ya:return\"Fragment\";case wa:return\"Portal\";case Aa:return\"Profiler\";case za:return\"StrictMode\";case Ea:return\"Suspense\";case Fa:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||\"Context\")+\".Consumer\";case Ba:return(a._context.displayName||\"Context\")+\".Provider\";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||\nb.name||\"\",a=\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||\"Memo\";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}\nfunction Ra(a){var b=a.type;switch(a.tag){case 24:return\"Cache\";case 9:return(b.displayName||\"Context\")+\".Consumer\";case 10:return(b._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return a=b.render,a=a.displayName||a.name||\"\",b.displayName||(\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return b;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(b);case 8:return b===za?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";\ncase 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"===typeof b)return b.displayName||b.name||null;if(\"string\"===typeof b)return b}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"string\":case \"undefined\":return a;case \"object\":return a;default:return\"\"}}\nfunction Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,\"checked\",b,!1)}\nfunction bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?cb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction db(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction cb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}var eb=Array.isArray;\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e\"+b.valueOf().toString()+\"\";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,\nzoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(\"\"+b).trim():b+\"px\"}\nfunction sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=rb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if(\"object\"!==typeof b.dangerouslySetInnerHTML||!(\"__html\"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(p(62));}}\nfunction vb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;\nfunction tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nfunction Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),\"selectionStart\"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,\nd);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});\"function\"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||\"Unknown\",e));return A({},c,d)}\nfunction cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}\nfunction jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,\nm),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=\nf.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===Ha&&Ng(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=Lg(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Tg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Rg(f.type,f.key,f.props,null,a.mode,h),h.ref=Lg(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!==\nd;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Sg(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);Mg(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):\n(c(a,d),d=Qg(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Ug=Og(!0),Vg=Og(!1),Wg=Uf(null),Xg=null,Yg=null,Zg=null;function $g(){Zg=Yg=Xg=null}function ah(a){var b=Wg.current;E(Wg);a._currentValue=b}function bh(a,b,c){for(;null!==a;){var d=a.alternate;(a.childLanes&b)!==b?(a.childLanes|=b,null!==d&&(d.childLanes|=b)):null!==d&&(d.childLanes&b)!==b&&(d.childLanes|=b);if(a===c)break;a=a.return}}\nfunction ch(a,b){Xg=a;Zg=Yg=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(dh=!0),a.firstContext=null)}function eh(a){var b=a._currentValue;if(Zg!==a)if(a={context:a,memoizedValue:b,next:null},null===Yg){if(null===Xg)throw Error(p(308));Yg=a;Xg.dependencies={lanes:0,firstContext:a}}else Yg=Yg.next=a;return b}var fh=null;function gh(a){null===fh?fh=[a]:fh.push(a)}\nfunction hh(a,b,c,d){var e=b.interleaved;null===e?(c.next=c,gh(b)):(c.next=e.next,e.next=c);b.interleaved=c;return ih(a,d)}function ih(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}var jh=!1;function kh(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}\nfunction lh(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function mh(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}}\nfunction nh(a,b,c){var d=a.updateQueue;if(null===d)return null;d=d.shared;if(0!==(K&2)){var e=d.pending;null===e?b.next=b:(b.next=e.next,e.next=b);d.pending=b;return ih(a,c)}e=d.interleaved;null===e?(b.next=b,gh(d)):(b.next=e.next,e.next=b);d.interleaved=b;return ih(a,c)}function oh(a,b,c){b=b.updateQueue;if(null!==b&&(b=b.shared,0!==(c&4194240))){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nfunction ph(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=\nb;c.lastBaseUpdate=b}\nfunction qh(a,b,c,d){var e=a.updateQueue;jh=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var m=a.alternate;null!==m&&(m=m.updateQueue,h=m.lastBaseUpdate,h!==g&&(null===h?m.firstBaseUpdate=l:h.next=l,m.lastBaseUpdate=k))}if(null!==f){var q=e.baseState;g=0;m=l=k=null;h=f;do{var r=h.lane,y=h.eventTime;if((d&r)===r){null!==m&&(m=m.next={eventTime:y,lane:0,tag:h.tag,payload:h.payload,callback:h.callback,\nnext:null});a:{var n=a,t=h;r=b;y=c;switch(t.tag){case 1:n=t.payload;if(\"function\"===typeof n){q=n.call(y,q,r);break a}q=n;break a;case 3:n.flags=n.flags&-65537|128;case 0:n=t.payload;r=\"function\"===typeof n?n.call(y,q,r):n;if(null===r||void 0===r)break a;q=A({},q,r);break a;case 2:jh=!0}}null!==h.callback&&0!==h.lane&&(a.flags|=64,r=e.effects,null===r?e.effects=[h]:r.push(h))}else y={eventTime:y,lane:r,tag:h.tag,payload:h.payload,callback:h.callback,next:null},null===m?(l=m=y,k=q):m=m.next=y,g|=r;\nh=h.next;if(null===h)if(h=e.shared.pending,null===h)break;else r=h,h=r.next,r.next=null,e.lastBaseUpdate=r,e.shared.pending=null}while(1);null===m&&(k=q);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=m;b=e.shared.interleaved;if(null!==b){e=b;do g|=e.lane,e=e.next;while(e!==b)}else null===f&&(e.shared.lanes=0);rh|=g;a.lanes=g;a.memoizedState=q}}\nfunction sh(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;bc?c:4;a(!0);var d=Gh.transition;Gh.transition={};try{a(!1),b()}finally{C=c,Gh.transition=d}}function wi(){return Uh().memoizedState}\nfunction xi(a,b,c){var d=yi(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(zi(a))Ai(b,c);else if(c=hh(a,b,c,d),null!==c){var e=R();gi(c,a,d,e);Bi(c,b,d)}}\nfunction ii(a,b,c){var d=yi(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(zi(a))Ai(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,gh(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=hh(a,b,e,d);null!==c&&(e=R(),gi(c,a,d,e),Bi(c,b,d))}}\nfunction zi(a){var b=a.alternate;return a===M||null!==b&&b===M}function Ai(a,b){Jh=Ih=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Bi(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nvar Rh={readContext:eh,useCallback:P,useContext:P,useEffect:P,useImperativeHandle:P,useInsertionEffect:P,useLayoutEffect:P,useMemo:P,useReducer:P,useRef:P,useState:P,useDebugValue:P,useDeferredValue:P,useTransition:P,useMutableSource:P,useSyncExternalStore:P,useId:P,unstable_isNewReconciler:!1},Oh={readContext:eh,useCallback:function(a,b){Th().memoizedState=[a,void 0===b?null:b];return a},useContext:eh,useEffect:mi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ki(4194308,\n4,pi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ki(4194308,4,a,b)},useInsertionEffect:function(a,b){return ki(4,2,a,b)},useMemo:function(a,b){var c=Th();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Th();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=xi.bind(null,M,a);return[d.memoizedState,a]},useRef:function(a){var b=\nTh();a={current:a};return b.memoizedState=a},useState:hi,useDebugValue:ri,useDeferredValue:function(a){return Th().memoizedState=a},useTransition:function(){var a=hi(!1),b=a[0];a=vi.bind(null,a[1]);Th().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=M,e=Th();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===Q)throw Error(p(349));0!==(Hh&30)||di(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;mi(ai.bind(null,d,\nf,a),[a]);d.flags|=2048;bi(9,ci.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=Th(),b=Q.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Kh++;0\\x3c/script>\",a=a.removeChild(a.firstChild)):\n\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;zj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case \"dialog\":D(\"cancel\",a);D(\"close\",a);e=d;break;case \"iframe\":case \"object\":case \"embed\":D(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eGj&&(b.flags|=128,d=!0,Dj(f,!1),b.lanes=4194304)}else{if(!d)if(a=Ch(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Dj(f,!0),null===f.tail&&\"hidden\"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Gj&&1073741824!==c&&(b.flags|=128,d=!0,Dj(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=\nb,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=L.current,G(L,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Hj(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(fj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}\nfunction Ij(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return zh(),E(Wf),E(H),Eh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Bh(b),null;case 13:E(L);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(L),null;case 4:return zh(),null;case 10:return ah(b.type._context),null;case 22:case 23:return Hj(),\nnull;case 24:return null;default:return null}}var Jj=!1,U=!1,Kj=\"function\"===typeof WeakSet?WeakSet:Set,V=null;function Lj(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Mj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Nj=!1;\nfunction Oj(a,b){Cf=dd;a=Me();if(Ne(a)){if(\"selectionStart\"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=\nq.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;\ncase 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Ci(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent=\"\":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Nj;Nj=!1;return n}\nfunction Pj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Mj(b,c,f)}e=e.next}while(e!==d)}}function Qj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Rj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}\nfunction Sj(a){var b=a.alternate;null!==b&&(a.alternate=null,Sj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Tj(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Uj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Tj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Vj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Vj(a,b,c),a=a.sibling;null!==a;)Vj(a,b,c),a=a.sibling}\nfunction Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}var X=null,Xj=!1;function Yj(a,b,c){for(c=c.child;null!==c;)Zj(a,b,c),c=c.sibling}\nfunction Zj(a,b,c){if(lc&&\"function\"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Lj(c,b);case 6:var d=X,e=Xj;X=null;Yj(a,b,c);X=d;Xj=e;null!==X&&(Xj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Xj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Xj;X=c.stateNode.containerInfo;Xj=!0;\nYj(a,b,c);X=d;Xj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Mj(c,b,g):0!==(f&4)&&Mj(c,b,g));e=e.next}while(e!==d)}Yj(a,b,c);break;case 1:if(!U&&(Lj(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Yj(a,b,c);break;case 21:Yj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==\nc.memoizedState,Yj(a,b,c),U=d):Yj(a,b,c);break;default:Yj(a,b,c)}}function ak(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Kj);b.forEach(function(b){var d=bk.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction ck(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*lk(d/1960))-d;if(10a?16:a;if(null===wk)var d=!1;else{a=wk;wk=null;xk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-fk?Kk(a,0):rk|=c);Dk(a,b)}function Yk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=R();a=ih(a,b);null!==a&&(Ac(a,b,c),Dk(a,c))}function uj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Yk(a,c)}\nfunction bk(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Yk(a,c)}var Vk;\nVk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)dh=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return dh=!1,yj(a,b,c);dh=0!==(a.flags&131072)?!0:!1}else dh=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;ij(a,b);a=b.pendingProps;var e=Yf(b,H.current);ch(b,c);e=Nh(null,b,d,a,e,c);var f=Sh();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=\nnull,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,kh(b),e.updater=Ei,b.stateNode=e,e._reactInternals=b,Ii(b,d,a,c),b=jj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Xi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{ij(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=Zk(d);a=Ci(d,a);switch(e){case 0:b=cj(null,b,d,a,c);break a;case 1:b=hj(null,b,d,a,c);break a;case 11:b=Yi(null,b,d,a,c);break a;case 14:b=$i(null,b,d,Ci(d.type,a),c);break a}throw Error(p(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),cj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),hj(a,b,d,e,c);case 3:a:{kj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;lh(a,b);qh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ji(Error(p(423)),b);b=lj(a,b,d,c,e);break a}else if(d!==e){e=Ji(Error(p(424)),b);b=lj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Vg(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=Zi(a,b,c);break a}Xi(a,b,d,c)}b=b.child}return b;case 5:return Ah(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),\ngj(a,b),Xi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return oj(a,b,c);case 4:return yh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Ug(b,null,d,c):Xi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),Yi(a,b,d,e,c);case 7:return Xi(a,b,b.pendingProps,c),b.child;case 8:return Xi(a,b,b.pendingProps.children,c),b.child;case 12:return Xi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;G(Wg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=Zi(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=mh(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);bh(f.return,\nc,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);bh(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Xi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,ch(b,c),e=eh(e),d=d(e),b.flags|=1,Xi(a,b,d,c),\nb.child;case 14:return d=b.type,e=Ci(d,b.pendingProps),e=Ci(d.type,e),$i(a,b,d,e,c);case 15:return bj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),ij(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,ch(b,c),Gi(b,d,e),Ii(b,d,e,c),jj(null,b,d,!0,a,c);case 19:return xj(a,b,c);case 22:return dj(a,b,c)}throw Error(p(156,b.tag));};function Fk(a,b){return ac(a,b)}\nfunction $k(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new $k(a,b,c,d)}function aj(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction Zk(a){if(\"function\"===typeof a)return aj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}\nfunction Pg(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction Rg(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)aj(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ya:return Tg(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return pj(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;\nbreak a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,\"\"));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Tg(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function pj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function Qg(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}\nfunction Sg(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction al(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=\nnull}function bl(a,b,c,d,e,f,g,h,k){a=new al(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};kh(f);return a}function cl(a,b,c){var d=3 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n", "import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f') != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @return {object}\n */\nexport function comment (value, root, parent) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @return {object}\n */\nexport function declaration (value, root, parent, length) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)\n}\n", "import {MS, MOZ, WEBKIT} from './Enum.js'\nimport {hash, charat, strlen, indexof, replace, substr, match} from './Utility.js'\n\n/**\n * @param {string} value\n * @param {number} length\n * @param {object[]} children\n * @return {string}\n */\nexport function prefix (value, length, children) {\n\tswitch (hash(value, length)) {\n\t\t// color-adjust\n\t\tcase 5103:\n\t\t\treturn WEBKIT + 'print-' + value + value\n\t\t// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\t\tcase 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921:\n\t\t// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\t\tcase 5572: case 6356: case 5844: case 3191: case 6645: case 3005:\n\t\t// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\t\tcase 6391: case 5879: case 5623: case 6135: case 4599: case 4855:\n\t\t// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\t\tcase 4215: case 6389: case 5109: case 5365: case 5621: case 3829:\n\t\t\treturn WEBKIT + value + value\n\t\t// tab-size\n\t\tcase 4789:\n\t\t\treturn MOZ + value + value\n\t\t// appearance, user-select, transform, hyphens, text-size-adjust\n\t\tcase 5349: case 4246: case 4810: case 6968: case 2756:\n\t\t\treturn WEBKIT + value + MOZ + value + MS + value + value\n\t\t// writing-mode\n\t\tcase 5936:\n\t\t\tswitch (charat(value, length + 11)) {\n\t\t\t\t// vertical-l(r)\n\t\t\t\tcase 114:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value\n\t\t\t\t// vertical-r(l)\n\t\t\t\tcase 108:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value\n\t\t\t\t// horizontal(-)tb\n\t\t\t\tcase 45:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value\n\t\t\t\t// default: fallthrough to below\n\t\t\t}\n\t\t// flex, flex-direction, scroll-snap-type, writing-mode\n\t\tcase 6828: case 4268: case 2903:\n\t\t\treturn WEBKIT + value + MS + value + value\n\t\t// order\n\t\tcase 6165:\n\t\t\treturn WEBKIT + value + MS + 'flex-' + value + value\n\t\t// align-items\n\t\tcase 5187:\n\t\t\treturn WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value\n\t\t// align-self\n\t\tcase 5443:\n\t\t\treturn WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/g, '') + (!match(value, /flex-|baseline/) ? MS + 'grid-row-' + replace(value, /flex-|-self/g, '') : '') + value\n\t\t// align-content\n\t\tcase 4675:\n\t\t\treturn WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/g, '') + value\n\t\t// flex-shrink\n\t\tcase 5548:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value\n\t\t// flex-basis\n\t\tcase 5292:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value\n\t\t// flex-grow\n\t\tcase 6060:\n\t\t\treturn WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value\n\t\t// transition\n\t\tcase 4554:\n\t\t\treturn WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value\n\t\t// cursor\n\t\tcase 6187:\n\t\t\treturn replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value\n\t\t// background, background-image\n\t\tcase 5495: case 3959:\n\t\t\treturn replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1')\n\t\t// justify-content\n\t\tcase 4968:\n\t\t\treturn replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value\n\t\t// justify-self\n\t\tcase 4200:\n\t\t\tif (!match(value, /flex-|baseline/)) return MS + 'grid-column-align' + substr(value, length) + value\n\t\t\tbreak\n\t\t// grid-template-(columns|rows)\n\t\tcase 2592: case 3360:\n\t\t\treturn MS + replace(value, 'template-', '') + value\n\t\t// grid-(row|column)-start\n\t\tcase 4384: case 3616:\n\t\t\tif (children && children.some(function (element, index) { return length = index, match(element.props, /grid-\\w+-end/) })) {\n\t\t\t\treturn ~indexof(value + (children = children[length].value), 'span') ? value : (MS + replace(value, '-start', '') + value + MS + 'grid-row-span:' + (~indexof(children, 'span') ? match(children, /\\d+/) : +match(children, /\\d+/) - +match(value, /\\d+/)) + ';')\n\t\t\t}\n\t\t\treturn MS + replace(value, '-start', '') + value\n\t\t// grid-(row|column)-end\n\t\tcase 4896: case 4128:\n\t\t\treturn (children && children.some(function (element) { return match(element.props, /grid-\\w+-start/) })) ? value : MS + replace(replace(value, '-end', '-span'), 'span ', '') + value\n\t\t// (margin|padding)-inline-(start|end)\n\t\tcase 4095: case 3583: case 4068: case 2532:\n\t\t\treturn replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value\n\t\t// (min|max)?(width|height|inline-size|block-size)\n\t\tcase 8116: case 7059: case 5753: case 5535:\n\t\tcase 5445: case 5701: case 4933: case 4677:\n\t\tcase 5533: case 5789: case 5021: case 4765:\n\t\t\t// stretch, max-content, min-content, fill-available\n\t\t\tif (strlen(value) - 1 - length > 6)\n\t\t\t\tswitch (charat(value, length + 1)) {\n\t\t\t\t\t// (m)ax-content, (m)in-content\n\t\t\t\t\tcase 109:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (charat(value, length + 4) !== 45)\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t// (f)ill-available, (f)it-content\n\t\t\t\t\tcase 102:\n\t\t\t\t\t\treturn replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value\n\t\t\t\t\t// (s)tretch\n\t\t\t\t\tcase 115:\n\t\t\t\t\t\treturn ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length, children) + value : value\n\t\t\t\t}\n\t\t\tbreak\n\t\t// grid-(column|row)\n\t\tcase 5152: case 5920:\n\t\t\treturn replace(value, /(.+?):(\\d+)(\\s*\\/\\s*(span)?\\s*(\\d+))?(.*)/, function (_, a, b, c, d, e, f) { return (MS + a + ':' + b + f) + (c ? (MS + a + '-span:' + (d ? e : +e - +b)) + f : '') + value })\n\t\t// position: sticky\n\t\tcase 4949:\n\t\t\t// stick(y)?\n\t\t\tif (charat(value, length + 6) === 121)\n\t\t\t\treturn replace(value, ':', ':' + WEBKIT) + value\n\t\t\tbreak\n\t\t// display: (flex|inline-flex|grid|inline-grid)\n\t\tcase 6444:\n\t\t\tswitch (charat(value, charat(value, 14) === 45 ? 18 : 11)) {\n\t\t\t\t// (inline-)?fle(x)\n\t\t\t\tcase 120:\n\t\t\t\t\treturn replace(value, /(.+:)([^;\\s!]+)(;|(\\s+)?!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value\n\t\t\t\t// (inline-)?gri(d)\n\t\t\t\tcase 100:\n\t\t\t\t\treturn replace(value, ':', ':' + MS) + value\n\t\t\t}\n\t\t\tbreak\n\t\t// scroll-margin, scroll-margin-(top|right|bottom|left)\n\t\tcase 5719: case 2647: case 2135: case 3927: case 2391:\n\t\t\treturn replace(value, 'scroll-', 'scroll-snap-') + value\n\t}\n\n\treturn value\n}\n", "import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen, sizeof} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\tvar length = sizeof(children)\n\n\tfor (var i = 0; i < length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: element.value = element.props.join(',')\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n", "import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine} from './Utility.js'\nimport {copy, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\treturn serialize([copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]})], callback)\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\treturn serialize([\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]})\n\t\t\t\t\t\t\t\t\t], callback)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n", "export * from './src/Enum.js'\nexport * from './src/Utility.js'\nexport * from './src/Parser.js'\nexport * from './src/Prefixer.js'\nexport * from './src/Tokenizer.js'\nexport * from './src/Serializer.js'\nexport * from './src/Middleware.js'\n", "var weakMemoize = function weakMemoize(func) {\n var cache = new WeakMap();\n return function (arg) {\n if (cache.has(arg)) {\n // Use non-null assertion because we just checked that the cache `has` it\n // This allows us to remove `undefined` from the return value\n return cache.get(arg);\n }\n\n var ret = func(arg);\n cache.set(arg, ret);\n return ret;\n };\n};\n\nexport { weakMemoize as default };\n", "import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, slice, position, RULESET, combine, match, serialize, copy, replace, WEBKIT, MOZ, MS, KEYFRAMES, DECLARATION, hash, charat, strlen, indexof, stringify, rulesheet, middleware, compile } from 'stylis';\nimport '@emotion/weak-memoize';\nimport '@emotion/memoize';\n\nvar identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {\n var previous = 0;\n var character = 0;\n\n while (true) {\n previous = character;\n character = peek(); // &\\f\n\n if (previous === 38 && character === 12) {\n points[index] = 1;\n }\n\n if (token(character)) {\n break;\n }\n\n next();\n }\n\n return slice(begin, position);\n};\n\nvar toRules = function toRules(parsed, points) {\n // pretend we've started with a comma\n var index = -1;\n var character = 44;\n\n do {\n switch (token(character)) {\n case 0:\n // &\\f\n if (character === 38 && peek() === 12) {\n // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n // and when it should just concatenate the outer and inner selectors\n // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n points[index] = 1;\n }\n\n parsed[index] += identifierWithPointTracking(position - 1, points, index);\n break;\n\n case 2:\n parsed[index] += delimit(character);\n break;\n\n case 4:\n // comma\n if (character === 44) {\n // colon\n parsed[++index] = peek() === 58 ? '&\\f' : '';\n points[index] = parsed[index].length;\n break;\n }\n\n // fallthrough\n\n default:\n parsed[index] += from(character);\n }\n } while (character = next());\n\n return parsed;\n};\n\nvar getRules = function getRules(value, points) {\n return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo\n // negative .length indicates that this rule has been already prefixed\n element.length < 1) {\n return;\n }\n\n var value = element.value,\n parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n\n while (parent.type !== 'rule') {\n parent = parent.parent;\n if (!parent) return;\n } // short-circuit for the simplest case\n\n\n if (element.props.length === 1 && value.charCodeAt(0) !== 58\n /* colon */\n && !fixedElements.get(parent)) {\n return;\n } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n\n if (isImplicitRule) {\n return;\n }\n\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel(element) {\n if (element.type === 'decl') {\n var value = element.value;\n\n if ( // charcode for l\n value.charCodeAt(0) === 108 && // charcode for b\n value.charCodeAt(2) === 98) {\n // this ignores label\n element[\"return\"] = '';\n element.value = '';\n }\n }\n};\n\n/* eslint-disable no-fallthrough */\n\nfunction prefix(value, length) {\n switch (hash(value, length)) {\n // color-adjust\n case 5103:\n return WEBKIT + 'print-' + value + value;\n // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\n case 5737:\n case 4201:\n case 3177:\n case 3433:\n case 1641:\n case 4457:\n case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\n case 5572:\n case 6356:\n case 5844:\n case 3191:\n case 6645:\n case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\n case 4215:\n case 6389:\n case 5109:\n case 5365:\n case 5621:\n case 3829:\n return WEBKIT + value + value;\n // appearance, user-select, transform, hyphens, text-size-adjust\n\n case 5349:\n case 4246:\n case 4810:\n case 6968:\n case 2756:\n return WEBKIT + value + MOZ + value + MS + value + value;\n // flex, flex-direction\n\n case 6828:\n case 4268:\n return WEBKIT + value + MS + value + value;\n // order\n\n case 6165:\n return WEBKIT + value + MS + 'flex-' + value + value;\n // align-items\n\n case 5187:\n return WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;\n // align-self\n\n case 5443:\n return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;\n // align-content\n\n case 4675:\n return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;\n // flex-shrink\n\n case 5548:\n return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;\n // flex-basis\n\n case 5292:\n return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;\n // flex-grow\n\n case 6060:\n return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;\n // transition\n\n case 4554:\n return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;\n // cursor\n\n case 6187:\n return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;\n // background, background-image\n\n case 5495:\n case 3959:\n return replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1');\n // justify-content\n\n case 4968:\n return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;\n // (margin|padding)-inline-(start|end)\n\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;\n // (min|max)?(width|height|inline-size|block-size)\n\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n // stretch, max-content, min-content, fill-available\n if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {\n // (m)ax-content, (m)in-content\n case 109:\n // -\n if (charat(value, length + 4) !== 45) break;\n // (f)ill-available, (f)it-content\n\n case 102:\n return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;\n // (s)tretch\n\n case 115:\n return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;\n }\n break;\n // position: sticky\n\n case 4949:\n // (s)ticky?\n if (charat(value, length + 1) !== 115) break;\n // display: (flex|inline-flex)\n\n case 6444:\n switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n // stic(k)y\n case 107:\n return replace(value, ':', ':' + WEBKIT) + value;\n // (inline-)?fl(e)x\n\n case 101:\n return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;\n }\n\n break;\n // writing-mode\n\n case 5936:\n switch (charat(value, length + 11)) {\n // vertical-l(r)\n case 114:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value;\n // vertical-r(l)\n\n case 108:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value;\n // horizontal(-)tb\n\n case 45:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value;\n }\n\n return WEBKIT + value + MS + value + value;\n }\n\n return value;\n}\n\nvar prefixer = function prefixer(element, index, children, callback) {\n if (element.length > -1) if (!element[\"return\"]) switch (element.type) {\n case DECLARATION:\n element[\"return\"] = prefix(element.value, element.length);\n break;\n\n case KEYFRAMES:\n return serialize([copy(element, {\n value: replace(element.value, '@', '@' + WEBKIT)\n })], callback);\n\n case RULESET:\n if (element.length) return combine(element.props, function (value) {\n switch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n // :read-(only|write)\n case ':read-only':\n case ':read-write':\n return serialize([copy(element, {\n props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]\n })], callback);\n // :placeholder\n\n case '::placeholder':\n return serialize([copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]\n })], callback);\n }\n\n return '';\n });\n }\n};\n\nvar defaultStylisPlugins = [prefixer];\n\nvar createCache = function\n /*: EmotionCache */\ncreateCache(options\n/*: Options */\n) {\n var key = options.key;\n\n if (key === 'css') {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n // note this very very intentionally targets all style elements regardless of the key to ensure\n // that creating a cache works inside of render of a React component\n\n Array.prototype.forEach.call(ssrStyles, function (node\n /*: HTMLStyleElement */\n ) {\n // we want to only move elements which have a space in the data-emotion attribute value\n // because that indicates that it is an Emotion 11 server-side rendered style elements\n // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n // will not result in the Emotion 10 styles being destroyed\n var dataEmotionAttribute = node.getAttribute('data-emotion');\n\n if (dataEmotionAttribute.indexOf(' ') === -1) {\n return;\n }\n\n document.head.appendChild(node);\n node.setAttribute('data-s', '');\n });\n }\n\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n\n var inserted = {};\n var container;\n /* : Node */\n\n var nodesToHydrate = [];\n\n {\n container = options.container || document.head;\n Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node\n /*: HTMLStyleElement */\n ) {\n var attrib = node.getAttribute(\"data-emotion\").split(' ');\n\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n\n nodesToHydrate.push(node);\n });\n }\n\n var _insert;\n /*: (\n selector: string,\n serialized: SerializedStyles,\n sheet: StyleSheet,\n shouldCache: boolean\n ) => string | void */\n\n\n var omnipresentPlugins = [compat, removeLabel];\n\n {\n var currentSheet;\n var finalizingPlugins = [stringify, rulesheet(function (rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n\n var stylis = function stylis(styles) {\n return serialize(compile(styles), serializer);\n };\n\n _insert = function\n /*: void */\n insert(selector\n /*: string */\n , serialized\n /*: SerializedStyles */\n , sheet\n /*: StyleSheet */\n , shouldCache\n /*: boolean */\n ) {\n currentSheet = sheet;\n\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n }\n\n var cache\n /*: EmotionCache */\n = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend,\n insertionPoint: options.insertionPoint\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\n\nexport { createCache as default };\n", "/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n", "'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n", "import hoistNonReactStatics$1 from 'hoist-non-react-statics';\n\n// this file isolates this package that is not tree-shakeable\n// and if this module doesn't actually contain any logic of its own\n// then Rollup just use 'hoist-non-react-statics' directly in other chunks\n\nvar hoistNonReactStatics = (function (targetComponent, sourceComponent) {\n return hoistNonReactStatics$1(targetComponent, sourceComponent);\n});\n\nexport { hoistNonReactStatics as default };\n", "var isBrowser = true;\n\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false ) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles, registerStyles };\n", "/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport { murmur2 as default };\n", "var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport { unitlessKeys as default };\n", "import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar isDevelopment = false;\n\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nvar noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n\n var componentSelector = interpolation;\n\n if (componentSelector.__emotion_styles !== undefined) {\n\n return componentSelector;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n var keyframes = interpolation;\n\n if (keyframes.anim === 1) {\n cursor = {\n name: keyframes.name,\n styles: keyframes.styles,\n next: cursor\n };\n return keyframes.name;\n }\n\n var serializedStyles = interpolation;\n\n if (serializedStyles.styles !== undefined) {\n var next = serializedStyles.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = serializedStyles.styles + \";\";\n\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n }\n\n break;\n }\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n var asString = interpolation;\n\n if (registered == null) {\n return asString;\n }\n\n var cached = registered[asString];\n return cached !== undefined ? cached : asString;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var key in obj) {\n var value = obj[key];\n\n if (typeof value !== 'object') {\n var asString = value;\n\n if (registered != null && registered[asString] !== undefined) {\n string += key + \"{\" + registered[asString] + \"}\";\n } else if (isProcessableValue(asString)) {\n string += processStyleName(key) + \":\" + processStyleValue(key, asString) + \";\";\n }\n } else {\n if (key === 'NO_COMPONENT_SELECTOR' && isDevelopment) {\n throw new Error(noComponentSelectorMessage);\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(key) + \":\" + processStyleValue(key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n\n string += key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*(;|$)/g;\n// keyframes are stored on the SerializedStyles object as a linked list\n\n\nvar cursor;\nfunction serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n var asTemplateStringsArr = strings;\n\n styles += asTemplateStringsArr[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n\n if (stringMode) {\n var templateStringsArr = strings;\n\n styles += templateStringsArr[i];\n }\n }\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n}\n\nexport { serializeStyles };\n", "import * as React from 'react';\n\nvar syncFallback = function syncFallback(create) {\n return create();\n};\n\nvar useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;\nvar useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;\nvar useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;\n\nexport { useInsertionEffectAlwaysWithSyncFallback, useInsertionEffectWithLayoutFallback };\n", "import * as React from 'react';\nimport { useContext, forwardRef } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\n\nvar isDevelopment = false;\n\n/* import { type EmotionCache } from '@emotion/utils' */\nvar EmotionCacheContext\n/*: React.Context */\n= /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache()\n/*: EmotionCache | null*/\n{\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache\n/* > */\n(func\n/*: (props: Props, cache: EmotionCache, ref: Ref) => React.Node */\n)\n/*: React.AbstractComponent */\n{\n return /*#__PURE__*/forwardRef(function (props\n /*: Props */\n , ref\n /*: Ref */\n ) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nvar ThemeContext = /* #__PURE__ */React.createContext({});\n\nvar useTheme = function useTheme() {\n return React.useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme\n/*: Object */\n, theme\n/*: Object | (Object => Object) */\n) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n return mergedTheme;\n }\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\n/*\ntype ThemeProviderProps = {\n theme: Object | (Object => Object),\n children: React.Node\n}\n*/\n\nvar ThemeProvider = function ThemeProvider(props\n/*: ThemeProviderProps */\n) {\n var theme = React.useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme\n/* */\n(Component\n/*: React.AbstractComponent */\n)\n/*: React.AbstractComponent<$Diff> */\n{\n var componentName = Component.displayName || Component.name || 'Component';\n\n var render = function render(props, ref) {\n var theme = React.useContext(ThemeContext);\n return /*#__PURE__*/React.createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n };\n\n var WithTheme = /*#__PURE__*/React.forwardRef(render);\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\n\nvar hasOwn = {}.hasOwnProperty;\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type\n/*: React.ElementType */\n, props\n/*: Object */\n) {\n\n var newProps\n /*: any */\n = {};\n\n for (var key in props) {\n if (hasOwn.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type; // Runtime labeling is an opt-in feature because:\n\n return newProps;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar Emotion = /* #__PURE__ */withEmotionCache(\n/* */\nfunction (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var WrappedComponent = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));\n\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwn.call(props, key) && key !== 'css' && key !== typePropName && (!isDevelopment )) {\n newProps[key] = props[key];\n }\n }\n\n newProps.className = className;\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof WrappedComponent === 'string'\n }), /*#__PURE__*/React.createElement(WrappedComponent, newProps));\n});\n\nvar Emotion$1 = Emotion;\n\nexport { CacheProvider as C, Emotion$1 as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwn as h, isDevelopment as i, useTheme as u, withEmotionCache as w };\n", "import { h as hasOwn, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext, i as isDevelopment } from './emotion-element-5486c51c.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, a as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, b as withTheme } from './emotion-element-5486c51c.browser.esm.js';\nimport * as React from 'react';\nimport { insertStyles, registerStyles, getRegisteredStyles } from '@emotion/utils';\nimport { useInsertionEffectWithLayoutFallback, useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { serializeStyles } from '@emotion/serialize';\nimport '@emotion/cache';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport 'hoist-non-react-statics';\n\nvar jsx\n/*: typeof React.createElement */\n= function jsx\n/*: typeof React.createElement */\n(type\n/*: React.ElementType */\n, props\n/*: Object */\n) {\n var args = arguments;\n\n if (props == null || !hasOwn.call(props, 'css')) {\n return React.createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n }\n\n return React.createElement.apply(null, createElementArgArray);\n};\n\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global\n/*: React.AbstractComponent<\nGlobalProps\n> */\n= /* #__PURE__ */withEmotionCache(function (props\n/*: GlobalProps */\n, cache) {\n\n var styles = props.styles;\n var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));\n // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n\n var sheetRef = React.useRef();\n useInsertionEffectWithLayoutFallback(function () {\n var key = cache.key + \"-global\"; // use case of https://github.com/emotion-js/emotion/issues/2675\n\n var sheet = new cache.sheet.constructor({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false;\n var node\n /*: HTMLStyleElement | null*/\n = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n useInsertionEffectWithLayoutFallback(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n\n if (serialized.next !== undefined) {\n // insert keyframes\n insertStyles(cache, serialized.next, true);\n }\n\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\n\n/* import type { Interpolation, SerializedStyles } from '@emotion/utils' */\n\nfunction css()\n/*: SerializedStyles */\n{\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serializeStyles(args);\n}\n\n/*\ntype Keyframes = {|\n name: string,\n styles: string,\n anim: 1,\n toString: () => string\n|} & string\n*/\n\nvar keyframes = function\n /*: Keyframes */\nkeyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name;\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n};\n\n/*\ntype ClassNameArg =\n | string\n | boolean\n | { [key: string]: boolean }\n | Array\n | null\n | void\n*/\n\nvar classnames = function\n /*: string */\nclassnames(args\n/*: Array */\n) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered\n/*: Object */\n, css\n/*: (...args: Array) => string */\n, className\n/*: string */\n) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serializedArr = _ref.serializedArr;\n useInsertionEffectAlwaysWithSyncFallback(function () {\n\n for (var i = 0; i < serializedArr.length; i++) {\n insertStyles(cache, serializedArr[i], false);\n }\n });\n\n return null;\n};\n/*\ntype Props = {\n children: ({\n css: (...args: any) => string,\n cx: (...args: Array) => string,\n theme: Object\n }) => React.Node\n} */\n\n\nvar ClassNames\n/*: React.AbstractComponent*/\n= /* #__PURE__ */withEmotionCache(function (props, cache) {\n var hasRendered = false;\n var serializedArr = [];\n\n var css = function css() {\n if (hasRendered && isDevelopment) {\n throw new Error('css can only be used during render');\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`\n\n registerStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && isDevelopment) {\n throw new Error('cx can only be used during render');\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: React.useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serializedArr: serializedArr\n }), ele);\n});\n\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };\n", "import _extends from '@babel/runtime/helpers/esm/extends';\nimport * as React from 'react';\nimport isPropValid from '@emotion/is-prop-valid';\nimport { withEmotionCache, ThemeContext } from '@emotion/react';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\n\n/* import type {\n ElementType,\n StatelessFunctionalComponent,\n AbstractComponent\n} from 'react' */\n/*\nexport type Interpolations = Array\n\nexport type StyledElementType =\n | string\n | AbstractComponent<{ ...Props, className: string }, mixed>\n\nexport type StyledOptions = {\n label?: string,\n shouldForwardProp?: string => boolean,\n target?: string\n}\n\nexport type StyledComponent = StatelessFunctionalComponent & {\n defaultProps: any,\n toString: () => string,\n withComponent: (\n nextTag: StyledElementType,\n nextOptions?: StyledOptions\n ) => StyledComponent\n}\n\nexport type PrivateStyledComponent = StyledComponent & {\n __emotion_real: StyledComponent,\n __emotion_base: any,\n __emotion_styles: any,\n __emotion_forwardProp: any\n}\n*/\n\nvar testOmitPropsOnStringTag = isPropValid;\n\nvar testOmitPropsOnComponent = function testOmitPropsOnComponent(key\n/*: string */\n) {\n return key !== 'theme';\n};\n\nvar getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag\n/*: ElementType */\n) {\n return typeof tag === 'string' && // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;\n};\nvar composeShouldForwardProps = function composeShouldForwardProps(tag\n/*: PrivateStyledComponent */\n, options\n/*: StyledOptions | void */\n, isReal\n/*: boolean */\n) {\n var shouldForwardProp;\n\n if (options) {\n var optionsShouldForwardProp = options.shouldForwardProp;\n shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName\n /*: string */\n ) {\n return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);\n } : optionsShouldForwardProp;\n }\n\n if (typeof shouldForwardProp !== 'function' && isReal) {\n shouldForwardProp = tag.__emotion_forwardProp;\n }\n\n return shouldForwardProp;\n};\n/*\nexport type CreateStyledComponent = (\n ...args: Interpolations\n) => StyledComponent\n\nexport type CreateStyled = {\n (\n tag: StyledElementType,\n options?: StyledOptions\n ): (...args: Interpolations) => StyledComponent,\n [key: string]: CreateStyledComponent,\n bind: () => CreateStyled\n}\n*/\n\nvar isDevelopment = false;\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar createStyled\n/*: CreateStyled */\n= function createStyled\n/*: CreateStyled */\n(tag\n/*: any */\n, options\n/* ?: StyledOptions */\n) {\n\n var isReal = tag.__emotion_real === tag;\n var baseTag = isReal && tag.__emotion_base || tag;\n var identifierName;\n var targetClassName;\n\n if (options !== undefined) {\n identifierName = options.label;\n targetClassName = options.target;\n }\n\n var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);\n var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);\n var shouldUseAs = !defaultShouldForwardProp('as');\n /* return function(): PrivateStyledComponent { */\n\n return function () {\n var args = arguments;\n var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];\n\n if (identifierName !== undefined) {\n styles.push(\"label:\" + identifierName + \";\");\n }\n\n if (args[0] == null || args[0].raw === undefined) {\n styles.push.apply(styles, args);\n } else {\n\n styles.push(args[0][0]);\n var len = args.length;\n var i = 1;\n\n for (; i < len; i++) {\n\n styles.push(args[i], args[0][i]);\n }\n }\n\n var Styled\n /*: PrivateStyledComponent */\n = withEmotionCache(function (props, cache, ref) {\n var FinalTag = shouldUseAs && props.as || baseTag;\n var className = '';\n var classInterpolations = [];\n var mergedProps = props;\n\n if (props.theme == null) {\n mergedProps = {};\n\n for (var key in props) {\n mergedProps[key] = props[key];\n }\n\n mergedProps.theme = React.useContext(ThemeContext);\n }\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, classInterpolations, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);\n className += cache.key + \"-\" + serialized.name;\n\n if (targetClassName !== undefined) {\n className += \" \" + targetClassName;\n }\n\n var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;\n var newProps = {};\n\n for (var _key in props) {\n if (shouldUseAs && _key === 'as') continue;\n\n if (finalShouldForwardProp(_key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps.className = className;\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof FinalTag === 'string'\n }), /*#__PURE__*/React.createElement(FinalTag, newProps));\n });\n Styled.displayName = identifierName !== undefined ? identifierName : \"Styled(\" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + \")\";\n Styled.defaultProps = tag.defaultProps;\n Styled.__emotion_real = Styled;\n Styled.__emotion_base = baseTag;\n Styled.__emotion_styles = styles;\n Styled.__emotion_forwardProp = shouldForwardProp;\n Object.defineProperty(Styled, 'toString', {\n value: function value() {\n if (targetClassName === undefined && isDevelopment) {\n return 'NO_COMPONENT_SELECTOR';\n }\n\n return \".\" + targetClassName;\n }\n });\n\n Styled.withComponent = function (nextTag\n /*: StyledElementType */\n , nextOptions\n /* ?: StyledOptions */\n ) {\n return createStyled(nextTag, _extends({}, options, nextOptions, {\n shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)\n })).apply(void 0, styles);\n };\n\n return Styled;\n };\n};\n\nexport { createStyled as default };\n", "import createStyled from '../base/dist/emotion-styled-base.browser.esm.js';\nimport '@babel/runtime/helpers/extends';\nimport 'react';\nimport '@emotion/is-prop-valid';\nimport '@emotion/react';\nimport '@emotion/utils';\nimport '@emotion/serialize';\nimport '@emotion/use-insertion-effect-with-fallbacks';\n\nvar tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG\n'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\nvar newStyled = createStyled.bind();\ntags.forEach(function (tagName) {\n newStyled[tagName] = newStyled(tagName);\n});\n\nexport { newStyled as default };\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n", "/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = StyledEngineProvider;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nvar _react2 = require(\"@emotion/react\");\nvar _cache = _interopRequireDefault(require(\"@emotion/cache\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\n// prepend: true moves MUI styles to the top of the so they're loaded first.\n// It allows developers to easily override MUI styles with other styling solutions, like CSS modules.\nlet cache;\nif (typeof document === 'object') {\n cache = (0, _cache.default)({\n key: 'css',\n prepend: true\n });\n}\nfunction StyledEngineProvider(props) {\n const {\n injectFirst,\n children\n } = props;\n return injectFirst && cache ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.CacheProvider, {\n value: cache,\n children: children\n }) : children;\n}\nprocess.env.NODE_ENV !== \"production\" ? StyledEngineProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: _propTypes.default.node,\n /**\n * By default, the styles are injected last in the element of the page.\n * As a result, they gain more specificity than any other style sheet.\n * If you want to override MUI's styles, set this prop.\n */\n injectFirst: _propTypes.default.bool\n} : void 0;", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _StyledEngineProvider.default;\n }\n});\nvar _StyledEngineProvider = _interopRequireDefault(require(\"./StyledEngineProvider\"));", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = GlobalStyles;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nvar _react2 = require(\"@emotion/react\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction isEmpty(obj) {\n return obj === undefined || obj === null || Object.keys(obj).length === 0;\n}\nfunction GlobalStyles(props) {\n const {\n styles,\n defaultTheme = {}\n } = props;\n const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty(themeInput) ? defaultTheme : themeInput) : styles;\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.Global, {\n styles: globalStyles\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes = {\n defaultTheme: _propTypes.default.object,\n styles: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.string, _propTypes.default.object, _propTypes.default.func])\n} : void 0;", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _GlobalStyles.default;\n }\n});\nvar _GlobalStyles = _interopRequireDefault(require(\"./GlobalStyles\"));", "/**\n * @mui/styled-engine v5.16.6\n *\n * @license MIT\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\"use strict\";\n'use client';\n\n/* eslint-disable no-underscore-dangle */\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"GlobalStyles\", {\n enumerable: true,\n get: function () {\n return _GlobalStyles.default;\n }\n});\nObject.defineProperty(exports, \"StyledEngineProvider\", {\n enumerable: true,\n get: function () {\n return _StyledEngineProvider.default;\n }\n});\nObject.defineProperty(exports, \"ThemeContext\", {\n enumerable: true,\n get: function () {\n return _react.ThemeContext;\n }\n});\nObject.defineProperty(exports, \"css\", {\n enumerable: true,\n get: function () {\n return _react.css;\n }\n});\nexports.default = styled;\nexports.internal_processStyles = void 0;\nObject.defineProperty(exports, \"keyframes\", {\n enumerable: true,\n get: function () {\n return _react.keyframes;\n }\n});\nvar _styled = _interopRequireDefault(require(\"@emotion/styled\"));\nvar _react = require(\"@emotion/react\");\nvar _StyledEngineProvider = _interopRequireDefault(require(\"./StyledEngineProvider\"));\nvar _GlobalStyles = _interopRequireDefault(require(\"./GlobalStyles\"));\nfunction styled(tag, options) {\n const stylesFactory = (0, _styled.default)(tag, options);\n if (process.env.NODE_ENV !== 'production') {\n return (...styles) => {\n const component = typeof tag === 'string' ? `\"${tag}\"` : 'component';\n if (styles.length === 0) {\n console.error([`MUI: Seems like you called \\`styled(${component})()\\` without a \\`style\\` argument.`, 'You must provide a `styles` argument: `styled(\"div\")(styleYouForgotToPass)`.'].join('\\n'));\n } else if (styles.some(style => style === undefined)) {\n console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);\n }\n return stylesFactory(...styles);\n };\n }\n return stylesFactory;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst internal_processStyles = (tag, processor) => {\n // Emotion attaches all the styles as `__emotion_styles`.\n // Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186\n if (Array.isArray(tag.__emotion_styles)) {\n tag.__emotion_styles = processor(tag.__emotion_styles);\n }\n};\nexports.internal_processStyles = internal_processStyles;", "function _extends() {\n return (module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _extends.apply(null, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = deepmerge;\nexports.isPlainObject = isPlainObject;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js\nfunction isPlainObject(item) {\n if (typeof item !== 'object' || item === null) {\n return false;\n }\n const prototype = Object.getPrototypeOf(item);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);\n}\nfunction deepClone(source) {\n if (!isPlainObject(source)) {\n return source;\n }\n const output = {};\n Object.keys(source).forEach(key => {\n output[key] = deepClone(source[key]);\n });\n return output;\n}\nfunction deepmerge(target, source, options = {\n clone: true\n}) {\n const output = options.clone ? (0, _extends2.default)({}, target) : target;\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(key => {\n if (isPlainObject(source[key]) &&\n // Avoid prototype pollution\n Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {\n // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.\n output[key] = deepmerge(target[key], source[key], options);\n } else if (options.clone) {\n output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];\n } else {\n output[key] = source[key];\n }\n });\n }\n return output;\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _exportNames = {};\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _deepmerge.default;\n }\n});\nvar _deepmerge = _interopRequireWildcard(require(\"./deepmerge\"));\nObject.keys(_deepmerge).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _deepmerge[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _deepmerge[key];\n }\n });\n});\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = capitalize;\nvar _formatMuiErrorMessage2 = _interopRequireDefault(require(\"@mui/utils/formatMuiErrorMessage\"));\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word in the sentence.\n// We only handle the first word.\nfunction capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`capitalize(string)\\` expects a string argument.` : (0, _formatMuiErrorMessage2.default)(7));\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _capitalize.default;\n }\n});\nvar _capitalize = _interopRequireDefault(require(\"./capitalize\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst defaultGenerator = componentName => componentName;\nconst createClassNameGenerator = () => {\n let generate = defaultGenerator;\n return {\n configure(generator) {\n generate = generator;\n },\n generate(componentName) {\n return generate(componentName);\n },\n reset() {\n generate = defaultGenerator;\n }\n };\n};\nconst ClassNameGenerator = createClassNameGenerator();\nvar _default = exports.default = ClassNameGenerator;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _ClassNameGenerator.default;\n }\n});\nvar _ClassNameGenerator = _interopRequireDefault(require(\"./ClassNameGenerator\"));", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = generateUtilityClass;\nexports.globalStateClasses = void 0;\nexports.isGlobalState = isGlobalState;\nvar _ClassNameGenerator = _interopRequireDefault(require(\"../ClassNameGenerator\"));\nconst globalStateClasses = exports.globalStateClasses = {\n active: 'active',\n checked: 'checked',\n completed: 'completed',\n disabled: 'disabled',\n error: 'error',\n expanded: 'expanded',\n focused: 'focused',\n focusVisible: 'focusVisible',\n open: 'open',\n readOnly: 'readOnly',\n required: 'required',\n selected: 'selected'\n};\nfunction generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${_ClassNameGenerator.default.generate(componentName)}-${slot}`;\n}\nfunction isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _exportNames = {};\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _generateUtilityClass.default;\n }\n});\nvar _generateUtilityClass = _interopRequireWildcard(require(\"./generateUtilityClass\"));\nObject.keys(_generateUtilityClass).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _generateUtilityClass[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _generateUtilityClass[key];\n }\n });\n});\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = generateUtilityClasses;\nvar _generateUtilityClass = _interopRequireDefault(require(\"../generateUtilityClass\"));\nfunction generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {\n const result = {};\n slots.forEach(slot => {\n result[slot] = (0, _generateUtilityClass.default)(componentName, slot, globalStatePrefix);\n });\n return result;\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _generateUtilityClasses.default;\n }\n});\nvar _generateUtilityClasses = _interopRequireDefault(require(\"./generateUtilityClasses\"));", "/**\n * @license React\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = getDisplayName;\nexports.getFunctionName = getFunctionName;\nvar _reactIs = require(\"react-is\");\n// Simplified polyfill for IE11 support\n// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3\nconst fnNameMatchRegex = /^\\s*function(?:\\s|\\s*\\/\\*.*\\*\\/\\s*)+([^(\\s/]*)\\s*/;\nfunction getFunctionName(fn) {\n const match = `${fn}`.match(fnNameMatchRegex);\n const name = match && match[1];\n return name || '';\n}\nfunction getFunctionComponentName(Component, fallback = '') {\n return Component.displayName || Component.name || getFunctionName(Component) || fallback;\n}\nfunction getWrappedName(outerType, innerType, wrapperName) {\n const functionName = getFunctionComponentName(innerType);\n return outerType.displayName || (functionName !== '' ? `${wrapperName}(${functionName})` : wrapperName);\n}\n\n/**\n * cherry-pick from\n * https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js\n * originally forked from recompose/getDisplayName with added IE11 support\n */\nfunction getDisplayName(Component) {\n if (Component == null) {\n return undefined;\n }\n if (typeof Component === 'string') {\n return Component;\n }\n if (typeof Component === 'function') {\n return getFunctionComponentName(Component, 'Component');\n }\n\n // TypeScript can't have components as objects but they exist in the form of `memo` or `Suspense`\n if (typeof Component === 'object') {\n switch (Component.$$typeof) {\n case _reactIs.ForwardRef:\n return getWrappedName(Component, Component.render, 'ForwardRef');\n case _reactIs.Memo:\n return getWrappedName(Component, Component.type, 'memo');\n default:\n return undefined;\n }\n }\n return undefined;\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _exportNames = {};\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _getDisplayName.default;\n }\n});\nvar _getDisplayName = _interopRequireWildcard(require(\"./getDisplayName\"));\nObject.keys(_getDisplayName).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _getDisplayName[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _getDisplayName[key];\n }\n });\n});\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = resolveProps;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n/**\n * Add keys, values of `defaultProps` that does not exist in `props`\n * @param {object} defaultProps\n * @param {object} props\n * @returns {object} resolved props\n */\nfunction resolveProps(defaultProps, props) {\n const output = (0, _extends2.default)({}, props);\n Object.keys(defaultProps).forEach(propName => {\n if (propName.toString().match(/^(components|slots)$/)) {\n output[propName] = (0, _extends2.default)({}, defaultProps[propName], output[propName]);\n } else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {\n const defaultSlotProps = defaultProps[propName] || {};\n const slotProps = props[propName];\n output[propName] = {};\n if (!slotProps || !Object.keys(slotProps)) {\n // Reduce the iteration if the slot props is empty\n output[propName] = defaultSlotProps;\n } else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {\n // Reduce the iteration if the default slot props is empty\n output[propName] = slotProps;\n } else {\n output[propName] = (0, _extends2.default)({}, slotProps);\n Object.keys(defaultSlotProps).forEach(slotPropName => {\n output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);\n });\n }\n } else if (output[propName] === undefined) {\n output[propName] = defaultProps[propName];\n }\n });\n return output;\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _resolveProps.default;\n }\n});\nvar _resolveProps = _interopRequireDefault(require(\"./resolveProps\"));", "\"use strict\";\n'use client';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nvar _default = exports.default = useEnhancedEffect;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _useEnhancedEffect.default;\n }\n});\nvar _useEnhancedEffect = _interopRequireDefault(require(\"./useEnhancedEffect\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nfunction clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {\n return Math.max(min, Math.min(val, max));\n}\nvar _default = exports.default = clamp;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _clamp.default;\n }\n});\nvar _clamp = _interopRequireDefault(require(\"./clamp\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = chainPropTypes;\nfunction chainPropTypes(propType1, propType2) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n return function validate(...args) {\n return propType1(...args) || propType2(...args);\n };\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _chainPropTypes.default;\n }\n});\nvar _chainPropTypes = _interopRequireDefault(require(\"./chainPropTypes\"));", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nvar _chainPropTypes = _interopRequireDefault(require(\"../chainPropTypes\"));\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n const {\n prototype = {}\n } = elementType;\n return Boolean(prototype.isReactComponent);\n}\nfunction acceptingRef(props, propName, componentName, location, propFullName) {\n const element = props[propName];\n const safePropName = propFullName || propName;\n if (element == null ||\n // When server-side rendering React doesn't warn either.\n // This is not an accurate check for SSR.\n // This is only in place for Emotion compat.\n // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.\n typeof window === 'undefined') {\n return null;\n }\n let warningHint;\n const elementType = element.type;\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n if (typeof elementType === 'function' && !isClassComponent(elementType)) {\n warningHint = 'Did you accidentally use a plain function component for an element instead?';\n }\n if (warningHint !== undefined) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');\n }\n return null;\n}\nconst elementAcceptingRef = (0, _chainPropTypes.default)(_propTypes.default.element, acceptingRef);\nelementAcceptingRef.isRequired = (0, _chainPropTypes.default)(_propTypes.default.element.isRequired, acceptingRef);\nvar _default = exports.default = elementAcceptingRef;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _elementAcceptingRef.default;\n }\n});\nvar _elementAcceptingRef = _interopRequireDefault(require(\"./elementAcceptingRef\"));", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nvar _chainPropTypes = _interopRequireDefault(require(\"../chainPropTypes\"));\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n const {\n prototype = {}\n } = elementType;\n return Boolean(prototype.isReactComponent);\n}\nfunction elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {\n const propValue = props[propName];\n const safePropName = propFullName || propName;\n if (propValue == null ||\n // When server-side rendering React doesn't warn either.\n // This is not an accurate check for SSR.\n // This is only in place for emotion compat.\n // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.\n typeof window === 'undefined') {\n return null;\n }\n let warningHint;\n\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n if (typeof propValue === 'function' && !isClassComponent(propValue)) {\n warningHint = 'Did you accidentally provide a plain function component instead?';\n }\n if (warningHint !== undefined) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');\n }\n return null;\n}\nvar _default = exports.default = (0, _chainPropTypes.default)(_propTypes.default.elementType, elementTypeAcceptingRef);", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _elementTypeAcceptingRef.default;\n }\n});\nvar _elementTypeAcceptingRef = _interopRequireDefault(require(\"./elementTypeAcceptingRef\"));", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exactProp;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n// This module is based on https://github.com/airbnb/prop-types-exact repository.\n// However, in order to reduce the number of dependencies and to remove some extra safe checks\n// the module was forked.\n\nconst specialProperty = 'exact-prop: \\u200b';\nfunction exactProp(propTypes) {\n if (process.env.NODE_ENV === 'production') {\n return propTypes;\n }\n return (0, _extends2.default)({}, propTypes, {\n [specialProperty]: props => {\n const unsupportedProps = Object.keys(props).filter(prop => !propTypes.hasOwnProperty(prop));\n if (unsupportedProps.length > 0) {\n return new Error(`The following props are not supported: ${unsupportedProps.map(prop => `\\`${prop}\\``).join(', ')}. Please remove them.`);\n }\n return null;\n }\n });\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _exactProp.default;\n }\n});\nvar _exactProp = _interopRequireDefault(require(\"./exactProp\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = HTMLElementType;\nfunction HTMLElementType(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n const propValue = props[propName];\n const safePropName = propFullName || propName;\n if (propValue == null) {\n return null;\n }\n if (propValue && propValue.nodeType !== 1) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an HTMLElement.`);\n }\n return null;\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _HTMLElementType.default;\n }\n});\nvar _HTMLElementType = _interopRequireDefault(require(\"./HTMLElementType\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/* eslint-disable */\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar _default = exports.default = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _ponyfillGlobal.default;\n }\n});\nvar _ponyfillGlobal = _interopRequireDefault(require(\"./ponyfillGlobal\"));", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nconst refType = _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]);\nvar _default = exports.default = refType;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _refType.default;\n }\n});\nvar _refType = _interopRequireDefault(require(\"./refType\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createChainedFunction;\n/**\n * Safe chained function.\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n */\nfunction createChainedFunction(...funcs) {\n return funcs.reduce((acc, func) => {\n if (func == null) {\n return acc;\n }\n return function chainedFunction(...args) {\n acc.apply(this, args);\n func.apply(this, args);\n };\n }, () => {});\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _createChainedFunction.default;\n }\n});\nvar _createChainedFunction = _interopRequireDefault(require(\"./createChainedFunction\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = debounce;\n// Corresponds to 10 frames at 60 Hz.\n// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.\nfunction debounce(func, wait = 166) {\n let timeout;\n function debounced(...args) {\n const later = () => {\n // @ts-ignore\n func.apply(this, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n debounced.clear = () => {\n clearTimeout(timeout);\n };\n return debounced;\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _exportNames = {};\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _debounce.default;\n }\n});\nvar _debounce = _interopRequireWildcard(require(\"./debounce\"));\nObject.keys(_debounce).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _debounce[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _debounce[key];\n }\n });\n});\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = deprecatedPropType;\nfunction deprecatedPropType(validator, reason) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n return (props, propName, componentName, location, propFullName) => {\n const componentNameSafe = componentName || '<>';\n const propFullNameSafe = propFullName || propName;\n if (typeof props[propName] !== 'undefined') {\n return new Error(`The ${location} \\`${propFullNameSafe}\\` of ` + `\\`${componentNameSafe}\\` is deprecated. ${reason}`);\n }\n return null;\n };\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _deprecatedPropType.default;\n }\n});\nvar _deprecatedPropType = _interopRequireDefault(require(\"./deprecatedPropType\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isMuiElement;\nvar React = _interopRequireWildcard(require(\"react\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction isMuiElement(element, muiNames) {\n var _muiName, _element$type;\n return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName\n // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45\n // eslint-disable-next-line no-underscore-dangle\n (_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _isMuiElement.default;\n }\n});\nvar _isMuiElement = _interopRequireDefault(require(\"./isMuiElement\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = ownerDocument;\nfunction ownerDocument(node) {\n return node && node.ownerDocument || document;\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _ownerDocument.default;\n }\n});\nvar _ownerDocument = _interopRequireDefault(require(\"./ownerDocument\"));", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = ownerWindow;\nvar _ownerDocument = _interopRequireDefault(require(\"../ownerDocument\"));\nfunction ownerWindow(node) {\n const doc = (0, _ownerDocument.default)(node);\n return doc.defaultView || window;\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _ownerWindow.default;\n }\n});\nvar _ownerWindow = _interopRequireDefault(require(\"./ownerWindow\"));", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = requirePropFactory;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nfunction requirePropFactory(componentNameInError, Component) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n\n // eslint-disable-next-line react/forbid-foreign-prop-types\n const prevPropTypes = Component ? (0, _extends2.default)({}, Component.propTypes) : null;\n const requireProp = requiredProp => (props, propName, componentName, location, propFullName, ...args) => {\n const propFullNameSafe = propFullName || propName;\n const defaultTypeChecker = prevPropTypes == null ? void 0 : prevPropTypes[propFullNameSafe];\n if (defaultTypeChecker) {\n const typeCheckerResult = defaultTypeChecker(props, propName, componentName, location, propFullName, ...args);\n if (typeCheckerResult) {\n return typeCheckerResult;\n }\n }\n if (typeof props[propName] !== 'undefined' && !props[requiredProp]) {\n return new Error(`The prop \\`${propFullNameSafe}\\` of ` + `\\`${componentNameInError}\\` can only be used together with the \\`${requiredProp}\\` prop.`);\n }\n return null;\n };\n return requireProp;\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _requirePropFactory.default;\n }\n});\nvar _requirePropFactory = _interopRequireDefault(require(\"./requirePropFactory\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = setRef;\n/**\n * TODO v5: consider making it private\n *\n * passes {value} to {ref}\n *\n * WARNING: Be sure to only call this inside a callback that is passed as a ref.\n * Otherwise, make sure to cleanup the previous {ref} if it changes. See\n * https://github.com/mui/material-ui/issues/13539\n *\n * Useful if you want to expose the ref of an inner component to the public API\n * while still using it inside the component.\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\n */\nfunction setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _setRef.default;\n }\n});\nvar _setRef = _interopRequireDefault(require(\"./setRef\"));", "\"use strict\";\n'use client';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useId;\nvar React = _interopRequireWildcard(require(\"react\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nlet globalId = 0;\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814\nconst maybeReactUseId = React['useId'.toString()];\n/**\n *\n * @example

\n * @param idOverride\n * @returns {string}\n */\nfunction useId(idOverride) {\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride != null ? idOverride : reactId;\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _useId.default;\n }\n});\nvar _useId = _interopRequireDefault(require(\"./useId\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = unsupportedProp;\nfunction unsupportedProp(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n const propFullNameSafe = propFullName || propName;\n if (typeof props[propName] !== 'undefined') {\n return new Error(`The prop \\`${propFullNameSafe}\\` is not supported. Please remove it.`);\n }\n return null;\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _unsupportedProp.default;\n }\n});\nvar _unsupportedProp = _interopRequireDefault(require(\"./unsupportedProp\"));", "\"use strict\";\n'use client';\n\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useControlled;\nvar React = _interopRequireWildcard(require(\"react\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction useControlled({\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n}) {\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n if (!isControlled && !Object.is(defaultValue, defaultProp)) {\n console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _useControlled.default;\n }\n});\nvar _useControlled = _interopRequireDefault(require(\"./useControlled\"));", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _useEnhancedEffect = _interopRequireDefault(require(\"../useEnhancedEffect\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n (0, _useEnhancedEffect.default)(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nvar _default = exports.default = useEventCallback;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _useEventCallback.default;\n }\n});\nvar _useEventCallback = _interopRequireDefault(require(\"./useEventCallback\"));", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useForkRef;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _setRef = _interopRequireDefault(require(\"../setRef\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction useForkRef(...refs) {\n /**\n * This will create a new function if the refs passed to this hook change and are all defined.\n * This means react will call the old forkRef with `null` and the new forkRef\n * with the ref. Cleanup naturally emerges from this behavior.\n */\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return instance => {\n refs.forEach(ref => {\n (0, _setRef.default)(ref, instance);\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _useForkRef.default;\n }\n});\nvar _useForkRef = _interopRequireDefault(require(\"./useForkRef\"));", "\"use strict\";\n'use client';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useLazyRef;\nvar React = _interopRequireWildcard(require(\"react\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nconst UNINITIALIZED = {};\n\n/**\n * A React.useRef() that is initialized lazily with a function. Note that it accepts an optional\n * initialization argument, so the initialization function doesn't need to be an inline closure.\n *\n * @usage\n * const ref = useLazyRef(sortColumns, columns)\n */\nfunction useLazyRef(init, initArg) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = init(initArg);\n }\n return ref;\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _useLazyRef.default;\n }\n});\nvar _useLazyRef = _interopRequireDefault(require(\"./useLazyRef\"));", "\"use strict\";\n'use client';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useOnMount;\nvar React = _interopRequireWildcard(require(\"react\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nconst EMPTY = [];\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nfunction useOnMount(fn) {\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Timeout = void 0;\nexports.default = useTimeout;\nvar _useLazyRef = _interopRequireDefault(require(\"../useLazyRef/useLazyRef\"));\nvar _useOnMount = _interopRequireDefault(require(\"../useOnMount/useOnMount\"));\nclass Timeout {\n constructor() {\n this.currentId = null;\n this.clear = () => {\n if (this.currentId !== null) {\n clearTimeout(this.currentId);\n this.currentId = null;\n }\n };\n this.disposeEffect = () => {\n return this.clear;\n };\n }\n static create() {\n return new Timeout();\n }\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n start(delay, fn) {\n this.clear();\n this.currentId = setTimeout(() => {\n this.currentId = null;\n fn();\n }, delay);\n }\n}\nexports.Timeout = Timeout;\nfunction useTimeout() {\n const timeout = (0, _useLazyRef.default)(Timeout.create).current;\n (0, _useOnMount.default)(timeout.disposeEffect);\n return timeout;\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Timeout\", {\n enumerable: true,\n get: function () {\n return _useTimeout.Timeout;\n }\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _useTimeout.default;\n }\n});\nvar _useTimeout = _interopRequireWildcard(require(\"./useTimeout\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _useOnMount.default;\n }\n});\nvar _useOnMount = _interopRequireDefault(require(\"./useOnMount\"));", "\"use strict\";\n'use client';\n\n// based on https://github.com/WICG/focus-visible/blob/v4.1.5/src/focus-visible.js\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useIsFocusVisible;\nexports.teardown = teardown;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _useTimeout = require(\"../useTimeout/useTimeout\");\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nlet hadKeyboardEvent = true;\nlet hadFocusVisibleRecently = false;\nconst hadFocusVisibleRecentlyTimeout = new _useTimeout.Timeout();\nconst inputTypesWhitelist = {\n text: true,\n search: true,\n url: true,\n tel: true,\n email: true,\n password: true,\n number: true,\n date: true,\n month: true,\n week: true,\n time: true,\n datetime: true,\n 'datetime-local': true\n};\n\n/**\n * Computes whether the given element should automatically trigger the\n * `focus-visible` class being added, i.e. whether it should always match\n * `:focus-visible` when focused.\n * @param {Element} node\n * @returns {boolean}\n */\nfunction focusTriggersKeyboardModality(node) {\n const {\n type,\n tagName\n } = node;\n if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {\n return true;\n }\n if (tagName === 'TEXTAREA' && !node.readOnly) {\n return true;\n }\n if (node.isContentEditable) {\n return true;\n }\n return false;\n}\n\n/**\n * Keep track of our keyboard modality state with `hadKeyboardEvent`.\n * If the most recent user interaction was via the keyboard;\n * and the key press did not include a meta, alt/option, or control key;\n * then the modality is keyboard. Otherwise, the modality is not keyboard.\n * @param {KeyboardEvent} event\n */\nfunction handleKeyDown(event) {\n if (event.metaKey || event.altKey || event.ctrlKey) {\n return;\n }\n hadKeyboardEvent = true;\n}\n\n/**\n * If at any point a user clicks with a pointing device, ensure that we change\n * the modality away from keyboard.\n * This avoids the situation where a user presses a key on an already focused\n * element, and then clicks on a different element, focusing it with a\n * pointing device, while we still think we're in keyboard modality.\n */\nfunction handlePointerDown() {\n hadKeyboardEvent = false;\n}\nfunction handleVisibilityChange() {\n if (this.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the class when the user switches back to the tab.\n if (hadFocusVisibleRecently) {\n hadKeyboardEvent = true;\n }\n }\n}\nfunction prepare(doc) {\n doc.addEventListener('keydown', handleKeyDown, true);\n doc.addEventListener('mousedown', handlePointerDown, true);\n doc.addEventListener('pointerdown', handlePointerDown, true);\n doc.addEventListener('touchstart', handlePointerDown, true);\n doc.addEventListener('visibilitychange', handleVisibilityChange, true);\n}\nfunction teardown(doc) {\n doc.removeEventListener('keydown', handleKeyDown, true);\n doc.removeEventListener('mousedown', handlePointerDown, true);\n doc.removeEventListener('pointerdown', handlePointerDown, true);\n doc.removeEventListener('touchstart', handlePointerDown, true);\n doc.removeEventListener('visibilitychange', handleVisibilityChange, true);\n}\nfunction isFocusVisible(event) {\n const {\n target\n } = event;\n try {\n return target.matches(':focus-visible');\n } catch (error) {\n // Browsers not implementing :focus-visible will throw a SyntaxError.\n // We use our own heuristic for those browsers.\n // Rethrow might be better if it's not the expected error but do we really\n // want to crash if focus-visible malfunctioned?\n }\n\n // No need for validFocusTarget check. The user does that by attaching it to\n // focusable events only.\n return hadKeyboardEvent || focusTriggersKeyboardModality(target);\n}\nfunction useIsFocusVisible() {\n const ref = React.useCallback(node => {\n if (node != null) {\n prepare(node.ownerDocument);\n }\n }, []);\n const isFocusVisibleRef = React.useRef(false);\n\n /**\n * Should be called if a blur event is fired\n */\n function handleBlurVisible() {\n // checking against potential state variable does not suffice if we focus and blur synchronously.\n // React wouldn't have time to trigger a re-render so `focusVisible` would be stale.\n // Ideally we would adjust `isFocusVisible(event)` to look at `relatedTarget` for blur events.\n // This doesn't work in IE11 due to https://github.com/facebook/react/issues/3751\n // TODO: check again if React releases their internal changes to focus event handling (https://github.com/facebook/react/pull/19186).\n if (isFocusVisibleRef.current) {\n // To detect a tab/window switch, we look for a blur event followed\n // rapidly by a visibility change.\n // If we don't see a visibility change within 100ms, it's probably a\n // regular focus change.\n hadFocusVisibleRecently = true;\n hadFocusVisibleRecentlyTimeout.start(100, () => {\n hadFocusVisibleRecently = false;\n });\n isFocusVisibleRef.current = false;\n return true;\n }\n return false;\n }\n\n /**\n * Should be called if a blur event is fired\n */\n function handleFocusVisible(event) {\n if (isFocusVisible(event)) {\n isFocusVisibleRef.current = true;\n return true;\n }\n return false;\n }\n return {\n isFocusVisibleRef,\n onFocus: handleFocusVisible,\n onBlur: handleBlurVisible,\n ref\n };\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _exportNames = {};\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _useIsFocusVisible.default;\n }\n});\nvar _useIsFocusVisible = _interopRequireWildcard(require(\"./useIsFocusVisible\"));\nObject.keys(_useIsFocusVisible).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _useIsFocusVisible[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _useIsFocusVisible[key];\n }\n });\n});\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = getScrollbarSize;\n// A change of the browser zoom change the scrollbar size.\n// Credit https://github.com/twbs/bootstrap/blob/488fd8afc535ca3a6ad4dc581f5e89217b6a36ac/js/src/util/scrollbar.js#L14-L18\nfunction getScrollbarSize(doc) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = doc.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _getScrollbarSize.default;\n }\n});\nvar _getScrollbarSize = _interopRequireDefault(require(\"./getScrollbarSize\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.detectScrollType = detectScrollType;\nexports.getNormalizedScrollLeft = getNormalizedScrollLeft;\n// Source from https://github.com/alitaheri/normalize-scroll-left\nlet cachedType;\n\n/**\n * Based on the jquery plugin https://github.com/othree/jquery.rtl-scroll-type\n *\n * Types of scrollLeft, assuming scrollWidth=100 and direction is rtl.\n *\n * Type | <- Most Left | Most Right -> | Initial\n * ---------------- | ------------ | ------------- | -------\n * default | 0 | 100 | 100\n * negative (spec*) | -100 | 0 | 0\n * reverse | 100 | 0 | 0\n *\n * Edge 85: default\n * Safari 14: negative\n * Chrome 85: negative\n * Firefox 81: negative\n * IE11: reverse\n *\n * spec* https://drafts.csswg.org/cssom-view/#dom-window-scroll\n */\nfunction detectScrollType() {\n if (cachedType) {\n return cachedType;\n }\n const dummy = document.createElement('div');\n const container = document.createElement('div');\n container.style.width = '10px';\n container.style.height = '1px';\n dummy.appendChild(container);\n dummy.dir = 'rtl';\n dummy.style.fontSize = '14px';\n dummy.style.width = '4px';\n dummy.style.height = '1px';\n dummy.style.position = 'absolute';\n dummy.style.top = '-1000px';\n dummy.style.overflow = 'scroll';\n document.body.appendChild(dummy);\n cachedType = 'reverse';\n if (dummy.scrollLeft > 0) {\n cachedType = 'default';\n } else {\n dummy.scrollLeft = 1;\n if (dummy.scrollLeft === 0) {\n cachedType = 'negative';\n }\n }\n document.body.removeChild(dummy);\n return cachedType;\n}\n\n// Based on https://stackoverflow.com/a/24394376\nfunction getNormalizedScrollLeft(element, direction) {\n const scrollLeft = element.scrollLeft;\n\n // Perform the calculations only when direction is rtl to avoid messing up the ltr behavior\n if (direction !== 'rtl') {\n return scrollLeft;\n }\n const type = detectScrollType();\n switch (type) {\n case 'negative':\n return element.scrollWidth - element.clientWidth + scrollLeft;\n case 'reverse':\n return element.scrollWidth - element.clientWidth - scrollLeft;\n default:\n return scrollLeft;\n }\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _scrollLeft = require(\"./scrollLeft\");\nObject.keys(_scrollLeft).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _scrollLeft[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _scrollLeft[key];\n }\n });\n});", "\"use strict\";\n'use client';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nconst usePreviousProps = value => {\n const ref = React.useRef({});\n React.useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n};\nvar _default = exports.default = usePreviousProps;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _usePreviousProps.default;\n }\n});\nvar _usePreviousProps = _interopRequireDefault(require(\"./usePreviousProps\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = getValidReactChildren;\nvar React = _interopRequireWildcard(require(\"react\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\n/**\n * Gets only the valid children of a component,\n * and ignores any nullish or falsy child.\n *\n * @param children the children\n */\nfunction getValidReactChildren(children) {\n return React.Children.toArray(children).filter(child => /*#__PURE__*/React.isValidElement(child));\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _getValidReactChildren.default;\n }\n});\nvar _getValidReactChildren = _interopRequireDefault(require(\"./getValidReactChildren\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst visuallyHidden = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1px'\n};\nvar _default = exports.default = visuallyHidden;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _visuallyHidden.default;\n }\n});\nvar _visuallyHidden = _interopRequireDefault(require(\"./visuallyHidden\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.getTypeByValue = getTypeByValue;\nfunction getTypeByValue(value) {\n const valueType = typeof value;\n switch (valueType) {\n case 'number':\n if (Number.isNaN(value)) {\n return 'NaN';\n }\n if (!Number.isFinite(value)) {\n return 'Infinity';\n }\n if (value !== Math.floor(value)) {\n return 'float';\n }\n return 'number';\n case 'object':\n if (value === null) {\n return 'null';\n }\n return value.constructor.name;\n default:\n return valueType;\n }\n}\n\n// IE 11 support\nfunction ponyfillIsInteger(x) {\n // eslint-disable-next-line no-restricted-globals\n return typeof x === 'number' && isFinite(x) && Math.floor(x) === x;\n}\nconst isInteger = Number.isInteger || ponyfillIsInteger;\nfunction requiredInteger(props, propName, componentName, location) {\n const propValue = props[propName];\n if (propValue == null || !isInteger(propValue)) {\n const propType = getTypeByValue(propValue);\n return new RangeError(`Invalid ${location} \\`${propName}\\` of type \\`${propType}\\` supplied to \\`${componentName}\\`, expected \\`integer\\`.`);\n }\n return null;\n}\nfunction validator(props, propName, ...other) {\n const propValue = props[propName];\n if (propValue === undefined) {\n return null;\n }\n return requiredInteger(props, propName, ...other);\n}\nfunction validatorNoop() {\n return null;\n}\nvalidator.isRequired = requiredInteger;\nvalidatorNoop.isRequired = validatorNoop;\nvar _default = exports.default = process.env.NODE_ENV === 'production' ? validatorNoop : validator;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _exportNames = {};\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _integerPropType.default;\n }\n});\nvar _integerPropType = _interopRequireWildcard(require(\"./integerPropType\"));\nObject.keys(_integerPropType).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _integerPropType[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _integerPropType[key];\n }\n });\n});\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = composeClasses;\nfunction composeClasses(slots, getUtilityClass, classes = undefined) {\n const output = {};\n Object.keys(slots).forEach(\n // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.\n // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208\n slot => {\n output[slot] = slots[slot].reduce((acc, key) => {\n if (key) {\n const utilityClass = getUtilityClass(key);\n if (utilityClass !== '') {\n acc.push(utilityClass);\n }\n if (classes && classes[key]) {\n acc.push(classes[key]);\n }\n }\n return acc;\n }, []).join(' ');\n });\n return output;\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _composeClasses.default;\n }\n});\nvar _composeClasses = _interopRequireDefault(require(\"./composeClasses\"));", "function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.includes(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nfunction isHostComponent(element) {\n return typeof element === 'string';\n}\nvar _default = exports.default = isHostComponent;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _isHostComponent.default;\n }\n});\nvar _isHostComponent = _interopRequireDefault(require(\"./isHostComponent\"));", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar _isHostComponent = _interopRequireDefault(require(\"../isHostComponent\"));\n/**\n * Type of the ownerState based on the type of an element it applies to.\n * This resolves to the provided OwnerState for React components and `undefined` for host components.\n * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.\n */\n\n/**\n * Appends the ownerState object to the props, merging with the existing one if necessary.\n *\n * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.\n * @param otherProps Props of the element.\n * @param ownerState\n */\nfunction appendOwnerState(elementType, otherProps, ownerState) {\n if (elementType === undefined || (0, _isHostComponent.default)(elementType)) {\n return otherProps;\n }\n return (0, _extends2.default)({}, otherProps, {\n ownerState: (0, _extends2.default)({}, otherProps.ownerState, ownerState)\n });\n}\nvar _default = exports.default = appendOwnerState;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _appendOwnerState.default;\n }\n});\nvar _appendOwnerState = _interopRequireDefault(require(\"./appendOwnerState\"));", "function r(e){var o,t,f=\"\";if(\"string\"==typeof e||\"number\"==typeof e)f+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var n=e.length;for(o=0;o prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nvar _default = exports.default = extractEventHandlers;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _extractEventHandlers.default;\n }\n});\nvar _extractEventHandlers = _interopRequireDefault(require(\"./extractEventHandlers\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/**\n * Removes event handlers from the given object.\n * A field is considered an event handler if it is a function with a name beginning with `on`.\n *\n * @param object Object to remove event handlers from.\n * @returns Object with event handlers removed.\n */\nfunction omitEventHandlers(object) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nvar _default = exports.default = omitEventHandlers;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _omitEventHandlers.default;\n }\n});\nvar _omitEventHandlers = _interopRequireDefault(require(\"./omitEventHandlers\"));", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar _clsx = _interopRequireDefault(require(\"clsx\"));\nvar _extractEventHandlers = _interopRequireDefault(require(\"../extractEventHandlers\"));\nvar _omitEventHandlers = _interopRequireDefault(require(\"../omitEventHandlers\"));\n/**\n * Merges the slot component internal props (usually coming from a hook)\n * with the externally provided ones.\n *\n * The merge order is (the latter overrides the former):\n * 1. The internal props (specified as a getter function to work with get*Props hook result)\n * 2. Additional props (specified internally on a Base UI component)\n * 3. External props specified on the owner component. These should only be used on a root slot.\n * 4. External props specified in the `slotProps.*` prop.\n * 5. The `className` prop - combined from all the above.\n * @param parameters\n * @returns\n */\nfunction mergeSlotProps(parameters) {\n const {\n getSlotProps,\n additionalProps,\n externalSlotProps,\n externalForwardedProps,\n className\n } = parameters;\n if (!getSlotProps) {\n // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,\n // so we can simply merge all the props without having to worry about extracting event handlers.\n const joinedClasses = (0, _clsx.default)(additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);\n const mergedStyle = (0, _extends2.default)({}, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);\n const props = (0, _extends2.default)({}, additionalProps, externalForwardedProps, externalSlotProps);\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: undefined\n };\n }\n\n // In this case, getSlotProps is responsible for calling the external event handlers.\n // We don't need to include them in the merged props because of this.\n\n const eventHandlers = (0, _extractEventHandlers.default)((0, _extends2.default)({}, externalForwardedProps, externalSlotProps));\n const componentsPropsWithoutEventHandlers = (0, _omitEventHandlers.default)(externalSlotProps);\n const otherPropsWithoutEventHandlers = (0, _omitEventHandlers.default)(externalForwardedProps);\n const internalSlotProps = getSlotProps(eventHandlers);\n\n // The order of classes is important here.\n // Emotion (that we use in libraries consuming Base UI) depends on this order\n // to properly override style. It requires the most important classes to be last\n // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.\n const joinedClasses = (0, _clsx.default)(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);\n const mergedStyle = (0, _extends2.default)({}, internalSlotProps == null ? void 0 : internalSlotProps.style, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);\n const props = (0, _extends2.default)({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers);\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: internalSlotProps.ref\n };\n}\nvar _default = exports.default = mergeSlotProps;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _mergeSlotProps.default;\n }\n});\nvar _mergeSlotProps = _interopRequireDefault(require(\"./mergeSlotProps\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/**\n * If `componentProps` is a function, calls it with the provided `ownerState`.\n * Otherwise, just returns `componentProps`.\n */\nfunction resolveComponentProps(componentProps, ownerState, slotState) {\n if (typeof componentProps === 'function') {\n return componentProps(ownerState, slotState);\n }\n return componentProps;\n}\nvar _default = exports.default = resolveComponentProps;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _resolveComponentProps.default;\n }\n});\nvar _resolveComponentProps = _interopRequireDefault(require(\"./resolveComponentProps\"));", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\nvar _useForkRef = _interopRequireDefault(require(\"../useForkRef\"));\nvar _appendOwnerState = _interopRequireDefault(require(\"../appendOwnerState\"));\nvar _mergeSlotProps = _interopRequireDefault(require(\"../mergeSlotProps\"));\nvar _resolveComponentProps = _interopRequireDefault(require(\"../resolveComponentProps\"));\nconst _excluded = [\"elementType\", \"externalSlotProps\", \"ownerState\", \"skipResolvingSlotProps\"];\n/**\n * @ignore - do not document.\n * Builds the props to be passed into the slot of an unstyled component.\n * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior.\n * If the slot component is not a host component, it also merges in the `ownerState`.\n *\n * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component.\n */\nfunction useSlotProps(parameters) {\n var _parameters$additiona;\n const {\n elementType,\n externalSlotProps,\n ownerState,\n skipResolvingSlotProps = false\n } = parameters,\n rest = (0, _objectWithoutPropertiesLoose2.default)(parameters, _excluded);\n const resolvedComponentsProps = skipResolvingSlotProps ? {} : (0, _resolveComponentProps.default)(externalSlotProps, ownerState);\n const {\n props: mergedProps,\n internalRef\n } = (0, _mergeSlotProps.default)((0, _extends2.default)({}, rest, {\n externalSlotProps: resolvedComponentsProps\n }));\n const ref = (0, _useForkRef.default)(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, (_parameters$additiona = parameters.additionalProps) == null ? void 0 : _parameters$additiona.ref);\n const props = (0, _appendOwnerState.default)(elementType, (0, _extends2.default)({}, mergedProps, {\n ref\n }), ownerState);\n return props;\n}\nvar _default = exports.default = useSlotProps;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _useSlotProps.default;\n }\n});\nvar _useSlotProps = _interopRequireDefault(require(\"./useSlotProps\"));", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});", "/**\n * @mui/utils v5.16.6\n *\n * @license MIT\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _exportNames = {\n chainPropTypes: true,\n deepmerge: true,\n isPlainObject: true,\n elementAcceptingRef: true,\n elementTypeAcceptingRef: true,\n exactProp: true,\n formatMuiErrorMessage: true,\n getDisplayName: true,\n HTMLElementType: true,\n ponyfillGlobal: true,\n refType: true,\n unstable_capitalize: true,\n unstable_createChainedFunction: true,\n unstable_debounce: true,\n unstable_deprecatedPropType: true,\n unstable_isMuiElement: true,\n unstable_ownerDocument: true,\n unstable_ownerWindow: true,\n unstable_requirePropFactory: true,\n unstable_setRef: true,\n unstable_useEnhancedEffect: true,\n unstable_useId: true,\n unstable_unsupportedProp: true,\n unstable_useControlled: true,\n unstable_useEventCallback: true,\n unstable_useForkRef: true,\n unstable_useLazyRef: true,\n unstable_useTimeout: true,\n unstable_Timeout: true,\n unstable_useOnMount: true,\n unstable_useIsFocusVisible: true,\n unstable_getScrollbarSize: true,\n unstable_detectScrollType: true,\n unstable_getNormalizedScrollLeft: true,\n usePreviousProps: true,\n getValidReactChildren: true,\n visuallyHidden: true,\n integerPropType: true,\n internal_resolveProps: true,\n unstable_composeClasses: true,\n unstable_generateUtilityClass: true,\n unstable_isGlobalState: true,\n unstable_generateUtilityClasses: true,\n unstable_ClassNameGenerator: true,\n clamp: true,\n unstable_useSlotProps: true,\n unstable_resolveComponentProps: true,\n unstable_extractEventHandlers: true\n};\nObject.defineProperty(exports, \"HTMLElementType\", {\n enumerable: true,\n get: function () {\n return _HTMLElementType.default;\n }\n});\nObject.defineProperty(exports, \"chainPropTypes\", {\n enumerable: true,\n get: function () {\n return _chainPropTypes.default;\n }\n});\nObject.defineProperty(exports, \"clamp\", {\n enumerable: true,\n get: function () {\n return _clamp.default;\n }\n});\nObject.defineProperty(exports, \"deepmerge\", {\n enumerable: true,\n get: function () {\n return _deepmerge.default;\n }\n});\nObject.defineProperty(exports, \"elementAcceptingRef\", {\n enumerable: true,\n get: function () {\n return _elementAcceptingRef.default;\n }\n});\nObject.defineProperty(exports, \"elementTypeAcceptingRef\", {\n enumerable: true,\n get: function () {\n return _elementTypeAcceptingRef.default;\n }\n});\nObject.defineProperty(exports, \"exactProp\", {\n enumerable: true,\n get: function () {\n return _exactProp.default;\n }\n});\nObject.defineProperty(exports, \"formatMuiErrorMessage\", {\n enumerable: true,\n get: function () {\n return _formatMuiErrorMessage.default;\n }\n});\nObject.defineProperty(exports, \"getDisplayName\", {\n enumerable: true,\n get: function () {\n return _getDisplayName.default;\n }\n});\nObject.defineProperty(exports, \"getValidReactChildren\", {\n enumerable: true,\n get: function () {\n return _getValidReactChildren.default;\n }\n});\nObject.defineProperty(exports, \"integerPropType\", {\n enumerable: true,\n get: function () {\n return _integerPropType.default;\n }\n});\nObject.defineProperty(exports, \"internal_resolveProps\", {\n enumerable: true,\n get: function () {\n return _resolveProps.default;\n }\n});\nObject.defineProperty(exports, \"isPlainObject\", {\n enumerable: true,\n get: function () {\n return _deepmerge.isPlainObject;\n }\n});\nObject.defineProperty(exports, \"ponyfillGlobal\", {\n enumerable: true,\n get: function () {\n return _ponyfillGlobal.default;\n }\n});\nObject.defineProperty(exports, \"refType\", {\n enumerable: true,\n get: function () {\n return _refType.default;\n }\n});\nObject.defineProperty(exports, \"unstable_ClassNameGenerator\", {\n enumerable: true,\n get: function () {\n return _ClassNameGenerator.default;\n }\n});\nObject.defineProperty(exports, \"unstable_Timeout\", {\n enumerable: true,\n get: function () {\n return _useTimeout.Timeout;\n }\n});\nObject.defineProperty(exports, \"unstable_capitalize\", {\n enumerable: true,\n get: function () {\n return _capitalize.default;\n }\n});\nObject.defineProperty(exports, \"unstable_composeClasses\", {\n enumerable: true,\n get: function () {\n return _composeClasses.default;\n }\n});\nObject.defineProperty(exports, \"unstable_createChainedFunction\", {\n enumerable: true,\n get: function () {\n return _createChainedFunction.default;\n }\n});\nObject.defineProperty(exports, \"unstable_debounce\", {\n enumerable: true,\n get: function () {\n return _debounce.default;\n }\n});\nObject.defineProperty(exports, \"unstable_deprecatedPropType\", {\n enumerable: true,\n get: function () {\n return _deprecatedPropType.default;\n }\n});\nObject.defineProperty(exports, \"unstable_detectScrollType\", {\n enumerable: true,\n get: function () {\n return _scrollLeft.detectScrollType;\n }\n});\nObject.defineProperty(exports, \"unstable_extractEventHandlers\", {\n enumerable: true,\n get: function () {\n return _extractEventHandlers.default;\n }\n});\nObject.defineProperty(exports, \"unstable_generateUtilityClass\", {\n enumerable: true,\n get: function () {\n return _generateUtilityClass.default;\n }\n});\nObject.defineProperty(exports, \"unstable_generateUtilityClasses\", {\n enumerable: true,\n get: function () {\n return _generateUtilityClasses.default;\n }\n});\nObject.defineProperty(exports, \"unstable_getNormalizedScrollLeft\", {\n enumerable: true,\n get: function () {\n return _scrollLeft.getNormalizedScrollLeft;\n }\n});\nObject.defineProperty(exports, \"unstable_getScrollbarSize\", {\n enumerable: true,\n get: function () {\n return _getScrollbarSize.default;\n }\n});\nObject.defineProperty(exports, \"unstable_isGlobalState\", {\n enumerable: true,\n get: function () {\n return _generateUtilityClass.isGlobalState;\n }\n});\nObject.defineProperty(exports, \"unstable_isMuiElement\", {\n enumerable: true,\n get: function () {\n return _isMuiElement.default;\n }\n});\nObject.defineProperty(exports, \"unstable_ownerDocument\", {\n enumerable: true,\n get: function () {\n return _ownerDocument.default;\n }\n});\nObject.defineProperty(exports, \"unstable_ownerWindow\", {\n enumerable: true,\n get: function () {\n return _ownerWindow.default;\n }\n});\nObject.defineProperty(exports, \"unstable_requirePropFactory\", {\n enumerable: true,\n get: function () {\n return _requirePropFactory.default;\n }\n});\nObject.defineProperty(exports, \"unstable_resolveComponentProps\", {\n enumerable: true,\n get: function () {\n return _resolveComponentProps.default;\n }\n});\nObject.defineProperty(exports, \"unstable_setRef\", {\n enumerable: true,\n get: function () {\n return _setRef.default;\n }\n});\nObject.defineProperty(exports, \"unstable_unsupportedProp\", {\n enumerable: true,\n get: function () {\n return _unsupportedProp.default;\n }\n});\nObject.defineProperty(exports, \"unstable_useControlled\", {\n enumerable: true,\n get: function () {\n return _useControlled.default;\n }\n});\nObject.defineProperty(exports, \"unstable_useEnhancedEffect\", {\n enumerable: true,\n get: function () {\n return _useEnhancedEffect.default;\n }\n});\nObject.defineProperty(exports, \"unstable_useEventCallback\", {\n enumerable: true,\n get: function () {\n return _useEventCallback.default;\n }\n});\nObject.defineProperty(exports, \"unstable_useForkRef\", {\n enumerable: true,\n get: function () {\n return _useForkRef.default;\n }\n});\nObject.defineProperty(exports, \"unstable_useId\", {\n enumerable: true,\n get: function () {\n return _useId.default;\n }\n});\nObject.defineProperty(exports, \"unstable_useIsFocusVisible\", {\n enumerable: true,\n get: function () {\n return _useIsFocusVisible.default;\n }\n});\nObject.defineProperty(exports, \"unstable_useLazyRef\", {\n enumerable: true,\n get: function () {\n return _useLazyRef.default;\n }\n});\nObject.defineProperty(exports, \"unstable_useOnMount\", {\n enumerable: true,\n get: function () {\n return _useOnMount.default;\n }\n});\nObject.defineProperty(exports, \"unstable_useSlotProps\", {\n enumerable: true,\n get: function () {\n return _useSlotProps.default;\n }\n});\nObject.defineProperty(exports, \"unstable_useTimeout\", {\n enumerable: true,\n get: function () {\n return _useTimeout.default;\n }\n});\nObject.defineProperty(exports, \"usePreviousProps\", {\n enumerable: true,\n get: function () {\n return _usePreviousProps.default;\n }\n});\nObject.defineProperty(exports, \"visuallyHidden\", {\n enumerable: true,\n get: function () {\n return _visuallyHidden.default;\n }\n});\nvar _chainPropTypes = _interopRequireDefault(require(\"./chainPropTypes\"));\nvar _deepmerge = _interopRequireWildcard(require(\"./deepmerge\"));\nvar _elementAcceptingRef = _interopRequireDefault(require(\"./elementAcceptingRef\"));\nvar _elementTypeAcceptingRef = _interopRequireDefault(require(\"./elementTypeAcceptingRef\"));\nvar _exactProp = _interopRequireDefault(require(\"./exactProp\"));\nvar _formatMuiErrorMessage = _interopRequireDefault(require(\"./formatMuiErrorMessage\"));\nvar _getDisplayName = _interopRequireDefault(require(\"./getDisplayName\"));\nvar _HTMLElementType = _interopRequireDefault(require(\"./HTMLElementType\"));\nvar _ponyfillGlobal = _interopRequireDefault(require(\"./ponyfillGlobal\"));\nvar _refType = _interopRequireDefault(require(\"./refType\"));\nvar _capitalize = _interopRequireDefault(require(\"./capitalize\"));\nvar _createChainedFunction = _interopRequireDefault(require(\"./createChainedFunction\"));\nvar _debounce = _interopRequireDefault(require(\"./debounce\"));\nvar _deprecatedPropType = _interopRequireDefault(require(\"./deprecatedPropType\"));\nvar _isMuiElement = _interopRequireDefault(require(\"./isMuiElement\"));\nvar _ownerDocument = _interopRequireDefault(require(\"./ownerDocument\"));\nvar _ownerWindow = _interopRequireDefault(require(\"./ownerWindow\"));\nvar _requirePropFactory = _interopRequireDefault(require(\"./requirePropFactory\"));\nvar _setRef = _interopRequireDefault(require(\"./setRef\"));\nvar _useEnhancedEffect = _interopRequireDefault(require(\"./useEnhancedEffect\"));\nvar _useId = _interopRequireDefault(require(\"./useId\"));\nvar _unsupportedProp = _interopRequireDefault(require(\"./unsupportedProp\"));\nvar _useControlled = _interopRequireDefault(require(\"./useControlled\"));\nvar _useEventCallback = _interopRequireDefault(require(\"./useEventCallback\"));\nvar _useForkRef = _interopRequireDefault(require(\"./useForkRef\"));\nvar _useLazyRef = _interopRequireDefault(require(\"./useLazyRef\"));\nvar _useTimeout = _interopRequireWildcard(require(\"./useTimeout\"));\nvar _useOnMount = _interopRequireDefault(require(\"./useOnMount\"));\nvar _useIsFocusVisible = _interopRequireDefault(require(\"./useIsFocusVisible\"));\nvar _getScrollbarSize = _interopRequireDefault(require(\"./getScrollbarSize\"));\nvar _scrollLeft = require(\"./scrollLeft\");\nvar _usePreviousProps = _interopRequireDefault(require(\"./usePreviousProps\"));\nvar _getValidReactChildren = _interopRequireDefault(require(\"./getValidReactChildren\"));\nvar _visuallyHidden = _interopRequireDefault(require(\"./visuallyHidden\"));\nvar _integerPropType = _interopRequireDefault(require(\"./integerPropType\"));\nvar _resolveProps = _interopRequireDefault(require(\"./resolveProps\"));\nvar _composeClasses = _interopRequireDefault(require(\"./composeClasses\"));\nvar _generateUtilityClass = _interopRequireWildcard(require(\"./generateUtilityClass\"));\nObject.keys(_generateUtilityClass).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _generateUtilityClass[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _generateUtilityClass[key];\n }\n });\n});\nvar _generateUtilityClasses = _interopRequireDefault(require(\"./generateUtilityClasses\"));\nvar _ClassNameGenerator = _interopRequireDefault(require(\"./ClassNameGenerator\"));\nvar _clamp = _interopRequireDefault(require(\"./clamp\"));\nvar _useSlotProps = _interopRequireDefault(require(\"./useSlotProps\"));\nvar _resolveComponentProps = _interopRequireDefault(require(\"./resolveComponentProps\"));\nvar _extractEventHandlers = _interopRequireDefault(require(\"./extractEventHandlers\"));\nvar _types = require(\"./types\");\nObject.keys(_types).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _types[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _types[key];\n }\n });\n});\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.breakpointKeys = void 0;\nexports.default = createBreakpoints;\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nconst _excluded = [\"values\", \"unit\", \"step\"];\n// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nconst breakpointKeys = exports.breakpointKeys = ['xs', 'sm', 'md', 'lg', 'xl'];\nconst sortBreakpointsValues = values => {\n const breakpointsAsArray = Object.keys(values).map(key => ({\n key,\n val: values[key]\n })) || [];\n // Sort in ascending order\n breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);\n return breakpointsAsArray.reduce((acc, obj) => {\n return (0, _extends2.default)({}, acc, {\n [obj.key]: obj.val\n });\n }, {});\n};\n\n// Keep in mind that @media is inclusive by the CSS specification.\nfunction createBreakpoints(breakpoints) {\n const {\n // The breakpoint **start** at this value.\n // For instance with the first breakpoint xs: [xs, sm).\n values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n },\n unit = 'px',\n step = 5\n } = breakpoints,\n other = (0, _objectWithoutPropertiesLoose2.default)(breakpoints, _excluded);\n const sortedValues = sortBreakpointsValues(values);\n const keys = Object.keys(sortedValues);\n function up(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (min-width:${value}${unit})`;\n }\n function down(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (max-width:${value - step / 100}${unit})`;\n }\n function between(start, end) {\n const endIndex = keys.indexOf(end);\n return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;\n }\n function only(key) {\n if (keys.indexOf(key) + 1 < keys.length) {\n return between(key, keys[keys.indexOf(key) + 1]);\n }\n return up(key);\n }\n function not(key) {\n // handle first and last key separately, for better readability\n const keyIndex = keys.indexOf(key);\n if (keyIndex === 0) {\n return up(keys[1]);\n }\n if (keyIndex === keys.length - 1) {\n return down(keys[keyIndex]);\n }\n return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');\n }\n return (0, _extends2.default)({\n keys,\n values: sortedValues,\n up,\n down,\n between,\n only,\n not,\n unit\n }, other);\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst shape = {\n borderRadius: 4\n};\nvar _default = exports.default = shape;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nconst responsivePropType = process.env.NODE_ENV !== 'production' ? _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string, _propTypes.default.object, _propTypes.default.array]) : {};\nvar _default = exports.default = responsivePropType;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _deepmerge = _interopRequireDefault(require(\"@mui/utils/deepmerge\"));\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n return (0, _deepmerge.default)(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n });\n}\nvar _default = exports.default = merge;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.computeBreakpointsBase = computeBreakpointsBase;\nexports.createEmptyBreakpointObject = createEmptyBreakpointObject;\nexports.default = void 0;\nexports.handleBreakpoints = handleBreakpoints;\nexports.mergeBreakpointsInOrder = mergeBreakpointsInOrder;\nexports.removeUnusedBreakpoints = removeUnusedBreakpoints;\nexports.resolveBreakpointValues = resolveBreakpointValues;\nexports.values = void 0;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nvar _deepmerge = _interopRequireDefault(require(\"@mui/utils/deepmerge\"));\nvar _merge = _interopRequireDefault(require(\"./merge\"));\n// The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\nconst values = exports.values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n};\nconst defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: key => `@media (min-width:${values[key]}px)`\n};\nfunction handleBreakpoints(props, propValue, styleFromPropValue) {\n const theme = props.theme || {};\n if (Array.isArray(propValue)) {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return propValue.reduce((acc, item, index) => {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n if (typeof propValue === 'object') {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return Object.keys(propValue).reduce((acc, breakpoint) => {\n // key is breakpoint\n if (Object.keys(themeBreakpoints.values || values).indexOf(breakpoint) !== -1) {\n const mediaKey = themeBreakpoints.up(breakpoint);\n acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n } else {\n const cssKey = breakpoint;\n acc[cssKey] = propValue[cssKey];\n }\n return acc;\n }, {});\n }\n const output = styleFromPropValue(propValue);\n return output;\n}\nfunction breakpoints(styleFunction) {\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const newStyleFunction = props => {\n const theme = props.theme || {};\n const base = styleFunction(props);\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n const extended = themeBreakpoints.keys.reduce((acc, key) => {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction((0, _extends2.default)({\n theme\n }, props[key]));\n }\n return acc;\n }, null);\n return (0, _merge.default)(base, extended);\n };\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? (0, _extends2.default)({}, styleFunction.propTypes, {\n xs: _propTypes.default.object,\n sm: _propTypes.default.object,\n md: _propTypes.default.object,\n lg: _propTypes.default.object,\n xl: _propTypes.default.object\n }) : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps];\n return newStyleFunction;\n}\nfunction createEmptyBreakpointObject(breakpointsInput = {}) {\n var _breakpointsInput$key;\n const breakpointsInOrder = (_breakpointsInput$key = breakpointsInput.keys) == null ? void 0 : _breakpointsInput$key.reduce((acc, key) => {\n const breakpointStyleKey = breakpointsInput.up(key);\n acc[breakpointStyleKey] = {};\n return acc;\n }, {});\n return breakpointsInOrder || {};\n}\nfunction removeUnusedBreakpoints(breakpointKeys, style) {\n return breakpointKeys.reduce((acc, key) => {\n const breakpointOutput = acc[key];\n const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0;\n if (isBreakpointUnused) {\n delete acc[key];\n }\n return acc;\n }, style);\n}\nfunction mergeBreakpointsInOrder(breakpointsInput, ...styles) {\n const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput);\n const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => (0, _deepmerge.default)(prev, next), {});\n return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput);\n}\n\n// compute base for responsive values; e.g.,\n// [1,2,3] => {xs: true, sm: true, md: true}\n// {xs: 1, sm: 2, md: 3} => {xs: true, sm: true, md: true}\nfunction computeBreakpointsBase(breakpointValues, themeBreakpoints) {\n // fixed value\n if (typeof breakpointValues !== 'object') {\n return {};\n }\n const base = {};\n const breakpointsKeys = Object.keys(themeBreakpoints);\n if (Array.isArray(breakpointValues)) {\n breakpointsKeys.forEach((breakpoint, i) => {\n if (i < breakpointValues.length) {\n base[breakpoint] = true;\n }\n });\n } else {\n breakpointsKeys.forEach(breakpoint => {\n if (breakpointValues[breakpoint] != null) {\n base[breakpoint] = true;\n }\n });\n }\n return base;\n}\nfunction resolveBreakpointValues({\n values: breakpointValues,\n breakpoints: themeBreakpoints,\n base: customBase\n}) {\n const base = customBase || computeBreakpointsBase(breakpointValues, themeBreakpoints);\n const keys = Object.keys(base);\n if (keys.length === 0) {\n return breakpointValues;\n }\n let previous;\n return keys.reduce((acc, breakpoint, i) => {\n if (Array.isArray(breakpointValues)) {\n acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];\n previous = i;\n } else if (typeof breakpointValues === 'object') {\n acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];\n previous = breakpoint;\n } else {\n acc[breakpoint] = breakpointValues;\n }\n return acc;\n }, {});\n}\nvar _default = exports.default = breakpoints;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.getPath = getPath;\nexports.getStyleValue = getStyleValue;\nvar _capitalize = _interopRequireDefault(require(\"@mui/utils/capitalize\"));\nvar _responsivePropType = _interopRequireDefault(require(\"./responsivePropType\"));\nvar _breakpoints = require(\"./breakpoints\");\nfunction getPath(obj, path, checkVars = true) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n // Check if CSS variables are used\n if (obj && obj.vars && checkVars) {\n const val = `vars.${path}`.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);\n if (val != null) {\n return val;\n }\n }\n return path.split('.').reduce((acc, item) => {\n if (acc && acc[item] != null) {\n return acc[item];\n }\n return null;\n }, obj);\n}\nfunction getStyleValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {\n let value;\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || userValue;\n } else {\n value = getPath(themeMapping, propValueFinal) || userValue;\n }\n if (transform) {\n value = transform(value, userValue, themeMapping);\n }\n return value;\n}\nfunction style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n if (props[prop] == null) {\n return null;\n }\n const propValue = props[prop];\n const theme = props.theme;\n const themeMapping = getPath(theme, themeKey) || {};\n const styleFromPropValue = propValueFinal => {\n let value = getStyleValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : (0, _capitalize.default)(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return (0, _breakpoints.handleBreakpoints)(props, propValue, styleFromPropValue);\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? {\n [prop]: _responsivePropType.default\n } : {};\n fn.filterProps = [prop];\n return fn;\n}\nvar _default = exports.default = style;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = memoize;\nfunction memoize(fn) {\n const cache = {};\n return arg => {\n if (cache[arg] === undefined) {\n cache[arg] = fn(arg);\n }\n return cache[arg];\n };\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createUnarySpacing = createUnarySpacing;\nexports.createUnaryUnit = createUnaryUnit;\nexports.default = void 0;\nexports.getStyleFromPropValue = getStyleFromPropValue;\nexports.getValue = getValue;\nexports.margin = margin;\nexports.marginKeys = void 0;\nexports.padding = padding;\nexports.paddingKeys = void 0;\nvar _responsivePropType = _interopRequireDefault(require(\"./responsivePropType\"));\nvar _breakpoints = require(\"./breakpoints\");\nvar _style = require(\"./style\");\nvar _merge = _interopRequireDefault(require(\"./merge\"));\nvar _memoize = _interopRequireDefault(require(\"./memoize\"));\nconst properties = {\n m: 'margin',\n p: 'padding'\n};\nconst directions = {\n t: 'Top',\n r: 'Right',\n b: 'Bottom',\n l: 'Left',\n x: ['Left', 'Right'],\n y: ['Top', 'Bottom']\n};\nconst aliases = {\n marginX: 'mx',\n marginY: 'my',\n paddingX: 'px',\n paddingY: 'py'\n};\n\n// memoize() impact:\n// From 300,000 ops/sec\n// To 350,000 ops/sec\nconst getCssProperties = (0, _memoize.default)(prop => {\n // It's not a shorthand notation.\n if (prop.length > 2) {\n if (aliases[prop]) {\n prop = aliases[prop];\n } else {\n return [prop];\n }\n }\n const [a, b] = prop.split('');\n const property = properties[a];\n const direction = directions[b] || '';\n return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];\n});\nconst marginKeys = exports.marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];\nconst paddingKeys = exports.paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];\nconst spacingKeys = [...marginKeys, ...paddingKeys];\nfunction createUnaryUnit(theme, themeKey, defaultValue, propName) {\n var _getPath;\n const themeSpacing = (_getPath = (0, _style.getPath)(theme, themeKey, false)) != null ? _getPath : defaultValue;\n if (typeof themeSpacing === 'number') {\n return abs => {\n if (typeof abs === 'string') {\n return abs;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (typeof abs !== 'number') {\n console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);\n }\n }\n return themeSpacing * abs;\n };\n }\n if (Array.isArray(themeSpacing)) {\n return abs => {\n if (typeof abs === 'string') {\n return abs;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!Number.isInteger(abs)) {\n console.error([`MUI: The \\`theme.${themeKey}\\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \\`theme.${themeKey}\\` as a number.`].join('\\n'));\n } else if (abs > themeSpacing.length - 1) {\n console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\\n'));\n }\n }\n return themeSpacing[abs];\n };\n }\n if (typeof themeSpacing === 'function') {\n return themeSpacing;\n }\n if (process.env.NODE_ENV !== 'production') {\n console.error([`MUI: The \\`theme.${themeKey}\\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\\n'));\n }\n return () => undefined;\n}\nfunction createUnarySpacing(theme) {\n return createUnaryUnit(theme, 'spacing', 8, 'spacing');\n}\nfunction getValue(transformer, propValue) {\n if (typeof propValue === 'string' || propValue == null) {\n return propValue;\n }\n const abs = Math.abs(propValue);\n const transformed = transformer(abs);\n if (propValue >= 0) {\n return transformed;\n }\n if (typeof transformed === 'number') {\n return -transformed;\n }\n return `-${transformed}`;\n}\nfunction getStyleFromPropValue(cssProperties, transformer) {\n return propValue => cssProperties.reduce((acc, cssProperty) => {\n acc[cssProperty] = getValue(transformer, propValue);\n return acc;\n }, {});\n}\nfunction resolveCssProperty(props, keys, prop, transformer) {\n // Using a hash computation over an array iteration could be faster, but with only 28 items,\n // it's doesn't worth the bundle size.\n if (keys.indexOf(prop) === -1) {\n return null;\n }\n const cssProperties = getCssProperties(prop);\n const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);\n const propValue = props[prop];\n return (0, _breakpoints.handleBreakpoints)(props, propValue, styleFromPropValue);\n}\nfunction style(props, keys) {\n const transformer = createUnarySpacing(props.theme);\n return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(_merge.default, {});\n}\nfunction margin(props) {\n return style(props, marginKeys);\n}\nmargin.propTypes = process.env.NODE_ENV !== 'production' ? marginKeys.reduce((obj, key) => {\n obj[key] = _responsivePropType.default;\n return obj;\n}, {}) : {};\nmargin.filterProps = marginKeys;\nfunction padding(props) {\n return style(props, paddingKeys);\n}\npadding.propTypes = process.env.NODE_ENV !== 'production' ? paddingKeys.reduce((obj, key) => {\n obj[key] = _responsivePropType.default;\n return obj;\n}, {}) : {};\npadding.filterProps = paddingKeys;\nfunction spacing(props) {\n return style(props, spacingKeys);\n}\nspacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce((obj, key) => {\n obj[key] = _responsivePropType.default;\n return obj;\n}, {}) : {};\nspacing.filterProps = spacingKeys;\nvar _default = exports.default = spacing;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createSpacing;\nvar _spacing = require(\"../spacing\");\n// The different signatures imply different meaning for their arguments that can't be expressed structurally.\n// We express the difference with variable names.\n\nfunction createSpacing(spacingInput = 8) {\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n }\n\n // Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.\n // Smaller components, such as icons, can align to a 4dp grid.\n // https://m2.material.io/design/layout/understanding-layout.html\n const transform = (0, _spacing.createUnarySpacing)({\n spacing: spacingInput\n });\n const spacing = (...argsInput) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!(argsInput.length <= 4)) {\n console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);\n }\n }\n const args = argsInput.length === 0 ? [1] : argsInput;\n return args.map(argument => {\n const output = transform(argument);\n return typeof output === 'number' ? `${output}px` : output;\n }).join(' ');\n };\n spacing.mui = true;\n return spacing;\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _merge = _interopRequireDefault(require(\"./merge\"));\nfunction compose(...styles) {\n const handlers = styles.reduce((acc, style) => {\n style.filterProps.forEach(prop => {\n acc[prop] = style;\n });\n return acc;\n }, {});\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n return Object.keys(props).reduce((acc, prop) => {\n if (handlers[prop]) {\n return (0, _merge.default)(acc, handlers[prop](props));\n }\n return acc;\n }, {});\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => Object.assign(acc, style.propTypes), {}) : {};\n fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);\n return fn;\n}\nvar _default = exports.default = compose;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.borderTopColor = exports.borderTop = exports.borderRightColor = exports.borderRight = exports.borderRadius = exports.borderLeftColor = exports.borderLeft = exports.borderColor = exports.borderBottomColor = exports.borderBottom = exports.border = void 0;\nexports.borderTransform = borderTransform;\nexports.outlineColor = exports.outline = exports.default = void 0;\nvar _responsivePropType = _interopRequireDefault(require(\"./responsivePropType\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _compose = _interopRequireDefault(require(\"./compose\"));\nvar _spacing = require(\"./spacing\");\nvar _breakpoints = require(\"./breakpoints\");\nfunction borderTransform(value) {\n if (typeof value !== 'number') {\n return value;\n }\n return `${value}px solid`;\n}\nfunction createBorderStyle(prop, transform) {\n return (0, _style.default)({\n prop,\n themeKey: 'borders',\n transform\n });\n}\nconst border = exports.border = createBorderStyle('border', borderTransform);\nconst borderTop = exports.borderTop = createBorderStyle('borderTop', borderTransform);\nconst borderRight = exports.borderRight = createBorderStyle('borderRight', borderTransform);\nconst borderBottom = exports.borderBottom = createBorderStyle('borderBottom', borderTransform);\nconst borderLeft = exports.borderLeft = createBorderStyle('borderLeft', borderTransform);\nconst borderColor = exports.borderColor = createBorderStyle('borderColor');\nconst borderTopColor = exports.borderTopColor = createBorderStyle('borderTopColor');\nconst borderRightColor = exports.borderRightColor = createBorderStyle('borderRightColor');\nconst borderBottomColor = exports.borderBottomColor = createBorderStyle('borderBottomColor');\nconst borderLeftColor = exports.borderLeftColor = createBorderStyle('borderLeftColor');\nconst outline = exports.outline = createBorderStyle('outline', borderTransform);\nconst outlineColor = exports.outlineColor = createBorderStyle('outlineColor');\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nconst borderRadius = props => {\n if (props.borderRadius !== undefined && props.borderRadius !== null) {\n const transformer = (0, _spacing.createUnaryUnit)(props.theme, 'shape.borderRadius', 4, 'borderRadius');\n const styleFromPropValue = propValue => ({\n borderRadius: (0, _spacing.getValue)(transformer, propValue)\n });\n return (0, _breakpoints.handleBreakpoints)(props, props.borderRadius, styleFromPropValue);\n }\n return null;\n};\nexports.borderRadius = borderRadius;\nborderRadius.propTypes = process.env.NODE_ENV !== 'production' ? {\n borderRadius: _responsivePropType.default\n} : {};\nborderRadius.filterProps = ['borderRadius'];\nconst borders = (0, _compose.default)(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor);\nvar _default = exports.default = borders;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.rowGap = exports.gridTemplateRows = exports.gridTemplateColumns = exports.gridTemplateAreas = exports.gridRow = exports.gridColumn = exports.gridAutoRows = exports.gridAutoFlow = exports.gridAutoColumns = exports.gridArea = exports.gap = exports.default = exports.columnGap = void 0;\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _compose = _interopRequireDefault(require(\"./compose\"));\nvar _spacing = require(\"./spacing\");\nvar _breakpoints = require(\"./breakpoints\");\nvar _responsivePropType = _interopRequireDefault(require(\"./responsivePropType\"));\n// false positive\n// eslint-disable-next-line react/function-component-definition\nconst gap = props => {\n if (props.gap !== undefined && props.gap !== null) {\n const transformer = (0, _spacing.createUnaryUnit)(props.theme, 'spacing', 8, 'gap');\n const styleFromPropValue = propValue => ({\n gap: (0, _spacing.getValue)(transformer, propValue)\n });\n return (0, _breakpoints.handleBreakpoints)(props, props.gap, styleFromPropValue);\n }\n return null;\n};\nexports.gap = gap;\ngap.propTypes = process.env.NODE_ENV !== 'production' ? {\n gap: _responsivePropType.default\n} : {};\ngap.filterProps = ['gap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nconst columnGap = props => {\n if (props.columnGap !== undefined && props.columnGap !== null) {\n const transformer = (0, _spacing.createUnaryUnit)(props.theme, 'spacing', 8, 'columnGap');\n const styleFromPropValue = propValue => ({\n columnGap: (0, _spacing.getValue)(transformer, propValue)\n });\n return (0, _breakpoints.handleBreakpoints)(props, props.columnGap, styleFromPropValue);\n }\n return null;\n};\nexports.columnGap = columnGap;\ncolumnGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n columnGap: _responsivePropType.default\n} : {};\ncolumnGap.filterProps = ['columnGap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nconst rowGap = props => {\n if (props.rowGap !== undefined && props.rowGap !== null) {\n const transformer = (0, _spacing.createUnaryUnit)(props.theme, 'spacing', 8, 'rowGap');\n const styleFromPropValue = propValue => ({\n rowGap: (0, _spacing.getValue)(transformer, propValue)\n });\n return (0, _breakpoints.handleBreakpoints)(props, props.rowGap, styleFromPropValue);\n }\n return null;\n};\nexports.rowGap = rowGap;\nrowGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n rowGap: _responsivePropType.default\n} : {};\nrowGap.filterProps = ['rowGap'];\nconst gridColumn = exports.gridColumn = (0, _style.default)({\n prop: 'gridColumn'\n});\nconst gridRow = exports.gridRow = (0, _style.default)({\n prop: 'gridRow'\n});\nconst gridAutoFlow = exports.gridAutoFlow = (0, _style.default)({\n prop: 'gridAutoFlow'\n});\nconst gridAutoColumns = exports.gridAutoColumns = (0, _style.default)({\n prop: 'gridAutoColumns'\n});\nconst gridAutoRows = exports.gridAutoRows = (0, _style.default)({\n prop: 'gridAutoRows'\n});\nconst gridTemplateColumns = exports.gridTemplateColumns = (0, _style.default)({\n prop: 'gridTemplateColumns'\n});\nconst gridTemplateRows = exports.gridTemplateRows = (0, _style.default)({\n prop: 'gridTemplateRows'\n});\nconst gridTemplateAreas = exports.gridTemplateAreas = (0, _style.default)({\n prop: 'gridTemplateAreas'\n});\nconst gridArea = exports.gridArea = (0, _style.default)({\n prop: 'gridArea'\n});\nconst grid = (0, _compose.default)(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);\nvar _default = exports.default = grid;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.color = exports.bgcolor = exports.backgroundColor = void 0;\nexports.paletteTransform = paletteTransform;\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _compose = _interopRequireDefault(require(\"./compose\"));\nfunction paletteTransform(value, userValue) {\n if (userValue === 'grey') {\n return userValue;\n }\n return value;\n}\nconst color = exports.color = (0, _style.default)({\n prop: 'color',\n themeKey: 'palette',\n transform: paletteTransform\n});\nconst bgcolor = exports.bgcolor = (0, _style.default)({\n prop: 'bgcolor',\n cssProperty: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nconst backgroundColor = exports.backgroundColor = (0, _style.default)({\n prop: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nconst palette = (0, _compose.default)(color, bgcolor, backgroundColor);\nvar _default = exports.default = palette;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.sizeWidth = exports.sizeHeight = exports.minWidth = exports.minHeight = exports.maxWidth = exports.maxHeight = exports.height = exports.default = exports.boxSizing = void 0;\nexports.sizingTransform = sizingTransform;\nexports.width = void 0;\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _compose = _interopRequireDefault(require(\"./compose\"));\nvar _breakpoints = require(\"./breakpoints\");\nfunction sizingTransform(value) {\n return value <= 1 && value !== 0 ? `${value * 100}%` : value;\n}\nconst width = exports.width = (0, _style.default)({\n prop: 'width',\n transform: sizingTransform\n});\nconst maxWidth = props => {\n if (props.maxWidth !== undefined && props.maxWidth !== null) {\n const styleFromPropValue = propValue => {\n var _props$theme, _props$theme2;\n const breakpoint = ((_props$theme = props.theme) == null || (_props$theme = _props$theme.breakpoints) == null || (_props$theme = _props$theme.values) == null ? void 0 : _props$theme[propValue]) || _breakpoints.values[propValue];\n if (!breakpoint) {\n return {\n maxWidth: sizingTransform(propValue)\n };\n }\n if (((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.breakpoints) == null ? void 0 : _props$theme2.unit) !== 'px') {\n return {\n maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`\n };\n }\n return {\n maxWidth: breakpoint\n };\n };\n return (0, _breakpoints.handleBreakpoints)(props, props.maxWidth, styleFromPropValue);\n }\n return null;\n};\nexports.maxWidth = maxWidth;\nmaxWidth.filterProps = ['maxWidth'];\nconst minWidth = exports.minWidth = (0, _style.default)({\n prop: 'minWidth',\n transform: sizingTransform\n});\nconst height = exports.height = (0, _style.default)({\n prop: 'height',\n transform: sizingTransform\n});\nconst maxHeight = exports.maxHeight = (0, _style.default)({\n prop: 'maxHeight',\n transform: sizingTransform\n});\nconst minHeight = exports.minHeight = (0, _style.default)({\n prop: 'minHeight',\n transform: sizingTransform\n});\nconst sizeWidth = exports.sizeWidth = (0, _style.default)({\n prop: 'size',\n cssProperty: 'width',\n transform: sizingTransform\n});\nconst sizeHeight = exports.sizeHeight = (0, _style.default)({\n prop: 'size',\n cssProperty: 'height',\n transform: sizingTransform\n});\nconst boxSizing = exports.boxSizing = (0, _style.default)({\n prop: 'boxSizing'\n});\nconst sizing = (0, _compose.default)(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);\nvar _default = exports.default = sizing;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _spacing = require(\"../spacing\");\nvar _borders = require(\"../borders\");\nvar _cssGrid = require(\"../cssGrid\");\nvar _palette = require(\"../palette\");\nvar _sizing = require(\"../sizing\");\nconst defaultSxConfig = {\n // borders\n border: {\n themeKey: 'borders',\n transform: _borders.borderTransform\n },\n borderTop: {\n themeKey: 'borders',\n transform: _borders.borderTransform\n },\n borderRight: {\n themeKey: 'borders',\n transform: _borders.borderTransform\n },\n borderBottom: {\n themeKey: 'borders',\n transform: _borders.borderTransform\n },\n borderLeft: {\n themeKey: 'borders',\n transform: _borders.borderTransform\n },\n borderColor: {\n themeKey: 'palette'\n },\n borderTopColor: {\n themeKey: 'palette'\n },\n borderRightColor: {\n themeKey: 'palette'\n },\n borderBottomColor: {\n themeKey: 'palette'\n },\n borderLeftColor: {\n themeKey: 'palette'\n },\n outline: {\n themeKey: 'borders',\n transform: _borders.borderTransform\n },\n outlineColor: {\n themeKey: 'palette'\n },\n borderRadius: {\n themeKey: 'shape.borderRadius',\n style: _borders.borderRadius\n },\n // palette\n color: {\n themeKey: 'palette',\n transform: _palette.paletteTransform\n },\n bgcolor: {\n themeKey: 'palette',\n cssProperty: 'backgroundColor',\n transform: _palette.paletteTransform\n },\n backgroundColor: {\n themeKey: 'palette',\n transform: _palette.paletteTransform\n },\n // spacing\n p: {\n style: _spacing.padding\n },\n pt: {\n style: _spacing.padding\n },\n pr: {\n style: _spacing.padding\n },\n pb: {\n style: _spacing.padding\n },\n pl: {\n style: _spacing.padding\n },\n px: {\n style: _spacing.padding\n },\n py: {\n style: _spacing.padding\n },\n padding: {\n style: _spacing.padding\n },\n paddingTop: {\n style: _spacing.padding\n },\n paddingRight: {\n style: _spacing.padding\n },\n paddingBottom: {\n style: _spacing.padding\n },\n paddingLeft: {\n style: _spacing.padding\n },\n paddingX: {\n style: _spacing.padding\n },\n paddingY: {\n style: _spacing.padding\n },\n paddingInline: {\n style: _spacing.padding\n },\n paddingInlineStart: {\n style: _spacing.padding\n },\n paddingInlineEnd: {\n style: _spacing.padding\n },\n paddingBlock: {\n style: _spacing.padding\n },\n paddingBlockStart: {\n style: _spacing.padding\n },\n paddingBlockEnd: {\n style: _spacing.padding\n },\n m: {\n style: _spacing.margin\n },\n mt: {\n style: _spacing.margin\n },\n mr: {\n style: _spacing.margin\n },\n mb: {\n style: _spacing.margin\n },\n ml: {\n style: _spacing.margin\n },\n mx: {\n style: _spacing.margin\n },\n my: {\n style: _spacing.margin\n },\n margin: {\n style: _spacing.margin\n },\n marginTop: {\n style: _spacing.margin\n },\n marginRight: {\n style: _spacing.margin\n },\n marginBottom: {\n style: _spacing.margin\n },\n marginLeft: {\n style: _spacing.margin\n },\n marginX: {\n style: _spacing.margin\n },\n marginY: {\n style: _spacing.margin\n },\n marginInline: {\n style: _spacing.margin\n },\n marginInlineStart: {\n style: _spacing.margin\n },\n marginInlineEnd: {\n style: _spacing.margin\n },\n marginBlock: {\n style: _spacing.margin\n },\n marginBlockStart: {\n style: _spacing.margin\n },\n marginBlockEnd: {\n style: _spacing.margin\n },\n // display\n displayPrint: {\n cssProperty: false,\n transform: value => ({\n '@media print': {\n display: value\n }\n })\n },\n display: {},\n overflow: {},\n textOverflow: {},\n visibility: {},\n whiteSpace: {},\n // flexbox\n flexBasis: {},\n flexDirection: {},\n flexWrap: {},\n justifyContent: {},\n alignItems: {},\n alignContent: {},\n order: {},\n flex: {},\n flexGrow: {},\n flexShrink: {},\n alignSelf: {},\n justifyItems: {},\n justifySelf: {},\n // grid\n gap: {\n style: _cssGrid.gap\n },\n rowGap: {\n style: _cssGrid.rowGap\n },\n columnGap: {\n style: _cssGrid.columnGap\n },\n gridColumn: {},\n gridRow: {},\n gridAutoFlow: {},\n gridAutoColumns: {},\n gridAutoRows: {},\n gridTemplateColumns: {},\n gridTemplateRows: {},\n gridTemplateAreas: {},\n gridArea: {},\n // positions\n position: {},\n zIndex: {\n themeKey: 'zIndex'\n },\n top: {},\n right: {},\n bottom: {},\n left: {},\n // shadows\n boxShadow: {\n themeKey: 'shadows'\n },\n // sizing\n width: {\n transform: _sizing.sizingTransform\n },\n maxWidth: {\n style: _sizing.maxWidth\n },\n minWidth: {\n transform: _sizing.sizingTransform\n },\n height: {\n transform: _sizing.sizingTransform\n },\n maxHeight: {\n transform: _sizing.sizingTransform\n },\n minHeight: {\n transform: _sizing.sizingTransform\n },\n boxSizing: {},\n // typography\n fontFamily: {\n themeKey: 'typography'\n },\n fontSize: {\n themeKey: 'typography'\n },\n fontStyle: {\n themeKey: 'typography'\n },\n fontWeight: {\n themeKey: 'typography'\n },\n letterSpacing: {},\n textTransform: {},\n lineHeight: {},\n textAlign: {},\n typography: {\n cssProperty: false,\n themeKey: 'typography'\n }\n};\nvar _default = exports.default = defaultSxConfig;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.unstable_createStyleFunctionSx = unstable_createStyleFunctionSx;\nvar _capitalize = _interopRequireDefault(require(\"@mui/utils/capitalize\"));\nvar _merge = _interopRequireDefault(require(\"../merge\"));\nvar _style = require(\"../style\");\nvar _breakpoints = require(\"../breakpoints\");\nvar _defaultSxConfig = _interopRequireDefault(require(\"./defaultSxConfig\"));\nfunction objectsHaveSameKeys(...objects) {\n const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);\n const union = new Set(allKeys);\n return objects.every(object => union.size === Object.keys(object).length);\n}\nfunction callIfFn(maybeFn, arg) {\n return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction unstable_createStyleFunctionSx() {\n function getThemeValue(prop, val, theme, config) {\n const props = {\n [prop]: val,\n theme\n };\n const options = config[prop];\n if (!options) {\n return {\n [prop]: val\n };\n }\n const {\n cssProperty = prop,\n themeKey,\n transform,\n style\n } = options;\n if (val == null) {\n return null;\n }\n\n // TODO v6: remove, see https://github.com/mui/material-ui/pull/38123\n if (themeKey === 'typography' && val === 'inherit') {\n return {\n [prop]: val\n };\n }\n const themeMapping = (0, _style.getPath)(theme, themeKey) || {};\n if (style) {\n return style(props);\n }\n const styleFromPropValue = propValueFinal => {\n let value = (0, _style.getStyleValue)(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = (0, _style.getStyleValue)(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : (0, _capitalize.default)(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return (0, _breakpoints.handleBreakpoints)(props, val, styleFromPropValue);\n }\n function styleFunctionSx(props) {\n var _theme$unstable_sxCon;\n const {\n sx,\n theme = {}\n } = props || {};\n if (!sx) {\n return null; // Emotion & styled-components will neglect null\n }\n const config = (_theme$unstable_sxCon = theme.unstable_sxConfig) != null ? _theme$unstable_sxCon : _defaultSxConfig.default;\n\n /*\n * Receive `sxInput` as object or callback\n * and then recursively check keys & values to create media query object styles.\n * (the result will be used in `styled`)\n */\n function traverse(sxInput) {\n let sxObject = sxInput;\n if (typeof sxInput === 'function') {\n sxObject = sxInput(theme);\n } else if (typeof sxInput !== 'object') {\n // value\n return sxInput;\n }\n if (!sxObject) {\n return null;\n }\n const emptyBreakpoints = (0, _breakpoints.createEmptyBreakpointObject)(theme.breakpoints);\n const breakpointsKeys = Object.keys(emptyBreakpoints);\n let css = emptyBreakpoints;\n Object.keys(sxObject).forEach(styleKey => {\n const value = callIfFn(sxObject[styleKey], theme);\n if (value !== null && value !== undefined) {\n if (typeof value === 'object') {\n if (config[styleKey]) {\n css = (0, _merge.default)(css, getThemeValue(styleKey, value, theme, config));\n } else {\n const breakpointsValues = (0, _breakpoints.handleBreakpoints)({\n theme\n }, value, x => ({\n [styleKey]: x\n }));\n if (objectsHaveSameKeys(breakpointsValues, value)) {\n css[styleKey] = styleFunctionSx({\n sx: value,\n theme\n });\n } else {\n css = (0, _merge.default)(css, breakpointsValues);\n }\n }\n } else {\n css = (0, _merge.default)(css, getThemeValue(styleKey, value, theme, config));\n }\n }\n });\n return (0, _breakpoints.removeUnusedBreakpoints)(breakpointsKeys, css);\n }\n return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);\n }\n return styleFunctionSx;\n}\nconst styleFunctionSx = unstable_createStyleFunctionSx();\nstyleFunctionSx.filterProps = ['sx'];\nvar _default = exports.default = styleFunctionSx;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = applyStyles;\n/**\n * A universal utility to style components with multiple color modes. Always use it from the theme object.\n * It works with:\n * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)\n * - [CSS theme variables](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/)\n * - Zero-runtime engine\n *\n * Tips: Use an array over object spread and place `theme.applyStyles()` last.\n *\n * \u2705 [{ background: '#e5e5e5' }, theme.applyStyles('dark', { background: '#1c1c1c' })]\n *\n * \uD83D\uDEAB { background: '#e5e5e5', ...theme.applyStyles('dark', { background: '#1c1c1c' })}\n *\n * @example\n * 1. using with `styled`:\n * ```jsx\n * const Component = styled('div')(({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]);\n * ```\n *\n * @example\n * 2. using with `sx` prop:\n * ```jsx\n * [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]}\n * />\n * ```\n *\n * @example\n * 3. theming a component:\n * ```jsx\n * extendTheme({\n * components: {\n * MuiButton: {\n * styleOverrides: {\n * root: ({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ],\n * },\n * }\n * }\n * })\n *```\n */\nfunction applyStyles(key, styles) {\n // @ts-expect-error this is 'any' type\n const theme = this;\n if (theme.vars && typeof theme.getColorSchemeSelector === 'function') {\n // If CssVarsProvider is used as a provider,\n // returns '* :where([data-mui-color-scheme=\"light|dark\"]) &'\n const selector = theme.getColorSchemeSelector(key).replace(/(\\[[^\\]]+\\])/, '*:where($1)');\n return {\n [selector]: styles\n };\n }\n if (theme.palette.mode === key) {\n return styles;\n }\n return {};\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\nvar _deepmerge = _interopRequireDefault(require(\"@mui/utils/deepmerge\"));\nvar _createBreakpoints = _interopRequireDefault(require(\"./createBreakpoints\"));\nvar _shape = _interopRequireDefault(require(\"./shape\"));\nvar _createSpacing = _interopRequireDefault(require(\"./createSpacing\"));\nvar _styleFunctionSx = _interopRequireDefault(require(\"../styleFunctionSx/styleFunctionSx\"));\nvar _defaultSxConfig = _interopRequireDefault(require(\"../styleFunctionSx/defaultSxConfig\"));\nvar _applyStyles = _interopRequireDefault(require(\"./applyStyles\"));\nconst _excluded = [\"breakpoints\", \"palette\", \"spacing\", \"shape\"];\nfunction createTheme(options = {}, ...args) {\n const {\n breakpoints: breakpointsInput = {},\n palette: paletteInput = {},\n spacing: spacingInput,\n shape: shapeInput = {}\n } = options,\n other = (0, _objectWithoutPropertiesLoose2.default)(options, _excluded);\n const breakpoints = (0, _createBreakpoints.default)(breakpointsInput);\n const spacing = (0, _createSpacing.default)(spacingInput);\n let muiTheme = (0, _deepmerge.default)({\n breakpoints,\n direction: 'ltr',\n components: {},\n // Inject component definitions.\n palette: (0, _extends2.default)({\n mode: 'light'\n }, paletteInput),\n spacing,\n shape: (0, _extends2.default)({}, _shape.default, shapeInput)\n }, other);\n muiTheme.applyStyles = _applyStyles.default;\n muiTheme = args.reduce((acc, argument) => (0, _deepmerge.default)(acc, argument), muiTheme);\n muiTheme.unstable_sxConfig = (0, _extends2.default)({}, _defaultSxConfig.default, other == null ? void 0 : other.unstable_sxConfig);\n muiTheme.unstable_sx = function sx(props) {\n return (0, _styleFunctionSx.default)({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nvar _default = exports.default = createTheme;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _createTheme.default;\n }\n});\nObject.defineProperty(exports, \"private_createBreakpoints\", {\n enumerable: true,\n get: function () {\n return _createBreakpoints.default;\n }\n});\nObject.defineProperty(exports, \"unstable_applyStyles\", {\n enumerable: true,\n get: function () {\n return _applyStyles.default;\n }\n});\nvar _createTheme = _interopRequireDefault(require(\"./createTheme\"));\nvar _createBreakpoints = _interopRequireDefault(require(\"./createBreakpoints\"));\nvar _applyStyles = _interopRequireDefault(require(\"./applyStyles\"));", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _capitalize = _interopRequireDefault(require(\"@mui/utils/capitalize\"));\nvar _default = exports.default = _capitalize.default;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createChainedFunction = _interopRequireDefault(require(\"@mui/utils/createChainedFunction\"));\nvar _default = exports.default = _createChainedFunction.default;", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.useDefaultProps = useDefaultProps;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nvar _resolveProps = _interopRequireDefault(require(\"@mui/utils/resolveProps\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nconst PropsContext = /*#__PURE__*/React.createContext(undefined);\nfunction DefaultPropsProvider({\n value,\n children\n}) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(PropsContext.Provider, {\n value: value,\n children: children\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? DefaultPropsProvider.propTypes /* remove-proptypes */ = {\n // \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Warning \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n // \u2502 These PropTypes are generated from the TypeScript type definitions. \u2502\n // \u2502 To update them, edit the TypeScript types and run `pnpm proptypes`. \u2502\n // \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n /**\n * @ignore\n */\n children: _propTypes.default.node,\n /**\n * @ignore\n */\n value: _propTypes.default.object\n} : void 0;\nfunction getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n if (!theme || !theme.components || !theme.components[name]) {\n return props;\n }\n const config = theme.components[name];\n if (config.defaultProps) {\n // compatible with v5 signature\n return (0, _resolveProps.default)(config.defaultProps, props);\n }\n if (!config.styleOverrides && !config.variants) {\n // v6 signature, no property 'defaultProps'\n return (0, _resolveProps.default)(config, props);\n }\n return props;\n}\nfunction useDefaultProps({\n props,\n name\n}) {\n const ctx = React.useContext(PropsContext);\n return getThemeProps({\n props,\n name,\n theme: {\n components: ctx\n }\n });\n}\nvar _default = exports.default = DefaultPropsProvider;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _DefaultPropsProvider.default;\n }\n});\nObject.defineProperty(exports, \"useDefaultProps\", {\n enumerable: true,\n get: function () {\n return _DefaultPropsProvider.useDefaultProps;\n }\n});\nvar _DefaultPropsProvider = _interopRequireWildcard(require(\"./DefaultPropsProvider\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.useDefaultProps = useDefaultProps;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nvar _DefaultPropsProvider = _interopRequireWildcard(require(\"@mui/system/DefaultPropsProvider\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction DefaultPropsProvider(props) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DefaultPropsProvider.default, (0, _extends2.default)({}, props));\n}\nprocess.env.NODE_ENV !== \"production\" ? DefaultPropsProvider.propTypes /* remove-proptypes */ = {\n // \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Warning \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n // \u2502 These PropTypes are generated from the TypeScript type definitions. \u2502\n // \u2502 To update them, edit the TypeScript types and run `pnpm proptypes`. \u2502\n // \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n /**\n * @ignore\n */\n children: _propTypes.default.node,\n /**\n * @ignore\n */\n value: _propTypes.default.object.isRequired\n} : void 0;\nvar _default = exports.default = DefaultPropsProvider;\nfunction useDefaultProps(params) {\n return (0, _DefaultPropsProvider.useDefaultProps)(params);\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _DefaultPropsProvider.default;\n }\n});\nObject.defineProperty(exports, \"useDefaultProps\", {\n enumerable: true,\n get: function () {\n return _DefaultPropsProvider.useDefaultProps;\n }\n});\nvar _DefaultPropsProvider = _interopRequireWildcard(require(\"./DefaultPropsProvider\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = extendSxProp;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\nvar _deepmerge = require(\"@mui/utils/deepmerge\");\nvar _defaultSxConfig = _interopRequireDefault(require(\"./defaultSxConfig\"));\nconst _excluded = [\"sx\"];\nconst splitProps = props => {\n var _props$theme$unstable, _props$theme;\n const result = {\n systemProps: {},\n otherProps: {}\n };\n const config = (_props$theme$unstable = props == null || (_props$theme = props.theme) == null ? void 0 : _props$theme.unstable_sxConfig) != null ? _props$theme$unstable : _defaultSxConfig.default;\n Object.keys(props).forEach(prop => {\n if (config[prop]) {\n result.systemProps[prop] = props[prop];\n } else {\n result.otherProps[prop] = props[prop];\n }\n });\n return result;\n};\nfunction extendSxProp(props) {\n const {\n sx: inSx\n } = props,\n other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);\n const {\n systemProps,\n otherProps\n } = splitProps(other);\n let finalSx;\n if (Array.isArray(inSx)) {\n finalSx = [systemProps, ...inSx];\n } else if (typeof inSx === 'function') {\n finalSx = (...args) => {\n const result = inSx(...args);\n if (!(0, _deepmerge.isPlainObject)(result)) {\n return systemProps;\n }\n return (0, _extends2.default)({}, systemProps, result);\n };\n } else {\n finalSx = (0, _extends2.default)({}, systemProps, inSx);\n }\n return (0, _extends2.default)({}, otherProps, {\n sx: finalSx\n });\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _styleFunctionSx.default;\n }\n});\nObject.defineProperty(exports, \"extendSxProp\", {\n enumerable: true,\n get: function () {\n return _extendSxProp.default;\n }\n});\nObject.defineProperty(exports, \"unstable_createStyleFunctionSx\", {\n enumerable: true,\n get: function () {\n return _styleFunctionSx.unstable_createStyleFunctionSx;\n }\n});\nObject.defineProperty(exports, \"unstable_defaultSxConfig\", {\n enumerable: true,\n get: function () {\n return _defaultSxConfig.default;\n }\n});\nvar _styleFunctionSx = _interopRequireWildcard(require(\"./styleFunctionSx\"));\nvar _extendSxProp = _interopRequireDefault(require(\"./extendSxProp\"));\nvar _defaultSxConfig = _interopRequireDefault(require(\"./defaultSxConfig\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createStyled;\nexports.shouldForwardProp = shouldForwardProp;\nexports.systemDefaultTheme = void 0;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\nvar _styledEngine = _interopRequireWildcard(require(\"@mui/styled-engine\"));\nvar _deepmerge = require(\"@mui/utils/deepmerge\");\nvar _capitalize = _interopRequireDefault(require(\"@mui/utils/capitalize\"));\nvar _getDisplayName = _interopRequireDefault(require(\"@mui/utils/getDisplayName\"));\nvar _createTheme = _interopRequireDefault(require(\"./createTheme\"));\nvar _styleFunctionSx = _interopRequireDefault(require(\"./styleFunctionSx\"));\nconst _excluded = [\"ownerState\"],\n _excluded2 = [\"variants\"],\n _excluded3 = [\"name\", \"slot\", \"skipVariantsResolver\", \"skipSx\", \"overridesResolver\"];\n/* eslint-disable no-underscore-dangle */\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction isEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\n\n// https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40\nfunction isStringTag(tag) {\n return typeof tag === 'string' &&\n // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96;\n}\n\n// Update /system/styled/#api in case if this changes\nfunction shouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nconst systemDefaultTheme = exports.systemDefaultTheme = (0, _createTheme.default)();\nconst lowercaseFirstLetter = string => {\n if (!string) {\n return string;\n }\n return string.charAt(0).toLowerCase() + string.slice(1);\n};\nfunction resolveTheme({\n defaultTheme,\n theme,\n themeId\n}) {\n return isEmpty(theme) ? defaultTheme : theme[themeId] || theme;\n}\nfunction defaultOverridesResolver(slot) {\n if (!slot) {\n return null;\n }\n return (props, styles) => styles[slot];\n}\nfunction processStyleArg(callableStyle, _ref) {\n let {\n ownerState\n } = _ref,\n props = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);\n const resolvedStylesArg = typeof callableStyle === 'function' ? callableStyle((0, _extends2.default)({\n ownerState\n }, props)) : callableStyle;\n if (Array.isArray(resolvedStylesArg)) {\n return resolvedStylesArg.flatMap(resolvedStyle => processStyleArg(resolvedStyle, (0, _extends2.default)({\n ownerState\n }, props)));\n }\n if (!!resolvedStylesArg && typeof resolvedStylesArg === 'object' && Array.isArray(resolvedStylesArg.variants)) {\n const {\n variants = []\n } = resolvedStylesArg,\n otherStyles = (0, _objectWithoutPropertiesLoose2.default)(resolvedStylesArg, _excluded2);\n let result = otherStyles;\n variants.forEach(variant => {\n let isMatch = true;\n if (typeof variant.props === 'function') {\n isMatch = variant.props((0, _extends2.default)({\n ownerState\n }, props, ownerState));\n } else {\n Object.keys(variant.props).forEach(key => {\n if ((ownerState == null ? void 0 : ownerState[key]) !== variant.props[key] && props[key] !== variant.props[key]) {\n isMatch = false;\n }\n });\n }\n if (isMatch) {\n if (!Array.isArray(result)) {\n result = [result];\n }\n result.push(typeof variant.style === 'function' ? variant.style((0, _extends2.default)({\n ownerState\n }, props, ownerState)) : variant.style);\n }\n });\n return result;\n }\n return resolvedStylesArg;\n}\nfunction createStyled(input = {}) {\n const {\n themeId,\n defaultTheme = systemDefaultTheme,\n rootShouldForwardProp = shouldForwardProp,\n slotShouldForwardProp = shouldForwardProp\n } = input;\n const systemSx = props => {\n return (0, _styleFunctionSx.default)((0, _extends2.default)({}, props, {\n theme: resolveTheme((0, _extends2.default)({}, props, {\n defaultTheme,\n themeId\n }))\n }));\n };\n systemSx.__mui_systemSx = true;\n return (tag, inputOptions = {}) => {\n // Filter out the `sx` style function from the previous styled component to prevent unnecessary styles generated by the composite components.\n (0, _styledEngine.internal_processStyles)(tag, styles => styles.filter(style => !(style != null && style.__mui_systemSx)));\n const {\n name: componentName,\n slot: componentSlot,\n skipVariantsResolver: inputSkipVariantsResolver,\n skipSx: inputSkipSx,\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot))\n } = inputOptions,\n options = (0, _objectWithoutPropertiesLoose2.default)(inputOptions, _excluded3);\n\n // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.\n const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n componentSlot && componentSlot !== 'Root' && componentSlot !== 'root' || false;\n const skipSx = inputSkipSx || false;\n let label;\n if (process.env.NODE_ENV !== 'production') {\n if (componentName) {\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;\n }\n }\n let shouldForwardPropOption = shouldForwardProp;\n\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n if (componentSlot === 'Root' || componentSlot === 'root') {\n shouldForwardPropOption = rootShouldForwardProp;\n } else if (componentSlot) {\n // any other slot specified\n shouldForwardPropOption = slotShouldForwardProp;\n } else if (isStringTag(tag)) {\n // for string (html) tag, preserve the behavior in emotion & styled-components.\n shouldForwardPropOption = undefined;\n }\n const defaultStyledResolver = (0, _styledEngine.default)(tag, (0, _extends2.default)({\n shouldForwardProp: shouldForwardPropOption,\n label\n }, options));\n const transformStyleArg = stylesArg => {\n // On the server Emotion doesn't use React.forwardRef for creating components, so the created\n // component stays as a function. This condition makes sure that we do not interpolate functions\n // which are basically components used as a selectors.\n if (typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg || (0, _deepmerge.isPlainObject)(stylesArg)) {\n return props => processStyleArg(stylesArg, (0, _extends2.default)({}, props, {\n theme: resolveTheme({\n theme: props.theme,\n defaultTheme,\n themeId\n })\n }));\n }\n return stylesArg;\n };\n const muiStyledResolver = (styleArg, ...expressions) => {\n let transformedStyleArg = transformStyleArg(styleArg);\n const expressionsWithDefaultTheme = expressions ? expressions.map(transformStyleArg) : [];\n if (componentName && overridesResolver) {\n expressionsWithDefaultTheme.push(props => {\n const theme = resolveTheme((0, _extends2.default)({}, props, {\n defaultTheme,\n themeId\n }));\n if (!theme.components || !theme.components[componentName] || !theme.components[componentName].styleOverrides) {\n return null;\n }\n const styleOverrides = theme.components[componentName].styleOverrides;\n const resolvedStyleOverrides = {};\n // TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly\n Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {\n resolvedStyleOverrides[slotKey] = processStyleArg(slotStyle, (0, _extends2.default)({}, props, {\n theme\n }));\n });\n return overridesResolver(props, resolvedStyleOverrides);\n });\n }\n if (componentName && !skipVariantsResolver) {\n expressionsWithDefaultTheme.push(props => {\n var _theme$components;\n const theme = resolveTheme((0, _extends2.default)({}, props, {\n defaultTheme,\n themeId\n }));\n const themeVariants = theme == null || (_theme$components = theme.components) == null || (_theme$components = _theme$components[componentName]) == null ? void 0 : _theme$components.variants;\n return processStyleArg({\n variants: themeVariants\n }, (0, _extends2.default)({}, props, {\n theme\n }));\n });\n }\n if (!skipSx) {\n expressionsWithDefaultTheme.push(systemSx);\n }\n const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;\n if (Array.isArray(styleArg) && numOfCustomFnsApplied > 0) {\n const placeholders = new Array(numOfCustomFnsApplied).fill('');\n // If the type is array, than we need to add placeholders in the template for the overrides, variants and the sx styles.\n transformedStyleArg = [...styleArg, ...placeholders];\n transformedStyleArg.raw = [...styleArg.raw, ...placeholders];\n }\n const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);\n if (process.env.NODE_ENV !== 'production') {\n let displayName;\n if (componentName) {\n displayName = `${componentName}${(0, _capitalize.default)(componentSlot || '')}`;\n }\n if (displayName === undefined) {\n displayName = `Styled(${(0, _getDisplayName.default)(tag)})`;\n }\n Component.displayName = displayName;\n }\n if (tag.muiName) {\n Component.muiName = tag.muiName;\n }\n return Component;\n };\n if (defaultStyledResolver.withConfig) {\n muiStyledResolver.withConfig = defaultStyledResolver.withConfig;\n }\n return muiStyledResolver;\n };\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createMixins;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nfunction createMixins(breakpoints, mixins) {\n return (0, _extends2.default)({\n toolbar: {\n minHeight: 56,\n [breakpoints.up('xs')]: {\n '@media (orientation: landscape)': {\n minHeight: 48\n }\n },\n [breakpoints.up('sm')]: {\n minHeight: 64\n }\n }\n }, mixins);\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.alpha = alpha;\nexports.blend = blend;\nexports.colorChannel = void 0;\nexports.darken = darken;\nexports.decomposeColor = decomposeColor;\nexports.emphasize = emphasize;\nexports.getContrastRatio = getContrastRatio;\nexports.getLuminance = getLuminance;\nexports.hexToRgb = hexToRgb;\nexports.hslToRgb = hslToRgb;\nexports.lighten = lighten;\nexports.private_safeAlpha = private_safeAlpha;\nexports.private_safeColorChannel = void 0;\nexports.private_safeDarken = private_safeDarken;\nexports.private_safeEmphasize = private_safeEmphasize;\nexports.private_safeLighten = private_safeLighten;\nexports.recomposeColor = recomposeColor;\nexports.rgbToHex = rgbToHex;\nvar _formatMuiErrorMessage2 = _interopRequireDefault(require(\"@mui/utils/formatMuiErrorMessage\"));\nvar _clamp = _interopRequireDefault(require(\"@mui/utils/clamp\"));\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/**\n * Returns a number whose value is limited to the given range.\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clampWrapper(value, min = 0, max = 1) {\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);\n }\n }\n return (0, _clamp.default)(value, min, max);\n}\n\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\nfunction hexToRgb(color) {\n color = color.slice(1);\n const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');\n let colors = color.match(re);\n if (colors && colors[0].length === 1) {\n colors = colors.map(n => n + n);\n }\n return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', ')})` : '';\n}\nfunction intToHex(int) {\n const hex = int.toString(16);\n return hex.length === 1 ? `0${hex}` : hex;\n}\n\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\nfunction decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n const marker = color.indexOf('(');\n const type = color.substring(0, marker);\n if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(type) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Unsupported \\`${color}\\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : (0, _formatMuiErrorMessage2.default)(9, color));\n }\n let values = color.substring(marker + 1, color.length - 1);\n let colorSpace;\n if (type === 'color') {\n values = values.split(' ');\n colorSpace = values.shift();\n if (values.length === 4 && values[3].charAt(0) === '/') {\n values[3] = values[3].slice(1);\n }\n if (['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(colorSpace) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: unsupported \\`${colorSpace}\\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : (0, _formatMuiErrorMessage2.default)(10, colorSpace));\n }\n } else {\n values = values.split(',');\n }\n values = values.map(value => parseFloat(value));\n return {\n type,\n values,\n colorSpace\n };\n}\n\n/**\n * Returns a channel created from the input color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {string} - The channel for the color, that can be used in rgba or hsla colors\n */\nconst colorChannel = color => {\n const decomposedColor = decomposeColor(color);\n return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.indexOf('hsl') !== -1 && idx !== 0 ? `${val}%` : val).join(' ');\n};\nexports.colorChannel = colorChannel;\nconst private_safeColorChannel = (color, warning) => {\n try {\n return colorChannel(color);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n};\n\n/**\n * Converts a color object with type and values to a string.\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\nexports.private_safeColorChannel = private_safeColorChannel;\nfunction recomposeColor(color) {\n const {\n type,\n colorSpace\n } = color;\n let {\n values\n } = color;\n if (type.indexOf('rgb') !== -1) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);\n } else if (type.indexOf('hsl') !== -1) {\n values[1] = `${values[1]}%`;\n values[2] = `${values[2]}%`;\n }\n if (type.indexOf('color') !== -1) {\n values = `${colorSpace} ${values.join(' ')}`;\n } else {\n values = `${values.join(', ')}`;\n }\n return `${type}(${values})`;\n}\n\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\nfunction rgbToHex(color) {\n // Idempotent\n if (color.indexOf('#') === 0) {\n return color;\n }\n const {\n values\n } = decomposeColor(color);\n return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;\n}\n\n/**\n * Converts a color from hsl format to rgb format.\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\nfunction hslToRgb(color) {\n color = decomposeColor(color);\n const {\n values\n } = color;\n const h = values[0];\n const s = values[1] / 100;\n const l = values[2] / 100;\n const a = s * Math.min(l, 1 - l);\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n let type = 'rgb';\n const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n return recomposeColor({\n type,\n values: rgb\n });\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\nfunction getLuminance(color) {\n color = decomposeColor(color);\n let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(val => {\n if (color.type !== 'color') {\n val /= 255; // normalized\n }\n return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;\n });\n\n // Truncate at 3 digits\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\nfunction getContrastRatio(foreground, background) {\n const lumA = getLuminance(foreground);\n const lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n\n/**\n * Sets the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} value - value to set the alpha channel to in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction alpha(color, value) {\n color = decomposeColor(color);\n value = clampWrapper(value);\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n if (color.type === 'color') {\n color.values[3] = `/${value}`;\n } else {\n color.values[3] = value;\n }\n return recomposeColor(color);\n}\nfunction private_safeAlpha(color, value, warning) {\n try {\n return alpha(color, value);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darkens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n return recomposeColor(color);\n}\nfunction private_safeDarken(color, coefficient, warning) {\n try {\n return darken(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Lightens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n } else if (color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (1 - color.values[i]) * coefficient;\n }\n }\n return recomposeColor(color);\n}\nfunction private_safeLighten(color, coefficient, warning) {\n try {\n return lighten(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction emphasize(color, coefficient = 0.15) {\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\nfunction private_safeEmphasize(color, coefficient, warning) {\n try {\n return emphasize(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Blend a transparent overlay color with a background color, resulting in a single\n * RGB color.\n * @param {string} background - CSS color\n * @param {string} overlay - CSS color\n * @param {number} opacity - Opacity multiplier in the range 0 - 1\n * @param {number} [gamma=1.0] - Gamma correction factor. For gamma-correct blending, 2.2 is usual.\n */\nfunction blend(background, overlay, opacity, gamma = 1.0) {\n const blendChannel = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma);\n const backgroundColor = decomposeColor(background);\n const overlayColor = decomposeColor(overlay);\n const rgb = [blendChannel(backgroundColor.values[0], overlayColor.values[0]), blendChannel(backgroundColor.values[1], overlayColor.values[1]), blendChannel(backgroundColor.values[2], overlayColor.values[2])];\n return recomposeColor({\n type: 'rgb',\n values: rgb\n });\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst common = {\n black: '#000',\n white: '#fff'\n};\nvar _default = exports.default = common;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#f5f5f5',\n A200: '#eeeeee',\n A400: '#bdbdbd',\n A700: '#616161'\n};\nvar _default = exports.default = grey;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\nvar _default = exports.default = purple;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nvar _default = exports.default = red;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nvar _default = exports.default = orange;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nvar _default = exports.default = blue;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\nvar _default = exports.default = lightBlue;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nvar _default = exports.default = green;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.dark = void 0;\nexports.default = createPalette;\nexports.light = void 0;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\nvar _formatMuiErrorMessage2 = _interopRequireDefault(require(\"@mui/utils/formatMuiErrorMessage\"));\nvar _deepmerge = _interopRequireDefault(require(\"@mui/utils/deepmerge\"));\nvar _colorManipulator = require(\"@mui/system/colorManipulator\");\nvar _common = _interopRequireDefault(require(\"../colors/common\"));\nvar _grey = _interopRequireDefault(require(\"../colors/grey\"));\nvar _purple = _interopRequireDefault(require(\"../colors/purple\"));\nvar _red = _interopRequireDefault(require(\"../colors/red\"));\nvar _orange = _interopRequireDefault(require(\"../colors/orange\"));\nvar _blue = _interopRequireDefault(require(\"../colors/blue\"));\nvar _lightBlue = _interopRequireDefault(require(\"../colors/lightBlue\"));\nvar _green = _interopRequireDefault(require(\"../colors/green\"));\nconst _excluded = [\"mode\", \"contrastThreshold\", \"tonalOffset\"];\nconst light = exports.light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.6)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: _common.default.white,\n default: _common.default.white\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nconst dark = exports.dark = {\n text: {\n primary: _common.default.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: '#121212',\n default: '#121212'\n },\n action: {\n active: _common.default.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n const tonalOffsetLight = tonalOffset.light || tonalOffset;\n const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = (0, _colorManipulator.lighten)(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = (0, _colorManipulator.darken)(intent.main, tonalOffsetDark);\n }\n }\n}\nfunction getDefaultPrimary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: _blue.default[200],\n light: _blue.default[50],\n dark: _blue.default[400]\n };\n }\n return {\n main: _blue.default[700],\n light: _blue.default[400],\n dark: _blue.default[800]\n };\n}\nfunction getDefaultSecondary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: _purple.default[200],\n light: _purple.default[50],\n dark: _purple.default[400]\n };\n }\n return {\n main: _purple.default[500],\n light: _purple.default[300],\n dark: _purple.default[700]\n };\n}\nfunction getDefaultError(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: _red.default[500],\n light: _red.default[300],\n dark: _red.default[700]\n };\n }\n return {\n main: _red.default[700],\n light: _red.default[400],\n dark: _red.default[800]\n };\n}\nfunction getDefaultInfo(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: _lightBlue.default[400],\n light: _lightBlue.default[300],\n dark: _lightBlue.default[700]\n };\n }\n return {\n main: _lightBlue.default[700],\n light: _lightBlue.default[500],\n dark: _lightBlue.default[900]\n };\n}\nfunction getDefaultSuccess(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: _green.default[400],\n light: _green.default[300],\n dark: _green.default[700]\n };\n }\n return {\n main: _green.default[800],\n light: _green.default[500],\n dark: _green.default[900]\n };\n}\nfunction getDefaultWarning(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: _orange.default[400],\n light: _orange.default[300],\n dark: _orange.default[700]\n };\n }\n return {\n main: '#ed6c02',\n // closest to orange[800] that pass 3:1.\n light: _orange.default[500],\n dark: _orange.default[900]\n };\n}\nfunction createPalette(palette) {\n const {\n mode = 'light',\n contrastThreshold = 3,\n tonalOffset = 0.2\n } = palette,\n other = (0, _objectWithoutPropertiesLoose2.default)(palette, _excluded);\n const primary = palette.primary || getDefaultPrimary(mode);\n const secondary = palette.secondary || getDefaultSecondary(mode);\n const error = palette.error || getDefaultError(mode);\n const info = palette.info || getDefaultInfo(mode);\n const success = palette.success || getDefaultSuccess(mode);\n const warning = palette.warning || getDefaultWarning(mode);\n\n // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n function getContrastText(background) {\n const contrastText = (0, _colorManipulator.getContrastRatio)(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n if (process.env.NODE_ENV !== 'production') {\n const contrast = (0, _colorManipulator.getContrastRatio)(background, contrastText);\n if (contrast < 3) {\n console.error([`MUI: The contrast ratio of ${contrast}:1 for ${contrastText} on ${background}`, 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n return contrastText;\n }\n const augmentColor = ({\n color,\n name,\n mainShade = 500,\n lightShade = 300,\n darkShade = 700\n }) => {\n color = (0, _extends2.default)({}, color);\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n if (!color.hasOwnProperty('main')) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\nThe color object needs to have a \\`main\\` property or a \\`${mainShade}\\` property.` : (0, _formatMuiErrorMessage2.default)(11, name ? ` (${name})` : '', mainShade));\n }\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\n\\`color.main\\` should be a string, but \\`${JSON.stringify(color.main)}\\` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport { green } from \"@mui/material/colors\";\n\nconst theme1 = createTheme({ palette: {\n primary: green,\n} });\n\nconst theme2 = createTheme({ palette: {\n primary: { main: green[500] },\n} });` : (0, _formatMuiErrorMessage2.default)(12, name ? ` (${name})` : '', JSON.stringify(color.main)));\n }\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n return color;\n };\n const modes = {\n dark,\n light\n };\n if (process.env.NODE_ENV !== 'production') {\n if (!modes[mode]) {\n console.error(`MUI: The palette mode \\`${mode}\\` is not supported.`);\n }\n }\n const paletteOutput = (0, _deepmerge.default)((0, _extends2.default)({\n // A collection of common colors.\n common: (0, _extends2.default)({}, _common.default),\n // prevent mutable object.\n // The palette mode, can be light or dark.\n mode,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor({\n color: primary,\n name: 'primary'\n }),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor({\n color: secondary,\n name: 'secondary',\n mainShade: 'A400',\n lightShade: 'A200',\n darkShade: 'A700'\n }),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor({\n color: error,\n name: 'error'\n }),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor({\n color: warning,\n name: 'warning'\n }),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor({\n color: info,\n name: 'info'\n }),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor({\n color: success,\n name: 'success'\n }),\n // The grey colors.\n grey: _grey.default,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText,\n // Generate a rich color object.\n augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset\n }, modes[mode]), other);\n return paletteOutput;\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createTypography;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\nvar _deepmerge = _interopRequireDefault(require(\"@mui/utils/deepmerge\"));\nconst _excluded = [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"];\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst caseAllCaps = {\n textTransform: 'uppercase'\n};\nconst defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n\n/**\n * @see @link{https://m2.material.io/design/typography/the-type-system.html}\n * @see @link{https://m2.material.io/design/typography/understanding-typography.html}\n */\nfunction createTypography(palette, typography) {\n const _ref = typeof typography === 'function' ? typography(palette) : typography,\n {\n fontFamily = defaultFontFamily,\n // The default font size of the Material Specification.\n fontSize = 14,\n // px\n fontWeightLight = 300,\n fontWeightRegular = 400,\n fontWeightMedium = 500,\n fontWeightBold = 700,\n // Tell MUI what's the font-size on the html element.\n // 16px is the default font-size used by browsers.\n htmlFontSize = 16,\n // Apply the CSS properties to all the variants.\n allVariants,\n pxToRem: pxToRem2\n } = _ref,\n other = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('MUI: `fontSize` is required to be a number.');\n }\n if (typeof htmlFontSize !== 'number') {\n console.error('MUI: `htmlFontSize` is required to be a number.');\n }\n }\n const coef = fontSize / 14;\n const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);\n const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => (0, _extends2.default)({\n fontFamily,\n fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: `${round(letterSpacing / size)}em`\n } : {}, casing, allVariants);\n const variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),\n // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types.\n inherit: {\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n fontSize: 'inherit',\n lineHeight: 'inherit',\n letterSpacing: 'inherit'\n }\n };\n return (0, _deepmerge.default)((0, _extends2.default)({\n htmlFontSize,\n pxToRem,\n fontFamily,\n fontSize,\n fontWeightLight,\n fontWeightRegular,\n fontWeightMedium,\n fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n });\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst shadowKeyUmbraOpacity = 0.2;\nconst shadowKeyPenumbraOpacity = 0.14;\nconst shadowAmbientShadowOpacity = 0.12;\nfunction createShadow(...px) {\n return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(',');\n}\n\n// Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\nconst shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nvar _default = exports.default = shadows;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createTransitions;\nexports.easing = exports.duration = void 0;\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nconst _excluded = [\"duration\", \"easing\", \"delay\"];\n// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nconst easing = exports.easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n};\n\n// Follow https://m2.material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\nconst duration = exports.duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\nfunction formatMs(milliseconds) {\n return `${Math.round(milliseconds)}ms`;\n}\nfunction getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n const constant = height / 36;\n\n // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10\n return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);\n}\nfunction createTransitions(inputTransitions) {\n const mergedEasing = (0, _extends2.default)({}, easing, inputTransitions.easing);\n const mergedDuration = (0, _extends2.default)({}, duration, inputTransitions.duration);\n const create = (props = ['all'], options = {}) => {\n const {\n duration: durationOption = mergedDuration.standard,\n easing: easingOption = mergedEasing.easeInOut,\n delay = 0\n } = options,\n other = (0, _objectWithoutPropertiesLoose2.default)(options, _excluded);\n if (process.env.NODE_ENV !== 'production') {\n const isString = value => typeof value === 'string';\n // IE11 support, replace with Number.isNaN\n // eslint-disable-next-line no-restricted-globals\n const isNumber = value => !isNaN(parseFloat(value));\n if (!isString(props) && !Array.isArray(props)) {\n console.error('MUI: Argument \"props\" must be a string or Array.');\n }\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(`MUI: Argument \"duration\" must be a number or a string but found ${durationOption}.`);\n }\n if (!isString(easingOption)) {\n console.error('MUI: Argument \"easing\" must be a string.');\n }\n if (!isNumber(delay) && !isString(delay)) {\n console.error('MUI: Argument \"delay\" must be a number or a string.');\n }\n if (typeof options !== 'object') {\n console.error(['MUI: Secong argument of transition.create must be an object.', \"Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`\"].join('\\n'));\n }\n if (Object.keys(other).length !== 0) {\n console.error(`MUI: Unrecognized argument(s) [${Object.keys(other).join(',')}].`);\n }\n }\n return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');\n };\n return (0, _extends2.default)({\n getAutoHeightDuration,\n create\n }, inputTransitions, {\n easing: mergedEasing,\n duration: mergedDuration\n });\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nconst zIndex = {\n mobileStepper: 1000,\n fab: 1050,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nvar _default = exports.default = zIndex;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createMuiTheme = createMuiTheme;\nexports.default = void 0;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\nvar _formatMuiErrorMessage2 = _interopRequireDefault(require(\"@mui/utils/formatMuiErrorMessage\"));\nvar _deepmerge = _interopRequireDefault(require(\"@mui/utils/deepmerge\"));\nvar _styleFunctionSx = _interopRequireWildcard(require(\"@mui/system/styleFunctionSx\"));\nvar _createTheme = _interopRequireDefault(require(\"@mui/system/createTheme\"));\nvar _generateUtilityClass = _interopRequireDefault(require(\"@mui/utils/generateUtilityClass\"));\nvar _createMixins = _interopRequireDefault(require(\"./createMixins\"));\nvar _createPalette = _interopRequireDefault(require(\"./createPalette\"));\nvar _createTypography = _interopRequireDefault(require(\"./createTypography\"));\nvar _shadows = _interopRequireDefault(require(\"./shadows\"));\nvar _createTransitions = _interopRequireDefault(require(\"./createTransitions\"));\nvar _zIndex = _interopRequireDefault(require(\"./zIndex\"));\nconst _excluded = [\"breakpoints\", \"mixins\", \"spacing\", \"palette\", \"transitions\", \"typography\", \"shape\"];\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction createTheme(options = {}, ...args) {\n const {\n mixins: mixinsInput = {},\n palette: paletteInput = {},\n transitions: transitionsInput = {},\n typography: typographyInput = {}\n } = options,\n other = (0, _objectWithoutPropertiesLoose2.default)(options, _excluded);\n if (options.vars) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`vars\\` is a private field used for CSS variables support.\nPlease use another name.` : (0, _formatMuiErrorMessage2.default)(18));\n }\n const palette = (0, _createPalette.default)(paletteInput);\n const systemTheme = (0, _createTheme.default)(options);\n let muiTheme = (0, _deepmerge.default)(systemTheme, {\n mixins: (0, _createMixins.default)(systemTheme.breakpoints, mixinsInput),\n palette,\n // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.\n shadows: _shadows.default.slice(),\n typography: (0, _createTypography.default)(palette, typographyInput),\n transitions: (0, _createTransitions.default)(transitionsInput),\n zIndex: (0, _extends2.default)({}, _zIndex.default)\n });\n muiTheme = (0, _deepmerge.default)(muiTheme, other);\n muiTheme = args.reduce((acc, argument) => (0, _deepmerge.default)(acc, argument), muiTheme);\n if (process.env.NODE_ENV !== 'production') {\n // TODO v6: Refactor to use globalStateClassesMapping from @mui/utils once `readOnly` state class is used in Rating component.\n const stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];\n const traverse = (node, component) => {\n let key;\n\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (key in node) {\n const child = node[key];\n if (stateClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n const stateClass = (0, _generateUtilityClass.default)('', key);\n console.error([`MUI: The \\`${component}\\` component increases ` + `the CSS specificity of the \\`${key}\\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({\n root: {\n [`&.${stateClass}`]: child\n }\n }, null, 2), '', 'https://mui.com/r/state-classes-guide'].join('\\n'));\n }\n // Remove the style to prevent global conflicts.\n node[key] = {};\n }\n }\n };\n Object.keys(muiTheme.components).forEach(component => {\n const styleOverrides = muiTheme.components[component].styleOverrides;\n if (styleOverrides && component.indexOf('Mui') === 0) {\n traverse(styleOverrides, component);\n }\n });\n }\n muiTheme.unstable_sxConfig = (0, _extends2.default)({}, _styleFunctionSx.unstable_defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);\n muiTheme.unstable_sx = function sx(props) {\n return (0, _styleFunctionSx.default)({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nlet warnedOnce = false;\nfunction createMuiTheme(...args) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['MUI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@mui/material/styles'`\"].join('\\n'));\n }\n }\n return createTheme(...args);\n}\nvar _default = exports.default = createTheme;", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createTheme = _interopRequireDefault(require(\"./createTheme\"));\nconst defaultTheme = (0, _createTheme.default)();\nvar _default = exports.default = defaultTheme;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = exports.default = '$$material';", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n// copied from @mui/system/createStyled\nfunction slotShouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nvar _default = exports.default = slotShouldForwardProp;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _slotShouldForwardProp = _interopRequireDefault(require(\"./slotShouldForwardProp\"));\nconst rootShouldForwardProp = prop => (0, _slotShouldForwardProp.default)(prop) && prop !== 'classes';\nvar _default = exports.default = rootShouldForwardProp;", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nObject.defineProperty(exports, \"rootShouldForwardProp\", {\n enumerable: true,\n get: function () {\n return _rootShouldForwardProp.default;\n }\n});\nObject.defineProperty(exports, \"slotShouldForwardProp\", {\n enumerable: true,\n get: function () {\n return _slotShouldForwardProp.default;\n }\n});\nvar _createStyled = _interopRequireDefault(require(\"@mui/system/createStyled\"));\nvar _defaultTheme = _interopRequireDefault(require(\"./defaultTheme\"));\nvar _identifier = _interopRequireDefault(require(\"./identifier\"));\nvar _rootShouldForwardProp = _interopRequireDefault(require(\"./rootShouldForwardProp\"));\nvar _slotShouldForwardProp = _interopRequireDefault(require(\"./slotShouldForwardProp\"));\nconst styled = (0, _createStyled.default)({\n themeId: _identifier.default,\n defaultTheme: _defaultTheme.default,\n rootShouldForwardProp: _rootShouldForwardProp.default\n});\nvar _default = exports.default = styled;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.getSvgIconUtilityClass = getSvgIconUtilityClass;\nvar _generateUtilityClasses = _interopRequireDefault(require(\"@mui/utils/generateUtilityClasses\"));\nvar _generateUtilityClass = _interopRequireDefault(require(\"@mui/utils/generateUtilityClass\"));\nfunction getSvgIconUtilityClass(slot) {\n return (0, _generateUtilityClass.default)('MuiSvgIcon', slot);\n}\nconst svgIconClasses = (0, _generateUtilityClasses.default)('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);\nvar _default = exports.default = svgIconClasses;", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nvar _clsx = _interopRequireDefault(require(\"clsx\"));\nvar _composeClasses = _interopRequireDefault(require(\"@mui/utils/composeClasses\"));\nvar _capitalize = _interopRequireDefault(require(\"../utils/capitalize\"));\nvar _DefaultPropsProvider = require(\"../DefaultPropsProvider\");\nvar _styled = _interopRequireDefault(require(\"../styles/styled\"));\nvar _svgIconClasses = require(\"./svgIconClasses\");\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nconst _excluded = [\"children\", \"className\", \"color\", \"component\", \"fontSize\", \"htmlColor\", \"inheritViewBox\", \"titleAccess\", \"viewBox\"];\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nconst useUtilityClasses = ownerState => {\n const {\n color,\n fontSize,\n classes\n } = ownerState;\n const slots = {\n root: ['root', color !== 'inherit' && `color${(0, _capitalize.default)(color)}`, `fontSize${(0, _capitalize.default)(fontSize)}`]\n };\n return (0, _composeClasses.default)(slots, _svgIconClasses.getSvgIconUtilityClass, classes);\n};\nconst SvgIconRoot = (0, _styled.default)('svg', {\n name: 'MuiSvgIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color !== 'inherit' && styles[`color${(0, _capitalize.default)(ownerState.color)}`], styles[`fontSize${(0, _capitalize.default)(ownerState.fontSize)}`]];\n }\n})(({\n theme,\n ownerState\n}) => {\n var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$typography, _theme$typography$pxT, _theme$typography2, _theme$typography2$px, _theme$typography3, _theme$typography3$px, _palette$ownerState$c, _palette, _palette2, _palette3;\n return {\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n // the will define the property that has `currentColor`\n // for example heroicons uses fill=\"none\" and stroke=\"currentColor\"\n fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',\n flexShrink: 0,\n transition: (_theme$transitions = theme.transitions) == null || (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {\n duration: (_theme$transitions2 = theme.transitions) == null || (_theme$transitions2 = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2.shorter\n }),\n fontSize: {\n inherit: 'inherit',\n small: ((_theme$typography = theme.typography) == null || (_theme$typography$pxT = _theme$typography.pxToRem) == null ? void 0 : _theme$typography$pxT.call(_theme$typography, 20)) || '1.25rem',\n medium: ((_theme$typography2 = theme.typography) == null || (_theme$typography2$px = _theme$typography2.pxToRem) == null ? void 0 : _theme$typography2$px.call(_theme$typography2, 24)) || '1.5rem',\n large: ((_theme$typography3 = theme.typography) == null || (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || '2.1875rem'\n }[ownerState.fontSize],\n // TODO v5 deprecate, v6 remove for sx\n color: (_palette$ownerState$c = (_palette = (theme.vars || theme).palette) == null || (_palette = _palette[ownerState.color]) == null ? void 0 : _palette.main) != null ? _palette$ownerState$c : {\n action: (_palette2 = (theme.vars || theme).palette) == null || (_palette2 = _palette2.action) == null ? void 0 : _palette2.active,\n disabled: (_palette3 = (theme.vars || theme).palette) == null || (_palette3 = _palette3.action) == null ? void 0 : _palette3.disabled,\n inherit: undefined\n }[ownerState.color]\n };\n});\nconst SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {\n const props = (0, _DefaultPropsProvider.useDefaultProps)({\n props: inProps,\n name: 'MuiSvgIcon'\n });\n const {\n children,\n className,\n color = 'inherit',\n component = 'svg',\n fontSize = 'medium',\n htmlColor,\n inheritViewBox = false,\n titleAccess,\n viewBox = '0 0 24 24'\n } = props,\n other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);\n const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';\n const ownerState = (0, _extends2.default)({}, props, {\n color,\n component,\n fontSize,\n instanceFontSize: inProps.fontSize,\n inheritViewBox,\n viewBox,\n hasSvgAsChild\n });\n const more = {};\n if (!inheritViewBox) {\n more.viewBox = viewBox;\n }\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/(0, _jsxRuntime.jsxs)(SvgIconRoot, (0, _extends2.default)({\n as: component,\n className: (0, _clsx.default)(classes.root, className),\n focusable: \"false\",\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref\n }, more, other, hasSvgAsChild && children.props, {\n ownerState: ownerState,\n children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/(0, _jsxRuntime.jsx)(\"title\", {\n children: titleAccess\n }) : null]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.propTypes /* remove-proptypes */ = {\n // \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Warning \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n // \u2502 These PropTypes are generated from the TypeScript type definitions. \u2502\n // \u2502 To update them, edit the d.ts file and run `pnpm proptypes`. \u2502\n // \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n /**\n * Node passed into the SVG element.\n */\n children: _propTypes.default.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: _propTypes.default.object,\n /**\n * @ignore\n */\n className: _propTypes.default.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n * @default 'inherit'\n */\n color: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['inherit', 'action', 'disabled', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), _propTypes.default.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: _propTypes.default.elementType,\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n * @default 'medium'\n */\n fontSize: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['inherit', 'large', 'medium', 'small']), _propTypes.default.string]),\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: _propTypes.default.string,\n /**\n * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`\n * prop will be ignored.\n * Useful when you want to reference a custom `component` and have `SvgIcon` pass that\n * `component`'s viewBox to the root node.\n * @default false\n */\n inheritViewBox: _propTypes.default.bool,\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this prop.\n */\n shapeRendering: _propTypes.default.string,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),\n /**\n * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: _propTypes.default.string,\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n * @default '0 0 24 24'\n */\n viewBox: _propTypes.default.string\n} : void 0;\nSvgIcon.muiName = 'SvgIcon';\nvar _default = exports.default = SvgIcon;", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _exportNames = {\n svgIconClasses: true\n};\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _SvgIcon.default;\n }\n});\nObject.defineProperty(exports, \"svgIconClasses\", {\n enumerable: true,\n get: function () {\n return _svgIconClasses.default;\n }\n});\nvar _SvgIcon = _interopRequireDefault(require(\"./SvgIcon\"));\nvar _svgIconClasses = _interopRequireWildcard(require(\"./svgIconClasses\"));\nObject.keys(_svgIconClasses).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _svgIconClasses[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _svgIconClasses[key];\n }\n });\n});\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createSvgIcon;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _SvgIcon = _interopRequireDefault(require(\"../SvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\n/**\n * Private module reserved for @mui packages.\n */function createSvgIcon(path, displayName) {\n function Component(props, ref) {\n return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SvgIcon.default, (0, _extends2.default)({\n \"data-testid\": `${displayName}Icon`,\n ref: ref\n }, props, {\n children: path\n }));\n }\n if (process.env.NODE_ENV !== 'production') {\n // Need to set `displayName` on the inner component for React.memo.\n // React prior to 16.14 ignores `displayName` on the wrapper.\n Component.displayName = `${displayName}Icon`;\n }\n Component.muiName = _SvgIcon.default.muiName;\n return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));\n}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _debounce = _interopRequireDefault(require(\"@mui/utils/debounce\"));\nvar _default = exports.default = _debounce.default;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _deprecatedPropType = _interopRequireDefault(require(\"@mui/utils/deprecatedPropType\"));\nvar _default = exports.default = _deprecatedPropType.default;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _isMuiElement = _interopRequireDefault(require(\"@mui/utils/isMuiElement\"));\nvar _default = exports.default = _isMuiElement.default;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _ownerDocument = _interopRequireDefault(require(\"@mui/utils/ownerDocument\"));\nvar _default = exports.default = _ownerDocument.default;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _ownerWindow = _interopRequireDefault(require(\"@mui/utils/ownerWindow\"));\nvar _default = exports.default = _ownerWindow.default;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _requirePropFactory = _interopRequireDefault(require(\"@mui/utils/requirePropFactory\"));\nvar _default = exports.default = _requirePropFactory.default;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _setRef = _interopRequireDefault(require(\"@mui/utils/setRef\"));\nvar _default = exports.default = _setRef.default;", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _useEnhancedEffect = _interopRequireDefault(require(\"@mui/utils/useEnhancedEffect\"));\nvar _default = exports.default = _useEnhancedEffect.default;", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _useId = _interopRequireDefault(require(\"@mui/utils/useId\"));\nvar _default = exports.default = _useId.default;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _unsupportedProp = _interopRequireDefault(require(\"@mui/utils/unsupportedProp\"));\nvar _default = exports.default = _unsupportedProp.default;", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _useControlled = _interopRequireDefault(require(\"@mui/utils/useControlled\"));\nvar _default = exports.default = _useControlled.default;", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _useEventCallback = _interopRequireDefault(require(\"@mui/utils/useEventCallback\"));\nvar _default = exports.default = _useEventCallback.default;", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _useForkRef = _interopRequireDefault(require(\"@mui/utils/useForkRef\"));\nvar _default = exports.default = _useForkRef.default;", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _useIsFocusVisible = _interopRequireDefault(require(\"@mui/utils/useIsFocusVisible\"));\nvar _default = exports.default = _useIsFocusVisible.default;", "\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"capitalize\", {\n enumerable: true,\n get: function () {\n return _capitalize.default;\n }\n});\nObject.defineProperty(exports, \"createChainedFunction\", {\n enumerable: true,\n get: function () {\n return _createChainedFunction.default;\n }\n});\nObject.defineProperty(exports, \"createSvgIcon\", {\n enumerable: true,\n get: function () {\n return _createSvgIcon.default;\n }\n});\nObject.defineProperty(exports, \"debounce\", {\n enumerable: true,\n get: function () {\n return _debounce.default;\n }\n});\nObject.defineProperty(exports, \"deprecatedPropType\", {\n enumerable: true,\n get: function () {\n return _deprecatedPropType.default;\n }\n});\nObject.defineProperty(exports, \"isMuiElement\", {\n enumerable: true,\n get: function () {\n return _isMuiElement.default;\n }\n});\nObject.defineProperty(exports, \"ownerDocument\", {\n enumerable: true,\n get: function () {\n return _ownerDocument.default;\n }\n});\nObject.defineProperty(exports, \"ownerWindow\", {\n enumerable: true,\n get: function () {\n return _ownerWindow.default;\n }\n});\nObject.defineProperty(exports, \"requirePropFactory\", {\n enumerable: true,\n get: function () {\n return _requirePropFactory.default;\n }\n});\nObject.defineProperty(exports, \"setRef\", {\n enumerable: true,\n get: function () {\n return _setRef.default;\n }\n});\nexports.unstable_ClassNameGenerator = void 0;\nObject.defineProperty(exports, \"unstable_useEnhancedEffect\", {\n enumerable: true,\n get: function () {\n return _useEnhancedEffect.default;\n }\n});\nObject.defineProperty(exports, \"unstable_useId\", {\n enumerable: true,\n get: function () {\n return _useId.default;\n }\n});\nObject.defineProperty(exports, \"unsupportedProp\", {\n enumerable: true,\n get: function () {\n return _unsupportedProp.default;\n }\n});\nObject.defineProperty(exports, \"useControlled\", {\n enumerable: true,\n get: function () {\n return _useControlled.default;\n }\n});\nObject.defineProperty(exports, \"useEventCallback\", {\n enumerable: true,\n get: function () {\n return _useEventCallback.default;\n }\n});\nObject.defineProperty(exports, \"useForkRef\", {\n enumerable: true,\n get: function () {\n return _useForkRef.default;\n }\n});\nObject.defineProperty(exports, \"useIsFocusVisible\", {\n enumerable: true,\n get: function () {\n return _useIsFocusVisible.default;\n }\n});\nvar _utils = require(\"@mui/utils\");\nvar _capitalize = _interopRequireDefault(require(\"./capitalize\"));\nvar _createChainedFunction = _interopRequireDefault(require(\"./createChainedFunction\"));\nvar _createSvgIcon = _interopRequireDefault(require(\"./createSvgIcon\"));\nvar _debounce = _interopRequireDefault(require(\"./debounce\"));\nvar _deprecatedPropType = _interopRequireDefault(require(\"./deprecatedPropType\"));\nvar _isMuiElement = _interopRequireDefault(require(\"./isMuiElement\"));\nvar _ownerDocument = _interopRequireDefault(require(\"./ownerDocument\"));\nvar _ownerWindow = _interopRequireDefault(require(\"./ownerWindow\"));\nvar _requirePropFactory = _interopRequireDefault(require(\"./requirePropFactory\"));\nvar _setRef = _interopRequireDefault(require(\"./setRef\"));\nvar _useEnhancedEffect = _interopRequireDefault(require(\"./useEnhancedEffect\"));\nvar _useId = _interopRequireDefault(require(\"./useId\"));\nvar _unsupportedProp = _interopRequireDefault(require(\"./unsupportedProp\"));\nvar _useControlled = _interopRequireDefault(require(\"./useControlled\"));\nvar _useEventCallback = _interopRequireDefault(require(\"./useEventCallback\"));\nvar _useForkRef = _interopRequireDefault(require(\"./useForkRef\"));\nvar _useIsFocusVisible = _interopRequireDefault(require(\"./useIsFocusVisible\"));\n// TODO: remove this export once ClassNameGenerator is stable\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst unstable_ClassNameGenerator = exports.unstable_ClassNameGenerator = {\n configure: generator => {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(['MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.', '', \"You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead\", '', 'The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401', '', 'The updated documentation: https://mui.com/guides/classname-generator/'].join('\\n'));\n }\n _utils.unstable_ClassNameGenerator.configure(generator);\n }\n};", "\"use strict\";\n'use client';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _utils.createSvgIcon;\n }\n});\nvar _utils = require(\"@mui/material/utils\");", "\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M8 5v14l11-7z\"\n}), 'PlayArrow');", "\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92\"\n}), 'Share');", "\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1\"\n}), 'DarkMode');", "\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z\"\n}), 'LightMode');", "\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2\"\n}), 'QuestionMark');", "/**\n * Returns the last element of an array.\n * @param array The array.\n * @param n Which element from the end (default is zero).\n */\nexport function tail(array, n = 0) {\n return array[array.length - (1 + n)];\n}\nexport function tail2(arr) {\n if (arr.length === 0) {\n throw new Error('Invalid tail call');\n }\n return [arr.slice(0, arr.length - 1), arr[arr.length - 1]];\n}\nexport function equals(one, other, itemEquals = (a, b) => a === b) {\n if (one === other) {\n return true;\n }\n if (!one || !other) {\n return false;\n }\n if (one.length !== other.length) {\n return false;\n }\n for (let i = 0, len = one.length; i < len; i++) {\n if (!itemEquals(one[i], other[i])) {\n return false;\n }\n }\n return true;\n}\n/**\n * Remove the element at `index` by replacing it with the last element. This is faster than `splice`\n * but changes the order of the array\n */\nexport function removeFastWithoutKeepingOrder(array, index) {\n const last = array.length - 1;\n if (index < last) {\n array[index] = array[last];\n }\n array.pop();\n}\n/**\n * Performs a binary search algorithm over a sorted array.\n *\n * @param array The array being searched.\n * @param key The value we search for.\n * @param comparator A function that takes two array elements and returns zero\n * if they are equal, a negative number if the first element precedes the\n * second one in the sorting order, or a positive number if the second element\n * precedes the first one.\n * @return See {@link binarySearch2}\n */\nexport function binarySearch(array, key, comparator) {\n return binarySearch2(array.length, i => comparator(array[i], key));\n}\n/**\n * Performs a binary search algorithm over a sorted collection. Useful for cases\n * when we need to perform a binary search over something that isn't actually an\n * array, and converting data to an array would defeat the use of binary search\n * in the first place.\n *\n * @param length The collection length.\n * @param compareToKey A function that takes an index of an element in the\n * collection and returns zero if the value at this index is equal to the\n * search key, a negative number if the value precedes the search key in the\n * sorting order, or a positive number if the search key precedes the value.\n * @return A non-negative index of an element, if found. If not found, the\n * result is -(n+1) (or ~n, using bitwise notation), where n is the index\n * where the key should be inserted to maintain the sorting order.\n */\nexport function binarySearch2(length, compareToKey) {\n let low = 0, high = length - 1;\n while (low <= high) {\n const mid = ((low + high) / 2) | 0;\n const comp = compareToKey(mid);\n if (comp < 0) {\n low = mid + 1;\n }\n else if (comp > 0) {\n high = mid - 1;\n }\n else {\n return mid;\n }\n }\n return -(low + 1);\n}\nexport function quickSelect(nth, data, compare) {\n nth = nth | 0;\n if (nth >= data.length) {\n throw new TypeError('invalid index');\n }\n const pivotValue = data[Math.floor(data.length * Math.random())];\n const lower = [];\n const higher = [];\n const pivots = [];\n for (const value of data) {\n const val = compare(value, pivotValue);\n if (val < 0) {\n lower.push(value);\n }\n else if (val > 0) {\n higher.push(value);\n }\n else {\n pivots.push(value);\n }\n }\n if (nth < lower.length) {\n return quickSelect(nth, lower, compare);\n }\n else if (nth < lower.length + pivots.length) {\n return pivots[0];\n }\n else {\n return quickSelect(nth - (lower.length + pivots.length), higher, compare);\n }\n}\nexport function groupBy(data, compare) {\n const result = [];\n let currentGroup = undefined;\n for (const element of data.slice(0).sort(compare)) {\n if (!currentGroup || compare(currentGroup[0], element) !== 0) {\n currentGroup = [element];\n result.push(currentGroup);\n }\n else {\n currentGroup.push(element);\n }\n }\n return result;\n}\n/**\n * Splits the given items into a list of (non-empty) groups.\n * `shouldBeGrouped` is used to decide if two consecutive items should be in the same group.\n * The order of the items is preserved.\n */\nexport function* groupAdjacentBy(items, shouldBeGrouped) {\n let currentGroup;\n let last;\n for (const item of items) {\n if (last !== undefined && shouldBeGrouped(last, item)) {\n currentGroup.push(item);\n }\n else {\n if (currentGroup) {\n yield currentGroup;\n }\n currentGroup = [item];\n }\n last = item;\n }\n if (currentGroup) {\n yield currentGroup;\n }\n}\nexport function forEachAdjacent(arr, f) {\n for (let i = 0; i <= arr.length; i++) {\n f(i === 0 ? undefined : arr[i - 1], i === arr.length ? undefined : arr[i]);\n }\n}\nexport function forEachWithNeighbors(arr, f) {\n for (let i = 0; i < arr.length; i++) {\n f(i === 0 ? undefined : arr[i - 1], arr[i], i + 1 === arr.length ? undefined : arr[i + 1]);\n }\n}\n/**\n * @returns New array with all falsy values removed. The original array IS NOT modified.\n */\nexport function coalesce(array) {\n return array.filter(e => !!e);\n}\n/**\n * Remove all falsy values from `array`. The original array IS modified.\n */\nexport function coalesceInPlace(array) {\n let to = 0;\n for (let i = 0; i < array.length; i++) {\n if (!!array[i]) {\n array[to] = array[i];\n to += 1;\n }\n }\n array.length = to;\n}\n/**\n * @returns false if the provided object is an array and not empty.\n */\nexport function isFalsyOrEmpty(obj) {\n return !Array.isArray(obj) || obj.length === 0;\n}\nexport function isNonEmptyArray(obj) {\n return Array.isArray(obj) && obj.length > 0;\n}\n/**\n * Removes duplicates from the given array. The optional keyFn allows to specify\n * how elements are checked for equality by returning an alternate value for each.\n */\nexport function distinct(array, keyFn = value => value) {\n const seen = new Set();\n return array.filter(element => {\n const key = keyFn(element);\n if (seen.has(key)) {\n return false;\n }\n seen.add(key);\n return true;\n });\n}\nexport function firstOrDefault(array, notFoundValue) {\n return array.length > 0 ? array[0] : notFoundValue;\n}\nexport function range(arg, to) {\n let from = typeof to === 'number' ? arg : 0;\n if (typeof to === 'number') {\n from = arg;\n }\n else {\n from = 0;\n to = arg;\n }\n const result = [];\n if (from <= to) {\n for (let i = from; i < to; i++) {\n result.push(i);\n }\n }\n else {\n for (let i = from; i > to; i--) {\n result.push(i);\n }\n }\n return result;\n}\n/**\n * Insert `insertArr` inside `target` at `insertIndex`.\n * Please don't touch unless you understand https://jsperf.com/inserting-an-array-within-an-array\n */\nexport function arrayInsert(target, insertIndex, insertArr) {\n const before = target.slice(0, insertIndex);\n const after = target.slice(insertIndex);\n return before.concat(insertArr, after);\n}\n/**\n * Pushes an element to the start of the array, if found.\n */\nexport function pushToStart(arr, value) {\n const index = arr.indexOf(value);\n if (index > -1) {\n arr.splice(index, 1);\n arr.unshift(value);\n }\n}\n/**\n * Pushes an element to the end of the array, if found.\n */\nexport function pushToEnd(arr, value) {\n const index = arr.indexOf(value);\n if (index > -1) {\n arr.splice(index, 1);\n arr.push(value);\n }\n}\nexport function pushMany(arr, items) {\n for (const item of items) {\n arr.push(item);\n }\n}\nexport function asArray(x) {\n return Array.isArray(x) ? x : [x];\n}\n/**\n * Insert the new items in the array.\n * @param array The original array.\n * @param start The zero-based location in the array from which to start inserting elements.\n * @param newItems The items to be inserted\n */\nexport function insertInto(array, start, newItems) {\n const startIdx = getActualStartIndex(array, start);\n const originalLength = array.length;\n const newItemsLength = newItems.length;\n array.length = originalLength + newItemsLength;\n // Move the items after the start index, start from the end so that we don't overwrite any value.\n for (let i = originalLength - 1; i >= startIdx; i--) {\n array[i + newItemsLength] = array[i];\n }\n for (let i = 0; i < newItemsLength; i++) {\n array[i + startIdx] = newItems[i];\n }\n}\n/**\n * Removes elements from an array and inserts new elements in their place, returning the deleted elements. Alternative to the native Array.splice method, it\n * can only support limited number of items due to the maximum call stack size limit.\n * @param array The original array.\n * @param start The zero-based location in the array from which to start removing elements.\n * @param deleteCount The number of elements to remove.\n * @returns An array containing the elements that were deleted.\n */\nexport function splice(array, start, deleteCount, newItems) {\n const index = getActualStartIndex(array, start);\n let result = array.splice(index, deleteCount);\n if (result === undefined) {\n // see https://bugs.webkit.org/show_bug.cgi?id=261140\n result = [];\n }\n insertInto(array, index, newItems);\n return result;\n}\n/**\n * Determine the actual start index (same logic as the native splice() or slice())\n * If greater than the length of the array, start will be set to the length of the array. In this case, no element will be deleted but the method will behave as an adding function, adding as many element as item[n*] provided.\n * If negative, it will begin that many elements from the end of the array. (In this case, the origin -1, meaning -n is the index of the nth last element, and is therefore equivalent to the index of array.length - n.) If array.length + start is less than 0, it will begin from index 0.\n * @param array The target array.\n * @param start The operation index.\n */\nfunction getActualStartIndex(array, start) {\n return start < 0 ? Math.max(start + array.length, 0) : Math.min(start, array.length);\n}\nexport var CompareResult;\n(function (CompareResult) {\n function isLessThan(result) {\n return result < 0;\n }\n CompareResult.isLessThan = isLessThan;\n function isLessThanOrEqual(result) {\n return result <= 0;\n }\n CompareResult.isLessThanOrEqual = isLessThanOrEqual;\n function isGreaterThan(result) {\n return result > 0;\n }\n CompareResult.isGreaterThan = isGreaterThan;\n function isNeitherLessOrGreaterThan(result) {\n return result === 0;\n }\n CompareResult.isNeitherLessOrGreaterThan = isNeitherLessOrGreaterThan;\n CompareResult.greaterThan = 1;\n CompareResult.lessThan = -1;\n CompareResult.neitherLessOrGreaterThan = 0;\n})(CompareResult || (CompareResult = {}));\nexport function compareBy(selector, comparator) {\n return (a, b) => comparator(selector(a), selector(b));\n}\nexport function tieBreakComparators(...comparators) {\n return (item1, item2) => {\n for (const comparator of comparators) {\n const result = comparator(item1, item2);\n if (!CompareResult.isNeitherLessOrGreaterThan(result)) {\n return result;\n }\n }\n return CompareResult.neitherLessOrGreaterThan;\n };\n}\n/**\n * The natural order on numbers.\n*/\nexport const numberComparator = (a, b) => a - b;\nexport const booleanComparator = (a, b) => numberComparator(a ? 1 : 0, b ? 1 : 0);\nexport function reverseOrder(comparator) {\n return (a, b) => -comparator(a, b);\n}\nexport class ArrayQueue {\n /**\n * Constructs a queue that is backed by the given array. Runtime is O(1).\n */\n constructor(items) {\n this.items = items;\n this.firstIdx = 0;\n this.lastIdx = this.items.length - 1;\n }\n get length() {\n return this.lastIdx - this.firstIdx + 1;\n }\n /**\n * Consumes elements from the beginning of the queue as long as the predicate returns true.\n * If no elements were consumed, `null` is returned. Has a runtime of O(result.length).\n */\n takeWhile(predicate) {\n // P(k) := k <= this.lastIdx && predicate(this.items[k])\n // Find s := min { k | k >= this.firstIdx && !P(k) } and return this.data[this.firstIdx...s)\n let startIdx = this.firstIdx;\n while (startIdx < this.items.length && predicate(this.items[startIdx])) {\n startIdx++;\n }\n const result = startIdx === this.firstIdx ? null : this.items.slice(this.firstIdx, startIdx);\n this.firstIdx = startIdx;\n return result;\n }\n /**\n * Consumes elements from the end of the queue as long as the predicate returns true.\n * If no elements were consumed, `null` is returned.\n * The result has the same order as the underlying array!\n */\n takeFromEndWhile(predicate) {\n // P(k) := this.firstIdx >= k && predicate(this.items[k])\n // Find s := max { k | k <= this.lastIdx && !P(k) } and return this.data(s...this.lastIdx]\n let endIdx = this.lastIdx;\n while (endIdx >= 0 && predicate(this.items[endIdx])) {\n endIdx--;\n }\n const result = endIdx === this.lastIdx ? null : this.items.slice(endIdx + 1, this.lastIdx + 1);\n this.lastIdx = endIdx;\n return result;\n }\n peek() {\n if (this.length === 0) {\n return undefined;\n }\n return this.items[this.firstIdx];\n }\n dequeue() {\n const result = this.items[this.firstIdx];\n this.firstIdx++;\n return result;\n }\n takeCount(count) {\n const result = this.items.slice(this.firstIdx, this.firstIdx + count);\n this.firstIdx += count;\n return result;\n }\n}\n/**\n * This class is faster than an iterator and array for lazy computed data.\n*/\nexport class CallbackIterable {\n constructor(\n /**\n * Calls the callback for every item.\n * Stops when the callback returns false.\n */\n iterate) {\n this.iterate = iterate;\n }\n toArray() {\n const result = [];\n this.iterate(item => { result.push(item); return true; });\n return result;\n }\n filter(predicate) {\n return new CallbackIterable(cb => this.iterate(item => predicate(item) ? cb(item) : true));\n }\n map(mapFn) {\n return new CallbackIterable(cb => this.iterate(item => cb(mapFn(item))));\n }\n findLast(predicate) {\n let result;\n this.iterate(item => {\n if (predicate(item)) {\n result = item;\n }\n return true;\n });\n return result;\n }\n findLastMaxBy(comparator) {\n let result;\n let first = true;\n this.iterate(item => {\n if (first || CompareResult.isGreaterThan(comparator(item, result))) {\n first = false;\n result = item;\n }\n return true;\n });\n return result;\n }\n}\nCallbackIterable.empty = new CallbackIterable(_callback => { });\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/**\n * @returns whether the provided parameter is a JavaScript String or not.\n */\nexport function isString(str) {\n return (typeof str === 'string');\n}\n/**\n * @returns whether the provided parameter is of type `object` but **not**\n *\t`null`, an `array`, a `regexp`, nor a `date`.\n */\nexport function isObject(obj) {\n // The method can't do a type cast since there are type (like strings) which\n // are subclasses of any put not positvely matched by the function. Hence type\n // narrowing results in wrong results.\n return typeof obj === 'object'\n && obj !== null\n && !Array.isArray(obj)\n && !(obj instanceof RegExp)\n && !(obj instanceof Date);\n}\n/**\n * @returns whether the provided parameter is of type `Buffer` or Uint8Array dervived type\n */\nexport function isTypedArray(obj) {\n const TypedArray = Object.getPrototypeOf(Uint8Array);\n return typeof obj === 'object'\n && obj instanceof TypedArray;\n}\n/**\n * In **contrast** to just checking `typeof` this will return `false` for `NaN`.\n * @returns whether the provided parameter is a JavaScript Number or not.\n */\nexport function isNumber(obj) {\n return (typeof obj === 'number' && !isNaN(obj));\n}\n/**\n * @returns whether the provided parameter is an Iterable, casting to the given generic\n */\nexport function isIterable(obj) {\n return !!obj && typeof obj[Symbol.iterator] === 'function';\n}\n/**\n * @returns whether the provided parameter is a JavaScript Boolean or not.\n */\nexport function isBoolean(obj) {\n return (obj === true || obj === false);\n}\n/**\n * @returns whether the provided parameter is undefined.\n */\nexport function isUndefined(obj) {\n return (typeof obj === 'undefined');\n}\n/**\n * @returns whether the provided parameter is defined.\n */\nexport function isDefined(arg) {\n return !isUndefinedOrNull(arg);\n}\n/**\n * @returns whether the provided parameter is undefined or null.\n */\nexport function isUndefinedOrNull(obj) {\n return (isUndefined(obj) || obj === null);\n}\nexport function assertType(condition, type) {\n if (!condition) {\n throw new Error(type ? `Unexpected type, expected '${type}'` : 'Unexpected type');\n }\n}\n/**\n * Asserts that the argument passed in is neither undefined nor null.\n */\nexport function assertIsDefined(arg) {\n if (isUndefinedOrNull(arg)) {\n throw new Error('Assertion Failed: argument is undefined or null');\n }\n return arg;\n}\n/**\n * @returns whether the provided parameter is a JavaScript Function or not.\n */\nexport function isFunction(obj) {\n return (typeof obj === 'function');\n}\nexport function validateConstraints(args, constraints) {\n const len = Math.min(args.length, constraints.length);\n for (let i = 0; i < len; i++) {\n validateConstraint(args[i], constraints[i]);\n }\n}\nexport function validateConstraint(arg, constraint) {\n if (isString(constraint)) {\n if (typeof arg !== constraint) {\n throw new Error(`argument does not match constraint: typeof ${constraint}`);\n }\n }\n else if (isFunction(constraint)) {\n try {\n if (arg instanceof constraint) {\n return;\n }\n }\n catch (_a) {\n // ignore\n }\n if (!isUndefinedOrNull(arg) && arg.constructor === constraint) {\n return;\n }\n if (constraint.length === 1 && constraint.call(undefined, arg) === true) {\n return;\n }\n throw new Error(`argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true`);\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { isTypedArray, isObject, isUndefinedOrNull } from './types.js';\nexport function deepClone(obj) {\n if (!obj || typeof obj !== 'object') {\n return obj;\n }\n if (obj instanceof RegExp) {\n return obj;\n }\n const result = Array.isArray(obj) ? [] : {};\n Object.entries(obj).forEach(([key, value]) => {\n result[key] = value && typeof value === 'object' ? deepClone(value) : value;\n });\n return result;\n}\nexport function deepFreeze(obj) {\n if (!obj || typeof obj !== 'object') {\n return obj;\n }\n const stack = [obj];\n while (stack.length > 0) {\n const obj = stack.shift();\n Object.freeze(obj);\n for (const key in obj) {\n if (_hasOwnProperty.call(obj, key)) {\n const prop = obj[key];\n if (typeof prop === 'object' && !Object.isFrozen(prop) && !isTypedArray(prop)) {\n stack.push(prop);\n }\n }\n }\n }\n return obj;\n}\nconst _hasOwnProperty = Object.prototype.hasOwnProperty;\nexport function cloneAndChange(obj, changer) {\n return _cloneAndChange(obj, changer, new Set());\n}\nfunction _cloneAndChange(obj, changer, seen) {\n if (isUndefinedOrNull(obj)) {\n return obj;\n }\n const changed = changer(obj);\n if (typeof changed !== 'undefined') {\n return changed;\n }\n if (Array.isArray(obj)) {\n const r1 = [];\n for (const e of obj) {\n r1.push(_cloneAndChange(e, changer, seen));\n }\n return r1;\n }\n if (isObject(obj)) {\n if (seen.has(obj)) {\n throw new Error('Cannot clone recursive data-structure');\n }\n seen.add(obj);\n const r2 = {};\n for (const i2 in obj) {\n if (_hasOwnProperty.call(obj, i2)) {\n r2[i2] = _cloneAndChange(obj[i2], changer, seen);\n }\n }\n seen.delete(obj);\n return r2;\n }\n return obj;\n}\n/**\n * Copies all properties of source into destination. The optional parameter \"overwrite\" allows to control\n * if existing properties on the destination should be overwritten or not. Defaults to true (overwrite).\n */\nexport function mixin(destination, source, overwrite = true) {\n if (!isObject(destination)) {\n return source;\n }\n if (isObject(source)) {\n Object.keys(source).forEach(key => {\n if (key in destination) {\n if (overwrite) {\n if (isObject(destination[key]) && isObject(source[key])) {\n mixin(destination[key], source[key], overwrite);\n }\n else {\n destination[key] = source[key];\n }\n }\n }\n else {\n destination[key] = source[key];\n }\n });\n }\n return destination;\n}\nexport function equals(one, other) {\n if (one === other) {\n return true;\n }\n if (one === null || one === undefined || other === null || other === undefined) {\n return false;\n }\n if (typeof one !== typeof other) {\n return false;\n }\n if (typeof one !== 'object') {\n return false;\n }\n if ((Array.isArray(one)) !== (Array.isArray(other))) {\n return false;\n }\n let i;\n let key;\n if (Array.isArray(one)) {\n if (one.length !== other.length) {\n return false;\n }\n for (i = 0; i < one.length; i++) {\n if (!equals(one[i], other[i])) {\n return false;\n }\n }\n }\n else {\n const oneKeys = [];\n for (key in one) {\n oneKeys.push(key);\n }\n oneKeys.sort();\n const otherKeys = [];\n for (key in other) {\n otherKeys.push(key);\n }\n otherKeys.sort();\n if (!equals(oneKeys, otherKeys)) {\n return false;\n }\n for (i = 0; i < oneKeys.length; i++) {\n if (!equals(one[oneKeys[i]], other[oneKeys[i]])) {\n return false;\n }\n }\n }\n return true;\n}\nexport function getAllPropertyNames(obj) {\n let res = [];\n while (Object.prototype !== obj) {\n res = res.concat(Object.getOwnPropertyNames(obj));\n obj = Object.getPrototypeOf(obj);\n }\n return res;\n}\nexport function getAllMethodNames(obj) {\n const methods = [];\n for (const prop of getAllPropertyNames(obj)) {\n if (typeof obj[prop] === 'function') {\n methods.push(prop);\n }\n }\n return methods;\n}\nexport function createProxyObject(methodNames, invoke) {\n const createProxyMethod = (method) => {\n return function () {\n const args = Array.prototype.slice.call(arguments, 0);\n return invoke(method, args);\n };\n };\n const result = {};\n for (const methodName of methodNames) {\n result[methodName] = createProxyMethod(methodName);\n }\n return result;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nlet isPseudo = (typeof document !== 'undefined' && document.location && document.location.hash.indexOf('pseudo=true') >= 0);\nconst DEFAULT_TAG = 'i-default';\nfunction _format(message, args) {\n let result;\n if (args.length === 0) {\n result = message;\n }\n else {\n result = message.replace(/\\{(\\d+)\\}/g, (match, rest) => {\n const index = rest[0];\n const arg = args[index];\n let result = match;\n if (typeof arg === 'string') {\n result = arg;\n }\n else if (typeof arg === 'number' || typeof arg === 'boolean' || arg === void 0 || arg === null) {\n result = String(arg);\n }\n return result;\n });\n }\n if (isPseudo) {\n // FF3B and FF3D is the Unicode zenkaku representation for [ and ]\n result = '\\uFF3B' + result.replace(/[aouei]/g, '$&$&') + '\\uFF3D';\n }\n return result;\n}\nfunction findLanguageForModule(config, name) {\n let result = config[name];\n if (result) {\n return result;\n }\n result = config['*'];\n if (result) {\n return result;\n }\n return null;\n}\nfunction endWithSlash(path) {\n if (path.charAt(path.length - 1) === '/') {\n return path;\n }\n return path + '/';\n}\nasync function getMessagesFromTranslationsService(translationServiceUrl, language, name) {\n const url = endWithSlash(translationServiceUrl) + endWithSlash(language) + 'vscode/' + endWithSlash(name);\n const res = await fetch(url);\n if (res.ok) {\n const messages = await res.json();\n return messages;\n }\n throw new Error(`${res.status} - ${res.statusText}`);\n}\nfunction createScopedLocalize(scope) {\n return function (idx, defaultValue) {\n const restArgs = Array.prototype.slice.call(arguments, 2);\n return _format(scope[idx], restArgs);\n };\n}\nfunction createScopedLocalize2(scope) {\n return (idx, defaultValue, ...args) => ({\n value: _format(scope[idx], args),\n original: _format(defaultValue, args)\n });\n}\n/**\n * @skipMangle\n */\nexport function localize(data, message, ...args) {\n return _format(message, args);\n}\n/**\n * @skipMangle\n */\nexport function localize2(data, message, ...args) {\n const original = _format(message, args);\n return {\n value: original,\n original\n };\n}\n/**\n * @skipMangle\n */\nexport function getConfiguredDefaultLocale(_) {\n // This returns undefined because this implementation isn't used and is overwritten by the loader\n // when loaded.\n return undefined;\n}\n/**\n * @skipMangle\n */\nexport function setPseudoTranslation(value) {\n isPseudo = value;\n}\n/**\n * Invoked in a built product at run-time\n * @skipMangle\n */\nexport function create(key, data) {\n var _a;\n return {\n localize: createScopedLocalize(data[key]),\n localize2: createScopedLocalize2(data[key]),\n getConfiguredDefaultLocale: (_a = data.getConfiguredDefaultLocale) !== null && _a !== void 0 ? _a : ((_) => undefined)\n };\n}\n/**\n * Invoked by the loader at run-time\n * @skipMangle\n */\nexport function load(name, req, load, config) {\n var _a;\n const pluginConfig = (_a = config['vs/nls']) !== null && _a !== void 0 ? _a : {};\n if (!name || name.length === 0) {\n // TODO: We need to give back the mangled names here\n return load({\n localize: localize,\n localize2: localize2,\n getConfiguredDefaultLocale: () => { var _a; return (_a = pluginConfig.availableLanguages) === null || _a === void 0 ? void 0 : _a['*']; }\n });\n }\n const language = pluginConfig.availableLanguages ? findLanguageForModule(pluginConfig.availableLanguages, name) : null;\n const useDefaultLanguage = language === null || language === DEFAULT_TAG;\n let suffix = '.nls';\n if (!useDefaultLanguage) {\n suffix = suffix + '.' + language;\n }\n const messagesLoaded = (messages) => {\n if (Array.isArray(messages)) {\n messages.localize = createScopedLocalize(messages);\n messages.localize2 = createScopedLocalize2(messages);\n }\n else {\n messages.localize = createScopedLocalize(messages[name]);\n messages.localize2 = createScopedLocalize2(messages[name]);\n }\n messages.getConfiguredDefaultLocale = () => { var _a; return (_a = pluginConfig.availableLanguages) === null || _a === void 0 ? void 0 : _a['*']; };\n load(messages);\n };\n if (typeof pluginConfig.loadBundle === 'function') {\n pluginConfig.loadBundle(name, language, (err, messages) => {\n // We have an error. Load the English default strings to not fail\n if (err) {\n req([name + '.nls'], messagesLoaded);\n }\n else {\n messagesLoaded(messages);\n }\n });\n }\n else if (pluginConfig.translationServiceUrl && !useDefaultLanguage) {\n (async () => {\n var _a;\n try {\n const messages = await getMessagesFromTranslationsService(pluginConfig.translationServiceUrl, language, name);\n return messagesLoaded(messages);\n }\n catch (err) {\n // Language is already as generic as it gets, so require default messages\n if (!language.includes('-')) {\n console.error(err);\n return req([name + '.nls'], messagesLoaded);\n }\n try {\n // Since there is a dash, the language configured is a specific sub-language of the same generic language.\n // Since we were unable to load the specific language, try to load the generic language. Ex. we failed to find a\n // Swiss German (de-CH), so try to load the generic German (de) messages instead.\n const genericLanguage = language.split('-')[0];\n const messages = await getMessagesFromTranslationsService(pluginConfig.translationServiceUrl, genericLanguage, name);\n // We got some messages, so we configure the configuration to use the generic language for this session.\n (_a = pluginConfig.availableLanguages) !== null && _a !== void 0 ? _a : (pluginConfig.availableLanguages = {});\n pluginConfig.availableLanguages['*'] = genericLanguage;\n return messagesLoaded(messages);\n }\n catch (err) {\n console.error(err);\n return req([name + '.nls'], messagesLoaded);\n }\n }\n })();\n }\n else {\n req([name + suffix], messagesLoaded, (err) => {\n if (suffix === '.nls') {\n console.error('Failed trying to load default language strings', err);\n return;\n }\n console.error(`Failed to load message bundle for language ${language}. Falling back to the default language:`, err);\n req([name + '.nls'], messagesLoaded);\n });\n }\n}\n", "var _a;\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as nls from '../../nls.js';\nexport const LANGUAGE_DEFAULT = 'en';\nlet _isWindows = false;\nlet _isMacintosh = false;\nlet _isLinux = false;\nlet _isLinuxSnap = false;\nlet _isNative = false;\nlet _isWeb = false;\nlet _isElectron = false;\nlet _isIOS = false;\nlet _isCI = false;\nlet _isMobile = false;\nlet _locale = undefined;\nlet _language = LANGUAGE_DEFAULT;\nlet _platformLocale = LANGUAGE_DEFAULT;\nlet _translationsConfigFile = undefined;\nlet _userAgent = undefined;\nconst $globalThis = globalThis;\nlet nodeProcess = undefined;\nif (typeof $globalThis.vscode !== 'undefined' && typeof $globalThis.vscode.process !== 'undefined') {\n // Native environment (sandboxed)\n nodeProcess = $globalThis.vscode.process;\n}\nelse if (typeof process !== 'undefined') {\n // Native environment (non-sandboxed)\n nodeProcess = process;\n}\nconst isElectronProcess = typeof ((_a = nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.versions) === null || _a === void 0 ? void 0 : _a.electron) === 'string';\nconst isElectronRenderer = isElectronProcess && (nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.type) === 'renderer';\n// Native environment\nif (typeof nodeProcess === 'object') {\n _isWindows = (nodeProcess.platform === 'win32');\n _isMacintosh = (nodeProcess.platform === 'darwin');\n _isLinux = (nodeProcess.platform === 'linux');\n _isLinuxSnap = _isLinux && !!nodeProcess.env['SNAP'] && !!nodeProcess.env['SNAP_REVISION'];\n _isElectron = isElectronProcess;\n _isCI = !!nodeProcess.env['CI'] || !!nodeProcess.env['BUILD_ARTIFACTSTAGINGDIRECTORY'];\n _locale = LANGUAGE_DEFAULT;\n _language = LANGUAGE_DEFAULT;\n const rawNlsConfig = nodeProcess.env['VSCODE_NLS_CONFIG'];\n if (rawNlsConfig) {\n try {\n const nlsConfig = JSON.parse(rawNlsConfig);\n const resolved = nlsConfig.availableLanguages['*'];\n _locale = nlsConfig.locale;\n _platformLocale = nlsConfig.osLocale;\n // VSCode's default language is 'en'\n _language = resolved ? resolved : LANGUAGE_DEFAULT;\n _translationsConfigFile = nlsConfig._translationsConfigFile;\n }\n catch (e) {\n }\n }\n _isNative = true;\n}\n// Web environment\nelse if (typeof navigator === 'object' && !isElectronRenderer) {\n _userAgent = navigator.userAgent;\n _isWindows = _userAgent.indexOf('Windows') >= 0;\n _isMacintosh = _userAgent.indexOf('Macintosh') >= 0;\n _isIOS = (_userAgent.indexOf('Macintosh') >= 0 || _userAgent.indexOf('iPad') >= 0 || _userAgent.indexOf('iPhone') >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0;\n _isLinux = _userAgent.indexOf('Linux') >= 0;\n _isMobile = (_userAgent === null || _userAgent === void 0 ? void 0 : _userAgent.indexOf('Mobi')) >= 0;\n _isWeb = true;\n const configuredLocale = nls.getConfiguredDefaultLocale(\n // This call _must_ be done in the file that calls `nls.getConfiguredDefaultLocale`\n // to ensure that the NLS AMD Loader plugin has been loaded and configured.\n // This is because the loader plugin decides what the default locale is based on\n // how it's able to resolve the strings.\n nls.localize({ key: 'ensureLoaderPluginIsLoaded', comment: ['{Locked}'] }, '_'));\n _locale = configuredLocale || LANGUAGE_DEFAULT;\n _language = _locale;\n _platformLocale = navigator.language;\n}\n// Unknown environment\nelse {\n console.error('Unable to resolve platform.');\n}\nlet _platform = 0 /* Platform.Web */;\nif (_isMacintosh) {\n _platform = 1 /* Platform.Mac */;\n}\nelse if (_isWindows) {\n _platform = 3 /* Platform.Windows */;\n}\nelse if (_isLinux) {\n _platform = 2 /* Platform.Linux */;\n}\nexport const isWindows = _isWindows;\nexport const isMacintosh = _isMacintosh;\nexport const isLinux = _isLinux;\nexport const isNative = _isNative;\nexport const isWeb = _isWeb;\nexport const isWebWorker = (_isWeb && typeof $globalThis.importScripts === 'function');\nexport const webWorkerOrigin = isWebWorker ? $globalThis.origin : undefined;\nexport const isIOS = _isIOS;\nexport const isMobile = _isMobile;\nexport const userAgent = _userAgent;\n/**\n * The language used for the user interface. The format of\n * the string is all lower case (e.g. zh-tw for Traditional\n * Chinese)\n */\nexport const language = _language;\nexport const setTimeout0IsFaster = (typeof $globalThis.postMessage === 'function' && !$globalThis.importScripts);\n/**\n * See https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#:~:text=than%204%2C%20then-,set%20timeout%20to%204,-.\n *\n * Works similarly to `setTimeout(0)` but doesn't suffer from the 4ms artificial delay\n * that browsers set when the nesting level is > 5.\n */\nexport const setTimeout0 = (() => {\n if (setTimeout0IsFaster) {\n const pending = [];\n $globalThis.addEventListener('message', (e) => {\n if (e.data && e.data.vscodeScheduleAsyncWork) {\n for (let i = 0, len = pending.length; i < len; i++) {\n const candidate = pending[i];\n if (candidate.id === e.data.vscodeScheduleAsyncWork) {\n pending.splice(i, 1);\n candidate.callback();\n return;\n }\n }\n }\n });\n let lastId = 0;\n return (callback) => {\n const myId = ++lastId;\n pending.push({\n id: myId,\n callback: callback\n });\n $globalThis.postMessage({ vscodeScheduleAsyncWork: myId }, '*');\n };\n }\n return (callback) => setTimeout(callback);\n})();\nexport const OS = (_isMacintosh || _isIOS ? 2 /* OperatingSystem.Macintosh */ : (_isWindows ? 1 /* OperatingSystem.Windows */ : 3 /* OperatingSystem.Linux */));\nlet _isLittleEndian = true;\nlet _isLittleEndianComputed = false;\nexport function isLittleEndian() {\n if (!_isLittleEndianComputed) {\n _isLittleEndianComputed = true;\n const test = new Uint8Array(2);\n test[0] = 1;\n test[1] = 2;\n const view = new Uint16Array(test.buffer);\n _isLittleEndian = (view[0] === (2 << 8) + 1);\n }\n return _isLittleEndian;\n}\nexport const isChrome = !!(userAgent && userAgent.indexOf('Chrome') >= 0);\nexport const isFirefox = !!(userAgent && userAgent.indexOf('Firefox') >= 0);\nexport const isSafari = !!(!isChrome && (userAgent && userAgent.indexOf('Safari') >= 0));\nexport const isEdge = !!(userAgent && userAgent.indexOf('Edg/') >= 0);\nexport const isAndroid = !!(userAgent && userAgent.indexOf('Android') >= 0);\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport const EDITOR_MODEL_DEFAULTS = {\n tabSize: 4,\n indentSize: 4,\n insertSpaces: true,\n detectIndentation: true,\n trimAutoWhitespace: true,\n largeFileOptimizations: true,\n bracketPairColorizationOptions: {\n enabled: true,\n independentColorPoolPerBracketType: false,\n },\n};\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport var Iterable;\n(function (Iterable) {\n function is(thing) {\n return thing && typeof thing === 'object' && typeof thing[Symbol.iterator] === 'function';\n }\n Iterable.is = is;\n const _empty = Object.freeze([]);\n function empty() {\n return _empty;\n }\n Iterable.empty = empty;\n function* single(element) {\n yield element;\n }\n Iterable.single = single;\n function wrap(iterableOrElement) {\n if (is(iterableOrElement)) {\n return iterableOrElement;\n }\n else {\n return single(iterableOrElement);\n }\n }\n Iterable.wrap = wrap;\n function from(iterable) {\n return iterable || _empty;\n }\n Iterable.from = from;\n function* reverse(array) {\n for (let i = array.length - 1; i >= 0; i--) {\n yield array[i];\n }\n }\n Iterable.reverse = reverse;\n function isEmpty(iterable) {\n return !iterable || iterable[Symbol.iterator]().next().done === true;\n }\n Iterable.isEmpty = isEmpty;\n function first(iterable) {\n return iterable[Symbol.iterator]().next().value;\n }\n Iterable.first = first;\n function some(iterable, predicate) {\n for (const element of iterable) {\n if (predicate(element)) {\n return true;\n }\n }\n return false;\n }\n Iterable.some = some;\n function find(iterable, predicate) {\n for (const element of iterable) {\n if (predicate(element)) {\n return element;\n }\n }\n return undefined;\n }\n Iterable.find = find;\n function* filter(iterable, predicate) {\n for (const element of iterable) {\n if (predicate(element)) {\n yield element;\n }\n }\n }\n Iterable.filter = filter;\n function* map(iterable, fn) {\n let index = 0;\n for (const element of iterable) {\n yield fn(element, index++);\n }\n }\n Iterable.map = map;\n function* concat(...iterables) {\n for (const iterable of iterables) {\n yield* iterable;\n }\n }\n Iterable.concat = concat;\n function reduce(iterable, reducer, initialValue) {\n let value = initialValue;\n for (const element of iterable) {\n value = reducer(value, element);\n }\n return value;\n }\n Iterable.reduce = reduce;\n /**\n * Returns an iterable slice of the array, with the same semantics as `array.slice()`.\n */\n function* slice(arr, from, to = arr.length) {\n if (from < 0) {\n from += arr.length;\n }\n if (to < 0) {\n to += arr.length;\n }\n else if (to > arr.length) {\n to = arr.length;\n }\n for (; from < to; from++) {\n yield arr[from];\n }\n }\n Iterable.slice = slice;\n /**\n * Consumes `atMost` elements from iterable and returns the consumed elements,\n * and an iterable for the rest of the elements.\n */\n function consume(iterable, atMost = Number.POSITIVE_INFINITY) {\n const consumed = [];\n if (atMost === 0) {\n return [consumed, iterable];\n }\n const iterator = iterable[Symbol.iterator]();\n for (let i = 0; i < atMost; i++) {\n const next = iterator.next();\n if (next.done) {\n return [consumed, Iterable.empty()];\n }\n consumed.push(next.value);\n }\n return [consumed, { [Symbol.iterator]() { return iterator; } }];\n }\n Iterable.consume = consume;\n async function asyncToArray(iterable) {\n const result = [];\n for await (const item of iterable) {\n result.push(item);\n }\n return Promise.resolve(result);\n }\n Iterable.asyncToArray = asyncToArray;\n})(Iterable || (Iterable = {}));\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nclass Node {\n constructor(element) {\n this.element = element;\n this.next = Node.Undefined;\n this.prev = Node.Undefined;\n }\n}\nNode.Undefined = new Node(undefined);\nexport class LinkedList {\n constructor() {\n this._first = Node.Undefined;\n this._last = Node.Undefined;\n this._size = 0;\n }\n get size() {\n return this._size;\n }\n isEmpty() {\n return this._first === Node.Undefined;\n }\n clear() {\n let node = this._first;\n while (node !== Node.Undefined) {\n const next = node.next;\n node.prev = Node.Undefined;\n node.next = Node.Undefined;\n node = next;\n }\n this._first = Node.Undefined;\n this._last = Node.Undefined;\n this._size = 0;\n }\n unshift(element) {\n return this._insert(element, false);\n }\n push(element) {\n return this._insert(element, true);\n }\n _insert(element, atTheEnd) {\n const newNode = new Node(element);\n if (this._first === Node.Undefined) {\n this._first = newNode;\n this._last = newNode;\n }\n else if (atTheEnd) {\n // push\n const oldLast = this._last;\n this._last = newNode;\n newNode.prev = oldLast;\n oldLast.next = newNode;\n }\n else {\n // unshift\n const oldFirst = this._first;\n this._first = newNode;\n newNode.next = oldFirst;\n oldFirst.prev = newNode;\n }\n this._size += 1;\n let didRemove = false;\n return () => {\n if (!didRemove) {\n didRemove = true;\n this._remove(newNode);\n }\n };\n }\n shift() {\n if (this._first === Node.Undefined) {\n return undefined;\n }\n else {\n const res = this._first.element;\n this._remove(this._first);\n return res;\n }\n }\n pop() {\n if (this._last === Node.Undefined) {\n return undefined;\n }\n else {\n const res = this._last.element;\n this._remove(this._last);\n return res;\n }\n }\n _remove(node) {\n if (node.prev !== Node.Undefined && node.next !== Node.Undefined) {\n // middle\n const anchor = node.prev;\n anchor.next = node.next;\n node.next.prev = anchor;\n }\n else if (node.prev === Node.Undefined && node.next === Node.Undefined) {\n // only node\n this._first = Node.Undefined;\n this._last = Node.Undefined;\n }\n else if (node.next === Node.Undefined) {\n // last\n this._last = this._last.prev;\n this._last.next = Node.Undefined;\n }\n else if (node.prev === Node.Undefined) {\n // first\n this._first = this._first.next;\n this._first.prev = Node.Undefined;\n }\n // done\n this._size -= 1;\n }\n *[Symbol.iterator]() {\n let node = this._first;\n while (node !== Node.Undefined) {\n yield node.element;\n node = node.next;\n }\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Iterable } from '../../../base/common/iterator.js';\nimport { LinkedList } from '../../../base/common/linkedList.js';\nexport const USUAL_WORD_SEPARATORS = '`~!@#$%^&*()-=+[{]}\\\\|;:\\'\",.<>/?';\n/**\n * Create a word definition regular expression based on default word separators.\n * Optionally provide allowed separators that should be included in words.\n *\n * The default would look like this:\n * /(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\$\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)/g\n */\nfunction createWordRegExp(allowInWords = '') {\n let source = '(-?\\\\d*\\\\.\\\\d\\\\w*)|([^';\n for (const sep of USUAL_WORD_SEPARATORS) {\n if (allowInWords.indexOf(sep) >= 0) {\n continue;\n }\n source += '\\\\' + sep;\n }\n source += '\\\\s]+)';\n return new RegExp(source, 'g');\n}\n// catches numbers (including floating numbers) in the first group, and alphanum in the second\nexport const DEFAULT_WORD_REGEXP = createWordRegExp();\nexport function ensureValidWordDefinition(wordDefinition) {\n let result = DEFAULT_WORD_REGEXP;\n if (wordDefinition && (wordDefinition instanceof RegExp)) {\n if (!wordDefinition.global) {\n let flags = 'g';\n if (wordDefinition.ignoreCase) {\n flags += 'i';\n }\n if (wordDefinition.multiline) {\n flags += 'm';\n }\n if (wordDefinition.unicode) {\n flags += 'u';\n }\n result = new RegExp(wordDefinition.source, flags);\n }\n else {\n result = wordDefinition;\n }\n }\n result.lastIndex = 0;\n return result;\n}\nconst _defaultConfig = new LinkedList();\n_defaultConfig.unshift({\n maxLen: 1000,\n windowSize: 15,\n timeBudget: 150\n});\nexport function getWordAtText(column, wordDefinition, text, textOffset, config) {\n // Ensure the regex has the 'g' flag, otherwise this will loop forever\n wordDefinition = ensureValidWordDefinition(wordDefinition);\n if (!config) {\n config = Iterable.first(_defaultConfig);\n }\n if (text.length > config.maxLen) {\n // don't throw strings that long at the regexp\n // but use a sub-string in which a word must occur\n let start = column - config.maxLen / 2;\n if (start < 0) {\n start = 0;\n }\n else {\n textOffset += start;\n }\n text = text.substring(start, column + config.maxLen / 2);\n return getWordAtText(column, wordDefinition, text, textOffset, config);\n }\n const t1 = Date.now();\n const pos = column - 1 - textOffset;\n let prevRegexIndex = -1;\n let match = null;\n for (let i = 1;; i++) {\n // check time budget\n if (Date.now() - t1 >= config.timeBudget) {\n break;\n }\n // reset the index at which the regexp should start matching, also know where it\n // should stop so that subsequent search don't repeat previous searches\n const regexIndex = pos - config.windowSize * i;\n wordDefinition.lastIndex = Math.max(0, regexIndex);\n const thisMatch = _findRegexMatchEnclosingPosition(wordDefinition, text, pos, prevRegexIndex);\n if (!thisMatch && match) {\n // stop: we have something\n break;\n }\n match = thisMatch;\n // stop: searched at start\n if (regexIndex <= 0) {\n break;\n }\n prevRegexIndex = regexIndex;\n }\n if (match) {\n const result = {\n word: match[0],\n startColumn: textOffset + 1 + match.index,\n endColumn: textOffset + 1 + match.index + match[0].length\n };\n wordDefinition.lastIndex = 0;\n return result;\n }\n return null;\n}\nfunction _findRegexMatchEnclosingPosition(wordDefinition, text, pos, stopPos) {\n let match;\n while (match = wordDefinition.exec(text)) {\n const matchIndex = match.index || 0;\n if (matchIndex <= pos && wordDefinition.lastIndex >= pos) {\n return match;\n }\n else if (stopPos > 0 && matchIndex > stopPos) {\n return null;\n }\n }\n return null;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as arrays from '../../../base/common/arrays.js';\nimport * as objects from '../../../base/common/objects.js';\nimport * as platform from '../../../base/common/platform.js';\nimport { EDITOR_MODEL_DEFAULTS } from '../core/textModelDefaults.js';\nimport { USUAL_WORD_SEPARATORS } from '../core/wordHelper.js';\nimport * as nls from '../../../nls.js';\n/**\n * @internal\n * The width of the minimap gutter, in pixels.\n */\nexport const MINIMAP_GUTTER_WIDTH = 8;\n//#endregion\n/**\n * An event describing that the configuration of the editor has changed.\n */\nexport class ConfigurationChangedEvent {\n /**\n * @internal\n */\n constructor(values) {\n this._values = values;\n }\n hasChanged(id) {\n return this._values[id];\n }\n}\n/**\n * @internal\n */\nexport class ComputeOptionsMemory {\n constructor() {\n this.stableMinimapLayoutInput = null;\n this.stableFitMaxMinimapScale = 0;\n this.stableFitRemainingWidth = 0;\n }\n}\n/**\n * @internal\n */\nclass BaseEditorOption {\n constructor(id, name, defaultValue, schema) {\n this.id = id;\n this.name = name;\n this.defaultValue = defaultValue;\n this.schema = schema;\n }\n applyUpdate(value, update) {\n return applyUpdate(value, update);\n }\n compute(env, options, value) {\n return value;\n }\n}\nexport class ApplyUpdateResult {\n constructor(newValue, didChange) {\n this.newValue = newValue;\n this.didChange = didChange;\n }\n}\nfunction applyUpdate(value, update) {\n if (typeof value !== 'object' || typeof update !== 'object' || !value || !update) {\n return new ApplyUpdateResult(update, value !== update);\n }\n if (Array.isArray(value) || Array.isArray(update)) {\n const arrayEquals = Array.isArray(value) && Array.isArray(update) && arrays.equals(value, update);\n return new ApplyUpdateResult(update, !arrayEquals);\n }\n let didChange = false;\n for (const key in update) {\n if (update.hasOwnProperty(key)) {\n const result = applyUpdate(value[key], update[key]);\n if (result.didChange) {\n value[key] = result.newValue;\n didChange = true;\n }\n }\n }\n return new ApplyUpdateResult(value, didChange);\n}\n/**\n * @internal\n */\nclass ComputedEditorOption {\n constructor(id) {\n this.schema = undefined;\n this.id = id;\n this.name = '_never_';\n this.defaultValue = undefined;\n }\n applyUpdate(value, update) {\n return applyUpdate(value, update);\n }\n validate(input) {\n return this.defaultValue;\n }\n}\nclass SimpleEditorOption {\n constructor(id, name, defaultValue, schema) {\n this.id = id;\n this.name = name;\n this.defaultValue = defaultValue;\n this.schema = schema;\n }\n applyUpdate(value, update) {\n return applyUpdate(value, update);\n }\n validate(input) {\n if (typeof input === 'undefined') {\n return this.defaultValue;\n }\n return input;\n }\n compute(env, options, value) {\n return value;\n }\n}\n/**\n * @internal\n */\nexport function boolean(value, defaultValue) {\n if (typeof value === 'undefined') {\n return defaultValue;\n }\n if (value === 'false') {\n // treat the string 'false' as false\n return false;\n }\n return Boolean(value);\n}\nclass EditorBooleanOption extends SimpleEditorOption {\n constructor(id, name, defaultValue, schema = undefined) {\n if (typeof schema !== 'undefined') {\n schema.type = 'boolean';\n schema.default = defaultValue;\n }\n super(id, name, defaultValue, schema);\n }\n validate(input) {\n return boolean(input, this.defaultValue);\n }\n}\n/**\n * @internal\n */\nexport function clampedInt(value, defaultValue, minimum, maximum) {\n if (typeof value === 'undefined') {\n return defaultValue;\n }\n let r = parseInt(value, 10);\n if (isNaN(r)) {\n return defaultValue;\n }\n r = Math.max(minimum, r);\n r = Math.min(maximum, r);\n return r | 0;\n}\nclass EditorIntOption extends SimpleEditorOption {\n static clampedInt(value, defaultValue, minimum, maximum) {\n return clampedInt(value, defaultValue, minimum, maximum);\n }\n constructor(id, name, defaultValue, minimum, maximum, schema = undefined) {\n if (typeof schema !== 'undefined') {\n schema.type = 'integer';\n schema.default = defaultValue;\n schema.minimum = minimum;\n schema.maximum = maximum;\n }\n super(id, name, defaultValue, schema);\n this.minimum = minimum;\n this.maximum = maximum;\n }\n validate(input) {\n return EditorIntOption.clampedInt(input, this.defaultValue, this.minimum, this.maximum);\n }\n}\n/**\n * @internal\n */\nexport function clampedFloat(value, defaultValue, minimum, maximum) {\n if (typeof value === 'undefined') {\n return defaultValue;\n }\n const r = EditorFloatOption.float(value, defaultValue);\n return EditorFloatOption.clamp(r, minimum, maximum);\n}\nclass EditorFloatOption extends SimpleEditorOption {\n static clamp(n, min, max) {\n if (n < min) {\n return min;\n }\n if (n > max) {\n return max;\n }\n return n;\n }\n static float(value, defaultValue) {\n if (typeof value === 'number') {\n return value;\n }\n if (typeof value === 'undefined') {\n return defaultValue;\n }\n const r = parseFloat(value);\n return (isNaN(r) ? defaultValue : r);\n }\n constructor(id, name, defaultValue, validationFn, schema) {\n if (typeof schema !== 'undefined') {\n schema.type = 'number';\n schema.default = defaultValue;\n }\n super(id, name, defaultValue, schema);\n this.validationFn = validationFn;\n }\n validate(input) {\n return this.validationFn(EditorFloatOption.float(input, this.defaultValue));\n }\n}\nclass EditorStringOption extends SimpleEditorOption {\n static string(value, defaultValue) {\n if (typeof value !== 'string') {\n return defaultValue;\n }\n return value;\n }\n constructor(id, name, defaultValue, schema = undefined) {\n if (typeof schema !== 'undefined') {\n schema.type = 'string';\n schema.default = defaultValue;\n }\n super(id, name, defaultValue, schema);\n }\n validate(input) {\n return EditorStringOption.string(input, this.defaultValue);\n }\n}\n/**\n * @internal\n */\nexport function stringSet(value, defaultValue, allowedValues, renamedValues) {\n if (typeof value !== 'string') {\n return defaultValue;\n }\n if (renamedValues && value in renamedValues) {\n return renamedValues[value];\n }\n if (allowedValues.indexOf(value) === -1) {\n return defaultValue;\n }\n return value;\n}\nclass EditorStringEnumOption extends SimpleEditorOption {\n constructor(id, name, defaultValue, allowedValues, schema = undefined) {\n if (typeof schema !== 'undefined') {\n schema.type = 'string';\n schema.enum = allowedValues;\n schema.default = defaultValue;\n }\n super(id, name, defaultValue, schema);\n this._allowedValues = allowedValues;\n }\n validate(input) {\n return stringSet(input, this.defaultValue, this._allowedValues);\n }\n}\nclass EditorEnumOption extends BaseEditorOption {\n constructor(id, name, defaultValue, defaultStringValue, allowedValues, convert, schema = undefined) {\n if (typeof schema !== 'undefined') {\n schema.type = 'string';\n schema.enum = allowedValues;\n schema.default = defaultStringValue;\n }\n super(id, name, defaultValue, schema);\n this._allowedValues = allowedValues;\n this._convert = convert;\n }\n validate(input) {\n if (typeof input !== 'string') {\n return this.defaultValue;\n }\n if (this._allowedValues.indexOf(input) === -1) {\n return this.defaultValue;\n }\n return this._convert(input);\n }\n}\n//#endregion\n//#region autoIndent\nfunction _autoIndentFromString(autoIndent) {\n switch (autoIndent) {\n case 'none': return 0 /* EditorAutoIndentStrategy.None */;\n case 'keep': return 1 /* EditorAutoIndentStrategy.Keep */;\n case 'brackets': return 2 /* EditorAutoIndentStrategy.Brackets */;\n case 'advanced': return 3 /* EditorAutoIndentStrategy.Advanced */;\n case 'full': return 4 /* EditorAutoIndentStrategy.Full */;\n }\n}\n//#endregion\n//#region accessibilitySupport\nclass EditorAccessibilitySupport extends BaseEditorOption {\n constructor() {\n super(2 /* EditorOption.accessibilitySupport */, 'accessibilitySupport', 0 /* AccessibilitySupport.Unknown */, {\n type: 'string',\n enum: ['auto', 'on', 'off'],\n enumDescriptions: [\n nls.localize('accessibilitySupport.auto', \"Use platform APIs to detect when a Screen Reader is attached.\"),\n nls.localize('accessibilitySupport.on', \"Optimize for usage with a Screen Reader.\"),\n nls.localize('accessibilitySupport.off', \"Assume a screen reader is not attached.\"),\n ],\n default: 'auto',\n tags: ['accessibility'],\n description: nls.localize('accessibilitySupport', \"Controls if the UI should run in a mode where it is optimized for screen readers.\")\n });\n }\n validate(input) {\n switch (input) {\n case 'auto': return 0 /* AccessibilitySupport.Unknown */;\n case 'off': return 1 /* AccessibilitySupport.Disabled */;\n case 'on': return 2 /* AccessibilitySupport.Enabled */;\n }\n return this.defaultValue;\n }\n compute(env, options, value) {\n if (value === 0 /* AccessibilitySupport.Unknown */) {\n // The editor reads the `accessibilitySupport` from the environment\n return env.accessibilitySupport;\n }\n return value;\n }\n}\nclass EditorComments extends BaseEditorOption {\n constructor() {\n const defaults = {\n insertSpace: true,\n ignoreEmptyLines: true,\n };\n super(23 /* EditorOption.comments */, 'comments', defaults, {\n 'editor.comments.insertSpace': {\n type: 'boolean',\n default: defaults.insertSpace,\n description: nls.localize('comments.insertSpace', \"Controls whether a space character is inserted when commenting.\")\n },\n 'editor.comments.ignoreEmptyLines': {\n type: 'boolean',\n default: defaults.ignoreEmptyLines,\n description: nls.localize('comments.ignoreEmptyLines', 'Controls if empty lines should be ignored with toggle, add or remove actions for line comments.')\n },\n });\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n return {\n insertSpace: boolean(input.insertSpace, this.defaultValue.insertSpace),\n ignoreEmptyLines: boolean(input.ignoreEmptyLines, this.defaultValue.ignoreEmptyLines),\n };\n }\n}\nfunction _cursorBlinkingStyleFromString(cursorBlinkingStyle) {\n switch (cursorBlinkingStyle) {\n case 'blink': return 1 /* TextEditorCursorBlinkingStyle.Blink */;\n case 'smooth': return 2 /* TextEditorCursorBlinkingStyle.Smooth */;\n case 'phase': return 3 /* TextEditorCursorBlinkingStyle.Phase */;\n case 'expand': return 4 /* TextEditorCursorBlinkingStyle.Expand */;\n case 'solid': return 5 /* TextEditorCursorBlinkingStyle.Solid */;\n }\n}\n//#endregion\n//#region cursorStyle\n/**\n * The style in which the editor's cursor should be rendered.\n */\nexport var TextEditorCursorStyle;\n(function (TextEditorCursorStyle) {\n /**\n * As a vertical line (sitting between two characters).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"Line\"] = 1] = \"Line\";\n /**\n * As a block (sitting on top of a character).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"Block\"] = 2] = \"Block\";\n /**\n * As a horizontal line (sitting under a character).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"Underline\"] = 3] = \"Underline\";\n /**\n * As a thin vertical line (sitting between two characters).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"LineThin\"] = 4] = \"LineThin\";\n /**\n * As an outlined block (sitting on top of a character).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"BlockOutline\"] = 5] = \"BlockOutline\";\n /**\n * As a thin horizontal line (sitting under a character).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"UnderlineThin\"] = 6] = \"UnderlineThin\";\n})(TextEditorCursorStyle || (TextEditorCursorStyle = {}));\nfunction _cursorStyleFromString(cursorStyle) {\n switch (cursorStyle) {\n case 'line': return TextEditorCursorStyle.Line;\n case 'block': return TextEditorCursorStyle.Block;\n case 'underline': return TextEditorCursorStyle.Underline;\n case 'line-thin': return TextEditorCursorStyle.LineThin;\n case 'block-outline': return TextEditorCursorStyle.BlockOutline;\n case 'underline-thin': return TextEditorCursorStyle.UnderlineThin;\n }\n}\n//#endregion\n//#region editorClassName\nclass EditorClassName extends ComputedEditorOption {\n constructor() {\n super(140 /* EditorOption.editorClassName */);\n }\n compute(env, options, _) {\n const classNames = ['monaco-editor'];\n if (options.get(39 /* EditorOption.extraEditorClassName */)) {\n classNames.push(options.get(39 /* EditorOption.extraEditorClassName */));\n }\n if (env.extraEditorClassName) {\n classNames.push(env.extraEditorClassName);\n }\n if (options.get(73 /* EditorOption.mouseStyle */) === 'default') {\n classNames.push('mouse-default');\n }\n else if (options.get(73 /* EditorOption.mouseStyle */) === 'copy') {\n classNames.push('mouse-copy');\n }\n if (options.get(110 /* EditorOption.showUnused */)) {\n classNames.push('showUnused');\n }\n if (options.get(138 /* EditorOption.showDeprecated */)) {\n classNames.push('showDeprecated');\n }\n return classNames.join(' ');\n }\n}\n//#endregion\n//#region emptySelectionClipboard\nclass EditorEmptySelectionClipboard extends EditorBooleanOption {\n constructor() {\n super(37 /* EditorOption.emptySelectionClipboard */, 'emptySelectionClipboard', true, { description: nls.localize('emptySelectionClipboard', \"Controls whether copying without a selection copies the current line.\") });\n }\n compute(env, options, value) {\n return value && env.emptySelectionClipboard;\n }\n}\nclass EditorFind extends BaseEditorOption {\n constructor() {\n const defaults = {\n cursorMoveOnType: true,\n seedSearchStringFromSelection: 'always',\n autoFindInSelection: 'never',\n globalFindClipboard: false,\n addExtraSpaceOnTop: true,\n loop: true\n };\n super(41 /* EditorOption.find */, 'find', defaults, {\n 'editor.find.cursorMoveOnType': {\n type: 'boolean',\n default: defaults.cursorMoveOnType,\n description: nls.localize('find.cursorMoveOnType', \"Controls whether the cursor should jump to find matches while typing.\")\n },\n 'editor.find.seedSearchStringFromSelection': {\n type: 'string',\n enum: ['never', 'always', 'selection'],\n default: defaults.seedSearchStringFromSelection,\n enumDescriptions: [\n nls.localize('editor.find.seedSearchStringFromSelection.never', 'Never seed search string from the editor selection.'),\n nls.localize('editor.find.seedSearchStringFromSelection.always', 'Always seed search string from the editor selection, including word at cursor position.'),\n nls.localize('editor.find.seedSearchStringFromSelection.selection', 'Only seed search string from the editor selection.')\n ],\n description: nls.localize('find.seedSearchStringFromSelection', \"Controls whether the search string in the Find Widget is seeded from the editor selection.\")\n },\n 'editor.find.autoFindInSelection': {\n type: 'string',\n enum: ['never', 'always', 'multiline'],\n default: defaults.autoFindInSelection,\n enumDescriptions: [\n nls.localize('editor.find.autoFindInSelection.never', 'Never turn on Find in Selection automatically (default).'),\n nls.localize('editor.find.autoFindInSelection.always', 'Always turn on Find in Selection automatically.'),\n nls.localize('editor.find.autoFindInSelection.multiline', 'Turn on Find in Selection automatically when multiple lines of content are selected.')\n ],\n description: nls.localize('find.autoFindInSelection', \"Controls the condition for turning on Find in Selection automatically.\")\n },\n 'editor.find.globalFindClipboard': {\n type: 'boolean',\n default: defaults.globalFindClipboard,\n description: nls.localize('find.globalFindClipboard', \"Controls whether the Find Widget should read or modify the shared find clipboard on macOS.\"),\n included: platform.isMacintosh\n },\n 'editor.find.addExtraSpaceOnTop': {\n type: 'boolean',\n default: defaults.addExtraSpaceOnTop,\n description: nls.localize('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.\")\n },\n 'editor.find.loop': {\n type: 'boolean',\n default: defaults.loop,\n description: nls.localize('find.loop', \"Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.\")\n },\n });\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n return {\n cursorMoveOnType: boolean(input.cursorMoveOnType, this.defaultValue.cursorMoveOnType),\n seedSearchStringFromSelection: typeof _input.seedSearchStringFromSelection === 'boolean'\n ? (_input.seedSearchStringFromSelection ? 'always' : 'never')\n : stringSet(input.seedSearchStringFromSelection, this.defaultValue.seedSearchStringFromSelection, ['never', 'always', 'selection']),\n autoFindInSelection: typeof _input.autoFindInSelection === 'boolean'\n ? (_input.autoFindInSelection ? 'always' : 'never')\n : stringSet(input.autoFindInSelection, this.defaultValue.autoFindInSelection, ['never', 'always', 'multiline']),\n globalFindClipboard: boolean(input.globalFindClipboard, this.defaultValue.globalFindClipboard),\n addExtraSpaceOnTop: boolean(input.addExtraSpaceOnTop, this.defaultValue.addExtraSpaceOnTop),\n loop: boolean(input.loop, this.defaultValue.loop),\n };\n }\n}\n//#endregion\n//#region fontLigatures\n/**\n * @internal\n */\nexport class EditorFontLigatures extends BaseEditorOption {\n constructor() {\n super(51 /* EditorOption.fontLigatures */, 'fontLigatures', EditorFontLigatures.OFF, {\n anyOf: [\n {\n type: 'boolean',\n description: nls.localize('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.\"),\n },\n {\n type: 'string',\n description: nls.localize('fontFeatureSettings', \"Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.\")\n }\n ],\n description: nls.localize('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.\"),\n default: false\n });\n }\n validate(input) {\n if (typeof input === 'undefined') {\n return this.defaultValue;\n }\n if (typeof input === 'string') {\n if (input === 'false' || input.length === 0) {\n return EditorFontLigatures.OFF;\n }\n if (input === 'true') {\n return EditorFontLigatures.ON;\n }\n return input;\n }\n if (Boolean(input)) {\n return EditorFontLigatures.ON;\n }\n return EditorFontLigatures.OFF;\n }\n}\nEditorFontLigatures.OFF = '\"liga\" off, \"calt\" off';\nEditorFontLigatures.ON = '\"liga\" on, \"calt\" on';\n//#endregion\n//#region fontVariations\n/**\n * @internal\n */\nexport class EditorFontVariations extends BaseEditorOption {\n constructor() {\n super(54 /* EditorOption.fontVariations */, 'fontVariations', EditorFontVariations.OFF, {\n anyOf: [\n {\n type: 'boolean',\n description: nls.localize('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.\"),\n },\n {\n type: 'string',\n description: nls.localize('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.\")\n }\n ],\n description: nls.localize('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.\"),\n default: false\n });\n }\n validate(input) {\n if (typeof input === 'undefined') {\n return this.defaultValue;\n }\n if (typeof input === 'string') {\n if (input === 'false') {\n return EditorFontVariations.OFF;\n }\n if (input === 'true') {\n return EditorFontVariations.TRANSLATE;\n }\n return input;\n }\n if (Boolean(input)) {\n return EditorFontVariations.TRANSLATE;\n }\n return EditorFontVariations.OFF;\n }\n compute(env, options, value) {\n // The value is computed from the fontWeight if it is true.\n // So take the result from env.fontInfo\n return env.fontInfo.fontVariationSettings;\n }\n}\n// Text is laid out using default settings.\nEditorFontVariations.OFF = 'normal';\n// Translate `fontWeight` config to the `font-variation-settings` CSS property.\nEditorFontVariations.TRANSLATE = 'translate';\n//#endregion\n//#region fontInfo\nclass EditorFontInfo extends ComputedEditorOption {\n constructor() {\n super(50 /* EditorOption.fontInfo */);\n }\n compute(env, options, _) {\n return env.fontInfo;\n }\n}\n//#endregion\n//#region fontSize\nclass EditorFontSize extends SimpleEditorOption {\n constructor() {\n super(52 /* EditorOption.fontSize */, 'fontSize', EDITOR_FONT_DEFAULTS.fontSize, {\n type: 'number',\n minimum: 6,\n maximum: 100,\n default: EDITOR_FONT_DEFAULTS.fontSize,\n description: nls.localize('fontSize', \"Controls the font size in pixels.\")\n });\n }\n validate(input) {\n const r = EditorFloatOption.float(input, this.defaultValue);\n if (r === 0) {\n return EDITOR_FONT_DEFAULTS.fontSize;\n }\n return EditorFloatOption.clamp(r, 6, 100);\n }\n compute(env, options, value) {\n // The final fontSize respects the editor zoom level.\n // So take the result from env.fontInfo\n return env.fontInfo.fontSize;\n }\n}\n//#endregion\n//#region fontWeight\nclass EditorFontWeight extends BaseEditorOption {\n constructor() {\n super(53 /* EditorOption.fontWeight */, 'fontWeight', EDITOR_FONT_DEFAULTS.fontWeight, {\n anyOf: [\n {\n type: 'number',\n minimum: EditorFontWeight.MINIMUM_VALUE,\n maximum: EditorFontWeight.MAXIMUM_VALUE,\n errorMessage: nls.localize('fontWeightErrorMessage', \"Only \\\"normal\\\" and \\\"bold\\\" keywords or numbers between 1 and 1000 are allowed.\")\n },\n {\n type: 'string',\n pattern: '^(normal|bold|1000|[1-9][0-9]{0,2})$'\n },\n {\n enum: EditorFontWeight.SUGGESTION_VALUES\n }\n ],\n default: EDITOR_FONT_DEFAULTS.fontWeight,\n description: nls.localize('fontWeight', \"Controls the font weight. Accepts \\\"normal\\\" and \\\"bold\\\" keywords or numbers between 1 and 1000.\")\n });\n }\n validate(input) {\n if (input === 'normal' || input === 'bold') {\n return input;\n }\n return String(EditorIntOption.clampedInt(input, EDITOR_FONT_DEFAULTS.fontWeight, EditorFontWeight.MINIMUM_VALUE, EditorFontWeight.MAXIMUM_VALUE));\n }\n}\nEditorFontWeight.SUGGESTION_VALUES = ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'];\nEditorFontWeight.MINIMUM_VALUE = 1;\nEditorFontWeight.MAXIMUM_VALUE = 1000;\nclass EditorGoToLocation extends BaseEditorOption {\n constructor() {\n const defaults = {\n multiple: 'peek',\n multipleDefinitions: 'peek',\n multipleTypeDefinitions: 'peek',\n multipleDeclarations: 'peek',\n multipleImplementations: 'peek',\n multipleReferences: 'peek',\n alternativeDefinitionCommand: 'editor.action.goToReferences',\n alternativeTypeDefinitionCommand: 'editor.action.goToReferences',\n alternativeDeclarationCommand: 'editor.action.goToReferences',\n alternativeImplementationCommand: '',\n alternativeReferenceCommand: '',\n };\n const jsonSubset = {\n type: 'string',\n enum: ['peek', 'gotoAndPeek', 'goto'],\n default: defaults.multiple,\n enumDescriptions: [\n nls.localize('editor.gotoLocation.multiple.peek', 'Show Peek view of the results (default)'),\n nls.localize('editor.gotoLocation.multiple.gotoAndPeek', 'Go to the primary result and show a Peek view'),\n nls.localize('editor.gotoLocation.multiple.goto', 'Go to the primary result and enable Peek-less navigation to others')\n ]\n };\n const alternativeCommandOptions = ['', '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'];\n super(58 /* EditorOption.gotoLocation */, 'gotoLocation', defaults, {\n 'editor.gotoLocation.multiple': {\n deprecationMessage: nls.localize('editor.gotoLocation.multiple.deprecated', \"This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.\"),\n },\n 'editor.gotoLocation.multipleDefinitions': {\n description: nls.localize('editor.editor.gotoLocation.multipleDefinitions', \"Controls the behavior the 'Go to Definition'-command when multiple target locations exist.\"),\n ...jsonSubset,\n },\n 'editor.gotoLocation.multipleTypeDefinitions': {\n description: nls.localize('editor.editor.gotoLocation.multipleTypeDefinitions', \"Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.\"),\n ...jsonSubset,\n },\n 'editor.gotoLocation.multipleDeclarations': {\n description: nls.localize('editor.editor.gotoLocation.multipleDeclarations', \"Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.\"),\n ...jsonSubset,\n },\n 'editor.gotoLocation.multipleImplementations': {\n description: nls.localize('editor.editor.gotoLocation.multipleImplemenattions', \"Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.\"),\n ...jsonSubset,\n },\n 'editor.gotoLocation.multipleReferences': {\n description: nls.localize('editor.editor.gotoLocation.multipleReferences', \"Controls the behavior the 'Go to References'-command when multiple target locations exist.\"),\n ...jsonSubset,\n },\n 'editor.gotoLocation.alternativeDefinitionCommand': {\n type: 'string',\n default: defaults.alternativeDefinitionCommand,\n enum: alternativeCommandOptions,\n description: nls.localize('alternativeDefinitionCommand', \"Alternative command id that is being executed when the result of 'Go to Definition' is the current location.\")\n },\n 'editor.gotoLocation.alternativeTypeDefinitionCommand': {\n type: 'string',\n default: defaults.alternativeTypeDefinitionCommand,\n enum: alternativeCommandOptions,\n description: nls.localize('alternativeTypeDefinitionCommand', \"Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.\")\n },\n 'editor.gotoLocation.alternativeDeclarationCommand': {\n type: 'string',\n default: defaults.alternativeDeclarationCommand,\n enum: alternativeCommandOptions,\n description: nls.localize('alternativeDeclarationCommand', \"Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.\")\n },\n 'editor.gotoLocation.alternativeImplementationCommand': {\n type: 'string',\n default: defaults.alternativeImplementationCommand,\n enum: alternativeCommandOptions,\n description: nls.localize('alternativeImplementationCommand', \"Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.\")\n },\n 'editor.gotoLocation.alternativeReferenceCommand': {\n type: 'string',\n default: defaults.alternativeReferenceCommand,\n enum: alternativeCommandOptions,\n description: nls.localize('alternativeReferenceCommand', \"Alternative command id that is being executed when the result of 'Go to Reference' is the current location.\")\n },\n });\n }\n validate(_input) {\n var _a, _b, _c, _d, _e;\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n return {\n multiple: stringSet(input.multiple, this.defaultValue.multiple, ['peek', 'gotoAndPeek', 'goto']),\n multipleDefinitions: (_a = input.multipleDefinitions) !== null && _a !== void 0 ? _a : stringSet(input.multipleDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']),\n multipleTypeDefinitions: (_b = input.multipleTypeDefinitions) !== null && _b !== void 0 ? _b : stringSet(input.multipleTypeDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']),\n multipleDeclarations: (_c = input.multipleDeclarations) !== null && _c !== void 0 ? _c : stringSet(input.multipleDeclarations, 'peek', ['peek', 'gotoAndPeek', 'goto']),\n multipleImplementations: (_d = input.multipleImplementations) !== null && _d !== void 0 ? _d : stringSet(input.multipleImplementations, 'peek', ['peek', 'gotoAndPeek', 'goto']),\n multipleReferences: (_e = input.multipleReferences) !== null && _e !== void 0 ? _e : stringSet(input.multipleReferences, 'peek', ['peek', 'gotoAndPeek', 'goto']),\n alternativeDefinitionCommand: EditorStringOption.string(input.alternativeDefinitionCommand, this.defaultValue.alternativeDefinitionCommand),\n alternativeTypeDefinitionCommand: EditorStringOption.string(input.alternativeTypeDefinitionCommand, this.defaultValue.alternativeTypeDefinitionCommand),\n alternativeDeclarationCommand: EditorStringOption.string(input.alternativeDeclarationCommand, this.defaultValue.alternativeDeclarationCommand),\n alternativeImplementationCommand: EditorStringOption.string(input.alternativeImplementationCommand, this.defaultValue.alternativeImplementationCommand),\n alternativeReferenceCommand: EditorStringOption.string(input.alternativeReferenceCommand, this.defaultValue.alternativeReferenceCommand),\n };\n }\n}\nclass EditorHover extends BaseEditorOption {\n constructor() {\n const defaults = {\n enabled: true,\n delay: 300,\n hidingDelay: 300,\n sticky: true,\n above: true,\n };\n super(60 /* EditorOption.hover */, 'hover', defaults, {\n 'editor.hover.enabled': {\n type: 'boolean',\n default: defaults.enabled,\n description: nls.localize('hover.enabled', \"Controls whether the hover is shown.\")\n },\n 'editor.hover.delay': {\n type: 'number',\n default: defaults.delay,\n minimum: 0,\n maximum: 10000,\n description: nls.localize('hover.delay', \"Controls the delay in milliseconds after which the hover is shown.\")\n },\n 'editor.hover.sticky': {\n type: 'boolean',\n default: defaults.sticky,\n description: nls.localize('hover.sticky', \"Controls whether the hover should remain visible when mouse is moved over it.\")\n },\n 'editor.hover.hidingDelay': {\n type: 'integer',\n minimum: 0,\n default: defaults.hidingDelay,\n description: nls.localize('hover.hidingDelay', \"Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.\")\n },\n 'editor.hover.above': {\n type: 'boolean',\n default: defaults.above,\n description: nls.localize('hover.above', \"Prefer showing hovers above the line, if there's space.\")\n },\n });\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n return {\n enabled: boolean(input.enabled, this.defaultValue.enabled),\n delay: EditorIntOption.clampedInt(input.delay, this.defaultValue.delay, 0, 10000),\n sticky: boolean(input.sticky, this.defaultValue.sticky),\n hidingDelay: EditorIntOption.clampedInt(input.hidingDelay, this.defaultValue.hidingDelay, 0, 600000),\n above: boolean(input.above, this.defaultValue.above),\n };\n }\n}\n/**\n * @internal\n */\nexport class EditorLayoutInfoComputer extends ComputedEditorOption {\n constructor() {\n super(143 /* EditorOption.layoutInfo */);\n }\n compute(env, options, _) {\n return EditorLayoutInfoComputer.computeLayout(options, {\n memory: env.memory,\n outerWidth: env.outerWidth,\n outerHeight: env.outerHeight,\n isDominatedByLongLines: env.isDominatedByLongLines,\n lineHeight: env.fontInfo.lineHeight,\n viewLineCount: env.viewLineCount,\n lineNumbersDigitCount: env.lineNumbersDigitCount,\n typicalHalfwidthCharacterWidth: env.fontInfo.typicalHalfwidthCharacterWidth,\n maxDigitWidth: env.fontInfo.maxDigitWidth,\n pixelRatio: env.pixelRatio,\n glyphMarginDecorationLaneCount: env.glyphMarginDecorationLaneCount\n });\n }\n static computeContainedMinimapLineCount(input) {\n const typicalViewportLineCount = input.height / input.lineHeight;\n const extraLinesBeforeFirstLine = Math.floor(input.paddingTop / input.lineHeight);\n let extraLinesBeyondLastLine = Math.floor(input.paddingBottom / input.lineHeight);\n if (input.scrollBeyondLastLine) {\n extraLinesBeyondLastLine = Math.max(extraLinesBeyondLastLine, typicalViewportLineCount - 1);\n }\n const desiredRatio = (extraLinesBeforeFirstLine + input.viewLineCount + extraLinesBeyondLastLine) / (input.pixelRatio * input.height);\n const minimapLineCount = Math.floor(input.viewLineCount / desiredRatio);\n return { typicalViewportLineCount, extraLinesBeforeFirstLine, extraLinesBeyondLastLine, desiredRatio, minimapLineCount };\n }\n static _computeMinimapLayout(input, memory) {\n const outerWidth = input.outerWidth;\n const outerHeight = input.outerHeight;\n const pixelRatio = input.pixelRatio;\n if (!input.minimap.enabled) {\n return {\n renderMinimap: 0 /* RenderMinimap.None */,\n minimapLeft: 0,\n minimapWidth: 0,\n minimapHeightIsEditorHeight: false,\n minimapIsSampling: false,\n minimapScale: 1,\n minimapLineHeight: 1,\n minimapCanvasInnerWidth: 0,\n minimapCanvasInnerHeight: Math.floor(pixelRatio * outerHeight),\n minimapCanvasOuterWidth: 0,\n minimapCanvasOuterHeight: outerHeight,\n };\n }\n // Can use memory if only the `viewLineCount` and `remainingWidth` have changed\n const stableMinimapLayoutInput = memory.stableMinimapLayoutInput;\n const couldUseMemory = (stableMinimapLayoutInput\n // && input.outerWidth === lastMinimapLayoutInput.outerWidth !!! INTENTIONAL OMITTED\n && input.outerHeight === stableMinimapLayoutInput.outerHeight\n && input.lineHeight === stableMinimapLayoutInput.lineHeight\n && input.typicalHalfwidthCharacterWidth === stableMinimapLayoutInput.typicalHalfwidthCharacterWidth\n && input.pixelRatio === stableMinimapLayoutInput.pixelRatio\n && input.scrollBeyondLastLine === stableMinimapLayoutInput.scrollBeyondLastLine\n && input.paddingTop === stableMinimapLayoutInput.paddingTop\n && input.paddingBottom === stableMinimapLayoutInput.paddingBottom\n && input.minimap.enabled === stableMinimapLayoutInput.minimap.enabled\n && input.minimap.side === stableMinimapLayoutInput.minimap.side\n && input.minimap.size === stableMinimapLayoutInput.minimap.size\n && input.minimap.showSlider === stableMinimapLayoutInput.minimap.showSlider\n && input.minimap.renderCharacters === stableMinimapLayoutInput.minimap.renderCharacters\n && input.minimap.maxColumn === stableMinimapLayoutInput.minimap.maxColumn\n && input.minimap.scale === stableMinimapLayoutInput.minimap.scale\n && input.verticalScrollbarWidth === stableMinimapLayoutInput.verticalScrollbarWidth\n // && input.viewLineCount === lastMinimapLayoutInput.viewLineCount !!! INTENTIONAL OMITTED\n // && input.remainingWidth === lastMinimapLayoutInput.remainingWidth !!! INTENTIONAL OMITTED\n && input.isViewportWrapping === stableMinimapLayoutInput.isViewportWrapping);\n const lineHeight = input.lineHeight;\n const typicalHalfwidthCharacterWidth = input.typicalHalfwidthCharacterWidth;\n const scrollBeyondLastLine = input.scrollBeyondLastLine;\n const minimapRenderCharacters = input.minimap.renderCharacters;\n let minimapScale = (pixelRatio >= 2 ? Math.round(input.minimap.scale * 2) : input.minimap.scale);\n const minimapMaxColumn = input.minimap.maxColumn;\n const minimapSize = input.minimap.size;\n const minimapSide = input.minimap.side;\n const verticalScrollbarWidth = input.verticalScrollbarWidth;\n const viewLineCount = input.viewLineCount;\n const remainingWidth = input.remainingWidth;\n const isViewportWrapping = input.isViewportWrapping;\n const baseCharHeight = minimapRenderCharacters ? 2 : 3;\n let minimapCanvasInnerHeight = Math.floor(pixelRatio * outerHeight);\n const minimapCanvasOuterHeight = minimapCanvasInnerHeight / pixelRatio;\n let minimapHeightIsEditorHeight = false;\n let minimapIsSampling = false;\n let minimapLineHeight = baseCharHeight * minimapScale;\n let minimapCharWidth = minimapScale / pixelRatio;\n let minimapWidthMultiplier = 1;\n if (minimapSize === 'fill' || minimapSize === 'fit') {\n const { typicalViewportLineCount, extraLinesBeforeFirstLine, extraLinesBeyondLastLine, desiredRatio, minimapLineCount } = EditorLayoutInfoComputer.computeContainedMinimapLineCount({\n viewLineCount: viewLineCount,\n scrollBeyondLastLine: scrollBeyondLastLine,\n paddingTop: input.paddingTop,\n paddingBottom: input.paddingBottom,\n height: outerHeight,\n lineHeight: lineHeight,\n pixelRatio: pixelRatio\n });\n // ratio is intentionally not part of the layout to avoid the layout changing all the time\n // when doing sampling\n const ratio = viewLineCount / minimapLineCount;\n if (ratio > 1) {\n minimapHeightIsEditorHeight = true;\n minimapIsSampling = true;\n minimapScale = 1;\n minimapLineHeight = 1;\n minimapCharWidth = minimapScale / pixelRatio;\n }\n else {\n let fitBecomesFill = false;\n let maxMinimapScale = minimapScale + 1;\n if (minimapSize === 'fit') {\n const effectiveMinimapHeight = Math.ceil((extraLinesBeforeFirstLine + viewLineCount + extraLinesBeyondLastLine) * minimapLineHeight);\n if (isViewportWrapping && couldUseMemory && remainingWidth <= memory.stableFitRemainingWidth) {\n // There is a loop when using `fit` and viewport wrapping:\n // - view line count impacts minimap layout\n // - minimap layout impacts viewport width\n // - viewport width impacts view line count\n // To break the loop, once we go to a smaller minimap scale, we try to stick with it.\n fitBecomesFill = true;\n maxMinimapScale = memory.stableFitMaxMinimapScale;\n }\n else {\n fitBecomesFill = (effectiveMinimapHeight > minimapCanvasInnerHeight);\n }\n }\n if (minimapSize === 'fill' || fitBecomesFill) {\n minimapHeightIsEditorHeight = true;\n const configuredMinimapScale = minimapScale;\n minimapLineHeight = Math.min(lineHeight * pixelRatio, Math.max(1, Math.floor(1 / desiredRatio)));\n if (isViewportWrapping && couldUseMemory && remainingWidth <= memory.stableFitRemainingWidth) {\n // There is a loop when using `fill` and viewport wrapping:\n // - view line count impacts minimap layout\n // - minimap layout impacts viewport width\n // - viewport width impacts view line count\n // To break the loop, once we go to a smaller minimap scale, we try to stick with it.\n maxMinimapScale = memory.stableFitMaxMinimapScale;\n }\n minimapScale = Math.min(maxMinimapScale, Math.max(1, Math.floor(minimapLineHeight / baseCharHeight)));\n if (minimapScale > configuredMinimapScale) {\n minimapWidthMultiplier = Math.min(2, minimapScale / configuredMinimapScale);\n }\n minimapCharWidth = minimapScale / pixelRatio / minimapWidthMultiplier;\n minimapCanvasInnerHeight = Math.ceil((Math.max(typicalViewportLineCount, extraLinesBeforeFirstLine + viewLineCount + extraLinesBeyondLastLine)) * minimapLineHeight);\n if (isViewportWrapping) {\n // remember for next time\n memory.stableMinimapLayoutInput = input;\n memory.stableFitRemainingWidth = remainingWidth;\n memory.stableFitMaxMinimapScale = minimapScale;\n }\n else {\n memory.stableMinimapLayoutInput = null;\n memory.stableFitRemainingWidth = 0;\n }\n }\n }\n }\n // Given:\n // (leaving 2px for the cursor to have space after the last character)\n // viewportColumn = (contentWidth - verticalScrollbarWidth - 2) / typicalHalfwidthCharacterWidth\n // minimapWidth = viewportColumn * minimapCharWidth\n // contentWidth = remainingWidth - minimapWidth\n // What are good values for contentWidth and minimapWidth ?\n // minimapWidth = ((contentWidth - verticalScrollbarWidth - 2) / typicalHalfwidthCharacterWidth) * minimapCharWidth\n // typicalHalfwidthCharacterWidth * minimapWidth = (contentWidth - verticalScrollbarWidth - 2) * minimapCharWidth\n // typicalHalfwidthCharacterWidth * minimapWidth = (remainingWidth - minimapWidth - verticalScrollbarWidth - 2) * minimapCharWidth\n // (typicalHalfwidthCharacterWidth + minimapCharWidth) * minimapWidth = (remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth\n // minimapWidth = ((remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth)\n const minimapMaxWidth = Math.floor(minimapMaxColumn * minimapCharWidth);\n const minimapWidth = Math.min(minimapMaxWidth, Math.max(0, Math.floor(((remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth))) + MINIMAP_GUTTER_WIDTH);\n let minimapCanvasInnerWidth = Math.floor(pixelRatio * minimapWidth);\n const minimapCanvasOuterWidth = minimapCanvasInnerWidth / pixelRatio;\n minimapCanvasInnerWidth = Math.floor(minimapCanvasInnerWidth * minimapWidthMultiplier);\n const renderMinimap = (minimapRenderCharacters ? 1 /* RenderMinimap.Text */ : 2 /* RenderMinimap.Blocks */);\n const minimapLeft = (minimapSide === 'left' ? 0 : (outerWidth - minimapWidth - verticalScrollbarWidth));\n return {\n renderMinimap,\n minimapLeft,\n minimapWidth,\n minimapHeightIsEditorHeight,\n minimapIsSampling,\n minimapScale,\n minimapLineHeight,\n minimapCanvasInnerWidth,\n minimapCanvasInnerHeight,\n minimapCanvasOuterWidth,\n minimapCanvasOuterHeight,\n };\n }\n static computeLayout(options, env) {\n const outerWidth = env.outerWidth | 0;\n const outerHeight = env.outerHeight | 0;\n const lineHeight = env.lineHeight | 0;\n const lineNumbersDigitCount = env.lineNumbersDigitCount | 0;\n const typicalHalfwidthCharacterWidth = env.typicalHalfwidthCharacterWidth;\n const maxDigitWidth = env.maxDigitWidth;\n const pixelRatio = env.pixelRatio;\n const viewLineCount = env.viewLineCount;\n const wordWrapOverride2 = options.get(135 /* EditorOption.wordWrapOverride2 */);\n const wordWrapOverride1 = (wordWrapOverride2 === 'inherit' ? options.get(134 /* EditorOption.wordWrapOverride1 */) : wordWrapOverride2);\n const wordWrap = (wordWrapOverride1 === 'inherit' ? options.get(130 /* EditorOption.wordWrap */) : wordWrapOverride1);\n const wordWrapColumn = options.get(133 /* EditorOption.wordWrapColumn */);\n const isDominatedByLongLines = env.isDominatedByLongLines;\n const showGlyphMargin = options.get(57 /* EditorOption.glyphMargin */);\n const showLineNumbers = (options.get(67 /* EditorOption.lineNumbers */).renderType !== 0 /* RenderLineNumbersType.Off */);\n const lineNumbersMinChars = options.get(68 /* EditorOption.lineNumbersMinChars */);\n const scrollBeyondLastLine = options.get(104 /* EditorOption.scrollBeyondLastLine */);\n const padding = options.get(83 /* EditorOption.padding */);\n const minimap = options.get(72 /* EditorOption.minimap */);\n const scrollbar = options.get(102 /* EditorOption.scrollbar */);\n const verticalScrollbarWidth = scrollbar.verticalScrollbarSize;\n const verticalScrollbarHasArrows = scrollbar.verticalHasArrows;\n const scrollbarArrowSize = scrollbar.arrowSize;\n const horizontalScrollbarHeight = scrollbar.horizontalScrollbarSize;\n const folding = options.get(43 /* EditorOption.folding */);\n const showFoldingDecoration = options.get(109 /* EditorOption.showFoldingControls */) !== 'never';\n let lineDecorationsWidth = options.get(65 /* EditorOption.lineDecorationsWidth */);\n if (folding && showFoldingDecoration) {\n lineDecorationsWidth += 16;\n }\n let lineNumbersWidth = 0;\n if (showLineNumbers) {\n const digitCount = Math.max(lineNumbersDigitCount, lineNumbersMinChars);\n lineNumbersWidth = Math.round(digitCount * maxDigitWidth);\n }\n let glyphMarginWidth = 0;\n if (showGlyphMargin) {\n glyphMarginWidth = lineHeight * env.glyphMarginDecorationLaneCount;\n }\n let glyphMarginLeft = 0;\n let lineNumbersLeft = glyphMarginLeft + glyphMarginWidth;\n let decorationsLeft = lineNumbersLeft + lineNumbersWidth;\n let contentLeft = decorationsLeft + lineDecorationsWidth;\n const remainingWidth = outerWidth - glyphMarginWidth - lineNumbersWidth - lineDecorationsWidth;\n let isWordWrapMinified = false;\n let isViewportWrapping = false;\n let wrappingColumn = -1;\n if (wordWrapOverride1 === 'inherit' && isDominatedByLongLines) {\n // Force viewport width wrapping if model is dominated by long lines\n isWordWrapMinified = true;\n isViewportWrapping = true;\n }\n else if (wordWrap === 'on' || wordWrap === 'bounded') {\n isViewportWrapping = true;\n }\n else if (wordWrap === 'wordWrapColumn') {\n wrappingColumn = wordWrapColumn;\n }\n const minimapLayout = EditorLayoutInfoComputer._computeMinimapLayout({\n outerWidth: outerWidth,\n outerHeight: outerHeight,\n lineHeight: lineHeight,\n typicalHalfwidthCharacterWidth: typicalHalfwidthCharacterWidth,\n pixelRatio: pixelRatio,\n scrollBeyondLastLine: scrollBeyondLastLine,\n paddingTop: padding.top,\n paddingBottom: padding.bottom,\n minimap: minimap,\n verticalScrollbarWidth: verticalScrollbarWidth,\n viewLineCount: viewLineCount,\n remainingWidth: remainingWidth,\n isViewportWrapping: isViewportWrapping,\n }, env.memory || new ComputeOptionsMemory());\n if (minimapLayout.renderMinimap !== 0 /* RenderMinimap.None */ && minimapLayout.minimapLeft === 0) {\n // the minimap is rendered to the left, so move everything to the right\n glyphMarginLeft += minimapLayout.minimapWidth;\n lineNumbersLeft += minimapLayout.minimapWidth;\n decorationsLeft += minimapLayout.minimapWidth;\n contentLeft += minimapLayout.minimapWidth;\n }\n const contentWidth = remainingWidth - minimapLayout.minimapWidth;\n // (leaving 2px for the cursor to have space after the last character)\n const viewportColumn = Math.max(1, Math.floor((contentWidth - verticalScrollbarWidth - 2) / typicalHalfwidthCharacterWidth));\n const verticalArrowSize = (verticalScrollbarHasArrows ? scrollbarArrowSize : 0);\n if (isViewportWrapping) {\n // compute the actual wrappingColumn\n wrappingColumn = Math.max(1, viewportColumn);\n if (wordWrap === 'bounded') {\n wrappingColumn = Math.min(wrappingColumn, wordWrapColumn);\n }\n }\n return {\n width: outerWidth,\n height: outerHeight,\n glyphMarginLeft: glyphMarginLeft,\n glyphMarginWidth: glyphMarginWidth,\n glyphMarginDecorationLaneCount: env.glyphMarginDecorationLaneCount,\n lineNumbersLeft: lineNumbersLeft,\n lineNumbersWidth: lineNumbersWidth,\n decorationsLeft: decorationsLeft,\n decorationsWidth: lineDecorationsWidth,\n contentLeft: contentLeft,\n contentWidth: contentWidth,\n minimap: minimapLayout,\n viewportColumn: viewportColumn,\n isWordWrapMinified: isWordWrapMinified,\n isViewportWrapping: isViewportWrapping,\n wrappingColumn: wrappingColumn,\n verticalScrollbarWidth: verticalScrollbarWidth,\n horizontalScrollbarHeight: horizontalScrollbarHeight,\n overviewRuler: {\n top: verticalArrowSize,\n width: verticalScrollbarWidth,\n height: (outerHeight - 2 * verticalArrowSize),\n right: 0\n }\n };\n }\n}\n//#endregion\n//#region WrappingStrategy\nclass WrappingStrategy extends BaseEditorOption {\n constructor() {\n super(137 /* EditorOption.wrappingStrategy */, 'wrappingStrategy', 'simple', {\n 'editor.wrappingStrategy': {\n enumDescriptions: [\n nls.localize('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.\"),\n nls.localize('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.\")\n ],\n type: 'string',\n enum: ['simple', 'advanced'],\n default: 'simple',\n description: nls.localize('wrappingStrategy', \"Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.\")\n }\n });\n }\n validate(input) {\n return stringSet(input, 'simple', ['simple', 'advanced']);\n }\n compute(env, options, value) {\n const accessibilitySupport = options.get(2 /* EditorOption.accessibilitySupport */);\n if (accessibilitySupport === 2 /* AccessibilitySupport.Enabled */) {\n // if we know for a fact that a screen reader is attached, we switch our strategy to advanced to\n // help that the editor's wrapping points match the textarea's wrapping points\n return 'advanced';\n }\n return value;\n }\n}\n//#endregion\n//#region lightbulb\nexport var ShowLightbulbIconMode;\n(function (ShowLightbulbIconMode) {\n ShowLightbulbIconMode[\"Off\"] = \"off\";\n ShowLightbulbIconMode[\"OnCode\"] = \"onCode\";\n ShowLightbulbIconMode[\"On\"] = \"on\";\n})(ShowLightbulbIconMode || (ShowLightbulbIconMode = {}));\nclass EditorLightbulb extends BaseEditorOption {\n constructor() {\n const defaults = { enabled: ShowLightbulbIconMode.OnCode };\n super(64 /* EditorOption.lightbulb */, 'lightbulb', defaults, {\n 'editor.lightbulb.enabled': {\n type: 'string',\n tags: ['experimental'],\n enum: [ShowLightbulbIconMode.Off, ShowLightbulbIconMode.OnCode, ShowLightbulbIconMode.On],\n default: defaults.enabled,\n enumDescriptions: [\n nls.localize('editor.lightbulb.enabled.off', 'Disable the code action menu.'),\n nls.localize('editor.lightbulb.enabled.onCode', 'Show the code action menu when the cursor is on lines with code.'),\n nls.localize('editor.lightbulb.enabled.on', 'Show the code action menu when the cursor is on lines with code or on empty lines.'),\n ],\n description: nls.localize('enabled', \"Enables the Code Action lightbulb in the editor.\")\n }\n });\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n return {\n enabled: stringSet(input.enabled, this.defaultValue.enabled, [ShowLightbulbIconMode.Off, ShowLightbulbIconMode.OnCode, ShowLightbulbIconMode.On])\n };\n }\n}\nclass EditorStickyScroll extends BaseEditorOption {\n constructor() {\n const defaults = { enabled: false, maxLineCount: 5, defaultModel: 'outlineModel', scrollWithEditor: true };\n super(114 /* EditorOption.stickyScroll */, 'stickyScroll', defaults, {\n 'editor.stickyScroll.enabled': {\n type: 'boolean',\n default: defaults.enabled,\n description: nls.localize('editor.stickyScroll.enabled', \"Shows the nested current scopes during the scroll at the top of the editor.\"),\n tags: ['experimental']\n },\n 'editor.stickyScroll.maxLineCount': {\n type: 'number',\n default: defaults.maxLineCount,\n minimum: 1,\n maximum: 10,\n description: nls.localize('editor.stickyScroll.maxLineCount', \"Defines the maximum number of sticky lines to show.\")\n },\n 'editor.stickyScroll.defaultModel': {\n type: 'string',\n enum: ['outlineModel', 'foldingProviderModel', 'indentationModel'],\n default: defaults.defaultModel,\n description: nls.localize('editor.stickyScroll.defaultModel', \"Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.\")\n },\n 'editor.stickyScroll.scrollWithEditor': {\n type: 'boolean',\n default: defaults.scrollWithEditor,\n description: nls.localize('editor.stickyScroll.scrollWithEditor', \"Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.\")\n },\n });\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n return {\n enabled: boolean(input.enabled, this.defaultValue.enabled),\n maxLineCount: EditorIntOption.clampedInt(input.maxLineCount, this.defaultValue.maxLineCount, 1, 10),\n defaultModel: stringSet(input.defaultModel, this.defaultValue.defaultModel, ['outlineModel', 'foldingProviderModel', 'indentationModel']),\n scrollWithEditor: boolean(input.scrollWithEditor, this.defaultValue.scrollWithEditor)\n };\n }\n}\nclass EditorInlayHints extends BaseEditorOption {\n constructor() {\n const defaults = { enabled: 'on', fontSize: 0, fontFamily: '', padding: false };\n super(139 /* EditorOption.inlayHints */, 'inlayHints', defaults, {\n 'editor.inlayHints.enabled': {\n type: 'string',\n default: defaults.enabled,\n description: nls.localize('inlayHints.enable', \"Enables the inlay hints in the editor.\"),\n enum: ['on', 'onUnlessPressed', 'offUnlessPressed', 'off'],\n markdownEnumDescriptions: [\n nls.localize('editor.inlayHints.on', \"Inlay hints are enabled\"),\n nls.localize('editor.inlayHints.onUnlessPressed', \"Inlay hints are showing by default and hide when holding {0}\", platform.isMacintosh ? `Ctrl+Option` : `Ctrl+Alt`),\n nls.localize('editor.inlayHints.offUnlessPressed', \"Inlay hints are hidden by default and show when holding {0}\", platform.isMacintosh ? `Ctrl+Option` : `Ctrl+Alt`),\n nls.localize('editor.inlayHints.off', \"Inlay hints are disabled\"),\n ],\n },\n 'editor.inlayHints.fontSize': {\n type: 'number',\n default: defaults.fontSize,\n markdownDescription: nls.localize('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`')\n },\n 'editor.inlayHints.fontFamily': {\n type: 'string',\n default: defaults.fontFamily,\n markdownDescription: nls.localize('inlayHints.fontFamily', \"Controls font family of inlay hints in the editor. When set to empty, the {0} is used.\", '`#editor.fontFamily#`')\n },\n 'editor.inlayHints.padding': {\n type: 'boolean',\n default: defaults.padding,\n description: nls.localize('inlayHints.padding', \"Enables the padding around the inlay hints in the editor.\")\n }\n });\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n if (typeof input.enabled === 'boolean') {\n input.enabled = input.enabled ? 'on' : 'off';\n }\n return {\n enabled: stringSet(input.enabled, this.defaultValue.enabled, ['on', 'off', 'offUnlessPressed', 'onUnlessPressed']),\n fontSize: EditorIntOption.clampedInt(input.fontSize, this.defaultValue.fontSize, 0, 100),\n fontFamily: EditorStringOption.string(input.fontFamily, this.defaultValue.fontFamily),\n padding: boolean(input.padding, this.defaultValue.padding)\n };\n }\n}\n//#endregion\n//#region lineDecorationsWidth\nclass EditorLineDecorationsWidth extends BaseEditorOption {\n constructor() {\n super(65 /* EditorOption.lineDecorationsWidth */, 'lineDecorationsWidth', 10);\n }\n validate(input) {\n if (typeof input === 'string' && /^\\d+(\\.\\d+)?ch$/.test(input)) {\n const multiple = parseFloat(input.substring(0, input.length - 2));\n return -multiple; // negative numbers signal a multiple\n }\n else {\n return EditorIntOption.clampedInt(input, this.defaultValue, 0, 1000);\n }\n }\n compute(env, options, value) {\n if (value < 0) {\n // negative numbers signal a multiple\n return EditorIntOption.clampedInt(-value * env.fontInfo.typicalHalfwidthCharacterWidth, this.defaultValue, 0, 1000);\n }\n else {\n return value;\n }\n }\n}\n//#endregion\n//#region lineHeight\nclass EditorLineHeight extends EditorFloatOption {\n constructor() {\n super(66 /* EditorOption.lineHeight */, 'lineHeight', EDITOR_FONT_DEFAULTS.lineHeight, x => EditorFloatOption.clamp(x, 0, 150), { markdownDescription: nls.localize('lineHeight', \"Controls the line height. \\n - Use 0 to automatically compute the line height from the font size.\\n - Values between 0 and 8 will be used as a multiplier with the font size.\\n - Values greater than or equal to 8 will be used as effective values.\") });\n }\n compute(env, options, value) {\n // The lineHeight is computed from the fontSize if it is 0.\n // Moreover, the final lineHeight respects the editor zoom level.\n // So take the result from env.fontInfo\n return env.fontInfo.lineHeight;\n }\n}\nclass EditorMinimap extends BaseEditorOption {\n constructor() {\n const defaults = {\n enabled: true,\n size: 'proportional',\n side: 'right',\n showSlider: 'mouseover',\n autohide: false,\n renderCharacters: true,\n maxColumn: 120,\n scale: 1,\n };\n super(72 /* EditorOption.minimap */, 'minimap', defaults, {\n 'editor.minimap.enabled': {\n type: 'boolean',\n default: defaults.enabled,\n description: nls.localize('minimap.enabled', \"Controls whether the minimap is shown.\")\n },\n 'editor.minimap.autohide': {\n type: 'boolean',\n default: defaults.autohide,\n description: nls.localize('minimap.autohide', \"Controls whether the minimap is hidden automatically.\")\n },\n 'editor.minimap.size': {\n type: 'string',\n enum: ['proportional', 'fill', 'fit'],\n enumDescriptions: [\n nls.localize('minimap.size.proportional', \"The minimap has the same size as the editor contents (and might scroll).\"),\n nls.localize('minimap.size.fill', \"The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling).\"),\n nls.localize('minimap.size.fit', \"The minimap will shrink as necessary to never be larger than the editor (no scrolling).\"),\n ],\n default: defaults.size,\n description: nls.localize('minimap.size', \"Controls the size of the minimap.\")\n },\n 'editor.minimap.side': {\n type: 'string',\n enum: ['left', 'right'],\n default: defaults.side,\n description: nls.localize('minimap.side', \"Controls the side where to render the minimap.\")\n },\n 'editor.minimap.showSlider': {\n type: 'string',\n enum: ['always', 'mouseover'],\n default: defaults.showSlider,\n description: nls.localize('minimap.showSlider', \"Controls when the minimap slider is shown.\")\n },\n 'editor.minimap.scale': {\n type: 'number',\n default: defaults.scale,\n minimum: 1,\n maximum: 3,\n enum: [1, 2, 3],\n description: nls.localize('minimap.scale', \"Scale of content drawn in the minimap: 1, 2 or 3.\")\n },\n 'editor.minimap.renderCharacters': {\n type: 'boolean',\n default: defaults.renderCharacters,\n description: nls.localize('minimap.renderCharacters', \"Render the actual characters on a line as opposed to color blocks.\")\n },\n 'editor.minimap.maxColumn': {\n type: 'number',\n default: defaults.maxColumn,\n description: nls.localize('minimap.maxColumn', \"Limit the width of the minimap to render at most a certain number of columns.\")\n }\n });\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n return {\n enabled: boolean(input.enabled, this.defaultValue.enabled),\n autohide: boolean(input.autohide, this.defaultValue.autohide),\n size: stringSet(input.size, this.defaultValue.size, ['proportional', 'fill', 'fit']),\n side: stringSet(input.side, this.defaultValue.side, ['right', 'left']),\n showSlider: stringSet(input.showSlider, this.defaultValue.showSlider, ['always', 'mouseover']),\n renderCharacters: boolean(input.renderCharacters, this.defaultValue.renderCharacters),\n scale: EditorIntOption.clampedInt(input.scale, 1, 1, 3),\n maxColumn: EditorIntOption.clampedInt(input.maxColumn, this.defaultValue.maxColumn, 1, 10000),\n };\n }\n}\n//#endregion\n//#region multiCursorModifier\nfunction _multiCursorModifierFromString(multiCursorModifier) {\n if (multiCursorModifier === 'ctrlCmd') {\n return (platform.isMacintosh ? 'metaKey' : 'ctrlKey');\n }\n return 'altKey';\n}\nclass EditorPadding extends BaseEditorOption {\n constructor() {\n super(83 /* EditorOption.padding */, 'padding', { top: 0, bottom: 0 }, {\n 'editor.padding.top': {\n type: 'number',\n default: 0,\n minimum: 0,\n maximum: 1000,\n description: nls.localize('padding.top', \"Controls the amount of space between the top edge of the editor and the first line.\")\n },\n 'editor.padding.bottom': {\n type: 'number',\n default: 0,\n minimum: 0,\n maximum: 1000,\n description: nls.localize('padding.bottom', \"Controls the amount of space between the bottom edge of the editor and the last line.\")\n }\n });\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n return {\n top: EditorIntOption.clampedInt(input.top, 0, 0, 1000),\n bottom: EditorIntOption.clampedInt(input.bottom, 0, 0, 1000)\n };\n }\n}\nclass EditorParameterHints extends BaseEditorOption {\n constructor() {\n const defaults = {\n enabled: true,\n cycle: true\n };\n super(85 /* EditorOption.parameterHints */, 'parameterHints', defaults, {\n 'editor.parameterHints.enabled': {\n type: 'boolean',\n default: defaults.enabled,\n description: nls.localize('parameterHints.enabled', \"Enables a pop-up that shows parameter documentation and type information as you type.\")\n },\n 'editor.parameterHints.cycle': {\n type: 'boolean',\n default: defaults.cycle,\n description: nls.localize('parameterHints.cycle', \"Controls whether the parameter hints menu cycles or closes when reaching the end of the list.\")\n },\n });\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n return {\n enabled: boolean(input.enabled, this.defaultValue.enabled),\n cycle: boolean(input.cycle, this.defaultValue.cycle)\n };\n }\n}\n//#endregion\n//#region pixelRatio\nclass EditorPixelRatio extends ComputedEditorOption {\n constructor() {\n super(141 /* EditorOption.pixelRatio */);\n }\n compute(env, options, _) {\n return env.pixelRatio;\n }\n}\nclass EditorQuickSuggestions extends BaseEditorOption {\n constructor() {\n const defaults = {\n other: 'on',\n comments: 'off',\n strings: 'off'\n };\n const types = [\n { type: 'boolean' },\n {\n type: 'string',\n enum: ['on', 'inline', 'off'],\n enumDescriptions: [nls.localize('on', \"Quick suggestions show inside the suggest widget\"), nls.localize('inline', \"Quick suggestions show as ghost text\"), nls.localize('off', \"Quick suggestions are disabled\")]\n }\n ];\n super(88 /* EditorOption.quickSuggestions */, 'quickSuggestions', defaults, {\n type: 'object',\n additionalProperties: false,\n properties: {\n strings: {\n anyOf: types,\n default: defaults.strings,\n description: nls.localize('quickSuggestions.strings', \"Enable quick suggestions inside strings.\")\n },\n comments: {\n anyOf: types,\n default: defaults.comments,\n description: nls.localize('quickSuggestions.comments', \"Enable quick suggestions inside comments.\")\n },\n other: {\n anyOf: types,\n default: defaults.other,\n description: nls.localize('quickSuggestions.other', \"Enable quick suggestions outside of strings and comments.\")\n },\n },\n default: defaults,\n markdownDescription: nls.localize('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#`)\n });\n this.defaultValue = defaults;\n }\n validate(input) {\n if (typeof input === 'boolean') {\n // boolean -> all on/off\n const value = input ? 'on' : 'off';\n return { comments: value, strings: value, other: value };\n }\n if (!input || typeof input !== 'object') {\n // invalid object\n return this.defaultValue;\n }\n const { other, comments, strings } = input;\n const allowedValues = ['on', 'inline', 'off'];\n let validatedOther;\n let validatedComments;\n let validatedStrings;\n if (typeof other === 'boolean') {\n validatedOther = other ? 'on' : 'off';\n }\n else {\n validatedOther = stringSet(other, this.defaultValue.other, allowedValues);\n }\n if (typeof comments === 'boolean') {\n validatedComments = comments ? 'on' : 'off';\n }\n else {\n validatedComments = stringSet(comments, this.defaultValue.comments, allowedValues);\n }\n if (typeof strings === 'boolean') {\n validatedStrings = strings ? 'on' : 'off';\n }\n else {\n validatedStrings = stringSet(strings, this.defaultValue.strings, allowedValues);\n }\n return {\n other: validatedOther,\n comments: validatedComments,\n strings: validatedStrings\n };\n }\n}\nclass EditorRenderLineNumbersOption extends BaseEditorOption {\n constructor() {\n super(67 /* EditorOption.lineNumbers */, 'lineNumbers', { renderType: 1 /* RenderLineNumbersType.On */, renderFn: null }, {\n type: 'string',\n enum: ['off', 'on', 'relative', 'interval'],\n enumDescriptions: [\n nls.localize('lineNumbers.off', \"Line numbers are not rendered.\"),\n nls.localize('lineNumbers.on', \"Line numbers are rendered as absolute number.\"),\n nls.localize('lineNumbers.relative', \"Line numbers are rendered as distance in lines to cursor position.\"),\n nls.localize('lineNumbers.interval', \"Line numbers are rendered every 10 lines.\")\n ],\n default: 'on',\n description: nls.localize('lineNumbers', \"Controls the display of line numbers.\")\n });\n }\n validate(lineNumbers) {\n let renderType = this.defaultValue.renderType;\n let renderFn = this.defaultValue.renderFn;\n if (typeof lineNumbers !== 'undefined') {\n if (typeof lineNumbers === 'function') {\n renderType = 4 /* RenderLineNumbersType.Custom */;\n renderFn = lineNumbers;\n }\n else if (lineNumbers === 'interval') {\n renderType = 3 /* RenderLineNumbersType.Interval */;\n }\n else if (lineNumbers === 'relative') {\n renderType = 2 /* RenderLineNumbersType.Relative */;\n }\n else if (lineNumbers === 'on') {\n renderType = 1 /* RenderLineNumbersType.On */;\n }\n else {\n renderType = 0 /* RenderLineNumbersType.Off */;\n }\n }\n return {\n renderType,\n renderFn\n };\n }\n}\n//#endregion\n//#region renderValidationDecorations\n/**\n * @internal\n */\nexport function filterValidationDecorations(options) {\n const renderValidationDecorations = options.get(97 /* EditorOption.renderValidationDecorations */);\n if (renderValidationDecorations === 'editable') {\n return options.get(90 /* EditorOption.readOnly */);\n }\n return renderValidationDecorations === 'on' ? false : true;\n}\nclass EditorRulers extends BaseEditorOption {\n constructor() {\n const defaults = [];\n const columnSchema = { type: 'number', description: nls.localize('rulers.size', \"Number of monospace characters at which this editor ruler will render.\") };\n super(101 /* EditorOption.rulers */, 'rulers', defaults, {\n type: 'array',\n items: {\n anyOf: [\n columnSchema,\n {\n type: [\n 'object'\n ],\n properties: {\n column: columnSchema,\n color: {\n type: 'string',\n description: nls.localize('rulers.color', \"Color of this editor ruler.\"),\n format: 'color-hex'\n }\n }\n }\n ]\n },\n default: defaults,\n description: nls.localize('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.\")\n });\n }\n validate(input) {\n if (Array.isArray(input)) {\n const rulers = [];\n for (const _element of input) {\n if (typeof _element === 'number') {\n rulers.push({\n column: EditorIntOption.clampedInt(_element, 0, 0, 10000),\n color: null\n });\n }\n else if (_element && typeof _element === 'object') {\n const element = _element;\n rulers.push({\n column: EditorIntOption.clampedInt(element.column, 0, 0, 10000),\n color: element.color\n });\n }\n }\n rulers.sort((a, b) => a.column - b.column);\n return rulers;\n }\n return this.defaultValue;\n }\n}\n//#endregion\n//#region readonly\n/**\n * Configuration options for readonly message\n */\nclass ReadonlyMessage extends BaseEditorOption {\n constructor() {\n const defaults = undefined;\n super(91 /* EditorOption.readOnlyMessage */, 'readOnlyMessage', defaults);\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n return _input;\n }\n}\nfunction _scrollbarVisibilityFromString(visibility, defaultValue) {\n if (typeof visibility !== 'string') {\n return defaultValue;\n }\n switch (visibility) {\n case 'hidden': return 2 /* ScrollbarVisibility.Hidden */;\n case 'visible': return 3 /* ScrollbarVisibility.Visible */;\n default: return 1 /* ScrollbarVisibility.Auto */;\n }\n}\nclass EditorScrollbar extends BaseEditorOption {\n constructor() {\n const defaults = {\n vertical: 1 /* ScrollbarVisibility.Auto */,\n horizontal: 1 /* ScrollbarVisibility.Auto */,\n arrowSize: 11,\n useShadows: true,\n verticalHasArrows: false,\n horizontalHasArrows: false,\n horizontalScrollbarSize: 12,\n horizontalSliderSize: 12,\n verticalScrollbarSize: 14,\n verticalSliderSize: 14,\n handleMouseWheel: true,\n alwaysConsumeMouseWheel: true,\n scrollByPage: false,\n ignoreHorizontalScrollbarInContentHeight: false,\n };\n super(102 /* EditorOption.scrollbar */, 'scrollbar', defaults, {\n 'editor.scrollbar.vertical': {\n type: 'string',\n enum: ['auto', 'visible', 'hidden'],\n enumDescriptions: [\n nls.localize('scrollbar.vertical.auto', \"The vertical scrollbar will be visible only when necessary.\"),\n nls.localize('scrollbar.vertical.visible', \"The vertical scrollbar will always be visible.\"),\n nls.localize('scrollbar.vertical.fit', \"The vertical scrollbar will always be hidden.\"),\n ],\n default: 'auto',\n description: nls.localize('scrollbar.vertical', \"Controls the visibility of the vertical scrollbar.\")\n },\n 'editor.scrollbar.horizontal': {\n type: 'string',\n enum: ['auto', 'visible', 'hidden'],\n enumDescriptions: [\n nls.localize('scrollbar.horizontal.auto', \"The horizontal scrollbar will be visible only when necessary.\"),\n nls.localize('scrollbar.horizontal.visible', \"The horizontal scrollbar will always be visible.\"),\n nls.localize('scrollbar.horizontal.fit', \"The horizontal scrollbar will always be hidden.\"),\n ],\n default: 'auto',\n description: nls.localize('scrollbar.horizontal', \"Controls the visibility of the horizontal scrollbar.\")\n },\n 'editor.scrollbar.verticalScrollbarSize': {\n type: 'number',\n default: defaults.verticalScrollbarSize,\n description: nls.localize('scrollbar.verticalScrollbarSize', \"The width of the vertical scrollbar.\")\n },\n 'editor.scrollbar.horizontalScrollbarSize': {\n type: 'number',\n default: defaults.horizontalScrollbarSize,\n description: nls.localize('scrollbar.horizontalScrollbarSize', \"The height of the horizontal scrollbar.\")\n },\n 'editor.scrollbar.scrollByPage': {\n type: 'boolean',\n default: defaults.scrollByPage,\n description: nls.localize('scrollbar.scrollByPage', \"Controls whether clicks scroll by page or jump to click position.\")\n },\n 'editor.scrollbar.ignoreHorizontalScrollbarInContentHeight': {\n type: 'boolean',\n default: defaults.ignoreHorizontalScrollbarInContentHeight,\n description: nls.localize('scrollbar.ignoreHorizontalScrollbarInContentHeight', \"When set, the horizontal scrollbar will not increase the size of the editor's content.\")\n }\n });\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n const horizontalScrollbarSize = EditorIntOption.clampedInt(input.horizontalScrollbarSize, this.defaultValue.horizontalScrollbarSize, 0, 1000);\n const verticalScrollbarSize = EditorIntOption.clampedInt(input.verticalScrollbarSize, this.defaultValue.verticalScrollbarSize, 0, 1000);\n return {\n arrowSize: EditorIntOption.clampedInt(input.arrowSize, this.defaultValue.arrowSize, 0, 1000),\n vertical: _scrollbarVisibilityFromString(input.vertical, this.defaultValue.vertical),\n horizontal: _scrollbarVisibilityFromString(input.horizontal, this.defaultValue.horizontal),\n useShadows: boolean(input.useShadows, this.defaultValue.useShadows),\n verticalHasArrows: boolean(input.verticalHasArrows, this.defaultValue.verticalHasArrows),\n horizontalHasArrows: boolean(input.horizontalHasArrows, this.defaultValue.horizontalHasArrows),\n handleMouseWheel: boolean(input.handleMouseWheel, this.defaultValue.handleMouseWheel),\n alwaysConsumeMouseWheel: boolean(input.alwaysConsumeMouseWheel, this.defaultValue.alwaysConsumeMouseWheel),\n horizontalScrollbarSize: horizontalScrollbarSize,\n horizontalSliderSize: EditorIntOption.clampedInt(input.horizontalSliderSize, horizontalScrollbarSize, 0, 1000),\n verticalScrollbarSize: verticalScrollbarSize,\n verticalSliderSize: EditorIntOption.clampedInt(input.verticalSliderSize, verticalScrollbarSize, 0, 1000),\n scrollByPage: boolean(input.scrollByPage, this.defaultValue.scrollByPage),\n ignoreHorizontalScrollbarInContentHeight: boolean(input.ignoreHorizontalScrollbarInContentHeight, this.defaultValue.ignoreHorizontalScrollbarInContentHeight),\n };\n }\n}\n/**\n * @internal\n*/\nexport const inUntrustedWorkspace = 'inUntrustedWorkspace';\n/**\n * @internal\n */\nexport const unicodeHighlightConfigKeys = {\n allowedCharacters: 'editor.unicodeHighlight.allowedCharacters',\n invisibleCharacters: 'editor.unicodeHighlight.invisibleCharacters',\n nonBasicASCII: 'editor.unicodeHighlight.nonBasicASCII',\n ambiguousCharacters: 'editor.unicodeHighlight.ambiguousCharacters',\n includeComments: 'editor.unicodeHighlight.includeComments',\n includeStrings: 'editor.unicodeHighlight.includeStrings',\n allowedLocales: 'editor.unicodeHighlight.allowedLocales',\n};\nclass UnicodeHighlight extends BaseEditorOption {\n constructor() {\n const defaults = {\n nonBasicASCII: inUntrustedWorkspace,\n invisibleCharacters: true,\n ambiguousCharacters: true,\n includeComments: inUntrustedWorkspace,\n includeStrings: true,\n allowedCharacters: {},\n allowedLocales: { _os: true, _vscode: true },\n };\n super(124 /* EditorOption.unicodeHighlighting */, 'unicodeHighlight', defaults, {\n [unicodeHighlightConfigKeys.nonBasicASCII]: {\n restricted: true,\n type: ['boolean', 'string'],\n enum: [true, false, inUntrustedWorkspace],\n default: defaults.nonBasicASCII,\n description: nls.localize('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.\")\n },\n [unicodeHighlightConfigKeys.invisibleCharacters]: {\n restricted: true,\n type: 'boolean',\n default: defaults.invisibleCharacters,\n description: nls.localize('unicodeHighlight.invisibleCharacters', \"Controls whether characters that just reserve space or have no width at all are highlighted.\")\n },\n [unicodeHighlightConfigKeys.ambiguousCharacters]: {\n restricted: true,\n type: 'boolean',\n default: defaults.ambiguousCharacters,\n description: nls.localize('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.\")\n },\n [unicodeHighlightConfigKeys.includeComments]: {\n restricted: true,\n type: ['boolean', 'string'],\n enum: [true, false, inUntrustedWorkspace],\n default: defaults.includeComments,\n description: nls.localize('unicodeHighlight.includeComments', \"Controls whether characters in comments should also be subject to Unicode highlighting.\")\n },\n [unicodeHighlightConfigKeys.includeStrings]: {\n restricted: true,\n type: ['boolean', 'string'],\n enum: [true, false, inUntrustedWorkspace],\n default: defaults.includeStrings,\n description: nls.localize('unicodeHighlight.includeStrings', \"Controls whether characters in strings should also be subject to Unicode highlighting.\")\n },\n [unicodeHighlightConfigKeys.allowedCharacters]: {\n restricted: true,\n type: 'object',\n default: defaults.allowedCharacters,\n description: nls.localize('unicodeHighlight.allowedCharacters', \"Defines allowed characters that are not being highlighted.\"),\n additionalProperties: {\n type: 'boolean'\n }\n },\n [unicodeHighlightConfigKeys.allowedLocales]: {\n restricted: true,\n type: 'object',\n additionalProperties: {\n type: 'boolean'\n },\n default: defaults.allowedLocales,\n description: nls.localize('unicodeHighlight.allowedLocales', \"Unicode characters that are common in allowed locales are not being highlighted.\")\n },\n });\n }\n applyUpdate(value, update) {\n let didChange = false;\n if (update.allowedCharacters && value) {\n // Treat allowedCharacters atomically\n if (!objects.equals(value.allowedCharacters, update.allowedCharacters)) {\n value = { ...value, allowedCharacters: update.allowedCharacters };\n didChange = true;\n }\n }\n if (update.allowedLocales && value) {\n // Treat allowedLocales atomically\n if (!objects.equals(value.allowedLocales, update.allowedLocales)) {\n value = { ...value, allowedLocales: update.allowedLocales };\n didChange = true;\n }\n }\n const result = super.applyUpdate(value, update);\n if (didChange) {\n return new ApplyUpdateResult(result.newValue, true);\n }\n return result;\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n return {\n nonBasicASCII: primitiveSet(input.nonBasicASCII, inUntrustedWorkspace, [true, false, inUntrustedWorkspace]),\n invisibleCharacters: boolean(input.invisibleCharacters, this.defaultValue.invisibleCharacters),\n ambiguousCharacters: boolean(input.ambiguousCharacters, this.defaultValue.ambiguousCharacters),\n includeComments: primitiveSet(input.includeComments, inUntrustedWorkspace, [true, false, inUntrustedWorkspace]),\n includeStrings: primitiveSet(input.includeStrings, inUntrustedWorkspace, [true, false, inUntrustedWorkspace]),\n allowedCharacters: this.validateBooleanMap(_input.allowedCharacters, this.defaultValue.allowedCharacters),\n allowedLocales: this.validateBooleanMap(_input.allowedLocales, this.defaultValue.allowedLocales),\n };\n }\n validateBooleanMap(map, defaultValue) {\n if ((typeof map !== 'object') || !map) {\n return defaultValue;\n }\n const result = {};\n for (const [key, value] of Object.entries(map)) {\n if (value === true) {\n result[key] = true;\n }\n }\n return result;\n }\n}\n/**\n * Configuration options for inline suggestions\n */\nclass InlineEditorSuggest extends BaseEditorOption {\n constructor() {\n const defaults = {\n enabled: true,\n mode: 'subwordSmart',\n showToolbar: 'onHover',\n suppressSuggestions: false,\n keepOnBlur: false,\n fontFamily: 'default'\n };\n super(62 /* EditorOption.inlineSuggest */, 'inlineSuggest', defaults, {\n 'editor.inlineSuggest.enabled': {\n type: 'boolean',\n default: defaults.enabled,\n description: nls.localize('inlineSuggest.enabled', \"Controls whether to automatically show inline suggestions in the editor.\")\n },\n 'editor.inlineSuggest.showToolbar': {\n type: 'string',\n default: defaults.showToolbar,\n enum: ['always', 'onHover', 'never'],\n enumDescriptions: [\n nls.localize('inlineSuggest.showToolbar.always', \"Show the inline suggestion toolbar whenever an inline suggestion is shown.\"),\n nls.localize('inlineSuggest.showToolbar.onHover', \"Show the inline suggestion toolbar when hovering over an inline suggestion.\"),\n nls.localize('inlineSuggest.showToolbar.never', \"Never show the inline suggestion toolbar.\"),\n ],\n description: nls.localize('inlineSuggest.showToolbar', \"Controls when to show the inline suggestion toolbar.\"),\n },\n 'editor.inlineSuggest.suppressSuggestions': {\n type: 'boolean',\n default: defaults.suppressSuggestions,\n description: nls.localize('inlineSuggest.suppressSuggestions', \"Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.\")\n },\n 'editor.inlineSuggest.fontFamily': {\n type: 'string',\n default: defaults.fontFamily,\n description: nls.localize('inlineSuggest.fontFamily', \"Controls the font family of the inline suggestions.\")\n },\n });\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n return {\n enabled: boolean(input.enabled, this.defaultValue.enabled),\n mode: stringSet(input.mode, this.defaultValue.mode, ['prefix', 'subword', 'subwordSmart']),\n showToolbar: stringSet(input.showToolbar, this.defaultValue.showToolbar, ['always', 'onHover', 'never']),\n suppressSuggestions: boolean(input.suppressSuggestions, this.defaultValue.suppressSuggestions),\n keepOnBlur: boolean(input.keepOnBlur, this.defaultValue.keepOnBlur),\n fontFamily: EditorStringOption.string(input.fontFamily, this.defaultValue.fontFamily)\n };\n }\n}\n/**\n * Configuration options for inline suggestions\n */\nclass BracketPairColorization extends BaseEditorOption {\n constructor() {\n const defaults = {\n enabled: EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.enabled,\n independentColorPoolPerBracketType: EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.independentColorPoolPerBracketType,\n };\n super(15 /* EditorOption.bracketPairColorization */, 'bracketPairColorization', defaults, {\n 'editor.bracketPairColorization.enabled': {\n type: 'boolean',\n default: defaults.enabled,\n markdownDescription: nls.localize('bracketPairColorization.enabled', \"Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.\", '`#workbench.colorCustomizations#`')\n },\n 'editor.bracketPairColorization.independentColorPoolPerBracketType': {\n type: 'boolean',\n default: defaults.independentColorPoolPerBracketType,\n description: nls.localize('bracketPairColorization.independentColorPoolPerBracketType', \"Controls whether each bracket type has its own independent color pool.\")\n },\n });\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n return {\n enabled: boolean(input.enabled, this.defaultValue.enabled),\n independentColorPoolPerBracketType: boolean(input.independentColorPoolPerBracketType, this.defaultValue.independentColorPoolPerBracketType),\n };\n }\n}\n/**\n * Configuration options for inline suggestions\n */\nclass GuideOptions extends BaseEditorOption {\n constructor() {\n const defaults = {\n bracketPairs: false,\n bracketPairsHorizontal: 'active',\n highlightActiveBracketPair: true,\n indentation: true,\n highlightActiveIndentation: true\n };\n super(16 /* EditorOption.guides */, 'guides', defaults, {\n 'editor.guides.bracketPairs': {\n type: ['boolean', 'string'],\n enum: [true, 'active', false],\n enumDescriptions: [\n nls.localize('editor.guides.bracketPairs.true', \"Enables bracket pair guides.\"),\n nls.localize('editor.guides.bracketPairs.active', \"Enables bracket pair guides only for the active bracket pair.\"),\n nls.localize('editor.guides.bracketPairs.false', \"Disables bracket pair guides.\"),\n ],\n default: defaults.bracketPairs,\n description: nls.localize('editor.guides.bracketPairs', \"Controls whether bracket pair guides are enabled or not.\")\n },\n 'editor.guides.bracketPairsHorizontal': {\n type: ['boolean', 'string'],\n enum: [true, 'active', false],\n enumDescriptions: [\n nls.localize('editor.guides.bracketPairsHorizontal.true', \"Enables horizontal guides as addition to vertical bracket pair guides.\"),\n nls.localize('editor.guides.bracketPairsHorizontal.active', \"Enables horizontal guides only for the active bracket pair.\"),\n nls.localize('editor.guides.bracketPairsHorizontal.false', \"Disables horizontal bracket pair guides.\"),\n ],\n default: defaults.bracketPairsHorizontal,\n description: nls.localize('editor.guides.bracketPairsHorizontal', \"Controls whether horizontal bracket pair guides are enabled or not.\")\n },\n 'editor.guides.highlightActiveBracketPair': {\n type: 'boolean',\n default: defaults.highlightActiveBracketPair,\n description: nls.localize('editor.guides.highlightActiveBracketPair', \"Controls whether the editor should highlight the active bracket pair.\")\n },\n 'editor.guides.indentation': {\n type: 'boolean',\n default: defaults.indentation,\n description: nls.localize('editor.guides.indentation', \"Controls whether the editor should render indent guides.\")\n },\n 'editor.guides.highlightActiveIndentation': {\n type: ['boolean', 'string'],\n enum: [true, 'always', false],\n enumDescriptions: [\n nls.localize('editor.guides.highlightActiveIndentation.true', \"Highlights the active indent guide.\"),\n nls.localize('editor.guides.highlightActiveIndentation.always', \"Highlights the active indent guide even if bracket guides are highlighted.\"),\n nls.localize('editor.guides.highlightActiveIndentation.false', \"Do not highlight the active indent guide.\"),\n ],\n default: defaults.highlightActiveIndentation,\n description: nls.localize('editor.guides.highlightActiveIndentation', \"Controls whether the editor should highlight the active indent guide.\")\n }\n });\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n return {\n bracketPairs: primitiveSet(input.bracketPairs, this.defaultValue.bracketPairs, [true, false, 'active']),\n bracketPairsHorizontal: primitiveSet(input.bracketPairsHorizontal, this.defaultValue.bracketPairsHorizontal, [true, false, 'active']),\n highlightActiveBracketPair: boolean(input.highlightActiveBracketPair, this.defaultValue.highlightActiveBracketPair),\n indentation: boolean(input.indentation, this.defaultValue.indentation),\n highlightActiveIndentation: primitiveSet(input.highlightActiveIndentation, this.defaultValue.highlightActiveIndentation, [true, false, 'always']),\n };\n }\n}\nfunction primitiveSet(value, defaultValue, allowedValues) {\n const idx = allowedValues.indexOf(value);\n if (idx === -1) {\n return defaultValue;\n }\n return allowedValues[idx];\n}\nclass EditorSuggest extends BaseEditorOption {\n constructor() {\n const defaults = {\n insertMode: 'insert',\n filterGraceful: true,\n snippetsPreventQuickSuggestions: false,\n localityBonus: false,\n shareSuggestSelections: false,\n selectionMode: 'always',\n showIcons: true,\n showStatusBar: false,\n preview: false,\n previewMode: 'subwordSmart',\n showInlineDetails: true,\n showMethods: true,\n showFunctions: true,\n showConstructors: true,\n showDeprecated: true,\n matchOnWordStartOnly: true,\n showFields: true,\n showVariables: true,\n showClasses: true,\n showStructs: true,\n showInterfaces: true,\n showModules: true,\n showProperties: true,\n showEvents: true,\n showOperators: true,\n showUnits: true,\n showValues: true,\n showConstants: true,\n showEnums: true,\n showEnumMembers: true,\n showKeywords: true,\n showWords: true,\n showColors: true,\n showFiles: true,\n showReferences: true,\n showFolders: true,\n showTypeParameters: true,\n showSnippets: true,\n showUsers: true,\n showIssues: true,\n };\n super(117 /* EditorOption.suggest */, 'suggest', defaults, {\n 'editor.suggest.insertMode': {\n type: 'string',\n enum: ['insert', 'replace'],\n enumDescriptions: [\n nls.localize('suggest.insertMode.insert', \"Insert suggestion without overwriting text right of the cursor.\"),\n nls.localize('suggest.insertMode.replace', \"Insert suggestion and overwrite text right of the cursor.\"),\n ],\n default: defaults.insertMode,\n description: nls.localize('suggest.insertMode', \"Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.\")\n },\n 'editor.suggest.filterGraceful': {\n type: 'boolean',\n default: defaults.filterGraceful,\n description: nls.localize('suggest.filterGraceful', \"Controls whether filtering and sorting suggestions accounts for small typos.\")\n },\n 'editor.suggest.localityBonus': {\n type: 'boolean',\n default: defaults.localityBonus,\n description: nls.localize('suggest.localityBonus', \"Controls whether sorting favors words that appear close to the cursor.\")\n },\n 'editor.suggest.shareSuggestSelections': {\n type: 'boolean',\n default: defaults.shareSuggestSelections,\n markdownDescription: nls.localize('suggest.shareSuggestSelections', \"Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).\")\n },\n 'editor.suggest.selectionMode': {\n type: 'string',\n enum: ['always', 'never', 'whenTriggerCharacter', 'whenQuickSuggestion'],\n enumDescriptions: [\n nls.localize('suggest.insertMode.always', \"Always select a suggestion when automatically triggering IntelliSense.\"),\n nls.localize('suggest.insertMode.never', \"Never select a suggestion when automatically triggering IntelliSense.\"),\n nls.localize('suggest.insertMode.whenTriggerCharacter', \"Select a suggestion only when triggering IntelliSense from a trigger character.\"),\n nls.localize('suggest.insertMode.whenQuickSuggestion', \"Select a suggestion only when triggering IntelliSense as you type.\"),\n ],\n default: defaults.selectionMode,\n markdownDescription: nls.localize('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`.\")\n },\n 'editor.suggest.snippetsPreventQuickSuggestions': {\n type: 'boolean',\n default: defaults.snippetsPreventQuickSuggestions,\n description: nls.localize('suggest.snippetsPreventQuickSuggestions', \"Controls whether an active snippet prevents quick suggestions.\")\n },\n 'editor.suggest.showIcons': {\n type: 'boolean',\n default: defaults.showIcons,\n description: nls.localize('suggest.showIcons', \"Controls whether to show or hide icons in suggestions.\")\n },\n 'editor.suggest.showStatusBar': {\n type: 'boolean',\n default: defaults.showStatusBar,\n description: nls.localize('suggest.showStatusBar', \"Controls the visibility of the status bar at the bottom of the suggest widget.\")\n },\n 'editor.suggest.preview': {\n type: 'boolean',\n default: defaults.preview,\n description: nls.localize('suggest.preview', \"Controls whether to preview the suggestion outcome in the editor.\")\n },\n 'editor.suggest.showInlineDetails': {\n type: 'boolean',\n default: defaults.showInlineDetails,\n description: nls.localize('suggest.showInlineDetails', \"Controls whether suggest details show inline with the label or only in the details widget.\")\n },\n 'editor.suggest.maxVisibleSuggestions': {\n type: 'number',\n deprecationMessage: nls.localize('suggest.maxVisibleSuggestions.dep', \"This setting is deprecated. The suggest widget can now be resized.\"),\n },\n 'editor.suggest.filteredTypes': {\n type: 'object',\n deprecationMessage: nls.localize('deprecated', \"This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.\")\n },\n 'editor.suggest.showMethods': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showMethods', \"When enabled IntelliSense shows `method`-suggestions.\")\n },\n 'editor.suggest.showFunctions': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showFunctions', \"When enabled IntelliSense shows `function`-suggestions.\")\n },\n 'editor.suggest.showConstructors': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showConstructors', \"When enabled IntelliSense shows `constructor`-suggestions.\")\n },\n 'editor.suggest.showDeprecated': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showDeprecated', \"When enabled IntelliSense shows `deprecated`-suggestions.\")\n },\n 'editor.suggest.matchOnWordStartOnly': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('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.\")\n },\n 'editor.suggest.showFields': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showFields', \"When enabled IntelliSense shows `field`-suggestions.\")\n },\n 'editor.suggest.showVariables': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showVariables', \"When enabled IntelliSense shows `variable`-suggestions.\")\n },\n 'editor.suggest.showClasses': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showClasss', \"When enabled IntelliSense shows `class`-suggestions.\")\n },\n 'editor.suggest.showStructs': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showStructs', \"When enabled IntelliSense shows `struct`-suggestions.\")\n },\n 'editor.suggest.showInterfaces': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showInterfaces', \"When enabled IntelliSense shows `interface`-suggestions.\")\n },\n 'editor.suggest.showModules': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showModules', \"When enabled IntelliSense shows `module`-suggestions.\")\n },\n 'editor.suggest.showProperties': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showPropertys', \"When enabled IntelliSense shows `property`-suggestions.\")\n },\n 'editor.suggest.showEvents': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showEvents', \"When enabled IntelliSense shows `event`-suggestions.\")\n },\n 'editor.suggest.showOperators': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showOperators', \"When enabled IntelliSense shows `operator`-suggestions.\")\n },\n 'editor.suggest.showUnits': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showUnits', \"When enabled IntelliSense shows `unit`-suggestions.\")\n },\n 'editor.suggest.showValues': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showValues', \"When enabled IntelliSense shows `value`-suggestions.\")\n },\n 'editor.suggest.showConstants': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showConstants', \"When enabled IntelliSense shows `constant`-suggestions.\")\n },\n 'editor.suggest.showEnums': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showEnums', \"When enabled IntelliSense shows `enum`-suggestions.\")\n },\n 'editor.suggest.showEnumMembers': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showEnumMembers', \"When enabled IntelliSense shows `enumMember`-suggestions.\")\n },\n 'editor.suggest.showKeywords': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showKeywords', \"When enabled IntelliSense shows `keyword`-suggestions.\")\n },\n 'editor.suggest.showWords': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showTexts', \"When enabled IntelliSense shows `text`-suggestions.\")\n },\n 'editor.suggest.showColors': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showColors', \"When enabled IntelliSense shows `color`-suggestions.\")\n },\n 'editor.suggest.showFiles': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showFiles', \"When enabled IntelliSense shows `file`-suggestions.\")\n },\n 'editor.suggest.showReferences': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showReferences', \"When enabled IntelliSense shows `reference`-suggestions.\")\n },\n 'editor.suggest.showCustomcolors': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showCustomcolors', \"When enabled IntelliSense shows `customcolor`-suggestions.\")\n },\n 'editor.suggest.showFolders': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showFolders', \"When enabled IntelliSense shows `folder`-suggestions.\")\n },\n 'editor.suggest.showTypeParameters': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showTypeParameters', \"When enabled IntelliSense shows `typeParameter`-suggestions.\")\n },\n 'editor.suggest.showSnippets': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showSnippets', \"When enabled IntelliSense shows `snippet`-suggestions.\")\n },\n 'editor.suggest.showUsers': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showUsers', \"When enabled IntelliSense shows `user`-suggestions.\")\n },\n 'editor.suggest.showIssues': {\n type: 'boolean',\n default: true,\n markdownDescription: nls.localize('editor.suggest.showIssues', \"When enabled IntelliSense shows `issues`-suggestions.\")\n }\n });\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n return {\n insertMode: stringSet(input.insertMode, this.defaultValue.insertMode, ['insert', 'replace']),\n filterGraceful: boolean(input.filterGraceful, this.defaultValue.filterGraceful),\n snippetsPreventQuickSuggestions: boolean(input.snippetsPreventQuickSuggestions, this.defaultValue.filterGraceful),\n localityBonus: boolean(input.localityBonus, this.defaultValue.localityBonus),\n shareSuggestSelections: boolean(input.shareSuggestSelections, this.defaultValue.shareSuggestSelections),\n selectionMode: stringSet(input.selectionMode, this.defaultValue.selectionMode, ['always', 'never', 'whenQuickSuggestion', 'whenTriggerCharacter']),\n showIcons: boolean(input.showIcons, this.defaultValue.showIcons),\n showStatusBar: boolean(input.showStatusBar, this.defaultValue.showStatusBar),\n preview: boolean(input.preview, this.defaultValue.preview),\n previewMode: stringSet(input.previewMode, this.defaultValue.previewMode, ['prefix', 'subword', 'subwordSmart']),\n showInlineDetails: boolean(input.showInlineDetails, this.defaultValue.showInlineDetails),\n showMethods: boolean(input.showMethods, this.defaultValue.showMethods),\n showFunctions: boolean(input.showFunctions, this.defaultValue.showFunctions),\n showConstructors: boolean(input.showConstructors, this.defaultValue.showConstructors),\n showDeprecated: boolean(input.showDeprecated, this.defaultValue.showDeprecated),\n matchOnWordStartOnly: boolean(input.matchOnWordStartOnly, this.defaultValue.matchOnWordStartOnly),\n showFields: boolean(input.showFields, this.defaultValue.showFields),\n showVariables: boolean(input.showVariables, this.defaultValue.showVariables),\n showClasses: boolean(input.showClasses, this.defaultValue.showClasses),\n showStructs: boolean(input.showStructs, this.defaultValue.showStructs),\n showInterfaces: boolean(input.showInterfaces, this.defaultValue.showInterfaces),\n showModules: boolean(input.showModules, this.defaultValue.showModules),\n showProperties: boolean(input.showProperties, this.defaultValue.showProperties),\n showEvents: boolean(input.showEvents, this.defaultValue.showEvents),\n showOperators: boolean(input.showOperators, this.defaultValue.showOperators),\n showUnits: boolean(input.showUnits, this.defaultValue.showUnits),\n showValues: boolean(input.showValues, this.defaultValue.showValues),\n showConstants: boolean(input.showConstants, this.defaultValue.showConstants),\n showEnums: boolean(input.showEnums, this.defaultValue.showEnums),\n showEnumMembers: boolean(input.showEnumMembers, this.defaultValue.showEnumMembers),\n showKeywords: boolean(input.showKeywords, this.defaultValue.showKeywords),\n showWords: boolean(input.showWords, this.defaultValue.showWords),\n showColors: boolean(input.showColors, this.defaultValue.showColors),\n showFiles: boolean(input.showFiles, this.defaultValue.showFiles),\n showReferences: boolean(input.showReferences, this.defaultValue.showReferences),\n showFolders: boolean(input.showFolders, this.defaultValue.showFolders),\n showTypeParameters: boolean(input.showTypeParameters, this.defaultValue.showTypeParameters),\n showSnippets: boolean(input.showSnippets, this.defaultValue.showSnippets),\n showUsers: boolean(input.showUsers, this.defaultValue.showUsers),\n showIssues: boolean(input.showIssues, this.defaultValue.showIssues),\n };\n }\n}\nclass SmartSelect extends BaseEditorOption {\n constructor() {\n super(112 /* EditorOption.smartSelect */, 'smartSelect', {\n selectLeadingAndTrailingWhitespace: true,\n selectSubwords: true,\n }, {\n 'editor.smartSelect.selectLeadingAndTrailingWhitespace': {\n description: nls.localize('selectLeadingAndTrailingWhitespace', \"Whether leading and trailing whitespace should always be selected.\"),\n default: true,\n type: 'boolean'\n },\n 'editor.smartSelect.selectSubwords': {\n description: nls.localize('selectSubwords', \"Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected.\"),\n default: true,\n type: 'boolean'\n }\n });\n }\n validate(input) {\n if (!input || typeof input !== 'object') {\n return this.defaultValue;\n }\n return {\n selectLeadingAndTrailingWhitespace: boolean(input.selectLeadingAndTrailingWhitespace, this.defaultValue.selectLeadingAndTrailingWhitespace),\n selectSubwords: boolean(input.selectSubwords, this.defaultValue.selectSubwords),\n };\n }\n}\nclass WrappingIndentOption extends BaseEditorOption {\n constructor() {\n super(136 /* EditorOption.wrappingIndent */, 'wrappingIndent', 1 /* WrappingIndent.Same */, {\n 'editor.wrappingIndent': {\n type: 'string',\n enum: ['none', 'same', 'indent', 'deepIndent'],\n enumDescriptions: [\n nls.localize('wrappingIndent.none', \"No indentation. Wrapped lines begin at column 1.\"),\n nls.localize('wrappingIndent.same', \"Wrapped lines get the same indentation as the parent.\"),\n nls.localize('wrappingIndent.indent', \"Wrapped lines get +1 indentation toward the parent.\"),\n nls.localize('wrappingIndent.deepIndent', \"Wrapped lines get +2 indentation toward the parent.\"),\n ],\n description: nls.localize('wrappingIndent', \"Controls the indentation of wrapped lines.\"),\n default: 'same'\n }\n });\n }\n validate(input) {\n switch (input) {\n case 'none': return 0 /* WrappingIndent.None */;\n case 'same': return 1 /* WrappingIndent.Same */;\n case 'indent': return 2 /* WrappingIndent.Indent */;\n case 'deepIndent': return 3 /* WrappingIndent.DeepIndent */;\n }\n return 1 /* WrappingIndent.Same */;\n }\n compute(env, options, value) {\n const accessibilitySupport = options.get(2 /* EditorOption.accessibilitySupport */);\n if (accessibilitySupport === 2 /* AccessibilitySupport.Enabled */) {\n // if we know for a fact that a screen reader is attached, we use no indent wrapping to\n // help that the editor's wrapping points match the textarea's wrapping points\n return 0 /* WrappingIndent.None */;\n }\n return value;\n }\n}\nclass EditorWrappingInfoComputer extends ComputedEditorOption {\n constructor() {\n super(144 /* EditorOption.wrappingInfo */);\n }\n compute(env, options, _) {\n const layoutInfo = options.get(143 /* EditorOption.layoutInfo */);\n return {\n isDominatedByLongLines: env.isDominatedByLongLines,\n isWordWrapMinified: layoutInfo.isWordWrapMinified,\n isViewportWrapping: layoutInfo.isViewportWrapping,\n wrappingColumn: layoutInfo.wrappingColumn,\n };\n }\n}\nclass EditorDropIntoEditor extends BaseEditorOption {\n constructor() {\n const defaults = { enabled: true, showDropSelector: 'afterDrop' };\n super(36 /* EditorOption.dropIntoEditor */, 'dropIntoEditor', defaults, {\n 'editor.dropIntoEditor.enabled': {\n type: 'boolean',\n default: defaults.enabled,\n markdownDescription: nls.localize('dropIntoEditor.enabled', \"Controls whether you can drag and drop a file into a text editor by holding down the `Shift` key (instead of opening the file in an editor).\"),\n },\n 'editor.dropIntoEditor.showDropSelector': {\n type: 'string',\n markdownDescription: nls.localize('dropIntoEditor.showDropSelector', \"Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped.\"),\n enum: [\n 'afterDrop',\n 'never'\n ],\n enumDescriptions: [\n nls.localize('dropIntoEditor.showDropSelector.afterDrop', \"Show the drop selector widget after a file is dropped into the editor.\"),\n nls.localize('dropIntoEditor.showDropSelector.never', \"Never show the drop selector widget. Instead the default drop provider is always used.\"),\n ],\n default: 'afterDrop',\n },\n });\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n return {\n enabled: boolean(input.enabled, this.defaultValue.enabled),\n showDropSelector: stringSet(input.showDropSelector, this.defaultValue.showDropSelector, ['afterDrop', 'never']),\n };\n }\n}\nclass EditorPasteAs extends BaseEditorOption {\n constructor() {\n const defaults = { enabled: true, showPasteSelector: 'afterPaste' };\n super(84 /* EditorOption.pasteAs */, 'pasteAs', defaults, {\n 'editor.pasteAs.enabled': {\n type: 'boolean',\n default: defaults.enabled,\n markdownDescription: nls.localize('pasteAs.enabled', \"Controls whether you can paste content in different ways.\"),\n },\n 'editor.pasteAs.showPasteSelector': {\n type: 'string',\n markdownDescription: nls.localize('pasteAs.showPasteSelector', \"Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted.\"),\n enum: [\n 'afterPaste',\n 'never'\n ],\n enumDescriptions: [\n nls.localize('pasteAs.showPasteSelector.afterPaste', \"Show the paste selector widget after content is pasted into the editor.\"),\n nls.localize('pasteAs.showPasteSelector.never', \"Never show the paste selector widget. Instead the default pasting behavior is always used.\"),\n ],\n default: 'afterPaste',\n },\n });\n }\n validate(_input) {\n if (!_input || typeof _input !== 'object') {\n return this.defaultValue;\n }\n const input = _input;\n return {\n enabled: boolean(input.enabled, this.defaultValue.enabled),\n showPasteSelector: stringSet(input.showPasteSelector, this.defaultValue.showPasteSelector, ['afterPaste', 'never']),\n };\n }\n}\n//#endregion\nconst DEFAULT_WINDOWS_FONT_FAMILY = 'Consolas, \\'Courier New\\', monospace';\nconst DEFAULT_MAC_FONT_FAMILY = 'Menlo, Monaco, \\'Courier New\\', monospace';\nconst DEFAULT_LINUX_FONT_FAMILY = '\\'Droid Sans Mono\\', \\'monospace\\', monospace';\n/**\n * @internal\n */\nexport const EDITOR_FONT_DEFAULTS = {\n fontFamily: (platform.isMacintosh ? DEFAULT_MAC_FONT_FAMILY : (platform.isLinux ? DEFAULT_LINUX_FONT_FAMILY : DEFAULT_WINDOWS_FONT_FAMILY)),\n fontWeight: 'normal',\n fontSize: (platform.isMacintosh ? 12 : 14),\n lineHeight: 0,\n letterSpacing: 0,\n};\n/**\n * @internal\n */\nexport const editorOptionsRegistry = [];\nfunction register(option) {\n editorOptionsRegistry[option.id] = option;\n return option;\n}\nexport const EditorOptions = {\n acceptSuggestionOnCommitCharacter: register(new EditorBooleanOption(0 /* EditorOption.acceptSuggestionOnCommitCharacter */, 'acceptSuggestionOnCommitCharacter', true, { markdownDescription: nls.localize('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.\") })),\n acceptSuggestionOnEnter: register(new EditorStringEnumOption(1 /* EditorOption.acceptSuggestionOnEnter */, 'acceptSuggestionOnEnter', 'on', ['on', 'smart', 'off'], {\n markdownEnumDescriptions: [\n '',\n nls.localize('acceptSuggestionOnEnterSmart', \"Only accept a suggestion with `Enter` when it makes a textual change.\"),\n ''\n ],\n markdownDescription: nls.localize('acceptSuggestionOnEnter', \"Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.\")\n })),\n accessibilitySupport: register(new EditorAccessibilitySupport()),\n accessibilityPageSize: register(new EditorIntOption(3 /* EditorOption.accessibilityPageSize */, 'accessibilityPageSize', 10, 1, 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */, {\n description: nls.localize('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.\"),\n tags: ['accessibility']\n })),\n ariaLabel: register(new EditorStringOption(4 /* EditorOption.ariaLabel */, 'ariaLabel', nls.localize('editorViewAccessibleLabel', \"Editor content\"))),\n ariaRequired: register(new EditorBooleanOption(5 /* EditorOption.ariaRequired */, 'ariaRequired', false, undefined)),\n screenReaderAnnounceInlineSuggestion: register(new EditorBooleanOption(8 /* EditorOption.screenReaderAnnounceInlineSuggestion */, 'screenReaderAnnounceInlineSuggestion', true, {\n description: nls.localize('screenReaderAnnounceInlineSuggestion', \"Control whether inline suggestions are announced by a screen reader.\"),\n tags: ['accessibility']\n })),\n autoClosingBrackets: register(new EditorStringEnumOption(6 /* EditorOption.autoClosingBrackets */, 'autoClosingBrackets', 'languageDefined', ['always', 'languageDefined', 'beforeWhitespace', 'never'], {\n enumDescriptions: [\n '',\n nls.localize('editor.autoClosingBrackets.languageDefined', \"Use language configurations to determine when to autoclose brackets.\"),\n nls.localize('editor.autoClosingBrackets.beforeWhitespace', \"Autoclose brackets only when the cursor is to the left of whitespace.\"),\n '',\n ],\n description: nls.localize('autoClosingBrackets', \"Controls whether the editor should automatically close brackets after the user adds an opening bracket.\")\n })),\n autoClosingComments: register(new EditorStringEnumOption(7 /* EditorOption.autoClosingComments */, 'autoClosingComments', 'languageDefined', ['always', 'languageDefined', 'beforeWhitespace', 'never'], {\n enumDescriptions: [\n '',\n nls.localize('editor.autoClosingComments.languageDefined', \"Use language configurations to determine when to autoclose comments.\"),\n nls.localize('editor.autoClosingComments.beforeWhitespace', \"Autoclose comments only when the cursor is to the left of whitespace.\"),\n '',\n ],\n description: nls.localize('autoClosingComments', \"Controls whether the editor should automatically close comments after the user adds an opening comment.\")\n })),\n autoClosingDelete: register(new EditorStringEnumOption(9 /* EditorOption.autoClosingDelete */, 'autoClosingDelete', 'auto', ['always', 'auto', 'never'], {\n enumDescriptions: [\n '',\n nls.localize('editor.autoClosingDelete.auto', \"Remove adjacent closing quotes or brackets only if they were automatically inserted.\"),\n '',\n ],\n description: nls.localize('autoClosingDelete', \"Controls whether the editor should remove adjacent closing quotes or brackets when deleting.\")\n })),\n autoClosingOvertype: register(new EditorStringEnumOption(10 /* EditorOption.autoClosingOvertype */, 'autoClosingOvertype', 'auto', ['always', 'auto', 'never'], {\n enumDescriptions: [\n '',\n nls.localize('editor.autoClosingOvertype.auto', \"Type over closing quotes or brackets only if they were automatically inserted.\"),\n '',\n ],\n description: nls.localize('autoClosingOvertype', \"Controls whether the editor should type over closing quotes or brackets.\")\n })),\n autoClosingQuotes: register(new EditorStringEnumOption(11 /* EditorOption.autoClosingQuotes */, 'autoClosingQuotes', 'languageDefined', ['always', 'languageDefined', 'beforeWhitespace', 'never'], {\n enumDescriptions: [\n '',\n nls.localize('editor.autoClosingQuotes.languageDefined', \"Use language configurations to determine when to autoclose quotes.\"),\n nls.localize('editor.autoClosingQuotes.beforeWhitespace', \"Autoclose quotes only when the cursor is to the left of whitespace.\"),\n '',\n ],\n description: nls.localize('autoClosingQuotes', \"Controls whether the editor should automatically close quotes after the user adds an opening quote.\")\n })),\n autoIndent: register(new EditorEnumOption(12 /* EditorOption.autoIndent */, 'autoIndent', 4 /* EditorAutoIndentStrategy.Full */, 'full', ['none', 'keep', 'brackets', 'advanced', 'full'], _autoIndentFromString, {\n enumDescriptions: [\n nls.localize('editor.autoIndent.none', \"The editor will not insert indentation automatically.\"),\n nls.localize('editor.autoIndent.keep', \"The editor will keep the current line's indentation.\"),\n nls.localize('editor.autoIndent.brackets', \"The editor will keep the current line's indentation and honor language defined brackets.\"),\n nls.localize('editor.autoIndent.advanced', \"The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages.\"),\n nls.localize('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.\"),\n ],\n description: nls.localize('autoIndent', \"Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.\")\n })),\n automaticLayout: register(new EditorBooleanOption(13 /* EditorOption.automaticLayout */, 'automaticLayout', false)),\n autoSurround: register(new EditorStringEnumOption(14 /* EditorOption.autoSurround */, 'autoSurround', 'languageDefined', ['languageDefined', 'quotes', 'brackets', 'never'], {\n enumDescriptions: [\n nls.localize('editor.autoSurround.languageDefined', \"Use language configurations to determine when to automatically surround selections.\"),\n nls.localize('editor.autoSurround.quotes', \"Surround with quotes but not brackets.\"),\n nls.localize('editor.autoSurround.brackets', \"Surround with brackets but not quotes.\"),\n ''\n ],\n description: nls.localize('autoSurround', \"Controls whether the editor should automatically surround selections when typing quotes or brackets.\")\n })),\n bracketPairColorization: register(new BracketPairColorization()),\n bracketPairGuides: register(new GuideOptions()),\n stickyTabStops: register(new EditorBooleanOption(115 /* EditorOption.stickyTabStops */, 'stickyTabStops', false, { description: nls.localize('stickyTabStops', \"Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.\") })),\n codeLens: register(new EditorBooleanOption(17 /* EditorOption.codeLens */, 'codeLens', true, { description: nls.localize('codeLens', \"Controls whether the editor shows CodeLens.\") })),\n codeLensFontFamily: register(new EditorStringOption(18 /* EditorOption.codeLensFontFamily */, 'codeLensFontFamily', '', { description: nls.localize('codeLensFontFamily', \"Controls the font family for CodeLens.\") })),\n codeLensFontSize: register(new EditorIntOption(19 /* EditorOption.codeLensFontSize */, 'codeLensFontSize', 0, 0, 100, {\n type: 'number',\n default: 0,\n minimum: 0,\n maximum: 100,\n markdownDescription: nls.localize('codeLensFontSize', \"Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.\")\n })),\n colorDecorators: register(new EditorBooleanOption(20 /* EditorOption.colorDecorators */, 'colorDecorators', true, { description: nls.localize('colorDecorators', \"Controls whether the editor should render the inline color decorators and color picker.\") })),\n colorDecoratorActivatedOn: register(new EditorStringEnumOption(146 /* EditorOption.colorDecoratorsActivatedOn */, 'colorDecoratorsActivatedOn', 'clickAndHover', ['clickAndHover', 'hover', 'click'], {\n enumDescriptions: [\n nls.localize('editor.colorDecoratorActivatedOn.clickAndHover', \"Make the color picker appear both on click and hover of the color decorator\"),\n nls.localize('editor.colorDecoratorActivatedOn.hover', \"Make the color picker appear on hover of the color decorator\"),\n nls.localize('editor.colorDecoratorActivatedOn.click', \"Make the color picker appear on click of the color decorator\")\n ],\n description: nls.localize('colorDecoratorActivatedOn', \"Controls the condition to make a color picker appear from a color decorator\")\n })),\n colorDecoratorsLimit: register(new EditorIntOption(21 /* EditorOption.colorDecoratorsLimit */, 'colorDecoratorsLimit', 500, 1, 1000000, {\n markdownDescription: nls.localize('colorDecoratorsLimit', \"Controls the max number of color decorators that can be rendered in an editor at once.\")\n })),\n columnSelection: register(new EditorBooleanOption(22 /* EditorOption.columnSelection */, 'columnSelection', false, { description: nls.localize('columnSelection', \"Enable that the selection with the mouse and keys is doing column selection.\") })),\n comments: register(new EditorComments()),\n contextmenu: register(new EditorBooleanOption(24 /* EditorOption.contextmenu */, 'contextmenu', true)),\n copyWithSyntaxHighlighting: register(new EditorBooleanOption(25 /* EditorOption.copyWithSyntaxHighlighting */, 'copyWithSyntaxHighlighting', true, { description: nls.localize('copyWithSyntaxHighlighting', \"Controls whether syntax highlighting should be copied into the clipboard.\") })),\n cursorBlinking: register(new EditorEnumOption(26 /* EditorOption.cursorBlinking */, 'cursorBlinking', 1 /* TextEditorCursorBlinkingStyle.Blink */, 'blink', ['blink', 'smooth', 'phase', 'expand', 'solid'], _cursorBlinkingStyleFromString, { description: nls.localize('cursorBlinking', \"Control the cursor animation style.\") })),\n cursorSmoothCaretAnimation: register(new EditorStringEnumOption(27 /* EditorOption.cursorSmoothCaretAnimation */, 'cursorSmoothCaretAnimation', 'off', ['off', 'explicit', 'on'], {\n enumDescriptions: [\n nls.localize('cursorSmoothCaretAnimation.off', \"Smooth caret animation is disabled.\"),\n nls.localize('cursorSmoothCaretAnimation.explicit', \"Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture.\"),\n nls.localize('cursorSmoothCaretAnimation.on', \"Smooth caret animation is always enabled.\")\n ],\n description: nls.localize('cursorSmoothCaretAnimation', \"Controls whether the smooth caret animation should be enabled.\")\n })),\n cursorStyle: register(new EditorEnumOption(28 /* EditorOption.cursorStyle */, 'cursorStyle', TextEditorCursorStyle.Line, 'line', ['line', 'block', 'underline', 'line-thin', 'block-outline', 'underline-thin'], _cursorStyleFromString, { description: nls.localize('cursorStyle', \"Controls the cursor style.\") })),\n cursorSurroundingLines: register(new EditorIntOption(29 /* EditorOption.cursorSurroundingLines */, 'cursorSurroundingLines', 0, 0, 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */, { description: nls.localize('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.\") })),\n cursorSurroundingLinesStyle: register(new EditorStringEnumOption(30 /* EditorOption.cursorSurroundingLinesStyle */, 'cursorSurroundingLinesStyle', 'default', ['default', 'all'], {\n enumDescriptions: [\n nls.localize('cursorSurroundingLinesStyle.default', \"`cursorSurroundingLines` is enforced only when triggered via the keyboard or API.\"),\n nls.localize('cursorSurroundingLinesStyle.all', \"`cursorSurroundingLines` is enforced always.\")\n ],\n markdownDescription: nls.localize('cursorSurroundingLinesStyle', \"Controls when `#cursorSurroundingLines#` should be enforced.\")\n })),\n cursorWidth: register(new EditorIntOption(31 /* EditorOption.cursorWidth */, 'cursorWidth', 0, 0, 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */, { markdownDescription: nls.localize('cursorWidth', \"Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.\") })),\n disableLayerHinting: register(new EditorBooleanOption(32 /* EditorOption.disableLayerHinting */, 'disableLayerHinting', false)),\n disableMonospaceOptimizations: register(new EditorBooleanOption(33 /* EditorOption.disableMonospaceOptimizations */, 'disableMonospaceOptimizations', false)),\n domReadOnly: register(new EditorBooleanOption(34 /* EditorOption.domReadOnly */, 'domReadOnly', false)),\n dragAndDrop: register(new EditorBooleanOption(35 /* EditorOption.dragAndDrop */, 'dragAndDrop', true, { description: nls.localize('dragAndDrop', \"Controls whether the editor should allow moving selections via drag and drop.\") })),\n emptySelectionClipboard: register(new EditorEmptySelectionClipboard()),\n dropIntoEditor: register(new EditorDropIntoEditor()),\n stickyScroll: register(new EditorStickyScroll()),\n experimentalWhitespaceRendering: register(new EditorStringEnumOption(38 /* EditorOption.experimentalWhitespaceRendering */, 'experimentalWhitespaceRendering', 'svg', ['svg', 'font', 'off'], {\n enumDescriptions: [\n nls.localize('experimentalWhitespaceRendering.svg', \"Use a new rendering method with svgs.\"),\n nls.localize('experimentalWhitespaceRendering.font', \"Use a new rendering method with font characters.\"),\n nls.localize('experimentalWhitespaceRendering.off', \"Use the stable rendering method.\"),\n ],\n description: nls.localize('experimentalWhitespaceRendering', \"Controls whether whitespace is rendered with a new, experimental method.\")\n })),\n extraEditorClassName: register(new EditorStringOption(39 /* EditorOption.extraEditorClassName */, 'extraEditorClassName', '')),\n fastScrollSensitivity: register(new EditorFloatOption(40 /* EditorOption.fastScrollSensitivity */, 'fastScrollSensitivity', 5, x => (x <= 0 ? 5 : x), { markdownDescription: nls.localize('fastScrollSensitivity', \"Scrolling speed multiplier when pressing `Alt`.\") })),\n find: register(new EditorFind()),\n fixedOverflowWidgets: register(new EditorBooleanOption(42 /* EditorOption.fixedOverflowWidgets */, 'fixedOverflowWidgets', false)),\n folding: register(new EditorBooleanOption(43 /* EditorOption.folding */, 'folding', true, { description: nls.localize('folding', \"Controls whether the editor has code folding enabled.\") })),\n foldingStrategy: register(new EditorStringEnumOption(44 /* EditorOption.foldingStrategy */, 'foldingStrategy', 'auto', ['auto', 'indentation'], {\n enumDescriptions: [\n nls.localize('foldingStrategy.auto', \"Use a language-specific folding strategy if available, else the indentation-based one.\"),\n nls.localize('foldingStrategy.indentation', \"Use the indentation-based folding strategy.\"),\n ],\n description: nls.localize('foldingStrategy', \"Controls the strategy for computing folding ranges.\")\n })),\n foldingHighlight: register(new EditorBooleanOption(45 /* EditorOption.foldingHighlight */, 'foldingHighlight', true, { description: nls.localize('foldingHighlight', \"Controls whether the editor should highlight folded ranges.\") })),\n foldingImportsByDefault: register(new EditorBooleanOption(46 /* EditorOption.foldingImportsByDefault */, 'foldingImportsByDefault', false, { description: nls.localize('foldingImportsByDefault', \"Controls whether the editor automatically collapses import ranges.\") })),\n foldingMaximumRegions: register(new EditorIntOption(47 /* EditorOption.foldingMaximumRegions */, 'foldingMaximumRegions', 5000, 10, 65000, // limit must be less than foldingRanges MAX_FOLDING_REGIONS\n { description: nls.localize('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.\") })),\n unfoldOnClickAfterEndOfLine: register(new EditorBooleanOption(48 /* EditorOption.unfoldOnClickAfterEndOfLine */, 'unfoldOnClickAfterEndOfLine', false, { description: nls.localize('unfoldOnClickAfterEndOfLine', \"Controls whether clicking on the empty content after a folded line will unfold the line.\") })),\n fontFamily: register(new EditorStringOption(49 /* EditorOption.fontFamily */, 'fontFamily', EDITOR_FONT_DEFAULTS.fontFamily, { description: nls.localize('fontFamily', \"Controls the font family.\") })),\n fontInfo: register(new EditorFontInfo()),\n fontLigatures2: register(new EditorFontLigatures()),\n fontSize: register(new EditorFontSize()),\n fontWeight: register(new EditorFontWeight()),\n fontVariations: register(new EditorFontVariations()),\n formatOnPaste: register(new EditorBooleanOption(55 /* EditorOption.formatOnPaste */, 'formatOnPaste', false, { description: nls.localize('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.\") })),\n formatOnType: register(new EditorBooleanOption(56 /* EditorOption.formatOnType */, 'formatOnType', false, { description: nls.localize('formatOnType', \"Controls whether the editor should automatically format the line after typing.\") })),\n glyphMargin: register(new EditorBooleanOption(57 /* EditorOption.glyphMargin */, 'glyphMargin', true, { description: nls.localize('glyphMargin', \"Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.\") })),\n gotoLocation: register(new EditorGoToLocation()),\n hideCursorInOverviewRuler: register(new EditorBooleanOption(59 /* EditorOption.hideCursorInOverviewRuler */, 'hideCursorInOverviewRuler', false, { description: nls.localize('hideCursorInOverviewRuler', \"Controls whether the cursor should be hidden in the overview ruler.\") })),\n hover: register(new EditorHover()),\n inDiffEditor: register(new EditorBooleanOption(61 /* EditorOption.inDiffEditor */, 'inDiffEditor', false)),\n letterSpacing: register(new EditorFloatOption(63 /* EditorOption.letterSpacing */, 'letterSpacing', EDITOR_FONT_DEFAULTS.letterSpacing, x => EditorFloatOption.clamp(x, -5, 20), { description: nls.localize('letterSpacing', \"Controls the letter spacing in pixels.\") })),\n lightbulb: register(new EditorLightbulb()),\n lineDecorationsWidth: register(new EditorLineDecorationsWidth()),\n lineHeight: register(new EditorLineHeight()),\n lineNumbers: register(new EditorRenderLineNumbersOption()),\n lineNumbersMinChars: register(new EditorIntOption(68 /* EditorOption.lineNumbersMinChars */, 'lineNumbersMinChars', 5, 1, 300)),\n linkedEditing: register(new EditorBooleanOption(69 /* EditorOption.linkedEditing */, 'linkedEditing', false, { description: nls.localize('linkedEditing', \"Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.\") })),\n links: register(new EditorBooleanOption(70 /* EditorOption.links */, 'links', true, { description: nls.localize('links', \"Controls whether the editor should detect links and make them clickable.\") })),\n matchBrackets: register(new EditorStringEnumOption(71 /* EditorOption.matchBrackets */, 'matchBrackets', 'always', ['always', 'near', 'never'], { description: nls.localize('matchBrackets', \"Highlight matching brackets.\") })),\n minimap: register(new EditorMinimap()),\n mouseStyle: register(new EditorStringEnumOption(73 /* EditorOption.mouseStyle */, 'mouseStyle', 'text', ['text', 'default', 'copy'])),\n mouseWheelScrollSensitivity: register(new EditorFloatOption(74 /* EditorOption.mouseWheelScrollSensitivity */, 'mouseWheelScrollSensitivity', 1, x => (x === 0 ? 1 : x), { markdownDescription: nls.localize('mouseWheelScrollSensitivity', \"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.\") })),\n mouseWheelZoom: register(new EditorBooleanOption(75 /* EditorOption.mouseWheelZoom */, 'mouseWheelZoom', false, {\n markdownDescription: platform.isMacintosh\n ? nls.localize('mouseWheelZoom.mac', \"Zoom the font of the editor when using mouse wheel and holding `Cmd`.\")\n : nls.localize('mouseWheelZoom', \"Zoom the font of the editor when using mouse wheel and holding `Ctrl`.\")\n })),\n multiCursorMergeOverlapping: register(new EditorBooleanOption(76 /* EditorOption.multiCursorMergeOverlapping */, 'multiCursorMergeOverlapping', true, { description: nls.localize('multiCursorMergeOverlapping', \"Merge multiple cursors when they are overlapping.\") })),\n multiCursorModifier: register(new EditorEnumOption(77 /* EditorOption.multiCursorModifier */, 'multiCursorModifier', 'altKey', 'alt', ['ctrlCmd', 'alt'], _multiCursorModifierFromString, {\n markdownEnumDescriptions: [\n nls.localize('multiCursorModifier.ctrlCmd', \"Maps to `Control` on Windows and Linux and to `Command` on macOS.\"),\n nls.localize('multiCursorModifier.alt', \"Maps to `Alt` on Windows and Linux and to `Option` on macOS.\")\n ],\n markdownDescription: nls.localize({\n key: 'multiCursorModifier',\n comment: [\n '- `ctrlCmd` refers to a value the setting can take and should not be localized.',\n '- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized.'\n ]\n }, \"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).\")\n })),\n multiCursorPaste: register(new EditorStringEnumOption(78 /* EditorOption.multiCursorPaste */, 'multiCursorPaste', 'spread', ['spread', 'full'], {\n markdownEnumDescriptions: [\n nls.localize('multiCursorPaste.spread', \"Each cursor pastes a single line of the text.\"),\n nls.localize('multiCursorPaste.full', \"Each cursor pastes the full text.\")\n ],\n markdownDescription: nls.localize('multiCursorPaste', \"Controls pasting when the line count of the pasted text matches the cursor count.\")\n })),\n multiCursorLimit: register(new EditorIntOption(79 /* EditorOption.multiCursorLimit */, 'multiCursorLimit', 10000, 1, 100000, {\n markdownDescription: nls.localize('multiCursorLimit', \"Controls the max number of cursors that can be in an active editor at once.\")\n })),\n occurrencesHighlight: register(new EditorStringEnumOption(80 /* EditorOption.occurrencesHighlight */, 'occurrencesHighlight', 'singleFile', ['off', 'singleFile', 'multiFile'], {\n markdownEnumDescriptions: [\n nls.localize('occurrencesHighlight.off', \"Does not highlight occurrences.\"),\n nls.localize('occurrencesHighlight.singleFile', \"Highlights occurrences only in the current file.\"),\n nls.localize('occurrencesHighlight.multiFile', \"Experimental: Highlights occurrences across all valid open files.\")\n ],\n markdownDescription: nls.localize('occurrencesHighlight', \"Controls whether occurrences should be highlighted across open files.\")\n })),\n overviewRulerBorder: register(new EditorBooleanOption(81 /* EditorOption.overviewRulerBorder */, 'overviewRulerBorder', true, { description: nls.localize('overviewRulerBorder', \"Controls whether a border should be drawn around the overview ruler.\") })),\n overviewRulerLanes: register(new EditorIntOption(82 /* EditorOption.overviewRulerLanes */, 'overviewRulerLanes', 3, 0, 3)),\n padding: register(new EditorPadding()),\n pasteAs: register(new EditorPasteAs()),\n parameterHints: register(new EditorParameterHints()),\n peekWidgetDefaultFocus: register(new EditorStringEnumOption(86 /* EditorOption.peekWidgetDefaultFocus */, 'peekWidgetDefaultFocus', 'tree', ['tree', 'editor'], {\n enumDescriptions: [\n nls.localize('peekWidgetDefaultFocus.tree', \"Focus the tree when opening peek\"),\n nls.localize('peekWidgetDefaultFocus.editor', \"Focus the editor when opening peek\")\n ],\n description: nls.localize('peekWidgetDefaultFocus', \"Controls whether to focus the inline editor or the tree in the peek widget.\")\n })),\n definitionLinkOpensInPeek: register(new EditorBooleanOption(87 /* EditorOption.definitionLinkOpensInPeek */, 'definitionLinkOpensInPeek', false, { description: nls.localize('definitionLinkOpensInPeek', \"Controls whether the Go to Definition mouse gesture always opens the peek widget.\") })),\n quickSuggestions: register(new EditorQuickSuggestions()),\n quickSuggestionsDelay: register(new EditorIntOption(89 /* EditorOption.quickSuggestionsDelay */, 'quickSuggestionsDelay', 10, 0, 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */, { description: nls.localize('quickSuggestionsDelay', \"Controls the delay in milliseconds after which quick suggestions will show up.\") })),\n readOnly: register(new EditorBooleanOption(90 /* EditorOption.readOnly */, 'readOnly', false)),\n readOnlyMessage: register(new ReadonlyMessage()),\n renameOnType: register(new EditorBooleanOption(92 /* EditorOption.renameOnType */, 'renameOnType', false, { description: nls.localize('renameOnType', \"Controls whether the editor auto renames on type.\"), markdownDeprecationMessage: nls.localize('renameOnTypeDeprecate', \"Deprecated, use `editor.linkedEditing` instead.\") })),\n renderControlCharacters: register(new EditorBooleanOption(93 /* EditorOption.renderControlCharacters */, 'renderControlCharacters', true, { description: nls.localize('renderControlCharacters', \"Controls whether the editor should render control characters.\"), restricted: true })),\n renderFinalNewline: register(new EditorStringEnumOption(94 /* EditorOption.renderFinalNewline */, 'renderFinalNewline', (platform.isLinux ? 'dimmed' : 'on'), ['off', 'on', 'dimmed'], { description: nls.localize('renderFinalNewline', \"Render last line number when the file ends with a newline.\") })),\n renderLineHighlight: register(new EditorStringEnumOption(95 /* EditorOption.renderLineHighlight */, 'renderLineHighlight', 'line', ['none', 'gutter', 'line', 'all'], {\n enumDescriptions: [\n '',\n '',\n '',\n nls.localize('renderLineHighlight.all', \"Highlights both the gutter and the current line.\"),\n ],\n description: nls.localize('renderLineHighlight', \"Controls how the editor should render the current line highlight.\")\n })),\n renderLineHighlightOnlyWhenFocus: register(new EditorBooleanOption(96 /* EditorOption.renderLineHighlightOnlyWhenFocus */, 'renderLineHighlightOnlyWhenFocus', false, { description: nls.localize('renderLineHighlightOnlyWhenFocus', \"Controls if the editor should render the current line highlight only when the editor is focused.\") })),\n renderValidationDecorations: register(new EditorStringEnumOption(97 /* EditorOption.renderValidationDecorations */, 'renderValidationDecorations', 'editable', ['editable', 'on', 'off'])),\n renderWhitespace: register(new EditorStringEnumOption(98 /* EditorOption.renderWhitespace */, 'renderWhitespace', 'selection', ['none', 'boundary', 'selection', 'trailing', 'all'], {\n enumDescriptions: [\n '',\n nls.localize('renderWhitespace.boundary', \"Render whitespace characters except for single spaces between words.\"),\n nls.localize('renderWhitespace.selection', \"Render whitespace characters only on selected text.\"),\n nls.localize('renderWhitespace.trailing', \"Render only trailing whitespace characters.\"),\n ''\n ],\n description: nls.localize('renderWhitespace', \"Controls how the editor should render whitespace characters.\")\n })),\n revealHorizontalRightPadding: register(new EditorIntOption(99 /* EditorOption.revealHorizontalRightPadding */, 'revealHorizontalRightPadding', 15, 0, 1000)),\n roundedSelection: register(new EditorBooleanOption(100 /* EditorOption.roundedSelection */, 'roundedSelection', true, { description: nls.localize('roundedSelection', \"Controls whether selections should have rounded corners.\") })),\n rulers: register(new EditorRulers()),\n scrollbar: register(new EditorScrollbar()),\n scrollBeyondLastColumn: register(new EditorIntOption(103 /* EditorOption.scrollBeyondLastColumn */, 'scrollBeyondLastColumn', 4, 0, 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */, { description: nls.localize('scrollBeyondLastColumn', \"Controls the number of extra characters beyond which the editor will scroll horizontally.\") })),\n scrollBeyondLastLine: register(new EditorBooleanOption(104 /* EditorOption.scrollBeyondLastLine */, 'scrollBeyondLastLine', true, { description: nls.localize('scrollBeyondLastLine', \"Controls whether the editor will scroll beyond the last line.\") })),\n scrollPredominantAxis: register(new EditorBooleanOption(105 /* EditorOption.scrollPredominantAxis */, 'scrollPredominantAxis', true, { description: nls.localize('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.\") })),\n selectionClipboard: register(new EditorBooleanOption(106 /* EditorOption.selectionClipboard */, 'selectionClipboard', true, {\n description: nls.localize('selectionClipboard', \"Controls whether the Linux primary clipboard should be supported.\"),\n included: platform.isLinux\n })),\n selectionHighlight: register(new EditorBooleanOption(107 /* EditorOption.selectionHighlight */, 'selectionHighlight', true, { description: nls.localize('selectionHighlight', \"Controls whether the editor should highlight matches similar to the selection.\") })),\n selectOnLineNumbers: register(new EditorBooleanOption(108 /* EditorOption.selectOnLineNumbers */, 'selectOnLineNumbers', true)),\n showFoldingControls: register(new EditorStringEnumOption(109 /* EditorOption.showFoldingControls */, 'showFoldingControls', 'mouseover', ['always', 'never', 'mouseover'], {\n enumDescriptions: [\n nls.localize('showFoldingControls.always', \"Always show the folding controls.\"),\n nls.localize('showFoldingControls.never', \"Never show the folding controls and reduce the gutter size.\"),\n nls.localize('showFoldingControls.mouseover', \"Only show the folding controls when the mouse is over the gutter.\"),\n ],\n description: nls.localize('showFoldingControls', \"Controls when the folding controls on the gutter are shown.\")\n })),\n showUnused: register(new EditorBooleanOption(110 /* EditorOption.showUnused */, 'showUnused', true, { description: nls.localize('showUnused', \"Controls fading out of unused code.\") })),\n showDeprecated: register(new EditorBooleanOption(138 /* EditorOption.showDeprecated */, 'showDeprecated', true, { description: nls.localize('showDeprecated', \"Controls strikethrough deprecated variables.\") })),\n inlayHints: register(new EditorInlayHints()),\n snippetSuggestions: register(new EditorStringEnumOption(111 /* EditorOption.snippetSuggestions */, 'snippetSuggestions', 'inline', ['top', 'bottom', 'inline', 'none'], {\n enumDescriptions: [\n nls.localize('snippetSuggestions.top', \"Show snippet suggestions on top of other suggestions.\"),\n nls.localize('snippetSuggestions.bottom', \"Show snippet suggestions below other suggestions.\"),\n nls.localize('snippetSuggestions.inline', \"Show snippets suggestions with other suggestions.\"),\n nls.localize('snippetSuggestions.none', \"Do not show snippet suggestions.\"),\n ],\n description: nls.localize('snippetSuggestions', \"Controls whether snippets are shown with other suggestions and how they are sorted.\")\n })),\n smartSelect: register(new SmartSelect()),\n smoothScrolling: register(new EditorBooleanOption(113 /* EditorOption.smoothScrolling */, 'smoothScrolling', false, { description: nls.localize('smoothScrolling', \"Controls whether the editor will scroll using an animation.\") })),\n stopRenderingLineAfter: register(new EditorIntOption(116 /* EditorOption.stopRenderingLineAfter */, 'stopRenderingLineAfter', 10000, -1, 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */)),\n suggest: register(new EditorSuggest()),\n inlineSuggest: register(new InlineEditorSuggest()),\n inlineCompletionsAccessibilityVerbose: register(new EditorBooleanOption(147 /* EditorOption.inlineCompletionsAccessibilityVerbose */, 'inlineCompletionsAccessibilityVerbose', false, { description: nls.localize('inlineCompletionsAccessibilityVerbose', \"Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.\") })),\n suggestFontSize: register(new EditorIntOption(118 /* EditorOption.suggestFontSize */, 'suggestFontSize', 0, 0, 1000, { markdownDescription: nls.localize('suggestFontSize', \"Font size for the suggest widget. When set to {0}, the value of {1} is used.\", '`0`', '`#editor.fontSize#`') })),\n suggestLineHeight: register(new EditorIntOption(119 /* EditorOption.suggestLineHeight */, 'suggestLineHeight', 0, 0, 1000, { markdownDescription: nls.localize('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#`') })),\n suggestOnTriggerCharacters: register(new EditorBooleanOption(120 /* EditorOption.suggestOnTriggerCharacters */, 'suggestOnTriggerCharacters', true, { description: nls.localize('suggestOnTriggerCharacters', \"Controls whether suggestions should automatically show up when typing trigger characters.\") })),\n suggestSelection: register(new EditorStringEnumOption(121 /* EditorOption.suggestSelection */, 'suggestSelection', 'first', ['first', 'recentlyUsed', 'recentlyUsedByPrefix'], {\n markdownEnumDescriptions: [\n nls.localize('suggestSelection.first', \"Always select the first suggestion.\"),\n nls.localize('suggestSelection.recentlyUsed', \"Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently.\"),\n nls.localize('suggestSelection.recentlyUsedByPrefix', \"Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.\"),\n ],\n description: nls.localize('suggestSelection', \"Controls how suggestions are pre-selected when showing the suggest list.\")\n })),\n tabCompletion: register(new EditorStringEnumOption(122 /* EditorOption.tabCompletion */, 'tabCompletion', 'off', ['on', 'off', 'onlySnippets'], {\n enumDescriptions: [\n nls.localize('tabCompletion.on', \"Tab complete will insert the best matching suggestion when pressing tab.\"),\n nls.localize('tabCompletion.off', \"Disable tab completions.\"),\n nls.localize('tabCompletion.onlySnippets', \"Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.\"),\n ],\n description: nls.localize('tabCompletion', \"Enables tab completions.\")\n })),\n tabIndex: register(new EditorIntOption(123 /* EditorOption.tabIndex */, 'tabIndex', 0, -1, 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */)),\n unicodeHighlight: register(new UnicodeHighlight()),\n unusualLineTerminators: register(new EditorStringEnumOption(125 /* EditorOption.unusualLineTerminators */, 'unusualLineTerminators', 'prompt', ['auto', 'off', 'prompt'], {\n enumDescriptions: [\n nls.localize('unusualLineTerminators.auto', \"Unusual line terminators are automatically removed.\"),\n nls.localize('unusualLineTerminators.off', \"Unusual line terminators are ignored.\"),\n nls.localize('unusualLineTerminators.prompt', \"Unusual line terminators prompt to be removed.\"),\n ],\n description: nls.localize('unusualLineTerminators', \"Remove unusual line terminators that might cause problems.\")\n })),\n useShadowDOM: register(new EditorBooleanOption(126 /* EditorOption.useShadowDOM */, 'useShadowDOM', true)),\n useTabStops: register(new EditorBooleanOption(127 /* EditorOption.useTabStops */, 'useTabStops', true, { description: nls.localize('useTabStops', \"Inserting and deleting whitespace follows tab stops.\") })),\n wordBreak: register(new EditorStringEnumOption(128 /* EditorOption.wordBreak */, 'wordBreak', 'normal', ['normal', 'keepAll'], {\n markdownEnumDescriptions: [\n nls.localize('wordBreak.normal', \"Use the default line break rule.\"),\n nls.localize('wordBreak.keepAll', \"Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.\"),\n ],\n description: nls.localize('wordBreak', \"Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.\")\n })),\n wordSeparators: register(new EditorStringOption(129 /* EditorOption.wordSeparators */, 'wordSeparators', USUAL_WORD_SEPARATORS, { description: nls.localize('wordSeparators', \"Characters that will be used as word separators when doing word related navigations or operations.\") })),\n wordWrap: register(new EditorStringEnumOption(130 /* EditorOption.wordWrap */, 'wordWrap', 'off', ['off', 'on', 'wordWrapColumn', 'bounded'], {\n markdownEnumDescriptions: [\n nls.localize('wordWrap.off', \"Lines will never wrap.\"),\n nls.localize('wordWrap.on', \"Lines will wrap at the viewport width.\"),\n nls.localize({\n key: 'wordWrap.wordWrapColumn',\n comment: [\n '- `editor.wordWrapColumn` refers to a different setting and should not be localized.'\n ]\n }, \"Lines will wrap at `#editor.wordWrapColumn#`.\"),\n nls.localize({\n key: 'wordWrap.bounded',\n comment: [\n '- viewport means the edge of the visible window size.',\n '- `editor.wordWrapColumn` refers to a different setting and should not be localized.'\n ]\n }, \"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.\"),\n ],\n description: nls.localize({\n key: 'wordWrap',\n comment: [\n '- \\'off\\', \\'on\\', \\'wordWrapColumn\\' and \\'bounded\\' refer to values the setting can take and should not be localized.',\n '- `editor.wordWrapColumn` refers to a different setting and should not be localized.'\n ]\n }, \"Controls how lines should wrap.\")\n })),\n wordWrapBreakAfterCharacters: register(new EditorStringOption(131 /* EditorOption.wordWrapBreakAfterCharacters */, 'wordWrapBreakAfterCharacters', \n // allow-any-unicode-next-line\n ' \\t})]?|/&.,;\u00A2\u00B0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63')),\n wordWrapBreakBeforeCharacters: register(new EditorStringOption(132 /* EditorOption.wordWrapBreakBeforeCharacters */, 'wordWrapBreakBeforeCharacters', \n // allow-any-unicode-next-line\n '([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\u00A3\u00A5\uFF04\uFFE1\uFFE5+\uFF0B')),\n wordWrapColumn: register(new EditorIntOption(133 /* EditorOption.wordWrapColumn */, 'wordWrapColumn', 80, 1, 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */, {\n markdownDescription: nls.localize({\n key: 'wordWrapColumn',\n comment: [\n '- `editor.wordWrap` refers to a different setting and should not be localized.',\n '- \\'wordWrapColumn\\' and \\'bounded\\' refer to values the different setting can take and should not be localized.'\n ]\n }, \"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.\")\n })),\n wordWrapOverride1: register(new EditorStringEnumOption(134 /* EditorOption.wordWrapOverride1 */, 'wordWrapOverride1', 'inherit', ['off', 'on', 'inherit'])),\n wordWrapOverride2: register(new EditorStringEnumOption(135 /* EditorOption.wordWrapOverride2 */, 'wordWrapOverride2', 'inherit', ['off', 'on', 'inherit'])),\n // Leave these at the end (because they have dependencies!)\n editorClassName: register(new EditorClassName()),\n defaultColorDecorators: register(new EditorBooleanOption(145 /* EditorOption.defaultColorDecorators */, 'defaultColorDecorators', false, { markdownDescription: nls.localize('defaultColorDecorators', \"Controls whether inline color decorations should be shown using the default document color provider\") })),\n pixelRatio: register(new EditorPixelRatio()),\n tabFocusMode: register(new EditorBooleanOption(142 /* EditorOption.tabFocusMode */, 'tabFocusMode', false, { markdownDescription: nls.localize('tabFocusMode', \"Controls whether the editor receives tabs or defers them to the workbench for navigation.\") })),\n layoutInfo: register(new EditorLayoutInfoComputer()),\n wrappingInfo: register(new EditorWrappingInfoComputer()),\n wrappingIndent: register(new WrappingIndentOption()),\n wrappingStrategy: register(new WrappingStrategy())\n};\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n// Avoid circular dependency on EventEmitter by implementing a subset of the interface.\nexport class ErrorHandler {\n constructor() {\n this.listeners = [];\n this.unexpectedErrorHandler = function (e) {\n setTimeout(() => {\n if (e.stack) {\n if (ErrorNoTelemetry.isErrorNoTelemetry(e)) {\n throw new ErrorNoTelemetry(e.message + '\\n\\n' + e.stack);\n }\n throw new Error(e.message + '\\n\\n' + e.stack);\n }\n throw e;\n }, 0);\n };\n }\n emit(e) {\n this.listeners.forEach((listener) => {\n listener(e);\n });\n }\n onUnexpectedError(e) {\n this.unexpectedErrorHandler(e);\n this.emit(e);\n }\n // For external errors, we don't want the listeners to be called\n onUnexpectedExternalError(e) {\n this.unexpectedErrorHandler(e);\n }\n}\nexport const errorHandler = new ErrorHandler();\nexport function onUnexpectedError(e) {\n // ignore errors from cancelled promises\n if (!isCancellationError(e)) {\n errorHandler.onUnexpectedError(e);\n }\n return undefined;\n}\nexport function onUnexpectedExternalError(e) {\n // ignore errors from cancelled promises\n if (!isCancellationError(e)) {\n errorHandler.onUnexpectedExternalError(e);\n }\n return undefined;\n}\nexport function transformErrorForSerialization(error) {\n if (error instanceof Error) {\n const { name, message } = error;\n const stack = error.stacktrace || error.stack;\n return {\n $isError: true,\n name,\n message,\n stack,\n noTelemetry: ErrorNoTelemetry.isErrorNoTelemetry(error)\n };\n }\n // return as is\n return error;\n}\nconst canceledName = 'Canceled';\n/**\n * Checks if the given error is a promise in canceled state\n */\nexport function isCancellationError(error) {\n if (error instanceof CancellationError) {\n return true;\n }\n return error instanceof Error && error.name === canceledName && error.message === canceledName;\n}\n// !!!IMPORTANT!!!\n// Do NOT change this class because it is also used as an API-type.\nexport class CancellationError extends Error {\n constructor() {\n super(canceledName);\n this.name = this.message;\n }\n}\n/**\n * @deprecated use {@link CancellationError `new CancellationError()`} instead\n */\nexport function canceled() {\n const error = new Error(canceledName);\n error.name = error.message;\n return error;\n}\nexport function illegalArgument(name) {\n if (name) {\n return new Error(`Illegal argument: ${name}`);\n }\n else {\n return new Error('Illegal argument');\n }\n}\nexport function illegalState(name) {\n if (name) {\n return new Error(`Illegal state: ${name}`);\n }\n else {\n return new Error('Illegal state');\n }\n}\nexport class NotSupportedError extends Error {\n constructor(message) {\n super('NotSupported');\n if (message) {\n this.message = message;\n }\n }\n}\n/**\n * Error that when thrown won't be logged in telemetry as an unhandled error.\n */\nexport class ErrorNoTelemetry extends Error {\n constructor(msg) {\n super(msg);\n this.name = 'CodeExpectedError';\n }\n static fromError(err) {\n if (err instanceof ErrorNoTelemetry) {\n return err;\n }\n const result = new ErrorNoTelemetry();\n result.message = err.message;\n result.stack = err.stack;\n return result;\n }\n static isErrorNoTelemetry(err) {\n return err.name === 'CodeExpectedError';\n }\n}\n/**\n * This error indicates a bug.\n * Do not throw this for invalid user input.\n * Only catch this error to recover gracefully from bugs.\n */\nexport class BugIndicatingError extends Error {\n constructor(message) {\n super(message || 'An unexpected bug occurred.');\n Object.setPrototypeOf(this, BugIndicatingError.prototype);\n // Because we know for sure only buggy code throws this,\n // we definitely want to break here and fix the bug.\n // eslint-disable-next-line no-debugger\n // debugger;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/**\n * Given a function, returns a function that is only calling that function once.\n */\nexport function createSingleCallFunction(fn, fnDidRunCallback) {\n const _this = this;\n let didCall = false;\n let result;\n return function () {\n if (didCall) {\n return result;\n }\n didCall = true;\n if (fnDidRunCallback) {\n try {\n result = fn.apply(_this, arguments);\n }\n finally {\n fnDidRunCallback();\n }\n }\n else {\n result = fn.apply(_this, arguments);\n }\n return result;\n };\n}\n", "import { createSingleCallFunction } from './functional.js';\nimport { Iterable } from './iterator.js';\n// #region Disposable Tracking\n/**\n * Enables logging of potentially leaked disposables.\n *\n * A disposable is considered leaked if it is not disposed or not registered as the child of\n * another disposable. This tracking is very simple an only works for classes that either\n * extend Disposable or use a DisposableStore. This means there are a lot of false positives.\n */\nconst TRACK_DISPOSABLES = false;\nlet disposableTracker = null;\nexport function setDisposableTracker(tracker) {\n disposableTracker = tracker;\n}\nif (TRACK_DISPOSABLES) {\n const __is_disposable_tracked__ = '__is_disposable_tracked__';\n setDisposableTracker(new class {\n trackDisposable(x) {\n const stack = new Error('Potentially leaked disposable').stack;\n setTimeout(() => {\n if (!x[__is_disposable_tracked__]) {\n console.log(stack);\n }\n }, 3000);\n }\n setParent(child, parent) {\n if (child && child !== Disposable.None) {\n try {\n child[__is_disposable_tracked__] = true;\n }\n catch (_a) {\n // noop\n }\n }\n }\n markAsDisposed(disposable) {\n if (disposable && disposable !== Disposable.None) {\n try {\n disposable[__is_disposable_tracked__] = true;\n }\n catch (_a) {\n // noop\n }\n }\n }\n markAsSingleton(disposable) { }\n });\n}\nexport function trackDisposable(x) {\n disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.trackDisposable(x);\n return x;\n}\nexport function markAsDisposed(disposable) {\n disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.markAsDisposed(disposable);\n}\nfunction setParentOfDisposable(child, parent) {\n disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.setParent(child, parent);\n}\nfunction setParentOfDisposables(children, parent) {\n if (!disposableTracker) {\n return;\n }\n for (const child of children) {\n disposableTracker.setParent(child, parent);\n }\n}\n/**\n * Indicates that the given object is a singleton which does not need to be disposed.\n*/\nexport function markAsSingleton(singleton) {\n disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.markAsSingleton(singleton);\n return singleton;\n}\n/**\n * Check if `thing` is {@link IDisposable disposable}.\n */\nexport function isDisposable(thing) {\n return typeof thing.dispose === 'function' && thing.dispose.length === 0;\n}\nexport function dispose(arg) {\n if (Iterable.is(arg)) {\n const errors = [];\n for (const d of arg) {\n if (d) {\n try {\n d.dispose();\n }\n catch (e) {\n errors.push(e);\n }\n }\n }\n if (errors.length === 1) {\n throw errors[0];\n }\n else if (errors.length > 1) {\n throw new AggregateError(errors, 'Encountered errors while disposing of store');\n }\n return Array.isArray(arg) ? [] : arg;\n }\n else if (arg) {\n arg.dispose();\n return arg;\n }\n}\n/**\n * Combine multiple disposable values into a single {@link IDisposable}.\n */\nexport function combinedDisposable(...disposables) {\n const parent = toDisposable(() => dispose(disposables));\n setParentOfDisposables(disposables, parent);\n return parent;\n}\n/**\n * Turn a function that implements dispose into an {@link IDisposable}.\n *\n * @param fn Clean up function, guaranteed to be called only **once**.\n */\nexport function toDisposable(fn) {\n const self = trackDisposable({\n dispose: createSingleCallFunction(() => {\n markAsDisposed(self);\n fn();\n })\n });\n return self;\n}\n/**\n * Manages a collection of disposable values.\n *\n * This is the preferred way to manage multiple disposables. A `DisposableStore` is safer to work with than an\n * `IDisposable[]` as it considers edge cases, such as registering the same value multiple times or adding an item to a\n * store that has already been disposed of.\n */\nexport class DisposableStore {\n constructor() {\n this._toDispose = new Set();\n this._isDisposed = false;\n trackDisposable(this);\n }\n /**\n * Dispose of all registered disposables and mark this object as disposed.\n *\n * Any future disposables added to this object will be disposed of on `add`.\n */\n dispose() {\n if (this._isDisposed) {\n return;\n }\n markAsDisposed(this);\n this._isDisposed = true;\n this.clear();\n }\n /**\n * @return `true` if this object has been disposed of.\n */\n get isDisposed() {\n return this._isDisposed;\n }\n /**\n * Dispose of all registered disposables but do not mark this object as disposed.\n */\n clear() {\n if (this._toDispose.size === 0) {\n return;\n }\n try {\n dispose(this._toDispose);\n }\n finally {\n this._toDispose.clear();\n }\n }\n /**\n * Add a new {@link IDisposable disposable} to the collection.\n */\n add(o) {\n if (!o) {\n return o;\n }\n if (o === this) {\n throw new Error('Cannot register a disposable on itself!');\n }\n setParentOfDisposable(o, this);\n if (this._isDisposed) {\n if (!DisposableStore.DISABLE_DISPOSED_WARNING) {\n console.warn(new Error('Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!').stack);\n }\n }\n else {\n this._toDispose.add(o);\n }\n return o;\n }\n /**\n * Deletes the value from the store, but does not dispose it.\n */\n deleteAndLeak(o) {\n if (!o) {\n return;\n }\n if (this._toDispose.has(o)) {\n this._toDispose.delete(o);\n setParentOfDisposable(o, null);\n }\n }\n}\nDisposableStore.DISABLE_DISPOSED_WARNING = false;\n/**\n * Abstract base class for a {@link IDisposable disposable} object.\n *\n * Subclasses can {@linkcode _register} disposables that will be automatically cleaned up when this object is disposed of.\n */\nexport class Disposable {\n constructor() {\n this._store = new DisposableStore();\n trackDisposable(this);\n setParentOfDisposable(this._store, this);\n }\n dispose() {\n markAsDisposed(this);\n this._store.dispose();\n }\n /**\n * Adds `o` to the collection of disposables managed by this object.\n */\n _register(o) {\n if (o === this) {\n throw new Error('Cannot register a disposable on itself!');\n }\n return this._store.add(o);\n }\n}\n/**\n * A disposable that does nothing when it is disposed of.\n *\n * TODO: This should not be a static property.\n */\nDisposable.None = Object.freeze({ dispose() { } });\n/**\n * Manages the lifecycle of a disposable value that may be changed.\n *\n * This ensures that when the disposable value is changed, the previously held disposable is disposed of. You can\n * also register a `MutableDisposable` on a `Disposable` to ensure it is automatically cleaned up.\n */\nexport class MutableDisposable {\n constructor() {\n this._isDisposed = false;\n trackDisposable(this);\n }\n get value() {\n return this._isDisposed ? undefined : this._value;\n }\n set value(value) {\n var _a;\n if (this._isDisposed || value === this._value) {\n return;\n }\n (_a = this._value) === null || _a === void 0 ? void 0 : _a.dispose();\n if (value) {\n setParentOfDisposable(value, this);\n }\n this._value = value;\n }\n /**\n * Resets the stored value and disposed of the previously stored value.\n */\n clear() {\n this.value = undefined;\n }\n dispose() {\n var _a;\n this._isDisposed = true;\n markAsDisposed(this);\n (_a = this._value) === null || _a === void 0 ? void 0 : _a.dispose();\n this._value = undefined;\n }\n}\nexport class RefCountedDisposable {\n constructor(_disposable) {\n this._disposable = _disposable;\n this._counter = 1;\n }\n acquire() {\n this._counter++;\n return this;\n }\n release() {\n if (--this._counter === 0) {\n this._disposable.dispose();\n }\n return this;\n }\n}\nexport class ImmortalReference {\n constructor(object) {\n this.object = object;\n }\n dispose() { }\n}\n/**\n * A map the manages the lifecycle of the values that it stores.\n */\nexport class DisposableMap {\n constructor() {\n this._store = new Map();\n this._isDisposed = false;\n trackDisposable(this);\n }\n /**\n * Disposes of all stored values and mark this object as disposed.\n *\n * Trying to use this object after it has been disposed of is an error.\n */\n dispose() {\n markAsDisposed(this);\n this._isDisposed = true;\n this.clearAndDisposeAll();\n }\n /**\n * Disposes of all stored values and clear the map, but DO NOT mark this object as disposed.\n */\n clearAndDisposeAll() {\n if (!this._store.size) {\n return;\n }\n try {\n dispose(this._store.values());\n }\n finally {\n this._store.clear();\n }\n }\n get(key) {\n return this._store.get(key);\n }\n set(key, value, skipDisposeOnOverwrite = false) {\n var _a;\n if (this._isDisposed) {\n console.warn(new Error('Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!').stack);\n }\n if (!skipDisposeOnOverwrite) {\n (_a = this._store.get(key)) === null || _a === void 0 ? void 0 : _a.dispose();\n }\n this._store.set(key, value);\n }\n /**\n * Delete the value stored for `key` from this map and also dispose of it.\n */\n deleteAndDispose(key) {\n var _a;\n (_a = this._store.get(key)) === null || _a === void 0 ? void 0 : _a.dispose();\n this._store.delete(key);\n }\n [Symbol.iterator]() {\n return this._store[Symbol.iterator]();\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nconst hasPerformanceNow = (globalThis.performance && typeof globalThis.performance.now === 'function');\nexport class StopWatch {\n static create(highResolution) {\n return new StopWatch(highResolution);\n }\n constructor(highResolution) {\n this._now = hasPerformanceNow && highResolution === false ? Date.now : globalThis.performance.now.bind(globalThis.performance);\n this._startTime = this._now();\n this._stopTime = -1;\n }\n stop() {\n this._stopTime = this._now();\n }\n elapsed() {\n if (this._stopTime !== -1) {\n return this._stopTime - this._startTime;\n }\n return this._now() - this._startTime;\n }\n}\n", "import { onUnexpectedError } from './errors.js';\nimport { createSingleCallFunction } from './functional.js';\nimport { combinedDisposable, Disposable, DisposableStore, toDisposable } from './lifecycle.js';\nimport { LinkedList } from './linkedList.js';\nimport { StopWatch } from './stopwatch.js';\n// -----------------------------------------------------------------------------------------------------------------------\n// Uncomment the next line to print warnings whenever an emitter with listeners is disposed. That is a sign of code smell.\n// -----------------------------------------------------------------------------------------------------------------------\nconst _enableDisposeWithListenerWarning = false;\n// _enableDisposeWithListenerWarning = Boolean(\"TRUE\"); // causes a linter warning so that it cannot be pushed\n// -----------------------------------------------------------------------------------------------------------------------\n// Uncomment the next line to print warnings whenever a snapshotted event is used repeatedly without cleanup.\n// See https://github.com/microsoft/vscode/issues/142851\n// -----------------------------------------------------------------------------------------------------------------------\nconst _enableSnapshotPotentialLeakWarning = false;\nexport var Event;\n(function (Event) {\n Event.None = () => Disposable.None;\n function _addLeakageTraceLogic(options) {\n if (_enableSnapshotPotentialLeakWarning) {\n const { onDidAddListener: origListenerDidAdd } = options;\n const stack = Stacktrace.create();\n let count = 0;\n options.onDidAddListener = () => {\n if (++count === 2) {\n console.warn('snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here');\n stack.print();\n }\n origListenerDidAdd === null || origListenerDidAdd === void 0 ? void 0 : origListenerDidAdd();\n };\n }\n }\n /**\n * Given an event, returns another event which debounces calls and defers the listeners to a later task via a shared\n * `setTimeout`. The event is converted into a signal (`Event`) to avoid additional object creation as a\n * result of merging events and to try prevent race conditions that could arise when using related deferred and\n * non-deferred events.\n *\n * This is useful for deferring non-critical work (eg. general UI updates) to ensure it does not block critical work\n * (eg. latency of keypress to text rendered).\n *\n * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned\n * event is accessible to \"third parties\", e.g the event is a public property. Otherwise a leaked listener on the\n * returned event causes this utility to leak a listener on the original event.\n *\n * @param event The event source for the new event.\n * @param disposable A disposable store to add the new EventEmitter to.\n */\n function defer(event, disposable) {\n return debounce(event, () => void 0, 0, undefined, true, undefined, disposable);\n }\n Event.defer = defer;\n /**\n * Given an event, returns another event which only fires once.\n *\n * @param event The event source for the new event.\n */\n function once(event) {\n return (listener, thisArgs = null, disposables) => {\n // we need this, in case the event fires during the listener call\n let didFire = false;\n let result = undefined;\n result = event(e => {\n if (didFire) {\n return;\n }\n else if (result) {\n result.dispose();\n }\n else {\n didFire = true;\n }\n return listener.call(thisArgs, e);\n }, null, disposables);\n if (didFire) {\n result.dispose();\n }\n return result;\n };\n }\n Event.once = once;\n /**\n * Maps an event of one type into an event of another type using a mapping function, similar to how\n * `Array.prototype.map` works.\n *\n * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned\n * event is accessible to \"third parties\", e.g the event is a public property. Otherwise a leaked listener on the\n * returned event causes this utility to leak a listener on the original event.\n *\n * @param event The event source for the new event.\n * @param map The mapping function.\n * @param disposable A disposable store to add the new EventEmitter to.\n */\n function map(event, map, disposable) {\n return snapshot((listener, thisArgs = null, disposables) => event(i => listener.call(thisArgs, map(i)), null, disposables), disposable);\n }\n Event.map = map;\n /**\n * Wraps an event in another event that performs some function on the event object before firing.\n *\n * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned\n * event is accessible to \"third parties\", e.g the event is a public property. Otherwise a leaked listener on the\n * returned event causes this utility to leak a listener on the original event.\n *\n * @param event The event source for the new event.\n * @param each The function to perform on the event object.\n * @param disposable A disposable store to add the new EventEmitter to.\n */\n function forEach(event, each, disposable) {\n return snapshot((listener, thisArgs = null, disposables) => event(i => { each(i); listener.call(thisArgs, i); }, null, disposables), disposable);\n }\n Event.forEach = forEach;\n function filter(event, filter, disposable) {\n return snapshot((listener, thisArgs = null, disposables) => event(e => filter(e) && listener.call(thisArgs, e), null, disposables), disposable);\n }\n Event.filter = filter;\n /**\n * Given an event, returns the same event but typed as `Event`.\n */\n function signal(event) {\n return event;\n }\n Event.signal = signal;\n function any(...events) {\n return (listener, thisArgs = null, disposables) => {\n const disposable = combinedDisposable(...events.map(event => event(e => listener.call(thisArgs, e))));\n return addAndReturnDisposable(disposable, disposables);\n };\n }\n Event.any = any;\n /**\n * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned\n * event is accessible to \"third parties\", e.g the event is a public property. Otherwise a leaked listener on the\n * returned event causes this utility to leak a listener on the original event.\n */\n function reduce(event, merge, initial, disposable) {\n let output = initial;\n return map(event, e => {\n output = merge(output, e);\n return output;\n }, disposable);\n }\n Event.reduce = reduce;\n function snapshot(event, disposable) {\n let listener;\n const options = {\n onWillAddFirstListener() {\n listener = event(emitter.fire, emitter);\n },\n onDidRemoveLastListener() {\n listener === null || listener === void 0 ? void 0 : listener.dispose();\n }\n };\n if (!disposable) {\n _addLeakageTraceLogic(options);\n }\n const emitter = new Emitter(options);\n disposable === null || disposable === void 0 ? void 0 : disposable.add(emitter);\n return emitter.event;\n }\n /**\n * Adds the IDisposable to the store if it's set, and returns it. Useful to\n * Event function implementation.\n */\n function addAndReturnDisposable(d, store) {\n if (store instanceof Array) {\n store.push(d);\n }\n else if (store) {\n store.add(d);\n }\n return d;\n }\n function debounce(event, merge, delay = 100, leading = false, flushOnListenerRemove = false, leakWarningThreshold, disposable) {\n let subscription;\n let output = undefined;\n let handle = undefined;\n let numDebouncedCalls = 0;\n let doFire;\n const options = {\n leakWarningThreshold,\n onWillAddFirstListener() {\n subscription = event(cur => {\n numDebouncedCalls++;\n output = merge(output, cur);\n if (leading && !handle) {\n emitter.fire(output);\n output = undefined;\n }\n doFire = () => {\n const _output = output;\n output = undefined;\n handle = undefined;\n if (!leading || numDebouncedCalls > 1) {\n emitter.fire(_output);\n }\n numDebouncedCalls = 0;\n };\n if (typeof delay === 'number') {\n clearTimeout(handle);\n handle = setTimeout(doFire, delay);\n }\n else {\n if (handle === undefined) {\n handle = 0;\n queueMicrotask(doFire);\n }\n }\n });\n },\n onWillRemoveListener() {\n if (flushOnListenerRemove && numDebouncedCalls > 0) {\n doFire === null || doFire === void 0 ? void 0 : doFire();\n }\n },\n onDidRemoveLastListener() {\n doFire = undefined;\n subscription.dispose();\n }\n };\n if (!disposable) {\n _addLeakageTraceLogic(options);\n }\n const emitter = new Emitter(options);\n disposable === null || disposable === void 0 ? void 0 : disposable.add(emitter);\n return emitter.event;\n }\n Event.debounce = debounce;\n /**\n * Debounces an event, firing after some delay (default=0) with an array of all event original objects.\n *\n * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned\n * event is accessible to \"third parties\", e.g the event is a public property. Otherwise a leaked listener on the\n * returned event causes this utility to leak a listener on the original event.\n */\n function accumulate(event, delay = 0, disposable) {\n return Event.debounce(event, (last, e) => {\n if (!last) {\n return [e];\n }\n last.push(e);\n return last;\n }, delay, undefined, true, undefined, disposable);\n }\n Event.accumulate = accumulate;\n /**\n * Filters an event such that some condition is _not_ met more than once in a row, effectively ensuring duplicate\n * event objects from different sources do not fire the same event object.\n *\n * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned\n * event is accessible to \"third parties\", e.g the event is a public property. Otherwise a leaked listener on the\n * returned event causes this utility to leak a listener on the original event.\n *\n * @param event The event source for the new event.\n * @param equals The equality condition.\n * @param disposable A disposable store to add the new EventEmitter to.\n *\n * @example\n * ```\n * // Fire only one time when a single window is opened or focused\n * Event.latch(Event.any(onDidOpenWindow, onDidFocusWindow))\n * ```\n */\n function latch(event, equals = (a, b) => a === b, disposable) {\n let firstCall = true;\n let cache;\n return filter(event, value => {\n const shouldEmit = firstCall || !equals(value, cache);\n firstCall = false;\n cache = value;\n return shouldEmit;\n }, disposable);\n }\n Event.latch = latch;\n /**\n * Splits an event whose parameter is a union type into 2 separate events for each type in the union.\n *\n * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned\n * event is accessible to \"third parties\", e.g the event is a public property. Otherwise a leaked listener on the\n * returned event causes this utility to leak a listener on the original event.\n *\n * @example\n * ```\n * const event = new EventEmitter().event;\n * const [numberEvent, undefinedEvent] = Event.split(event, isUndefined);\n * ```\n *\n * @param event The event source for the new event.\n * @param isT A function that determines what event is of the first type.\n * @param disposable A disposable store to add the new EventEmitter to.\n */\n function split(event, isT, disposable) {\n return [\n Event.filter(event, isT, disposable),\n Event.filter(event, e => !isT(e), disposable),\n ];\n }\n Event.split = split;\n /**\n * Buffers an event until it has a listener attached.\n *\n * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned\n * event is accessible to \"third parties\", e.g the event is a public property. Otherwise a leaked listener on the\n * returned event causes this utility to leak a listener on the original event.\n *\n * @param event The event source for the new event.\n * @param flushAfterTimeout Determines whether to flush the buffer after a timeout immediately or after a\n * `setTimeout` when the first event listener is added.\n * @param _buffer Internal: A source event array used for tests.\n *\n * @example\n * ```\n * // Start accumulating events, when the first listener is attached, flush\n * // the event after a timeout such that multiple listeners attached before\n * // the timeout would receive the event\n * this.onInstallExtension = Event.buffer(service.onInstallExtension, true);\n * ```\n */\n function buffer(event, flushAfterTimeout = false, _buffer = [], disposable) {\n let buffer = _buffer.slice();\n let listener = event(e => {\n if (buffer) {\n buffer.push(e);\n }\n else {\n emitter.fire(e);\n }\n });\n if (disposable) {\n disposable.add(listener);\n }\n const flush = () => {\n buffer === null || buffer === void 0 ? void 0 : buffer.forEach(e => emitter.fire(e));\n buffer = null;\n };\n const emitter = new Emitter({\n onWillAddFirstListener() {\n if (!listener) {\n listener = event(e => emitter.fire(e));\n if (disposable) {\n disposable.add(listener);\n }\n }\n },\n onDidAddFirstListener() {\n if (buffer) {\n if (flushAfterTimeout) {\n setTimeout(flush);\n }\n else {\n flush();\n }\n }\n },\n onDidRemoveLastListener() {\n if (listener) {\n listener.dispose();\n }\n listener = null;\n }\n });\n if (disposable) {\n disposable.add(emitter);\n }\n return emitter.event;\n }\n Event.buffer = buffer;\n /**\n * Wraps the event in an {@link IChainableEvent}, allowing a more functional programming style.\n *\n * @example\n * ```\n * // Normal\n * const onEnterPressNormal = Event.filter(\n * Event.map(onKeyPress.event, e => new StandardKeyboardEvent(e)),\n * e.keyCode === KeyCode.Enter\n * ).event;\n *\n * // Using chain\n * const onEnterPressChain = Event.chain(onKeyPress.event, $ => $\n * .map(e => new StandardKeyboardEvent(e))\n * .filter(e => e.keyCode === KeyCode.Enter)\n * );\n * ```\n */\n function chain(event, sythensize) {\n const fn = (listener, thisArgs, disposables) => {\n const cs = sythensize(new ChainableSynthesis());\n return event(function (value) {\n const result = cs.evaluate(value);\n if (result !== HaltChainable) {\n listener.call(thisArgs, result);\n }\n }, undefined, disposables);\n };\n return fn;\n }\n Event.chain = chain;\n const HaltChainable = Symbol('HaltChainable');\n class ChainableSynthesis {\n constructor() {\n this.steps = [];\n }\n map(fn) {\n this.steps.push(fn);\n return this;\n }\n forEach(fn) {\n this.steps.push(v => {\n fn(v);\n return v;\n });\n return this;\n }\n filter(fn) {\n this.steps.push(v => fn(v) ? v : HaltChainable);\n return this;\n }\n reduce(merge, initial) {\n let last = initial;\n this.steps.push(v => {\n last = merge(last, v);\n return last;\n });\n return this;\n }\n latch(equals = (a, b) => a === b) {\n let firstCall = true;\n let cache;\n this.steps.push(value => {\n const shouldEmit = firstCall || !equals(value, cache);\n firstCall = false;\n cache = value;\n return shouldEmit ? value : HaltChainable;\n });\n return this;\n }\n evaluate(value) {\n for (const step of this.steps) {\n value = step(value);\n if (value === HaltChainable) {\n break;\n }\n }\n return value;\n }\n }\n /**\n * Creates an {@link Event} from a node event emitter.\n */\n function fromNodeEventEmitter(emitter, eventName, map = id => id) {\n const fn = (...args) => result.fire(map(...args));\n const onFirstListenerAdd = () => emitter.on(eventName, fn);\n const onLastListenerRemove = () => emitter.removeListener(eventName, fn);\n const result = new Emitter({ onWillAddFirstListener: onFirstListenerAdd, onDidRemoveLastListener: onLastListenerRemove });\n return result.event;\n }\n Event.fromNodeEventEmitter = fromNodeEventEmitter;\n /**\n * Creates an {@link Event} from a DOM event emitter.\n */\n function fromDOMEventEmitter(emitter, eventName, map = id => id) {\n const fn = (...args) => result.fire(map(...args));\n const onFirstListenerAdd = () => emitter.addEventListener(eventName, fn);\n const onLastListenerRemove = () => emitter.removeEventListener(eventName, fn);\n const result = new Emitter({ onWillAddFirstListener: onFirstListenerAdd, onDidRemoveLastListener: onLastListenerRemove });\n return result.event;\n }\n Event.fromDOMEventEmitter = fromDOMEventEmitter;\n /**\n * Creates a promise out of an event, using the {@link Event.once} helper.\n */\n function toPromise(event) {\n return new Promise(resolve => once(event)(resolve));\n }\n Event.toPromise = toPromise;\n /**\n * Creates an event out of a promise that fires once when the promise is\n * resolved with the result of the promise or `undefined`.\n */\n function fromPromise(promise) {\n const result = new Emitter();\n promise.then(res => {\n result.fire(res);\n }, () => {\n result.fire(undefined);\n }).finally(() => {\n result.dispose();\n });\n return result.event;\n }\n Event.fromPromise = fromPromise;\n function runAndSubscribe(event, handler, initial) {\n handler(initial);\n return event(e => handler(e));\n }\n Event.runAndSubscribe = runAndSubscribe;\n class EmitterObserver {\n constructor(_observable, store) {\n this._observable = _observable;\n this._counter = 0;\n this._hasChanged = false;\n const options = {\n onWillAddFirstListener: () => {\n _observable.addObserver(this);\n },\n onDidRemoveLastListener: () => {\n _observable.removeObserver(this);\n }\n };\n if (!store) {\n _addLeakageTraceLogic(options);\n }\n this.emitter = new Emitter(options);\n if (store) {\n store.add(this.emitter);\n }\n }\n beginUpdate(_observable) {\n // assert(_observable === this.obs);\n this._counter++;\n }\n handlePossibleChange(_observable) {\n // assert(_observable === this.obs);\n }\n handleChange(_observable, _change) {\n // assert(_observable === this.obs);\n this._hasChanged = true;\n }\n endUpdate(_observable) {\n // assert(_observable === this.obs);\n this._counter--;\n if (this._counter === 0) {\n this._observable.reportChanges();\n if (this._hasChanged) {\n this._hasChanged = false;\n this.emitter.fire(this._observable.get());\n }\n }\n }\n }\n /**\n * Creates an event emitter that is fired when the observable changes.\n * Each listeners subscribes to the emitter.\n */\n function fromObservable(obs, store) {\n const observer = new EmitterObserver(obs, store);\n return observer.emitter.event;\n }\n Event.fromObservable = fromObservable;\n /**\n * Each listener is attached to the observable directly.\n */\n function fromObservableLight(observable) {\n return (listener, thisArgs, disposables) => {\n let count = 0;\n let didChange = false;\n const observer = {\n beginUpdate() {\n count++;\n },\n endUpdate() {\n count--;\n if (count === 0) {\n observable.reportChanges();\n if (didChange) {\n didChange = false;\n listener.call(thisArgs);\n }\n }\n },\n handlePossibleChange() {\n // noop\n },\n handleChange() {\n didChange = true;\n }\n };\n observable.addObserver(observer);\n observable.reportChanges();\n const disposable = {\n dispose() {\n observable.removeObserver(observer);\n }\n };\n if (disposables instanceof DisposableStore) {\n disposables.add(disposable);\n }\n else if (Array.isArray(disposables)) {\n disposables.push(disposable);\n }\n return disposable;\n };\n }\n Event.fromObservableLight = fromObservableLight;\n})(Event || (Event = {}));\nexport class EventProfiling {\n constructor(name) {\n this.listenerCount = 0;\n this.invocationCount = 0;\n this.elapsedOverall = 0;\n this.durations = [];\n this.name = `${name}_${EventProfiling._idPool++}`;\n EventProfiling.all.add(this);\n }\n start(listenerCount) {\n this._stopWatch = new StopWatch();\n this.listenerCount = listenerCount;\n }\n stop() {\n if (this._stopWatch) {\n const elapsed = this._stopWatch.elapsed();\n this.durations.push(elapsed);\n this.elapsedOverall += elapsed;\n this.invocationCount += 1;\n this._stopWatch = undefined;\n }\n }\n}\nEventProfiling.all = new Set();\nEventProfiling._idPool = 0;\nlet _globalLeakWarningThreshold = -1;\nclass LeakageMonitor {\n constructor(threshold, name = Math.random().toString(18).slice(2, 5)) {\n this.threshold = threshold;\n this.name = name;\n this._warnCountdown = 0;\n }\n dispose() {\n var _a;\n (_a = this._stacks) === null || _a === void 0 ? void 0 : _a.clear();\n }\n check(stack, listenerCount) {\n const threshold = this.threshold;\n if (threshold <= 0 || listenerCount < threshold) {\n return undefined;\n }\n if (!this._stacks) {\n this._stacks = new Map();\n }\n const count = (this._stacks.get(stack.value) || 0);\n this._stacks.set(stack.value, count + 1);\n this._warnCountdown -= 1;\n if (this._warnCountdown <= 0) {\n // only warn on first exceed and then every time the limit\n // is exceeded by 50% again\n this._warnCountdown = threshold * 0.5;\n // find most frequent listener and print warning\n let topStack;\n let topCount = 0;\n for (const [stack, count] of this._stacks) {\n if (!topStack || topCount < count) {\n topStack = stack;\n topCount = count;\n }\n }\n console.warn(`[${this.name}] potential listener LEAK detected, having ${listenerCount} listeners already. MOST frequent listener (${topCount}):`);\n console.warn(topStack);\n }\n return () => {\n const count = (this._stacks.get(stack.value) || 0);\n this._stacks.set(stack.value, count - 1);\n };\n }\n}\nclass Stacktrace {\n static create() {\n var _a;\n return new Stacktrace((_a = new Error().stack) !== null && _a !== void 0 ? _a : '');\n }\n constructor(value) {\n this.value = value;\n }\n print() {\n console.warn(this.value.split('\\n').slice(2).join('\\n'));\n }\n}\nclass UniqueContainer {\n constructor(value) {\n this.value = value;\n }\n}\nconst compactionThreshold = 2;\nconst forEachListener = (listeners, fn) => {\n if (listeners instanceof UniqueContainer) {\n fn(listeners);\n }\n else {\n for (let i = 0; i < listeners.length; i++) {\n const l = listeners[i];\n if (l) {\n fn(l);\n }\n }\n }\n};\n/**\n * The Emitter can be used to expose an Event to the public\n * to fire it from the insides.\n * Sample:\n class Document {\n\n private readonly _onDidChange = new Emitter<(value:string)=>any>();\n\n public onDidChange = this._onDidChange.event;\n\n // getter-style\n // get onDidChange(): Event<(value:string)=>any> {\n // \treturn this._onDidChange.event;\n // }\n\n private _doIt() {\n //...\n this._onDidChange.fire(value);\n }\n }\n */\nexport class Emitter {\n constructor(options) {\n var _a, _b, _c, _d, _e;\n this._size = 0;\n this._options = options;\n this._leakageMon = _globalLeakWarningThreshold > 0 || ((_a = this._options) === null || _a === void 0 ? void 0 : _a.leakWarningThreshold) ? new LeakageMonitor((_c = (_b = this._options) === null || _b === void 0 ? void 0 : _b.leakWarningThreshold) !== null && _c !== void 0 ? _c : _globalLeakWarningThreshold) : undefined;\n this._perfMon = ((_d = this._options) === null || _d === void 0 ? void 0 : _d._profName) ? new EventProfiling(this._options._profName) : undefined;\n this._deliveryQueue = (_e = this._options) === null || _e === void 0 ? void 0 : _e.deliveryQueue;\n }\n dispose() {\n var _a, _b, _c, _d;\n if (!this._disposed) {\n this._disposed = true;\n // It is bad to have listeners at the time of disposing an emitter, it is worst to have listeners keep the emitter\n // alive via the reference that's embedded in their disposables. Therefore we loop over all remaining listeners and\n // unset their subscriptions/disposables. Looping and blaming remaining listeners is done on next tick because the\n // the following programming pattern is very popular:\n //\n // const someModel = this._disposables.add(new ModelObject()); // (1) create and register model\n // this._disposables.add(someModel.onDidChange(() => { ... }); // (2) subscribe and register model-event listener\n // ...later...\n // this._disposables.dispose(); disposes (1) then (2): don't warn after (1) but after the \"overall dispose\" is done\n if (((_a = this._deliveryQueue) === null || _a === void 0 ? void 0 : _a.current) === this) {\n this._deliveryQueue.reset();\n }\n if (this._listeners) {\n if (_enableDisposeWithListenerWarning) {\n const listeners = this._listeners;\n queueMicrotask(() => {\n forEachListener(listeners, l => { var _a; return (_a = l.stack) === null || _a === void 0 ? void 0 : _a.print(); });\n });\n }\n this._listeners = undefined;\n this._size = 0;\n }\n (_c = (_b = this._options) === null || _b === void 0 ? void 0 : _b.onDidRemoveLastListener) === null || _c === void 0 ? void 0 : _c.call(_b);\n (_d = this._leakageMon) === null || _d === void 0 ? void 0 : _d.dispose();\n }\n }\n /**\n * For the public to allow to subscribe\n * to events from this Emitter\n */\n get event() {\n var _a;\n (_a = this._event) !== null && _a !== void 0 ? _a : (this._event = (callback, thisArgs, disposables) => {\n var _a, _b, _c, _d, _e;\n if (this._leakageMon && this._size > this._leakageMon.threshold * 3) {\n console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`);\n return Disposable.None;\n }\n if (this._disposed) {\n // todo: should we warn if a listener is added to a disposed emitter? This happens often\n return Disposable.None;\n }\n if (thisArgs) {\n callback = callback.bind(thisArgs);\n }\n const contained = new UniqueContainer(callback);\n let removeMonitor;\n let stack;\n if (this._leakageMon && this._size >= Math.ceil(this._leakageMon.threshold * 0.2)) {\n // check and record this emitter for potential leakage\n contained.stack = Stacktrace.create();\n removeMonitor = this._leakageMon.check(contained.stack, this._size + 1);\n }\n if (_enableDisposeWithListenerWarning) {\n contained.stack = stack !== null && stack !== void 0 ? stack : Stacktrace.create();\n }\n if (!this._listeners) {\n (_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.onWillAddFirstListener) === null || _b === void 0 ? void 0 : _b.call(_a, this);\n this._listeners = contained;\n (_d = (_c = this._options) === null || _c === void 0 ? void 0 : _c.onDidAddFirstListener) === null || _d === void 0 ? void 0 : _d.call(_c, this);\n }\n else if (this._listeners instanceof UniqueContainer) {\n (_e = this._deliveryQueue) !== null && _e !== void 0 ? _e : (this._deliveryQueue = new EventDeliveryQueuePrivate());\n this._listeners = [this._listeners, contained];\n }\n else {\n this._listeners.push(contained);\n }\n this._size++;\n const result = toDisposable(() => { removeMonitor === null || removeMonitor === void 0 ? void 0 : removeMonitor(); this._removeListener(contained); });\n if (disposables instanceof DisposableStore) {\n disposables.add(result);\n }\n else if (Array.isArray(disposables)) {\n disposables.push(result);\n }\n return result;\n });\n return this._event;\n }\n _removeListener(listener) {\n var _a, _b, _c, _d;\n (_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.onWillRemoveListener) === null || _b === void 0 ? void 0 : _b.call(_a, this);\n if (!this._listeners) {\n return; // expected if a listener gets disposed\n }\n if (this._size === 1) {\n this._listeners = undefined;\n (_d = (_c = this._options) === null || _c === void 0 ? void 0 : _c.onDidRemoveLastListener) === null || _d === void 0 ? void 0 : _d.call(_c, this);\n this._size = 0;\n return;\n }\n // size > 1 which requires that listeners be a list:\n const listeners = this._listeners;\n const index = listeners.indexOf(listener);\n if (index === -1) {\n console.log('disposed?', this._disposed);\n console.log('size?', this._size);\n console.log('arr?', JSON.stringify(this._listeners));\n throw new Error('Attempted to dispose unknown listener');\n }\n this._size--;\n listeners[index] = undefined;\n const adjustDeliveryQueue = this._deliveryQueue.current === this;\n if (this._size * compactionThreshold <= listeners.length) {\n let n = 0;\n for (let i = 0; i < listeners.length; i++) {\n if (listeners[i]) {\n listeners[n++] = listeners[i];\n }\n else if (adjustDeliveryQueue) {\n this._deliveryQueue.end--;\n if (n < this._deliveryQueue.i) {\n this._deliveryQueue.i--;\n }\n }\n }\n listeners.length = n;\n }\n }\n _deliver(listener, value) {\n var _a;\n if (!listener) {\n return;\n }\n const errorHandler = ((_a = this._options) === null || _a === void 0 ? void 0 : _a.onListenerError) || onUnexpectedError;\n if (!errorHandler) {\n listener.value(value);\n return;\n }\n try {\n listener.value(value);\n }\n catch (e) {\n errorHandler(e);\n }\n }\n /** Delivers items in the queue. Assumes the queue is ready to go. */\n _deliverQueue(dq) {\n const listeners = dq.current._listeners;\n while (dq.i < dq.end) {\n // important: dq.i is incremented before calling deliver() because it might reenter deliverQueue()\n this._deliver(listeners[dq.i++], dq.value);\n }\n dq.reset();\n }\n /**\n * To be kept private to fire an event to\n * subscribers\n */\n fire(event) {\n var _a, _b, _c, _d;\n if ((_a = this._deliveryQueue) === null || _a === void 0 ? void 0 : _a.current) {\n this._deliverQueue(this._deliveryQueue);\n (_b = this._perfMon) === null || _b === void 0 ? void 0 : _b.stop(); // last fire() will have starting perfmon, stop it before starting the next dispatch\n }\n (_c = this._perfMon) === null || _c === void 0 ? void 0 : _c.start(this._size);\n if (!this._listeners) {\n // no-op\n }\n else if (this._listeners instanceof UniqueContainer) {\n this._deliver(this._listeners, event);\n }\n else {\n const dq = this._deliveryQueue;\n dq.enqueue(this, event, this._listeners.length);\n this._deliverQueue(dq);\n }\n (_d = this._perfMon) === null || _d === void 0 ? void 0 : _d.stop();\n }\n hasListeners() {\n return this._size > 0;\n }\n}\nexport const createEventDeliveryQueue = () => new EventDeliveryQueuePrivate();\nclass EventDeliveryQueuePrivate {\n constructor() {\n /**\n * Index in current's listener list.\n */\n this.i = -1;\n /**\n * The last index in the listener's list to deliver.\n */\n this.end = 0;\n }\n enqueue(emitter, value, end) {\n this.i = 0;\n this.end = end;\n this.current = emitter;\n this.value = value;\n }\n reset() {\n this.i = this.end; // force any current emission loop to stop, mainly for during dispose\n this.current = undefined;\n this.value = undefined;\n }\n}\nexport class PauseableEmitter extends Emitter {\n constructor(options) {\n super(options);\n this._isPaused = 0;\n this._eventQueue = new LinkedList();\n this._mergeFn = options === null || options === void 0 ? void 0 : options.merge;\n }\n pause() {\n this._isPaused++;\n }\n resume() {\n if (this._isPaused !== 0 && --this._isPaused === 0) {\n if (this._mergeFn) {\n // use the merge function to create a single composite\n // event. make a copy in case firing pauses this emitter\n if (this._eventQueue.size > 0) {\n const events = Array.from(this._eventQueue);\n this._eventQueue.clear();\n super.fire(this._mergeFn(events));\n }\n }\n else {\n // no merging, fire each event individually and test\n // that this emitter isn't paused halfway through\n while (!this._isPaused && this._eventQueue.size !== 0) {\n super.fire(this._eventQueue.shift());\n }\n }\n }\n }\n fire(event) {\n if (this._size) {\n if (this._isPaused !== 0) {\n this._eventQueue.push(event);\n }\n else {\n super.fire(event);\n }\n }\n }\n}\nexport class DebounceEmitter extends PauseableEmitter {\n constructor(options) {\n var _a;\n super(options);\n this._delay = (_a = options.delay) !== null && _a !== void 0 ? _a : 100;\n }\n fire(event) {\n if (!this._handle) {\n this.pause();\n this._handle = setTimeout(() => {\n this._handle = undefined;\n this.resume();\n }, this._delay);\n }\n super.fire(event);\n }\n}\n/**\n * An emitter which queue all events and then process them at the\n * end of the event loop.\n */\nexport class MicrotaskEmitter extends Emitter {\n constructor(options) {\n super(options);\n this._queuedEvents = [];\n this._mergeFn = options === null || options === void 0 ? void 0 : options.merge;\n }\n fire(event) {\n if (!this.hasListeners()) {\n return;\n }\n this._queuedEvents.push(event);\n if (this._queuedEvents.length === 1) {\n queueMicrotask(() => {\n if (this._mergeFn) {\n super.fire(this._mergeFn(this._queuedEvents));\n }\n else {\n this._queuedEvents.forEach(e => super.fire(e));\n }\n this._queuedEvents = [];\n });\n }\n }\n}\n/**\n * An event emitter that multiplexes many events into a single event.\n *\n * @example Listen to the `onData` event of all `Thing`s, dynamically adding and removing `Thing`s\n * to the multiplexer as needed.\n *\n * ```typescript\n * const anythingDataMultiplexer = new EventMultiplexer<{ data: string }>();\n *\n * const thingListeners = DisposableMap();\n *\n * thingService.onDidAddThing(thing => {\n * thingListeners.set(thing, anythingDataMultiplexer.add(thing.onData);\n * });\n * thingService.onDidRemoveThing(thing => {\n * thingListeners.deleteAndDispose(thing);\n * });\n *\n * anythingDataMultiplexer.event(e => {\n * console.log('Something fired data ' + e.data)\n * });\n * ```\n */\nexport class EventMultiplexer {\n constructor() {\n this.hasListeners = false;\n this.events = [];\n this.emitter = new Emitter({\n onWillAddFirstListener: () => this.onFirstListenerAdd(),\n onDidRemoveLastListener: () => this.onLastListenerRemove()\n });\n }\n get event() {\n return this.emitter.event;\n }\n add(event) {\n const e = { event: event, listener: null };\n this.events.push(e);\n if (this.hasListeners) {\n this.hook(e);\n }\n const dispose = () => {\n if (this.hasListeners) {\n this.unhook(e);\n }\n const idx = this.events.indexOf(e);\n this.events.splice(idx, 1);\n };\n return toDisposable(createSingleCallFunction(dispose));\n }\n onFirstListenerAdd() {\n this.hasListeners = true;\n this.events.forEach(e => this.hook(e));\n }\n onLastListenerRemove() {\n this.hasListeners = false;\n this.events.forEach(e => this.unhook(e));\n }\n hook(e) {\n e.listener = e.event(r => this.emitter.fire(r));\n }\n unhook(e) {\n if (e.listener) {\n e.listener.dispose();\n }\n e.listener = null;\n }\n dispose() {\n this.emitter.dispose();\n }\n}\n/**\n * The EventBufferer is useful in situations in which you want\n * to delay firing your events during some code.\n * You can wrap that code and be sure that the event will not\n * be fired during that wrap.\n *\n * ```\n * const emitter: Emitter;\n * const delayer = new EventDelayer();\n * const delayedEvent = delayer.wrapEvent(emitter.event);\n *\n * delayedEvent(console.log);\n *\n * delayer.bufferEvents(() => {\n * emitter.fire(); // event will not be fired yet\n * });\n *\n * // event will only be fired at this point\n * ```\n */\nexport class EventBufferer {\n constructor() {\n this.buffers = [];\n }\n wrapEvent(event) {\n return (listener, thisArgs, disposables) => {\n return event(i => {\n const buffer = this.buffers[this.buffers.length - 1];\n if (buffer) {\n buffer.push(() => listener.call(thisArgs, i));\n }\n else {\n listener.call(thisArgs, i);\n }\n }, undefined, disposables);\n };\n }\n bufferEvents(fn) {\n const buffer = [];\n this.buffers.push(buffer);\n const r = fn();\n this.buffers.pop();\n buffer.forEach(flush => flush());\n return r;\n }\n}\n/**\n * A Relay is an event forwarder which functions as a replugabble event pipe.\n * Once created, you can connect an input event to it and it will simply forward\n * events from that input event through its own `event` property. The `input`\n * can be changed at any point in time.\n */\nexport class Relay {\n constructor() {\n this.listening = false;\n this.inputEvent = Event.None;\n this.inputEventListener = Disposable.None;\n this.emitter = new Emitter({\n onDidAddFirstListener: () => {\n this.listening = true;\n this.inputEventListener = this.inputEvent(this.emitter.fire, this.emitter);\n },\n onDidRemoveLastListener: () => {\n this.listening = false;\n this.inputEventListener.dispose();\n }\n });\n this.event = this.emitter.event;\n }\n set input(event) {\n this.inputEvent = event;\n if (this.listening) {\n this.inputEventListener.dispose();\n this.inputEventListener = event(this.emitter.fire, this.emitter);\n }\n }\n dispose() {\n this.inputEventListener.dispose();\n this.emitter.dispose();\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Emitter, Event } from './event.js';\nconst shortcutEvent = Object.freeze(function (callback, context) {\n const handle = setTimeout(callback.bind(context), 0);\n return { dispose() { clearTimeout(handle); } };\n});\nexport var CancellationToken;\n(function (CancellationToken) {\n function isCancellationToken(thing) {\n if (thing === CancellationToken.None || thing === CancellationToken.Cancelled) {\n return true;\n }\n if (thing instanceof MutableToken) {\n return true;\n }\n if (!thing || typeof thing !== 'object') {\n return false;\n }\n return typeof thing.isCancellationRequested === 'boolean'\n && typeof thing.onCancellationRequested === 'function';\n }\n CancellationToken.isCancellationToken = isCancellationToken;\n CancellationToken.None = Object.freeze({\n isCancellationRequested: false,\n onCancellationRequested: Event.None\n });\n CancellationToken.Cancelled = Object.freeze({\n isCancellationRequested: true,\n onCancellationRequested: shortcutEvent\n });\n})(CancellationToken || (CancellationToken = {}));\nclass MutableToken {\n constructor() {\n this._isCancelled = false;\n this._emitter = null;\n }\n cancel() {\n if (!this._isCancelled) {\n this._isCancelled = true;\n if (this._emitter) {\n this._emitter.fire(undefined);\n this.dispose();\n }\n }\n }\n get isCancellationRequested() {\n return this._isCancelled;\n }\n get onCancellationRequested() {\n if (this._isCancelled) {\n return shortcutEvent;\n }\n if (!this._emitter) {\n this._emitter = new Emitter();\n }\n return this._emitter.event;\n }\n dispose() {\n if (this._emitter) {\n this._emitter.dispose();\n this._emitter = null;\n }\n }\n}\nexport class CancellationTokenSource {\n constructor(parent) {\n this._token = undefined;\n this._parentListener = undefined;\n this._parentListener = parent && parent.onCancellationRequested(this.cancel, this);\n }\n get token() {\n if (!this._token) {\n // be lazy and create the token only when\n // actually needed\n this._token = new MutableToken();\n }\n return this._token;\n }\n cancel() {\n if (!this._token) {\n // save an object by returning the default\n // cancelled token when cancellation happens\n // before someone asks for the token\n this._token = CancellationToken.Cancelled;\n }\n else if (this._token instanceof MutableToken) {\n // actually cancel\n this._token.cancel();\n }\n }\n dispose(cancel = false) {\n var _a;\n if (cancel) {\n this.cancel();\n }\n (_a = this._parentListener) === null || _a === void 0 ? void 0 : _a.dispose();\n if (!this._token) {\n // ensure to initialize with an empty token if we had none\n this._token = CancellationToken.None;\n }\n else if (this._token instanceof MutableToken) {\n // actually dispose\n this._token.dispose();\n }\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nclass KeyCodeStrMap {\n constructor() {\n this._keyCodeToStr = [];\n this._strToKeyCode = Object.create(null);\n }\n define(keyCode, str) {\n this._keyCodeToStr[keyCode] = str;\n this._strToKeyCode[str.toLowerCase()] = keyCode;\n }\n keyCodeToStr(keyCode) {\n return this._keyCodeToStr[keyCode];\n }\n strToKeyCode(str) {\n return this._strToKeyCode[str.toLowerCase()] || 0 /* KeyCode.Unknown */;\n }\n}\nconst uiMap = new KeyCodeStrMap();\nconst userSettingsUSMap = new KeyCodeStrMap();\nconst userSettingsGeneralMap = new KeyCodeStrMap();\nexport const EVENT_KEY_CODE_MAP = new Array(230);\nexport const NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE = {};\nconst scanCodeIntToStr = [];\nconst scanCodeStrToInt = Object.create(null);\nconst scanCodeLowerCaseStrToInt = Object.create(null);\n/**\n * -1 if a ScanCode => KeyCode mapping depends on kb layout.\n */\nexport const IMMUTABLE_CODE_TO_KEY_CODE = [];\n/**\n * -1 if a KeyCode => ScanCode mapping depends on kb layout.\n */\nexport const IMMUTABLE_KEY_CODE_TO_CODE = [];\nfor (let i = 0; i <= 193 /* ScanCode.MAX_VALUE */; i++) {\n IMMUTABLE_CODE_TO_KEY_CODE[i] = -1 /* KeyCode.DependsOnKbLayout */;\n}\nfor (let i = 0; i <= 132 /* KeyCode.MAX_VALUE */; i++) {\n IMMUTABLE_KEY_CODE_TO_CODE[i] = -1 /* ScanCode.DependsOnKbLayout */;\n}\n(function () {\n // See https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx\n // See https://github.com/microsoft/node-native-keymap/blob/88c0b0e5/deps/chromium/keyboard_codes_win.h\n const empty = '';\n const mappings = [\n // immutable, scanCode, scanCodeStr, keyCode, keyCodeStr, eventKeyCode, vkey, usUserSettingsLabel, generalUserSettingsLabel\n [1, 0 /* ScanCode.None */, 'None', 0 /* KeyCode.Unknown */, 'unknown', 0, 'VK_UNKNOWN', empty, empty],\n [1, 1 /* ScanCode.Hyper */, 'Hyper', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 2 /* ScanCode.Super */, 'Super', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 3 /* ScanCode.Fn */, 'Fn', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 4 /* ScanCode.FnLock */, 'FnLock', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 5 /* ScanCode.Suspend */, 'Suspend', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 6 /* ScanCode.Resume */, 'Resume', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 7 /* ScanCode.Turbo */, 'Turbo', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 8 /* ScanCode.Sleep */, 'Sleep', 0 /* KeyCode.Unknown */, empty, 0, 'VK_SLEEP', empty, empty],\n [1, 9 /* ScanCode.WakeUp */, 'WakeUp', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [0, 10 /* ScanCode.KeyA */, 'KeyA', 31 /* KeyCode.KeyA */, 'A', 65, 'VK_A', empty, empty],\n [0, 11 /* ScanCode.KeyB */, 'KeyB', 32 /* KeyCode.KeyB */, 'B', 66, 'VK_B', empty, empty],\n [0, 12 /* ScanCode.KeyC */, 'KeyC', 33 /* KeyCode.KeyC */, 'C', 67, 'VK_C', empty, empty],\n [0, 13 /* ScanCode.KeyD */, 'KeyD', 34 /* KeyCode.KeyD */, 'D', 68, 'VK_D', empty, empty],\n [0, 14 /* ScanCode.KeyE */, 'KeyE', 35 /* KeyCode.KeyE */, 'E', 69, 'VK_E', empty, empty],\n [0, 15 /* ScanCode.KeyF */, 'KeyF', 36 /* KeyCode.KeyF */, 'F', 70, 'VK_F', empty, empty],\n [0, 16 /* ScanCode.KeyG */, 'KeyG', 37 /* KeyCode.KeyG */, 'G', 71, 'VK_G', empty, empty],\n [0, 17 /* ScanCode.KeyH */, 'KeyH', 38 /* KeyCode.KeyH */, 'H', 72, 'VK_H', empty, empty],\n [0, 18 /* ScanCode.KeyI */, 'KeyI', 39 /* KeyCode.KeyI */, 'I', 73, 'VK_I', empty, empty],\n [0, 19 /* ScanCode.KeyJ */, 'KeyJ', 40 /* KeyCode.KeyJ */, 'J', 74, 'VK_J', empty, empty],\n [0, 20 /* ScanCode.KeyK */, 'KeyK', 41 /* KeyCode.KeyK */, 'K', 75, 'VK_K', empty, empty],\n [0, 21 /* ScanCode.KeyL */, 'KeyL', 42 /* KeyCode.KeyL */, 'L', 76, 'VK_L', empty, empty],\n [0, 22 /* ScanCode.KeyM */, 'KeyM', 43 /* KeyCode.KeyM */, 'M', 77, 'VK_M', empty, empty],\n [0, 23 /* ScanCode.KeyN */, 'KeyN', 44 /* KeyCode.KeyN */, 'N', 78, 'VK_N', empty, empty],\n [0, 24 /* ScanCode.KeyO */, 'KeyO', 45 /* KeyCode.KeyO */, 'O', 79, 'VK_O', empty, empty],\n [0, 25 /* ScanCode.KeyP */, 'KeyP', 46 /* KeyCode.KeyP */, 'P', 80, 'VK_P', empty, empty],\n [0, 26 /* ScanCode.KeyQ */, 'KeyQ', 47 /* KeyCode.KeyQ */, 'Q', 81, 'VK_Q', empty, empty],\n [0, 27 /* ScanCode.KeyR */, 'KeyR', 48 /* KeyCode.KeyR */, 'R', 82, 'VK_R', empty, empty],\n [0, 28 /* ScanCode.KeyS */, 'KeyS', 49 /* KeyCode.KeyS */, 'S', 83, 'VK_S', empty, empty],\n [0, 29 /* ScanCode.KeyT */, 'KeyT', 50 /* KeyCode.KeyT */, 'T', 84, 'VK_T', empty, empty],\n [0, 30 /* ScanCode.KeyU */, 'KeyU', 51 /* KeyCode.KeyU */, 'U', 85, 'VK_U', empty, empty],\n [0, 31 /* ScanCode.KeyV */, 'KeyV', 52 /* KeyCode.KeyV */, 'V', 86, 'VK_V', empty, empty],\n [0, 32 /* ScanCode.KeyW */, 'KeyW', 53 /* KeyCode.KeyW */, 'W', 87, 'VK_W', empty, empty],\n [0, 33 /* ScanCode.KeyX */, 'KeyX', 54 /* KeyCode.KeyX */, 'X', 88, 'VK_X', empty, empty],\n [0, 34 /* ScanCode.KeyY */, 'KeyY', 55 /* KeyCode.KeyY */, 'Y', 89, 'VK_Y', empty, empty],\n [0, 35 /* ScanCode.KeyZ */, 'KeyZ', 56 /* KeyCode.KeyZ */, 'Z', 90, 'VK_Z', empty, empty],\n [0, 36 /* ScanCode.Digit1 */, 'Digit1', 22 /* KeyCode.Digit1 */, '1', 49, 'VK_1', empty, empty],\n [0, 37 /* ScanCode.Digit2 */, 'Digit2', 23 /* KeyCode.Digit2 */, '2', 50, 'VK_2', empty, empty],\n [0, 38 /* ScanCode.Digit3 */, 'Digit3', 24 /* KeyCode.Digit3 */, '3', 51, 'VK_3', empty, empty],\n [0, 39 /* ScanCode.Digit4 */, 'Digit4', 25 /* KeyCode.Digit4 */, '4', 52, 'VK_4', empty, empty],\n [0, 40 /* ScanCode.Digit5 */, 'Digit5', 26 /* KeyCode.Digit5 */, '5', 53, 'VK_5', empty, empty],\n [0, 41 /* ScanCode.Digit6 */, 'Digit6', 27 /* KeyCode.Digit6 */, '6', 54, 'VK_6', empty, empty],\n [0, 42 /* ScanCode.Digit7 */, 'Digit7', 28 /* KeyCode.Digit7 */, '7', 55, 'VK_7', empty, empty],\n [0, 43 /* ScanCode.Digit8 */, 'Digit8', 29 /* KeyCode.Digit8 */, '8', 56, 'VK_8', empty, empty],\n [0, 44 /* ScanCode.Digit9 */, 'Digit9', 30 /* KeyCode.Digit9 */, '9', 57, 'VK_9', empty, empty],\n [0, 45 /* ScanCode.Digit0 */, 'Digit0', 21 /* KeyCode.Digit0 */, '0', 48, 'VK_0', empty, empty],\n [1, 46 /* ScanCode.Enter */, 'Enter', 3 /* KeyCode.Enter */, 'Enter', 13, 'VK_RETURN', empty, empty],\n [1, 47 /* ScanCode.Escape */, 'Escape', 9 /* KeyCode.Escape */, 'Escape', 27, 'VK_ESCAPE', empty, empty],\n [1, 48 /* ScanCode.Backspace */, 'Backspace', 1 /* KeyCode.Backspace */, 'Backspace', 8, 'VK_BACK', empty, empty],\n [1, 49 /* ScanCode.Tab */, 'Tab', 2 /* KeyCode.Tab */, 'Tab', 9, 'VK_TAB', empty, empty],\n [1, 50 /* ScanCode.Space */, 'Space', 10 /* KeyCode.Space */, 'Space', 32, 'VK_SPACE', empty, empty],\n [0, 51 /* ScanCode.Minus */, 'Minus', 88 /* KeyCode.Minus */, '-', 189, 'VK_OEM_MINUS', '-', 'OEM_MINUS'],\n [0, 52 /* ScanCode.Equal */, 'Equal', 86 /* KeyCode.Equal */, '=', 187, 'VK_OEM_PLUS', '=', 'OEM_PLUS'],\n [0, 53 /* ScanCode.BracketLeft */, 'BracketLeft', 92 /* KeyCode.BracketLeft */, '[', 219, 'VK_OEM_4', '[', 'OEM_4'],\n [0, 54 /* ScanCode.BracketRight */, 'BracketRight', 94 /* KeyCode.BracketRight */, ']', 221, 'VK_OEM_6', ']', 'OEM_6'],\n [0, 55 /* ScanCode.Backslash */, 'Backslash', 93 /* KeyCode.Backslash */, '\\\\', 220, 'VK_OEM_5', '\\\\', 'OEM_5'],\n [0, 56 /* ScanCode.IntlHash */, 'IntlHash', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty], // has been dropped from the w3c spec\n [0, 57 /* ScanCode.Semicolon */, 'Semicolon', 85 /* KeyCode.Semicolon */, ';', 186, 'VK_OEM_1', ';', 'OEM_1'],\n [0, 58 /* ScanCode.Quote */, 'Quote', 95 /* KeyCode.Quote */, '\\'', 222, 'VK_OEM_7', '\\'', 'OEM_7'],\n [0, 59 /* ScanCode.Backquote */, 'Backquote', 91 /* KeyCode.Backquote */, '`', 192, 'VK_OEM_3', '`', 'OEM_3'],\n [0, 60 /* ScanCode.Comma */, 'Comma', 87 /* KeyCode.Comma */, ',', 188, 'VK_OEM_COMMA', ',', 'OEM_COMMA'],\n [0, 61 /* ScanCode.Period */, 'Period', 89 /* KeyCode.Period */, '.', 190, 'VK_OEM_PERIOD', '.', 'OEM_PERIOD'],\n [0, 62 /* ScanCode.Slash */, 'Slash', 90 /* KeyCode.Slash */, '/', 191, 'VK_OEM_2', '/', 'OEM_2'],\n [1, 63 /* ScanCode.CapsLock */, 'CapsLock', 8 /* KeyCode.CapsLock */, 'CapsLock', 20, 'VK_CAPITAL', empty, empty],\n [1, 64 /* ScanCode.F1 */, 'F1', 59 /* KeyCode.F1 */, 'F1', 112, 'VK_F1', empty, empty],\n [1, 65 /* ScanCode.F2 */, 'F2', 60 /* KeyCode.F2 */, 'F2', 113, 'VK_F2', empty, empty],\n [1, 66 /* ScanCode.F3 */, 'F3', 61 /* KeyCode.F3 */, 'F3', 114, 'VK_F3', empty, empty],\n [1, 67 /* ScanCode.F4 */, 'F4', 62 /* KeyCode.F4 */, 'F4', 115, 'VK_F4', empty, empty],\n [1, 68 /* ScanCode.F5 */, 'F5', 63 /* KeyCode.F5 */, 'F5', 116, 'VK_F5', empty, empty],\n [1, 69 /* ScanCode.F6 */, 'F6', 64 /* KeyCode.F6 */, 'F6', 117, 'VK_F6', empty, empty],\n [1, 70 /* ScanCode.F7 */, 'F7', 65 /* KeyCode.F7 */, 'F7', 118, 'VK_F7', empty, empty],\n [1, 71 /* ScanCode.F8 */, 'F8', 66 /* KeyCode.F8 */, 'F8', 119, 'VK_F8', empty, empty],\n [1, 72 /* ScanCode.F9 */, 'F9', 67 /* KeyCode.F9 */, 'F9', 120, 'VK_F9', empty, empty],\n [1, 73 /* ScanCode.F10 */, 'F10', 68 /* KeyCode.F10 */, 'F10', 121, 'VK_F10', empty, empty],\n [1, 74 /* ScanCode.F11 */, 'F11', 69 /* KeyCode.F11 */, 'F11', 122, 'VK_F11', empty, empty],\n [1, 75 /* ScanCode.F12 */, 'F12', 70 /* KeyCode.F12 */, 'F12', 123, 'VK_F12', empty, empty],\n [1, 76 /* ScanCode.PrintScreen */, 'PrintScreen', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 77 /* ScanCode.ScrollLock */, 'ScrollLock', 84 /* KeyCode.ScrollLock */, 'ScrollLock', 145, 'VK_SCROLL', empty, empty],\n [1, 78 /* ScanCode.Pause */, 'Pause', 7 /* KeyCode.PauseBreak */, 'PauseBreak', 19, 'VK_PAUSE', empty, empty],\n [1, 79 /* ScanCode.Insert */, 'Insert', 19 /* KeyCode.Insert */, 'Insert', 45, 'VK_INSERT', empty, empty],\n [1, 80 /* ScanCode.Home */, 'Home', 14 /* KeyCode.Home */, 'Home', 36, 'VK_HOME', empty, empty],\n [1, 81 /* ScanCode.PageUp */, 'PageUp', 11 /* KeyCode.PageUp */, 'PageUp', 33, 'VK_PRIOR', empty, empty],\n [1, 82 /* ScanCode.Delete */, 'Delete', 20 /* KeyCode.Delete */, 'Delete', 46, 'VK_DELETE', empty, empty],\n [1, 83 /* ScanCode.End */, 'End', 13 /* KeyCode.End */, 'End', 35, 'VK_END', empty, empty],\n [1, 84 /* ScanCode.PageDown */, 'PageDown', 12 /* KeyCode.PageDown */, 'PageDown', 34, 'VK_NEXT', empty, empty],\n [1, 85 /* ScanCode.ArrowRight */, 'ArrowRight', 17 /* KeyCode.RightArrow */, 'RightArrow', 39, 'VK_RIGHT', 'Right', empty],\n [1, 86 /* ScanCode.ArrowLeft */, 'ArrowLeft', 15 /* KeyCode.LeftArrow */, 'LeftArrow', 37, 'VK_LEFT', 'Left', empty],\n [1, 87 /* ScanCode.ArrowDown */, 'ArrowDown', 18 /* KeyCode.DownArrow */, 'DownArrow', 40, 'VK_DOWN', 'Down', empty],\n [1, 88 /* ScanCode.ArrowUp */, 'ArrowUp', 16 /* KeyCode.UpArrow */, 'UpArrow', 38, 'VK_UP', 'Up', empty],\n [1, 89 /* ScanCode.NumLock */, 'NumLock', 83 /* KeyCode.NumLock */, 'NumLock', 144, 'VK_NUMLOCK', empty, empty],\n [1, 90 /* ScanCode.NumpadDivide */, 'NumpadDivide', 113 /* KeyCode.NumpadDivide */, 'NumPad_Divide', 111, 'VK_DIVIDE', empty, empty],\n [1, 91 /* ScanCode.NumpadMultiply */, 'NumpadMultiply', 108 /* KeyCode.NumpadMultiply */, 'NumPad_Multiply', 106, 'VK_MULTIPLY', empty, empty],\n [1, 92 /* ScanCode.NumpadSubtract */, 'NumpadSubtract', 111 /* KeyCode.NumpadSubtract */, 'NumPad_Subtract', 109, 'VK_SUBTRACT', empty, empty],\n [1, 93 /* ScanCode.NumpadAdd */, 'NumpadAdd', 109 /* KeyCode.NumpadAdd */, 'NumPad_Add', 107, 'VK_ADD', empty, empty],\n [1, 94 /* ScanCode.NumpadEnter */, 'NumpadEnter', 3 /* KeyCode.Enter */, empty, 0, empty, empty, empty],\n [1, 95 /* ScanCode.Numpad1 */, 'Numpad1', 99 /* KeyCode.Numpad1 */, 'NumPad1', 97, 'VK_NUMPAD1', empty, empty],\n [1, 96 /* ScanCode.Numpad2 */, 'Numpad2', 100 /* KeyCode.Numpad2 */, 'NumPad2', 98, 'VK_NUMPAD2', empty, empty],\n [1, 97 /* ScanCode.Numpad3 */, 'Numpad3', 101 /* KeyCode.Numpad3 */, 'NumPad3', 99, 'VK_NUMPAD3', empty, empty],\n [1, 98 /* ScanCode.Numpad4 */, 'Numpad4', 102 /* KeyCode.Numpad4 */, 'NumPad4', 100, 'VK_NUMPAD4', empty, empty],\n [1, 99 /* ScanCode.Numpad5 */, 'Numpad5', 103 /* KeyCode.Numpad5 */, 'NumPad5', 101, 'VK_NUMPAD5', empty, empty],\n [1, 100 /* ScanCode.Numpad6 */, 'Numpad6', 104 /* KeyCode.Numpad6 */, 'NumPad6', 102, 'VK_NUMPAD6', empty, empty],\n [1, 101 /* ScanCode.Numpad7 */, 'Numpad7', 105 /* KeyCode.Numpad7 */, 'NumPad7', 103, 'VK_NUMPAD7', empty, empty],\n [1, 102 /* ScanCode.Numpad8 */, 'Numpad8', 106 /* KeyCode.Numpad8 */, 'NumPad8', 104, 'VK_NUMPAD8', empty, empty],\n [1, 103 /* ScanCode.Numpad9 */, 'Numpad9', 107 /* KeyCode.Numpad9 */, 'NumPad9', 105, 'VK_NUMPAD9', empty, empty],\n [1, 104 /* ScanCode.Numpad0 */, 'Numpad0', 98 /* KeyCode.Numpad0 */, 'NumPad0', 96, 'VK_NUMPAD0', empty, empty],\n [1, 105 /* ScanCode.NumpadDecimal */, 'NumpadDecimal', 112 /* KeyCode.NumpadDecimal */, 'NumPad_Decimal', 110, 'VK_DECIMAL', empty, empty],\n [0, 106 /* ScanCode.IntlBackslash */, 'IntlBackslash', 97 /* KeyCode.IntlBackslash */, 'OEM_102', 226, 'VK_OEM_102', empty, empty],\n [1, 107 /* ScanCode.ContextMenu */, 'ContextMenu', 58 /* KeyCode.ContextMenu */, 'ContextMenu', 93, empty, empty, empty],\n [1, 108 /* ScanCode.Power */, 'Power', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 109 /* ScanCode.NumpadEqual */, 'NumpadEqual', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 110 /* ScanCode.F13 */, 'F13', 71 /* KeyCode.F13 */, 'F13', 124, 'VK_F13', empty, empty],\n [1, 111 /* ScanCode.F14 */, 'F14', 72 /* KeyCode.F14 */, 'F14', 125, 'VK_F14', empty, empty],\n [1, 112 /* ScanCode.F15 */, 'F15', 73 /* KeyCode.F15 */, 'F15', 126, 'VK_F15', empty, empty],\n [1, 113 /* ScanCode.F16 */, 'F16', 74 /* KeyCode.F16 */, 'F16', 127, 'VK_F16', empty, empty],\n [1, 114 /* ScanCode.F17 */, 'F17', 75 /* KeyCode.F17 */, 'F17', 128, 'VK_F17', empty, empty],\n [1, 115 /* ScanCode.F18 */, 'F18', 76 /* KeyCode.F18 */, 'F18', 129, 'VK_F18', empty, empty],\n [1, 116 /* ScanCode.F19 */, 'F19', 77 /* KeyCode.F19 */, 'F19', 130, 'VK_F19', empty, empty],\n [1, 117 /* ScanCode.F20 */, 'F20', 78 /* KeyCode.F20 */, 'F20', 131, 'VK_F20', empty, empty],\n [1, 118 /* ScanCode.F21 */, 'F21', 79 /* KeyCode.F21 */, 'F21', 132, 'VK_F21', empty, empty],\n [1, 119 /* ScanCode.F22 */, 'F22', 80 /* KeyCode.F22 */, 'F22', 133, 'VK_F22', empty, empty],\n [1, 120 /* ScanCode.F23 */, 'F23', 81 /* KeyCode.F23 */, 'F23', 134, 'VK_F23', empty, empty],\n [1, 121 /* ScanCode.F24 */, 'F24', 82 /* KeyCode.F24 */, 'F24', 135, 'VK_F24', empty, empty],\n [1, 122 /* ScanCode.Open */, 'Open', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 123 /* ScanCode.Help */, 'Help', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 124 /* ScanCode.Select */, 'Select', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 125 /* ScanCode.Again */, 'Again', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 126 /* ScanCode.Undo */, 'Undo', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 127 /* ScanCode.Cut */, 'Cut', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 128 /* ScanCode.Copy */, 'Copy', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 129 /* ScanCode.Paste */, 'Paste', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 130 /* ScanCode.Find */, 'Find', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 131 /* ScanCode.AudioVolumeMute */, 'AudioVolumeMute', 117 /* KeyCode.AudioVolumeMute */, 'AudioVolumeMute', 173, 'VK_VOLUME_MUTE', empty, empty],\n [1, 132 /* ScanCode.AudioVolumeUp */, 'AudioVolumeUp', 118 /* KeyCode.AudioVolumeUp */, 'AudioVolumeUp', 175, 'VK_VOLUME_UP', empty, empty],\n [1, 133 /* ScanCode.AudioVolumeDown */, 'AudioVolumeDown', 119 /* KeyCode.AudioVolumeDown */, 'AudioVolumeDown', 174, 'VK_VOLUME_DOWN', empty, empty],\n [1, 134 /* ScanCode.NumpadComma */, 'NumpadComma', 110 /* KeyCode.NUMPAD_SEPARATOR */, 'NumPad_Separator', 108, 'VK_SEPARATOR', empty, empty],\n [0, 135 /* ScanCode.IntlRo */, 'IntlRo', 115 /* KeyCode.ABNT_C1 */, 'ABNT_C1', 193, 'VK_ABNT_C1', empty, empty],\n [1, 136 /* ScanCode.KanaMode */, 'KanaMode', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [0, 137 /* ScanCode.IntlYen */, 'IntlYen', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 138 /* ScanCode.Convert */, 'Convert', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 139 /* ScanCode.NonConvert */, 'NonConvert', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 140 /* ScanCode.Lang1 */, 'Lang1', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 141 /* ScanCode.Lang2 */, 'Lang2', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 142 /* ScanCode.Lang3 */, 'Lang3', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 143 /* ScanCode.Lang4 */, 'Lang4', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 144 /* ScanCode.Lang5 */, 'Lang5', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 145 /* ScanCode.Abort */, 'Abort', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 146 /* ScanCode.Props */, 'Props', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 147 /* ScanCode.NumpadParenLeft */, 'NumpadParenLeft', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 148 /* ScanCode.NumpadParenRight */, 'NumpadParenRight', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 149 /* ScanCode.NumpadBackspace */, 'NumpadBackspace', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 150 /* ScanCode.NumpadMemoryStore */, 'NumpadMemoryStore', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 151 /* ScanCode.NumpadMemoryRecall */, 'NumpadMemoryRecall', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 152 /* ScanCode.NumpadMemoryClear */, 'NumpadMemoryClear', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 153 /* ScanCode.NumpadMemoryAdd */, 'NumpadMemoryAdd', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 154 /* ScanCode.NumpadMemorySubtract */, 'NumpadMemorySubtract', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 155 /* ScanCode.NumpadClear */, 'NumpadClear', 131 /* KeyCode.Clear */, 'Clear', 12, 'VK_CLEAR', empty, empty],\n [1, 156 /* ScanCode.NumpadClearEntry */, 'NumpadClearEntry', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 0 /* ScanCode.None */, empty, 5 /* KeyCode.Ctrl */, 'Ctrl', 17, 'VK_CONTROL', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 4 /* KeyCode.Shift */, 'Shift', 16, 'VK_SHIFT', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 6 /* KeyCode.Alt */, 'Alt', 18, 'VK_MENU', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 57 /* KeyCode.Meta */, 'Meta', 91, 'VK_COMMAND', empty, empty],\n [1, 157 /* ScanCode.ControlLeft */, 'ControlLeft', 5 /* KeyCode.Ctrl */, empty, 0, 'VK_LCONTROL', empty, empty],\n [1, 158 /* ScanCode.ShiftLeft */, 'ShiftLeft', 4 /* KeyCode.Shift */, empty, 0, 'VK_LSHIFT', empty, empty],\n [1, 159 /* ScanCode.AltLeft */, 'AltLeft', 6 /* KeyCode.Alt */, empty, 0, 'VK_LMENU', empty, empty],\n [1, 160 /* ScanCode.MetaLeft */, 'MetaLeft', 57 /* KeyCode.Meta */, empty, 0, 'VK_LWIN', empty, empty],\n [1, 161 /* ScanCode.ControlRight */, 'ControlRight', 5 /* KeyCode.Ctrl */, empty, 0, 'VK_RCONTROL', empty, empty],\n [1, 162 /* ScanCode.ShiftRight */, 'ShiftRight', 4 /* KeyCode.Shift */, empty, 0, 'VK_RSHIFT', empty, empty],\n [1, 163 /* ScanCode.AltRight */, 'AltRight', 6 /* KeyCode.Alt */, empty, 0, 'VK_RMENU', empty, empty],\n [1, 164 /* ScanCode.MetaRight */, 'MetaRight', 57 /* KeyCode.Meta */, empty, 0, 'VK_RWIN', empty, empty],\n [1, 165 /* ScanCode.BrightnessUp */, 'BrightnessUp', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 166 /* ScanCode.BrightnessDown */, 'BrightnessDown', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 167 /* ScanCode.MediaPlay */, 'MediaPlay', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 168 /* ScanCode.MediaRecord */, 'MediaRecord', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 169 /* ScanCode.MediaFastForward */, 'MediaFastForward', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 170 /* ScanCode.MediaRewind */, 'MediaRewind', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 171 /* ScanCode.MediaTrackNext */, 'MediaTrackNext', 124 /* KeyCode.MediaTrackNext */, 'MediaTrackNext', 176, 'VK_MEDIA_NEXT_TRACK', empty, empty],\n [1, 172 /* ScanCode.MediaTrackPrevious */, 'MediaTrackPrevious', 125 /* KeyCode.MediaTrackPrevious */, 'MediaTrackPrevious', 177, 'VK_MEDIA_PREV_TRACK', empty, empty],\n [1, 173 /* ScanCode.MediaStop */, 'MediaStop', 126 /* KeyCode.MediaStop */, 'MediaStop', 178, 'VK_MEDIA_STOP', empty, empty],\n [1, 174 /* ScanCode.Eject */, 'Eject', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 175 /* ScanCode.MediaPlayPause */, 'MediaPlayPause', 127 /* KeyCode.MediaPlayPause */, 'MediaPlayPause', 179, 'VK_MEDIA_PLAY_PAUSE', empty, empty],\n [1, 176 /* ScanCode.MediaSelect */, 'MediaSelect', 128 /* KeyCode.LaunchMediaPlayer */, 'LaunchMediaPlayer', 181, 'VK_MEDIA_LAUNCH_MEDIA_SELECT', empty, empty],\n [1, 177 /* ScanCode.LaunchMail */, 'LaunchMail', 129 /* KeyCode.LaunchMail */, 'LaunchMail', 180, 'VK_MEDIA_LAUNCH_MAIL', empty, empty],\n [1, 178 /* ScanCode.LaunchApp2 */, 'LaunchApp2', 130 /* KeyCode.LaunchApp2 */, 'LaunchApp2', 183, 'VK_MEDIA_LAUNCH_APP2', empty, empty],\n [1, 179 /* ScanCode.LaunchApp1 */, 'LaunchApp1', 0 /* KeyCode.Unknown */, empty, 0, 'VK_MEDIA_LAUNCH_APP1', empty, empty],\n [1, 180 /* ScanCode.SelectTask */, 'SelectTask', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 181 /* ScanCode.LaunchScreenSaver */, 'LaunchScreenSaver', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 182 /* ScanCode.BrowserSearch */, 'BrowserSearch', 120 /* KeyCode.BrowserSearch */, 'BrowserSearch', 170, 'VK_BROWSER_SEARCH', empty, empty],\n [1, 183 /* ScanCode.BrowserHome */, 'BrowserHome', 121 /* KeyCode.BrowserHome */, 'BrowserHome', 172, 'VK_BROWSER_HOME', empty, empty],\n [1, 184 /* ScanCode.BrowserBack */, 'BrowserBack', 122 /* KeyCode.BrowserBack */, 'BrowserBack', 166, 'VK_BROWSER_BACK', empty, empty],\n [1, 185 /* ScanCode.BrowserForward */, 'BrowserForward', 123 /* KeyCode.BrowserForward */, 'BrowserForward', 167, 'VK_BROWSER_FORWARD', empty, empty],\n [1, 186 /* ScanCode.BrowserStop */, 'BrowserStop', 0 /* KeyCode.Unknown */, empty, 0, 'VK_BROWSER_STOP', empty, empty],\n [1, 187 /* ScanCode.BrowserRefresh */, 'BrowserRefresh', 0 /* KeyCode.Unknown */, empty, 0, 'VK_BROWSER_REFRESH', empty, empty],\n [1, 188 /* ScanCode.BrowserFavorites */, 'BrowserFavorites', 0 /* KeyCode.Unknown */, empty, 0, 'VK_BROWSER_FAVORITES', empty, empty],\n [1, 189 /* ScanCode.ZoomToggle */, 'ZoomToggle', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 190 /* ScanCode.MailReply */, 'MailReply', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 191 /* ScanCode.MailForward */, 'MailForward', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n [1, 192 /* ScanCode.MailSend */, 'MailSend', 0 /* KeyCode.Unknown */, empty, 0, empty, empty, empty],\n // See https://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html\n // If an Input Method Editor is processing key input and the event is keydown, return 229.\n [1, 0 /* ScanCode.None */, empty, 114 /* KeyCode.KEY_IN_COMPOSITION */, 'KeyInComposition', 229, empty, empty, empty],\n [1, 0 /* ScanCode.None */, empty, 116 /* KeyCode.ABNT_C2 */, 'ABNT_C2', 194, 'VK_ABNT_C2', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 96 /* KeyCode.OEM_8 */, 'OEM_8', 223, 'VK_OEM_8', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_KANA', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_HANGUL', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_JUNJA', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_FINAL', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_HANJA', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_KANJI', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_CONVERT', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_NONCONVERT', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_ACCEPT', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_MODECHANGE', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_SELECT', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_PRINT', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_EXECUTE', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_SNAPSHOT', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_HELP', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_APPS', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_PROCESSKEY', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_PACKET', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_DBE_SBCSCHAR', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_DBE_DBCSCHAR', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_ATTN', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_CRSEL', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_EXSEL', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_EREOF', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_PLAY', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_ZOOM', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_NONAME', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_PA1', empty, empty],\n [1, 0 /* ScanCode.None */, empty, 0 /* KeyCode.Unknown */, empty, 0, 'VK_OEM_CLEAR', empty, empty],\n ];\n const seenKeyCode = [];\n const seenScanCode = [];\n for (const mapping of mappings) {\n const [immutable, scanCode, scanCodeStr, keyCode, keyCodeStr, eventKeyCode, vkey, usUserSettingsLabel, generalUserSettingsLabel] = mapping;\n if (!seenScanCode[scanCode]) {\n seenScanCode[scanCode] = true;\n scanCodeIntToStr[scanCode] = scanCodeStr;\n scanCodeStrToInt[scanCodeStr] = scanCode;\n scanCodeLowerCaseStrToInt[scanCodeStr.toLowerCase()] = scanCode;\n if (immutable) {\n IMMUTABLE_CODE_TO_KEY_CODE[scanCode] = keyCode;\n if ((keyCode !== 0 /* KeyCode.Unknown */)\n && (keyCode !== 3 /* KeyCode.Enter */)\n && (keyCode !== 5 /* KeyCode.Ctrl */)\n && (keyCode !== 4 /* KeyCode.Shift */)\n && (keyCode !== 6 /* KeyCode.Alt */)\n && (keyCode !== 57 /* KeyCode.Meta */)) {\n IMMUTABLE_KEY_CODE_TO_CODE[keyCode] = scanCode;\n }\n }\n }\n if (!seenKeyCode[keyCode]) {\n seenKeyCode[keyCode] = true;\n if (!keyCodeStr) {\n throw new Error(`String representation missing for key code ${keyCode} around scan code ${scanCodeStr}`);\n }\n uiMap.define(keyCode, keyCodeStr);\n userSettingsUSMap.define(keyCode, usUserSettingsLabel || keyCodeStr);\n userSettingsGeneralMap.define(keyCode, generalUserSettingsLabel || usUserSettingsLabel || keyCodeStr);\n }\n if (eventKeyCode) {\n EVENT_KEY_CODE_MAP[eventKeyCode] = keyCode;\n }\n if (vkey) {\n NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[vkey] = keyCode;\n }\n }\n // Manually added due to the exclusion above (due to duplication with NumpadEnter)\n IMMUTABLE_KEY_CODE_TO_CODE[3 /* KeyCode.Enter */] = 46 /* ScanCode.Enter */;\n})();\nexport var KeyCodeUtils;\n(function (KeyCodeUtils) {\n function toString(keyCode) {\n return uiMap.keyCodeToStr(keyCode);\n }\n KeyCodeUtils.toString = toString;\n function fromString(key) {\n return uiMap.strToKeyCode(key);\n }\n KeyCodeUtils.fromString = fromString;\n function toUserSettingsUS(keyCode) {\n return userSettingsUSMap.keyCodeToStr(keyCode);\n }\n KeyCodeUtils.toUserSettingsUS = toUserSettingsUS;\n function toUserSettingsGeneral(keyCode) {\n return userSettingsGeneralMap.keyCodeToStr(keyCode);\n }\n KeyCodeUtils.toUserSettingsGeneral = toUserSettingsGeneral;\n function fromUserSettings(key) {\n return userSettingsUSMap.strToKeyCode(key) || userSettingsGeneralMap.strToKeyCode(key);\n }\n KeyCodeUtils.fromUserSettings = fromUserSettings;\n function toElectronAccelerator(keyCode) {\n if (keyCode >= 98 /* KeyCode.Numpad0 */ && keyCode <= 113 /* KeyCode.NumpadDivide */) {\n // [Electron Accelerators] Electron is able to parse numpad keys, but unfortunately it\n // renders them just as regular keys in menus. For example, num0 is rendered as \"0\",\n // numdiv is rendered as \"/\", numsub is rendered as \"-\".\n //\n // This can lead to incredible confusion, as it makes numpad based keybindings indistinguishable\n // from keybindings based on regular keys.\n //\n // We therefore need to fall back to custom rendering for numpad keys.\n return null;\n }\n switch (keyCode) {\n case 16 /* KeyCode.UpArrow */:\n return 'Up';\n case 18 /* KeyCode.DownArrow */:\n return 'Down';\n case 15 /* KeyCode.LeftArrow */:\n return 'Left';\n case 17 /* KeyCode.RightArrow */:\n return 'Right';\n }\n return uiMap.keyCodeToStr(keyCode);\n }\n KeyCodeUtils.toElectronAccelerator = toElectronAccelerator;\n})(KeyCodeUtils || (KeyCodeUtils = {}));\nexport function KeyChord(firstPart, secondPart) {\n const chordPart = ((secondPart & 0x0000FFFF) << 16) >>> 0;\n return (firstPart | chordPart) >>> 0;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { isMacintosh, isWindows } from './platform.js';\nlet safeProcess;\n// Native sandbox environment\nconst vscodeGlobal = globalThis.vscode;\nif (typeof vscodeGlobal !== 'undefined' && typeof vscodeGlobal.process !== 'undefined') {\n const sandboxProcess = vscodeGlobal.process;\n safeProcess = {\n get platform() { return sandboxProcess.platform; },\n get arch() { return sandboxProcess.arch; },\n get env() { return sandboxProcess.env; },\n cwd() { return sandboxProcess.cwd(); }\n };\n}\n// Native node.js environment\nelse if (typeof process !== 'undefined') {\n safeProcess = {\n get platform() { return process.platform; },\n get arch() { return process.arch; },\n get env() { return process.env; },\n cwd() { return process.env['VSCODE_CWD'] || process.cwd(); }\n };\n}\n// Web environment\nelse {\n safeProcess = {\n // Supported\n get platform() { return isWindows ? 'win32' : isMacintosh ? 'darwin' : 'linux'; },\n get arch() { return undefined; /* arch is undefined in web */ },\n // Unsupported\n get env() { return {}; },\n cwd() { return '/'; }\n };\n}\n/**\n * Provides safe access to the `cwd` property in node.js, sandboxed or web\n * environments.\n *\n * Note: in web, this property is hardcoded to be `/`.\n *\n * @skipMangle\n */\nexport const cwd = safeProcess.cwd;\n/**\n * Provides safe access to the `env` property in node.js, sandboxed or web\n * environments.\n *\n * Note: in web, this property is hardcoded to be `{}`.\n */\nexport const env = safeProcess.env;\n/**\n * Provides safe access to the `platform` property in node.js, sandboxed or web\n * environments.\n */\nexport const platform = safeProcess.platform;\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n// NOTE: VSCode's copy of nodejs path library to be usable in common (non-node) namespace\n// Copied from: https://github.com/nodejs/node/blob/v16.14.2/lib/path.js\n/**\n * Copyright Joyent, Inc. and other Node contributors.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to permit\n * persons to whom the Software is furnished to do so, subject to the\n * following conditions:\n *\n * The above copyright notice and this permission notice shall be included\n * in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n * USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nimport * as process from './process.js';\nconst CHAR_UPPERCASE_A = 65; /* A */\nconst CHAR_LOWERCASE_A = 97; /* a */\nconst CHAR_UPPERCASE_Z = 90; /* Z */\nconst CHAR_LOWERCASE_Z = 122; /* z */\nconst CHAR_DOT = 46; /* . */\nconst CHAR_FORWARD_SLASH = 47; /* / */\nconst CHAR_BACKWARD_SLASH = 92; /* \\ */\nconst CHAR_COLON = 58; /* : */\nconst CHAR_QUESTION_MARK = 63; /* ? */\nclass ErrorInvalidArgType extends Error {\n constructor(name, expected, actual) {\n // determiner: 'must be' or 'must not be'\n let determiner;\n if (typeof expected === 'string' && expected.indexOf('not ') === 0) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n }\n else {\n determiner = 'must be';\n }\n const type = name.indexOf('.') !== -1 ? 'property' : 'argument';\n let msg = `The \"${name}\" ${type} ${determiner} of type ${expected}`;\n msg += `. Received type ${typeof actual}`;\n super(msg);\n this.code = 'ERR_INVALID_ARG_TYPE';\n }\n}\nfunction validateObject(pathObject, name) {\n if (pathObject === null || typeof pathObject !== 'object') {\n throw new ErrorInvalidArgType(name, 'Object', pathObject);\n }\n}\nfunction validateString(value, name) {\n if (typeof value !== 'string') {\n throw new ErrorInvalidArgType(name, 'string', value);\n }\n}\nconst platformIsWin32 = (process.platform === 'win32');\nfunction isPathSeparator(code) {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n}\nfunction isPosixPathSeparator(code) {\n return code === CHAR_FORWARD_SLASH;\n}\nfunction isWindowsDeviceRoot(code) {\n return (code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z) ||\n (code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z);\n}\n// Resolves . and .. elements in a path with directory names\nfunction normalizeString(path, allowAboveRoot, separator, isPathSeparator) {\n let res = '';\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let code = 0;\n for (let i = 0; i <= path.length; ++i) {\n if (i < path.length) {\n code = path.charCodeAt(i);\n }\n else if (isPathSeparator(code)) {\n break;\n }\n else {\n code = CHAR_FORWARD_SLASH;\n }\n if (isPathSeparator(code)) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n }\n else if (dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 ||\n res.charCodeAt(res.length - 1) !== CHAR_DOT ||\n res.charCodeAt(res.length - 2) !== CHAR_DOT) {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(separator);\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n }\n else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n else if (res.length !== 0) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n res += res.length > 0 ? `${separator}..` : '..';\n lastSegmentLength = 2;\n }\n }\n else {\n if (res.length > 0) {\n res += `${separator}${path.slice(lastSlash + 1, i)}`;\n }\n else {\n res = path.slice(lastSlash + 1, i);\n }\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n }\n else if (code === CHAR_DOT && dots !== -1) {\n ++dots;\n }\n else {\n dots = -1;\n }\n }\n return res;\n}\nfunction _format(sep, pathObject) {\n validateObject(pathObject, 'pathObject');\n const dir = pathObject.dir || pathObject.root;\n const base = pathObject.base ||\n `${pathObject.name || ''}${pathObject.ext || ''}`;\n if (!dir) {\n return base;\n }\n return dir === pathObject.root ? `${dir}${base}` : `${dir}${sep}${base}`;\n}\nexport const win32 = {\n // path.resolve([from ...], to)\n resolve(...pathSegments) {\n let resolvedDevice = '';\n let resolvedTail = '';\n let resolvedAbsolute = false;\n for (let i = pathSegments.length - 1; i >= -1; i--) {\n let path;\n if (i >= 0) {\n path = pathSegments[i];\n validateString(path, 'path');\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n }\n else if (resolvedDevice.length === 0) {\n path = process.cwd();\n }\n else {\n // Windows has the concept of drive-specific current working\n // directories. If we've resolved a drive letter but not yet an\n // absolute path, get cwd for that drive, or the process cwd if\n // the drive cwd is not available. We're sure the device is not\n // a UNC path at this points, because UNC paths are always absolute.\n path = process.env[`=${resolvedDevice}`] || process.cwd();\n // Verify that a cwd was found and that it actually points\n // to our drive. If not, default to the drive's root.\n if (path === undefined ||\n (path.slice(0, 2).toLowerCase() !== resolvedDevice.toLowerCase() &&\n path.charCodeAt(2) === CHAR_BACKWARD_SLASH)) {\n path = `${resolvedDevice}\\\\`;\n }\n }\n const len = path.length;\n let rootEnd = 0;\n let device = '';\n let isAbsolute = false;\n const code = path.charCodeAt(0);\n // Try to match a root\n if (len === 1) {\n if (isPathSeparator(code)) {\n // `path` contains just a path separator\n rootEnd = 1;\n isAbsolute = true;\n }\n }\n else if (isPathSeparator(code)) {\n // Possible UNC root\n // If we started with a separator, we know we at least have an\n // absolute path of some kind (UNC or otherwise)\n isAbsolute = true;\n if (isPathSeparator(path.charCodeAt(1))) {\n // Matched double path separator at beginning\n let j = 2;\n let last = j;\n // Match 1 or more non-path separators\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j < len && j !== last) {\n const firstPart = path.slice(last, j);\n // Matched!\n last = j;\n // Match 1 or more path separators\n while (j < len && isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more non-path separators\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j === len || j !== last) {\n // We matched a UNC root\n device = `\\\\\\\\${firstPart}\\\\${path.slice(last, j)}`;\n rootEnd = j;\n }\n }\n }\n }\n else {\n rootEnd = 1;\n }\n }\n else if (isWindowsDeviceRoot(code) &&\n path.charCodeAt(1) === CHAR_COLON) {\n // Possible device root\n device = path.slice(0, 2);\n rootEnd = 2;\n if (len > 2 && isPathSeparator(path.charCodeAt(2))) {\n // Treat separator following drive name as an absolute path\n // indicator\n isAbsolute = true;\n rootEnd = 3;\n }\n }\n if (device.length > 0) {\n if (resolvedDevice.length > 0) {\n if (device.toLowerCase() !== resolvedDevice.toLowerCase()) {\n // This path points to another device so it is not applicable\n continue;\n }\n }\n else {\n resolvedDevice = device;\n }\n }\n if (resolvedAbsolute) {\n if (resolvedDevice.length > 0) {\n break;\n }\n }\n else {\n resolvedTail = `${path.slice(rootEnd)}\\\\${resolvedTail}`;\n resolvedAbsolute = isAbsolute;\n if (isAbsolute && resolvedDevice.length > 0) {\n break;\n }\n }\n }\n // At this point the path should be resolved to a full absolute path,\n // but handle relative paths to be safe (might happen when process.cwd()\n // fails)\n // Normalize the tail path\n resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, '\\\\', isPathSeparator);\n return resolvedAbsolute ?\n `${resolvedDevice}\\\\${resolvedTail}` :\n `${resolvedDevice}${resolvedTail}` || '.';\n },\n normalize(path) {\n validateString(path, 'path');\n const len = path.length;\n if (len === 0) {\n return '.';\n }\n let rootEnd = 0;\n let device;\n let isAbsolute = false;\n const code = path.charCodeAt(0);\n // Try to match a root\n if (len === 1) {\n // `path` contains just a single char, exit early to avoid\n // unnecessary work\n return isPosixPathSeparator(code) ? '\\\\' : path;\n }\n if (isPathSeparator(code)) {\n // Possible UNC root\n // If we started with a separator, we know we at least have an absolute\n // path of some kind (UNC or otherwise)\n isAbsolute = true;\n if (isPathSeparator(path.charCodeAt(1))) {\n // Matched double path separator at beginning\n let j = 2;\n let last = j;\n // Match 1 or more non-path separators\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j < len && j !== last) {\n const firstPart = path.slice(last, j);\n // Matched!\n last = j;\n // Match 1 or more path separators\n while (j < len && isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more non-path separators\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j === len) {\n // We matched a UNC root only\n // Return the normalized version of the UNC root since there\n // is nothing left to process\n return `\\\\\\\\${firstPart}\\\\${path.slice(last)}\\\\`;\n }\n if (j !== last) {\n // We matched a UNC root with leftovers\n device = `\\\\\\\\${firstPart}\\\\${path.slice(last, j)}`;\n rootEnd = j;\n }\n }\n }\n }\n else {\n rootEnd = 1;\n }\n }\n else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {\n // Possible device root\n device = path.slice(0, 2);\n rootEnd = 2;\n if (len > 2 && isPathSeparator(path.charCodeAt(2))) {\n // Treat separator following drive name as an absolute path\n // indicator\n isAbsolute = true;\n rootEnd = 3;\n }\n }\n let tail = rootEnd < len ?\n normalizeString(path.slice(rootEnd), !isAbsolute, '\\\\', isPathSeparator) :\n '';\n if (tail.length === 0 && !isAbsolute) {\n tail = '.';\n }\n if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) {\n tail += '\\\\';\n }\n if (device === undefined) {\n return isAbsolute ? `\\\\${tail}` : tail;\n }\n return isAbsolute ? `${device}\\\\${tail}` : `${device}${tail}`;\n },\n isAbsolute(path) {\n validateString(path, 'path');\n const len = path.length;\n if (len === 0) {\n return false;\n }\n const code = path.charCodeAt(0);\n return isPathSeparator(code) ||\n // Possible device root\n (len > 2 &&\n isWindowsDeviceRoot(code) &&\n path.charCodeAt(1) === CHAR_COLON &&\n isPathSeparator(path.charCodeAt(2)));\n },\n join(...paths) {\n if (paths.length === 0) {\n return '.';\n }\n let joined;\n let firstPart;\n for (let i = 0; i < paths.length; ++i) {\n const arg = paths[i];\n validateString(arg, 'path');\n if (arg.length > 0) {\n if (joined === undefined) {\n joined = firstPart = arg;\n }\n else {\n joined += `\\\\${arg}`;\n }\n }\n }\n if (joined === undefined) {\n return '.';\n }\n // Make sure that the joined path doesn't start with two slashes, because\n // normalize() will mistake it for a UNC path then.\n //\n // This step is skipped when it is very clear that the user actually\n // intended to point at a UNC path. This is assumed when the first\n // non-empty string arguments starts with exactly two slashes followed by\n // at least one more non-slash character.\n //\n // Note that for normalize() to treat a path as a UNC path it needs to\n // have at least 2 components, so we don't filter for that here.\n // This means that the user can use join to construct UNC paths from\n // a server name and a share name; for example:\n // path.join('//server', 'share') -> '\\\\\\\\server\\\\share\\\\')\n let needsReplace = true;\n let slashCount = 0;\n if (typeof firstPart === 'string' && isPathSeparator(firstPart.charCodeAt(0))) {\n ++slashCount;\n const firstLen = firstPart.length;\n if (firstLen > 1 && isPathSeparator(firstPart.charCodeAt(1))) {\n ++slashCount;\n if (firstLen > 2) {\n if (isPathSeparator(firstPart.charCodeAt(2))) {\n ++slashCount;\n }\n else {\n // We matched a UNC path in the first part\n needsReplace = false;\n }\n }\n }\n }\n if (needsReplace) {\n // Find any more consecutive slashes we need to replace\n while (slashCount < joined.length &&\n isPathSeparator(joined.charCodeAt(slashCount))) {\n slashCount++;\n }\n // Replace the slashes if needed\n if (slashCount >= 2) {\n joined = `\\\\${joined.slice(slashCount)}`;\n }\n }\n return win32.normalize(joined);\n },\n // It will solve the relative path from `from` to `to`, for instance:\n // from = 'C:\\\\orandea\\\\test\\\\aaa'\n // to = 'C:\\\\orandea\\\\impl\\\\bbb'\n // The output of the function should be: '..\\\\..\\\\impl\\\\bbb'\n relative(from, to) {\n validateString(from, 'from');\n validateString(to, 'to');\n if (from === to) {\n return '';\n }\n const fromOrig = win32.resolve(from);\n const toOrig = win32.resolve(to);\n if (fromOrig === toOrig) {\n return '';\n }\n from = fromOrig.toLowerCase();\n to = toOrig.toLowerCase();\n if (from === to) {\n return '';\n }\n // Trim any leading backslashes\n let fromStart = 0;\n while (fromStart < from.length &&\n from.charCodeAt(fromStart) === CHAR_BACKWARD_SLASH) {\n fromStart++;\n }\n // Trim trailing backslashes (applicable to UNC paths only)\n let fromEnd = from.length;\n while (fromEnd - 1 > fromStart &&\n from.charCodeAt(fromEnd - 1) === CHAR_BACKWARD_SLASH) {\n fromEnd--;\n }\n const fromLen = fromEnd - fromStart;\n // Trim any leading backslashes\n let toStart = 0;\n while (toStart < to.length &&\n to.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) {\n toStart++;\n }\n // Trim trailing backslashes (applicable to UNC paths only)\n let toEnd = to.length;\n while (toEnd - 1 > toStart &&\n to.charCodeAt(toEnd - 1) === CHAR_BACKWARD_SLASH) {\n toEnd--;\n }\n const toLen = toEnd - toStart;\n // Compare paths to find the longest common path from root\n const length = fromLen < toLen ? fromLen : toLen;\n let lastCommonSep = -1;\n let i = 0;\n for (; i < length; i++) {\n const fromCode = from.charCodeAt(fromStart + i);\n if (fromCode !== to.charCodeAt(toStart + i)) {\n break;\n }\n else if (fromCode === CHAR_BACKWARD_SLASH) {\n lastCommonSep = i;\n }\n }\n // We found a mismatch before the first common path separator was seen, so\n // return the original `to`.\n if (i !== length) {\n if (lastCommonSep === -1) {\n return toOrig;\n }\n }\n else {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\foo\\\\bar\\\\baz'\n return toOrig.slice(toStart + i + 1);\n }\n if (i === 2) {\n // We get here if `from` is the device root.\n // For example: from='C:\\\\'; to='C:\\\\foo'\n return toOrig.slice(toStart + i);\n }\n }\n if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\foo'\n lastCommonSep = i;\n }\n else if (i === 2) {\n // We get here if `to` is the device root.\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\'\n lastCommonSep = 3;\n }\n }\n if (lastCommonSep === -1) {\n lastCommonSep = 0;\n }\n }\n let out = '';\n // Generate the relative path based on the path difference between `to` and\n // `from`\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) {\n out += out.length === 0 ? '..' : '\\\\..';\n }\n }\n toStart += lastCommonSep;\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0) {\n return `${out}${toOrig.slice(toStart, toEnd)}`;\n }\n if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) {\n ++toStart;\n }\n return toOrig.slice(toStart, toEnd);\n },\n toNamespacedPath(path) {\n // Note: this will *probably* throw somewhere.\n if (typeof path !== 'string' || path.length === 0) {\n return path;\n }\n const resolvedPath = win32.resolve(path);\n if (resolvedPath.length <= 2) {\n return path;\n }\n if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) {\n // Possible UNC root\n if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) {\n const code = resolvedPath.charCodeAt(2);\n if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) {\n // Matched non-long UNC root, convert the path to a long UNC path\n return `\\\\\\\\?\\\\UNC\\\\${resolvedPath.slice(2)}`;\n }\n }\n }\n else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0)) &&\n resolvedPath.charCodeAt(1) === CHAR_COLON &&\n resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) {\n // Matched device root, convert the path to a long UNC path\n return `\\\\\\\\?\\\\${resolvedPath}`;\n }\n return path;\n },\n dirname(path) {\n validateString(path, 'path');\n const len = path.length;\n if (len === 0) {\n return '.';\n }\n let rootEnd = -1;\n let offset = 0;\n const code = path.charCodeAt(0);\n if (len === 1) {\n // `path` contains just a path separator, exit early to avoid\n // unnecessary work or a dot.\n return isPathSeparator(code) ? path : '.';\n }\n // Try to match a root\n if (isPathSeparator(code)) {\n // Possible UNC root\n rootEnd = offset = 1;\n if (isPathSeparator(path.charCodeAt(1))) {\n // Matched double path separator at beginning\n let j = 2;\n let last = j;\n // Match 1 or more non-path separators\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more path separators\n while (j < len && isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more non-path separators\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j === len) {\n // We matched a UNC root only\n return path;\n }\n if (j !== last) {\n // We matched a UNC root with leftovers\n // Offset by 1 to include the separator after the UNC root to\n // treat it as a \"normal root\" on top of a (UNC) root\n rootEnd = offset = j + 1;\n }\n }\n }\n }\n // Possible device root\n }\n else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {\n rootEnd = len > 2 && isPathSeparator(path.charCodeAt(2)) ? 3 : 2;\n offset = rootEnd;\n }\n let end = -1;\n let matchedSlash = true;\n for (let i = len - 1; i >= offset; --i) {\n if (isPathSeparator(path.charCodeAt(i))) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n }\n else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n if (end === -1) {\n if (rootEnd === -1) {\n return '.';\n }\n end = rootEnd;\n }\n return path.slice(0, end);\n },\n basename(path, ext) {\n if (ext !== undefined) {\n validateString(ext, 'ext');\n }\n validateString(path, 'path');\n let start = 0;\n let end = -1;\n let matchedSlash = true;\n let i;\n // Check for a drive letter prefix so as not to mistake the following\n // path separator as an extra separator at the end of the path that can be\n // disregarded\n if (path.length >= 2 &&\n isWindowsDeviceRoot(path.charCodeAt(0)) &&\n path.charCodeAt(1) === CHAR_COLON) {\n start = 2;\n }\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext === path) {\n return '';\n }\n let extIdx = ext.length - 1;\n let firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= start; --i) {\n const code = path.charCodeAt(i);\n if (isPathSeparator(code)) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n }\n else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n }\n else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n if (start === end) {\n end = firstNonSlashEnd;\n }\n else if (end === -1) {\n end = path.length;\n }\n return path.slice(start, end);\n }\n for (i = path.length - 1; i >= start; --i) {\n if (isPathSeparator(path.charCodeAt(i))) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n }\n else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n if (end === -1) {\n return '';\n }\n return path.slice(start, end);\n },\n extname(path) {\n validateString(path, 'path');\n let start = 0;\n let startDot = -1;\n let startPart = 0;\n let end = -1;\n let matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n // Check for a drive letter prefix so as not to mistake the following\n // path separator as an extra separator at the end of the path that can be\n // disregarded\n if (path.length >= 2 &&\n path.charCodeAt(1) === CHAR_COLON &&\n isWindowsDeviceRoot(path.charCodeAt(0))) {\n start = startPart = 2;\n }\n for (let i = path.length - 1; i >= start; --i) {\n const code = path.charCodeAt(i);\n if (isPathSeparator(code)) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === CHAR_DOT) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) {\n startDot = i;\n }\n else if (preDotState !== 1) {\n preDotState = 1;\n }\n }\n else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n if (startDot === -1 ||\n end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n (preDotState === 1 &&\n startDot === end - 1 &&\n startDot === startPart + 1)) {\n return '';\n }\n return path.slice(startDot, end);\n },\n format: _format.bind(null, '\\\\'),\n parse(path) {\n validateString(path, 'path');\n const ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) {\n return ret;\n }\n const len = path.length;\n let rootEnd = 0;\n let code = path.charCodeAt(0);\n if (len === 1) {\n if (isPathSeparator(code)) {\n // `path` contains just a path separator, exit early to avoid\n // unnecessary work\n ret.root = ret.dir = path;\n return ret;\n }\n ret.base = ret.name = path;\n return ret;\n }\n // Try to match a root\n if (isPathSeparator(code)) {\n // Possible UNC root\n rootEnd = 1;\n if (isPathSeparator(path.charCodeAt(1))) {\n // Matched double path separator at beginning\n let j = 2;\n let last = j;\n // Match 1 or more non-path separators\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more path separators\n while (j < len && isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more non-path separators\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j === len) {\n // We matched a UNC root only\n rootEnd = j;\n }\n else if (j !== last) {\n // We matched a UNC root with leftovers\n rootEnd = j + 1;\n }\n }\n }\n }\n }\n else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {\n // Possible device root\n if (len <= 2) {\n // `path` contains just a drive root, exit early to avoid\n // unnecessary work\n ret.root = ret.dir = path;\n return ret;\n }\n rootEnd = 2;\n if (isPathSeparator(path.charCodeAt(2))) {\n if (len === 3) {\n // `path` contains just a drive root, exit early to avoid\n // unnecessary work\n ret.root = ret.dir = path;\n return ret;\n }\n rootEnd = 3;\n }\n }\n if (rootEnd > 0) {\n ret.root = path.slice(0, rootEnd);\n }\n let startDot = -1;\n let startPart = rootEnd;\n let end = -1;\n let matchedSlash = true;\n let i = path.length - 1;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n // Get non-dir info\n for (; i >= rootEnd; --i) {\n code = path.charCodeAt(i);\n if (isPathSeparator(code)) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === CHAR_DOT) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) {\n startDot = i;\n }\n else if (preDotState !== 1) {\n preDotState = 1;\n }\n }\n else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n if (end !== -1) {\n if (startDot === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n (preDotState === 1 &&\n startDot === end - 1 &&\n startDot === startPart + 1)) {\n ret.base = ret.name = path.slice(startPart, end);\n }\n else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n ret.ext = path.slice(startDot, end);\n }\n }\n // If the directory is the root, use the entire root as the `dir` including\n // the trailing slash if any (`C:\\abc` -> `C:\\`). Otherwise, strip out the\n // trailing slash (`C:\\abc\\def` -> `C:\\abc`).\n if (startPart > 0 && startPart !== rootEnd) {\n ret.dir = path.slice(0, startPart - 1);\n }\n else {\n ret.dir = ret.root;\n }\n return ret;\n },\n sep: '\\\\',\n delimiter: ';',\n win32: null,\n posix: null\n};\nconst posixCwd = (() => {\n if (platformIsWin32) {\n // Converts Windows' backslash path separators to POSIX forward slashes\n // and truncates any drive indicator\n const regexp = /\\\\/g;\n return () => {\n const cwd = process.cwd().replace(regexp, '/');\n return cwd.slice(cwd.indexOf('/'));\n };\n }\n // We're already on POSIX, no need for any transformations\n return () => process.cwd();\n})();\nexport const posix = {\n // path.resolve([from ...], to)\n resolve(...pathSegments) {\n let resolvedPath = '';\n let resolvedAbsolute = false;\n for (let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n const path = i >= 0 ? pathSegments[i] : posixCwd();\n validateString(path, 'path');\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\n }\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n // Normalize the path\n resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, '/', isPosixPathSeparator);\n if (resolvedAbsolute) {\n return `/${resolvedPath}`;\n }\n return resolvedPath.length > 0 ? resolvedPath : '.';\n },\n normalize(path) {\n validateString(path, 'path');\n if (path.length === 0) {\n return '.';\n }\n const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\n const trailingSeparator = path.charCodeAt(path.length - 1) === CHAR_FORWARD_SLASH;\n // Normalize the path\n path = normalizeString(path, !isAbsolute, '/', isPosixPathSeparator);\n if (path.length === 0) {\n if (isAbsolute) {\n return '/';\n }\n return trailingSeparator ? './' : '.';\n }\n if (trailingSeparator) {\n path += '/';\n }\n return isAbsolute ? `/${path}` : path;\n },\n isAbsolute(path) {\n validateString(path, 'path');\n return path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH;\n },\n join(...paths) {\n if (paths.length === 0) {\n return '.';\n }\n let joined;\n for (let i = 0; i < paths.length; ++i) {\n const arg = paths[i];\n validateString(arg, 'path');\n if (arg.length > 0) {\n if (joined === undefined) {\n joined = arg;\n }\n else {\n joined += `/${arg}`;\n }\n }\n }\n if (joined === undefined) {\n return '.';\n }\n return posix.normalize(joined);\n },\n relative(from, to) {\n validateString(from, 'from');\n validateString(to, 'to');\n if (from === to) {\n return '';\n }\n // Trim leading forward slashes.\n from = posix.resolve(from);\n to = posix.resolve(to);\n if (from === to) {\n return '';\n }\n const fromStart = 1;\n const fromEnd = from.length;\n const fromLen = fromEnd - fromStart;\n const toStart = 1;\n const toLen = to.length - toStart;\n // Compare paths to find the longest common path from root\n const length = (fromLen < toLen ? fromLen : toLen);\n let lastCommonSep = -1;\n let i = 0;\n for (; i < length; i++) {\n const fromCode = from.charCodeAt(fromStart + i);\n if (fromCode !== to.charCodeAt(toStart + i)) {\n break;\n }\n else if (fromCode === CHAR_FORWARD_SLASH) {\n lastCommonSep = i;\n }\n }\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === CHAR_FORWARD_SLASH) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n }\n if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n }\n else if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === CHAR_FORWARD_SLASH) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n }\n else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo/bar'; to='/'\n lastCommonSep = 0;\n }\n }\n }\n let out = '';\n // Generate the relative path based on the path difference between `to`\n // and `from`.\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === CHAR_FORWARD_SLASH) {\n out += out.length === 0 ? '..' : '/..';\n }\n }\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts.\n return `${out}${to.slice(toStart + lastCommonSep)}`;\n },\n toNamespacedPath(path) {\n // Non-op on posix systems\n return path;\n },\n dirname(path) {\n validateString(path, 'path');\n if (path.length === 0) {\n return '.';\n }\n const hasRoot = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\n let end = -1;\n let matchedSlash = true;\n for (let i = path.length - 1; i >= 1; --i) {\n if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n }\n else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n if (end === -1) {\n return hasRoot ? '/' : '.';\n }\n if (hasRoot && end === 1) {\n return '//';\n }\n return path.slice(0, end);\n },\n basename(path, ext) {\n if (ext !== undefined) {\n validateString(ext, 'ext');\n }\n validateString(path, 'path');\n let start = 0;\n let end = -1;\n let matchedSlash = true;\n let i;\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext === path) {\n return '';\n }\n let extIdx = ext.length - 1;\n let firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= 0; --i) {\n const code = path.charCodeAt(i);\n if (code === CHAR_FORWARD_SLASH) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n }\n else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n }\n else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n if (start === end) {\n end = firstNonSlashEnd;\n }\n else if (end === -1) {\n end = path.length;\n }\n return path.slice(start, end);\n }\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n }\n else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n if (end === -1) {\n return '';\n }\n return path.slice(start, end);\n },\n extname(path) {\n validateString(path, 'path');\n let startDot = -1;\n let startPart = 0;\n let end = -1;\n let matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n for (let i = path.length - 1; i >= 0; --i) {\n const code = path.charCodeAt(i);\n if (code === CHAR_FORWARD_SLASH) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === CHAR_DOT) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) {\n startDot = i;\n }\n else if (preDotState !== 1) {\n preDotState = 1;\n }\n }\n else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n if (startDot === -1 ||\n end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n (preDotState === 1 &&\n startDot === end - 1 &&\n startDot === startPart + 1)) {\n return '';\n }\n return path.slice(startDot, end);\n },\n format: _format.bind(null, '/'),\n parse(path) {\n validateString(path, 'path');\n const ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) {\n return ret;\n }\n const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\n let start;\n if (isAbsolute) {\n ret.root = '/';\n start = 1;\n }\n else {\n start = 0;\n }\n let startDot = -1;\n let startPart = 0;\n let end = -1;\n let matchedSlash = true;\n let i = path.length - 1;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n // Get non-dir info\n for (; i >= start; --i) {\n const code = path.charCodeAt(i);\n if (code === CHAR_FORWARD_SLASH) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === CHAR_DOT) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) {\n startDot = i;\n }\n else if (preDotState !== 1) {\n preDotState = 1;\n }\n }\n else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n if (end !== -1) {\n const start = startPart === 0 && isAbsolute ? 1 : startPart;\n if (startDot === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n (preDotState === 1 &&\n startDot === end - 1 &&\n startDot === startPart + 1)) {\n ret.base = ret.name = path.slice(start, end);\n }\n else {\n ret.name = path.slice(start, startDot);\n ret.base = path.slice(start, end);\n ret.ext = path.slice(startDot, end);\n }\n }\n if (startPart > 0) {\n ret.dir = path.slice(0, startPart - 1);\n }\n else if (isAbsolute) {\n ret.dir = '/';\n }\n return ret;\n },\n sep: '/',\n delimiter: ':',\n win32: null,\n posix: null\n};\nposix.win32 = win32.win32 = win32;\nposix.posix = win32.posix = posix;\nexport const normalize = (platformIsWin32 ? win32.normalize : posix.normalize);\nexport const resolve = (platformIsWin32 ? win32.resolve : posix.resolve);\nexport const relative = (platformIsWin32 ? win32.relative : posix.relative);\nexport const dirname = (platformIsWin32 ? win32.dirname : posix.dirname);\nexport const basename = (platformIsWin32 ? win32.basename : posix.basename);\nexport const extname = (platformIsWin32 ? win32.extname : posix.extname);\nexport const sep = (platformIsWin32 ? win32.sep : posix.sep);\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as paths from './path.js';\nimport { isWindows } from './platform.js';\nconst _schemePattern = /^\\w[\\w\\d+.-]*$/;\nconst _singleSlashStart = /^\\//;\nconst _doubleSlashStart = /^\\/\\//;\nfunction _validateUri(ret, _strict) {\n // scheme, must be set\n if (!ret.scheme && _strict) {\n throw new Error(`[UriError]: Scheme is missing: {scheme: \"\", authority: \"${ret.authority}\", path: \"${ret.path}\", query: \"${ret.query}\", fragment: \"${ret.fragment}\"}`);\n }\n // scheme, https://tools.ietf.org/html/rfc3986#section-3.1\n // ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\n if (ret.scheme && !_schemePattern.test(ret.scheme)) {\n throw new Error('[UriError]: Scheme contains illegal characters.');\n }\n // path, http://tools.ietf.org/html/rfc3986#section-3.3\n // If a URI contains an authority component, then the path component\n // must either be empty or begin with a slash (\"/\") character. If a URI\n // does not contain an authority component, then the path cannot begin\n // with two slash characters (\"//\").\n if (ret.path) {\n if (ret.authority) {\n if (!_singleSlashStart.test(ret.path)) {\n throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash (\"/\") character');\n }\n }\n else {\n if (_doubleSlashStart.test(ret.path)) {\n throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")');\n }\n }\n }\n}\n// for a while we allowed uris *without* schemes and this is the migration\n// for them, e.g. an uri without scheme and without strict-mode warns and falls\n// back to the file-scheme. that should cause the least carnage and still be a\n// clear warning\nfunction _schemeFix(scheme, _strict) {\n if (!scheme && !_strict) {\n return 'file';\n }\n return scheme;\n}\n// implements a bit of https://tools.ietf.org/html/rfc3986#section-5\nfunction _referenceResolution(scheme, path) {\n // the slash-character is our 'default base' as we don't\n // support constructing URIs relative to other URIs. This\n // also means that we alter and potentially break paths.\n // see https://tools.ietf.org/html/rfc3986#section-5.1.4\n switch (scheme) {\n case 'https':\n case 'http':\n case 'file':\n if (!path) {\n path = _slash;\n }\n else if (path[0] !== _slash) {\n path = _slash + path;\n }\n break;\n }\n return path;\n}\nconst _empty = '';\nconst _slash = '/';\nconst _regexp = /^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\n/**\n * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.\n * This class is a simple parser which creates the basic component parts\n * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation\n * and encoding.\n *\n * ```txt\n * foo://example.com:8042/over/there?name=ferret#nose\n * \\_/ \\______________/\\_________/ \\_________/ \\__/\n * | | | | |\n * scheme authority path query fragment\n * | _____________________|__\n * / \\ / \\\n * urn:example:animal:ferret:nose\n * ```\n */\nexport class URI {\n static isUri(thing) {\n if (thing instanceof URI) {\n return true;\n }\n if (!thing) {\n return false;\n }\n return typeof thing.authority === 'string'\n && typeof thing.fragment === 'string'\n && typeof thing.path === 'string'\n && typeof thing.query === 'string'\n && typeof thing.scheme === 'string'\n && typeof thing.fsPath === 'string'\n && typeof thing.with === 'function'\n && typeof thing.toString === 'function';\n }\n /**\n * @internal\n */\n constructor(schemeOrData, authority, path, query, fragment, _strict = false) {\n if (typeof schemeOrData === 'object') {\n this.scheme = schemeOrData.scheme || _empty;\n this.authority = schemeOrData.authority || _empty;\n this.path = schemeOrData.path || _empty;\n this.query = schemeOrData.query || _empty;\n this.fragment = schemeOrData.fragment || _empty;\n // no validation because it's this URI\n // that creates uri components.\n // _validateUri(this);\n }\n else {\n this.scheme = _schemeFix(schemeOrData, _strict);\n this.authority = authority || _empty;\n this.path = _referenceResolution(this.scheme, path || _empty);\n this.query = query || _empty;\n this.fragment = fragment || _empty;\n _validateUri(this, _strict);\n }\n }\n // ---- filesystem path -----------------------\n /**\n * Returns a string representing the corresponding file system path of this URI.\n * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the\n * platform specific path separator.\n *\n * * Will *not* validate the path for invalid characters and semantics.\n * * Will *not* look at the scheme of this URI.\n * * The result shall *not* be used for display purposes but for accessing a file on disk.\n *\n *\n * The *difference* to `URI#path` is the use of the platform specific separator and the handling\n * of UNC paths. See the below sample of a file-uri with an authority (UNC path).\n *\n * ```ts\n const u = URI.parse('file://server/c$/folder/file.txt')\n u.authority === 'server'\n u.path === '/shares/c$/file.txt'\n u.fsPath === '\\\\server\\c$\\folder\\file.txt'\n ```\n *\n * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,\n * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working\n * with URIs that represent files on disk (`file` scheme).\n */\n get fsPath() {\n // if (this.scheme !== 'file') {\n // \tconsole.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);\n // }\n return uriToFsPath(this, false);\n }\n // ---- modify to new -------------------------\n with(change) {\n if (!change) {\n return this;\n }\n let { scheme, authority, path, query, fragment } = change;\n if (scheme === undefined) {\n scheme = this.scheme;\n }\n else if (scheme === null) {\n scheme = _empty;\n }\n if (authority === undefined) {\n authority = this.authority;\n }\n else if (authority === null) {\n authority = _empty;\n }\n if (path === undefined) {\n path = this.path;\n }\n else if (path === null) {\n path = _empty;\n }\n if (query === undefined) {\n query = this.query;\n }\n else if (query === null) {\n query = _empty;\n }\n if (fragment === undefined) {\n fragment = this.fragment;\n }\n else if (fragment === null) {\n fragment = _empty;\n }\n if (scheme === this.scheme\n && authority === this.authority\n && path === this.path\n && query === this.query\n && fragment === this.fragment) {\n return this;\n }\n return new Uri(scheme, authority, path, query, fragment);\n }\n // ---- parse & validate ------------------------\n /**\n * Creates a new URI from a string, e.g. `http://www.example.com/some/path`,\n * `file:///usr/home`, or `scheme:with/path`.\n *\n * @param value A string which represents an URI (see `URI#toString`).\n */\n static parse(value, _strict = false) {\n const match = _regexp.exec(value);\n if (!match) {\n return new Uri(_empty, _empty, _empty, _empty, _empty);\n }\n return new Uri(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict);\n }\n /**\n * Creates a new URI from a file system path, e.g. `c:\\my\\files`,\n * `/usr/home`, or `\\\\server\\share\\some\\path`.\n *\n * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument\n * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**\n * `URI.parse('file://' + path)` because the path might contain characters that are\n * interpreted (# and ?). See the following sample:\n * ```ts\n const good = URI.file('/coding/c#/project1');\n good.scheme === 'file';\n good.path === '/coding/c#/project1';\n good.fragment === '';\n const bad = URI.parse('file://' + '/coding/c#/project1');\n bad.scheme === 'file';\n bad.path === '/coding/c'; // path is now broken\n bad.fragment === '/project1';\n ```\n *\n * @param path A file system path (see `URI#fsPath`)\n */\n static file(path) {\n let authority = _empty;\n // normalize to fwd-slashes on windows,\n // on other systems bwd-slashes are valid\n // filename character, eg /f\\oo/ba\\r.txt\n if (isWindows) {\n path = path.replace(/\\\\/g, _slash);\n }\n // check for authority as used in UNC shares\n // or use the path as given\n if (path[0] === _slash && path[1] === _slash) {\n const idx = path.indexOf(_slash, 2);\n if (idx === -1) {\n authority = path.substring(2);\n path = _slash;\n }\n else {\n authority = path.substring(2, idx);\n path = path.substring(idx) || _slash;\n }\n }\n return new Uri('file', authority, path, _empty, _empty);\n }\n /**\n * Creates new URI from uri components.\n *\n * Unless `strict` is `true` the scheme is defaults to be `file`. This function performs\n * validation and should be used for untrusted uri components retrieved from storage,\n * user input, command arguments etc\n */\n static from(components, strict) {\n const result = new Uri(components.scheme, components.authority, components.path, components.query, components.fragment, strict);\n return result;\n }\n /**\n * Join a URI path with path fragments and normalizes the resulting path.\n *\n * @param uri The input URI.\n * @param pathFragment The path fragment to add to the URI path.\n * @returns The resulting URI.\n */\n static joinPath(uri, ...pathFragment) {\n if (!uri.path) {\n throw new Error(`[UriError]: cannot call joinPath on URI without path`);\n }\n let newPath;\n if (isWindows && uri.scheme === 'file') {\n newPath = URI.file(paths.win32.join(uriToFsPath(uri, true), ...pathFragment)).path;\n }\n else {\n newPath = paths.posix.join(uri.path, ...pathFragment);\n }\n return uri.with({ path: newPath });\n }\n // ---- printing/externalize ---------------------------\n /**\n * Creates a string representation for this URI. It's guaranteed that calling\n * `URI.parse` with the result of this function creates an URI which is equal\n * to this URI.\n *\n * * The result shall *not* be used for display purposes but for externalization or transport.\n * * The result will be encoded using the percentage encoding and encoding happens mostly\n * ignore the scheme-specific encoding rules.\n *\n * @param skipEncoding Do not encode the result, default is `false`\n */\n toString(skipEncoding = false) {\n return _asFormatted(this, skipEncoding);\n }\n toJSON() {\n return this;\n }\n static revive(data) {\n var _a, _b;\n if (!data) {\n return data;\n }\n else if (data instanceof URI) {\n return data;\n }\n else {\n const result = new Uri(data);\n result._formatted = (_a = data.external) !== null && _a !== void 0 ? _a : null;\n result._fsPath = data._sep === _pathSepMarker ? (_b = data.fsPath) !== null && _b !== void 0 ? _b : null : null;\n return result;\n }\n }\n}\nconst _pathSepMarker = isWindows ? 1 : undefined;\n// This class exists so that URI is compatible with vscode.Uri (API).\nclass Uri extends URI {\n constructor() {\n super(...arguments);\n this._formatted = null;\n this._fsPath = null;\n }\n get fsPath() {\n if (!this._fsPath) {\n this._fsPath = uriToFsPath(this, false);\n }\n return this._fsPath;\n }\n toString(skipEncoding = false) {\n if (!skipEncoding) {\n if (!this._formatted) {\n this._formatted = _asFormatted(this, false);\n }\n return this._formatted;\n }\n else {\n // we don't cache that\n return _asFormatted(this, true);\n }\n }\n toJSON() {\n const res = {\n $mid: 1 /* MarshalledId.Uri */\n };\n // cached state\n if (this._fsPath) {\n res.fsPath = this._fsPath;\n res._sep = _pathSepMarker;\n }\n if (this._formatted) {\n res.external = this._formatted;\n }\n //--- uri components\n if (this.path) {\n res.path = this.path;\n }\n // TODO\n // this isn't correct and can violate the UriComponents contract but\n // this is part of the vscode.Uri API and we shouldn't change how that\n // works anymore\n if (this.scheme) {\n res.scheme = this.scheme;\n }\n if (this.authority) {\n res.authority = this.authority;\n }\n if (this.query) {\n res.query = this.query;\n }\n if (this.fragment) {\n res.fragment = this.fragment;\n }\n return res;\n }\n}\n// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2\nconst encodeTable = {\n [58 /* CharCode.Colon */]: '%3A', // gen-delims\n [47 /* CharCode.Slash */]: '%2F',\n [63 /* CharCode.QuestionMark */]: '%3F',\n [35 /* CharCode.Hash */]: '%23',\n [91 /* CharCode.OpenSquareBracket */]: '%5B',\n [93 /* CharCode.CloseSquareBracket */]: '%5D',\n [64 /* CharCode.AtSign */]: '%40',\n [33 /* CharCode.ExclamationMark */]: '%21', // sub-delims\n [36 /* CharCode.DollarSign */]: '%24',\n [38 /* CharCode.Ampersand */]: '%26',\n [39 /* CharCode.SingleQuote */]: '%27',\n [40 /* CharCode.OpenParen */]: '%28',\n [41 /* CharCode.CloseParen */]: '%29',\n [42 /* CharCode.Asterisk */]: '%2A',\n [43 /* CharCode.Plus */]: '%2B',\n [44 /* CharCode.Comma */]: '%2C',\n [59 /* CharCode.Semicolon */]: '%3B',\n [61 /* CharCode.Equals */]: '%3D',\n [32 /* CharCode.Space */]: '%20',\n};\nfunction encodeURIComponentFast(uriComponent, isPath, isAuthority) {\n let res = undefined;\n let nativeEncodePos = -1;\n for (let pos = 0; pos < uriComponent.length; pos++) {\n const code = uriComponent.charCodeAt(pos);\n // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3\n if ((code >= 97 /* CharCode.a */ && code <= 122 /* CharCode.z */)\n || (code >= 65 /* CharCode.A */ && code <= 90 /* CharCode.Z */)\n || (code >= 48 /* CharCode.Digit0 */ && code <= 57 /* CharCode.Digit9 */)\n || code === 45 /* CharCode.Dash */\n || code === 46 /* CharCode.Period */\n || code === 95 /* CharCode.Underline */\n || code === 126 /* CharCode.Tilde */\n || (isPath && code === 47 /* CharCode.Slash */)\n || (isAuthority && code === 91 /* CharCode.OpenSquareBracket */)\n || (isAuthority && code === 93 /* CharCode.CloseSquareBracket */)\n || (isAuthority && code === 58 /* CharCode.Colon */)) {\n // check if we are delaying native encode\n if (nativeEncodePos !== -1) {\n res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n nativeEncodePos = -1;\n }\n // check if we write into a new string (by default we try to return the param)\n if (res !== undefined) {\n res += uriComponent.charAt(pos);\n }\n }\n else {\n // encoding needed, we need to allocate a new string\n if (res === undefined) {\n res = uriComponent.substr(0, pos);\n }\n // check with default table first\n const escaped = encodeTable[code];\n if (escaped !== undefined) {\n // check if we are delaying native encode\n if (nativeEncodePos !== -1) {\n res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n nativeEncodePos = -1;\n }\n // append escaped variant to result\n res += escaped;\n }\n else if (nativeEncodePos === -1) {\n // use native encode only when needed\n nativeEncodePos = pos;\n }\n }\n }\n if (nativeEncodePos !== -1) {\n res += encodeURIComponent(uriComponent.substring(nativeEncodePos));\n }\n return res !== undefined ? res : uriComponent;\n}\nfunction encodeURIComponentMinimal(path) {\n let res = undefined;\n for (let pos = 0; pos < path.length; pos++) {\n const code = path.charCodeAt(pos);\n if (code === 35 /* CharCode.Hash */ || code === 63 /* CharCode.QuestionMark */) {\n if (res === undefined) {\n res = path.substr(0, pos);\n }\n res += encodeTable[code];\n }\n else {\n if (res !== undefined) {\n res += path[pos];\n }\n }\n }\n return res !== undefined ? res : path;\n}\n/**\n * Compute `fsPath` for the given uri\n */\nexport function uriToFsPath(uri, keepDriveLetterCasing) {\n let value;\n if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {\n // unc path: file://shares/c$/far/boo\n value = `//${uri.authority}${uri.path}`;\n }\n else if (uri.path.charCodeAt(0) === 47 /* CharCode.Slash */\n && (uri.path.charCodeAt(1) >= 65 /* CharCode.A */ && uri.path.charCodeAt(1) <= 90 /* CharCode.Z */ || uri.path.charCodeAt(1) >= 97 /* CharCode.a */ && uri.path.charCodeAt(1) <= 122 /* CharCode.z */)\n && uri.path.charCodeAt(2) === 58 /* CharCode.Colon */) {\n if (!keepDriveLetterCasing) {\n // windows drive letter: file:///c:/far/boo\n value = uri.path[1].toLowerCase() + uri.path.substr(2);\n }\n else {\n value = uri.path.substr(1);\n }\n }\n else {\n // other path\n value = uri.path;\n }\n if (isWindows) {\n value = value.replace(/\\//g, '\\\\');\n }\n return value;\n}\n/**\n * Create the external version of a uri\n */\nfunction _asFormatted(uri, skipEncoding) {\n const encoder = !skipEncoding\n ? encodeURIComponentFast\n : encodeURIComponentMinimal;\n let res = '';\n let { scheme, authority, path, query, fragment } = uri;\n if (scheme) {\n res += scheme;\n res += ':';\n }\n if (authority || scheme === 'file') {\n res += _slash;\n res += _slash;\n }\n if (authority) {\n let idx = authority.indexOf('@');\n if (idx !== -1) {\n // @\n const userinfo = authority.substr(0, idx);\n authority = authority.substr(idx + 1);\n idx = userinfo.lastIndexOf(':');\n if (idx === -1) {\n res += encoder(userinfo, false, false);\n }\n else {\n // :@\n res += encoder(userinfo.substr(0, idx), false, false);\n res += ':';\n res += encoder(userinfo.substr(idx + 1), false, true);\n }\n res += '@';\n }\n authority = authority.toLowerCase();\n idx = authority.lastIndexOf(':');\n if (idx === -1) {\n res += encoder(authority, false, true);\n }\n else {\n // :\n res += encoder(authority.substr(0, idx), false, true);\n res += authority.substr(idx);\n }\n }\n if (path) {\n // lower-case windows drive letters in /C:/fff or C:/fff\n if (path.length >= 3 && path.charCodeAt(0) === 47 /* CharCode.Slash */ && path.charCodeAt(2) === 58 /* CharCode.Colon */) {\n const code = path.charCodeAt(1);\n if (code >= 65 /* CharCode.A */ && code <= 90 /* CharCode.Z */) {\n path = `/${String.fromCharCode(code + 32)}:${path.substr(3)}`; // \"/c:\".length === 3\n }\n }\n else if (path.length >= 2 && path.charCodeAt(1) === 58 /* CharCode.Colon */) {\n const code = path.charCodeAt(0);\n if (code >= 65 /* CharCode.A */ && code <= 90 /* CharCode.Z */) {\n path = `${String.fromCharCode(code + 32)}:${path.substr(2)}`; // \"/c:\".length === 3\n }\n }\n // encode the rest of the path\n res += encoder(path, true, false);\n }\n if (query) {\n res += '?';\n res += encoder(query, false, false);\n }\n if (fragment) {\n res += '#';\n res += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment;\n }\n return res;\n}\n// --- decode\nfunction decodeURIComponentGraceful(str) {\n try {\n return decodeURIComponent(str);\n }\n catch (_a) {\n if (str.length > 3) {\n return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));\n }\n else {\n return str;\n }\n }\n}\nconst _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;\nfunction percentDecode(str) {\n if (!str.match(_rEncodedAsHex)) {\n return str;\n }\n return str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match));\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/**\n * A position in the editor.\n */\nexport class Position {\n constructor(lineNumber, column) {\n this.lineNumber = lineNumber;\n this.column = column;\n }\n /**\n * Create a new position from this position.\n *\n * @param newLineNumber new line number\n * @param newColumn new column\n */\n with(newLineNumber = this.lineNumber, newColumn = this.column) {\n if (newLineNumber === this.lineNumber && newColumn === this.column) {\n return this;\n }\n else {\n return new Position(newLineNumber, newColumn);\n }\n }\n /**\n * Derive a new position from this position.\n *\n * @param deltaLineNumber line number delta\n * @param deltaColumn column delta\n */\n delta(deltaLineNumber = 0, deltaColumn = 0) {\n return this.with(this.lineNumber + deltaLineNumber, this.column + deltaColumn);\n }\n /**\n * Test if this position equals other position\n */\n equals(other) {\n return Position.equals(this, other);\n }\n /**\n * Test if position `a` equals position `b`\n */\n static equals(a, b) {\n if (!a && !b) {\n return true;\n }\n return (!!a &&\n !!b &&\n a.lineNumber === b.lineNumber &&\n a.column === b.column);\n }\n /**\n * Test if this position is before other position.\n * If the two positions are equal, the result will be false.\n */\n isBefore(other) {\n return Position.isBefore(this, other);\n }\n /**\n * Test if position `a` is before position `b`.\n * If the two positions are equal, the result will be false.\n */\n static isBefore(a, b) {\n if (a.lineNumber < b.lineNumber) {\n return true;\n }\n if (b.lineNumber < a.lineNumber) {\n return false;\n }\n return a.column < b.column;\n }\n /**\n * Test if this position is before other position.\n * If the two positions are equal, the result will be true.\n */\n isBeforeOrEqual(other) {\n return Position.isBeforeOrEqual(this, other);\n }\n /**\n * Test if position `a` is before position `b`.\n * If the two positions are equal, the result will be true.\n */\n static isBeforeOrEqual(a, b) {\n if (a.lineNumber < b.lineNumber) {\n return true;\n }\n if (b.lineNumber < a.lineNumber) {\n return false;\n }\n return a.column <= b.column;\n }\n /**\n * A function that compares positions, useful for sorting\n */\n static compare(a, b) {\n const aLineNumber = a.lineNumber | 0;\n const bLineNumber = b.lineNumber | 0;\n if (aLineNumber === bLineNumber) {\n const aColumn = a.column | 0;\n const bColumn = b.column | 0;\n return aColumn - bColumn;\n }\n return aLineNumber - bLineNumber;\n }\n /**\n * Clone this position.\n */\n clone() {\n return new Position(this.lineNumber, this.column);\n }\n /**\n * Convert to a human-readable representation.\n */\n toString() {\n return '(' + this.lineNumber + ',' + this.column + ')';\n }\n // ---\n /**\n * Create a `Position` from an `IPosition`.\n */\n static lift(pos) {\n return new Position(pos.lineNumber, pos.column);\n }\n /**\n * Test if `obj` is an `IPosition`.\n */\n static isIPosition(obj) {\n return (obj\n && (typeof obj.lineNumber === 'number')\n && (typeof obj.column === 'number'));\n }\n toJSON() {\n return {\n lineNumber: this.lineNumber,\n column: this.column\n };\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Position } from './position.js';\n/**\n * A range in the editor. (startLineNumber,startColumn) is <= (endLineNumber,endColumn)\n */\nexport class Range {\n constructor(startLineNumber, startColumn, endLineNumber, endColumn) {\n if ((startLineNumber > endLineNumber) || (startLineNumber === endLineNumber && startColumn > endColumn)) {\n this.startLineNumber = endLineNumber;\n this.startColumn = endColumn;\n this.endLineNumber = startLineNumber;\n this.endColumn = startColumn;\n }\n else {\n this.startLineNumber = startLineNumber;\n this.startColumn = startColumn;\n this.endLineNumber = endLineNumber;\n this.endColumn = endColumn;\n }\n }\n /**\n * Test if this range is empty.\n */\n isEmpty() {\n return Range.isEmpty(this);\n }\n /**\n * Test if `range` is empty.\n */\n static isEmpty(range) {\n return (range.startLineNumber === range.endLineNumber && range.startColumn === range.endColumn);\n }\n /**\n * Test if position is in this range. If the position is at the edges, will return true.\n */\n containsPosition(position) {\n return Range.containsPosition(this, position);\n }\n /**\n * Test if `position` is in `range`. If the position is at the edges, will return true.\n */\n static containsPosition(range, position) {\n if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) {\n return false;\n }\n if (position.lineNumber === range.startLineNumber && position.column < range.startColumn) {\n return false;\n }\n if (position.lineNumber === range.endLineNumber && position.column > range.endColumn) {\n return false;\n }\n return true;\n }\n /**\n * Test if `position` is in `range`. If the position is at the edges, will return false.\n * @internal\n */\n static strictContainsPosition(range, position) {\n if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) {\n return false;\n }\n if (position.lineNumber === range.startLineNumber && position.column <= range.startColumn) {\n return false;\n }\n if (position.lineNumber === range.endLineNumber && position.column >= range.endColumn) {\n return false;\n }\n return true;\n }\n /**\n * Test if range is in this range. If the range is equal to this range, will return true.\n */\n containsRange(range) {\n return Range.containsRange(this, range);\n }\n /**\n * Test if `otherRange` is in `range`. If the ranges are equal, will return true.\n */\n static containsRange(range, otherRange) {\n if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) {\n return false;\n }\n if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) {\n return false;\n }\n if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn < range.startColumn) {\n return false;\n }\n if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn > range.endColumn) {\n return false;\n }\n return true;\n }\n /**\n * Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true.\n */\n strictContainsRange(range) {\n return Range.strictContainsRange(this, range);\n }\n /**\n * Test if `otherRange` is strictly in `range` (must start after, and end before). If the ranges are equal, will return false.\n */\n static strictContainsRange(range, otherRange) {\n if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) {\n return false;\n }\n if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) {\n return false;\n }\n if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn <= range.startColumn) {\n return false;\n }\n if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn >= range.endColumn) {\n return false;\n }\n return true;\n }\n /**\n * A reunion of the two ranges.\n * The smallest position will be used as the start point, and the largest one as the end point.\n */\n plusRange(range) {\n return Range.plusRange(this, range);\n }\n /**\n * A reunion of the two ranges.\n * The smallest position will be used as the start point, and the largest one as the end point.\n */\n static plusRange(a, b) {\n let startLineNumber;\n let startColumn;\n let endLineNumber;\n let endColumn;\n if (b.startLineNumber < a.startLineNumber) {\n startLineNumber = b.startLineNumber;\n startColumn = b.startColumn;\n }\n else if (b.startLineNumber === a.startLineNumber) {\n startLineNumber = b.startLineNumber;\n startColumn = Math.min(b.startColumn, a.startColumn);\n }\n else {\n startLineNumber = a.startLineNumber;\n startColumn = a.startColumn;\n }\n if (b.endLineNumber > a.endLineNumber) {\n endLineNumber = b.endLineNumber;\n endColumn = b.endColumn;\n }\n else if (b.endLineNumber === a.endLineNumber) {\n endLineNumber = b.endLineNumber;\n endColumn = Math.max(b.endColumn, a.endColumn);\n }\n else {\n endLineNumber = a.endLineNumber;\n endColumn = a.endColumn;\n }\n return new Range(startLineNumber, startColumn, endLineNumber, endColumn);\n }\n /**\n * A intersection of the two ranges.\n */\n intersectRanges(range) {\n return Range.intersectRanges(this, range);\n }\n /**\n * A intersection of the two ranges.\n */\n static intersectRanges(a, b) {\n let resultStartLineNumber = a.startLineNumber;\n let resultStartColumn = a.startColumn;\n let resultEndLineNumber = a.endLineNumber;\n let resultEndColumn = a.endColumn;\n const otherStartLineNumber = b.startLineNumber;\n const otherStartColumn = b.startColumn;\n const otherEndLineNumber = b.endLineNumber;\n const otherEndColumn = b.endColumn;\n if (resultStartLineNumber < otherStartLineNumber) {\n resultStartLineNumber = otherStartLineNumber;\n resultStartColumn = otherStartColumn;\n }\n else if (resultStartLineNumber === otherStartLineNumber) {\n resultStartColumn = Math.max(resultStartColumn, otherStartColumn);\n }\n if (resultEndLineNumber > otherEndLineNumber) {\n resultEndLineNumber = otherEndLineNumber;\n resultEndColumn = otherEndColumn;\n }\n else if (resultEndLineNumber === otherEndLineNumber) {\n resultEndColumn = Math.min(resultEndColumn, otherEndColumn);\n }\n // Check if selection is now empty\n if (resultStartLineNumber > resultEndLineNumber) {\n return null;\n }\n if (resultStartLineNumber === resultEndLineNumber && resultStartColumn > resultEndColumn) {\n return null;\n }\n return new Range(resultStartLineNumber, resultStartColumn, resultEndLineNumber, resultEndColumn);\n }\n /**\n * Test if this range equals other.\n */\n equalsRange(other) {\n return Range.equalsRange(this, other);\n }\n /**\n * Test if range `a` equals `b`.\n */\n static equalsRange(a, b) {\n if (!a && !b) {\n return true;\n }\n return (!!a &&\n !!b &&\n a.startLineNumber === b.startLineNumber &&\n a.startColumn === b.startColumn &&\n a.endLineNumber === b.endLineNumber &&\n a.endColumn === b.endColumn);\n }\n /**\n * Return the end position (which will be after or equal to the start position)\n */\n getEndPosition() {\n return Range.getEndPosition(this);\n }\n /**\n * Return the end position (which will be after or equal to the start position)\n */\n static getEndPosition(range) {\n return new Position(range.endLineNumber, range.endColumn);\n }\n /**\n * Return the start position (which will be before or equal to the end position)\n */\n getStartPosition() {\n return Range.getStartPosition(this);\n }\n /**\n * Return the start position (which will be before or equal to the end position)\n */\n static getStartPosition(range) {\n return new Position(range.startLineNumber, range.startColumn);\n }\n /**\n * Transform to a user presentable string representation.\n */\n toString() {\n return '[' + this.startLineNumber + ',' + this.startColumn + ' -> ' + this.endLineNumber + ',' + this.endColumn + ']';\n }\n /**\n * Create a new range using this range's start position, and using endLineNumber and endColumn as the end position.\n */\n setEndPosition(endLineNumber, endColumn) {\n return new Range(this.startLineNumber, this.startColumn, endLineNumber, endColumn);\n }\n /**\n * Create a new range using this range's end position, and using startLineNumber and startColumn as the start position.\n */\n setStartPosition(startLineNumber, startColumn) {\n return new Range(startLineNumber, startColumn, this.endLineNumber, this.endColumn);\n }\n /**\n * Create a new empty range using this range's start position.\n */\n collapseToStart() {\n return Range.collapseToStart(this);\n }\n /**\n * Create a new empty range using this range's start position.\n */\n static collapseToStart(range) {\n return new Range(range.startLineNumber, range.startColumn, range.startLineNumber, range.startColumn);\n }\n /**\n * Create a new empty range using this range's end position.\n */\n collapseToEnd() {\n return Range.collapseToEnd(this);\n }\n /**\n * Create a new empty range using this range's end position.\n */\n static collapseToEnd(range) {\n return new Range(range.endLineNumber, range.endColumn, range.endLineNumber, range.endColumn);\n }\n /**\n * Moves the range by the given amount of lines.\n */\n delta(lineCount) {\n return new Range(this.startLineNumber + lineCount, this.startColumn, this.endLineNumber + lineCount, this.endColumn);\n }\n // ---\n static fromPositions(start, end = start) {\n return new Range(start.lineNumber, start.column, end.lineNumber, end.column);\n }\n static lift(range) {\n if (!range) {\n return null;\n }\n return new Range(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\n }\n /**\n * Test if `obj` is an `IRange`.\n */\n static isIRange(obj) {\n return (obj\n && (typeof obj.startLineNumber === 'number')\n && (typeof obj.startColumn === 'number')\n && (typeof obj.endLineNumber === 'number')\n && (typeof obj.endColumn === 'number'));\n }\n /**\n * Test if the two ranges are touching in any way.\n */\n static areIntersectingOrTouching(a, b) {\n // Check if `a` is before `b`\n if (a.endLineNumber < b.startLineNumber || (a.endLineNumber === b.startLineNumber && a.endColumn < b.startColumn)) {\n return false;\n }\n // Check if `b` is before `a`\n if (b.endLineNumber < a.startLineNumber || (b.endLineNumber === a.startLineNumber && b.endColumn < a.startColumn)) {\n return false;\n }\n // These ranges must intersect\n return true;\n }\n /**\n * Test if the two ranges are intersecting. If the ranges are touching it returns true.\n */\n static areIntersecting(a, b) {\n // Check if `a` is before `b`\n if (a.endLineNumber < b.startLineNumber || (a.endLineNumber === b.startLineNumber && a.endColumn <= b.startColumn)) {\n return false;\n }\n // Check if `b` is before `a`\n if (b.endLineNumber < a.startLineNumber || (b.endLineNumber === a.startLineNumber && b.endColumn <= a.startColumn)) {\n return false;\n }\n // These ranges must intersect\n return true;\n }\n /**\n * A function that compares ranges, useful for sorting ranges\n * It will first compare ranges on the startPosition and then on the endPosition\n */\n static compareRangesUsingStarts(a, b) {\n if (a && b) {\n const aStartLineNumber = a.startLineNumber | 0;\n const bStartLineNumber = b.startLineNumber | 0;\n if (aStartLineNumber === bStartLineNumber) {\n const aStartColumn = a.startColumn | 0;\n const bStartColumn = b.startColumn | 0;\n if (aStartColumn === bStartColumn) {\n const aEndLineNumber = a.endLineNumber | 0;\n const bEndLineNumber = b.endLineNumber | 0;\n if (aEndLineNumber === bEndLineNumber) {\n const aEndColumn = a.endColumn | 0;\n const bEndColumn = b.endColumn | 0;\n return aEndColumn - bEndColumn;\n }\n return aEndLineNumber - bEndLineNumber;\n }\n return aStartColumn - bStartColumn;\n }\n return aStartLineNumber - bStartLineNumber;\n }\n const aExists = (a ? 1 : 0);\n const bExists = (b ? 1 : 0);\n return aExists - bExists;\n }\n /**\n * A function that compares ranges, useful for sorting ranges\n * It will first compare ranges on the endPosition and then on the startPosition\n */\n static compareRangesUsingEnds(a, b) {\n if (a.endLineNumber === b.endLineNumber) {\n if (a.endColumn === b.endColumn) {\n if (a.startLineNumber === b.startLineNumber) {\n return a.startColumn - b.startColumn;\n }\n return a.startLineNumber - b.startLineNumber;\n }\n return a.endColumn - b.endColumn;\n }\n return a.endLineNumber - b.endLineNumber;\n }\n /**\n * Test if the range spans multiple lines.\n */\n static spansMultipleLines(range) {\n return range.endLineNumber > range.startLineNumber;\n }\n toJSON() {\n return this;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Position } from './position.js';\nimport { Range } from './range.js';\n/**\n * A selection in the editor.\n * The selection is a range that has an orientation.\n */\nexport class Selection extends Range {\n constructor(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn) {\n super(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn);\n this.selectionStartLineNumber = selectionStartLineNumber;\n this.selectionStartColumn = selectionStartColumn;\n this.positionLineNumber = positionLineNumber;\n this.positionColumn = positionColumn;\n }\n /**\n * Transform to a human-readable representation.\n */\n toString() {\n return '[' + this.selectionStartLineNumber + ',' + this.selectionStartColumn + ' -> ' + this.positionLineNumber + ',' + this.positionColumn + ']';\n }\n /**\n * Test if equals other selection.\n */\n equalsSelection(other) {\n return (Selection.selectionsEqual(this, other));\n }\n /**\n * Test if the two selections are equal.\n */\n static selectionsEqual(a, b) {\n return (a.selectionStartLineNumber === b.selectionStartLineNumber &&\n a.selectionStartColumn === b.selectionStartColumn &&\n a.positionLineNumber === b.positionLineNumber &&\n a.positionColumn === b.positionColumn);\n }\n /**\n * Get directions (LTR or RTL).\n */\n getDirection() {\n if (this.selectionStartLineNumber === this.startLineNumber && this.selectionStartColumn === this.startColumn) {\n return 0 /* SelectionDirection.LTR */;\n }\n return 1 /* SelectionDirection.RTL */;\n }\n /**\n * Create a new selection with a different `positionLineNumber` and `positionColumn`.\n */\n setEndPosition(endLineNumber, endColumn) {\n if (this.getDirection() === 0 /* SelectionDirection.LTR */) {\n return new Selection(this.startLineNumber, this.startColumn, endLineNumber, endColumn);\n }\n return new Selection(endLineNumber, endColumn, this.startLineNumber, this.startColumn);\n }\n /**\n * Get the position at `positionLineNumber` and `positionColumn`.\n */\n getPosition() {\n return new Position(this.positionLineNumber, this.positionColumn);\n }\n /**\n * Get the position at the start of the selection.\n */\n getSelectionStart() {\n return new Position(this.selectionStartLineNumber, this.selectionStartColumn);\n }\n /**\n * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`.\n */\n setStartPosition(startLineNumber, startColumn) {\n if (this.getDirection() === 0 /* SelectionDirection.LTR */) {\n return new Selection(startLineNumber, startColumn, this.endLineNumber, this.endColumn);\n }\n return new Selection(this.endLineNumber, this.endColumn, startLineNumber, startColumn);\n }\n // ----\n /**\n * Create a `Selection` from one or two positions\n */\n static fromPositions(start, end = start) {\n return new Selection(start.lineNumber, start.column, end.lineNumber, end.column);\n }\n /**\n * Creates a `Selection` from a range, given a direction.\n */\n static fromRange(range, direction) {\n if (direction === 0 /* SelectionDirection.LTR */) {\n return new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\n }\n else {\n return new Selection(range.endLineNumber, range.endColumn, range.startLineNumber, range.startColumn);\n }\n }\n /**\n * Create a `Selection` from an `ISelection`.\n */\n static liftSelection(sel) {\n return new Selection(sel.selectionStartLineNumber, sel.selectionStartColumn, sel.positionLineNumber, sel.positionColumn);\n }\n /**\n * `a` equals `b`.\n */\n static selectionsArrEqual(a, b) {\n if (a && !b || !a && b) {\n return false;\n }\n if (!a && !b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0, len = a.length; i < len; i++) {\n if (!this.selectionsEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n /**\n * Test if `obj` is an `ISelection`.\n */\n static isISelection(obj) {\n return (obj\n && (typeof obj.selectionStartLineNumber === 'number')\n && (typeof obj.selectionStartColumn === 'number')\n && (typeof obj.positionLineNumber === 'number')\n && (typeof obj.positionColumn === 'number'));\n }\n /**\n * Create with a direction.\n */\n static createWithDirection(startLineNumber, startColumn, endLineNumber, endColumn, direction) {\n if (direction === 0 /* SelectionDirection.LTR */) {\n return new Selection(startLineNumber, startColumn, endLineNumber, endColumn);\n }\n return new Selection(endLineNumber, endColumn, startLineNumber, startColumn);\n }\n}\n", "import { isString } from './types.js';\nconst _codiconFontCharacters = Object.create(null);\nfunction register(id, fontCharacter) {\n if (isString(fontCharacter)) {\n const val = _codiconFontCharacters[fontCharacter];\n if (val === undefined) {\n throw new Error(`${id} references an unknown codicon: ${fontCharacter}`);\n }\n fontCharacter = val;\n }\n _codiconFontCharacters[id] = fontCharacter;\n return { id };\n}\n/**\n * Only to be used by the iconRegistry.\n */\nexport function getCodiconFontCharacters() {\n return _codiconFontCharacters;\n}\n/**\n * The Codicon library is a set of default icons that are built-in in VS Code.\n *\n * In the product (outside of base) Codicons should only be used as defaults. In order to have all icons in VS Code\n * themeable, component should define new, UI component specific icons using `iconRegistry.registerIcon`.\n * In that call a Codicon can be named as default.\n */\nexport const Codicon = {\n // built-in icons, with image name\n add: register('add', 0xea60),\n plus: register('plus', 0xea60),\n gistNew: register('gist-new', 0xea60),\n repoCreate: register('repo-create', 0xea60),\n lightbulb: register('lightbulb', 0xea61),\n lightBulb: register('light-bulb', 0xea61),\n repo: register('repo', 0xea62),\n repoDelete: register('repo-delete', 0xea62),\n gistFork: register('gist-fork', 0xea63),\n repoForked: register('repo-forked', 0xea63),\n gitPullRequest: register('git-pull-request', 0xea64),\n gitPullRequestAbandoned: register('git-pull-request-abandoned', 0xea64),\n recordKeys: register('record-keys', 0xea65),\n keyboard: register('keyboard', 0xea65),\n tag: register('tag', 0xea66),\n tagAdd: register('tag-add', 0xea66),\n tagRemove: register('tag-remove', 0xea66),\n gitPullRequestLabel: register('git-pull-request-label', 0xea66),\n person: register('person', 0xea67),\n personFollow: register('person-follow', 0xea67),\n personOutline: register('person-outline', 0xea67),\n personFilled: register('person-filled', 0xea67),\n gitBranch: register('git-branch', 0xea68),\n gitBranchCreate: register('git-branch-create', 0xea68),\n gitBranchDelete: register('git-branch-delete', 0xea68),\n sourceControl: register('source-control', 0xea68),\n mirror: register('mirror', 0xea69),\n mirrorPublic: register('mirror-public', 0xea69),\n star: register('star', 0xea6a),\n starAdd: register('star-add', 0xea6a),\n starDelete: register('star-delete', 0xea6a),\n starEmpty: register('star-empty', 0xea6a),\n comment: register('comment', 0xea6b),\n commentAdd: register('comment-add', 0xea6b),\n alert: register('alert', 0xea6c),\n warning: register('warning', 0xea6c),\n search: register('search', 0xea6d),\n searchSave: register('search-save', 0xea6d),\n logOut: register('log-out', 0xea6e),\n signOut: register('sign-out', 0xea6e),\n logIn: register('log-in', 0xea6f),\n signIn: register('sign-in', 0xea6f),\n eye: register('eye', 0xea70),\n eyeUnwatch: register('eye-unwatch', 0xea70),\n eyeWatch: register('eye-watch', 0xea70),\n circleFilled: register('circle-filled', 0xea71),\n primitiveDot: register('primitive-dot', 0xea71),\n closeDirty: register('close-dirty', 0xea71),\n debugBreakpoint: register('debug-breakpoint', 0xea71),\n debugBreakpointDisabled: register('debug-breakpoint-disabled', 0xea71),\n debugBreakpointPending: register('debug-breakpoint-pending', 0xebd9),\n debugHint: register('debug-hint', 0xea71),\n primitiveSquare: register('primitive-square', 0xea72),\n edit: register('edit', 0xea73),\n pencil: register('pencil', 0xea73),\n info: register('info', 0xea74),\n issueOpened: register('issue-opened', 0xea74),\n gistPrivate: register('gist-private', 0xea75),\n gitForkPrivate: register('git-fork-private', 0xea75),\n lock: register('lock', 0xea75),\n mirrorPrivate: register('mirror-private', 0xea75),\n close: register('close', 0xea76),\n removeClose: register('remove-close', 0xea76),\n x: register('x', 0xea76),\n repoSync: register('repo-sync', 0xea77),\n sync: register('sync', 0xea77),\n clone: register('clone', 0xea78),\n desktopDownload: register('desktop-download', 0xea78),\n beaker: register('beaker', 0xea79),\n microscope: register('microscope', 0xea79),\n vm: register('vm', 0xea7a),\n deviceDesktop: register('device-desktop', 0xea7a),\n file: register('file', 0xea7b),\n fileText: register('file-text', 0xea7b),\n more: register('more', 0xea7c),\n ellipsis: register('ellipsis', 0xea7c),\n kebabHorizontal: register('kebab-horizontal', 0xea7c),\n mailReply: register('mail-reply', 0xea7d),\n reply: register('reply', 0xea7d),\n organization: register('organization', 0xea7e),\n organizationFilled: register('organization-filled', 0xea7e),\n organizationOutline: register('organization-outline', 0xea7e),\n newFile: register('new-file', 0xea7f),\n fileAdd: register('file-add', 0xea7f),\n newFolder: register('new-folder', 0xea80),\n fileDirectoryCreate: register('file-directory-create', 0xea80),\n trash: register('trash', 0xea81),\n trashcan: register('trashcan', 0xea81),\n history: register('history', 0xea82),\n clock: register('clock', 0xea82),\n folder: register('folder', 0xea83),\n fileDirectory: register('file-directory', 0xea83),\n symbolFolder: register('symbol-folder', 0xea83),\n logoGithub: register('logo-github', 0xea84),\n markGithub: register('mark-github', 0xea84),\n github: register('github', 0xea84),\n terminal: register('terminal', 0xea85),\n console: register('console', 0xea85),\n repl: register('repl', 0xea85),\n zap: register('zap', 0xea86),\n symbolEvent: register('symbol-event', 0xea86),\n error: register('error', 0xea87),\n stop: register('stop', 0xea87),\n variable: register('variable', 0xea88),\n symbolVariable: register('symbol-variable', 0xea88),\n array: register('array', 0xea8a),\n symbolArray: register('symbol-array', 0xea8a),\n symbolModule: register('symbol-module', 0xea8b),\n symbolPackage: register('symbol-package', 0xea8b),\n symbolNamespace: register('symbol-namespace', 0xea8b),\n symbolObject: register('symbol-object', 0xea8b),\n symbolMethod: register('symbol-method', 0xea8c),\n symbolFunction: register('symbol-function', 0xea8c),\n symbolConstructor: register('symbol-constructor', 0xea8c),\n symbolBoolean: register('symbol-boolean', 0xea8f),\n symbolNull: register('symbol-null', 0xea8f),\n symbolNumeric: register('symbol-numeric', 0xea90),\n symbolNumber: register('symbol-number', 0xea90),\n symbolStructure: register('symbol-structure', 0xea91),\n symbolStruct: register('symbol-struct', 0xea91),\n symbolParameter: register('symbol-parameter', 0xea92),\n symbolTypeParameter: register('symbol-type-parameter', 0xea92),\n symbolKey: register('symbol-key', 0xea93),\n symbolText: register('symbol-text', 0xea93),\n symbolReference: register('symbol-reference', 0xea94),\n goToFile: register('go-to-file', 0xea94),\n symbolEnum: register('symbol-enum', 0xea95),\n symbolValue: register('symbol-value', 0xea95),\n symbolRuler: register('symbol-ruler', 0xea96),\n symbolUnit: register('symbol-unit', 0xea96),\n activateBreakpoints: register('activate-breakpoints', 0xea97),\n archive: register('archive', 0xea98),\n arrowBoth: register('arrow-both', 0xea99),\n arrowDown: register('arrow-down', 0xea9a),\n arrowLeft: register('arrow-left', 0xea9b),\n arrowRight: register('arrow-right', 0xea9c),\n arrowSmallDown: register('arrow-small-down', 0xea9d),\n arrowSmallLeft: register('arrow-small-left', 0xea9e),\n arrowSmallRight: register('arrow-small-right', 0xea9f),\n arrowSmallUp: register('arrow-small-up', 0xeaa0),\n arrowUp: register('arrow-up', 0xeaa1),\n bell: register('bell', 0xeaa2),\n bold: register('bold', 0xeaa3),\n book: register('book', 0xeaa4),\n bookmark: register('bookmark', 0xeaa5),\n debugBreakpointConditionalUnverified: register('debug-breakpoint-conditional-unverified', 0xeaa6),\n debugBreakpointConditional: register('debug-breakpoint-conditional', 0xeaa7),\n debugBreakpointConditionalDisabled: register('debug-breakpoint-conditional-disabled', 0xeaa7),\n debugBreakpointDataUnverified: register('debug-breakpoint-data-unverified', 0xeaa8),\n debugBreakpointData: register('debug-breakpoint-data', 0xeaa9),\n debugBreakpointDataDisabled: register('debug-breakpoint-data-disabled', 0xeaa9),\n debugBreakpointLogUnverified: register('debug-breakpoint-log-unverified', 0xeaaa),\n debugBreakpointLog: register('debug-breakpoint-log', 0xeaab),\n debugBreakpointLogDisabled: register('debug-breakpoint-log-disabled', 0xeaab),\n briefcase: register('briefcase', 0xeaac),\n broadcast: register('broadcast', 0xeaad),\n browser: register('browser', 0xeaae),\n bug: register('bug', 0xeaaf),\n calendar: register('calendar', 0xeab0),\n caseSensitive: register('case-sensitive', 0xeab1),\n check: register('check', 0xeab2),\n checklist: register('checklist', 0xeab3),\n chevronDown: register('chevron-down', 0xeab4),\n dropDownButton: register('drop-down-button', 0xeab4),\n chevronLeft: register('chevron-left', 0xeab5),\n chevronRight: register('chevron-right', 0xeab6),\n chevronUp: register('chevron-up', 0xeab7),\n chromeClose: register('chrome-close', 0xeab8),\n chromeMaximize: register('chrome-maximize', 0xeab9),\n chromeMinimize: register('chrome-minimize', 0xeaba),\n chromeRestore: register('chrome-restore', 0xeabb),\n circle: register('circle', 0xeabc),\n circleOutline: register('circle-outline', 0xeabc),\n debugBreakpointUnverified: register('debug-breakpoint-unverified', 0xeabc),\n circleSlash: register('circle-slash', 0xeabd),\n circuitBoard: register('circuit-board', 0xeabe),\n clearAll: register('clear-all', 0xeabf),\n clippy: register('clippy', 0xeac0),\n closeAll: register('close-all', 0xeac1),\n cloudDownload: register('cloud-download', 0xeac2),\n cloudUpload: register('cloud-upload', 0xeac3),\n code: register('code', 0xeac4),\n collapseAll: register('collapse-all', 0xeac5),\n colorMode: register('color-mode', 0xeac6),\n commentDiscussion: register('comment-discussion', 0xeac7),\n compareChanges: register('compare-changes', 0xeafd),\n creditCard: register('credit-card', 0xeac9),\n dash: register('dash', 0xeacc),\n dashboard: register('dashboard', 0xeacd),\n database: register('database', 0xeace),\n debugContinue: register('debug-continue', 0xeacf),\n debugDisconnect: register('debug-disconnect', 0xead0),\n debugPause: register('debug-pause', 0xead1),\n debugRestart: register('debug-restart', 0xead2),\n debugStart: register('debug-start', 0xead3),\n debugStepInto: register('debug-step-into', 0xead4),\n debugStepOut: register('debug-step-out', 0xead5),\n debugStepOver: register('debug-step-over', 0xead6),\n debugStop: register('debug-stop', 0xead7),\n debug: register('debug', 0xead8),\n deviceCameraVideo: register('device-camera-video', 0xead9),\n deviceCamera: register('device-camera', 0xeada),\n deviceMobile: register('device-mobile', 0xeadb),\n diffAdded: register('diff-added', 0xeadc),\n diffIgnored: register('diff-ignored', 0xeadd),\n diffModified: register('diff-modified', 0xeade),\n diffRemoved: register('diff-removed', 0xeadf),\n diffRenamed: register('diff-renamed', 0xeae0),\n diff: register('diff', 0xeae1),\n discard: register('discard', 0xeae2),\n editorLayout: register('editor-layout', 0xeae3),\n emptyWindow: register('empty-window', 0xeae4),\n exclude: register('exclude', 0xeae5),\n extensions: register('extensions', 0xeae6),\n eyeClosed: register('eye-closed', 0xeae7),\n fileBinary: register('file-binary', 0xeae8),\n fileCode: register('file-code', 0xeae9),\n fileMedia: register('file-media', 0xeaea),\n filePdf: register('file-pdf', 0xeaeb),\n fileSubmodule: register('file-submodule', 0xeaec),\n fileSymlinkDirectory: register('file-symlink-directory', 0xeaed),\n fileSymlinkFile: register('file-symlink-file', 0xeaee),\n fileZip: register('file-zip', 0xeaef),\n files: register('files', 0xeaf0),\n filter: register('filter', 0xeaf1),\n flame: register('flame', 0xeaf2),\n foldDown: register('fold-down', 0xeaf3),\n foldUp: register('fold-up', 0xeaf4),\n fold: register('fold', 0xeaf5),\n folderActive: register('folder-active', 0xeaf6),\n folderOpened: register('folder-opened', 0xeaf7),\n gear: register('gear', 0xeaf8),\n gift: register('gift', 0xeaf9),\n gistSecret: register('gist-secret', 0xeafa),\n gist: register('gist', 0xeafb),\n gitCommit: register('git-commit', 0xeafc),\n gitCompare: register('git-compare', 0xeafd),\n gitMerge: register('git-merge', 0xeafe),\n githubAction: register('github-action', 0xeaff),\n githubAlt: register('github-alt', 0xeb00),\n globe: register('globe', 0xeb01),\n grabber: register('grabber', 0xeb02),\n graph: register('graph', 0xeb03),\n gripper: register('gripper', 0xeb04),\n heart: register('heart', 0xeb05),\n home: register('home', 0xeb06),\n horizontalRule: register('horizontal-rule', 0xeb07),\n hubot: register('hubot', 0xeb08),\n inbox: register('inbox', 0xeb09),\n issueClosed: register('issue-closed', 0xeba4),\n issueReopened: register('issue-reopened', 0xeb0b),\n issues: register('issues', 0xeb0c),\n italic: register('italic', 0xeb0d),\n jersey: register('jersey', 0xeb0e),\n json: register('json', 0xeb0f),\n bracket: register('bracket', 0xeb0f),\n kebabVertical: register('kebab-vertical', 0xeb10),\n key: register('key', 0xeb11),\n law: register('law', 0xeb12),\n lightbulbAutofix: register('lightbulb-autofix', 0xeb13),\n linkExternal: register('link-external', 0xeb14),\n link: register('link', 0xeb15),\n listOrdered: register('list-ordered', 0xeb16),\n listUnordered: register('list-unordered', 0xeb17),\n liveShare: register('live-share', 0xeb18),\n loading: register('loading', 0xeb19),\n location: register('location', 0xeb1a),\n mailRead: register('mail-read', 0xeb1b),\n mail: register('mail', 0xeb1c),\n markdown: register('markdown', 0xeb1d),\n megaphone: register('megaphone', 0xeb1e),\n mention: register('mention', 0xeb1f),\n milestone: register('milestone', 0xeb20),\n gitPullRequestMilestone: register('git-pull-request-milestone', 0xeb20),\n mortarBoard: register('mortar-board', 0xeb21),\n move: register('move', 0xeb22),\n multipleWindows: register('multiple-windows', 0xeb23),\n mute: register('mute', 0xeb24),\n noNewline: register('no-newline', 0xeb25),\n note: register('note', 0xeb26),\n octoface: register('octoface', 0xeb27),\n openPreview: register('open-preview', 0xeb28),\n package: register('package', 0xeb29),\n paintcan: register('paintcan', 0xeb2a),\n pin: register('pin', 0xeb2b),\n play: register('play', 0xeb2c),\n run: register('run', 0xeb2c),\n plug: register('plug', 0xeb2d),\n preserveCase: register('preserve-case', 0xeb2e),\n preview: register('preview', 0xeb2f),\n project: register('project', 0xeb30),\n pulse: register('pulse', 0xeb31),\n question: register('question', 0xeb32),\n quote: register('quote', 0xeb33),\n radioTower: register('radio-tower', 0xeb34),\n reactions: register('reactions', 0xeb35),\n references: register('references', 0xeb36),\n refresh: register('refresh', 0xeb37),\n regex: register('regex', 0xeb38),\n remoteExplorer: register('remote-explorer', 0xeb39),\n remote: register('remote', 0xeb3a),\n remove: register('remove', 0xeb3b),\n replaceAll: register('replace-all', 0xeb3c),\n replace: register('replace', 0xeb3d),\n repoClone: register('repo-clone', 0xeb3e),\n repoForcePush: register('repo-force-push', 0xeb3f),\n repoPull: register('repo-pull', 0xeb40),\n repoPush: register('repo-push', 0xeb41),\n report: register('report', 0xeb42),\n requestChanges: register('request-changes', 0xeb43),\n rocket: register('rocket', 0xeb44),\n rootFolderOpened: register('root-folder-opened', 0xeb45),\n rootFolder: register('root-folder', 0xeb46),\n rss: register('rss', 0xeb47),\n ruby: register('ruby', 0xeb48),\n saveAll: register('save-all', 0xeb49),\n saveAs: register('save-as', 0xeb4a),\n save: register('save', 0xeb4b),\n screenFull: register('screen-full', 0xeb4c),\n screenNormal: register('screen-normal', 0xeb4d),\n searchStop: register('search-stop', 0xeb4e),\n server: register('server', 0xeb50),\n settingsGear: register('settings-gear', 0xeb51),\n settings: register('settings', 0xeb52),\n shield: register('shield', 0xeb53),\n smiley: register('smiley', 0xeb54),\n sortPrecedence: register('sort-precedence', 0xeb55),\n splitHorizontal: register('split-horizontal', 0xeb56),\n splitVertical: register('split-vertical', 0xeb57),\n squirrel: register('squirrel', 0xeb58),\n starFull: register('star-full', 0xeb59),\n starHalf: register('star-half', 0xeb5a),\n symbolClass: register('symbol-class', 0xeb5b),\n symbolColor: register('symbol-color', 0xeb5c),\n symbolCustomColor: register('symbol-customcolor', 0xeb5c),\n symbolConstant: register('symbol-constant', 0xeb5d),\n symbolEnumMember: register('symbol-enum-member', 0xeb5e),\n symbolField: register('symbol-field', 0xeb5f),\n symbolFile: register('symbol-file', 0xeb60),\n symbolInterface: register('symbol-interface', 0xeb61),\n symbolKeyword: register('symbol-keyword', 0xeb62),\n symbolMisc: register('symbol-misc', 0xeb63),\n symbolOperator: register('symbol-operator', 0xeb64),\n symbolProperty: register('symbol-property', 0xeb65),\n wrench: register('wrench', 0xeb65),\n wrenchSubaction: register('wrench-subaction', 0xeb65),\n symbolSnippet: register('symbol-snippet', 0xeb66),\n tasklist: register('tasklist', 0xeb67),\n telescope: register('telescope', 0xeb68),\n textSize: register('text-size', 0xeb69),\n threeBars: register('three-bars', 0xeb6a),\n thumbsdown: register('thumbsdown', 0xeb6b),\n thumbsup: register('thumbsup', 0xeb6c),\n tools: register('tools', 0xeb6d),\n triangleDown: register('triangle-down', 0xeb6e),\n triangleLeft: register('triangle-left', 0xeb6f),\n triangleRight: register('triangle-right', 0xeb70),\n triangleUp: register('triangle-up', 0xeb71),\n twitter: register('twitter', 0xeb72),\n unfold: register('unfold', 0xeb73),\n unlock: register('unlock', 0xeb74),\n unmute: register('unmute', 0xeb75),\n unverified: register('unverified', 0xeb76),\n verified: register('verified', 0xeb77),\n versions: register('versions', 0xeb78),\n vmActive: register('vm-active', 0xeb79),\n vmOutline: register('vm-outline', 0xeb7a),\n vmRunning: register('vm-running', 0xeb7b),\n watch: register('watch', 0xeb7c),\n whitespace: register('whitespace', 0xeb7d),\n wholeWord: register('whole-word', 0xeb7e),\n window: register('window', 0xeb7f),\n wordWrap: register('word-wrap', 0xeb80),\n zoomIn: register('zoom-in', 0xeb81),\n zoomOut: register('zoom-out', 0xeb82),\n listFilter: register('list-filter', 0xeb83),\n listFlat: register('list-flat', 0xeb84),\n listSelection: register('list-selection', 0xeb85),\n selection: register('selection', 0xeb85),\n listTree: register('list-tree', 0xeb86),\n debugBreakpointFunctionUnverified: register('debug-breakpoint-function-unverified', 0xeb87),\n debugBreakpointFunction: register('debug-breakpoint-function', 0xeb88),\n debugBreakpointFunctionDisabled: register('debug-breakpoint-function-disabled', 0xeb88),\n debugStackframeActive: register('debug-stackframe-active', 0xeb89),\n circleSmallFilled: register('circle-small-filled', 0xeb8a),\n debugStackframeDot: register('debug-stackframe-dot', 0xeb8a),\n debugStackframe: register('debug-stackframe', 0xeb8b),\n debugStackframeFocused: register('debug-stackframe-focused', 0xeb8b),\n debugBreakpointUnsupported: register('debug-breakpoint-unsupported', 0xeb8c),\n symbolString: register('symbol-string', 0xeb8d),\n debugReverseContinue: register('debug-reverse-continue', 0xeb8e),\n debugStepBack: register('debug-step-back', 0xeb8f),\n debugRestartFrame: register('debug-restart-frame', 0xeb90),\n callIncoming: register('call-incoming', 0xeb92),\n callOutgoing: register('call-outgoing', 0xeb93),\n menu: register('menu', 0xeb94),\n expandAll: register('expand-all', 0xeb95),\n feedback: register('feedback', 0xeb96),\n gitPullRequestReviewer: register('git-pull-request-reviewer', 0xeb96),\n groupByRefType: register('group-by-ref-type', 0xeb97),\n ungroupByRefType: register('ungroup-by-ref-type', 0xeb98),\n account: register('account', 0xeb99),\n gitPullRequestAssignee: register('git-pull-request-assignee', 0xeb99),\n bellDot: register('bell-dot', 0xeb9a),\n debugConsole: register('debug-console', 0xeb9b),\n library: register('library', 0xeb9c),\n output: register('output', 0xeb9d),\n runAll: register('run-all', 0xeb9e),\n syncIgnored: register('sync-ignored', 0xeb9f),\n pinned: register('pinned', 0xeba0),\n githubInverted: register('github-inverted', 0xeba1),\n debugAlt: register('debug-alt', 0xeb91),\n serverProcess: register('server-process', 0xeba2),\n serverEnvironment: register('server-environment', 0xeba3),\n pass: register('pass', 0xeba4),\n stopCircle: register('stop-circle', 0xeba5),\n playCircle: register('play-circle', 0xeba6),\n record: register('record', 0xeba7),\n debugAltSmall: register('debug-alt-small', 0xeba8),\n vmConnect: register('vm-connect', 0xeba9),\n cloud: register('cloud', 0xebaa),\n merge: register('merge', 0xebab),\n exportIcon: register('export', 0xebac),\n graphLeft: register('graph-left', 0xebad),\n magnet: register('magnet', 0xebae),\n notebook: register('notebook', 0xebaf),\n redo: register('redo', 0xebb0),\n checkAll: register('check-all', 0xebb1),\n pinnedDirty: register('pinned-dirty', 0xebb2),\n passFilled: register('pass-filled', 0xebb3),\n circleLargeFilled: register('circle-large-filled', 0xebb4),\n circleLarge: register('circle-large', 0xebb5),\n circleLargeOutline: register('circle-large-outline', 0xebb5),\n combine: register('combine', 0xebb6),\n gather: register('gather', 0xebb6),\n table: register('table', 0xebb7),\n variableGroup: register('variable-group', 0xebb8),\n typeHierarchy: register('type-hierarchy', 0xebb9),\n typeHierarchySub: register('type-hierarchy-sub', 0xebba),\n typeHierarchySuper: register('type-hierarchy-super', 0xebbb),\n gitPullRequestCreate: register('git-pull-request-create', 0xebbc),\n runAbove: register('run-above', 0xebbd),\n runBelow: register('run-below', 0xebbe),\n notebookTemplate: register('notebook-template', 0xebbf),\n debugRerun: register('debug-rerun', 0xebc0),\n workspaceTrusted: register('workspace-trusted', 0xebc1),\n workspaceUntrusted: register('workspace-untrusted', 0xebc2),\n workspaceUnspecified: register('workspace-unspecified', 0xebc3),\n terminalCmd: register('terminal-cmd', 0xebc4),\n terminalDebian: register('terminal-debian', 0xebc5),\n terminalLinux: register('terminal-linux', 0xebc6),\n terminalPowershell: register('terminal-powershell', 0xebc7),\n terminalTmux: register('terminal-tmux', 0xebc8),\n terminalUbuntu: register('terminal-ubuntu', 0xebc9),\n terminalBash: register('terminal-bash', 0xebca),\n arrowSwap: register('arrow-swap', 0xebcb),\n copy: register('copy', 0xebcc),\n personAdd: register('person-add', 0xebcd),\n filterFilled: register('filter-filled', 0xebce),\n wand: register('wand', 0xebcf),\n debugLineByLine: register('debug-line-by-line', 0xebd0),\n inspect: register('inspect', 0xebd1),\n layers: register('layers', 0xebd2),\n layersDot: register('layers-dot', 0xebd3),\n layersActive: register('layers-active', 0xebd4),\n compass: register('compass', 0xebd5),\n compassDot: register('compass-dot', 0xebd6),\n compassActive: register('compass-active', 0xebd7),\n azure: register('azure', 0xebd8),\n issueDraft: register('issue-draft', 0xebd9),\n gitPullRequestClosed: register('git-pull-request-closed', 0xebda),\n gitPullRequestDraft: register('git-pull-request-draft', 0xebdb),\n debugAll: register('debug-all', 0xebdc),\n debugCoverage: register('debug-coverage', 0xebdd),\n runErrors: register('run-errors', 0xebde),\n folderLibrary: register('folder-library', 0xebdf),\n debugContinueSmall: register('debug-continue-small', 0xebe0),\n beakerStop: register('beaker-stop', 0xebe1),\n graphLine: register('graph-line', 0xebe2),\n graphScatter: register('graph-scatter', 0xebe3),\n pieChart: register('pie-chart', 0xebe4),\n bracketDot: register('bracket-dot', 0xebe5),\n bracketError: register('bracket-error', 0xebe6),\n lockSmall: register('lock-small', 0xebe7),\n azureDevops: register('azure-devops', 0xebe8),\n verifiedFilled: register('verified-filled', 0xebe9),\n newLine: register('newline', 0xebea),\n layout: register('layout', 0xebeb),\n layoutActivitybarLeft: register('layout-activitybar-left', 0xebec),\n layoutActivitybarRight: register('layout-activitybar-right', 0xebed),\n layoutPanelLeft: register('layout-panel-left', 0xebee),\n layoutPanelCenter: register('layout-panel-center', 0xebef),\n layoutPanelJustify: register('layout-panel-justify', 0xebf0),\n layoutPanelRight: register('layout-panel-right', 0xebf1),\n layoutPanel: register('layout-panel', 0xebf2),\n layoutSidebarLeft: register('layout-sidebar-left', 0xebf3),\n layoutSidebarRight: register('layout-sidebar-right', 0xebf4),\n layoutStatusbar: register('layout-statusbar', 0xebf5),\n layoutMenubar: register('layout-menubar', 0xebf6),\n layoutCentered: register('layout-centered', 0xebf7),\n layoutSidebarRightOff: register('layout-sidebar-right-off', 0xec00),\n layoutPanelOff: register('layout-panel-off', 0xec01),\n layoutSidebarLeftOff: register('layout-sidebar-left-off', 0xec02),\n target: register('target', 0xebf8),\n indent: register('indent', 0xebf9),\n recordSmall: register('record-small', 0xebfa),\n errorSmall: register('error-small', 0xebfb),\n arrowCircleDown: register('arrow-circle-down', 0xebfc),\n arrowCircleLeft: register('arrow-circle-left', 0xebfd),\n arrowCircleRight: register('arrow-circle-right', 0xebfe),\n arrowCircleUp: register('arrow-circle-up', 0xebff),\n heartFilled: register('heart-filled', 0xec04),\n map: register('map', 0xec05),\n mapFilled: register('map-filled', 0xec06),\n circleSmall: register('circle-small', 0xec07),\n bellSlash: register('bell-slash', 0xec08),\n bellSlashDot: register('bell-slash-dot', 0xec09),\n commentUnresolved: register('comment-unresolved', 0xec0a),\n gitPullRequestGoToChanges: register('git-pull-request-go-to-changes', 0xec0b),\n gitPullRequestNewChanges: register('git-pull-request-new-changes', 0xec0c),\n searchFuzzy: register('search-fuzzy', 0xec0d),\n commentDraft: register('comment-draft', 0xec0e),\n send: register('send', 0xec0f),\n sparkle: register('sparkle', 0xec10),\n insert: register('insert', 0xec11),\n mic: register('mic', 0xec12),\n thumbsDownFilled: register('thumbsdown-filled', 0xec13),\n thumbsUpFilled: register('thumbsup-filled', 0xec14),\n coffee: register('coffee', 0xec15),\n snake: register('snake', 0xec16),\n game: register('game', 0xec17),\n vr: register('vr', 0xec18),\n chip: register('chip', 0xec19),\n piano: register('piano', 0xec1a),\n music: register('music', 0xec1b),\n micFilled: register('mic-filled', 0xec1c),\n gitFetch: register('git-fetch', 0xec1d),\n copilot: register('copilot', 0xec1e),\n lightbulbSparkle: register('lightbulb-sparkle', 0xec1f),\n lightbulbSparkleAutofix: register('lightbulb-sparkle-autofix', 0xec1f),\n robot: register('robot', 0xec20),\n sparkleFilled: register('sparkle-filled', 0xec21),\n diffSingle: register('diff-single', 0xec22),\n diffMultiple: register('diff-multiple', 0xec23),\n surroundWith: register('surround-with', 0xec24),\n gitStash: register('git-stash', 0xec26),\n gitStashApply: register('git-stash-apply', 0xec27),\n gitStashPop: register('git-stash-pop', 0xec28),\n // derived icons, that could become separate icons\n dialogError: register('dialog-error', 'error'),\n dialogWarning: register('dialog-warning', 'warning'),\n dialogInfo: register('dialog-info', 'info'),\n dialogClose: register('dialog-close', 'close'),\n treeItemExpanded: register('tree-item-expanded', 'chevron-down'), // collapsed is done with rotation\n treeFilterOnTypeOn: register('tree-filter-on-type-on', 'list-filter'),\n treeFilterOnTypeOff: register('tree-filter-on-type-off', 'list-selection'),\n treeFilterClear: register('tree-filter-clear', 'close'),\n treeItemLoading: register('tree-item-loading', 'loading'),\n menuSelection: register('menu-selection', 'check'),\n menuSubmenu: register('menu-submenu', 'chevron-right'),\n menuBarMore: register('menubar-more', 'more'),\n scrollbarButtonLeft: register('scrollbar-button-left', 'triangle-left'),\n scrollbarButtonRight: register('scrollbar-button-right', 'triangle-right'),\n scrollbarButtonUp: register('scrollbar-button-up', 'triangle-up'),\n scrollbarButtonDown: register('scrollbar-button-down', 'triangle-down'),\n toolBarMore: register('toolbar-more', 'more'),\n quickInputBack: register('quick-input-back', 'arrow-left')\n};\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Emitter } from '../../base/common/event.js';\nimport { Disposable, toDisposable } from '../../base/common/lifecycle.js';\nexport class TokenizationRegistry {\n constructor() {\n this._tokenizationSupports = new Map();\n this._factories = new Map();\n this._onDidChange = new Emitter();\n this.onDidChange = this._onDidChange.event;\n this._colorMap = null;\n }\n handleChange(languageIds) {\n this._onDidChange.fire({\n changedLanguages: languageIds,\n changedColorMap: false\n });\n }\n register(languageId, support) {\n this._tokenizationSupports.set(languageId, support);\n this.handleChange([languageId]);\n return toDisposable(() => {\n if (this._tokenizationSupports.get(languageId) !== support) {\n return;\n }\n this._tokenizationSupports.delete(languageId);\n this.handleChange([languageId]);\n });\n }\n get(languageId) {\n return this._tokenizationSupports.get(languageId) || null;\n }\n registerFactory(languageId, factory) {\n var _a;\n (_a = this._factories.get(languageId)) === null || _a === void 0 ? void 0 : _a.dispose();\n const myData = new TokenizationSupportFactoryData(this, languageId, factory);\n this._factories.set(languageId, myData);\n return toDisposable(() => {\n const v = this._factories.get(languageId);\n if (!v || v !== myData) {\n return;\n }\n this._factories.delete(languageId);\n v.dispose();\n });\n }\n async getOrCreate(languageId) {\n // check first if the support is already set\n const tokenizationSupport = this.get(languageId);\n if (tokenizationSupport) {\n return tokenizationSupport;\n }\n const factory = this._factories.get(languageId);\n if (!factory || factory.isResolved) {\n // no factory or factory.resolve already finished\n return null;\n }\n await factory.resolve();\n return this.get(languageId);\n }\n isResolved(languageId) {\n const tokenizationSupport = this.get(languageId);\n if (tokenizationSupport) {\n return true;\n }\n const factory = this._factories.get(languageId);\n if (!factory || factory.isResolved) {\n return true;\n }\n return false;\n }\n setColorMap(colorMap) {\n this._colorMap = colorMap;\n this._onDidChange.fire({\n changedLanguages: Array.from(this._tokenizationSupports.keys()),\n changedColorMap: true\n });\n }\n getColorMap() {\n return this._colorMap;\n }\n getDefaultBackground() {\n if (this._colorMap && this._colorMap.length > 2 /* ColorId.DefaultBackground */) {\n return this._colorMap[2 /* ColorId.DefaultBackground */];\n }\n return null;\n }\n}\nclass TokenizationSupportFactoryData extends Disposable {\n get isResolved() {\n return this._isResolved;\n }\n constructor(_registry, _languageId, _factory) {\n super();\n this._registry = _registry;\n this._languageId = _languageId;\n this._factory = _factory;\n this._isDisposed = false;\n this._resolvePromise = null;\n this._isResolved = false;\n }\n dispose() {\n this._isDisposed = true;\n super.dispose();\n }\n async resolve() {\n if (!this._resolvePromise) {\n this._resolvePromise = this._create();\n }\n return this._resolvePromise;\n }\n async _create() {\n const value = await this._factory.tokenizationSupport;\n this._isResolved = true;\n if (value && !this._isDisposed) {\n this._register(this._registry.register(this._languageId, value));\n }\n }\n}\n", "import { Codicon } from '../../base/common/codicons.js';\nimport { URI } from '../../base/common/uri.js';\nimport { Range } from './core/range.js';\nimport { TokenizationRegistry as TokenizationRegistryImpl } from './tokenizationRegistry.js';\nimport { localize } from '../../nls.js';\nexport class Token {\n constructor(offset, type, language) {\n this.offset = offset;\n this.type = type;\n this.language = language;\n this._tokenBrand = undefined;\n }\n toString() {\n return '(' + this.offset + ', ' + this.type + ')';\n }\n}\n/**\n * @internal\n */\nexport class TokenizationResult {\n constructor(tokens, endState) {\n this.tokens = tokens;\n this.endState = endState;\n this._tokenizationResultBrand = undefined;\n }\n}\n/**\n * @internal\n */\nexport class EncodedTokenizationResult {\n constructor(\n /**\n * The tokens in binary format. Each token occupies two array indices. For token i:\n * - at offset 2*i => startIndex\n * - at offset 2*i + 1 => metadata\n *\n */\n tokens, endState) {\n this.tokens = tokens;\n this.endState = endState;\n this._encodedTokenizationResultBrand = undefined;\n }\n}\n/**\n * @internal\n */\nexport var CompletionItemKinds;\n(function (CompletionItemKinds) {\n const byKind = new Map();\n byKind.set(0 /* CompletionItemKind.Method */, Codicon.symbolMethod);\n byKind.set(1 /* CompletionItemKind.Function */, Codicon.symbolFunction);\n byKind.set(2 /* CompletionItemKind.Constructor */, Codicon.symbolConstructor);\n byKind.set(3 /* CompletionItemKind.Field */, Codicon.symbolField);\n byKind.set(4 /* CompletionItemKind.Variable */, Codicon.symbolVariable);\n byKind.set(5 /* CompletionItemKind.Class */, Codicon.symbolClass);\n byKind.set(6 /* CompletionItemKind.Struct */, Codicon.symbolStruct);\n byKind.set(7 /* CompletionItemKind.Interface */, Codicon.symbolInterface);\n byKind.set(8 /* CompletionItemKind.Module */, Codicon.symbolModule);\n byKind.set(9 /* CompletionItemKind.Property */, Codicon.symbolProperty);\n byKind.set(10 /* CompletionItemKind.Event */, Codicon.symbolEvent);\n byKind.set(11 /* CompletionItemKind.Operator */, Codicon.symbolOperator);\n byKind.set(12 /* CompletionItemKind.Unit */, Codicon.symbolUnit);\n byKind.set(13 /* CompletionItemKind.Value */, Codicon.symbolValue);\n byKind.set(15 /* CompletionItemKind.Enum */, Codicon.symbolEnum);\n byKind.set(14 /* CompletionItemKind.Constant */, Codicon.symbolConstant);\n byKind.set(15 /* CompletionItemKind.Enum */, Codicon.symbolEnum);\n byKind.set(16 /* CompletionItemKind.EnumMember */, Codicon.symbolEnumMember);\n byKind.set(17 /* CompletionItemKind.Keyword */, Codicon.symbolKeyword);\n byKind.set(27 /* CompletionItemKind.Snippet */, Codicon.symbolSnippet);\n byKind.set(18 /* CompletionItemKind.Text */, Codicon.symbolText);\n byKind.set(19 /* CompletionItemKind.Color */, Codicon.symbolColor);\n byKind.set(20 /* CompletionItemKind.File */, Codicon.symbolFile);\n byKind.set(21 /* CompletionItemKind.Reference */, Codicon.symbolReference);\n byKind.set(22 /* CompletionItemKind.Customcolor */, Codicon.symbolCustomColor);\n byKind.set(23 /* CompletionItemKind.Folder */, Codicon.symbolFolder);\n byKind.set(24 /* CompletionItemKind.TypeParameter */, Codicon.symbolTypeParameter);\n byKind.set(25 /* CompletionItemKind.User */, Codicon.account);\n byKind.set(26 /* CompletionItemKind.Issue */, Codicon.issues);\n /**\n * @internal\n */\n function toIcon(kind) {\n let codicon = byKind.get(kind);\n if (!codicon) {\n console.info('No codicon found for CompletionItemKind ' + kind);\n codicon = Codicon.symbolProperty;\n }\n return codicon;\n }\n CompletionItemKinds.toIcon = toIcon;\n const data = new Map();\n data.set('method', 0 /* CompletionItemKind.Method */);\n data.set('function', 1 /* CompletionItemKind.Function */);\n data.set('constructor', 2 /* CompletionItemKind.Constructor */);\n data.set('field', 3 /* CompletionItemKind.Field */);\n data.set('variable', 4 /* CompletionItemKind.Variable */);\n data.set('class', 5 /* CompletionItemKind.Class */);\n data.set('struct', 6 /* CompletionItemKind.Struct */);\n data.set('interface', 7 /* CompletionItemKind.Interface */);\n data.set('module', 8 /* CompletionItemKind.Module */);\n data.set('property', 9 /* CompletionItemKind.Property */);\n data.set('event', 10 /* CompletionItemKind.Event */);\n data.set('operator', 11 /* CompletionItemKind.Operator */);\n data.set('unit', 12 /* CompletionItemKind.Unit */);\n data.set('value', 13 /* CompletionItemKind.Value */);\n data.set('constant', 14 /* CompletionItemKind.Constant */);\n data.set('enum', 15 /* CompletionItemKind.Enum */);\n data.set('enum-member', 16 /* CompletionItemKind.EnumMember */);\n data.set('enumMember', 16 /* CompletionItemKind.EnumMember */);\n data.set('keyword', 17 /* CompletionItemKind.Keyword */);\n data.set('snippet', 27 /* CompletionItemKind.Snippet */);\n data.set('text', 18 /* CompletionItemKind.Text */);\n data.set('color', 19 /* CompletionItemKind.Color */);\n data.set('file', 20 /* CompletionItemKind.File */);\n data.set('reference', 21 /* CompletionItemKind.Reference */);\n data.set('customcolor', 22 /* CompletionItemKind.Customcolor */);\n data.set('folder', 23 /* CompletionItemKind.Folder */);\n data.set('type-parameter', 24 /* CompletionItemKind.TypeParameter */);\n data.set('typeParameter', 24 /* CompletionItemKind.TypeParameter */);\n data.set('account', 25 /* CompletionItemKind.User */);\n data.set('issue', 26 /* CompletionItemKind.Issue */);\n /**\n * @internal\n */\n function fromString(value, strict) {\n let res = data.get(value);\n if (typeof res === 'undefined' && !strict) {\n res = 9 /* CompletionItemKind.Property */;\n }\n return res;\n }\n CompletionItemKinds.fromString = fromString;\n})(CompletionItemKinds || (CompletionItemKinds = {}));\n/**\n * How an {@link InlineCompletionsProvider inline completion provider} was triggered.\n */\nexport var InlineCompletionTriggerKind;\n(function (InlineCompletionTriggerKind) {\n /**\n * Completion was triggered automatically while editing.\n * It is sufficient to return a single completion item in this case.\n */\n InlineCompletionTriggerKind[InlineCompletionTriggerKind[\"Automatic\"] = 0] = \"Automatic\";\n /**\n * Completion was triggered explicitly by a user gesture.\n * Return multiple completion items to enable cycling through them.\n */\n InlineCompletionTriggerKind[InlineCompletionTriggerKind[\"Explicit\"] = 1] = \"Explicit\";\n})(InlineCompletionTriggerKind || (InlineCompletionTriggerKind = {}));\nexport class SelectedSuggestionInfo {\n constructor(range, text, completionKind, isSnippetText) {\n this.range = range;\n this.text = text;\n this.completionKind = completionKind;\n this.isSnippetText = isSnippetText;\n }\n equals(other) {\n return Range.lift(this.range).equalsRange(other.range)\n && this.text === other.text\n && this.completionKind === other.completionKind\n && this.isSnippetText === other.isSnippetText;\n }\n}\nexport var SignatureHelpTriggerKind;\n(function (SignatureHelpTriggerKind) {\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"Invoke\"] = 1] = \"Invoke\";\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"TriggerCharacter\"] = 2] = \"TriggerCharacter\";\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"ContentChange\"] = 3] = \"ContentChange\";\n})(SignatureHelpTriggerKind || (SignatureHelpTriggerKind = {}));\n/**\n * A document highlight kind.\n */\nexport var DocumentHighlightKind;\n(function (DocumentHighlightKind) {\n /**\n * A textual occurrence.\n */\n DocumentHighlightKind[DocumentHighlightKind[\"Text\"] = 0] = \"Text\";\n /**\n * Read-access of a symbol, like reading a variable.\n */\n DocumentHighlightKind[DocumentHighlightKind[\"Read\"] = 1] = \"Read\";\n /**\n * Write-access of a symbol, like writing to a variable.\n */\n DocumentHighlightKind[DocumentHighlightKind[\"Write\"] = 2] = \"Write\";\n})(DocumentHighlightKind || (DocumentHighlightKind = {}));\n/**\n * @internal\n */\nexport function isLocationLink(thing) {\n return thing\n && URI.isUri(thing.uri)\n && Range.isIRange(thing.range)\n && (Range.isIRange(thing.originSelectionRange) || Range.isIRange(thing.targetSelectionRange));\n}\n/**\n * @internal\n */\nexport const symbolKindNames = {\n [17 /* SymbolKind.Array */]: localize('Array', \"array\"),\n [16 /* SymbolKind.Boolean */]: localize('Boolean', \"boolean\"),\n [4 /* SymbolKind.Class */]: localize('Class', \"class\"),\n [13 /* SymbolKind.Constant */]: localize('Constant', \"constant\"),\n [8 /* SymbolKind.Constructor */]: localize('Constructor', \"constructor\"),\n [9 /* SymbolKind.Enum */]: localize('Enum', \"enumeration\"),\n [21 /* SymbolKind.EnumMember */]: localize('EnumMember', \"enumeration member\"),\n [23 /* SymbolKind.Event */]: localize('Event', \"event\"),\n [7 /* SymbolKind.Field */]: localize('Field', \"field\"),\n [0 /* SymbolKind.File */]: localize('File', \"file\"),\n [11 /* SymbolKind.Function */]: localize('Function', \"function\"),\n [10 /* SymbolKind.Interface */]: localize('Interface', \"interface\"),\n [19 /* SymbolKind.Key */]: localize('Key', \"key\"),\n [5 /* SymbolKind.Method */]: localize('Method', \"method\"),\n [1 /* SymbolKind.Module */]: localize('Module', \"module\"),\n [2 /* SymbolKind.Namespace */]: localize('Namespace', \"namespace\"),\n [20 /* SymbolKind.Null */]: localize('Null', \"null\"),\n [15 /* SymbolKind.Number */]: localize('Number', \"number\"),\n [18 /* SymbolKind.Object */]: localize('Object', \"object\"),\n [24 /* SymbolKind.Operator */]: localize('Operator', \"operator\"),\n [3 /* SymbolKind.Package */]: localize('Package', \"package\"),\n [6 /* SymbolKind.Property */]: localize('Property', \"property\"),\n [14 /* SymbolKind.String */]: localize('String', \"string\"),\n [22 /* SymbolKind.Struct */]: localize('Struct', \"struct\"),\n [25 /* SymbolKind.TypeParameter */]: localize('TypeParameter', \"type parameter\"),\n [12 /* SymbolKind.Variable */]: localize('Variable', \"variable\"),\n};\n/**\n * @internal\n */\nexport function getAriaLabelForSymbol(symbolName, kind) {\n return localize('symbolAriaLabel', '{0} ({1})', symbolName, symbolKindNames[kind]);\n}\n/**\n * @internal\n */\nexport var SymbolKinds;\n(function (SymbolKinds) {\n const byKind = new Map();\n byKind.set(0 /* SymbolKind.File */, Codicon.symbolFile);\n byKind.set(1 /* SymbolKind.Module */, Codicon.symbolModule);\n byKind.set(2 /* SymbolKind.Namespace */, Codicon.symbolNamespace);\n byKind.set(3 /* SymbolKind.Package */, Codicon.symbolPackage);\n byKind.set(4 /* SymbolKind.Class */, Codicon.symbolClass);\n byKind.set(5 /* SymbolKind.Method */, Codicon.symbolMethod);\n byKind.set(6 /* SymbolKind.Property */, Codicon.symbolProperty);\n byKind.set(7 /* SymbolKind.Field */, Codicon.symbolField);\n byKind.set(8 /* SymbolKind.Constructor */, Codicon.symbolConstructor);\n byKind.set(9 /* SymbolKind.Enum */, Codicon.symbolEnum);\n byKind.set(10 /* SymbolKind.Interface */, Codicon.symbolInterface);\n byKind.set(11 /* SymbolKind.Function */, Codicon.symbolFunction);\n byKind.set(12 /* SymbolKind.Variable */, Codicon.symbolVariable);\n byKind.set(13 /* SymbolKind.Constant */, Codicon.symbolConstant);\n byKind.set(14 /* SymbolKind.String */, Codicon.symbolString);\n byKind.set(15 /* SymbolKind.Number */, Codicon.symbolNumber);\n byKind.set(16 /* SymbolKind.Boolean */, Codicon.symbolBoolean);\n byKind.set(17 /* SymbolKind.Array */, Codicon.symbolArray);\n byKind.set(18 /* SymbolKind.Object */, Codicon.symbolObject);\n byKind.set(19 /* SymbolKind.Key */, Codicon.symbolKey);\n byKind.set(20 /* SymbolKind.Null */, Codicon.symbolNull);\n byKind.set(21 /* SymbolKind.EnumMember */, Codicon.symbolEnumMember);\n byKind.set(22 /* SymbolKind.Struct */, Codicon.symbolStruct);\n byKind.set(23 /* SymbolKind.Event */, Codicon.symbolEvent);\n byKind.set(24 /* SymbolKind.Operator */, Codicon.symbolOperator);\n byKind.set(25 /* SymbolKind.TypeParameter */, Codicon.symbolTypeParameter);\n /**\n * @internal\n */\n function toIcon(kind) {\n let icon = byKind.get(kind);\n if (!icon) {\n console.info('No codicon found for SymbolKind ' + kind);\n icon = Codicon.symbolProperty;\n }\n return icon;\n }\n SymbolKinds.toIcon = toIcon;\n})(SymbolKinds || (SymbolKinds = {}));\n/** @internal */\nexport class TextEdit {\n}\nexport class FoldingRangeKind {\n /**\n * Returns a {@link FoldingRangeKind} for the given value.\n *\n * @param value of the kind.\n */\n static fromValue(value) {\n switch (value) {\n case 'comment': return FoldingRangeKind.Comment;\n case 'imports': return FoldingRangeKind.Imports;\n case 'region': return FoldingRangeKind.Region;\n }\n return new FoldingRangeKind(value);\n }\n /**\n * Creates a new {@link FoldingRangeKind}.\n *\n * @param value of the kind.\n */\n constructor(value) {\n this.value = value;\n }\n}\n/**\n * Kind for folding range representing a comment. The value of the kind is 'comment'.\n */\nFoldingRangeKind.Comment = new FoldingRangeKind('comment');\n/**\n * Kind for folding range representing a import. The value of the kind is 'imports'.\n */\nFoldingRangeKind.Imports = new FoldingRangeKind('imports');\n/**\n * Kind for folding range representing regions (for example marked by `#region`, `#endregion`).\n * The value of the kind is 'region'.\n */\nFoldingRangeKind.Region = new FoldingRangeKind('region');\n/**\n * @internal\n */\nexport var Command;\n(function (Command) {\n /**\n * @internal\n */\n function is(obj) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n return typeof obj.id === 'string' &&\n typeof obj.title === 'string';\n }\n Command.is = is;\n})(Command || (Command = {}));\nexport var InlayHintKind;\n(function (InlayHintKind) {\n InlayHintKind[InlayHintKind[\"Type\"] = 1] = \"Type\";\n InlayHintKind[InlayHintKind[\"Parameter\"] = 2] = \"Parameter\";\n})(InlayHintKind || (InlayHintKind = {}));\n/**\n * @internal\n */\nexport class LazyTokenizationSupport {\n constructor(createSupport) {\n this.createSupport = createSupport;\n this._tokenizationSupport = null;\n }\n dispose() {\n if (this._tokenizationSupport) {\n this._tokenizationSupport.then((support) => {\n if (support) {\n support.dispose();\n }\n });\n }\n }\n get tokenizationSupport() {\n if (!this._tokenizationSupport) {\n this._tokenizationSupport = this.createSupport();\n }\n return this._tokenizationSupport;\n }\n}\n/**\n * @internal\n */\nexport const TokenizationRegistry = new TokenizationRegistryImpl();\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n// THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY.\nexport var AccessibilitySupport;\n(function (AccessibilitySupport) {\n /**\n * This should be the browser case where it is not known if a screen reader is attached or no.\n */\n AccessibilitySupport[AccessibilitySupport[\"Unknown\"] = 0] = \"Unknown\";\n AccessibilitySupport[AccessibilitySupport[\"Disabled\"] = 1] = \"Disabled\";\n AccessibilitySupport[AccessibilitySupport[\"Enabled\"] = 2] = \"Enabled\";\n})(AccessibilitySupport || (AccessibilitySupport = {}));\nexport var CodeActionTriggerType;\n(function (CodeActionTriggerType) {\n CodeActionTriggerType[CodeActionTriggerType[\"Invoke\"] = 1] = \"Invoke\";\n CodeActionTriggerType[CodeActionTriggerType[\"Auto\"] = 2] = \"Auto\";\n})(CodeActionTriggerType || (CodeActionTriggerType = {}));\nexport var CompletionItemInsertTextRule;\n(function (CompletionItemInsertTextRule) {\n CompletionItemInsertTextRule[CompletionItemInsertTextRule[\"None\"] = 0] = \"None\";\n /**\n * Adjust whitespace/indentation of multiline insert texts to\n * match the current line indentation.\n */\n CompletionItemInsertTextRule[CompletionItemInsertTextRule[\"KeepWhitespace\"] = 1] = \"KeepWhitespace\";\n /**\n * `insertText` is a snippet.\n */\n CompletionItemInsertTextRule[CompletionItemInsertTextRule[\"InsertAsSnippet\"] = 4] = \"InsertAsSnippet\";\n})(CompletionItemInsertTextRule || (CompletionItemInsertTextRule = {}));\nexport var CompletionItemKind;\n(function (CompletionItemKind) {\n CompletionItemKind[CompletionItemKind[\"Method\"] = 0] = \"Method\";\n CompletionItemKind[CompletionItemKind[\"Function\"] = 1] = \"Function\";\n CompletionItemKind[CompletionItemKind[\"Constructor\"] = 2] = \"Constructor\";\n CompletionItemKind[CompletionItemKind[\"Field\"] = 3] = \"Field\";\n CompletionItemKind[CompletionItemKind[\"Variable\"] = 4] = \"Variable\";\n CompletionItemKind[CompletionItemKind[\"Class\"] = 5] = \"Class\";\n CompletionItemKind[CompletionItemKind[\"Struct\"] = 6] = \"Struct\";\n CompletionItemKind[CompletionItemKind[\"Interface\"] = 7] = \"Interface\";\n CompletionItemKind[CompletionItemKind[\"Module\"] = 8] = \"Module\";\n CompletionItemKind[CompletionItemKind[\"Property\"] = 9] = \"Property\";\n CompletionItemKind[CompletionItemKind[\"Event\"] = 10] = \"Event\";\n CompletionItemKind[CompletionItemKind[\"Operator\"] = 11] = \"Operator\";\n CompletionItemKind[CompletionItemKind[\"Unit\"] = 12] = \"Unit\";\n CompletionItemKind[CompletionItemKind[\"Value\"] = 13] = \"Value\";\n CompletionItemKind[CompletionItemKind[\"Constant\"] = 14] = \"Constant\";\n CompletionItemKind[CompletionItemKind[\"Enum\"] = 15] = \"Enum\";\n CompletionItemKind[CompletionItemKind[\"EnumMember\"] = 16] = \"EnumMember\";\n CompletionItemKind[CompletionItemKind[\"Keyword\"] = 17] = \"Keyword\";\n CompletionItemKind[CompletionItemKind[\"Text\"] = 18] = \"Text\";\n CompletionItemKind[CompletionItemKind[\"Color\"] = 19] = \"Color\";\n CompletionItemKind[CompletionItemKind[\"File\"] = 20] = \"File\";\n CompletionItemKind[CompletionItemKind[\"Reference\"] = 21] = \"Reference\";\n CompletionItemKind[CompletionItemKind[\"Customcolor\"] = 22] = \"Customcolor\";\n CompletionItemKind[CompletionItemKind[\"Folder\"] = 23] = \"Folder\";\n CompletionItemKind[CompletionItemKind[\"TypeParameter\"] = 24] = \"TypeParameter\";\n CompletionItemKind[CompletionItemKind[\"User\"] = 25] = \"User\";\n CompletionItemKind[CompletionItemKind[\"Issue\"] = 26] = \"Issue\";\n CompletionItemKind[CompletionItemKind[\"Snippet\"] = 27] = \"Snippet\";\n})(CompletionItemKind || (CompletionItemKind = {}));\nexport var CompletionItemTag;\n(function (CompletionItemTag) {\n CompletionItemTag[CompletionItemTag[\"Deprecated\"] = 1] = \"Deprecated\";\n})(CompletionItemTag || (CompletionItemTag = {}));\n/**\n * How a suggest provider was triggered.\n */\nexport var CompletionTriggerKind;\n(function (CompletionTriggerKind) {\n CompletionTriggerKind[CompletionTriggerKind[\"Invoke\"] = 0] = \"Invoke\";\n CompletionTriggerKind[CompletionTriggerKind[\"TriggerCharacter\"] = 1] = \"TriggerCharacter\";\n CompletionTriggerKind[CompletionTriggerKind[\"TriggerForIncompleteCompletions\"] = 2] = \"TriggerForIncompleteCompletions\";\n})(CompletionTriggerKind || (CompletionTriggerKind = {}));\n/**\n * A positioning preference for rendering content widgets.\n */\nexport var ContentWidgetPositionPreference;\n(function (ContentWidgetPositionPreference) {\n /**\n * Place the content widget exactly at a position\n */\n ContentWidgetPositionPreference[ContentWidgetPositionPreference[\"EXACT\"] = 0] = \"EXACT\";\n /**\n * Place the content widget above a position\n */\n ContentWidgetPositionPreference[ContentWidgetPositionPreference[\"ABOVE\"] = 1] = \"ABOVE\";\n /**\n * Place the content widget below a position\n */\n ContentWidgetPositionPreference[ContentWidgetPositionPreference[\"BELOW\"] = 2] = \"BELOW\";\n})(ContentWidgetPositionPreference || (ContentWidgetPositionPreference = {}));\n/**\n * Describes the reason the cursor has changed its position.\n */\nexport var CursorChangeReason;\n(function (CursorChangeReason) {\n /**\n * Unknown or not set.\n */\n CursorChangeReason[CursorChangeReason[\"NotSet\"] = 0] = \"NotSet\";\n /**\n * A `model.setValue()` was called.\n */\n CursorChangeReason[CursorChangeReason[\"ContentFlush\"] = 1] = \"ContentFlush\";\n /**\n * The `model` has been changed outside of this cursor and the cursor recovers its position from associated markers.\n */\n CursorChangeReason[CursorChangeReason[\"RecoverFromMarkers\"] = 2] = \"RecoverFromMarkers\";\n /**\n * There was an explicit user gesture.\n */\n CursorChangeReason[CursorChangeReason[\"Explicit\"] = 3] = \"Explicit\";\n /**\n * There was a Paste.\n */\n CursorChangeReason[CursorChangeReason[\"Paste\"] = 4] = \"Paste\";\n /**\n * There was an Undo.\n */\n CursorChangeReason[CursorChangeReason[\"Undo\"] = 5] = \"Undo\";\n /**\n * There was a Redo.\n */\n CursorChangeReason[CursorChangeReason[\"Redo\"] = 6] = \"Redo\";\n})(CursorChangeReason || (CursorChangeReason = {}));\n/**\n * The default end of line to use when instantiating models.\n */\nexport var DefaultEndOfLine;\n(function (DefaultEndOfLine) {\n /**\n * Use line feed (\\n) as the end of line character.\n */\n DefaultEndOfLine[DefaultEndOfLine[\"LF\"] = 1] = \"LF\";\n /**\n * Use carriage return and line feed (\\r\\n) as the end of line character.\n */\n DefaultEndOfLine[DefaultEndOfLine[\"CRLF\"] = 2] = \"CRLF\";\n})(DefaultEndOfLine || (DefaultEndOfLine = {}));\n/**\n * A document highlight kind.\n */\nexport var DocumentHighlightKind;\n(function (DocumentHighlightKind) {\n /**\n * A textual occurrence.\n */\n DocumentHighlightKind[DocumentHighlightKind[\"Text\"] = 0] = \"Text\";\n /**\n * Read-access of a symbol, like reading a variable.\n */\n DocumentHighlightKind[DocumentHighlightKind[\"Read\"] = 1] = \"Read\";\n /**\n * Write-access of a symbol, like writing to a variable.\n */\n DocumentHighlightKind[DocumentHighlightKind[\"Write\"] = 2] = \"Write\";\n})(DocumentHighlightKind || (DocumentHighlightKind = {}));\n/**\n * Configuration options for auto indentation in the editor\n */\nexport var EditorAutoIndentStrategy;\n(function (EditorAutoIndentStrategy) {\n EditorAutoIndentStrategy[EditorAutoIndentStrategy[\"None\"] = 0] = \"None\";\n EditorAutoIndentStrategy[EditorAutoIndentStrategy[\"Keep\"] = 1] = \"Keep\";\n EditorAutoIndentStrategy[EditorAutoIndentStrategy[\"Brackets\"] = 2] = \"Brackets\";\n EditorAutoIndentStrategy[EditorAutoIndentStrategy[\"Advanced\"] = 3] = \"Advanced\";\n EditorAutoIndentStrategy[EditorAutoIndentStrategy[\"Full\"] = 4] = \"Full\";\n})(EditorAutoIndentStrategy || (EditorAutoIndentStrategy = {}));\nexport var EditorOption;\n(function (EditorOption) {\n EditorOption[EditorOption[\"acceptSuggestionOnCommitCharacter\"] = 0] = \"acceptSuggestionOnCommitCharacter\";\n EditorOption[EditorOption[\"acceptSuggestionOnEnter\"] = 1] = \"acceptSuggestionOnEnter\";\n EditorOption[EditorOption[\"accessibilitySupport\"] = 2] = \"accessibilitySupport\";\n EditorOption[EditorOption[\"accessibilityPageSize\"] = 3] = \"accessibilityPageSize\";\n EditorOption[EditorOption[\"ariaLabel\"] = 4] = \"ariaLabel\";\n EditorOption[EditorOption[\"ariaRequired\"] = 5] = \"ariaRequired\";\n EditorOption[EditorOption[\"autoClosingBrackets\"] = 6] = \"autoClosingBrackets\";\n EditorOption[EditorOption[\"autoClosingComments\"] = 7] = \"autoClosingComments\";\n EditorOption[EditorOption[\"screenReaderAnnounceInlineSuggestion\"] = 8] = \"screenReaderAnnounceInlineSuggestion\";\n EditorOption[EditorOption[\"autoClosingDelete\"] = 9] = \"autoClosingDelete\";\n EditorOption[EditorOption[\"autoClosingOvertype\"] = 10] = \"autoClosingOvertype\";\n EditorOption[EditorOption[\"autoClosingQuotes\"] = 11] = \"autoClosingQuotes\";\n EditorOption[EditorOption[\"autoIndent\"] = 12] = \"autoIndent\";\n EditorOption[EditorOption[\"automaticLayout\"] = 13] = \"automaticLayout\";\n EditorOption[EditorOption[\"autoSurround\"] = 14] = \"autoSurround\";\n EditorOption[EditorOption[\"bracketPairColorization\"] = 15] = \"bracketPairColorization\";\n EditorOption[EditorOption[\"guides\"] = 16] = \"guides\";\n EditorOption[EditorOption[\"codeLens\"] = 17] = \"codeLens\";\n EditorOption[EditorOption[\"codeLensFontFamily\"] = 18] = \"codeLensFontFamily\";\n EditorOption[EditorOption[\"codeLensFontSize\"] = 19] = \"codeLensFontSize\";\n EditorOption[EditorOption[\"colorDecorators\"] = 20] = \"colorDecorators\";\n EditorOption[EditorOption[\"colorDecoratorsLimit\"] = 21] = \"colorDecoratorsLimit\";\n EditorOption[EditorOption[\"columnSelection\"] = 22] = \"columnSelection\";\n EditorOption[EditorOption[\"comments\"] = 23] = \"comments\";\n EditorOption[EditorOption[\"contextmenu\"] = 24] = \"contextmenu\";\n EditorOption[EditorOption[\"copyWithSyntaxHighlighting\"] = 25] = \"copyWithSyntaxHighlighting\";\n EditorOption[EditorOption[\"cursorBlinking\"] = 26] = \"cursorBlinking\";\n EditorOption[EditorOption[\"cursorSmoothCaretAnimation\"] = 27] = \"cursorSmoothCaretAnimation\";\n EditorOption[EditorOption[\"cursorStyle\"] = 28] = \"cursorStyle\";\n EditorOption[EditorOption[\"cursorSurroundingLines\"] = 29] = \"cursorSurroundingLines\";\n EditorOption[EditorOption[\"cursorSurroundingLinesStyle\"] = 30] = \"cursorSurroundingLinesStyle\";\n EditorOption[EditorOption[\"cursorWidth\"] = 31] = \"cursorWidth\";\n EditorOption[EditorOption[\"disableLayerHinting\"] = 32] = \"disableLayerHinting\";\n EditorOption[EditorOption[\"disableMonospaceOptimizations\"] = 33] = \"disableMonospaceOptimizations\";\n EditorOption[EditorOption[\"domReadOnly\"] = 34] = \"domReadOnly\";\n EditorOption[EditorOption[\"dragAndDrop\"] = 35] = \"dragAndDrop\";\n EditorOption[EditorOption[\"dropIntoEditor\"] = 36] = \"dropIntoEditor\";\n EditorOption[EditorOption[\"emptySelectionClipboard\"] = 37] = \"emptySelectionClipboard\";\n EditorOption[EditorOption[\"experimentalWhitespaceRendering\"] = 38] = \"experimentalWhitespaceRendering\";\n EditorOption[EditorOption[\"extraEditorClassName\"] = 39] = \"extraEditorClassName\";\n EditorOption[EditorOption[\"fastScrollSensitivity\"] = 40] = \"fastScrollSensitivity\";\n EditorOption[EditorOption[\"find\"] = 41] = \"find\";\n EditorOption[EditorOption[\"fixedOverflowWidgets\"] = 42] = \"fixedOverflowWidgets\";\n EditorOption[EditorOption[\"folding\"] = 43] = \"folding\";\n EditorOption[EditorOption[\"foldingStrategy\"] = 44] = \"foldingStrategy\";\n EditorOption[EditorOption[\"foldingHighlight\"] = 45] = \"foldingHighlight\";\n EditorOption[EditorOption[\"foldingImportsByDefault\"] = 46] = \"foldingImportsByDefault\";\n EditorOption[EditorOption[\"foldingMaximumRegions\"] = 47] = \"foldingMaximumRegions\";\n EditorOption[EditorOption[\"unfoldOnClickAfterEndOfLine\"] = 48] = \"unfoldOnClickAfterEndOfLine\";\n EditorOption[EditorOption[\"fontFamily\"] = 49] = \"fontFamily\";\n EditorOption[EditorOption[\"fontInfo\"] = 50] = \"fontInfo\";\n EditorOption[EditorOption[\"fontLigatures\"] = 51] = \"fontLigatures\";\n EditorOption[EditorOption[\"fontSize\"] = 52] = \"fontSize\";\n EditorOption[EditorOption[\"fontWeight\"] = 53] = \"fontWeight\";\n EditorOption[EditorOption[\"fontVariations\"] = 54] = \"fontVariations\";\n EditorOption[EditorOption[\"formatOnPaste\"] = 55] = \"formatOnPaste\";\n EditorOption[EditorOption[\"formatOnType\"] = 56] = \"formatOnType\";\n EditorOption[EditorOption[\"glyphMargin\"] = 57] = \"glyphMargin\";\n EditorOption[EditorOption[\"gotoLocation\"] = 58] = \"gotoLocation\";\n EditorOption[EditorOption[\"hideCursorInOverviewRuler\"] = 59] = \"hideCursorInOverviewRuler\";\n EditorOption[EditorOption[\"hover\"] = 60] = \"hover\";\n EditorOption[EditorOption[\"inDiffEditor\"] = 61] = \"inDiffEditor\";\n EditorOption[EditorOption[\"inlineSuggest\"] = 62] = \"inlineSuggest\";\n EditorOption[EditorOption[\"letterSpacing\"] = 63] = \"letterSpacing\";\n EditorOption[EditorOption[\"lightbulb\"] = 64] = \"lightbulb\";\n EditorOption[EditorOption[\"lineDecorationsWidth\"] = 65] = \"lineDecorationsWidth\";\n EditorOption[EditorOption[\"lineHeight\"] = 66] = \"lineHeight\";\n EditorOption[EditorOption[\"lineNumbers\"] = 67] = \"lineNumbers\";\n EditorOption[EditorOption[\"lineNumbersMinChars\"] = 68] = \"lineNumbersMinChars\";\n EditorOption[EditorOption[\"linkedEditing\"] = 69] = \"linkedEditing\";\n EditorOption[EditorOption[\"links\"] = 70] = \"links\";\n EditorOption[EditorOption[\"matchBrackets\"] = 71] = \"matchBrackets\";\n EditorOption[EditorOption[\"minimap\"] = 72] = \"minimap\";\n EditorOption[EditorOption[\"mouseStyle\"] = 73] = \"mouseStyle\";\n EditorOption[EditorOption[\"mouseWheelScrollSensitivity\"] = 74] = \"mouseWheelScrollSensitivity\";\n EditorOption[EditorOption[\"mouseWheelZoom\"] = 75] = \"mouseWheelZoom\";\n EditorOption[EditorOption[\"multiCursorMergeOverlapping\"] = 76] = \"multiCursorMergeOverlapping\";\n EditorOption[EditorOption[\"multiCursorModifier\"] = 77] = \"multiCursorModifier\";\n EditorOption[EditorOption[\"multiCursorPaste\"] = 78] = \"multiCursorPaste\";\n EditorOption[EditorOption[\"multiCursorLimit\"] = 79] = \"multiCursorLimit\";\n EditorOption[EditorOption[\"occurrencesHighlight\"] = 80] = \"occurrencesHighlight\";\n EditorOption[EditorOption[\"overviewRulerBorder\"] = 81] = \"overviewRulerBorder\";\n EditorOption[EditorOption[\"overviewRulerLanes\"] = 82] = \"overviewRulerLanes\";\n EditorOption[EditorOption[\"padding\"] = 83] = \"padding\";\n EditorOption[EditorOption[\"pasteAs\"] = 84] = \"pasteAs\";\n EditorOption[EditorOption[\"parameterHints\"] = 85] = \"parameterHints\";\n EditorOption[EditorOption[\"peekWidgetDefaultFocus\"] = 86] = \"peekWidgetDefaultFocus\";\n EditorOption[EditorOption[\"definitionLinkOpensInPeek\"] = 87] = \"definitionLinkOpensInPeek\";\n EditorOption[EditorOption[\"quickSuggestions\"] = 88] = \"quickSuggestions\";\n EditorOption[EditorOption[\"quickSuggestionsDelay\"] = 89] = \"quickSuggestionsDelay\";\n EditorOption[EditorOption[\"readOnly\"] = 90] = \"readOnly\";\n EditorOption[EditorOption[\"readOnlyMessage\"] = 91] = \"readOnlyMessage\";\n EditorOption[EditorOption[\"renameOnType\"] = 92] = \"renameOnType\";\n EditorOption[EditorOption[\"renderControlCharacters\"] = 93] = \"renderControlCharacters\";\n EditorOption[EditorOption[\"renderFinalNewline\"] = 94] = \"renderFinalNewline\";\n EditorOption[EditorOption[\"renderLineHighlight\"] = 95] = \"renderLineHighlight\";\n EditorOption[EditorOption[\"renderLineHighlightOnlyWhenFocus\"] = 96] = \"renderLineHighlightOnlyWhenFocus\";\n EditorOption[EditorOption[\"renderValidationDecorations\"] = 97] = \"renderValidationDecorations\";\n EditorOption[EditorOption[\"renderWhitespace\"] = 98] = \"renderWhitespace\";\n EditorOption[EditorOption[\"revealHorizontalRightPadding\"] = 99] = \"revealHorizontalRightPadding\";\n EditorOption[EditorOption[\"roundedSelection\"] = 100] = \"roundedSelection\";\n EditorOption[EditorOption[\"rulers\"] = 101] = \"rulers\";\n EditorOption[EditorOption[\"scrollbar\"] = 102] = \"scrollbar\";\n EditorOption[EditorOption[\"scrollBeyondLastColumn\"] = 103] = \"scrollBeyondLastColumn\";\n EditorOption[EditorOption[\"scrollBeyondLastLine\"] = 104] = \"scrollBeyondLastLine\";\n EditorOption[EditorOption[\"scrollPredominantAxis\"] = 105] = \"scrollPredominantAxis\";\n EditorOption[EditorOption[\"selectionClipboard\"] = 106] = \"selectionClipboard\";\n EditorOption[EditorOption[\"selectionHighlight\"] = 107] = \"selectionHighlight\";\n EditorOption[EditorOption[\"selectOnLineNumbers\"] = 108] = \"selectOnLineNumbers\";\n EditorOption[EditorOption[\"showFoldingControls\"] = 109] = \"showFoldingControls\";\n EditorOption[EditorOption[\"showUnused\"] = 110] = \"showUnused\";\n EditorOption[EditorOption[\"snippetSuggestions\"] = 111] = \"snippetSuggestions\";\n EditorOption[EditorOption[\"smartSelect\"] = 112] = \"smartSelect\";\n EditorOption[EditorOption[\"smoothScrolling\"] = 113] = \"smoothScrolling\";\n EditorOption[EditorOption[\"stickyScroll\"] = 114] = \"stickyScroll\";\n EditorOption[EditorOption[\"stickyTabStops\"] = 115] = \"stickyTabStops\";\n EditorOption[EditorOption[\"stopRenderingLineAfter\"] = 116] = \"stopRenderingLineAfter\";\n EditorOption[EditorOption[\"suggest\"] = 117] = \"suggest\";\n EditorOption[EditorOption[\"suggestFontSize\"] = 118] = \"suggestFontSize\";\n EditorOption[EditorOption[\"suggestLineHeight\"] = 119] = \"suggestLineHeight\";\n EditorOption[EditorOption[\"suggestOnTriggerCharacters\"] = 120] = \"suggestOnTriggerCharacters\";\n EditorOption[EditorOption[\"suggestSelection\"] = 121] = \"suggestSelection\";\n EditorOption[EditorOption[\"tabCompletion\"] = 122] = \"tabCompletion\";\n EditorOption[EditorOption[\"tabIndex\"] = 123] = \"tabIndex\";\n EditorOption[EditorOption[\"unicodeHighlighting\"] = 124] = \"unicodeHighlighting\";\n EditorOption[EditorOption[\"unusualLineTerminators\"] = 125] = \"unusualLineTerminators\";\n EditorOption[EditorOption[\"useShadowDOM\"] = 126] = \"useShadowDOM\";\n EditorOption[EditorOption[\"useTabStops\"] = 127] = \"useTabStops\";\n EditorOption[EditorOption[\"wordBreak\"] = 128] = \"wordBreak\";\n EditorOption[EditorOption[\"wordSeparators\"] = 129] = \"wordSeparators\";\n EditorOption[EditorOption[\"wordWrap\"] = 130] = \"wordWrap\";\n EditorOption[EditorOption[\"wordWrapBreakAfterCharacters\"] = 131] = \"wordWrapBreakAfterCharacters\";\n EditorOption[EditorOption[\"wordWrapBreakBeforeCharacters\"] = 132] = \"wordWrapBreakBeforeCharacters\";\n EditorOption[EditorOption[\"wordWrapColumn\"] = 133] = \"wordWrapColumn\";\n EditorOption[EditorOption[\"wordWrapOverride1\"] = 134] = \"wordWrapOverride1\";\n EditorOption[EditorOption[\"wordWrapOverride2\"] = 135] = \"wordWrapOverride2\";\n EditorOption[EditorOption[\"wrappingIndent\"] = 136] = \"wrappingIndent\";\n EditorOption[EditorOption[\"wrappingStrategy\"] = 137] = \"wrappingStrategy\";\n EditorOption[EditorOption[\"showDeprecated\"] = 138] = \"showDeprecated\";\n EditorOption[EditorOption[\"inlayHints\"] = 139] = \"inlayHints\";\n EditorOption[EditorOption[\"editorClassName\"] = 140] = \"editorClassName\";\n EditorOption[EditorOption[\"pixelRatio\"] = 141] = \"pixelRatio\";\n EditorOption[EditorOption[\"tabFocusMode\"] = 142] = \"tabFocusMode\";\n EditorOption[EditorOption[\"layoutInfo\"] = 143] = \"layoutInfo\";\n EditorOption[EditorOption[\"wrappingInfo\"] = 144] = \"wrappingInfo\";\n EditorOption[EditorOption[\"defaultColorDecorators\"] = 145] = \"defaultColorDecorators\";\n EditorOption[EditorOption[\"colorDecoratorsActivatedOn\"] = 146] = \"colorDecoratorsActivatedOn\";\n EditorOption[EditorOption[\"inlineCompletionsAccessibilityVerbose\"] = 147] = \"inlineCompletionsAccessibilityVerbose\";\n})(EditorOption || (EditorOption = {}));\n/**\n * End of line character preference.\n */\nexport var EndOfLinePreference;\n(function (EndOfLinePreference) {\n /**\n * Use the end of line character identified in the text buffer.\n */\n EndOfLinePreference[EndOfLinePreference[\"TextDefined\"] = 0] = \"TextDefined\";\n /**\n * Use line feed (\\n) as the end of line character.\n */\n EndOfLinePreference[EndOfLinePreference[\"LF\"] = 1] = \"LF\";\n /**\n * Use carriage return and line feed (\\r\\n) as the end of line character.\n */\n EndOfLinePreference[EndOfLinePreference[\"CRLF\"] = 2] = \"CRLF\";\n})(EndOfLinePreference || (EndOfLinePreference = {}));\n/**\n * End of line character preference.\n */\nexport var EndOfLineSequence;\n(function (EndOfLineSequence) {\n /**\n * Use line feed (\\n) as the end of line character.\n */\n EndOfLineSequence[EndOfLineSequence[\"LF\"] = 0] = \"LF\";\n /**\n * Use carriage return and line feed (\\r\\n) as the end of line character.\n */\n EndOfLineSequence[EndOfLineSequence[\"CRLF\"] = 1] = \"CRLF\";\n})(EndOfLineSequence || (EndOfLineSequence = {}));\n/**\n * Vertical Lane in the glyph margin of the editor.\n */\nexport var GlyphMarginLane;\n(function (GlyphMarginLane) {\n GlyphMarginLane[GlyphMarginLane[\"Left\"] = 1] = \"Left\";\n GlyphMarginLane[GlyphMarginLane[\"Center\"] = 2] = \"Center\";\n GlyphMarginLane[GlyphMarginLane[\"Right\"] = 3] = \"Right\";\n})(GlyphMarginLane || (GlyphMarginLane = {}));\n/**\n * Describes what to do with the indentation when pressing Enter.\n */\nexport var IndentAction;\n(function (IndentAction) {\n /**\n * Insert new line and copy the previous line's indentation.\n */\n IndentAction[IndentAction[\"None\"] = 0] = \"None\";\n /**\n * Insert new line and indent once (relative to the previous line's indentation).\n */\n IndentAction[IndentAction[\"Indent\"] = 1] = \"Indent\";\n /**\n * Insert two new lines:\n * - the first one indented which will hold the cursor\n * - the second one at the same indentation level\n */\n IndentAction[IndentAction[\"IndentOutdent\"] = 2] = \"IndentOutdent\";\n /**\n * Insert new line and outdent once (relative to the previous line's indentation).\n */\n IndentAction[IndentAction[\"Outdent\"] = 3] = \"Outdent\";\n})(IndentAction || (IndentAction = {}));\nexport var InjectedTextCursorStops;\n(function (InjectedTextCursorStops) {\n InjectedTextCursorStops[InjectedTextCursorStops[\"Both\"] = 0] = \"Both\";\n InjectedTextCursorStops[InjectedTextCursorStops[\"Right\"] = 1] = \"Right\";\n InjectedTextCursorStops[InjectedTextCursorStops[\"Left\"] = 2] = \"Left\";\n InjectedTextCursorStops[InjectedTextCursorStops[\"None\"] = 3] = \"None\";\n})(InjectedTextCursorStops || (InjectedTextCursorStops = {}));\nexport var InlayHintKind;\n(function (InlayHintKind) {\n InlayHintKind[InlayHintKind[\"Type\"] = 1] = \"Type\";\n InlayHintKind[InlayHintKind[\"Parameter\"] = 2] = \"Parameter\";\n})(InlayHintKind || (InlayHintKind = {}));\n/**\n * How an {@link InlineCompletionsProvider inline completion provider} was triggered.\n */\nexport var InlineCompletionTriggerKind;\n(function (InlineCompletionTriggerKind) {\n /**\n * Completion was triggered automatically while editing.\n * It is sufficient to return a single completion item in this case.\n */\n InlineCompletionTriggerKind[InlineCompletionTriggerKind[\"Automatic\"] = 0] = \"Automatic\";\n /**\n * Completion was triggered explicitly by a user gesture.\n * Return multiple completion items to enable cycling through them.\n */\n InlineCompletionTriggerKind[InlineCompletionTriggerKind[\"Explicit\"] = 1] = \"Explicit\";\n})(InlineCompletionTriggerKind || (InlineCompletionTriggerKind = {}));\n/**\n * Virtual Key Codes, the value does not hold any inherent meaning.\n * Inspired somewhat from https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx\n * But these are \"more general\", as they should work across browsers & OS`s.\n */\nexport var KeyCode;\n(function (KeyCode) {\n KeyCode[KeyCode[\"DependsOnKbLayout\"] = -1] = \"DependsOnKbLayout\";\n /**\n * Placed first to cover the 0 value of the enum.\n */\n KeyCode[KeyCode[\"Unknown\"] = 0] = \"Unknown\";\n KeyCode[KeyCode[\"Backspace\"] = 1] = \"Backspace\";\n KeyCode[KeyCode[\"Tab\"] = 2] = \"Tab\";\n KeyCode[KeyCode[\"Enter\"] = 3] = \"Enter\";\n KeyCode[KeyCode[\"Shift\"] = 4] = \"Shift\";\n KeyCode[KeyCode[\"Ctrl\"] = 5] = \"Ctrl\";\n KeyCode[KeyCode[\"Alt\"] = 6] = \"Alt\";\n KeyCode[KeyCode[\"PauseBreak\"] = 7] = \"PauseBreak\";\n KeyCode[KeyCode[\"CapsLock\"] = 8] = \"CapsLock\";\n KeyCode[KeyCode[\"Escape\"] = 9] = \"Escape\";\n KeyCode[KeyCode[\"Space\"] = 10] = \"Space\";\n KeyCode[KeyCode[\"PageUp\"] = 11] = \"PageUp\";\n KeyCode[KeyCode[\"PageDown\"] = 12] = \"PageDown\";\n KeyCode[KeyCode[\"End\"] = 13] = \"End\";\n KeyCode[KeyCode[\"Home\"] = 14] = \"Home\";\n KeyCode[KeyCode[\"LeftArrow\"] = 15] = \"LeftArrow\";\n KeyCode[KeyCode[\"UpArrow\"] = 16] = \"UpArrow\";\n KeyCode[KeyCode[\"RightArrow\"] = 17] = \"RightArrow\";\n KeyCode[KeyCode[\"DownArrow\"] = 18] = \"DownArrow\";\n KeyCode[KeyCode[\"Insert\"] = 19] = \"Insert\";\n KeyCode[KeyCode[\"Delete\"] = 20] = \"Delete\";\n KeyCode[KeyCode[\"Digit0\"] = 21] = \"Digit0\";\n KeyCode[KeyCode[\"Digit1\"] = 22] = \"Digit1\";\n KeyCode[KeyCode[\"Digit2\"] = 23] = \"Digit2\";\n KeyCode[KeyCode[\"Digit3\"] = 24] = \"Digit3\";\n KeyCode[KeyCode[\"Digit4\"] = 25] = \"Digit4\";\n KeyCode[KeyCode[\"Digit5\"] = 26] = \"Digit5\";\n KeyCode[KeyCode[\"Digit6\"] = 27] = \"Digit6\";\n KeyCode[KeyCode[\"Digit7\"] = 28] = \"Digit7\";\n KeyCode[KeyCode[\"Digit8\"] = 29] = \"Digit8\";\n KeyCode[KeyCode[\"Digit9\"] = 30] = \"Digit9\";\n KeyCode[KeyCode[\"KeyA\"] = 31] = \"KeyA\";\n KeyCode[KeyCode[\"KeyB\"] = 32] = \"KeyB\";\n KeyCode[KeyCode[\"KeyC\"] = 33] = \"KeyC\";\n KeyCode[KeyCode[\"KeyD\"] = 34] = \"KeyD\";\n KeyCode[KeyCode[\"KeyE\"] = 35] = \"KeyE\";\n KeyCode[KeyCode[\"KeyF\"] = 36] = \"KeyF\";\n KeyCode[KeyCode[\"KeyG\"] = 37] = \"KeyG\";\n KeyCode[KeyCode[\"KeyH\"] = 38] = \"KeyH\";\n KeyCode[KeyCode[\"KeyI\"] = 39] = \"KeyI\";\n KeyCode[KeyCode[\"KeyJ\"] = 40] = \"KeyJ\";\n KeyCode[KeyCode[\"KeyK\"] = 41] = \"KeyK\";\n KeyCode[KeyCode[\"KeyL\"] = 42] = \"KeyL\";\n KeyCode[KeyCode[\"KeyM\"] = 43] = \"KeyM\";\n KeyCode[KeyCode[\"KeyN\"] = 44] = \"KeyN\";\n KeyCode[KeyCode[\"KeyO\"] = 45] = \"KeyO\";\n KeyCode[KeyCode[\"KeyP\"] = 46] = \"KeyP\";\n KeyCode[KeyCode[\"KeyQ\"] = 47] = \"KeyQ\";\n KeyCode[KeyCode[\"KeyR\"] = 48] = \"KeyR\";\n KeyCode[KeyCode[\"KeyS\"] = 49] = \"KeyS\";\n KeyCode[KeyCode[\"KeyT\"] = 50] = \"KeyT\";\n KeyCode[KeyCode[\"KeyU\"] = 51] = \"KeyU\";\n KeyCode[KeyCode[\"KeyV\"] = 52] = \"KeyV\";\n KeyCode[KeyCode[\"KeyW\"] = 53] = \"KeyW\";\n KeyCode[KeyCode[\"KeyX\"] = 54] = \"KeyX\";\n KeyCode[KeyCode[\"KeyY\"] = 55] = \"KeyY\";\n KeyCode[KeyCode[\"KeyZ\"] = 56] = \"KeyZ\";\n KeyCode[KeyCode[\"Meta\"] = 57] = \"Meta\";\n KeyCode[KeyCode[\"ContextMenu\"] = 58] = \"ContextMenu\";\n KeyCode[KeyCode[\"F1\"] = 59] = \"F1\";\n KeyCode[KeyCode[\"F2\"] = 60] = \"F2\";\n KeyCode[KeyCode[\"F3\"] = 61] = \"F3\";\n KeyCode[KeyCode[\"F4\"] = 62] = \"F4\";\n KeyCode[KeyCode[\"F5\"] = 63] = \"F5\";\n KeyCode[KeyCode[\"F6\"] = 64] = \"F6\";\n KeyCode[KeyCode[\"F7\"] = 65] = \"F7\";\n KeyCode[KeyCode[\"F8\"] = 66] = \"F8\";\n KeyCode[KeyCode[\"F9\"] = 67] = \"F9\";\n KeyCode[KeyCode[\"F10\"] = 68] = \"F10\";\n KeyCode[KeyCode[\"F11\"] = 69] = \"F11\";\n KeyCode[KeyCode[\"F12\"] = 70] = \"F12\";\n KeyCode[KeyCode[\"F13\"] = 71] = \"F13\";\n KeyCode[KeyCode[\"F14\"] = 72] = \"F14\";\n KeyCode[KeyCode[\"F15\"] = 73] = \"F15\";\n KeyCode[KeyCode[\"F16\"] = 74] = \"F16\";\n KeyCode[KeyCode[\"F17\"] = 75] = \"F17\";\n KeyCode[KeyCode[\"F18\"] = 76] = \"F18\";\n KeyCode[KeyCode[\"F19\"] = 77] = \"F19\";\n KeyCode[KeyCode[\"F20\"] = 78] = \"F20\";\n KeyCode[KeyCode[\"F21\"] = 79] = \"F21\";\n KeyCode[KeyCode[\"F22\"] = 80] = \"F22\";\n KeyCode[KeyCode[\"F23\"] = 81] = \"F23\";\n KeyCode[KeyCode[\"F24\"] = 82] = \"F24\";\n KeyCode[KeyCode[\"NumLock\"] = 83] = \"NumLock\";\n KeyCode[KeyCode[\"ScrollLock\"] = 84] = \"ScrollLock\";\n /**\n * Used for miscellaneous characters; it can vary by keyboard.\n * For the US standard keyboard, the ';:' key\n */\n KeyCode[KeyCode[\"Semicolon\"] = 85] = \"Semicolon\";\n /**\n * For any country/region, the '+' key\n * For the US standard keyboard, the '=+' key\n */\n KeyCode[KeyCode[\"Equal\"] = 86] = \"Equal\";\n /**\n * For any country/region, the ',' key\n * For the US standard keyboard, the ',<' key\n */\n KeyCode[KeyCode[\"Comma\"] = 87] = \"Comma\";\n /**\n * For any country/region, the '-' key\n * For the US standard keyboard, the '-_' key\n */\n KeyCode[KeyCode[\"Minus\"] = 88] = \"Minus\";\n /**\n * For any country/region, the '.' key\n * For the US standard keyboard, the '.>' key\n */\n KeyCode[KeyCode[\"Period\"] = 89] = \"Period\";\n /**\n * Used for miscellaneous characters; it can vary by keyboard.\n * For the US standard keyboard, the '/?' key\n */\n KeyCode[KeyCode[\"Slash\"] = 90] = \"Slash\";\n /**\n * Used for miscellaneous characters; it can vary by keyboard.\n * For the US standard keyboard, the '`~' key\n */\n KeyCode[KeyCode[\"Backquote\"] = 91] = \"Backquote\";\n /**\n * Used for miscellaneous characters; it can vary by keyboard.\n * For the US standard keyboard, the '[{' key\n */\n KeyCode[KeyCode[\"BracketLeft\"] = 92] = \"BracketLeft\";\n /**\n * Used for miscellaneous characters; it can vary by keyboard.\n * For the US standard keyboard, the '\\|' key\n */\n KeyCode[KeyCode[\"Backslash\"] = 93] = \"Backslash\";\n /**\n * Used for miscellaneous characters; it can vary by keyboard.\n * For the US standard keyboard, the ']}' key\n */\n KeyCode[KeyCode[\"BracketRight\"] = 94] = \"BracketRight\";\n /**\n * Used for miscellaneous characters; it can vary by keyboard.\n * For the US standard keyboard, the ''\"' key\n */\n KeyCode[KeyCode[\"Quote\"] = 95] = \"Quote\";\n /**\n * Used for miscellaneous characters; it can vary by keyboard.\n */\n KeyCode[KeyCode[\"OEM_8\"] = 96] = \"OEM_8\";\n /**\n * Either the angle bracket key or the backslash key on the RT 102-key keyboard.\n */\n KeyCode[KeyCode[\"IntlBackslash\"] = 97] = \"IntlBackslash\";\n KeyCode[KeyCode[\"Numpad0\"] = 98] = \"Numpad0\";\n KeyCode[KeyCode[\"Numpad1\"] = 99] = \"Numpad1\";\n KeyCode[KeyCode[\"Numpad2\"] = 100] = \"Numpad2\";\n KeyCode[KeyCode[\"Numpad3\"] = 101] = \"Numpad3\";\n KeyCode[KeyCode[\"Numpad4\"] = 102] = \"Numpad4\";\n KeyCode[KeyCode[\"Numpad5\"] = 103] = \"Numpad5\";\n KeyCode[KeyCode[\"Numpad6\"] = 104] = \"Numpad6\";\n KeyCode[KeyCode[\"Numpad7\"] = 105] = \"Numpad7\";\n KeyCode[KeyCode[\"Numpad8\"] = 106] = \"Numpad8\";\n KeyCode[KeyCode[\"Numpad9\"] = 107] = \"Numpad9\";\n KeyCode[KeyCode[\"NumpadMultiply\"] = 108] = \"NumpadMultiply\";\n KeyCode[KeyCode[\"NumpadAdd\"] = 109] = \"NumpadAdd\";\n KeyCode[KeyCode[\"NUMPAD_SEPARATOR\"] = 110] = \"NUMPAD_SEPARATOR\";\n KeyCode[KeyCode[\"NumpadSubtract\"] = 111] = \"NumpadSubtract\";\n KeyCode[KeyCode[\"NumpadDecimal\"] = 112] = \"NumpadDecimal\";\n KeyCode[KeyCode[\"NumpadDivide\"] = 113] = \"NumpadDivide\";\n /**\n * Cover all key codes when IME is processing input.\n */\n KeyCode[KeyCode[\"KEY_IN_COMPOSITION\"] = 114] = \"KEY_IN_COMPOSITION\";\n KeyCode[KeyCode[\"ABNT_C1\"] = 115] = \"ABNT_C1\";\n KeyCode[KeyCode[\"ABNT_C2\"] = 116] = \"ABNT_C2\";\n KeyCode[KeyCode[\"AudioVolumeMute\"] = 117] = \"AudioVolumeMute\";\n KeyCode[KeyCode[\"AudioVolumeUp\"] = 118] = \"AudioVolumeUp\";\n KeyCode[KeyCode[\"AudioVolumeDown\"] = 119] = \"AudioVolumeDown\";\n KeyCode[KeyCode[\"BrowserSearch\"] = 120] = \"BrowserSearch\";\n KeyCode[KeyCode[\"BrowserHome\"] = 121] = \"BrowserHome\";\n KeyCode[KeyCode[\"BrowserBack\"] = 122] = \"BrowserBack\";\n KeyCode[KeyCode[\"BrowserForward\"] = 123] = \"BrowserForward\";\n KeyCode[KeyCode[\"MediaTrackNext\"] = 124] = \"MediaTrackNext\";\n KeyCode[KeyCode[\"MediaTrackPrevious\"] = 125] = \"MediaTrackPrevious\";\n KeyCode[KeyCode[\"MediaStop\"] = 126] = \"MediaStop\";\n KeyCode[KeyCode[\"MediaPlayPause\"] = 127] = \"MediaPlayPause\";\n KeyCode[KeyCode[\"LaunchMediaPlayer\"] = 128] = \"LaunchMediaPlayer\";\n KeyCode[KeyCode[\"LaunchMail\"] = 129] = \"LaunchMail\";\n KeyCode[KeyCode[\"LaunchApp2\"] = 130] = \"LaunchApp2\";\n /**\n * VK_CLEAR, 0x0C, CLEAR key\n */\n KeyCode[KeyCode[\"Clear\"] = 131] = \"Clear\";\n /**\n * Placed last to cover the length of the enum.\n * Please do not depend on this value!\n */\n KeyCode[KeyCode[\"MAX_VALUE\"] = 132] = \"MAX_VALUE\";\n})(KeyCode || (KeyCode = {}));\nexport var MarkerSeverity;\n(function (MarkerSeverity) {\n MarkerSeverity[MarkerSeverity[\"Hint\"] = 1] = \"Hint\";\n MarkerSeverity[MarkerSeverity[\"Info\"] = 2] = \"Info\";\n MarkerSeverity[MarkerSeverity[\"Warning\"] = 4] = \"Warning\";\n MarkerSeverity[MarkerSeverity[\"Error\"] = 8] = \"Error\";\n})(MarkerSeverity || (MarkerSeverity = {}));\nexport var MarkerTag;\n(function (MarkerTag) {\n MarkerTag[MarkerTag[\"Unnecessary\"] = 1] = \"Unnecessary\";\n MarkerTag[MarkerTag[\"Deprecated\"] = 2] = \"Deprecated\";\n})(MarkerTag || (MarkerTag = {}));\n/**\n * Position in the minimap to render the decoration.\n */\nexport var MinimapPosition;\n(function (MinimapPosition) {\n MinimapPosition[MinimapPosition[\"Inline\"] = 1] = \"Inline\";\n MinimapPosition[MinimapPosition[\"Gutter\"] = 2] = \"Gutter\";\n})(MinimapPosition || (MinimapPosition = {}));\n/**\n * Type of hit element with the mouse in the editor.\n */\nexport var MouseTargetType;\n(function (MouseTargetType) {\n /**\n * Mouse is on top of an unknown element.\n */\n MouseTargetType[MouseTargetType[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n /**\n * Mouse is on top of the textarea used for input.\n */\n MouseTargetType[MouseTargetType[\"TEXTAREA\"] = 1] = \"TEXTAREA\";\n /**\n * Mouse is on top of the glyph margin\n */\n MouseTargetType[MouseTargetType[\"GUTTER_GLYPH_MARGIN\"] = 2] = \"GUTTER_GLYPH_MARGIN\";\n /**\n * Mouse is on top of the line numbers\n */\n MouseTargetType[MouseTargetType[\"GUTTER_LINE_NUMBERS\"] = 3] = \"GUTTER_LINE_NUMBERS\";\n /**\n * Mouse is on top of the line decorations\n */\n MouseTargetType[MouseTargetType[\"GUTTER_LINE_DECORATIONS\"] = 4] = \"GUTTER_LINE_DECORATIONS\";\n /**\n * Mouse is on top of the whitespace left in the gutter by a view zone.\n */\n MouseTargetType[MouseTargetType[\"GUTTER_VIEW_ZONE\"] = 5] = \"GUTTER_VIEW_ZONE\";\n /**\n * Mouse is on top of text in the content.\n */\n MouseTargetType[MouseTargetType[\"CONTENT_TEXT\"] = 6] = \"CONTENT_TEXT\";\n /**\n * Mouse is on top of empty space in the content (e.g. after line text or below last line)\n */\n MouseTargetType[MouseTargetType[\"CONTENT_EMPTY\"] = 7] = \"CONTENT_EMPTY\";\n /**\n * Mouse is on top of a view zone in the content.\n */\n MouseTargetType[MouseTargetType[\"CONTENT_VIEW_ZONE\"] = 8] = \"CONTENT_VIEW_ZONE\";\n /**\n * Mouse is on top of a content widget.\n */\n MouseTargetType[MouseTargetType[\"CONTENT_WIDGET\"] = 9] = \"CONTENT_WIDGET\";\n /**\n * Mouse is on top of the decorations overview ruler.\n */\n MouseTargetType[MouseTargetType[\"OVERVIEW_RULER\"] = 10] = \"OVERVIEW_RULER\";\n /**\n * Mouse is on top of a scrollbar.\n */\n MouseTargetType[MouseTargetType[\"SCROLLBAR\"] = 11] = \"SCROLLBAR\";\n /**\n * Mouse is on top of an overlay widget.\n */\n MouseTargetType[MouseTargetType[\"OVERLAY_WIDGET\"] = 12] = \"OVERLAY_WIDGET\";\n /**\n * Mouse is outside of the editor.\n */\n MouseTargetType[MouseTargetType[\"OUTSIDE_EDITOR\"] = 13] = \"OUTSIDE_EDITOR\";\n})(MouseTargetType || (MouseTargetType = {}));\n/**\n * A positioning preference for rendering overlay widgets.\n */\nexport var OverlayWidgetPositionPreference;\n(function (OverlayWidgetPositionPreference) {\n /**\n * Position the overlay widget in the top right corner\n */\n OverlayWidgetPositionPreference[OverlayWidgetPositionPreference[\"TOP_RIGHT_CORNER\"] = 0] = \"TOP_RIGHT_CORNER\";\n /**\n * Position the overlay widget in the bottom right corner\n */\n OverlayWidgetPositionPreference[OverlayWidgetPositionPreference[\"BOTTOM_RIGHT_CORNER\"] = 1] = \"BOTTOM_RIGHT_CORNER\";\n /**\n * Position the overlay widget in the top center\n */\n OverlayWidgetPositionPreference[OverlayWidgetPositionPreference[\"TOP_CENTER\"] = 2] = \"TOP_CENTER\";\n})(OverlayWidgetPositionPreference || (OverlayWidgetPositionPreference = {}));\n/**\n * Vertical Lane in the overview ruler of the editor.\n */\nexport var OverviewRulerLane;\n(function (OverviewRulerLane) {\n OverviewRulerLane[OverviewRulerLane[\"Left\"] = 1] = \"Left\";\n OverviewRulerLane[OverviewRulerLane[\"Center\"] = 2] = \"Center\";\n OverviewRulerLane[OverviewRulerLane[\"Right\"] = 4] = \"Right\";\n OverviewRulerLane[OverviewRulerLane[\"Full\"] = 7] = \"Full\";\n})(OverviewRulerLane || (OverviewRulerLane = {}));\nexport var PositionAffinity;\n(function (PositionAffinity) {\n /**\n * Prefers the left most position.\n */\n PositionAffinity[PositionAffinity[\"Left\"] = 0] = \"Left\";\n /**\n * Prefers the right most position.\n */\n PositionAffinity[PositionAffinity[\"Right\"] = 1] = \"Right\";\n /**\n * No preference.\n */\n PositionAffinity[PositionAffinity[\"None\"] = 2] = \"None\";\n /**\n * If the given position is on injected text, prefers the position left of it.\n */\n PositionAffinity[PositionAffinity[\"LeftOfInjectedText\"] = 3] = \"LeftOfInjectedText\";\n /**\n * If the given position is on injected text, prefers the position right of it.\n */\n PositionAffinity[PositionAffinity[\"RightOfInjectedText\"] = 4] = \"RightOfInjectedText\";\n})(PositionAffinity || (PositionAffinity = {}));\nexport var RenderLineNumbersType;\n(function (RenderLineNumbersType) {\n RenderLineNumbersType[RenderLineNumbersType[\"Off\"] = 0] = \"Off\";\n RenderLineNumbersType[RenderLineNumbersType[\"On\"] = 1] = \"On\";\n RenderLineNumbersType[RenderLineNumbersType[\"Relative\"] = 2] = \"Relative\";\n RenderLineNumbersType[RenderLineNumbersType[\"Interval\"] = 3] = \"Interval\";\n RenderLineNumbersType[RenderLineNumbersType[\"Custom\"] = 4] = \"Custom\";\n})(RenderLineNumbersType || (RenderLineNumbersType = {}));\nexport var RenderMinimap;\n(function (RenderMinimap) {\n RenderMinimap[RenderMinimap[\"None\"] = 0] = \"None\";\n RenderMinimap[RenderMinimap[\"Text\"] = 1] = \"Text\";\n RenderMinimap[RenderMinimap[\"Blocks\"] = 2] = \"Blocks\";\n})(RenderMinimap || (RenderMinimap = {}));\nexport var ScrollType;\n(function (ScrollType) {\n ScrollType[ScrollType[\"Smooth\"] = 0] = \"Smooth\";\n ScrollType[ScrollType[\"Immediate\"] = 1] = \"Immediate\";\n})(ScrollType || (ScrollType = {}));\nexport var ScrollbarVisibility;\n(function (ScrollbarVisibility) {\n ScrollbarVisibility[ScrollbarVisibility[\"Auto\"] = 1] = \"Auto\";\n ScrollbarVisibility[ScrollbarVisibility[\"Hidden\"] = 2] = \"Hidden\";\n ScrollbarVisibility[ScrollbarVisibility[\"Visible\"] = 3] = \"Visible\";\n})(ScrollbarVisibility || (ScrollbarVisibility = {}));\n/**\n * The direction of a selection.\n */\nexport var SelectionDirection;\n(function (SelectionDirection) {\n /**\n * The selection starts above where it ends.\n */\n SelectionDirection[SelectionDirection[\"LTR\"] = 0] = \"LTR\";\n /**\n * The selection starts below where it ends.\n */\n SelectionDirection[SelectionDirection[\"RTL\"] = 1] = \"RTL\";\n})(SelectionDirection || (SelectionDirection = {}));\nexport var ShowLightbulbIconMode;\n(function (ShowLightbulbIconMode) {\n ShowLightbulbIconMode[\"Off\"] = \"off\";\n ShowLightbulbIconMode[\"OnCode\"] = \"onCode\";\n ShowLightbulbIconMode[\"On\"] = \"on\";\n})(ShowLightbulbIconMode || (ShowLightbulbIconMode = {}));\nexport var SignatureHelpTriggerKind;\n(function (SignatureHelpTriggerKind) {\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"Invoke\"] = 1] = \"Invoke\";\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"TriggerCharacter\"] = 2] = \"TriggerCharacter\";\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"ContentChange\"] = 3] = \"ContentChange\";\n})(SignatureHelpTriggerKind || (SignatureHelpTriggerKind = {}));\n/**\n * A symbol kind.\n */\nexport var SymbolKind;\n(function (SymbolKind) {\n SymbolKind[SymbolKind[\"File\"] = 0] = \"File\";\n SymbolKind[SymbolKind[\"Module\"] = 1] = \"Module\";\n SymbolKind[SymbolKind[\"Namespace\"] = 2] = \"Namespace\";\n SymbolKind[SymbolKind[\"Package\"] = 3] = \"Package\";\n SymbolKind[SymbolKind[\"Class\"] = 4] = \"Class\";\n SymbolKind[SymbolKind[\"Method\"] = 5] = \"Method\";\n SymbolKind[SymbolKind[\"Property\"] = 6] = \"Property\";\n SymbolKind[SymbolKind[\"Field\"] = 7] = \"Field\";\n SymbolKind[SymbolKind[\"Constructor\"] = 8] = \"Constructor\";\n SymbolKind[SymbolKind[\"Enum\"] = 9] = \"Enum\";\n SymbolKind[SymbolKind[\"Interface\"] = 10] = \"Interface\";\n SymbolKind[SymbolKind[\"Function\"] = 11] = \"Function\";\n SymbolKind[SymbolKind[\"Variable\"] = 12] = \"Variable\";\n SymbolKind[SymbolKind[\"Constant\"] = 13] = \"Constant\";\n SymbolKind[SymbolKind[\"String\"] = 14] = \"String\";\n SymbolKind[SymbolKind[\"Number\"] = 15] = \"Number\";\n SymbolKind[SymbolKind[\"Boolean\"] = 16] = \"Boolean\";\n SymbolKind[SymbolKind[\"Array\"] = 17] = \"Array\";\n SymbolKind[SymbolKind[\"Object\"] = 18] = \"Object\";\n SymbolKind[SymbolKind[\"Key\"] = 19] = \"Key\";\n SymbolKind[SymbolKind[\"Null\"] = 20] = \"Null\";\n SymbolKind[SymbolKind[\"EnumMember\"] = 21] = \"EnumMember\";\n SymbolKind[SymbolKind[\"Struct\"] = 22] = \"Struct\";\n SymbolKind[SymbolKind[\"Event\"] = 23] = \"Event\";\n SymbolKind[SymbolKind[\"Operator\"] = 24] = \"Operator\";\n SymbolKind[SymbolKind[\"TypeParameter\"] = 25] = \"TypeParameter\";\n})(SymbolKind || (SymbolKind = {}));\nexport var SymbolTag;\n(function (SymbolTag) {\n SymbolTag[SymbolTag[\"Deprecated\"] = 1] = \"Deprecated\";\n})(SymbolTag || (SymbolTag = {}));\n/**\n * The kind of animation in which the editor's cursor should be rendered.\n */\nexport var TextEditorCursorBlinkingStyle;\n(function (TextEditorCursorBlinkingStyle) {\n /**\n * Hidden\n */\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Hidden\"] = 0] = \"Hidden\";\n /**\n * Blinking\n */\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Blink\"] = 1] = \"Blink\";\n /**\n * Blinking with smooth fading\n */\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Smooth\"] = 2] = \"Smooth\";\n /**\n * Blinking with prolonged filled state and smooth fading\n */\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Phase\"] = 3] = \"Phase\";\n /**\n * Expand collapse animation on the y axis\n */\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Expand\"] = 4] = \"Expand\";\n /**\n * No-Blinking\n */\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Solid\"] = 5] = \"Solid\";\n})(TextEditorCursorBlinkingStyle || (TextEditorCursorBlinkingStyle = {}));\n/**\n * The style in which the editor's cursor should be rendered.\n */\nexport var TextEditorCursorStyle;\n(function (TextEditorCursorStyle) {\n /**\n * As a vertical line (sitting between two characters).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"Line\"] = 1] = \"Line\";\n /**\n * As a block (sitting on top of a character).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"Block\"] = 2] = \"Block\";\n /**\n * As a horizontal line (sitting under a character).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"Underline\"] = 3] = \"Underline\";\n /**\n * As a thin vertical line (sitting between two characters).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"LineThin\"] = 4] = \"LineThin\";\n /**\n * As an outlined block (sitting on top of a character).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"BlockOutline\"] = 5] = \"BlockOutline\";\n /**\n * As a thin horizontal line (sitting under a character).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"UnderlineThin\"] = 6] = \"UnderlineThin\";\n})(TextEditorCursorStyle || (TextEditorCursorStyle = {}));\n/**\n * Describes the behavior of decorations when typing/editing near their edges.\n * Note: Please do not edit the values, as they very carefully match `DecorationRangeBehavior`\n */\nexport var TrackedRangeStickiness;\n(function (TrackedRangeStickiness) {\n TrackedRangeStickiness[TrackedRangeStickiness[\"AlwaysGrowsWhenTypingAtEdges\"] = 0] = \"AlwaysGrowsWhenTypingAtEdges\";\n TrackedRangeStickiness[TrackedRangeStickiness[\"NeverGrowsWhenTypingAtEdges\"] = 1] = \"NeverGrowsWhenTypingAtEdges\";\n TrackedRangeStickiness[TrackedRangeStickiness[\"GrowsOnlyWhenTypingBefore\"] = 2] = \"GrowsOnlyWhenTypingBefore\";\n TrackedRangeStickiness[TrackedRangeStickiness[\"GrowsOnlyWhenTypingAfter\"] = 3] = \"GrowsOnlyWhenTypingAfter\";\n})(TrackedRangeStickiness || (TrackedRangeStickiness = {}));\n/**\n * Describes how to indent wrapped lines.\n */\nexport var WrappingIndent;\n(function (WrappingIndent) {\n /**\n * No indentation => wrapped lines begin at column 1.\n */\n WrappingIndent[WrappingIndent[\"None\"] = 0] = \"None\";\n /**\n * Same => wrapped lines get the same indentation as the parent.\n */\n WrappingIndent[WrappingIndent[\"Same\"] = 1] = \"Same\";\n /**\n * Indent => wrapped lines get +1 indentation toward the parent.\n */\n WrappingIndent[WrappingIndent[\"Indent\"] = 2] = \"Indent\";\n /**\n * DeepIndent => wrapped lines get +2 indentation toward the parent.\n */\n WrappingIndent[WrappingIndent[\"DeepIndent\"] = 3] = \"DeepIndent\";\n})(WrappingIndent || (WrappingIndent = {}));\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { CancellationTokenSource } from '../../../base/common/cancellation.js';\nimport { Emitter } from '../../../base/common/event.js';\nimport { KeyChord } from '../../../base/common/keyCodes.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { Position } from '../core/position.js';\nimport { Range } from '../core/range.js';\nimport { Selection } from '../core/selection.js';\nimport { Token } from '../languages.js';\nimport * as standaloneEnums from '../standalone/standaloneEnums.js';\nexport class KeyMod {\n static chord(firstPart, secondPart) {\n return KeyChord(firstPart, secondPart);\n }\n}\nKeyMod.CtrlCmd = 2048 /* ConstKeyMod.CtrlCmd */;\nKeyMod.Shift = 1024 /* ConstKeyMod.Shift */;\nKeyMod.Alt = 512 /* ConstKeyMod.Alt */;\nKeyMod.WinCtrl = 256 /* ConstKeyMod.WinCtrl */;\nexport function createMonacoBaseAPI() {\n return {\n editor: undefined, // undefined override expected here\n languages: undefined, // undefined override expected here\n CancellationTokenSource: CancellationTokenSource,\n Emitter: Emitter,\n KeyCode: standaloneEnums.KeyCode,\n KeyMod: KeyMod,\n Position: Position,\n Range: Range,\n Selection: Selection,\n SelectionDirection: standaloneEnums.SelectionDirection,\n MarkerSeverity: standaloneEnums.MarkerSeverity,\n MarkerTag: standaloneEnums.MarkerTag,\n Uri: URI,\n Token: Token\n };\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport function ensureCodeWindow(targetWindow, fallbackWindowId) {\n const codeWindow = targetWindow;\n if (typeof codeWindow.vscodeWindowId !== 'number') {\n Object.defineProperty(codeWindow, 'vscodeWindowId', {\n get: () => fallbackWindowId\n });\n }\n}\n// eslint-disable-next-line no-restricted-globals\nexport const mainWindow = window;\n/**\n * @deprecated to support multi-window scenarios, use `DOM.mainWindow`\n * if you target the main global window or use helpers such as `DOM.getWindow()`\n * or `DOM.getActiveWindow()` to obtain the correct window for the context you are in.\n */\nexport const $window = mainWindow;\n", "/**\n * Uses a LRU cache to make a given parametrized function cached.\n * Caches just the last value.\n * The key must be JSON serializable.\n*/\nexport class LRUCachedFunction {\n constructor(fn) {\n this.fn = fn;\n this.lastCache = undefined;\n this.lastArgKey = undefined;\n }\n get(arg) {\n const key = JSON.stringify(arg);\n if (this.lastArgKey !== key) {\n this.lastArgKey = key;\n this.lastCache = this.fn(arg);\n }\n return this.lastCache;\n }\n}\n/**\n * Uses an unbounded cache (referential equality) to memoize the results of the given function.\n*/\nexport class CachedFunction {\n get cachedValues() {\n return this._map;\n }\n constructor(fn) {\n this.fn = fn;\n this._map = new Map();\n }\n get(arg) {\n if (this._map.has(arg)) {\n return this._map.get(arg);\n }\n const value = this.fn(arg);\n this._map.set(arg, value);\n return value;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport class Lazy {\n constructor(executor) {\n this.executor = executor;\n this._didRun = false;\n }\n /**\n * Get the wrapped value.\n *\n * This will force evaluation of the lazy value if it has not been resolved yet. Lazy values are only\n * resolved once. `getValue` will re-throw exceptions that are hit while resolving the value\n */\n get value() {\n if (!this._didRun) {\n try {\n this._value = this.executor();\n }\n catch (err) {\n this._error = err;\n }\n finally {\n this._didRun = true;\n }\n }\n if (this._error) {\n throw this._error;\n }\n return this._value;\n }\n /**\n * Get the wrapped value without forcing evaluation.\n */\n get rawValue() { return this._value; }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar _a;\nimport { LRUCachedFunction } from './cache.js';\nimport { Lazy } from './lazy.js';\nexport function isFalsyOrWhitespace(str) {\n if (!str || typeof str !== 'string') {\n return true;\n }\n return str.trim().length === 0;\n}\nconst _formatRegexp = /{(\\d+)}/g;\n/**\n * Helper to produce a string with a variable number of arguments. Insert variable segments\n * into the string using the {n} notation where N is the index of the argument following the string.\n * @param value string to which formatting is applied\n * @param args replacements for {n}-entries\n */\nexport function format(value, ...args) {\n if (args.length === 0) {\n return value;\n }\n return value.replace(_formatRegexp, function (match, group) {\n const idx = parseInt(group, 10);\n return isNaN(idx) || idx < 0 || idx >= args.length ?\n match :\n args[idx];\n });\n}\n/**\n * Encodes the given value so that it can be used as literal value in html attributes.\n *\n * In other words, computes `$val`, such that `attr` in `
` has the runtime value `value`.\n * This prevents XSS injection.\n */\nexport function htmlAttributeEncodeValue(value) {\n return value.replace(/[<>\"'&]/g, ch => {\n switch (ch) {\n case '<': return '<';\n case '>': return '>';\n case '\"': return '"';\n case '\\'': return ''';\n case '&': return '&';\n }\n return ch;\n });\n}\n/**\n * Converts HTML characters inside the string to use entities instead. Makes the string safe from\n * being used e.g. in HTMLElement.innerHTML.\n */\nexport function escape(html) {\n return html.replace(/[<>&]/g, function (match) {\n switch (match) {\n case '<': return '<';\n case '>': return '>';\n case '&': return '&';\n default: return match;\n }\n });\n}\n/**\n * Escapes regular expression characters in a given string\n */\nexport function escapeRegExpCharacters(value) {\n return value.replace(/[\\\\\\{\\}\\*\\+\\?\\|\\^\\$\\.\\[\\]\\(\\)]/g, '\\\\$&');\n}\n/**\n * Removes all occurrences of needle from the beginning and end of haystack.\n * @param haystack string to trim\n * @param needle the thing to trim (default is a blank)\n */\nexport function trim(haystack, needle = ' ') {\n const trimmed = ltrim(haystack, needle);\n return rtrim(trimmed, needle);\n}\n/**\n * Removes all occurrences of needle from the beginning of haystack.\n * @param haystack string to trim\n * @param needle the thing to trim\n */\nexport function ltrim(haystack, needle) {\n if (!haystack || !needle) {\n return haystack;\n }\n const needleLen = needle.length;\n if (needleLen === 0 || haystack.length === 0) {\n return haystack;\n }\n let offset = 0;\n while (haystack.indexOf(needle, offset) === offset) {\n offset = offset + needleLen;\n }\n return haystack.substring(offset);\n}\n/**\n * Removes all occurrences of needle from the end of haystack.\n * @param haystack string to trim\n * @param needle the thing to trim\n */\nexport function rtrim(haystack, needle) {\n if (!haystack || !needle) {\n return haystack;\n }\n const needleLen = needle.length, haystackLen = haystack.length;\n if (needleLen === 0 || haystackLen === 0) {\n return haystack;\n }\n let offset = haystackLen, idx = -1;\n while (true) {\n idx = haystack.lastIndexOf(needle, offset - 1);\n if (idx === -1 || idx + needleLen !== offset) {\n break;\n }\n if (idx === 0) {\n return '';\n }\n offset = idx;\n }\n return haystack.substring(0, offset);\n}\nexport function convertSimple2RegExpPattern(pattern) {\n return pattern.replace(/[\\-\\\\\\{\\}\\+\\?\\|\\^\\$\\.\\,\\[\\]\\(\\)\\#\\s]/g, '\\\\$&').replace(/[\\*]/g, '.*');\n}\nexport function stripWildcards(pattern) {\n return pattern.replace(/\\*/g, '');\n}\nexport function createRegExp(searchString, isRegex, options = {}) {\n if (!searchString) {\n throw new Error('Cannot create regex from empty string');\n }\n if (!isRegex) {\n searchString = escapeRegExpCharacters(searchString);\n }\n if (options.wholeWord) {\n if (!/\\B/.test(searchString.charAt(0))) {\n searchString = '\\\\b' + searchString;\n }\n if (!/\\B/.test(searchString.charAt(searchString.length - 1))) {\n searchString = searchString + '\\\\b';\n }\n }\n let modifiers = '';\n if (options.global) {\n modifiers += 'g';\n }\n if (!options.matchCase) {\n modifiers += 'i';\n }\n if (options.multiline) {\n modifiers += 'm';\n }\n if (options.unicode) {\n modifiers += 'u';\n }\n return new RegExp(searchString, modifiers);\n}\nexport function regExpLeadsToEndlessLoop(regexp) {\n // Exit early if it's one of these special cases which are meant to match\n // against an empty string\n if (regexp.source === '^' || regexp.source === '^$' || regexp.source === '$' || regexp.source === '^\\\\s*$') {\n return false;\n }\n // We check against an empty string. If the regular expression doesn't advance\n // (e.g. ends in an endless loop) it will match an empty string.\n const match = regexp.exec('');\n return !!(match && regexp.lastIndex === 0);\n}\nexport function splitLines(str) {\n return str.split(/\\r\\n|\\r|\\n/);\n}\n/**\n * Returns first index of the string that is not whitespace.\n * If string is empty or contains only whitespaces, returns -1\n */\nexport function firstNonWhitespaceIndex(str) {\n for (let i = 0, len = str.length; i < len; i++) {\n const chCode = str.charCodeAt(i);\n if (chCode !== 32 /* CharCode.Space */ && chCode !== 9 /* CharCode.Tab */) {\n return i;\n }\n }\n return -1;\n}\n/**\n * Returns the leading whitespace of the string.\n * If the string contains only whitespaces, returns entire string\n */\nexport function getLeadingWhitespace(str, start = 0, end = str.length) {\n for (let i = start; i < end; i++) {\n const chCode = str.charCodeAt(i);\n if (chCode !== 32 /* CharCode.Space */ && chCode !== 9 /* CharCode.Tab */) {\n return str.substring(start, i);\n }\n }\n return str.substring(start, end);\n}\n/**\n * Returns last index of the string that is not whitespace.\n * If string is empty or contains only whitespaces, returns -1\n */\nexport function lastNonWhitespaceIndex(str, startIndex = str.length - 1) {\n for (let i = startIndex; i >= 0; i--) {\n const chCode = str.charCodeAt(i);\n if (chCode !== 32 /* CharCode.Space */ && chCode !== 9 /* CharCode.Tab */) {\n return i;\n }\n }\n return -1;\n}\nexport function compare(a, b) {\n if (a < b) {\n return -1;\n }\n else if (a > b) {\n return 1;\n }\n else {\n return 0;\n }\n}\nexport function compareSubstring(a, b, aStart = 0, aEnd = a.length, bStart = 0, bEnd = b.length) {\n for (; aStart < aEnd && bStart < bEnd; aStart++, bStart++) {\n const codeA = a.charCodeAt(aStart);\n const codeB = b.charCodeAt(bStart);\n if (codeA < codeB) {\n return -1;\n }\n else if (codeA > codeB) {\n return 1;\n }\n }\n const aLen = aEnd - aStart;\n const bLen = bEnd - bStart;\n if (aLen < bLen) {\n return -1;\n }\n else if (aLen > bLen) {\n return 1;\n }\n return 0;\n}\nexport function compareIgnoreCase(a, b) {\n return compareSubstringIgnoreCase(a, b, 0, a.length, 0, b.length);\n}\nexport function compareSubstringIgnoreCase(a, b, aStart = 0, aEnd = a.length, bStart = 0, bEnd = b.length) {\n for (; aStart < aEnd && bStart < bEnd; aStart++, bStart++) {\n let codeA = a.charCodeAt(aStart);\n let codeB = b.charCodeAt(bStart);\n if (codeA === codeB) {\n // equal\n continue;\n }\n if (codeA >= 128 || codeB >= 128) {\n // not ASCII letters -> fallback to lower-casing strings\n return compareSubstring(a.toLowerCase(), b.toLowerCase(), aStart, aEnd, bStart, bEnd);\n }\n // mapper lower-case ascii letter onto upper-case varinats\n // [97-122] (lower ascii) --> [65-90] (upper ascii)\n if (isLowerAsciiLetter(codeA)) {\n codeA -= 32;\n }\n if (isLowerAsciiLetter(codeB)) {\n codeB -= 32;\n }\n // compare both code points\n const diff = codeA - codeB;\n if (diff === 0) {\n continue;\n }\n return diff;\n }\n const aLen = aEnd - aStart;\n const bLen = bEnd - bStart;\n if (aLen < bLen) {\n return -1;\n }\n else if (aLen > bLen) {\n return 1;\n }\n return 0;\n}\nexport function isAsciiDigit(code) {\n return code >= 48 /* CharCode.Digit0 */ && code <= 57 /* CharCode.Digit9 */;\n}\nexport function isLowerAsciiLetter(code) {\n return code >= 97 /* CharCode.a */ && code <= 122 /* CharCode.z */;\n}\nexport function isUpperAsciiLetter(code) {\n return code >= 65 /* CharCode.A */ && code <= 90 /* CharCode.Z */;\n}\nexport function equalsIgnoreCase(a, b) {\n return a.length === b.length && compareSubstringIgnoreCase(a, b) === 0;\n}\nexport function startsWithIgnoreCase(str, candidate) {\n const candidateLength = candidate.length;\n if (candidate.length > str.length) {\n return false;\n }\n return compareSubstringIgnoreCase(str, candidate, 0, candidateLength) === 0;\n}\n/**\n * @returns the length of the common prefix of the two strings.\n */\nexport function commonPrefixLength(a, b) {\n const len = Math.min(a.length, b.length);\n let i;\n for (i = 0; i < len; i++) {\n if (a.charCodeAt(i) !== b.charCodeAt(i)) {\n return i;\n }\n }\n return len;\n}\n/**\n * @returns the length of the common suffix of the two strings.\n */\nexport function commonSuffixLength(a, b) {\n const len = Math.min(a.length, b.length);\n let i;\n const aLastIndex = a.length - 1;\n const bLastIndex = b.length - 1;\n for (i = 0; i < len; i++) {\n if (a.charCodeAt(aLastIndex - i) !== b.charCodeAt(bLastIndex - i)) {\n return i;\n }\n }\n return len;\n}\n/**\n * See http://en.wikipedia.org/wiki/Surrogate_pair\n */\nexport function isHighSurrogate(charCode) {\n return (0xD800 <= charCode && charCode <= 0xDBFF);\n}\n/**\n * See http://en.wikipedia.org/wiki/Surrogate_pair\n */\nexport function isLowSurrogate(charCode) {\n return (0xDC00 <= charCode && charCode <= 0xDFFF);\n}\n/**\n * See http://en.wikipedia.org/wiki/Surrogate_pair\n */\nexport function computeCodePoint(highSurrogate, lowSurrogate) {\n return ((highSurrogate - 0xD800) << 10) + (lowSurrogate - 0xDC00) + 0x10000;\n}\n/**\n * get the code point that begins at offset `offset`\n */\nexport function getNextCodePoint(str, len, offset) {\n const charCode = str.charCodeAt(offset);\n if (isHighSurrogate(charCode) && offset + 1 < len) {\n const nextCharCode = str.charCodeAt(offset + 1);\n if (isLowSurrogate(nextCharCode)) {\n return computeCodePoint(charCode, nextCharCode);\n }\n }\n return charCode;\n}\n/**\n * get the code point that ends right before offset `offset`\n */\nfunction getPrevCodePoint(str, offset) {\n const charCode = str.charCodeAt(offset - 1);\n if (isLowSurrogate(charCode) && offset > 1) {\n const prevCharCode = str.charCodeAt(offset - 2);\n if (isHighSurrogate(prevCharCode)) {\n return computeCodePoint(prevCharCode, charCode);\n }\n }\n return charCode;\n}\nexport class CodePointIterator {\n get offset() {\n return this._offset;\n }\n constructor(str, offset = 0) {\n this._str = str;\n this._len = str.length;\n this._offset = offset;\n }\n setOffset(offset) {\n this._offset = offset;\n }\n prevCodePoint() {\n const codePoint = getPrevCodePoint(this._str, this._offset);\n this._offset -= (codePoint >= 65536 /* Constants.UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1);\n return codePoint;\n }\n nextCodePoint() {\n const codePoint = getNextCodePoint(this._str, this._len, this._offset);\n this._offset += (codePoint >= 65536 /* Constants.UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1);\n return codePoint;\n }\n eol() {\n return (this._offset >= this._len);\n }\n}\nexport class GraphemeIterator {\n get offset() {\n return this._iterator.offset;\n }\n constructor(str, offset = 0) {\n this._iterator = new CodePointIterator(str, offset);\n }\n nextGraphemeLength() {\n const graphemeBreakTree = GraphemeBreakTree.getInstance();\n const iterator = this._iterator;\n const initialOffset = iterator.offset;\n let graphemeBreakType = graphemeBreakTree.getGraphemeBreakType(iterator.nextCodePoint());\n while (!iterator.eol()) {\n const offset = iterator.offset;\n const nextGraphemeBreakType = graphemeBreakTree.getGraphemeBreakType(iterator.nextCodePoint());\n if (breakBetweenGraphemeBreakType(graphemeBreakType, nextGraphemeBreakType)) {\n // move iterator back\n iterator.setOffset(offset);\n break;\n }\n graphemeBreakType = nextGraphemeBreakType;\n }\n return (iterator.offset - initialOffset);\n }\n prevGraphemeLength() {\n const graphemeBreakTree = GraphemeBreakTree.getInstance();\n const iterator = this._iterator;\n const initialOffset = iterator.offset;\n let graphemeBreakType = graphemeBreakTree.getGraphemeBreakType(iterator.prevCodePoint());\n while (iterator.offset > 0) {\n const offset = iterator.offset;\n const prevGraphemeBreakType = graphemeBreakTree.getGraphemeBreakType(iterator.prevCodePoint());\n if (breakBetweenGraphemeBreakType(prevGraphemeBreakType, graphemeBreakType)) {\n // move iterator back\n iterator.setOffset(offset);\n break;\n }\n graphemeBreakType = prevGraphemeBreakType;\n }\n return (initialOffset - iterator.offset);\n }\n eol() {\n return this._iterator.eol();\n }\n}\nexport function nextCharLength(str, initialOffset) {\n const iterator = new GraphemeIterator(str, initialOffset);\n return iterator.nextGraphemeLength();\n}\nexport function prevCharLength(str, initialOffset) {\n const iterator = new GraphemeIterator(str, initialOffset);\n return iterator.prevGraphemeLength();\n}\nexport function getCharContainingOffset(str, offset) {\n if (offset > 0 && isLowSurrogate(str.charCodeAt(offset))) {\n offset--;\n }\n const endOffset = offset + nextCharLength(str, offset);\n const startOffset = endOffset - prevCharLength(str, endOffset);\n return [startOffset, endOffset];\n}\nlet CONTAINS_RTL = undefined;\nfunction makeContainsRtl() {\n // Generated using https://github.com/alexdima/unicode-utils/blob/main/rtl-test.js\n return /(?:[\\u05BE\\u05C0\\u05C3\\u05C6\\u05D0-\\u05F4\\u0608\\u060B\\u060D\\u061B-\\u064A\\u066D-\\u066F\\u0671-\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1-\\u07EA\\u07F4\\u07F5\\u07FA\\u07FE-\\u0815\\u081A\\u0824\\u0828\\u0830-\\u0858\\u085E-\\u088E\\u08A0-\\u08C9\\u200F\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFD3D\\uFD50-\\uFDC7\\uFDF0-\\uFDFC\\uFE70-\\uFEFC]|\\uD802[\\uDC00-\\uDD1B\\uDD20-\\uDE00\\uDE10-\\uDE35\\uDE40-\\uDEE4\\uDEEB-\\uDF35\\uDF40-\\uDFFF]|\\uD803[\\uDC00-\\uDD23\\uDE80-\\uDEA9\\uDEAD-\\uDF45\\uDF51-\\uDF81\\uDF86-\\uDFF6]|\\uD83A[\\uDC00-\\uDCCF\\uDD00-\\uDD43\\uDD4B-\\uDFFF]|\\uD83B[\\uDC00-\\uDEBB])/;\n}\n/**\n * Returns true if `str` contains any Unicode character that is classified as \"R\" or \"AL\".\n */\nexport function containsRTL(str) {\n if (!CONTAINS_RTL) {\n CONTAINS_RTL = makeContainsRtl();\n }\n return CONTAINS_RTL.test(str);\n}\nconst IS_BASIC_ASCII = /^[\\t\\n\\r\\x20-\\x7E]*$/;\n/**\n * Returns true if `str` contains only basic ASCII characters in the range 32 - 126 (including 32 and 126) or \\n, \\r, \\t\n */\nexport function isBasicASCII(str) {\n return IS_BASIC_ASCII.test(str);\n}\nexport const UNUSUAL_LINE_TERMINATORS = /[\\u2028\\u2029]/; // LINE SEPARATOR (LS) or PARAGRAPH SEPARATOR (PS)\n/**\n * Returns true if `str` contains unusual line terminators, like LS or PS\n */\nexport function containsUnusualLineTerminators(str) {\n return UNUSUAL_LINE_TERMINATORS.test(str);\n}\nexport function isFullWidthCharacter(charCode) {\n // Do a cheap trick to better support wrapping of wide characters, treat them as 2 columns\n // http://jrgraphix.net/research/unicode_blocks.php\n // 2E80 - 2EFF CJK Radicals Supplement\n // 2F00 - 2FDF Kangxi Radicals\n // 2FF0 - 2FFF Ideographic Description Characters\n // 3000 - 303F CJK Symbols and Punctuation\n // 3040 - 309F Hiragana\n // 30A0 - 30FF Katakana\n // 3100 - 312F Bopomofo\n // 3130 - 318F Hangul Compatibility Jamo\n // 3190 - 319F Kanbun\n // 31A0 - 31BF Bopomofo Extended\n // 31F0 - 31FF Katakana Phonetic Extensions\n // 3200 - 32FF Enclosed CJK Letters and Months\n // 3300 - 33FF CJK Compatibility\n // 3400 - 4DBF CJK Unified Ideographs Extension A\n // 4DC0 - 4DFF Yijing Hexagram Symbols\n // 4E00 - 9FFF CJK Unified Ideographs\n // A000 - A48F Yi Syllables\n // A490 - A4CF Yi Radicals\n // AC00 - D7AF Hangul Syllables\n // [IGNORE] D800 - DB7F High Surrogates\n // [IGNORE] DB80 - DBFF High Private Use Surrogates\n // [IGNORE] DC00 - DFFF Low Surrogates\n // [IGNORE] E000 - F8FF Private Use Area\n // F900 - FAFF CJK Compatibility Ideographs\n // [IGNORE] FB00 - FB4F Alphabetic Presentation Forms\n // [IGNORE] FB50 - FDFF Arabic Presentation Forms-A\n // [IGNORE] FE00 - FE0F Variation Selectors\n // [IGNORE] FE20 - FE2F Combining Half Marks\n // [IGNORE] FE30 - FE4F CJK Compatibility Forms\n // [IGNORE] FE50 - FE6F Small Form Variants\n // [IGNORE] FE70 - FEFF Arabic Presentation Forms-B\n // FF00 - FFEF Halfwidth and Fullwidth Forms\n // [https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms]\n // of which FF01 - FF5E fullwidth ASCII of 21 to 7E\n // [IGNORE] and FF65 - FFDC halfwidth of Katakana and Hangul\n // [IGNORE] FFF0 - FFFF Specials\n return ((charCode >= 0x2E80 && charCode <= 0xD7AF)\n || (charCode >= 0xF900 && charCode <= 0xFAFF)\n || (charCode >= 0xFF01 && charCode <= 0xFF5E));\n}\n/**\n * A fast function (therefore imprecise) to check if code points are emojis.\n * Generated using https://github.com/alexdima/unicode-utils/blob/main/emoji-test.js\n */\nexport function isEmojiImprecise(x) {\n return ((x >= 0x1F1E6 && x <= 0x1F1FF) || (x === 8986) || (x === 8987) || (x === 9200)\n || (x === 9203) || (x >= 9728 && x <= 10175) || (x === 11088) || (x === 11093)\n || (x >= 127744 && x <= 128591) || (x >= 128640 && x <= 128764)\n || (x >= 128992 && x <= 129008) || (x >= 129280 && x <= 129535)\n || (x >= 129648 && x <= 129782));\n}\n// -- UTF-8 BOM\nexport const UTF8_BOM_CHARACTER = String.fromCharCode(65279 /* CharCode.UTF8_BOM */);\nexport function startsWithUTF8BOM(str) {\n return !!(str && str.length > 0 && str.charCodeAt(0) === 65279 /* CharCode.UTF8_BOM */);\n}\nexport function containsUppercaseCharacter(target, ignoreEscapedChars = false) {\n if (!target) {\n return false;\n }\n if (ignoreEscapedChars) {\n target = target.replace(/\\\\./g, '');\n }\n return target.toLowerCase() !== target;\n}\n/**\n * Produces 'a'-'z', followed by 'A'-'Z'... followed by 'a'-'z', etc.\n */\nexport function singleLetterHash(n) {\n const LETTERS_CNT = (90 /* CharCode.Z */ - 65 /* CharCode.A */ + 1);\n n = n % (2 * LETTERS_CNT);\n if (n < LETTERS_CNT) {\n return String.fromCharCode(97 /* CharCode.a */ + n);\n }\n return String.fromCharCode(65 /* CharCode.A */ + n - LETTERS_CNT);\n}\nfunction breakBetweenGraphemeBreakType(breakTypeA, breakTypeB) {\n // http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundary_Rules\n // !!! Let's make the common case a bit faster\n if (breakTypeA === 0 /* GraphemeBreakType.Other */) {\n // see https://www.unicode.org/Public/13.0.0/ucd/auxiliary/GraphemeBreakTest-13.0.0d10.html#table\n return (breakTypeB !== 5 /* GraphemeBreakType.Extend */ && breakTypeB !== 7 /* GraphemeBreakType.SpacingMark */);\n }\n // Do not break between a CR and LF. Otherwise, break before and after controls.\n // GB3 CR \u00D7 LF\n // GB4 (Control | CR | LF) \u00F7\n // GB5 \u00F7 (Control | CR | LF)\n if (breakTypeA === 2 /* GraphemeBreakType.CR */) {\n if (breakTypeB === 3 /* GraphemeBreakType.LF */) {\n return false; // GB3\n }\n }\n if (breakTypeA === 4 /* GraphemeBreakType.Control */ || breakTypeA === 2 /* GraphemeBreakType.CR */ || breakTypeA === 3 /* GraphemeBreakType.LF */) {\n return true; // GB4\n }\n if (breakTypeB === 4 /* GraphemeBreakType.Control */ || breakTypeB === 2 /* GraphemeBreakType.CR */ || breakTypeB === 3 /* GraphemeBreakType.LF */) {\n return true; // GB5\n }\n // Do not break Hangul syllable sequences.\n // GB6 L \u00D7 (L | V | LV | LVT)\n // GB7 (LV | V) \u00D7 (V | T)\n // GB8 (LVT | T) \u00D7 T\n if (breakTypeA === 8 /* GraphemeBreakType.L */) {\n if (breakTypeB === 8 /* GraphemeBreakType.L */ || breakTypeB === 9 /* GraphemeBreakType.V */ || breakTypeB === 11 /* GraphemeBreakType.LV */ || breakTypeB === 12 /* GraphemeBreakType.LVT */) {\n return false; // GB6\n }\n }\n if (breakTypeA === 11 /* GraphemeBreakType.LV */ || breakTypeA === 9 /* GraphemeBreakType.V */) {\n if (breakTypeB === 9 /* GraphemeBreakType.V */ || breakTypeB === 10 /* GraphemeBreakType.T */) {\n return false; // GB7\n }\n }\n if (breakTypeA === 12 /* GraphemeBreakType.LVT */ || breakTypeA === 10 /* GraphemeBreakType.T */) {\n if (breakTypeB === 10 /* GraphemeBreakType.T */) {\n return false; // GB8\n }\n }\n // Do not break before extending characters or ZWJ.\n // GB9 \u00D7 (Extend | ZWJ)\n if (breakTypeB === 5 /* GraphemeBreakType.Extend */ || breakTypeB === 13 /* GraphemeBreakType.ZWJ */) {\n return false; // GB9\n }\n // The GB9a and GB9b rules only apply to extended grapheme clusters:\n // Do not break before SpacingMarks, or after Prepend characters.\n // GB9a \u00D7 SpacingMark\n // GB9b Prepend \u00D7\n if (breakTypeB === 7 /* GraphemeBreakType.SpacingMark */) {\n return false; // GB9a\n }\n if (breakTypeA === 1 /* GraphemeBreakType.Prepend */) {\n return false; // GB9b\n }\n // Do not break within emoji modifier sequences or emoji zwj sequences.\n // GB11 \\p{Extended_Pictographic} Extend* ZWJ \u00D7 \\p{Extended_Pictographic}\n if (breakTypeA === 13 /* GraphemeBreakType.ZWJ */ && breakTypeB === 14 /* GraphemeBreakType.Extended_Pictographic */) {\n // Note: we are not implementing the rule entirely here to avoid introducing states\n return false; // GB11\n }\n // GB12 sot (RI RI)* RI \u00D7 RI\n // GB13 [^RI] (RI RI)* RI \u00D7 RI\n if (breakTypeA === 6 /* GraphemeBreakType.Regional_Indicator */ && breakTypeB === 6 /* GraphemeBreakType.Regional_Indicator */) {\n // Note: we are not implementing the rule entirely here to avoid introducing states\n return false; // GB12 & GB13\n }\n // GB999 Any \u00F7 Any\n return true;\n}\nclass GraphemeBreakTree {\n static getInstance() {\n if (!GraphemeBreakTree._INSTANCE) {\n GraphemeBreakTree._INSTANCE = new GraphemeBreakTree();\n }\n return GraphemeBreakTree._INSTANCE;\n }\n constructor() {\n this._data = getGraphemeBreakRawData();\n }\n getGraphemeBreakType(codePoint) {\n // !!! Let's make 7bit ASCII a bit faster: 0..31\n if (codePoint < 32) {\n if (codePoint === 10 /* CharCode.LineFeed */) {\n return 3 /* GraphemeBreakType.LF */;\n }\n if (codePoint === 13 /* CharCode.CarriageReturn */) {\n return 2 /* GraphemeBreakType.CR */;\n }\n return 4 /* GraphemeBreakType.Control */;\n }\n // !!! Let's make 7bit ASCII a bit faster: 32..126\n if (codePoint < 127) {\n return 0 /* GraphemeBreakType.Other */;\n }\n const data = this._data;\n const nodeCount = data.length / 3;\n let nodeIndex = 1;\n while (nodeIndex <= nodeCount) {\n if (codePoint < data[3 * nodeIndex]) {\n // go left\n nodeIndex = 2 * nodeIndex;\n }\n else if (codePoint > data[3 * nodeIndex + 1]) {\n // go right\n nodeIndex = 2 * nodeIndex + 1;\n }\n else {\n // hit\n return data[3 * nodeIndex + 2];\n }\n }\n return 0 /* GraphemeBreakType.Other */;\n }\n}\nGraphemeBreakTree._INSTANCE = null;\nfunction getGraphemeBreakRawData() {\n // generated using https://github.com/alexdima/unicode-utils/blob/main/grapheme-break.js\n return JSON.parse('[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]');\n}\n//#endregion\n/**\n * Computes the offset after performing a left delete on the given string,\n * while considering unicode grapheme/emoji rules.\n*/\nexport function getLeftDeleteOffset(offset, str) {\n if (offset === 0) {\n return 0;\n }\n // Try to delete emoji part.\n const emojiOffset = getOffsetBeforeLastEmojiComponent(offset, str);\n if (emojiOffset !== undefined) {\n return emojiOffset;\n }\n // Otherwise, just skip a single code point.\n const iterator = new CodePointIterator(str, offset);\n iterator.prevCodePoint();\n return iterator.offset;\n}\nfunction getOffsetBeforeLastEmojiComponent(initialOffset, str) {\n // See https://www.unicode.org/reports/tr51/tr51-14.html#EBNF_and_Regex for the\n // structure of emojis.\n const iterator = new CodePointIterator(str, initialOffset);\n let codePoint = iterator.prevCodePoint();\n // Skip modifiers\n while ((isEmojiModifier(codePoint) || codePoint === 65039 /* CodePoint.emojiVariantSelector */ || codePoint === 8419 /* CodePoint.enclosingKeyCap */)) {\n if (iterator.offset === 0) {\n // Cannot skip modifier, no preceding emoji base.\n return undefined;\n }\n codePoint = iterator.prevCodePoint();\n }\n // Expect base emoji\n if (!isEmojiImprecise(codePoint)) {\n // Unexpected code point, not a valid emoji.\n return undefined;\n }\n let resultOffset = iterator.offset;\n if (resultOffset > 0) {\n // Skip optional ZWJ code points that combine multiple emojis.\n // In theory, we should check if that ZWJ actually combines multiple emojis\n // to prevent deleting ZWJs in situations we didn't account for.\n const optionalZwjCodePoint = iterator.prevCodePoint();\n if (optionalZwjCodePoint === 8205 /* CodePoint.zwj */) {\n resultOffset = iterator.offset;\n }\n }\n return resultOffset;\n}\nfunction isEmojiModifier(codePoint) {\n return 0x1F3FB <= codePoint && codePoint <= 0x1F3FF;\n}\nexport const noBreakWhitespace = '\\xa0';\nexport class AmbiguousCharacters {\n static getInstance(locales) {\n return _a.cache.get(Array.from(locales));\n }\n static getLocales() {\n return _a._locales.value;\n }\n constructor(confusableDictionary) {\n this.confusableDictionary = confusableDictionary;\n }\n isAmbiguous(codePoint) {\n return this.confusableDictionary.has(codePoint);\n }\n /**\n * Returns the non basic ASCII code point that the given code point can be confused,\n * or undefined if such code point does note exist.\n */\n getPrimaryConfusable(codePoint) {\n return this.confusableDictionary.get(codePoint);\n }\n getConfusableCodePoints() {\n return new Set(this.confusableDictionary.keys());\n }\n}\n_a = AmbiguousCharacters;\nAmbiguousCharacters.ambiguousCharacterData = new Lazy(() => {\n // Generated using https://github.com/hediet/vscode-unicode-data\n // Stored as key1, value1, key2, value2, ...\n return JSON.parse('{\\\"_common\\\":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],\\\"_default\\\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\\\"cs\\\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\\\"de\\\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\\\"es\\\":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\\\"fr\\\":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\\\"it\\\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\\\"ja\\\":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],\\\"ko\\\":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\\\"pl\\\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\\\"pt-BR\\\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\\\"qps-ploc\\\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\\\"ru\\\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\\\"tr\\\":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\\\"zh-hans\\\":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],\\\"zh-hant\\\":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}');\n});\nAmbiguousCharacters.cache = new LRUCachedFunction((locales) => {\n function arrayToMap(arr) {\n const result = new Map();\n for (let i = 0; i < arr.length; i += 2) {\n result.set(arr[i], arr[i + 1]);\n }\n return result;\n }\n function mergeMaps(map1, map2) {\n const result = new Map(map1);\n for (const [key, value] of map2) {\n result.set(key, value);\n }\n return result;\n }\n function intersectMaps(map1, map2) {\n if (!map1) {\n return map2;\n }\n const result = new Map();\n for (const [key, value] of map1) {\n if (map2.has(key)) {\n result.set(key, value);\n }\n }\n return result;\n }\n const data = _a.ambiguousCharacterData.value;\n let filteredLocales = locales.filter((l) => !l.startsWith('_') && l in data);\n if (filteredLocales.length === 0) {\n filteredLocales = ['_default'];\n }\n let languageSpecificMap = undefined;\n for (const locale of filteredLocales) {\n const map = arrayToMap(data[locale]);\n languageSpecificMap = intersectMaps(languageSpecificMap, map);\n }\n const commonMap = arrayToMap(data['_common']);\n const map = mergeMaps(commonMap, languageSpecificMap);\n return new _a(map);\n});\nAmbiguousCharacters._locales = new Lazy(() => Object.keys(_a.ambiguousCharacterData.value).filter((k) => !k.startsWith('_')));\nexport class InvisibleCharacters {\n static getRawData() {\n // Generated using https://github.com/hediet/vscode-unicode-data\n return JSON.parse('[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]');\n }\n static getData() {\n if (!this._data) {\n this._data = new Set(InvisibleCharacters.getRawData());\n }\n return this._data;\n }\n static isInvisibleCharacter(codePoint) {\n return InvisibleCharacters.getData().has(codePoint);\n }\n static get codePoints() {\n return InvisibleCharacters.getData();\n }\n}\nInvisibleCharacters._data = undefined;\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n/* Default standalone editor fonts */\n.monaco-editor {\n\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe WPC\", \"Segoe UI\", \"HelveticaNeue-Light\", system-ui, \"Ubuntu\", \"Droid Sans\", sans-serif;\n\t--monaco-monospace-font: \"SF Mono\", Monaco, Menlo, Consolas, \"Ubuntu Mono\", \"Liberation Mono\", \"DejaVu Sans Mono\", \"Courier New\", monospace;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label {\n\tstroke-width: 1.2px;\n}\n\n.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n.monaco-editor.hc-light .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\n\tstroke-width: 1.2px;\n}\n\n.monaco-hover p {\n\tmargin: 0;\n}\n\n/* See https://github.com/microsoft/monaco-editor/issues/2168#issuecomment-780078600 */\n.monaco-aria-container {\n\tposition: absolute !important;\n\ttop: 0; /* avoid being placed underneath a sibling element */\n\theight: 1px;\n\twidth: 1px;\n\tmargin: -1px;\n\toverflow: hidden;\n\tpadding: 0;\n\tclip: rect(1px, 1px, 1px, 1px);\n\tclip-path: inset(50%);\n}\n\n.monaco-editor, .monaco-diff-editor .synthetic-focus,\n.monaco-editor, .monaco-diff-editor [tabindex=\"0\"]:focus,\n.monaco-editor, .monaco-diff-editor [tabindex=\"-1\"]:focus,\n.monaco-editor, .monaco-diff-editor button:focus,\n.monaco-editor, .monaco-diff-editor input[type=button]:focus,\n.monaco-editor, .monaco-diff-editor input[type=checkbox]:focus,\n.monaco-editor, .monaco-diff-editor input[type=search]:focus,\n.monaco-editor, .monaco-diff-editor input[type=text]:focus,\n.monaco-editor, .monaco-diff-editor select:focus,\n.monaco-editor, .monaco-diff-editor textarea:focus {\n\toutline-width: 1px;\n\toutline-style: solid;\n\toutline-offset: -1px;\n\toutline-color: var(--vscode-focusBorder);\n\topacity: 1\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { $window, mainWindow } from './window.js';\nimport { Emitter } from '../common/event.js';\nimport { Disposable, markAsSingleton } from '../common/lifecycle.js';\nclass WindowManager {\n constructor() {\n // --- Zoom Factor\n this.mapWindowIdToZoomFactor = new Map();\n }\n getZoomFactor(targetWindow) {\n var _a;\n return (_a = this.mapWindowIdToZoomFactor.get(this.getWindowId(targetWindow))) !== null && _a !== void 0 ? _a : 1;\n }\n getWindowId(targetWindow) {\n return targetWindow.vscodeWindowId;\n }\n}\nWindowManager.INSTANCE = new WindowManager();\n/**\n * See https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio#monitoring_screen_resolution_or_zoom_level_changes\n */\nclass DevicePixelRatioMonitor extends Disposable {\n constructor() {\n super();\n this._onDidChange = this._register(new Emitter());\n this.onDidChange = this._onDidChange.event;\n this._listener = () => this._handleChange(true);\n this._mediaQueryList = null;\n this._handleChange(false);\n }\n _handleChange(fireEvent) {\n var _a;\n (_a = this._mediaQueryList) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this._listener);\n this._mediaQueryList = $window.matchMedia(`(resolution: ${$window.devicePixelRatio}dppx)`);\n this._mediaQueryList.addEventListener('change', this._listener);\n if (fireEvent) {\n this._onDidChange.fire();\n }\n }\n}\nclass PixelRatioImpl extends Disposable {\n get value() {\n return this._value;\n }\n constructor() {\n super();\n this._onDidChange = this._register(new Emitter());\n this.onDidChange = this._onDidChange.event;\n this._value = this._getPixelRatio();\n const dprMonitor = this._register(new DevicePixelRatioMonitor());\n this._register(dprMonitor.onDidChange(() => {\n this._value = this._getPixelRatio();\n this._onDidChange.fire(this._value);\n }));\n }\n _getPixelRatio() {\n const ctx = document.createElement('canvas').getContext('2d');\n const dpr = $window.devicePixelRatio || 1;\n const bsr = ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1;\n return dpr / bsr;\n }\n}\nclass PixelRatioFacade {\n constructor() {\n this._pixelRatioMonitor = null;\n }\n _getOrCreatePixelRatioMonitor() {\n if (!this._pixelRatioMonitor) {\n this._pixelRatioMonitor = markAsSingleton(new PixelRatioImpl());\n }\n return this._pixelRatioMonitor;\n }\n /**\n * Get the current value.\n */\n get value() {\n return this._getOrCreatePixelRatioMonitor().value;\n }\n /**\n * Listen for changes.\n */\n get onDidChange() {\n return this._getOrCreatePixelRatioMonitor().onDidChange;\n }\n}\nexport function addMatchMediaChangeListener(targetWindow, query, callback) {\n if (typeof query === 'string') {\n query = targetWindow.matchMedia(query);\n }\n query.addEventListener('change', callback);\n}\n/**\n * Returns the pixel ratio.\n *\n * This is useful for rendering elements at native screen resolution or for being used as\n * a cache key when storing font measurements. Fonts might render differently depending on resolution\n * and any measurements need to be discarded for example when a window is moved from a monitor to another.\n */\nexport const PixelRatio = new PixelRatioFacade();\n/** The zoom scale for an index, e.g. 1, 1.2, 1.4 */\nexport function getZoomFactor(targetWindow) {\n return WindowManager.INSTANCE.getZoomFactor(targetWindow);\n}\nconst userAgent = navigator.userAgent;\nexport const isFirefox = (userAgent.indexOf('Firefox') >= 0);\nexport const isWebKit = (userAgent.indexOf('AppleWebKit') >= 0);\nexport const isChrome = (userAgent.indexOf('Chrome') >= 0);\nexport const isSafari = (!isChrome && (userAgent.indexOf('Safari') >= 0));\nexport const isWebkitWebView = (!isChrome && !isSafari && isWebKit);\nexport const isElectron = (userAgent.indexOf('Electron/') >= 0);\nexport const isAndroid = (userAgent.indexOf('Android') >= 0);\nlet standalone = false;\nif (typeof mainWindow.matchMedia === 'function') {\n const standaloneMatchMedia = mainWindow.matchMedia('(display-mode: standalone) or (display-mode: window-controls-overlay)');\n const fullScreenMatchMedia = mainWindow.matchMedia('(display-mode: fullscreen)');\n standalone = standaloneMatchMedia.matches;\n addMatchMediaChangeListener(mainWindow, standaloneMatchMedia, ({ matches }) => {\n // entering fullscreen would change standaloneMatchMedia.matches to false\n // if standalone is true (running as PWA) and entering fullscreen, skip this change\n if (standalone && fullScreenMatchMedia.matches) {\n return;\n }\n // otherwise update standalone (browser to PWA or PWA to browser)\n standalone = matches;\n });\n}\nexport function isStandalone() {\n return standalone;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport class FastDomNode {\n constructor(domNode) {\n this.domNode = domNode;\n this._maxWidth = '';\n this._width = '';\n this._height = '';\n this._top = '';\n this._left = '';\n this._bottom = '';\n this._right = '';\n this._paddingLeft = '';\n this._fontFamily = '';\n this._fontWeight = '';\n this._fontSize = '';\n this._fontStyle = '';\n this._fontFeatureSettings = '';\n this._fontVariationSettings = '';\n this._textDecoration = '';\n this._lineHeight = '';\n this._letterSpacing = '';\n this._className = '';\n this._display = '';\n this._position = '';\n this._visibility = '';\n this._color = '';\n this._backgroundColor = '';\n this._layerHint = false;\n this._contain = 'none';\n this._boxShadow = '';\n }\n setMaxWidth(_maxWidth) {\n const maxWidth = numberAsPixels(_maxWidth);\n if (this._maxWidth === maxWidth) {\n return;\n }\n this._maxWidth = maxWidth;\n this.domNode.style.maxWidth = this._maxWidth;\n }\n setWidth(_width) {\n const width = numberAsPixels(_width);\n if (this._width === width) {\n return;\n }\n this._width = width;\n this.domNode.style.width = this._width;\n }\n setHeight(_height) {\n const height = numberAsPixels(_height);\n if (this._height === height) {\n return;\n }\n this._height = height;\n this.domNode.style.height = this._height;\n }\n setTop(_top) {\n const top = numberAsPixels(_top);\n if (this._top === top) {\n return;\n }\n this._top = top;\n this.domNode.style.top = this._top;\n }\n setLeft(_left) {\n const left = numberAsPixels(_left);\n if (this._left === left) {\n return;\n }\n this._left = left;\n this.domNode.style.left = this._left;\n }\n setBottom(_bottom) {\n const bottom = numberAsPixels(_bottom);\n if (this._bottom === bottom) {\n return;\n }\n this._bottom = bottom;\n this.domNode.style.bottom = this._bottom;\n }\n setRight(_right) {\n const right = numberAsPixels(_right);\n if (this._right === right) {\n return;\n }\n this._right = right;\n this.domNode.style.right = this._right;\n }\n setPaddingLeft(_paddingLeft) {\n const paddingLeft = numberAsPixels(_paddingLeft);\n if (this._paddingLeft === paddingLeft) {\n return;\n }\n this._paddingLeft = paddingLeft;\n this.domNode.style.paddingLeft = this._paddingLeft;\n }\n setFontFamily(fontFamily) {\n if (this._fontFamily === fontFamily) {\n return;\n }\n this._fontFamily = fontFamily;\n this.domNode.style.fontFamily = this._fontFamily;\n }\n setFontWeight(fontWeight) {\n if (this._fontWeight === fontWeight) {\n return;\n }\n this._fontWeight = fontWeight;\n this.domNode.style.fontWeight = this._fontWeight;\n }\n setFontSize(_fontSize) {\n const fontSize = numberAsPixels(_fontSize);\n if (this._fontSize === fontSize) {\n return;\n }\n this._fontSize = fontSize;\n this.domNode.style.fontSize = this._fontSize;\n }\n setFontStyle(fontStyle) {\n if (this._fontStyle === fontStyle) {\n return;\n }\n this._fontStyle = fontStyle;\n this.domNode.style.fontStyle = this._fontStyle;\n }\n setFontFeatureSettings(fontFeatureSettings) {\n if (this._fontFeatureSettings === fontFeatureSettings) {\n return;\n }\n this._fontFeatureSettings = fontFeatureSettings;\n this.domNode.style.fontFeatureSettings = this._fontFeatureSettings;\n }\n setFontVariationSettings(fontVariationSettings) {\n if (this._fontVariationSettings === fontVariationSettings) {\n return;\n }\n this._fontVariationSettings = fontVariationSettings;\n this.domNode.style.fontVariationSettings = this._fontVariationSettings;\n }\n setTextDecoration(textDecoration) {\n if (this._textDecoration === textDecoration) {\n return;\n }\n this._textDecoration = textDecoration;\n this.domNode.style.textDecoration = this._textDecoration;\n }\n setLineHeight(_lineHeight) {\n const lineHeight = numberAsPixels(_lineHeight);\n if (this._lineHeight === lineHeight) {\n return;\n }\n this._lineHeight = lineHeight;\n this.domNode.style.lineHeight = this._lineHeight;\n }\n setLetterSpacing(_letterSpacing) {\n const letterSpacing = numberAsPixels(_letterSpacing);\n if (this._letterSpacing === letterSpacing) {\n return;\n }\n this._letterSpacing = letterSpacing;\n this.domNode.style.letterSpacing = this._letterSpacing;\n }\n setClassName(className) {\n if (this._className === className) {\n return;\n }\n this._className = className;\n this.domNode.className = this._className;\n }\n toggleClassName(className, shouldHaveIt) {\n this.domNode.classList.toggle(className, shouldHaveIt);\n this._className = this.domNode.className;\n }\n setDisplay(display) {\n if (this._display === display) {\n return;\n }\n this._display = display;\n this.domNode.style.display = this._display;\n }\n setPosition(position) {\n if (this._position === position) {\n return;\n }\n this._position = position;\n this.domNode.style.position = this._position;\n }\n setVisibility(visibility) {\n if (this._visibility === visibility) {\n return;\n }\n this._visibility = visibility;\n this.domNode.style.visibility = this._visibility;\n }\n setColor(color) {\n if (this._color === color) {\n return;\n }\n this._color = color;\n this.domNode.style.color = this._color;\n }\n setBackgroundColor(backgroundColor) {\n if (this._backgroundColor === backgroundColor) {\n return;\n }\n this._backgroundColor = backgroundColor;\n this.domNode.style.backgroundColor = this._backgroundColor;\n }\n setLayerHinting(layerHint) {\n if (this._layerHint === layerHint) {\n return;\n }\n this._layerHint = layerHint;\n this.domNode.style.transform = this._layerHint ? 'translate3d(0px, 0px, 0px)' : '';\n }\n setBoxShadow(boxShadow) {\n if (this._boxShadow === boxShadow) {\n return;\n }\n this._boxShadow = boxShadow;\n this.domNode.style.boxShadow = boxShadow;\n }\n setContain(contain) {\n if (this._contain === contain) {\n return;\n }\n this._contain = contain;\n this.domNode.style.contain = this._contain;\n }\n setAttribute(name, value) {\n this.domNode.setAttribute(name, value);\n }\n removeAttribute(name) {\n this.domNode.removeAttribute(name);\n }\n appendChild(child) {\n this.domNode.appendChild(child.domNode);\n }\n removeChild(child) {\n this.domNode.removeChild(child.domNode);\n }\n}\nfunction numberAsPixels(value) {\n return (typeof value === 'number' ? `${value}px` : value);\n}\nexport function createFastDomNode(domNode) {\n return new FastDomNode(domNode);\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { FastDomNode } from '../../../base/browser/fastDomNode.js';\nexport function applyFontInfo(domNode, fontInfo) {\n if (domNode instanceof FastDomNode) {\n domNode.setFontFamily(fontInfo.getMassagedFontFamily());\n domNode.setFontWeight(fontInfo.fontWeight);\n domNode.setFontSize(fontInfo.fontSize);\n domNode.setFontFeatureSettings(fontInfo.fontFeatureSettings);\n domNode.setFontVariationSettings(fontInfo.fontVariationSettings);\n domNode.setLineHeight(fontInfo.lineHeight);\n domNode.setLetterSpacing(fontInfo.letterSpacing);\n }\n else {\n domNode.style.fontFamily = fontInfo.getMassagedFontFamily();\n domNode.style.fontWeight = fontInfo.fontWeight;\n domNode.style.fontSize = fontInfo.fontSize + 'px';\n domNode.style.fontFeatureSettings = fontInfo.fontFeatureSettings;\n domNode.style.fontVariationSettings = fontInfo.fontVariationSettings;\n domNode.style.lineHeight = fontInfo.lineHeight + 'px';\n domNode.style.letterSpacing = fontInfo.letterSpacing + 'px';\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { $window } from '../../../base/browser/window.js';\nimport { applyFontInfo } from './domFontInfo.js';\nexport class CharWidthRequest {\n constructor(chr, type) {\n this.chr = chr;\n this.type = type;\n this.width = 0;\n }\n fulfill(width) {\n this.width = width;\n }\n}\nclass DomCharWidthReader {\n constructor(bareFontInfo, requests) {\n this._bareFontInfo = bareFontInfo;\n this._requests = requests;\n this._container = null;\n this._testElements = null;\n }\n read() {\n // Create a test container with all these test elements\n this._createDomElements();\n // Add the container to the DOM\n $window.document.body.appendChild(this._container);\n // Read character widths\n this._readFromDomElements();\n // Remove the container from the DOM\n $window.document.body.removeChild(this._container);\n this._container = null;\n this._testElements = null;\n }\n _createDomElements() {\n const container = document.createElement('div');\n container.style.position = 'absolute';\n container.style.top = '-50000px';\n container.style.width = '50000px';\n const regularDomNode = document.createElement('div');\n applyFontInfo(regularDomNode, this._bareFontInfo);\n container.appendChild(regularDomNode);\n const boldDomNode = document.createElement('div');\n applyFontInfo(boldDomNode, this._bareFontInfo);\n boldDomNode.style.fontWeight = 'bold';\n container.appendChild(boldDomNode);\n const italicDomNode = document.createElement('div');\n applyFontInfo(italicDomNode, this._bareFontInfo);\n italicDomNode.style.fontStyle = 'italic';\n container.appendChild(italicDomNode);\n const testElements = [];\n for (const request of this._requests) {\n let parent;\n if (request.type === 0 /* CharWidthRequestType.Regular */) {\n parent = regularDomNode;\n }\n if (request.type === 2 /* CharWidthRequestType.Bold */) {\n parent = boldDomNode;\n }\n if (request.type === 1 /* CharWidthRequestType.Italic */) {\n parent = italicDomNode;\n }\n parent.appendChild(document.createElement('br'));\n const testElement = document.createElement('span');\n DomCharWidthReader._render(testElement, request);\n parent.appendChild(testElement);\n testElements.push(testElement);\n }\n this._container = container;\n this._testElements = testElements;\n }\n static _render(testElement, request) {\n if (request.chr === ' ') {\n let htmlString = '\\u00a0';\n // Repeat character 256 (2^8) times\n for (let i = 0; i < 8; i++) {\n htmlString += htmlString;\n }\n testElement.innerText = htmlString;\n }\n else {\n let testString = request.chr;\n // Repeat character 256 (2^8) times\n for (let i = 0; i < 8; i++) {\n testString += testString;\n }\n testElement.textContent = testString;\n }\n }\n _readFromDomElements() {\n for (let i = 0, len = this._requests.length; i < len; i++) {\n const request = this._requests[i];\n const testElement = this._testElements[i];\n request.fulfill(testElement.offsetWidth / 256);\n }\n }\n}\nexport function readCharWidths(bareFontInfo, requests) {\n const reader = new DomCharWidthReader(bareFontInfo, requests);\n reader.read();\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Emitter } from '../../../base/common/event.js';\nexport const EditorZoom = new class {\n constructor() {\n this._zoomLevel = 0;\n this._onDidChangeZoomLevel = new Emitter();\n this.onDidChangeZoomLevel = this._onDidChangeZoomLevel.event;\n }\n getZoomLevel() {\n return this._zoomLevel;\n }\n setZoomLevel(zoomLevel) {\n zoomLevel = Math.min(Math.max(-5, zoomLevel), 20);\n if (this._zoomLevel === zoomLevel) {\n return;\n }\n this._zoomLevel = zoomLevel;\n this._onDidChangeZoomLevel.fire(this._zoomLevel);\n }\n};\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as platform from '../../../base/common/platform.js';\nimport { EditorFontVariations, EDITOR_FONT_DEFAULTS } from './editorOptions.js';\nimport { EditorZoom } from './editorZoom.js';\n/**\n * Determined from empirical observations.\n * @internal\n */\nconst GOLDEN_LINE_HEIGHT_RATIO = platform.isMacintosh ? 1.5 : 1.35;\n/**\n * @internal\n */\nconst MINIMUM_LINE_HEIGHT = 8;\nexport class BareFontInfo {\n /**\n * @internal\n */\n static createFromValidatedSettings(options, pixelRatio, ignoreEditorZoom) {\n const fontFamily = options.get(49 /* EditorOption.fontFamily */);\n const fontWeight = options.get(53 /* EditorOption.fontWeight */);\n const fontSize = options.get(52 /* EditorOption.fontSize */);\n const fontFeatureSettings = options.get(51 /* EditorOption.fontLigatures */);\n const fontVariationSettings = options.get(54 /* EditorOption.fontVariations */);\n const lineHeight = options.get(66 /* EditorOption.lineHeight */);\n const letterSpacing = options.get(63 /* EditorOption.letterSpacing */);\n return BareFontInfo._create(fontFamily, fontWeight, fontSize, fontFeatureSettings, fontVariationSettings, lineHeight, letterSpacing, pixelRatio, ignoreEditorZoom);\n }\n /**\n * @internal\n */\n static _create(fontFamily, fontWeight, fontSize, fontFeatureSettings, fontVariationSettings, lineHeight, letterSpacing, pixelRatio, ignoreEditorZoom) {\n if (lineHeight === 0) {\n lineHeight = GOLDEN_LINE_HEIGHT_RATIO * fontSize;\n }\n else if (lineHeight < MINIMUM_LINE_HEIGHT) {\n // Values too small to be line heights in pixels are in ems.\n lineHeight = lineHeight * fontSize;\n }\n // Enforce integer, minimum constraints\n lineHeight = Math.round(lineHeight);\n if (lineHeight < MINIMUM_LINE_HEIGHT) {\n lineHeight = MINIMUM_LINE_HEIGHT;\n }\n const editorZoomLevelMultiplier = 1 + (ignoreEditorZoom ? 0 : EditorZoom.getZoomLevel() * 0.1);\n fontSize *= editorZoomLevelMultiplier;\n lineHeight *= editorZoomLevelMultiplier;\n if (fontVariationSettings === EditorFontVariations.TRANSLATE) {\n if (fontWeight === 'normal' || fontWeight === 'bold') {\n fontVariationSettings = EditorFontVariations.OFF;\n }\n else {\n const fontWeightAsNumber = parseInt(fontWeight, 10);\n fontVariationSettings = `'wght' ${fontWeightAsNumber}`;\n fontWeight = 'normal';\n }\n }\n return new BareFontInfo({\n pixelRatio: pixelRatio,\n fontFamily: fontFamily,\n fontWeight: fontWeight,\n fontSize: fontSize,\n fontFeatureSettings: fontFeatureSettings,\n fontVariationSettings,\n lineHeight: lineHeight,\n letterSpacing: letterSpacing\n });\n }\n /**\n * @internal\n */\n constructor(opts) {\n this._bareFontInfoBrand = undefined;\n this.pixelRatio = opts.pixelRatio;\n this.fontFamily = String(opts.fontFamily);\n this.fontWeight = String(opts.fontWeight);\n this.fontSize = opts.fontSize;\n this.fontFeatureSettings = opts.fontFeatureSettings;\n this.fontVariationSettings = opts.fontVariationSettings;\n this.lineHeight = opts.lineHeight | 0;\n this.letterSpacing = opts.letterSpacing;\n }\n /**\n * @internal\n */\n getId() {\n return `${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.fontVariationSettings}-${this.lineHeight}-${this.letterSpacing}`;\n }\n /**\n * @internal\n */\n getMassagedFontFamily() {\n const fallbackFontFamily = EDITOR_FONT_DEFAULTS.fontFamily;\n const fontFamily = BareFontInfo._wrapInQuotes(this.fontFamily);\n if (fallbackFontFamily && this.fontFamily !== fallbackFontFamily) {\n return `${fontFamily}, ${fallbackFontFamily}`;\n }\n return fontFamily;\n }\n static _wrapInQuotes(fontFamily) {\n if (/[,\"']/.test(fontFamily)) {\n // Looks like the font family might be already escaped\n return fontFamily;\n }\n if (/[+ ]/.test(fontFamily)) {\n // Wrap a font family using + or with quotes\n return `\"${fontFamily}\"`;\n }\n return fontFamily;\n }\n}\n// change this whenever `FontInfo` members are changed\nexport const SERIALIZED_FONT_INFO_VERSION = 2;\nexport class FontInfo extends BareFontInfo {\n /**\n * @internal\n */\n constructor(opts, isTrusted) {\n super(opts);\n this._editorStylingBrand = undefined;\n this.version = SERIALIZED_FONT_INFO_VERSION;\n this.isTrusted = isTrusted;\n this.isMonospace = opts.isMonospace;\n this.typicalHalfwidthCharacterWidth = opts.typicalHalfwidthCharacterWidth;\n this.typicalFullwidthCharacterWidth = opts.typicalFullwidthCharacterWidth;\n this.canUseHalfwidthRightwardsArrow = opts.canUseHalfwidthRightwardsArrow;\n this.spaceWidth = opts.spaceWidth;\n this.middotWidth = opts.middotWidth;\n this.wsmiddotWidth = opts.wsmiddotWidth;\n this.maxDigitWidth = opts.maxDigitWidth;\n }\n /**\n * @internal\n */\n equals(other) {\n return (this.fontFamily === other.fontFamily\n && this.fontWeight === other.fontWeight\n && this.fontSize === other.fontSize\n && this.fontFeatureSettings === other.fontFeatureSettings\n && this.fontVariationSettings === other.fontVariationSettings\n && this.lineHeight === other.lineHeight\n && this.letterSpacing === other.letterSpacing\n && this.typicalHalfwidthCharacterWidth === other.typicalHalfwidthCharacterWidth\n && this.typicalFullwidthCharacterWidth === other.typicalFullwidthCharacterWidth\n && this.canUseHalfwidthRightwardsArrow === other.canUseHalfwidthRightwardsArrow\n && this.spaceWidth === other.spaceWidth\n && this.middotWidth === other.middotWidth\n && this.wsmiddotWidth === other.wsmiddotWidth\n && this.maxDigitWidth === other.maxDigitWidth);\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as browser from '../../../base/browser/browser.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { Emitter } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { CharWidthRequest, readCharWidths } from './charWidthReader.js';\nimport { EditorFontLigatures } from '../../common/config/editorOptions.js';\nimport { FontInfo } from '../../common/config/fontInfo.js';\nexport class FontMeasurementsImpl extends Disposable {\n constructor() {\n super();\n this._onDidChange = this._register(new Emitter());\n this.onDidChange = this._onDidChange.event;\n this._cache = new FontMeasurementsCache();\n this._evictUntrustedReadingsTimeout = -1;\n }\n dispose() {\n if (this._evictUntrustedReadingsTimeout !== -1) {\n clearTimeout(this._evictUntrustedReadingsTimeout);\n this._evictUntrustedReadingsTimeout = -1;\n }\n super.dispose();\n }\n /**\n * Clear all cached font information and trigger a change event.\n */\n clearAllFontInfos() {\n this._cache = new FontMeasurementsCache();\n this._onDidChange.fire();\n }\n _writeToCache(item, value) {\n this._cache.put(item, value);\n if (!value.isTrusted && this._evictUntrustedReadingsTimeout === -1) {\n // Try reading again after some time\n this._evictUntrustedReadingsTimeout = mainWindow.setTimeout(() => {\n this._evictUntrustedReadingsTimeout = -1;\n this._evictUntrustedReadings();\n }, 5000);\n }\n }\n _evictUntrustedReadings() {\n const values = this._cache.getValues();\n let somethingRemoved = false;\n for (const item of values) {\n if (!item.isTrusted) {\n somethingRemoved = true;\n this._cache.remove(item);\n }\n }\n if (somethingRemoved) {\n this._onDidChange.fire();\n }\n }\n /**\n * Read font information.\n */\n readFontInfo(bareFontInfo) {\n if (!this._cache.has(bareFontInfo)) {\n let readConfig = this._actualReadFontInfo(bareFontInfo);\n if (readConfig.typicalHalfwidthCharacterWidth <= 2 || readConfig.typicalFullwidthCharacterWidth <= 2 || readConfig.spaceWidth <= 2 || readConfig.maxDigitWidth <= 2) {\n // Hey, it's Bug 14341 ... we couldn't read\n readConfig = new FontInfo({\n pixelRatio: browser.PixelRatio.value,\n fontFamily: readConfig.fontFamily,\n fontWeight: readConfig.fontWeight,\n fontSize: readConfig.fontSize,\n fontFeatureSettings: readConfig.fontFeatureSettings,\n fontVariationSettings: readConfig.fontVariationSettings,\n lineHeight: readConfig.lineHeight,\n letterSpacing: readConfig.letterSpacing,\n isMonospace: readConfig.isMonospace,\n typicalHalfwidthCharacterWidth: Math.max(readConfig.typicalHalfwidthCharacterWidth, 5),\n typicalFullwidthCharacterWidth: Math.max(readConfig.typicalFullwidthCharacterWidth, 5),\n canUseHalfwidthRightwardsArrow: readConfig.canUseHalfwidthRightwardsArrow,\n spaceWidth: Math.max(readConfig.spaceWidth, 5),\n middotWidth: Math.max(readConfig.middotWidth, 5),\n wsmiddotWidth: Math.max(readConfig.wsmiddotWidth, 5),\n maxDigitWidth: Math.max(readConfig.maxDigitWidth, 5),\n }, false);\n }\n this._writeToCache(bareFontInfo, readConfig);\n }\n return this._cache.get(bareFontInfo);\n }\n _createRequest(chr, type, all, monospace) {\n const result = new CharWidthRequest(chr, type);\n all.push(result);\n monospace === null || monospace === void 0 ? void 0 : monospace.push(result);\n return result;\n }\n _actualReadFontInfo(bareFontInfo) {\n const all = [];\n const monospace = [];\n const typicalHalfwidthCharacter = this._createRequest('n', 0 /* CharWidthRequestType.Regular */, all, monospace);\n const typicalFullwidthCharacter = this._createRequest('\\uff4d', 0 /* CharWidthRequestType.Regular */, all, null);\n const space = this._createRequest(' ', 0 /* CharWidthRequestType.Regular */, all, monospace);\n const digit0 = this._createRequest('0', 0 /* CharWidthRequestType.Regular */, all, monospace);\n const digit1 = this._createRequest('1', 0 /* CharWidthRequestType.Regular */, all, monospace);\n const digit2 = this._createRequest('2', 0 /* CharWidthRequestType.Regular */, all, monospace);\n const digit3 = this._createRequest('3', 0 /* CharWidthRequestType.Regular */, all, monospace);\n const digit4 = this._createRequest('4', 0 /* CharWidthRequestType.Regular */, all, monospace);\n const digit5 = this._createRequest('5', 0 /* CharWidthRequestType.Regular */, all, monospace);\n const digit6 = this._createRequest('6', 0 /* CharWidthRequestType.Regular */, all, monospace);\n const digit7 = this._createRequest('7', 0 /* CharWidthRequestType.Regular */, all, monospace);\n const digit8 = this._createRequest('8', 0 /* CharWidthRequestType.Regular */, all, monospace);\n const digit9 = this._createRequest('9', 0 /* CharWidthRequestType.Regular */, all, monospace);\n // monospace test: used for whitespace rendering\n const rightwardsArrow = this._createRequest('\u2192', 0 /* CharWidthRequestType.Regular */, all, monospace);\n const halfwidthRightwardsArrow = this._createRequest('\uFFEB', 0 /* CharWidthRequestType.Regular */, all, null);\n // U+00B7 - MIDDLE DOT\n const middot = this._createRequest('\u00B7', 0 /* CharWidthRequestType.Regular */, all, monospace);\n // U+2E31 - WORD SEPARATOR MIDDLE DOT\n const wsmiddotWidth = this._createRequest(String.fromCharCode(0x2E31), 0 /* CharWidthRequestType.Regular */, all, null);\n // monospace test: some characters\n const monospaceTestChars = '|/-_ilm%';\n for (let i = 0, len = monospaceTestChars.length; i < len; i++) {\n this._createRequest(monospaceTestChars.charAt(i), 0 /* CharWidthRequestType.Regular */, all, monospace);\n this._createRequest(monospaceTestChars.charAt(i), 1 /* CharWidthRequestType.Italic */, all, monospace);\n this._createRequest(monospaceTestChars.charAt(i), 2 /* CharWidthRequestType.Bold */, all, monospace);\n }\n readCharWidths(bareFontInfo, all);\n const maxDigitWidth = Math.max(digit0.width, digit1.width, digit2.width, digit3.width, digit4.width, digit5.width, digit6.width, digit7.width, digit8.width, digit9.width);\n let isMonospace = (bareFontInfo.fontFeatureSettings === EditorFontLigatures.OFF);\n const referenceWidth = monospace[0].width;\n for (let i = 1, len = monospace.length; isMonospace && i < len; i++) {\n const diff = referenceWidth - monospace[i].width;\n if (diff < -0.001 || diff > 0.001) {\n isMonospace = false;\n break;\n }\n }\n let canUseHalfwidthRightwardsArrow = true;\n if (isMonospace && halfwidthRightwardsArrow.width !== referenceWidth) {\n // using a halfwidth rightwards arrow would break monospace...\n canUseHalfwidthRightwardsArrow = false;\n }\n if (halfwidthRightwardsArrow.width > rightwardsArrow.width) {\n // using a halfwidth rightwards arrow would paint a larger arrow than a regular rightwards arrow\n canUseHalfwidthRightwardsArrow = false;\n }\n return new FontInfo({\n pixelRatio: browser.PixelRatio.value,\n fontFamily: bareFontInfo.fontFamily,\n fontWeight: bareFontInfo.fontWeight,\n fontSize: bareFontInfo.fontSize,\n fontFeatureSettings: bareFontInfo.fontFeatureSettings,\n fontVariationSettings: bareFontInfo.fontVariationSettings,\n lineHeight: bareFontInfo.lineHeight,\n letterSpacing: bareFontInfo.letterSpacing,\n isMonospace: isMonospace,\n typicalHalfwidthCharacterWidth: typicalHalfwidthCharacter.width,\n typicalFullwidthCharacterWidth: typicalFullwidthCharacter.width,\n canUseHalfwidthRightwardsArrow: canUseHalfwidthRightwardsArrow,\n spaceWidth: space.width,\n middotWidth: middot.width,\n wsmiddotWidth: wsmiddotWidth.width,\n maxDigitWidth: maxDigitWidth\n }, true);\n }\n}\nclass FontMeasurementsCache {\n constructor() {\n this._keys = Object.create(null);\n this._values = Object.create(null);\n }\n has(item) {\n const itemId = item.getId();\n return !!this._values[itemId];\n }\n get(item) {\n const itemId = item.getId();\n return this._values[itemId];\n }\n put(item, value) {\n const itemId = item.getId();\n this._keys[itemId] = item;\n this._values[itemId] = value;\n }\n remove(item) {\n const itemId = item.getId();\n delete this._keys[itemId];\n delete this._values[itemId];\n }\n getValues() {\n return Object.keys(this._keys).map(id => this._values[id]);\n }\n}\nexport const FontMeasurements = new FontMeasurementsImpl();\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n// ------ internal util\nexport var _util;\n(function (_util) {\n _util.serviceIds = new Map();\n _util.DI_TARGET = '$di$target';\n _util.DI_DEPENDENCIES = '$di$dependencies';\n function getServiceDependencies(ctor) {\n return ctor[_util.DI_DEPENDENCIES] || [];\n }\n _util.getServiceDependencies = getServiceDependencies;\n})(_util || (_util = {}));\nexport const IInstantiationService = createDecorator('instantiationService');\nfunction storeServiceDependency(id, target, index) {\n if (target[_util.DI_TARGET] === target) {\n target[_util.DI_DEPENDENCIES].push({ id, index });\n }\n else {\n target[_util.DI_DEPENDENCIES] = [{ id, index }];\n target[_util.DI_TARGET] = target;\n }\n}\n/**\n * The *only* valid way to create a {{ServiceIdentifier}}.\n */\nexport function createDecorator(serviceId) {\n if (_util.serviceIds.has(serviceId)) {\n return _util.serviceIds.get(serviceId);\n }\n const id = function (target, key, index) {\n if (arguments.length !== 3) {\n throw new Error('@IServiceName-decorator can only be used to decorate a parameter');\n }\n storeServiceDependency(id, target, index);\n };\n id.toString = () => serviceId;\n _util.serviceIds.set(serviceId, id);\n return id;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation.js';\nexport const ICodeEditorService = createDecorator('codeEditorService');\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation.js';\nexport const IModelService = createDecorator('modelService');\n", "import { createDecorator } from '../../../platform/instantiation/common/instantiation.js';\nexport const ITextModelService = createDecorator('textModelService');\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Emitter } from './event.js';\nimport { Disposable } from './lifecycle.js';\nimport * as nls from '../../nls.js';\nexport class Action extends Disposable {\n constructor(id, label = '', cssClass = '', enabled = true, actionCallback) {\n super();\n this._onDidChange = this._register(new Emitter());\n this.onDidChange = this._onDidChange.event;\n this._enabled = true;\n this._id = id;\n this._label = label;\n this._cssClass = cssClass;\n this._enabled = enabled;\n this._actionCallback = actionCallback;\n }\n get id() {\n return this._id;\n }\n get label() {\n return this._label;\n }\n set label(value) {\n this._setLabel(value);\n }\n _setLabel(value) {\n if (this._label !== value) {\n this._label = value;\n this._onDidChange.fire({ label: value });\n }\n }\n get tooltip() {\n return this._tooltip || '';\n }\n set tooltip(value) {\n this._setTooltip(value);\n }\n _setTooltip(value) {\n if (this._tooltip !== value) {\n this._tooltip = value;\n this._onDidChange.fire({ tooltip: value });\n }\n }\n get class() {\n return this._cssClass;\n }\n set class(value) {\n this._setClass(value);\n }\n _setClass(value) {\n if (this._cssClass !== value) {\n this._cssClass = value;\n this._onDidChange.fire({ class: value });\n }\n }\n get enabled() {\n return this._enabled;\n }\n set enabled(value) {\n this._setEnabled(value);\n }\n _setEnabled(value) {\n if (this._enabled !== value) {\n this._enabled = value;\n this._onDidChange.fire({ enabled: value });\n }\n }\n get checked() {\n return this._checked;\n }\n set checked(value) {\n this._setChecked(value);\n }\n _setChecked(value) {\n if (this._checked !== value) {\n this._checked = value;\n this._onDidChange.fire({ checked: value });\n }\n }\n async run(event, data) {\n if (this._actionCallback) {\n await this._actionCallback(event);\n }\n }\n}\nexport class ActionRunner extends Disposable {\n constructor() {\n super(...arguments);\n this._onWillRun = this._register(new Emitter());\n this.onWillRun = this._onWillRun.event;\n this._onDidRun = this._register(new Emitter());\n this.onDidRun = this._onDidRun.event;\n }\n async run(action, context) {\n if (!action.enabled) {\n return;\n }\n this._onWillRun.fire({ action });\n let error = undefined;\n try {\n await this.runAction(action, context);\n }\n catch (e) {\n error = e;\n }\n this._onDidRun.fire({ action, error });\n }\n async runAction(action, context) {\n await action.run(context);\n }\n}\nexport class Separator {\n constructor() {\n this.id = Separator.ID;\n this.label = '';\n this.tooltip = '';\n this.class = 'separator';\n this.enabled = false;\n this.checked = false;\n }\n /**\n * Joins all non-empty lists of actions with separators.\n */\n static join(...actionLists) {\n let out = [];\n for (const list of actionLists) {\n if (!list.length) {\n // skip\n }\n else if (out.length) {\n out = [...out, new Separator(), ...list];\n }\n else {\n out = list;\n }\n }\n return out;\n }\n async run() { }\n}\nSeparator.ID = 'vs.actions.separator';\nexport class SubmenuAction {\n get actions() { return this._actions; }\n constructor(id, label, actions, cssClass) {\n this.tooltip = '';\n this.enabled = true;\n this.checked = undefined;\n this.id = id;\n this.label = label;\n this.class = cssClass;\n this._actions = actions;\n }\n async run() { }\n}\nexport class EmptySubmenuAction extends Action {\n constructor() {\n super(EmptySubmenuAction.ID, nls.localize('submenu.empty', '(empty)'), undefined, false);\n }\n}\nEmptySubmenuAction.ID = 'vs.actions.empty';\nexport function toAction(props) {\n var _a, _b;\n return {\n id: props.id,\n label: props.label,\n class: props.class,\n enabled: (_a = props.enabled) !== null && _a !== void 0 ? _a : true,\n checked: (_b = props.checked) !== null && _b !== void 0 ? _b : false,\n run: async (...args) => props.run(...args),\n tooltip: props.label\n };\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Codicon } from './codicons.js';\nexport var ThemeColor;\n(function (ThemeColor) {\n function isThemeColor(obj) {\n return obj && typeof obj === 'object' && typeof obj.id === 'string';\n }\n ThemeColor.isThemeColor = isThemeColor;\n})(ThemeColor || (ThemeColor = {}));\nexport var ThemeIcon;\n(function (ThemeIcon) {\n ThemeIcon.iconNameSegment = '[A-Za-z0-9]+';\n ThemeIcon.iconNameExpression = '[A-Za-z0-9-]+';\n ThemeIcon.iconModifierExpression = '~[A-Za-z]+';\n ThemeIcon.iconNameCharacter = '[A-Za-z0-9~-]';\n const ThemeIconIdRegex = new RegExp(`^(${ThemeIcon.iconNameExpression})(${ThemeIcon.iconModifierExpression})?$`);\n function asClassNameArray(icon) {\n const match = ThemeIconIdRegex.exec(icon.id);\n if (!match) {\n return asClassNameArray(Codicon.error);\n }\n const [, id, modifier] = match;\n const classNames = ['codicon', 'codicon-' + id];\n if (modifier) {\n classNames.push('codicon-modifier-' + modifier.substring(1));\n }\n return classNames;\n }\n ThemeIcon.asClassNameArray = asClassNameArray;\n function asClassName(icon) {\n return asClassNameArray(icon).join(' ');\n }\n ThemeIcon.asClassName = asClassName;\n function asCSSSelector(icon) {\n return '.' + asClassNameArray(icon).join('.');\n }\n ThemeIcon.asCSSSelector = asCSSSelector;\n function isThemeIcon(obj) {\n return obj && typeof obj === 'object' && typeof obj.id === 'string' && (typeof obj.color === 'undefined' || ThemeColor.isThemeColor(obj.color));\n }\n ThemeIcon.isThemeIcon = isThemeIcon;\n const _regexFromString = new RegExp(`^\\\\$\\\\((${ThemeIcon.iconNameExpression}(?:${ThemeIcon.iconModifierExpression})?)\\\\)$`);\n function fromString(str) {\n const match = _regexFromString.exec(str);\n if (!match) {\n return undefined;\n }\n const [, name] = match;\n return { id: name };\n }\n ThemeIcon.fromString = fromString;\n function fromId(id) {\n return { id };\n }\n ThemeIcon.fromId = fromId;\n function modify(icon, modifier) {\n let id = icon.id;\n const tildeIndex = id.lastIndexOf('~');\n if (tildeIndex !== -1) {\n id = id.substring(0, tildeIndex);\n }\n if (modifier) {\n id = `${id}~${modifier}`;\n }\n return { id };\n }\n ThemeIcon.modify = modify;\n function getModifier(icon) {\n const tildeIndex = icon.id.lastIndexOf('~');\n if (tildeIndex !== -1) {\n return icon.id.substring(tildeIndex + 1);\n }\n return undefined;\n }\n ThemeIcon.getModifier = getModifier;\n function isEqual(ti1, ti2) {\n var _a, _b;\n return ti1.id === ti2.id && ((_a = ti1.color) === null || _a === void 0 ? void 0 : _a.id) === ((_b = ti2.color) === null || _b === void 0 ? void 0 : _b.id);\n }\n ThemeIcon.isEqual = isEqual;\n})(ThemeIcon || (ThemeIcon = {}));\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Emitter } from '../../../base/common/event.js';\nimport { Iterable } from '../../../base/common/iterator.js';\nimport { toDisposable } from '../../../base/common/lifecycle.js';\nimport { LinkedList } from '../../../base/common/linkedList.js';\nimport { validateConstraints } from '../../../base/common/types.js';\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\nexport const ICommandService = createDecorator('commandService');\nexport const CommandsRegistry = new class {\n constructor() {\n this._commands = new Map();\n this._onDidRegisterCommand = new Emitter();\n this.onDidRegisterCommand = this._onDidRegisterCommand.event;\n }\n registerCommand(idOrCommand, handler) {\n if (!idOrCommand) {\n throw new Error(`invalid command`);\n }\n if (typeof idOrCommand === 'string') {\n if (!handler) {\n throw new Error(`invalid command`);\n }\n return this.registerCommand({ id: idOrCommand, handler });\n }\n // add argument validation if rich command metadata is provided\n if (idOrCommand.metadata && Array.isArray(idOrCommand.metadata.args)) {\n const constraints = [];\n for (const arg of idOrCommand.metadata.args) {\n constraints.push(arg.constraint);\n }\n const actualHandler = idOrCommand.handler;\n idOrCommand.handler = function (accessor, ...args) {\n validateConstraints(args, constraints);\n return actualHandler(accessor, ...args);\n };\n }\n // find a place to store the command\n const { id } = idOrCommand;\n let commands = this._commands.get(id);\n if (!commands) {\n commands = new LinkedList();\n this._commands.set(id, commands);\n }\n const removeFn = commands.unshift(idOrCommand);\n const ret = toDisposable(() => {\n removeFn();\n const command = this._commands.get(id);\n if (command === null || command === void 0 ? void 0 : command.isEmpty()) {\n this._commands.delete(id);\n }\n });\n // tell the world about this command\n this._onDidRegisterCommand.fire(id);\n return ret;\n }\n registerCommandAlias(oldId, newId) {\n return CommandsRegistry.registerCommand(oldId, (accessor, ...args) => accessor.get(ICommandService).executeCommand(newId, ...args));\n }\n getCommand(id) {\n const list = this._commands.get(id);\n if (!list || list.isEmpty()) {\n return undefined;\n }\n return Iterable.first(list);\n }\n getCommands() {\n const result = new Map();\n for (const key of this._commands.keys()) {\n const command = this.getCommand(key);\n if (command) {\n result.set(key, command);\n }\n }\n return result;\n }\n};\nCommandsRegistry.registerCommand('noop', () => { });\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { illegalState } from '../../../base/common/errors.js';\nimport { localize } from '../../../nls.js';\nfunction hintDidYouMean(...meant) {\n switch (meant.length) {\n case 1:\n return localize('contextkey.scanner.hint.didYouMean1', \"Did you mean {0}?\", meant[0]);\n case 2:\n return localize('contextkey.scanner.hint.didYouMean2', \"Did you mean {0} or {1}?\", meant[0], meant[1]);\n case 3:\n return localize('contextkey.scanner.hint.didYouMean3', \"Did you mean {0}, {1} or {2}?\", meant[0], meant[1], meant[2]);\n default: // we just don't expect that many\n return undefined;\n }\n}\nconst hintDidYouForgetToOpenOrCloseQuote = localize('contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote', \"Did you forget to open or close the quote?\");\nconst hintDidYouForgetToEscapeSlash = localize('contextkey.scanner.hint.didYouForgetToEscapeSlash', \"Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\\\\\/\\'.\");\n/**\n * A simple scanner for context keys.\n *\n * Example:\n *\n * ```ts\n * const scanner = new Scanner().reset('resourceFileName =~ /docker/ && !config.docker.enabled');\n * const tokens = [...scanner];\n * if (scanner.errorTokens.length > 0) {\n * scanner.errorTokens.forEach(err => console.error(`Unexpected token at ${err.offset}: ${err.lexeme}\\nHint: ${err.additional}`));\n * } else {\n * // process tokens\n * }\n * ```\n */\nexport class Scanner {\n constructor() {\n this._input = '';\n this._start = 0;\n this._current = 0;\n this._tokens = [];\n this._errors = [];\n // u - unicode, y - sticky // TODO@ulugbekna: we accept double quotes as part of the string rather than as a delimiter (to preserve old parser's behavior)\n this.stringRe = /[a-zA-Z0-9_<>\\-\\./\\\\:\\*\\?\\+\\[\\]\\^,#@;\"%\\$\\p{L}-]+/uy;\n }\n static getLexeme(token) {\n switch (token.type) {\n case 0 /* TokenType.LParen */:\n return '(';\n case 1 /* TokenType.RParen */:\n return ')';\n case 2 /* TokenType.Neg */:\n return '!';\n case 3 /* TokenType.Eq */:\n return token.isTripleEq ? '===' : '==';\n case 4 /* TokenType.NotEq */:\n return token.isTripleEq ? '!==' : '!=';\n case 5 /* TokenType.Lt */:\n return '<';\n case 6 /* TokenType.LtEq */:\n return '<=';\n case 7 /* TokenType.Gt */:\n return '>=';\n case 8 /* TokenType.GtEq */:\n return '>=';\n case 9 /* TokenType.RegexOp */:\n return '=~';\n case 10 /* TokenType.RegexStr */:\n return token.lexeme;\n case 11 /* TokenType.True */:\n return 'true';\n case 12 /* TokenType.False */:\n return 'false';\n case 13 /* TokenType.In */:\n return 'in';\n case 14 /* TokenType.Not */:\n return 'not';\n case 15 /* TokenType.And */:\n return '&&';\n case 16 /* TokenType.Or */:\n return '||';\n case 17 /* TokenType.Str */:\n return token.lexeme;\n case 18 /* TokenType.QuotedStr */:\n return token.lexeme;\n case 19 /* TokenType.Error */:\n return token.lexeme;\n case 20 /* TokenType.EOF */:\n return 'EOF';\n default:\n throw illegalState(`unhandled token type: ${JSON.stringify(token)}; have you forgotten to add a case?`);\n }\n }\n reset(value) {\n this._input = value;\n this._start = 0;\n this._current = 0;\n this._tokens = [];\n this._errors = [];\n return this;\n }\n scan() {\n while (!this._isAtEnd()) {\n this._start = this._current;\n const ch = this._advance();\n switch (ch) {\n case 40 /* CharCode.OpenParen */:\n this._addToken(0 /* TokenType.LParen */);\n break;\n case 41 /* CharCode.CloseParen */:\n this._addToken(1 /* TokenType.RParen */);\n break;\n case 33 /* CharCode.ExclamationMark */:\n if (this._match(61 /* CharCode.Equals */)) {\n const isTripleEq = this._match(61 /* CharCode.Equals */); // eat last `=` if `!==`\n this._tokens.push({ type: 4 /* TokenType.NotEq */, offset: this._start, isTripleEq });\n }\n else {\n this._addToken(2 /* TokenType.Neg */);\n }\n break;\n case 39 /* CharCode.SingleQuote */:\n this._quotedString();\n break;\n case 47 /* CharCode.Slash */:\n this._regex();\n break;\n case 61 /* CharCode.Equals */:\n if (this._match(61 /* CharCode.Equals */)) { // support `==`\n const isTripleEq = this._match(61 /* CharCode.Equals */); // eat last `=` if `===`\n this._tokens.push({ type: 3 /* TokenType.Eq */, offset: this._start, isTripleEq });\n }\n else if (this._match(126 /* CharCode.Tilde */)) {\n this._addToken(9 /* TokenType.RegexOp */);\n }\n else {\n this._error(hintDidYouMean('==', '=~'));\n }\n break;\n case 60 /* CharCode.LessThan */:\n this._addToken(this._match(61 /* CharCode.Equals */) ? 6 /* TokenType.LtEq */ : 5 /* TokenType.Lt */);\n break;\n case 62 /* CharCode.GreaterThan */:\n this._addToken(this._match(61 /* CharCode.Equals */) ? 8 /* TokenType.GtEq */ : 7 /* TokenType.Gt */);\n break;\n case 38 /* CharCode.Ampersand */:\n if (this._match(38 /* CharCode.Ampersand */)) {\n this._addToken(15 /* TokenType.And */);\n }\n else {\n this._error(hintDidYouMean('&&'));\n }\n break;\n case 124 /* CharCode.Pipe */:\n if (this._match(124 /* CharCode.Pipe */)) {\n this._addToken(16 /* TokenType.Or */);\n }\n else {\n this._error(hintDidYouMean('||'));\n }\n break;\n // TODO@ulugbekna: 1) rewrite using a regex 2) reconsider what characters are considered whitespace, including unicode, nbsp, etc.\n case 32 /* CharCode.Space */:\n case 13 /* CharCode.CarriageReturn */:\n case 9 /* CharCode.Tab */:\n case 10 /* CharCode.LineFeed */:\n case 160 /* CharCode.NoBreakSpace */: //  \n break;\n default:\n this._string();\n }\n }\n this._start = this._current;\n this._addToken(20 /* TokenType.EOF */);\n return Array.from(this._tokens);\n }\n _match(expected) {\n if (this._isAtEnd()) {\n return false;\n }\n if (this._input.charCodeAt(this._current) !== expected) {\n return false;\n }\n this._current++;\n return true;\n }\n _advance() {\n return this._input.charCodeAt(this._current++);\n }\n _peek() {\n return this._isAtEnd() ? 0 /* CharCode.Null */ : this._input.charCodeAt(this._current);\n }\n _addToken(type) {\n this._tokens.push({ type, offset: this._start });\n }\n _error(additional) {\n const offset = this._start;\n const lexeme = this._input.substring(this._start, this._current);\n const errToken = { type: 19 /* TokenType.Error */, offset: this._start, lexeme };\n this._errors.push({ offset, lexeme, additionalInfo: additional });\n this._tokens.push(errToken);\n }\n _string() {\n this.stringRe.lastIndex = this._start;\n const match = this.stringRe.exec(this._input);\n if (match) {\n this._current = this._start + match[0].length;\n const lexeme = this._input.substring(this._start, this._current);\n const keyword = Scanner._keywords.get(lexeme);\n if (keyword) {\n this._addToken(keyword);\n }\n else {\n this._tokens.push({ type: 17 /* TokenType.Str */, lexeme, offset: this._start });\n }\n }\n }\n // captures the lexeme without the leading and trailing '\n _quotedString() {\n while (this._peek() !== 39 /* CharCode.SingleQuote */ && !this._isAtEnd()) { // TODO@ulugbekna: add support for escaping ' ?\n this._advance();\n }\n if (this._isAtEnd()) {\n this._error(hintDidYouForgetToOpenOrCloseQuote);\n return;\n }\n // consume the closing '\n this._advance();\n this._tokens.push({ type: 18 /* TokenType.QuotedStr */, lexeme: this._input.substring(this._start + 1, this._current - 1), offset: this._start + 1 });\n }\n /*\n * Lexing a regex expression: /.../[igsmyu]*\n * Based on https://github.com/microsoft/TypeScript/blob/9247ef115e617805983740ba795d7a8164babf89/src/compiler/scanner.ts#L2129-L2181\n *\n * Note that we want slashes within a regex to be escaped, e.g., /file:\\\\/\\\\/\\\\// should match `file:///`\n */\n _regex() {\n let p = this._current;\n let inEscape = false;\n let inCharacterClass = false;\n while (true) {\n if (p >= this._input.length) {\n this._current = p;\n this._error(hintDidYouForgetToEscapeSlash);\n return;\n }\n const ch = this._input.charCodeAt(p);\n if (inEscape) { // parsing an escape character\n inEscape = false;\n }\n else if (ch === 47 /* CharCode.Slash */ && !inCharacterClass) { // end of regex\n p++;\n break;\n }\n else if (ch === 91 /* CharCode.OpenSquareBracket */) {\n inCharacterClass = true;\n }\n else if (ch === 92 /* CharCode.Backslash */) {\n inEscape = true;\n }\n else if (ch === 93 /* CharCode.CloseSquareBracket */) {\n inCharacterClass = false;\n }\n p++;\n }\n // Consume flags // TODO@ulugbekna: use regex instead\n while (p < this._input.length && Scanner._regexFlags.has(this._input.charCodeAt(p))) {\n p++;\n }\n this._current = p;\n const lexeme = this._input.substring(this._start, this._current);\n this._tokens.push({ type: 10 /* TokenType.RegexStr */, lexeme, offset: this._start });\n }\n _isAtEnd() {\n return this._current >= this._input.length;\n }\n}\nScanner._regexFlags = new Set(['i', 'g', 's', 'm', 'y', 'u'].map(ch => ch.charCodeAt(0)));\nScanner._keywords = new Map([\n ['not', 14 /* TokenType.Not */],\n ['in', 13 /* TokenType.In */],\n ['false', 12 /* TokenType.False */],\n ['true', 11 /* TokenType.True */],\n]);\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { isChrome, isEdge, isFirefox, isLinux, isMacintosh, isSafari, isWeb, isWindows } from '../../../base/common/platform.js';\nimport { isFalsyOrWhitespace } from '../../../base/common/strings.js';\nimport { Scanner } from './scanner.js';\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\nimport { localize } from '../../../nls.js';\nconst CONSTANT_VALUES = new Map();\nCONSTANT_VALUES.set('false', false);\nCONSTANT_VALUES.set('true', true);\nCONSTANT_VALUES.set('isMac', isMacintosh);\nCONSTANT_VALUES.set('isLinux', isLinux);\nCONSTANT_VALUES.set('isWindows', isWindows);\nCONSTANT_VALUES.set('isWeb', isWeb);\nCONSTANT_VALUES.set('isMacNative', isMacintosh && !isWeb);\nCONSTANT_VALUES.set('isEdge', isEdge);\nCONSTANT_VALUES.set('isFirefox', isFirefox);\nCONSTANT_VALUES.set('isChrome', isChrome);\nCONSTANT_VALUES.set('isSafari', isSafari);\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst defaultConfig = {\n regexParsingWithErrorRecovery: true\n};\nconst errorEmptyString = localize('contextkey.parser.error.emptyString', \"Empty context key expression\");\nconst hintEmptyString = localize('contextkey.parser.error.emptyString.hint', \"Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively.\");\nconst errorNoInAfterNot = localize('contextkey.parser.error.noInAfterNot', \"'in' after 'not'.\");\nconst errorClosingParenthesis = localize('contextkey.parser.error.closingParenthesis', \"closing parenthesis ')'\");\nconst errorUnexpectedToken = localize('contextkey.parser.error.unexpectedToken', \"Unexpected token\");\nconst hintUnexpectedToken = localize('contextkey.parser.error.unexpectedToken.hint', \"Did you forget to put && or || before the token?\");\nconst errorUnexpectedEOF = localize('contextkey.parser.error.unexpectedEOF', \"Unexpected end of expression\");\nconst hintUnexpectedEOF = localize('contextkey.parser.error.unexpectedEOF.hint', \"Did you forget to put a context key?\");\n/**\n * A parser for context key expressions.\n *\n * Example:\n * ```ts\n * const parser = new Parser();\n * const expr = parser.parse('foo == \"bar\" && baz == true');\n *\n * if (expr === undefined) {\n * \t// there were lexing or parsing errors\n * \t// process lexing errors with `parser.lexingErrors`\n * // process parsing errors with `parser.parsingErrors`\n * } else {\n * \t// expr is a valid expression\n * }\n * ```\n */\nexport class Parser {\n constructor(_config = defaultConfig) {\n this._config = _config;\n // lifetime note: `_scanner` lives as long as the parser does, i.e., is not reset between calls to `parse`\n this._scanner = new Scanner();\n // lifetime note: `_tokens`, `_current`, and `_parsingErrors` must be reset between calls to `parse`\n this._tokens = [];\n this._current = 0; // invariant: 0 <= this._current < this._tokens.length ; any incrementation of this value must first call `_isAtEnd`\n this._parsingErrors = [];\n this._flagsGYRe = /g|y/g;\n }\n /**\n * Parse a context key expression.\n *\n * @param input the expression to parse\n * @returns the parsed expression or `undefined` if there's an error - call `lexingErrors` and `parsingErrors` to see the errors\n */\n parse(input) {\n if (input === '') {\n this._parsingErrors.push({ message: errorEmptyString, offset: 0, lexeme: '', additionalInfo: hintEmptyString });\n return undefined;\n }\n this._tokens = this._scanner.reset(input).scan();\n // @ulugbekna: we do not stop parsing if there are lexing errors to be able to reconstruct regexes with unescaped slashes; TODO@ulugbekna: make this respect config option for recovery\n this._current = 0;\n this._parsingErrors = [];\n try {\n const expr = this._expr();\n if (!this._isAtEnd()) {\n const peek = this._peek();\n const additionalInfo = peek.type === 17 /* TokenType.Str */ ? hintUnexpectedToken : undefined;\n this._parsingErrors.push({ message: errorUnexpectedToken, offset: peek.offset, lexeme: Scanner.getLexeme(peek), additionalInfo });\n throw Parser._parseError;\n }\n return expr;\n }\n catch (e) {\n if (!(e === Parser._parseError)) {\n throw e;\n }\n return undefined;\n }\n }\n _expr() {\n return this._or();\n }\n _or() {\n const expr = [this._and()];\n while (this._matchOne(16 /* TokenType.Or */)) {\n const right = this._and();\n expr.push(right);\n }\n return expr.length === 1 ? expr[0] : ContextKeyExpr.or(...expr);\n }\n _and() {\n const expr = [this._term()];\n while (this._matchOne(15 /* TokenType.And */)) {\n const right = this._term();\n expr.push(right);\n }\n return expr.length === 1 ? expr[0] : ContextKeyExpr.and(...expr);\n }\n _term() {\n if (this._matchOne(2 /* TokenType.Neg */)) {\n const peek = this._peek();\n switch (peek.type) {\n case 11 /* TokenType.True */:\n this._advance();\n return ContextKeyFalseExpr.INSTANCE;\n case 12 /* TokenType.False */:\n this._advance();\n return ContextKeyTrueExpr.INSTANCE;\n case 0 /* TokenType.LParen */: {\n this._advance();\n const expr = this._expr();\n this._consume(1 /* TokenType.RParen */, errorClosingParenthesis);\n return expr === null || expr === void 0 ? void 0 : expr.negate();\n }\n case 17 /* TokenType.Str */:\n this._advance();\n return ContextKeyNotExpr.create(peek.lexeme);\n default:\n throw this._errExpectedButGot(`KEY | true | false | '(' expression ')'`, peek);\n }\n }\n return this._primary();\n }\n _primary() {\n const peek = this._peek();\n switch (peek.type) {\n case 11 /* TokenType.True */:\n this._advance();\n return ContextKeyExpr.true();\n case 12 /* TokenType.False */:\n this._advance();\n return ContextKeyExpr.false();\n case 0 /* TokenType.LParen */: {\n this._advance();\n const expr = this._expr();\n this._consume(1 /* TokenType.RParen */, errorClosingParenthesis);\n return expr;\n }\n case 17 /* TokenType.Str */: {\n // KEY\n const key = peek.lexeme;\n this._advance();\n // =~ regex\n if (this._matchOne(9 /* TokenType.RegexOp */)) {\n // @ulugbekna: we need to reconstruct the regex from the tokens because some extensions use unescaped slashes in regexes\n const expr = this._peek();\n if (!this._config.regexParsingWithErrorRecovery) {\n this._advance();\n if (expr.type !== 10 /* TokenType.RegexStr */) {\n throw this._errExpectedButGot(`REGEX`, expr);\n }\n const regexLexeme = expr.lexeme;\n const closingSlashIndex = regexLexeme.lastIndexOf('/');\n const flags = closingSlashIndex === regexLexeme.length - 1 ? undefined : this._removeFlagsGY(regexLexeme.substring(closingSlashIndex + 1));\n let regexp;\n try {\n regexp = new RegExp(regexLexeme.substring(1, closingSlashIndex), flags);\n }\n catch (e) {\n throw this._errExpectedButGot(`REGEX`, expr);\n }\n return ContextKeyRegexExpr.create(key, regexp);\n }\n switch (expr.type) {\n case 10 /* TokenType.RegexStr */:\n case 19 /* TokenType.Error */: { // also handle an ErrorToken in case of smth such as /(/file)/\n const lexemeReconstruction = [expr.lexeme]; // /REGEX/ or /REGEX/FLAGS\n this._advance();\n let followingToken = this._peek();\n let parenBalance = 0;\n for (let i = 0; i < expr.lexeme.length; i++) {\n if (expr.lexeme.charCodeAt(i) === 40 /* CharCode.OpenParen */) {\n parenBalance++;\n }\n else if (expr.lexeme.charCodeAt(i) === 41 /* CharCode.CloseParen */) {\n parenBalance--;\n }\n }\n while (!this._isAtEnd() && followingToken.type !== 15 /* TokenType.And */ && followingToken.type !== 16 /* TokenType.Or */) {\n switch (followingToken.type) {\n case 0 /* TokenType.LParen */:\n parenBalance++;\n break;\n case 1 /* TokenType.RParen */:\n parenBalance--;\n break;\n case 10 /* TokenType.RegexStr */:\n case 18 /* TokenType.QuotedStr */:\n for (let i = 0; i < followingToken.lexeme.length; i++) {\n if (followingToken.lexeme.charCodeAt(i) === 40 /* CharCode.OpenParen */) {\n parenBalance++;\n }\n else if (expr.lexeme.charCodeAt(i) === 41 /* CharCode.CloseParen */) {\n parenBalance--;\n }\n }\n }\n if (parenBalance < 0) {\n break;\n }\n lexemeReconstruction.push(Scanner.getLexeme(followingToken));\n this._advance();\n followingToken = this._peek();\n }\n const regexLexeme = lexemeReconstruction.join('');\n const closingSlashIndex = regexLexeme.lastIndexOf('/');\n const flags = closingSlashIndex === regexLexeme.length - 1 ? undefined : this._removeFlagsGY(regexLexeme.substring(closingSlashIndex + 1));\n let regexp;\n try {\n regexp = new RegExp(regexLexeme.substring(1, closingSlashIndex), flags);\n }\n catch (e) {\n throw this._errExpectedButGot(`REGEX`, expr);\n }\n return ContextKeyExpr.regex(key, regexp);\n }\n case 18 /* TokenType.QuotedStr */: {\n const serializedValue = expr.lexeme;\n this._advance();\n // replicate old regex parsing behavior\n let regex = null;\n if (!isFalsyOrWhitespace(serializedValue)) {\n const start = serializedValue.indexOf('/');\n const end = serializedValue.lastIndexOf('/');\n if (start !== end && start >= 0) {\n const value = serializedValue.slice(start + 1, end);\n const caseIgnoreFlag = serializedValue[end + 1] === 'i' ? 'i' : '';\n try {\n regex = new RegExp(value, caseIgnoreFlag);\n }\n catch (_e) {\n throw this._errExpectedButGot(`REGEX`, expr);\n }\n }\n }\n if (regex === null) {\n throw this._errExpectedButGot('REGEX', expr);\n }\n return ContextKeyRegexExpr.create(key, regex);\n }\n default:\n throw this._errExpectedButGot('REGEX', this._peek());\n }\n }\n // [ 'not' 'in' value ]\n if (this._matchOne(14 /* TokenType.Not */)) {\n this._consume(13 /* TokenType.In */, errorNoInAfterNot);\n const right = this._value();\n return ContextKeyExpr.notIn(key, right);\n }\n // [ ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in') value ]\n const maybeOp = this._peek().type;\n switch (maybeOp) {\n case 3 /* TokenType.Eq */: {\n this._advance();\n const right = this._value();\n if (this._previous().type === 18 /* TokenType.QuotedStr */) { // to preserve old parser behavior: \"foo == 'true'\" is preserved as \"foo == 'true'\", but \"foo == true\" is optimized as \"foo\"\n return ContextKeyExpr.equals(key, right);\n }\n switch (right) {\n case 'true':\n return ContextKeyExpr.has(key);\n case 'false':\n return ContextKeyExpr.not(key);\n default:\n return ContextKeyExpr.equals(key, right);\n }\n }\n case 4 /* TokenType.NotEq */: {\n this._advance();\n const right = this._value();\n if (this._previous().type === 18 /* TokenType.QuotedStr */) { // same as above with \"foo != 'true'\"\n return ContextKeyExpr.notEquals(key, right);\n }\n switch (right) {\n case 'true':\n return ContextKeyExpr.not(key);\n case 'false':\n return ContextKeyExpr.has(key);\n default:\n return ContextKeyExpr.notEquals(key, right);\n }\n }\n // TODO: ContextKeyExpr.smaller(key, right) accepts only `number` as `right` AND during eval of this node, we just eval to `false` if `right` is not a number\n // consequently, package.json linter should _warn_ the user if they're passing undesired things to ops\n case 5 /* TokenType.Lt */:\n this._advance();\n return ContextKeySmallerExpr.create(key, this._value());\n case 6 /* TokenType.LtEq */:\n this._advance();\n return ContextKeySmallerEqualsExpr.create(key, this._value());\n case 7 /* TokenType.Gt */:\n this._advance();\n return ContextKeyGreaterExpr.create(key, this._value());\n case 8 /* TokenType.GtEq */:\n this._advance();\n return ContextKeyGreaterEqualsExpr.create(key, this._value());\n case 13 /* TokenType.In */:\n this._advance();\n return ContextKeyExpr.in(key, this._value());\n default:\n return ContextKeyExpr.has(key);\n }\n }\n case 20 /* TokenType.EOF */:\n this._parsingErrors.push({ message: errorUnexpectedEOF, offset: peek.offset, lexeme: '', additionalInfo: hintUnexpectedEOF });\n throw Parser._parseError;\n default:\n throw this._errExpectedButGot(`true | false | KEY \\n\\t| KEY '=~' REGEX \\n\\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`, this._peek());\n }\n }\n _value() {\n const token = this._peek();\n switch (token.type) {\n case 17 /* TokenType.Str */:\n case 18 /* TokenType.QuotedStr */:\n this._advance();\n return token.lexeme;\n case 11 /* TokenType.True */:\n this._advance();\n return 'true';\n case 12 /* TokenType.False */:\n this._advance();\n return 'false';\n case 13 /* TokenType.In */: // we support `in` as a value, e.g., \"when\": \"languageId == in\" - exists in existing extensions\n this._advance();\n return 'in';\n default:\n // this allows \"when\": \"foo == \" which's used by existing extensions\n // we do not call `_advance` on purpose - we don't want to eat unintended tokens\n return '';\n }\n }\n _removeFlagsGY(flags) {\n return flags.replaceAll(this._flagsGYRe, '');\n }\n // careful: this can throw if current token is the initial one (ie index = 0)\n _previous() {\n return this._tokens[this._current - 1];\n }\n _matchOne(token) {\n if (this._check(token)) {\n this._advance();\n return true;\n }\n return false;\n }\n _advance() {\n if (!this._isAtEnd()) {\n this._current++;\n }\n return this._previous();\n }\n _consume(type, message) {\n if (this._check(type)) {\n return this._advance();\n }\n throw this._errExpectedButGot(message, this._peek());\n }\n _errExpectedButGot(expected, got, additionalInfo) {\n const message = localize('contextkey.parser.error.expectedButGot', \"Expected: {0}\\nReceived: '{1}'.\", expected, Scanner.getLexeme(got));\n const offset = got.offset;\n const lexeme = Scanner.getLexeme(got);\n this._parsingErrors.push({ message, offset, lexeme, additionalInfo });\n return Parser._parseError;\n }\n _check(type) {\n return this._peek().type === type;\n }\n _peek() {\n return this._tokens[this._current];\n }\n _isAtEnd() {\n return this._peek().type === 20 /* TokenType.EOF */;\n }\n}\n// Note: this doesn't produce an exact syntax tree but a normalized one\n// ContextKeyExpression's that we use as AST nodes do not expose constructors that do not normalize\nParser._parseError = new Error();\nexport class ContextKeyExpr {\n static false() {\n return ContextKeyFalseExpr.INSTANCE;\n }\n static true() {\n return ContextKeyTrueExpr.INSTANCE;\n }\n static has(key) {\n return ContextKeyDefinedExpr.create(key);\n }\n static equals(key, value) {\n return ContextKeyEqualsExpr.create(key, value);\n }\n static notEquals(key, value) {\n return ContextKeyNotEqualsExpr.create(key, value);\n }\n static regex(key, value) {\n return ContextKeyRegexExpr.create(key, value);\n }\n static in(key, value) {\n return ContextKeyInExpr.create(key, value);\n }\n static notIn(key, value) {\n return ContextKeyNotInExpr.create(key, value);\n }\n static not(key) {\n return ContextKeyNotExpr.create(key);\n }\n static and(...expr) {\n return ContextKeyAndExpr.create(expr, null, true);\n }\n static or(...expr) {\n return ContextKeyOrExpr.create(expr, null, true);\n }\n static deserialize(serialized) {\n if (serialized === undefined || serialized === null) { // an empty string needs to be handled by the parser to get a corresponding parsing error reported\n return undefined;\n }\n const expr = this._parser.parse(serialized);\n return expr;\n }\n}\nContextKeyExpr._parser = new Parser({ regexParsingWithErrorRecovery: false });\nexport function expressionsAreEqualWithConstantSubstitution(a, b) {\n const aExpr = a ? a.substituteConstants() : undefined;\n const bExpr = b ? b.substituteConstants() : undefined;\n if (!aExpr && !bExpr) {\n return true;\n }\n if (!aExpr || !bExpr) {\n return false;\n }\n return aExpr.equals(bExpr);\n}\nfunction cmp(a, b) {\n return a.cmp(b);\n}\nexport class ContextKeyFalseExpr {\n constructor() {\n this.type = 0 /* ContextKeyExprType.False */;\n }\n cmp(other) {\n return this.type - other.type;\n }\n equals(other) {\n return (other.type === this.type);\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n return false;\n }\n serialize() {\n return 'false';\n }\n keys() {\n return [];\n }\n negate() {\n return ContextKeyTrueExpr.INSTANCE;\n }\n}\nContextKeyFalseExpr.INSTANCE = new ContextKeyFalseExpr();\nexport class ContextKeyTrueExpr {\n constructor() {\n this.type = 1 /* ContextKeyExprType.True */;\n }\n cmp(other) {\n return this.type - other.type;\n }\n equals(other) {\n return (other.type === this.type);\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n return true;\n }\n serialize() {\n return 'true';\n }\n keys() {\n return [];\n }\n negate() {\n return ContextKeyFalseExpr.INSTANCE;\n }\n}\nContextKeyTrueExpr.INSTANCE = new ContextKeyTrueExpr();\nexport class ContextKeyDefinedExpr {\n static create(key, negated = null) {\n const constantValue = CONSTANT_VALUES.get(key);\n if (typeof constantValue === 'boolean') {\n return constantValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE;\n }\n return new ContextKeyDefinedExpr(key, negated);\n }\n constructor(key, negated) {\n this.key = key;\n this.negated = negated;\n this.type = 2 /* ContextKeyExprType.Defined */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp1(this.key, other.key);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key);\n }\n return false;\n }\n substituteConstants() {\n const constantValue = CONSTANT_VALUES.get(this.key);\n if (typeof constantValue === 'boolean') {\n return constantValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE;\n }\n return this;\n }\n evaluate(context) {\n return (!!context.getValue(this.key));\n }\n serialize() {\n return this.key;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeyNotExpr.create(this.key, this);\n }\n return this.negated;\n }\n}\nexport class ContextKeyEqualsExpr {\n static create(key, value, negated = null) {\n if (typeof value === 'boolean') {\n return (value ? ContextKeyDefinedExpr.create(key, negated) : ContextKeyNotExpr.create(key, negated));\n }\n const constantValue = CONSTANT_VALUES.get(key);\n if (typeof constantValue === 'boolean') {\n const trueValue = constantValue ? 'true' : 'false';\n return (value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);\n }\n return new ContextKeyEqualsExpr(key, value, negated);\n }\n constructor(key, value, negated) {\n this.key = key;\n this.value = value;\n this.negated = negated;\n this.type = 4 /* ContextKeyExprType.Equals */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp2(this.key, this.value, other.key, other.value);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key && this.value === other.value);\n }\n return false;\n }\n substituteConstants() {\n const constantValue = CONSTANT_VALUES.get(this.key);\n if (typeof constantValue === 'boolean') {\n const trueValue = constantValue ? 'true' : 'false';\n return (this.value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);\n }\n return this;\n }\n evaluate(context) {\n // Intentional ==\n // eslint-disable-next-line eqeqeq\n return (context.getValue(this.key) == this.value);\n }\n serialize() {\n return `${this.key} == '${this.value}'`;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeyNotEqualsExpr.create(this.key, this.value, this);\n }\n return this.negated;\n }\n}\nexport class ContextKeyInExpr {\n static create(key, valueKey) {\n return new ContextKeyInExpr(key, valueKey);\n }\n constructor(key, valueKey) {\n this.key = key;\n this.valueKey = valueKey;\n this.type = 10 /* ContextKeyExprType.In */;\n this.negated = null;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp2(this.key, this.valueKey, other.key, other.valueKey);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key && this.valueKey === other.valueKey);\n }\n return false;\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n const source = context.getValue(this.valueKey);\n const item = context.getValue(this.key);\n if (Array.isArray(source)) {\n return source.includes(item);\n }\n if (typeof item === 'string' && typeof source === 'object' && source !== null) {\n return hasOwnProperty.call(source, item);\n }\n return false;\n }\n serialize() {\n return `${this.key} in '${this.valueKey}'`;\n }\n keys() {\n return [this.key, this.valueKey];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeyNotInExpr.create(this.key, this.valueKey);\n }\n return this.negated;\n }\n}\nexport class ContextKeyNotInExpr {\n static create(key, valueKey) {\n return new ContextKeyNotInExpr(key, valueKey);\n }\n constructor(key, valueKey) {\n this.key = key;\n this.valueKey = valueKey;\n this.type = 11 /* ContextKeyExprType.NotIn */;\n this._negated = ContextKeyInExpr.create(key, valueKey);\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return this._negated.cmp(other._negated);\n }\n equals(other) {\n if (other.type === this.type) {\n return this._negated.equals(other._negated);\n }\n return false;\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n return !this._negated.evaluate(context);\n }\n serialize() {\n return `${this.key} not in '${this.valueKey}'`;\n }\n keys() {\n return this._negated.keys();\n }\n negate() {\n return this._negated;\n }\n}\nexport class ContextKeyNotEqualsExpr {\n static create(key, value, negated = null) {\n if (typeof value === 'boolean') {\n if (value) {\n return ContextKeyNotExpr.create(key, negated);\n }\n return ContextKeyDefinedExpr.create(key, negated);\n }\n const constantValue = CONSTANT_VALUES.get(key);\n if (typeof constantValue === 'boolean') {\n const falseValue = constantValue ? 'true' : 'false';\n return (value === falseValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);\n }\n return new ContextKeyNotEqualsExpr(key, value, negated);\n }\n constructor(key, value, negated) {\n this.key = key;\n this.value = value;\n this.negated = negated;\n this.type = 5 /* ContextKeyExprType.NotEquals */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp2(this.key, this.value, other.key, other.value);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key && this.value === other.value);\n }\n return false;\n }\n substituteConstants() {\n const constantValue = CONSTANT_VALUES.get(this.key);\n if (typeof constantValue === 'boolean') {\n const falseValue = constantValue ? 'true' : 'false';\n return (this.value === falseValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);\n }\n return this;\n }\n evaluate(context) {\n // Intentional !=\n // eslint-disable-next-line eqeqeq\n return (context.getValue(this.key) != this.value);\n }\n serialize() {\n return `${this.key} != '${this.value}'`;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeyEqualsExpr.create(this.key, this.value, this);\n }\n return this.negated;\n }\n}\nexport class ContextKeyNotExpr {\n static create(key, negated = null) {\n const constantValue = CONSTANT_VALUES.get(key);\n if (typeof constantValue === 'boolean') {\n return (constantValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);\n }\n return new ContextKeyNotExpr(key, negated);\n }\n constructor(key, negated) {\n this.key = key;\n this.negated = negated;\n this.type = 3 /* ContextKeyExprType.Not */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp1(this.key, other.key);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key);\n }\n return false;\n }\n substituteConstants() {\n const constantValue = CONSTANT_VALUES.get(this.key);\n if (typeof constantValue === 'boolean') {\n return (constantValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);\n }\n return this;\n }\n evaluate(context) {\n return (!context.getValue(this.key));\n }\n serialize() {\n return `!${this.key}`;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeyDefinedExpr.create(this.key, this);\n }\n return this.negated;\n }\n}\nfunction withFloatOrStr(value, callback) {\n if (typeof value === 'string') {\n const n = parseFloat(value);\n if (!isNaN(n)) {\n value = n;\n }\n }\n if (typeof value === 'string' || typeof value === 'number') {\n return callback(value);\n }\n return ContextKeyFalseExpr.INSTANCE;\n}\nexport class ContextKeyGreaterExpr {\n static create(key, _value, negated = null) {\n return withFloatOrStr(_value, (value) => new ContextKeyGreaterExpr(key, value, negated));\n }\n constructor(key, value, negated) {\n this.key = key;\n this.value = value;\n this.negated = negated;\n this.type = 12 /* ContextKeyExprType.Greater */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp2(this.key, this.value, other.key, other.value);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key && this.value === other.value);\n }\n return false;\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n if (typeof this.value === 'string') {\n return false;\n }\n return (parseFloat(context.getValue(this.key)) > this.value);\n }\n serialize() {\n return `${this.key} > ${this.value}`;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeySmallerEqualsExpr.create(this.key, this.value, this);\n }\n return this.negated;\n }\n}\nexport class ContextKeyGreaterEqualsExpr {\n static create(key, _value, negated = null) {\n return withFloatOrStr(_value, (value) => new ContextKeyGreaterEqualsExpr(key, value, negated));\n }\n constructor(key, value, negated) {\n this.key = key;\n this.value = value;\n this.negated = negated;\n this.type = 13 /* ContextKeyExprType.GreaterEquals */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp2(this.key, this.value, other.key, other.value);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key && this.value === other.value);\n }\n return false;\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n if (typeof this.value === 'string') {\n return false;\n }\n return (parseFloat(context.getValue(this.key)) >= this.value);\n }\n serialize() {\n return `${this.key} >= ${this.value}`;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeySmallerExpr.create(this.key, this.value, this);\n }\n return this.negated;\n }\n}\nexport class ContextKeySmallerExpr {\n static create(key, _value, negated = null) {\n return withFloatOrStr(_value, (value) => new ContextKeySmallerExpr(key, value, negated));\n }\n constructor(key, value, negated) {\n this.key = key;\n this.value = value;\n this.negated = negated;\n this.type = 14 /* ContextKeyExprType.Smaller */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp2(this.key, this.value, other.key, other.value);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key && this.value === other.value);\n }\n return false;\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n if (typeof this.value === 'string') {\n return false;\n }\n return (parseFloat(context.getValue(this.key)) < this.value);\n }\n serialize() {\n return `${this.key} < ${this.value}`;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeyGreaterEqualsExpr.create(this.key, this.value, this);\n }\n return this.negated;\n }\n}\nexport class ContextKeySmallerEqualsExpr {\n static create(key, _value, negated = null) {\n return withFloatOrStr(_value, (value) => new ContextKeySmallerEqualsExpr(key, value, negated));\n }\n constructor(key, value, negated) {\n this.key = key;\n this.value = value;\n this.negated = negated;\n this.type = 15 /* ContextKeyExprType.SmallerEquals */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp2(this.key, this.value, other.key, other.value);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key && this.value === other.value);\n }\n return false;\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n if (typeof this.value === 'string') {\n return false;\n }\n return (parseFloat(context.getValue(this.key)) <= this.value);\n }\n serialize() {\n return `${this.key} <= ${this.value}`;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeyGreaterExpr.create(this.key, this.value, this);\n }\n return this.negated;\n }\n}\nexport class ContextKeyRegexExpr {\n static create(key, regexp) {\n return new ContextKeyRegexExpr(key, regexp);\n }\n constructor(key, regexp) {\n this.key = key;\n this.regexp = regexp;\n this.type = 7 /* ContextKeyExprType.Regex */;\n this.negated = null;\n //\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n if (this.key < other.key) {\n return -1;\n }\n if (this.key > other.key) {\n return 1;\n }\n const thisSource = this.regexp ? this.regexp.source : '';\n const otherSource = other.regexp ? other.regexp.source : '';\n if (thisSource < otherSource) {\n return -1;\n }\n if (thisSource > otherSource) {\n return 1;\n }\n return 0;\n }\n equals(other) {\n if (other.type === this.type) {\n const thisSource = this.regexp ? this.regexp.source : '';\n const otherSource = other.regexp ? other.regexp.source : '';\n return (this.key === other.key && thisSource === otherSource);\n }\n return false;\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n const value = context.getValue(this.key);\n return this.regexp ? this.regexp.test(value) : false;\n }\n serialize() {\n const value = this.regexp\n ? `/${this.regexp.source}/${this.regexp.flags}`\n : '/invalid/';\n return `${this.key} =~ ${value}`;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeyNotRegexExpr.create(this);\n }\n return this.negated;\n }\n}\nexport class ContextKeyNotRegexExpr {\n static create(actual) {\n return new ContextKeyNotRegexExpr(actual);\n }\n constructor(_actual) {\n this._actual = _actual;\n this.type = 8 /* ContextKeyExprType.NotRegex */;\n //\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return this._actual.cmp(other._actual);\n }\n equals(other) {\n if (other.type === this.type) {\n return this._actual.equals(other._actual);\n }\n return false;\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n return !this._actual.evaluate(context);\n }\n serialize() {\n return `!(${this._actual.serialize()})`;\n }\n keys() {\n return this._actual.keys();\n }\n negate() {\n return this._actual;\n }\n}\n/**\n * @returns the same instance if nothing changed.\n */\nfunction eliminateConstantsInArray(arr) {\n // Allocate array only if there is a difference\n let newArr = null;\n for (let i = 0, len = arr.length; i < len; i++) {\n const newExpr = arr[i].substituteConstants();\n if (arr[i] !== newExpr) {\n // something has changed!\n // allocate array on first difference\n if (newArr === null) {\n newArr = [];\n for (let j = 0; j < i; j++) {\n newArr[j] = arr[j];\n }\n }\n }\n if (newArr !== null) {\n newArr[i] = newExpr;\n }\n }\n if (newArr === null) {\n return arr;\n }\n return newArr;\n}\nexport class ContextKeyAndExpr {\n static create(_expr, negated, extraRedundantCheck) {\n return ContextKeyAndExpr._normalizeArr(_expr, negated, extraRedundantCheck);\n }\n constructor(expr, negated) {\n this.expr = expr;\n this.negated = negated;\n this.type = 6 /* ContextKeyExprType.And */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n if (this.expr.length < other.expr.length) {\n return -1;\n }\n if (this.expr.length > other.expr.length) {\n return 1;\n }\n for (let i = 0, len = this.expr.length; i < len; i++) {\n const r = cmp(this.expr[i], other.expr[i]);\n if (r !== 0) {\n return r;\n }\n }\n return 0;\n }\n equals(other) {\n if (other.type === this.type) {\n if (this.expr.length !== other.expr.length) {\n return false;\n }\n for (let i = 0, len = this.expr.length; i < len; i++) {\n if (!this.expr[i].equals(other.expr[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n }\n substituteConstants() {\n const exprArr = eliminateConstantsInArray(this.expr);\n if (exprArr === this.expr) {\n // no change\n return this;\n }\n return ContextKeyAndExpr.create(exprArr, this.negated, false);\n }\n evaluate(context) {\n for (let i = 0, len = this.expr.length; i < len; i++) {\n if (!this.expr[i].evaluate(context)) {\n return false;\n }\n }\n return true;\n }\n static _normalizeArr(arr, negated, extraRedundantCheck) {\n const expr = [];\n let hasTrue = false;\n for (const e of arr) {\n if (!e) {\n continue;\n }\n if (e.type === 1 /* ContextKeyExprType.True */) {\n // anything && true ==> anything\n hasTrue = true;\n continue;\n }\n if (e.type === 0 /* ContextKeyExprType.False */) {\n // anything && false ==> false\n return ContextKeyFalseExpr.INSTANCE;\n }\n if (e.type === 6 /* ContextKeyExprType.And */) {\n expr.push(...e.expr);\n continue;\n }\n expr.push(e);\n }\n if (expr.length === 0 && hasTrue) {\n return ContextKeyTrueExpr.INSTANCE;\n }\n if (expr.length === 0) {\n return undefined;\n }\n if (expr.length === 1) {\n return expr[0];\n }\n expr.sort(cmp);\n // eliminate duplicate terms\n for (let i = 1; i < expr.length; i++) {\n if (expr[i - 1].equals(expr[i])) {\n expr.splice(i, 1);\n i--;\n }\n }\n if (expr.length === 1) {\n return expr[0];\n }\n // We must distribute any OR expression because we don't support parens\n // OR extensions will be at the end (due to sorting rules)\n while (expr.length > 1) {\n const lastElement = expr[expr.length - 1];\n if (lastElement.type !== 9 /* ContextKeyExprType.Or */) {\n break;\n }\n // pop the last element\n expr.pop();\n // pop the second to last element\n const secondToLastElement = expr.pop();\n const isFinished = (expr.length === 0);\n // distribute `lastElement` over `secondToLastElement`\n const resultElement = ContextKeyOrExpr.create(lastElement.expr.map(el => ContextKeyAndExpr.create([el, secondToLastElement], null, extraRedundantCheck)), null, isFinished);\n if (resultElement) {\n expr.push(resultElement);\n expr.sort(cmp);\n }\n }\n if (expr.length === 1) {\n return expr[0];\n }\n // resolve false AND expressions\n if (extraRedundantCheck) {\n for (let i = 0; i < expr.length; i++) {\n for (let j = i + 1; j < expr.length; j++) {\n if (expr[i].negate().equals(expr[j])) {\n // A && !A case\n return ContextKeyFalseExpr.INSTANCE;\n }\n }\n }\n if (expr.length === 1) {\n return expr[0];\n }\n }\n return new ContextKeyAndExpr(expr, negated);\n }\n serialize() {\n return this.expr.map(e => e.serialize()).join(' && ');\n }\n keys() {\n const result = [];\n for (const expr of this.expr) {\n result.push(...expr.keys());\n }\n return result;\n }\n negate() {\n if (!this.negated) {\n const result = [];\n for (const expr of this.expr) {\n result.push(expr.negate());\n }\n this.negated = ContextKeyOrExpr.create(result, this, true);\n }\n return this.negated;\n }\n}\nexport class ContextKeyOrExpr {\n static create(_expr, negated, extraRedundantCheck) {\n return ContextKeyOrExpr._normalizeArr(_expr, negated, extraRedundantCheck);\n }\n constructor(expr, negated) {\n this.expr = expr;\n this.negated = negated;\n this.type = 9 /* ContextKeyExprType.Or */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n if (this.expr.length < other.expr.length) {\n return -1;\n }\n if (this.expr.length > other.expr.length) {\n return 1;\n }\n for (let i = 0, len = this.expr.length; i < len; i++) {\n const r = cmp(this.expr[i], other.expr[i]);\n if (r !== 0) {\n return r;\n }\n }\n return 0;\n }\n equals(other) {\n if (other.type === this.type) {\n if (this.expr.length !== other.expr.length) {\n return false;\n }\n for (let i = 0, len = this.expr.length; i < len; i++) {\n if (!this.expr[i].equals(other.expr[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n }\n substituteConstants() {\n const exprArr = eliminateConstantsInArray(this.expr);\n if (exprArr === this.expr) {\n // no change\n return this;\n }\n return ContextKeyOrExpr.create(exprArr, this.negated, false);\n }\n evaluate(context) {\n for (let i = 0, len = this.expr.length; i < len; i++) {\n if (this.expr[i].evaluate(context)) {\n return true;\n }\n }\n return false;\n }\n static _normalizeArr(arr, negated, extraRedundantCheck) {\n let expr = [];\n let hasFalse = false;\n if (arr) {\n for (let i = 0, len = arr.length; i < len; i++) {\n const e = arr[i];\n if (!e) {\n continue;\n }\n if (e.type === 0 /* ContextKeyExprType.False */) {\n // anything || false ==> anything\n hasFalse = true;\n continue;\n }\n if (e.type === 1 /* ContextKeyExprType.True */) {\n // anything || true ==> true\n return ContextKeyTrueExpr.INSTANCE;\n }\n if (e.type === 9 /* ContextKeyExprType.Or */) {\n expr = expr.concat(e.expr);\n continue;\n }\n expr.push(e);\n }\n if (expr.length === 0 && hasFalse) {\n return ContextKeyFalseExpr.INSTANCE;\n }\n expr.sort(cmp);\n }\n if (expr.length === 0) {\n return undefined;\n }\n if (expr.length === 1) {\n return expr[0];\n }\n // eliminate duplicate terms\n for (let i = 1; i < expr.length; i++) {\n if (expr[i - 1].equals(expr[i])) {\n expr.splice(i, 1);\n i--;\n }\n }\n if (expr.length === 1) {\n return expr[0];\n }\n // resolve true OR expressions\n if (extraRedundantCheck) {\n for (let i = 0; i < expr.length; i++) {\n for (let j = i + 1; j < expr.length; j++) {\n if (expr[i].negate().equals(expr[j])) {\n // A || !A case\n return ContextKeyTrueExpr.INSTANCE;\n }\n }\n }\n if (expr.length === 1) {\n return expr[0];\n }\n }\n return new ContextKeyOrExpr(expr, negated);\n }\n serialize() {\n return this.expr.map(e => e.serialize()).join(' || ');\n }\n keys() {\n const result = [];\n for (const expr of this.expr) {\n result.push(...expr.keys());\n }\n return result;\n }\n negate() {\n if (!this.negated) {\n const result = [];\n for (const expr of this.expr) {\n result.push(expr.negate());\n }\n // We don't support parens, so here we distribute the AND over the OR terminals\n // We always take the first 2 AND pairs and distribute them\n while (result.length > 1) {\n const LEFT = result.shift();\n const RIGHT = result.shift();\n const all = [];\n for (const left of getTerminals(LEFT)) {\n for (const right of getTerminals(RIGHT)) {\n all.push(ContextKeyAndExpr.create([left, right], null, false));\n }\n }\n result.unshift(ContextKeyOrExpr.create(all, null, false));\n }\n this.negated = ContextKeyOrExpr.create(result, this, true);\n }\n return this.negated;\n }\n}\nexport class RawContextKey extends ContextKeyDefinedExpr {\n static all() {\n return RawContextKey._info.values();\n }\n constructor(key, defaultValue, metaOrHide) {\n super(key, null);\n this._defaultValue = defaultValue;\n // collect all context keys into a central place\n if (typeof metaOrHide === 'object') {\n RawContextKey._info.push({ ...metaOrHide, key });\n }\n else if (metaOrHide !== true) {\n RawContextKey._info.push({ key, description: metaOrHide, type: defaultValue !== null && defaultValue !== undefined ? typeof defaultValue : undefined });\n }\n }\n bindTo(target) {\n return target.createKey(this.key, this._defaultValue);\n }\n getValue(target) {\n return target.getContextKeyValue(this.key);\n }\n toNegated() {\n return this.negate();\n }\n isEqualTo(value) {\n return ContextKeyEqualsExpr.create(this.key, value);\n }\n}\nRawContextKey._info = [];\nexport const IContextKeyService = createDecorator('contextKeyService');\nfunction cmp1(key1, key2) {\n if (key1 < key2) {\n return -1;\n }\n if (key1 > key2) {\n return 1;\n }\n return 0;\n}\nfunction cmp2(key1, value1, key2, value2) {\n if (key1 < key2) {\n return -1;\n }\n if (key1 > key2) {\n return 1;\n }\n if (value1 < value2) {\n return -1;\n }\n if (value1 > value2) {\n return 1;\n }\n return 0;\n}\n/**\n * Returns true if it is provable `p` implies `q`.\n */\nexport function implies(p, q) {\n if (p.type === 0 /* ContextKeyExprType.False */ || q.type === 1 /* ContextKeyExprType.True */) {\n // false implies anything\n // anything implies true\n return true;\n }\n if (p.type === 9 /* ContextKeyExprType.Or */) {\n if (q.type === 9 /* ContextKeyExprType.Or */) {\n // `a || b || c` can only imply something like `a || b || c || d`\n return allElementsIncluded(p.expr, q.expr);\n }\n return false;\n }\n if (q.type === 9 /* ContextKeyExprType.Or */) {\n for (const element of q.expr) {\n if (implies(p, element)) {\n return true;\n }\n }\n return false;\n }\n if (p.type === 6 /* ContextKeyExprType.And */) {\n if (q.type === 6 /* ContextKeyExprType.And */) {\n // `a && b && c` implies `a && c`\n return allElementsIncluded(q.expr, p.expr);\n }\n for (const element of p.expr) {\n if (implies(element, q)) {\n return true;\n }\n }\n return false;\n }\n return p.equals(q);\n}\n/**\n * Returns true if all elements in `p` are also present in `q`.\n * The two arrays are assumed to be sorted\n */\nfunction allElementsIncluded(p, q) {\n let pIndex = 0;\n let qIndex = 0;\n while (pIndex < p.length && qIndex < q.length) {\n const cmp = p[pIndex].cmp(q[qIndex]);\n if (cmp < 0) {\n // an element from `p` is missing from `q`\n return false;\n }\n else if (cmp === 0) {\n pIndex++;\n qIndex++;\n }\n else {\n qIndex++;\n }\n }\n return (pIndex === p.length);\n}\nfunction getTerminals(node) {\n if (node.type === 9 /* ContextKeyExprType.Or */) {\n return node.expr;\n }\n return [node];\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { illegalArgument } from './errors.js';\nexport function decodeKeybinding(keybinding, OS) {\n if (typeof keybinding === 'number') {\n if (keybinding === 0) {\n return null;\n }\n const firstChord = (keybinding & 0x0000FFFF) >>> 0;\n const secondChord = (keybinding & 0xFFFF0000) >>> 16;\n if (secondChord !== 0) {\n return new Keybinding([\n createSimpleKeybinding(firstChord, OS),\n createSimpleKeybinding(secondChord, OS)\n ]);\n }\n return new Keybinding([createSimpleKeybinding(firstChord, OS)]);\n }\n else {\n const chords = [];\n for (let i = 0; i < keybinding.length; i++) {\n chords.push(createSimpleKeybinding(keybinding[i], OS));\n }\n return new Keybinding(chords);\n }\n}\nexport function createSimpleKeybinding(keybinding, OS) {\n const ctrlCmd = (keybinding & 2048 /* BinaryKeybindingsMask.CtrlCmd */ ? true : false);\n const winCtrl = (keybinding & 256 /* BinaryKeybindingsMask.WinCtrl */ ? true : false);\n const ctrlKey = (OS === 2 /* OperatingSystem.Macintosh */ ? winCtrl : ctrlCmd);\n const shiftKey = (keybinding & 1024 /* BinaryKeybindingsMask.Shift */ ? true : false);\n const altKey = (keybinding & 512 /* BinaryKeybindingsMask.Alt */ ? true : false);\n const metaKey = (OS === 2 /* OperatingSystem.Macintosh */ ? ctrlCmd : winCtrl);\n const keyCode = (keybinding & 255 /* BinaryKeybindingsMask.KeyCode */);\n return new KeyCodeChord(ctrlKey, shiftKey, altKey, metaKey, keyCode);\n}\n/**\n * Represents a chord which uses the `keyCode` field of keyboard events.\n * A chord is a combination of keys pressed simultaneously.\n */\nexport class KeyCodeChord {\n constructor(ctrlKey, shiftKey, altKey, metaKey, keyCode) {\n this.ctrlKey = ctrlKey;\n this.shiftKey = shiftKey;\n this.altKey = altKey;\n this.metaKey = metaKey;\n this.keyCode = keyCode;\n }\n equals(other) {\n return (other instanceof KeyCodeChord\n && this.ctrlKey === other.ctrlKey\n && this.shiftKey === other.shiftKey\n && this.altKey === other.altKey\n && this.metaKey === other.metaKey\n && this.keyCode === other.keyCode);\n }\n isModifierKey() {\n return (this.keyCode === 0 /* KeyCode.Unknown */\n || this.keyCode === 5 /* KeyCode.Ctrl */\n || this.keyCode === 57 /* KeyCode.Meta */\n || this.keyCode === 6 /* KeyCode.Alt */\n || this.keyCode === 4 /* KeyCode.Shift */);\n }\n /**\n * Does this keybinding refer to the key code of a modifier and it also has the modifier flag?\n */\n isDuplicateModifierCase() {\n return ((this.ctrlKey && this.keyCode === 5 /* KeyCode.Ctrl */)\n || (this.shiftKey && this.keyCode === 4 /* KeyCode.Shift */)\n || (this.altKey && this.keyCode === 6 /* KeyCode.Alt */)\n || (this.metaKey && this.keyCode === 57 /* KeyCode.Meta */));\n }\n}\n/**\n * Represents a chord which uses the `code` field of keyboard events.\n * A chord is a combination of keys pressed simultaneously.\n */\nexport class ScanCodeChord {\n constructor(ctrlKey, shiftKey, altKey, metaKey, scanCode) {\n this.ctrlKey = ctrlKey;\n this.shiftKey = shiftKey;\n this.altKey = altKey;\n this.metaKey = metaKey;\n this.scanCode = scanCode;\n }\n /**\n * Does this keybinding refer to the key code of a modifier and it also has the modifier flag?\n */\n isDuplicateModifierCase() {\n return ((this.ctrlKey && (this.scanCode === 157 /* ScanCode.ControlLeft */ || this.scanCode === 161 /* ScanCode.ControlRight */))\n || (this.shiftKey && (this.scanCode === 158 /* ScanCode.ShiftLeft */ || this.scanCode === 162 /* ScanCode.ShiftRight */))\n || (this.altKey && (this.scanCode === 159 /* ScanCode.AltLeft */ || this.scanCode === 163 /* ScanCode.AltRight */))\n || (this.metaKey && (this.scanCode === 160 /* ScanCode.MetaLeft */ || this.scanCode === 164 /* ScanCode.MetaRight */)));\n }\n}\n/**\n * A keybinding is a sequence of chords.\n */\nexport class Keybinding {\n constructor(chords) {\n if (chords.length === 0) {\n throw illegalArgument(`chords`);\n }\n this.chords = chords;\n }\n}\nexport class ResolvedChord {\n constructor(ctrlKey, shiftKey, altKey, metaKey, keyLabel, keyAriaLabel) {\n this.ctrlKey = ctrlKey;\n this.shiftKey = shiftKey;\n this.altKey = altKey;\n this.metaKey = metaKey;\n this.keyLabel = keyLabel;\n this.keyAriaLabel = keyAriaLabel;\n }\n}\n/**\n * A resolved keybinding. Consists of one or multiple chords.\n */\nexport class ResolvedKeybinding {\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { BugIndicatingError, onUnexpectedError } from './errors.js';\n/**\n * Throws an error with the provided message if the provided value does not evaluate to a true Javascript value.\n *\n * @deprecated Use `assert(...)` instead.\n * This method is usually used like this:\n * ```ts\n * import * as assert from 'vs/base/common/assert';\n * assert.ok(...);\n * ```\n *\n * However, `assert` in that example is a user chosen name.\n * There is no tooling for generating such an import statement.\n * Thus, the `assert(...)` function should be used instead.\n */\nexport function ok(value, message) {\n if (!value) {\n throw new Error(message ? `Assertion failed (${message})` : 'Assertion Failed');\n }\n}\nexport function assertNever(value, message = 'Unreachable') {\n throw new Error(message);\n}\nexport function softAssert(condition) {\n if (!condition) {\n onUnexpectedError(new BugIndicatingError('Assertion Failed'));\n }\n}\n/**\n * condition must be side-effect free!\n */\nexport function assertFn(condition) {\n if (!condition()) {\n // eslint-disable-next-line no-debugger\n debugger;\n // Reevaluate `condition` again to make debugging easier\n condition();\n onUnexpectedError(new BugIndicatingError('Assertion Failed'));\n }\n}\nexport function checkAdjacentItems(items, predicate) {\n let i = 0;\n while (i < items.length - 1) {\n const a = items[i];\n const b = items[i + 1];\n if (!predicate(a, b)) {\n return false;\n }\n i++;\n }\n return true;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as Assert from '../../../base/common/assert.js';\nimport * as Types from '../../../base/common/types.js';\nclass RegistryImpl {\n constructor() {\n this.data = new Map();\n }\n add(id, data) {\n Assert.ok(Types.isString(id));\n Assert.ok(Types.isObject(data));\n Assert.ok(!this.data.has(id), 'There is already an extension with this id');\n this.data.set(id, data);\n }\n as(id) {\n return this.data.get(id) || null;\n }\n}\nexport const Registry = new RegistryImpl();\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { decodeKeybinding } from '../../../base/common/keybindings.js';\nimport { OS } from '../../../base/common/platform.js';\nimport { CommandsRegistry } from '../../commands/common/commands.js';\nimport { Registry } from '../../registry/common/platform.js';\nimport { combinedDisposable, DisposableStore, toDisposable } from '../../../base/common/lifecycle.js';\nimport { LinkedList } from '../../../base/common/linkedList.js';\n/**\n * Stores all built-in and extension-provided keybindings (but not ones that user defines themselves)\n */\nclass KeybindingsRegistryImpl {\n constructor() {\n this._coreKeybindings = new LinkedList();\n this._extensionKeybindings = [];\n this._cachedMergedKeybindings = null;\n }\n /**\n * Take current platform into account and reduce to primary & secondary.\n */\n static bindToCurrentPlatform(kb) {\n if (OS === 1 /* OperatingSystem.Windows */) {\n if (kb && kb.win) {\n return kb.win;\n }\n }\n else if (OS === 2 /* OperatingSystem.Macintosh */) {\n if (kb && kb.mac) {\n return kb.mac;\n }\n }\n else {\n if (kb && kb.linux) {\n return kb.linux;\n }\n }\n return kb;\n }\n registerKeybindingRule(rule) {\n const actualKb = KeybindingsRegistryImpl.bindToCurrentPlatform(rule);\n const result = new DisposableStore();\n if (actualKb && actualKb.primary) {\n const kk = decodeKeybinding(actualKb.primary, OS);\n if (kk) {\n result.add(this._registerDefaultKeybinding(kk, rule.id, rule.args, rule.weight, 0, rule.when));\n }\n }\n if (actualKb && Array.isArray(actualKb.secondary)) {\n for (let i = 0, len = actualKb.secondary.length; i < len; i++) {\n const k = actualKb.secondary[i];\n const kk = decodeKeybinding(k, OS);\n if (kk) {\n result.add(this._registerDefaultKeybinding(kk, rule.id, rule.args, rule.weight, -i - 1, rule.when));\n }\n }\n }\n return result;\n }\n registerCommandAndKeybindingRule(desc) {\n return combinedDisposable(this.registerKeybindingRule(desc), CommandsRegistry.registerCommand(desc));\n }\n _registerDefaultKeybinding(keybinding, commandId, commandArgs, weight1, weight2, when) {\n const remove = this._coreKeybindings.push({\n keybinding: keybinding,\n command: commandId,\n commandArgs: commandArgs,\n when: when,\n weight1: weight1,\n weight2: weight2,\n extensionId: null,\n isBuiltinExtension: false\n });\n this._cachedMergedKeybindings = null;\n return toDisposable(() => {\n remove();\n this._cachedMergedKeybindings = null;\n });\n }\n getDefaultKeybindings() {\n if (!this._cachedMergedKeybindings) {\n this._cachedMergedKeybindings = Array.from(this._coreKeybindings).concat(this._extensionKeybindings);\n this._cachedMergedKeybindings.sort(sorter);\n }\n return this._cachedMergedKeybindings.slice(0);\n }\n}\nexport const KeybindingsRegistry = new KeybindingsRegistryImpl();\n// Define extension point ids\nexport const Extensions = {\n EditorModes: 'platform.keybindingsRegistry'\n};\nRegistry.add(Extensions.EditorModes, KeybindingsRegistry);\nfunction sorter(a, b) {\n if (a.weight1 !== b.weight1) {\n return a.weight1 - b.weight1;\n }\n if (a.command && b.command) {\n if (a.command < b.command) {\n return -1;\n }\n if (a.command > b.command) {\n return 1;\n }\n }\n return a.weight2 - b.weight2;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar MenuItemAction_1;\nimport { SubmenuAction } from '../../../base/common/actions.js';\nimport { ThemeIcon } from '../../../base/common/themables.js';\nimport { MicrotaskEmitter } from '../../../base/common/event.js';\nimport { DisposableStore, toDisposable } from '../../../base/common/lifecycle.js';\nimport { LinkedList } from '../../../base/common/linkedList.js';\nimport { CommandsRegistry, ICommandService } from '../../commands/common/commands.js';\nimport { ContextKeyExpr, IContextKeyService } from '../../contextkey/common/contextkey.js';\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\nimport { KeybindingsRegistry } from '../../keybinding/common/keybindingsRegistry.js';\nexport function isIMenuItem(item) {\n return item.command !== undefined;\n}\nexport function isISubmenuItem(item) {\n return item.submenu !== undefined;\n}\nexport class MenuId {\n /**\n * Create a new `MenuId` with the unique identifier. Will throw if a menu\n * with the identifier already exists, use `MenuId.for(ident)` or a unique\n * identifier\n */\n constructor(identifier) {\n if (MenuId._instances.has(identifier)) {\n throw new TypeError(`MenuId with identifier '${identifier}' already exists. Use MenuId.for(ident) or a unique identifier`);\n }\n MenuId._instances.set(identifier, this);\n this.id = identifier;\n }\n}\nMenuId._instances = new Map();\nMenuId.CommandPalette = new MenuId('CommandPalette');\nMenuId.DebugBreakpointsContext = new MenuId('DebugBreakpointsContext');\nMenuId.DebugCallStackContext = new MenuId('DebugCallStackContext');\nMenuId.DebugConsoleContext = new MenuId('DebugConsoleContext');\nMenuId.DebugVariablesContext = new MenuId('DebugVariablesContext');\nMenuId.DebugHoverContext = new MenuId('DebugHoverContext');\nMenuId.DebugWatchContext = new MenuId('DebugWatchContext');\nMenuId.DebugToolBar = new MenuId('DebugToolBar');\nMenuId.DebugToolBarStop = new MenuId('DebugToolBarStop');\nMenuId.EditorContext = new MenuId('EditorContext');\nMenuId.SimpleEditorContext = new MenuId('SimpleEditorContext');\nMenuId.EditorContent = new MenuId('EditorContent');\nMenuId.EditorLineNumberContext = new MenuId('EditorLineNumberContext');\nMenuId.EditorContextCopy = new MenuId('EditorContextCopy');\nMenuId.EditorContextPeek = new MenuId('EditorContextPeek');\nMenuId.EditorContextShare = new MenuId('EditorContextShare');\nMenuId.EditorTitle = new MenuId('EditorTitle');\nMenuId.EditorTitleRun = new MenuId('EditorTitleRun');\nMenuId.EditorTitleContext = new MenuId('EditorTitleContext');\nMenuId.EditorTitleContextShare = new MenuId('EditorTitleContextShare');\nMenuId.EmptyEditorGroup = new MenuId('EmptyEditorGroup');\nMenuId.EmptyEditorGroupContext = new MenuId('EmptyEditorGroupContext');\nMenuId.EditorTabsBarContext = new MenuId('EditorTabsBarContext');\nMenuId.EditorTabsBarShowTabsSubmenu = new MenuId('EditorTabsBarShowTabsSubmenu');\nMenuId.EditorTabsBarShowTabsZenModeSubmenu = new MenuId('EditorTabsBarShowTabsZenModeSubmenu');\nMenuId.EditorActionsPositionSubmenu = new MenuId('EditorActionsPositionSubmenu');\nMenuId.ExplorerContext = new MenuId('ExplorerContext');\nMenuId.ExplorerContextShare = new MenuId('ExplorerContextShare');\nMenuId.ExtensionContext = new MenuId('ExtensionContext');\nMenuId.GlobalActivity = new MenuId('GlobalActivity');\nMenuId.CommandCenter = new MenuId('CommandCenter');\nMenuId.CommandCenterCenter = new MenuId('CommandCenterCenter');\nMenuId.LayoutControlMenuSubmenu = new MenuId('LayoutControlMenuSubmenu');\nMenuId.LayoutControlMenu = new MenuId('LayoutControlMenu');\nMenuId.MenubarMainMenu = new MenuId('MenubarMainMenu');\nMenuId.MenubarAppearanceMenu = new MenuId('MenubarAppearanceMenu');\nMenuId.MenubarDebugMenu = new MenuId('MenubarDebugMenu');\nMenuId.MenubarEditMenu = new MenuId('MenubarEditMenu');\nMenuId.MenubarCopy = new MenuId('MenubarCopy');\nMenuId.MenubarFileMenu = new MenuId('MenubarFileMenu');\nMenuId.MenubarGoMenu = new MenuId('MenubarGoMenu');\nMenuId.MenubarHelpMenu = new MenuId('MenubarHelpMenu');\nMenuId.MenubarLayoutMenu = new MenuId('MenubarLayoutMenu');\nMenuId.MenubarNewBreakpointMenu = new MenuId('MenubarNewBreakpointMenu');\nMenuId.PanelAlignmentMenu = new MenuId('PanelAlignmentMenu');\nMenuId.PanelPositionMenu = new MenuId('PanelPositionMenu');\nMenuId.ActivityBarPositionMenu = new MenuId('ActivityBarPositionMenu');\nMenuId.MenubarPreferencesMenu = new MenuId('MenubarPreferencesMenu');\nMenuId.MenubarRecentMenu = new MenuId('MenubarRecentMenu');\nMenuId.MenubarSelectionMenu = new MenuId('MenubarSelectionMenu');\nMenuId.MenubarShare = new MenuId('MenubarShare');\nMenuId.MenubarSwitchEditorMenu = new MenuId('MenubarSwitchEditorMenu');\nMenuId.MenubarSwitchGroupMenu = new MenuId('MenubarSwitchGroupMenu');\nMenuId.MenubarTerminalMenu = new MenuId('MenubarTerminalMenu');\nMenuId.MenubarViewMenu = new MenuId('MenubarViewMenu');\nMenuId.MenubarHomeMenu = new MenuId('MenubarHomeMenu');\nMenuId.OpenEditorsContext = new MenuId('OpenEditorsContext');\nMenuId.OpenEditorsContextShare = new MenuId('OpenEditorsContextShare');\nMenuId.ProblemsPanelContext = new MenuId('ProblemsPanelContext');\nMenuId.SCMInputBox = new MenuId('SCMInputBox');\nMenuId.SCMIncomingChanges = new MenuId('SCMIncomingChanges');\nMenuId.SCMOutgoingChanges = new MenuId('SCMOutgoingChanges');\nMenuId.SCMIncomingChangesAllChangesContext = new MenuId('SCMIncomingChangesAllChangesContext');\nMenuId.SCMIncomingChangesHistoryItemContext = new MenuId('SCMIncomingChangesHistoryItemContext');\nMenuId.SCMOutgoingChangesAllChangesContext = new MenuId('SCMOutgoingChangesAllChangesContext');\nMenuId.SCMOutgoingChangesHistoryItemContext = new MenuId('SCMOutgoingChangesHistoryItemContext');\nMenuId.SCMChangeContext = new MenuId('SCMChangeContext');\nMenuId.SCMResourceContext = new MenuId('SCMResourceContext');\nMenuId.SCMResourceContextShare = new MenuId('SCMResourceContextShare');\nMenuId.SCMResourceFolderContext = new MenuId('SCMResourceFolderContext');\nMenuId.SCMResourceGroupContext = new MenuId('SCMResourceGroupContext');\nMenuId.SCMSourceControl = new MenuId('SCMSourceControl');\nMenuId.SCMSourceControlInline = new MenuId('SCMSourceControlInline');\nMenuId.SCMTitle = new MenuId('SCMTitle');\nMenuId.SearchContext = new MenuId('SearchContext');\nMenuId.SearchActionMenu = new MenuId('SearchActionContext');\nMenuId.StatusBarWindowIndicatorMenu = new MenuId('StatusBarWindowIndicatorMenu');\nMenuId.StatusBarRemoteIndicatorMenu = new MenuId('StatusBarRemoteIndicatorMenu');\nMenuId.StickyScrollContext = new MenuId('StickyScrollContext');\nMenuId.TestItem = new MenuId('TestItem');\nMenuId.TestItemGutter = new MenuId('TestItemGutter');\nMenuId.TestMessageContext = new MenuId('TestMessageContext');\nMenuId.TestMessageContent = new MenuId('TestMessageContent');\nMenuId.TestPeekElement = new MenuId('TestPeekElement');\nMenuId.TestPeekTitle = new MenuId('TestPeekTitle');\nMenuId.TouchBarContext = new MenuId('TouchBarContext');\nMenuId.TitleBarContext = new MenuId('TitleBarContext');\nMenuId.TitleBarTitleContext = new MenuId('TitleBarTitleContext');\nMenuId.TunnelContext = new MenuId('TunnelContext');\nMenuId.TunnelPrivacy = new MenuId('TunnelPrivacy');\nMenuId.TunnelProtocol = new MenuId('TunnelProtocol');\nMenuId.TunnelPortInline = new MenuId('TunnelInline');\nMenuId.TunnelTitle = new MenuId('TunnelTitle');\nMenuId.TunnelLocalAddressInline = new MenuId('TunnelLocalAddressInline');\nMenuId.TunnelOriginInline = new MenuId('TunnelOriginInline');\nMenuId.ViewItemContext = new MenuId('ViewItemContext');\nMenuId.ViewContainerTitle = new MenuId('ViewContainerTitle');\nMenuId.ViewContainerTitleContext = new MenuId('ViewContainerTitleContext');\nMenuId.ViewTitle = new MenuId('ViewTitle');\nMenuId.ViewTitleContext = new MenuId('ViewTitleContext');\nMenuId.CommentEditorActions = new MenuId('CommentEditorActions');\nMenuId.CommentThreadTitle = new MenuId('CommentThreadTitle');\nMenuId.CommentThreadActions = new MenuId('CommentThreadActions');\nMenuId.CommentThreadAdditionalActions = new MenuId('CommentThreadAdditionalActions');\nMenuId.CommentThreadTitleContext = new MenuId('CommentThreadTitleContext');\nMenuId.CommentThreadCommentContext = new MenuId('CommentThreadCommentContext');\nMenuId.CommentTitle = new MenuId('CommentTitle');\nMenuId.CommentActions = new MenuId('CommentActions');\nMenuId.InteractiveToolbar = new MenuId('InteractiveToolbar');\nMenuId.InteractiveCellTitle = new MenuId('InteractiveCellTitle');\nMenuId.InteractiveCellDelete = new MenuId('InteractiveCellDelete');\nMenuId.InteractiveCellExecute = new MenuId('InteractiveCellExecute');\nMenuId.InteractiveInputExecute = new MenuId('InteractiveInputExecute');\nMenuId.NotebookToolbar = new MenuId('NotebookToolbar');\nMenuId.NotebookStickyScrollContext = new MenuId('NotebookStickyScrollContext');\nMenuId.NotebookCellTitle = new MenuId('NotebookCellTitle');\nMenuId.NotebookCellDelete = new MenuId('NotebookCellDelete');\nMenuId.NotebookCellInsert = new MenuId('NotebookCellInsert');\nMenuId.NotebookCellBetween = new MenuId('NotebookCellBetween');\nMenuId.NotebookCellListTop = new MenuId('NotebookCellTop');\nMenuId.NotebookCellExecute = new MenuId('NotebookCellExecute');\nMenuId.NotebookCellExecutePrimary = new MenuId('NotebookCellExecutePrimary');\nMenuId.NotebookDiffCellInputTitle = new MenuId('NotebookDiffCellInputTitle');\nMenuId.NotebookDiffCellMetadataTitle = new MenuId('NotebookDiffCellMetadataTitle');\nMenuId.NotebookDiffCellOutputsTitle = new MenuId('NotebookDiffCellOutputsTitle');\nMenuId.NotebookOutputToolbar = new MenuId('NotebookOutputToolbar');\nMenuId.NotebookEditorLayoutConfigure = new MenuId('NotebookEditorLayoutConfigure');\nMenuId.NotebookKernelSource = new MenuId('NotebookKernelSource');\nMenuId.BulkEditTitle = new MenuId('BulkEditTitle');\nMenuId.BulkEditContext = new MenuId('BulkEditContext');\nMenuId.TimelineItemContext = new MenuId('TimelineItemContext');\nMenuId.TimelineTitle = new MenuId('TimelineTitle');\nMenuId.TimelineTitleContext = new MenuId('TimelineTitleContext');\nMenuId.TimelineFilterSubMenu = new MenuId('TimelineFilterSubMenu');\nMenuId.AccountsContext = new MenuId('AccountsContext');\nMenuId.SidebarTitle = new MenuId('SidebarTitle');\nMenuId.PanelTitle = new MenuId('PanelTitle');\nMenuId.AuxiliaryBarTitle = new MenuId('AuxiliaryBarTitle');\nMenuId.TerminalInstanceContext = new MenuId('TerminalInstanceContext');\nMenuId.TerminalEditorInstanceContext = new MenuId('TerminalEditorInstanceContext');\nMenuId.TerminalNewDropdownContext = new MenuId('TerminalNewDropdownContext');\nMenuId.TerminalTabContext = new MenuId('TerminalTabContext');\nMenuId.TerminalTabEmptyAreaContext = new MenuId('TerminalTabEmptyAreaContext');\nMenuId.TerminalStickyScrollContext = new MenuId('TerminalStickyScrollContext');\nMenuId.WebviewContext = new MenuId('WebviewContext');\nMenuId.InlineCompletionsActions = new MenuId('InlineCompletionsActions');\nMenuId.NewFile = new MenuId('NewFile');\nMenuId.MergeInput1Toolbar = new MenuId('MergeToolbar1Toolbar');\nMenuId.MergeInput2Toolbar = new MenuId('MergeToolbar2Toolbar');\nMenuId.MergeBaseToolbar = new MenuId('MergeBaseToolbar');\nMenuId.MergeInputResultToolbar = new MenuId('MergeToolbarResultToolbar');\nMenuId.InlineSuggestionToolbar = new MenuId('InlineSuggestionToolbar');\nMenuId.ChatContext = new MenuId('ChatContext');\nMenuId.ChatCodeBlock = new MenuId('ChatCodeblock');\nMenuId.ChatMessageTitle = new MenuId('ChatMessageTitle');\nMenuId.ChatExecute = new MenuId('ChatExecute');\nMenuId.ChatInputSide = new MenuId('ChatInputSide');\nMenuId.AccessibleView = new MenuId('AccessibleView');\nMenuId.MultiDiffEditorFileToolbar = new MenuId('MultiDiffEditorFileToolbar');\nexport const IMenuService = createDecorator('menuService');\nclass MenuRegistryChangeEvent {\n static for(id) {\n let value = this._all.get(id);\n if (!value) {\n value = new MenuRegistryChangeEvent(id);\n this._all.set(id, value);\n }\n return value;\n }\n static merge(events) {\n const ids = new Set();\n for (const item of events) {\n if (item instanceof MenuRegistryChangeEvent) {\n ids.add(item.id);\n }\n }\n return ids;\n }\n constructor(id) {\n this.id = id;\n this.has = candidate => candidate === id;\n }\n}\nMenuRegistryChangeEvent._all = new Map();\nexport const MenuRegistry = new class {\n constructor() {\n this._commands = new Map();\n this._menuItems = new Map();\n this._onDidChangeMenu = new MicrotaskEmitter({\n merge: MenuRegistryChangeEvent.merge\n });\n this.onDidChangeMenu = this._onDidChangeMenu.event;\n }\n addCommand(command) {\n this._commands.set(command.id, command);\n this._onDidChangeMenu.fire(MenuRegistryChangeEvent.for(MenuId.CommandPalette));\n return toDisposable(() => {\n if (this._commands.delete(command.id)) {\n this._onDidChangeMenu.fire(MenuRegistryChangeEvent.for(MenuId.CommandPalette));\n }\n });\n }\n getCommand(id) {\n return this._commands.get(id);\n }\n getCommands() {\n const map = new Map();\n this._commands.forEach((value, key) => map.set(key, value));\n return map;\n }\n appendMenuItem(id, item) {\n let list = this._menuItems.get(id);\n if (!list) {\n list = new LinkedList();\n this._menuItems.set(id, list);\n }\n const rm = list.push(item);\n this._onDidChangeMenu.fire(MenuRegistryChangeEvent.for(id));\n return toDisposable(() => {\n rm();\n this._onDidChangeMenu.fire(MenuRegistryChangeEvent.for(id));\n });\n }\n appendMenuItems(items) {\n const result = new DisposableStore();\n for (const { id, item } of items) {\n result.add(this.appendMenuItem(id, item));\n }\n return result;\n }\n getMenuItems(id) {\n let result;\n if (this._menuItems.has(id)) {\n result = [...this._menuItems.get(id)];\n }\n else {\n result = [];\n }\n if (id === MenuId.CommandPalette) {\n // CommandPalette is special because it shows\n // all commands by default\n this._appendImplicitItems(result);\n }\n return result;\n }\n _appendImplicitItems(result) {\n const set = new Set();\n for (const item of result) {\n if (isIMenuItem(item)) {\n set.add(item.command.id);\n if (item.alt) {\n set.add(item.alt.id);\n }\n }\n }\n this._commands.forEach((command, id) => {\n if (!set.has(id)) {\n result.push({ command });\n }\n });\n }\n};\nexport class SubmenuItemAction extends SubmenuAction {\n constructor(item, hideActions, actions) {\n super(`submenuitem.${item.submenu.id}`, typeof item.title === 'string' ? item.title : item.title.value, actions, 'submenu');\n this.item = item;\n this.hideActions = hideActions;\n }\n}\n// implements IAction, does NOT extend Action, so that no one\n// subscribes to events of Action or modified properties\nlet MenuItemAction = MenuItemAction_1 = class MenuItemAction {\n static label(action, options) {\n return (options === null || options === void 0 ? void 0 : options.renderShortTitle) && action.shortTitle\n ? (typeof action.shortTitle === 'string' ? action.shortTitle : action.shortTitle.value)\n : (typeof action.title === 'string' ? action.title : action.title.value);\n }\n constructor(item, alt, options, hideActions, contextKeyService, _commandService) {\n var _a, _b;\n this.hideActions = hideActions;\n this._commandService = _commandService;\n this.id = item.id;\n this.label = MenuItemAction_1.label(item, options);\n this.tooltip = (_b = (typeof item.tooltip === 'string' ? item.tooltip : (_a = item.tooltip) === null || _a === void 0 ? void 0 : _a.value)) !== null && _b !== void 0 ? _b : '';\n this.enabled = !item.precondition || contextKeyService.contextMatchesRules(item.precondition);\n this.checked = undefined;\n let icon;\n if (item.toggled) {\n const toggled = (item.toggled.condition ? item.toggled : { condition: item.toggled });\n this.checked = contextKeyService.contextMatchesRules(toggled.condition);\n if (this.checked && toggled.tooltip) {\n this.tooltip = typeof toggled.tooltip === 'string' ? toggled.tooltip : toggled.tooltip.value;\n }\n if (this.checked && ThemeIcon.isThemeIcon(toggled.icon)) {\n icon = toggled.icon;\n }\n if (this.checked && toggled.title) {\n this.label = typeof toggled.title === 'string' ? toggled.title : toggled.title.value;\n }\n }\n if (!icon) {\n icon = ThemeIcon.isThemeIcon(item.icon) ? item.icon : undefined;\n }\n this.item = item;\n this.alt = alt ? new MenuItemAction_1(alt, undefined, options, hideActions, contextKeyService, _commandService) : undefined;\n this._options = options;\n this.class = icon && ThemeIcon.asClassName(icon);\n }\n run(...args) {\n var _a, _b;\n let runArgs = [];\n if ((_a = this._options) === null || _a === void 0 ? void 0 : _a.arg) {\n runArgs = [...runArgs, this._options.arg];\n }\n if ((_b = this._options) === null || _b === void 0 ? void 0 : _b.shouldForwardArgs) {\n runArgs = [...runArgs, ...args];\n }\n return this._commandService.executeCommand(this.id, ...runArgs);\n }\n};\nMenuItemAction = MenuItemAction_1 = __decorate([\n __param(4, IContextKeyService),\n __param(5, ICommandService)\n], MenuItemAction);\nexport { MenuItemAction };\nexport class Action2 {\n constructor(desc) {\n this.desc = desc;\n }\n}\nexport function registerAction2(ctor) {\n const disposables = new DisposableStore();\n const action = new ctor();\n const { f1, menu, keybinding, ...command } = action.desc;\n if (CommandsRegistry.getCommand(command.id)) {\n throw new Error(`Cannot register two commands with the same id: ${command.id}`);\n }\n // command\n disposables.add(CommandsRegistry.registerCommand({\n id: command.id,\n handler: (accessor, ...args) => action.run(accessor, ...args),\n metadata: command.metadata,\n }));\n // menu\n if (Array.isArray(menu)) {\n for (const item of menu) {\n disposables.add(MenuRegistry.appendMenuItem(item.id, { command: { ...command, precondition: item.precondition === null ? undefined : command.precondition }, ...item }));\n }\n }\n else if (menu) {\n disposables.add(MenuRegistry.appendMenuItem(menu.id, { command: { ...command, precondition: menu.precondition === null ? undefined : command.precondition }, ...menu }));\n }\n if (f1) {\n disposables.add(MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command, when: command.precondition }));\n disposables.add(MenuRegistry.addCommand(command));\n }\n // keybinding\n if (Array.isArray(keybinding)) {\n for (const item of keybinding) {\n disposables.add(KeybindingsRegistry.registerKeybindingRule({\n ...item,\n id: command.id,\n when: command.precondition ? ContextKeyExpr.and(command.precondition, item.when) : item.when\n }));\n }\n }\n else if (keybinding) {\n disposables.add(KeybindingsRegistry.registerKeybindingRule({\n ...keybinding,\n id: command.id,\n when: command.precondition ? ContextKeyExpr.and(command.precondition, keybinding.when) : keybinding.when\n }));\n }\n return disposables;\n}\n//#endregion\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\nexport const ITelemetryService = createDecorator('telemetryService');\n", "import { Emitter } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { RawContextKey } from '../../contextkey/common/contextkey.js';\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\nexport const ILogService = createDecorator('logService');\nexport var LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"Off\"] = 0] = \"Off\";\n LogLevel[LogLevel[\"Trace\"] = 1] = \"Trace\";\n LogLevel[LogLevel[\"Debug\"] = 2] = \"Debug\";\n LogLevel[LogLevel[\"Info\"] = 3] = \"Info\";\n LogLevel[LogLevel[\"Warning\"] = 4] = \"Warning\";\n LogLevel[LogLevel[\"Error\"] = 5] = \"Error\";\n})(LogLevel || (LogLevel = {}));\nexport const DEFAULT_LOG_LEVEL = LogLevel.Info;\nexport class AbstractLogger extends Disposable {\n constructor() {\n super(...arguments);\n this.level = DEFAULT_LOG_LEVEL;\n this._onDidChangeLogLevel = this._register(new Emitter());\n this.onDidChangeLogLevel = this._onDidChangeLogLevel.event;\n }\n setLevel(level) {\n if (this.level !== level) {\n this.level = level;\n this._onDidChangeLogLevel.fire(this.level);\n }\n }\n getLevel() {\n return this.level;\n }\n checkLogLevel(level) {\n return this.level !== LogLevel.Off && this.level <= level;\n }\n}\nexport class ConsoleLogger extends AbstractLogger {\n constructor(logLevel = DEFAULT_LOG_LEVEL, useColors = true) {\n super();\n this.useColors = useColors;\n this.setLevel(logLevel);\n }\n trace(message, ...args) {\n if (this.checkLogLevel(LogLevel.Trace)) {\n if (this.useColors) {\n console.log('%cTRACE', 'color: #888', message, ...args);\n }\n else {\n console.log(message, ...args);\n }\n }\n }\n debug(message, ...args) {\n if (this.checkLogLevel(LogLevel.Debug)) {\n if (this.useColors) {\n console.log('%cDEBUG', 'background: #eee; color: #888', message, ...args);\n }\n else {\n console.log(message, ...args);\n }\n }\n }\n info(message, ...args) {\n if (this.checkLogLevel(LogLevel.Info)) {\n if (this.useColors) {\n console.log('%c INFO', 'color: #33f', message, ...args);\n }\n else {\n console.log(message, ...args);\n }\n }\n }\n warn(message, ...args) {\n if (this.checkLogLevel(LogLevel.Warning)) {\n if (this.useColors) {\n console.log('%c WARN', 'color: #993', message, ...args);\n }\n else {\n console.log(message, ...args);\n }\n }\n }\n error(message, ...args) {\n if (this.checkLogLevel(LogLevel.Error)) {\n if (this.useColors) {\n console.log('%c ERR', 'color: #f33', message, ...args);\n }\n else {\n console.error(message, ...args);\n }\n }\n }\n}\nexport class MultiplexLogger extends AbstractLogger {\n constructor(loggers) {\n super();\n this.loggers = loggers;\n if (loggers.length) {\n this.setLevel(loggers[0].getLevel());\n }\n }\n setLevel(level) {\n for (const logger of this.loggers) {\n logger.setLevel(level);\n }\n super.setLevel(level);\n }\n trace(message, ...args) {\n for (const logger of this.loggers) {\n logger.trace(message, ...args);\n }\n }\n debug(message, ...args) {\n for (const logger of this.loggers) {\n logger.debug(message, ...args);\n }\n }\n info(message, ...args) {\n for (const logger of this.loggers) {\n logger.info(message, ...args);\n }\n }\n warn(message, ...args) {\n for (const logger of this.loggers) {\n logger.warn(message, ...args);\n }\n }\n error(message, ...args) {\n for (const logger of this.loggers) {\n logger.error(message, ...args);\n }\n }\n dispose() {\n for (const logger of this.loggers) {\n logger.dispose();\n }\n super.dispose();\n }\n}\nexport function LogLevelToString(logLevel) {\n switch (logLevel) {\n case LogLevel.Trace: return 'trace';\n case LogLevel.Debug: return 'debug';\n case LogLevel.Info: return 'info';\n case LogLevel.Warning: return 'warn';\n case LogLevel.Error: return 'error';\n case LogLevel.Off: return 'off';\n }\n}\n// Contexts\nexport const CONTEXT_LOG_LEVEL = new RawContextKey('logLevel', LogLevelToString(LogLevel.Info));\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as browser from './browser.js';\nimport { mainWindow } from './window.js';\nimport * as platform from '../common/platform.js';\n/**\n * Browser feature we can support in current platform, browser and environment.\n */\nexport const BrowserFeatures = {\n clipboard: {\n writeText: (platform.isNative\n || (document.queryCommandSupported && document.queryCommandSupported('copy'))\n || !!(navigator && navigator.clipboard && navigator.clipboard.writeText)),\n readText: (platform.isNative\n || !!(navigator && navigator.clipboard && navigator.clipboard.readText))\n },\n keyboard: (() => {\n if (platform.isNative || browser.isStandalone()) {\n return 0 /* KeyboardSupport.Always */;\n }\n if (navigator.keyboard || browser.isSafari) {\n return 1 /* KeyboardSupport.FullScreen */;\n }\n return 2 /* KeyboardSupport.None */;\n })(),\n // 'ontouchstart' in window always evaluates to true with typescript's modern typings. This causes `window` to be\n // `never` later in `window.navigator`. That's why we need the explicit `window as Window` cast\n touch: 'ontouchstart' in mainWindow || navigator.maxTouchPoints > 0,\n pointerEvents: mainWindow.PointerEvent && ('ontouchstart' in mainWindow || navigator.maxTouchPoints > 0)\n};\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as browser from './browser.js';\nimport { EVENT_KEY_CODE_MAP, KeyCodeUtils } from '../common/keyCodes.js';\nimport { KeyCodeChord } from '../common/keybindings.js';\nimport * as platform from '../common/platform.js';\nfunction extractKeyCode(e) {\n if (e.charCode) {\n // \"keypress\" events mostly\n const char = String.fromCharCode(e.charCode).toUpperCase();\n return KeyCodeUtils.fromString(char);\n }\n const keyCode = e.keyCode;\n // browser quirks\n if (keyCode === 3) {\n return 7 /* KeyCode.PauseBreak */;\n }\n else if (browser.isFirefox) {\n switch (keyCode) {\n case 59: return 85 /* KeyCode.Semicolon */;\n case 60:\n if (platform.isLinux) {\n return 97 /* KeyCode.IntlBackslash */;\n }\n break;\n case 61: return 86 /* KeyCode.Equal */;\n // based on: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode#numpad_keys\n case 107: return 109 /* KeyCode.NumpadAdd */;\n case 109: return 111 /* KeyCode.NumpadSubtract */;\n case 173: return 88 /* KeyCode.Minus */;\n case 224:\n if (platform.isMacintosh) {\n return 57 /* KeyCode.Meta */;\n }\n break;\n }\n }\n else if (browser.isWebKit) {\n if (platform.isMacintosh && keyCode === 93) {\n // the two meta keys in the Mac have different key codes (91 and 93)\n return 57 /* KeyCode.Meta */;\n }\n else if (!platform.isMacintosh && keyCode === 92) {\n return 57 /* KeyCode.Meta */;\n }\n }\n // cross browser keycodes:\n return EVENT_KEY_CODE_MAP[keyCode] || 0 /* KeyCode.Unknown */;\n}\nconst ctrlKeyMod = (platform.isMacintosh ? 256 /* KeyMod.WinCtrl */ : 2048 /* KeyMod.CtrlCmd */);\nconst altKeyMod = 512 /* KeyMod.Alt */;\nconst shiftKeyMod = 1024 /* KeyMod.Shift */;\nconst metaKeyMod = (platform.isMacintosh ? 2048 /* KeyMod.CtrlCmd */ : 256 /* KeyMod.WinCtrl */);\nexport class StandardKeyboardEvent {\n constructor(source) {\n this._standardKeyboardEventBrand = true;\n const e = source;\n this.browserEvent = e;\n this.target = e.target;\n this.ctrlKey = e.ctrlKey;\n this.shiftKey = e.shiftKey;\n this.altKey = e.altKey;\n this.metaKey = e.metaKey;\n this.altGraphKey = e.getModifierState('AltGraph');\n this.keyCode = extractKeyCode(e);\n this.code = e.code;\n // console.info(e.type + \": keyCode: \" + e.keyCode + \", which: \" + e.which + \", charCode: \" + e.charCode + \", detail: \" + e.detail + \" ====> \" + this.keyCode + ' -- ' + KeyCode[this.keyCode]);\n this.ctrlKey = this.ctrlKey || this.keyCode === 5 /* KeyCode.Ctrl */;\n this.altKey = this.altKey || this.keyCode === 6 /* KeyCode.Alt */;\n this.shiftKey = this.shiftKey || this.keyCode === 4 /* KeyCode.Shift */;\n this.metaKey = this.metaKey || this.keyCode === 57 /* KeyCode.Meta */;\n this._asKeybinding = this._computeKeybinding();\n this._asKeyCodeChord = this._computeKeyCodeChord();\n // console.log(`code: ${e.code}, keyCode: ${e.keyCode}, key: ${e.key}`);\n }\n preventDefault() {\n if (this.browserEvent && this.browserEvent.preventDefault) {\n this.browserEvent.preventDefault();\n }\n }\n stopPropagation() {\n if (this.browserEvent && this.browserEvent.stopPropagation) {\n this.browserEvent.stopPropagation();\n }\n }\n toKeyCodeChord() {\n return this._asKeyCodeChord;\n }\n equals(other) {\n return this._asKeybinding === other;\n }\n _computeKeybinding() {\n let key = 0 /* KeyCode.Unknown */;\n if (this.keyCode !== 5 /* KeyCode.Ctrl */ && this.keyCode !== 4 /* KeyCode.Shift */ && this.keyCode !== 6 /* KeyCode.Alt */ && this.keyCode !== 57 /* KeyCode.Meta */) {\n key = this.keyCode;\n }\n let result = 0;\n if (this.ctrlKey) {\n result |= ctrlKeyMod;\n }\n if (this.altKey) {\n result |= altKeyMod;\n }\n if (this.shiftKey) {\n result |= shiftKeyMod;\n }\n if (this.metaKey) {\n result |= metaKeyMod;\n }\n result |= key;\n return result;\n }\n _computeKeyCodeChord() {\n let key = 0 /* KeyCode.Unknown */;\n if (this.keyCode !== 5 /* KeyCode.Ctrl */ && this.keyCode !== 4 /* KeyCode.Shift */ && this.keyCode !== 6 /* KeyCode.Alt */ && this.keyCode !== 57 /* KeyCode.Meta */) {\n key = this.keyCode;\n }\n return new KeyCodeChord(this.ctrlKey, this.shiftKey, this.altKey, this.metaKey, key);\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nconst sameOriginWindowChainCache = new WeakMap();\nfunction getParentWindowIfSameOrigin(w) {\n if (!w.parent || w.parent === w) {\n return null;\n }\n // Cannot really tell if we have access to the parent window unless we try to access something in it\n try {\n const location = w.location;\n const parentLocation = w.parent.location;\n if (location.origin !== 'null' && parentLocation.origin !== 'null' && location.origin !== parentLocation.origin) {\n return null;\n }\n }\n catch (e) {\n return null;\n }\n return w.parent;\n}\nexport class IframeUtils {\n /**\n * Returns a chain of embedded windows with the same origin (which can be accessed programmatically).\n * Having a chain of length 1 might mean that the current execution environment is running outside of an iframe or inside an iframe embedded in a window with a different origin.\n */\n static getSameOriginWindowChain(targetWindow) {\n let windowChainCache = sameOriginWindowChainCache.get(targetWindow);\n if (!windowChainCache) {\n windowChainCache = [];\n sameOriginWindowChainCache.set(targetWindow, windowChainCache);\n let w = targetWindow;\n let parent;\n do {\n parent = getParentWindowIfSameOrigin(w);\n if (parent) {\n windowChainCache.push({\n window: new WeakRef(w),\n iframeElement: w.frameElement || null\n });\n }\n else {\n windowChainCache.push({\n window: new WeakRef(w),\n iframeElement: null\n });\n }\n w = parent;\n } while (w);\n }\n return windowChainCache.slice(0);\n }\n /**\n * Returns the position of `childWindow` relative to `ancestorWindow`\n */\n static getPositionOfChildWindowRelativeToAncestorWindow(childWindow, ancestorWindow) {\n var _a, _b;\n if (!ancestorWindow || childWindow === ancestorWindow) {\n return {\n top: 0,\n left: 0\n };\n }\n let top = 0, left = 0;\n const windowChain = this.getSameOriginWindowChain(childWindow);\n for (const windowChainEl of windowChain) {\n const windowInChain = windowChainEl.window.deref();\n top += (_a = windowInChain === null || windowInChain === void 0 ? void 0 : windowInChain.scrollY) !== null && _a !== void 0 ? _a : 0;\n left += (_b = windowInChain === null || windowInChain === void 0 ? void 0 : windowInChain.scrollX) !== null && _b !== void 0 ? _b : 0;\n if (windowInChain === ancestorWindow) {\n break;\n }\n if (!windowChainEl.iframeElement) {\n break;\n }\n const boundingRect = windowChainEl.iframeElement.getBoundingClientRect();\n top += boundingRect.top;\n left += boundingRect.left;\n }\n return {\n top: top,\n left: left\n };\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as browser from './browser.js';\nimport { IframeUtils } from './iframe.js';\nimport * as platform from '../common/platform.js';\nexport class StandardMouseEvent {\n constructor(targetWindow, e) {\n this.timestamp = Date.now();\n this.browserEvent = e;\n this.leftButton = e.button === 0;\n this.middleButton = e.button === 1;\n this.rightButton = e.button === 2;\n this.buttons = e.buttons;\n this.target = e.target;\n this.detail = e.detail || 1;\n if (e.type === 'dblclick') {\n this.detail = 2;\n }\n this.ctrlKey = e.ctrlKey;\n this.shiftKey = e.shiftKey;\n this.altKey = e.altKey;\n this.metaKey = e.metaKey;\n if (typeof e.pageX === 'number') {\n this.posx = e.pageX;\n this.posy = e.pageY;\n }\n else {\n // Probably hit by MSGestureEvent\n this.posx = e.clientX + this.target.ownerDocument.body.scrollLeft + this.target.ownerDocument.documentElement.scrollLeft;\n this.posy = e.clientY + this.target.ownerDocument.body.scrollTop + this.target.ownerDocument.documentElement.scrollTop;\n }\n // Find the position of the iframe this code is executing in relative to the iframe where the event was captured.\n const iframeOffsets = IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(targetWindow, e.view);\n this.posx -= iframeOffsets.left;\n this.posy -= iframeOffsets.top;\n }\n preventDefault() {\n this.browserEvent.preventDefault();\n }\n stopPropagation() {\n this.browserEvent.stopPropagation();\n }\n}\nexport class StandardWheelEvent {\n constructor(e, deltaX = 0, deltaY = 0) {\n var _a;\n this.browserEvent = e || null;\n this.target = e ? (e.target || e.targetNode || e.srcElement) : null;\n this.deltaY = deltaY;\n this.deltaX = deltaX;\n if (e) {\n // Old (deprecated) wheel events\n const e1 = e;\n const e2 = e;\n const devicePixelRatio = ((_a = e.view) === null || _a === void 0 ? void 0 : _a.devicePixelRatio) || 1;\n // vertical delta scroll\n if (typeof e1.wheelDeltaY !== 'undefined') {\n if (browser.isChrome) {\n // Refs https://github.com/microsoft/vscode/issues/146403#issuecomment-1854538928\n this.deltaY = e1.wheelDeltaY / (120 * devicePixelRatio);\n }\n else {\n this.deltaY = e1.wheelDeltaY / 120;\n }\n }\n else if (typeof e2.VERTICAL_AXIS !== 'undefined' && e2.axis === e2.VERTICAL_AXIS) {\n this.deltaY = -e2.detail / 3;\n }\n else if (e.type === 'wheel') {\n // Modern wheel event\n // https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent\n const ev = e;\n if (ev.deltaMode === ev.DOM_DELTA_LINE) {\n // the deltas are expressed in lines\n if (browser.isFirefox && !platform.isMacintosh) {\n this.deltaY = -e.deltaY / 3;\n }\n else {\n this.deltaY = -e.deltaY;\n }\n }\n else {\n this.deltaY = -e.deltaY / 40;\n }\n }\n // horizontal delta scroll\n if (typeof e1.wheelDeltaX !== 'undefined') {\n if (browser.isSafari && platform.isWindows) {\n this.deltaX = -(e1.wheelDeltaX / 120);\n }\n else if (browser.isChrome) {\n // Refs https://github.com/microsoft/vscode/issues/146403#issuecomment-1854538928\n this.deltaX = e1.wheelDeltaX / (120 * devicePixelRatio);\n }\n else {\n this.deltaX = e1.wheelDeltaX / 120;\n }\n }\n else if (typeof e2.HORIZONTAL_AXIS !== 'undefined' && e2.axis === e2.HORIZONTAL_AXIS) {\n this.deltaX = -e.detail / 3;\n }\n else if (e.type === 'wheel') {\n // Modern wheel event\n // https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent\n const ev = e;\n if (ev.deltaMode === ev.DOM_DELTA_LINE) {\n // the deltas are expressed in lines\n if (browser.isFirefox && !platform.isMacintosh) {\n this.deltaX = -e.deltaX / 3;\n }\n else {\n this.deltaX = -e.deltaX;\n }\n }\n else {\n this.deltaX = -e.deltaX / 40;\n }\n }\n // Assume a vertical scroll if nothing else worked\n if (this.deltaY === 0 && this.deltaX === 0 && e.wheelDelta) {\n if (browser.isChrome) {\n // Refs https://github.com/microsoft/vscode/issues/146403#issuecomment-1854538928\n this.deltaY = e.wheelDelta / (120 * devicePixelRatio);\n }\n else {\n this.deltaY = e.wheelDelta / 120;\n }\n }\n }\n }\n preventDefault() {\n var _a;\n (_a = this.browserEvent) === null || _a === void 0 ? void 0 : _a.preventDefault();\n }\n stopPropagation() {\n var _a;\n (_a = this.browserEvent) === null || _a === void 0 ? void 0 : _a.stopPropagation();\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/**\n * Can be passed into the Delayed to defer using a microtask\n * */\nexport const MicrotaskDelay = Symbol('MicrotaskDelay');\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { CancellationTokenSource } from './cancellation.js';\nimport { CancellationError } from './errors.js';\nimport { Emitter, Event } from './event.js';\nimport { toDisposable } from './lifecycle.js';\nimport { setTimeout0 } from './platform.js';\nimport { MicrotaskDelay } from './symbols.js';\nexport function isThenable(obj) {\n return !!obj && typeof obj.then === 'function';\n}\nexport function createCancelablePromise(callback) {\n const source = new CancellationTokenSource();\n const thenable = callback(source.token);\n const promise = new Promise((resolve, reject) => {\n const subscription = source.token.onCancellationRequested(() => {\n subscription.dispose();\n reject(new CancellationError());\n });\n Promise.resolve(thenable).then(value => {\n subscription.dispose();\n source.dispose();\n resolve(value);\n }, err => {\n subscription.dispose();\n source.dispose();\n reject(err);\n });\n });\n return new class {\n cancel() {\n source.cancel();\n source.dispose();\n }\n then(resolve, reject) {\n return promise.then(resolve, reject);\n }\n catch(reject) {\n return this.then(undefined, reject);\n }\n finally(onfinally) {\n return promise.finally(onfinally);\n }\n };\n}\nexport function raceCancellation(promise, token, defaultValue) {\n return new Promise((resolve, reject) => {\n const ref = token.onCancellationRequested(() => {\n ref.dispose();\n resolve(defaultValue);\n });\n promise.then(resolve, reject).finally(() => ref.dispose());\n });\n}\n/**\n * A helper to prevent accumulation of sequential async tasks.\n *\n * Imagine a mail man with the sole task of delivering letters. As soon as\n * a letter submitted for delivery, he drives to the destination, delivers it\n * and returns to his base. Imagine that during the trip, N more letters were submitted.\n * When the mail man returns, he picks those N letters and delivers them all in a\n * single trip. Even though N+1 submissions occurred, only 2 deliveries were made.\n *\n * The throttler implements this via the queue() method, by providing it a task\n * factory. Following the example:\n *\n * \t\tconst throttler = new Throttler();\n * \t\tconst letters = [];\n *\n * \t\tfunction deliver() {\n * \t\t\tconst lettersToDeliver = letters;\n * \t\t\tletters = [];\n * \t\t\treturn makeTheTrip(lettersToDeliver);\n * \t\t}\n *\n * \t\tfunction onLetterReceived(l) {\n * \t\t\tletters.push(l);\n * \t\t\tthrottler.queue(deliver);\n * \t\t}\n */\nexport class Throttler {\n constructor() {\n this.isDisposed = false;\n this.activePromise = null;\n this.queuedPromise = null;\n this.queuedPromiseFactory = null;\n }\n queue(promiseFactory) {\n if (this.isDisposed) {\n return Promise.reject(new Error('Throttler is disposed'));\n }\n if (this.activePromise) {\n this.queuedPromiseFactory = promiseFactory;\n if (!this.queuedPromise) {\n const onComplete = () => {\n this.queuedPromise = null;\n if (this.isDisposed) {\n return;\n }\n const result = this.queue(this.queuedPromiseFactory);\n this.queuedPromiseFactory = null;\n return result;\n };\n this.queuedPromise = new Promise(resolve => {\n this.activePromise.then(onComplete, onComplete).then(resolve);\n });\n }\n return new Promise((resolve, reject) => {\n this.queuedPromise.then(resolve, reject);\n });\n }\n this.activePromise = promiseFactory();\n return new Promise((resolve, reject) => {\n this.activePromise.then((result) => {\n this.activePromise = null;\n resolve(result);\n }, (err) => {\n this.activePromise = null;\n reject(err);\n });\n });\n }\n dispose() {\n this.isDisposed = true;\n }\n}\nconst timeoutDeferred = (timeout, fn) => {\n let scheduled = true;\n const handle = setTimeout(() => {\n scheduled = false;\n fn();\n }, timeout);\n return {\n isTriggered: () => scheduled,\n dispose: () => {\n clearTimeout(handle);\n scheduled = false;\n },\n };\n};\nconst microtaskDeferred = (fn) => {\n let scheduled = true;\n queueMicrotask(() => {\n if (scheduled) {\n scheduled = false;\n fn();\n }\n });\n return {\n isTriggered: () => scheduled,\n dispose: () => { scheduled = false; },\n };\n};\n/**\n * A helper to delay (debounce) execution of a task that is being requested often.\n *\n * Following the throttler, now imagine the mail man wants to optimize the number of\n * trips proactively. The trip itself can be long, so he decides not to make the trip\n * as soon as a letter is submitted. Instead he waits a while, in case more\n * letters are submitted. After said waiting period, if no letters were submitted, he\n * decides to make the trip. Imagine that N more letters were submitted after the first\n * one, all within a short period of time between each other. Even though N+1\n * submissions occurred, only 1 delivery was made.\n *\n * The delayer offers this behavior via the trigger() method, into which both the task\n * to be executed and the waiting period (delay) must be passed in as arguments. Following\n * the example:\n *\n * \t\tconst delayer = new Delayer(WAITING_PERIOD);\n * \t\tconst letters = [];\n *\n * \t\tfunction letterReceived(l) {\n * \t\t\tletters.push(l);\n * \t\t\tdelayer.trigger(() => { return makeTheTrip(); });\n * \t\t}\n */\nexport class Delayer {\n constructor(defaultDelay) {\n this.defaultDelay = defaultDelay;\n this.deferred = null;\n this.completionPromise = null;\n this.doResolve = null;\n this.doReject = null;\n this.task = null;\n }\n trigger(task, delay = this.defaultDelay) {\n this.task = task;\n this.cancelTimeout();\n if (!this.completionPromise) {\n this.completionPromise = new Promise((resolve, reject) => {\n this.doResolve = resolve;\n this.doReject = reject;\n }).then(() => {\n this.completionPromise = null;\n this.doResolve = null;\n if (this.task) {\n const task = this.task;\n this.task = null;\n return task();\n }\n return undefined;\n });\n }\n const fn = () => {\n var _a;\n this.deferred = null;\n (_a = this.doResolve) === null || _a === void 0 ? void 0 : _a.call(this, null);\n };\n this.deferred = delay === MicrotaskDelay ? microtaskDeferred(fn) : timeoutDeferred(delay, fn);\n return this.completionPromise;\n }\n isTriggered() {\n var _a;\n return !!((_a = this.deferred) === null || _a === void 0 ? void 0 : _a.isTriggered());\n }\n cancel() {\n var _a;\n this.cancelTimeout();\n if (this.completionPromise) {\n (_a = this.doReject) === null || _a === void 0 ? void 0 : _a.call(this, new CancellationError());\n this.completionPromise = null;\n }\n }\n cancelTimeout() {\n var _a;\n (_a = this.deferred) === null || _a === void 0 ? void 0 : _a.dispose();\n this.deferred = null;\n }\n dispose() {\n this.cancel();\n }\n}\n/**\n * A helper to delay execution of a task that is being requested often, while\n * preventing accumulation of consecutive executions, while the task runs.\n *\n * The mail man is clever and waits for a certain amount of time, before going\n * out to deliver letters. While the mail man is going out, more letters arrive\n * and can only be delivered once he is back. Once he is back the mail man will\n * do one more trip to deliver the letters that have accumulated while he was out.\n */\nexport class ThrottledDelayer {\n constructor(defaultDelay) {\n this.delayer = new Delayer(defaultDelay);\n this.throttler = new Throttler();\n }\n trigger(promiseFactory, delay) {\n return this.delayer.trigger(() => this.throttler.queue(promiseFactory), delay);\n }\n cancel() {\n this.delayer.cancel();\n }\n dispose() {\n this.delayer.dispose();\n this.throttler.dispose();\n }\n}\nexport function timeout(millis, token) {\n if (!token) {\n return createCancelablePromise(token => timeout(millis, token));\n }\n return new Promise((resolve, reject) => {\n const handle = setTimeout(() => {\n disposable.dispose();\n resolve();\n }, millis);\n const disposable = token.onCancellationRequested(() => {\n clearTimeout(handle);\n disposable.dispose();\n reject(new CancellationError());\n });\n });\n}\n/**\n * Creates a timeout that can be disposed using its returned value.\n * @param handler The timeout handler.\n * @param timeout An optional timeout in milliseconds.\n * @param store An optional {@link DisposableStore} that will have the timeout disposable managed automatically.\n *\n * @example\n * const store = new DisposableStore;\n * // Call the timeout after 1000ms at which point it will be automatically\n * // evicted from the store.\n * const timeoutDisposable = disposableTimeout(() => {}, 1000, store);\n *\n * if (foo) {\n * // Cancel the timeout and evict it from store.\n * timeoutDisposable.dispose();\n * }\n */\nexport function disposableTimeout(handler, timeout = 0, store) {\n const timer = setTimeout(() => {\n handler();\n if (store) {\n disposable.dispose();\n }\n }, timeout);\n const disposable = toDisposable(() => {\n clearTimeout(timer);\n store === null || store === void 0 ? void 0 : store.deleteAndLeak(disposable);\n });\n store === null || store === void 0 ? void 0 : store.add(disposable);\n return disposable;\n}\nexport function first(promiseFactories, shouldStop = t => !!t, defaultValue = null) {\n let index = 0;\n const len = promiseFactories.length;\n const loop = () => {\n if (index >= len) {\n return Promise.resolve(defaultValue);\n }\n const factory = promiseFactories[index++];\n const promise = Promise.resolve(factory());\n return promise.then(result => {\n if (shouldStop(result)) {\n return Promise.resolve(result);\n }\n return loop();\n });\n };\n return loop();\n}\nexport class TimeoutTimer {\n constructor(runner, timeout) {\n this._token = -1;\n if (typeof runner === 'function' && typeof timeout === 'number') {\n this.setIfNotSet(runner, timeout);\n }\n }\n dispose() {\n this.cancel();\n }\n cancel() {\n if (this._token !== -1) {\n clearTimeout(this._token);\n this._token = -1;\n }\n }\n cancelAndSet(runner, timeout) {\n this.cancel();\n this._token = setTimeout(() => {\n this._token = -1;\n runner();\n }, timeout);\n }\n setIfNotSet(runner, timeout) {\n if (this._token !== -1) {\n // timer is already set\n return;\n }\n this._token = setTimeout(() => {\n this._token = -1;\n runner();\n }, timeout);\n }\n}\nexport class IntervalTimer {\n constructor() {\n this.disposable = undefined;\n }\n cancel() {\n var _a;\n (_a = this.disposable) === null || _a === void 0 ? void 0 : _a.dispose();\n this.disposable = undefined;\n }\n cancelAndSet(runner, interval, context = globalThis) {\n this.cancel();\n const handle = context.setInterval(() => {\n runner();\n }, interval);\n this.disposable = toDisposable(() => {\n context.clearInterval(handle);\n this.disposable = undefined;\n });\n }\n dispose() {\n this.cancel();\n }\n}\nexport class RunOnceScheduler {\n constructor(runner, delay) {\n this.timeoutToken = -1;\n this.runner = runner;\n this.timeout = delay;\n this.timeoutHandler = this.onTimeout.bind(this);\n }\n /**\n * Dispose RunOnceScheduler\n */\n dispose() {\n this.cancel();\n this.runner = null;\n }\n /**\n * Cancel current scheduled runner (if any).\n */\n cancel() {\n if (this.isScheduled()) {\n clearTimeout(this.timeoutToken);\n this.timeoutToken = -1;\n }\n }\n /**\n * Cancel previous runner (if any) & schedule a new runner.\n */\n schedule(delay = this.timeout) {\n this.cancel();\n this.timeoutToken = setTimeout(this.timeoutHandler, delay);\n }\n get delay() {\n return this.timeout;\n }\n set delay(value) {\n this.timeout = value;\n }\n /**\n * Returns true if scheduled.\n */\n isScheduled() {\n return this.timeoutToken !== -1;\n }\n onTimeout() {\n this.timeoutToken = -1;\n if (this.runner) {\n this.doRun();\n }\n }\n doRun() {\n var _a;\n (_a = this.runner) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n}\n/**\n * Execute the callback the next time the browser is idle, returning an\n * {@link IDisposable} that will cancel the callback when disposed. This wraps\n * [requestIdleCallback] so it will fallback to [setTimeout] if the environment\n * doesn't support it.\n *\n * @param callback The callback to run when idle, this includes an\n * [IdleDeadline] that provides the time alloted for the idle callback by the\n * browser. Not respecting this deadline will result in a degraded user\n * experience.\n * @param timeout A timeout at which point to queue no longer wait for an idle\n * callback but queue it on the regular event loop (like setTimeout). Typically\n * this should not be used.\n *\n * [IdleDeadline]: https://developer.mozilla.org/en-US/docs/Web/API/IdleDeadline\n * [requestIdleCallback]: https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback\n * [setTimeout]: https://developer.mozilla.org/en-US/docs/Web/API/Window/setTimeout\n *\n * **Note** that there is `dom.ts#runWhenWindowIdle` which is better suited when running inside a browser\n * context\n */\nexport let runWhenGlobalIdle;\nexport let _runWhenIdle;\n(function () {\n if (typeof globalThis.requestIdleCallback !== 'function' || typeof globalThis.cancelIdleCallback !== 'function') {\n _runWhenIdle = (_targetWindow, runner) => {\n setTimeout0(() => {\n if (disposed) {\n return;\n }\n const end = Date.now() + 15; // one frame at 64fps\n const deadline = {\n didTimeout: true,\n timeRemaining() {\n return Math.max(0, end - Date.now());\n }\n };\n runner(Object.freeze(deadline));\n });\n let disposed = false;\n return {\n dispose() {\n if (disposed) {\n return;\n }\n disposed = true;\n }\n };\n };\n }\n else {\n _runWhenIdle = (targetWindow, runner, timeout) => {\n const handle = targetWindow.requestIdleCallback(runner, typeof timeout === 'number' ? { timeout } : undefined);\n let disposed = false;\n return {\n dispose() {\n if (disposed) {\n return;\n }\n disposed = true;\n targetWindow.cancelIdleCallback(handle);\n }\n };\n };\n }\n runWhenGlobalIdle = (runner) => _runWhenIdle(globalThis, runner);\n})();\nexport class AbstractIdleValue {\n constructor(targetWindow, executor) {\n this._didRun = false;\n this._executor = () => {\n try {\n this._value = executor();\n }\n catch (err) {\n this._error = err;\n }\n finally {\n this._didRun = true;\n }\n };\n this._handle = _runWhenIdle(targetWindow, () => this._executor());\n }\n dispose() {\n this._handle.dispose();\n }\n get value() {\n if (!this._didRun) {\n this._handle.dispose();\n this._executor();\n }\n if (this._error) {\n throw this._error;\n }\n return this._value;\n }\n get isInitialized() {\n return this._didRun;\n }\n}\n/**\n * An `IdleValue` that always uses the current window (which might be throttled or inactive)\n *\n * **Note** that there is `dom.ts#WindowIdleValue` which is better suited when running inside a browser\n * context\n */\nexport class GlobalIdleValue extends AbstractIdleValue {\n constructor(executor) {\n super(globalThis, executor);\n }\n}\n/**\n * Creates a promise whose resolution or rejection can be controlled imperatively.\n */\nexport class DeferredPromise {\n get isRejected() {\n var _a;\n return ((_a = this.outcome) === null || _a === void 0 ? void 0 : _a.outcome) === 1 /* DeferredOutcome.Rejected */;\n }\n get isSettled() {\n return !!this.outcome;\n }\n constructor() {\n this.p = new Promise((c, e) => {\n this.completeCallback = c;\n this.errorCallback = e;\n });\n }\n complete(value) {\n return new Promise(resolve => {\n this.completeCallback(value);\n this.outcome = { outcome: 0 /* DeferredOutcome.Resolved */, value };\n resolve();\n });\n }\n error(err) {\n return new Promise(resolve => {\n this.errorCallback(err);\n this.outcome = { outcome: 1 /* DeferredOutcome.Rejected */, value: err };\n resolve();\n });\n }\n cancel() {\n return this.error(new CancellationError());\n }\n}\n//#endregion\n//#region Promises\nexport var Promises;\n(function (Promises) {\n /**\n * A drop-in replacement for `Promise.all` with the only difference\n * that the method awaits every promise to either fulfill or reject.\n *\n * Similar to `Promise.all`, only the first error will be returned\n * if any.\n */\n async function settled(promises) {\n let firstError = undefined;\n const result = await Promise.all(promises.map(promise => promise.then(value => value, error => {\n if (!firstError) {\n firstError = error;\n }\n return undefined; // do not rethrow so that other promises can settle\n })));\n if (typeof firstError !== 'undefined') {\n throw firstError;\n }\n return result; // cast is needed and protected by the `throw` above\n }\n Promises.settled = settled;\n /**\n * A helper to create a new `Promise` with a body that is a promise\n * itself. By default, an error that raises from the async body will\n * end up as a unhandled rejection, so this utility properly awaits the\n * body and rejects the promise as a normal promise does without async\n * body.\n *\n * This method should only be used in rare cases where otherwise `async`\n * cannot be used (e.g. when callbacks are involved that require this).\n */\n function withAsyncBody(bodyFn) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n try {\n await bodyFn(resolve, reject);\n }\n catch (error) {\n reject(error);\n }\n });\n }\n Promises.withAsyncBody = withAsyncBody;\n})(Promises || (Promises = {}));\n/**\n * A rich implementation for an `AsyncIterable`.\n */\nexport class AsyncIterableObject {\n static fromArray(items) {\n return new AsyncIterableObject((writer) => {\n writer.emitMany(items);\n });\n }\n static fromPromise(promise) {\n return new AsyncIterableObject(async (emitter) => {\n emitter.emitMany(await promise);\n });\n }\n static fromPromises(promises) {\n return new AsyncIterableObject(async (emitter) => {\n await Promise.all(promises.map(async (p) => emitter.emitOne(await p)));\n });\n }\n static merge(iterables) {\n return new AsyncIterableObject(async (emitter) => {\n await Promise.all(iterables.map(async (iterable) => {\n for await (const item of iterable) {\n emitter.emitOne(item);\n }\n }));\n });\n }\n constructor(executor) {\n this._state = 0 /* AsyncIterableSourceState.Initial */;\n this._results = [];\n this._error = null;\n this._onStateChanged = new Emitter();\n queueMicrotask(async () => {\n const writer = {\n emitOne: (item) => this.emitOne(item),\n emitMany: (items) => this.emitMany(items),\n reject: (error) => this.reject(error)\n };\n try {\n await Promise.resolve(executor(writer));\n this.resolve();\n }\n catch (err) {\n this.reject(err);\n }\n finally {\n writer.emitOne = undefined;\n writer.emitMany = undefined;\n writer.reject = undefined;\n }\n });\n }\n [Symbol.asyncIterator]() {\n let i = 0;\n return {\n next: async () => {\n do {\n if (this._state === 2 /* AsyncIterableSourceState.DoneError */) {\n throw this._error;\n }\n if (i < this._results.length) {\n return { done: false, value: this._results[i++] };\n }\n if (this._state === 1 /* AsyncIterableSourceState.DoneOK */) {\n return { done: true, value: undefined };\n }\n await Event.toPromise(this._onStateChanged.event);\n } while (true);\n }\n };\n }\n static map(iterable, mapFn) {\n return new AsyncIterableObject(async (emitter) => {\n for await (const item of iterable) {\n emitter.emitOne(mapFn(item));\n }\n });\n }\n map(mapFn) {\n return AsyncIterableObject.map(this, mapFn);\n }\n static filter(iterable, filterFn) {\n return new AsyncIterableObject(async (emitter) => {\n for await (const item of iterable) {\n if (filterFn(item)) {\n emitter.emitOne(item);\n }\n }\n });\n }\n filter(filterFn) {\n return AsyncIterableObject.filter(this, filterFn);\n }\n static coalesce(iterable) {\n return AsyncIterableObject.filter(iterable, item => !!item);\n }\n coalesce() {\n return AsyncIterableObject.coalesce(this);\n }\n static async toPromise(iterable) {\n const result = [];\n for await (const item of iterable) {\n result.push(item);\n }\n return result;\n }\n toPromise() {\n return AsyncIterableObject.toPromise(this);\n }\n /**\n * The value will be appended at the end.\n *\n * **NOTE** If `resolve()` or `reject()` have already been called, this method has no effect.\n */\n emitOne(value) {\n if (this._state !== 0 /* AsyncIterableSourceState.Initial */) {\n return;\n }\n // it is important to add new values at the end,\n // as we may have iterators already running on the array\n this._results.push(value);\n this._onStateChanged.fire();\n }\n /**\n * The values will be appended at the end.\n *\n * **NOTE** If `resolve()` or `reject()` have already been called, this method has no effect.\n */\n emitMany(values) {\n if (this._state !== 0 /* AsyncIterableSourceState.Initial */) {\n return;\n }\n // it is important to add new values at the end,\n // as we may have iterators already running on the array\n this._results = this._results.concat(values);\n this._onStateChanged.fire();\n }\n /**\n * Calling `resolve()` will mark the result array as complete.\n *\n * **NOTE** `resolve()` must be called, otherwise all consumers of this iterable will hang indefinitely, similar to a non-resolved promise.\n * **NOTE** If `resolve()` or `reject()` have already been called, this method has no effect.\n */\n resolve() {\n if (this._state !== 0 /* AsyncIterableSourceState.Initial */) {\n return;\n }\n this._state = 1 /* AsyncIterableSourceState.DoneOK */;\n this._onStateChanged.fire();\n }\n /**\n * Writing an error will permanently invalidate this iterable.\n * The current users will receive an error thrown, as will all future users.\n *\n * **NOTE** If `resolve()` or `reject()` have already been called, this method has no effect.\n */\n reject(error) {\n if (this._state !== 0 /* AsyncIterableSourceState.Initial */) {\n return;\n }\n this._state = 2 /* AsyncIterableSourceState.DoneError */;\n this._error = error;\n this._onStateChanged.fire();\n }\n}\nAsyncIterableObject.EMPTY = AsyncIterableObject.fromArray([]);\nexport class CancelableAsyncIterableObject extends AsyncIterableObject {\n constructor(_source, executor) {\n super(executor);\n this._source = _source;\n }\n cancel() {\n this._source.cancel();\n }\n}\nexport function createCancelableAsyncIterable(callback) {\n const source = new CancellationTokenSource();\n const innerIterable = callback(source.token);\n return new CancelableAsyncIterableObject(source, async (emitter) => {\n const subscription = source.token.onCancellationRequested(() => {\n subscription.dispose();\n source.dispose();\n emitter.reject(new CancellationError());\n });\n try {\n for await (const item of innerIterable) {\n if (source.token.isCancellationRequested) {\n // canceled in the meantime\n return;\n }\n emitter.emitOne(item);\n }\n subscription.dispose();\n source.dispose();\n }\n catch (err) {\n subscription.dispose();\n source.dispose();\n emitter.reject(err);\n }\n });\n}\n//#endregion\n", "/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */\n\nconst {\n\tentries,\n\tsetPrototypeOf,\n\tisFrozen,\n\tgetPrototypeOf,\n\tgetOwnPropertyDescriptor\n} = Object;\nlet {\n\tfreeze,\n\tseal,\n\tcreate\n} = Object; // eslint-disable-line import/no-mutable-exports\n\nlet {\n\tapply,\n\tconstruct\n} = typeof Reflect !== 'undefined' && Reflect;\n\nif (!apply) {\n\tapply = function apply(fun, thisValue, args) {\n\t\treturn fun.apply(thisValue, args);\n\t};\n}\n\nif (!freeze) {\n\tfreeze = function freeze(x) {\n\t\treturn x;\n\t};\n}\n\nif (!seal) {\n\tseal = function seal(x) {\n\t\treturn x;\n\t};\n}\n\nif (!construct) {\n\tconstruct = function construct(Func, args) {\n\t\treturn new Func(...args);\n\t};\n}\n\nconst arrayForEach = unapply(Array.prototype.forEach);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\nconst regExpTest = unapply(RegExp.prototype.test);\nconst typeErrorCreate = unconstruct(TypeError);\nfunction unapply(func) {\n\treturn function (thisArg) {\n\t\tfor (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t\t\targs[_key - 1] = arguments[_key];\n\t\t}\n\n\t\treturn apply(func, thisArg, args);\n\t};\n}\nfunction unconstruct(func) {\n\treturn function () {\n\t\tfor (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t\t\targs[_key2] = arguments[_key2];\n\t\t}\n\n\t\treturn construct(func, args);\n\t};\n}\n/* Add properties to a lookup table */\n\nfunction addToSet(set, array, transformCaseFunc) {\n\tvar _transformCaseFunc;\n\n\ttransformCaseFunc = (_transformCaseFunc = transformCaseFunc) !== null && _transformCaseFunc !== void 0 ? _transformCaseFunc : stringToLowerCase;\n\n\tif (setPrototypeOf) {\n\t\t// Make 'in' and truthy checks like Boolean(set.constructor)\n\t\t// independent of any properties defined on Object.prototype.\n\t\t// Prevent prototype setters from intercepting set as a this value.\n\t\tsetPrototypeOf(set, null);\n\t}\n\n\tlet l = array.length;\n\n\twhile (l--) {\n\t\tlet element = array[l];\n\n\t\tif (typeof element === 'string') {\n\t\t\tconst lcElement = transformCaseFunc(element);\n\n\t\t\tif (lcElement !== element) {\n\t\t\t\t// Config presets (e.g. tags.js, attrs.js) are immutable.\n\t\t\t\tif (!isFrozen(array)) {\n\t\t\t\t\tarray[l] = lcElement;\n\t\t\t\t}\n\n\t\t\t\telement = lcElement;\n\t\t\t}\n\t\t}\n\n\t\tset[element] = true;\n\t}\n\n\treturn set;\n}\n/* Shallow clone an object */\n\nfunction clone(object) {\n\tconst newObject = create(null);\n\n\tfor (const [property, value] of entries(object)) {\n\t\tnewObject[property] = value;\n\t}\n\n\treturn newObject;\n}\n/* This method automatically checks if the prop is function\n * or getter and behaves accordingly. */\n\nfunction lookupGetter(object, prop) {\n\twhile (object !== null) {\n\t\tconst desc = getOwnPropertyDescriptor(object, prop);\n\n\t\tif (desc) {\n\t\t\tif (desc.get) {\n\t\t\t\treturn unapply(desc.get);\n\t\t\t}\n\n\t\t\tif (typeof desc.value === 'function') {\n\t\t\t\treturn unapply(desc.value);\n\t\t\t}\n\t\t}\n\n\t\tobject = getPrototypeOf(object);\n\t}\n\n\tfunction fallbackValue(element) {\n\t\tconsole.warn('fallback value for', element);\n\t\treturn null;\n\t}\n\n\treturn fallbackValue;\n}\n\nconst html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG\n\nconst svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\nconst svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\n\nconst svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\nconst mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']); // Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\n\nconst mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\nconst text = freeze(['#text']);\n\nconst html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\nconst svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\nconst mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\nconst xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\nconst MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n\nconst ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\nconst TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\nconst DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n\nconst ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n\nconst IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nconst IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nconst ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\nconst DOCTYPE_NAME = seal(/^html$/i);\n\nvar EXPRESSIONS = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tMUSTACHE_EXPR: MUSTACHE_EXPR,\n\tERB_EXPR: ERB_EXPR,\n\tTMPLIT_EXPR: TMPLIT_EXPR,\n\tDATA_ATTR: DATA_ATTR,\n\tARIA_ATTR: ARIA_ATTR,\n\tIS_ALLOWED_URI: IS_ALLOWED_URI,\n\tIS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,\n\tATTR_WHITESPACE: ATTR_WHITESPACE,\n\tDOCTYPE_NAME: DOCTYPE_NAME\n});\n\nconst getGlobal = () => typeof window === 'undefined' ? null : window;\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\n\n\nconst _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n\tif (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n\t\treturn null;\n\t} // Allow the callers to control the unique policy name\n\t// by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n\t// Policy creation with duplicate names throws in Trusted Types.\n\n\n\tlet suffix = null;\n\tconst ATTR_NAME = 'data-tt-policy-suffix';\n\n\tif (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n\t\tsuffix = purifyHostElement.getAttribute(ATTR_NAME);\n\t}\n\n\tconst policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n\ttry {\n\t\treturn trustedTypes.createPolicy(policyName, {\n\t\t\tcreateHTML(html) {\n\t\t\t\treturn html;\n\t\t\t},\n\n\t\t\tcreateScriptURL(scriptUrl) {\n\t\t\t\treturn scriptUrl;\n\t\t\t}\n\n\t\t});\n\t} catch (_) {\n\t\t// Policy creation failed (most likely another DOMPurify script has\n\t\t// already run). Skip creating the policy, as this will only cause errors\n\t\t// if TT are enforced.\n\t\tconsole.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n\t\treturn null;\n\t}\n};\n\nfunction createDOMPurify() {\n\tlet window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n\tconst DOMPurify = root => createDOMPurify(root);\n\t/**\n\t * Version label, exposed for easier checks\n\t * if DOMPurify is up to date or not\n\t */\n\n\n\tDOMPurify.version = '3.0.5';\n\t/**\n\t * Array of elements that DOMPurify removed during sanitation.\n\t * Empty if nothing was removed.\n\t */\n\n\tDOMPurify.removed = [];\n\n\tif (!window || !window.document || window.document.nodeType !== 9) {\n\t\t// Not running in a browser, provide a factory function\n\t\t// so that you can pass your own Window\n\t\tDOMPurify.isSupported = false;\n\t\treturn DOMPurify;\n\t}\n\n\tconst originalDocument = window.document;\n\tconst currentScript = originalDocument.currentScript;\n\tlet {\n\t\tdocument\n\t} = window;\n\tconst {\n\t\tDocumentFragment,\n\t\tHTMLTemplateElement,\n\t\tNode,\n\t\tElement,\n\t\tNodeFilter,\n\t\tNamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n\t\tHTMLFormElement,\n\t\tDOMParser,\n\t\ttrustedTypes\n\t} = window;\n\tconst ElementPrototype = Element.prototype;\n\tconst cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n\tconst getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n\tconst getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n\tconst getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a\n\t// new document created via createHTMLDocument. As per the spec\n\t// (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n\t// a new empty registry is used when creating a template contents owner\n\t// document, so we use that as our parent document to ensure nothing\n\t// is inherited.\n\n\tif (typeof HTMLTemplateElement === 'function') {\n\t\tconst template = document.createElement('template');\n\n\t\tif (template.content && template.content.ownerDocument) {\n\t\t\tdocument = template.content.ownerDocument;\n\t\t}\n\t}\n\n\tlet trustedTypesPolicy;\n\tlet emptyHTML = '';\n\tconst {\n\t\timplementation,\n\t\tcreateNodeIterator,\n\t\tcreateDocumentFragment,\n\t\tgetElementsByTagName\n\t} = document;\n\tconst {\n\t\timportNode\n\t} = originalDocument;\n\tlet hooks = {};\n\t/**\n\t * Expose whether this browser supports running the full DOMPurify.\n\t */\n\n\tDOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n\tconst {\n\t\tMUSTACHE_EXPR,\n\t\tERB_EXPR,\n\t\tTMPLIT_EXPR,\n\t\tDATA_ATTR,\n\t\tARIA_ATTR,\n\t\tIS_SCRIPT_OR_DATA,\n\t\tATTR_WHITESPACE\n\t} = EXPRESSIONS;\n\tlet {\n\t\tIS_ALLOWED_URI: IS_ALLOWED_URI$1\n\t} = EXPRESSIONS;\n\t/**\n\t * We consider the elements and attributes below to be safe. Ideally\n\t * don't add any new ones but feel free to remove unwanted ones.\n\t */\n\n\t/* allowed element names */\n\n\tlet ALLOWED_TAGS = null;\n\tconst DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n\t/* Allowed attribute names */\n\n\tlet ALLOWED_ATTR = null;\n\tconst DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n\t/*\n\t * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n\t * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n\t * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n\t * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n\t */\n\n\tlet CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, {\n\t\ttagNameCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t},\n\t\tattributeNameCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t},\n\t\tallowCustomizedBuiltInElements: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: false\n\t\t}\n\t}));\n\t/* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n\n\tlet FORBID_TAGS = null;\n\t/* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n\n\tlet FORBID_ATTR = null;\n\t/* Decide if ARIA attributes are okay */\n\n\tlet ALLOW_ARIA_ATTR = true;\n\t/* Decide if custom data attributes are okay */\n\n\tlet ALLOW_DATA_ATTR = true;\n\t/* Decide if unknown protocols are okay */\n\n\tlet ALLOW_UNKNOWN_PROTOCOLS = false;\n\t/* Decide if self-closing tags in attributes are allowed.\n\t * Usually removed due to a mXSS issue in jQuery 3.0 */\n\n\tlet ALLOW_SELF_CLOSE_IN_ATTR = true;\n\t/* Output should be safe for common template engines.\n\t * This means, DOMPurify removes data attributes, mustaches and ERB\n\t */\n\n\tlet SAFE_FOR_TEMPLATES = false;\n\t/* Decide if document with ... should be returned */\n\n\tlet WHOLE_DOCUMENT = false;\n\t/* Track whether config is already set on this instance of DOMPurify. */\n\n\tlet SET_CONFIG = false;\n\t/* Decide if all elements (e.g. style, script) must be children of\n\t * document.body. By default, browsers might move them to document.head */\n\n\tlet FORCE_BODY = false;\n\t/* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n\t * string (or a TrustedHTML object if Trusted Types are supported).\n\t * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n\t */\n\n\tlet RETURN_DOM = false;\n\t/* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n\t * string (or a TrustedHTML object if Trusted Types are supported) */\n\n\tlet RETURN_DOM_FRAGMENT = false;\n\t/* Try to return a Trusted Type object instead of a string, return a string in\n\t * case Trusted Types are not supported */\n\n\tlet RETURN_TRUSTED_TYPE = false;\n\t/* Output should be free from DOM clobbering attacks?\n\t * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n\t */\n\n\tlet SANITIZE_DOM = true;\n\t/* Achieve full DOM Clobbering protection by isolating the namespace of named\n\t * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n\t *\n\t * HTML/DOM spec rules that enable DOM Clobbering:\n\t * - Named Access on Window (\u00A77.3.3)\n\t * - DOM Tree Accessors (\u00A73.1.5)\n\t * - Form Element Parent-Child Relations (\u00A74.10.3)\n\t * - Iframe srcdoc / Nested WindowProxies (\u00A74.8.5)\n\t * - HTMLCollection (\u00A74.2.10.2)\n\t *\n\t * Namespace isolation is implemented by prefixing `id` and `name` attributes\n\t * with a constant string, i.e., `user-content-`\n\t */\n\n\tlet SANITIZE_NAMED_PROPS = false;\n\tconst SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\t/* Keep element content when removing element? */\n\n\tlet KEEP_CONTENT = true;\n\t/* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n\t * of importing it into a new Document and returning a sanitized copy */\n\n\tlet IN_PLACE = false;\n\t/* Allow usage of profiles like html, svg and mathMl */\n\n\tlet USE_PROFILES = {};\n\t/* Tags to ignore content of when KEEP_CONTENT is true */\n\n\tlet FORBID_CONTENTS = null;\n\tconst DEFAULT_FORBID_CONTENTS = addToSet({}, ['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']);\n\t/* Tags that are safe for data: URIs */\n\n\tlet DATA_URI_TAGS = null;\n\tconst DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\t/* Attributes safe for values like \"javascript:\" */\n\n\tlet URI_SAFE_ATTRIBUTES = null;\n\tconst DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n\tconst MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\tconst SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n\tconst HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n\t/* Document namespace */\n\n\tlet NAMESPACE = HTML_NAMESPACE;\n\tlet IS_EMPTY_INPUT = false;\n\t/* Allowed XHTML+XML namespaces */\n\n\tlet ALLOWED_NAMESPACES = null;\n\tconst DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n\t/* Parsing of strict XHTML documents */\n\n\tlet PARSER_MEDIA_TYPE;\n\tconst SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n\tconst DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n\tlet transformCaseFunc;\n\t/* Keep a reference to config to pass to hooks */\n\n\tlet CONFIG = null;\n\t/* Ideally, do not touch anything below this line */\n\n\t/* ______________________________________________ */\n\n\tconst formElement = document.createElement('form');\n\n\tconst isRegexOrFunction = function isRegexOrFunction(testValue) {\n\t\treturn testValue instanceof RegExp || testValue instanceof Function;\n\t};\n\t/**\n\t * _parseConfig\n\t *\n\t * @param {Object} cfg optional config literal\n\t */\n\t// eslint-disable-next-line complexity\n\n\n\tconst _parseConfig = function _parseConfig(cfg) {\n\t\tif (CONFIG && CONFIG === cfg) {\n\t\t\treturn;\n\t\t}\n\t\t/* Shield configuration object from tampering */\n\n\n\t\tif (!cfg || typeof cfg !== 'object') {\n\t\t\tcfg = {};\n\t\t}\n\t\t/* Shield configuration object from prototype pollution */\n\n\n\t\tcfg = clone(cfg);\n\t\tPARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes\n\t\t\tSUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n\n\t\ttransformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n\t\t/* Set configuration parameters */\n\n\t\tALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n\t\tALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n\t\tALLOWED_NAMESPACES = 'ALLOWED_NAMESPACES' in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n\t\tURI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent\n\t\t\tcfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent\n\t\t\ttransformCaseFunc // eslint-disable-line indent\n\t\t) // eslint-disable-line indent\n\t\t\t: DEFAULT_URI_SAFE_ATTRIBUTES;\n\t\tDATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent\n\t\t\tcfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent\n\t\t\ttransformCaseFunc // eslint-disable-line indent\n\t\t) // eslint-disable-line indent\n\t\t\t: DEFAULT_DATA_URI_TAGS;\n\t\tFORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n\t\tFORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n\t\tFORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n\t\tUSE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n\t\tALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n\n\t\tALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n\n\t\tALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n\n\t\tALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n\n\t\tSAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n\n\t\tWHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n\n\t\tRETURN_DOM = cfg.RETURN_DOM || false; // Default false\n\n\t\tRETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n\n\t\tRETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n\n\t\tFORCE_BODY = cfg.FORCE_BODY || false; // Default false\n\n\t\tSANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n\n\t\tSANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n\n\t\tKEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n\n\t\tIN_PLACE = cfg.IN_PLACE || false; // Default false\n\n\t\tIS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;\n\t\tNAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n\t\tCUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n\n\t\tif (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n\t\t\tCUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n\t\t}\n\n\t\tif (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n\t\t\tCUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n\t\t}\n\n\t\tif (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n\t\t\tCUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n\t\t}\n\n\t\tif (SAFE_FOR_TEMPLATES) {\n\t\t\tALLOW_DATA_ATTR = false;\n\t\t}\n\n\t\tif (RETURN_DOM_FRAGMENT) {\n\t\t\tRETURN_DOM = true;\n\t\t}\n\t\t/* Parse profile info */\n\n\n\t\tif (USE_PROFILES) {\n\t\t\tALLOWED_TAGS = addToSet({}, [...text]);\n\t\t\tALLOWED_ATTR = [];\n\n\t\t\tif (USE_PROFILES.html === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, html$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, html);\n\t\t\t}\n\n\t\t\tif (USE_PROFILES.svg === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, svg$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, svg);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\n\t\t\tif (USE_PROFILES.svgFilters === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, svgFilters);\n\t\t\t\taddToSet(ALLOWED_ATTR, svg);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\n\t\t\tif (USE_PROFILES.mathMl === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, mathMl$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, mathMl);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\t\t}\n\t\t/* Merge configuration parameters */\n\n\n\t\tif (cfg.ADD_TAGS) {\n\t\t\tif (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n\t\t\t\tALLOWED_TAGS = clone(ALLOWED_TAGS);\n\t\t\t}\n\n\t\t\taddToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n\t\t}\n\n\t\tif (cfg.ADD_ATTR) {\n\t\t\tif (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n\t\t\t\tALLOWED_ATTR = clone(ALLOWED_ATTR);\n\t\t\t}\n\n\t\t\taddToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n\t\t}\n\n\t\tif (cfg.ADD_URI_SAFE_ATTR) {\n\t\t\taddToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n\t\t}\n\n\t\tif (cfg.FORBID_CONTENTS) {\n\t\t\tif (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n\t\t\t\tFORBID_CONTENTS = clone(FORBID_CONTENTS);\n\t\t\t}\n\n\t\t\taddToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n\t\t}\n\t\t/* Add #text in case KEEP_CONTENT is set to true */\n\n\n\t\tif (KEEP_CONTENT) {\n\t\t\tALLOWED_TAGS['#text'] = true;\n\t\t}\n\t\t/* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n\n\n\t\tif (WHOLE_DOCUMENT) {\n\t\t\taddToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n\t\t}\n\t\t/* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n\n\n\t\tif (ALLOWED_TAGS.table) {\n\t\t\taddToSet(ALLOWED_TAGS, ['tbody']);\n\t\t\tdelete FORBID_TAGS.tbody;\n\t\t}\n\n\t\tif (cfg.TRUSTED_TYPES_POLICY) {\n\t\t\tif (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n\t\t\t\tthrow typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n\t\t\t}\n\n\t\t\tif (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n\t\t\t\tthrow typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n\t\t\t} // Overwrite existing TrustedTypes policy.\n\n\n\t\t\ttrustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY; // Sign local variables required by `sanitize`.\n\n\t\t\temptyHTML = trustedTypesPolicy.createHTML('');\n\t\t} else {\n\t\t\t// Uninitialized policy, attempt to initialize the internal dompurify policy.\n\t\t\tif (trustedTypesPolicy === undefined) {\n\t\t\t\ttrustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n\t\t\t} // If creating the internal policy succeeded sign internal variables.\n\n\n\t\t\tif (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n\t\t\t\temptyHTML = trustedTypesPolicy.createHTML('');\n\t\t\t}\n\t\t} // Prevent further manipulation of configuration.\n\t\t// Not available in IE8, Safari 5, etc.\n\n\n\t\tif (freeze) {\n\t\t\tfreeze(cfg);\n\t\t}\n\n\t\tCONFIG = cfg;\n\t};\n\n\tconst MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n\tconst HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML\n\t// namespace. We need to specify them explicitly\n\t// so that they don't get erroneously deleted from\n\t// HTML namespace.\n\n\tconst COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n\t/* Keep track of all possible SVG and MathML tags\n\t * so that we can perform the namespace checks\n\t * correctly. */\n\n\tconst ALL_SVG_TAGS = addToSet({}, svg$1);\n\taddToSet(ALL_SVG_TAGS, svgFilters);\n\taddToSet(ALL_SVG_TAGS, svgDisallowed);\n\tconst ALL_MATHML_TAGS = addToSet({}, mathMl$1);\n\taddToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n\t/**\n\t *\n\t *\n\t * @param {Element} element a DOM element whose namespace is being checked\n\t * @returns {boolean} Return false if the element has a\n\t * namespace that a spec-compliant parser would never\n\t * return. Return true otherwise.\n\t */\n\n\tconst _checkValidNamespace = function _checkValidNamespace(element) {\n\t\tlet parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode\n\t\t// can be null. We just simulate parent in this case.\n\n\t\tif (!parent || !parent.tagName) {\n\t\t\tparent = {\n\t\t\t\tnamespaceURI: NAMESPACE,\n\t\t\t\ttagName: 'template'\n\t\t\t};\n\t\t}\n\n\t\tconst tagName = stringToLowerCase(element.tagName);\n\t\tconst parentTagName = stringToLowerCase(parent.tagName);\n\n\t\tif (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (element.namespaceURI === SVG_NAMESPACE) {\n\t\t\t// The only way to switch from HTML namespace to SVG\n\t\t\t// is via . If it happens via any other tag, then\n\t\t\t// it should be killed.\n\t\t\tif (parent.namespaceURI === HTML_NAMESPACE) {\n\t\t\t\treturn tagName === 'svg';\n\t\t\t} // The only way to switch from MathML to SVG is via`\n\t\t\t// svg if parent is either or MathML\n\t\t\t// text integration points.\n\n\n\t\t\tif (parent.namespaceURI === MATHML_NAMESPACE) {\n\t\t\t\treturn tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n\t\t\t} // We only allow elements that are defined in SVG\n\t\t\t// spec. All others are disallowed in SVG namespace.\n\n\n\t\t\treturn Boolean(ALL_SVG_TAGS[tagName]);\n\t\t}\n\n\t\tif (element.namespaceURI === MATHML_NAMESPACE) {\n\t\t\t// The only way to switch from HTML namespace to MathML\n\t\t\t// is via . If it happens via any other tag, then\n\t\t\t// it should be killed.\n\t\t\tif (parent.namespaceURI === HTML_NAMESPACE) {\n\t\t\t\treturn tagName === 'math';\n\t\t\t} // The only way to switch from SVG to MathML is via\n\t\t\t// and HTML integration points\n\n\n\t\t\tif (parent.namespaceURI === SVG_NAMESPACE) {\n\t\t\t\treturn tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n\t\t\t} // We only allow elements that are defined in MathML\n\t\t\t// spec. All others are disallowed in MathML namespace.\n\n\n\t\t\treturn Boolean(ALL_MATHML_TAGS[tagName]);\n\t\t}\n\n\t\tif (element.namespaceURI === HTML_NAMESPACE) {\n\t\t\t// The only way to switch from SVG to HTML is via\n\t\t\t// HTML integration points, and from MathML to HTML\n\t\t\t// is via MathML text integration points\n\t\t\tif (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n\t\t\t\treturn false;\n\t\t\t} // We disallow tags that are specific for MathML\n\t\t\t// or SVG and should never appear in HTML namespace\n\n\n\t\t\treturn !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n\t\t} // For XHTML and XML documents that support custom namespaces\n\n\n\t\tif (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n\t\t\treturn true;\n\t\t} // The code should never reach this place (this means\n\t\t// that the element somehow got namespace that is not\n\t\t// HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n\t\t// Return false just in case.\n\n\n\t\treturn false;\n\t};\n\t/**\n\t * _forceRemove\n\t *\n\t * @param {Node} node a DOM node\n\t */\n\n\n\tconst _forceRemove = function _forceRemove(node) {\n\t\tarrayPush(DOMPurify.removed, {\n\t\t\telement: node\n\t\t});\n\n\t\ttry {\n\t\t\t// eslint-disable-next-line unicorn/prefer-dom-node-remove\n\t\t\tnode.parentNode.removeChild(node);\n\t\t} catch (_) {\n\t\t\tnode.remove();\n\t\t}\n\t};\n\t/**\n\t * _removeAttribute\n\t *\n\t * @param {String} name an Attribute name\n\t * @param {Node} node a DOM node\n\t */\n\n\n\tconst _removeAttribute = function _removeAttribute(name, node) {\n\t\ttry {\n\t\t\tarrayPush(DOMPurify.removed, {\n\t\t\t\tattribute: node.getAttributeNode(name),\n\t\t\t\tfrom: node\n\t\t\t});\n\t\t} catch (_) {\n\t\t\tarrayPush(DOMPurify.removed, {\n\t\t\t\tattribute: null,\n\t\t\t\tfrom: node\n\t\t\t});\n\t\t}\n\n\t\tnode.removeAttribute(name); // We void attribute values for unremovable \"is\"\" attributes\n\n\t\tif (name === 'is' && !ALLOWED_ATTR[name]) {\n\t\t\tif (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n\t\t\t\ttry {\n\t\t\t\t\t_forceRemove(node);\n\t\t\t\t} catch (_) { }\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tnode.setAttribute(name, '');\n\t\t\t\t} catch (_) { }\n\t\t\t}\n\t\t}\n\t};\n\t/**\n\t * _initDocument\n\t *\n\t * @param {String} dirty a string of dirty markup\n\t * @return {Document} a DOM, filled with the dirty markup\n\t */\n\n\n\tconst _initDocument = function _initDocument(dirty) {\n\t\t/* Create a HTML document */\n\t\tlet doc;\n\t\tlet leadingWhitespace;\n\n\t\tif (FORCE_BODY) {\n\t\t\tdirty = '' + dirty;\n\t\t} else {\n\t\t\t/* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n\t\t\tconst matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n\t\t\tleadingWhitespace = matches && matches[0];\n\t\t}\n\n\t\tif (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n\t\t\t// Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n\t\t\tdirty = '' + dirty + '';\n\t\t}\n\n\t\tconst dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n\t\t/*\n\t\t * Use the DOMParser API by default, fallback later if needs be\n\t\t * DOMParser not work for svg when has multiple root element.\n\t\t */\n\n\t\tif (NAMESPACE === HTML_NAMESPACE) {\n\t\t\ttry {\n\t\t\t\tdoc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n\t\t\t} catch (_) { }\n\t\t}\n\t\t/* Use createHTMLDocument in case DOMParser is not available */\n\n\n\t\tif (!doc || !doc.documentElement) {\n\t\t\tdoc = implementation.createDocument(NAMESPACE, 'template', null);\n\n\t\t\ttry {\n\t\t\t\tdoc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n\t\t\t} catch (_) {// Syntax error if dirtyPayload is invalid xml\n\t\t\t}\n\t\t}\n\n\t\tconst body = doc.body || doc.documentElement;\n\n\t\tif (dirty && leadingWhitespace) {\n\t\t\tbody.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n\t\t}\n\t\t/* Work on whole document or just its body */\n\n\n\t\tif (NAMESPACE === HTML_NAMESPACE) {\n\t\t\treturn getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n\t\t}\n\n\t\treturn WHOLE_DOCUMENT ? doc.documentElement : body;\n\t};\n\t/**\n\t * _createIterator\n\t *\n\t * @param {Document} root document/fragment to create iterator for\n\t * @return {Iterator} iterator instance\n\t */\n\n\n\tconst _createIterator = function _createIterator(root) {\n\t\treturn createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise\n\t\t\tNodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);\n\t};\n\t/**\n\t * _isClobbered\n\t *\n\t * @param {Node} elm element to check for clobbering attacks\n\t * @return {Boolean} true if clobbered, false if safe\n\t */\n\n\n\tconst _isClobbered = function _isClobbered(elm) {\n\t\treturn elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');\n\t};\n\t/**\n\t * _isNode\n\t *\n\t * @param {Node} obj object to check whether it's a DOM node\n\t * @return {Boolean} true is object is a DOM node\n\t */\n\n\n\tconst _isNode = function _isNode(object) {\n\t\treturn typeof Node === 'object' ? object instanceof Node : object && typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';\n\t};\n\t/**\n\t * _executeHook\n\t * Execute user configurable hooks\n\t *\n\t * @param {String} entryPoint Name of the hook's entry point\n\t * @param {Node} currentNode node to work on with the hook\n\t * @param {Object} data additional hook parameters\n\t */\n\n\n\tconst _executeHook = function _executeHook(entryPoint, currentNode, data) {\n\t\tif (!hooks[entryPoint]) {\n\t\t\treturn;\n\t\t}\n\n\t\tarrayForEach(hooks[entryPoint], hook => {\n\t\t\thook.call(DOMPurify, currentNode, data, CONFIG);\n\t\t});\n\t};\n\t/**\n\t * _sanitizeElements\n\t *\n\t * @protect nodeName\n\t * @protect textContent\n\t * @protect removeChild\n\t *\n\t * @param {Node} currentNode to check for permission to exist\n\t * @return {Boolean} true if node was killed, false if left alive\n\t */\n\n\n\tconst _sanitizeElements = function _sanitizeElements(currentNode) {\n\t\tlet content;\n\t\t/* Execute a hook if present */\n\n\t\t_executeHook('beforeSanitizeElements', currentNode, null);\n\t\t/* Check if element is clobbered or can clobber */\n\n\n\t\tif (_isClobbered(currentNode)) {\n\t\t\t_forceRemove(currentNode);\n\n\t\t\treturn true;\n\t\t}\n\t\t/* Now let's check the element's type and name */\n\n\n\t\tconst tagName = transformCaseFunc(currentNode.nodeName);\n\t\t/* Execute a hook if present */\n\n\t\t_executeHook('uponSanitizeElement', currentNode, {\n\t\t\ttagName,\n\t\t\tallowedTags: ALLOWED_TAGS\n\t\t});\n\t\t/* Detect mXSS attempts abusing namespace confusion */\n\n\n\t\tif (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n\t\t\t_forceRemove(currentNode);\n\n\t\t\treturn true;\n\t\t}\n\t\t/* Remove element if anything forbids its presence */\n\n\n\t\tif (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n\t\t\t/* Check if we have a custom element to handle */\n\t\t\tif (!FORBID_TAGS[tagName] && _basicCustomElementTest(tagName)) {\n\t\t\t\tif (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;\n\t\t\t\tif (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) return false;\n\t\t\t}\n\t\t\t/* Keep content except for bad-listed elements */\n\n\n\t\t\tif (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n\t\t\t\tconst parentNode = getParentNode(currentNode) || currentNode.parentNode;\n\t\t\t\tconst childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n\n\t\t\t\tif (childNodes && parentNode) {\n\t\t\t\t\tconst childCount = childNodes.length;\n\n\t\t\t\t\tfor (let i = childCount - 1; i >= 0; --i) {\n\t\t\t\t\t\tparentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_forceRemove(currentNode);\n\n\t\t\treturn true;\n\t\t}\n\t\t/* Check whether element has a valid namespace */\n\n\n\t\tif (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n\t\t\t_forceRemove(currentNode);\n\n\t\t\treturn true;\n\t\t}\n\t\t/* Make sure that older browsers don't get fallback-tag mXSS */\n\n\n\t\tif ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n\t\t\t_forceRemove(currentNode);\n\n\t\t\treturn true;\n\t\t}\n\t\t/* Sanitize element content to be template-safe */\n\n\n\t\tif (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n\t\t\t/* Get the element's text content */\n\t\t\tcontent = currentNode.textContent;\n\t\t\tcontent = stringReplace(content, MUSTACHE_EXPR, ' ');\n\t\t\tcontent = stringReplace(content, ERB_EXPR, ' ');\n\t\t\tcontent = stringReplace(content, TMPLIT_EXPR, ' ');\n\n\t\t\tif (currentNode.textContent !== content) {\n\t\t\t\tarrayPush(DOMPurify.removed, {\n\t\t\t\t\telement: currentNode.cloneNode()\n\t\t\t\t});\n\t\t\t\tcurrentNode.textContent = content;\n\t\t\t}\n\t\t}\n\t\t/* Execute a hook if present */\n\n\n\t\t_executeHook('afterSanitizeElements', currentNode, null);\n\n\t\treturn false;\n\t};\n\t/**\n\t * _isValidAttribute\n\t *\n\t * @param {string} lcTag Lowercase tag name of containing element.\n\t * @param {string} lcName Lowercase attribute name.\n\t * @param {string} value Attribute value.\n\t * @return {Boolean} Returns true if `value` is valid, otherwise false.\n\t */\n\t// eslint-disable-next-line complexity\n\n\n\tconst _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n\t\t/* Make sure attribute cannot clobber */\n\t\tif (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n\t\t\treturn false;\n\t\t}\n\t\t/* Allow valid data-* attributes: At least one character after \"-\"\n\t\t\t\t(https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n\t\t\t\tXML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n\t\t\t\tWe don't need to check the value; it's always URI safe. */\n\n\n\t\tif (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)); else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)); else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n\t\t\tif ( // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n\t\t\t\t// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n\t\t\t\t// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n\t\t\t\t_basicCustomElementTest(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND\n\t\t\t\t// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n\t\t\t\tlcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))); else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t/* Check value is safe. First, is attr inert? If so, is safe */\n\n\t\t} else if (URI_SAFE_ATTRIBUTES[lcName]); else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))); else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]); else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))); else if (value) {\n\t\t\treturn false;\n\t\t} else;\n\n\t\treturn true;\n\t};\n\t/**\n\t * _basicCustomElementCheck\n\t * checks if at least one dash is included in tagName, and it's not the first char\n\t * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n\t * @param {string} tagName name of the tag of the node to sanitize\n\t */\n\n\n\tconst _basicCustomElementTest = function _basicCustomElementTest(tagName) {\n\t\treturn tagName.indexOf('-') > 0;\n\t};\n\t/**\n\t * _sanitizeAttributes\n\t *\n\t * @protect attributes\n\t * @protect nodeName\n\t * @protect removeAttribute\n\t * @protect setAttribute\n\t *\n\t * @param {Node} currentNode to sanitize\n\t */\n\n\n\tconst _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n\t\tlet attr;\n\t\tlet value;\n\t\tlet lcName;\n\t\tlet l;\n\t\t/* Execute a hook if present */\n\n\t\t_executeHook('beforeSanitizeAttributes', currentNode, null);\n\n\t\tconst {\n\t\t\tattributes\n\t\t} = currentNode;\n\t\t/* Check if we have attributes; if not we might have a text node */\n\n\t\tif (!attributes) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst hookEvent = {\n\t\t\tattrName: '',\n\t\t\tattrValue: '',\n\t\t\tkeepAttr: true,\n\t\t\tallowedAttributes: ALLOWED_ATTR\n\t\t};\n\t\tl = attributes.length;\n\t\t/* Go backwards over all attributes; safely remove bad ones */\n\n\t\twhile (l--) {\n\t\t\tattr = attributes[l];\n\t\t\tconst {\n\t\t\t\tname,\n\t\t\t\tnamespaceURI\n\t\t\t} = attr;\n\t\t\tvalue = name === 'value' ? attr.value : stringTrim(attr.value);\n\t\t\tlcName = transformCaseFunc(name);\n\t\t\t/* Execute a hook if present */\n\n\t\t\thookEvent.attrName = lcName;\n\t\t\thookEvent.attrValue = value;\n\t\t\thookEvent.keepAttr = true;\n\t\t\thookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n\n\t\t\t_executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n\n\t\t\tvalue = hookEvent.attrValue;\n\t\t\t/* Did the hooks approve of the attribute? */\n\n\t\t\tif (hookEvent.forceKeepAttr) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t/* Remove attribute */\n\n\n\t\t\t_removeAttribute(name, currentNode);\n\t\t\t/* Did the hooks approve of the attribute? */\n\n\n\t\t\tif (!hookEvent.keepAttr) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t/* Work around a security issue in jQuery 3.0 */\n\n\n\t\t\tif (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n\t\t\t\t_removeAttribute(name, currentNode);\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t/* Sanitize attribute content to be template-safe */\n\n\n\t\t\tif (SAFE_FOR_TEMPLATES) {\n\t\t\t\tvalue = stringReplace(value, MUSTACHE_EXPR, ' ');\n\t\t\t\tvalue = stringReplace(value, ERB_EXPR, ' ');\n\t\t\t\tvalue = stringReplace(value, TMPLIT_EXPR, ' ');\n\t\t\t}\n\t\t\t/* Is `value` valid for this attribute? */\n\n\n\t\t\tconst lcTag = transformCaseFunc(currentNode.nodeName);\n\n\t\t\tif (!_isValidAttribute(lcTag, lcName, value)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t/* Full DOM Clobbering protection via namespace isolation,\n\t\t\t * Prefix id and name attributes with `user-content-`\n\t\t\t */\n\n\n\t\t\tif (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n\t\t\t\t// Remove the attribute with this value\n\t\t\t\t_removeAttribute(name, currentNode); // Prefix the value and later re-create the attribute with the sanitized value\n\n\n\t\t\t\tvalue = SANITIZE_NAMED_PROPS_PREFIX + value;\n\t\t\t}\n\t\t\t/* Handle attributes that require Trusted Types */\n\n\n\t\t\tif (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n\t\t\t\tif (namespaceURI); else {\n\t\t\t\t\tswitch (trustedTypes.getAttributeType(lcTag, lcName)) {\n\t\t\t\t\t\tcase 'TrustedHTML':\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue = trustedTypesPolicy.createHTML(value);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcase 'TrustedScriptURL':\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue = trustedTypesPolicy.createScriptURL(value);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t/* Handle invalid data-* attribute set by try-catching it */\n\n\n\t\t\ttry {\n\t\t\t\tif (namespaceURI) {\n\t\t\t\t\tcurrentNode.setAttributeNS(namespaceURI, name, value);\n\t\t\t\t} else {\n\t\t\t\t\t/* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n\t\t\t\t\tcurrentNode.setAttribute(name, value);\n\t\t\t\t}\n\n\t\t\t\tarrayPop(DOMPurify.removed);\n\t\t\t} catch (_) { }\n\t\t}\n\t\t/* Execute a hook if present */\n\n\n\t\t_executeHook('afterSanitizeAttributes', currentNode, null);\n\t};\n\t/**\n\t * _sanitizeShadowDOM\n\t *\n\t * @param {DocumentFragment} fragment to iterate over recursively\n\t */\n\n\n\tconst _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n\t\tlet shadowNode;\n\n\t\tconst shadowIterator = _createIterator(fragment);\n\t\t/* Execute a hook if present */\n\n\n\t\t_executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n\t\twhile (shadowNode = shadowIterator.nextNode()) {\n\t\t\t/* Execute a hook if present */\n\t\t\t_executeHook('uponSanitizeShadowNode', shadowNode, null);\n\t\t\t/* Sanitize tags and elements */\n\n\n\t\t\tif (_sanitizeElements(shadowNode)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t/* Deep shadow DOM detected */\n\n\n\t\t\tif (shadowNode.content instanceof DocumentFragment) {\n\t\t\t\t_sanitizeShadowDOM(shadowNode.content);\n\t\t\t}\n\t\t\t/* Check attributes, sanitize if necessary */\n\n\n\t\t\t_sanitizeAttributes(shadowNode);\n\t\t}\n\t\t/* Execute a hook if present */\n\n\n\t\t_executeHook('afterSanitizeShadowDOM', fragment, null);\n\t};\n\t/**\n\t * Sanitize\n\t * Public method providing core sanitation functionality\n\t *\n\t * @param {String|Node} dirty string or DOM node\n\t * @param {Object} configuration object\n\t */\n\t// eslint-disable-next-line complexity\n\n\n\tDOMPurify.sanitize = function (dirty) {\n\t\tlet cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t\tlet body;\n\t\tlet importedNode;\n\t\tlet currentNode;\n\t\tlet returnNode;\n\t\t/* Make sure we have a string to sanitize.\n\t\t\tDO NOT return early, as this will return the wrong type if\n\t\t\tthe user has requested a DOM object rather than a string */\n\n\t\tIS_EMPTY_INPUT = !dirty;\n\n\t\tif (IS_EMPTY_INPUT) {\n\t\t\tdirty = '';\n\t\t}\n\t\t/* Stringify, in case dirty is an object */\n\n\n\t\tif (typeof dirty !== 'string' && !_isNode(dirty)) {\n\t\t\tif (typeof dirty.toString === 'function') {\n\t\t\t\tdirty = dirty.toString();\n\n\t\t\t\tif (typeof dirty !== 'string') {\n\t\t\t\t\tthrow typeErrorCreate('dirty is not a string, aborting');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow typeErrorCreate('toString is not a function');\n\t\t\t}\n\t\t}\n\t\t/* Return dirty HTML if DOMPurify cannot run */\n\n\n\t\tif (!DOMPurify.isSupported) {\n\t\t\treturn dirty;\n\t\t}\n\t\t/* Assign config vars */\n\n\n\t\tif (!SET_CONFIG) {\n\t\t\t_parseConfig(cfg);\n\t\t}\n\t\t/* Clean up removed elements */\n\n\n\t\tDOMPurify.removed = [];\n\t\t/* Check if dirty is correctly typed for IN_PLACE */\n\n\t\tif (typeof dirty === 'string') {\n\t\t\tIN_PLACE = false;\n\t\t}\n\n\t\tif (IN_PLACE) {\n\t\t\t/* Do some early pre-sanitization to avoid unsafe root nodes */\n\t\t\tif (dirty.nodeName) {\n\t\t\t\tconst tagName = transformCaseFunc(dirty.nodeName);\n\n\t\t\t\tif (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n\t\t\t\t\tthrow typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (dirty instanceof Node) {\n\t\t\t/* If dirty is a DOM element, append to an empty document to avoid\n\t\t\t\t elements being stripped by the parser */\n\t\t\tbody = _initDocument('');\n\t\t\timportedNode = body.ownerDocument.importNode(dirty, true);\n\n\t\t\tif (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n\t\t\t\t/* Node is already a body, use as is */\n\t\t\t\tbody = importedNode;\n\t\t\t} else if (importedNode.nodeName === 'HTML') {\n\t\t\t\tbody = importedNode;\n\t\t\t} else {\n\t\t\t\t// eslint-disable-next-line unicorn/prefer-dom-node-append\n\t\t\t\tbody.appendChild(importedNode);\n\t\t\t}\n\t\t} else {\n\t\t\t/* Exit directly if we have nothing to do */\n\t\t\tif (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes\n\t\t\t\tdirty.indexOf('<') === -1) {\n\t\t\t\treturn trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n\t\t\t}\n\t\t\t/* Initialize the document to work on */\n\n\n\t\t\tbody = _initDocument(dirty);\n\t\t\t/* Check we have a DOM node from the data */\n\n\t\t\tif (!body) {\n\t\t\t\treturn RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n\t\t\t}\n\t\t}\n\t\t/* Remove first element node (ours) if FORCE_BODY is set */\n\n\n\t\tif (body && FORCE_BODY) {\n\t\t\t_forceRemove(body.firstChild);\n\t\t}\n\t\t/* Get node iterator */\n\n\n\t\tconst nodeIterator = _createIterator(IN_PLACE ? dirty : body);\n\t\t/* Now start iterating over the created document */\n\n\n\t\twhile (currentNode = nodeIterator.nextNode()) {\n\t\t\t/* Sanitize tags and elements */\n\t\t\tif (_sanitizeElements(currentNode)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t/* Shadow DOM detected, sanitize it */\n\n\n\t\t\tif (currentNode.content instanceof DocumentFragment) {\n\t\t\t\t_sanitizeShadowDOM(currentNode.content);\n\t\t\t}\n\t\t\t/* Check attributes, sanitize if necessary */\n\n\n\t\t\t_sanitizeAttributes(currentNode);\n\t\t}\n\t\t/* If we sanitized `dirty` in-place, return it. */\n\n\n\t\tif (IN_PLACE) {\n\t\t\treturn dirty;\n\t\t}\n\t\t/* Return sanitized string or DOM */\n\n\n\t\tif (RETURN_DOM) {\n\t\t\tif (RETURN_DOM_FRAGMENT) {\n\t\t\t\treturnNode = createDocumentFragment.call(body.ownerDocument);\n\n\t\t\t\twhile (body.firstChild) {\n\t\t\t\t\t// eslint-disable-next-line unicorn/prefer-dom-node-append\n\t\t\t\t\treturnNode.appendChild(body.firstChild);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturnNode = body;\n\t\t\t}\n\n\t\t\tif (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n\t\t\t\t/*\n\t\t\t\t\tAdoptNode() is not used because internal state is not reset\n\t\t\t\t\t(e.g. the past names map of a HTMLFormElement), this is safe\n\t\t\t\t\tin theory but we would rather not risk another attack vector.\n\t\t\t\t\tThe state that is cloned by importNode() is explicitly defined\n\t\t\t\t\tby the specs.\n\t\t\t\t*/\n\t\t\t\treturnNode = importNode.call(originalDocument, returnNode, true);\n\t\t\t}\n\n\t\t\treturn returnNode;\n\t\t}\n\n\t\tlet serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\t\t/* Serialize doctype if allowed */\n\n\t\tif (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n\t\t\tserializedHTML = '\\n' + serializedHTML;\n\t\t}\n\t\t/* Sanitize final string template-safe */\n\n\n\t\tif (SAFE_FOR_TEMPLATES) {\n\t\t\tserializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR, ' ');\n\t\t\tserializedHTML = stringReplace(serializedHTML, ERB_EXPR, ' ');\n\t\t\tserializedHTML = stringReplace(serializedHTML, TMPLIT_EXPR, ' ');\n\t\t}\n\n\t\treturn trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n\t};\n\t/**\n\t * Public method to set the configuration once\n\t * setConfig\n\t *\n\t * @param {Object} cfg configuration object\n\t */\n\n\n\tDOMPurify.setConfig = function (cfg) {\n\t\t_parseConfig(cfg);\n\n\t\tSET_CONFIG = true;\n\t};\n\t/**\n\t * Public method to remove the configuration\n\t * clearConfig\n\t *\n\t */\n\n\n\tDOMPurify.clearConfig = function () {\n\t\tCONFIG = null;\n\t\tSET_CONFIG = false;\n\t};\n\t/**\n\t * Public method to check if an attribute value is valid.\n\t * Uses last set config, if any. Otherwise, uses config defaults.\n\t * isValidAttribute\n\t *\n\t * @param {string} tag Tag name of containing element.\n\t * @param {string} attr Attribute name.\n\t * @param {string} value Attribute value.\n\t * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n\t */\n\n\n\tDOMPurify.isValidAttribute = function (tag, attr, value) {\n\t\t/* Initialize shared config vars if necessary. */\n\t\tif (!CONFIG) {\n\t\t\t_parseConfig({});\n\t\t}\n\n\t\tconst lcTag = transformCaseFunc(tag);\n\t\tconst lcName = transformCaseFunc(attr);\n\t\treturn _isValidAttribute(lcTag, lcName, value);\n\t};\n\t/**\n\t * AddHook\n\t * Public method to add DOMPurify hooks\n\t *\n\t * @param {String} entryPoint entry point for the hook to add\n\t * @param {Function} hookFunction function to execute\n\t */\n\n\n\tDOMPurify.addHook = function (entryPoint, hookFunction) {\n\t\tif (typeof hookFunction !== 'function') {\n\t\t\treturn;\n\t\t}\n\n\t\thooks[entryPoint] = hooks[entryPoint] || [];\n\t\tarrayPush(hooks[entryPoint], hookFunction);\n\t};\n\t/**\n\t * RemoveHook\n\t * Public method to remove a DOMPurify hook at a given entryPoint\n\t * (pops it from the stack of hooks if more are present)\n\t *\n\t * @param {String} entryPoint entry point for the hook to remove\n\t * @return {Function} removed(popped) hook\n\t */\n\n\n\tDOMPurify.removeHook = function (entryPoint) {\n\t\tif (hooks[entryPoint]) {\n\t\t\treturn arrayPop(hooks[entryPoint]);\n\t\t}\n\t};\n\t/**\n\t * RemoveHooks\n\t * Public method to remove all DOMPurify hooks at a given entryPoint\n\t *\n\t * @param {String} entryPoint entry point for the hooks to remove\n\t */\n\n\n\tDOMPurify.removeHooks = function (entryPoint) {\n\t\tif (hooks[entryPoint]) {\n\t\t\thooks[entryPoint] = [];\n\t\t}\n\t};\n\t/**\n\t * RemoveAllHooks\n\t * Public method to remove all DOMPurify hooks\n\t *\n\t */\n\n\n\tDOMPurify.removeAllHooks = function () {\n\t\thooks = {};\n\t};\n\n\treturn DOMPurify;\n}\n\nvar purify = createDOMPurify();\n\n// ESM-comment-begin\n// define(function () { return purify; });\n// ESM-comment-end\n\n// ESM-uncomment-begin\nexport default purify;\nexport const version = purify.version;\nexport const isSupported = purify.isSupported;\nexport const sanitize = purify.sanitize;\nexport const setConfig = purify.setConfig;\nexport const clearConfig = purify.clearConfig;\nexport const isValidAttribute = purify.isValidAttribute;\nexport const addHook = purify.addHook;\nexport const removeHook = purify.removeHook;\nexport const removeHooks = purify.removeHooks;\nexport const removeAllHooks = purify.removeAllHooks;\n// ESM-uncomment-end\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as errors from './errors.js';\nimport * as platform from './platform.js';\nimport { equalsIgnoreCase, startsWithIgnoreCase } from './strings.js';\nimport { URI } from './uri.js';\nexport var Schemas;\n(function (Schemas) {\n /**\n * A schema that is used for models that exist in memory\n * only and that have no correspondence on a server or such.\n */\n Schemas.inMemory = 'inmemory';\n /**\n * A schema that is used for setting files\n */\n Schemas.vscode = 'vscode';\n /**\n * A schema that is used for internal private files\n */\n Schemas.internal = 'private';\n /**\n * A walk-through document.\n */\n Schemas.walkThrough = 'walkThrough';\n /**\n * An embedded code snippet.\n */\n Schemas.walkThroughSnippet = 'walkThroughSnippet';\n Schemas.http = 'http';\n Schemas.https = 'https';\n Schemas.file = 'file';\n Schemas.mailto = 'mailto';\n Schemas.untitled = 'untitled';\n Schemas.data = 'data';\n Schemas.command = 'command';\n Schemas.vscodeRemote = 'vscode-remote';\n Schemas.vscodeRemoteResource = 'vscode-remote-resource';\n Schemas.vscodeManagedRemoteResource = 'vscode-managed-remote-resource';\n Schemas.vscodeUserData = 'vscode-userdata';\n Schemas.vscodeCustomEditor = 'vscode-custom-editor';\n Schemas.vscodeNotebookCell = 'vscode-notebook-cell';\n Schemas.vscodeNotebookCellMetadata = 'vscode-notebook-cell-metadata';\n Schemas.vscodeNotebookCellOutput = 'vscode-notebook-cell-output';\n Schemas.vscodeInteractiveInput = 'vscode-interactive-input';\n Schemas.vscodeSettings = 'vscode-settings';\n Schemas.vscodeWorkspaceTrust = 'vscode-workspace-trust';\n Schemas.vscodeTerminal = 'vscode-terminal';\n Schemas.vscodeChatSesssion = 'vscode-chat-editor';\n /**\n * Scheme used internally for webviews that aren't linked to a resource (i.e. not custom editors)\n */\n Schemas.webviewPanel = 'webview-panel';\n /**\n * Scheme used for loading the wrapper html and script in webviews.\n */\n Schemas.vscodeWebview = 'vscode-webview';\n /**\n * Scheme used for extension pages\n */\n Schemas.extension = 'extension';\n /**\n * Scheme used as a replacement of `file` scheme to load\n * files with our custom protocol handler (desktop only).\n */\n Schemas.vscodeFileResource = 'vscode-file';\n /**\n * Scheme used for temporary resources\n */\n Schemas.tmp = 'tmp';\n /**\n * Scheme used vs live share\n */\n Schemas.vsls = 'vsls';\n /**\n * Scheme used for the Source Control commit input's text document\n */\n Schemas.vscodeSourceControl = 'vscode-scm';\n})(Schemas || (Schemas = {}));\nexport function matchesScheme(target, scheme) {\n if (URI.isUri(target)) {\n return equalsIgnoreCase(target.scheme, scheme);\n }\n else {\n return startsWithIgnoreCase(target, scheme + ':');\n }\n}\nexport function matchesSomeScheme(target, ...schemes) {\n return schemes.some(scheme => matchesScheme(target, scheme));\n}\nexport const connectionTokenQueryName = 'tkn';\nclass RemoteAuthoritiesImpl {\n constructor() {\n this._hosts = Object.create(null);\n this._ports = Object.create(null);\n this._connectionTokens = Object.create(null);\n this._preferredWebSchema = 'http';\n this._delegate = null;\n this._remoteResourcesPath = `/${Schemas.vscodeRemoteResource}`;\n }\n setPreferredWebSchema(schema) {\n this._preferredWebSchema = schema;\n }\n rewrite(uri) {\n if (this._delegate) {\n try {\n return this._delegate(uri);\n }\n catch (err) {\n errors.onUnexpectedError(err);\n return uri;\n }\n }\n const authority = uri.authority;\n let host = this._hosts[authority];\n if (host && host.indexOf(':') !== -1 && host.indexOf('[') === -1) {\n host = `[${host}]`;\n }\n const port = this._ports[authority];\n const connectionToken = this._connectionTokens[authority];\n let query = `path=${encodeURIComponent(uri.path)}`;\n if (typeof connectionToken === 'string') {\n query += `&${connectionTokenQueryName}=${encodeURIComponent(connectionToken)}`;\n }\n return URI.from({\n scheme: platform.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource,\n authority: `${host}:${port}`,\n path: this._remoteResourcesPath,\n query\n });\n }\n}\nexport const RemoteAuthorities = new RemoteAuthoritiesImpl();\nexport const VSCODE_AUTHORITY = 'vscode-app';\nclass FileAccessImpl {\n /**\n * Returns a URI to use in contexts where the browser is responsible\n * for loading (e.g. fetch()) or when used within the DOM.\n *\n * **Note:** use `dom.ts#asCSSUrl` whenever the URL is to be used in CSS context.\n */\n uriToBrowserUri(uri) {\n // Handle remote URIs via `RemoteAuthorities`\n if (uri.scheme === Schemas.vscodeRemote) {\n return RemoteAuthorities.rewrite(uri);\n }\n // Convert to `vscode-file` resource..\n if (\n // ...only ever for `file` resources\n uri.scheme === Schemas.file &&\n (\n // ...and we run in native environments\n platform.isNative ||\n // ...or web worker extensions on desktop\n (platform.webWorkerOrigin === `${Schemas.vscodeFileResource}://${FileAccessImpl.FALLBACK_AUTHORITY}`))) {\n return uri.with({\n scheme: Schemas.vscodeFileResource,\n // We need to provide an authority here so that it can serve\n // as origin for network and loading matters in chromium.\n // If the URI is not coming with an authority already, we\n // add our own\n authority: uri.authority || FileAccessImpl.FALLBACK_AUTHORITY,\n query: null,\n fragment: null\n });\n }\n return uri;\n }\n}\nFileAccessImpl.FALLBACK_AUTHORITY = VSCODE_AUTHORITY;\nexport const FileAccess = new FileAccessImpl();\nexport var COI;\n(function (COI) {\n const coiHeaders = new Map([\n ['1', { 'Cross-Origin-Opener-Policy': 'same-origin' }],\n ['2', { 'Cross-Origin-Embedder-Policy': 'require-corp' }],\n ['3', { 'Cross-Origin-Opener-Policy': 'same-origin', 'Cross-Origin-Embedder-Policy': 'require-corp' }],\n ]);\n COI.CoopAndCoep = Object.freeze(coiHeaders.get('3'));\n const coiSearchParamName = 'vscode-coi';\n /**\n * Extract desired headers from `vscode-coi` invocation\n */\n function getHeadersFromQuery(url) {\n let params;\n if (typeof url === 'string') {\n params = new URL(url).searchParams;\n }\n else if (url instanceof URL) {\n params = url.searchParams;\n }\n else if (URI.isUri(url)) {\n params = new URL(url.toString(true)).searchParams;\n }\n const value = params === null || params === void 0 ? void 0 : params.get(coiSearchParamName);\n if (!value) {\n return undefined;\n }\n return coiHeaders.get(value);\n }\n COI.getHeadersFromQuery = getHeadersFromQuery;\n /**\n * Add the `vscode-coi` query attribute based on wanting `COOP` and `COEP`. Will be a noop when `crossOriginIsolated`\n * isn't enabled the current context\n */\n function addSearchParam(urlOrSearch, coop, coep) {\n if (!globalThis.crossOriginIsolated) {\n // depends on the current context being COI\n return;\n }\n const value = coop && coep ? '3' : coep ? '2' : '1';\n if (urlOrSearch instanceof URLSearchParams) {\n urlOrSearch.set(coiSearchParamName, value);\n }\n else {\n urlOrSearch[coiSearchParamName] = value;\n }\n }\n COI.addSearchParam = addSearchParam;\n})(COI || (COI = {}));\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as strings from './strings.js';\n/**\n * Return a hash value for an object.\n */\nexport function hash(obj) {\n return doHash(obj, 0);\n}\nexport function doHash(obj, hashVal) {\n switch (typeof obj) {\n case 'object':\n if (obj === null) {\n return numberHash(349, hashVal);\n }\n else if (Array.isArray(obj)) {\n return arrayHash(obj, hashVal);\n }\n return objectHash(obj, hashVal);\n case 'string':\n return stringHash(obj, hashVal);\n case 'boolean':\n return booleanHash(obj, hashVal);\n case 'number':\n return numberHash(obj, hashVal);\n case 'undefined':\n return numberHash(937, hashVal);\n default:\n return numberHash(617, hashVal);\n }\n}\nexport function numberHash(val, initialHashVal) {\n return (((initialHashVal << 5) - initialHashVal) + val) | 0; // hashVal * 31 + ch, keep as int32\n}\nfunction booleanHash(b, initialHashVal) {\n return numberHash(b ? 433 : 863, initialHashVal);\n}\nexport function stringHash(s, hashVal) {\n hashVal = numberHash(149417, hashVal);\n for (let i = 0, length = s.length; i < length; i++) {\n hashVal = numberHash(s.charCodeAt(i), hashVal);\n }\n return hashVal;\n}\nfunction arrayHash(arr, initialHashVal) {\n initialHashVal = numberHash(104579, initialHashVal);\n return arr.reduce((hashVal, item) => doHash(item, hashVal), initialHashVal);\n}\nfunction objectHash(obj, initialHashVal) {\n initialHashVal = numberHash(181387, initialHashVal);\n return Object.keys(obj).sort().reduce((hashVal, key) => {\n hashVal = stringHash(key, hashVal);\n return doHash(obj[key], hashVal);\n }, initialHashVal);\n}\nfunction leftRotate(value, bits, totalBits = 32) {\n // delta + bits = totalBits\n const delta = totalBits - bits;\n // All ones, expect `delta` zeros aligned to the right\n const mask = ~((1 << delta) - 1);\n // Join (value left-shifted `bits` bits) with (masked value right-shifted `delta` bits)\n return ((value << bits) | ((mask & value) >>> delta)) >>> 0;\n}\nfunction fill(dest, index = 0, count = dest.byteLength, value = 0) {\n for (let i = 0; i < count; i++) {\n dest[index + i] = value;\n }\n}\nfunction leftPad(value, length, char = '0') {\n while (value.length < length) {\n value = char + value;\n }\n return value;\n}\nexport function toHexString(bufferOrValue, bitsize = 32) {\n if (bufferOrValue instanceof ArrayBuffer) {\n return Array.from(new Uint8Array(bufferOrValue)).map(b => b.toString(16).padStart(2, '0')).join('');\n }\n return leftPad((bufferOrValue >>> 0).toString(16), bitsize / 4);\n}\n/**\n * A SHA1 implementation that works with strings and does not allocate.\n */\nexport class StringSHA1 {\n constructor() {\n this._h0 = 0x67452301;\n this._h1 = 0xEFCDAB89;\n this._h2 = 0x98BADCFE;\n this._h3 = 0x10325476;\n this._h4 = 0xC3D2E1F0;\n this._buff = new Uint8Array(64 /* SHA1Constant.BLOCK_SIZE */ + 3 /* to fit any utf-8 */);\n this._buffDV = new DataView(this._buff.buffer);\n this._buffLen = 0;\n this._totalLen = 0;\n this._leftoverHighSurrogate = 0;\n this._finished = false;\n }\n update(str) {\n const strLen = str.length;\n if (strLen === 0) {\n return;\n }\n const buff = this._buff;\n let buffLen = this._buffLen;\n let leftoverHighSurrogate = this._leftoverHighSurrogate;\n let charCode;\n let offset;\n if (leftoverHighSurrogate !== 0) {\n charCode = leftoverHighSurrogate;\n offset = -1;\n leftoverHighSurrogate = 0;\n }\n else {\n charCode = str.charCodeAt(0);\n offset = 0;\n }\n while (true) {\n let codePoint = charCode;\n if (strings.isHighSurrogate(charCode)) {\n if (offset + 1 < strLen) {\n const nextCharCode = str.charCodeAt(offset + 1);\n if (strings.isLowSurrogate(nextCharCode)) {\n offset++;\n codePoint = strings.computeCodePoint(charCode, nextCharCode);\n }\n else {\n // illegal => unicode replacement character\n codePoint = 65533 /* SHA1Constant.UNICODE_REPLACEMENT */;\n }\n }\n else {\n // last character is a surrogate pair\n leftoverHighSurrogate = charCode;\n break;\n }\n }\n else if (strings.isLowSurrogate(charCode)) {\n // illegal => unicode replacement character\n codePoint = 65533 /* SHA1Constant.UNICODE_REPLACEMENT */;\n }\n buffLen = this._push(buff, buffLen, codePoint);\n offset++;\n if (offset < strLen) {\n charCode = str.charCodeAt(offset);\n }\n else {\n break;\n }\n }\n this._buffLen = buffLen;\n this._leftoverHighSurrogate = leftoverHighSurrogate;\n }\n _push(buff, buffLen, codePoint) {\n if (codePoint < 0x0080) {\n buff[buffLen++] = codePoint;\n }\n else if (codePoint < 0x0800) {\n buff[buffLen++] = 0b11000000 | ((codePoint & 0b00000000000000000000011111000000) >>> 6);\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000000000111111) >>> 0);\n }\n else if (codePoint < 0x10000) {\n buff[buffLen++] = 0b11100000 | ((codePoint & 0b00000000000000001111000000000000) >>> 12);\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000111111000000) >>> 6);\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000000000111111) >>> 0);\n }\n else {\n buff[buffLen++] = 0b11110000 | ((codePoint & 0b00000000000111000000000000000000) >>> 18);\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000111111000000000000) >>> 12);\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000111111000000) >>> 6);\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000000000111111) >>> 0);\n }\n if (buffLen >= 64 /* SHA1Constant.BLOCK_SIZE */) {\n this._step();\n buffLen -= 64 /* SHA1Constant.BLOCK_SIZE */;\n this._totalLen += 64 /* SHA1Constant.BLOCK_SIZE */;\n // take last 3 in case of UTF8 overflow\n buff[0] = buff[64 /* SHA1Constant.BLOCK_SIZE */ + 0];\n buff[1] = buff[64 /* SHA1Constant.BLOCK_SIZE */ + 1];\n buff[2] = buff[64 /* SHA1Constant.BLOCK_SIZE */ + 2];\n }\n return buffLen;\n }\n digest() {\n if (!this._finished) {\n this._finished = true;\n if (this._leftoverHighSurrogate) {\n // illegal => unicode replacement character\n this._leftoverHighSurrogate = 0;\n this._buffLen = this._push(this._buff, this._buffLen, 65533 /* SHA1Constant.UNICODE_REPLACEMENT */);\n }\n this._totalLen += this._buffLen;\n this._wrapUp();\n }\n return toHexString(this._h0) + toHexString(this._h1) + toHexString(this._h2) + toHexString(this._h3) + toHexString(this._h4);\n }\n _wrapUp() {\n this._buff[this._buffLen++] = 0x80;\n fill(this._buff, this._buffLen);\n if (this._buffLen > 56) {\n this._step();\n fill(this._buff);\n }\n // this will fit because the mantissa can cover up to 52 bits\n const ml = 8 * this._totalLen;\n this._buffDV.setUint32(56, Math.floor(ml / 4294967296), false);\n this._buffDV.setUint32(60, ml % 4294967296, false);\n this._step();\n }\n _step() {\n const bigBlock32 = StringSHA1._bigBlock32;\n const data = this._buffDV;\n for (let j = 0; j < 64 /* 16*4 */; j += 4) {\n bigBlock32.setUint32(j, data.getUint32(j, false), false);\n }\n for (let j = 64; j < 320 /* 80*4 */; j += 4) {\n bigBlock32.setUint32(j, leftRotate((bigBlock32.getUint32(j - 12, false) ^ bigBlock32.getUint32(j - 32, false) ^ bigBlock32.getUint32(j - 56, false) ^ bigBlock32.getUint32(j - 64, false)), 1), false);\n }\n let a = this._h0;\n let b = this._h1;\n let c = this._h2;\n let d = this._h3;\n let e = this._h4;\n let f, k;\n let temp;\n for (let j = 0; j < 80; j++) {\n if (j < 20) {\n f = (b & c) | ((~b) & d);\n k = 0x5A827999;\n }\n else if (j < 40) {\n f = b ^ c ^ d;\n k = 0x6ED9EBA1;\n }\n else if (j < 60) {\n f = (b & c) | (b & d) | (c & d);\n k = 0x8F1BBCDC;\n }\n else {\n f = b ^ c ^ d;\n k = 0xCA62C1D6;\n }\n temp = (leftRotate(a, 5) + f + e + k + bigBlock32.getUint32(j * 4, false)) & 0xffffffff;\n e = d;\n d = c;\n c = leftRotate(b, 30);\n b = a;\n a = temp;\n }\n this._h0 = (this._h0 + a) & 0xffffffff;\n this._h1 = (this._h1 + b) & 0xffffffff;\n this._h2 = (this._h2 + c) & 0xffffffff;\n this._h3 = (this._h3 + d) & 0xffffffff;\n this._h4 = (this._h4 + e) & 0xffffffff;\n }\n}\nStringSHA1._bigBlock32 = new DataView(new ArrayBuffer(320)); // 80 * 4 = 320\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as browser from './browser.js';\nimport { BrowserFeatures } from './canIUse.js';\nimport { StandardKeyboardEvent } from './keyboardEvent.js';\nimport { StandardMouseEvent } from './mouseEvent.js';\nimport { AbstractIdleValue, IntervalTimer, _runWhenIdle } from '../common/async.js';\nimport { onUnexpectedError } from '../common/errors.js';\nimport * as event from '../common/event.js';\nimport * as dompurify from './dompurify/dompurify.js';\nimport { Disposable, DisposableStore, toDisposable } from '../common/lifecycle.js';\nimport { FileAccess, RemoteAuthorities } from '../common/network.js';\nimport * as platform from '../common/platform.js';\nimport { hash } from '../common/hash.js';\nimport { ensureCodeWindow, mainWindow } from './window.js';\n//# region Multi-Window Support Utilities\nexport const { registerWindow, getWindow, getDocument, getWindows, getWindowsCount, getWindowId, getWindowById, hasWindow, onDidRegisterWindow, onWillUnregisterWindow, onDidUnregisterWindow } = (function () {\n const windows = new Map();\n ensureCodeWindow(mainWindow, 1);\n windows.set(mainWindow.vscodeWindowId, { window: mainWindow, disposables: new DisposableStore() });\n const onDidRegisterWindow = new event.Emitter();\n const onDidUnregisterWindow = new event.Emitter();\n const onWillUnregisterWindow = new event.Emitter();\n return {\n onDidRegisterWindow: onDidRegisterWindow.event,\n onWillUnregisterWindow: onWillUnregisterWindow.event,\n onDidUnregisterWindow: onDidUnregisterWindow.event,\n registerWindow(window) {\n if (windows.has(window.vscodeWindowId)) {\n return Disposable.None;\n }\n const disposables = new DisposableStore();\n const registeredWindow = {\n window,\n disposables: disposables.add(new DisposableStore())\n };\n windows.set(window.vscodeWindowId, registeredWindow);\n disposables.add(toDisposable(() => {\n windows.delete(window.vscodeWindowId);\n onDidUnregisterWindow.fire(window);\n }));\n disposables.add(addDisposableListener(window, EventType.BEFORE_UNLOAD, () => {\n onWillUnregisterWindow.fire(window);\n }));\n onDidRegisterWindow.fire(registeredWindow);\n return disposables;\n },\n getWindows() {\n return windows.values();\n },\n getWindowsCount() {\n return windows.size;\n },\n getWindowId(targetWindow) {\n return targetWindow.vscodeWindowId;\n },\n hasWindow(windowId) {\n return windows.has(windowId);\n },\n getWindowById(windowId) {\n return windows.get(windowId);\n },\n getWindow(e) {\n var _a;\n const candidateNode = e;\n if ((_a = candidateNode === null || candidateNode === void 0 ? void 0 : candidateNode.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView) {\n return candidateNode.ownerDocument.defaultView.window;\n }\n const candidateEvent = e;\n if (candidateEvent === null || candidateEvent === void 0 ? void 0 : candidateEvent.view) {\n return candidateEvent.view.window;\n }\n return mainWindow;\n },\n getDocument(e) {\n const candidateNode = e;\n return getWindow(candidateNode).document;\n }\n };\n})();\n//#endregion\nexport function clearNode(node) {\n while (node.firstChild) {\n node.firstChild.remove();\n }\n}\nclass DomListener {\n constructor(node, type, handler, options) {\n this._node = node;\n this._type = type;\n this._handler = handler;\n this._options = (options || false);\n this._node.addEventListener(this._type, this._handler, this._options);\n }\n dispose() {\n if (!this._handler) {\n // Already disposed\n return;\n }\n this._node.removeEventListener(this._type, this._handler, this._options);\n // Prevent leakers from holding on to the dom or handler func\n this._node = null;\n this._handler = null;\n }\n}\nexport function addDisposableListener(node, type, handler, useCaptureOrOptions) {\n return new DomListener(node, type, handler, useCaptureOrOptions);\n}\nfunction _wrapAsStandardMouseEvent(targetWindow, handler) {\n return function (e) {\n return handler(new StandardMouseEvent(targetWindow, e));\n };\n}\nfunction _wrapAsStandardKeyboardEvent(handler) {\n return function (e) {\n return handler(new StandardKeyboardEvent(e));\n };\n}\nexport const addStandardDisposableListener = function addStandardDisposableListener(node, type, handler, useCapture) {\n let wrapHandler = handler;\n if (type === 'click' || type === 'mousedown') {\n wrapHandler = _wrapAsStandardMouseEvent(getWindow(node), handler);\n }\n else if (type === 'keydown' || type === 'keypress' || type === 'keyup') {\n wrapHandler = _wrapAsStandardKeyboardEvent(handler);\n }\n return addDisposableListener(node, type, wrapHandler, useCapture);\n};\nexport const addStandardDisposableGenericMouseDownListener = function addStandardDisposableListener(node, handler, useCapture) {\n const wrapHandler = _wrapAsStandardMouseEvent(getWindow(node), handler);\n return addDisposableGenericMouseDownListener(node, wrapHandler, useCapture);\n};\nexport const addStandardDisposableGenericMouseUpListener = function addStandardDisposableListener(node, handler, useCapture) {\n const wrapHandler = _wrapAsStandardMouseEvent(getWindow(node), handler);\n return addDisposableGenericMouseUpListener(node, wrapHandler, useCapture);\n};\nexport function addDisposableGenericMouseDownListener(node, handler, useCapture) {\n return addDisposableListener(node, platform.isIOS && BrowserFeatures.pointerEvents ? EventType.POINTER_DOWN : EventType.MOUSE_DOWN, handler, useCapture);\n}\nexport function addDisposableGenericMouseUpListener(node, handler, useCapture) {\n return addDisposableListener(node, platform.isIOS && BrowserFeatures.pointerEvents ? EventType.POINTER_UP : EventType.MOUSE_UP, handler, useCapture);\n}\n/**\n * Execute the callback the next time the browser is idle, returning an\n * {@link IDisposable} that will cancel the callback when disposed. This wraps\n * [requestIdleCallback] so it will fallback to [setTimeout] if the environment\n * doesn't support it.\n *\n * @param targetWindow The window for which to run the idle callback\n * @param callback The callback to run when idle, this includes an\n * [IdleDeadline] that provides the time alloted for the idle callback by the\n * browser. Not respecting this deadline will result in a degraded user\n * experience.\n * @param timeout A timeout at which point to queue no longer wait for an idle\n * callback but queue it on the regular event loop (like setTimeout). Typically\n * this should not be used.\n *\n * [IdleDeadline]: https://developer.mozilla.org/en-US/docs/Web/API/IdleDeadline\n * [requestIdleCallback]: https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback\n * [setTimeout]: https://developer.mozilla.org/en-US/docs/Web/API/Window/setTimeout\n */\nexport function runWhenWindowIdle(targetWindow, callback, timeout) {\n return _runWhenIdle(targetWindow, callback, timeout);\n}\n/**\n * An implementation of the \"idle-until-urgent\"-strategy as introduced\n * here: https://philipwalton.com/articles/idle-until-urgent/\n */\nexport class WindowIdleValue extends AbstractIdleValue {\n constructor(targetWindow, executor) {\n super(targetWindow, executor);\n }\n}\n/**\n * Schedule a callback to be run at the next animation frame.\n * This allows multiple parties to register callbacks that should run at the next animation frame.\n * If currently in an animation frame, `runner` will be executed immediately.\n * @return token that can be used to cancel the scheduled runner (only if `runner` was not executed immediately).\n */\nexport let runAtThisOrScheduleAtNextAnimationFrame;\n/**\n * Schedule a callback to be run at the next animation frame.\n * This allows multiple parties to register callbacks that should run at the next animation frame.\n * If currently in an animation frame, `runner` will be executed at the next animation frame.\n * @return token that can be used to cancel the scheduled runner.\n */\nexport let scheduleAtNextAnimationFrame;\nexport class WindowIntervalTimer extends IntervalTimer {\n /**\n *\n * @param node The optional node from which the target window is determined\n */\n constructor(node) {\n super();\n this.defaultTarget = node && getWindow(node);\n }\n cancelAndSet(runner, interval, targetWindow) {\n return super.cancelAndSet(runner, interval, targetWindow !== null && targetWindow !== void 0 ? targetWindow : this.defaultTarget);\n }\n}\nclass AnimationFrameQueueItem {\n constructor(runner, priority = 0) {\n this._runner = runner;\n this.priority = priority;\n this._canceled = false;\n }\n dispose() {\n this._canceled = true;\n }\n execute() {\n if (this._canceled) {\n return;\n }\n try {\n this._runner();\n }\n catch (e) {\n onUnexpectedError(e);\n }\n }\n // Sort by priority (largest to lowest)\n static sort(a, b) {\n return b.priority - a.priority;\n }\n}\n(function () {\n /**\n * The runners scheduled at the next animation frame\n */\n const NEXT_QUEUE = new Map();\n /**\n * The runners scheduled at the current animation frame\n */\n const CURRENT_QUEUE = new Map();\n /**\n * A flag to keep track if the native requestAnimationFrame was already called\n */\n const animFrameRequested = new Map();\n /**\n * A flag to indicate if currently handling a native requestAnimationFrame callback\n */\n const inAnimationFrameRunner = new Map();\n const animationFrameRunner = (targetWindowId) => {\n var _a;\n animFrameRequested.set(targetWindowId, false);\n const currentQueue = (_a = NEXT_QUEUE.get(targetWindowId)) !== null && _a !== void 0 ? _a : [];\n CURRENT_QUEUE.set(targetWindowId, currentQueue);\n NEXT_QUEUE.set(targetWindowId, []);\n inAnimationFrameRunner.set(targetWindowId, true);\n while (currentQueue.length > 0) {\n currentQueue.sort(AnimationFrameQueueItem.sort);\n const top = currentQueue.shift();\n top.execute();\n }\n inAnimationFrameRunner.set(targetWindowId, false);\n };\n scheduleAtNextAnimationFrame = (targetWindow, runner, priority = 0) => {\n const targetWindowId = getWindowId(targetWindow);\n const item = new AnimationFrameQueueItem(runner, priority);\n let nextQueue = NEXT_QUEUE.get(targetWindowId);\n if (!nextQueue) {\n nextQueue = [];\n NEXT_QUEUE.set(targetWindowId, nextQueue);\n }\n nextQueue.push(item);\n if (!animFrameRequested.get(targetWindowId)) {\n animFrameRequested.set(targetWindowId, true);\n targetWindow.requestAnimationFrame(() => animationFrameRunner(targetWindowId));\n }\n return item;\n };\n runAtThisOrScheduleAtNextAnimationFrame = (targetWindow, runner, priority) => {\n const targetWindowId = getWindowId(targetWindow);\n if (inAnimationFrameRunner.get(targetWindowId)) {\n const item = new AnimationFrameQueueItem(runner, priority);\n let currentQueue = CURRENT_QUEUE.get(targetWindowId);\n if (!currentQueue) {\n currentQueue = [];\n CURRENT_QUEUE.set(targetWindowId, currentQueue);\n }\n currentQueue.push(item);\n return item;\n }\n else {\n return scheduleAtNextAnimationFrame(targetWindow, runner, priority);\n }\n };\n})();\nexport function getComputedStyle(el) {\n return getWindow(el).getComputedStyle(el, null);\n}\nexport function getClientArea(element, fallback) {\n const elWindow = getWindow(element);\n const elDocument = elWindow.document;\n // Try with DOM clientWidth / clientHeight\n if (element !== elDocument.body) {\n return new Dimension(element.clientWidth, element.clientHeight);\n }\n // If visual view port exits and it's on mobile, it should be used instead of window innerWidth / innerHeight, or document.body.clientWidth / document.body.clientHeight\n if (platform.isIOS && (elWindow === null || elWindow === void 0 ? void 0 : elWindow.visualViewport)) {\n return new Dimension(elWindow.visualViewport.width, elWindow.visualViewport.height);\n }\n // Try innerWidth / innerHeight\n if ((elWindow === null || elWindow === void 0 ? void 0 : elWindow.innerWidth) && elWindow.innerHeight) {\n return new Dimension(elWindow.innerWidth, elWindow.innerHeight);\n }\n // Try with document.body.clientWidth / document.body.clientHeight\n if (elDocument.body && elDocument.body.clientWidth && elDocument.body.clientHeight) {\n return new Dimension(elDocument.body.clientWidth, elDocument.body.clientHeight);\n }\n // Try with document.documentElement.clientWidth / document.documentElement.clientHeight\n if (elDocument.documentElement && elDocument.documentElement.clientWidth && elDocument.documentElement.clientHeight) {\n return new Dimension(elDocument.documentElement.clientWidth, elDocument.documentElement.clientHeight);\n }\n if (fallback) {\n return getClientArea(fallback);\n }\n throw new Error('Unable to figure out browser width and height');\n}\nclass SizeUtils {\n // Adapted from WinJS\n // Converts a CSS positioning string for the specified element to pixels.\n static convertToPixels(element, value) {\n return parseFloat(value) || 0;\n }\n static getDimension(element, cssPropertyName, jsPropertyName) {\n const computedStyle = getComputedStyle(element);\n const value = computedStyle ? computedStyle.getPropertyValue(cssPropertyName) : '0';\n return SizeUtils.convertToPixels(element, value);\n }\n static getBorderLeftWidth(element) {\n return SizeUtils.getDimension(element, 'border-left-width', 'borderLeftWidth');\n }\n static getBorderRightWidth(element) {\n return SizeUtils.getDimension(element, 'border-right-width', 'borderRightWidth');\n }\n static getBorderTopWidth(element) {\n return SizeUtils.getDimension(element, 'border-top-width', 'borderTopWidth');\n }\n static getBorderBottomWidth(element) {\n return SizeUtils.getDimension(element, 'border-bottom-width', 'borderBottomWidth');\n }\n static getPaddingLeft(element) {\n return SizeUtils.getDimension(element, 'padding-left', 'paddingLeft');\n }\n static getPaddingRight(element) {\n return SizeUtils.getDimension(element, 'padding-right', 'paddingRight');\n }\n static getPaddingTop(element) {\n return SizeUtils.getDimension(element, 'padding-top', 'paddingTop');\n }\n static getPaddingBottom(element) {\n return SizeUtils.getDimension(element, 'padding-bottom', 'paddingBottom');\n }\n static getMarginLeft(element) {\n return SizeUtils.getDimension(element, 'margin-left', 'marginLeft');\n }\n static getMarginTop(element) {\n return SizeUtils.getDimension(element, 'margin-top', 'marginTop');\n }\n static getMarginRight(element) {\n return SizeUtils.getDimension(element, 'margin-right', 'marginRight');\n }\n static getMarginBottom(element) {\n return SizeUtils.getDimension(element, 'margin-bottom', 'marginBottom');\n }\n}\nexport class Dimension {\n constructor(width, height) {\n this.width = width;\n this.height = height;\n }\n with(width = this.width, height = this.height) {\n if (width !== this.width || height !== this.height) {\n return new Dimension(width, height);\n }\n else {\n return this;\n }\n }\n static is(obj) {\n return typeof obj === 'object' && typeof obj.height === 'number' && typeof obj.width === 'number';\n }\n static lift(obj) {\n if (obj instanceof Dimension) {\n return obj;\n }\n else {\n return new Dimension(obj.width, obj.height);\n }\n }\n static equals(a, b) {\n if (a === b) {\n return true;\n }\n if (!a || !b) {\n return false;\n }\n return a.width === b.width && a.height === b.height;\n }\n}\nDimension.None = new Dimension(0, 0);\nexport function getTopLeftOffset(element) {\n // Adapted from WinJS.Utilities.getPosition\n // and added borders to the mix\n let offsetParent = element.offsetParent;\n let top = element.offsetTop;\n let left = element.offsetLeft;\n while ((element = element.parentNode) !== null\n && element !== element.ownerDocument.body\n && element !== element.ownerDocument.documentElement) {\n top -= element.scrollTop;\n const c = isShadowRoot(element) ? null : getComputedStyle(element);\n if (c) {\n left -= c.direction !== 'rtl' ? element.scrollLeft : -element.scrollLeft;\n }\n if (element === offsetParent) {\n left += SizeUtils.getBorderLeftWidth(element);\n top += SizeUtils.getBorderTopWidth(element);\n top += element.offsetTop;\n left += element.offsetLeft;\n offsetParent = element.offsetParent;\n }\n }\n return {\n left: left,\n top: top\n };\n}\nexport function size(element, width, height) {\n if (typeof width === 'number') {\n element.style.width = `${width}px`;\n }\n if (typeof height === 'number') {\n element.style.height = `${height}px`;\n }\n}\n/**\n * Returns the position of a dom node relative to the entire page.\n */\nexport function getDomNodePagePosition(domNode) {\n const bb = domNode.getBoundingClientRect();\n const window = getWindow(domNode);\n return {\n left: bb.left + window.scrollX,\n top: bb.top + window.scrollY,\n width: bb.width,\n height: bb.height\n };\n}\n/**\n * Returns the effective zoom on a given element before window zoom level is applied\n */\nexport function getDomNodeZoomLevel(domNode) {\n let testElement = domNode;\n let zoom = 1.0;\n do {\n const elementZoomLevel = getComputedStyle(testElement).zoom;\n if (elementZoomLevel !== null && elementZoomLevel !== undefined && elementZoomLevel !== '1') {\n zoom *= elementZoomLevel;\n }\n testElement = testElement.parentElement;\n } while (testElement !== null && testElement !== testElement.ownerDocument.documentElement);\n return zoom;\n}\n// Adapted from WinJS\n// Gets the width of the element, including margins.\nexport function getTotalWidth(element) {\n const margin = SizeUtils.getMarginLeft(element) + SizeUtils.getMarginRight(element);\n return element.offsetWidth + margin;\n}\nexport function getContentWidth(element) {\n const border = SizeUtils.getBorderLeftWidth(element) + SizeUtils.getBorderRightWidth(element);\n const padding = SizeUtils.getPaddingLeft(element) + SizeUtils.getPaddingRight(element);\n return element.offsetWidth - border - padding;\n}\n// Adapted from WinJS\n// Gets the height of the content of the specified element. The content height does not include borders or padding.\nexport function getContentHeight(element) {\n const border = SizeUtils.getBorderTopWidth(element) + SizeUtils.getBorderBottomWidth(element);\n const padding = SizeUtils.getPaddingTop(element) + SizeUtils.getPaddingBottom(element);\n return element.offsetHeight - border - padding;\n}\n// Adapted from WinJS\n// Gets the height of the element, including its margins.\nexport function getTotalHeight(element) {\n const margin = SizeUtils.getMarginTop(element) + SizeUtils.getMarginBottom(element);\n return element.offsetHeight + margin;\n}\n// ----------------------------------------------------------------------------------------\nexport function isAncestor(testChild, testAncestor) {\n return Boolean(testAncestor === null || testAncestor === void 0 ? void 0 : testAncestor.contains(testChild));\n}\nexport function findParentWithClass(node, clazz, stopAtClazzOrNode) {\n while (node && node.nodeType === node.ELEMENT_NODE) {\n if (node.classList.contains(clazz)) {\n return node;\n }\n if (stopAtClazzOrNode) {\n if (typeof stopAtClazzOrNode === 'string') {\n if (node.classList.contains(stopAtClazzOrNode)) {\n return null;\n }\n }\n else {\n if (node === stopAtClazzOrNode) {\n return null;\n }\n }\n }\n node = node.parentNode;\n }\n return null;\n}\nexport function hasParentWithClass(node, clazz, stopAtClazzOrNode) {\n return !!findParentWithClass(node, clazz, stopAtClazzOrNode);\n}\nexport function isShadowRoot(node) {\n return (node && !!node.host && !!node.mode);\n}\nexport function isInShadowDOM(domNode) {\n return !!getShadowRoot(domNode);\n}\nexport function getShadowRoot(domNode) {\n var _a;\n while (domNode.parentNode) {\n if (domNode === ((_a = domNode.ownerDocument) === null || _a === void 0 ? void 0 : _a.body)) {\n // reached the body\n return null;\n }\n domNode = domNode.parentNode;\n }\n return isShadowRoot(domNode) ? domNode : null;\n}\n/**\n * Returns the active element across all child windows\n * based on document focus. Falls back to the main\n * window if no window has focus.\n */\nexport function getActiveElement() {\n let result = getActiveDocument().activeElement;\n while (result === null || result === void 0 ? void 0 : result.shadowRoot) {\n result = result.shadowRoot.activeElement;\n }\n return result;\n}\n/**\n * Returns true if the focused window active element matches\n * the provided element. Falls back to the main window if no\n * window has focus.\n */\nexport function isActiveElement(element) {\n return getActiveElement() === element;\n}\n/**\n * Returns true if the focused window active element is contained in\n * `ancestor`. Falls back to the main window if no window has focus.\n */\nexport function isAncestorOfActiveElement(ancestor) {\n return isAncestor(getActiveElement(), ancestor);\n}\n/**\n * Returns the active document across main and child windows.\n * Prefers the window with focus, otherwise falls back to\n * the main windows document.\n */\nexport function getActiveDocument() {\n var _a;\n if (getWindowsCount() <= 1) {\n return mainWindow.document;\n }\n const documents = Array.from(getWindows()).map(({ window }) => window.document);\n return (_a = documents.find(doc => doc.hasFocus())) !== null && _a !== void 0 ? _a : mainWindow.document;\n}\n/**\n * Returns the active window across main and child windows.\n * Prefers the window with focus, otherwise falls back to\n * the main window.\n */\nexport function getActiveWindow() {\n var _a, _b;\n const document = getActiveDocument();\n return ((_b = (_a = document.defaultView) === null || _a === void 0 ? void 0 : _a.window) !== null && _b !== void 0 ? _b : mainWindow);\n}\nconst globalStylesheets = new Map();\n/**\n * A version of createStyleSheet which has a unified API to initialize/set the style content.\n */\nexport function createStyleSheet2() {\n return new WrappedStyleElement();\n}\nclass WrappedStyleElement {\n constructor() {\n this._currentCssStyle = '';\n this._styleSheet = undefined;\n }\n setStyle(cssStyle) {\n if (cssStyle === this._currentCssStyle) {\n return;\n }\n this._currentCssStyle = cssStyle;\n if (!this._styleSheet) {\n this._styleSheet = createStyleSheet(mainWindow.document.head, (s) => s.innerText = cssStyle);\n }\n else {\n this._styleSheet.innerText = cssStyle;\n }\n }\n dispose() {\n if (this._styleSheet) {\n clearNode(this._styleSheet);\n this._styleSheet = undefined;\n }\n }\n}\nexport function createStyleSheet(container = mainWindow.document.head, beforeAppend, disposableStore) {\n const style = document.createElement('style');\n style.type = 'text/css';\n style.media = 'screen';\n beforeAppend === null || beforeAppend === void 0 ? void 0 : beforeAppend(style);\n container.appendChild(style);\n if (disposableStore) {\n disposableStore.add(toDisposable(() => container.removeChild(style)));\n }\n // With as container, the stylesheet becomes global and is tracked\n // to support auxiliary windows to clone the stylesheet.\n if (container === mainWindow.document.head) {\n const globalStylesheetClones = new Set();\n globalStylesheets.set(style, globalStylesheetClones);\n for (const { window: targetWindow, disposables } of getWindows()) {\n if (targetWindow === mainWindow) {\n continue; // main window is already tracked\n }\n const cloneDisposable = disposables.add(cloneGlobalStyleSheet(style, globalStylesheetClones, targetWindow));\n disposableStore === null || disposableStore === void 0 ? void 0 : disposableStore.add(cloneDisposable);\n }\n }\n return style;\n}\nfunction cloneGlobalStyleSheet(globalStylesheet, globalStylesheetClones, targetWindow) {\n var _a, _b;\n const disposables = new DisposableStore();\n const clone = globalStylesheet.cloneNode(true);\n targetWindow.document.head.appendChild(clone);\n disposables.add(toDisposable(() => targetWindow.document.head.removeChild(clone)));\n for (const rule of getDynamicStyleSheetRules(globalStylesheet)) {\n (_a = clone.sheet) === null || _a === void 0 ? void 0 : _a.insertRule(rule.cssText, (_b = clone.sheet) === null || _b === void 0 ? void 0 : _b.cssRules.length);\n }\n disposables.add(sharedMutationObserver.observe(globalStylesheet, disposables, { childList: true })(() => {\n clone.textContent = globalStylesheet.textContent;\n }));\n globalStylesheetClones.add(clone);\n disposables.add(toDisposable(() => globalStylesheetClones.delete(clone)));\n return disposables;\n}\nexport const sharedMutationObserver = new class {\n constructor() {\n this.mutationObservers = new Map();\n }\n observe(target, disposables, options) {\n let mutationObserversPerTarget = this.mutationObservers.get(target);\n if (!mutationObserversPerTarget) {\n mutationObserversPerTarget = new Map();\n this.mutationObservers.set(target, mutationObserversPerTarget);\n }\n const optionsHash = hash(options);\n let mutationObserverPerOptions = mutationObserversPerTarget.get(optionsHash);\n if (!mutationObserverPerOptions) {\n const onDidMutate = new event.Emitter();\n const observer = new MutationObserver(mutations => onDidMutate.fire(mutations));\n observer.observe(target, options);\n const resolvedMutationObserverPerOptions = mutationObserverPerOptions = {\n users: 1,\n observer,\n onDidMutate: onDidMutate.event\n };\n disposables.add(toDisposable(() => {\n resolvedMutationObserverPerOptions.users -= 1;\n if (resolvedMutationObserverPerOptions.users === 0) {\n onDidMutate.dispose();\n observer.disconnect();\n mutationObserversPerTarget === null || mutationObserversPerTarget === void 0 ? void 0 : mutationObserversPerTarget.delete(optionsHash);\n if ((mutationObserversPerTarget === null || mutationObserversPerTarget === void 0 ? void 0 : mutationObserversPerTarget.size) === 0) {\n this.mutationObservers.delete(target);\n }\n }\n }));\n mutationObserversPerTarget.set(optionsHash, mutationObserverPerOptions);\n }\n else {\n mutationObserverPerOptions.users += 1;\n }\n return mutationObserverPerOptions.onDidMutate;\n }\n};\nlet _sharedStyleSheet = null;\nfunction getSharedStyleSheet() {\n if (!_sharedStyleSheet) {\n _sharedStyleSheet = createStyleSheet();\n }\n return _sharedStyleSheet;\n}\nfunction getDynamicStyleSheetRules(style) {\n var _a, _b;\n if ((_a = style === null || style === void 0 ? void 0 : style.sheet) === null || _a === void 0 ? void 0 : _a.rules) {\n // Chrome, IE\n return style.sheet.rules;\n }\n if ((_b = style === null || style === void 0 ? void 0 : style.sheet) === null || _b === void 0 ? void 0 : _b.cssRules) {\n // FF\n return style.sheet.cssRules;\n }\n return [];\n}\nexport function createCSSRule(selector, cssText, style = getSharedStyleSheet()) {\n var _a, _b;\n if (!style || !cssText) {\n return;\n }\n (_a = style.sheet) === null || _a === void 0 ? void 0 : _a.insertRule(`${selector} {${cssText}}`, 0);\n // Apply rule also to all cloned global stylesheets\n for (const clonedGlobalStylesheet of (_b = globalStylesheets.get(style)) !== null && _b !== void 0 ? _b : []) {\n createCSSRule(selector, cssText, clonedGlobalStylesheet);\n }\n}\nexport function removeCSSRulesContainingSelector(ruleName, style = getSharedStyleSheet()) {\n var _a, _b;\n if (!style) {\n return;\n }\n const rules = getDynamicStyleSheetRules(style);\n const toDelete = [];\n for (let i = 0; i < rules.length; i++) {\n const rule = rules[i];\n if (isCSSStyleRule(rule) && rule.selectorText.indexOf(ruleName) !== -1) {\n toDelete.push(i);\n }\n }\n for (let i = toDelete.length - 1; i >= 0; i--) {\n (_a = style.sheet) === null || _a === void 0 ? void 0 : _a.deleteRule(toDelete[i]);\n }\n // Remove rules also from all cloned global stylesheets\n for (const clonedGlobalStylesheet of (_b = globalStylesheets.get(style)) !== null && _b !== void 0 ? _b : []) {\n removeCSSRulesContainingSelector(ruleName, clonedGlobalStylesheet);\n }\n}\nfunction isCSSStyleRule(rule) {\n return typeof rule.selectorText === 'string';\n}\nexport function isMouseEvent(e) {\n // eslint-disable-next-line no-restricted-syntax\n return e instanceof MouseEvent || e instanceof getWindow(e).MouseEvent;\n}\nexport function isKeyboardEvent(e) {\n // eslint-disable-next-line no-restricted-syntax\n return e instanceof KeyboardEvent || e instanceof getWindow(e).KeyboardEvent;\n}\nexport const EventType = {\n // Mouse\n CLICK: 'click',\n AUXCLICK: 'auxclick',\n DBLCLICK: 'dblclick',\n MOUSE_UP: 'mouseup',\n MOUSE_DOWN: 'mousedown',\n MOUSE_OVER: 'mouseover',\n MOUSE_MOVE: 'mousemove',\n MOUSE_OUT: 'mouseout',\n MOUSE_ENTER: 'mouseenter',\n MOUSE_LEAVE: 'mouseleave',\n MOUSE_WHEEL: 'wheel',\n POINTER_UP: 'pointerup',\n POINTER_DOWN: 'pointerdown',\n POINTER_MOVE: 'pointermove',\n POINTER_LEAVE: 'pointerleave',\n CONTEXT_MENU: 'contextmenu',\n WHEEL: 'wheel',\n // Keyboard\n KEY_DOWN: 'keydown',\n KEY_PRESS: 'keypress',\n KEY_UP: 'keyup',\n // HTML Document\n LOAD: 'load',\n BEFORE_UNLOAD: 'beforeunload',\n UNLOAD: 'unload',\n PAGE_SHOW: 'pageshow',\n PAGE_HIDE: 'pagehide',\n PASTE: 'paste',\n ABORT: 'abort',\n ERROR: 'error',\n RESIZE: 'resize',\n SCROLL: 'scroll',\n FULLSCREEN_CHANGE: 'fullscreenchange',\n WK_FULLSCREEN_CHANGE: 'webkitfullscreenchange',\n // Form\n SELECT: 'select',\n CHANGE: 'change',\n SUBMIT: 'submit',\n RESET: 'reset',\n FOCUS: 'focus',\n FOCUS_IN: 'focusin',\n FOCUS_OUT: 'focusout',\n BLUR: 'blur',\n INPUT: 'input',\n // Local Storage\n STORAGE: 'storage',\n // Drag\n DRAG_START: 'dragstart',\n DRAG: 'drag',\n DRAG_ENTER: 'dragenter',\n DRAG_LEAVE: 'dragleave',\n DRAG_OVER: 'dragover',\n DROP: 'drop',\n DRAG_END: 'dragend',\n // Animation\n ANIMATION_START: browser.isWebKit ? 'webkitAnimationStart' : 'animationstart',\n ANIMATION_END: browser.isWebKit ? 'webkitAnimationEnd' : 'animationend',\n ANIMATION_ITERATION: browser.isWebKit ? 'webkitAnimationIteration' : 'animationiteration'\n};\nexport function isEventLike(obj) {\n const candidate = obj;\n return !!(candidate && typeof candidate.preventDefault === 'function' && typeof candidate.stopPropagation === 'function');\n}\nexport const EventHelper = {\n stop: (e, cancelBubble) => {\n e.preventDefault();\n if (cancelBubble) {\n e.stopPropagation();\n }\n return e;\n }\n};\nexport function saveParentsScrollTop(node) {\n const r = [];\n for (let i = 0; node && node.nodeType === node.ELEMENT_NODE; i++) {\n r[i] = node.scrollTop;\n node = node.parentNode;\n }\n return r;\n}\nexport function restoreParentsScrollTop(node, state) {\n for (let i = 0; node && node.nodeType === node.ELEMENT_NODE; i++) {\n if (node.scrollTop !== state[i]) {\n node.scrollTop = state[i];\n }\n node = node.parentNode;\n }\n}\nclass FocusTracker extends Disposable {\n static hasFocusWithin(element) {\n if (element instanceof HTMLElement) {\n const shadowRoot = getShadowRoot(element);\n const activeElement = (shadowRoot ? shadowRoot.activeElement : element.ownerDocument.activeElement);\n return isAncestor(activeElement, element);\n }\n else {\n const window = element;\n return isAncestor(window.document.activeElement, window.document);\n }\n }\n constructor(element) {\n super();\n this._onDidFocus = this._register(new event.Emitter());\n this.onDidFocus = this._onDidFocus.event;\n this._onDidBlur = this._register(new event.Emitter());\n this.onDidBlur = this._onDidBlur.event;\n let hasFocus = FocusTracker.hasFocusWithin(element);\n let loosingFocus = false;\n const onFocus = () => {\n loosingFocus = false;\n if (!hasFocus) {\n hasFocus = true;\n this._onDidFocus.fire();\n }\n };\n const onBlur = () => {\n if (hasFocus) {\n loosingFocus = true;\n (element instanceof HTMLElement ? getWindow(element) : element).setTimeout(() => {\n if (loosingFocus) {\n loosingFocus = false;\n hasFocus = false;\n this._onDidBlur.fire();\n }\n }, 0);\n }\n };\n this._refreshStateHandler = () => {\n const currentNodeHasFocus = FocusTracker.hasFocusWithin(element);\n if (currentNodeHasFocus !== hasFocus) {\n if (hasFocus) {\n onBlur();\n }\n else {\n onFocus();\n }\n }\n };\n this._register(addDisposableListener(element, EventType.FOCUS, onFocus, true));\n this._register(addDisposableListener(element, EventType.BLUR, onBlur, true));\n if (element instanceof HTMLElement) {\n this._register(addDisposableListener(element, EventType.FOCUS_IN, () => this._refreshStateHandler()));\n this._register(addDisposableListener(element, EventType.FOCUS_OUT, () => this._refreshStateHandler()));\n }\n }\n}\n/**\n * Creates a new `IFocusTracker` instance that tracks focus changes on the given `element` and its descendants.\n *\n * @param element The `HTMLElement` or `Window` to track focus changes on.\n * @returns An `IFocusTracker` instance.\n */\nexport function trackFocus(element) {\n return new FocusTracker(element);\n}\nexport function after(sibling, child) {\n sibling.after(child);\n return child;\n}\nexport function append(parent, ...children) {\n parent.append(...children);\n if (children.length === 1 && typeof children[0] !== 'string') {\n return children[0];\n }\n}\nexport function prepend(parent, child) {\n parent.insertBefore(child, parent.firstChild);\n return child;\n}\n/**\n * Removes all children from `parent` and appends `children`\n */\nexport function reset(parent, ...children) {\n parent.innerText = '';\n append(parent, ...children);\n}\nconst SELECTOR_REGEX = /([\\w\\-]+)?(#([\\w\\-]+))?((\\.([\\w\\-]+))*)/;\nexport var Namespace;\n(function (Namespace) {\n Namespace[\"HTML\"] = \"http://www.w3.org/1999/xhtml\";\n Namespace[\"SVG\"] = \"http://www.w3.org/2000/svg\";\n})(Namespace || (Namespace = {}));\nfunction _$(namespace, description, attrs, ...children) {\n const match = SELECTOR_REGEX.exec(description);\n if (!match) {\n throw new Error('Bad use of emmet');\n }\n const tagName = match[1] || 'div';\n let result;\n if (namespace !== Namespace.HTML) {\n result = document.createElementNS(namespace, tagName);\n }\n else {\n result = document.createElement(tagName);\n }\n if (match[3]) {\n result.id = match[3];\n }\n if (match[4]) {\n result.className = match[4].replace(/\\./g, ' ').trim();\n }\n if (attrs) {\n Object.entries(attrs).forEach(([name, value]) => {\n if (typeof value === 'undefined') {\n return;\n }\n if (/^on\\w+$/.test(name)) {\n result[name] = value;\n }\n else if (name === 'selected') {\n if (value) {\n result.setAttribute(name, 'true');\n }\n }\n else {\n result.setAttribute(name, value);\n }\n });\n }\n result.append(...children);\n return result;\n}\nexport function $(description, attrs, ...children) {\n return _$(Namespace.HTML, description, attrs, ...children);\n}\n$.SVG = function (description, attrs, ...children) {\n return _$(Namespace.SVG, description, attrs, ...children);\n};\nexport function setVisibility(visible, ...elements) {\n if (visible) {\n show(...elements);\n }\n else {\n hide(...elements);\n }\n}\nexport function show(...elements) {\n for (const element of elements) {\n element.style.display = '';\n element.removeAttribute('aria-hidden');\n }\n}\nexport function hide(...elements) {\n for (const element of elements) {\n element.style.display = 'none';\n element.setAttribute('aria-hidden', 'true');\n }\n}\n/**\n * Find a value usable for a dom node size such that the likelihood that it would be\n * displayed with constant screen pixels size is as high as possible.\n *\n * e.g. We would desire for the cursors to be 2px (CSS px) wide. Under a devicePixelRatio\n * of 1.25, the cursor will be 2.5 screen pixels wide. Depending on how the dom node aligns/\"snaps\"\n * with the screen pixels, it will sometimes be rendered with 2 screen pixels, and sometimes with 3 screen pixels.\n */\nexport function computeScreenAwareSize(window, cssPx) {\n const screenPx = window.devicePixelRatio * cssPx;\n return Math.max(1, Math.floor(screenPx)) / window.devicePixelRatio;\n}\n/**\n * Open safely a new window. This is the best way to do so, but you cannot tell\n * if the window was opened or if it was blocked by the browser's popup blocker.\n * If you want to tell if the browser blocked the new window, use {@link windowOpenWithSuccess}.\n *\n * See https://github.com/microsoft/monaco-editor/issues/601\n * To protect against malicious code in the linked site, particularly phishing attempts,\n * the window.opener should be set to null to prevent the linked site from having access\n * to change the location of the current page.\n * See https://mathiasbynens.github.io/rel-noopener/\n */\nexport function windowOpenNoOpener(url) {\n // By using 'noopener' in the `windowFeatures` argument, the newly created window will\n // not be able to use `window.opener` to reach back to the current page.\n // See https://stackoverflow.com/a/46958731\n // See https://developer.mozilla.org/en-US/docs/Web/API/Window/open#noopener\n // However, this also doesn't allow us to realize if the browser blocked\n // the creation of the window.\n mainWindow.open(url, '_blank', 'noopener');\n}\nexport function animate(targetWindow, fn) {\n const step = () => {\n fn();\n stepDisposable = scheduleAtNextAnimationFrame(targetWindow, step);\n };\n let stepDisposable = scheduleAtNextAnimationFrame(targetWindow, step);\n return toDisposable(() => stepDisposable.dispose());\n}\nRemoteAuthorities.setPreferredWebSchema(/^https:/.test(mainWindow.location.href) ? 'https' : 'http');\n/**\n * returns url('...')\n */\nexport function asCSSUrl(uri) {\n if (!uri) {\n return `url('')`;\n }\n return `url('${FileAccess.uriToBrowserUri(uri).toString(true).replace(/'/g, '%27')}')`;\n}\nexport function asCSSPropertyValue(value) {\n return `'${value.replace(/'/g, '%27')}'`;\n}\nexport function asCssValueWithDefault(cssPropertyValue, dflt) {\n if (cssPropertyValue !== undefined) {\n const variableMatch = cssPropertyValue.match(/^\\s*var\\((.+)\\)$/);\n if (variableMatch) {\n const varArguments = variableMatch[1].split(',', 2);\n if (varArguments.length === 2) {\n dflt = asCssValueWithDefault(varArguments[1].trim(), dflt);\n }\n return `var(${varArguments[0]}, ${dflt})`;\n }\n return cssPropertyValue;\n }\n return dflt;\n}\n// -- sanitize and trusted html\n/**\n * Hooks dompurify using `afterSanitizeAttributes` to check that all `href` and `src`\n * attributes are valid.\n */\nexport function hookDomPurifyHrefAndSrcSanitizer(allowedProtocols, allowDataImages = false) {\n // https://github.com/cure53/DOMPurify/blob/main/demos/hooks-scheme-allowlist.html\n // build an anchor to map URLs to\n const anchor = document.createElement('a');\n dompurify.addHook('afterSanitizeAttributes', (node) => {\n // check all href/src attributes for validity\n for (const attr of ['href', 'src']) {\n if (node.hasAttribute(attr)) {\n const attrValue = node.getAttribute(attr);\n if (attr === 'href' && attrValue.startsWith('#')) {\n // Allow fragment links\n continue;\n }\n anchor.href = attrValue;\n if (!allowedProtocols.includes(anchor.protocol.replace(/:$/, ''))) {\n if (allowDataImages && attr === 'src' && anchor.href.startsWith('data:')) {\n continue;\n }\n node.removeAttribute(attr);\n }\n }\n }\n });\n return toDisposable(() => {\n dompurify.removeHook('afterSanitizeAttributes');\n });\n}\n/**\n * List of safe, non-input html tags.\n */\nexport const basicMarkupHtmlTags = Object.freeze([\n 'a',\n 'abbr',\n 'b',\n 'bdo',\n 'blockquote',\n 'br',\n 'caption',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'dd',\n 'del',\n 'details',\n 'dfn',\n 'div',\n 'dl',\n 'dt',\n 'em',\n 'figcaption',\n 'figure',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'hr',\n 'i',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'label',\n 'li',\n 'mark',\n 'ol',\n 'p',\n 'pre',\n 'q',\n 'rp',\n 'rt',\n 'ruby',\n 'samp',\n 'small',\n 'small',\n 'source',\n 'span',\n 'strike',\n 'strong',\n 'sub',\n 'summary',\n 'sup',\n 'table',\n 'tbody',\n 'td',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n 'tr',\n 'tt',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr',\n]);\nconst defaultDomPurifyConfig = Object.freeze({\n ALLOWED_TAGS: ['a', 'button', 'blockquote', 'code', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'input', 'label', 'li', 'p', 'pre', 'select', 'small', 'span', 'strong', 'textarea', 'ul', 'ol'],\n ALLOWED_ATTR: ['href', 'data-href', 'data-command', 'target', 'title', 'name', 'src', 'alt', 'class', 'id', 'role', 'tabindex', 'style', 'data-code', 'width', 'height', 'align', 'x-dispatch', 'required', 'checked', 'placeholder', 'type', 'start'],\n RETURN_DOM: false,\n RETURN_DOM_FRAGMENT: false,\n RETURN_TRUSTED_TYPE: true\n});\nexport class ModifierKeyEmitter extends event.Emitter {\n constructor() {\n super();\n this._subscriptions = new DisposableStore();\n this._keyStatus = {\n altKey: false,\n shiftKey: false,\n ctrlKey: false,\n metaKey: false\n };\n this._subscriptions.add(event.Event.runAndSubscribe(onDidRegisterWindow, ({ window, disposables }) => this.registerListeners(window, disposables), { window: mainWindow, disposables: this._subscriptions }));\n }\n registerListeners(window, disposables) {\n disposables.add(addDisposableListener(window, 'keydown', e => {\n if (e.defaultPrevented) {\n return;\n }\n const event = new StandardKeyboardEvent(e);\n // If Alt-key keydown event is repeated, ignore it #112347\n // Only known to be necessary for Alt-Key at the moment #115810\n if (event.keyCode === 6 /* KeyCode.Alt */ && e.repeat) {\n return;\n }\n if (e.altKey && !this._keyStatus.altKey) {\n this._keyStatus.lastKeyPressed = 'alt';\n }\n else if (e.ctrlKey && !this._keyStatus.ctrlKey) {\n this._keyStatus.lastKeyPressed = 'ctrl';\n }\n else if (e.metaKey && !this._keyStatus.metaKey) {\n this._keyStatus.lastKeyPressed = 'meta';\n }\n else if (e.shiftKey && !this._keyStatus.shiftKey) {\n this._keyStatus.lastKeyPressed = 'shift';\n }\n else if (event.keyCode !== 6 /* KeyCode.Alt */) {\n this._keyStatus.lastKeyPressed = undefined;\n }\n else {\n return;\n }\n this._keyStatus.altKey = e.altKey;\n this._keyStatus.ctrlKey = e.ctrlKey;\n this._keyStatus.metaKey = e.metaKey;\n this._keyStatus.shiftKey = e.shiftKey;\n if (this._keyStatus.lastKeyPressed) {\n this._keyStatus.event = e;\n this.fire(this._keyStatus);\n }\n }, true));\n disposables.add(addDisposableListener(window, 'keyup', e => {\n if (e.defaultPrevented) {\n return;\n }\n if (!e.altKey && this._keyStatus.altKey) {\n this._keyStatus.lastKeyReleased = 'alt';\n }\n else if (!e.ctrlKey && this._keyStatus.ctrlKey) {\n this._keyStatus.lastKeyReleased = 'ctrl';\n }\n else if (!e.metaKey && this._keyStatus.metaKey) {\n this._keyStatus.lastKeyReleased = 'meta';\n }\n else if (!e.shiftKey && this._keyStatus.shiftKey) {\n this._keyStatus.lastKeyReleased = 'shift';\n }\n else {\n this._keyStatus.lastKeyReleased = undefined;\n }\n if (this._keyStatus.lastKeyPressed !== this._keyStatus.lastKeyReleased) {\n this._keyStatus.lastKeyPressed = undefined;\n }\n this._keyStatus.altKey = e.altKey;\n this._keyStatus.ctrlKey = e.ctrlKey;\n this._keyStatus.metaKey = e.metaKey;\n this._keyStatus.shiftKey = e.shiftKey;\n if (this._keyStatus.lastKeyReleased) {\n this._keyStatus.event = e;\n this.fire(this._keyStatus);\n }\n }, true));\n disposables.add(addDisposableListener(window.document.body, 'mousedown', () => {\n this._keyStatus.lastKeyPressed = undefined;\n }, true));\n disposables.add(addDisposableListener(window.document.body, 'mouseup', () => {\n this._keyStatus.lastKeyPressed = undefined;\n }, true));\n disposables.add(addDisposableListener(window.document.body, 'mousemove', e => {\n if (e.buttons) {\n this._keyStatus.lastKeyPressed = undefined;\n }\n }, true));\n disposables.add(addDisposableListener(window, 'blur', () => {\n this.resetKeyStatus();\n }));\n }\n get keyStatus() {\n return this._keyStatus;\n }\n /**\n * Allows to explicitly reset the key status based on more knowledge (#109062)\n */\n resetKeyStatus() {\n this.doResetKeyStatus();\n this.fire(this._keyStatus);\n }\n doResetKeyStatus() {\n this._keyStatus = {\n altKey: false,\n shiftKey: false,\n ctrlKey: false,\n metaKey: false\n };\n }\n static getInstance() {\n if (!ModifierKeyEmitter.instance) {\n ModifierKeyEmitter.instance = new ModifierKeyEmitter();\n }\n return ModifierKeyEmitter.instance;\n }\n dispose() {\n super.dispose();\n this._subscriptions.dispose();\n }\n}\nexport class DragAndDropObserver extends Disposable {\n constructor(element, callbacks) {\n super();\n this.element = element;\n this.callbacks = callbacks;\n // A helper to fix issues with repeated DRAG_ENTER / DRAG_LEAVE\n // calls see https://github.com/microsoft/vscode/issues/14470\n // when the element has child elements where the events are fired\n // repeadedly.\n this.counter = 0;\n // Allows to measure the duration of the drag operation.\n this.dragStartTime = 0;\n this.registerListeners();\n }\n registerListeners() {\n if (this.callbacks.onDragStart) {\n this._register(addDisposableListener(this.element, EventType.DRAG_START, (e) => {\n var _a, _b;\n (_b = (_a = this.callbacks).onDragStart) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n }));\n }\n if (this.callbacks.onDrag) {\n this._register(addDisposableListener(this.element, EventType.DRAG, (e) => {\n var _a, _b;\n (_b = (_a = this.callbacks).onDrag) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n }));\n }\n this._register(addDisposableListener(this.element, EventType.DRAG_ENTER, (e) => {\n var _a, _b;\n this.counter++;\n this.dragStartTime = e.timeStamp;\n (_b = (_a = this.callbacks).onDragEnter) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n }));\n this._register(addDisposableListener(this.element, EventType.DRAG_OVER, (e) => {\n var _a, _b;\n e.preventDefault(); // needed so that the drop event fires (https://stackoverflow.com/questions/21339924/drop-event-not-firing-in-chrome)\n (_b = (_a = this.callbacks).onDragOver) === null || _b === void 0 ? void 0 : _b.call(_a, e, e.timeStamp - this.dragStartTime);\n }));\n this._register(addDisposableListener(this.element, EventType.DRAG_LEAVE, (e) => {\n var _a, _b;\n this.counter--;\n if (this.counter === 0) {\n this.dragStartTime = 0;\n (_b = (_a = this.callbacks).onDragLeave) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n }\n }));\n this._register(addDisposableListener(this.element, EventType.DRAG_END, (e) => {\n var _a, _b;\n this.counter = 0;\n this.dragStartTime = 0;\n (_b = (_a = this.callbacks).onDragEnd) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n }));\n this._register(addDisposableListener(this.element, EventType.DROP, (e) => {\n var _a, _b;\n this.counter = 0;\n this.dragStartTime = 0;\n (_b = (_a = this.callbacks).onDrop) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n }));\n }\n}\nconst H_REGEX = /(?[\\w\\-]+)?(?:#(?[\\w\\-]+))?(?(?:\\.(?:[\\w\\-]+))*)(?:@(?(?:[\\w\\_])+))?/;\nexport function h(tag, ...args) {\n let attributes;\n let children;\n if (Array.isArray(args[0])) {\n attributes = {};\n children = args[0];\n }\n else {\n attributes = args[0] || {};\n children = args[1];\n }\n const match = H_REGEX.exec(tag);\n if (!match || !match.groups) {\n throw new Error('Bad use of h');\n }\n const tagName = match.groups['tag'] || 'div';\n const el = document.createElement(tagName);\n if (match.groups['id']) {\n el.id = match.groups['id'];\n }\n const classNames = [];\n if (match.groups['class']) {\n for (const className of match.groups['class'].split('.')) {\n if (className !== '') {\n classNames.push(className);\n }\n }\n }\n if (attributes.className !== undefined) {\n for (const className of attributes.className.split('.')) {\n if (className !== '') {\n classNames.push(className);\n }\n }\n }\n if (classNames.length > 0) {\n el.className = classNames.join(' ');\n }\n const result = {};\n if (match.groups['name']) {\n result[match.groups['name']] = el;\n }\n if (children) {\n for (const c of children) {\n if (c instanceof HTMLElement) {\n el.appendChild(c);\n }\n else if (typeof c === 'string') {\n el.append(c);\n }\n else if ('root' in c) {\n Object.assign(result, c);\n el.appendChild(c.root);\n }\n }\n }\n for (const [key, value] of Object.entries(attributes)) {\n if (key === 'className') {\n continue;\n }\n else if (key === 'style') {\n for (const [cssKey, cssValue] of Object.entries(value)) {\n el.style.setProperty(camelCaseToHyphenCase(cssKey), typeof cssValue === 'number' ? cssValue + 'px' : '' + cssValue);\n }\n }\n else if (key === 'tabIndex') {\n el.tabIndex = value;\n }\n else {\n el.setAttribute(camelCaseToHyphenCase(key), value.toString());\n }\n }\n result['root'] = el;\n return result;\n}\nfunction camelCaseToHyphenCase(str) {\n return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as nls from '../../nls.js';\nimport { URI } from '../../base/common/uri.js';\nimport { ICodeEditorService } from './services/codeEditorService.js';\nimport { Position } from '../common/core/position.js';\nimport { IModelService } from '../common/services/model.js';\nimport { ITextModelService } from '../common/services/resolverService.js';\nimport { MenuId, MenuRegistry, Action2 } from '../../platform/actions/common/actions.js';\nimport { CommandsRegistry } from '../../platform/commands/common/commands.js';\nimport { ContextKeyExpr, IContextKeyService } from '../../platform/contextkey/common/contextkey.js';\nimport { IInstantiationService } from '../../platform/instantiation/common/instantiation.js';\nimport { KeybindingsRegistry } from '../../platform/keybinding/common/keybindingsRegistry.js';\nimport { Registry } from '../../platform/registry/common/platform.js';\nimport { ITelemetryService } from '../../platform/telemetry/common/telemetry.js';\nimport { assertType } from '../../base/common/types.js';\nimport { ILogService } from '../../platform/log/common/log.js';\nimport { getActiveElement } from '../../base/browser/dom.js';\nexport class Command {\n constructor(opts) {\n this.id = opts.id;\n this.precondition = opts.precondition;\n this._kbOpts = opts.kbOpts;\n this._menuOpts = opts.menuOpts;\n this.metadata = opts.metadata;\n }\n register() {\n if (Array.isArray(this._menuOpts)) {\n this._menuOpts.forEach(this._registerMenuItem, this);\n }\n else if (this._menuOpts) {\n this._registerMenuItem(this._menuOpts);\n }\n if (this._kbOpts) {\n const kbOptsArr = Array.isArray(this._kbOpts) ? this._kbOpts : [this._kbOpts];\n for (const kbOpts of kbOptsArr) {\n let kbWhen = kbOpts.kbExpr;\n if (this.precondition) {\n if (kbWhen) {\n kbWhen = ContextKeyExpr.and(kbWhen, this.precondition);\n }\n else {\n kbWhen = this.precondition;\n }\n }\n const desc = {\n id: this.id,\n weight: kbOpts.weight,\n args: kbOpts.args,\n when: kbWhen,\n primary: kbOpts.primary,\n secondary: kbOpts.secondary,\n win: kbOpts.win,\n linux: kbOpts.linux,\n mac: kbOpts.mac,\n };\n KeybindingsRegistry.registerKeybindingRule(desc);\n }\n }\n CommandsRegistry.registerCommand({\n id: this.id,\n handler: (accessor, args) => this.runCommand(accessor, args),\n metadata: this.metadata\n });\n }\n _registerMenuItem(item) {\n MenuRegistry.appendMenuItem(item.menuId, {\n group: item.group,\n command: {\n id: this.id,\n title: item.title,\n icon: item.icon,\n precondition: this.precondition\n },\n when: item.when,\n order: item.order\n });\n }\n}\nexport class MultiCommand extends Command {\n constructor() {\n super(...arguments);\n this._implementations = [];\n }\n /**\n * A higher priority gets to be looked at first\n */\n addImplementation(priority, name, implementation, when) {\n this._implementations.push({ priority, name, implementation, when });\n this._implementations.sort((a, b) => b.priority - a.priority);\n return {\n dispose: () => {\n for (let i = 0; i < this._implementations.length; i++) {\n if (this._implementations[i].implementation === implementation) {\n this._implementations.splice(i, 1);\n return;\n }\n }\n }\n };\n }\n runCommand(accessor, args) {\n const logService = accessor.get(ILogService);\n const contextKeyService = accessor.get(IContextKeyService);\n logService.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);\n for (const impl of this._implementations) {\n if (impl.when) {\n const context = contextKeyService.getContext(getActiveElement());\n const value = impl.when.evaluate(context);\n if (!value) {\n continue;\n }\n }\n const result = impl.implementation(accessor, args);\n if (result) {\n logService.trace(`Command '${this.id}' was handled by '${impl.name}'.`);\n if (typeof result === 'boolean') {\n return;\n }\n return result;\n }\n }\n logService.trace(`The Command '${this.id}' was not handled by any implementation.`);\n }\n}\n//#endregion\n/**\n * A command that delegates to another command's implementation.\n *\n * This lets different commands be registered but share the same implementation\n */\nexport class ProxyCommand extends Command {\n constructor(command, opts) {\n super(opts);\n this.command = command;\n }\n runCommand(accessor, args) {\n return this.command.runCommand(accessor, args);\n }\n}\nexport class EditorCommand extends Command {\n /**\n * Create a command class that is bound to a certain editor contribution.\n */\n static bindToContribution(controllerGetter) {\n return class EditorControllerCommandImpl extends EditorCommand {\n constructor(opts) {\n super(opts);\n this._callback = opts.handler;\n }\n runEditorCommand(accessor, editor, args) {\n const controller = controllerGetter(editor);\n if (controller) {\n this._callback(controller, args);\n }\n }\n };\n }\n static runEditorCommand(accessor, args, precondition, runner) {\n const codeEditorService = accessor.get(ICodeEditorService);\n // Find the editor with text focus or active\n const editor = codeEditorService.getFocusedCodeEditor() || codeEditorService.getActiveCodeEditor();\n if (!editor) {\n // well, at least we tried...\n return;\n }\n return editor.invokeWithinContext((editorAccessor) => {\n const kbService = editorAccessor.get(IContextKeyService);\n if (!kbService.contextMatchesRules(precondition !== null && precondition !== void 0 ? precondition : undefined)) {\n // precondition does not hold\n return;\n }\n return runner(editorAccessor, editor, args);\n });\n }\n runCommand(accessor, args) {\n return EditorCommand.runEditorCommand(accessor, args, this.precondition, (accessor, editor, args) => this.runEditorCommand(accessor, editor, args));\n }\n}\nexport class EditorAction extends EditorCommand {\n static convertOptions(opts) {\n let menuOpts;\n if (Array.isArray(opts.menuOpts)) {\n menuOpts = opts.menuOpts;\n }\n else if (opts.menuOpts) {\n menuOpts = [opts.menuOpts];\n }\n else {\n menuOpts = [];\n }\n function withDefaults(item) {\n if (!item.menuId) {\n item.menuId = MenuId.EditorContext;\n }\n if (!item.title) {\n item.title = opts.label;\n }\n item.when = ContextKeyExpr.and(opts.precondition, item.when);\n return item;\n }\n if (Array.isArray(opts.contextMenuOpts)) {\n menuOpts.push(...opts.contextMenuOpts.map(withDefaults));\n }\n else if (opts.contextMenuOpts) {\n menuOpts.push(withDefaults(opts.contextMenuOpts));\n }\n opts.menuOpts = menuOpts;\n return opts;\n }\n constructor(opts) {\n super(EditorAction.convertOptions(opts));\n this.label = opts.label;\n this.alias = opts.alias;\n }\n runEditorCommand(accessor, editor, args) {\n this.reportTelemetry(accessor, editor);\n return this.run(accessor, editor, args || {});\n }\n reportTelemetry(accessor, editor) {\n accessor.get(ITelemetryService).publicLog2('editorActionInvoked', { name: this.label, id: this.id });\n }\n}\nexport class MultiEditorAction extends EditorAction {\n constructor() {\n super(...arguments);\n this._implementations = [];\n }\n /**\n * A higher priority gets to be looked at first\n */\n addImplementation(priority, implementation) {\n this._implementations.push([priority, implementation]);\n this._implementations.sort((a, b) => b[0] - a[0]);\n return {\n dispose: () => {\n for (let i = 0; i < this._implementations.length; i++) {\n if (this._implementations[i][1] === implementation) {\n this._implementations.splice(i, 1);\n return;\n }\n }\n }\n };\n }\n run(accessor, editor, args) {\n for (const impl of this._implementations) {\n const result = impl[1](accessor, editor, args);\n if (result) {\n if (typeof result === 'boolean') {\n return;\n }\n return result;\n }\n }\n }\n}\n//#endregion EditorAction\n//#region EditorAction2\nexport class EditorAction2 extends Action2 {\n run(accessor, ...args) {\n // Find the editor with text focus or active\n const codeEditorService = accessor.get(ICodeEditorService);\n const editor = codeEditorService.getFocusedCodeEditor() || codeEditorService.getActiveCodeEditor();\n if (!editor) {\n // well, at least we tried...\n return;\n }\n // precondition does hold\n return editor.invokeWithinContext((editorAccessor) => {\n var _a, _b;\n const kbService = editorAccessor.get(IContextKeyService);\n const logService = editorAccessor.get(ILogService);\n const enabled = kbService.contextMatchesRules((_a = this.desc.precondition) !== null && _a !== void 0 ? _a : undefined);\n if (!enabled) {\n logService.debug(`[EditorAction2] NOT running command because its precondition is FALSE`, this.desc.id, (_b = this.desc.precondition) === null || _b === void 0 ? void 0 : _b.serialize());\n return;\n }\n return this.runEditorCommand(editorAccessor, editor, ...args);\n });\n }\n}\n//#endregion\n// --- Registration of commands and actions\nexport function registerModelAndPositionCommand(id, handler) {\n CommandsRegistry.registerCommand(id, function (accessor, ...args) {\n const instaService = accessor.get(IInstantiationService);\n const [resource, position] = args;\n assertType(URI.isUri(resource));\n assertType(Position.isIPosition(position));\n const model = accessor.get(IModelService).getModel(resource);\n if (model) {\n const editorPosition = Position.lift(position);\n return instaService.invokeFunction(handler, model, editorPosition, ...args.slice(2));\n }\n return accessor.get(ITextModelService).createModelReference(resource).then(reference => {\n return new Promise((resolve, reject) => {\n try {\n const result = instaService.invokeFunction(handler, reference.object.textEditorModel, Position.lift(position), args.slice(2));\n resolve(result);\n }\n catch (err) {\n reject(err);\n }\n }).finally(() => {\n reference.dispose();\n });\n });\n });\n}\nexport function registerEditorCommand(editorCommand) {\n EditorContributionRegistry.INSTANCE.registerEditorCommand(editorCommand);\n return editorCommand;\n}\nexport function registerEditorAction(ctor) {\n const action = new ctor();\n EditorContributionRegistry.INSTANCE.registerEditorAction(action);\n return action;\n}\nexport function registerMultiEditorAction(action) {\n EditorContributionRegistry.INSTANCE.registerEditorAction(action);\n return action;\n}\nexport function registerInstantiatedEditorAction(editorAction) {\n EditorContributionRegistry.INSTANCE.registerEditorAction(editorAction);\n}\n/**\n * Registers an editor contribution. Editor contributions have a lifecycle which is bound\n * to a specific code editor instance.\n */\nexport function registerEditorContribution(id, ctor, instantiation) {\n EditorContributionRegistry.INSTANCE.registerEditorContribution(id, ctor, instantiation);\n}\nexport var EditorExtensionsRegistry;\n(function (EditorExtensionsRegistry) {\n function getEditorCommand(commandId) {\n return EditorContributionRegistry.INSTANCE.getEditorCommand(commandId);\n }\n EditorExtensionsRegistry.getEditorCommand = getEditorCommand;\n function getEditorActions() {\n return EditorContributionRegistry.INSTANCE.getEditorActions();\n }\n EditorExtensionsRegistry.getEditorActions = getEditorActions;\n function getEditorContributions() {\n return EditorContributionRegistry.INSTANCE.getEditorContributions();\n }\n EditorExtensionsRegistry.getEditorContributions = getEditorContributions;\n function getSomeEditorContributions(ids) {\n return EditorContributionRegistry.INSTANCE.getEditorContributions().filter(c => ids.indexOf(c.id) >= 0);\n }\n EditorExtensionsRegistry.getSomeEditorContributions = getSomeEditorContributions;\n function getDiffEditorContributions() {\n return EditorContributionRegistry.INSTANCE.getDiffEditorContributions();\n }\n EditorExtensionsRegistry.getDiffEditorContributions = getDiffEditorContributions;\n})(EditorExtensionsRegistry || (EditorExtensionsRegistry = {}));\n// Editor extension points\nconst Extensions = {\n EditorCommonContributions: 'editor.contributions'\n};\nclass EditorContributionRegistry {\n constructor() {\n this.editorContributions = [];\n this.diffEditorContributions = [];\n this.editorActions = [];\n this.editorCommands = Object.create(null);\n }\n registerEditorContribution(id, ctor, instantiation) {\n this.editorContributions.push({ id, ctor: ctor, instantiation });\n }\n getEditorContributions() {\n return this.editorContributions.slice(0);\n }\n getDiffEditorContributions() {\n return this.diffEditorContributions.slice(0);\n }\n registerEditorAction(action) {\n action.register();\n this.editorActions.push(action);\n }\n getEditorActions() {\n return this.editorActions;\n }\n registerEditorCommand(editorCommand) {\n editorCommand.register();\n this.editorCommands[editorCommand.id] = editorCommand;\n }\n getEditorCommand(commandId) {\n return (this.editorCommands[commandId] || null);\n }\n}\nEditorContributionRegistry.INSTANCE = new EditorContributionRegistry();\nRegistry.add(Extensions.EditorCommonContributions, EditorContributionRegistry.INSTANCE);\nfunction registerCommand(command) {\n command.register();\n return command;\n}\nexport const UndoCommand = registerCommand(new MultiCommand({\n id: 'undo',\n precondition: undefined,\n kbOpts: {\n weight: 0 /* KeybindingWeight.EditorCore */,\n primary: 2048 /* KeyMod.CtrlCmd */ | 56 /* KeyCode.KeyZ */\n },\n menuOpts: [{\n menuId: MenuId.MenubarEditMenu,\n group: '1_do',\n title: nls.localize({ key: 'miUndo', comment: ['&& denotes a mnemonic'] }, \"&&Undo\"),\n order: 1\n }, {\n menuId: MenuId.CommandPalette,\n group: '',\n title: nls.localize('undo', \"Undo\"),\n order: 1\n }]\n}));\nregisterCommand(new ProxyCommand(UndoCommand, { id: 'default:undo', precondition: undefined }));\nexport const RedoCommand = registerCommand(new MultiCommand({\n id: 'redo',\n precondition: undefined,\n kbOpts: {\n weight: 0 /* KeybindingWeight.EditorCore */,\n primary: 2048 /* KeyMod.CtrlCmd */ | 55 /* KeyCode.KeyY */,\n secondary: [2048 /* KeyMod.CtrlCmd */ | 1024 /* KeyMod.Shift */ | 56 /* KeyCode.KeyZ */],\n mac: { primary: 2048 /* KeyMod.CtrlCmd */ | 1024 /* KeyMod.Shift */ | 56 /* KeyCode.KeyZ */ }\n },\n menuOpts: [{\n menuId: MenuId.MenubarEditMenu,\n group: '1_do',\n title: nls.localize({ key: 'miRedo', comment: ['&& denotes a mnemonic'] }, \"&&Redo\"),\n order: 2\n }, {\n menuId: MenuId.CommandPalette,\n group: '',\n title: nls.localize('redo', \"Redo\"),\n order: 1\n }]\n}));\nregisterCommand(new ProxyCommand(RedoCommand, { id: 'default:redo', precondition: undefined }));\nexport const SelectAllCommand = registerCommand(new MultiCommand({\n id: 'editor.action.selectAll',\n precondition: undefined,\n kbOpts: {\n weight: 0 /* KeybindingWeight.EditorCore */,\n kbExpr: null,\n primary: 2048 /* KeyMod.CtrlCmd */ | 31 /* KeyCode.KeyA */\n },\n menuOpts: [{\n menuId: MenuId.MenubarSelectionMenu,\n group: '1_basic',\n title: nls.localize({ key: 'miSelectAll', comment: ['&& denotes a mnemonic'] }, \"&&Select All\"),\n order: 1\n }, {\n menuId: MenuId.CommandPalette,\n group: '',\n title: nls.localize('selectAll', \"Select All\"),\n order: 1\n }]\n}));\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { transformErrorForSerialization } from '../errors.js';\nimport { Emitter } from '../event.js';\nimport { Disposable } from '../lifecycle.js';\nimport { getAllMethodNames } from '../objects.js';\nimport { isWeb } from '../platform.js';\nimport * as strings from '../strings.js';\nconst INITIALIZE = '$initialize';\nlet webWorkerWarningLogged = false;\nexport function logOnceWebWorkerWarning(err) {\n if (!isWeb) {\n // running tests\n return;\n }\n if (!webWorkerWarningLogged) {\n webWorkerWarningLogged = true;\n console.warn('Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq');\n }\n console.warn(err.message);\n}\nclass RequestMessage {\n constructor(vsWorker, req, method, args) {\n this.vsWorker = vsWorker;\n this.req = req;\n this.method = method;\n this.args = args;\n this.type = 0 /* MessageType.Request */;\n }\n}\nclass ReplyMessage {\n constructor(vsWorker, seq, res, err) {\n this.vsWorker = vsWorker;\n this.seq = seq;\n this.res = res;\n this.err = err;\n this.type = 1 /* MessageType.Reply */;\n }\n}\nclass SubscribeEventMessage {\n constructor(vsWorker, req, eventName, arg) {\n this.vsWorker = vsWorker;\n this.req = req;\n this.eventName = eventName;\n this.arg = arg;\n this.type = 2 /* MessageType.SubscribeEvent */;\n }\n}\nclass EventMessage {\n constructor(vsWorker, req, event) {\n this.vsWorker = vsWorker;\n this.req = req;\n this.event = event;\n this.type = 3 /* MessageType.Event */;\n }\n}\nclass UnsubscribeEventMessage {\n constructor(vsWorker, req) {\n this.vsWorker = vsWorker;\n this.req = req;\n this.type = 4 /* MessageType.UnsubscribeEvent */;\n }\n}\nclass SimpleWorkerProtocol {\n constructor(handler) {\n this._workerId = -1;\n this._handler = handler;\n this._lastSentReq = 0;\n this._pendingReplies = Object.create(null);\n this._pendingEmitters = new Map();\n this._pendingEvents = new Map();\n }\n setWorkerId(workerId) {\n this._workerId = workerId;\n }\n sendMessage(method, args) {\n const req = String(++this._lastSentReq);\n return new Promise((resolve, reject) => {\n this._pendingReplies[req] = {\n resolve: resolve,\n reject: reject\n };\n this._send(new RequestMessage(this._workerId, req, method, args));\n });\n }\n listen(eventName, arg) {\n let req = null;\n const emitter = new Emitter({\n onWillAddFirstListener: () => {\n req = String(++this._lastSentReq);\n this._pendingEmitters.set(req, emitter);\n this._send(new SubscribeEventMessage(this._workerId, req, eventName, arg));\n },\n onDidRemoveLastListener: () => {\n this._pendingEmitters.delete(req);\n this._send(new UnsubscribeEventMessage(this._workerId, req));\n req = null;\n }\n });\n return emitter.event;\n }\n handleMessage(message) {\n if (!message || !message.vsWorker) {\n return;\n }\n if (this._workerId !== -1 && message.vsWorker !== this._workerId) {\n return;\n }\n this._handleMessage(message);\n }\n _handleMessage(msg) {\n switch (msg.type) {\n case 1 /* MessageType.Reply */:\n return this._handleReplyMessage(msg);\n case 0 /* MessageType.Request */:\n return this._handleRequestMessage(msg);\n case 2 /* MessageType.SubscribeEvent */:\n return this._handleSubscribeEventMessage(msg);\n case 3 /* MessageType.Event */:\n return this._handleEventMessage(msg);\n case 4 /* MessageType.UnsubscribeEvent */:\n return this._handleUnsubscribeEventMessage(msg);\n }\n }\n _handleReplyMessage(replyMessage) {\n if (!this._pendingReplies[replyMessage.seq]) {\n console.warn('Got reply to unknown seq');\n return;\n }\n const reply = this._pendingReplies[replyMessage.seq];\n delete this._pendingReplies[replyMessage.seq];\n if (replyMessage.err) {\n let err = replyMessage.err;\n if (replyMessage.err.$isError) {\n err = new Error();\n err.name = replyMessage.err.name;\n err.message = replyMessage.err.message;\n err.stack = replyMessage.err.stack;\n }\n reply.reject(err);\n return;\n }\n reply.resolve(replyMessage.res);\n }\n _handleRequestMessage(requestMessage) {\n const req = requestMessage.req;\n const result = this._handler.handleMessage(requestMessage.method, requestMessage.args);\n result.then((r) => {\n this._send(new ReplyMessage(this._workerId, req, r, undefined));\n }, (e) => {\n if (e.detail instanceof Error) {\n // Loading errors have a detail property that points to the actual error\n e.detail = transformErrorForSerialization(e.detail);\n }\n this._send(new ReplyMessage(this._workerId, req, undefined, transformErrorForSerialization(e)));\n });\n }\n _handleSubscribeEventMessage(msg) {\n const req = msg.req;\n const disposable = this._handler.handleEvent(msg.eventName, msg.arg)((event) => {\n this._send(new EventMessage(this._workerId, req, event));\n });\n this._pendingEvents.set(req, disposable);\n }\n _handleEventMessage(msg) {\n if (!this._pendingEmitters.has(msg.req)) {\n console.warn('Got event for unknown req');\n return;\n }\n this._pendingEmitters.get(msg.req).fire(msg.event);\n }\n _handleUnsubscribeEventMessage(msg) {\n if (!this._pendingEvents.has(msg.req)) {\n console.warn('Got unsubscribe for unknown req');\n return;\n }\n this._pendingEvents.get(msg.req).dispose();\n this._pendingEvents.delete(msg.req);\n }\n _send(msg) {\n const transfer = [];\n if (msg.type === 0 /* MessageType.Request */) {\n for (let i = 0; i < msg.args.length; i++) {\n if (msg.args[i] instanceof ArrayBuffer) {\n transfer.push(msg.args[i]);\n }\n }\n }\n else if (msg.type === 1 /* MessageType.Reply */) {\n if (msg.res instanceof ArrayBuffer) {\n transfer.push(msg.res);\n }\n }\n this._handler.sendMessage(msg, transfer);\n }\n}\n/**\n * Main thread side\n */\nexport class SimpleWorkerClient extends Disposable {\n constructor(workerFactory, moduleId, host) {\n super();\n let lazyProxyReject = null;\n this._worker = this._register(workerFactory.create('vs/base/common/worker/simpleWorker', (msg) => {\n this._protocol.handleMessage(msg);\n }, (err) => {\n // in Firefox, web workers fail lazily :(\n // we will reject the proxy\n lazyProxyReject === null || lazyProxyReject === void 0 ? void 0 : lazyProxyReject(err);\n }));\n this._protocol = new SimpleWorkerProtocol({\n sendMessage: (msg, transfer) => {\n this._worker.postMessage(msg, transfer);\n },\n handleMessage: (method, args) => {\n if (typeof host[method] !== 'function') {\n return Promise.reject(new Error('Missing method ' + method + ' on main thread host.'));\n }\n try {\n return Promise.resolve(host[method].apply(host, args));\n }\n catch (e) {\n return Promise.reject(e);\n }\n },\n handleEvent: (eventName, arg) => {\n if (propertyIsDynamicEvent(eventName)) {\n const event = host[eventName].call(host, arg);\n if (typeof event !== 'function') {\n throw new Error(`Missing dynamic event ${eventName} on main thread host.`);\n }\n return event;\n }\n if (propertyIsEvent(eventName)) {\n const event = host[eventName];\n if (typeof event !== 'function') {\n throw new Error(`Missing event ${eventName} on main thread host.`);\n }\n return event;\n }\n throw new Error(`Malformed event name ${eventName}`);\n }\n });\n this._protocol.setWorkerId(this._worker.getId());\n // Gather loader configuration\n let loaderConfiguration = null;\n const globalRequire = globalThis.require;\n if (typeof globalRequire !== 'undefined' && typeof globalRequire.getConfig === 'function') {\n // Get the configuration from the Monaco AMD Loader\n loaderConfiguration = globalRequire.getConfig();\n }\n else if (typeof globalThis.requirejs !== 'undefined') {\n // Get the configuration from requirejs\n loaderConfiguration = globalThis.requirejs.s.contexts._.config;\n }\n const hostMethods = getAllMethodNames(host);\n // Send initialize message\n this._onModuleLoaded = this._protocol.sendMessage(INITIALIZE, [\n this._worker.getId(),\n JSON.parse(JSON.stringify(loaderConfiguration)),\n moduleId,\n hostMethods,\n ]);\n // Create proxy to loaded code\n const proxyMethodRequest = (method, args) => {\n return this._request(method, args);\n };\n const proxyListen = (eventName, arg) => {\n return this._protocol.listen(eventName, arg);\n };\n this._lazyProxy = new Promise((resolve, reject) => {\n lazyProxyReject = reject;\n this._onModuleLoaded.then((availableMethods) => {\n resolve(createProxyObject(availableMethods, proxyMethodRequest, proxyListen));\n }, (e) => {\n reject(e);\n this._onError('Worker failed to load ' + moduleId, e);\n });\n });\n }\n getProxyObject() {\n return this._lazyProxy;\n }\n _request(method, args) {\n return new Promise((resolve, reject) => {\n this._onModuleLoaded.then(() => {\n this._protocol.sendMessage(method, args).then(resolve, reject);\n }, reject);\n });\n }\n _onError(message, error) {\n console.error(message);\n console.info(error);\n }\n}\nfunction propertyIsEvent(name) {\n // Assume a property is an event if it has a form of \"onSomething\"\n return name[0] === 'o' && name[1] === 'n' && strings.isUpperAsciiLetter(name.charCodeAt(2));\n}\nfunction propertyIsDynamicEvent(name) {\n // Assume a property is a dynamic event (a method that returns an event) if it has a form of \"onDynamicSomething\"\n return /^onDynamic/.test(name) && strings.isUpperAsciiLetter(name.charCodeAt(9));\n}\nfunction createProxyObject(methodNames, invoke, proxyListen) {\n const createProxyMethod = (method) => {\n return function () {\n const args = Array.prototype.slice.call(arguments, 0);\n return invoke(method, args);\n };\n };\n const createProxyDynamicEvent = (eventName) => {\n return function (arg) {\n return proxyListen(eventName, arg);\n };\n };\n const result = {};\n for (const methodName of methodNames) {\n if (propertyIsDynamicEvent(methodName)) {\n result[methodName] = createProxyDynamicEvent(methodName);\n continue;\n }\n if (propertyIsEvent(methodName)) {\n result[methodName] = proxyListen(methodName, undefined);\n continue;\n }\n result[methodName] = createProxyMethod(methodName);\n }\n return result;\n}\n/**\n * Worker side\n */\nexport class SimpleWorkerServer {\n constructor(postMessage, requestHandlerFactory) {\n this._requestHandlerFactory = requestHandlerFactory;\n this._requestHandler = null;\n this._protocol = new SimpleWorkerProtocol({\n sendMessage: (msg, transfer) => {\n postMessage(msg, transfer);\n },\n handleMessage: (method, args) => this._handleMessage(method, args),\n handleEvent: (eventName, arg) => this._handleEvent(eventName, arg)\n });\n }\n onmessage(msg) {\n this._protocol.handleMessage(msg);\n }\n _handleMessage(method, args) {\n if (method === INITIALIZE) {\n return this.initialize(args[0], args[1], args[2], args[3]);\n }\n if (!this._requestHandler || typeof this._requestHandler[method] !== 'function') {\n return Promise.reject(new Error('Missing requestHandler or method: ' + method));\n }\n try {\n return Promise.resolve(this._requestHandler[method].apply(this._requestHandler, args));\n }\n catch (e) {\n return Promise.reject(e);\n }\n }\n _handleEvent(eventName, arg) {\n if (!this._requestHandler) {\n throw new Error(`Missing requestHandler`);\n }\n if (propertyIsDynamicEvent(eventName)) {\n const event = this._requestHandler[eventName].call(this._requestHandler, arg);\n if (typeof event !== 'function') {\n throw new Error(`Missing dynamic event ${eventName} on request handler.`);\n }\n return event;\n }\n if (propertyIsEvent(eventName)) {\n const event = this._requestHandler[eventName];\n if (typeof event !== 'function') {\n throw new Error(`Missing event ${eventName} on request handler.`);\n }\n return event;\n }\n throw new Error(`Malformed event name ${eventName}`);\n }\n initialize(workerId, loaderConfig, moduleId, hostMethods) {\n this._protocol.setWorkerId(workerId);\n const proxyMethodRequest = (method, args) => {\n return this._protocol.sendMessage(method, args);\n };\n const proxyListen = (eventName, arg) => {\n return this._protocol.listen(eventName, arg);\n };\n const hostProxy = createProxyObject(hostMethods, proxyMethodRequest, proxyListen);\n if (this._requestHandlerFactory) {\n // static request handler\n this._requestHandler = this._requestHandlerFactory(hostProxy);\n return Promise.resolve(getAllMethodNames(this._requestHandler));\n }\n if (loaderConfig) {\n // Remove 'baseUrl', handling it is beyond scope for now\n if (typeof loaderConfig.baseUrl !== 'undefined') {\n delete loaderConfig['baseUrl'];\n }\n if (typeof loaderConfig.paths !== 'undefined') {\n if (typeof loaderConfig.paths.vs !== 'undefined') {\n delete loaderConfig.paths['vs'];\n }\n }\n if (typeof loaderConfig.trustedTypesPolicy !== 'undefined') {\n // don't use, it has been destroyed during serialize\n delete loaderConfig['trustedTypesPolicy'];\n }\n // Since this is in a web worker, enable catching errors\n loaderConfig.catchError = true;\n globalThis.require.config(loaderConfig);\n }\n return new Promise((resolve, reject) => {\n // Use the global require to be sure to get the global config\n // ESM-comment-begin\n // \t\t\tconst req = (globalThis.require || require);\n // ESM-comment-end\n // ESM-uncomment-begin\n const req = globalThis.require;\n // ESM-uncomment-end\n req([moduleId], (module) => {\n this._requestHandler = module.create(hostProxy);\n if (!this._requestHandler) {\n reject(new Error(`No RequestHandler!`));\n return;\n }\n resolve(getAllMethodNames(this._requestHandler));\n }, reject);\n });\n }\n}\n/**\n * Called on the worker side\n * @skipMangle\n */\nexport function create(postMessage) {\n return new SimpleWorkerServer(postMessage, null);\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { mainWindow } from './window.js';\nimport { onUnexpectedError } from '../common/errors.js';\nexport function createTrustedTypesPolicy(policyName, policyOptions) {\n var _a;\n const monacoEnvironment = globalThis.MonacoEnvironment;\n if (monacoEnvironment === null || monacoEnvironment === void 0 ? void 0 : monacoEnvironment.createTrustedTypesPolicy) {\n try {\n return monacoEnvironment.createTrustedTypesPolicy(policyName, policyOptions);\n }\n catch (err) {\n onUnexpectedError(err);\n return undefined;\n }\n }\n try {\n return (_a = mainWindow.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy(policyName, policyOptions);\n }\n catch (err) {\n onUnexpectedError(err);\n return undefined;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { createTrustedTypesPolicy } from './trustedTypes.js';\nimport { onUnexpectedError } from '../common/errors.js';\nimport { logOnceWebWorkerWarning } from '../common/worker/simpleWorker.js';\nimport { Disposable, toDisposable } from '../common/lifecycle.js';\nconst ttPolicy = createTrustedTypesPolicy('defaultWorkerFactory', { createScriptURL: value => value });\nfunction getWorker(label) {\n const monacoEnvironment = globalThis.MonacoEnvironment;\n if (monacoEnvironment) {\n if (typeof monacoEnvironment.getWorker === 'function') {\n return monacoEnvironment.getWorker('workerMain.js', label);\n }\n if (typeof monacoEnvironment.getWorkerUrl === 'function') {\n const workerUrl = monacoEnvironment.getWorkerUrl('workerMain.js', label);\n return new Worker(ttPolicy ? ttPolicy.createScriptURL(workerUrl) : workerUrl, { name: label });\n }\n }\n // ESM-comment-begin\n // \tif (typeof require === 'function') {\n // \t\t// check if the JS lives on a different origin\n // \t\tconst workerMain = require.toUrl('vs/base/worker/workerMain.js'); // explicitly using require.toUrl(), see https://github.com/microsoft/vscode/issues/107440#issuecomment-698982321\n // \t\tconst workerUrl = getWorkerBootstrapUrl(workerMain, label);\n // \t\treturn new Worker(ttPolicy ? ttPolicy.createScriptURL(workerUrl) as unknown as string : workerUrl, { name: label });\n // \t}\n // ESM-comment-end\n throw new Error(`You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker`);\n}\n// ESM-comment-begin\n// export function getWorkerBootstrapUrl(scriptPath: string, label: string): string {\n// \tif (/^((http:)|(https:)|(file:))/.test(scriptPath) && scriptPath.substring(0, globalThis.origin.length) !== globalThis.origin) {\n// \t\t// this is the cross-origin case\n// \t\t// i.e. the webpage is running at a different origin than where the scripts are loaded from\n// \t\tconst myPath = 'vs/base/worker/defaultWorkerFactory.js';\n// \t\tconst workerBaseUrl = require.toUrl(myPath).slice(0, -myPath.length); // explicitly using require.toUrl(), see https://github.com/microsoft/vscode/issues/107440#issuecomment-698982321\n// \t\tconst js = `/*${label}*/globalThis.MonacoEnvironment={baseUrl: '${workerBaseUrl}'};const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });importScripts(ttPolicy?.createScriptURL('${scriptPath}') ?? '${scriptPath}');/*${label}*/`;\n// \t\tconst blob = new Blob([js], { type: 'application/javascript' });\n// \t\treturn URL.createObjectURL(blob);\n// \t}\n// \n// \tconst start = scriptPath.lastIndexOf('?');\n// \tconst end = scriptPath.lastIndexOf('#', start);\n// \tconst params = start > 0\n// \t\t? new URLSearchParams(scriptPath.substring(start + 1, ~end ? end : undefined))\n// \t\t: new URLSearchParams();\n// \n// \tCOI.addSearchParam(params, true, true);\n// \tconst search = params.toString();\n// \n// \tif (!search) {\n// \t\treturn `${scriptPath}#${label}`;\n// \t} else {\n// \t\treturn `${scriptPath}?${params.toString()}#${label}`;\n// \t}\n// }\n// ESM-comment-end\nfunction isPromiseLike(obj) {\n if (typeof obj.then === 'function') {\n return true;\n }\n return false;\n}\n/**\n * A worker that uses HTML5 web workers so that is has\n * its own global scope and its own thread.\n */\nclass WebWorker extends Disposable {\n constructor(moduleId, id, label, onMessageCallback, onErrorCallback) {\n super();\n this.id = id;\n this.label = label;\n const workerOrPromise = getWorker(label);\n if (isPromiseLike(workerOrPromise)) {\n this.worker = workerOrPromise;\n }\n else {\n this.worker = Promise.resolve(workerOrPromise);\n }\n this.postMessage(moduleId, []);\n this.worker.then((w) => {\n w.onmessage = function (ev) {\n onMessageCallback(ev.data);\n };\n w.onmessageerror = onErrorCallback;\n if (typeof w.addEventListener === 'function') {\n w.addEventListener('error', onErrorCallback);\n }\n });\n this._register(toDisposable(() => {\n var _a;\n (_a = this.worker) === null || _a === void 0 ? void 0 : _a.then(w => {\n w.onmessage = null;\n w.onmessageerror = null;\n w.removeEventListener('error', onErrorCallback);\n w.terminate();\n });\n this.worker = null;\n }));\n }\n getId() {\n return this.id;\n }\n postMessage(message, transfer) {\n var _a;\n (_a = this.worker) === null || _a === void 0 ? void 0 : _a.then(w => {\n try {\n w.postMessage(message, transfer);\n }\n catch (err) {\n onUnexpectedError(err);\n onUnexpectedError(new Error(`FAILED to post message to '${this.label}'-worker`, { cause: err }));\n }\n });\n }\n}\nexport class DefaultWorkerFactory {\n constructor(label) {\n this._label = label;\n this._webWorkerFailedBeforeError = false;\n }\n create(moduleId, onMessageCallback, onErrorCallback) {\n const workerId = (++DefaultWorkerFactory.LAST_WORKER_ID);\n if (this._webWorkerFailedBeforeError) {\n throw this._webWorkerFailedBeforeError;\n }\n return new WebWorker(moduleId, workerId, this._label || 'anonymous' + workerId, onMessageCallback, (err) => {\n logOnceWebWorkerWarning(err);\n this._webWorkerFailedBeforeError = err;\n onErrorCallback(err);\n });\n }\n}\nDefaultWorkerFactory.LAST_WORKER_ID = 0;\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/**\n * Describes what to do with the indentation when pressing Enter.\n */\nexport var IndentAction;\n(function (IndentAction) {\n /**\n * Insert new line and copy the previous line's indentation.\n */\n IndentAction[IndentAction[\"None\"] = 0] = \"None\";\n /**\n * Insert new line and indent once (relative to the previous line's indentation).\n */\n IndentAction[IndentAction[\"Indent\"] = 1] = \"Indent\";\n /**\n * Insert two new lines:\n * - the first one indented which will hold the cursor\n * - the second one at the same indentation level\n */\n IndentAction[IndentAction[\"IndentOutdent\"] = 2] = \"IndentOutdent\";\n /**\n * Insert new line and outdent once (relative to the previous line's indentation).\n */\n IndentAction[IndentAction[\"Outdent\"] = 3] = \"Outdent\";\n})(IndentAction || (IndentAction = {}));\n/**\n * @internal\n */\nexport class StandardAutoClosingPairConditional {\n constructor(source) {\n this._neutralCharacter = null;\n this._neutralCharacterSearched = false;\n this.open = source.open;\n this.close = source.close;\n // initially allowed in all tokens\n this._inString = true;\n this._inComment = true;\n this._inRegEx = true;\n if (Array.isArray(source.notIn)) {\n for (let i = 0, len = source.notIn.length; i < len; i++) {\n const notIn = source.notIn[i];\n switch (notIn) {\n case 'string':\n this._inString = false;\n break;\n case 'comment':\n this._inComment = false;\n break;\n case 'regex':\n this._inRegEx = false;\n break;\n }\n }\n }\n }\n isOK(standardToken) {\n switch (standardToken) {\n case 0 /* StandardTokenType.Other */:\n return true;\n case 1 /* StandardTokenType.Comment */:\n return this._inComment;\n case 2 /* StandardTokenType.String */:\n return this._inString;\n case 3 /* StandardTokenType.RegEx */:\n return this._inRegEx;\n }\n }\n shouldAutoClose(context, column) {\n // Always complete on empty line\n if (context.getTokenCount() === 0) {\n return true;\n }\n const tokenIndex = context.findTokenIndexAtOffset(column - 2);\n const standardTokenType = context.getStandardTokenType(tokenIndex);\n return this.isOK(standardTokenType);\n }\n _findNeutralCharacterInRange(fromCharCode, toCharCode) {\n for (let charCode = fromCharCode; charCode <= toCharCode; charCode++) {\n const character = String.fromCharCode(charCode);\n if (!this.open.includes(character) && !this.close.includes(character)) {\n return character;\n }\n }\n return null;\n }\n /**\n * Find a character in the range [0-9a-zA-Z] that does not appear in the open or close\n */\n findNeutralCharacter() {\n if (!this._neutralCharacterSearched) {\n this._neutralCharacterSearched = true;\n if (!this._neutralCharacter) {\n this._neutralCharacter = this._findNeutralCharacterInRange(48 /* CharCode.Digit0 */, 57 /* CharCode.Digit9 */);\n }\n if (!this._neutralCharacter) {\n this._neutralCharacter = this._findNeutralCharacterInRange(97 /* CharCode.a */, 122 /* CharCode.z */);\n }\n if (!this._neutralCharacter) {\n this._neutralCharacter = this._findNeutralCharacterInRange(65 /* CharCode.A */, 90 /* CharCode.Z */);\n }\n }\n return this._neutralCharacter;\n }\n}\n/**\n * @internal\n */\nexport class AutoClosingPairs {\n constructor(autoClosingPairs) {\n this.autoClosingPairsOpenByStart = new Map();\n this.autoClosingPairsOpenByEnd = new Map();\n this.autoClosingPairsCloseByStart = new Map();\n this.autoClosingPairsCloseByEnd = new Map();\n this.autoClosingPairsCloseSingleChar = new Map();\n for (const pair of autoClosingPairs) {\n appendEntry(this.autoClosingPairsOpenByStart, pair.open.charAt(0), pair);\n appendEntry(this.autoClosingPairsOpenByEnd, pair.open.charAt(pair.open.length - 1), pair);\n appendEntry(this.autoClosingPairsCloseByStart, pair.close.charAt(0), pair);\n appendEntry(this.autoClosingPairsCloseByEnd, pair.close.charAt(pair.close.length - 1), pair);\n if (pair.close.length === 1 && pair.open.length === 1) {\n appendEntry(this.autoClosingPairsCloseSingleChar, pair.close, pair);\n }\n }\n }\n}\nfunction appendEntry(target, key, value) {\n if (target.has(key)) {\n target.get(key).push(value);\n }\n else {\n target.set(key, [value]);\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport function createScopedLineTokens(context, offset) {\n const tokenCount = context.getCount();\n const tokenIndex = context.findTokenIndexAtOffset(offset);\n const desiredLanguageId = context.getLanguageId(tokenIndex);\n let lastTokenIndex = tokenIndex;\n while (lastTokenIndex + 1 < tokenCount && context.getLanguageId(lastTokenIndex + 1) === desiredLanguageId) {\n lastTokenIndex++;\n }\n let firstTokenIndex = tokenIndex;\n while (firstTokenIndex > 0 && context.getLanguageId(firstTokenIndex - 1) === desiredLanguageId) {\n firstTokenIndex--;\n }\n return new ScopedLineTokens(context, desiredLanguageId, firstTokenIndex, lastTokenIndex + 1, context.getStartOffset(firstTokenIndex), context.getEndOffset(lastTokenIndex));\n}\nexport class ScopedLineTokens {\n constructor(actual, languageId, firstTokenIndex, lastTokenIndex, firstCharOffset, lastCharOffset) {\n this._scopedLineTokensBrand = undefined;\n this._actual = actual;\n this.languageId = languageId;\n this._firstTokenIndex = firstTokenIndex;\n this._lastTokenIndex = lastTokenIndex;\n this.firstCharOffset = firstCharOffset;\n this._lastCharOffset = lastCharOffset;\n }\n getLineContent() {\n const actualLineContent = this._actual.getLineContent();\n return actualLineContent.substring(this.firstCharOffset, this._lastCharOffset);\n }\n getActualLineContentBefore(offset) {\n const actualLineContent = this._actual.getLineContent();\n return actualLineContent.substring(0, this.firstCharOffset + offset);\n }\n getTokenCount() {\n return this._lastTokenIndex - this._firstTokenIndex;\n }\n findTokenIndexAtOffset(offset) {\n return this._actual.findTokenIndexAtOffset(offset + this.firstCharOffset) - this._firstTokenIndex;\n }\n getStandardTokenType(tokenIndex) {\n return this._actual.getStandardTokenType(tokenIndex + this._firstTokenIndex);\n }\n}\nexport function ignoreBracketsInToken(standardTokenType) {\n return (standardTokenType & 3 /* IgnoreBracketsInTokens.value */) !== 0;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { StandardAutoClosingPairConditional } from '../languageConfiguration.js';\nexport class CharacterPairSupport {\n constructor(config) {\n if (config.autoClosingPairs) {\n this._autoClosingPairs = config.autoClosingPairs.map(el => new StandardAutoClosingPairConditional(el));\n }\n else if (config.brackets) {\n this._autoClosingPairs = config.brackets.map(b => new StandardAutoClosingPairConditional({ open: b[0], close: b[1] }));\n }\n else {\n this._autoClosingPairs = [];\n }\n if (config.__electricCharacterSupport && config.__electricCharacterSupport.docComment) {\n const docComment = config.__electricCharacterSupport.docComment;\n // IDocComment is legacy, only partially supported\n this._autoClosingPairs.push(new StandardAutoClosingPairConditional({ open: docComment.open, close: docComment.close || '' }));\n }\n this._autoCloseBeforeForQuotes = typeof config.autoCloseBefore === 'string' ? config.autoCloseBefore : CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES;\n this._autoCloseBeforeForBrackets = typeof config.autoCloseBefore === 'string' ? config.autoCloseBefore : CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS;\n this._surroundingPairs = config.surroundingPairs || this._autoClosingPairs;\n }\n getAutoClosingPairs() {\n return this._autoClosingPairs;\n }\n getAutoCloseBeforeSet(forQuotes) {\n return (forQuotes ? this._autoCloseBeforeForQuotes : this._autoCloseBeforeForBrackets);\n }\n getSurroundingPairs() {\n return this._surroundingPairs;\n }\n}\nCharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES = ';:.,=}])> \\n\\t';\nCharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS = '\\'\"`;:.,=}])> \\n\\t';\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Lazy } from './lazy.js';\nconst hasBuffer = (typeof Buffer !== 'undefined');\nconst indexOfTable = new Lazy(() => new Uint8Array(256));\nlet textDecoder;\nexport class VSBuffer {\n /**\n * When running in a nodejs context, if `actual` is not a nodejs Buffer, the backing store for\n * the returned `VSBuffer` instance might use a nodejs Buffer allocated from node's Buffer pool,\n * which is not transferrable.\n */\n static wrap(actual) {\n if (hasBuffer && !(Buffer.isBuffer(actual))) {\n // https://nodejs.org/dist/latest-v10.x/docs/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length\n // Create a zero-copy Buffer wrapper around the ArrayBuffer pointed to by the Uint8Array\n actual = Buffer.from(actual.buffer, actual.byteOffset, actual.byteLength);\n }\n return new VSBuffer(actual);\n }\n constructor(buffer) {\n this.buffer = buffer;\n this.byteLength = this.buffer.byteLength;\n }\n toString() {\n if (hasBuffer) {\n return this.buffer.toString();\n }\n else {\n if (!textDecoder) {\n textDecoder = new TextDecoder();\n }\n return textDecoder.decode(this.buffer);\n }\n }\n}\nexport function readUInt16LE(source, offset) {\n return (((source[offset + 0] << 0) >>> 0) |\n ((source[offset + 1] << 8) >>> 0));\n}\nexport function writeUInt16LE(destination, value, offset) {\n destination[offset + 0] = (value & 0b11111111);\n value = value >>> 8;\n destination[offset + 1] = (value & 0b11111111);\n}\nexport function readUInt32BE(source, offset) {\n return (source[offset] * 2 ** 24\n + source[offset + 1] * 2 ** 16\n + source[offset + 2] * 2 ** 8\n + source[offset + 3]);\n}\nexport function writeUInt32BE(destination, value, offset) {\n destination[offset + 3] = value;\n value = value >>> 8;\n destination[offset + 2] = value;\n value = value >>> 8;\n destination[offset + 1] = value;\n value = value >>> 8;\n destination[offset] = value;\n}\nexport function readUInt8(source, offset) {\n return source[offset];\n}\nexport function writeUInt8(destination, value, offset) {\n destination[offset] = value;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as strings from '../../../base/common/strings.js';\nimport * as platform from '../../../base/common/platform.js';\nimport * as buffer from '../../../base/common/buffer.js';\nlet _utf16LE_TextDecoder;\nfunction getUTF16LE_TextDecoder() {\n if (!_utf16LE_TextDecoder) {\n _utf16LE_TextDecoder = new TextDecoder('UTF-16LE');\n }\n return _utf16LE_TextDecoder;\n}\nlet _utf16BE_TextDecoder;\nfunction getUTF16BE_TextDecoder() {\n if (!_utf16BE_TextDecoder) {\n _utf16BE_TextDecoder = new TextDecoder('UTF-16BE');\n }\n return _utf16BE_TextDecoder;\n}\nlet _platformTextDecoder;\nexport function getPlatformTextDecoder() {\n if (!_platformTextDecoder) {\n _platformTextDecoder = platform.isLittleEndian() ? getUTF16LE_TextDecoder() : getUTF16BE_TextDecoder();\n }\n return _platformTextDecoder;\n}\nexport function decodeUTF16LE(source, offset, len) {\n const view = new Uint16Array(source.buffer, offset, len);\n if (len > 0 && (view[0] === 0xFEFF || view[0] === 0xFFFE)) {\n // UTF16 sometimes starts with a BOM https://de.wikipedia.org/wiki/Byte_Order_Mark\n // It looks like TextDecoder.decode will eat up a leading BOM (0xFEFF or 0xFFFE)\n // We don't want that behavior because we know the string is UTF16LE and the BOM should be maintained\n // So we use the manual decoder\n return compatDecodeUTF16LE(source, offset, len);\n }\n return getUTF16LE_TextDecoder().decode(view);\n}\nfunction compatDecodeUTF16LE(source, offset, len) {\n const result = [];\n let resultLen = 0;\n for (let i = 0; i < len; i++) {\n const charCode = buffer.readUInt16LE(source, offset);\n offset += 2;\n result[resultLen++] = String.fromCharCode(charCode);\n }\n return result.join('');\n}\nexport class StringBuilder {\n constructor(capacity) {\n this._capacity = capacity | 0;\n this._buffer = new Uint16Array(this._capacity);\n this._completedStrings = null;\n this._bufferLength = 0;\n }\n reset() {\n this._completedStrings = null;\n this._bufferLength = 0;\n }\n build() {\n if (this._completedStrings !== null) {\n this._flushBuffer();\n return this._completedStrings.join('');\n }\n return this._buildBuffer();\n }\n _buildBuffer() {\n if (this._bufferLength === 0) {\n return '';\n }\n const view = new Uint16Array(this._buffer.buffer, 0, this._bufferLength);\n return getPlatformTextDecoder().decode(view);\n }\n _flushBuffer() {\n const bufferString = this._buildBuffer();\n this._bufferLength = 0;\n if (this._completedStrings === null) {\n this._completedStrings = [bufferString];\n }\n else {\n this._completedStrings[this._completedStrings.length] = bufferString;\n }\n }\n /**\n * Append a char code (<2^16)\n */\n appendCharCode(charCode) {\n const remainingSpace = this._capacity - this._bufferLength;\n if (remainingSpace <= 1) {\n if (remainingSpace === 0 || strings.isHighSurrogate(charCode)) {\n this._flushBuffer();\n }\n }\n this._buffer[this._bufferLength++] = charCode;\n }\n /**\n * Append an ASCII char code (<2^8)\n */\n appendASCIICharCode(charCode) {\n if (this._bufferLength === this._capacity) {\n // buffer is full\n this._flushBuffer();\n }\n this._buffer[this._bufferLength++] = charCode;\n }\n appendString(str) {\n const strLen = str.length;\n if (this._bufferLength + strLen >= this._capacity) {\n // This string does not fit in the remaining buffer space\n this._flushBuffer();\n this._completedStrings[this._completedStrings.length] = str;\n return;\n }\n for (let i = 0; i < strLen; i++) {\n this._buffer[this._bufferLength++] = str.charCodeAt(i);\n }\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as strings from '../../../../base/common/strings.js';\nimport * as stringBuilder from '../../core/stringBuilder.js';\nimport { Range } from '../../core/range.js';\n/**\n * Represents a grouping of colliding bracket pairs.\n *\n * Most of the times this contains a single bracket pair,\n * but sometimes this contains multiple bracket pairs in cases\n * where the same string appears as a closing bracket for multiple\n * bracket pairs, or the same string appears an opening bracket for\n * multiple bracket pairs.\n *\n * e.g. of a group containing a single pair:\n * open: ['{'], close: ['}']\n *\n * e.g. of a group containing multiple pairs:\n * open: ['if', 'for'], close: ['end', 'end']\n */\nexport class RichEditBracket {\n constructor(languageId, index, open, close, forwardRegex, reversedRegex) {\n this._richEditBracketBrand = undefined;\n this.languageId = languageId;\n this.index = index;\n this.open = open;\n this.close = close;\n this.forwardRegex = forwardRegex;\n this.reversedRegex = reversedRegex;\n this._openSet = RichEditBracket._toSet(this.open);\n this._closeSet = RichEditBracket._toSet(this.close);\n }\n /**\n * Check if the provided `text` is an open bracket in this group.\n */\n isOpen(text) {\n return this._openSet.has(text);\n }\n /**\n * Check if the provided `text` is a close bracket in this group.\n */\n isClose(text) {\n return this._closeSet.has(text);\n }\n static _toSet(arr) {\n const result = new Set();\n for (const element of arr) {\n result.add(element);\n }\n return result;\n }\n}\n/**\n * Groups together brackets that have equal open or close sequences.\n *\n * For example, if the following brackets are defined:\n * ['IF','END']\n * ['for','end']\n * ['{','}']\n *\n * Then the grouped brackets would be:\n * { open: ['if', 'for'], close: ['end', 'end'] }\n * { open: ['{'], close: ['}'] }\n *\n */\nfunction groupFuzzyBrackets(brackets) {\n const N = brackets.length;\n brackets = brackets.map(b => [b[0].toLowerCase(), b[1].toLowerCase()]);\n const group = [];\n for (let i = 0; i < N; i++) {\n group[i] = i;\n }\n const areOverlapping = (a, b) => {\n const [aOpen, aClose] = a;\n const [bOpen, bClose] = b;\n return (aOpen === bOpen || aOpen === bClose || aClose === bOpen || aClose === bClose);\n };\n const mergeGroups = (g1, g2) => {\n const newG = Math.min(g1, g2);\n const oldG = Math.max(g1, g2);\n for (let i = 0; i < N; i++) {\n if (group[i] === oldG) {\n group[i] = newG;\n }\n }\n };\n // group together brackets that have the same open or the same close sequence\n for (let i = 0; i < N; i++) {\n const a = brackets[i];\n for (let j = i + 1; j < N; j++) {\n const b = brackets[j];\n if (areOverlapping(a, b)) {\n mergeGroups(group[i], group[j]);\n }\n }\n }\n const result = [];\n for (let g = 0; g < N; g++) {\n const currentOpen = [];\n const currentClose = [];\n for (let i = 0; i < N; i++) {\n if (group[i] === g) {\n const [open, close] = brackets[i];\n currentOpen.push(open);\n currentClose.push(close);\n }\n }\n if (currentOpen.length > 0) {\n result.push({\n open: currentOpen,\n close: currentClose\n });\n }\n }\n return result;\n}\nexport class RichEditBrackets {\n constructor(languageId, _brackets) {\n this._richEditBracketsBrand = undefined;\n const brackets = groupFuzzyBrackets(_brackets);\n this.brackets = brackets.map((b, index) => {\n return new RichEditBracket(languageId, index, b.open, b.close, getRegexForBracketPair(b.open, b.close, brackets, index), getReversedRegexForBracketPair(b.open, b.close, brackets, index));\n });\n this.forwardRegex = getRegexForBrackets(this.brackets);\n this.reversedRegex = getReversedRegexForBrackets(this.brackets);\n this.textIsBracket = {};\n this.textIsOpenBracket = {};\n this.maxBracketLength = 0;\n for (const bracket of this.brackets) {\n for (const open of bracket.open) {\n this.textIsBracket[open] = bracket;\n this.textIsOpenBracket[open] = true;\n this.maxBracketLength = Math.max(this.maxBracketLength, open.length);\n }\n for (const close of bracket.close) {\n this.textIsBracket[close] = bracket;\n this.textIsOpenBracket[close] = false;\n this.maxBracketLength = Math.max(this.maxBracketLength, close.length);\n }\n }\n }\n}\nfunction collectSuperstrings(str, brackets, currentIndex, dest) {\n for (let i = 0, len = brackets.length; i < len; i++) {\n if (i === currentIndex) {\n continue;\n }\n const bracket = brackets[i];\n for (const open of bracket.open) {\n if (open.indexOf(str) >= 0) {\n dest.push(open);\n }\n }\n for (const close of bracket.close) {\n if (close.indexOf(str) >= 0) {\n dest.push(close);\n }\n }\n }\n}\nfunction lengthcmp(a, b) {\n return a.length - b.length;\n}\nfunction unique(arr) {\n if (arr.length <= 1) {\n return arr;\n }\n const result = [];\n const seen = new Set();\n for (const element of arr) {\n if (seen.has(element)) {\n continue;\n }\n result.push(element);\n seen.add(element);\n }\n return result;\n}\n/**\n * Create a regular expression that can be used to search forward in a piece of text\n * for a group of bracket pairs. But this regex must be built in a way in which\n * it is aware of the other bracket pairs defined for the language.\n *\n * For example, if a language contains the following bracket pairs:\n * ['begin', 'end']\n * ['if', 'end if']\n * The two bracket pairs do not collide because no open or close brackets are equal.\n * So the function getRegexForBracketPair is called twice, once with\n * the ['begin'], ['end'] group consisting of one bracket pair, and once with\n * the ['if'], ['end if'] group consiting of the other bracket pair.\n *\n * But there could be a situation where an occurrence of 'end if' is mistaken\n * for an occurrence of 'end'.\n *\n * Therefore, for the bracket pair ['begin', 'end'], the regex will also\n * target 'end if'. The regex will be something like:\n * /(\\bend if\\b)|(\\bend\\b)|(\\bif\\b)/\n *\n * The regex also searches for \"superstrings\" (other brackets that might be mistaken with the current bracket).\n *\n */\nfunction getRegexForBracketPair(open, close, brackets, currentIndex) {\n // search in all brackets for other brackets that are a superstring of these brackets\n let pieces = [];\n pieces = pieces.concat(open);\n pieces = pieces.concat(close);\n for (let i = 0, len = pieces.length; i < len; i++) {\n collectSuperstrings(pieces[i], brackets, currentIndex, pieces);\n }\n pieces = unique(pieces);\n pieces.sort(lengthcmp);\n pieces.reverse();\n return createBracketOrRegExp(pieces);\n}\n/**\n * Matching a regular expression in JS can only be done \"forwards\". So JS offers natively only\n * methods to find the first match of a regex in a string. But sometimes, it is useful to\n * find the last match of a regex in a string. For such a situation, a nice solution is to\n * simply reverse the string and then search for a reversed regex.\n *\n * This function also has the fine details of `getRegexForBracketPair`. For the same example\n * given above, the regex produced here would look like:\n * /(\\bfi dne\\b)|(\\bdne\\b)|(\\bfi\\b)/\n */\nfunction getReversedRegexForBracketPair(open, close, brackets, currentIndex) {\n // search in all brackets for other brackets that are a superstring of these brackets\n let pieces = [];\n pieces = pieces.concat(open);\n pieces = pieces.concat(close);\n for (let i = 0, len = pieces.length; i < len; i++) {\n collectSuperstrings(pieces[i], brackets, currentIndex, pieces);\n }\n pieces = unique(pieces);\n pieces.sort(lengthcmp);\n pieces.reverse();\n return createBracketOrRegExp(pieces.map(toReversedString));\n}\n/**\n * Creates a regular expression that targets all bracket pairs.\n *\n * e.g. for the bracket pairs:\n * ['{','}']\n * ['begin,'end']\n * ['for','end']\n * the regex would look like:\n * /(\\{)|(\\})|(\\bbegin\\b)|(\\bend\\b)|(\\bfor\\b)/\n */\nfunction getRegexForBrackets(brackets) {\n let pieces = [];\n for (const bracket of brackets) {\n for (const open of bracket.open) {\n pieces.push(open);\n }\n for (const close of bracket.close) {\n pieces.push(close);\n }\n }\n pieces = unique(pieces);\n return createBracketOrRegExp(pieces);\n}\n/**\n * Matching a regular expression in JS can only be done \"forwards\". So JS offers natively only\n * methods to find the first match of a regex in a string. But sometimes, it is useful to\n * find the last match of a regex in a string. For such a situation, a nice solution is to\n * simply reverse the string and then search for a reversed regex.\n *\n * e.g. for the bracket pairs:\n * ['{','}']\n * ['begin,'end']\n * ['for','end']\n * the regex would look like:\n * /(\\{)|(\\})|(\\bnigeb\\b)|(\\bdne\\b)|(\\brof\\b)/\n */\nfunction getReversedRegexForBrackets(brackets) {\n let pieces = [];\n for (const bracket of brackets) {\n for (const open of bracket.open) {\n pieces.push(open);\n }\n for (const close of bracket.close) {\n pieces.push(close);\n }\n }\n pieces = unique(pieces);\n return createBracketOrRegExp(pieces.map(toReversedString));\n}\nfunction prepareBracketForRegExp(str) {\n // This bracket pair uses letters like e.g. \"begin\" - \"end\"\n const insertWordBoundaries = (/^[\\w ]+$/.test(str));\n str = strings.escapeRegExpCharacters(str);\n return (insertWordBoundaries ? `\\\\b${str}\\\\b` : str);\n}\nfunction createBracketOrRegExp(pieces) {\n const regexStr = `(${pieces.map(prepareBracketForRegExp).join(')|(')})`;\n return strings.createRegExp(regexStr, true);\n}\nconst toReversedString = (function () {\n function reverse(str) {\n // create a Uint16Array and then use a TextDecoder to create a string\n const arr = new Uint16Array(str.length);\n let offset = 0;\n for (let i = str.length - 1; i >= 0; i--) {\n arr[offset++] = str.charCodeAt(i);\n }\n return stringBuilder.getPlatformTextDecoder().decode(arr);\n }\n let lastInput = null;\n let lastOutput = null;\n return function toReversedString(str) {\n if (lastInput !== str) {\n lastInput = str;\n lastOutput = reverse(lastInput);\n }\n return lastOutput;\n };\n})();\nexport class BracketsUtils {\n static _findPrevBracketInText(reversedBracketRegex, lineNumber, reversedText, offset) {\n const m = reversedText.match(reversedBracketRegex);\n if (!m) {\n return null;\n }\n const matchOffset = reversedText.length - (m.index || 0);\n const matchLength = m[0].length;\n const absoluteMatchOffset = offset + matchOffset;\n return new Range(lineNumber, absoluteMatchOffset - matchLength + 1, lineNumber, absoluteMatchOffset + 1);\n }\n static findPrevBracketInRange(reversedBracketRegex, lineNumber, lineText, startOffset, endOffset) {\n // Because JS does not support backwards regex search, we search forwards in a reversed string with a reversed regex ;)\n const reversedLineText = toReversedString(lineText);\n const reversedSubstr = reversedLineText.substring(lineText.length - endOffset, lineText.length - startOffset);\n return this._findPrevBracketInText(reversedBracketRegex, lineNumber, reversedSubstr, startOffset);\n }\n static findNextBracketInText(bracketRegex, lineNumber, text, offset) {\n const m = text.match(bracketRegex);\n if (!m) {\n return null;\n }\n const matchOffset = m.index || 0;\n const matchLength = m[0].length;\n if (matchLength === 0) {\n return null;\n }\n const absoluteMatchOffset = offset + matchOffset;\n return new Range(lineNumber, absoluteMatchOffset + 1, lineNumber, absoluteMatchOffset + 1 + matchLength);\n }\n static findNextBracketInRange(bracketRegex, lineNumber, lineText, startOffset, endOffset) {\n const substr = lineText.substring(startOffset, endOffset);\n return this.findNextBracketInText(bracketRegex, lineNumber, substr, startOffset);\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { distinct } from '../../../../base/common/arrays.js';\nimport { ignoreBracketsInToken } from '../supports.js';\nimport { BracketsUtils } from './richEditBrackets.js';\nexport class BracketElectricCharacterSupport {\n constructor(richEditBrackets) {\n this._richEditBrackets = richEditBrackets;\n }\n getElectricCharacters() {\n const result = [];\n if (this._richEditBrackets) {\n for (const bracket of this._richEditBrackets.brackets) {\n for (const close of bracket.close) {\n const lastChar = close.charAt(close.length - 1);\n result.push(lastChar);\n }\n }\n }\n return distinct(result);\n }\n onElectricCharacter(character, context, column) {\n if (!this._richEditBrackets || this._richEditBrackets.brackets.length === 0) {\n return null;\n }\n const tokenIndex = context.findTokenIndexAtOffset(column - 1);\n if (ignoreBracketsInToken(context.getStandardTokenType(tokenIndex))) {\n return null;\n }\n const reversedBracketRegex = this._richEditBrackets.reversedRegex;\n const text = context.getLineContent().substring(0, column - 1) + character;\n const r = BracketsUtils.findPrevBracketInRange(reversedBracketRegex, 1, text, 0, text.length);\n if (!r) {\n return null;\n }\n const bracketText = text.substring(r.startColumn - 1, r.endColumn - 1).toLowerCase();\n const isOpen = this._richEditBrackets.textIsOpenBracket[bracketText];\n if (isOpen) {\n return null;\n }\n const textBeforeBracket = context.getActualLineContentBefore(r.startColumn - 1);\n if (!/^\\s*$/.test(textBeforeBracket)) {\n // There is other text on the line before the bracket\n return null;\n }\n return {\n matchOpenBracket: bracketText\n };\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nfunction resetGlobalRegex(reg) {\n if (reg.global) {\n reg.lastIndex = 0;\n }\n return true;\n}\nexport class IndentRulesSupport {\n constructor(indentationRules) {\n this._indentationRules = indentationRules;\n }\n shouldIncrease(text) {\n if (this._indentationRules) {\n if (this._indentationRules.increaseIndentPattern && resetGlobalRegex(this._indentationRules.increaseIndentPattern) && this._indentationRules.increaseIndentPattern.test(text)) {\n return true;\n }\n // if (this._indentationRules.indentNextLinePattern && this._indentationRules.indentNextLinePattern.test(text)) {\n // \treturn true;\n // }\n }\n return false;\n }\n shouldDecrease(text) {\n if (this._indentationRules && this._indentationRules.decreaseIndentPattern && resetGlobalRegex(this._indentationRules.decreaseIndentPattern) && this._indentationRules.decreaseIndentPattern.test(text)) {\n return true;\n }\n return false;\n }\n shouldIndentNextLine(text) {\n if (this._indentationRules && this._indentationRules.indentNextLinePattern && resetGlobalRegex(this._indentationRules.indentNextLinePattern) && this._indentationRules.indentNextLinePattern.test(text)) {\n return true;\n }\n return false;\n }\n shouldIgnore(text) {\n // the text matches `unIndentedLinePattern`\n if (this._indentationRules && this._indentationRules.unIndentedLinePattern && resetGlobalRegex(this._indentationRules.unIndentedLinePattern) && this._indentationRules.unIndentedLinePattern.test(text)) {\n return true;\n }\n return false;\n }\n getIndentMetadata(text) {\n let ret = 0;\n if (this.shouldIncrease(text)) {\n ret += 1 /* IndentConsts.INCREASE_MASK */;\n }\n if (this.shouldDecrease(text)) {\n ret += 2 /* IndentConsts.DECREASE_MASK */;\n }\n if (this.shouldIndentNextLine(text)) {\n ret += 4 /* IndentConsts.INDENT_NEXTLINE_MASK */;\n }\n if (this.shouldIgnore(text)) {\n ret += 8 /* IndentConsts.UNINDENT_MASK */;\n }\n return ret;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { onUnexpectedError } from '../../../../base/common/errors.js';\nimport * as strings from '../../../../base/common/strings.js';\nimport { IndentAction } from '../languageConfiguration.js';\nexport class OnEnterSupport {\n constructor(opts) {\n opts = opts || {};\n opts.brackets = opts.brackets || [\n ['(', ')'],\n ['{', '}'],\n ['[', ']']\n ];\n this._brackets = [];\n opts.brackets.forEach((bracket) => {\n const openRegExp = OnEnterSupport._createOpenBracketRegExp(bracket[0]);\n const closeRegExp = OnEnterSupport._createCloseBracketRegExp(bracket[1]);\n if (openRegExp && closeRegExp) {\n this._brackets.push({\n open: bracket[0],\n openRegExp: openRegExp,\n close: bracket[1],\n closeRegExp: closeRegExp,\n });\n }\n });\n this._regExpRules = opts.onEnterRules || [];\n }\n onEnter(autoIndent, previousLineText, beforeEnterText, afterEnterText) {\n // (1): `regExpRules`\n if (autoIndent >= 3 /* EditorAutoIndentStrategy.Advanced */) {\n for (let i = 0, len = this._regExpRules.length; i < len; i++) {\n const rule = this._regExpRules[i];\n const regResult = [{\n reg: rule.beforeText,\n text: beforeEnterText\n }, {\n reg: rule.afterText,\n text: afterEnterText\n }, {\n reg: rule.previousLineText,\n text: previousLineText\n }].every((obj) => {\n if (!obj.reg) {\n return true;\n }\n obj.reg.lastIndex = 0; // To disable the effect of the \"g\" flag.\n return obj.reg.test(obj.text);\n });\n if (regResult) {\n return rule.action;\n }\n }\n }\n // (2): Special indent-outdent\n if (autoIndent >= 2 /* EditorAutoIndentStrategy.Brackets */) {\n if (beforeEnterText.length > 0 && afterEnterText.length > 0) {\n for (let i = 0, len = this._brackets.length; i < len; i++) {\n const bracket = this._brackets[i];\n if (bracket.openRegExp.test(beforeEnterText) && bracket.closeRegExp.test(afterEnterText)) {\n return { indentAction: IndentAction.IndentOutdent };\n }\n }\n }\n }\n // (4): Open bracket based logic\n if (autoIndent >= 2 /* EditorAutoIndentStrategy.Brackets */) {\n if (beforeEnterText.length > 0) {\n for (let i = 0, len = this._brackets.length; i < len; i++) {\n const bracket = this._brackets[i];\n if (bracket.openRegExp.test(beforeEnterText)) {\n return { indentAction: IndentAction.Indent };\n }\n }\n }\n }\n return null;\n }\n static _createOpenBracketRegExp(bracket) {\n let str = strings.escapeRegExpCharacters(bracket);\n if (!/\\B/.test(str.charAt(0))) {\n str = '\\\\b' + str;\n }\n str += '\\\\s*$';\n return OnEnterSupport._safeRegExp(str);\n }\n static _createCloseBracketRegExp(bracket) {\n let str = strings.escapeRegExpCharacters(bracket);\n if (!/\\B/.test(str.charAt(str.length - 1))) {\n str = str + '\\\\b';\n }\n str = '^\\\\s*' + str;\n return OnEnterSupport._safeRegExp(str);\n }\n static _safeRegExp(def) {\n try {\n return new RegExp(def);\n }\n catch (err) {\n onUnexpectedError(err);\n return null;\n }\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\nexport const IConfigurationService = createDecorator('configurationService');\nexport function toValuesTree(properties, conflictReporter) {\n const root = Object.create(null);\n for (const key in properties) {\n addToValueTree(root, key, properties[key], conflictReporter);\n }\n return root;\n}\nexport function addToValueTree(settingsTreeRoot, key, value, conflictReporter) {\n const segments = key.split('.');\n const last = segments.pop();\n let curr = settingsTreeRoot;\n for (let i = 0; i < segments.length; i++) {\n const s = segments[i];\n let obj = curr[s];\n switch (typeof obj) {\n case 'undefined':\n obj = curr[s] = Object.create(null);\n break;\n case 'object':\n break;\n default:\n conflictReporter(`Ignoring ${key} as ${segments.slice(0, i + 1).join('.')} is ${JSON.stringify(obj)}`);\n return;\n }\n curr = obj;\n }\n if (typeof curr === 'object' && curr !== null) {\n try {\n curr[last] = value; // workaround https://github.com/microsoft/vscode/issues/13606\n }\n catch (e) {\n conflictReporter(`Ignoring ${key} as ${segments.join('.')} is ${JSON.stringify(curr)}`);\n }\n }\n else {\n conflictReporter(`Ignoring ${key} as ${segments.join('.')} is ${JSON.stringify(curr)}`);\n }\n}\nexport function removeFromValueTree(valueTree, key) {\n const segments = key.split('.');\n doRemoveFromValueTree(valueTree, segments);\n}\nfunction doRemoveFromValueTree(valueTree, segments) {\n const first = segments.shift();\n if (segments.length === 0) {\n // Reached last segment\n delete valueTree[first];\n return;\n }\n if (Object.keys(valueTree).indexOf(first) !== -1) {\n const value = valueTree[first];\n if (typeof value === 'object' && !Array.isArray(value)) {\n doRemoveFromValueTree(value, segments);\n if (Object.keys(value).length === 0) {\n delete valueTree[first];\n }\n }\n }\n}\n/**\n * A helper function to get the configuration value with a specific settings path (e.g. config.some.setting)\n */\nexport function getConfigurationValue(config, settingPath, defaultValue) {\n function accessSetting(config, path) {\n let current = config;\n for (const component of path) {\n if (typeof current !== 'object' || current === null) {\n return undefined;\n }\n current = current[component];\n }\n return current;\n }\n const path = settingPath.split('.');\n const result = accessSetting(config, path);\n return typeof result === 'undefined' ? defaultValue : result;\n}\nexport function getLanguageTagSettingPlainKey(settingKey) {\n return settingKey.replace(/[\\[\\]]/g, '');\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation.js';\nexport const ILanguageService = createDecorator('languageService');\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport class SyncDescriptor {\n constructor(ctor, staticArguments = [], supportsDelayedInstantiation = false) {\n this.ctor = ctor;\n this.staticArguments = staticArguments;\n this.supportsDelayedInstantiation = supportsDelayedInstantiation;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { SyncDescriptor } from './descriptors.js';\nconst _registry = [];\nexport function registerSingleton(id, ctorOrDescriptor, supportsDelayedInstantiation) {\n if (!(ctorOrDescriptor instanceof SyncDescriptor)) {\n ctorOrDescriptor = new SyncDescriptor(ctorOrDescriptor, [], Boolean(supportsDelayedInstantiation));\n }\n _registry.push([id, ctorOrDescriptor]);\n}\nexport function getSingletonServiceDescriptors() {\n return _registry;\n}\n", "export const Mimes = Object.freeze({\n text: 'text/plain',\n binary: 'application/octet-stream',\n unknown: 'application/unknown',\n markdown: 'text/markdown',\n latex: 'text/latex',\n uriList: 'text/uri-list',\n});\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Emitter } from '../../../base/common/event.js';\nimport * as platform from '../../registry/common/platform.js';\nexport const Extensions = {\n JSONContribution: 'base.contributions.json'\n};\nfunction normalizeId(id) {\n if (id.length > 0 && id.charAt(id.length - 1) === '#') {\n return id.substring(0, id.length - 1);\n }\n return id;\n}\nclass JSONContributionRegistry {\n constructor() {\n this._onDidChangeSchema = new Emitter();\n this.schemasById = {};\n }\n registerSchema(uri, unresolvedSchemaContent) {\n this.schemasById[normalizeId(uri)] = unresolvedSchemaContent;\n this._onDidChangeSchema.fire(uri);\n }\n notifySchemaChanged(uri) {\n this._onDidChangeSchema.fire(uri);\n }\n}\nconst jsonContributionRegistry = new JSONContributionRegistry();\nplatform.Registry.add(Extensions.JSONContribution, jsonContributionRegistry);\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { distinct } from '../../../base/common/arrays.js';\nimport { Emitter } from '../../../base/common/event.js';\nimport * as types from '../../../base/common/types.js';\nimport * as nls from '../../../nls.js';\nimport { getLanguageTagSettingPlainKey } from './configuration.js';\nimport { Extensions as JSONExtensions } from '../../jsonschemas/common/jsonContributionRegistry.js';\nimport { Registry } from '../../registry/common/platform.js';\nexport const Extensions = {\n Configuration: 'base.contributions.configuration'\n};\nexport const allSettings = { properties: {}, patternProperties: {} };\nexport const applicationSettings = { properties: {}, patternProperties: {} };\nexport const machineSettings = { properties: {}, patternProperties: {} };\nexport const machineOverridableSettings = { properties: {}, patternProperties: {} };\nexport const windowSettings = { properties: {}, patternProperties: {} };\nexport const resourceSettings = { properties: {}, patternProperties: {} };\nexport const resourceLanguageSettingsSchemaId = 'vscode://schemas/settings/resourceLanguage';\nconst contributionRegistry = Registry.as(JSONExtensions.JSONContribution);\nclass ConfigurationRegistry {\n constructor() {\n this.overrideIdentifiers = new Set();\n this._onDidSchemaChange = new Emitter();\n this._onDidUpdateConfiguration = new Emitter();\n this.configurationDefaultsOverrides = new Map();\n this.defaultLanguageConfigurationOverridesNode = {\n id: 'defaultOverrides',\n title: nls.localize('defaultLanguageConfigurationOverrides.title', \"Default Language Configuration Overrides\"),\n properties: {}\n };\n this.configurationContributors = [this.defaultLanguageConfigurationOverridesNode];\n this.resourceLanguageSettingsSchema = {\n properties: {},\n patternProperties: {},\n additionalProperties: true,\n allowTrailingCommas: true,\n allowComments: true\n };\n this.configurationProperties = {};\n this.policyConfigurations = new Map();\n this.excludedConfigurationProperties = {};\n contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);\n this.registerOverridePropertyPatternKey();\n }\n registerConfiguration(configuration, validate = true) {\n this.registerConfigurations([configuration], validate);\n }\n registerConfigurations(configurations, validate = true) {\n const properties = new Set();\n this.doRegisterConfigurations(configurations, validate, properties);\n contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);\n this._onDidSchemaChange.fire();\n this._onDidUpdateConfiguration.fire({ properties });\n }\n registerDefaultConfigurations(configurationDefaults) {\n const properties = new Set();\n this.doRegisterDefaultConfigurations(configurationDefaults, properties);\n this._onDidSchemaChange.fire();\n this._onDidUpdateConfiguration.fire({ properties, defaultsOverrides: true });\n }\n doRegisterDefaultConfigurations(configurationDefaults, bucket) {\n var _a;\n const overrideIdentifiers = [];\n for (const { overrides, source } of configurationDefaults) {\n for (const key in overrides) {\n bucket.add(key);\n if (OVERRIDE_PROPERTY_REGEX.test(key)) {\n const configurationDefaultOverride = this.configurationDefaultsOverrides.get(key);\n const valuesSources = (_a = configurationDefaultOverride === null || configurationDefaultOverride === void 0 ? void 0 : configurationDefaultOverride.valuesSources) !== null && _a !== void 0 ? _a : new Map();\n if (source) {\n for (const configuration of Object.keys(overrides[key])) {\n valuesSources.set(configuration, source);\n }\n }\n const defaultValue = { ...((configurationDefaultOverride === null || configurationDefaultOverride === void 0 ? void 0 : configurationDefaultOverride.value) || {}), ...overrides[key] };\n this.configurationDefaultsOverrides.set(key, { source, value: defaultValue, valuesSources });\n const plainKey = getLanguageTagSettingPlainKey(key);\n const property = {\n type: 'object',\n default: defaultValue,\n description: nls.localize('defaultLanguageConfiguration.description', \"Configure settings to be overridden for the {0} language.\", plainKey),\n $ref: resourceLanguageSettingsSchemaId,\n defaultDefaultValue: defaultValue,\n source: types.isString(source) ? undefined : source,\n defaultValueSource: source\n };\n overrideIdentifiers.push(...overrideIdentifiersFromKey(key));\n this.configurationProperties[key] = property;\n this.defaultLanguageConfigurationOverridesNode.properties[key] = property;\n }\n else {\n this.configurationDefaultsOverrides.set(key, { value: overrides[key], source });\n const property = this.configurationProperties[key];\n if (property) {\n this.updatePropertyDefaultValue(key, property);\n this.updateSchema(key, property);\n }\n }\n }\n }\n this.doRegisterOverrideIdentifiers(overrideIdentifiers);\n }\n registerOverrideIdentifiers(overrideIdentifiers) {\n this.doRegisterOverrideIdentifiers(overrideIdentifiers);\n this._onDidSchemaChange.fire();\n }\n doRegisterOverrideIdentifiers(overrideIdentifiers) {\n for (const overrideIdentifier of overrideIdentifiers) {\n this.overrideIdentifiers.add(overrideIdentifier);\n }\n this.updateOverridePropertyPatternKey();\n }\n doRegisterConfigurations(configurations, validate, bucket) {\n configurations.forEach(configuration => {\n this.validateAndRegisterProperties(configuration, validate, configuration.extensionInfo, configuration.restrictedProperties, undefined, bucket);\n this.configurationContributors.push(configuration);\n this.registerJSONConfiguration(configuration);\n });\n }\n validateAndRegisterProperties(configuration, validate = true, extensionInfo, restrictedProperties, scope = 3 /* ConfigurationScope.WINDOW */, bucket) {\n var _a;\n scope = types.isUndefinedOrNull(configuration.scope) ? scope : configuration.scope;\n const properties = configuration.properties;\n if (properties) {\n for (const key in properties) {\n const property = properties[key];\n if (validate && validateProperty(key, property)) {\n delete properties[key];\n continue;\n }\n property.source = extensionInfo;\n // update default value\n property.defaultDefaultValue = properties[key].default;\n this.updatePropertyDefaultValue(key, property);\n // update scope\n if (OVERRIDE_PROPERTY_REGEX.test(key)) {\n property.scope = undefined; // No scope for overridable properties `[${identifier}]`\n }\n else {\n property.scope = types.isUndefinedOrNull(property.scope) ? scope : property.scope;\n property.restricted = types.isUndefinedOrNull(property.restricted) ? !!(restrictedProperties === null || restrictedProperties === void 0 ? void 0 : restrictedProperties.includes(key)) : property.restricted;\n }\n // Add to properties maps\n // Property is included by default if 'included' is unspecified\n if (properties[key].hasOwnProperty('included') && !properties[key].included) {\n this.excludedConfigurationProperties[key] = properties[key];\n delete properties[key];\n continue;\n }\n else {\n this.configurationProperties[key] = properties[key];\n if ((_a = properties[key].policy) === null || _a === void 0 ? void 0 : _a.name) {\n this.policyConfigurations.set(properties[key].policy.name, key);\n }\n }\n if (!properties[key].deprecationMessage && properties[key].markdownDeprecationMessage) {\n // If not set, default deprecationMessage to the markdown source\n properties[key].deprecationMessage = properties[key].markdownDeprecationMessage;\n }\n bucket.add(key);\n }\n }\n const subNodes = configuration.allOf;\n if (subNodes) {\n for (const node of subNodes) {\n this.validateAndRegisterProperties(node, validate, extensionInfo, restrictedProperties, scope, bucket);\n }\n }\n }\n getConfigurationProperties() {\n return this.configurationProperties;\n }\n getPolicyConfigurations() {\n return this.policyConfigurations;\n }\n registerJSONConfiguration(configuration) {\n const register = (configuration) => {\n const properties = configuration.properties;\n if (properties) {\n for (const key in properties) {\n this.updateSchema(key, properties[key]);\n }\n }\n const subNodes = configuration.allOf;\n subNodes === null || subNodes === void 0 ? void 0 : subNodes.forEach(register);\n };\n register(configuration);\n }\n updateSchema(key, property) {\n allSettings.properties[key] = property;\n switch (property.scope) {\n case 1 /* ConfigurationScope.APPLICATION */:\n applicationSettings.properties[key] = property;\n break;\n case 2 /* ConfigurationScope.MACHINE */:\n machineSettings.properties[key] = property;\n break;\n case 6 /* ConfigurationScope.MACHINE_OVERRIDABLE */:\n machineOverridableSettings.properties[key] = property;\n break;\n case 3 /* ConfigurationScope.WINDOW */:\n windowSettings.properties[key] = property;\n break;\n case 4 /* ConfigurationScope.RESOURCE */:\n resourceSettings.properties[key] = property;\n break;\n case 5 /* ConfigurationScope.LANGUAGE_OVERRIDABLE */:\n resourceSettings.properties[key] = property;\n this.resourceLanguageSettingsSchema.properties[key] = property;\n break;\n }\n }\n updateOverridePropertyPatternKey() {\n for (const overrideIdentifier of this.overrideIdentifiers.values()) {\n const overrideIdentifierProperty = `[${overrideIdentifier}]`;\n const resourceLanguagePropertiesSchema = {\n type: 'object',\n description: nls.localize('overrideSettings.defaultDescription', \"Configure editor settings to be overridden for a language.\"),\n errorMessage: nls.localize('overrideSettings.errorMessage', \"This setting does not support per-language configuration.\"),\n $ref: resourceLanguageSettingsSchemaId,\n };\n this.updatePropertyDefaultValue(overrideIdentifierProperty, resourceLanguagePropertiesSchema);\n allSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n applicationSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n machineSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n machineOverridableSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n windowSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n resourceSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n }\n }\n registerOverridePropertyPatternKey() {\n const resourceLanguagePropertiesSchema = {\n type: 'object',\n description: nls.localize('overrideSettings.defaultDescription', \"Configure editor settings to be overridden for a language.\"),\n errorMessage: nls.localize('overrideSettings.errorMessage', \"This setting does not support per-language configuration.\"),\n $ref: resourceLanguageSettingsSchemaId,\n };\n allSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n applicationSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n machineSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n machineOverridableSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n windowSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n resourceSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n this._onDidSchemaChange.fire();\n }\n updatePropertyDefaultValue(key, property) {\n const configurationdefaultOverride = this.configurationDefaultsOverrides.get(key);\n let defaultValue = configurationdefaultOverride === null || configurationdefaultOverride === void 0 ? void 0 : configurationdefaultOverride.value;\n let defaultSource = configurationdefaultOverride === null || configurationdefaultOverride === void 0 ? void 0 : configurationdefaultOverride.source;\n if (types.isUndefined(defaultValue)) {\n defaultValue = property.defaultDefaultValue;\n defaultSource = undefined;\n }\n if (types.isUndefined(defaultValue)) {\n defaultValue = getDefaultValue(property.type);\n }\n property.default = defaultValue;\n property.defaultValueSource = defaultSource;\n }\n}\nconst OVERRIDE_IDENTIFIER_PATTERN = `\\\\[([^\\\\]]+)\\\\]`;\nconst OVERRIDE_IDENTIFIER_REGEX = new RegExp(OVERRIDE_IDENTIFIER_PATTERN, 'g');\nexport const OVERRIDE_PROPERTY_PATTERN = `^(${OVERRIDE_IDENTIFIER_PATTERN})+$`;\nexport const OVERRIDE_PROPERTY_REGEX = new RegExp(OVERRIDE_PROPERTY_PATTERN);\nexport function overrideIdentifiersFromKey(key) {\n const identifiers = [];\n if (OVERRIDE_PROPERTY_REGEX.test(key)) {\n let matches = OVERRIDE_IDENTIFIER_REGEX.exec(key);\n while (matches === null || matches === void 0 ? void 0 : matches.length) {\n const identifier = matches[1].trim();\n if (identifier) {\n identifiers.push(identifier);\n }\n matches = OVERRIDE_IDENTIFIER_REGEX.exec(key);\n }\n }\n return distinct(identifiers);\n}\nexport function getDefaultValue(type) {\n const t = Array.isArray(type) ? type[0] : type;\n switch (t) {\n case 'boolean':\n return false;\n case 'integer':\n case 'number':\n return 0;\n case 'string':\n return '';\n case 'array':\n return [];\n case 'object':\n return {};\n default:\n return null;\n }\n}\nconst configurationRegistry = new ConfigurationRegistry();\nRegistry.add(Extensions.Configuration, configurationRegistry);\nexport function validateProperty(property, schema) {\n var _a, _b, _c, _d;\n if (!property.trim()) {\n return nls.localize('config.property.empty', \"Cannot register an empty property\");\n }\n if (OVERRIDE_PROPERTY_REGEX.test(property)) {\n return nls.localize('config.property.languageDefault', \"Cannot register '{0}'. This matches property pattern '\\\\\\\\[.*\\\\\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.\", property);\n }\n if (configurationRegistry.getConfigurationProperties()[property] !== undefined) {\n return nls.localize('config.property.duplicate', \"Cannot register '{0}'. This property is already registered.\", property);\n }\n if (((_a = schema.policy) === null || _a === void 0 ? void 0 : _a.name) && configurationRegistry.getPolicyConfigurations().get((_b = schema.policy) === null || _b === void 0 ? void 0 : _b.name) !== undefined) {\n return nls.localize('config.policy.duplicate', \"Cannot register '{0}'. The associated policy {1} is already registered with {2}.\", property, (_c = schema.policy) === null || _c === void 0 ? void 0 : _c.name, configurationRegistry.getPolicyConfigurations().get((_d = schema.policy) === null || _d === void 0 ? void 0 : _d.name));\n }\n return null;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as nls from '../../../nls.js';\nimport { Emitter } from '../../../base/common/event.js';\nimport { Registry } from '../../../platform/registry/common/platform.js';\nimport { Mimes } from '../../../base/common/mime.js';\nimport { Extensions as ConfigurationExtensions } from '../../../platform/configuration/common/configurationRegistry.js';\n// Define extension point ids\nexport const Extensions = {\n ModesRegistry: 'editor.modesRegistry'\n};\nexport class EditorModesRegistry {\n constructor() {\n this._onDidChangeLanguages = new Emitter();\n this.onDidChangeLanguages = this._onDidChangeLanguages.event;\n this._languages = [];\n }\n registerLanguage(def) {\n this._languages.push(def);\n this._onDidChangeLanguages.fire(undefined);\n return {\n dispose: () => {\n for (let i = 0, len = this._languages.length; i < len; i++) {\n if (this._languages[i] === def) {\n this._languages.splice(i, 1);\n return;\n }\n }\n }\n };\n }\n getLanguages() {\n return this._languages;\n }\n}\nexport const ModesRegistry = new EditorModesRegistry();\nRegistry.add(Extensions.ModesRegistry, ModesRegistry);\nexport const PLAINTEXT_LANGUAGE_ID = 'plaintext';\nexport const PLAINTEXT_EXTENSION = '.txt';\nModesRegistry.registerLanguage({\n id: PLAINTEXT_LANGUAGE_ID,\n extensions: [PLAINTEXT_EXTENSION],\n aliases: [nls.localize('plainText.alias', \"Plain Text\"), 'text'],\n mimetypes: [Mimes.text]\n});\nRegistry.as(ConfigurationExtensions.Configuration)\n .registerDefaultConfigurations([{\n overrides: {\n '[plaintext]': {\n 'editor.unicodeHighlight.ambiguousCharacters': false,\n 'editor.unicodeHighlight.invisibleCharacters': false\n }\n }\n }]);\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { CachedFunction } from '../../../../base/common/cache.js';\n/**\n * Captures all bracket related configurations for a single language.\n * Immutable.\n*/\nexport class LanguageBracketsConfiguration {\n constructor(languageId, config) {\n this.languageId = languageId;\n const bracketPairs = config.brackets ? filterValidBrackets(config.brackets) : [];\n const openingBracketInfos = new CachedFunction((bracket) => {\n const closing = new Set();\n return {\n info: new OpeningBracketKind(this, bracket, closing),\n closing,\n };\n });\n const closingBracketInfos = new CachedFunction((bracket) => {\n const opening = new Set();\n const openingColorized = new Set();\n return {\n info: new ClosingBracketKind(this, bracket, opening, openingColorized),\n opening,\n openingColorized,\n };\n });\n for (const [open, close] of bracketPairs) {\n const opening = openingBracketInfos.get(open);\n const closing = closingBracketInfos.get(close);\n opening.closing.add(closing.info);\n closing.opening.add(opening.info);\n }\n // Treat colorized brackets as brackets, and mark them as colorized.\n const colorizedBracketPairs = config.colorizedBracketPairs\n ? filterValidBrackets(config.colorizedBracketPairs)\n // If not configured: Take all brackets except `<` ... `>`\n // Many languages set < ... > as bracket pair, even though they also use it as comparison operator.\n // This leads to problems when colorizing this bracket, so we exclude it if not explicitly configured otherwise.\n // https://github.com/microsoft/vscode/issues/132476\n : bracketPairs.filter((p) => !(p[0] === '<' && p[1] === '>'));\n for (const [open, close] of colorizedBracketPairs) {\n const opening = openingBracketInfos.get(open);\n const closing = closingBracketInfos.get(close);\n opening.closing.add(closing.info);\n closing.openingColorized.add(opening.info);\n closing.opening.add(opening.info);\n }\n this._openingBrackets = new Map([...openingBracketInfos.cachedValues].map(([k, v]) => [k, v.info]));\n this._closingBrackets = new Map([...closingBracketInfos.cachedValues].map(([k, v]) => [k, v.info]));\n }\n /**\n * No two brackets have the same bracket text.\n */\n get openingBrackets() {\n return [...this._openingBrackets.values()];\n }\n /**\n * No two brackets have the same bracket text.\n */\n get closingBrackets() {\n return [...this._closingBrackets.values()];\n }\n getOpeningBracketInfo(bracketText) {\n return this._openingBrackets.get(bracketText);\n }\n getClosingBracketInfo(bracketText) {\n return this._closingBrackets.get(bracketText);\n }\n getBracketInfo(bracketText) {\n return this.getOpeningBracketInfo(bracketText) || this.getClosingBracketInfo(bracketText);\n }\n}\nfunction filterValidBrackets(bracketPairs) {\n return bracketPairs.filter(([open, close]) => open !== '' && close !== '');\n}\nexport class BracketKindBase {\n constructor(config, bracketText) {\n this.config = config;\n this.bracketText = bracketText;\n }\n get languageId() {\n return this.config.languageId;\n }\n}\nexport class OpeningBracketKind extends BracketKindBase {\n constructor(config, bracketText, openedBrackets) {\n super(config, bracketText);\n this.openedBrackets = openedBrackets;\n this.isOpeningBracket = true;\n }\n}\nexport class ClosingBracketKind extends BracketKindBase {\n constructor(config, bracketText, \n /**\n * Non empty array of all opening brackets this bracket closes.\n */\n openingBrackets, openingColorizedBrackets) {\n super(config, bracketText);\n this.openingBrackets = openingBrackets;\n this.openingColorizedBrackets = openingColorizedBrackets;\n this.isOpeningBracket = false;\n }\n /**\n * Checks if this bracket closes the given other bracket.\n * If the bracket infos come from different configurations, this method will return false.\n */\n closes(other) {\n if (other['config'] !== this.config) {\n return false;\n }\n return this.openingBrackets.has(other);\n }\n closesColorized(other) {\n if (other['config'] !== this.config) {\n return false;\n }\n return this.openingColorizedBrackets.has(other);\n }\n getOpeningBrackets() {\n return [...this.openingBrackets];\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { Emitter } from '../../../base/common/event.js';\nimport { Disposable, toDisposable } from '../../../base/common/lifecycle.js';\nimport * as strings from '../../../base/common/strings.js';\nimport { DEFAULT_WORD_REGEXP, ensureValidWordDefinition } from '../core/wordHelper.js';\nimport { AutoClosingPairs } from './languageConfiguration.js';\nimport { createScopedLineTokens } from './supports.js';\nimport { CharacterPairSupport } from './supports/characterPair.js';\nimport { BracketElectricCharacterSupport } from './supports/electricCharacter.js';\nimport { IndentRulesSupport } from './supports/indentRules.js';\nimport { OnEnterSupport } from './supports/onEnter.js';\nimport { RichEditBrackets } from './supports/richEditBrackets.js';\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation.js';\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration.js';\nimport { ILanguageService } from './language.js';\nimport { registerSingleton } from '../../../platform/instantiation/common/extensions.js';\nimport { PLAINTEXT_LANGUAGE_ID } from './modesRegistry.js';\nimport { LanguageBracketsConfiguration } from './supports/languageBracketsConfiguration.js';\nexport class LanguageConfigurationServiceChangeEvent {\n constructor(languageId) {\n this.languageId = languageId;\n }\n affects(languageId) {\n return !this.languageId ? true : this.languageId === languageId;\n }\n}\nexport const ILanguageConfigurationService = createDecorator('languageConfigurationService');\nlet LanguageConfigurationService = class LanguageConfigurationService extends Disposable {\n constructor(configurationService, languageService) {\n super();\n this.configurationService = configurationService;\n this.languageService = languageService;\n this._registry = this._register(new LanguageConfigurationRegistry());\n this.onDidChangeEmitter = this._register(new Emitter());\n this.onDidChange = this.onDidChangeEmitter.event;\n this.configurations = new Map();\n const languageConfigKeys = new Set(Object.values(customizedLanguageConfigKeys));\n this._register(this.configurationService.onDidChangeConfiguration((e) => {\n const globalConfigChanged = e.change.keys.some((k) => languageConfigKeys.has(k));\n const localConfigChanged = e.change.overrides\n .filter(([overrideLangName, keys]) => keys.some((k) => languageConfigKeys.has(k)))\n .map(([overrideLangName]) => overrideLangName);\n if (globalConfigChanged) {\n this.configurations.clear();\n this.onDidChangeEmitter.fire(new LanguageConfigurationServiceChangeEvent(undefined));\n }\n else {\n for (const languageId of localConfigChanged) {\n if (this.languageService.isRegisteredLanguageId(languageId)) {\n this.configurations.delete(languageId);\n this.onDidChangeEmitter.fire(new LanguageConfigurationServiceChangeEvent(languageId));\n }\n }\n }\n }));\n this._register(this._registry.onDidChange((e) => {\n this.configurations.delete(e.languageId);\n this.onDidChangeEmitter.fire(new LanguageConfigurationServiceChangeEvent(e.languageId));\n }));\n }\n register(languageId, configuration, priority) {\n return this._registry.register(languageId, configuration, priority);\n }\n getLanguageConfiguration(languageId) {\n let result = this.configurations.get(languageId);\n if (!result) {\n result = computeConfig(languageId, this._registry, this.configurationService, this.languageService);\n this.configurations.set(languageId, result);\n }\n return result;\n }\n};\nLanguageConfigurationService = __decorate([\n __param(0, IConfigurationService),\n __param(1, ILanguageService)\n], LanguageConfigurationService);\nexport { LanguageConfigurationService };\nfunction computeConfig(languageId, registry, configurationService, languageService) {\n let languageConfig = registry.getLanguageConfiguration(languageId);\n if (!languageConfig) {\n if (!languageService.isRegisteredLanguageId(languageId)) {\n // this happens for the null language, which can be returned by monarch.\n // Instead of throwing an error, we just return a default config.\n return new ResolvedLanguageConfiguration(languageId, {});\n }\n languageConfig = new ResolvedLanguageConfiguration(languageId, {});\n }\n const customizedConfig = getCustomizedLanguageConfig(languageConfig.languageId, configurationService);\n const data = combineLanguageConfigurations([languageConfig.underlyingConfig, customizedConfig]);\n const config = new ResolvedLanguageConfiguration(languageConfig.languageId, data);\n return config;\n}\nconst customizedLanguageConfigKeys = {\n brackets: 'editor.language.brackets',\n colorizedBracketPairs: 'editor.language.colorizedBracketPairs'\n};\nfunction getCustomizedLanguageConfig(languageId, configurationService) {\n const brackets = configurationService.getValue(customizedLanguageConfigKeys.brackets, {\n overrideIdentifier: languageId,\n });\n const colorizedBracketPairs = configurationService.getValue(customizedLanguageConfigKeys.colorizedBracketPairs, {\n overrideIdentifier: languageId,\n });\n return {\n brackets: validateBracketPairs(brackets),\n colorizedBracketPairs: validateBracketPairs(colorizedBracketPairs),\n };\n}\nfunction validateBracketPairs(data) {\n if (!Array.isArray(data)) {\n return undefined;\n }\n return data.map(pair => {\n if (!Array.isArray(pair) || pair.length !== 2) {\n return undefined;\n }\n return [pair[0], pair[1]];\n }).filter((p) => !!p);\n}\nexport function getIndentationAtPosition(model, lineNumber, column) {\n const lineText = model.getLineContent(lineNumber);\n let indentation = strings.getLeadingWhitespace(lineText);\n if (indentation.length > column - 1) {\n indentation = indentation.substring(0, column - 1);\n }\n return indentation;\n}\nexport function getScopedLineTokens(model, lineNumber, columnNumber) {\n model.tokenization.forceTokenization(lineNumber);\n const lineTokens = model.tokenization.getLineTokens(lineNumber);\n const column = (typeof columnNumber === 'undefined' ? model.getLineMaxColumn(lineNumber) - 1 : columnNumber - 1);\n return createScopedLineTokens(lineTokens, column);\n}\nclass ComposedLanguageConfiguration {\n constructor(languageId) {\n this.languageId = languageId;\n this._resolved = null;\n this._entries = [];\n this._order = 0;\n this._resolved = null;\n }\n register(configuration, priority) {\n const entry = new LanguageConfigurationContribution(configuration, priority, ++this._order);\n this._entries.push(entry);\n this._resolved = null;\n return toDisposable(() => {\n for (let i = 0; i < this._entries.length; i++) {\n if (this._entries[i] === entry) {\n this._entries.splice(i, 1);\n this._resolved = null;\n break;\n }\n }\n });\n }\n getResolvedConfiguration() {\n if (!this._resolved) {\n const config = this._resolve();\n if (config) {\n this._resolved = new ResolvedLanguageConfiguration(this.languageId, config);\n }\n }\n return this._resolved;\n }\n _resolve() {\n if (this._entries.length === 0) {\n return null;\n }\n this._entries.sort(LanguageConfigurationContribution.cmp);\n return combineLanguageConfigurations(this._entries.map(e => e.configuration));\n }\n}\nfunction combineLanguageConfigurations(configs) {\n let result = {\n comments: undefined,\n brackets: undefined,\n wordPattern: undefined,\n indentationRules: undefined,\n onEnterRules: undefined,\n autoClosingPairs: undefined,\n surroundingPairs: undefined,\n autoCloseBefore: undefined,\n folding: undefined,\n colorizedBracketPairs: undefined,\n __electricCharacterSupport: undefined,\n };\n for (const entry of configs) {\n result = {\n comments: entry.comments || result.comments,\n brackets: entry.brackets || result.brackets,\n wordPattern: entry.wordPattern || result.wordPattern,\n indentationRules: entry.indentationRules || result.indentationRules,\n onEnterRules: entry.onEnterRules || result.onEnterRules,\n autoClosingPairs: entry.autoClosingPairs || result.autoClosingPairs,\n surroundingPairs: entry.surroundingPairs || result.surroundingPairs,\n autoCloseBefore: entry.autoCloseBefore || result.autoCloseBefore,\n folding: entry.folding || result.folding,\n colorizedBracketPairs: entry.colorizedBracketPairs || result.colorizedBracketPairs,\n __electricCharacterSupport: entry.__electricCharacterSupport || result.__electricCharacterSupport,\n };\n }\n return result;\n}\nclass LanguageConfigurationContribution {\n constructor(configuration, priority, order) {\n this.configuration = configuration;\n this.priority = priority;\n this.order = order;\n }\n static cmp(a, b) {\n if (a.priority === b.priority) {\n // higher order last\n return a.order - b.order;\n }\n // higher priority last\n return a.priority - b.priority;\n }\n}\nexport class LanguageConfigurationChangeEvent {\n constructor(languageId) {\n this.languageId = languageId;\n }\n}\nexport class LanguageConfigurationRegistry extends Disposable {\n constructor() {\n super();\n this._entries = new Map();\n this._onDidChange = this._register(new Emitter());\n this.onDidChange = this._onDidChange.event;\n this._register(this.register(PLAINTEXT_LANGUAGE_ID, {\n brackets: [\n ['(', ')'],\n ['[', ']'],\n ['{', '}'],\n ],\n surroundingPairs: [\n { open: '{', close: '}' },\n { open: '[', close: ']' },\n { open: '(', close: ')' },\n { open: '<', close: '>' },\n { open: '\\\"', close: '\\\"' },\n { open: '\\'', close: '\\'' },\n { open: '`', close: '`' },\n ],\n colorizedBracketPairs: [],\n folding: {\n offSide: true\n }\n }, 0));\n }\n /**\n * @param priority Use a higher number for higher priority\n */\n register(languageId, configuration, priority = 0) {\n let entries = this._entries.get(languageId);\n if (!entries) {\n entries = new ComposedLanguageConfiguration(languageId);\n this._entries.set(languageId, entries);\n }\n const disposable = entries.register(configuration, priority);\n this._onDidChange.fire(new LanguageConfigurationChangeEvent(languageId));\n return toDisposable(() => {\n disposable.dispose();\n this._onDidChange.fire(new LanguageConfigurationChangeEvent(languageId));\n });\n }\n getLanguageConfiguration(languageId) {\n const entries = this._entries.get(languageId);\n return (entries === null || entries === void 0 ? void 0 : entries.getResolvedConfiguration()) || null;\n }\n}\n/**\n * Immutable.\n*/\nexport class ResolvedLanguageConfiguration {\n constructor(languageId, underlyingConfig) {\n this.languageId = languageId;\n this.underlyingConfig = underlyingConfig;\n this._brackets = null;\n this._electricCharacter = null;\n this._onEnterSupport =\n this.underlyingConfig.brackets ||\n this.underlyingConfig.indentationRules ||\n this.underlyingConfig.onEnterRules\n ? new OnEnterSupport(this.underlyingConfig)\n : null;\n this.comments = ResolvedLanguageConfiguration._handleComments(this.underlyingConfig);\n this.characterPair = new CharacterPairSupport(this.underlyingConfig);\n this.wordDefinition = this.underlyingConfig.wordPattern || DEFAULT_WORD_REGEXP;\n this.indentationRules = this.underlyingConfig.indentationRules;\n if (this.underlyingConfig.indentationRules) {\n this.indentRulesSupport = new IndentRulesSupport(this.underlyingConfig.indentationRules);\n }\n else {\n this.indentRulesSupport = null;\n }\n this.foldingRules = this.underlyingConfig.folding || {};\n this.bracketsNew = new LanguageBracketsConfiguration(languageId, this.underlyingConfig);\n }\n getWordDefinition() {\n return ensureValidWordDefinition(this.wordDefinition);\n }\n get brackets() {\n if (!this._brackets && this.underlyingConfig.brackets) {\n this._brackets = new RichEditBrackets(this.languageId, this.underlyingConfig.brackets);\n }\n return this._brackets;\n }\n get electricCharacter() {\n if (!this._electricCharacter) {\n this._electricCharacter = new BracketElectricCharacterSupport(this.brackets);\n }\n return this._electricCharacter;\n }\n onEnter(autoIndent, previousLineText, beforeEnterText, afterEnterText) {\n if (!this._onEnterSupport) {\n return null;\n }\n return this._onEnterSupport.onEnter(autoIndent, previousLineText, beforeEnterText, afterEnterText);\n }\n getAutoClosingPairs() {\n return new AutoClosingPairs(this.characterPair.getAutoClosingPairs());\n }\n getAutoCloseBeforeSet(forQuotes) {\n return this.characterPair.getAutoCloseBeforeSet(forQuotes);\n }\n getSurroundingPairs() {\n return this.characterPair.getSurroundingPairs();\n }\n static _handleComments(conf) {\n const commentRule = conf.comments;\n if (!commentRule) {\n return null;\n }\n // comment configuration\n const comments = {};\n if (commentRule.lineComment) {\n comments.lineCommentToken = commentRule.lineComment;\n }\n if (commentRule.blockComment) {\n const [blockStart, blockEnd] = commentRule.blockComment;\n comments.blockCommentStartToken = blockStart;\n comments.blockCommentEndToken = blockEnd;\n }\n return comments;\n }\n}\nregisterSingleton(ILanguageConfigurationService, LanguageConfigurationService, 1 /* InstantiationType.Delayed */);\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/**\n * Represents information about a specific difference between two sequences.\n */\nexport class DiffChange {\n /**\n * Constructs a new DiffChange with the given sequence information\n * and content.\n */\n constructor(originalStart, originalLength, modifiedStart, modifiedLength) {\n //Debug.Assert(originalLength > 0 || modifiedLength > 0, \"originalLength and modifiedLength cannot both be <= 0\");\n this.originalStart = originalStart;\n this.originalLength = originalLength;\n this.modifiedStart = modifiedStart;\n this.modifiedLength = modifiedLength;\n }\n /**\n * The end point (exclusive) of the change in the original sequence.\n */\n getOriginalEnd() {\n return this.originalStart + this.originalLength;\n }\n /**\n * The end point (exclusive) of the change in the modified sequence.\n */\n getModifiedEnd() {\n return this.modifiedStart + this.modifiedLength;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { DiffChange } from './diffChange.js';\nimport { stringHash } from '../hash.js';\nexport class StringDiffSequence {\n constructor(source) {\n this.source = source;\n }\n getElements() {\n const source = this.source;\n const characters = new Int32Array(source.length);\n for (let i = 0, len = source.length; i < len; i++) {\n characters[i] = source.charCodeAt(i);\n }\n return characters;\n }\n}\nexport function stringDiff(original, modified, pretty) {\n return new LcsDiff(new StringDiffSequence(original), new StringDiffSequence(modified)).ComputeDiff(pretty).changes;\n}\n//\n// The code below has been ported from a C# implementation in VS\n//\nclass Debug {\n static Assert(condition, message) {\n if (!condition) {\n throw new Error(message);\n }\n }\n}\nclass MyArray {\n /**\n * Copies a range of elements from an Array starting at the specified source index and pastes\n * them to another Array starting at the specified destination index. The length and the indexes\n * are specified as 64-bit integers.\n * sourceArray:\n *\t\tThe Array that contains the data to copy.\n * sourceIndex:\n *\t\tA 64-bit integer that represents the index in the sourceArray at which copying begins.\n * destinationArray:\n *\t\tThe Array that receives the data.\n * destinationIndex:\n *\t\tA 64-bit integer that represents the index in the destinationArray at which storing begins.\n * length:\n *\t\tA 64-bit integer that represents the number of elements to copy.\n */\n static Copy(sourceArray, sourceIndex, destinationArray, destinationIndex, length) {\n for (let i = 0; i < length; i++) {\n destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i];\n }\n }\n static Copy2(sourceArray, sourceIndex, destinationArray, destinationIndex, length) {\n for (let i = 0; i < length; i++) {\n destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i];\n }\n }\n}\n/**\n * A utility class which helps to create the set of DiffChanges from\n * a difference operation. This class accepts original DiffElements and\n * modified DiffElements that are involved in a particular change. The\n * MarkNextChange() method can be called to mark the separation between\n * distinct changes. At the end, the Changes property can be called to retrieve\n * the constructed changes.\n */\nclass DiffChangeHelper {\n /**\n * Constructs a new DiffChangeHelper for the given DiffSequences.\n */\n constructor() {\n this.m_changes = [];\n this.m_originalStart = 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */;\n this.m_modifiedStart = 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */;\n this.m_originalCount = 0;\n this.m_modifiedCount = 0;\n }\n /**\n * Marks the beginning of the next change in the set of differences.\n */\n MarkNextChange() {\n // Only add to the list if there is something to add\n if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {\n // Add the new change to our list\n this.m_changes.push(new DiffChange(this.m_originalStart, this.m_originalCount, this.m_modifiedStart, this.m_modifiedCount));\n }\n // Reset for the next change\n this.m_originalCount = 0;\n this.m_modifiedCount = 0;\n this.m_originalStart = 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */;\n this.m_modifiedStart = 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */;\n }\n /**\n * Adds the original element at the given position to the elements\n * affected by the current change. The modified index gives context\n * to the change position with respect to the original sequence.\n * @param originalIndex The index of the original element to add.\n * @param modifiedIndex The index of the modified element that provides corresponding position in the modified sequence.\n */\n AddOriginalElement(originalIndex, modifiedIndex) {\n // The 'true' start index is the smallest of the ones we've seen\n this.m_originalStart = Math.min(this.m_originalStart, originalIndex);\n this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex);\n this.m_originalCount++;\n }\n /**\n * Adds the modified element at the given position to the elements\n * affected by the current change. The original index gives context\n * to the change position with respect to the modified sequence.\n * @param originalIndex The index of the original element that provides corresponding position in the original sequence.\n * @param modifiedIndex The index of the modified element to add.\n */\n AddModifiedElement(originalIndex, modifiedIndex) {\n // The 'true' start index is the smallest of the ones we've seen\n this.m_originalStart = Math.min(this.m_originalStart, originalIndex);\n this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex);\n this.m_modifiedCount++;\n }\n /**\n * Retrieves all of the changes marked by the class.\n */\n getChanges() {\n if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {\n // Finish up on whatever is left\n this.MarkNextChange();\n }\n return this.m_changes;\n }\n /**\n * Retrieves all of the changes marked by the class in the reverse order\n */\n getReverseChanges() {\n if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {\n // Finish up on whatever is left\n this.MarkNextChange();\n }\n this.m_changes.reverse();\n return this.m_changes;\n }\n}\n/**\n * An implementation of the difference algorithm described in\n * \"An O(ND) Difference Algorithm and its variations\" by Eugene W. Myers\n */\nexport class LcsDiff {\n /**\n * Constructs the DiffFinder\n */\n constructor(originalSequence, modifiedSequence, continueProcessingPredicate = null) {\n this.ContinueProcessingPredicate = continueProcessingPredicate;\n this._originalSequence = originalSequence;\n this._modifiedSequence = modifiedSequence;\n const [originalStringElements, originalElementsOrHash, originalHasStrings] = LcsDiff._getElements(originalSequence);\n const [modifiedStringElements, modifiedElementsOrHash, modifiedHasStrings] = LcsDiff._getElements(modifiedSequence);\n this._hasStrings = (originalHasStrings && modifiedHasStrings);\n this._originalStringElements = originalStringElements;\n this._originalElementsOrHash = originalElementsOrHash;\n this._modifiedStringElements = modifiedStringElements;\n this._modifiedElementsOrHash = modifiedElementsOrHash;\n this.m_forwardHistory = [];\n this.m_reverseHistory = [];\n }\n static _isStringArray(arr) {\n return (arr.length > 0 && typeof arr[0] === 'string');\n }\n static _getElements(sequence) {\n const elements = sequence.getElements();\n if (LcsDiff._isStringArray(elements)) {\n const hashes = new Int32Array(elements.length);\n for (let i = 0, len = elements.length; i < len; i++) {\n hashes[i] = stringHash(elements[i], 0);\n }\n return [elements, hashes, true];\n }\n if (elements instanceof Int32Array) {\n return [[], elements, false];\n }\n return [[], new Int32Array(elements), false];\n }\n ElementsAreEqual(originalIndex, newIndex) {\n if (this._originalElementsOrHash[originalIndex] !== this._modifiedElementsOrHash[newIndex]) {\n return false;\n }\n return (this._hasStrings ? this._originalStringElements[originalIndex] === this._modifiedStringElements[newIndex] : true);\n }\n ElementsAreStrictEqual(originalIndex, newIndex) {\n if (!this.ElementsAreEqual(originalIndex, newIndex)) {\n return false;\n }\n const originalElement = LcsDiff._getStrictElement(this._originalSequence, originalIndex);\n const modifiedElement = LcsDiff._getStrictElement(this._modifiedSequence, newIndex);\n return (originalElement === modifiedElement);\n }\n static _getStrictElement(sequence, index) {\n if (typeof sequence.getStrictElement === 'function') {\n return sequence.getStrictElement(index);\n }\n return null;\n }\n OriginalElementsAreEqual(index1, index2) {\n if (this._originalElementsOrHash[index1] !== this._originalElementsOrHash[index2]) {\n return false;\n }\n return (this._hasStrings ? this._originalStringElements[index1] === this._originalStringElements[index2] : true);\n }\n ModifiedElementsAreEqual(index1, index2) {\n if (this._modifiedElementsOrHash[index1] !== this._modifiedElementsOrHash[index2]) {\n return false;\n }\n return (this._hasStrings ? this._modifiedStringElements[index1] === this._modifiedStringElements[index2] : true);\n }\n ComputeDiff(pretty) {\n return this._ComputeDiff(0, this._originalElementsOrHash.length - 1, 0, this._modifiedElementsOrHash.length - 1, pretty);\n }\n /**\n * Computes the differences between the original and modified input\n * sequences on the bounded range.\n * @returns An array of the differences between the two input sequences.\n */\n _ComputeDiff(originalStart, originalEnd, modifiedStart, modifiedEnd, pretty) {\n const quitEarlyArr = [false];\n let changes = this.ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr);\n if (pretty) {\n // We have to clean up the computed diff to be more intuitive\n // but it turns out this cannot be done correctly until the entire set\n // of diffs have been computed\n changes = this.PrettifyChanges(changes);\n }\n return {\n quitEarly: quitEarlyArr[0],\n changes: changes\n };\n }\n /**\n * Private helper method which computes the differences on the bounded range\n * recursively.\n * @returns An array of the differences between the two input sequences.\n */\n ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr) {\n quitEarlyArr[0] = false;\n // Find the start of the differences\n while (originalStart <= originalEnd && modifiedStart <= modifiedEnd && this.ElementsAreEqual(originalStart, modifiedStart)) {\n originalStart++;\n modifiedStart++;\n }\n // Find the end of the differences\n while (originalEnd >= originalStart && modifiedEnd >= modifiedStart && this.ElementsAreEqual(originalEnd, modifiedEnd)) {\n originalEnd--;\n modifiedEnd--;\n }\n // In the special case where we either have all insertions or all deletions or the sequences are identical\n if (originalStart > originalEnd || modifiedStart > modifiedEnd) {\n let changes;\n if (modifiedStart <= modifiedEnd) {\n Debug.Assert(originalStart === originalEnd + 1, 'originalStart should only be one more than originalEnd');\n // All insertions\n changes = [\n new DiffChange(originalStart, 0, modifiedStart, modifiedEnd - modifiedStart + 1)\n ];\n }\n else if (originalStart <= originalEnd) {\n Debug.Assert(modifiedStart === modifiedEnd + 1, 'modifiedStart should only be one more than modifiedEnd');\n // All deletions\n changes = [\n new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, 0)\n ];\n }\n else {\n Debug.Assert(originalStart === originalEnd + 1, 'originalStart should only be one more than originalEnd');\n Debug.Assert(modifiedStart === modifiedEnd + 1, 'modifiedStart should only be one more than modifiedEnd');\n // Identical sequences - No differences\n changes = [];\n }\n return changes;\n }\n // This problem can be solved using the Divide-And-Conquer technique.\n const midOriginalArr = [0];\n const midModifiedArr = [0];\n const result = this.ComputeRecursionPoint(originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr);\n const midOriginal = midOriginalArr[0];\n const midModified = midModifiedArr[0];\n if (result !== null) {\n // Result is not-null when there was enough memory to compute the changes while\n // searching for the recursion point\n return result;\n }\n else if (!quitEarlyArr[0]) {\n // We can break the problem down recursively by finding the changes in the\n // First Half: (originalStart, modifiedStart) to (midOriginal, midModified)\n // Second Half: (midOriginal + 1, minModified + 1) to (originalEnd, modifiedEnd)\n // NOTE: ComputeDiff() is inclusive, therefore the second range starts on the next point\n const leftChanges = this.ComputeDiffRecursive(originalStart, midOriginal, modifiedStart, midModified, quitEarlyArr);\n let rightChanges = [];\n if (!quitEarlyArr[0]) {\n rightChanges = this.ComputeDiffRecursive(midOriginal + 1, originalEnd, midModified + 1, modifiedEnd, quitEarlyArr);\n }\n else {\n // We didn't have time to finish the first half, so we don't have time to compute this half.\n // Consider the entire rest of the sequence different.\n rightChanges = [\n new DiffChange(midOriginal + 1, originalEnd - (midOriginal + 1) + 1, midModified + 1, modifiedEnd - (midModified + 1) + 1)\n ];\n }\n return this.ConcatenateChanges(leftChanges, rightChanges);\n }\n // If we hit here, we quit early, and so can't return anything meaningful\n return [\n new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1)\n ];\n }\n WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr) {\n let forwardChanges = null;\n let reverseChanges = null;\n // First, walk backward through the forward diagonals history\n let changeHelper = new DiffChangeHelper();\n let diagonalMin = diagonalForwardStart;\n let diagonalMax = diagonalForwardEnd;\n let diagonalRelative = (midOriginalArr[0] - midModifiedArr[0]) - diagonalForwardOffset;\n let lastOriginalIndex = -1073741824 /* Constants.MIN_SAFE_SMALL_INTEGER */;\n let historyIndex = this.m_forwardHistory.length - 1;\n do {\n // Get the diagonal index from the relative diagonal number\n const diagonal = diagonalRelative + diagonalForwardBase;\n // Figure out where we came from\n if (diagonal === diagonalMin || (diagonal < diagonalMax && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1])) {\n // Vertical line (the element is an insert)\n originalIndex = forwardPoints[diagonal + 1];\n modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset;\n if (originalIndex < lastOriginalIndex) {\n changeHelper.MarkNextChange();\n }\n lastOriginalIndex = originalIndex;\n changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex);\n diagonalRelative = (diagonal + 1) - diagonalForwardBase; //Setup for the next iteration\n }\n else {\n // Horizontal line (the element is a deletion)\n originalIndex = forwardPoints[diagonal - 1] + 1;\n modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset;\n if (originalIndex < lastOriginalIndex) {\n changeHelper.MarkNextChange();\n }\n lastOriginalIndex = originalIndex - 1;\n changeHelper.AddOriginalElement(originalIndex, modifiedIndex + 1);\n diagonalRelative = (diagonal - 1) - diagonalForwardBase; //Setup for the next iteration\n }\n if (historyIndex >= 0) {\n forwardPoints = this.m_forwardHistory[historyIndex];\n diagonalForwardBase = forwardPoints[0]; //We stored this in the first spot\n diagonalMin = 1;\n diagonalMax = forwardPoints.length - 1;\n }\n } while (--historyIndex >= -1);\n // Ironically, we get the forward changes as the reverse of the\n // order we added them since we technically added them backwards\n forwardChanges = changeHelper.getReverseChanges();\n if (quitEarlyArr[0]) {\n // TODO: Calculate a partial from the reverse diagonals.\n // For now, just assume everything after the midOriginal/midModified point is a diff\n let originalStartPoint = midOriginalArr[0] + 1;\n let modifiedStartPoint = midModifiedArr[0] + 1;\n if (forwardChanges !== null && forwardChanges.length > 0) {\n const lastForwardChange = forwardChanges[forwardChanges.length - 1];\n originalStartPoint = Math.max(originalStartPoint, lastForwardChange.getOriginalEnd());\n modifiedStartPoint = Math.max(modifiedStartPoint, lastForwardChange.getModifiedEnd());\n }\n reverseChanges = [\n new DiffChange(originalStartPoint, originalEnd - originalStartPoint + 1, modifiedStartPoint, modifiedEnd - modifiedStartPoint + 1)\n ];\n }\n else {\n // Now walk backward through the reverse diagonals history\n changeHelper = new DiffChangeHelper();\n diagonalMin = diagonalReverseStart;\n diagonalMax = diagonalReverseEnd;\n diagonalRelative = (midOriginalArr[0] - midModifiedArr[0]) - diagonalReverseOffset;\n lastOriginalIndex = 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */;\n historyIndex = (deltaIsEven) ? this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2;\n do {\n // Get the diagonal index from the relative diagonal number\n const diagonal = diagonalRelative + diagonalReverseBase;\n // Figure out where we came from\n if (diagonal === diagonalMin || (diagonal < diagonalMax && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1])) {\n // Horizontal line (the element is a deletion))\n originalIndex = reversePoints[diagonal + 1] - 1;\n modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset;\n if (originalIndex > lastOriginalIndex) {\n changeHelper.MarkNextChange();\n }\n lastOriginalIndex = originalIndex + 1;\n changeHelper.AddOriginalElement(originalIndex + 1, modifiedIndex + 1);\n diagonalRelative = (diagonal + 1) - diagonalReverseBase; //Setup for the next iteration\n }\n else {\n // Vertical line (the element is an insertion)\n originalIndex = reversePoints[diagonal - 1];\n modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset;\n if (originalIndex > lastOriginalIndex) {\n changeHelper.MarkNextChange();\n }\n lastOriginalIndex = originalIndex;\n changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex + 1);\n diagonalRelative = (diagonal - 1) - diagonalReverseBase; //Setup for the next iteration\n }\n if (historyIndex >= 0) {\n reversePoints = this.m_reverseHistory[historyIndex];\n diagonalReverseBase = reversePoints[0]; //We stored this in the first spot\n diagonalMin = 1;\n diagonalMax = reversePoints.length - 1;\n }\n } while (--historyIndex >= -1);\n // There are cases where the reverse history will find diffs that\n // are correct, but not intuitive, so we need shift them.\n reverseChanges = changeHelper.getChanges();\n }\n return this.ConcatenateChanges(forwardChanges, reverseChanges);\n }\n /**\n * Given the range to compute the diff on, this method finds the point:\n * (midOriginal, midModified)\n * that exists in the middle of the LCS of the two sequences and\n * is the point at which the LCS problem may be broken down recursively.\n * This method will try to keep the LCS trace in memory. If the LCS recursion\n * point is calculated and the full trace is available in memory, then this method\n * will return the change list.\n * @param originalStart The start bound of the original sequence range\n * @param originalEnd The end bound of the original sequence range\n * @param modifiedStart The start bound of the modified sequence range\n * @param modifiedEnd The end bound of the modified sequence range\n * @param midOriginal The middle point of the original sequence range\n * @param midModified The middle point of the modified sequence range\n * @returns The diff changes, if available, otherwise null\n */\n ComputeRecursionPoint(originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr) {\n let originalIndex = 0, modifiedIndex = 0;\n let diagonalForwardStart = 0, diagonalForwardEnd = 0;\n let diagonalReverseStart = 0, diagonalReverseEnd = 0;\n // To traverse the edit graph and produce the proper LCS, our actual\n // start position is just outside the given boundary\n originalStart--;\n modifiedStart--;\n // We set these up to make the compiler happy, but they will\n // be replaced before we return with the actual recursion point\n midOriginalArr[0] = 0;\n midModifiedArr[0] = 0;\n // Clear out the history\n this.m_forwardHistory = [];\n this.m_reverseHistory = [];\n // Each cell in the two arrays corresponds to a diagonal in the edit graph.\n // The integer value in the cell represents the originalIndex of the furthest\n // reaching point found so far that ends in that diagonal.\n // The modifiedIndex can be computed mathematically from the originalIndex and the diagonal number.\n const maxDifferences = (originalEnd - originalStart) + (modifiedEnd - modifiedStart);\n const numDiagonals = maxDifferences + 1;\n const forwardPoints = new Int32Array(numDiagonals);\n const reversePoints = new Int32Array(numDiagonals);\n // diagonalForwardBase: Index into forwardPoints of the diagonal which passes through (originalStart, modifiedStart)\n // diagonalReverseBase: Index into reversePoints of the diagonal which passes through (originalEnd, modifiedEnd)\n const diagonalForwardBase = (modifiedEnd - modifiedStart);\n const diagonalReverseBase = (originalEnd - originalStart);\n // diagonalForwardOffset: Geometric offset which allows modifiedIndex to be computed from originalIndex and the\n // diagonal number (relative to diagonalForwardBase)\n // diagonalReverseOffset: Geometric offset which allows modifiedIndex to be computed from originalIndex and the\n // diagonal number (relative to diagonalReverseBase)\n const diagonalForwardOffset = (originalStart - modifiedStart);\n const diagonalReverseOffset = (originalEnd - modifiedEnd);\n // delta: The difference between the end diagonal and the start diagonal. This is used to relate diagonal numbers\n // relative to the start diagonal with diagonal numbers relative to the end diagonal.\n // The Even/Oddn-ness of this delta is important for determining when we should check for overlap\n const delta = diagonalReverseBase - diagonalForwardBase;\n const deltaIsEven = (delta % 2 === 0);\n // Here we set up the start and end points as the furthest points found so far\n // in both the forward and reverse directions, respectively\n forwardPoints[diagonalForwardBase] = originalStart;\n reversePoints[diagonalReverseBase] = originalEnd;\n // Remember if we quit early, and thus need to do a best-effort result instead of a real result.\n quitEarlyArr[0] = false;\n // A couple of points:\n // --With this method, we iterate on the number of differences between the two sequences.\n // The more differences there actually are, the longer this will take.\n // --Also, as the number of differences increases, we have to search on diagonals further\n // away from the reference diagonal (which is diagonalForwardBase for forward, diagonalReverseBase for reverse).\n // --We extend on even diagonals (relative to the reference diagonal) only when numDifferences\n // is even and odd diagonals only when numDifferences is odd.\n for (let numDifferences = 1; numDifferences <= (maxDifferences / 2) + 1; numDifferences++) {\n let furthestOriginalIndex = 0;\n let furthestModifiedIndex = 0;\n // Run the algorithm in the forward direction\n diagonalForwardStart = this.ClipDiagonalBound(diagonalForwardBase - numDifferences, numDifferences, diagonalForwardBase, numDiagonals);\n diagonalForwardEnd = this.ClipDiagonalBound(diagonalForwardBase + numDifferences, numDifferences, diagonalForwardBase, numDiagonals);\n for (let diagonal = diagonalForwardStart; diagonal <= diagonalForwardEnd; diagonal += 2) {\n // STEP 1: We extend the furthest reaching point in the present diagonal\n // by looking at the diagonals above and below and picking the one whose point\n // is further away from the start point (originalStart, modifiedStart)\n if (diagonal === diagonalForwardStart || (diagonal < diagonalForwardEnd && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1])) {\n originalIndex = forwardPoints[diagonal + 1];\n }\n else {\n originalIndex = forwardPoints[diagonal - 1] + 1;\n }\n modifiedIndex = originalIndex - (diagonal - diagonalForwardBase) - diagonalForwardOffset;\n // Save the current originalIndex so we can test for false overlap in step 3\n const tempOriginalIndex = originalIndex;\n // STEP 2: We can continue to extend the furthest reaching point in the present diagonal\n // so long as the elements are equal.\n while (originalIndex < originalEnd && modifiedIndex < modifiedEnd && this.ElementsAreEqual(originalIndex + 1, modifiedIndex + 1)) {\n originalIndex++;\n modifiedIndex++;\n }\n forwardPoints[diagonal] = originalIndex;\n if (originalIndex + modifiedIndex > furthestOriginalIndex + furthestModifiedIndex) {\n furthestOriginalIndex = originalIndex;\n furthestModifiedIndex = modifiedIndex;\n }\n // STEP 3: If delta is odd (overlap first happens on forward when delta is odd)\n // and diagonal is in the range of reverse diagonals computed for numDifferences-1\n // (the previous iteration; we haven't computed reverse diagonals for numDifferences yet)\n // then check for overlap.\n if (!deltaIsEven && Math.abs(diagonal - diagonalReverseBase) <= (numDifferences - 1)) {\n if (originalIndex >= reversePoints[diagonal]) {\n midOriginalArr[0] = originalIndex;\n midModifiedArr[0] = modifiedIndex;\n if (tempOriginalIndex <= reversePoints[diagonal] && 1447 /* LocalConstants.MaxDifferencesHistory */ > 0 && numDifferences <= (1447 /* LocalConstants.MaxDifferencesHistory */ + 1)) {\n // BINGO! We overlapped, and we have the full trace in memory!\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\n }\n else {\n // Either false overlap, or we didn't have enough memory for the full trace\n // Just return the recursion point\n return null;\n }\n }\n }\n }\n // Check to see if we should be quitting early, before moving on to the next iteration.\n const matchLengthOfLongest = ((furthestOriginalIndex - originalStart) + (furthestModifiedIndex - modifiedStart) - numDifferences) / 2;\n if (this.ContinueProcessingPredicate !== null && !this.ContinueProcessingPredicate(furthestOriginalIndex, matchLengthOfLongest)) {\n // We can't finish, so skip ahead to generating a result from what we have.\n quitEarlyArr[0] = true;\n // Use the furthest distance we got in the forward direction.\n midOriginalArr[0] = furthestOriginalIndex;\n midModifiedArr[0] = furthestModifiedIndex;\n if (matchLengthOfLongest > 0 && 1447 /* LocalConstants.MaxDifferencesHistory */ > 0 && numDifferences <= (1447 /* LocalConstants.MaxDifferencesHistory */ + 1)) {\n // Enough of the history is in memory to walk it backwards\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\n }\n else {\n // We didn't actually remember enough of the history.\n //Since we are quitting the diff early, we need to shift back the originalStart and modified start\n //back into the boundary limits since we decremented their value above beyond the boundary limit.\n originalStart++;\n modifiedStart++;\n return [\n new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1)\n ];\n }\n }\n // Run the algorithm in the reverse direction\n diagonalReverseStart = this.ClipDiagonalBound(diagonalReverseBase - numDifferences, numDifferences, diagonalReverseBase, numDiagonals);\n diagonalReverseEnd = this.ClipDiagonalBound(diagonalReverseBase + numDifferences, numDifferences, diagonalReverseBase, numDiagonals);\n for (let diagonal = diagonalReverseStart; diagonal <= diagonalReverseEnd; diagonal += 2) {\n // STEP 1: We extend the furthest reaching point in the present diagonal\n // by looking at the diagonals above and below and picking the one whose point\n // is further away from the start point (originalEnd, modifiedEnd)\n if (diagonal === diagonalReverseStart || (diagonal < diagonalReverseEnd && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1])) {\n originalIndex = reversePoints[diagonal + 1] - 1;\n }\n else {\n originalIndex = reversePoints[diagonal - 1];\n }\n modifiedIndex = originalIndex - (diagonal - diagonalReverseBase) - diagonalReverseOffset;\n // Save the current originalIndex so we can test for false overlap\n const tempOriginalIndex = originalIndex;\n // STEP 2: We can continue to extend the furthest reaching point in the present diagonal\n // as long as the elements are equal.\n while (originalIndex > originalStart && modifiedIndex > modifiedStart && this.ElementsAreEqual(originalIndex, modifiedIndex)) {\n originalIndex--;\n modifiedIndex--;\n }\n reversePoints[diagonal] = originalIndex;\n // STEP 4: If delta is even (overlap first happens on reverse when delta is even)\n // and diagonal is in the range of forward diagonals computed for numDifferences\n // then check for overlap.\n if (deltaIsEven && Math.abs(diagonal - diagonalForwardBase) <= numDifferences) {\n if (originalIndex <= forwardPoints[diagonal]) {\n midOriginalArr[0] = originalIndex;\n midModifiedArr[0] = modifiedIndex;\n if (tempOriginalIndex >= forwardPoints[diagonal] && 1447 /* LocalConstants.MaxDifferencesHistory */ > 0 && numDifferences <= (1447 /* LocalConstants.MaxDifferencesHistory */ + 1)) {\n // BINGO! We overlapped, and we have the full trace in memory!\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\n }\n else {\n // Either false overlap, or we didn't have enough memory for the full trace\n // Just return the recursion point\n return null;\n }\n }\n }\n }\n // Save current vectors to history before the next iteration\n if (numDifferences <= 1447 /* LocalConstants.MaxDifferencesHistory */) {\n // We are allocating space for one extra int, which we fill with\n // the index of the diagonal base index\n let temp = new Int32Array(diagonalForwardEnd - diagonalForwardStart + 2);\n temp[0] = diagonalForwardBase - diagonalForwardStart + 1;\n MyArray.Copy2(forwardPoints, diagonalForwardStart, temp, 1, diagonalForwardEnd - diagonalForwardStart + 1);\n this.m_forwardHistory.push(temp);\n temp = new Int32Array(diagonalReverseEnd - diagonalReverseStart + 2);\n temp[0] = diagonalReverseBase - diagonalReverseStart + 1;\n MyArray.Copy2(reversePoints, diagonalReverseStart, temp, 1, diagonalReverseEnd - diagonalReverseStart + 1);\n this.m_reverseHistory.push(temp);\n }\n }\n // If we got here, then we have the full trace in history. We just have to convert it to a change list\n // NOTE: This part is a bit messy\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\n }\n /**\n * Shifts the given changes to provide a more intuitive diff.\n * While the first element in a diff matches the first element after the diff,\n * we shift the diff down.\n *\n * @param changes The list of changes to shift\n * @returns The shifted changes\n */\n PrettifyChanges(changes) {\n // Shift all the changes down first\n for (let i = 0; i < changes.length; i++) {\n const change = changes[i];\n const originalStop = (i < changes.length - 1) ? changes[i + 1].originalStart : this._originalElementsOrHash.length;\n const modifiedStop = (i < changes.length - 1) ? changes[i + 1].modifiedStart : this._modifiedElementsOrHash.length;\n const checkOriginal = change.originalLength > 0;\n const checkModified = change.modifiedLength > 0;\n while (change.originalStart + change.originalLength < originalStop\n && change.modifiedStart + change.modifiedLength < modifiedStop\n && (!checkOriginal || this.OriginalElementsAreEqual(change.originalStart, change.originalStart + change.originalLength))\n && (!checkModified || this.ModifiedElementsAreEqual(change.modifiedStart, change.modifiedStart + change.modifiedLength))) {\n const startStrictEqual = this.ElementsAreStrictEqual(change.originalStart, change.modifiedStart);\n const endStrictEqual = this.ElementsAreStrictEqual(change.originalStart + change.originalLength, change.modifiedStart + change.modifiedLength);\n if (endStrictEqual && !startStrictEqual) {\n // moving the change down would create an equal change, but the elements are not strict equal\n break;\n }\n change.originalStart++;\n change.modifiedStart++;\n }\n const mergedChangeArr = [null];\n if (i < changes.length - 1 && this.ChangesOverlap(changes[i], changes[i + 1], mergedChangeArr)) {\n changes[i] = mergedChangeArr[0];\n changes.splice(i + 1, 1);\n i--;\n continue;\n }\n }\n // Shift changes back up until we hit empty or whitespace-only lines\n for (let i = changes.length - 1; i >= 0; i--) {\n const change = changes[i];\n let originalStop = 0;\n let modifiedStop = 0;\n if (i > 0) {\n const prevChange = changes[i - 1];\n originalStop = prevChange.originalStart + prevChange.originalLength;\n modifiedStop = prevChange.modifiedStart + prevChange.modifiedLength;\n }\n const checkOriginal = change.originalLength > 0;\n const checkModified = change.modifiedLength > 0;\n let bestDelta = 0;\n let bestScore = this._boundaryScore(change.originalStart, change.originalLength, change.modifiedStart, change.modifiedLength);\n for (let delta = 1;; delta++) {\n const originalStart = change.originalStart - delta;\n const modifiedStart = change.modifiedStart - delta;\n if (originalStart < originalStop || modifiedStart < modifiedStop) {\n break;\n }\n if (checkOriginal && !this.OriginalElementsAreEqual(originalStart, originalStart + change.originalLength)) {\n break;\n }\n if (checkModified && !this.ModifiedElementsAreEqual(modifiedStart, modifiedStart + change.modifiedLength)) {\n break;\n }\n const touchingPreviousChange = (originalStart === originalStop && modifiedStart === modifiedStop);\n const score = ((touchingPreviousChange ? 5 : 0)\n + this._boundaryScore(originalStart, change.originalLength, modifiedStart, change.modifiedLength));\n if (score > bestScore) {\n bestScore = score;\n bestDelta = delta;\n }\n }\n change.originalStart -= bestDelta;\n change.modifiedStart -= bestDelta;\n const mergedChangeArr = [null];\n if (i > 0 && this.ChangesOverlap(changes[i - 1], changes[i], mergedChangeArr)) {\n changes[i - 1] = mergedChangeArr[0];\n changes.splice(i, 1);\n i++;\n continue;\n }\n }\n // There could be multiple longest common substrings.\n // Give preference to the ones containing longer lines\n if (this._hasStrings) {\n for (let i = 1, len = changes.length; i < len; i++) {\n const aChange = changes[i - 1];\n const bChange = changes[i];\n const matchedLength = bChange.originalStart - aChange.originalStart - aChange.originalLength;\n const aOriginalStart = aChange.originalStart;\n const bOriginalEnd = bChange.originalStart + bChange.originalLength;\n const abOriginalLength = bOriginalEnd - aOriginalStart;\n const aModifiedStart = aChange.modifiedStart;\n const bModifiedEnd = bChange.modifiedStart + bChange.modifiedLength;\n const abModifiedLength = bModifiedEnd - aModifiedStart;\n // Avoid wasting a lot of time with these searches\n if (matchedLength < 5 && abOriginalLength < 20 && abModifiedLength < 20) {\n const t = this._findBetterContiguousSequence(aOriginalStart, abOriginalLength, aModifiedStart, abModifiedLength, matchedLength);\n if (t) {\n const [originalMatchStart, modifiedMatchStart] = t;\n if (originalMatchStart !== aChange.originalStart + aChange.originalLength || modifiedMatchStart !== aChange.modifiedStart + aChange.modifiedLength) {\n // switch to another sequence that has a better score\n aChange.originalLength = originalMatchStart - aChange.originalStart;\n aChange.modifiedLength = modifiedMatchStart - aChange.modifiedStart;\n bChange.originalStart = originalMatchStart + matchedLength;\n bChange.modifiedStart = modifiedMatchStart + matchedLength;\n bChange.originalLength = bOriginalEnd - bChange.originalStart;\n bChange.modifiedLength = bModifiedEnd - bChange.modifiedStart;\n }\n }\n }\n }\n }\n return changes;\n }\n _findBetterContiguousSequence(originalStart, originalLength, modifiedStart, modifiedLength, desiredLength) {\n if (originalLength < desiredLength || modifiedLength < desiredLength) {\n return null;\n }\n const originalMax = originalStart + originalLength - desiredLength + 1;\n const modifiedMax = modifiedStart + modifiedLength - desiredLength + 1;\n let bestScore = 0;\n let bestOriginalStart = 0;\n let bestModifiedStart = 0;\n for (let i = originalStart; i < originalMax; i++) {\n for (let j = modifiedStart; j < modifiedMax; j++) {\n const score = this._contiguousSequenceScore(i, j, desiredLength);\n if (score > 0 && score > bestScore) {\n bestScore = score;\n bestOriginalStart = i;\n bestModifiedStart = j;\n }\n }\n }\n if (bestScore > 0) {\n return [bestOriginalStart, bestModifiedStart];\n }\n return null;\n }\n _contiguousSequenceScore(originalStart, modifiedStart, length) {\n let score = 0;\n for (let l = 0; l < length; l++) {\n if (!this.ElementsAreEqual(originalStart + l, modifiedStart + l)) {\n return 0;\n }\n score += this._originalStringElements[originalStart + l].length;\n }\n return score;\n }\n _OriginalIsBoundary(index) {\n if (index <= 0 || index >= this._originalElementsOrHash.length - 1) {\n return true;\n }\n return (this._hasStrings && /^\\s*$/.test(this._originalStringElements[index]));\n }\n _OriginalRegionIsBoundary(originalStart, originalLength) {\n if (this._OriginalIsBoundary(originalStart) || this._OriginalIsBoundary(originalStart - 1)) {\n return true;\n }\n if (originalLength > 0) {\n const originalEnd = originalStart + originalLength;\n if (this._OriginalIsBoundary(originalEnd - 1) || this._OriginalIsBoundary(originalEnd)) {\n return true;\n }\n }\n return false;\n }\n _ModifiedIsBoundary(index) {\n if (index <= 0 || index >= this._modifiedElementsOrHash.length - 1) {\n return true;\n }\n return (this._hasStrings && /^\\s*$/.test(this._modifiedStringElements[index]));\n }\n _ModifiedRegionIsBoundary(modifiedStart, modifiedLength) {\n if (this._ModifiedIsBoundary(modifiedStart) || this._ModifiedIsBoundary(modifiedStart - 1)) {\n return true;\n }\n if (modifiedLength > 0) {\n const modifiedEnd = modifiedStart + modifiedLength;\n if (this._ModifiedIsBoundary(modifiedEnd - 1) || this._ModifiedIsBoundary(modifiedEnd)) {\n return true;\n }\n }\n return false;\n }\n _boundaryScore(originalStart, originalLength, modifiedStart, modifiedLength) {\n const originalScore = (this._OriginalRegionIsBoundary(originalStart, originalLength) ? 1 : 0);\n const modifiedScore = (this._ModifiedRegionIsBoundary(modifiedStart, modifiedLength) ? 1 : 0);\n return (originalScore + modifiedScore);\n }\n /**\n * Concatenates the two input DiffChange lists and returns the resulting\n * list.\n * @param The left changes\n * @param The right changes\n * @returns The concatenated list\n */\n ConcatenateChanges(left, right) {\n const mergedChangeArr = [];\n if (left.length === 0 || right.length === 0) {\n return (right.length > 0) ? right : left;\n }\n else if (this.ChangesOverlap(left[left.length - 1], right[0], mergedChangeArr)) {\n // Since we break the problem down recursively, it is possible that we\n // might recurse in the middle of a change thereby splitting it into\n // two changes. Here in the combining stage, we detect and fuse those\n // changes back together\n const result = new Array(left.length + right.length - 1);\n MyArray.Copy(left, 0, result, 0, left.length - 1);\n result[left.length - 1] = mergedChangeArr[0];\n MyArray.Copy(right, 1, result, left.length, right.length - 1);\n return result;\n }\n else {\n const result = new Array(left.length + right.length);\n MyArray.Copy(left, 0, result, 0, left.length);\n MyArray.Copy(right, 0, result, left.length, right.length);\n return result;\n }\n }\n /**\n * Returns true if the two changes overlap and can be merged into a single\n * change\n * @param left The left change\n * @param right The right change\n * @param mergedChange The merged change if the two overlap, null otherwise\n * @returns True if the two changes overlap\n */\n ChangesOverlap(left, right, mergedChangeArr) {\n Debug.Assert(left.originalStart <= right.originalStart, 'Left change is not less than or equal to right change');\n Debug.Assert(left.modifiedStart <= right.modifiedStart, 'Left change is not less than or equal to right change');\n if (left.originalStart + left.originalLength >= right.originalStart || left.modifiedStart + left.modifiedLength >= right.modifiedStart) {\n const originalStart = left.originalStart;\n let originalLength = left.originalLength;\n const modifiedStart = left.modifiedStart;\n let modifiedLength = left.modifiedLength;\n if (left.originalStart + left.originalLength >= right.originalStart) {\n originalLength = right.originalStart + right.originalLength - left.originalStart;\n }\n if (left.modifiedStart + left.modifiedLength >= right.modifiedStart) {\n modifiedLength = right.modifiedStart + right.modifiedLength - left.modifiedStart;\n }\n mergedChangeArr[0] = new DiffChange(originalStart, originalLength, modifiedStart, modifiedLength);\n return true;\n }\n else {\n mergedChangeArr[0] = null;\n return false;\n }\n }\n /**\n * Helper method used to clip a diagonal index to the range of valid\n * diagonals. This also decides whether or not the diagonal index,\n * if it exceeds the boundary, should be clipped to the boundary or clipped\n * one inside the boundary depending on the Even/Odd status of the boundary\n * and numDifferences.\n * @param diagonal The index of the diagonal to clip.\n * @param numDifferences The current number of differences being iterated upon.\n * @param diagonalBaseIndex The base reference diagonal.\n * @param numDiagonals The total number of diagonals.\n * @returns The clipped diagonal index.\n */\n ClipDiagonalBound(diagonal, numDifferences, diagonalBaseIndex, numDiagonals) {\n if (diagonal >= 0 && diagonal < numDiagonals) {\n // Nothing to clip, its in range\n return diagonal;\n }\n // diagonalsBelow: The number of diagonals below the reference diagonal\n // diagonalsAbove: The number of diagonals above the reference diagonal\n const diagonalsBelow = diagonalBaseIndex;\n const diagonalsAbove = numDiagonals - diagonalBaseIndex - 1;\n const diffEven = (numDifferences % 2 === 0);\n if (diagonal < 0) {\n const lowerBoundEven = (diagonalsBelow % 2 === 0);\n return (diffEven === lowerBoundEven) ? 0 : 1;\n }\n else {\n const upperBoundEven = (diagonalsAbove % 2 === 0);\n return (diffEven === upperBoundEven) ? numDiagonals - 1 : numDiagonals - 2;\n }\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport function toUint8(v) {\n if (v < 0) {\n return 0;\n }\n if (v > 255 /* Constants.MAX_UINT_8 */) {\n return 255 /* Constants.MAX_UINT_8 */;\n }\n return v | 0;\n}\nexport function toUint32(v) {\n if (v < 0) {\n return 0;\n }\n if (v > 4294967295 /* Constants.MAX_UINT_32 */) {\n return 4294967295 /* Constants.MAX_UINT_32 */;\n }\n return v | 0;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { arrayInsert } from '../../../base/common/arrays.js';\nimport { toUint32 } from '../../../base/common/uint.js';\nexport class PrefixSumComputer {\n constructor(values) {\n this.values = values;\n this.prefixSum = new Uint32Array(values.length);\n this.prefixSumValidIndex = new Int32Array(1);\n this.prefixSumValidIndex[0] = -1;\n }\n insertValues(insertIndex, insertValues) {\n insertIndex = toUint32(insertIndex);\n const oldValues = this.values;\n const oldPrefixSum = this.prefixSum;\n const insertValuesLen = insertValues.length;\n if (insertValuesLen === 0) {\n return false;\n }\n this.values = new Uint32Array(oldValues.length + insertValuesLen);\n this.values.set(oldValues.subarray(0, insertIndex), 0);\n this.values.set(oldValues.subarray(insertIndex), insertIndex + insertValuesLen);\n this.values.set(insertValues, insertIndex);\n if (insertIndex - 1 < this.prefixSumValidIndex[0]) {\n this.prefixSumValidIndex[0] = insertIndex - 1;\n }\n this.prefixSum = new Uint32Array(this.values.length);\n if (this.prefixSumValidIndex[0] >= 0) {\n this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1));\n }\n return true;\n }\n setValue(index, value) {\n index = toUint32(index);\n value = toUint32(value);\n if (this.values[index] === value) {\n return false;\n }\n this.values[index] = value;\n if (index - 1 < this.prefixSumValidIndex[0]) {\n this.prefixSumValidIndex[0] = index - 1;\n }\n return true;\n }\n removeValues(startIndex, count) {\n startIndex = toUint32(startIndex);\n count = toUint32(count);\n const oldValues = this.values;\n const oldPrefixSum = this.prefixSum;\n if (startIndex >= oldValues.length) {\n return false;\n }\n const maxCount = oldValues.length - startIndex;\n if (count >= maxCount) {\n count = maxCount;\n }\n if (count === 0) {\n return false;\n }\n this.values = new Uint32Array(oldValues.length - count);\n this.values.set(oldValues.subarray(0, startIndex), 0);\n this.values.set(oldValues.subarray(startIndex + count), startIndex);\n this.prefixSum = new Uint32Array(this.values.length);\n if (startIndex - 1 < this.prefixSumValidIndex[0]) {\n this.prefixSumValidIndex[0] = startIndex - 1;\n }\n if (this.prefixSumValidIndex[0] >= 0) {\n this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1));\n }\n return true;\n }\n getTotalSum() {\n if (this.values.length === 0) {\n return 0;\n }\n return this._getPrefixSum(this.values.length - 1);\n }\n /**\n * Returns the sum of the first `index + 1` many items.\n * @returns `SUM(0 <= j <= index, values[j])`.\n */\n getPrefixSum(index) {\n if (index < 0) {\n return 0;\n }\n index = toUint32(index);\n return this._getPrefixSum(index);\n }\n _getPrefixSum(index) {\n if (index <= this.prefixSumValidIndex[0]) {\n return this.prefixSum[index];\n }\n let startIndex = this.prefixSumValidIndex[0] + 1;\n if (startIndex === 0) {\n this.prefixSum[0] = this.values[0];\n startIndex++;\n }\n if (index >= this.values.length) {\n index = this.values.length - 1;\n }\n for (let i = startIndex; i <= index; i++) {\n this.prefixSum[i] = this.prefixSum[i - 1] + this.values[i];\n }\n this.prefixSumValidIndex[0] = Math.max(this.prefixSumValidIndex[0], index);\n return this.prefixSum[index];\n }\n getIndexOf(sum) {\n sum = Math.floor(sum);\n // Compute all sums (to get a fully valid prefixSum)\n this.getTotalSum();\n let low = 0;\n let high = this.values.length - 1;\n let mid = 0;\n let midStop = 0;\n let midStart = 0;\n while (low <= high) {\n mid = low + ((high - low) / 2) | 0;\n midStop = this.prefixSum[mid];\n midStart = midStop - this.values[mid];\n if (sum < midStart) {\n high = mid - 1;\n }\n else if (sum >= midStop) {\n low = mid + 1;\n }\n else {\n break;\n }\n }\n return new PrefixSumIndexOfResult(mid, sum - midStart);\n }\n}\n/**\n * {@link getIndexOf} has an amortized runtime complexity of O(1).\n *\n * ({@link PrefixSumComputer.getIndexOf} is just O(log n))\n*/\nexport class ConstantTimePrefixSumComputer {\n constructor(values) {\n this._values = values;\n this._isValid = false;\n this._validEndIndex = -1;\n this._prefixSum = [];\n this._indexBySum = [];\n }\n /**\n * @returns SUM(0 <= j < values.length, values[j])\n */\n getTotalSum() {\n this._ensureValid();\n return this._indexBySum.length;\n }\n /**\n * Returns the sum of the first `count` many items.\n * @returns `SUM(0 <= j < count, values[j])`.\n */\n getPrefixSum(count) {\n this._ensureValid();\n if (count === 0) {\n return 0;\n }\n return this._prefixSum[count - 1];\n }\n /**\n * @returns `result`, such that `getPrefixSum(result.index) + result.remainder = sum`\n */\n getIndexOf(sum) {\n this._ensureValid();\n const idx = this._indexBySum[sum];\n const viewLinesAbove = idx > 0 ? this._prefixSum[idx - 1] : 0;\n return new PrefixSumIndexOfResult(idx, sum - viewLinesAbove);\n }\n removeValues(start, deleteCount) {\n this._values.splice(start, deleteCount);\n this._invalidate(start);\n }\n insertValues(insertIndex, insertArr) {\n this._values = arrayInsert(this._values, insertIndex, insertArr);\n this._invalidate(insertIndex);\n }\n _invalidate(index) {\n this._isValid = false;\n this._validEndIndex = Math.min(this._validEndIndex, index - 1);\n }\n _ensureValid() {\n if (this._isValid) {\n return;\n }\n for (let i = this._validEndIndex + 1, len = this._values.length; i < len; i++) {\n const value = this._values[i];\n const sumAbove = i > 0 ? this._prefixSum[i - 1] : 0;\n this._prefixSum[i] = sumAbove + value;\n for (let j = 0; j < value; j++) {\n this._indexBySum[sumAbove + j] = i;\n }\n }\n // trim things\n this._prefixSum.length = this._values.length;\n this._indexBySum.length = this._prefixSum[this._prefixSum.length - 1];\n // mark as valid\n this._isValid = true;\n this._validEndIndex = this._values.length - 1;\n }\n setValue(index, value) {\n if (this._values[index] === value) {\n // no change\n return;\n }\n this._values[index] = value;\n this._invalidate(index);\n }\n}\nexport class PrefixSumIndexOfResult {\n constructor(index, remainder) {\n this.index = index;\n this.remainder = remainder;\n this._prefixSumIndexOfResultBrand = undefined;\n this.index = index;\n this.remainder = remainder;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { splitLines } from '../../../base/common/strings.js';\nimport { Position } from '../core/position.js';\nimport { PrefixSumComputer } from './prefixSumComputer.js';\nexport class MirrorTextModel {\n constructor(uri, lines, eol, versionId) {\n this._uri = uri;\n this._lines = lines;\n this._eol = eol;\n this._versionId = versionId;\n this._lineStarts = null;\n this._cachedTextValue = null;\n }\n dispose() {\n this._lines.length = 0;\n }\n get version() {\n return this._versionId;\n }\n getText() {\n if (this._cachedTextValue === null) {\n this._cachedTextValue = this._lines.join(this._eol);\n }\n return this._cachedTextValue;\n }\n onEvents(e) {\n if (e.eol && e.eol !== this._eol) {\n this._eol = e.eol;\n this._lineStarts = null;\n }\n // Update my lines\n const changes = e.changes;\n for (const change of changes) {\n this._acceptDeleteRange(change.range);\n this._acceptInsertText(new Position(change.range.startLineNumber, change.range.startColumn), change.text);\n }\n this._versionId = e.versionId;\n this._cachedTextValue = null;\n }\n _ensureLineStarts() {\n if (!this._lineStarts) {\n const eolLength = this._eol.length;\n const linesLength = this._lines.length;\n const lineStartValues = new Uint32Array(linesLength);\n for (let i = 0; i < linesLength; i++) {\n lineStartValues[i] = this._lines[i].length + eolLength;\n }\n this._lineStarts = new PrefixSumComputer(lineStartValues);\n }\n }\n /**\n * All changes to a line's text go through this method\n */\n _setLineText(lineIndex, newValue) {\n this._lines[lineIndex] = newValue;\n if (this._lineStarts) {\n // update prefix sum\n this._lineStarts.setValue(lineIndex, this._lines[lineIndex].length + this._eol.length);\n }\n }\n _acceptDeleteRange(range) {\n if (range.startLineNumber === range.endLineNumber) {\n if (range.startColumn === range.endColumn) {\n // Nothing to delete\n return;\n }\n // Delete text on the affected line\n this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1)\n + this._lines[range.startLineNumber - 1].substring(range.endColumn - 1));\n return;\n }\n // Take remaining text on last line and append it to remaining text on first line\n this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1)\n + this._lines[range.endLineNumber - 1].substring(range.endColumn - 1));\n // Delete middle lines\n this._lines.splice(range.startLineNumber, range.endLineNumber - range.startLineNumber);\n if (this._lineStarts) {\n // update prefix sum\n this._lineStarts.removeValues(range.startLineNumber, range.endLineNumber - range.startLineNumber);\n }\n }\n _acceptInsertText(position, insertText) {\n if (insertText.length === 0) {\n // Nothing to insert\n return;\n }\n const insertLines = splitLines(insertText);\n if (insertLines.length === 1) {\n // Inserting text on one line\n this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1)\n + insertLines[0]\n + this._lines[position.lineNumber - 1].substring(position.column - 1));\n return;\n }\n // Append overflowing text from first line to the end of text to insert\n insertLines[insertLines.length - 1] += this._lines[position.lineNumber - 1].substring(position.column - 1);\n // Delete overflowing text from first line and insert text on first line\n this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1)\n + insertLines[0]);\n // Insert new lines & store lengths\n const newLengths = new Uint32Array(insertLines.length - 1);\n for (let i = 1; i < insertLines.length; i++) {\n this._lines.splice(position.lineNumber + i - 1, 0, insertLines[i]);\n newLengths[i - 1] = insertLines[i].length + this._eol.length;\n }\n if (this._lineStarts) {\n // update prefix sum\n this._lineStarts.insertValues(position.lineNumber, newLengths);\n }\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { toUint8 } from '../../../base/common/uint.js';\n/**\n * A fast character classifier that uses a compact array for ASCII values.\n */\nexport class CharacterClassifier {\n constructor(_defaultValue) {\n const defaultValue = toUint8(_defaultValue);\n this._defaultValue = defaultValue;\n this._asciiMap = CharacterClassifier._createAsciiMap(defaultValue);\n this._map = new Map();\n }\n static _createAsciiMap(defaultValue) {\n const asciiMap = new Uint8Array(256);\n asciiMap.fill(defaultValue);\n return asciiMap;\n }\n set(charCode, _value) {\n const value = toUint8(_value);\n if (charCode >= 0 && charCode < 256) {\n this._asciiMap[charCode] = value;\n }\n else {\n this._map.set(charCode, value);\n }\n }\n get(charCode) {\n if (charCode >= 0 && charCode < 256) {\n return this._asciiMap[charCode];\n }\n else {\n return (this._map.get(charCode) || this._defaultValue);\n }\n }\n clear() {\n this._asciiMap.fill(this._defaultValue);\n this._map.clear();\n }\n}\nexport class CharacterSet {\n constructor() {\n this._actual = new CharacterClassifier(0 /* Boolean.False */);\n }\n add(charCode) {\n this._actual.set(charCode, 1 /* Boolean.True */);\n }\n has(charCode) {\n return (this._actual.get(charCode) === 1 /* Boolean.True */);\n }\n clear() {\n return this._actual.clear();\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { CharacterClassifier } from '../core/characterClassifier.js';\nclass Uint8Matrix {\n constructor(rows, cols, defaultValue) {\n const data = new Uint8Array(rows * cols);\n for (let i = 0, len = rows * cols; i < len; i++) {\n data[i] = defaultValue;\n }\n this._data = data;\n this.rows = rows;\n this.cols = cols;\n }\n get(row, col) {\n return this._data[row * this.cols + col];\n }\n set(row, col, value) {\n this._data[row * this.cols + col] = value;\n }\n}\nexport class StateMachine {\n constructor(edges) {\n let maxCharCode = 0;\n let maxState = 0 /* State.Invalid */;\n for (let i = 0, len = edges.length; i < len; i++) {\n const [from, chCode, to] = edges[i];\n if (chCode > maxCharCode) {\n maxCharCode = chCode;\n }\n if (from > maxState) {\n maxState = from;\n }\n if (to > maxState) {\n maxState = to;\n }\n }\n maxCharCode++;\n maxState++;\n const states = new Uint8Matrix(maxState, maxCharCode, 0 /* State.Invalid */);\n for (let i = 0, len = edges.length; i < len; i++) {\n const [from, chCode, to] = edges[i];\n states.set(from, chCode, to);\n }\n this._states = states;\n this._maxCharCode = maxCharCode;\n }\n nextState(currentState, chCode) {\n if (chCode < 0 || chCode >= this._maxCharCode) {\n return 0 /* State.Invalid */;\n }\n return this._states.get(currentState, chCode);\n }\n}\n// State machine for http:// or https:// or file://\nlet _stateMachine = null;\nfunction getStateMachine() {\n if (_stateMachine === null) {\n _stateMachine = new StateMachine([\n [1 /* State.Start */, 104 /* CharCode.h */, 2 /* State.H */],\n [1 /* State.Start */, 72 /* CharCode.H */, 2 /* State.H */],\n [1 /* State.Start */, 102 /* CharCode.f */, 6 /* State.F */],\n [1 /* State.Start */, 70 /* CharCode.F */, 6 /* State.F */],\n [2 /* State.H */, 116 /* CharCode.t */, 3 /* State.HT */],\n [2 /* State.H */, 84 /* CharCode.T */, 3 /* State.HT */],\n [3 /* State.HT */, 116 /* CharCode.t */, 4 /* State.HTT */],\n [3 /* State.HT */, 84 /* CharCode.T */, 4 /* State.HTT */],\n [4 /* State.HTT */, 112 /* CharCode.p */, 5 /* State.HTTP */],\n [4 /* State.HTT */, 80 /* CharCode.P */, 5 /* State.HTTP */],\n [5 /* State.HTTP */, 115 /* CharCode.s */, 9 /* State.BeforeColon */],\n [5 /* State.HTTP */, 83 /* CharCode.S */, 9 /* State.BeforeColon */],\n [5 /* State.HTTP */, 58 /* CharCode.Colon */, 10 /* State.AfterColon */],\n [6 /* State.F */, 105 /* CharCode.i */, 7 /* State.FI */],\n [6 /* State.F */, 73 /* CharCode.I */, 7 /* State.FI */],\n [7 /* State.FI */, 108 /* CharCode.l */, 8 /* State.FIL */],\n [7 /* State.FI */, 76 /* CharCode.L */, 8 /* State.FIL */],\n [8 /* State.FIL */, 101 /* CharCode.e */, 9 /* State.BeforeColon */],\n [8 /* State.FIL */, 69 /* CharCode.E */, 9 /* State.BeforeColon */],\n [9 /* State.BeforeColon */, 58 /* CharCode.Colon */, 10 /* State.AfterColon */],\n [10 /* State.AfterColon */, 47 /* CharCode.Slash */, 11 /* State.AlmostThere */],\n [11 /* State.AlmostThere */, 47 /* CharCode.Slash */, 12 /* State.End */],\n ]);\n }\n return _stateMachine;\n}\nlet _classifier = null;\nfunction getClassifier() {\n if (_classifier === null) {\n _classifier = new CharacterClassifier(0 /* CharacterClass.None */);\n // allow-any-unicode-next-line\n const FORCE_TERMINATION_CHARACTERS = ' \\t<>\\'\\\"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026';\n for (let i = 0; i < FORCE_TERMINATION_CHARACTERS.length; i++) {\n _classifier.set(FORCE_TERMINATION_CHARACTERS.charCodeAt(i), 1 /* CharacterClass.ForceTermination */);\n }\n const CANNOT_END_WITH_CHARACTERS = '.,;:';\n for (let i = 0; i < CANNOT_END_WITH_CHARACTERS.length; i++) {\n _classifier.set(CANNOT_END_WITH_CHARACTERS.charCodeAt(i), 2 /* CharacterClass.CannotEndIn */);\n }\n }\n return _classifier;\n}\nexport class LinkComputer {\n static _createLink(classifier, line, lineNumber, linkBeginIndex, linkEndIndex) {\n // Do not allow to end link in certain characters...\n let lastIncludedCharIndex = linkEndIndex - 1;\n do {\n const chCode = line.charCodeAt(lastIncludedCharIndex);\n const chClass = classifier.get(chCode);\n if (chClass !== 2 /* CharacterClass.CannotEndIn */) {\n break;\n }\n lastIncludedCharIndex--;\n } while (lastIncludedCharIndex > linkBeginIndex);\n // Handle links enclosed in parens, square brackets and curlys.\n if (linkBeginIndex > 0) {\n const charCodeBeforeLink = line.charCodeAt(linkBeginIndex - 1);\n const lastCharCodeInLink = line.charCodeAt(lastIncludedCharIndex);\n if ((charCodeBeforeLink === 40 /* CharCode.OpenParen */ && lastCharCodeInLink === 41 /* CharCode.CloseParen */)\n || (charCodeBeforeLink === 91 /* CharCode.OpenSquareBracket */ && lastCharCodeInLink === 93 /* CharCode.CloseSquareBracket */)\n || (charCodeBeforeLink === 123 /* CharCode.OpenCurlyBrace */ && lastCharCodeInLink === 125 /* CharCode.CloseCurlyBrace */)) {\n // Do not end in ) if ( is before the link start\n // Do not end in ] if [ is before the link start\n // Do not end in } if { is before the link start\n lastIncludedCharIndex--;\n }\n }\n return {\n range: {\n startLineNumber: lineNumber,\n startColumn: linkBeginIndex + 1,\n endLineNumber: lineNumber,\n endColumn: lastIncludedCharIndex + 2\n },\n url: line.substring(linkBeginIndex, lastIncludedCharIndex + 1)\n };\n }\n static computeLinks(model, stateMachine = getStateMachine()) {\n const classifier = getClassifier();\n const result = [];\n for (let i = 1, lineCount = model.getLineCount(); i <= lineCount; i++) {\n const line = model.getLineContent(i);\n const len = line.length;\n let j = 0;\n let linkBeginIndex = 0;\n let linkBeginChCode = 0;\n let state = 1 /* State.Start */;\n let hasOpenParens = false;\n let hasOpenSquareBracket = false;\n let inSquareBrackets = false;\n let hasOpenCurlyBracket = false;\n while (j < len) {\n let resetStateMachine = false;\n const chCode = line.charCodeAt(j);\n if (state === 13 /* State.Accept */) {\n let chClass;\n switch (chCode) {\n case 40 /* CharCode.OpenParen */:\n hasOpenParens = true;\n chClass = 0 /* CharacterClass.None */;\n break;\n case 41 /* CharCode.CloseParen */:\n chClass = (hasOpenParens ? 0 /* CharacterClass.None */ : 1 /* CharacterClass.ForceTermination */);\n break;\n case 91 /* CharCode.OpenSquareBracket */:\n inSquareBrackets = true;\n hasOpenSquareBracket = true;\n chClass = 0 /* CharacterClass.None */;\n break;\n case 93 /* CharCode.CloseSquareBracket */:\n inSquareBrackets = false;\n chClass = (hasOpenSquareBracket ? 0 /* CharacterClass.None */ : 1 /* CharacterClass.ForceTermination */);\n break;\n case 123 /* CharCode.OpenCurlyBrace */:\n hasOpenCurlyBracket = true;\n chClass = 0 /* CharacterClass.None */;\n break;\n case 125 /* CharCode.CloseCurlyBrace */:\n chClass = (hasOpenCurlyBracket ? 0 /* CharacterClass.None */ : 1 /* CharacterClass.ForceTermination */);\n break;\n // The following three rules make it that ' or \" or ` are allowed inside links\n // only if the link is wrapped by some other quote character\n case 39 /* CharCode.SingleQuote */:\n case 34 /* CharCode.DoubleQuote */:\n case 96 /* CharCode.BackTick */:\n if (linkBeginChCode === chCode) {\n chClass = 1 /* CharacterClass.ForceTermination */;\n }\n else if (linkBeginChCode === 39 /* CharCode.SingleQuote */ || linkBeginChCode === 34 /* CharCode.DoubleQuote */ || linkBeginChCode === 96 /* CharCode.BackTick */) {\n chClass = 0 /* CharacterClass.None */;\n }\n else {\n chClass = 1 /* CharacterClass.ForceTermination */;\n }\n break;\n case 42 /* CharCode.Asterisk */:\n // `*` terminates a link if the link began with `*`\n chClass = (linkBeginChCode === 42 /* CharCode.Asterisk */) ? 1 /* CharacterClass.ForceTermination */ : 0 /* CharacterClass.None */;\n break;\n case 124 /* CharCode.Pipe */:\n // `|` terminates a link if the link began with `|`\n chClass = (linkBeginChCode === 124 /* CharCode.Pipe */) ? 1 /* CharacterClass.ForceTermination */ : 0 /* CharacterClass.None */;\n break;\n case 32 /* CharCode.Space */:\n // ` ` allow space in between [ and ]\n chClass = (inSquareBrackets ? 0 /* CharacterClass.None */ : 1 /* CharacterClass.ForceTermination */);\n break;\n default:\n chClass = classifier.get(chCode);\n }\n // Check if character terminates link\n if (chClass === 1 /* CharacterClass.ForceTermination */) {\n result.push(LinkComputer._createLink(classifier, line, i, linkBeginIndex, j));\n resetStateMachine = true;\n }\n }\n else if (state === 12 /* State.End */) {\n let chClass;\n if (chCode === 91 /* CharCode.OpenSquareBracket */) {\n // Allow for the authority part to contain ipv6 addresses which contain [ and ]\n hasOpenSquareBracket = true;\n chClass = 0 /* CharacterClass.None */;\n }\n else {\n chClass = classifier.get(chCode);\n }\n // Check if character terminates link\n if (chClass === 1 /* CharacterClass.ForceTermination */) {\n resetStateMachine = true;\n }\n else {\n state = 13 /* State.Accept */;\n }\n }\n else {\n state = stateMachine.nextState(state, chCode);\n if (state === 0 /* State.Invalid */) {\n resetStateMachine = true;\n }\n }\n if (resetStateMachine) {\n state = 1 /* State.Start */;\n hasOpenParens = false;\n hasOpenSquareBracket = false;\n hasOpenCurlyBracket = false;\n // Record where the link started\n linkBeginIndex = j + 1;\n linkBeginChCode = chCode;\n }\n j++;\n }\n if (state === 13 /* State.Accept */) {\n result.push(LinkComputer._createLink(classifier, line, i, linkBeginIndex, len));\n }\n }\n return result;\n }\n}\n/**\n * Returns an array of all links contains in the provided\n * document. *Note* that this operation is computational\n * expensive and should not run in the UI thread.\n */\nexport function computeLinks(model) {\n if (!model || typeof model.getLineCount !== 'function' || typeof model.getLineContent !== 'function') {\n // Unknown caller!\n return [];\n }\n return LinkComputer.computeLinks(model);\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport class BasicInplaceReplace {\n constructor() {\n this._defaultValueSet = [\n ['true', 'false'],\n ['True', 'False'],\n ['Private', 'Public', 'Friend', 'ReadOnly', 'Partial', 'Protected', 'WriteOnly'],\n ['public', 'protected', 'private'],\n ];\n }\n navigateValueSet(range1, text1, range2, text2, up) {\n if (range1 && text1) {\n const result = this.doNavigateValueSet(text1, up);\n if (result) {\n return {\n range: range1,\n value: result\n };\n }\n }\n if (range2 && text2) {\n const result = this.doNavigateValueSet(text2, up);\n if (result) {\n return {\n range: range2,\n value: result\n };\n }\n }\n return null;\n }\n doNavigateValueSet(text, up) {\n const numberResult = this.numberReplace(text, up);\n if (numberResult !== null) {\n return numberResult;\n }\n return this.textReplace(text, up);\n }\n numberReplace(value, up) {\n const precision = Math.pow(10, value.length - (value.lastIndexOf('.') + 1));\n let n1 = Number(value);\n const n2 = parseFloat(value);\n if (!isNaN(n1) && !isNaN(n2) && n1 === n2) {\n if (n1 === 0 && !up) {\n return null; // don't do negative\n //\t\t\t} else if(n1 === 9 && up) {\n //\t\t\t\treturn null; // don't insert 10 into a number\n }\n else {\n n1 = Math.floor(n1 * precision);\n n1 += up ? precision : -precision;\n return String(n1 / precision);\n }\n }\n return null;\n }\n textReplace(value, up) {\n return this.valueSetsReplace(this._defaultValueSet, value, up);\n }\n valueSetsReplace(valueSets, value, up) {\n let result = null;\n for (let i = 0, len = valueSets.length; result === null && i < len; i++) {\n result = this.valueSetReplace(valueSets[i], value, up);\n }\n return result;\n }\n valueSetReplace(valueSet, value, up) {\n let idx = valueSet.indexOf(value);\n if (idx >= 0) {\n idx += up ? +1 : -1;\n if (idx < 0) {\n idx = valueSet.length - 1;\n }\n else {\n idx %= valueSet.length;\n }\n return valueSet[idx];\n }\n return null;\n }\n}\nBasicInplaceReplace.INSTANCE = new BasicInplaceReplace();\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { CharacterClassifier } from './characterClassifier.js';\nexport class WordCharacterClassifier extends CharacterClassifier {\n constructor(wordSeparators) {\n super(0 /* WordCharacterClass.Regular */);\n for (let i = 0, len = wordSeparators.length; i < len; i++) {\n this.set(wordSeparators.charCodeAt(i), 2 /* WordCharacterClass.WordSeparator */);\n }\n this.set(32 /* CharCode.Space */, 1 /* WordCharacterClass.Whitespace */);\n this.set(9 /* CharCode.Tab */, 1 /* WordCharacterClass.Whitespace */);\n }\n}\nfunction once(computeFn) {\n const cache = {}; // TODO@Alex unbounded cache\n return (input) => {\n if (!cache.hasOwnProperty(input)) {\n cache[input] = computeFn(input);\n }\n return cache[input];\n };\n}\nexport const getMapForWordSeparators = once((input) => new WordCharacterClassifier(input));\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { equals } from '../../base/common/objects.js';\n/**\n * Vertical Lane in the overview ruler of the editor.\n */\nexport var OverviewRulerLane;\n(function (OverviewRulerLane) {\n OverviewRulerLane[OverviewRulerLane[\"Left\"] = 1] = \"Left\";\n OverviewRulerLane[OverviewRulerLane[\"Center\"] = 2] = \"Center\";\n OverviewRulerLane[OverviewRulerLane[\"Right\"] = 4] = \"Right\";\n OverviewRulerLane[OverviewRulerLane[\"Full\"] = 7] = \"Full\";\n})(OverviewRulerLane || (OverviewRulerLane = {}));\n/**\n * Vertical Lane in the glyph margin of the editor.\n */\nexport var GlyphMarginLane;\n(function (GlyphMarginLane) {\n GlyphMarginLane[GlyphMarginLane[\"Left\"] = 1] = \"Left\";\n GlyphMarginLane[GlyphMarginLane[\"Center\"] = 2] = \"Center\";\n GlyphMarginLane[GlyphMarginLane[\"Right\"] = 3] = \"Right\";\n})(GlyphMarginLane || (GlyphMarginLane = {}));\n/**\n * Position in the minimap to render the decoration.\n */\nexport var MinimapPosition;\n(function (MinimapPosition) {\n MinimapPosition[MinimapPosition[\"Inline\"] = 1] = \"Inline\";\n MinimapPosition[MinimapPosition[\"Gutter\"] = 2] = \"Gutter\";\n})(MinimapPosition || (MinimapPosition = {}));\nexport var InjectedTextCursorStops;\n(function (InjectedTextCursorStops) {\n InjectedTextCursorStops[InjectedTextCursorStops[\"Both\"] = 0] = \"Both\";\n InjectedTextCursorStops[InjectedTextCursorStops[\"Right\"] = 1] = \"Right\";\n InjectedTextCursorStops[InjectedTextCursorStops[\"Left\"] = 2] = \"Left\";\n InjectedTextCursorStops[InjectedTextCursorStops[\"None\"] = 3] = \"None\";\n})(InjectedTextCursorStops || (InjectedTextCursorStops = {}));\nexport class TextModelResolvedOptions {\n get originalIndentSize() {\n return this._indentSizeIsTabSize ? 'tabSize' : this.indentSize;\n }\n /**\n * @internal\n */\n constructor(src) {\n this._textModelResolvedOptionsBrand = undefined;\n this.tabSize = Math.max(1, src.tabSize | 0);\n if (src.indentSize === 'tabSize') {\n this.indentSize = this.tabSize;\n this._indentSizeIsTabSize = true;\n }\n else {\n this.indentSize = Math.max(1, src.indentSize | 0);\n this._indentSizeIsTabSize = false;\n }\n this.insertSpaces = Boolean(src.insertSpaces);\n this.defaultEOL = src.defaultEOL | 0;\n this.trimAutoWhitespace = Boolean(src.trimAutoWhitespace);\n this.bracketPairColorizationOptions = src.bracketPairColorizationOptions;\n }\n /**\n * @internal\n */\n equals(other) {\n return (this.tabSize === other.tabSize\n && this._indentSizeIsTabSize === other._indentSizeIsTabSize\n && this.indentSize === other.indentSize\n && this.insertSpaces === other.insertSpaces\n && this.defaultEOL === other.defaultEOL\n && this.trimAutoWhitespace === other.trimAutoWhitespace\n && equals(this.bracketPairColorizationOptions, other.bracketPairColorizationOptions));\n }\n /**\n * @internal\n */\n createChangeEvent(newOpts) {\n return {\n tabSize: this.tabSize !== newOpts.tabSize,\n indentSize: this.indentSize !== newOpts.indentSize,\n insertSpaces: this.insertSpaces !== newOpts.insertSpaces,\n trimAutoWhitespace: this.trimAutoWhitespace !== newOpts.trimAutoWhitespace,\n };\n }\n}\nexport class FindMatch {\n /**\n * @internal\n */\n constructor(range, matches) {\n this._findMatchBrand = undefined;\n this.range = range;\n this.matches = matches;\n }\n}\n/**\n * @internal\n */\nexport function isITextSnapshot(obj) {\n return (obj && typeof obj.read === 'function');\n}\n/**\n * @internal\n */\nexport class ValidAnnotatedEditOperation {\n constructor(identifier, range, text, forceMoveMarkers, isAutoWhitespaceEdit, _isTracked) {\n this.identifier = identifier;\n this.range = range;\n this.text = text;\n this.forceMoveMarkers = forceMoveMarkers;\n this.isAutoWhitespaceEdit = isAutoWhitespaceEdit;\n this._isTracked = _isTracked;\n }\n}\n/**\n * @internal\n */\nexport class SearchData {\n constructor(regex, wordSeparators, simpleSearch) {\n this.regex = regex;\n this.wordSeparators = wordSeparators;\n this.simpleSearch = simpleSearch;\n }\n}\n/**\n * @internal\n */\nexport class ApplyEditsResult {\n constructor(reverseEdits, changes, trimAutoWhitespaceLineNumbers) {\n this.reverseEdits = reverseEdits;\n this.changes = changes;\n this.trimAutoWhitespaceLineNumbers = trimAutoWhitespaceLineNumbers;\n }\n}\n/**\n * @internal\n */\nexport function shouldSynchronizeModel(model) {\n return (!model.isTooLargeForSyncing() && !model.isForSimpleWidget);\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as strings from '../../../base/common/strings.js';\nimport { getMapForWordSeparators } from '../core/wordCharacterClassifier.js';\nimport { Position } from '../core/position.js';\nimport { Range } from '../core/range.js';\nimport { FindMatch, SearchData } from '../model.js';\nconst LIMIT_FIND_COUNT = 999;\nexport class SearchParams {\n constructor(searchString, isRegex, matchCase, wordSeparators) {\n this.searchString = searchString;\n this.isRegex = isRegex;\n this.matchCase = matchCase;\n this.wordSeparators = wordSeparators;\n }\n parseSearchRequest() {\n if (this.searchString === '') {\n return null;\n }\n // Try to create a RegExp out of the params\n let multiline;\n if (this.isRegex) {\n multiline = isMultilineRegexSource(this.searchString);\n }\n else {\n multiline = (this.searchString.indexOf('\\n') >= 0);\n }\n let regex = null;\n try {\n regex = strings.createRegExp(this.searchString, this.isRegex, {\n matchCase: this.matchCase,\n wholeWord: false,\n multiline: multiline,\n global: true,\n unicode: true\n });\n }\n catch (err) {\n return null;\n }\n if (!regex) {\n return null;\n }\n let canUseSimpleSearch = (!this.isRegex && !multiline);\n if (canUseSimpleSearch && this.searchString.toLowerCase() !== this.searchString.toUpperCase()) {\n // casing might make a difference\n canUseSimpleSearch = this.matchCase;\n }\n return new SearchData(regex, this.wordSeparators ? getMapForWordSeparators(this.wordSeparators) : null, canUseSimpleSearch ? this.searchString : null);\n }\n}\nexport function isMultilineRegexSource(searchString) {\n if (!searchString || searchString.length === 0) {\n return false;\n }\n for (let i = 0, len = searchString.length; i < len; i++) {\n const chCode = searchString.charCodeAt(i);\n if (chCode === 10 /* CharCode.LineFeed */) {\n return true;\n }\n if (chCode === 92 /* CharCode.Backslash */) {\n // move to next char\n i++;\n if (i >= len) {\n // string ends with a \\\n break;\n }\n const nextChCode = searchString.charCodeAt(i);\n if (nextChCode === 110 /* CharCode.n */ || nextChCode === 114 /* CharCode.r */ || nextChCode === 87 /* CharCode.W */) {\n return true;\n }\n }\n }\n return false;\n}\nexport function createFindMatch(range, rawMatches, captureMatches) {\n if (!captureMatches) {\n return new FindMatch(range, null);\n }\n const matches = [];\n for (let i = 0, len = rawMatches.length; i < len; i++) {\n matches[i] = rawMatches[i];\n }\n return new FindMatch(range, matches);\n}\nclass LineFeedCounter {\n constructor(text) {\n const lineFeedsOffsets = [];\n let lineFeedsOffsetsLen = 0;\n for (let i = 0, textLen = text.length; i < textLen; i++) {\n if (text.charCodeAt(i) === 10 /* CharCode.LineFeed */) {\n lineFeedsOffsets[lineFeedsOffsetsLen++] = i;\n }\n }\n this._lineFeedsOffsets = lineFeedsOffsets;\n }\n findLineFeedCountBeforeOffset(offset) {\n const lineFeedsOffsets = this._lineFeedsOffsets;\n let min = 0;\n let max = lineFeedsOffsets.length - 1;\n if (max === -1) {\n // no line feeds\n return 0;\n }\n if (offset <= lineFeedsOffsets[0]) {\n // before first line feed\n return 0;\n }\n while (min < max) {\n const mid = min + ((max - min) / 2 >> 0);\n if (lineFeedsOffsets[mid] >= offset) {\n max = mid - 1;\n }\n else {\n if (lineFeedsOffsets[mid + 1] >= offset) {\n // bingo!\n min = mid;\n max = mid;\n }\n else {\n min = mid + 1;\n }\n }\n }\n return min + 1;\n }\n}\nexport class TextModelSearch {\n static findMatches(model, searchParams, searchRange, captureMatches, limitResultCount) {\n const searchData = searchParams.parseSearchRequest();\n if (!searchData) {\n return [];\n }\n if (searchData.regex.multiline) {\n return this._doFindMatchesMultiline(model, searchRange, new Searcher(searchData.wordSeparators, searchData.regex), captureMatches, limitResultCount);\n }\n return this._doFindMatchesLineByLine(model, searchRange, searchData, captureMatches, limitResultCount);\n }\n /**\n * Multiline search always executes on the lines concatenated with \\n.\n * We must therefore compensate for the count of \\n in case the model is CRLF\n */\n static _getMultilineMatchRange(model, deltaOffset, text, lfCounter, matchIndex, match0) {\n let startOffset;\n let lineFeedCountBeforeMatch = 0;\n if (lfCounter) {\n lineFeedCountBeforeMatch = lfCounter.findLineFeedCountBeforeOffset(matchIndex);\n startOffset = deltaOffset + matchIndex + lineFeedCountBeforeMatch /* add as many \\r as there were \\n */;\n }\n else {\n startOffset = deltaOffset + matchIndex;\n }\n let endOffset;\n if (lfCounter) {\n const lineFeedCountBeforeEndOfMatch = lfCounter.findLineFeedCountBeforeOffset(matchIndex + match0.length);\n const lineFeedCountInMatch = lineFeedCountBeforeEndOfMatch - lineFeedCountBeforeMatch;\n endOffset = startOffset + match0.length + lineFeedCountInMatch /* add as many \\r as there were \\n */;\n }\n else {\n endOffset = startOffset + match0.length;\n }\n const startPosition = model.getPositionAt(startOffset);\n const endPosition = model.getPositionAt(endOffset);\n return new Range(startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column);\n }\n static _doFindMatchesMultiline(model, searchRange, searcher, captureMatches, limitResultCount) {\n const deltaOffset = model.getOffsetAt(searchRange.getStartPosition());\n // We always execute multiline search over the lines joined with \\n\n // This makes it that \\n will match the EOL for both CRLF and LF models\n // We compensate for offset errors in `_getMultilineMatchRange`\n const text = model.getValueInRange(searchRange, 1 /* EndOfLinePreference.LF */);\n const lfCounter = (model.getEOL() === '\\r\\n' ? new LineFeedCounter(text) : null);\n const result = [];\n let counter = 0;\n let m;\n searcher.reset(0);\n while ((m = searcher.next(text))) {\n result[counter++] = createFindMatch(this._getMultilineMatchRange(model, deltaOffset, text, lfCounter, m.index, m[0]), m, captureMatches);\n if (counter >= limitResultCount) {\n return result;\n }\n }\n return result;\n }\n static _doFindMatchesLineByLine(model, searchRange, searchData, captureMatches, limitResultCount) {\n const result = [];\n let resultLen = 0;\n // Early case for a search range that starts & stops on the same line number\n if (searchRange.startLineNumber === searchRange.endLineNumber) {\n const text = model.getLineContent(searchRange.startLineNumber).substring(searchRange.startColumn - 1, searchRange.endColumn - 1);\n resultLen = this._findMatchesInLine(searchData, text, searchRange.startLineNumber, searchRange.startColumn - 1, resultLen, result, captureMatches, limitResultCount);\n return result;\n }\n // Collect results from first line\n const text = model.getLineContent(searchRange.startLineNumber).substring(searchRange.startColumn - 1);\n resultLen = this._findMatchesInLine(searchData, text, searchRange.startLineNumber, searchRange.startColumn - 1, resultLen, result, captureMatches, limitResultCount);\n // Collect results from middle lines\n for (let lineNumber = searchRange.startLineNumber + 1; lineNumber < searchRange.endLineNumber && resultLen < limitResultCount; lineNumber++) {\n resultLen = this._findMatchesInLine(searchData, model.getLineContent(lineNumber), lineNumber, 0, resultLen, result, captureMatches, limitResultCount);\n }\n // Collect results from last line\n if (resultLen < limitResultCount) {\n const text = model.getLineContent(searchRange.endLineNumber).substring(0, searchRange.endColumn - 1);\n resultLen = this._findMatchesInLine(searchData, text, searchRange.endLineNumber, 0, resultLen, result, captureMatches, limitResultCount);\n }\n return result;\n }\n static _findMatchesInLine(searchData, text, lineNumber, deltaOffset, resultLen, result, captureMatches, limitResultCount) {\n const wordSeparators = searchData.wordSeparators;\n if (!captureMatches && searchData.simpleSearch) {\n const searchString = searchData.simpleSearch;\n const searchStringLen = searchString.length;\n const textLength = text.length;\n let lastMatchIndex = -searchStringLen;\n while ((lastMatchIndex = text.indexOf(searchString, lastMatchIndex + searchStringLen)) !== -1) {\n if (!wordSeparators || isValidMatch(wordSeparators, text, textLength, lastMatchIndex, searchStringLen)) {\n result[resultLen++] = new FindMatch(new Range(lineNumber, lastMatchIndex + 1 + deltaOffset, lineNumber, lastMatchIndex + 1 + searchStringLen + deltaOffset), null);\n if (resultLen >= limitResultCount) {\n return resultLen;\n }\n }\n }\n return resultLen;\n }\n const searcher = new Searcher(searchData.wordSeparators, searchData.regex);\n let m;\n // Reset regex to search from the beginning\n searcher.reset(0);\n do {\n m = searcher.next(text);\n if (m) {\n result[resultLen++] = createFindMatch(new Range(lineNumber, m.index + 1 + deltaOffset, lineNumber, m.index + 1 + m[0].length + deltaOffset), m, captureMatches);\n if (resultLen >= limitResultCount) {\n return resultLen;\n }\n }\n } while (m);\n return resultLen;\n }\n static findNextMatch(model, searchParams, searchStart, captureMatches) {\n const searchData = searchParams.parseSearchRequest();\n if (!searchData) {\n return null;\n }\n const searcher = new Searcher(searchData.wordSeparators, searchData.regex);\n if (searchData.regex.multiline) {\n return this._doFindNextMatchMultiline(model, searchStart, searcher, captureMatches);\n }\n return this._doFindNextMatchLineByLine(model, searchStart, searcher, captureMatches);\n }\n static _doFindNextMatchMultiline(model, searchStart, searcher, captureMatches) {\n const searchTextStart = new Position(searchStart.lineNumber, 1);\n const deltaOffset = model.getOffsetAt(searchTextStart);\n const lineCount = model.getLineCount();\n // We always execute multiline search over the lines joined with \\n\n // This makes it that \\n will match the EOL for both CRLF and LF models\n // We compensate for offset errors in `_getMultilineMatchRange`\n const text = model.getValueInRange(new Range(searchTextStart.lineNumber, searchTextStart.column, lineCount, model.getLineMaxColumn(lineCount)), 1 /* EndOfLinePreference.LF */);\n const lfCounter = (model.getEOL() === '\\r\\n' ? new LineFeedCounter(text) : null);\n searcher.reset(searchStart.column - 1);\n const m = searcher.next(text);\n if (m) {\n return createFindMatch(this._getMultilineMatchRange(model, deltaOffset, text, lfCounter, m.index, m[0]), m, captureMatches);\n }\n if (searchStart.lineNumber !== 1 || searchStart.column !== 1) {\n // Try again from the top\n return this._doFindNextMatchMultiline(model, new Position(1, 1), searcher, captureMatches);\n }\n return null;\n }\n static _doFindNextMatchLineByLine(model, searchStart, searcher, captureMatches) {\n const lineCount = model.getLineCount();\n const startLineNumber = searchStart.lineNumber;\n // Look in first line\n const text = model.getLineContent(startLineNumber);\n const r = this._findFirstMatchInLine(searcher, text, startLineNumber, searchStart.column, captureMatches);\n if (r) {\n return r;\n }\n for (let i = 1; i <= lineCount; i++) {\n const lineIndex = (startLineNumber + i - 1) % lineCount;\n const text = model.getLineContent(lineIndex + 1);\n const r = this._findFirstMatchInLine(searcher, text, lineIndex + 1, 1, captureMatches);\n if (r) {\n return r;\n }\n }\n return null;\n }\n static _findFirstMatchInLine(searcher, text, lineNumber, fromColumn, captureMatches) {\n // Set regex to search from column\n searcher.reset(fromColumn - 1);\n const m = searcher.next(text);\n if (m) {\n return createFindMatch(new Range(lineNumber, m.index + 1, lineNumber, m.index + 1 + m[0].length), m, captureMatches);\n }\n return null;\n }\n static findPreviousMatch(model, searchParams, searchStart, captureMatches) {\n const searchData = searchParams.parseSearchRequest();\n if (!searchData) {\n return null;\n }\n const searcher = new Searcher(searchData.wordSeparators, searchData.regex);\n if (searchData.regex.multiline) {\n return this._doFindPreviousMatchMultiline(model, searchStart, searcher, captureMatches);\n }\n return this._doFindPreviousMatchLineByLine(model, searchStart, searcher, captureMatches);\n }\n static _doFindPreviousMatchMultiline(model, searchStart, searcher, captureMatches) {\n const matches = this._doFindMatchesMultiline(model, new Range(1, 1, searchStart.lineNumber, searchStart.column), searcher, captureMatches, 10 * LIMIT_FIND_COUNT);\n if (matches.length > 0) {\n return matches[matches.length - 1];\n }\n const lineCount = model.getLineCount();\n if (searchStart.lineNumber !== lineCount || searchStart.column !== model.getLineMaxColumn(lineCount)) {\n // Try again with all content\n return this._doFindPreviousMatchMultiline(model, new Position(lineCount, model.getLineMaxColumn(lineCount)), searcher, captureMatches);\n }\n return null;\n }\n static _doFindPreviousMatchLineByLine(model, searchStart, searcher, captureMatches) {\n const lineCount = model.getLineCount();\n const startLineNumber = searchStart.lineNumber;\n // Look in first line\n const text = model.getLineContent(startLineNumber).substring(0, searchStart.column - 1);\n const r = this._findLastMatchInLine(searcher, text, startLineNumber, captureMatches);\n if (r) {\n return r;\n }\n for (let i = 1; i <= lineCount; i++) {\n const lineIndex = (lineCount + startLineNumber - i - 1) % lineCount;\n const text = model.getLineContent(lineIndex + 1);\n const r = this._findLastMatchInLine(searcher, text, lineIndex + 1, captureMatches);\n if (r) {\n return r;\n }\n }\n return null;\n }\n static _findLastMatchInLine(searcher, text, lineNumber, captureMatches) {\n let bestResult = null;\n let m;\n searcher.reset(0);\n while ((m = searcher.next(text))) {\n bestResult = createFindMatch(new Range(lineNumber, m.index + 1, lineNumber, m.index + 1 + m[0].length), m, captureMatches);\n }\n return bestResult;\n }\n}\nfunction leftIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) {\n if (matchStartIndex === 0) {\n // Match starts at start of string\n return true;\n }\n const charBefore = text.charCodeAt(matchStartIndex - 1);\n if (wordSeparators.get(charBefore) !== 0 /* WordCharacterClass.Regular */) {\n // The character before the match is a word separator\n return true;\n }\n if (charBefore === 13 /* CharCode.CarriageReturn */ || charBefore === 10 /* CharCode.LineFeed */) {\n // The character before the match is line break or carriage return.\n return true;\n }\n if (matchLength > 0) {\n const firstCharInMatch = text.charCodeAt(matchStartIndex);\n if (wordSeparators.get(firstCharInMatch) !== 0 /* WordCharacterClass.Regular */) {\n // The first character inside the match is a word separator\n return true;\n }\n }\n return false;\n}\nfunction rightIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) {\n if (matchStartIndex + matchLength === textLength) {\n // Match ends at end of string\n return true;\n }\n const charAfter = text.charCodeAt(matchStartIndex + matchLength);\n if (wordSeparators.get(charAfter) !== 0 /* WordCharacterClass.Regular */) {\n // The character after the match is a word separator\n return true;\n }\n if (charAfter === 13 /* CharCode.CarriageReturn */ || charAfter === 10 /* CharCode.LineFeed */) {\n // The character after the match is line break or carriage return.\n return true;\n }\n if (matchLength > 0) {\n const lastCharInMatch = text.charCodeAt(matchStartIndex + matchLength - 1);\n if (wordSeparators.get(lastCharInMatch) !== 0 /* WordCharacterClass.Regular */) {\n // The last character in the match is a word separator\n return true;\n }\n }\n return false;\n}\nexport function isValidMatch(wordSeparators, text, textLength, matchStartIndex, matchLength) {\n return (leftIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength)\n && rightIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength));\n}\nexport class Searcher {\n constructor(wordSeparators, searchRegex) {\n this._wordSeparators = wordSeparators;\n this._searchRegex = searchRegex;\n this._prevMatchStartIndex = -1;\n this._prevMatchLength = 0;\n }\n reset(lastIndex) {\n this._searchRegex.lastIndex = lastIndex;\n this._prevMatchStartIndex = -1;\n this._prevMatchLength = 0;\n }\n next(text) {\n const textLength = text.length;\n let m;\n do {\n if (this._prevMatchStartIndex + this._prevMatchLength === textLength) {\n // Reached the end of the line\n return null;\n }\n m = this._searchRegex.exec(text);\n if (!m) {\n return null;\n }\n const matchStartIndex = m.index;\n const matchLength = m[0].length;\n if (matchStartIndex === this._prevMatchStartIndex && matchLength === this._prevMatchLength) {\n if (matchLength === 0) {\n // the search result is an empty string and won't advance `regex.lastIndex`, so `regex.exec` will stuck here\n // we attempt to recover from that by advancing by two if surrogate pair found and by one otherwise\n if (strings.getNextCodePoint(text, textLength, this._searchRegex.lastIndex) > 0xFFFF) {\n this._searchRegex.lastIndex += 2;\n }\n else {\n this._searchRegex.lastIndex += 1;\n }\n continue;\n }\n // Exit early if the regex matches the same range twice\n return null;\n }\n this._prevMatchStartIndex = matchStartIndex;\n this._prevMatchLength = matchLength;\n if (!this._wordSeparators || isValidMatch(this._wordSeparators, text, textLength, matchStartIndex, matchLength)) {\n return m;\n }\n } while (m);\n return null;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Range } from '../core/range.js';\nimport { Searcher } from '../model/textModelSearch.js';\nimport * as strings from '../../../base/common/strings.js';\nimport { assertNever } from '../../../base/common/assert.js';\nimport { DEFAULT_WORD_REGEXP, getWordAtText } from '../core/wordHelper.js';\nexport class UnicodeTextModelHighlighter {\n static computeUnicodeHighlights(model, options, range) {\n const startLine = range ? range.startLineNumber : 1;\n const endLine = range ? range.endLineNumber : model.getLineCount();\n const codePointHighlighter = new CodePointHighlighter(options);\n const candidates = codePointHighlighter.getCandidateCodePoints();\n let regex;\n if (candidates === 'allNonBasicAscii') {\n regex = new RegExp('[^\\\\t\\\\n\\\\r\\\\x20-\\\\x7E]', 'g');\n }\n else {\n regex = new RegExp(`${buildRegExpCharClassExpr(Array.from(candidates))}`, 'g');\n }\n const searcher = new Searcher(null, regex);\n const ranges = [];\n let hasMore = false;\n let m;\n let ambiguousCharacterCount = 0;\n let invisibleCharacterCount = 0;\n let nonBasicAsciiCharacterCount = 0;\n forLoop: for (let lineNumber = startLine, lineCount = endLine; lineNumber <= lineCount; lineNumber++) {\n const lineContent = model.getLineContent(lineNumber);\n const lineLength = lineContent.length;\n // Reset regex to search from the beginning\n searcher.reset(0);\n do {\n m = searcher.next(lineContent);\n if (m) {\n let startIndex = m.index;\n let endIndex = m.index + m[0].length;\n // Extend range to entire code point\n if (startIndex > 0) {\n const charCodeBefore = lineContent.charCodeAt(startIndex - 1);\n if (strings.isHighSurrogate(charCodeBefore)) {\n startIndex--;\n }\n }\n if (endIndex + 1 < lineLength) {\n const charCodeBefore = lineContent.charCodeAt(endIndex - 1);\n if (strings.isHighSurrogate(charCodeBefore)) {\n endIndex++;\n }\n }\n const str = lineContent.substring(startIndex, endIndex);\n let word = getWordAtText(startIndex + 1, DEFAULT_WORD_REGEXP, lineContent, 0);\n if (word && word.endColumn <= startIndex + 1) {\n // The word does not include the problematic character, ignore the word\n word = null;\n }\n const highlightReason = codePointHighlighter.shouldHighlightNonBasicASCII(str, word ? word.word : null);\n if (highlightReason !== 0 /* SimpleHighlightReason.None */) {\n if (highlightReason === 3 /* SimpleHighlightReason.Ambiguous */) {\n ambiguousCharacterCount++;\n }\n else if (highlightReason === 2 /* SimpleHighlightReason.Invisible */) {\n invisibleCharacterCount++;\n }\n else if (highlightReason === 1 /* SimpleHighlightReason.NonBasicASCII */) {\n nonBasicAsciiCharacterCount++;\n }\n else {\n assertNever(highlightReason);\n }\n const MAX_RESULT_LENGTH = 1000;\n if (ranges.length >= MAX_RESULT_LENGTH) {\n hasMore = true;\n break forLoop;\n }\n ranges.push(new Range(lineNumber, startIndex + 1, lineNumber, endIndex + 1));\n }\n }\n } while (m);\n }\n return {\n ranges,\n hasMore,\n ambiguousCharacterCount,\n invisibleCharacterCount,\n nonBasicAsciiCharacterCount\n };\n }\n static computeUnicodeHighlightReason(char, options) {\n const codePointHighlighter = new CodePointHighlighter(options);\n const reason = codePointHighlighter.shouldHighlightNonBasicASCII(char, null);\n switch (reason) {\n case 0 /* SimpleHighlightReason.None */:\n return null;\n case 2 /* SimpleHighlightReason.Invisible */:\n return { kind: 1 /* UnicodeHighlighterReasonKind.Invisible */ };\n case 3 /* SimpleHighlightReason.Ambiguous */: {\n const codePoint = char.codePointAt(0);\n const primaryConfusable = codePointHighlighter.ambiguousCharacters.getPrimaryConfusable(codePoint);\n const notAmbiguousInLocales = strings.AmbiguousCharacters.getLocales().filter((l) => !strings.AmbiguousCharacters.getInstance(new Set([...options.allowedLocales, l])).isAmbiguous(codePoint));\n return { kind: 0 /* UnicodeHighlighterReasonKind.Ambiguous */, confusableWith: String.fromCodePoint(primaryConfusable), notAmbiguousInLocales };\n }\n case 1 /* SimpleHighlightReason.NonBasicASCII */:\n return { kind: 2 /* UnicodeHighlighterReasonKind.NonBasicAscii */ };\n }\n }\n}\nfunction buildRegExpCharClassExpr(codePoints, flags) {\n const src = `[${strings.escapeRegExpCharacters(codePoints.map((i) => String.fromCodePoint(i)).join(''))}]`;\n return src;\n}\nclass CodePointHighlighter {\n constructor(options) {\n this.options = options;\n this.allowedCodePoints = new Set(options.allowedCodePoints);\n this.ambiguousCharacters = strings.AmbiguousCharacters.getInstance(new Set(options.allowedLocales));\n }\n getCandidateCodePoints() {\n if (this.options.nonBasicASCII) {\n return 'allNonBasicAscii';\n }\n const set = new Set();\n if (this.options.invisibleCharacters) {\n for (const cp of strings.InvisibleCharacters.codePoints) {\n if (!isAllowedInvisibleCharacter(String.fromCodePoint(cp))) {\n set.add(cp);\n }\n }\n }\n if (this.options.ambiguousCharacters) {\n for (const cp of this.ambiguousCharacters.getConfusableCodePoints()) {\n set.add(cp);\n }\n }\n for (const cp of this.allowedCodePoints) {\n set.delete(cp);\n }\n return set;\n }\n shouldHighlightNonBasicASCII(character, wordContext) {\n const codePoint = character.codePointAt(0);\n if (this.allowedCodePoints.has(codePoint)) {\n return 0 /* SimpleHighlightReason.None */;\n }\n if (this.options.nonBasicASCII) {\n return 1 /* SimpleHighlightReason.NonBasicASCII */;\n }\n let hasBasicASCIICharacters = false;\n let hasNonConfusableNonBasicAsciiCharacter = false;\n if (wordContext) {\n for (const char of wordContext) {\n const codePoint = char.codePointAt(0);\n const isBasicASCII = strings.isBasicASCII(char);\n hasBasicASCIICharacters = hasBasicASCIICharacters || isBasicASCII;\n if (!isBasicASCII &&\n !this.ambiguousCharacters.isAmbiguous(codePoint) &&\n !strings.InvisibleCharacters.isInvisibleCharacter(codePoint)) {\n hasNonConfusableNonBasicAsciiCharacter = true;\n }\n }\n }\n if (\n /* Don't allow mixing weird looking characters with ASCII */ !hasBasicASCIICharacters &&\n /* Is there an obviously weird looking character? */ hasNonConfusableNonBasicAsciiCharacter) {\n return 0 /* SimpleHighlightReason.None */;\n }\n if (this.options.invisibleCharacters) {\n // TODO check for emojis\n if (!isAllowedInvisibleCharacter(character) && strings.InvisibleCharacters.isInvisibleCharacter(codePoint)) {\n return 2 /* SimpleHighlightReason.Invisible */;\n }\n }\n if (this.options.ambiguousCharacters) {\n if (this.ambiguousCharacters.isAmbiguous(codePoint)) {\n return 3 /* SimpleHighlightReason.Ambiguous */;\n }\n }\n return 0 /* SimpleHighlightReason.None */;\n }\n}\nfunction isAllowedInvisibleCharacter(character) {\n return character === ' ' || character === '\\n' || character === '\\t';\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport class LinesDiff {\n constructor(changes, \n /**\n * Sorted by original line ranges.\n * The original line ranges and the modified line ranges must be disjoint (but can be touching).\n */\n moves, \n /**\n * Indicates if the time out was reached.\n * In that case, the diffs might be an approximation and the user should be asked to rerun the diff with more time.\n */\n hitTimeout) {\n this.changes = changes;\n this.moves = moves;\n this.hitTimeout = hitTimeout;\n }\n}\nexport class MovedText {\n constructor(lineRangeMapping, changes) {\n this.lineRangeMapping = lineRangeMapping;\n this.changes = changes;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { BugIndicatingError } from '../../../base/common/errors.js';\n/**\n * A range of offsets (0-based).\n*/\nexport class OffsetRange {\n static addRange(range, sortedRanges) {\n let i = 0;\n while (i < sortedRanges.length && sortedRanges[i].endExclusive < range.start) {\n i++;\n }\n let j = i;\n while (j < sortedRanges.length && sortedRanges[j].start <= range.endExclusive) {\n j++;\n }\n if (i === j) {\n sortedRanges.splice(i, 0, range);\n }\n else {\n const start = Math.min(range.start, sortedRanges[i].start);\n const end = Math.max(range.endExclusive, sortedRanges[j - 1].endExclusive);\n sortedRanges.splice(i, j - i, new OffsetRange(start, end));\n }\n }\n static ofLength(length) {\n return new OffsetRange(0, length);\n }\n static ofStartAndLength(start, length) {\n return new OffsetRange(start, start + length);\n }\n constructor(start, endExclusive) {\n this.start = start;\n this.endExclusive = endExclusive;\n if (start > endExclusive) {\n throw new BugIndicatingError(`Invalid range: ${this.toString()}`);\n }\n }\n get isEmpty() {\n return this.start === this.endExclusive;\n }\n delta(offset) {\n return new OffsetRange(this.start + offset, this.endExclusive + offset);\n }\n deltaStart(offset) {\n return new OffsetRange(this.start + offset, this.endExclusive);\n }\n deltaEnd(offset) {\n return new OffsetRange(this.start, this.endExclusive + offset);\n }\n get length() {\n return this.endExclusive - this.start;\n }\n toString() {\n return `[${this.start}, ${this.endExclusive})`;\n }\n contains(offset) {\n return this.start <= offset && offset < this.endExclusive;\n }\n /**\n * for all numbers n: range1.contains(n) or range2.contains(n) => range1.join(range2).contains(n)\n * The joined range is the smallest range that contains both ranges.\n */\n join(other) {\n return new OffsetRange(Math.min(this.start, other.start), Math.max(this.endExclusive, other.endExclusive));\n }\n /**\n * for all numbers n: range1.contains(n) and range2.contains(n) <=> range1.intersect(range2).contains(n)\n *\n * The resulting range is empty if the ranges do not intersect, but touch.\n * If the ranges don't even touch, the result is undefined.\n */\n intersect(other) {\n const start = Math.max(this.start, other.start);\n const end = Math.min(this.endExclusive, other.endExclusive);\n if (start <= end) {\n return new OffsetRange(start, end);\n }\n return undefined;\n }\n intersects(other) {\n const start = Math.max(this.start, other.start);\n const end = Math.min(this.endExclusive, other.endExclusive);\n return start < end;\n }\n isBefore(other) {\n return this.endExclusive <= other.start;\n }\n isAfter(other) {\n return this.start >= other.endExclusive;\n }\n slice(arr) {\n return arr.slice(this.start, this.endExclusive);\n }\n /**\n * Returns the given value if it is contained in this instance, otherwise the closest value that is contained.\n * The range must not be empty.\n */\n clip(value) {\n if (this.isEmpty) {\n throw new BugIndicatingError(`Invalid clipping range: ${this.toString()}`);\n }\n return Math.max(this.start, Math.min(this.endExclusive - 1, value));\n }\n /**\n * Returns `r := value + k * length` such that `r` is contained in this range.\n * The range must not be empty.\n *\n * E.g. `[5, 10).clipCyclic(10) === 5`, `[5, 10).clipCyclic(11) === 6` and `[5, 10).clipCyclic(4) === 9`.\n */\n clipCyclic(value) {\n if (this.isEmpty) {\n throw new BugIndicatingError(`Invalid clipping range: ${this.toString()}`);\n }\n if (value < this.start) {\n return this.endExclusive - ((this.start - value) % this.length);\n }\n if (value >= this.endExclusive) {\n return this.start + ((value - this.start) % this.length);\n }\n return value;\n }\n forEach(f) {\n for (let i = this.start; i < this.endExclusive; i++) {\n f(i);\n }\n }\n}\nexport class OffsetRangeSet {\n constructor() {\n this._sortedRanges = [];\n }\n addRange(range) {\n let i = 0;\n while (i < this._sortedRanges.length && this._sortedRanges[i].endExclusive < range.start) {\n i++;\n }\n let j = i;\n while (j < this._sortedRanges.length && this._sortedRanges[j].start <= range.endExclusive) {\n j++;\n }\n if (i === j) {\n this._sortedRanges.splice(i, 0, range);\n }\n else {\n const start = Math.min(range.start, this._sortedRanges[i].start);\n const end = Math.max(range.endExclusive, this._sortedRanges[j - 1].endExclusive);\n this._sortedRanges.splice(i, j - i, new OffsetRange(start, end));\n }\n }\n toString() {\n return this._sortedRanges.map(r => r.toString()).join(', ');\n }\n /**\n * Returns of there is a value that is contained in this instance and the given range.\n */\n intersectsStrict(other) {\n // TODO use binary search\n let i = 0;\n while (i < this._sortedRanges.length && this._sortedRanges[i].endExclusive <= other.start) {\n i++;\n }\n return i < this._sortedRanges.length && this._sortedRanges[i].start < other.endExclusive;\n }\n intersectWithRange(other) {\n // TODO use binary search + slice\n const result = new OffsetRangeSet();\n for (const range of this._sortedRanges) {\n const intersection = range.intersect(other);\n if (intersection) {\n result.addRange(intersection);\n }\n }\n return result;\n }\n intersectWithRangeLength(other) {\n return this.intersectWithRange(other).length;\n }\n get length() {\n return this._sortedRanges.reduce((prev, cur) => prev + cur.length, 0);\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport function findLast(array, predicate, fromIdx) {\n const idx = findLastIdx(array, predicate);\n if (idx === -1) {\n return undefined;\n }\n return array[idx];\n}\nexport function findLastIdx(array, predicate, fromIndex = array.length - 1) {\n for (let i = fromIndex; i >= 0; i--) {\n const element = array[i];\n if (predicate(element)) {\n return i;\n }\n }\n return -1;\n}\n/**\n * Finds the last item where predicate is true using binary search.\n * `predicate` must be monotonous, i.e. `arr.map(predicate)` must be like `[true, ..., true, false, ..., false]`!\n *\n * @returns `undefined` if no item matches, otherwise the last item that matches the predicate.\n */\nexport function findLastMonotonous(array, predicate) {\n const idx = findLastIdxMonotonous(array, predicate);\n return idx === -1 ? undefined : array[idx];\n}\n/**\n * Finds the last item where predicate is true using binary search.\n * `predicate` must be monotonous, i.e. `arr.map(predicate)` must be like `[true, ..., true, false, ..., false]`!\n *\n * @returns `startIdx - 1` if predicate is false for all items, otherwise the index of the last item that matches the predicate.\n */\nexport function findLastIdxMonotonous(array, predicate, startIdx = 0, endIdxEx = array.length) {\n let i = startIdx;\n let j = endIdxEx;\n while (i < j) {\n const k = Math.floor((i + j) / 2);\n if (predicate(array[k])) {\n i = k + 1;\n }\n else {\n j = k;\n }\n }\n return i - 1;\n}\n/**\n * Finds the first item where predicate is true using binary search.\n * `predicate` must be monotonous, i.e. `arr.map(predicate)` must be like `[false, ..., false, true, ..., true]`!\n *\n * @returns `undefined` if no item matches, otherwise the first item that matches the predicate.\n */\nexport function findFirstMonotonous(array, predicate) {\n const idx = findFirstIdxMonotonousOrArrLen(array, predicate);\n return idx === array.length ? undefined : array[idx];\n}\n/**\n * Finds the first item where predicate is true using binary search.\n * `predicate` must be monotonous, i.e. `arr.map(predicate)` must be like `[false, ..., false, true, ..., true]`!\n *\n * @returns `endIdxEx` if predicate is false for all items, otherwise the index of the first item that matches the predicate.\n */\nexport function findFirstIdxMonotonousOrArrLen(array, predicate, startIdx = 0, endIdxEx = array.length) {\n let i = startIdx;\n let j = endIdxEx;\n while (i < j) {\n const k = Math.floor((i + j) / 2);\n if (predicate(array[k])) {\n j = k;\n }\n else {\n i = k + 1;\n }\n }\n return i;\n}\n/**\n * Use this when\n * * You have a sorted array\n * * You query this array with a monotonous predicate to find the last item that has a certain property.\n * * You query this array multiple times with monotonous predicates that get weaker and weaker.\n */\nexport class MonotonousArray {\n constructor(_array) {\n this._array = _array;\n this._findLastMonotonousLastIdx = 0;\n }\n /**\n * The predicate must be monotonous, i.e. `arr.map(predicate)` must be like `[true, ..., true, false, ..., false]`!\n * For subsequent calls, current predicate must be weaker than (or equal to) the previous predicate, i.e. more entries must be `true`.\n */\n findLastMonotonous(predicate) {\n if (MonotonousArray.assertInvariants) {\n if (this._prevFindLastPredicate) {\n for (const item of this._array) {\n if (this._prevFindLastPredicate(item) && !predicate(item)) {\n throw new Error('MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.');\n }\n }\n }\n this._prevFindLastPredicate = predicate;\n }\n const idx = findLastIdxMonotonous(this._array, predicate, this._findLastMonotonousLastIdx);\n this._findLastMonotonousLastIdx = idx + 1;\n return idx === -1 ? undefined : this._array[idx];\n }\n}\nMonotonousArray.assertInvariants = false;\n/**\n * Returns the first item that is equal to or greater than every other item.\n*/\nexport function findFirstMaxBy(array, comparator) {\n if (array.length === 0) {\n return undefined;\n }\n let max = array[0];\n for (let i = 1; i < array.length; i++) {\n const item = array[i];\n if (comparator(item, max) > 0) {\n max = item;\n }\n }\n return max;\n}\n/**\n * Returns the last item that is equal to or greater than every other item.\n*/\nexport function findLastMaxBy(array, comparator) {\n if (array.length === 0) {\n return undefined;\n }\n let max = array[0];\n for (let i = 1; i < array.length; i++) {\n const item = array[i];\n if (comparator(item, max) >= 0) {\n max = item;\n }\n }\n return max;\n}\n/**\n * Returns the first item that is equal to or less than every other item.\n*/\nexport function findFirstMinBy(array, comparator) {\n return findFirstMaxBy(array, (a, b) => -comparator(a, b));\n}\nexport function findMaxIdxBy(array, comparator) {\n if (array.length === 0) {\n return -1;\n }\n let maxIdx = 0;\n for (let i = 1; i < array.length; i++) {\n const item = array[i];\n if (comparator(item, array[maxIdx]) > 0) {\n maxIdx = i;\n }\n }\n return maxIdx;\n}\n/**\n * Returns the first mapped value of the array which is not undefined.\n */\nexport function mapFindFirst(items, mapFn) {\n for (const value of items) {\n const mapped = mapFn(value);\n if (mapped !== undefined) {\n return mapped;\n }\n }\n return undefined;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { BugIndicatingError } from '../../../base/common/errors.js';\nimport { OffsetRange } from './offsetRange.js';\nimport { Range } from './range.js';\nimport { findFirstIdxMonotonousOrArrLen, findLastIdxMonotonous, findLastMonotonous } from '../../../base/common/arraysFind.js';\n/**\n * A range of lines (1-based).\n */\nexport class LineRange {\n static fromRangeInclusive(range) {\n return new LineRange(range.startLineNumber, range.endLineNumber + 1);\n }\n /**\n * @param lineRanges An array of sorted line ranges.\n */\n static joinMany(lineRanges) {\n if (lineRanges.length === 0) {\n return [];\n }\n let result = new LineRangeSet(lineRanges[0].slice());\n for (let i = 1; i < lineRanges.length; i++) {\n result = result.getUnion(new LineRangeSet(lineRanges[i].slice()));\n }\n return result.ranges;\n }\n static ofLength(startLineNumber, length) {\n return new LineRange(startLineNumber, startLineNumber + length);\n }\n /**\n * @internal\n */\n static deserialize(lineRange) {\n return new LineRange(lineRange[0], lineRange[1]);\n }\n constructor(startLineNumber, endLineNumberExclusive) {\n if (startLineNumber > endLineNumberExclusive) {\n throw new BugIndicatingError(`startLineNumber ${startLineNumber} cannot be after endLineNumberExclusive ${endLineNumberExclusive}`);\n }\n this.startLineNumber = startLineNumber;\n this.endLineNumberExclusive = endLineNumberExclusive;\n }\n /**\n * Indicates if this line range contains the given line number.\n */\n contains(lineNumber) {\n return this.startLineNumber <= lineNumber && lineNumber < this.endLineNumberExclusive;\n }\n /**\n * Indicates if this line range is empty.\n */\n get isEmpty() {\n return this.startLineNumber === this.endLineNumberExclusive;\n }\n /**\n * Moves this line range by the given offset of line numbers.\n */\n delta(offset) {\n return new LineRange(this.startLineNumber + offset, this.endLineNumberExclusive + offset);\n }\n deltaLength(offset) {\n return new LineRange(this.startLineNumber, this.endLineNumberExclusive + offset);\n }\n /**\n * The number of lines this line range spans.\n */\n get length() {\n return this.endLineNumberExclusive - this.startLineNumber;\n }\n /**\n * Creates a line range that combines this and the given line range.\n */\n join(other) {\n return new LineRange(Math.min(this.startLineNumber, other.startLineNumber), Math.max(this.endLineNumberExclusive, other.endLineNumberExclusive));\n }\n toString() {\n return `[${this.startLineNumber},${this.endLineNumberExclusive})`;\n }\n /**\n * The resulting range is empty if the ranges do not intersect, but touch.\n * If the ranges don't even touch, the result is undefined.\n */\n intersect(other) {\n const startLineNumber = Math.max(this.startLineNumber, other.startLineNumber);\n const endLineNumberExclusive = Math.min(this.endLineNumberExclusive, other.endLineNumberExclusive);\n if (startLineNumber <= endLineNumberExclusive) {\n return new LineRange(startLineNumber, endLineNumberExclusive);\n }\n return undefined;\n }\n intersectsStrict(other) {\n return this.startLineNumber < other.endLineNumberExclusive && other.startLineNumber < this.endLineNumberExclusive;\n }\n overlapOrTouch(other) {\n return this.startLineNumber <= other.endLineNumberExclusive && other.startLineNumber <= this.endLineNumberExclusive;\n }\n equals(b) {\n return this.startLineNumber === b.startLineNumber && this.endLineNumberExclusive === b.endLineNumberExclusive;\n }\n toInclusiveRange() {\n if (this.isEmpty) {\n return null;\n }\n return new Range(this.startLineNumber, 1, this.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER);\n }\n toExclusiveRange() {\n return new Range(this.startLineNumber, 1, this.endLineNumberExclusive, 1);\n }\n mapToLineArray(f) {\n const result = [];\n for (let lineNumber = this.startLineNumber; lineNumber < this.endLineNumberExclusive; lineNumber++) {\n result.push(f(lineNumber));\n }\n return result;\n }\n forEach(f) {\n for (let lineNumber = this.startLineNumber; lineNumber < this.endLineNumberExclusive; lineNumber++) {\n f(lineNumber);\n }\n }\n /**\n * @internal\n */\n serialize() {\n return [this.startLineNumber, this.endLineNumberExclusive];\n }\n includes(lineNumber) {\n return this.startLineNumber <= lineNumber && lineNumber < this.endLineNumberExclusive;\n }\n /**\n * Converts this 1-based line range to a 0-based offset range (subtracts 1!).\n * @internal\n */\n toOffsetRange() {\n return new OffsetRange(this.startLineNumber - 1, this.endLineNumberExclusive - 1);\n }\n}\nexport class LineRangeSet {\n constructor(\n /**\n * Sorted by start line number.\n * No two line ranges are touching or intersecting.\n */\n _normalizedRanges = []) {\n this._normalizedRanges = _normalizedRanges;\n }\n get ranges() {\n return this._normalizedRanges;\n }\n addRange(range) {\n if (range.length === 0) {\n return;\n }\n // Idea: Find joinRange such that:\n // replaceRange = _normalizedRanges.replaceRange(joinRange, range.joinAll(joinRange.map(idx => this._normalizedRanges[idx])))\n // idx of first element that touches range or that is after range\n const joinRangeStartIdx = findFirstIdxMonotonousOrArrLen(this._normalizedRanges, r => r.endLineNumberExclusive >= range.startLineNumber);\n // idx of element after { last element that touches range or that is before range }\n const joinRangeEndIdxExclusive = findLastIdxMonotonous(this._normalizedRanges, r => r.startLineNumber <= range.endLineNumberExclusive) + 1;\n if (joinRangeStartIdx === joinRangeEndIdxExclusive) {\n // If there is no element that touches range, then joinRangeStartIdx === joinRangeEndIdxExclusive and that value is the index of the element after range\n this._normalizedRanges.splice(joinRangeStartIdx, 0, range);\n }\n else if (joinRangeStartIdx === joinRangeEndIdxExclusive - 1) {\n // Else, there is an element that touches range and in this case it is both the first and last element. Thus we can replace it\n const joinRange = this._normalizedRanges[joinRangeStartIdx];\n this._normalizedRanges[joinRangeStartIdx] = joinRange.join(range);\n }\n else {\n // First and last element are different - we need to replace the entire range\n const joinRange = this._normalizedRanges[joinRangeStartIdx].join(this._normalizedRanges[joinRangeEndIdxExclusive - 1]).join(range);\n this._normalizedRanges.splice(joinRangeStartIdx, joinRangeEndIdxExclusive - joinRangeStartIdx, joinRange);\n }\n }\n contains(lineNumber) {\n const rangeThatStartsBeforeEnd = findLastMonotonous(this._normalizedRanges, r => r.startLineNumber <= lineNumber);\n return !!rangeThatStartsBeforeEnd && rangeThatStartsBeforeEnd.endLineNumberExclusive > lineNumber;\n }\n intersects(range) {\n const rangeThatStartsBeforeEnd = findLastMonotonous(this._normalizedRanges, r => r.startLineNumber < range.endLineNumberExclusive);\n return !!rangeThatStartsBeforeEnd && rangeThatStartsBeforeEnd.endLineNumberExclusive > range.startLineNumber;\n }\n getUnion(other) {\n if (this._normalizedRanges.length === 0) {\n return other;\n }\n if (other._normalizedRanges.length === 0) {\n return this;\n }\n const result = [];\n let i1 = 0;\n let i2 = 0;\n let current = null;\n while (i1 < this._normalizedRanges.length || i2 < other._normalizedRanges.length) {\n let next = null;\n if (i1 < this._normalizedRanges.length && i2 < other._normalizedRanges.length) {\n const lineRange1 = this._normalizedRanges[i1];\n const lineRange2 = other._normalizedRanges[i2];\n if (lineRange1.startLineNumber < lineRange2.startLineNumber) {\n next = lineRange1;\n i1++;\n }\n else {\n next = lineRange2;\n i2++;\n }\n }\n else if (i1 < this._normalizedRanges.length) {\n next = this._normalizedRanges[i1];\n i1++;\n }\n else {\n next = other._normalizedRanges[i2];\n i2++;\n }\n if (current === null) {\n current = next;\n }\n else {\n if (current.endLineNumberExclusive >= next.startLineNumber) {\n // merge\n current = new LineRange(current.startLineNumber, Math.max(current.endLineNumberExclusive, next.endLineNumberExclusive));\n }\n else {\n // push\n result.push(current);\n current = next;\n }\n }\n }\n if (current !== null) {\n result.push(current);\n }\n return new LineRangeSet(result);\n }\n /**\n * Subtracts all ranges in this set from `range` and returns the result.\n */\n subtractFrom(range) {\n // idx of first element that touches range or that is after range\n const joinRangeStartIdx = findFirstIdxMonotonousOrArrLen(this._normalizedRanges, r => r.endLineNumberExclusive >= range.startLineNumber);\n // idx of element after { last element that touches range or that is before range }\n const joinRangeEndIdxExclusive = findLastIdxMonotonous(this._normalizedRanges, r => r.startLineNumber <= range.endLineNumberExclusive) + 1;\n if (joinRangeStartIdx === joinRangeEndIdxExclusive) {\n return new LineRangeSet([range]);\n }\n const result = [];\n let startLineNumber = range.startLineNumber;\n for (let i = joinRangeStartIdx; i < joinRangeEndIdxExclusive; i++) {\n const r = this._normalizedRanges[i];\n if (r.startLineNumber > startLineNumber) {\n result.push(new LineRange(startLineNumber, r.startLineNumber));\n }\n startLineNumber = r.endLineNumberExclusive;\n }\n if (startLineNumber < range.endLineNumberExclusive) {\n result.push(new LineRange(startLineNumber, range.endLineNumberExclusive));\n }\n return new LineRangeSet(result);\n }\n toString() {\n return this._normalizedRanges.map(r => r.toString()).join(', ');\n }\n getIntersection(other) {\n const result = [];\n let i1 = 0;\n let i2 = 0;\n while (i1 < this._normalizedRanges.length && i2 < other._normalizedRanges.length) {\n const r1 = this._normalizedRanges[i1];\n const r2 = other._normalizedRanges[i2];\n const i = r1.intersect(r2);\n if (i && !i.isEmpty) {\n result.push(i);\n }\n if (r1.endLineNumberExclusive < r2.endLineNumberExclusive) {\n i1++;\n }\n else {\n i2++;\n }\n }\n return new LineRangeSet(result);\n }\n getWithDelta(value) {\n return new LineRangeSet(this._normalizedRanges.map(r => r.delta(value)));\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { LineRange } from '../core/lineRange.js';\n/**\n * Maps a line range in the original text model to a line range in the modified text model.\n */\nexport class LineRangeMapping {\n static inverse(mapping, originalLineCount, modifiedLineCount) {\n const result = [];\n let lastOriginalEndLineNumber = 1;\n let lastModifiedEndLineNumber = 1;\n for (const m of mapping) {\n const r = new LineRangeMapping(new LineRange(lastOriginalEndLineNumber, m.original.startLineNumber), new LineRange(lastModifiedEndLineNumber, m.modified.startLineNumber));\n if (!r.modified.isEmpty) {\n result.push(r);\n }\n lastOriginalEndLineNumber = m.original.endLineNumberExclusive;\n lastModifiedEndLineNumber = m.modified.endLineNumberExclusive;\n }\n const r = new LineRangeMapping(new LineRange(lastOriginalEndLineNumber, originalLineCount + 1), new LineRange(lastModifiedEndLineNumber, modifiedLineCount + 1));\n if (!r.modified.isEmpty) {\n result.push(r);\n }\n return result;\n }\n static clip(mapping, originalRange, modifiedRange) {\n const result = [];\n for (const m of mapping) {\n const original = m.original.intersect(originalRange);\n const modified = m.modified.intersect(modifiedRange);\n if (original && !original.isEmpty && modified && !modified.isEmpty) {\n result.push(new LineRangeMapping(original, modified));\n }\n }\n return result;\n }\n constructor(originalRange, modifiedRange) {\n this.original = originalRange;\n this.modified = modifiedRange;\n }\n toString() {\n return `{${this.original.toString()}->${this.modified.toString()}}`;\n }\n flip() {\n return new LineRangeMapping(this.modified, this.original);\n }\n join(other) {\n return new LineRangeMapping(this.original.join(other.original), this.modified.join(other.modified));\n }\n}\n/**\n * Maps a line range in the original text model to a line range in the modified text model.\n * Also contains inner range mappings.\n */\nexport class DetailedLineRangeMapping extends LineRangeMapping {\n constructor(originalRange, modifiedRange, innerChanges) {\n super(originalRange, modifiedRange);\n this.innerChanges = innerChanges;\n }\n flip() {\n var _a;\n return new DetailedLineRangeMapping(this.modified, this.original, (_a = this.innerChanges) === null || _a === void 0 ? void 0 : _a.map(c => c.flip()));\n }\n}\n/**\n * Maps a range in the original text model to a range in the modified text model.\n */\nexport class RangeMapping {\n constructor(originalRange, modifiedRange) {\n this.originalRange = originalRange;\n this.modifiedRange = modifiedRange;\n }\n toString() {\n return `{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`;\n }\n flip() {\n return new RangeMapping(this.modifiedRange, this.originalRange);\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { LcsDiff } from '../../../base/common/diff/diff.js';\nimport { LinesDiff } from './linesDiffComputer.js';\nimport { RangeMapping, DetailedLineRangeMapping } from './rangeMapping.js';\nimport * as strings from '../../../base/common/strings.js';\nimport { Range } from '../core/range.js';\nimport { assertFn, checkAdjacentItems } from '../../../base/common/assert.js';\nimport { LineRange } from '../core/lineRange.js';\nconst MINIMUM_MATCHING_CHARACTER_LENGTH = 3;\nexport class LegacyLinesDiffComputer {\n computeDiff(originalLines, modifiedLines, options) {\n var _a;\n const diffComputer = new DiffComputer(originalLines, modifiedLines, {\n maxComputationTime: options.maxComputationTimeMs,\n shouldIgnoreTrimWhitespace: options.ignoreTrimWhitespace,\n shouldComputeCharChanges: true,\n shouldMakePrettyDiff: true,\n shouldPostProcessCharChanges: true,\n });\n const result = diffComputer.computeDiff();\n const changes = [];\n let lastChange = null;\n for (const c of result.changes) {\n let originalRange;\n if (c.originalEndLineNumber === 0) {\n // Insertion\n originalRange = new LineRange(c.originalStartLineNumber + 1, c.originalStartLineNumber + 1);\n }\n else {\n originalRange = new LineRange(c.originalStartLineNumber, c.originalEndLineNumber + 1);\n }\n let modifiedRange;\n if (c.modifiedEndLineNumber === 0) {\n // Deletion\n modifiedRange = new LineRange(c.modifiedStartLineNumber + 1, c.modifiedStartLineNumber + 1);\n }\n else {\n modifiedRange = new LineRange(c.modifiedStartLineNumber, c.modifiedEndLineNumber + 1);\n }\n let change = new DetailedLineRangeMapping(originalRange, modifiedRange, (_a = c.charChanges) === null || _a === void 0 ? void 0 : _a.map(c => new RangeMapping(new Range(c.originalStartLineNumber, c.originalStartColumn, c.originalEndLineNumber, c.originalEndColumn), new Range(c.modifiedStartLineNumber, c.modifiedStartColumn, c.modifiedEndLineNumber, c.modifiedEndColumn))));\n if (lastChange) {\n if (lastChange.modified.endLineNumberExclusive === change.modified.startLineNumber\n || lastChange.original.endLineNumberExclusive === change.original.startLineNumber) {\n // join touching diffs. Probably moving diffs up/down in the algorithm causes touching diffs.\n change = new DetailedLineRangeMapping(lastChange.original.join(change.original), lastChange.modified.join(change.modified), lastChange.innerChanges && change.innerChanges ?\n lastChange.innerChanges.concat(change.innerChanges) : undefined);\n changes.pop();\n }\n }\n changes.push(change);\n lastChange = change;\n }\n assertFn(() => {\n return checkAdjacentItems(changes, (m1, m2) => m2.original.startLineNumber - m1.original.endLineNumberExclusive === m2.modified.startLineNumber - m1.modified.endLineNumberExclusive &&\n // There has to be an unchanged line in between (otherwise both diffs should have been joined)\n m1.original.endLineNumberExclusive < m2.original.startLineNumber &&\n m1.modified.endLineNumberExclusive < m2.modified.startLineNumber);\n });\n return new LinesDiff(changes, [], result.quitEarly);\n }\n}\nfunction computeDiff(originalSequence, modifiedSequence, continueProcessingPredicate, pretty) {\n const diffAlgo = new LcsDiff(originalSequence, modifiedSequence, continueProcessingPredicate);\n return diffAlgo.ComputeDiff(pretty);\n}\nclass LineSequence {\n constructor(lines) {\n const startColumns = [];\n const endColumns = [];\n for (let i = 0, length = lines.length; i < length; i++) {\n startColumns[i] = getFirstNonBlankColumn(lines[i], 1);\n endColumns[i] = getLastNonBlankColumn(lines[i], 1);\n }\n this.lines = lines;\n this._startColumns = startColumns;\n this._endColumns = endColumns;\n }\n getElements() {\n const elements = [];\n for (let i = 0, len = this.lines.length; i < len; i++) {\n elements[i] = this.lines[i].substring(this._startColumns[i] - 1, this._endColumns[i] - 1);\n }\n return elements;\n }\n getStrictElement(index) {\n return this.lines[index];\n }\n getStartLineNumber(i) {\n return i + 1;\n }\n getEndLineNumber(i) {\n return i + 1;\n }\n createCharSequence(shouldIgnoreTrimWhitespace, startIndex, endIndex) {\n const charCodes = [];\n const lineNumbers = [];\n const columns = [];\n let len = 0;\n for (let index = startIndex; index <= endIndex; index++) {\n const lineContent = this.lines[index];\n const startColumn = (shouldIgnoreTrimWhitespace ? this._startColumns[index] : 1);\n const endColumn = (shouldIgnoreTrimWhitespace ? this._endColumns[index] : lineContent.length + 1);\n for (let col = startColumn; col < endColumn; col++) {\n charCodes[len] = lineContent.charCodeAt(col - 1);\n lineNumbers[len] = index + 1;\n columns[len] = col;\n len++;\n }\n if (!shouldIgnoreTrimWhitespace && index < endIndex) {\n // Add \\n if trim whitespace is not ignored\n charCodes[len] = 10 /* CharCode.LineFeed */;\n lineNumbers[len] = index + 1;\n columns[len] = lineContent.length + 1;\n len++;\n }\n }\n return new CharSequence(charCodes, lineNumbers, columns);\n }\n}\nclass CharSequence {\n constructor(charCodes, lineNumbers, columns) {\n this._charCodes = charCodes;\n this._lineNumbers = lineNumbers;\n this._columns = columns;\n }\n toString() {\n return ('[' + this._charCodes.map((s, idx) => (s === 10 /* CharCode.LineFeed */ ? '\\\\n' : String.fromCharCode(s)) + `-(${this._lineNumbers[idx]},${this._columns[idx]})`).join(', ') + ']');\n }\n _assertIndex(index, arr) {\n if (index < 0 || index >= arr.length) {\n throw new Error(`Illegal index`);\n }\n }\n getElements() {\n return this._charCodes;\n }\n getStartLineNumber(i) {\n if (i > 0 && i === this._lineNumbers.length) {\n // the start line number of the element after the last element\n // is the end line number of the last element\n return this.getEndLineNumber(i - 1);\n }\n this._assertIndex(i, this._lineNumbers);\n return this._lineNumbers[i];\n }\n getEndLineNumber(i) {\n if (i === -1) {\n // the end line number of the element before the first element\n // is the start line number of the first element\n return this.getStartLineNumber(i + 1);\n }\n this._assertIndex(i, this._lineNumbers);\n if (this._charCodes[i] === 10 /* CharCode.LineFeed */) {\n return this._lineNumbers[i] + 1;\n }\n return this._lineNumbers[i];\n }\n getStartColumn(i) {\n if (i > 0 && i === this._columns.length) {\n // the start column of the element after the last element\n // is the end column of the last element\n return this.getEndColumn(i - 1);\n }\n this._assertIndex(i, this._columns);\n return this._columns[i];\n }\n getEndColumn(i) {\n if (i === -1) {\n // the end column of the element before the first element\n // is the start column of the first element\n return this.getStartColumn(i + 1);\n }\n this._assertIndex(i, this._columns);\n if (this._charCodes[i] === 10 /* CharCode.LineFeed */) {\n return 1;\n }\n return this._columns[i] + 1;\n }\n}\nclass CharChange {\n constructor(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn) {\n this.originalStartLineNumber = originalStartLineNumber;\n this.originalStartColumn = originalStartColumn;\n this.originalEndLineNumber = originalEndLineNumber;\n this.originalEndColumn = originalEndColumn;\n this.modifiedStartLineNumber = modifiedStartLineNumber;\n this.modifiedStartColumn = modifiedStartColumn;\n this.modifiedEndLineNumber = modifiedEndLineNumber;\n this.modifiedEndColumn = modifiedEndColumn;\n }\n static createFromDiffChange(diffChange, originalCharSequence, modifiedCharSequence) {\n const originalStartLineNumber = originalCharSequence.getStartLineNumber(diffChange.originalStart);\n const originalStartColumn = originalCharSequence.getStartColumn(diffChange.originalStart);\n const originalEndLineNumber = originalCharSequence.getEndLineNumber(diffChange.originalStart + diffChange.originalLength - 1);\n const originalEndColumn = originalCharSequence.getEndColumn(diffChange.originalStart + diffChange.originalLength - 1);\n const modifiedStartLineNumber = modifiedCharSequence.getStartLineNumber(diffChange.modifiedStart);\n const modifiedStartColumn = modifiedCharSequence.getStartColumn(diffChange.modifiedStart);\n const modifiedEndLineNumber = modifiedCharSequence.getEndLineNumber(diffChange.modifiedStart + diffChange.modifiedLength - 1);\n const modifiedEndColumn = modifiedCharSequence.getEndColumn(diffChange.modifiedStart + diffChange.modifiedLength - 1);\n return new CharChange(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn);\n }\n}\nfunction postProcessCharChanges(rawChanges) {\n if (rawChanges.length <= 1) {\n return rawChanges;\n }\n const result = [rawChanges[0]];\n let prevChange = result[0];\n for (let i = 1, len = rawChanges.length; i < len; i++) {\n const currChange = rawChanges[i];\n const originalMatchingLength = currChange.originalStart - (prevChange.originalStart + prevChange.originalLength);\n const modifiedMatchingLength = currChange.modifiedStart - (prevChange.modifiedStart + prevChange.modifiedLength);\n // Both of the above should be equal, but the continueProcessingPredicate may prevent this from being true\n const matchingLength = Math.min(originalMatchingLength, modifiedMatchingLength);\n if (matchingLength < MINIMUM_MATCHING_CHARACTER_LENGTH) {\n // Merge the current change into the previous one\n prevChange.originalLength = (currChange.originalStart + currChange.originalLength) - prevChange.originalStart;\n prevChange.modifiedLength = (currChange.modifiedStart + currChange.modifiedLength) - prevChange.modifiedStart;\n }\n else {\n // Add the current change\n result.push(currChange);\n prevChange = currChange;\n }\n }\n return result;\n}\nclass LineChange {\n constructor(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges) {\n this.originalStartLineNumber = originalStartLineNumber;\n this.originalEndLineNumber = originalEndLineNumber;\n this.modifiedStartLineNumber = modifiedStartLineNumber;\n this.modifiedEndLineNumber = modifiedEndLineNumber;\n this.charChanges = charChanges;\n }\n static createFromDiffResult(shouldIgnoreTrimWhitespace, diffChange, originalLineSequence, modifiedLineSequence, continueCharDiff, shouldComputeCharChanges, shouldPostProcessCharChanges) {\n let originalStartLineNumber;\n let originalEndLineNumber;\n let modifiedStartLineNumber;\n let modifiedEndLineNumber;\n let charChanges = undefined;\n if (diffChange.originalLength === 0) {\n originalStartLineNumber = originalLineSequence.getStartLineNumber(diffChange.originalStart) - 1;\n originalEndLineNumber = 0;\n }\n else {\n originalStartLineNumber = originalLineSequence.getStartLineNumber(diffChange.originalStart);\n originalEndLineNumber = originalLineSequence.getEndLineNumber(diffChange.originalStart + diffChange.originalLength - 1);\n }\n if (diffChange.modifiedLength === 0) {\n modifiedStartLineNumber = modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart) - 1;\n modifiedEndLineNumber = 0;\n }\n else {\n modifiedStartLineNumber = modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart);\n modifiedEndLineNumber = modifiedLineSequence.getEndLineNumber(diffChange.modifiedStart + diffChange.modifiedLength - 1);\n }\n if (shouldComputeCharChanges && diffChange.originalLength > 0 && diffChange.originalLength < 20 && diffChange.modifiedLength > 0 && diffChange.modifiedLength < 20 && continueCharDiff()) {\n // Compute character changes for diff chunks of at most 20 lines...\n const originalCharSequence = originalLineSequence.createCharSequence(shouldIgnoreTrimWhitespace, diffChange.originalStart, diffChange.originalStart + diffChange.originalLength - 1);\n const modifiedCharSequence = modifiedLineSequence.createCharSequence(shouldIgnoreTrimWhitespace, diffChange.modifiedStart, diffChange.modifiedStart + diffChange.modifiedLength - 1);\n if (originalCharSequence.getElements().length > 0 && modifiedCharSequence.getElements().length > 0) {\n let rawChanges = computeDiff(originalCharSequence, modifiedCharSequence, continueCharDiff, true).changes;\n if (shouldPostProcessCharChanges) {\n rawChanges = postProcessCharChanges(rawChanges);\n }\n charChanges = [];\n for (let i = 0, length = rawChanges.length; i < length; i++) {\n charChanges.push(CharChange.createFromDiffChange(rawChanges[i], originalCharSequence, modifiedCharSequence));\n }\n }\n }\n return new LineChange(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges);\n }\n}\nexport class DiffComputer {\n constructor(originalLines, modifiedLines, opts) {\n this.shouldComputeCharChanges = opts.shouldComputeCharChanges;\n this.shouldPostProcessCharChanges = opts.shouldPostProcessCharChanges;\n this.shouldIgnoreTrimWhitespace = opts.shouldIgnoreTrimWhitespace;\n this.shouldMakePrettyDiff = opts.shouldMakePrettyDiff;\n this.originalLines = originalLines;\n this.modifiedLines = modifiedLines;\n this.original = new LineSequence(originalLines);\n this.modified = new LineSequence(modifiedLines);\n this.continueLineDiff = createContinueProcessingPredicate(opts.maxComputationTime);\n this.continueCharDiff = createContinueProcessingPredicate(opts.maxComputationTime === 0 ? 0 : Math.min(opts.maxComputationTime, 5000)); // never run after 5s for character changes...\n }\n computeDiff() {\n if (this.original.lines.length === 1 && this.original.lines[0].length === 0) {\n // empty original => fast path\n if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) {\n return {\n quitEarly: false,\n changes: []\n };\n }\n return {\n quitEarly: false,\n changes: [{\n originalStartLineNumber: 1,\n originalEndLineNumber: 1,\n modifiedStartLineNumber: 1,\n modifiedEndLineNumber: this.modified.lines.length,\n charChanges: undefined\n }]\n };\n }\n if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) {\n // empty modified => fast path\n return {\n quitEarly: false,\n changes: [{\n originalStartLineNumber: 1,\n originalEndLineNumber: this.original.lines.length,\n modifiedStartLineNumber: 1,\n modifiedEndLineNumber: 1,\n charChanges: undefined\n }]\n };\n }\n const diffResult = computeDiff(this.original, this.modified, this.continueLineDiff, this.shouldMakePrettyDiff);\n const rawChanges = diffResult.changes;\n const quitEarly = diffResult.quitEarly;\n // The diff is always computed with ignoring trim whitespace\n // This ensures we get the prettiest diff\n if (this.shouldIgnoreTrimWhitespace) {\n const lineChanges = [];\n for (let i = 0, length = rawChanges.length; i < length; i++) {\n lineChanges.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, rawChanges[i], this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges));\n }\n return {\n quitEarly: quitEarly,\n changes: lineChanges\n };\n }\n // Need to post-process and introduce changes where the trim whitespace is different\n // Note that we are looping starting at -1 to also cover the lines before the first change\n const result = [];\n let originalLineIndex = 0;\n let modifiedLineIndex = 0;\n for (let i = -1 /* !!!! */, len = rawChanges.length; i < len; i++) {\n const nextChange = (i + 1 < len ? rawChanges[i + 1] : null);\n const originalStop = (nextChange ? nextChange.originalStart : this.originalLines.length);\n const modifiedStop = (nextChange ? nextChange.modifiedStart : this.modifiedLines.length);\n while (originalLineIndex < originalStop && modifiedLineIndex < modifiedStop) {\n const originalLine = this.originalLines[originalLineIndex];\n const modifiedLine = this.modifiedLines[modifiedLineIndex];\n if (originalLine !== modifiedLine) {\n // These lines differ only in trim whitespace\n // Check the leading whitespace\n {\n let originalStartColumn = getFirstNonBlankColumn(originalLine, 1);\n let modifiedStartColumn = getFirstNonBlankColumn(modifiedLine, 1);\n while (originalStartColumn > 1 && modifiedStartColumn > 1) {\n const originalChar = originalLine.charCodeAt(originalStartColumn - 2);\n const modifiedChar = modifiedLine.charCodeAt(modifiedStartColumn - 2);\n if (originalChar !== modifiedChar) {\n break;\n }\n originalStartColumn--;\n modifiedStartColumn--;\n }\n if (originalStartColumn > 1 || modifiedStartColumn > 1) {\n this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, 1, originalStartColumn, modifiedLineIndex + 1, 1, modifiedStartColumn);\n }\n }\n // Check the trailing whitespace\n {\n let originalEndColumn = getLastNonBlankColumn(originalLine, 1);\n let modifiedEndColumn = getLastNonBlankColumn(modifiedLine, 1);\n const originalMaxColumn = originalLine.length + 1;\n const modifiedMaxColumn = modifiedLine.length + 1;\n while (originalEndColumn < originalMaxColumn && modifiedEndColumn < modifiedMaxColumn) {\n const originalChar = originalLine.charCodeAt(originalEndColumn - 1);\n const modifiedChar = originalLine.charCodeAt(modifiedEndColumn - 1);\n if (originalChar !== modifiedChar) {\n break;\n }\n originalEndColumn++;\n modifiedEndColumn++;\n }\n if (originalEndColumn < originalMaxColumn || modifiedEndColumn < modifiedMaxColumn) {\n this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, originalEndColumn, originalMaxColumn, modifiedLineIndex + 1, modifiedEndColumn, modifiedMaxColumn);\n }\n }\n }\n originalLineIndex++;\n modifiedLineIndex++;\n }\n if (nextChange) {\n // Emit the actual change\n result.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, nextChange, this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges));\n originalLineIndex += nextChange.originalLength;\n modifiedLineIndex += nextChange.modifiedLength;\n }\n }\n return {\n quitEarly: quitEarly,\n changes: result\n };\n }\n _pushTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) {\n if (this._mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn)) {\n // Merged into previous\n return;\n }\n let charChanges = undefined;\n if (this.shouldComputeCharChanges) {\n charChanges = [new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)];\n }\n result.push(new LineChange(originalLineNumber, originalLineNumber, modifiedLineNumber, modifiedLineNumber, charChanges));\n }\n _mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) {\n const len = result.length;\n if (len === 0) {\n return false;\n }\n const prevChange = result[len - 1];\n if (prevChange.originalEndLineNumber === 0 || prevChange.modifiedEndLineNumber === 0) {\n // Don't merge with inserts/deletes\n return false;\n }\n if (prevChange.originalEndLineNumber === originalLineNumber && prevChange.modifiedEndLineNumber === modifiedLineNumber) {\n if (this.shouldComputeCharChanges && prevChange.charChanges) {\n prevChange.charChanges.push(new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn));\n }\n return true;\n }\n if (prevChange.originalEndLineNumber + 1 === originalLineNumber && prevChange.modifiedEndLineNumber + 1 === modifiedLineNumber) {\n prevChange.originalEndLineNumber = originalLineNumber;\n prevChange.modifiedEndLineNumber = modifiedLineNumber;\n if (this.shouldComputeCharChanges && prevChange.charChanges) {\n prevChange.charChanges.push(new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn));\n }\n return true;\n }\n return false;\n }\n}\nfunction getFirstNonBlankColumn(txt, defaultValue) {\n const r = strings.firstNonWhitespaceIndex(txt);\n if (r === -1) {\n return defaultValue;\n }\n return r + 1;\n}\nfunction getLastNonBlankColumn(txt, defaultValue) {\n const r = strings.lastNonWhitespaceIndex(txt);\n if (r === -1) {\n return defaultValue;\n }\n return r + 2;\n}\nfunction createContinueProcessingPredicate(maximumRuntime) {\n if (maximumRuntime === 0) {\n return () => true;\n }\n const startTime = Date.now();\n return () => {\n return Date.now() - startTime < maximumRuntime;\n };\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { forEachAdjacent } from '../../../../../base/common/arrays.js';\nimport { BugIndicatingError } from '../../../../../base/common/errors.js';\nimport { OffsetRange } from '../../../core/offsetRange.js';\nexport class DiffAlgorithmResult {\n static trivial(seq1, seq2) {\n return new DiffAlgorithmResult([new SequenceDiff(OffsetRange.ofLength(seq1.length), OffsetRange.ofLength(seq2.length))], false);\n }\n static trivialTimedOut(seq1, seq2) {\n return new DiffAlgorithmResult([new SequenceDiff(OffsetRange.ofLength(seq1.length), OffsetRange.ofLength(seq2.length))], true);\n }\n constructor(diffs, \n /**\n * Indicates if the time out was reached.\n * In that case, the diffs might be an approximation and the user should be asked to rerun the diff with more time.\n */\n hitTimeout) {\n this.diffs = diffs;\n this.hitTimeout = hitTimeout;\n }\n}\nexport class SequenceDiff {\n static invert(sequenceDiffs, doc1Length) {\n const result = [];\n forEachAdjacent(sequenceDiffs, (a, b) => {\n result.push(SequenceDiff.fromOffsetPairs(a ? a.getEndExclusives() : OffsetPair.zero, b ? b.getStarts() : new OffsetPair(doc1Length, (a ? a.seq2Range.endExclusive - a.seq1Range.endExclusive : 0) + doc1Length)));\n });\n return result;\n }\n static fromOffsetPairs(start, endExclusive) {\n return new SequenceDiff(new OffsetRange(start.offset1, endExclusive.offset1), new OffsetRange(start.offset2, endExclusive.offset2));\n }\n constructor(seq1Range, seq2Range) {\n this.seq1Range = seq1Range;\n this.seq2Range = seq2Range;\n }\n swap() {\n return new SequenceDiff(this.seq2Range, this.seq1Range);\n }\n toString() {\n return `${this.seq1Range} <-> ${this.seq2Range}`;\n }\n join(other) {\n return new SequenceDiff(this.seq1Range.join(other.seq1Range), this.seq2Range.join(other.seq2Range));\n }\n delta(offset) {\n if (offset === 0) {\n return this;\n }\n return new SequenceDiff(this.seq1Range.delta(offset), this.seq2Range.delta(offset));\n }\n deltaStart(offset) {\n if (offset === 0) {\n return this;\n }\n return new SequenceDiff(this.seq1Range.deltaStart(offset), this.seq2Range.deltaStart(offset));\n }\n deltaEnd(offset) {\n if (offset === 0) {\n return this;\n }\n return new SequenceDiff(this.seq1Range.deltaEnd(offset), this.seq2Range.deltaEnd(offset));\n }\n intersect(other) {\n const i1 = this.seq1Range.intersect(other.seq1Range);\n const i2 = this.seq2Range.intersect(other.seq2Range);\n if (!i1 || !i2) {\n return undefined;\n }\n return new SequenceDiff(i1, i2);\n }\n getStarts() {\n return new OffsetPair(this.seq1Range.start, this.seq2Range.start);\n }\n getEndExclusives() {\n return new OffsetPair(this.seq1Range.endExclusive, this.seq2Range.endExclusive);\n }\n}\nexport class OffsetPair {\n constructor(offset1, offset2) {\n this.offset1 = offset1;\n this.offset2 = offset2;\n }\n toString() {\n return `${this.offset1} <-> ${this.offset2}`;\n }\n delta(offset) {\n if (offset === 0) {\n return this;\n }\n return new OffsetPair(this.offset1 + offset, this.offset2 + offset);\n }\n equals(other) {\n return this.offset1 === other.offset1 && this.offset2 === other.offset2;\n }\n}\nOffsetPair.zero = new OffsetPair(0, 0);\nOffsetPair.max = new OffsetPair(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);\nexport class InfiniteTimeout {\n isValid() {\n return true;\n }\n}\nInfiniteTimeout.instance = new InfiniteTimeout();\nexport class DateTimeout {\n constructor(timeout) {\n this.timeout = timeout;\n this.startTime = Date.now();\n this.valid = true;\n if (timeout <= 0) {\n throw new BugIndicatingError('timeout must be positive');\n }\n }\n // Recommendation: Set a log-point `{this.disable()}` in the body\n isValid() {\n const valid = Date.now() - this.startTime < this.timeout;\n if (!valid && this.valid) {\n this.valid = false; // timeout reached\n // eslint-disable-next-line no-debugger\n debugger; // WARNING: Most likely debugging caused the timeout. Call `this.disable()` to continue without timing out.\n }\n return this.valid;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport class Array2D {\n constructor(width, height) {\n this.width = width;\n this.height = height;\n this.array = [];\n this.array = new Array(width * height);\n }\n get(x, y) {\n return this.array[x + y * this.width];\n }\n set(x, y, value) {\n this.array[x + y * this.width] = value;\n }\n}\nexport function isSpace(charCode) {\n return charCode === 32 /* CharCode.Space */ || charCode === 9 /* CharCode.Tab */;\n}\nexport class LineRangeFragment {\n static getKey(chr) {\n let key = this.chrKeys.get(chr);\n if (key === undefined) {\n key = this.chrKeys.size;\n this.chrKeys.set(chr, key);\n }\n return key;\n }\n constructor(range, lines, source) {\n this.range = range;\n this.lines = lines;\n this.source = source;\n this.histogram = [];\n let counter = 0;\n for (let i = range.startLineNumber - 1; i < range.endLineNumberExclusive - 1; i++) {\n const line = lines[i];\n for (let j = 0; j < line.length; j++) {\n counter++;\n const chr = line[j];\n const key = LineRangeFragment.getKey(chr);\n this.histogram[key] = (this.histogram[key] || 0) + 1;\n }\n counter++;\n const key = LineRangeFragment.getKey('\\n');\n this.histogram[key] = (this.histogram[key] || 0) + 1;\n }\n this.totalCount = counter;\n }\n computeSimilarity(other) {\n var _a, _b;\n let sumDifferences = 0;\n const maxLength = Math.max(this.histogram.length, other.histogram.length);\n for (let i = 0; i < maxLength; i++) {\n sumDifferences += Math.abs(((_a = this.histogram[i]) !== null && _a !== void 0 ? _a : 0) - ((_b = other.histogram[i]) !== null && _b !== void 0 ? _b : 0));\n }\n return 1 - (sumDifferences / (this.totalCount + other.totalCount));\n }\n}\nLineRangeFragment.chrKeys = new Map();\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { OffsetRange } from '../../../core/offsetRange.js';\nimport { SequenceDiff, InfiniteTimeout, DiffAlgorithmResult } from './diffAlgorithm.js';\nimport { Array2D } from '../utils.js';\n/**\n * A O(MN) diffing algorithm that supports a score function.\n * The algorithm can be improved by processing the 2d array diagonally.\n*/\nexport class DynamicProgrammingDiffing {\n compute(sequence1, sequence2, timeout = InfiniteTimeout.instance, equalityScore) {\n if (sequence1.length === 0 || sequence2.length === 0) {\n return DiffAlgorithmResult.trivial(sequence1, sequence2);\n }\n /**\n * lcsLengths.get(i, j): Length of the longest common subsequence of sequence1.substring(0, i + 1) and sequence2.substring(0, j + 1).\n */\n const lcsLengths = new Array2D(sequence1.length, sequence2.length);\n const directions = new Array2D(sequence1.length, sequence2.length);\n const lengths = new Array2D(sequence1.length, sequence2.length);\n // ==== Initializing lcsLengths ====\n for (let s1 = 0; s1 < sequence1.length; s1++) {\n for (let s2 = 0; s2 < sequence2.length; s2++) {\n if (!timeout.isValid()) {\n return DiffAlgorithmResult.trivialTimedOut(sequence1, sequence2);\n }\n const horizontalLen = s1 === 0 ? 0 : lcsLengths.get(s1 - 1, s2);\n const verticalLen = s2 === 0 ? 0 : lcsLengths.get(s1, s2 - 1);\n let extendedSeqScore;\n if (sequence1.getElement(s1) === sequence2.getElement(s2)) {\n if (s1 === 0 || s2 === 0) {\n extendedSeqScore = 0;\n }\n else {\n extendedSeqScore = lcsLengths.get(s1 - 1, s2 - 1);\n }\n if (s1 > 0 && s2 > 0 && directions.get(s1 - 1, s2 - 1) === 3) {\n // Prefer consecutive diagonals\n extendedSeqScore += lengths.get(s1 - 1, s2 - 1);\n }\n extendedSeqScore += (equalityScore ? equalityScore(s1, s2) : 1);\n }\n else {\n extendedSeqScore = -1;\n }\n const newValue = Math.max(horizontalLen, verticalLen, extendedSeqScore);\n if (newValue === extendedSeqScore) {\n // Prefer diagonals\n const prevLen = s1 > 0 && s2 > 0 ? lengths.get(s1 - 1, s2 - 1) : 0;\n lengths.set(s1, s2, prevLen + 1);\n directions.set(s1, s2, 3);\n }\n else if (newValue === horizontalLen) {\n lengths.set(s1, s2, 0);\n directions.set(s1, s2, 1);\n }\n else if (newValue === verticalLen) {\n lengths.set(s1, s2, 0);\n directions.set(s1, s2, 2);\n }\n lcsLengths.set(s1, s2, newValue);\n }\n }\n // ==== Backtracking ====\n const result = [];\n let lastAligningPosS1 = sequence1.length;\n let lastAligningPosS2 = sequence2.length;\n function reportDecreasingAligningPositions(s1, s2) {\n if (s1 + 1 !== lastAligningPosS1 || s2 + 1 !== lastAligningPosS2) {\n result.push(new SequenceDiff(new OffsetRange(s1 + 1, lastAligningPosS1), new OffsetRange(s2 + 1, lastAligningPosS2)));\n }\n lastAligningPosS1 = s1;\n lastAligningPosS2 = s2;\n }\n let s1 = sequence1.length - 1;\n let s2 = sequence2.length - 1;\n while (s1 >= 0 && s2 >= 0) {\n if (directions.get(s1, s2) === 3) {\n reportDecreasingAligningPositions(s1, s2);\n s1--;\n s2--;\n }\n else {\n if (directions.get(s1, s2) === 1) {\n s1--;\n }\n else {\n s2--;\n }\n }\n }\n reportDecreasingAligningPositions(-1, -1);\n result.reverse();\n return new DiffAlgorithmResult(result, false);\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { OffsetRange } from '../../../core/offsetRange.js';\nimport { DiffAlgorithmResult, InfiniteTimeout, SequenceDiff } from './diffAlgorithm.js';\n/**\n * An O(ND) diff algorithm that has a quadratic space worst-case complexity.\n*/\nexport class MyersDiffAlgorithm {\n compute(seq1, seq2, timeout = InfiniteTimeout.instance) {\n // These are common special cases.\n // The early return improves performance dramatically.\n if (seq1.length === 0 || seq2.length === 0) {\n return DiffAlgorithmResult.trivial(seq1, seq2);\n }\n const seqX = seq1; // Text on the x axis\n const seqY = seq2; // Text on the y axis\n function getXAfterSnake(x, y) {\n while (x < seqX.length && y < seqY.length && seqX.getElement(x) === seqY.getElement(y)) {\n x++;\n y++;\n }\n return x;\n }\n let d = 0;\n // V[k]: X value of longest d-line that ends in diagonal k.\n // d-line: path from (0,0) to (x,y) that uses exactly d non-diagonals.\n // diagonal k: Set of points (x,y) with x-y = k.\n // k=1 -> (1,0),(2,1)\n const V = new FastInt32Array();\n V.set(0, getXAfterSnake(0, 0));\n const paths = new FastArrayNegativeIndices();\n paths.set(0, V.get(0) === 0 ? null : new SnakePath(null, 0, 0, V.get(0)));\n let k = 0;\n loop: while (true) {\n d++;\n if (!timeout.isValid()) {\n return DiffAlgorithmResult.trivialTimedOut(seqX, seqY);\n }\n // The paper has `for (k = -d; k <= d; k += 2)`, but we can ignore diagonals that cannot influence the result.\n const lowerBound = -Math.min(d, seqY.length + (d % 2));\n const upperBound = Math.min(d, seqX.length + (d % 2));\n for (k = lowerBound; k <= upperBound; k += 2) {\n let step = 0;\n // We can use the X values of (d-1)-lines to compute X value of the longest d-lines.\n const maxXofDLineTop = k === upperBound ? -1 : V.get(k + 1); // We take a vertical non-diagonal (add a symbol in seqX)\n const maxXofDLineLeft = k === lowerBound ? -1 : V.get(k - 1) + 1; // We take a horizontal non-diagonal (+1 x) (delete a symbol in seqX)\n step++;\n const x = Math.min(Math.max(maxXofDLineTop, maxXofDLineLeft), seqX.length);\n const y = x - k;\n step++;\n if (x > seqX.length || y > seqY.length) {\n // This diagonal is irrelevant for the result.\n // TODO: Don't pay the cost for this in the next iteration.\n continue;\n }\n const newMaxX = getXAfterSnake(x, y);\n V.set(k, newMaxX);\n const lastPath = x === maxXofDLineTop ? paths.get(k + 1) : paths.get(k - 1);\n paths.set(k, newMaxX !== x ? new SnakePath(lastPath, x, y, newMaxX - x) : lastPath);\n if (V.get(k) === seqX.length && V.get(k) - k === seqY.length) {\n break loop;\n }\n }\n }\n let path = paths.get(k);\n const result = [];\n let lastAligningPosS1 = seqX.length;\n let lastAligningPosS2 = seqY.length;\n while (true) {\n const endX = path ? path.x + path.length : 0;\n const endY = path ? path.y + path.length : 0;\n if (endX !== lastAligningPosS1 || endY !== lastAligningPosS2) {\n result.push(new SequenceDiff(new OffsetRange(endX, lastAligningPosS1), new OffsetRange(endY, lastAligningPosS2)));\n }\n if (!path) {\n break;\n }\n lastAligningPosS1 = path.x;\n lastAligningPosS2 = path.y;\n path = path.prev;\n }\n result.reverse();\n return new DiffAlgorithmResult(result, false);\n }\n}\nclass SnakePath {\n constructor(prev, x, y, length) {\n this.prev = prev;\n this.x = x;\n this.y = y;\n this.length = length;\n }\n}\n/**\n * An array that supports fast negative indices.\n*/\nclass FastInt32Array {\n constructor() {\n this.positiveArr = new Int32Array(10);\n this.negativeArr = new Int32Array(10);\n }\n get(idx) {\n if (idx < 0) {\n idx = -idx - 1;\n return this.negativeArr[idx];\n }\n else {\n return this.positiveArr[idx];\n }\n }\n set(idx, value) {\n if (idx < 0) {\n idx = -idx - 1;\n if (idx >= this.negativeArr.length) {\n const arr = this.negativeArr;\n this.negativeArr = new Int32Array(arr.length * 2);\n this.negativeArr.set(arr);\n }\n this.negativeArr[idx] = value;\n }\n else {\n if (idx >= this.positiveArr.length) {\n const arr = this.positiveArr;\n this.positiveArr = new Int32Array(arr.length * 2);\n this.positiveArr.set(arr);\n }\n this.positiveArr[idx] = value;\n }\n }\n}\n/**\n * An array that supports fast negative indices.\n*/\nclass FastArrayNegativeIndices {\n constructor() {\n this.positiveArr = [];\n this.negativeArr = [];\n }\n get(idx) {\n if (idx < 0) {\n idx = -idx - 1;\n return this.negativeArr[idx];\n }\n else {\n return this.positiveArr[idx];\n }\n }\n set(idx, value) {\n if (idx < 0) {\n idx = -idx - 1;\n this.negativeArr[idx] = value;\n }\n else {\n this.positiveArr[idx] = value;\n }\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar _a, _b;\nclass ResourceMapEntry {\n constructor(uri, value) {\n this.uri = uri;\n this.value = value;\n }\n}\nfunction isEntries(arg) {\n return Array.isArray(arg);\n}\nexport class ResourceMap {\n constructor(arg, toKey) {\n this[_a] = 'ResourceMap';\n if (arg instanceof ResourceMap) {\n this.map = new Map(arg.map);\n this.toKey = toKey !== null && toKey !== void 0 ? toKey : ResourceMap.defaultToKey;\n }\n else if (isEntries(arg)) {\n this.map = new Map();\n this.toKey = toKey !== null && toKey !== void 0 ? toKey : ResourceMap.defaultToKey;\n for (const [resource, value] of arg) {\n this.set(resource, value);\n }\n }\n else {\n this.map = new Map();\n this.toKey = arg !== null && arg !== void 0 ? arg : ResourceMap.defaultToKey;\n }\n }\n set(resource, value) {\n this.map.set(this.toKey(resource), new ResourceMapEntry(resource, value));\n return this;\n }\n get(resource) {\n var _c;\n return (_c = this.map.get(this.toKey(resource))) === null || _c === void 0 ? void 0 : _c.value;\n }\n has(resource) {\n return this.map.has(this.toKey(resource));\n }\n get size() {\n return this.map.size;\n }\n clear() {\n this.map.clear();\n }\n delete(resource) {\n return this.map.delete(this.toKey(resource));\n }\n forEach(clb, thisArg) {\n if (typeof thisArg !== 'undefined') {\n clb = clb.bind(thisArg);\n }\n for (const [_, entry] of this.map) {\n clb(entry.value, entry.uri, this);\n }\n }\n *values() {\n for (const entry of this.map.values()) {\n yield entry.value;\n }\n }\n *keys() {\n for (const entry of this.map.values()) {\n yield entry.uri;\n }\n }\n *entries() {\n for (const entry of this.map.values()) {\n yield [entry.uri, entry.value];\n }\n }\n *[(_a = Symbol.toStringTag, Symbol.iterator)]() {\n for (const [, entry] of this.map) {\n yield [entry.uri, entry.value];\n }\n }\n}\nResourceMap.defaultToKey = (resource) => resource.toString();\nexport class LinkedMap {\n constructor() {\n this[_b] = 'LinkedMap';\n this._map = new Map();\n this._head = undefined;\n this._tail = undefined;\n this._size = 0;\n this._state = 0;\n }\n clear() {\n this._map.clear();\n this._head = undefined;\n this._tail = undefined;\n this._size = 0;\n this._state++;\n }\n isEmpty() {\n return !this._head && !this._tail;\n }\n get size() {\n return this._size;\n }\n get first() {\n var _c;\n return (_c = this._head) === null || _c === void 0 ? void 0 : _c.value;\n }\n get last() {\n var _c;\n return (_c = this._tail) === null || _c === void 0 ? void 0 : _c.value;\n }\n has(key) {\n return this._map.has(key);\n }\n get(key, touch = 0 /* Touch.None */) {\n const item = this._map.get(key);\n if (!item) {\n return undefined;\n }\n if (touch !== 0 /* Touch.None */) {\n this.touch(item, touch);\n }\n return item.value;\n }\n set(key, value, touch = 0 /* Touch.None */) {\n let item = this._map.get(key);\n if (item) {\n item.value = value;\n if (touch !== 0 /* Touch.None */) {\n this.touch(item, touch);\n }\n }\n else {\n item = { key, value, next: undefined, previous: undefined };\n switch (touch) {\n case 0 /* Touch.None */:\n this.addItemLast(item);\n break;\n case 1 /* Touch.AsOld */:\n this.addItemFirst(item);\n break;\n case 2 /* Touch.AsNew */:\n this.addItemLast(item);\n break;\n default:\n this.addItemLast(item);\n break;\n }\n this._map.set(key, item);\n this._size++;\n }\n return this;\n }\n delete(key) {\n return !!this.remove(key);\n }\n remove(key) {\n const item = this._map.get(key);\n if (!item) {\n return undefined;\n }\n this._map.delete(key);\n this.removeItem(item);\n this._size--;\n return item.value;\n }\n shift() {\n if (!this._head && !this._tail) {\n return undefined;\n }\n if (!this._head || !this._tail) {\n throw new Error('Invalid list');\n }\n const item = this._head;\n this._map.delete(item.key);\n this.removeItem(item);\n this._size--;\n return item.value;\n }\n forEach(callbackfn, thisArg) {\n const state = this._state;\n let current = this._head;\n while (current) {\n if (thisArg) {\n callbackfn.bind(thisArg)(current.value, current.key, this);\n }\n else {\n callbackfn(current.value, current.key, this);\n }\n if (this._state !== state) {\n throw new Error(`LinkedMap got modified during iteration.`);\n }\n current = current.next;\n }\n }\n keys() {\n const map = this;\n const state = this._state;\n let current = this._head;\n const iterator = {\n [Symbol.iterator]() {\n return iterator;\n },\n next() {\n if (map._state !== state) {\n throw new Error(`LinkedMap got modified during iteration.`);\n }\n if (current) {\n const result = { value: current.key, done: false };\n current = current.next;\n return result;\n }\n else {\n return { value: undefined, done: true };\n }\n }\n };\n return iterator;\n }\n values() {\n const map = this;\n const state = this._state;\n let current = this._head;\n const iterator = {\n [Symbol.iterator]() {\n return iterator;\n },\n next() {\n if (map._state !== state) {\n throw new Error(`LinkedMap got modified during iteration.`);\n }\n if (current) {\n const result = { value: current.value, done: false };\n current = current.next;\n return result;\n }\n else {\n return { value: undefined, done: true };\n }\n }\n };\n return iterator;\n }\n entries() {\n const map = this;\n const state = this._state;\n let current = this._head;\n const iterator = {\n [Symbol.iterator]() {\n return iterator;\n },\n next() {\n if (map._state !== state) {\n throw new Error(`LinkedMap got modified during iteration.`);\n }\n if (current) {\n const result = { value: [current.key, current.value], done: false };\n current = current.next;\n return result;\n }\n else {\n return { value: undefined, done: true };\n }\n }\n };\n return iterator;\n }\n [(_b = Symbol.toStringTag, Symbol.iterator)]() {\n return this.entries();\n }\n trimOld(newSize) {\n if (newSize >= this.size) {\n return;\n }\n if (newSize === 0) {\n this.clear();\n return;\n }\n let current = this._head;\n let currentSize = this.size;\n while (current && currentSize > newSize) {\n this._map.delete(current.key);\n current = current.next;\n currentSize--;\n }\n this._head = current;\n this._size = currentSize;\n if (current) {\n current.previous = undefined;\n }\n this._state++;\n }\n addItemFirst(item) {\n // First time Insert\n if (!this._head && !this._tail) {\n this._tail = item;\n }\n else if (!this._head) {\n throw new Error('Invalid list');\n }\n else {\n item.next = this._head;\n this._head.previous = item;\n }\n this._head = item;\n this._state++;\n }\n addItemLast(item) {\n // First time Insert\n if (!this._head && !this._tail) {\n this._head = item;\n }\n else if (!this._tail) {\n throw new Error('Invalid list');\n }\n else {\n item.previous = this._tail;\n this._tail.next = item;\n }\n this._tail = item;\n this._state++;\n }\n removeItem(item) {\n if (item === this._head && item === this._tail) {\n this._head = undefined;\n this._tail = undefined;\n }\n else if (item === this._head) {\n // This can only happen if size === 1 which is handled\n // by the case above.\n if (!item.next) {\n throw new Error('Invalid list');\n }\n item.next.previous = undefined;\n this._head = item.next;\n }\n else if (item === this._tail) {\n // This can only happen if size === 1 which is handled\n // by the case above.\n if (!item.previous) {\n throw new Error('Invalid list');\n }\n item.previous.next = undefined;\n this._tail = item.previous;\n }\n else {\n const next = item.next;\n const previous = item.previous;\n if (!next || !previous) {\n throw new Error('Invalid list');\n }\n next.previous = previous;\n previous.next = next;\n }\n item.next = undefined;\n item.previous = undefined;\n this._state++;\n }\n touch(item, touch) {\n if (!this._head || !this._tail) {\n throw new Error('Invalid list');\n }\n if ((touch !== 1 /* Touch.AsOld */ && touch !== 2 /* Touch.AsNew */)) {\n return;\n }\n if (touch === 1 /* Touch.AsOld */) {\n if (item === this._head) {\n return;\n }\n const next = item.next;\n const previous = item.previous;\n // Unlink the item\n if (item === this._tail) {\n // previous must be defined since item was not head but is tail\n // So there are more than on item in the map\n previous.next = undefined;\n this._tail = previous;\n }\n else {\n // Both next and previous are not undefined since item was neither head nor tail.\n next.previous = previous;\n previous.next = next;\n }\n // Insert the node at head\n item.previous = undefined;\n item.next = this._head;\n this._head.previous = item;\n this._head = item;\n this._state++;\n }\n else if (touch === 2 /* Touch.AsNew */) {\n if (item === this._tail) {\n return;\n }\n const next = item.next;\n const previous = item.previous;\n // Unlink the item.\n if (item === this._head) {\n // next must be defined since item was not tail but is head\n // So there are more than on item in the map\n next.previous = undefined;\n this._head = next;\n }\n else {\n // Both next and previous are not undefined since item was neither head nor tail.\n next.previous = previous;\n previous.next = next;\n }\n item.next = undefined;\n item.previous = this._tail;\n this._tail.next = item;\n this._tail = item;\n this._state++;\n }\n }\n toJSON() {\n const data = [];\n this.forEach((value, key) => {\n data.push([key, value]);\n });\n return data;\n }\n fromJSON(data) {\n this.clear();\n for (const [key, value] of data) {\n this.set(key, value);\n }\n }\n}\nexport class LRUCache extends LinkedMap {\n constructor(limit, ratio = 1) {\n super();\n this._limit = limit;\n this._ratio = Math.min(Math.max(0, ratio), 1);\n }\n get limit() {\n return this._limit;\n }\n set limit(limit) {\n this._limit = limit;\n this.checkTrim();\n }\n get(key, touch = 2 /* Touch.AsNew */) {\n return super.get(key, touch);\n }\n peek(key) {\n return super.get(key, 0 /* Touch.None */);\n }\n set(key, value) {\n super.set(key, value, 2 /* Touch.AsNew */);\n this.checkTrim();\n return this;\n }\n checkTrim() {\n if (this.size > this._limit) {\n this.trimOld(Math.round(this._limit * this._ratio));\n }\n }\n}\n/**\n * A map that allows access both by keys and values.\n * **NOTE**: values need to be unique.\n */\nexport class BidirectionalMap {\n constructor(entries) {\n this._m1 = new Map();\n this._m2 = new Map();\n if (entries) {\n for (const [key, value] of entries) {\n this.set(key, value);\n }\n }\n }\n clear() {\n this._m1.clear();\n this._m2.clear();\n }\n set(key, value) {\n this._m1.set(key, value);\n this._m2.set(value, key);\n }\n get(key) {\n return this._m1.get(key);\n }\n getKey(value) {\n return this._m2.get(value);\n }\n delete(key) {\n const value = this._m1.get(key);\n if (value === undefined) {\n return false;\n }\n this._m1.delete(key);\n this._m2.delete(value);\n return true;\n }\n keys() {\n return this._m1.keys();\n }\n values() {\n return this._m1.values();\n }\n}\nexport class SetMap {\n constructor() {\n this.map = new Map();\n }\n add(key, value) {\n let values = this.map.get(key);\n if (!values) {\n values = new Set();\n this.map.set(key, values);\n }\n values.add(value);\n }\n delete(key, value) {\n const values = this.map.get(key);\n if (!values) {\n return;\n }\n values.delete(value);\n if (values.size === 0) {\n this.map.delete(key);\n }\n }\n forEach(key, fn) {\n const values = this.map.get(key);\n if (!values) {\n return;\n }\n values.forEach(fn);\n }\n get(key) {\n const values = this.map.get(key);\n if (!values) {\n return new Set();\n }\n return values;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { findLastIdxMonotonous, findLastMonotonous, findFirstMonotonous } from '../../../../base/common/arraysFind.js';\nimport { OffsetRange } from '../../core/offsetRange.js';\nimport { Position } from '../../core/position.js';\nimport { Range } from '../../core/range.js';\nimport { isSpace } from './utils.js';\nexport class LinesSliceCharSequence {\n constructor(lines, lineRange, considerWhitespaceChanges) {\n // This slice has to have lineRange.length many \\n! (otherwise diffing against an empty slice will be problematic)\n // (Unless it covers the entire document, in that case the other slice also has to cover the entire document ands it's okay)\n this.lines = lines;\n this.considerWhitespaceChanges = considerWhitespaceChanges;\n this.elements = [];\n this.firstCharOffsetByLine = [];\n // To account for trimming\n this.additionalOffsetByLine = [];\n // If the slice covers the end, but does not start at the beginning, we include just the \\n of the previous line.\n let trimFirstLineFully = false;\n if (lineRange.start > 0 && lineRange.endExclusive >= lines.length) {\n lineRange = new OffsetRange(lineRange.start - 1, lineRange.endExclusive);\n trimFirstLineFully = true;\n }\n this.lineRange = lineRange;\n this.firstCharOffsetByLine[0] = 0;\n for (let i = this.lineRange.start; i < this.lineRange.endExclusive; i++) {\n let line = lines[i];\n let offset = 0;\n if (trimFirstLineFully) {\n offset = line.length;\n line = '';\n trimFirstLineFully = false;\n }\n else if (!considerWhitespaceChanges) {\n const trimmedStartLine = line.trimStart();\n offset = line.length - trimmedStartLine.length;\n line = trimmedStartLine.trimEnd();\n }\n this.additionalOffsetByLine.push(offset);\n for (let i = 0; i < line.length; i++) {\n this.elements.push(line.charCodeAt(i));\n }\n // Don't add an \\n that does not exist in the document.\n if (i < lines.length - 1) {\n this.elements.push('\\n'.charCodeAt(0));\n this.firstCharOffsetByLine[i - this.lineRange.start + 1] = this.elements.length;\n }\n }\n // To account for the last line\n this.additionalOffsetByLine.push(0);\n }\n toString() {\n return `Slice: \"${this.text}\"`;\n }\n get text() {\n return this.getText(new OffsetRange(0, this.length));\n }\n getText(range) {\n return this.elements.slice(range.start, range.endExclusive).map(e => String.fromCharCode(e)).join('');\n }\n getElement(offset) {\n return this.elements[offset];\n }\n get length() {\n return this.elements.length;\n }\n getBoundaryScore(length) {\n // a b c , d e f\n // 11 0 0 12 15 6 13 0 0 11\n const prevCategory = getCategory(length > 0 ? this.elements[length - 1] : -1);\n const nextCategory = getCategory(length < this.elements.length ? this.elements[length] : -1);\n if (prevCategory === 7 /* CharBoundaryCategory.LineBreakCR */ && nextCategory === 8 /* CharBoundaryCategory.LineBreakLF */) {\n // don't break between \\r and \\n\n return 0;\n }\n if (prevCategory === 8 /* CharBoundaryCategory.LineBreakLF */) {\n // prefer the linebreak before the change\n return 150;\n }\n let score = 0;\n if (prevCategory !== nextCategory) {\n score += 10;\n if (prevCategory === 0 /* CharBoundaryCategory.WordLower */ && nextCategory === 1 /* CharBoundaryCategory.WordUpper */) {\n score += 1;\n }\n }\n score += getCategoryBoundaryScore(prevCategory);\n score += getCategoryBoundaryScore(nextCategory);\n return score;\n }\n translateOffset(offset) {\n // find smallest i, so that lineBreakOffsets[i] <= offset using binary search\n if (this.lineRange.isEmpty) {\n return new Position(this.lineRange.start + 1, 1);\n }\n const i = findLastIdxMonotonous(this.firstCharOffsetByLine, (value) => value <= offset);\n return new Position(this.lineRange.start + i + 1, offset - this.firstCharOffsetByLine[i] + this.additionalOffsetByLine[i] + 1);\n }\n translateRange(range) {\n return Range.fromPositions(this.translateOffset(range.start), this.translateOffset(range.endExclusive));\n }\n /**\n * Finds the word that contains the character at the given offset\n */\n findWordContaining(offset) {\n if (offset < 0 || offset >= this.elements.length) {\n return undefined;\n }\n if (!isWordChar(this.elements[offset])) {\n return undefined;\n }\n // find start\n let start = offset;\n while (start > 0 && isWordChar(this.elements[start - 1])) {\n start--;\n }\n // find end\n let end = offset;\n while (end < this.elements.length && isWordChar(this.elements[end])) {\n end++;\n }\n return new OffsetRange(start, end);\n }\n countLinesIn(range) {\n return this.translateOffset(range.endExclusive).lineNumber - this.translateOffset(range.start).lineNumber;\n }\n isStronglyEqual(offset1, offset2) {\n return this.elements[offset1] === this.elements[offset2];\n }\n extendToFullLines(range) {\n var _a, _b;\n const start = (_a = findLastMonotonous(this.firstCharOffsetByLine, x => x <= range.start)) !== null && _a !== void 0 ? _a : 0;\n const end = (_b = findFirstMonotonous(this.firstCharOffsetByLine, x => range.endExclusive <= x)) !== null && _b !== void 0 ? _b : this.elements.length;\n return new OffsetRange(start, end);\n }\n}\nfunction isWordChar(charCode) {\n return charCode >= 97 /* CharCode.a */ && charCode <= 122 /* CharCode.z */\n || charCode >= 65 /* CharCode.A */ && charCode <= 90 /* CharCode.Z */\n || charCode >= 48 /* CharCode.Digit0 */ && charCode <= 57 /* CharCode.Digit9 */;\n}\nconst score = {\n [0 /* CharBoundaryCategory.WordLower */]: 0,\n [1 /* CharBoundaryCategory.WordUpper */]: 0,\n [2 /* CharBoundaryCategory.WordNumber */]: 0,\n [3 /* CharBoundaryCategory.End */]: 10,\n [4 /* CharBoundaryCategory.Other */]: 2,\n [5 /* CharBoundaryCategory.Separator */]: 30,\n [6 /* CharBoundaryCategory.Space */]: 3,\n [7 /* CharBoundaryCategory.LineBreakCR */]: 10,\n [8 /* CharBoundaryCategory.LineBreakLF */]: 10,\n};\nfunction getCategoryBoundaryScore(category) {\n return score[category];\n}\nfunction getCategory(charCode) {\n if (charCode === 10 /* CharCode.LineFeed */) {\n return 8 /* CharBoundaryCategory.LineBreakLF */;\n }\n else if (charCode === 13 /* CharCode.CarriageReturn */) {\n return 7 /* CharBoundaryCategory.LineBreakCR */;\n }\n else if (isSpace(charCode)) {\n return 6 /* CharBoundaryCategory.Space */;\n }\n else if (charCode >= 97 /* CharCode.a */ && charCode <= 122 /* CharCode.z */) {\n return 0 /* CharBoundaryCategory.WordLower */;\n }\n else if (charCode >= 65 /* CharCode.A */ && charCode <= 90 /* CharCode.Z */) {\n return 1 /* CharBoundaryCategory.WordUpper */;\n }\n else if (charCode >= 48 /* CharCode.Digit0 */ && charCode <= 57 /* CharCode.Digit9 */) {\n return 2 /* CharBoundaryCategory.WordNumber */;\n }\n else if (charCode === -1) {\n return 3 /* CharBoundaryCategory.End */;\n }\n else if (charCode === 44 /* CharCode.Comma */ || charCode === 59 /* CharCode.Semicolon */) {\n return 5 /* CharBoundaryCategory.Separator */;\n }\n else {\n return 4 /* CharBoundaryCategory.Other */;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { SequenceDiff } from './algorithms/diffAlgorithm.js';\nimport { LineRangeMapping } from '../rangeMapping.js';\nimport { pushMany, compareBy, numberComparator, reverseOrder } from '../../../../base/common/arrays.js';\nimport { MonotonousArray, findLastMonotonous } from '../../../../base/common/arraysFind.js';\nimport { SetMap } from '../../../../base/common/map.js';\nimport { LineRange, LineRangeSet } from '../../core/lineRange.js';\nimport { OffsetRange } from '../../core/offsetRange.js';\nimport { LinesSliceCharSequence } from './linesSliceCharSequence.js';\nimport { LineRangeFragment, isSpace } from './utils.js';\nimport { MyersDiffAlgorithm } from './algorithms/myersDiffAlgorithm.js';\nexport function computeMovedLines(changes, originalLines, modifiedLines, hashedOriginalLines, hashedModifiedLines, timeout) {\n let { moves, excludedChanges } = computeMovesFromSimpleDeletionsToSimpleInsertions(changes, originalLines, modifiedLines, timeout);\n if (!timeout.isValid()) {\n return [];\n }\n const filteredChanges = changes.filter(c => !excludedChanges.has(c));\n const unchangedMoves = computeUnchangedMoves(filteredChanges, hashedOriginalLines, hashedModifiedLines, originalLines, modifiedLines, timeout);\n pushMany(moves, unchangedMoves);\n moves = joinCloseConsecutiveMoves(moves);\n // Ignore too short moves\n moves = moves.filter(current => {\n const lines = current.original.toOffsetRange().slice(originalLines).map(l => l.trim());\n const originalText = lines.join('\\n');\n return originalText.length >= 15 && countWhere(lines, l => l.length >= 2) >= 2;\n });\n moves = removeMovesInSameDiff(changes, moves);\n return moves;\n}\nfunction countWhere(arr, predicate) {\n let count = 0;\n for (const t of arr) {\n if (predicate(t)) {\n count++;\n }\n }\n return count;\n}\nfunction computeMovesFromSimpleDeletionsToSimpleInsertions(changes, originalLines, modifiedLines, timeout) {\n const moves = [];\n const deletions = changes\n .filter(c => c.modified.isEmpty && c.original.length >= 3)\n .map(d => new LineRangeFragment(d.original, originalLines, d));\n const insertions = new Set(changes\n .filter(c => c.original.isEmpty && c.modified.length >= 3)\n .map(d => new LineRangeFragment(d.modified, modifiedLines, d)));\n const excludedChanges = new Set();\n for (const deletion of deletions) {\n let highestSimilarity = -1;\n let best;\n for (const insertion of insertions) {\n const similarity = deletion.computeSimilarity(insertion);\n if (similarity > highestSimilarity) {\n highestSimilarity = similarity;\n best = insertion;\n }\n }\n if (highestSimilarity > 0.90 && best) {\n insertions.delete(best);\n moves.push(new LineRangeMapping(deletion.range, best.range));\n excludedChanges.add(deletion.source);\n excludedChanges.add(best.source);\n }\n if (!timeout.isValid()) {\n return { moves, excludedChanges };\n }\n }\n return { moves, excludedChanges };\n}\nfunction computeUnchangedMoves(changes, hashedOriginalLines, hashedModifiedLines, originalLines, modifiedLines, timeout) {\n const moves = [];\n const original3LineHashes = new SetMap();\n for (const change of changes) {\n for (let i = change.original.startLineNumber; i < change.original.endLineNumberExclusive - 2; i++) {\n const key = `${hashedOriginalLines[i - 1]}:${hashedOriginalLines[i + 1 - 1]}:${hashedOriginalLines[i + 2 - 1]}`;\n original3LineHashes.add(key, { range: new LineRange(i, i + 3) });\n }\n }\n const possibleMappings = [];\n changes.sort(compareBy(c => c.modified.startLineNumber, numberComparator));\n for (const change of changes) {\n let lastMappings = [];\n for (let i = change.modified.startLineNumber; i < change.modified.endLineNumberExclusive - 2; i++) {\n const key = `${hashedModifiedLines[i - 1]}:${hashedModifiedLines[i + 1 - 1]}:${hashedModifiedLines[i + 2 - 1]}`;\n const currentModifiedRange = new LineRange(i, i + 3);\n const nextMappings = [];\n original3LineHashes.forEach(key, ({ range }) => {\n for (const lastMapping of lastMappings) {\n // does this match extend some last match?\n if (lastMapping.originalLineRange.endLineNumberExclusive + 1 === range.endLineNumberExclusive &&\n lastMapping.modifiedLineRange.endLineNumberExclusive + 1 === currentModifiedRange.endLineNumberExclusive) {\n lastMapping.originalLineRange = new LineRange(lastMapping.originalLineRange.startLineNumber, range.endLineNumberExclusive);\n lastMapping.modifiedLineRange = new LineRange(lastMapping.modifiedLineRange.startLineNumber, currentModifiedRange.endLineNumberExclusive);\n nextMappings.push(lastMapping);\n return;\n }\n }\n const mapping = {\n modifiedLineRange: currentModifiedRange,\n originalLineRange: range,\n };\n possibleMappings.push(mapping);\n nextMappings.push(mapping);\n });\n lastMappings = nextMappings;\n }\n if (!timeout.isValid()) {\n return [];\n }\n }\n possibleMappings.sort(reverseOrder(compareBy(m => m.modifiedLineRange.length, numberComparator)));\n const modifiedSet = new LineRangeSet();\n const originalSet = new LineRangeSet();\n for (const mapping of possibleMappings) {\n const diffOrigToMod = mapping.modifiedLineRange.startLineNumber - mapping.originalLineRange.startLineNumber;\n const modifiedSections = modifiedSet.subtractFrom(mapping.modifiedLineRange);\n const originalTranslatedSections = originalSet.subtractFrom(mapping.originalLineRange).getWithDelta(diffOrigToMod);\n const modifiedIntersectedSections = modifiedSections.getIntersection(originalTranslatedSections);\n for (const s of modifiedIntersectedSections.ranges) {\n if (s.length < 3) {\n continue;\n }\n const modifiedLineRange = s;\n const originalLineRange = s.delta(-diffOrigToMod);\n moves.push(new LineRangeMapping(originalLineRange, modifiedLineRange));\n modifiedSet.addRange(modifiedLineRange);\n originalSet.addRange(originalLineRange);\n }\n }\n moves.sort(compareBy(m => m.original.startLineNumber, numberComparator));\n const monotonousChanges = new MonotonousArray(changes);\n for (let i = 0; i < moves.length; i++) {\n const move = moves[i];\n const firstTouchingChangeOrig = monotonousChanges.findLastMonotonous(c => c.original.startLineNumber <= move.original.startLineNumber);\n const firstTouchingChangeMod = findLastMonotonous(changes, c => c.modified.startLineNumber <= move.modified.startLineNumber);\n const linesAbove = Math.max(move.original.startLineNumber - firstTouchingChangeOrig.original.startLineNumber, move.modified.startLineNumber - firstTouchingChangeMod.modified.startLineNumber);\n const lastTouchingChangeOrig = monotonousChanges.findLastMonotonous(c => c.original.startLineNumber < move.original.endLineNumberExclusive);\n const lastTouchingChangeMod = findLastMonotonous(changes, c => c.modified.startLineNumber < move.modified.endLineNumberExclusive);\n const linesBelow = Math.max(lastTouchingChangeOrig.original.endLineNumberExclusive - move.original.endLineNumberExclusive, lastTouchingChangeMod.modified.endLineNumberExclusive - move.modified.endLineNumberExclusive);\n let extendToTop;\n for (extendToTop = 0; extendToTop < linesAbove; extendToTop++) {\n const origLine = move.original.startLineNumber - extendToTop - 1;\n const modLine = move.modified.startLineNumber - extendToTop - 1;\n if (origLine > originalLines.length || modLine > modifiedLines.length) {\n break;\n }\n if (modifiedSet.contains(modLine) || originalSet.contains(origLine)) {\n break;\n }\n if (!areLinesSimilar(originalLines[origLine - 1], modifiedLines[modLine - 1], timeout)) {\n break;\n }\n }\n if (extendToTop > 0) {\n originalSet.addRange(new LineRange(move.original.startLineNumber - extendToTop, move.original.startLineNumber));\n modifiedSet.addRange(new LineRange(move.modified.startLineNumber - extendToTop, move.modified.startLineNumber));\n }\n let extendToBottom;\n for (extendToBottom = 0; extendToBottom < linesBelow; extendToBottom++) {\n const origLine = move.original.endLineNumberExclusive + extendToBottom;\n const modLine = move.modified.endLineNumberExclusive + extendToBottom;\n if (origLine > originalLines.length || modLine > modifiedLines.length) {\n break;\n }\n if (modifiedSet.contains(modLine) || originalSet.contains(origLine)) {\n break;\n }\n if (!areLinesSimilar(originalLines[origLine - 1], modifiedLines[modLine - 1], timeout)) {\n break;\n }\n }\n if (extendToBottom > 0) {\n originalSet.addRange(new LineRange(move.original.endLineNumberExclusive, move.original.endLineNumberExclusive + extendToBottom));\n modifiedSet.addRange(new LineRange(move.modified.endLineNumberExclusive, move.modified.endLineNumberExclusive + extendToBottom));\n }\n if (extendToTop > 0 || extendToBottom > 0) {\n moves[i] = new LineRangeMapping(new LineRange(move.original.startLineNumber - extendToTop, move.original.endLineNumberExclusive + extendToBottom), new LineRange(move.modified.startLineNumber - extendToTop, move.modified.endLineNumberExclusive + extendToBottom));\n }\n }\n return moves;\n}\nfunction areLinesSimilar(line1, line2, timeout) {\n if (line1.trim() === line2.trim()) {\n return true;\n }\n if (line1.length > 300 && line2.length > 300) {\n return false;\n }\n const myersDiffingAlgorithm = new MyersDiffAlgorithm();\n const result = myersDiffingAlgorithm.compute(new LinesSliceCharSequence([line1], new OffsetRange(0, 1), false), new LinesSliceCharSequence([line2], new OffsetRange(0, 1), false), timeout);\n let commonNonSpaceCharCount = 0;\n const inverted = SequenceDiff.invert(result.diffs, line1.length);\n for (const seq of inverted) {\n seq.seq1Range.forEach(idx => {\n if (!isSpace(line1.charCodeAt(idx))) {\n commonNonSpaceCharCount++;\n }\n });\n }\n function countNonWsChars(str) {\n let count = 0;\n for (let i = 0; i < line1.length; i++) {\n if (!isSpace(str.charCodeAt(i))) {\n count++;\n }\n }\n return count;\n }\n const longerLineLength = countNonWsChars(line1.length > line2.length ? line1 : line2);\n const r = commonNonSpaceCharCount / longerLineLength > 0.6 && longerLineLength > 10;\n return r;\n}\nfunction joinCloseConsecutiveMoves(moves) {\n if (moves.length === 0) {\n return moves;\n }\n moves.sort(compareBy(m => m.original.startLineNumber, numberComparator));\n const result = [moves[0]];\n for (let i = 1; i < moves.length; i++) {\n const last = result[result.length - 1];\n const current = moves[i];\n const originalDist = current.original.startLineNumber - last.original.endLineNumberExclusive;\n const modifiedDist = current.modified.startLineNumber - last.modified.endLineNumberExclusive;\n const currentMoveAfterLast = originalDist >= 0 && modifiedDist >= 0;\n if (currentMoveAfterLast && originalDist + modifiedDist <= 2) {\n result[result.length - 1] = last.join(current);\n continue;\n }\n result.push(current);\n }\n return result;\n}\nfunction removeMovesInSameDiff(changes, moves) {\n const changesMonotonous = new MonotonousArray(changes);\n moves = moves.filter(m => {\n const diffBeforeEndOfMoveOriginal = changesMonotonous.findLastMonotonous(c => c.original.startLineNumber < m.original.endLineNumberExclusive)\n || new LineRangeMapping(new LineRange(1, 1), new LineRange(1, 1));\n const diffBeforeEndOfMoveModified = findLastMonotonous(changes, c => c.modified.startLineNumber < m.modified.endLineNumberExclusive);\n const differentDiffs = diffBeforeEndOfMoveOriginal !== diffBeforeEndOfMoveModified;\n return differentDiffs;\n });\n return moves;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { forEachWithNeighbors } from '../../../../base/common/arrays.js';\nimport { OffsetRange } from '../../core/offsetRange.js';\nimport { OffsetPair, SequenceDiff } from './algorithms/diffAlgorithm.js';\nexport function optimizeSequenceDiffs(sequence1, sequence2, sequenceDiffs) {\n let result = sequenceDiffs;\n result = joinSequenceDiffsByShifting(sequence1, sequence2, result);\n // Sometimes, calling this function twice improves the result.\n // Uncomment the second invocation and run the tests to see the difference.\n result = joinSequenceDiffsByShifting(sequence1, sequence2, result);\n result = shiftSequenceDiffs(sequence1, sequence2, result);\n return result;\n}\n/**\n * This function fixes issues like this:\n * ```\n * import { Baz, Bar } from \"foo\";\n * ```\n * <->\n * ```\n * import { Baz, Bar, Foo } from \"foo\";\n * ```\n * Computed diff: [ {Add \",\" after Bar}, {Add \"Foo \" after space} }\n * Improved diff: [{Add \", Foo\" after Bar}]\n */\nfunction joinSequenceDiffsByShifting(sequence1, sequence2, sequenceDiffs) {\n if (sequenceDiffs.length === 0) {\n return sequenceDiffs;\n }\n const result = [];\n result.push(sequenceDiffs[0]);\n // First move them all to the left as much as possible and join them if possible\n for (let i = 1; i < sequenceDiffs.length; i++) {\n const prevResult = result[result.length - 1];\n let cur = sequenceDiffs[i];\n if (cur.seq1Range.isEmpty || cur.seq2Range.isEmpty) {\n const length = cur.seq1Range.start - prevResult.seq1Range.endExclusive;\n let d;\n for (d = 1; d <= length; d++) {\n if (sequence1.getElement(cur.seq1Range.start - d) !== sequence1.getElement(cur.seq1Range.endExclusive - d) ||\n sequence2.getElement(cur.seq2Range.start - d) !== sequence2.getElement(cur.seq2Range.endExclusive - d)) {\n break;\n }\n }\n d--;\n if (d === length) {\n // Merge previous and current diff\n result[result.length - 1] = new SequenceDiff(new OffsetRange(prevResult.seq1Range.start, cur.seq1Range.endExclusive - length), new OffsetRange(prevResult.seq2Range.start, cur.seq2Range.endExclusive - length));\n continue;\n }\n cur = cur.delta(-d);\n }\n result.push(cur);\n }\n const result2 = [];\n // Then move them all to the right and join them again if possible\n for (let i = 0; i < result.length - 1; i++) {\n const nextResult = result[i + 1];\n let cur = result[i];\n if (cur.seq1Range.isEmpty || cur.seq2Range.isEmpty) {\n const length = nextResult.seq1Range.start - cur.seq1Range.endExclusive;\n let d;\n for (d = 0; d < length; d++) {\n if (!sequence1.isStronglyEqual(cur.seq1Range.start + d, cur.seq1Range.endExclusive + d) ||\n !sequence2.isStronglyEqual(cur.seq2Range.start + d, cur.seq2Range.endExclusive + d)) {\n break;\n }\n }\n if (d === length) {\n // Merge previous and current diff, write to result!\n result[i + 1] = new SequenceDiff(new OffsetRange(cur.seq1Range.start + length, nextResult.seq1Range.endExclusive), new OffsetRange(cur.seq2Range.start + length, nextResult.seq2Range.endExclusive));\n continue;\n }\n if (d > 0) {\n cur = cur.delta(d);\n }\n }\n result2.push(cur);\n }\n if (result.length > 0) {\n result2.push(result[result.length - 1]);\n }\n return result2;\n}\n// align character level diffs at whitespace characters\n// import { IBar } from \"foo\";\n// import { I[Arr, I]Bar } from \"foo\";\n// ->\n// import { [IArr, ]IBar } from \"foo\";\n// import { ITransaction, observableValue, transaction } from 'vs/base/common/observable';\n// import { ITransaction, observable[FromEvent, observable]Value, transaction } from 'vs/base/common/observable';\n// ->\n// import { ITransaction, [observableFromEvent, ]observableValue, transaction } from 'vs/base/common/observable';\n// collectBrackets(level + 1, levelPerBracketType);\n// collectBrackets(level + 1, levelPerBracket[ + 1, levelPerBracket]Type);\n// ->\n// collectBrackets(level + 1, [levelPerBracket + 1, ]levelPerBracketType);\nfunction shiftSequenceDiffs(sequence1, sequence2, sequenceDiffs) {\n if (!sequence1.getBoundaryScore || !sequence2.getBoundaryScore) {\n return sequenceDiffs;\n }\n for (let i = 0; i < sequenceDiffs.length; i++) {\n const prevDiff = (i > 0 ? sequenceDiffs[i - 1] : undefined);\n const diff = sequenceDiffs[i];\n const nextDiff = (i + 1 < sequenceDiffs.length ? sequenceDiffs[i + 1] : undefined);\n const seq1ValidRange = new OffsetRange(prevDiff ? prevDiff.seq1Range.endExclusive + 1 : 0, nextDiff ? nextDiff.seq1Range.start - 1 : sequence1.length);\n const seq2ValidRange = new OffsetRange(prevDiff ? prevDiff.seq2Range.endExclusive + 1 : 0, nextDiff ? nextDiff.seq2Range.start - 1 : sequence2.length);\n if (diff.seq1Range.isEmpty) {\n sequenceDiffs[i] = shiftDiffToBetterPosition(diff, sequence1, sequence2, seq1ValidRange, seq2ValidRange);\n }\n else if (diff.seq2Range.isEmpty) {\n sequenceDiffs[i] = shiftDiffToBetterPosition(diff.swap(), sequence2, sequence1, seq2ValidRange, seq1ValidRange).swap();\n }\n }\n return sequenceDiffs;\n}\nfunction shiftDiffToBetterPosition(diff, sequence1, sequence2, seq1ValidRange, seq2ValidRange) {\n const maxShiftLimit = 100; // To prevent performance issues\n // don't touch previous or next!\n let deltaBefore = 1;\n while (diff.seq1Range.start - deltaBefore >= seq1ValidRange.start &&\n diff.seq2Range.start - deltaBefore >= seq2ValidRange.start &&\n sequence2.isStronglyEqual(diff.seq2Range.start - deltaBefore, diff.seq2Range.endExclusive - deltaBefore) && deltaBefore < maxShiftLimit) {\n deltaBefore++;\n }\n deltaBefore--;\n let deltaAfter = 0;\n while (diff.seq1Range.start + deltaAfter < seq1ValidRange.endExclusive &&\n diff.seq2Range.endExclusive + deltaAfter < seq2ValidRange.endExclusive &&\n sequence2.isStronglyEqual(diff.seq2Range.start + deltaAfter, diff.seq2Range.endExclusive + deltaAfter) && deltaAfter < maxShiftLimit) {\n deltaAfter++;\n }\n if (deltaBefore === 0 && deltaAfter === 0) {\n return diff;\n }\n // Visualize `[sequence1.text, diff.seq1Range.start + deltaAfter]`\n // and `[sequence2.text, diff.seq2Range.start + deltaAfter, diff.seq2Range.endExclusive + deltaAfter]`\n let bestDelta = 0;\n let bestScore = -1;\n // find best scored delta\n for (let delta = -deltaBefore; delta <= deltaAfter; delta++) {\n const seq2OffsetStart = diff.seq2Range.start + delta;\n const seq2OffsetEndExclusive = diff.seq2Range.endExclusive + delta;\n const seq1Offset = diff.seq1Range.start + delta;\n const score = sequence1.getBoundaryScore(seq1Offset) + sequence2.getBoundaryScore(seq2OffsetStart) + sequence2.getBoundaryScore(seq2OffsetEndExclusive);\n if (score > bestScore) {\n bestScore = score;\n bestDelta = delta;\n }\n }\n return diff.delta(bestDelta);\n}\nexport function removeShortMatches(sequence1, sequence2, sequenceDiffs) {\n const result = [];\n for (const s of sequenceDiffs) {\n const last = result[result.length - 1];\n if (!last) {\n result.push(s);\n continue;\n }\n if (s.seq1Range.start - last.seq1Range.endExclusive <= 2 || s.seq2Range.start - last.seq2Range.endExclusive <= 2) {\n result[result.length - 1] = new SequenceDiff(last.seq1Range.join(s.seq1Range), last.seq2Range.join(s.seq2Range));\n }\n else {\n result.push(s);\n }\n }\n return result;\n}\nexport function extendDiffsToEntireWordIfAppropriate(sequence1, sequence2, sequenceDiffs) {\n const equalMappings = SequenceDiff.invert(sequenceDiffs, sequence1.length);\n const additional = [];\n let lastPoint = new OffsetPair(0, 0);\n function scanWord(pair, equalMapping) {\n if (pair.offset1 < lastPoint.offset1 || pair.offset2 < lastPoint.offset2) {\n return;\n }\n const w1 = sequence1.findWordContaining(pair.offset1);\n const w2 = sequence2.findWordContaining(pair.offset2);\n if (!w1 || !w2) {\n return;\n }\n let w = new SequenceDiff(w1, w2);\n const equalPart = w.intersect(equalMapping);\n let equalChars1 = equalPart.seq1Range.length;\n let equalChars2 = equalPart.seq2Range.length;\n // The words do not touch previous equals mappings, as we would have processed them already.\n // But they might touch the next ones.\n while (equalMappings.length > 0) {\n const next = equalMappings[0];\n const intersects = next.seq1Range.intersects(w1) || next.seq2Range.intersects(w2);\n if (!intersects) {\n break;\n }\n const v1 = sequence1.findWordContaining(next.seq1Range.start);\n const v2 = sequence2.findWordContaining(next.seq2Range.start);\n // Because there is an intersection, we know that the words are not empty.\n const v = new SequenceDiff(v1, v2);\n const equalPart = v.intersect(next);\n equalChars1 += equalPart.seq1Range.length;\n equalChars2 += equalPart.seq2Range.length;\n w = w.join(v);\n if (w.seq1Range.endExclusive >= next.seq1Range.endExclusive) {\n // The word extends beyond the next equal mapping.\n equalMappings.shift();\n }\n else {\n break;\n }\n }\n if (equalChars1 + equalChars2 < (w.seq1Range.length + w.seq2Range.length) * 2 / 3) {\n additional.push(w);\n }\n lastPoint = w.getEndExclusives();\n }\n while (equalMappings.length > 0) {\n const next = equalMappings.shift();\n if (next.seq1Range.isEmpty) {\n continue;\n }\n scanWord(next.getStarts(), next);\n // The equal parts are not empty, so -1 gives us a character that is equal in both parts.\n scanWord(next.getEndExclusives().delta(-1), next);\n }\n const merged = mergeSequenceDiffs(sequenceDiffs, additional);\n return merged;\n}\nfunction mergeSequenceDiffs(sequenceDiffs1, sequenceDiffs2) {\n const result = [];\n while (sequenceDiffs1.length > 0 || sequenceDiffs2.length > 0) {\n const sd1 = sequenceDiffs1[0];\n const sd2 = sequenceDiffs2[0];\n let next;\n if (sd1 && (!sd2 || sd1.seq1Range.start < sd2.seq1Range.start)) {\n next = sequenceDiffs1.shift();\n }\n else {\n next = sequenceDiffs2.shift();\n }\n if (result.length > 0 && result[result.length - 1].seq1Range.endExclusive >= next.seq1Range.start) {\n result[result.length - 1] = result[result.length - 1].join(next);\n }\n else {\n result.push(next);\n }\n }\n return result;\n}\nexport function removeVeryShortMatchingLinesBetweenDiffs(sequence1, _sequence2, sequenceDiffs) {\n let diffs = sequenceDiffs;\n if (diffs.length === 0) {\n return diffs;\n }\n let counter = 0;\n let shouldRepeat;\n do {\n shouldRepeat = false;\n const result = [\n diffs[0]\n ];\n for (let i = 1; i < diffs.length; i++) {\n const cur = diffs[i];\n const lastResult = result[result.length - 1];\n function shouldJoinDiffs(before, after) {\n const unchangedRange = new OffsetRange(lastResult.seq1Range.endExclusive, cur.seq1Range.start);\n const unchangedText = sequence1.getText(unchangedRange);\n const unchangedTextWithoutWs = unchangedText.replace(/\\s/g, '');\n if (unchangedTextWithoutWs.length <= 4\n && (before.seq1Range.length + before.seq2Range.length > 5 || after.seq1Range.length + after.seq2Range.length > 5)) {\n return true;\n }\n return false;\n }\n const shouldJoin = shouldJoinDiffs(lastResult, cur);\n if (shouldJoin) {\n shouldRepeat = true;\n result[result.length - 1] = result[result.length - 1].join(cur);\n }\n else {\n result.push(cur);\n }\n }\n diffs = result;\n } while (counter++ < 10 && shouldRepeat);\n return diffs;\n}\nexport function removeVeryShortMatchingTextBetweenLongDiffs(sequence1, sequence2, sequenceDiffs) {\n let diffs = sequenceDiffs;\n if (diffs.length === 0) {\n return diffs;\n }\n let counter = 0;\n let shouldRepeat;\n do {\n shouldRepeat = false;\n const result = [\n diffs[0]\n ];\n for (let i = 1; i < diffs.length; i++) {\n const cur = diffs[i];\n const lastResult = result[result.length - 1];\n function shouldJoinDiffs(before, after) {\n const unchangedRange = new OffsetRange(lastResult.seq1Range.endExclusive, cur.seq1Range.start);\n const unchangedLineCount = sequence1.countLinesIn(unchangedRange);\n if (unchangedLineCount > 5 || unchangedRange.length > 500) {\n return false;\n }\n const unchangedText = sequence1.getText(unchangedRange).trim();\n if (unchangedText.length > 20 || unchangedText.split(/\\r\\n|\\r|\\n/).length > 1) {\n return false;\n }\n const beforeLineCount1 = sequence1.countLinesIn(before.seq1Range);\n const beforeSeq1Length = before.seq1Range.length;\n const beforeLineCount2 = sequence2.countLinesIn(before.seq2Range);\n const beforeSeq2Length = before.seq2Range.length;\n const afterLineCount1 = sequence1.countLinesIn(after.seq1Range);\n const afterSeq1Length = after.seq1Range.length;\n const afterLineCount2 = sequence2.countLinesIn(after.seq2Range);\n const afterSeq2Length = after.seq2Range.length;\n // TODO: Maybe a neural net can be used to derive the result from these numbers\n const max = 2 * 40 + 50;\n function cap(v) {\n return Math.min(v, max);\n }\n if (Math.pow(Math.pow(cap(beforeLineCount1 * 40 + beforeSeq1Length), 1.5) + Math.pow(cap(beforeLineCount2 * 40 + beforeSeq2Length), 1.5), 1.5)\n + Math.pow(Math.pow(cap(afterLineCount1 * 40 + afterSeq1Length), 1.5) + Math.pow(cap(afterLineCount2 * 40 + afterSeq2Length), 1.5), 1.5) > ((max ** 1.5) ** 1.5) * 1.3) {\n return true;\n }\n return false;\n }\n const shouldJoin = shouldJoinDiffs(lastResult, cur);\n if (shouldJoin) {\n shouldRepeat = true;\n result[result.length - 1] = result[result.length - 1].join(cur);\n }\n else {\n result.push(cur);\n }\n }\n diffs = result;\n } while (counter++ < 10 && shouldRepeat);\n const newDiffs = [];\n // Remove short suffixes/prefixes\n forEachWithNeighbors(diffs, (prev, cur, next) => {\n let newDiff = cur;\n function shouldMarkAsChanged(text) {\n return text.length > 0 && text.trim().length <= 3 && cur.seq1Range.length + cur.seq2Range.length > 100;\n }\n const fullRange1 = sequence1.extendToFullLines(cur.seq1Range);\n const prefix = sequence1.getText(new OffsetRange(fullRange1.start, cur.seq1Range.start));\n if (shouldMarkAsChanged(prefix)) {\n newDiff = newDiff.deltaStart(-prefix.length);\n }\n const suffix = sequence1.getText(new OffsetRange(cur.seq1Range.endExclusive, fullRange1.endExclusive));\n if (shouldMarkAsChanged(suffix)) {\n newDiff = newDiff.deltaEnd(suffix.length);\n }\n const availableSpace = SequenceDiff.fromOffsetPairs(prev ? prev.getEndExclusives() : OffsetPair.zero, next ? next.getStarts() : OffsetPair.max);\n const result = newDiff.intersect(availableSpace);\n if (newDiffs.length > 0 && result.getStarts().equals(newDiffs[newDiffs.length - 1].getEndExclusives())) {\n newDiffs[newDiffs.length - 1] = newDiffs[newDiffs.length - 1].join(result);\n }\n else {\n newDiffs.push(result);\n }\n });\n return newDiffs;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport class LineSequence {\n constructor(trimmedHash, lines) {\n this.trimmedHash = trimmedHash;\n this.lines = lines;\n }\n getElement(offset) {\n return this.trimmedHash[offset];\n }\n get length() {\n return this.trimmedHash.length;\n }\n getBoundaryScore(length) {\n const indentationBefore = length === 0 ? 0 : getIndentation(this.lines[length - 1]);\n const indentationAfter = length === this.lines.length ? 0 : getIndentation(this.lines[length]);\n return 1000 - (indentationBefore + indentationAfter);\n }\n getText(range) {\n return this.lines.slice(range.start, range.endExclusive).join('\\n');\n }\n isStronglyEqual(offset1, offset2) {\n return this.lines[offset1] === this.lines[offset2];\n }\n}\nfunction getIndentation(str) {\n let i = 0;\n while (i < str.length && (str.charCodeAt(i) === 32 /* CharCode.Space */ || str.charCodeAt(i) === 9 /* CharCode.Tab */)) {\n i++;\n }\n return i;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { equals, groupAdjacentBy } from '../../../../base/common/arrays.js';\nimport { assertFn, checkAdjacentItems } from '../../../../base/common/assert.js';\nimport { LineRange } from '../../core/lineRange.js';\nimport { OffsetRange } from '../../core/offsetRange.js';\nimport { Range } from '../../core/range.js';\nimport { DateTimeout, InfiniteTimeout, SequenceDiff } from './algorithms/diffAlgorithm.js';\nimport { DynamicProgrammingDiffing } from './algorithms/dynamicProgrammingDiffing.js';\nimport { MyersDiffAlgorithm } from './algorithms/myersDiffAlgorithm.js';\nimport { computeMovedLines } from './computeMovedLines.js';\nimport { extendDiffsToEntireWordIfAppropriate, optimizeSequenceDiffs, removeVeryShortMatchingLinesBetweenDiffs, removeVeryShortMatchingTextBetweenLongDiffs, removeShortMatches } from './heuristicSequenceOptimizations.js';\nimport { LinesDiff, MovedText } from '../linesDiffComputer.js';\nimport { DetailedLineRangeMapping, RangeMapping } from '../rangeMapping.js';\nimport { LinesSliceCharSequence } from './linesSliceCharSequence.js';\nimport { LineSequence } from './lineSequence.js';\nexport class DefaultLinesDiffComputer {\n constructor() {\n this.dynamicProgrammingDiffing = new DynamicProgrammingDiffing();\n this.myersDiffingAlgorithm = new MyersDiffAlgorithm();\n }\n computeDiff(originalLines, modifiedLines, options) {\n if (originalLines.length <= 1 && equals(originalLines, modifiedLines, (a, b) => a === b)) {\n return new LinesDiff([], [], false);\n }\n if (originalLines.length === 1 && originalLines[0].length === 0 || modifiedLines.length === 1 && modifiedLines[0].length === 0) {\n return new LinesDiff([\n new DetailedLineRangeMapping(new LineRange(1, originalLines.length + 1), new LineRange(1, modifiedLines.length + 1), [\n new RangeMapping(new Range(1, 1, originalLines.length, originalLines[0].length + 1), new Range(1, 1, modifiedLines.length, modifiedLines[0].length + 1))\n ])\n ], [], false);\n }\n const timeout = options.maxComputationTimeMs === 0 ? InfiniteTimeout.instance : new DateTimeout(options.maxComputationTimeMs);\n const considerWhitespaceChanges = !options.ignoreTrimWhitespace;\n const perfectHashes = new Map();\n function getOrCreateHash(text) {\n let hash = perfectHashes.get(text);\n if (hash === undefined) {\n hash = perfectHashes.size;\n perfectHashes.set(text, hash);\n }\n return hash;\n }\n const originalLinesHashes = originalLines.map((l) => getOrCreateHash(l.trim()));\n const modifiedLinesHashes = modifiedLines.map((l) => getOrCreateHash(l.trim()));\n const sequence1 = new LineSequence(originalLinesHashes, originalLines);\n const sequence2 = new LineSequence(modifiedLinesHashes, modifiedLines);\n const lineAlignmentResult = (() => {\n if (sequence1.length + sequence2.length < 1700) {\n // Use the improved algorithm for small files\n return this.dynamicProgrammingDiffing.compute(sequence1, sequence2, timeout, (offset1, offset2) => originalLines[offset1] === modifiedLines[offset2]\n ? modifiedLines[offset2].length === 0\n ? 0.1\n : 1 + Math.log(1 + modifiedLines[offset2].length)\n : 0.99);\n }\n return this.myersDiffingAlgorithm.compute(sequence1, sequence2);\n })();\n let lineAlignments = lineAlignmentResult.diffs;\n let hitTimeout = lineAlignmentResult.hitTimeout;\n lineAlignments = optimizeSequenceDiffs(sequence1, sequence2, lineAlignments);\n lineAlignments = removeVeryShortMatchingLinesBetweenDiffs(sequence1, sequence2, lineAlignments);\n const alignments = [];\n const scanForWhitespaceChanges = (equalLinesCount) => {\n if (!considerWhitespaceChanges) {\n return;\n }\n for (let i = 0; i < equalLinesCount; i++) {\n const seq1Offset = seq1LastStart + i;\n const seq2Offset = seq2LastStart + i;\n if (originalLines[seq1Offset] !== modifiedLines[seq2Offset]) {\n // This is because of whitespace changes, diff these lines\n const characterDiffs = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(new OffsetRange(seq1Offset, seq1Offset + 1), new OffsetRange(seq2Offset, seq2Offset + 1)), timeout, considerWhitespaceChanges);\n for (const a of characterDiffs.mappings) {\n alignments.push(a);\n }\n if (characterDiffs.hitTimeout) {\n hitTimeout = true;\n }\n }\n }\n };\n let seq1LastStart = 0;\n let seq2LastStart = 0;\n for (const diff of lineAlignments) {\n assertFn(() => diff.seq1Range.start - seq1LastStart === diff.seq2Range.start - seq2LastStart);\n const equalLinesCount = diff.seq1Range.start - seq1LastStart;\n scanForWhitespaceChanges(equalLinesCount);\n seq1LastStart = diff.seq1Range.endExclusive;\n seq2LastStart = diff.seq2Range.endExclusive;\n const characterDiffs = this.refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges);\n if (characterDiffs.hitTimeout) {\n hitTimeout = true;\n }\n for (const a of characterDiffs.mappings) {\n alignments.push(a);\n }\n }\n scanForWhitespaceChanges(originalLines.length - seq1LastStart);\n const changes = lineRangeMappingFromRangeMappings(alignments, originalLines, modifiedLines);\n let moves = [];\n if (options.computeMoves) {\n moves = this.computeMoves(changes, originalLines, modifiedLines, originalLinesHashes, modifiedLinesHashes, timeout, considerWhitespaceChanges);\n }\n // Make sure all ranges are valid\n assertFn(() => {\n function validatePosition(pos, lines) {\n if (pos.lineNumber < 1 || pos.lineNumber > lines.length) {\n return false;\n }\n const line = lines[pos.lineNumber - 1];\n if (pos.column < 1 || pos.column > line.length + 1) {\n return false;\n }\n return true;\n }\n function validateRange(range, lines) {\n if (range.startLineNumber < 1 || range.startLineNumber > lines.length + 1) {\n return false;\n }\n if (range.endLineNumberExclusive < 1 || range.endLineNumberExclusive > lines.length + 1) {\n return false;\n }\n return true;\n }\n for (const c of changes) {\n if (!c.innerChanges) {\n return false;\n }\n for (const ic of c.innerChanges) {\n const valid = validatePosition(ic.modifiedRange.getStartPosition(), modifiedLines) && validatePosition(ic.modifiedRange.getEndPosition(), modifiedLines) &&\n validatePosition(ic.originalRange.getStartPosition(), originalLines) && validatePosition(ic.originalRange.getEndPosition(), originalLines);\n if (!valid) {\n return false;\n }\n }\n if (!validateRange(c.modified, modifiedLines) || !validateRange(c.original, originalLines)) {\n return false;\n }\n }\n return true;\n });\n return new LinesDiff(changes, moves, hitTimeout);\n }\n computeMoves(changes, originalLines, modifiedLines, hashedOriginalLines, hashedModifiedLines, timeout, considerWhitespaceChanges) {\n const moves = computeMovedLines(changes, originalLines, modifiedLines, hashedOriginalLines, hashedModifiedLines, timeout);\n const movesWithDiffs = moves.map(m => {\n const moveChanges = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(m.original.toOffsetRange(), m.modified.toOffsetRange()), timeout, considerWhitespaceChanges);\n const mappings = lineRangeMappingFromRangeMappings(moveChanges.mappings, originalLines, modifiedLines, true);\n return new MovedText(m, mappings);\n });\n return movesWithDiffs;\n }\n refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges) {\n const slice1 = new LinesSliceCharSequence(originalLines, diff.seq1Range, considerWhitespaceChanges);\n const slice2 = new LinesSliceCharSequence(modifiedLines, diff.seq2Range, considerWhitespaceChanges);\n const diffResult = slice1.length + slice2.length < 500\n ? this.dynamicProgrammingDiffing.compute(slice1, slice2, timeout)\n : this.myersDiffingAlgorithm.compute(slice1, slice2, timeout);\n let diffs = diffResult.diffs;\n diffs = optimizeSequenceDiffs(slice1, slice2, diffs);\n diffs = extendDiffsToEntireWordIfAppropriate(slice1, slice2, diffs);\n diffs = removeShortMatches(slice1, slice2, diffs);\n diffs = removeVeryShortMatchingTextBetweenLongDiffs(slice1, slice2, diffs);\n const result = diffs.map((d) => new RangeMapping(slice1.translateRange(d.seq1Range), slice2.translateRange(d.seq2Range)));\n // Assert: result applied on original should be the same as diff applied to original\n return {\n mappings: result,\n hitTimeout: diffResult.hitTimeout,\n };\n }\n}\nexport function lineRangeMappingFromRangeMappings(alignments, originalLines, modifiedLines, dontAssertStartLine = false) {\n const changes = [];\n for (const g of groupAdjacentBy(alignments.map(a => getLineRangeMapping(a, originalLines, modifiedLines)), (a1, a2) => a1.original.overlapOrTouch(a2.original)\n || a1.modified.overlapOrTouch(a2.modified))) {\n const first = g[0];\n const last = g[g.length - 1];\n changes.push(new DetailedLineRangeMapping(first.original.join(last.original), first.modified.join(last.modified), g.map(a => a.innerChanges[0])));\n }\n assertFn(() => {\n if (!dontAssertStartLine) {\n if (changes.length > 0 && changes[0].original.startLineNumber !== changes[0].modified.startLineNumber) {\n return false;\n }\n }\n return checkAdjacentItems(changes, (m1, m2) => m2.original.startLineNumber - m1.original.endLineNumberExclusive === m2.modified.startLineNumber - m1.modified.endLineNumberExclusive &&\n // There has to be an unchanged line in between (otherwise both diffs should have been joined)\n m1.original.endLineNumberExclusive < m2.original.startLineNumber &&\n m1.modified.endLineNumberExclusive < m2.modified.startLineNumber);\n });\n return changes;\n}\nexport function getLineRangeMapping(rangeMapping, originalLines, modifiedLines) {\n let lineStartDelta = 0;\n let lineEndDelta = 0;\n // rangeMapping describes the edit that replaces `rangeMapping.originalRange` with `newText := getText(modifiedLines, rangeMapping.modifiedRange)`.\n // original: ]xxx \\n <- this line is not modified\n // modified: ]xx \\n\n if (rangeMapping.modifiedRange.endColumn === 1 && rangeMapping.originalRange.endColumn === 1\n && rangeMapping.originalRange.startLineNumber + lineStartDelta <= rangeMapping.originalRange.endLineNumber\n && rangeMapping.modifiedRange.startLineNumber + lineStartDelta <= rangeMapping.modifiedRange.endLineNumber) {\n // We can only do this if the range is not empty yet\n lineEndDelta = -1;\n }\n // original: xxx[ \\n <- this line is not modified\n // modified: xxx[ \\n\n if (rangeMapping.modifiedRange.startColumn - 1 >= modifiedLines[rangeMapping.modifiedRange.startLineNumber - 1].length\n && rangeMapping.originalRange.startColumn - 1 >= originalLines[rangeMapping.originalRange.startLineNumber - 1].length\n && rangeMapping.originalRange.startLineNumber <= rangeMapping.originalRange.endLineNumber + lineEndDelta\n && rangeMapping.modifiedRange.startLineNumber <= rangeMapping.modifiedRange.endLineNumber + lineEndDelta) {\n // We can only do this if the range is not empty yet\n lineStartDelta = 1;\n }\n const originalLineRange = new LineRange(rangeMapping.originalRange.startLineNumber + lineStartDelta, rangeMapping.originalRange.endLineNumber + 1 + lineEndDelta);\n const modifiedLineRange = new LineRange(rangeMapping.modifiedRange.startLineNumber + lineStartDelta, rangeMapping.modifiedRange.endLineNumber + 1 + lineEndDelta);\n return new DetailedLineRangeMapping(originalLineRange, modifiedLineRange, [rangeMapping]);\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { LegacyLinesDiffComputer } from './legacyLinesDiffComputer.js';\nimport { DefaultLinesDiffComputer } from './defaultLinesDiffComputer/defaultLinesDiffComputer.js';\nexport const linesDiffComputers = {\n getLegacy: () => new LegacyLinesDiffComputer(),\n getDefault: () => new DefaultLinesDiffComputer(),\n};\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nfunction roundFloat(number, decimalPoints) {\n const decimal = Math.pow(10, decimalPoints);\n return Math.round(number * decimal) / decimal;\n}\nexport class RGBA {\n constructor(r, g, b, a = 1) {\n this._rgbaBrand = undefined;\n this.r = Math.min(255, Math.max(0, r)) | 0;\n this.g = Math.min(255, Math.max(0, g)) | 0;\n this.b = Math.min(255, Math.max(0, b)) | 0;\n this.a = roundFloat(Math.max(Math.min(1, a), 0), 3);\n }\n static equals(a, b) {\n return a.r === b.r && a.g === b.g && a.b === b.b && a.a === b.a;\n }\n}\nexport class HSLA {\n constructor(h, s, l, a) {\n this._hslaBrand = undefined;\n this.h = Math.max(Math.min(360, h), 0) | 0;\n this.s = roundFloat(Math.max(Math.min(1, s), 0), 3);\n this.l = roundFloat(Math.max(Math.min(1, l), 0), 3);\n this.a = roundFloat(Math.max(Math.min(1, a), 0), 3);\n }\n static equals(a, b) {\n return a.h === b.h && a.s === b.s && a.l === b.l && a.a === b.a;\n }\n /**\n * Converts an RGB color value to HSL. Conversion formula\n * adapted from http://en.wikipedia.org/wiki/HSL_color_space.\n * Assumes r, g, and b are contained in the set [0, 255] and\n * returns h in the set [0, 360], s, and l in the set [0, 1].\n */\n static fromRGBA(rgba) {\n const r = rgba.r / 255;\n const g = rgba.g / 255;\n const b = rgba.b / 255;\n const a = rgba.a;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n let h = 0;\n let s = 0;\n const l = (min + max) / 2;\n const chroma = max - min;\n if (chroma > 0) {\n s = Math.min((l <= 0.5 ? chroma / (2 * l) : chroma / (2 - (2 * l))), 1);\n switch (max) {\n case r:\n h = (g - b) / chroma + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / chroma + 2;\n break;\n case b:\n h = (r - g) / chroma + 4;\n break;\n }\n h *= 60;\n h = Math.round(h);\n }\n return new HSLA(h, s, l, a);\n }\n static _hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * 6 * t;\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n }\n /**\n * Converts an HSL color value to RGB. Conversion formula\n * adapted from http://en.wikipedia.org/wiki/HSL_color_space.\n * Assumes h in the set [0, 360] s, and l are contained in the set [0, 1] and\n * returns r, g, and b in the set [0, 255].\n */\n static toRGBA(hsla) {\n const h = hsla.h / 360;\n const { s, l, a } = hsla;\n let r, g, b;\n if (s === 0) {\n r = g = b = l; // achromatic\n }\n else {\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n r = HSLA._hue2rgb(p, q, h + 1 / 3);\n g = HSLA._hue2rgb(p, q, h);\n b = HSLA._hue2rgb(p, q, h - 1 / 3);\n }\n return new RGBA(Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), a);\n }\n}\nexport class HSVA {\n constructor(h, s, v, a) {\n this._hsvaBrand = undefined;\n this.h = Math.max(Math.min(360, h), 0) | 0;\n this.s = roundFloat(Math.max(Math.min(1, s), 0), 3);\n this.v = roundFloat(Math.max(Math.min(1, v), 0), 3);\n this.a = roundFloat(Math.max(Math.min(1, a), 0), 3);\n }\n static equals(a, b) {\n return a.h === b.h && a.s === b.s && a.v === b.v && a.a === b.a;\n }\n // from http://www.rapidtables.com/convert/color/rgb-to-hsv.htm\n static fromRGBA(rgba) {\n const r = rgba.r / 255;\n const g = rgba.g / 255;\n const b = rgba.b / 255;\n const cmax = Math.max(r, g, b);\n const cmin = Math.min(r, g, b);\n const delta = cmax - cmin;\n const s = cmax === 0 ? 0 : (delta / cmax);\n let m;\n if (delta === 0) {\n m = 0;\n }\n else if (cmax === r) {\n m = ((((g - b) / delta) % 6) + 6) % 6;\n }\n else if (cmax === g) {\n m = ((b - r) / delta) + 2;\n }\n else {\n m = ((r - g) / delta) + 4;\n }\n return new HSVA(Math.round(m * 60), s, cmax, rgba.a);\n }\n // from http://www.rapidtables.com/convert/color/hsv-to-rgb.htm\n static toRGBA(hsva) {\n const { h, s, v, a } = hsva;\n const c = v * s;\n const x = c * (1 - Math.abs((h / 60) % 2 - 1));\n const m = v - c;\n let [r, g, b] = [0, 0, 0];\n if (h < 60) {\n r = c;\n g = x;\n }\n else if (h < 120) {\n r = x;\n g = c;\n }\n else if (h < 180) {\n g = c;\n b = x;\n }\n else if (h < 240) {\n g = x;\n b = c;\n }\n else if (h < 300) {\n r = x;\n b = c;\n }\n else if (h <= 360) {\n r = c;\n b = x;\n }\n r = Math.round((r + m) * 255);\n g = Math.round((g + m) * 255);\n b = Math.round((b + m) * 255);\n return new RGBA(r, g, b, a);\n }\n}\nexport class Color {\n static fromHex(hex) {\n return Color.Format.CSS.parseHex(hex) || Color.red;\n }\n static equals(a, b) {\n if (!a && !b) {\n return true;\n }\n if (!a || !b) {\n return false;\n }\n return a.equals(b);\n }\n get hsla() {\n if (this._hsla) {\n return this._hsla;\n }\n else {\n return HSLA.fromRGBA(this.rgba);\n }\n }\n get hsva() {\n if (this._hsva) {\n return this._hsva;\n }\n return HSVA.fromRGBA(this.rgba);\n }\n constructor(arg) {\n if (!arg) {\n throw new Error('Color needs a value');\n }\n else if (arg instanceof RGBA) {\n this.rgba = arg;\n }\n else if (arg instanceof HSLA) {\n this._hsla = arg;\n this.rgba = HSLA.toRGBA(arg);\n }\n else if (arg instanceof HSVA) {\n this._hsva = arg;\n this.rgba = HSVA.toRGBA(arg);\n }\n else {\n throw new Error('Invalid color ctor argument');\n }\n }\n equals(other) {\n return !!other && RGBA.equals(this.rgba, other.rgba) && HSLA.equals(this.hsla, other.hsla) && HSVA.equals(this.hsva, other.hsva);\n }\n /**\n * http://www.w3.org/TR/WCAG20/#relativeluminancedef\n * Returns the number in the set [0, 1]. O => Darkest Black. 1 => Lightest white.\n */\n getRelativeLuminance() {\n const R = Color._relativeLuminanceForComponent(this.rgba.r);\n const G = Color._relativeLuminanceForComponent(this.rgba.g);\n const B = Color._relativeLuminanceForComponent(this.rgba.b);\n const luminance = 0.2126 * R + 0.7152 * G + 0.0722 * B;\n return roundFloat(luminance, 4);\n }\n static _relativeLuminanceForComponent(color) {\n const c = color / 255;\n return (c <= 0.03928) ? c / 12.92 : Math.pow(((c + 0.055) / 1.055), 2.4);\n }\n /**\n *\thttp://24ways.org/2010/calculating-color-contrast\n * Return 'true' if lighter color otherwise 'false'\n */\n isLighter() {\n const yiq = (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1000;\n return yiq >= 128;\n }\n isLighterThan(another) {\n const lum1 = this.getRelativeLuminance();\n const lum2 = another.getRelativeLuminance();\n return lum1 > lum2;\n }\n isDarkerThan(another) {\n const lum1 = this.getRelativeLuminance();\n const lum2 = another.getRelativeLuminance();\n return lum1 < lum2;\n }\n lighten(factor) {\n return new Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * factor, this.hsla.a));\n }\n darken(factor) {\n return new Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * factor, this.hsla.a));\n }\n transparent(factor) {\n const { r, g, b, a } = this.rgba;\n return new Color(new RGBA(r, g, b, a * factor));\n }\n isTransparent() {\n return this.rgba.a === 0;\n }\n isOpaque() {\n return this.rgba.a === 1;\n }\n opposite() {\n return new Color(new RGBA(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba.b, this.rgba.a));\n }\n makeOpaque(opaqueBackground) {\n if (this.isOpaque() || opaqueBackground.rgba.a !== 1) {\n // only allow to blend onto a non-opaque color onto a opaque color\n return this;\n }\n const { r, g, b, a } = this.rgba;\n // https://stackoverflow.com/questions/12228548/finding-equivalent-color-with-opacity\n return new Color(new RGBA(opaqueBackground.rgba.r - a * (opaqueBackground.rgba.r - r), opaqueBackground.rgba.g - a * (opaqueBackground.rgba.g - g), opaqueBackground.rgba.b - a * (opaqueBackground.rgba.b - b), 1));\n }\n toString() {\n if (!this._toString) {\n this._toString = Color.Format.CSS.format(this);\n }\n return this._toString;\n }\n static getLighterColor(of, relative, factor) {\n if (of.isLighterThan(relative)) {\n return of;\n }\n factor = factor ? factor : 0.5;\n const lum1 = of.getRelativeLuminance();\n const lum2 = relative.getRelativeLuminance();\n factor = factor * (lum2 - lum1) / lum2;\n return of.lighten(factor);\n }\n static getDarkerColor(of, relative, factor) {\n if (of.isDarkerThan(relative)) {\n return of;\n }\n factor = factor ? factor : 0.5;\n const lum1 = of.getRelativeLuminance();\n const lum2 = relative.getRelativeLuminance();\n factor = factor * (lum1 - lum2) / lum1;\n return of.darken(factor);\n }\n}\nColor.white = new Color(new RGBA(255, 255, 255, 1));\nColor.black = new Color(new RGBA(0, 0, 0, 1));\nColor.red = new Color(new RGBA(255, 0, 0, 1));\nColor.blue = new Color(new RGBA(0, 0, 255, 1));\nColor.green = new Color(new RGBA(0, 255, 0, 1));\nColor.cyan = new Color(new RGBA(0, 255, 255, 1));\nColor.lightgrey = new Color(new RGBA(211, 211, 211, 1));\nColor.transparent = new Color(new RGBA(0, 0, 0, 0));\n(function (Color) {\n let Format;\n (function (Format) {\n let CSS;\n (function (CSS) {\n function formatRGB(color) {\n if (color.rgba.a === 1) {\n return `rgb(${color.rgba.r}, ${color.rgba.g}, ${color.rgba.b})`;\n }\n return Color.Format.CSS.formatRGBA(color);\n }\n CSS.formatRGB = formatRGB;\n function formatRGBA(color) {\n return `rgba(${color.rgba.r}, ${color.rgba.g}, ${color.rgba.b}, ${+(color.rgba.a).toFixed(2)})`;\n }\n CSS.formatRGBA = formatRGBA;\n function formatHSL(color) {\n if (color.hsla.a === 1) {\n return `hsl(${color.hsla.h}, ${(color.hsla.s * 100).toFixed(2)}%, ${(color.hsla.l * 100).toFixed(2)}%)`;\n }\n return Color.Format.CSS.formatHSLA(color);\n }\n CSS.formatHSL = formatHSL;\n function formatHSLA(color) {\n return `hsla(${color.hsla.h}, ${(color.hsla.s * 100).toFixed(2)}%, ${(color.hsla.l * 100).toFixed(2)}%, ${color.hsla.a.toFixed(2)})`;\n }\n CSS.formatHSLA = formatHSLA;\n function _toTwoDigitHex(n) {\n const r = n.toString(16);\n return r.length !== 2 ? '0' + r : r;\n }\n /**\n * Formats the color as #RRGGBB\n */\n function formatHex(color) {\n return `#${_toTwoDigitHex(color.rgba.r)}${_toTwoDigitHex(color.rgba.g)}${_toTwoDigitHex(color.rgba.b)}`;\n }\n CSS.formatHex = formatHex;\n /**\n * Formats the color as #RRGGBBAA\n * If 'compact' is set, colors without transparancy will be printed as #RRGGBB\n */\n function formatHexA(color, compact = false) {\n if (compact && color.rgba.a === 1) {\n return Color.Format.CSS.formatHex(color);\n }\n return `#${_toTwoDigitHex(color.rgba.r)}${_toTwoDigitHex(color.rgba.g)}${_toTwoDigitHex(color.rgba.b)}${_toTwoDigitHex(Math.round(color.rgba.a * 255))}`;\n }\n CSS.formatHexA = formatHexA;\n /**\n * The default format will use HEX if opaque and RGBA otherwise.\n */\n function format(color) {\n if (color.isOpaque()) {\n return Color.Format.CSS.formatHex(color);\n }\n return Color.Format.CSS.formatRGBA(color);\n }\n CSS.format = format;\n /**\n * Converts an Hex color value to a Color.\n * returns r, g, and b are contained in the set [0, 255]\n * @param hex string (#RGB, #RGBA, #RRGGBB or #RRGGBBAA).\n */\n function parseHex(hex) {\n const length = hex.length;\n if (length === 0) {\n // Invalid color\n return null;\n }\n if (hex.charCodeAt(0) !== 35 /* CharCode.Hash */) {\n // Does not begin with a #\n return null;\n }\n if (length === 7) {\n // #RRGGBB format\n const r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2));\n const g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4));\n const b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6));\n return new Color(new RGBA(r, g, b, 1));\n }\n if (length === 9) {\n // #RRGGBBAA format\n const r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2));\n const g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4));\n const b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6));\n const a = 16 * _parseHexDigit(hex.charCodeAt(7)) + _parseHexDigit(hex.charCodeAt(8));\n return new Color(new RGBA(r, g, b, a / 255));\n }\n if (length === 4) {\n // #RGB format\n const r = _parseHexDigit(hex.charCodeAt(1));\n const g = _parseHexDigit(hex.charCodeAt(2));\n const b = _parseHexDigit(hex.charCodeAt(3));\n return new Color(new RGBA(16 * r + r, 16 * g + g, 16 * b + b));\n }\n if (length === 5) {\n // #RGBA format\n const r = _parseHexDigit(hex.charCodeAt(1));\n const g = _parseHexDigit(hex.charCodeAt(2));\n const b = _parseHexDigit(hex.charCodeAt(3));\n const a = _parseHexDigit(hex.charCodeAt(4));\n return new Color(new RGBA(16 * r + r, 16 * g + g, 16 * b + b, (16 * a + a) / 255));\n }\n // Invalid color\n return null;\n }\n CSS.parseHex = parseHex;\n function _parseHexDigit(charCode) {\n switch (charCode) {\n case 48 /* CharCode.Digit0 */: return 0;\n case 49 /* CharCode.Digit1 */: return 1;\n case 50 /* CharCode.Digit2 */: return 2;\n case 51 /* CharCode.Digit3 */: return 3;\n case 52 /* CharCode.Digit4 */: return 4;\n case 53 /* CharCode.Digit5 */: return 5;\n case 54 /* CharCode.Digit6 */: return 6;\n case 55 /* CharCode.Digit7 */: return 7;\n case 56 /* CharCode.Digit8 */: return 8;\n case 57 /* CharCode.Digit9 */: return 9;\n case 97 /* CharCode.a */: return 10;\n case 65 /* CharCode.A */: return 10;\n case 98 /* CharCode.b */: return 11;\n case 66 /* CharCode.B */: return 11;\n case 99 /* CharCode.c */: return 12;\n case 67 /* CharCode.C */: return 12;\n case 100 /* CharCode.d */: return 13;\n case 68 /* CharCode.D */: return 13;\n case 101 /* CharCode.e */: return 14;\n case 69 /* CharCode.E */: return 14;\n case 102 /* CharCode.f */: return 15;\n case 70 /* CharCode.F */: return 15;\n }\n return 0;\n }\n })(CSS = Format.CSS || (Format.CSS = {}));\n })(Format = Color.Format || (Color.Format = {}));\n})(Color || (Color = {}));\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Color, HSLA } from '../../../base/common/color.js';\nfunction _parseCaptureGroups(captureGroups) {\n const values = [];\n for (const captureGroup of captureGroups) {\n const parsedNumber = Number(captureGroup);\n if (parsedNumber || parsedNumber === 0 && captureGroup.replace(/\\s/g, '') !== '') {\n values.push(parsedNumber);\n }\n }\n return values;\n}\nfunction _toIColor(r, g, b, a) {\n return {\n red: r / 255,\n blue: b / 255,\n green: g / 255,\n alpha: a\n };\n}\nfunction _findRange(model, match) {\n const index = match.index;\n const length = match[0].length;\n if (!index) {\n return;\n }\n const startPosition = model.positionAt(index);\n const range = {\n startLineNumber: startPosition.lineNumber,\n startColumn: startPosition.column,\n endLineNumber: startPosition.lineNumber,\n endColumn: startPosition.column + length\n };\n return range;\n}\nfunction _findHexColorInformation(range, hexValue) {\n if (!range) {\n return;\n }\n const parsedHexColor = Color.Format.CSS.parseHex(hexValue);\n if (!parsedHexColor) {\n return;\n }\n return {\n range: range,\n color: _toIColor(parsedHexColor.rgba.r, parsedHexColor.rgba.g, parsedHexColor.rgba.b, parsedHexColor.rgba.a)\n };\n}\nfunction _findRGBColorInformation(range, matches, isAlpha) {\n if (!range || matches.length !== 1) {\n return;\n }\n const match = matches[0];\n const captureGroups = match.values();\n const parsedRegex = _parseCaptureGroups(captureGroups);\n return {\n range: range,\n color: _toIColor(parsedRegex[0], parsedRegex[1], parsedRegex[2], isAlpha ? parsedRegex[3] : 1)\n };\n}\nfunction _findHSLColorInformation(range, matches, isAlpha) {\n if (!range || matches.length !== 1) {\n return;\n }\n const match = matches[0];\n const captureGroups = match.values();\n const parsedRegex = _parseCaptureGroups(captureGroups);\n const colorEquivalent = new Color(new HSLA(parsedRegex[0], parsedRegex[1] / 100, parsedRegex[2] / 100, isAlpha ? parsedRegex[3] : 1));\n return {\n range: range,\n color: _toIColor(colorEquivalent.rgba.r, colorEquivalent.rgba.g, colorEquivalent.rgba.b, colorEquivalent.rgba.a)\n };\n}\nfunction _findMatches(model, regex) {\n if (typeof model === 'string') {\n return [...model.matchAll(regex)];\n }\n else {\n return model.findMatches(regex);\n }\n}\nfunction computeColors(model) {\n const result = [];\n // Early validation for RGB and HSL\n const initialValidationRegex = /\\b(rgb|rgba|hsl|hsla)(\\([0-9\\s,.\\%]*\\))|(#)([A-Fa-f0-9]{3})\\b|(#)([A-Fa-f0-9]{4})\\b|(#)([A-Fa-f0-9]{6})\\b|(#)([A-Fa-f0-9]{8})\\b/gm;\n const initialValidationMatches = _findMatches(model, initialValidationRegex);\n // Potential colors have been found, validate the parameters\n if (initialValidationMatches.length > 0) {\n for (const initialMatch of initialValidationMatches) {\n const initialCaptureGroups = initialMatch.filter(captureGroup => captureGroup !== undefined);\n const colorScheme = initialCaptureGroups[1];\n const colorParameters = initialCaptureGroups[2];\n if (!colorParameters) {\n continue;\n }\n let colorInformation;\n if (colorScheme === 'rgb') {\n const regexParameters = /^\\(\\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\\s*,\\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\\s*,\\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\\s*\\)$/gm;\n colorInformation = _findRGBColorInformation(_findRange(model, initialMatch), _findMatches(colorParameters, regexParameters), false);\n }\n else if (colorScheme === 'rgba') {\n const regexParameters = /^\\(\\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\\s*,\\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\\s*,\\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\\s*,\\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\\s*\\)$/gm;\n colorInformation = _findRGBColorInformation(_findRange(model, initialMatch), _findMatches(colorParameters, regexParameters), true);\n }\n else if (colorScheme === 'hsl') {\n const regexParameters = /^\\(\\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\\s*,\\s*(100|\\d{1,2}[.]\\d*|\\d{1,2})%\\s*,\\s*(100|\\d{1,2}[.]\\d*|\\d{1,2})%\\s*\\)$/gm;\n colorInformation = _findHSLColorInformation(_findRange(model, initialMatch), _findMatches(colorParameters, regexParameters), false);\n }\n else if (colorScheme === 'hsla') {\n const regexParameters = /^\\(\\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\\s*,\\s*(100|\\d{1,2}[.]\\d*|\\d{1,2})%\\s*,\\s*(100|\\d{1,2}[.]\\d*|\\d{1,2})%\\s*,\\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\\s*\\)$/gm;\n colorInformation = _findHSLColorInformation(_findRange(model, initialMatch), _findMatches(colorParameters, regexParameters), true);\n }\n else if (colorScheme === '#') {\n colorInformation = _findHexColorInformation(_findRange(model, initialMatch), colorScheme + colorParameters);\n }\n if (colorInformation) {\n result.push(colorInformation);\n }\n }\n }\n return result;\n}\n/**\n * Returns an array of all default document colors in the provided document\n */\nexport function computeDefaultDocumentColors(model) {\n if (!model || typeof model.getValue !== 'function' || typeof model.positionAt !== 'function') {\n // Unknown caller!\n return [];\n }\n return computeColors(model);\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { stringDiff } from '../../../base/common/diff/diff.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { Position } from '../core/position.js';\nimport { Range } from '../core/range.js';\nimport { MirrorTextModel as BaseMirrorModel } from '../model/mirrorTextModel.js';\nimport { ensureValidWordDefinition, getWordAtText } from '../core/wordHelper.js';\nimport { computeLinks } from '../languages/linkComputer.js';\nimport { BasicInplaceReplace } from '../languages/supports/inplaceReplaceSupport.js';\nimport { createMonacoBaseAPI } from './editorBaseApi.js';\nimport { StopWatch } from '../../../base/common/stopwatch.js';\nimport { UnicodeTextModelHighlighter } from './unicodeTextModelHighlighter.js';\nimport { linesDiffComputers } from '../diff/linesDiffComputers.js';\nimport { createProxyObject, getAllMethodNames } from '../../../base/common/objects.js';\nimport { computeDefaultDocumentColors } from '../languages/defaultDocumentColorsComputer.js';\n/**\n * @internal\n */\nclass MirrorModel extends BaseMirrorModel {\n get uri() {\n return this._uri;\n }\n get eol() {\n return this._eol;\n }\n getValue() {\n return this.getText();\n }\n findMatches(regex) {\n const matches = [];\n for (let i = 0; i < this._lines.length; i++) {\n const line = this._lines[i];\n const offsetToAdd = this.offsetAt(new Position(i + 1, 1));\n const iteratorOverMatches = line.matchAll(regex);\n for (const match of iteratorOverMatches) {\n if (match.index || match.index === 0) {\n match.index = match.index + offsetToAdd;\n }\n matches.push(match);\n }\n }\n return matches;\n }\n getLinesContent() {\n return this._lines.slice(0);\n }\n getLineCount() {\n return this._lines.length;\n }\n getLineContent(lineNumber) {\n return this._lines[lineNumber - 1];\n }\n getWordAtPosition(position, wordDefinition) {\n const wordAtText = getWordAtText(position.column, ensureValidWordDefinition(wordDefinition), this._lines[position.lineNumber - 1], 0);\n if (wordAtText) {\n return new Range(position.lineNumber, wordAtText.startColumn, position.lineNumber, wordAtText.endColumn);\n }\n return null;\n }\n words(wordDefinition) {\n const lines = this._lines;\n const wordenize = this._wordenize.bind(this);\n let lineNumber = 0;\n let lineText = '';\n let wordRangesIdx = 0;\n let wordRanges = [];\n return {\n *[Symbol.iterator]() {\n while (true) {\n if (wordRangesIdx < wordRanges.length) {\n const value = lineText.substring(wordRanges[wordRangesIdx].start, wordRanges[wordRangesIdx].end);\n wordRangesIdx += 1;\n yield value;\n }\n else {\n if (lineNumber < lines.length) {\n lineText = lines[lineNumber];\n wordRanges = wordenize(lineText, wordDefinition);\n wordRangesIdx = 0;\n lineNumber += 1;\n }\n else {\n break;\n }\n }\n }\n }\n };\n }\n getLineWords(lineNumber, wordDefinition) {\n const content = this._lines[lineNumber - 1];\n const ranges = this._wordenize(content, wordDefinition);\n const words = [];\n for (const range of ranges) {\n words.push({\n word: content.substring(range.start, range.end),\n startColumn: range.start + 1,\n endColumn: range.end + 1\n });\n }\n return words;\n }\n _wordenize(content, wordDefinition) {\n const result = [];\n let match;\n wordDefinition.lastIndex = 0; // reset lastIndex just to be sure\n while (match = wordDefinition.exec(content)) {\n if (match[0].length === 0) {\n // it did match the empty string\n break;\n }\n result.push({ start: match.index, end: match.index + match[0].length });\n }\n return result;\n }\n getValueInRange(range) {\n range = this._validateRange(range);\n if (range.startLineNumber === range.endLineNumber) {\n return this._lines[range.startLineNumber - 1].substring(range.startColumn - 1, range.endColumn - 1);\n }\n const lineEnding = this._eol;\n const startLineIndex = range.startLineNumber - 1;\n const endLineIndex = range.endLineNumber - 1;\n const resultLines = [];\n resultLines.push(this._lines[startLineIndex].substring(range.startColumn - 1));\n for (let i = startLineIndex + 1; i < endLineIndex; i++) {\n resultLines.push(this._lines[i]);\n }\n resultLines.push(this._lines[endLineIndex].substring(0, range.endColumn - 1));\n return resultLines.join(lineEnding);\n }\n offsetAt(position) {\n position = this._validatePosition(position);\n this._ensureLineStarts();\n return this._lineStarts.getPrefixSum(position.lineNumber - 2) + (position.column - 1);\n }\n positionAt(offset) {\n offset = Math.floor(offset);\n offset = Math.max(0, offset);\n this._ensureLineStarts();\n const out = this._lineStarts.getIndexOf(offset);\n const lineLength = this._lines[out.index].length;\n // Ensure we return a valid position\n return {\n lineNumber: 1 + out.index,\n column: 1 + Math.min(out.remainder, lineLength)\n };\n }\n _validateRange(range) {\n const start = this._validatePosition({ lineNumber: range.startLineNumber, column: range.startColumn });\n const end = this._validatePosition({ lineNumber: range.endLineNumber, column: range.endColumn });\n if (start.lineNumber !== range.startLineNumber\n || start.column !== range.startColumn\n || end.lineNumber !== range.endLineNumber\n || end.column !== range.endColumn) {\n return {\n startLineNumber: start.lineNumber,\n startColumn: start.column,\n endLineNumber: end.lineNumber,\n endColumn: end.column\n };\n }\n return range;\n }\n _validatePosition(position) {\n if (!Position.isIPosition(position)) {\n throw new Error('bad position');\n }\n let { lineNumber, column } = position;\n let hasChanged = false;\n if (lineNumber < 1) {\n lineNumber = 1;\n column = 1;\n hasChanged = true;\n }\n else if (lineNumber > this._lines.length) {\n lineNumber = this._lines.length;\n column = this._lines[lineNumber - 1].length + 1;\n hasChanged = true;\n }\n else {\n const maxCharacter = this._lines[lineNumber - 1].length + 1;\n if (column < 1) {\n column = 1;\n hasChanged = true;\n }\n else if (column > maxCharacter) {\n column = maxCharacter;\n hasChanged = true;\n }\n }\n if (!hasChanged) {\n return position;\n }\n else {\n return { lineNumber, column };\n }\n }\n}\n/**\n * @internal\n */\nexport class EditorSimpleWorker {\n constructor(host, foreignModuleFactory) {\n this._host = host;\n this._models = Object.create(null);\n this._foreignModuleFactory = foreignModuleFactory;\n this._foreignModule = null;\n }\n dispose() {\n this._models = Object.create(null);\n }\n _getModel(uri) {\n return this._models[uri];\n }\n _getModels() {\n const all = [];\n Object.keys(this._models).forEach((key) => all.push(this._models[key]));\n return all;\n }\n acceptNewModel(data) {\n this._models[data.url] = new MirrorModel(URI.parse(data.url), data.lines, data.EOL, data.versionId);\n }\n acceptModelChanged(strURL, e) {\n if (!this._models[strURL]) {\n return;\n }\n const model = this._models[strURL];\n model.onEvents(e);\n }\n acceptRemovedModel(strURL) {\n if (!this._models[strURL]) {\n return;\n }\n delete this._models[strURL];\n }\n async computeUnicodeHighlights(url, options, range) {\n const model = this._getModel(url);\n if (!model) {\n return { ranges: [], hasMore: false, ambiguousCharacterCount: 0, invisibleCharacterCount: 0, nonBasicAsciiCharacterCount: 0 };\n }\n return UnicodeTextModelHighlighter.computeUnicodeHighlights(model, options, range);\n }\n // ---- BEGIN diff --------------------------------------------------------------------------\n async computeDiff(originalUrl, modifiedUrl, options, algorithm) {\n const original = this._getModel(originalUrl);\n const modified = this._getModel(modifiedUrl);\n if (!original || !modified) {\n return null;\n }\n const result = EditorSimpleWorker.computeDiff(original, modified, options, algorithm);\n return result;\n }\n static computeDiff(originalTextModel, modifiedTextModel, options, algorithm) {\n const diffAlgorithm = algorithm === 'advanced' ? linesDiffComputers.getDefault() : linesDiffComputers.getLegacy();\n const originalLines = originalTextModel.getLinesContent();\n const modifiedLines = modifiedTextModel.getLinesContent();\n const result = diffAlgorithm.computeDiff(originalLines, modifiedLines, options);\n const identical = (result.changes.length > 0 ? false : this._modelsAreIdentical(originalTextModel, modifiedTextModel));\n function getLineChanges(changes) {\n return changes.map(m => {\n var _a;\n return ([m.original.startLineNumber, m.original.endLineNumberExclusive, m.modified.startLineNumber, m.modified.endLineNumberExclusive, (_a = m.innerChanges) === null || _a === void 0 ? void 0 : _a.map(m => [\n m.originalRange.startLineNumber,\n m.originalRange.startColumn,\n m.originalRange.endLineNumber,\n m.originalRange.endColumn,\n m.modifiedRange.startLineNumber,\n m.modifiedRange.startColumn,\n m.modifiedRange.endLineNumber,\n m.modifiedRange.endColumn,\n ])]);\n });\n }\n return {\n identical,\n quitEarly: result.hitTimeout,\n changes: getLineChanges(result.changes),\n moves: result.moves.map(m => ([\n m.lineRangeMapping.original.startLineNumber,\n m.lineRangeMapping.original.endLineNumberExclusive,\n m.lineRangeMapping.modified.startLineNumber,\n m.lineRangeMapping.modified.endLineNumberExclusive,\n getLineChanges(m.changes)\n ])),\n };\n }\n static _modelsAreIdentical(original, modified) {\n const originalLineCount = original.getLineCount();\n const modifiedLineCount = modified.getLineCount();\n if (originalLineCount !== modifiedLineCount) {\n return false;\n }\n for (let line = 1; line <= originalLineCount; line++) {\n const originalLine = original.getLineContent(line);\n const modifiedLine = modified.getLineContent(line);\n if (originalLine !== modifiedLine) {\n return false;\n }\n }\n return true;\n }\n async computeMoreMinimalEdits(modelUrl, edits, pretty) {\n const model = this._getModel(modelUrl);\n if (!model) {\n return edits;\n }\n const result = [];\n let lastEol = undefined;\n edits = edits.slice(0).sort((a, b) => {\n if (a.range && b.range) {\n return Range.compareRangesUsingStarts(a.range, b.range);\n }\n // eol only changes should go to the end\n const aRng = a.range ? 0 : 1;\n const bRng = b.range ? 0 : 1;\n return aRng - bRng;\n });\n // merge adjacent edits\n let writeIndex = 0;\n for (let readIndex = 1; readIndex < edits.length; readIndex++) {\n if (Range.getEndPosition(edits[writeIndex].range).equals(Range.getStartPosition(edits[readIndex].range))) {\n edits[writeIndex].range = Range.fromPositions(Range.getStartPosition(edits[writeIndex].range), Range.getEndPosition(edits[readIndex].range));\n edits[writeIndex].text += edits[readIndex].text;\n }\n else {\n writeIndex++;\n edits[writeIndex] = edits[readIndex];\n }\n }\n edits.length = writeIndex + 1;\n for (let { range, text, eol } of edits) {\n if (typeof eol === 'number') {\n lastEol = eol;\n }\n if (Range.isEmpty(range) && !text) {\n // empty change\n continue;\n }\n const original = model.getValueInRange(range);\n text = text.replace(/\\r\\n|\\n|\\r/g, model.eol);\n if (original === text) {\n // noop\n continue;\n }\n // make sure diff won't take too long\n if (Math.max(text.length, original.length) > EditorSimpleWorker._diffLimit) {\n result.push({ range, text });\n continue;\n }\n // compute diff between original and edit.text\n const changes = stringDiff(original, text, pretty);\n const editOffset = model.offsetAt(Range.lift(range).getStartPosition());\n for (const change of changes) {\n const start = model.positionAt(editOffset + change.originalStart);\n const end = model.positionAt(editOffset + change.originalStart + change.originalLength);\n const newEdit = {\n text: text.substr(change.modifiedStart, change.modifiedLength),\n range: { startLineNumber: start.lineNumber, startColumn: start.column, endLineNumber: end.lineNumber, endColumn: end.column }\n };\n if (model.getValueInRange(newEdit.range) !== newEdit.text) {\n result.push(newEdit);\n }\n }\n }\n if (typeof lastEol === 'number') {\n result.push({ eol: lastEol, text: '', range: { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 } });\n }\n return result;\n }\n // ---- END minimal edits ---------------------------------------------------------------\n async computeLinks(modelUrl) {\n const model = this._getModel(modelUrl);\n if (!model) {\n return null;\n }\n return computeLinks(model);\n }\n // --- BEGIN default document colors -----------------------------------------------------------\n async computeDefaultDocumentColors(modelUrl) {\n const model = this._getModel(modelUrl);\n if (!model) {\n return null;\n }\n return computeDefaultDocumentColors(model);\n }\n async textualSuggest(modelUrls, leadingWord, wordDef, wordDefFlags) {\n const sw = new StopWatch();\n const wordDefRegExp = new RegExp(wordDef, wordDefFlags);\n const seen = new Set();\n outer: for (const url of modelUrls) {\n const model = this._getModel(url);\n if (!model) {\n continue;\n }\n for (const word of model.words(wordDefRegExp)) {\n if (word === leadingWord || !isNaN(Number(word))) {\n continue;\n }\n seen.add(word);\n if (seen.size > EditorSimpleWorker._suggestionsLimit) {\n break outer;\n }\n }\n }\n return { words: Array.from(seen), duration: sw.elapsed() };\n }\n // ---- END suggest --------------------------------------------------------------------------\n //#region -- word ranges --\n async computeWordRanges(modelUrl, range, wordDef, wordDefFlags) {\n const model = this._getModel(modelUrl);\n if (!model) {\n return Object.create(null);\n }\n const wordDefRegExp = new RegExp(wordDef, wordDefFlags);\n const result = Object.create(null);\n for (let line = range.startLineNumber; line < range.endLineNumber; line++) {\n const words = model.getLineWords(line, wordDefRegExp);\n for (const word of words) {\n if (!isNaN(Number(word.word))) {\n continue;\n }\n let array = result[word.word];\n if (!array) {\n array = [];\n result[word.word] = array;\n }\n array.push({\n startLineNumber: line,\n startColumn: word.startColumn,\n endLineNumber: line,\n endColumn: word.endColumn\n });\n }\n }\n return result;\n }\n //#endregion\n async navigateValueSet(modelUrl, range, up, wordDef, wordDefFlags) {\n const model = this._getModel(modelUrl);\n if (!model) {\n return null;\n }\n const wordDefRegExp = new RegExp(wordDef, wordDefFlags);\n if (range.startColumn === range.endColumn) {\n range = {\n startLineNumber: range.startLineNumber,\n startColumn: range.startColumn,\n endLineNumber: range.endLineNumber,\n endColumn: range.endColumn + 1\n };\n }\n const selectionText = model.getValueInRange(range);\n const wordRange = model.getWordAtPosition({ lineNumber: range.startLineNumber, column: range.startColumn }, wordDefRegExp);\n if (!wordRange) {\n return null;\n }\n const word = model.getValueInRange(wordRange);\n const result = BasicInplaceReplace.INSTANCE.navigateValueSet(range, selectionText, wordRange, word, up);\n return result;\n }\n // ---- BEGIN foreign module support --------------------------------------------------------------------------\n loadForeignModule(moduleId, createData, foreignHostMethods) {\n const proxyMethodRequest = (method, args) => {\n return this._host.fhr(method, args);\n };\n const foreignHost = createProxyObject(foreignHostMethods, proxyMethodRequest);\n const ctx = {\n host: foreignHost,\n getMirrorModels: () => {\n return this._getModels();\n }\n };\n if (this._foreignModuleFactory) {\n this._foreignModule = this._foreignModuleFactory(ctx, createData);\n // static foreing module\n return Promise.resolve(getAllMethodNames(this._foreignModule));\n }\n // ESM-comment-begin\n // \t\treturn new Promise((resolve, reject) => {\n // \t\t\trequire([moduleId], (foreignModule: { create: IForeignModuleFactory }) => {\n // \t\t\t\tthis._foreignModule = foreignModule.create(ctx, createData);\n // \n // \t\t\t\tresolve(getAllMethodNames(this._foreignModule));\n // \n // \t\t\t}, reject);\n // \t\t});\n // ESM-comment-end\n // ESM-uncomment-begin\n return Promise.reject(new Error(`Unexpected usage`));\n // ESM-uncomment-end\n }\n // foreign method request\n fmr(method, args) {\n if (!this._foreignModule || typeof this._foreignModule[method] !== 'function') {\n return Promise.reject(new Error('Missing requestHandler or method: ' + method));\n }\n try {\n return Promise.resolve(this._foreignModule[method].apply(this._foreignModule, args));\n }\n catch (e) {\n return Promise.reject(e);\n }\n }\n}\n// ---- END diff --------------------------------------------------------------------------\n// ---- BEGIN minimal edits ---------------------------------------------------------------\nEditorSimpleWorker._diffLimit = 100000;\n// ---- BEGIN suggest --------------------------------------------------------------------------\nEditorSimpleWorker._suggestionsLimit = 10000;\n/**\n * Called on the worker side\n * @internal\n */\nexport function create(host) {\n return new EditorSimpleWorker(host, null);\n}\nif (typeof importScripts === 'function') {\n // Running in a web worker\n globalThis.monaco = createMonacoBaseAPI();\n}\n", "import { createDecorator } from '../../../platform/instantiation/common/instantiation.js';\nexport const ITextResourceConfigurationService = createDecorator('textResourceConfigurationService');\nexport const ITextResourcePropertiesService = createDecorator('textResourcePropertiesService');\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation.js';\nexport const ILanguageFeaturesService = createDecorator('ILanguageFeaturesService');\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { IntervalTimer, timeout } from '../../../base/common/async.js';\nimport { Disposable, dispose, toDisposable, DisposableStore } from '../../../base/common/lifecycle.js';\nimport { SimpleWorkerClient, logOnceWebWorkerWarning } from '../../../base/common/worker/simpleWorker.js';\nimport { DefaultWorkerFactory } from '../../../base/browser/defaultWorkerFactory.js';\nimport { Range } from '../../common/core/range.js';\nimport { ILanguageConfigurationService } from '../../common/languages/languageConfigurationRegistry.js';\nimport { EditorSimpleWorker } from '../../common/services/editorSimpleWorker.js';\nimport { IModelService } from '../../common/services/model.js';\nimport { ITextResourceConfigurationService } from '../../common/services/textResourceConfiguration.js';\nimport { isNonEmptyArray } from '../../../base/common/arrays.js';\nimport { ILogService } from '../../../platform/log/common/log.js';\nimport { StopWatch } from '../../../base/common/stopwatch.js';\nimport { canceled } from '../../../base/common/errors.js';\nimport { ILanguageFeaturesService } from '../../common/services/languageFeatures.js';\nimport { MovedText } from '../../common/diff/linesDiffComputer.js';\nimport { DetailedLineRangeMapping, RangeMapping, LineRangeMapping } from '../../common/diff/rangeMapping.js';\nimport { LineRange } from '../../common/core/lineRange.js';\nimport { $window } from '../../../base/browser/window.js';\nimport { WindowIntervalTimer } from '../../../base/browser/dom.js';\n/**\n * Stop syncing a model to the worker if it was not needed for 1 min.\n */\nconst STOP_SYNC_MODEL_DELTA_TIME_MS = 60 * 1000;\n/**\n * Stop the worker if it was not needed for 5 min.\n */\nconst STOP_WORKER_DELTA_TIME_MS = 5 * 60 * 1000;\nfunction canSyncModel(modelService, resource) {\n const model = modelService.getModel(resource);\n if (!model) {\n return false;\n }\n if (model.isTooLargeForSyncing()) {\n return false;\n }\n return true;\n}\nlet EditorWorkerService = class EditorWorkerService extends Disposable {\n constructor(modelService, configurationService, logService, languageConfigurationService, languageFeaturesService) {\n super();\n this._modelService = modelService;\n this._workerManager = this._register(new WorkerManager(this._modelService, languageConfigurationService));\n this._logService = logService;\n // register default link-provider and default completions-provider\n this._register(languageFeaturesService.linkProvider.register({ language: '*', hasAccessToAllModels: true }, {\n provideLinks: (model, token) => {\n if (!canSyncModel(this._modelService, model.uri)) {\n return Promise.resolve({ links: [] }); // File too large\n }\n return this._workerManager.withWorker().then(client => client.computeLinks(model.uri)).then(links => {\n return links && { links };\n });\n }\n }));\n this._register(languageFeaturesService.completionProvider.register('*', new WordBasedCompletionItemProvider(this._workerManager, configurationService, this._modelService, languageConfigurationService)));\n }\n dispose() {\n super.dispose();\n }\n canComputeUnicodeHighlights(uri) {\n return canSyncModel(this._modelService, uri);\n }\n computedUnicodeHighlights(uri, options, range) {\n return this._workerManager.withWorker().then(client => client.computedUnicodeHighlights(uri, options, range));\n }\n async computeDiff(original, modified, options, algorithm) {\n const result = await this._workerManager.withWorker().then(client => client.computeDiff(original, modified, options, algorithm));\n if (!result) {\n return null;\n }\n // Convert from space efficient JSON data to rich objects.\n const diff = {\n identical: result.identical,\n quitEarly: result.quitEarly,\n changes: toLineRangeMappings(result.changes),\n moves: result.moves.map(m => new MovedText(new LineRangeMapping(new LineRange(m[0], m[1]), new LineRange(m[2], m[3])), toLineRangeMappings(m[4])))\n };\n return diff;\n function toLineRangeMappings(changes) {\n return changes.map((c) => {\n var _a;\n return new DetailedLineRangeMapping(new LineRange(c[0], c[1]), new LineRange(c[2], c[3]), (_a = c[4]) === null || _a === void 0 ? void 0 : _a.map((c) => new RangeMapping(new Range(c[0], c[1], c[2], c[3]), new Range(c[4], c[5], c[6], c[7]))));\n });\n }\n }\n computeMoreMinimalEdits(resource, edits, pretty = false) {\n if (isNonEmptyArray(edits)) {\n if (!canSyncModel(this._modelService, resource)) {\n return Promise.resolve(edits); // File too large\n }\n const sw = StopWatch.create();\n const result = this._workerManager.withWorker().then(client => client.computeMoreMinimalEdits(resource, edits, pretty));\n result.finally(() => this._logService.trace('FORMAT#computeMoreMinimalEdits', resource.toString(true), sw.elapsed()));\n return Promise.race([result, timeout(1000).then(() => edits)]);\n }\n else {\n return Promise.resolve(undefined);\n }\n }\n canNavigateValueSet(resource) {\n return (canSyncModel(this._modelService, resource));\n }\n navigateValueSet(resource, range, up) {\n return this._workerManager.withWorker().then(client => client.navigateValueSet(resource, range, up));\n }\n canComputeWordRanges(resource) {\n return canSyncModel(this._modelService, resource);\n }\n computeWordRanges(resource, range) {\n return this._workerManager.withWorker().then(client => client.computeWordRanges(resource, range));\n }\n};\nEditorWorkerService = __decorate([\n __param(0, IModelService),\n __param(1, ITextResourceConfigurationService),\n __param(2, ILogService),\n __param(3, ILanguageConfigurationService),\n __param(4, ILanguageFeaturesService)\n], EditorWorkerService);\nexport { EditorWorkerService };\nclass WordBasedCompletionItemProvider {\n constructor(workerManager, configurationService, modelService, languageConfigurationService) {\n this.languageConfigurationService = languageConfigurationService;\n this._debugDisplayName = 'wordbasedCompletions';\n this._workerManager = workerManager;\n this._configurationService = configurationService;\n this._modelService = modelService;\n }\n async provideCompletionItems(model, position) {\n const config = this._configurationService.getValue(model.uri, position, 'editor');\n if (config.wordBasedSuggestions === 'off') {\n return undefined;\n }\n const models = [];\n if (config.wordBasedSuggestions === 'currentDocument') {\n // only current file and only if not too large\n if (canSyncModel(this._modelService, model.uri)) {\n models.push(model.uri);\n }\n }\n else {\n // either all files or files of same language\n for (const candidate of this._modelService.getModels()) {\n if (!canSyncModel(this._modelService, candidate.uri)) {\n continue;\n }\n if (candidate === model) {\n models.unshift(candidate.uri);\n }\n else if (config.wordBasedSuggestions === 'allDocuments' || candidate.getLanguageId() === model.getLanguageId()) {\n models.push(candidate.uri);\n }\n }\n }\n if (models.length === 0) {\n return undefined; // File too large, no other files\n }\n const wordDefRegExp = this.languageConfigurationService.getLanguageConfiguration(model.getLanguageId()).getWordDefinition();\n const word = model.getWordAtPosition(position);\n const replace = !word ? Range.fromPositions(position) : new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn);\n const insert = replace.setEndPosition(position.lineNumber, position.column);\n const client = await this._workerManager.withWorker();\n const data = await client.textualSuggest(models, word === null || word === void 0 ? void 0 : word.word, wordDefRegExp);\n if (!data) {\n return undefined;\n }\n return {\n duration: data.duration,\n suggestions: data.words.map((word) => {\n return {\n kind: 18 /* languages.CompletionItemKind.Text */,\n label: word,\n insertText: word,\n range: { insert, replace }\n };\n }),\n };\n }\n}\nclass WorkerManager extends Disposable {\n constructor(modelService, languageConfigurationService) {\n super();\n this.languageConfigurationService = languageConfigurationService;\n this._modelService = modelService;\n this._editorWorkerClient = null;\n this._lastWorkerUsedTime = (new Date()).getTime();\n const stopWorkerInterval = this._register(new WindowIntervalTimer());\n stopWorkerInterval.cancelAndSet(() => this._checkStopIdleWorker(), Math.round(STOP_WORKER_DELTA_TIME_MS / 2), $window);\n this._register(this._modelService.onModelRemoved(_ => this._checkStopEmptyWorker()));\n }\n dispose() {\n if (this._editorWorkerClient) {\n this._editorWorkerClient.dispose();\n this._editorWorkerClient = null;\n }\n super.dispose();\n }\n /**\n * Check if the model service has no more models and stop the worker if that is the case.\n */\n _checkStopEmptyWorker() {\n if (!this._editorWorkerClient) {\n return;\n }\n const models = this._modelService.getModels();\n if (models.length === 0) {\n // There are no more models => nothing possible for me to do\n this._editorWorkerClient.dispose();\n this._editorWorkerClient = null;\n }\n }\n /**\n * Check if the worker has been idle for a while and then stop it.\n */\n _checkStopIdleWorker() {\n if (!this._editorWorkerClient) {\n return;\n }\n const timeSinceLastWorkerUsedTime = (new Date()).getTime() - this._lastWorkerUsedTime;\n if (timeSinceLastWorkerUsedTime > STOP_WORKER_DELTA_TIME_MS) {\n this._editorWorkerClient.dispose();\n this._editorWorkerClient = null;\n }\n }\n withWorker() {\n this._lastWorkerUsedTime = (new Date()).getTime();\n if (!this._editorWorkerClient) {\n this._editorWorkerClient = new EditorWorkerClient(this._modelService, false, 'editorWorkerService', this.languageConfigurationService);\n }\n return Promise.resolve(this._editorWorkerClient);\n }\n}\nclass EditorModelManager extends Disposable {\n constructor(proxy, modelService, keepIdleModels) {\n super();\n this._syncedModels = Object.create(null);\n this._syncedModelsLastUsedTime = Object.create(null);\n this._proxy = proxy;\n this._modelService = modelService;\n if (!keepIdleModels) {\n const timer = new IntervalTimer();\n timer.cancelAndSet(() => this._checkStopModelSync(), Math.round(STOP_SYNC_MODEL_DELTA_TIME_MS / 2));\n this._register(timer);\n }\n }\n dispose() {\n for (const modelUrl in this._syncedModels) {\n dispose(this._syncedModels[modelUrl]);\n }\n this._syncedModels = Object.create(null);\n this._syncedModelsLastUsedTime = Object.create(null);\n super.dispose();\n }\n ensureSyncedResources(resources, forceLargeModels) {\n for (const resource of resources) {\n const resourceStr = resource.toString();\n if (!this._syncedModels[resourceStr]) {\n this._beginModelSync(resource, forceLargeModels);\n }\n if (this._syncedModels[resourceStr]) {\n this._syncedModelsLastUsedTime[resourceStr] = (new Date()).getTime();\n }\n }\n }\n _checkStopModelSync() {\n const currentTime = (new Date()).getTime();\n const toRemove = [];\n for (const modelUrl in this._syncedModelsLastUsedTime) {\n const elapsedTime = currentTime - this._syncedModelsLastUsedTime[modelUrl];\n if (elapsedTime > STOP_SYNC_MODEL_DELTA_TIME_MS) {\n toRemove.push(modelUrl);\n }\n }\n for (const e of toRemove) {\n this._stopModelSync(e);\n }\n }\n _beginModelSync(resource, forceLargeModels) {\n const model = this._modelService.getModel(resource);\n if (!model) {\n return;\n }\n if (!forceLargeModels && model.isTooLargeForSyncing()) {\n return;\n }\n const modelUrl = resource.toString();\n this._proxy.acceptNewModel({\n url: model.uri.toString(),\n lines: model.getLinesContent(),\n EOL: model.getEOL(),\n versionId: model.getVersionId()\n });\n const toDispose = new DisposableStore();\n toDispose.add(model.onDidChangeContent((e) => {\n this._proxy.acceptModelChanged(modelUrl.toString(), e);\n }));\n toDispose.add(model.onWillDispose(() => {\n this._stopModelSync(modelUrl);\n }));\n toDispose.add(toDisposable(() => {\n this._proxy.acceptRemovedModel(modelUrl);\n }));\n this._syncedModels[modelUrl] = toDispose;\n }\n _stopModelSync(modelUrl) {\n const toDispose = this._syncedModels[modelUrl];\n delete this._syncedModels[modelUrl];\n delete this._syncedModelsLastUsedTime[modelUrl];\n dispose(toDispose);\n }\n}\nclass SynchronousWorkerClient {\n constructor(instance) {\n this._instance = instance;\n this._proxyObj = Promise.resolve(this._instance);\n }\n dispose() {\n this._instance.dispose();\n }\n getProxyObject() {\n return this._proxyObj;\n }\n}\nexport class EditorWorkerHost {\n constructor(workerClient) {\n this._workerClient = workerClient;\n }\n // foreign host request\n fhr(method, args) {\n return this._workerClient.fhr(method, args);\n }\n}\nexport class EditorWorkerClient extends Disposable {\n constructor(modelService, keepIdleModels, label, languageConfigurationService) {\n super();\n this.languageConfigurationService = languageConfigurationService;\n this._disposed = false;\n this._modelService = modelService;\n this._keepIdleModels = keepIdleModels;\n this._workerFactory = new DefaultWorkerFactory(label);\n this._worker = null;\n this._modelManager = null;\n }\n // foreign host request\n fhr(method, args) {\n throw new Error(`Not implemented!`);\n }\n _getOrCreateWorker() {\n if (!this._worker) {\n try {\n this._worker = this._register(new SimpleWorkerClient(this._workerFactory, 'vs/editor/common/services/editorSimpleWorker', new EditorWorkerHost(this)));\n }\n catch (err) {\n logOnceWebWorkerWarning(err);\n this._worker = new SynchronousWorkerClient(new EditorSimpleWorker(new EditorWorkerHost(this), null));\n }\n }\n return this._worker;\n }\n _getProxy() {\n return this._getOrCreateWorker().getProxyObject().then(undefined, (err) => {\n logOnceWebWorkerWarning(err);\n this._worker = new SynchronousWorkerClient(new EditorSimpleWorker(new EditorWorkerHost(this), null));\n return this._getOrCreateWorker().getProxyObject();\n });\n }\n _getOrCreateModelManager(proxy) {\n if (!this._modelManager) {\n this._modelManager = this._register(new EditorModelManager(proxy, this._modelService, this._keepIdleModels));\n }\n return this._modelManager;\n }\n async _withSyncedResources(resources, forceLargeModels = false) {\n if (this._disposed) {\n return Promise.reject(canceled());\n }\n return this._getProxy().then((proxy) => {\n this._getOrCreateModelManager(proxy).ensureSyncedResources(resources, forceLargeModels);\n return proxy;\n });\n }\n computedUnicodeHighlights(uri, options, range) {\n return this._withSyncedResources([uri]).then(proxy => {\n return proxy.computeUnicodeHighlights(uri.toString(), options, range);\n });\n }\n computeDiff(original, modified, options, algorithm) {\n return this._withSyncedResources([original, modified], /* forceLargeModels */ true).then(proxy => {\n return proxy.computeDiff(original.toString(), modified.toString(), options, algorithm);\n });\n }\n computeMoreMinimalEdits(resource, edits, pretty) {\n return this._withSyncedResources([resource]).then(proxy => {\n return proxy.computeMoreMinimalEdits(resource.toString(), edits, pretty);\n });\n }\n computeLinks(resource) {\n return this._withSyncedResources([resource]).then(proxy => {\n return proxy.computeLinks(resource.toString());\n });\n }\n computeDefaultDocumentColors(resource) {\n return this._withSyncedResources([resource]).then(proxy => {\n return proxy.computeDefaultDocumentColors(resource.toString());\n });\n }\n async textualSuggest(resources, leadingWord, wordDefRegExp) {\n const proxy = await this._withSyncedResources(resources);\n const wordDef = wordDefRegExp.source;\n const wordDefFlags = wordDefRegExp.flags;\n return proxy.textualSuggest(resources.map(r => r.toString()), leadingWord, wordDef, wordDefFlags);\n }\n computeWordRanges(resource, range) {\n return this._withSyncedResources([resource]).then(proxy => {\n const model = this._modelService.getModel(resource);\n if (!model) {\n return Promise.resolve(null);\n }\n const wordDefRegExp = this.languageConfigurationService.getLanguageConfiguration(model.getLanguageId()).getWordDefinition();\n const wordDef = wordDefRegExp.source;\n const wordDefFlags = wordDefRegExp.flags;\n return proxy.computeWordRanges(resource.toString(), range, wordDef, wordDefFlags);\n });\n }\n navigateValueSet(resource, range, up) {\n return this._withSyncedResources([resource]).then(proxy => {\n const model = this._modelService.getModel(resource);\n if (!model) {\n return null;\n }\n const wordDefRegExp = this.languageConfigurationService.getLanguageConfiguration(model.getLanguageId()).getWordDefinition();\n const wordDef = wordDefRegExp.source;\n const wordDefFlags = wordDefRegExp.flags;\n return proxy.navigateValueSet(resource.toString(), range, up, wordDef, wordDefFlags);\n });\n }\n dispose() {\n super.dispose();\n this._disposed = true;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { getAllMethodNames } from '../../../base/common/objects.js';\nimport { EditorWorkerClient } from './editorWorkerService.js';\n/**\n * Create a new web worker that has model syncing capabilities built in.\n * Specify an AMD module to load that will `create` an object that will be proxied.\n */\nexport function createWebWorker(modelService, languageConfigurationService, opts) {\n return new MonacoWebWorkerImpl(modelService, languageConfigurationService, opts);\n}\nclass MonacoWebWorkerImpl extends EditorWorkerClient {\n constructor(modelService, languageConfigurationService, opts) {\n super(modelService, opts.keepIdleModels || false, opts.label, languageConfigurationService);\n this._foreignModuleId = opts.moduleId;\n this._foreignModuleCreateData = opts.createData || null;\n this._foreignModuleHost = opts.host || null;\n this._foreignProxy = null;\n }\n // foreign host request\n fhr(method, args) {\n if (!this._foreignModuleHost || typeof this._foreignModuleHost[method] !== 'function') {\n return Promise.reject(new Error('Missing method ' + method + ' or missing main thread foreign host.'));\n }\n try {\n return Promise.resolve(this._foreignModuleHost[method].apply(this._foreignModuleHost, args));\n }\n catch (e) {\n return Promise.reject(e);\n }\n }\n _getForeignProxy() {\n if (!this._foreignProxy) {\n this._foreignProxy = this._getProxy().then((proxy) => {\n const foreignHostMethods = this._foreignModuleHost ? getAllMethodNames(this._foreignModuleHost) : [];\n return proxy.loadForeignModule(this._foreignModuleId, this._foreignModuleCreateData, foreignHostMethods).then((foreignMethods) => {\n this._foreignModuleCreateData = null;\n const proxyMethodRequest = (method, args) => {\n return proxy.fmr(method, args);\n };\n const createProxyMethod = (method, proxyMethodRequest) => {\n return function () {\n const args = Array.prototype.slice.call(arguments, 0);\n return proxyMethodRequest(method, args);\n };\n };\n const foreignProxy = {};\n for (const foreignMethod of foreignMethods) {\n foreignProxy[foreignMethod] = createProxyMethod(foreignMethod, proxyMethodRequest);\n }\n return foreignProxy;\n });\n });\n }\n return this._foreignProxy;\n }\n getProxy() {\n return this._getForeignProxy();\n }\n withSyncedResources(resources) {\n return this._withSyncedResources(resources).then(_ => this.getProxy());\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/**\n * The type of the `IEditor`.\n */\nexport const EditorType = {\n ICodeEditor: 'vs.editor.ICodeEditor',\n IDiffEditor: 'vs.editor.IDiffEditor'\n};\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Token, TokenizationResult, EncodedTokenizationResult } from '../languages.js';\nexport const NullState = new class {\n clone() {\n return this;\n }\n equals(other) {\n return (this === other);\n }\n};\nexport function nullTokenize(languageId, state) {\n return new TokenizationResult([new Token(0, '', languageId)], state);\n}\nexport function nullTokenizeEncoded(languageId, state) {\n const tokens = new Uint32Array(2);\n tokens[0] = 0;\n tokens[1] = ((languageId << 0 /* MetadataConsts.LANGUAGEID_OFFSET */)\n | (0 /* StandardTokenType.Other */ << 8 /* MetadataConsts.TOKEN_TYPE_OFFSET */)\n | (0 /* FontStyle.None */ << 11 /* MetadataConsts.FONT_STYLE_OFFSET */)\n | (1 /* ColorId.DefaultForeground */ << 15 /* MetadataConsts.FOREGROUND_OFFSET */)\n | (2 /* ColorId.DefaultBackground */ << 24 /* MetadataConsts.BACKGROUND_OFFSET */)) >>> 0;\n return new EncodedTokenizationResult(tokens, state === null ? NullState : state);\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/**\n */\nexport class TokenMetadata {\n static getLanguageId(metadata) {\n return (metadata & 255 /* MetadataConsts.LANGUAGEID_MASK */) >>> 0 /* MetadataConsts.LANGUAGEID_OFFSET */;\n }\n static getTokenType(metadata) {\n return (metadata & 768 /* MetadataConsts.TOKEN_TYPE_MASK */) >>> 8 /* MetadataConsts.TOKEN_TYPE_OFFSET */;\n }\n static containsBalancedBrackets(metadata) {\n return (metadata & 1024 /* MetadataConsts.BALANCED_BRACKETS_MASK */) !== 0;\n }\n static getFontStyle(metadata) {\n return (metadata & 30720 /* MetadataConsts.FONT_STYLE_MASK */) >>> 11 /* MetadataConsts.FONT_STYLE_OFFSET */;\n }\n static getForeground(metadata) {\n return (metadata & 16744448 /* MetadataConsts.FOREGROUND_MASK */) >>> 15 /* MetadataConsts.FOREGROUND_OFFSET */;\n }\n static getBackground(metadata) {\n return (metadata & 4278190080 /* MetadataConsts.BACKGROUND_MASK */) >>> 24 /* MetadataConsts.BACKGROUND_OFFSET */;\n }\n static getClassNameFromMetadata(metadata) {\n const foreground = this.getForeground(metadata);\n let className = 'mtk' + foreground;\n const fontStyle = this.getFontStyle(metadata);\n if (fontStyle & 1 /* FontStyle.Italic */) {\n className += ' mtki';\n }\n if (fontStyle & 2 /* FontStyle.Bold */) {\n className += ' mtkb';\n }\n if (fontStyle & 4 /* FontStyle.Underline */) {\n className += ' mtku';\n }\n if (fontStyle & 8 /* FontStyle.Strikethrough */) {\n className += ' mtks';\n }\n return className;\n }\n static getInlineStyleFromMetadata(metadata, colorMap) {\n const foreground = this.getForeground(metadata);\n const fontStyle = this.getFontStyle(metadata);\n let result = `color: ${colorMap[foreground]};`;\n if (fontStyle & 1 /* FontStyle.Italic */) {\n result += 'font-style: italic;';\n }\n if (fontStyle & 2 /* FontStyle.Bold */) {\n result += 'font-weight: bold;';\n }\n let textDecoration = '';\n if (fontStyle & 4 /* FontStyle.Underline */) {\n textDecoration += ' underline';\n }\n if (fontStyle & 8 /* FontStyle.Strikethrough */) {\n textDecoration += ' line-through';\n }\n if (textDecoration) {\n result += `text-decoration:${textDecoration};`;\n }\n return result;\n }\n static getPresentationFromMetadata(metadata) {\n const foreground = this.getForeground(metadata);\n const fontStyle = this.getFontStyle(metadata);\n return {\n foreground: foreground,\n italic: Boolean(fontStyle & 1 /* FontStyle.Italic */),\n bold: Boolean(fontStyle & 2 /* FontStyle.Bold */),\n underline: Boolean(fontStyle & 4 /* FontStyle.Underline */),\n strikethrough: Boolean(fontStyle & 8 /* FontStyle.Strikethrough */),\n };\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { TokenMetadata } from '../encodedTokenAttributes.js';\nexport class LineTokens {\n static createEmpty(lineContent, decoder) {\n const defaultMetadata = LineTokens.defaultTokenMetadata;\n const tokens = new Uint32Array(2);\n tokens[0] = lineContent.length;\n tokens[1] = defaultMetadata;\n return new LineTokens(tokens, lineContent, decoder);\n }\n constructor(tokens, text, decoder) {\n this._lineTokensBrand = undefined;\n this._tokens = tokens;\n this._tokensCount = (this._tokens.length >>> 1);\n this._text = text;\n this._languageIdCodec = decoder;\n }\n equals(other) {\n if (other instanceof LineTokens) {\n return this.slicedEquals(other, 0, this._tokensCount);\n }\n return false;\n }\n slicedEquals(other, sliceFromTokenIndex, sliceTokenCount) {\n if (this._text !== other._text) {\n return false;\n }\n if (this._tokensCount !== other._tokensCount) {\n return false;\n }\n const from = (sliceFromTokenIndex << 1);\n const to = from + (sliceTokenCount << 1);\n for (let i = from; i < to; i++) {\n if (this._tokens[i] !== other._tokens[i]) {\n return false;\n }\n }\n return true;\n }\n getLineContent() {\n return this._text;\n }\n getCount() {\n return this._tokensCount;\n }\n getStartOffset(tokenIndex) {\n if (tokenIndex > 0) {\n return this._tokens[(tokenIndex - 1) << 1];\n }\n return 0;\n }\n getMetadata(tokenIndex) {\n const metadata = this._tokens[(tokenIndex << 1) + 1];\n return metadata;\n }\n getLanguageId(tokenIndex) {\n const metadata = this._tokens[(tokenIndex << 1) + 1];\n const languageId = TokenMetadata.getLanguageId(metadata);\n return this._languageIdCodec.decodeLanguageId(languageId);\n }\n getStandardTokenType(tokenIndex) {\n const metadata = this._tokens[(tokenIndex << 1) + 1];\n return TokenMetadata.getTokenType(metadata);\n }\n getForeground(tokenIndex) {\n const metadata = this._tokens[(tokenIndex << 1) + 1];\n return TokenMetadata.getForeground(metadata);\n }\n getClassName(tokenIndex) {\n const metadata = this._tokens[(tokenIndex << 1) + 1];\n return TokenMetadata.getClassNameFromMetadata(metadata);\n }\n getInlineStyle(tokenIndex, colorMap) {\n const metadata = this._tokens[(tokenIndex << 1) + 1];\n return TokenMetadata.getInlineStyleFromMetadata(metadata, colorMap);\n }\n getPresentation(tokenIndex) {\n const metadata = this._tokens[(tokenIndex << 1) + 1];\n return TokenMetadata.getPresentationFromMetadata(metadata);\n }\n getEndOffset(tokenIndex) {\n return this._tokens[tokenIndex << 1];\n }\n /**\n * Find the token containing offset `offset`.\n * @param offset The search offset\n * @return The index of the token containing the offset.\n */\n findTokenIndexAtOffset(offset) {\n return LineTokens.findIndexInTokensArray(this._tokens, offset);\n }\n inflate() {\n return this;\n }\n sliceAndInflate(startOffset, endOffset, deltaOffset) {\n return new SliceLineTokens(this, startOffset, endOffset, deltaOffset);\n }\n static convertToEndOffset(tokens, lineTextLength) {\n const tokenCount = (tokens.length >>> 1);\n const lastTokenIndex = tokenCount - 1;\n for (let tokenIndex = 0; tokenIndex < lastTokenIndex; tokenIndex++) {\n tokens[tokenIndex << 1] = tokens[(tokenIndex + 1) << 1];\n }\n tokens[lastTokenIndex << 1] = lineTextLength;\n }\n static findIndexInTokensArray(tokens, desiredIndex) {\n if (tokens.length <= 2) {\n return 0;\n }\n let low = 0;\n let high = (tokens.length >>> 1) - 1;\n while (low < high) {\n const mid = low + Math.floor((high - low) / 2);\n const endOffset = tokens[(mid << 1)];\n if (endOffset === desiredIndex) {\n return mid + 1;\n }\n else if (endOffset < desiredIndex) {\n low = mid + 1;\n }\n else if (endOffset > desiredIndex) {\n high = mid;\n }\n }\n return low;\n }\n /**\n * @pure\n * @param insertTokens Must be sorted by offset.\n */\n withInserted(insertTokens) {\n if (insertTokens.length === 0) {\n return this;\n }\n let nextOriginalTokenIdx = 0;\n let nextInsertTokenIdx = 0;\n let text = '';\n const newTokens = new Array();\n let originalEndOffset = 0;\n while (true) {\n const nextOriginalTokenEndOffset = nextOriginalTokenIdx < this._tokensCount ? this._tokens[nextOriginalTokenIdx << 1] : -1;\n const nextInsertToken = nextInsertTokenIdx < insertTokens.length ? insertTokens[nextInsertTokenIdx] : null;\n if (nextOriginalTokenEndOffset !== -1 && (nextInsertToken === null || nextOriginalTokenEndOffset <= nextInsertToken.offset)) {\n // original token ends before next insert token\n text += this._text.substring(originalEndOffset, nextOriginalTokenEndOffset);\n const metadata = this._tokens[(nextOriginalTokenIdx << 1) + 1];\n newTokens.push(text.length, metadata);\n nextOriginalTokenIdx++;\n originalEndOffset = nextOriginalTokenEndOffset;\n }\n else if (nextInsertToken) {\n if (nextInsertToken.offset > originalEndOffset) {\n // insert token is in the middle of the next token.\n text += this._text.substring(originalEndOffset, nextInsertToken.offset);\n const metadata = this._tokens[(nextOriginalTokenIdx << 1) + 1];\n newTokens.push(text.length, metadata);\n originalEndOffset = nextInsertToken.offset;\n }\n text += nextInsertToken.text;\n newTokens.push(text.length, nextInsertToken.tokenMetadata);\n nextInsertTokenIdx++;\n }\n else {\n break;\n }\n }\n return new LineTokens(new Uint32Array(newTokens), text, this._languageIdCodec);\n }\n}\nLineTokens.defaultTokenMetadata = ((0 /* FontStyle.None */ << 11 /* MetadataConsts.FONT_STYLE_OFFSET */)\n | (1 /* ColorId.DefaultForeground */ << 15 /* MetadataConsts.FOREGROUND_OFFSET */)\n | (2 /* ColorId.DefaultBackground */ << 24 /* MetadataConsts.BACKGROUND_OFFSET */)) >>> 0;\nclass SliceLineTokens {\n constructor(source, startOffset, endOffset, deltaOffset) {\n this._source = source;\n this._startOffset = startOffset;\n this._endOffset = endOffset;\n this._deltaOffset = deltaOffset;\n this._firstTokenIndex = source.findTokenIndexAtOffset(startOffset);\n this._tokensCount = 0;\n for (let i = this._firstTokenIndex, len = source.getCount(); i < len; i++) {\n const tokenStartOffset = source.getStartOffset(i);\n if (tokenStartOffset >= endOffset) {\n break;\n }\n this._tokensCount++;\n }\n }\n getMetadata(tokenIndex) {\n return this._source.getMetadata(this._firstTokenIndex + tokenIndex);\n }\n getLanguageId(tokenIndex) {\n return this._source.getLanguageId(this._firstTokenIndex + tokenIndex);\n }\n getLineContent() {\n return this._source.getLineContent().substring(this._startOffset, this._endOffset);\n }\n equals(other) {\n if (other instanceof SliceLineTokens) {\n return (this._startOffset === other._startOffset\n && this._endOffset === other._endOffset\n && this._deltaOffset === other._deltaOffset\n && this._source.slicedEquals(other._source, this._firstTokenIndex, this._tokensCount));\n }\n return false;\n }\n getCount() {\n return this._tokensCount;\n }\n getForeground(tokenIndex) {\n return this._source.getForeground(this._firstTokenIndex + tokenIndex);\n }\n getEndOffset(tokenIndex) {\n const tokenEndOffset = this._source.getEndOffset(this._firstTokenIndex + tokenIndex);\n return Math.min(this._endOffset, tokenEndOffset) - this._startOffset + this._deltaOffset;\n }\n getClassName(tokenIndex) {\n return this._source.getClassName(this._firstTokenIndex + tokenIndex);\n }\n getInlineStyle(tokenIndex, colorMap) {\n return this._source.getInlineStyle(this._firstTokenIndex + tokenIndex, colorMap);\n }\n getPresentation(tokenIndex) {\n return this._source.getPresentation(this._firstTokenIndex + tokenIndex);\n }\n findTokenIndexAtOffset(offset) {\n return this._source.findTokenIndexAtOffset(offset + this._startOffset - this._deltaOffset) - this._firstTokenIndex;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as strings from '../../../base/common/strings.js';\nexport class LineDecoration {\n constructor(startColumn, endColumn, className, type) {\n this.startColumn = startColumn;\n this.endColumn = endColumn;\n this.className = className;\n this.type = type;\n this._lineDecorationBrand = undefined;\n }\n static _equals(a, b) {\n return (a.startColumn === b.startColumn\n && a.endColumn === b.endColumn\n && a.className === b.className\n && a.type === b.type);\n }\n static equalsArr(a, b) {\n const aLen = a.length;\n const bLen = b.length;\n if (aLen !== bLen) {\n return false;\n }\n for (let i = 0; i < aLen; i++) {\n if (!LineDecoration._equals(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n static extractWrapped(arr, startOffset, endOffset) {\n if (arr.length === 0) {\n return arr;\n }\n const startColumn = startOffset + 1;\n const endColumn = endOffset + 1;\n const lineLength = endOffset - startOffset;\n const r = [];\n let rLength = 0;\n for (const dec of arr) {\n if (dec.endColumn <= startColumn || dec.startColumn >= endColumn) {\n continue;\n }\n r[rLength++] = new LineDecoration(Math.max(1, dec.startColumn - startColumn + 1), Math.min(lineLength + 1, dec.endColumn - startColumn + 1), dec.className, dec.type);\n }\n return r;\n }\n static filter(lineDecorations, lineNumber, minLineColumn, maxLineColumn) {\n if (lineDecorations.length === 0) {\n return [];\n }\n const result = [];\n let resultLen = 0;\n for (let i = 0, len = lineDecorations.length; i < len; i++) {\n const d = lineDecorations[i];\n const range = d.range;\n if (range.endLineNumber < lineNumber || range.startLineNumber > lineNumber) {\n // Ignore decorations that sit outside this line\n continue;\n }\n if (range.isEmpty() && (d.type === 0 /* InlineDecorationType.Regular */ || d.type === 3 /* InlineDecorationType.RegularAffectingLetterSpacing */)) {\n // Ignore empty range decorations\n continue;\n }\n const startColumn = (range.startLineNumber === lineNumber ? range.startColumn : minLineColumn);\n const endColumn = (range.endLineNumber === lineNumber ? range.endColumn : maxLineColumn);\n result[resultLen++] = new LineDecoration(startColumn, endColumn, d.inlineClassName, d.type);\n }\n return result;\n }\n static _typeCompare(a, b) {\n const ORDER = [2, 0, 1, 3];\n return ORDER[a] - ORDER[b];\n }\n static compare(a, b) {\n if (a.startColumn !== b.startColumn) {\n return a.startColumn - b.startColumn;\n }\n if (a.endColumn !== b.endColumn) {\n return a.endColumn - b.endColumn;\n }\n const typeCmp = LineDecoration._typeCompare(a.type, b.type);\n if (typeCmp !== 0) {\n return typeCmp;\n }\n if (a.className !== b.className) {\n return a.className < b.className ? -1 : 1;\n }\n return 0;\n }\n}\nexport class DecorationSegment {\n constructor(startOffset, endOffset, className, metadata) {\n this.startOffset = startOffset;\n this.endOffset = endOffset;\n this.className = className;\n this.metadata = metadata;\n }\n}\nclass Stack {\n constructor() {\n this.stopOffsets = [];\n this.classNames = [];\n this.metadata = [];\n this.count = 0;\n }\n static _metadata(metadata) {\n let result = 0;\n for (let i = 0, len = metadata.length; i < len; i++) {\n result |= metadata[i];\n }\n return result;\n }\n consumeLowerThan(maxStopOffset, nextStartOffset, result) {\n while (this.count > 0 && this.stopOffsets[0] < maxStopOffset) {\n let i = 0;\n // Take all equal stopping offsets\n while (i + 1 < this.count && this.stopOffsets[i] === this.stopOffsets[i + 1]) {\n i++;\n }\n // Basically we are consuming the first i + 1 elements of the stack\n result.push(new DecorationSegment(nextStartOffset, this.stopOffsets[i], this.classNames.join(' '), Stack._metadata(this.metadata)));\n nextStartOffset = this.stopOffsets[i] + 1;\n // Consume them\n this.stopOffsets.splice(0, i + 1);\n this.classNames.splice(0, i + 1);\n this.metadata.splice(0, i + 1);\n this.count -= (i + 1);\n }\n if (this.count > 0 && nextStartOffset < maxStopOffset) {\n result.push(new DecorationSegment(nextStartOffset, maxStopOffset - 1, this.classNames.join(' '), Stack._metadata(this.metadata)));\n nextStartOffset = maxStopOffset;\n }\n return nextStartOffset;\n }\n insert(stopOffset, className, metadata) {\n if (this.count === 0 || this.stopOffsets[this.count - 1] <= stopOffset) {\n // Insert at the end\n this.stopOffsets.push(stopOffset);\n this.classNames.push(className);\n this.metadata.push(metadata);\n }\n else {\n // Find the insertion position for `stopOffset`\n for (let i = 0; i < this.count; i++) {\n if (this.stopOffsets[i] >= stopOffset) {\n this.stopOffsets.splice(i, 0, stopOffset);\n this.classNames.splice(i, 0, className);\n this.metadata.splice(i, 0, metadata);\n break;\n }\n }\n }\n this.count++;\n return;\n }\n}\nexport class LineDecorationsNormalizer {\n /**\n * Normalize line decorations. Overlapping decorations will generate multiple segments\n */\n static normalize(lineContent, lineDecorations) {\n if (lineDecorations.length === 0) {\n return [];\n }\n const result = [];\n const stack = new Stack();\n let nextStartOffset = 0;\n for (let i = 0, len = lineDecorations.length; i < len; i++) {\n const d = lineDecorations[i];\n let startColumn = d.startColumn;\n let endColumn = d.endColumn;\n const className = d.className;\n const metadata = (d.type === 1 /* InlineDecorationType.Before */\n ? 2 /* LinePartMetadata.PSEUDO_BEFORE */\n : d.type === 2 /* InlineDecorationType.After */\n ? 4 /* LinePartMetadata.PSEUDO_AFTER */\n : 0);\n // If the position would end up in the middle of a high-low surrogate pair, we move it to before the pair\n if (startColumn > 1) {\n const charCodeBefore = lineContent.charCodeAt(startColumn - 2);\n if (strings.isHighSurrogate(charCodeBefore)) {\n startColumn--;\n }\n }\n if (endColumn > 1) {\n const charCodeBefore = lineContent.charCodeAt(endColumn - 2);\n if (strings.isHighSurrogate(charCodeBefore)) {\n endColumn--;\n }\n }\n const currentStartOffset = startColumn - 1;\n const currentEndOffset = endColumn - 2;\n nextStartOffset = stack.consumeLowerThan(currentStartOffset, nextStartOffset, result);\n if (stack.count === 0) {\n nextStartOffset = currentStartOffset;\n }\n stack.insert(currentEndOffset, className, metadata);\n }\n stack.consumeLowerThan(1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */, nextStartOffset, result);\n return result;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport class LinePart {\n constructor(\n /**\n * last char index of this token (not inclusive).\n */\n endIndex, type, metadata, containsRTL) {\n this.endIndex = endIndex;\n this.type = type;\n this.metadata = metadata;\n this.containsRTL = containsRTL;\n this._linePartBrand = undefined;\n }\n isWhitespace() {\n return (this.metadata & 1 /* LinePartMetadata.IS_WHITESPACE_MASK */ ? true : false);\n }\n isPseudoAfter() {\n return (this.metadata & 4 /* LinePartMetadata.PSEUDO_AFTER_MASK */ ? true : false);\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as nls from '../../../nls.js';\nimport * as strings from '../../../base/common/strings.js';\nimport { StringBuilder } from '../core/stringBuilder.js';\nimport { LineDecoration, LineDecorationsNormalizer } from './lineDecorations.js';\nimport { LinePart } from './linePart.js';\nexport class LineRange {\n constructor(startIndex, endIndex) {\n this.startOffset = startIndex;\n this.endOffset = endIndex;\n }\n equals(otherLineRange) {\n return this.startOffset === otherLineRange.startOffset\n && this.endOffset === otherLineRange.endOffset;\n }\n}\nexport class RenderLineInput {\n constructor(useMonospaceOptimizations, canUseHalfwidthRightwardsArrow, lineContent, continuesWithWrappedLine, isBasicASCII, containsRTL, fauxIndentLength, lineTokens, lineDecorations, tabSize, startVisibleColumn, spaceWidth, middotWidth, wsmiddotWidth, stopRenderingLineAfter, renderWhitespace, renderControlCharacters, fontLigatures, selectionsOnLine) {\n this.useMonospaceOptimizations = useMonospaceOptimizations;\n this.canUseHalfwidthRightwardsArrow = canUseHalfwidthRightwardsArrow;\n this.lineContent = lineContent;\n this.continuesWithWrappedLine = continuesWithWrappedLine;\n this.isBasicASCII = isBasicASCII;\n this.containsRTL = containsRTL;\n this.fauxIndentLength = fauxIndentLength;\n this.lineTokens = lineTokens;\n this.lineDecorations = lineDecorations.sort(LineDecoration.compare);\n this.tabSize = tabSize;\n this.startVisibleColumn = startVisibleColumn;\n this.spaceWidth = spaceWidth;\n this.stopRenderingLineAfter = stopRenderingLineAfter;\n this.renderWhitespace = (renderWhitespace === 'all'\n ? 4 /* RenderWhitespace.All */\n : renderWhitespace === 'boundary'\n ? 1 /* RenderWhitespace.Boundary */\n : renderWhitespace === 'selection'\n ? 2 /* RenderWhitespace.Selection */\n : renderWhitespace === 'trailing'\n ? 3 /* RenderWhitespace.Trailing */\n : 0 /* RenderWhitespace.None */);\n this.renderControlCharacters = renderControlCharacters;\n this.fontLigatures = fontLigatures;\n this.selectionsOnLine = selectionsOnLine && selectionsOnLine.sort((a, b) => a.startOffset < b.startOffset ? -1 : 1);\n const wsmiddotDiff = Math.abs(wsmiddotWidth - spaceWidth);\n const middotDiff = Math.abs(middotWidth - spaceWidth);\n if (wsmiddotDiff < middotDiff) {\n this.renderSpaceWidth = wsmiddotWidth;\n this.renderSpaceCharCode = 0x2E31; // U+2E31 - WORD SEPARATOR MIDDLE DOT\n }\n else {\n this.renderSpaceWidth = middotWidth;\n this.renderSpaceCharCode = 0xB7; // U+00B7 - MIDDLE DOT\n }\n }\n sameSelection(otherSelections) {\n if (this.selectionsOnLine === null) {\n return otherSelections === null;\n }\n if (otherSelections === null) {\n return false;\n }\n if (otherSelections.length !== this.selectionsOnLine.length) {\n return false;\n }\n for (let i = 0; i < this.selectionsOnLine.length; i++) {\n if (!this.selectionsOnLine[i].equals(otherSelections[i])) {\n return false;\n }\n }\n return true;\n }\n equals(other) {\n return (this.useMonospaceOptimizations === other.useMonospaceOptimizations\n && this.canUseHalfwidthRightwardsArrow === other.canUseHalfwidthRightwardsArrow\n && this.lineContent === other.lineContent\n && this.continuesWithWrappedLine === other.continuesWithWrappedLine\n && this.isBasicASCII === other.isBasicASCII\n && this.containsRTL === other.containsRTL\n && this.fauxIndentLength === other.fauxIndentLength\n && this.tabSize === other.tabSize\n && this.startVisibleColumn === other.startVisibleColumn\n && this.spaceWidth === other.spaceWidth\n && this.renderSpaceWidth === other.renderSpaceWidth\n && this.renderSpaceCharCode === other.renderSpaceCharCode\n && this.stopRenderingLineAfter === other.stopRenderingLineAfter\n && this.renderWhitespace === other.renderWhitespace\n && this.renderControlCharacters === other.renderControlCharacters\n && this.fontLigatures === other.fontLigatures\n && LineDecoration.equalsArr(this.lineDecorations, other.lineDecorations)\n && this.lineTokens.equals(other.lineTokens)\n && this.sameSelection(other.selectionsOnLine));\n }\n}\nexport class DomPosition {\n constructor(partIndex, charIndex) {\n this.partIndex = partIndex;\n this.charIndex = charIndex;\n }\n}\n/**\n * Provides a both direction mapping between a line's character and its rendered position.\n */\nexport class CharacterMapping {\n static getPartIndex(partData) {\n return (partData & 4294901760 /* CharacterMappingConstants.PART_INDEX_MASK */) >>> 16 /* CharacterMappingConstants.PART_INDEX_OFFSET */;\n }\n static getCharIndex(partData) {\n return (partData & 65535 /* CharacterMappingConstants.CHAR_INDEX_MASK */) >>> 0 /* CharacterMappingConstants.CHAR_INDEX_OFFSET */;\n }\n constructor(length, partCount) {\n this.length = length;\n this._data = new Uint32Array(this.length);\n this._horizontalOffset = new Uint32Array(this.length);\n }\n setColumnInfo(column, partIndex, charIndex, horizontalOffset) {\n const partData = ((partIndex << 16 /* CharacterMappingConstants.PART_INDEX_OFFSET */)\n | (charIndex << 0 /* CharacterMappingConstants.CHAR_INDEX_OFFSET */)) >>> 0;\n this._data[column - 1] = partData;\n this._horizontalOffset[column - 1] = horizontalOffset;\n }\n getHorizontalOffset(column) {\n if (this._horizontalOffset.length === 0) {\n // No characters on this line\n return 0;\n }\n return this._horizontalOffset[column - 1];\n }\n charOffsetToPartData(charOffset) {\n if (this.length === 0) {\n return 0;\n }\n if (charOffset < 0) {\n return this._data[0];\n }\n if (charOffset >= this.length) {\n return this._data[this.length - 1];\n }\n return this._data[charOffset];\n }\n getDomPosition(column) {\n const partData = this.charOffsetToPartData(column - 1);\n const partIndex = CharacterMapping.getPartIndex(partData);\n const charIndex = CharacterMapping.getCharIndex(partData);\n return new DomPosition(partIndex, charIndex);\n }\n getColumn(domPosition, partLength) {\n const charOffset = this.partDataToCharOffset(domPosition.partIndex, partLength, domPosition.charIndex);\n return charOffset + 1;\n }\n partDataToCharOffset(partIndex, partLength, charIndex) {\n if (this.length === 0) {\n return 0;\n }\n const searchEntry = ((partIndex << 16 /* CharacterMappingConstants.PART_INDEX_OFFSET */)\n | (charIndex << 0 /* CharacterMappingConstants.CHAR_INDEX_OFFSET */)) >>> 0;\n let min = 0;\n let max = this.length - 1;\n while (min + 1 < max) {\n const mid = ((min + max) >>> 1);\n const midEntry = this._data[mid];\n if (midEntry === searchEntry) {\n return mid;\n }\n else if (midEntry > searchEntry) {\n max = mid;\n }\n else {\n min = mid;\n }\n }\n if (min === max) {\n return min;\n }\n const minEntry = this._data[min];\n const maxEntry = this._data[max];\n if (minEntry === searchEntry) {\n return min;\n }\n if (maxEntry === searchEntry) {\n return max;\n }\n const minPartIndex = CharacterMapping.getPartIndex(minEntry);\n const minCharIndex = CharacterMapping.getCharIndex(minEntry);\n const maxPartIndex = CharacterMapping.getPartIndex(maxEntry);\n let maxCharIndex;\n if (minPartIndex !== maxPartIndex) {\n // sitting between parts\n maxCharIndex = partLength;\n }\n else {\n maxCharIndex = CharacterMapping.getCharIndex(maxEntry);\n }\n const minEntryDistance = charIndex - minCharIndex;\n const maxEntryDistance = maxCharIndex - charIndex;\n if (minEntryDistance <= maxEntryDistance) {\n return min;\n }\n return max;\n }\n}\nexport class RenderLineOutput {\n constructor(characterMapping, containsRTL, containsForeignElements) {\n this._renderLineOutputBrand = undefined;\n this.characterMapping = characterMapping;\n this.containsRTL = containsRTL;\n this.containsForeignElements = containsForeignElements;\n }\n}\nexport function renderViewLine(input, sb) {\n if (input.lineContent.length === 0) {\n if (input.lineDecorations.length > 0) {\n // This line is empty, but it contains inline decorations\n sb.appendString(``);\n let beforeCount = 0;\n let afterCount = 0;\n let containsForeignElements = 0 /* ForeignElementType.None */;\n for (const lineDecoration of input.lineDecorations) {\n if (lineDecoration.type === 1 /* InlineDecorationType.Before */ || lineDecoration.type === 2 /* InlineDecorationType.After */) {\n sb.appendString(``);\n if (lineDecoration.type === 1 /* InlineDecorationType.Before */) {\n containsForeignElements |= 1 /* ForeignElementType.Before */;\n beforeCount++;\n }\n if (lineDecoration.type === 2 /* InlineDecorationType.After */) {\n containsForeignElements |= 2 /* ForeignElementType.After */;\n afterCount++;\n }\n }\n }\n sb.appendString(``);\n const characterMapping = new CharacterMapping(1, beforeCount + afterCount);\n characterMapping.setColumnInfo(1, beforeCount, 0, 0);\n return new RenderLineOutput(characterMapping, false, containsForeignElements);\n }\n // completely empty line\n sb.appendString('');\n return new RenderLineOutput(new CharacterMapping(0, 0), false, 0 /* ForeignElementType.None */);\n }\n return _renderLine(resolveRenderLineInput(input), sb);\n}\nexport class RenderLineOutput2 {\n constructor(characterMapping, html, containsRTL, containsForeignElements) {\n this.characterMapping = characterMapping;\n this.html = html;\n this.containsRTL = containsRTL;\n this.containsForeignElements = containsForeignElements;\n }\n}\nexport function renderViewLine2(input) {\n const sb = new StringBuilder(10000);\n const out = renderViewLine(input, sb);\n return new RenderLineOutput2(out.characterMapping, sb.build(), out.containsRTL, out.containsForeignElements);\n}\nclass ResolvedRenderLineInput {\n constructor(fontIsMonospace, canUseHalfwidthRightwardsArrow, lineContent, len, isOverflowing, overflowingCharCount, parts, containsForeignElements, fauxIndentLength, tabSize, startVisibleColumn, containsRTL, spaceWidth, renderSpaceCharCode, renderWhitespace, renderControlCharacters) {\n this.fontIsMonospace = fontIsMonospace;\n this.canUseHalfwidthRightwardsArrow = canUseHalfwidthRightwardsArrow;\n this.lineContent = lineContent;\n this.len = len;\n this.isOverflowing = isOverflowing;\n this.overflowingCharCount = overflowingCharCount;\n this.parts = parts;\n this.containsForeignElements = containsForeignElements;\n this.fauxIndentLength = fauxIndentLength;\n this.tabSize = tabSize;\n this.startVisibleColumn = startVisibleColumn;\n this.containsRTL = containsRTL;\n this.spaceWidth = spaceWidth;\n this.renderSpaceCharCode = renderSpaceCharCode;\n this.renderWhitespace = renderWhitespace;\n this.renderControlCharacters = renderControlCharacters;\n //\n }\n}\nfunction resolveRenderLineInput(input) {\n const lineContent = input.lineContent;\n let isOverflowing;\n let overflowingCharCount;\n let len;\n if (input.stopRenderingLineAfter !== -1 && input.stopRenderingLineAfter < lineContent.length) {\n isOverflowing = true;\n overflowingCharCount = lineContent.length - input.stopRenderingLineAfter;\n len = input.stopRenderingLineAfter;\n }\n else {\n isOverflowing = false;\n overflowingCharCount = 0;\n len = lineContent.length;\n }\n let tokens = transformAndRemoveOverflowing(lineContent, input.containsRTL, input.lineTokens, input.fauxIndentLength, len);\n if (input.renderControlCharacters && !input.isBasicASCII) {\n // Calling `extractControlCharacters` before adding (possibly empty) line parts\n // for inline decorations. `extractControlCharacters` removes empty line parts.\n tokens = extractControlCharacters(lineContent, tokens);\n }\n if (input.renderWhitespace === 4 /* RenderWhitespace.All */ ||\n input.renderWhitespace === 1 /* RenderWhitespace.Boundary */ ||\n (input.renderWhitespace === 2 /* RenderWhitespace.Selection */ && !!input.selectionsOnLine) ||\n (input.renderWhitespace === 3 /* RenderWhitespace.Trailing */ && !input.continuesWithWrappedLine)) {\n tokens = _applyRenderWhitespace(input, lineContent, len, tokens);\n }\n let containsForeignElements = 0 /* ForeignElementType.None */;\n if (input.lineDecorations.length > 0) {\n for (let i = 0, len = input.lineDecorations.length; i < len; i++) {\n const lineDecoration = input.lineDecorations[i];\n if (lineDecoration.type === 3 /* InlineDecorationType.RegularAffectingLetterSpacing */) {\n // Pretend there are foreign elements... although not 100% accurate.\n containsForeignElements |= 1 /* ForeignElementType.Before */;\n }\n else if (lineDecoration.type === 1 /* InlineDecorationType.Before */) {\n containsForeignElements |= 1 /* ForeignElementType.Before */;\n }\n else if (lineDecoration.type === 2 /* InlineDecorationType.After */) {\n containsForeignElements |= 2 /* ForeignElementType.After */;\n }\n }\n tokens = _applyInlineDecorations(lineContent, len, tokens, input.lineDecorations);\n }\n if (!input.containsRTL) {\n // We can never split RTL text, as it ruins the rendering\n tokens = splitLargeTokens(lineContent, tokens, !input.isBasicASCII || input.fontLigatures);\n }\n return new ResolvedRenderLineInput(input.useMonospaceOptimizations, input.canUseHalfwidthRightwardsArrow, lineContent, len, isOverflowing, overflowingCharCount, tokens, containsForeignElements, input.fauxIndentLength, input.tabSize, input.startVisibleColumn, input.containsRTL, input.spaceWidth, input.renderSpaceCharCode, input.renderWhitespace, input.renderControlCharacters);\n}\n/**\n * In the rendering phase, characters are always looped until token.endIndex.\n * Ensure that all tokens end before `len` and the last one ends precisely at `len`.\n */\nfunction transformAndRemoveOverflowing(lineContent, lineContainsRTL, tokens, fauxIndentLength, len) {\n const result = [];\n let resultLen = 0;\n // The faux indent part of the line should have no token type\n if (fauxIndentLength > 0) {\n result[resultLen++] = new LinePart(fauxIndentLength, '', 0, false);\n }\n let startOffset = fauxIndentLength;\n for (let tokenIndex = 0, tokensLen = tokens.getCount(); tokenIndex < tokensLen; tokenIndex++) {\n const endIndex = tokens.getEndOffset(tokenIndex);\n if (endIndex <= fauxIndentLength) {\n // The faux indent part of the line should have no token type\n continue;\n }\n const type = tokens.getClassName(tokenIndex);\n if (endIndex >= len) {\n const tokenContainsRTL = (lineContainsRTL ? strings.containsRTL(lineContent.substring(startOffset, len)) : false);\n result[resultLen++] = new LinePart(len, type, 0, tokenContainsRTL);\n break;\n }\n const tokenContainsRTL = (lineContainsRTL ? strings.containsRTL(lineContent.substring(startOffset, endIndex)) : false);\n result[resultLen++] = new LinePart(endIndex, type, 0, tokenContainsRTL);\n startOffset = endIndex;\n }\n return result;\n}\n/**\n * See https://github.com/microsoft/vscode/issues/6885.\n * It appears that having very large spans causes very slow reading of character positions.\n * So here we try to avoid that.\n */\nfunction splitLargeTokens(lineContent, tokens, onlyAtSpaces) {\n let lastTokenEndIndex = 0;\n const result = [];\n let resultLen = 0;\n if (onlyAtSpaces) {\n // Split only at spaces => we need to walk each character\n for (let i = 0, len = tokens.length; i < len; i++) {\n const token = tokens[i];\n const tokenEndIndex = token.endIndex;\n if (lastTokenEndIndex + 50 /* Constants.LongToken */ < tokenEndIndex) {\n const tokenType = token.type;\n const tokenMetadata = token.metadata;\n const tokenContainsRTL = token.containsRTL;\n let lastSpaceOffset = -1;\n let currTokenStart = lastTokenEndIndex;\n for (let j = lastTokenEndIndex; j < tokenEndIndex; j++) {\n if (lineContent.charCodeAt(j) === 32 /* CharCode.Space */) {\n lastSpaceOffset = j;\n }\n if (lastSpaceOffset !== -1 && j - currTokenStart >= 50 /* Constants.LongToken */) {\n // Split at `lastSpaceOffset` + 1\n result[resultLen++] = new LinePart(lastSpaceOffset + 1, tokenType, tokenMetadata, tokenContainsRTL);\n currTokenStart = lastSpaceOffset + 1;\n lastSpaceOffset = -1;\n }\n }\n if (currTokenStart !== tokenEndIndex) {\n result[resultLen++] = new LinePart(tokenEndIndex, tokenType, tokenMetadata, tokenContainsRTL);\n }\n }\n else {\n result[resultLen++] = token;\n }\n lastTokenEndIndex = tokenEndIndex;\n }\n }\n else {\n // Split anywhere => we don't need to walk each character\n for (let i = 0, len = tokens.length; i < len; i++) {\n const token = tokens[i];\n const tokenEndIndex = token.endIndex;\n const diff = (tokenEndIndex - lastTokenEndIndex);\n if (diff > 50 /* Constants.LongToken */) {\n const tokenType = token.type;\n const tokenMetadata = token.metadata;\n const tokenContainsRTL = token.containsRTL;\n const piecesCount = Math.ceil(diff / 50 /* Constants.LongToken */);\n for (let j = 1; j < piecesCount; j++) {\n const pieceEndIndex = lastTokenEndIndex + (j * 50 /* Constants.LongToken */);\n result[resultLen++] = new LinePart(pieceEndIndex, tokenType, tokenMetadata, tokenContainsRTL);\n }\n result[resultLen++] = new LinePart(tokenEndIndex, tokenType, tokenMetadata, tokenContainsRTL);\n }\n else {\n result[resultLen++] = token;\n }\n lastTokenEndIndex = tokenEndIndex;\n }\n }\n return result;\n}\nfunction isControlCharacter(charCode) {\n if (charCode < 32) {\n return (charCode !== 9 /* CharCode.Tab */);\n }\n if (charCode === 127) {\n // DEL\n return true;\n }\n if ((charCode >= 0x202A && charCode <= 0x202E)\n || (charCode >= 0x2066 && charCode <= 0x2069)\n || (charCode >= 0x200E && charCode <= 0x200F)\n || charCode === 0x061C) {\n // Unicode Directional Formatting Characters\n // LRE\tU+202A\tLEFT-TO-RIGHT EMBEDDING\n // RLE\tU+202B\tRIGHT-TO-LEFT EMBEDDING\n // PDF\tU+202C\tPOP DIRECTIONAL FORMATTING\n // LRO\tU+202D\tLEFT-TO-RIGHT OVERRIDE\n // RLO\tU+202E\tRIGHT-TO-LEFT OVERRIDE\n // LRI\tU+2066\tLEFT-TO-RIGHT ISOLATE\n // RLI\tU+2067\tRIGHT-TO-LEFT ISOLATE\n // FSI\tU+2068\tFIRST STRONG ISOLATE\n // PDI\tU+2069\tPOP DIRECTIONAL ISOLATE\n // LRM\tU+200E\tLEFT-TO-RIGHT MARK\n // RLM\tU+200F\tRIGHT-TO-LEFT MARK\n // ALM\tU+061C\tARABIC LETTER MARK\n return true;\n }\n return false;\n}\nfunction extractControlCharacters(lineContent, tokens) {\n const result = [];\n let lastLinePart = new LinePart(0, '', 0, false);\n let charOffset = 0;\n for (const token of tokens) {\n const tokenEndIndex = token.endIndex;\n for (; charOffset < tokenEndIndex; charOffset++) {\n const charCode = lineContent.charCodeAt(charOffset);\n if (isControlCharacter(charCode)) {\n if (charOffset > lastLinePart.endIndex) {\n // emit previous part if it has text\n lastLinePart = new LinePart(charOffset, token.type, token.metadata, token.containsRTL);\n result.push(lastLinePart);\n }\n lastLinePart = new LinePart(charOffset + 1, 'mtkcontrol', token.metadata, false);\n result.push(lastLinePart);\n }\n }\n if (charOffset > lastLinePart.endIndex) {\n // emit previous part if it has text\n lastLinePart = new LinePart(tokenEndIndex, token.type, token.metadata, token.containsRTL);\n result.push(lastLinePart);\n }\n }\n return result;\n}\n/**\n * Whitespace is rendered by \"replacing\" tokens with a special-purpose `mtkw` type that is later recognized in the rendering phase.\n * Moreover, a token is created for every visual indent because on some fonts the glyphs used for rendering whitespace (→ or ·) do not have the same width as  .\n * The rendering phase will generate `style=\"width:...\"` for these tokens.\n */\nfunction _applyRenderWhitespace(input, lineContent, len, tokens) {\n const continuesWithWrappedLine = input.continuesWithWrappedLine;\n const fauxIndentLength = input.fauxIndentLength;\n const tabSize = input.tabSize;\n const startVisibleColumn = input.startVisibleColumn;\n const useMonospaceOptimizations = input.useMonospaceOptimizations;\n const selections = input.selectionsOnLine;\n const onlyBoundary = (input.renderWhitespace === 1 /* RenderWhitespace.Boundary */);\n const onlyTrailing = (input.renderWhitespace === 3 /* RenderWhitespace.Trailing */);\n const generateLinePartForEachWhitespace = (input.renderSpaceWidth !== input.spaceWidth);\n const result = [];\n let resultLen = 0;\n let tokenIndex = 0;\n let tokenType = tokens[tokenIndex].type;\n let tokenContainsRTL = tokens[tokenIndex].containsRTL;\n let tokenEndIndex = tokens[tokenIndex].endIndex;\n const tokensLength = tokens.length;\n let lineIsEmptyOrWhitespace = false;\n let firstNonWhitespaceIndex = strings.firstNonWhitespaceIndex(lineContent);\n let lastNonWhitespaceIndex;\n if (firstNonWhitespaceIndex === -1) {\n lineIsEmptyOrWhitespace = true;\n firstNonWhitespaceIndex = len;\n lastNonWhitespaceIndex = len;\n }\n else {\n lastNonWhitespaceIndex = strings.lastNonWhitespaceIndex(lineContent);\n }\n let wasInWhitespace = false;\n let currentSelectionIndex = 0;\n let currentSelection = selections && selections[currentSelectionIndex];\n let tmpIndent = startVisibleColumn % tabSize;\n for (let charIndex = fauxIndentLength; charIndex < len; charIndex++) {\n const chCode = lineContent.charCodeAt(charIndex);\n if (currentSelection && charIndex >= currentSelection.endOffset) {\n currentSelectionIndex++;\n currentSelection = selections && selections[currentSelectionIndex];\n }\n let isInWhitespace;\n if (charIndex < firstNonWhitespaceIndex || charIndex > lastNonWhitespaceIndex) {\n // in leading or trailing whitespace\n isInWhitespace = true;\n }\n else if (chCode === 9 /* CharCode.Tab */) {\n // a tab character is rendered both in all and boundary cases\n isInWhitespace = true;\n }\n else if (chCode === 32 /* CharCode.Space */) {\n // hit a space character\n if (onlyBoundary) {\n // rendering only boundary whitespace\n if (wasInWhitespace) {\n isInWhitespace = true;\n }\n else {\n const nextChCode = (charIndex + 1 < len ? lineContent.charCodeAt(charIndex + 1) : 0 /* CharCode.Null */);\n isInWhitespace = (nextChCode === 32 /* CharCode.Space */ || nextChCode === 9 /* CharCode.Tab */);\n }\n }\n else {\n isInWhitespace = true;\n }\n }\n else {\n isInWhitespace = false;\n }\n // If rendering whitespace on selection, check that the charIndex falls within a selection\n if (isInWhitespace && selections) {\n isInWhitespace = !!currentSelection && currentSelection.startOffset <= charIndex && currentSelection.endOffset > charIndex;\n }\n // If rendering only trailing whitespace, check that the charIndex points to trailing whitespace.\n if (isInWhitespace && onlyTrailing) {\n isInWhitespace = lineIsEmptyOrWhitespace || charIndex > lastNonWhitespaceIndex;\n }\n if (isInWhitespace && tokenContainsRTL) {\n // If the token contains RTL text, breaking it up into multiple line parts\n // to render whitespace might affect the browser's bidi layout.\n //\n // We render whitespace in such tokens only if the whitespace\n // is the leading or the trailing whitespace of the line,\n // which doesn't affect the browser's bidi layout.\n if (charIndex >= firstNonWhitespaceIndex && charIndex <= lastNonWhitespaceIndex) {\n isInWhitespace = false;\n }\n }\n if (wasInWhitespace) {\n // was in whitespace token\n if (!isInWhitespace || (!useMonospaceOptimizations && tmpIndent >= tabSize)) {\n // leaving whitespace token or entering a new indent\n if (generateLinePartForEachWhitespace) {\n const lastEndIndex = (resultLen > 0 ? result[resultLen - 1].endIndex : fauxIndentLength);\n for (let i = lastEndIndex + 1; i <= charIndex; i++) {\n result[resultLen++] = new LinePart(i, 'mtkw', 1 /* LinePartMetadata.IS_WHITESPACE */, false);\n }\n }\n else {\n result[resultLen++] = new LinePart(charIndex, 'mtkw', 1 /* LinePartMetadata.IS_WHITESPACE */, false);\n }\n tmpIndent = tmpIndent % tabSize;\n }\n }\n else {\n // was in regular token\n if (charIndex === tokenEndIndex || (isInWhitespace && charIndex > fauxIndentLength)) {\n result[resultLen++] = new LinePart(charIndex, tokenType, 0, tokenContainsRTL);\n tmpIndent = tmpIndent % tabSize;\n }\n }\n if (chCode === 9 /* CharCode.Tab */) {\n tmpIndent = tabSize;\n }\n else if (strings.isFullWidthCharacter(chCode)) {\n tmpIndent += 2;\n }\n else {\n tmpIndent++;\n }\n wasInWhitespace = isInWhitespace;\n while (charIndex === tokenEndIndex) {\n tokenIndex++;\n if (tokenIndex < tokensLength) {\n tokenType = tokens[tokenIndex].type;\n tokenContainsRTL = tokens[tokenIndex].containsRTL;\n tokenEndIndex = tokens[tokenIndex].endIndex;\n }\n else {\n break;\n }\n }\n }\n let generateWhitespace = false;\n if (wasInWhitespace) {\n // was in whitespace token\n if (continuesWithWrappedLine && onlyBoundary) {\n const lastCharCode = (len > 0 ? lineContent.charCodeAt(len - 1) : 0 /* CharCode.Null */);\n const prevCharCode = (len > 1 ? lineContent.charCodeAt(len - 2) : 0 /* CharCode.Null */);\n const isSingleTrailingSpace = (lastCharCode === 32 /* CharCode.Space */ && (prevCharCode !== 32 /* CharCode.Space */ && prevCharCode !== 9 /* CharCode.Tab */));\n if (!isSingleTrailingSpace) {\n generateWhitespace = true;\n }\n }\n else {\n generateWhitespace = true;\n }\n }\n if (generateWhitespace) {\n if (generateLinePartForEachWhitespace) {\n const lastEndIndex = (resultLen > 0 ? result[resultLen - 1].endIndex : fauxIndentLength);\n for (let i = lastEndIndex + 1; i <= len; i++) {\n result[resultLen++] = new LinePart(i, 'mtkw', 1 /* LinePartMetadata.IS_WHITESPACE */, false);\n }\n }\n else {\n result[resultLen++] = new LinePart(len, 'mtkw', 1 /* LinePartMetadata.IS_WHITESPACE */, false);\n }\n }\n else {\n result[resultLen++] = new LinePart(len, tokenType, 0, tokenContainsRTL);\n }\n return result;\n}\n/**\n * Inline decorations are \"merged\" on top of tokens.\n * Special care must be taken when multiple inline decorations are at play and they overlap.\n */\nfunction _applyInlineDecorations(lineContent, len, tokens, _lineDecorations) {\n _lineDecorations.sort(LineDecoration.compare);\n const lineDecorations = LineDecorationsNormalizer.normalize(lineContent, _lineDecorations);\n const lineDecorationsLen = lineDecorations.length;\n let lineDecorationIndex = 0;\n const result = [];\n let resultLen = 0;\n let lastResultEndIndex = 0;\n for (let tokenIndex = 0, len = tokens.length; tokenIndex < len; tokenIndex++) {\n const token = tokens[tokenIndex];\n const tokenEndIndex = token.endIndex;\n const tokenType = token.type;\n const tokenMetadata = token.metadata;\n const tokenContainsRTL = token.containsRTL;\n while (lineDecorationIndex < lineDecorationsLen && lineDecorations[lineDecorationIndex].startOffset < tokenEndIndex) {\n const lineDecoration = lineDecorations[lineDecorationIndex];\n if (lineDecoration.startOffset > lastResultEndIndex) {\n lastResultEndIndex = lineDecoration.startOffset;\n result[resultLen++] = new LinePart(lastResultEndIndex, tokenType, tokenMetadata, tokenContainsRTL);\n }\n if (lineDecoration.endOffset + 1 <= tokenEndIndex) {\n // This line decoration ends before this token ends\n lastResultEndIndex = lineDecoration.endOffset + 1;\n result[resultLen++] = new LinePart(lastResultEndIndex, tokenType + ' ' + lineDecoration.className, tokenMetadata | lineDecoration.metadata, tokenContainsRTL);\n lineDecorationIndex++;\n }\n else {\n // This line decoration continues on to the next token\n lastResultEndIndex = tokenEndIndex;\n result[resultLen++] = new LinePart(lastResultEndIndex, tokenType + ' ' + lineDecoration.className, tokenMetadata | lineDecoration.metadata, tokenContainsRTL);\n break;\n }\n }\n if (tokenEndIndex > lastResultEndIndex) {\n lastResultEndIndex = tokenEndIndex;\n result[resultLen++] = new LinePart(lastResultEndIndex, tokenType, tokenMetadata, tokenContainsRTL);\n }\n }\n const lastTokenEndIndex = tokens[tokens.length - 1].endIndex;\n if (lineDecorationIndex < lineDecorationsLen && lineDecorations[lineDecorationIndex].startOffset === lastTokenEndIndex) {\n while (lineDecorationIndex < lineDecorationsLen && lineDecorations[lineDecorationIndex].startOffset === lastTokenEndIndex) {\n const lineDecoration = lineDecorations[lineDecorationIndex];\n result[resultLen++] = new LinePart(lastResultEndIndex, lineDecoration.className, lineDecoration.metadata, false);\n lineDecorationIndex++;\n }\n }\n return result;\n}\n/**\n * This function is on purpose not split up into multiple functions to allow runtime type inference (i.e. performance reasons).\n * Notice how all the needed data is fully resolved and passed in (i.e. no other calls).\n */\nfunction _renderLine(input, sb) {\n const fontIsMonospace = input.fontIsMonospace;\n const canUseHalfwidthRightwardsArrow = input.canUseHalfwidthRightwardsArrow;\n const containsForeignElements = input.containsForeignElements;\n const lineContent = input.lineContent;\n const len = input.len;\n const isOverflowing = input.isOverflowing;\n const overflowingCharCount = input.overflowingCharCount;\n const parts = input.parts;\n const fauxIndentLength = input.fauxIndentLength;\n const tabSize = input.tabSize;\n const startVisibleColumn = input.startVisibleColumn;\n const containsRTL = input.containsRTL;\n const spaceWidth = input.spaceWidth;\n const renderSpaceCharCode = input.renderSpaceCharCode;\n const renderWhitespace = input.renderWhitespace;\n const renderControlCharacters = input.renderControlCharacters;\n const characterMapping = new CharacterMapping(len + 1, parts.length);\n let lastCharacterMappingDefined = false;\n let charIndex = 0;\n let visibleColumn = startVisibleColumn;\n let charOffsetInPart = 0; // the character offset in the current part\n let charHorizontalOffset = 0; // the character horizontal position in terms of chars relative to line start\n let partDisplacement = 0;\n if (containsRTL) {\n sb.appendString('');\n }\n else {\n sb.appendString('');\n }\n for (let partIndex = 0, tokensLen = parts.length; partIndex < tokensLen; partIndex++) {\n const part = parts[partIndex];\n const partEndIndex = part.endIndex;\n const partType = part.type;\n const partContainsRTL = part.containsRTL;\n const partRendersWhitespace = (renderWhitespace !== 0 /* RenderWhitespace.None */ && part.isWhitespace());\n const partRendersWhitespaceWithWidth = partRendersWhitespace && !fontIsMonospace && (partType === 'mtkw' /*only whitespace*/ || !containsForeignElements);\n const partIsEmptyAndHasPseudoAfter = (charIndex === partEndIndex && part.isPseudoAfter());\n charOffsetInPart = 0;\n sb.appendString('= fauxIndentLength) {\n _visibleColumn += charWidth;\n }\n }\n }\n if (partRendersWhitespaceWithWidth) {\n sb.appendString(' style=\"width:');\n sb.appendString(String(spaceWidth * partWidth));\n sb.appendString('px\"');\n }\n sb.appendASCIICharCode(62 /* CharCode.GreaterThan */);\n for (; charIndex < partEndIndex; charIndex++) {\n characterMapping.setColumnInfo(charIndex + 1, partIndex - partDisplacement, charOffsetInPart, charHorizontalOffset);\n partDisplacement = 0;\n const charCode = lineContent.charCodeAt(charIndex);\n let producedCharacters;\n let charWidth;\n if (charCode === 9 /* CharCode.Tab */) {\n producedCharacters = (tabSize - (visibleColumn % tabSize)) | 0;\n charWidth = producedCharacters;\n if (!canUseHalfwidthRightwardsArrow || charWidth > 1) {\n sb.appendCharCode(0x2192); // RIGHTWARDS ARROW\n }\n else {\n sb.appendCharCode(0xFFEB); // HALFWIDTH RIGHTWARDS ARROW\n }\n for (let space = 2; space <= charWidth; space++) {\n sb.appendCharCode(0xA0); //  \n }\n }\n else { // must be CharCode.Space\n producedCharacters = 2;\n charWidth = 1;\n sb.appendCharCode(renderSpaceCharCode); // · or word separator middle dot\n sb.appendCharCode(0x200C); // ZERO WIDTH NON-JOINER\n }\n charOffsetInPart += producedCharacters;\n charHorizontalOffset += charWidth;\n if (charIndex >= fauxIndentLength) {\n visibleColumn += charWidth;\n }\n }\n }\n else {\n sb.appendASCIICharCode(62 /* CharCode.GreaterThan */);\n for (; charIndex < partEndIndex; charIndex++) {\n characterMapping.setColumnInfo(charIndex + 1, partIndex - partDisplacement, charOffsetInPart, charHorizontalOffset);\n partDisplacement = 0;\n const charCode = lineContent.charCodeAt(charIndex);\n let producedCharacters = 1;\n let charWidth = 1;\n switch (charCode) {\n case 9 /* CharCode.Tab */:\n producedCharacters = (tabSize - (visibleColumn % tabSize));\n charWidth = producedCharacters;\n for (let space = 1; space <= producedCharacters; space++) {\n sb.appendCharCode(0xA0); //  \n }\n break;\n case 32 /* CharCode.Space */:\n sb.appendCharCode(0xA0); //  \n break;\n case 60 /* CharCode.LessThan */:\n sb.appendString('<');\n break;\n case 62 /* CharCode.GreaterThan */:\n sb.appendString('>');\n break;\n case 38 /* CharCode.Ampersand */:\n sb.appendString('&');\n break;\n case 0 /* CharCode.Null */:\n if (renderControlCharacters) {\n // See https://unicode-table.com/en/blocks/control-pictures/\n sb.appendCharCode(9216);\n }\n else {\n sb.appendString('�');\n }\n break;\n case 65279 /* CharCode.UTF8_BOM */:\n case 8232 /* CharCode.LINE_SEPARATOR */:\n case 8233 /* CharCode.PARAGRAPH_SEPARATOR */:\n case 133 /* CharCode.NEXT_LINE */:\n sb.appendCharCode(0xFFFD);\n break;\n default:\n if (strings.isFullWidthCharacter(charCode)) {\n charWidth++;\n }\n // See https://unicode-table.com/en/blocks/control-pictures/\n if (renderControlCharacters && charCode < 32) {\n sb.appendCharCode(9216 + charCode);\n }\n else if (renderControlCharacters && charCode === 127) {\n // DEL\n sb.appendCharCode(9249);\n }\n else if (renderControlCharacters && isControlCharacter(charCode)) {\n sb.appendString('[U+');\n sb.appendString(to4CharHex(charCode));\n sb.appendString(']');\n producedCharacters = 8;\n charWidth = producedCharacters;\n }\n else {\n sb.appendCharCode(charCode);\n }\n }\n charOffsetInPart += producedCharacters;\n charHorizontalOffset += charWidth;\n if (charIndex >= fauxIndentLength) {\n visibleColumn += charWidth;\n }\n }\n }\n if (partIsEmptyAndHasPseudoAfter) {\n partDisplacement++;\n }\n else {\n partDisplacement = 0;\n }\n if (charIndex >= len && !lastCharacterMappingDefined && part.isPseudoAfter()) {\n lastCharacterMappingDefined = true;\n characterMapping.setColumnInfo(charIndex + 1, partIndex, charOffsetInPart, charHorizontalOffset);\n }\n sb.appendString('');\n }\n if (!lastCharacterMappingDefined) {\n // When getting client rects for the last character, we will position the\n // text range at the end of the span, insteaf of at the beginning of next span\n characterMapping.setColumnInfo(len + 1, parts.length - 1, charOffsetInPart, charHorizontalOffset);\n }\n if (isOverflowing) {\n sb.appendString('');\n sb.appendString(nls.localize('showMore', \"Show more ({0})\", renderOverflowingCharCount(overflowingCharCount)));\n sb.appendString('');\n }\n sb.appendString('');\n return new RenderLineOutput(characterMapping, containsRTL, containsForeignElements);\n}\nfunction to4CharHex(n) {\n return n.toString(16).toUpperCase().padStart(4, '0');\n}\nfunction renderOverflowingCharCount(n) {\n if (n < 1024) {\n return nls.localize('overflow.chars', \"{0} chars\", n);\n }\n if (n < 1024 * 1024) {\n return `${(n / 1024).toFixed(1)} KB`;\n }\n return `${(n / 1024 / 1024).toFixed(1)} MB`;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as arrays from '../../base/common/arrays.js';\nimport * as strings from '../../base/common/strings.js';\nimport { Range } from './core/range.js';\nexport class Viewport {\n constructor(top, left, width, height) {\n this._viewportBrand = undefined;\n this.top = top | 0;\n this.left = left | 0;\n this.width = width | 0;\n this.height = height | 0;\n }\n}\nexport class MinimapLinesRenderingData {\n constructor(tabSize, data) {\n this.tabSize = tabSize;\n this.data = data;\n }\n}\nexport class ViewLineData {\n constructor(content, continuesWithWrappedLine, minColumn, maxColumn, startVisibleColumn, tokens, inlineDecorations) {\n this._viewLineDataBrand = undefined;\n this.content = content;\n this.continuesWithWrappedLine = continuesWithWrappedLine;\n this.minColumn = minColumn;\n this.maxColumn = maxColumn;\n this.startVisibleColumn = startVisibleColumn;\n this.tokens = tokens;\n this.inlineDecorations = inlineDecorations;\n }\n}\nexport class ViewLineRenderingData {\n constructor(minColumn, maxColumn, content, continuesWithWrappedLine, mightContainRTL, mightContainNonBasicASCII, tokens, inlineDecorations, tabSize, startVisibleColumn) {\n this.minColumn = minColumn;\n this.maxColumn = maxColumn;\n this.content = content;\n this.continuesWithWrappedLine = continuesWithWrappedLine;\n this.isBasicASCII = ViewLineRenderingData.isBasicASCII(content, mightContainNonBasicASCII);\n this.containsRTL = ViewLineRenderingData.containsRTL(content, this.isBasicASCII, mightContainRTL);\n this.tokens = tokens;\n this.inlineDecorations = inlineDecorations;\n this.tabSize = tabSize;\n this.startVisibleColumn = startVisibleColumn;\n }\n static isBasicASCII(lineContent, mightContainNonBasicASCII) {\n if (mightContainNonBasicASCII) {\n return strings.isBasicASCII(lineContent);\n }\n return true;\n }\n static containsRTL(lineContent, isBasicASCII, mightContainRTL) {\n if (!isBasicASCII && mightContainRTL) {\n return strings.containsRTL(lineContent);\n }\n return false;\n }\n}\nexport class InlineDecoration {\n constructor(range, inlineClassName, type) {\n this.range = range;\n this.inlineClassName = inlineClassName;\n this.type = type;\n }\n}\nexport class SingleLineInlineDecoration {\n constructor(startOffset, endOffset, inlineClassName, inlineClassNameAffectsLetterSpacing) {\n this.startOffset = startOffset;\n this.endOffset = endOffset;\n this.inlineClassName = inlineClassName;\n this.inlineClassNameAffectsLetterSpacing = inlineClassNameAffectsLetterSpacing;\n }\n toInlineDecoration(lineNumber) {\n return new InlineDecoration(new Range(lineNumber, this.startOffset + 1, lineNumber, this.endOffset + 1), this.inlineClassName, this.inlineClassNameAffectsLetterSpacing ? 3 /* InlineDecorationType.RegularAffectingLetterSpacing */ : 0 /* InlineDecorationType.Regular */);\n }\n}\nexport class ViewModelDecoration {\n constructor(range, options) {\n this._viewModelDecorationBrand = undefined;\n this.range = range;\n this.options = options;\n }\n}\nexport class OverviewRulerDecorationsGroup {\n constructor(color, zIndex, \n /**\n * Decorations are encoded in a number array using the following scheme:\n * - 3*i = lane\n * - 3*i+1 = startLineNumber\n * - 3*i+2 = endLineNumber\n */\n data) {\n this.color = color;\n this.zIndex = zIndex;\n this.data = data;\n }\n static compareByRenderingProps(a, b) {\n if (a.zIndex === b.zIndex) {\n if (a.color < b.color) {\n return -1;\n }\n if (a.color > b.color) {\n return 1;\n }\n return 0;\n }\n return a.zIndex - b.zIndex;\n }\n static equals(a, b) {\n return (a.color === b.color\n && a.zIndex === b.zIndex\n && arrays.equals(a.data, b.data));\n }\n static equalsArr(a, b) {\n return arrays.equals(a, b, OverviewRulerDecorationsGroup.equals);\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport function isFuzzyActionArr(what) {\n return (Array.isArray(what));\n}\nexport function isFuzzyAction(what) {\n return !isFuzzyActionArr(what);\n}\nexport function isString(what) {\n return (typeof what === 'string');\n}\nexport function isIAction(what) {\n return !isString(what);\n}\n// Small helper functions\n/**\n * Is a string null, undefined, or empty?\n */\nexport function empty(s) {\n return (s ? false : true);\n}\n/**\n * Puts a string to lower case if 'ignoreCase' is set.\n */\nexport function fixCase(lexer, str) {\n return (lexer.ignoreCase && str ? str.toLowerCase() : str);\n}\n/**\n * Ensures there are no bad characters in a CSS token class.\n */\nexport function sanitize(s) {\n return s.replace(/[&<>'\"_]/g, '-'); // used on all output token CSS classes\n}\n// Logging\n/**\n * Logs a message.\n */\nexport function log(lexer, msg) {\n console.log(`${lexer.languageId}: ${msg}`);\n}\n// Throwing errors\nexport function createError(lexer, msg) {\n return new Error(`${lexer.languageId}: ${msg}`);\n}\n// Helper functions for rule finding and substitution\n/**\n * substituteMatches is used on lexer strings and can substitutes predefined patterns:\n * \t\t$$ => $\n * \t\t$# => id\n * \t\t$n => matched entry n\n * \t\t@attr => contents of lexer[attr]\n *\n * See documentation for more info\n */\nexport function substituteMatches(lexer, str, id, matches, state) {\n const re = /\\$((\\$)|(#)|(\\d\\d?)|[sS](\\d\\d?)|@(\\w+))/g;\n let stateMatches = null;\n return str.replace(re, function (full, sub, dollar, hash, n, s, attr, ofs, total) {\n if (!empty(dollar)) {\n return '$'; // $$\n }\n if (!empty(hash)) {\n return fixCase(lexer, id); // default $#\n }\n if (!empty(n) && n < matches.length) {\n return fixCase(lexer, matches[n]); // $n\n }\n if (!empty(attr) && lexer && typeof (lexer[attr]) === 'string') {\n return lexer[attr]; //@attribute\n }\n if (stateMatches === null) { // split state on demand\n stateMatches = state.split('.');\n stateMatches.unshift(state);\n }\n if (!empty(s) && s < stateMatches.length) {\n return fixCase(lexer, stateMatches[s]); //$Sn\n }\n return '';\n });\n}\n/**\n * Find the tokenizer rules for a specific state (i.e. next action)\n */\nexport function findRules(lexer, inState) {\n let state = inState;\n while (state && state.length > 0) {\n const rules = lexer.tokenizer[state];\n if (rules) {\n return rules;\n }\n const idx = state.lastIndexOf('.');\n if (idx < 0) {\n state = null; // no further parent\n }\n else {\n state = state.substr(0, idx);\n }\n }\n return null;\n}\n/**\n * Is a certain state defined? In contrast to 'findRules' this works on a ILexerMin.\n * This is used during compilation where we may know the defined states\n * but not yet whether the corresponding rules are correct.\n */\nexport function stateExists(lexer, inState) {\n let state = inState;\n while (state && state.length > 0) {\n const exist = lexer.stateNames[state];\n if (exist) {\n return true;\n }\n const idx = state.lastIndexOf('.');\n if (idx < 0) {\n state = null; // no further parent\n }\n else {\n state = state.substr(0, idx);\n }\n }\n return false;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar MonarchTokenizer_1;\n/**\n * Create a syntax highighter with a fully declarative JSON style lexer description\n * using regular expressions.\n */\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport * as languages from '../../../common/languages.js';\nimport { NullState, nullTokenizeEncoded, nullTokenize } from '../../../common/languages/nullTokenize.js';\nimport * as monarchCommon from './monarchCommon.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\nconst CACHE_STACK_DEPTH = 5;\n/**\n * Reuse the same stack elements up to a certain depth.\n */\nclass MonarchStackElementFactory {\n static create(parent, state) {\n return this._INSTANCE.create(parent, state);\n }\n constructor(maxCacheDepth) {\n this._maxCacheDepth = maxCacheDepth;\n this._entries = Object.create(null);\n }\n create(parent, state) {\n if (parent !== null && parent.depth >= this._maxCacheDepth) {\n // no caching above a certain depth\n return new MonarchStackElement(parent, state);\n }\n let stackElementId = MonarchStackElement.getStackElementId(parent);\n if (stackElementId.length > 0) {\n stackElementId += '|';\n }\n stackElementId += state;\n let result = this._entries[stackElementId];\n if (result) {\n return result;\n }\n result = new MonarchStackElement(parent, state);\n this._entries[stackElementId] = result;\n return result;\n }\n}\nMonarchStackElementFactory._INSTANCE = new MonarchStackElementFactory(CACHE_STACK_DEPTH);\nclass MonarchStackElement {\n constructor(parent, state) {\n this.parent = parent;\n this.state = state;\n this.depth = (this.parent ? this.parent.depth : 0) + 1;\n }\n static getStackElementId(element) {\n let result = '';\n while (element !== null) {\n if (result.length > 0) {\n result += '|';\n }\n result += element.state;\n element = element.parent;\n }\n return result;\n }\n static _equals(a, b) {\n while (a !== null && b !== null) {\n if (a === b) {\n return true;\n }\n if (a.state !== b.state) {\n return false;\n }\n a = a.parent;\n b = b.parent;\n }\n if (a === null && b === null) {\n return true;\n }\n return false;\n }\n equals(other) {\n return MonarchStackElement._equals(this, other);\n }\n push(state) {\n return MonarchStackElementFactory.create(this, state);\n }\n pop() {\n return this.parent;\n }\n popall() {\n let result = this;\n while (result.parent) {\n result = result.parent;\n }\n return result;\n }\n switchTo(state) {\n return MonarchStackElementFactory.create(this.parent, state);\n }\n}\nclass EmbeddedLanguageData {\n constructor(languageId, state) {\n this.languageId = languageId;\n this.state = state;\n }\n equals(other) {\n return (this.languageId === other.languageId\n && this.state.equals(other.state));\n }\n clone() {\n const stateClone = this.state.clone();\n // save an object\n if (stateClone === this.state) {\n return this;\n }\n return new EmbeddedLanguageData(this.languageId, this.state);\n }\n}\n/**\n * Reuse the same line states up to a certain depth.\n */\nclass MonarchLineStateFactory {\n static create(stack, embeddedLanguageData) {\n return this._INSTANCE.create(stack, embeddedLanguageData);\n }\n constructor(maxCacheDepth) {\n this._maxCacheDepth = maxCacheDepth;\n this._entries = Object.create(null);\n }\n create(stack, embeddedLanguageData) {\n if (embeddedLanguageData !== null) {\n // no caching when embedding\n return new MonarchLineState(stack, embeddedLanguageData);\n }\n if (stack !== null && stack.depth >= this._maxCacheDepth) {\n // no caching above a certain depth\n return new MonarchLineState(stack, embeddedLanguageData);\n }\n const stackElementId = MonarchStackElement.getStackElementId(stack);\n let result = this._entries[stackElementId];\n if (result) {\n return result;\n }\n result = new MonarchLineState(stack, null);\n this._entries[stackElementId] = result;\n return result;\n }\n}\nMonarchLineStateFactory._INSTANCE = new MonarchLineStateFactory(CACHE_STACK_DEPTH);\nclass MonarchLineState {\n constructor(stack, embeddedLanguageData) {\n this.stack = stack;\n this.embeddedLanguageData = embeddedLanguageData;\n }\n clone() {\n const embeddedlanguageDataClone = this.embeddedLanguageData ? this.embeddedLanguageData.clone() : null;\n // save an object\n if (embeddedlanguageDataClone === this.embeddedLanguageData) {\n return this;\n }\n return MonarchLineStateFactory.create(this.stack, this.embeddedLanguageData);\n }\n equals(other) {\n if (!(other instanceof MonarchLineState)) {\n return false;\n }\n if (!this.stack.equals(other.stack)) {\n return false;\n }\n if (this.embeddedLanguageData === null && other.embeddedLanguageData === null) {\n return true;\n }\n if (this.embeddedLanguageData === null || other.embeddedLanguageData === null) {\n return false;\n }\n return this.embeddedLanguageData.equals(other.embeddedLanguageData);\n }\n}\nclass MonarchClassicTokensCollector {\n constructor() {\n this._tokens = [];\n this._languageId = null;\n this._lastTokenType = null;\n this._lastTokenLanguage = null;\n }\n enterLanguage(languageId) {\n this._languageId = languageId;\n }\n emit(startOffset, type) {\n if (this._lastTokenType === type && this._lastTokenLanguage === this._languageId) {\n return;\n }\n this._lastTokenType = type;\n this._lastTokenLanguage = this._languageId;\n this._tokens.push(new languages.Token(startOffset, type, this._languageId));\n }\n nestedLanguageTokenize(embeddedLanguageLine, hasEOL, embeddedLanguageData, offsetDelta) {\n const nestedLanguageId = embeddedLanguageData.languageId;\n const embeddedModeState = embeddedLanguageData.state;\n const nestedLanguageTokenizationSupport = languages.TokenizationRegistry.get(nestedLanguageId);\n if (!nestedLanguageTokenizationSupport) {\n this.enterLanguage(nestedLanguageId);\n this.emit(offsetDelta, '');\n return embeddedModeState;\n }\n const nestedResult = nestedLanguageTokenizationSupport.tokenize(embeddedLanguageLine, hasEOL, embeddedModeState);\n if (offsetDelta !== 0) {\n for (const token of nestedResult.tokens) {\n this._tokens.push(new languages.Token(token.offset + offsetDelta, token.type, token.language));\n }\n }\n else {\n this._tokens = this._tokens.concat(nestedResult.tokens);\n }\n this._lastTokenType = null;\n this._lastTokenLanguage = null;\n this._languageId = null;\n return nestedResult.endState;\n }\n finalize(endState) {\n return new languages.TokenizationResult(this._tokens, endState);\n }\n}\nclass MonarchModernTokensCollector {\n constructor(languageService, theme) {\n this._languageService = languageService;\n this._theme = theme;\n this._prependTokens = null;\n this._tokens = [];\n this._currentLanguageId = 0 /* LanguageId.Null */;\n this._lastTokenMetadata = 0;\n }\n enterLanguage(languageId) {\n this._currentLanguageId = this._languageService.languageIdCodec.encodeLanguageId(languageId);\n }\n emit(startOffset, type) {\n const metadata = this._theme.match(this._currentLanguageId, type) | 1024 /* MetadataConsts.BALANCED_BRACKETS_MASK */;\n if (this._lastTokenMetadata === metadata) {\n return;\n }\n this._lastTokenMetadata = metadata;\n this._tokens.push(startOffset);\n this._tokens.push(metadata);\n }\n static _merge(a, b, c) {\n const aLen = (a !== null ? a.length : 0);\n const bLen = b.length;\n const cLen = (c !== null ? c.length : 0);\n if (aLen === 0 && bLen === 0 && cLen === 0) {\n return new Uint32Array(0);\n }\n if (aLen === 0 && bLen === 0) {\n return c;\n }\n if (bLen === 0 && cLen === 0) {\n return a;\n }\n const result = new Uint32Array(aLen + bLen + cLen);\n if (a !== null) {\n result.set(a);\n }\n for (let i = 0; i < bLen; i++) {\n result[aLen + i] = b[i];\n }\n if (c !== null) {\n result.set(c, aLen + bLen);\n }\n return result;\n }\n nestedLanguageTokenize(embeddedLanguageLine, hasEOL, embeddedLanguageData, offsetDelta) {\n const nestedLanguageId = embeddedLanguageData.languageId;\n const embeddedModeState = embeddedLanguageData.state;\n const nestedLanguageTokenizationSupport = languages.TokenizationRegistry.get(nestedLanguageId);\n if (!nestedLanguageTokenizationSupport) {\n this.enterLanguage(nestedLanguageId);\n this.emit(offsetDelta, '');\n return embeddedModeState;\n }\n const nestedResult = nestedLanguageTokenizationSupport.tokenizeEncoded(embeddedLanguageLine, hasEOL, embeddedModeState);\n if (offsetDelta !== 0) {\n for (let i = 0, len = nestedResult.tokens.length; i < len; i += 2) {\n nestedResult.tokens[i] += offsetDelta;\n }\n }\n this._prependTokens = MonarchModernTokensCollector._merge(this._prependTokens, this._tokens, nestedResult.tokens);\n this._tokens = [];\n this._currentLanguageId = 0;\n this._lastTokenMetadata = 0;\n return nestedResult.endState;\n }\n finalize(endState) {\n return new languages.EncodedTokenizationResult(MonarchModernTokensCollector._merge(this._prependTokens, this._tokens, null), endState);\n }\n}\nlet MonarchTokenizer = MonarchTokenizer_1 = class MonarchTokenizer extends Disposable {\n constructor(languageService, standaloneThemeService, languageId, lexer, _configurationService) {\n super();\n this._configurationService = _configurationService;\n this._languageService = languageService;\n this._standaloneThemeService = standaloneThemeService;\n this._languageId = languageId;\n this._lexer = lexer;\n this._embeddedLanguages = Object.create(null);\n this.embeddedLoaded = Promise.resolve(undefined);\n // Set up listening for embedded modes\n let emitting = false;\n this._register(languages.TokenizationRegistry.onDidChange((e) => {\n if (emitting) {\n return;\n }\n let isOneOfMyEmbeddedModes = false;\n for (let i = 0, len = e.changedLanguages.length; i < len; i++) {\n const language = e.changedLanguages[i];\n if (this._embeddedLanguages[language]) {\n isOneOfMyEmbeddedModes = true;\n break;\n }\n }\n if (isOneOfMyEmbeddedModes) {\n emitting = true;\n languages.TokenizationRegistry.handleChange([this._languageId]);\n emitting = false;\n }\n }));\n this._maxTokenizationLineLength = this._configurationService.getValue('editor.maxTokenizationLineLength', {\n overrideIdentifier: this._languageId\n });\n this._register(this._configurationService.onDidChangeConfiguration(e => {\n if (e.affectsConfiguration('editor.maxTokenizationLineLength')) {\n this._maxTokenizationLineLength = this._configurationService.getValue('editor.maxTokenizationLineLength', {\n overrideIdentifier: this._languageId\n });\n }\n }));\n }\n getLoadStatus() {\n const promises = [];\n for (const nestedLanguageId in this._embeddedLanguages) {\n const tokenizationSupport = languages.TokenizationRegistry.get(nestedLanguageId);\n if (tokenizationSupport) {\n // The nested language is already loaded\n if (tokenizationSupport instanceof MonarchTokenizer_1) {\n const nestedModeStatus = tokenizationSupport.getLoadStatus();\n if (nestedModeStatus.loaded === false) {\n promises.push(nestedModeStatus.promise);\n }\n }\n continue;\n }\n if (!languages.TokenizationRegistry.isResolved(nestedLanguageId)) {\n // The nested language is in the process of being loaded\n promises.push(languages.TokenizationRegistry.getOrCreate(nestedLanguageId));\n }\n }\n if (promises.length === 0) {\n return {\n loaded: true\n };\n }\n return {\n loaded: false,\n promise: Promise.all(promises).then(_ => undefined)\n };\n }\n getInitialState() {\n const rootState = MonarchStackElementFactory.create(null, this._lexer.start);\n return MonarchLineStateFactory.create(rootState, null);\n }\n tokenize(line, hasEOL, lineState) {\n if (line.length >= this._maxTokenizationLineLength) {\n return nullTokenize(this._languageId, lineState);\n }\n const tokensCollector = new MonarchClassicTokensCollector();\n const endLineState = this._tokenize(line, hasEOL, lineState, tokensCollector);\n return tokensCollector.finalize(endLineState);\n }\n tokenizeEncoded(line, hasEOL, lineState) {\n if (line.length >= this._maxTokenizationLineLength) {\n return nullTokenizeEncoded(this._languageService.languageIdCodec.encodeLanguageId(this._languageId), lineState);\n }\n const tokensCollector = new MonarchModernTokensCollector(this._languageService, this._standaloneThemeService.getColorTheme().tokenTheme);\n const endLineState = this._tokenize(line, hasEOL, lineState, tokensCollector);\n return tokensCollector.finalize(endLineState);\n }\n _tokenize(line, hasEOL, lineState, collector) {\n if (lineState.embeddedLanguageData) {\n return this._nestedTokenize(line, hasEOL, lineState, 0, collector);\n }\n else {\n return this._myTokenize(line, hasEOL, lineState, 0, collector);\n }\n }\n _findLeavingNestedLanguageOffset(line, state) {\n let rules = this._lexer.tokenizer[state.stack.state];\n if (!rules) {\n rules = monarchCommon.findRules(this._lexer, state.stack.state); // do parent matching\n if (!rules) {\n throw monarchCommon.createError(this._lexer, 'tokenizer state is not defined: ' + state.stack.state);\n }\n }\n let popOffset = -1;\n let hasEmbeddedPopRule = false;\n for (const rule of rules) {\n if (!monarchCommon.isIAction(rule.action) || rule.action.nextEmbedded !== '@pop') {\n continue;\n }\n hasEmbeddedPopRule = true;\n let regex = rule.regex;\n const regexSource = rule.regex.source;\n if (regexSource.substr(0, 4) === '^(?:' && regexSource.substr(regexSource.length - 1, 1) === ')') {\n const flags = (regex.ignoreCase ? 'i' : '') + (regex.unicode ? 'u' : '');\n regex = new RegExp(regexSource.substr(4, regexSource.length - 5), flags);\n }\n const result = line.search(regex);\n if (result === -1 || (result !== 0 && rule.matchOnlyAtLineStart)) {\n continue;\n }\n if (popOffset === -1 || result < popOffset) {\n popOffset = result;\n }\n }\n if (!hasEmbeddedPopRule) {\n throw monarchCommon.createError(this._lexer, 'no rule containing nextEmbedded: \"@pop\" in tokenizer embedded state: ' + state.stack.state);\n }\n return popOffset;\n }\n _nestedTokenize(line, hasEOL, lineState, offsetDelta, tokensCollector) {\n const popOffset = this._findLeavingNestedLanguageOffset(line, lineState);\n if (popOffset === -1) {\n // tokenization will not leave nested language\n const nestedEndState = tokensCollector.nestedLanguageTokenize(line, hasEOL, lineState.embeddedLanguageData, offsetDelta);\n return MonarchLineStateFactory.create(lineState.stack, new EmbeddedLanguageData(lineState.embeddedLanguageData.languageId, nestedEndState));\n }\n const nestedLanguageLine = line.substring(0, popOffset);\n if (nestedLanguageLine.length > 0) {\n // tokenize with the nested language\n tokensCollector.nestedLanguageTokenize(nestedLanguageLine, false, lineState.embeddedLanguageData, offsetDelta);\n }\n const restOfTheLine = line.substring(popOffset);\n return this._myTokenize(restOfTheLine, hasEOL, lineState, offsetDelta + popOffset, tokensCollector);\n }\n _safeRuleName(rule) {\n if (rule) {\n return rule.name;\n }\n return '(unknown)';\n }\n _myTokenize(lineWithoutLF, hasEOL, lineState, offsetDelta, tokensCollector) {\n tokensCollector.enterLanguage(this._languageId);\n const lineWithoutLFLength = lineWithoutLF.length;\n const line = (hasEOL && this._lexer.includeLF ? lineWithoutLF + '\\n' : lineWithoutLF);\n const lineLength = line.length;\n let embeddedLanguageData = lineState.embeddedLanguageData;\n let stack = lineState.stack;\n let pos = 0;\n let groupMatching = null;\n // See https://github.com/microsoft/monaco-editor/issues/1235\n // Evaluate rules at least once for an empty line\n let forceEvaluation = true;\n while (forceEvaluation || pos < lineLength) {\n const pos0 = pos;\n const stackLen0 = stack.depth;\n const groupLen0 = groupMatching ? groupMatching.groups.length : 0;\n const state = stack.state;\n let matches = null;\n let matched = null;\n let action = null;\n let rule = null;\n let enteringEmbeddedLanguage = null;\n // check if we need to process group matches first\n if (groupMatching) {\n matches = groupMatching.matches;\n const groupEntry = groupMatching.groups.shift();\n matched = groupEntry.matched;\n action = groupEntry.action;\n rule = groupMatching.rule;\n // cleanup if necessary\n if (groupMatching.groups.length === 0) {\n groupMatching = null;\n }\n }\n else {\n // otherwise we match on the token stream\n if (!forceEvaluation && pos >= lineLength) {\n // nothing to do\n break;\n }\n forceEvaluation = false;\n // get the rules for this state\n let rules = this._lexer.tokenizer[state];\n if (!rules) {\n rules = monarchCommon.findRules(this._lexer, state); // do parent matching\n if (!rules) {\n throw monarchCommon.createError(this._lexer, 'tokenizer state is not defined: ' + state);\n }\n }\n // try each rule until we match\n const restOfLine = line.substr(pos);\n for (const rule of rules) {\n if (pos === 0 || !rule.matchOnlyAtLineStart) {\n matches = restOfLine.match(rule.regex);\n if (matches) {\n matched = matches[0];\n action = rule.action;\n break;\n }\n }\n }\n }\n // We matched 'rule' with 'matches' and 'action'\n if (!matches) {\n matches = [''];\n matched = '';\n }\n if (!action) {\n // bad: we didn't match anything, and there is no action to take\n // we need to advance the stream or we get progress trouble\n if (pos < lineLength) {\n matches = [line.charAt(pos)];\n matched = matches[0];\n }\n action = this._lexer.defaultToken;\n }\n if (matched === null) {\n // should never happen, needed for strict null checking\n break;\n }\n // advance stream\n pos += matched.length;\n // maybe call action function (used for 'cases')\n while (monarchCommon.isFuzzyAction(action) && monarchCommon.isIAction(action) && action.test) {\n action = action.test(matched, matches, state, pos === lineLength);\n }\n let result = null;\n // set the result: either a string or an array of actions\n if (typeof action === 'string' || Array.isArray(action)) {\n result = action;\n }\n else if (action.group) {\n result = action.group;\n }\n else if (action.token !== null && action.token !== undefined) {\n // do $n replacements?\n if (action.tokenSubst) {\n result = monarchCommon.substituteMatches(this._lexer, action.token, matched, matches, state);\n }\n else {\n result = action.token;\n }\n // enter embedded language?\n if (action.nextEmbedded) {\n if (action.nextEmbedded === '@pop') {\n if (!embeddedLanguageData) {\n throw monarchCommon.createError(this._lexer, 'cannot pop embedded language if not inside one');\n }\n embeddedLanguageData = null;\n }\n else if (embeddedLanguageData) {\n throw monarchCommon.createError(this._lexer, 'cannot enter embedded language from within an embedded language');\n }\n else {\n enteringEmbeddedLanguage = monarchCommon.substituteMatches(this._lexer, action.nextEmbedded, matched, matches, state);\n }\n }\n // state transformations\n if (action.goBack) { // back up the stream..\n pos = Math.max(0, pos - action.goBack);\n }\n if (action.switchTo && typeof action.switchTo === 'string') {\n let nextState = monarchCommon.substituteMatches(this._lexer, action.switchTo, matched, matches, state); // switch state without a push...\n if (nextState[0] === '@') {\n nextState = nextState.substr(1); // peel off starting '@'\n }\n if (!monarchCommon.findRules(this._lexer, nextState)) {\n throw monarchCommon.createError(this._lexer, 'trying to switch to a state \\'' + nextState + '\\' that is undefined in rule: ' + this._safeRuleName(rule));\n }\n else {\n stack = stack.switchTo(nextState);\n }\n }\n else if (action.transform && typeof action.transform === 'function') {\n throw monarchCommon.createError(this._lexer, 'action.transform not supported');\n }\n else if (action.next) {\n if (action.next === '@push') {\n if (stack.depth >= this._lexer.maxStack) {\n throw monarchCommon.createError(this._lexer, 'maximum tokenizer stack size reached: [' +\n stack.state + ',' + stack.parent.state + ',...]');\n }\n else {\n stack = stack.push(state);\n }\n }\n else if (action.next === '@pop') {\n if (stack.depth <= 1) {\n throw monarchCommon.createError(this._lexer, 'trying to pop an empty stack in rule: ' + this._safeRuleName(rule));\n }\n else {\n stack = stack.pop();\n }\n }\n else if (action.next === '@popall') {\n stack = stack.popall();\n }\n else {\n let nextState = monarchCommon.substituteMatches(this._lexer, action.next, matched, matches, state);\n if (nextState[0] === '@') {\n nextState = nextState.substr(1); // peel off starting '@'\n }\n if (!monarchCommon.findRules(this._lexer, nextState)) {\n throw monarchCommon.createError(this._lexer, 'trying to set a next state \\'' + nextState + '\\' that is undefined in rule: ' + this._safeRuleName(rule));\n }\n else {\n stack = stack.push(nextState);\n }\n }\n }\n if (action.log && typeof (action.log) === 'string') {\n monarchCommon.log(this._lexer, this._lexer.languageId + ': ' + monarchCommon.substituteMatches(this._lexer, action.log, matched, matches, state));\n }\n }\n // check result\n if (result === null) {\n throw monarchCommon.createError(this._lexer, 'lexer rule has no well-defined action in rule: ' + this._safeRuleName(rule));\n }\n const computeNewStateForEmbeddedLanguage = (enteringEmbeddedLanguage) => {\n // support language names, mime types, and language ids\n const languageId = (this._languageService.getLanguageIdByLanguageName(enteringEmbeddedLanguage)\n || this._languageService.getLanguageIdByMimeType(enteringEmbeddedLanguage)\n || enteringEmbeddedLanguage);\n const embeddedLanguageData = this._getNestedEmbeddedLanguageData(languageId);\n if (pos < lineLength) {\n // there is content from the embedded language on this line\n const restOfLine = lineWithoutLF.substr(pos);\n return this._nestedTokenize(restOfLine, hasEOL, MonarchLineStateFactory.create(stack, embeddedLanguageData), offsetDelta + pos, tokensCollector);\n }\n else {\n return MonarchLineStateFactory.create(stack, embeddedLanguageData);\n }\n };\n // is the result a group match?\n if (Array.isArray(result)) {\n if (groupMatching && groupMatching.groups.length > 0) {\n throw monarchCommon.createError(this._lexer, 'groups cannot be nested: ' + this._safeRuleName(rule));\n }\n if (matches.length !== result.length + 1) {\n throw monarchCommon.createError(this._lexer, 'matched number of groups does not match the number of actions in rule: ' + this._safeRuleName(rule));\n }\n let totalLen = 0;\n for (let i = 1; i < matches.length; i++) {\n totalLen += matches[i].length;\n }\n if (totalLen !== matched.length) {\n throw monarchCommon.createError(this._lexer, 'with groups, all characters should be matched in consecutive groups in rule: ' + this._safeRuleName(rule));\n }\n groupMatching = {\n rule: rule,\n matches: matches,\n groups: []\n };\n for (let i = 0; i < result.length; i++) {\n groupMatching.groups[i] = {\n action: result[i],\n matched: matches[i + 1]\n };\n }\n pos -= matched.length;\n // call recursively to initiate first result match\n continue;\n }\n else {\n // regular result\n // check for '@rematch'\n if (result === '@rematch') {\n pos -= matched.length;\n matched = ''; // better set the next state too..\n matches = null;\n result = '';\n // Even though `@rematch` was specified, if `nextEmbedded` also specified,\n // a state transition should occur.\n if (enteringEmbeddedLanguage !== null) {\n return computeNewStateForEmbeddedLanguage(enteringEmbeddedLanguage);\n }\n }\n // check progress\n if (matched.length === 0) {\n if (lineLength === 0 || stackLen0 !== stack.depth || state !== stack.state || (!groupMatching ? 0 : groupMatching.groups.length) !== groupLen0) {\n continue;\n }\n else {\n throw monarchCommon.createError(this._lexer, 'no progress in tokenizer in rule: ' + this._safeRuleName(rule));\n }\n }\n // return the result (and check for brace matching)\n // todo: for efficiency we could pre-sanitize tokenPostfix and substitutions\n let tokenType = null;\n if (monarchCommon.isString(result) && result.indexOf('@brackets') === 0) {\n const rest = result.substr('@brackets'.length);\n const bracket = findBracket(this._lexer, matched);\n if (!bracket) {\n throw monarchCommon.createError(this._lexer, '@brackets token returned but no bracket defined as: ' + matched);\n }\n tokenType = monarchCommon.sanitize(bracket.token + rest);\n }\n else {\n const token = (result === '' ? '' : result + this._lexer.tokenPostfix);\n tokenType = monarchCommon.sanitize(token);\n }\n if (pos0 < lineWithoutLFLength) {\n tokensCollector.emit(pos0 + offsetDelta, tokenType);\n }\n }\n if (enteringEmbeddedLanguage !== null) {\n return computeNewStateForEmbeddedLanguage(enteringEmbeddedLanguage);\n }\n }\n return MonarchLineStateFactory.create(stack, embeddedLanguageData);\n }\n _getNestedEmbeddedLanguageData(languageId) {\n if (!this._languageService.isRegisteredLanguageId(languageId)) {\n return new EmbeddedLanguageData(languageId, NullState);\n }\n if (languageId !== this._languageId) {\n // Fire language loading event\n this._languageService.requestBasicLanguageFeatures(languageId);\n languages.TokenizationRegistry.getOrCreate(languageId);\n this._embeddedLanguages[languageId] = true;\n }\n const tokenizationSupport = languages.TokenizationRegistry.get(languageId);\n if (tokenizationSupport) {\n return new EmbeddedLanguageData(languageId, tokenizationSupport.getInitialState());\n }\n return new EmbeddedLanguageData(languageId, NullState);\n }\n};\nMonarchTokenizer = MonarchTokenizer_1 = __decorate([\n __param(4, IConfigurationService)\n], MonarchTokenizer);\nexport { MonarchTokenizer };\n/**\n * Searches for a bracket in the 'brackets' attribute that matches the input.\n */\nfunction findBracket(lexer, matched) {\n if (!matched) {\n return null;\n }\n matched = monarchCommon.fixCase(lexer, matched);\n const brackets = lexer.brackets;\n for (const bracket of brackets) {\n if (bracket.open === matched) {\n return { token: bracket.token, bracketType: 1 /* monarchCommon.MonarchBracket.Open */ };\n }\n else if (bracket.close === matched) {\n return { token: bracket.token, bracketType: -1 /* monarchCommon.MonarchBracket.Close */ };\n }\n }\n return null;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { createTrustedTypesPolicy } from '../../../base/browser/trustedTypes.js';\nimport * as strings from '../../../base/common/strings.js';\nimport { TokenizationRegistry } from '../../common/languages.js';\nimport { LineTokens } from '../../common/tokens/lineTokens.js';\nimport { RenderLineInput, renderViewLine2 as renderViewLine } from '../../common/viewLayout/viewLineRenderer.js';\nimport { ViewLineRenderingData } from '../../common/viewModel.js';\nimport { MonarchTokenizer } from '../common/monarch/monarchLexer.js';\nconst ttPolicy = createTrustedTypesPolicy('standaloneColorizer', { createHTML: value => value });\nexport class Colorizer {\n static colorizeElement(themeService, languageService, domNode, options) {\n options = options || {};\n const theme = options.theme || 'vs';\n const mimeType = options.mimeType || domNode.getAttribute('lang') || domNode.getAttribute('data-lang');\n if (!mimeType) {\n console.error('Mode not detected');\n return Promise.resolve();\n }\n const languageId = languageService.getLanguageIdByMimeType(mimeType) || mimeType;\n themeService.setTheme(theme);\n const text = domNode.firstChild ? domNode.firstChild.nodeValue : '';\n domNode.className += ' ' + theme;\n const render = (str) => {\n var _a;\n const trustedhtml = (_a = ttPolicy === null || ttPolicy === void 0 ? void 0 : ttPolicy.createHTML(str)) !== null && _a !== void 0 ? _a : str;\n domNode.innerHTML = trustedhtml;\n };\n return this.colorize(languageService, text || '', languageId, options).then(render, (err) => console.error(err));\n }\n static async colorize(languageService, text, languageId, options) {\n const languageIdCodec = languageService.languageIdCodec;\n let tabSize = 4;\n if (options && typeof options.tabSize === 'number') {\n tabSize = options.tabSize;\n }\n if (strings.startsWithUTF8BOM(text)) {\n text = text.substr(1);\n }\n const lines = strings.splitLines(text);\n if (!languageService.isRegisteredLanguageId(languageId)) {\n return _fakeColorize(lines, tabSize, languageIdCodec);\n }\n const tokenizationSupport = await TokenizationRegistry.getOrCreate(languageId);\n if (tokenizationSupport) {\n return _colorize(lines, tabSize, tokenizationSupport, languageIdCodec);\n }\n return _fakeColorize(lines, tabSize, languageIdCodec);\n }\n static colorizeLine(line, mightContainNonBasicASCII, mightContainRTL, tokens, tabSize = 4) {\n const isBasicASCII = ViewLineRenderingData.isBasicASCII(line, mightContainNonBasicASCII);\n const containsRTL = ViewLineRenderingData.containsRTL(line, isBasicASCII, mightContainRTL);\n const renderResult = renderViewLine(new RenderLineInput(false, true, line, false, isBasicASCII, containsRTL, 0, tokens, [], tabSize, 0, 0, 0, 0, -1, 'none', false, false, null));\n return renderResult.html;\n }\n static colorizeModelLine(model, lineNumber, tabSize = 4) {\n const content = model.getLineContent(lineNumber);\n model.tokenization.forceTokenization(lineNumber);\n const tokens = model.tokenization.getLineTokens(lineNumber);\n const inflatedTokens = tokens.inflate();\n return this.colorizeLine(content, model.mightContainNonBasicASCII(), model.mightContainRTL(), inflatedTokens, tabSize);\n }\n}\nfunction _colorize(lines, tabSize, tokenizationSupport, languageIdCodec) {\n return new Promise((c, e) => {\n const execute = () => {\n const result = _actualColorize(lines, tabSize, tokenizationSupport, languageIdCodec);\n if (tokenizationSupport instanceof MonarchTokenizer) {\n const status = tokenizationSupport.getLoadStatus();\n if (status.loaded === false) {\n status.promise.then(execute, e);\n return;\n }\n }\n c(result);\n };\n execute();\n });\n}\nfunction _fakeColorize(lines, tabSize, languageIdCodec) {\n let html = [];\n const defaultMetadata = ((0 /* FontStyle.None */ << 11 /* MetadataConsts.FONT_STYLE_OFFSET */)\n | (1 /* ColorId.DefaultForeground */ << 15 /* MetadataConsts.FOREGROUND_OFFSET */)\n | (2 /* ColorId.DefaultBackground */ << 24 /* MetadataConsts.BACKGROUND_OFFSET */)) >>> 0;\n const tokens = new Uint32Array(2);\n tokens[0] = 0;\n tokens[1] = defaultMetadata;\n for (let i = 0, length = lines.length; i < length; i++) {\n const line = lines[i];\n tokens[0] = line.length;\n const lineTokens = new LineTokens(tokens, line, languageIdCodec);\n const isBasicASCII = ViewLineRenderingData.isBasicASCII(line, /* check for basic ASCII */ true);\n const containsRTL = ViewLineRenderingData.containsRTL(line, isBasicASCII, /* check for RTL */ true);\n const renderResult = renderViewLine(new RenderLineInput(false, true, line, false, isBasicASCII, containsRTL, 0, lineTokens, [], tabSize, 0, 0, 0, 0, -1, 'none', false, false, null));\n html = html.concat(renderResult.html);\n html.push('
');\n }\n return html.join('');\n}\nfunction _actualColorize(lines, tabSize, tokenizationSupport, languageIdCodec) {\n let html = [];\n let state = tokenizationSupport.getInitialState();\n for (let i = 0, length = lines.length; i < length; i++) {\n const line = lines[i];\n const tokenizeResult = tokenizationSupport.tokenizeEncoded(line, true, state);\n LineTokens.convertToEndOffset(tokenizeResult.tokens, line.length);\n const lineTokens = new LineTokens(tokenizeResult.tokens, line, languageIdCodec);\n const isBasicASCII = ViewLineRenderingData.isBasicASCII(line, /* check for basic ASCII */ true);\n const containsRTL = ViewLineRenderingData.containsRTL(line, isBasicASCII, /* check for RTL */ true);\n const renderResult = renderViewLine(new RenderLineInput(false, true, line, false, isBasicASCII, containsRTL, 0, lineTokens.inflate(), [], tabSize, 0, 0, 0, 0, -1, 'none', false, false, null));\n html = html.concat(renderResult.html);\n html.push('
');\n state = tokenizeResult.endState;\n }\n return html.join('');\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-aria-container {\n\tposition: absolute; /* try to hide from window but not from screen readers */\n\tleft:-999em;\n}", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as dom from '../../dom.js';\nimport './aria.css';\n// Use a max length since we are inserting the whole msg in the DOM and that can cause browsers to freeze for long messages #94233\nconst MAX_MESSAGE_LENGTH = 20000;\nlet ariaContainer;\nlet alertContainer;\nlet alertContainer2;\nlet statusContainer;\nlet statusContainer2;\nexport function setARIAContainer(parent) {\n ariaContainer = document.createElement('div');\n ariaContainer.className = 'monaco-aria-container';\n const createAlertContainer = () => {\n const element = document.createElement('div');\n element.className = 'monaco-alert';\n element.setAttribute('role', 'alert');\n element.setAttribute('aria-atomic', 'true');\n ariaContainer.appendChild(element);\n return element;\n };\n alertContainer = createAlertContainer();\n alertContainer2 = createAlertContainer();\n const createStatusContainer = () => {\n const element = document.createElement('div');\n element.className = 'monaco-status';\n element.setAttribute('aria-live', 'polite');\n element.setAttribute('aria-atomic', 'true');\n ariaContainer.appendChild(element);\n return element;\n };\n statusContainer = createStatusContainer();\n statusContainer2 = createStatusContainer();\n parent.appendChild(ariaContainer);\n}\n/**\n * Given the provided message, will make sure that it is read as alert to screen readers.\n */\nexport function alert(msg) {\n if (!ariaContainer) {\n return;\n }\n // Use alternate containers such that duplicated messages get read out by screen readers #99466\n if (alertContainer.textContent !== msg) {\n dom.clearNode(alertContainer2);\n insertMessage(alertContainer, msg);\n }\n else {\n dom.clearNode(alertContainer);\n insertMessage(alertContainer2, msg);\n }\n}\n/**\n * Given the provided message, will make sure that it is read as status to screen readers.\n */\nexport function status(msg) {\n if (!ariaContainer) {\n return;\n }\n if (statusContainer.textContent !== msg) {\n dom.clearNode(statusContainer2);\n insertMessage(statusContainer, msg);\n }\n else {\n dom.clearNode(statusContainer);\n insertMessage(statusContainer2, msg);\n }\n}\nfunction insertMessage(target, msg) {\n dom.clearNode(target);\n if (msg.length > MAX_MESSAGE_LENGTH) {\n msg = msg.substr(0, MAX_MESSAGE_LENGTH);\n }\n target.textContent = msg;\n // See https://www.paciellogroup.com/blog/2012/06/html5-accessibility-chops-aria-rolealert-browser-support/\n target.style.visibility = 'hidden';\n target.style.visibility = 'visible';\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation.js';\nexport const IMarkerDecorationsService = createDecorator('markerDecorationsService');\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { IMarkerDecorationsService } from '../../common/services/markerDecorations.js';\nimport { registerEditorContribution } from '../editorExtensions.js';\nlet MarkerDecorationsContribution = class MarkerDecorationsContribution {\n constructor(_editor, _markerDecorationsService) {\n // Doesn't do anything, just requires `IMarkerDecorationsService` to make sure it gets instantiated\n }\n dispose() {\n }\n};\nMarkerDecorationsContribution.ID = 'editor.contrib.markerDecorations';\nMarkerDecorationsContribution = __decorate([\n __param(1, IMarkerDecorationsService)\n], MarkerDecorationsContribution);\nexport { MarkerDecorationsContribution };\nregisterEditorContribution(MarkerDecorationsContribution.ID, MarkerDecorationsContribution, 0 /* EditorContributionInstantiation.Eager */); // eager because it instantiates IMarkerDecorationsService which is responsible for rendering squiggles\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* -------------------- IE10 remove auto clear button -------------------- */\n\n::-ms-clear {\n\tdisplay: none;\n}\n\n/* All widgets */\n/* I am not a big fan of this rule */\n.monaco-editor .editor-widget input {\n\tcolor: inherit;\n}\n\n/* -------------------- Editor -------------------- */\n\n.monaco-editor {\n\tposition: relative;\n\toverflow: visible;\n\t-webkit-text-size-adjust: 100%;\n\tcolor: var(--vscode-editor-foreground);\n\tbackground-color: var(--vscode-editor-background);\n}\n.monaco-editor-background {\n\tbackground-color: var(--vscode-editor-background);\n}\n.monaco-editor .rangeHighlight {\n\tbackground-color: var(--vscode-editor-rangeHighlightBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-rangeHighlightBorder);\n}\n.monaco-editor.hc-black .rangeHighlight, .monaco-editor.hc-light .rangeHighlight {\n\tborder-style: dotted;\n}\n.monaco-editor .symbolHighlight {\n\tbackground-color: var(--vscode-editor-symbolHighlightBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-symbolHighlightBorder);\n}\n.monaco-editor.hc-black .symbolHighlight, .monaco-editor.hc-light .symbolHighlight {\n\tborder-style: dotted;\n}\n\n/* -------------------- Misc -------------------- */\n\n.monaco-editor .overflow-guard {\n\tposition: relative;\n\toverflow: hidden;\n}\n\n.monaco-editor .view-overlays {\n\tposition: absolute;\n\ttop: 0;\n}\n\n/*\n.monaco-editor .auto-closed-character {\n\topacity: 0.3;\n}\n*/\n\n\n.monaco-editor .squiggly-error {\n\tborder-bottom: 4px double var(--vscode-editorError-border);\n}\n.monaco-editor .squiggly-error::before {\n\tdisplay: block;\n\tcontent: '';\n\twidth: 100%;\n\theight: 100%;\n\tbackground: var(--vscode-editorError-background);\n}\n.monaco-editor .squiggly-warning {\n\tborder-bottom: 4px double var(--vscode-editorWarning-border);\n}\n.monaco-editor .squiggly-warning::before {\n\tdisplay: block;\n\tcontent: '';\n\twidth: 100%;\n\theight: 100%;\n\tbackground: var(--vscode-editorWarning-background);\n}\n.monaco-editor .squiggly-info {\n\tborder-bottom: 4px double var(--vscode-editorInfo-border);\n}\n.monaco-editor .squiggly-info::before {\n\tdisplay: block;\n\tcontent: '';\n\twidth: 100%;\n\theight: 100%;\n\tbackground: var(--vscode-editorInfo-background);\n}\n.monaco-editor .squiggly-hint {\n\tborder-bottom: 2px dotted var(--vscode-editorHint-border);\n}\n.monaco-editor.showUnused .squiggly-unnecessary {\n\tborder-bottom: 2px dashed var(--vscode-editorUnnecessaryCode-border);\n}\n.monaco-editor.showDeprecated .squiggly-inline-deprecated {\n\ttext-decoration: line-through;\n\ttext-decoration-color: var(--vscode-editor-foreground, inherit);\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { Emitter } from '../../../base/common/event.js';\nimport { getWindow, scheduleAtNextAnimationFrame } from '../../../base/browser/dom.js';\nexport class ElementSizeObserver extends Disposable {\n constructor(referenceDomElement, dimension) {\n super();\n this._onDidChange = this._register(new Emitter());\n this.onDidChange = this._onDidChange.event;\n this._referenceDomElement = referenceDomElement;\n this._width = -1;\n this._height = -1;\n this._resizeObserver = null;\n this.measureReferenceDomElement(false, dimension);\n }\n dispose() {\n this.stopObserving();\n super.dispose();\n }\n getWidth() {\n return this._width;\n }\n getHeight() {\n return this._height;\n }\n startObserving() {\n if (!this._resizeObserver && this._referenceDomElement) {\n // We want to react to the resize observer only once per animation frame\n // The first time the resize observer fires, we will react to it immediately.\n // Otherwise we will postpone to the next animation frame.\n // We'll use `observeContentRect` to store the content rect we received.\n let observedDimenstion = null;\n const observeNow = () => {\n if (observedDimenstion) {\n this.observe({ width: observedDimenstion.width, height: observedDimenstion.height });\n }\n else {\n this.observe();\n }\n };\n let shouldObserve = false;\n let alreadyObservedThisAnimationFrame = false;\n const update = () => {\n if (shouldObserve && !alreadyObservedThisAnimationFrame) {\n try {\n shouldObserve = false;\n alreadyObservedThisAnimationFrame = true;\n observeNow();\n }\n finally {\n scheduleAtNextAnimationFrame(getWindow(this._referenceDomElement), () => {\n alreadyObservedThisAnimationFrame = false;\n update();\n });\n }\n }\n };\n this._resizeObserver = new ResizeObserver((entries) => {\n if (entries && entries[0] && entries[0].contentRect) {\n observedDimenstion = { width: entries[0].contentRect.width, height: entries[0].contentRect.height };\n }\n else {\n observedDimenstion = null;\n }\n shouldObserve = true;\n update();\n });\n this._resizeObserver.observe(this._referenceDomElement);\n }\n }\n stopObserving() {\n if (this._resizeObserver) {\n this._resizeObserver.disconnect();\n this._resizeObserver = null;\n }\n }\n observe(dimension) {\n this.measureReferenceDomElement(true, dimension);\n }\n measureReferenceDomElement(emitEvent, dimension) {\n let observedWidth = 0;\n let observedHeight = 0;\n if (dimension) {\n observedWidth = dimension.width;\n observedHeight = dimension.height;\n }\n else if (this._referenceDomElement) {\n observedWidth = this._referenceDomElement.clientWidth;\n observedHeight = this._referenceDomElement.clientHeight;\n }\n observedWidth = Math.max(5, observedWidth);\n observedHeight = Math.max(5, observedHeight);\n if (this._width !== observedWidth || this._height !== observedHeight) {\n this._width = observedWidth;\n this._height = observedHeight;\n if (emitEvent) {\n this._onDidChange.fire();\n }\n }\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport class EditorSettingMigration {\n constructor(key, migrate) {\n this.key = key;\n this.migrate = migrate;\n }\n apply(options) {\n const value = EditorSettingMigration._read(options, this.key);\n const read = (key) => EditorSettingMigration._read(options, key);\n const write = (key, value) => EditorSettingMigration._write(options, key, value);\n this.migrate(value, read, write);\n }\n static _read(source, key) {\n if (typeof source === 'undefined') {\n return undefined;\n }\n const firstDotIndex = key.indexOf('.');\n if (firstDotIndex >= 0) {\n const firstSegment = key.substring(0, firstDotIndex);\n return this._read(source[firstSegment], key.substring(firstDotIndex + 1));\n }\n return source[key];\n }\n static _write(target, key, value) {\n const firstDotIndex = key.indexOf('.');\n if (firstDotIndex >= 0) {\n const firstSegment = key.substring(0, firstDotIndex);\n target[firstSegment] = target[firstSegment] || {};\n this._write(target[firstSegment], key.substring(firstDotIndex + 1), value);\n return;\n }\n target[key] = value;\n }\n}\nEditorSettingMigration.items = [];\nfunction registerEditorSettingMigration(key, migrate) {\n EditorSettingMigration.items.push(new EditorSettingMigration(key, migrate));\n}\nfunction registerSimpleEditorSettingMigration(key, values) {\n registerEditorSettingMigration(key, (value, read, write) => {\n if (typeof value !== 'undefined') {\n for (const [oldValue, newValue] of values) {\n if (value === oldValue) {\n write(key, newValue);\n return;\n }\n }\n }\n });\n}\n/**\n * Compatibility with old options\n */\nexport function migrateOptions(options) {\n EditorSettingMigration.items.forEach(migration => migration.apply(options));\n}\nregisterSimpleEditorSettingMigration('wordWrap', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('lineNumbers', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorBlinking', [['visible', 'solid']]);\nregisterSimpleEditorSettingMigration('renderWhitespace', [[true, 'boundary'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('renderLineHighlight', [[true, 'line'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('acceptSuggestionOnEnter', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('tabCompletion', [[false, 'off'], [true, 'onlySnippets']]);\nregisterSimpleEditorSettingMigration('hover', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('parameterHints', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('autoIndent', [[false, 'advanced'], [true, 'full']]);\nregisterSimpleEditorSettingMigration('matchBrackets', [[true, 'always'], [false, 'never']]);\nregisterSimpleEditorSettingMigration('renderFinalNewline', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorSmoothCaretAnimation', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('occurrencesHighlight', [[true, 'singleFile'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('wordBasedSuggestions', [[true, 'matchingDocuments'], [false, 'off']]);\nregisterEditorSettingMigration('autoClosingBrackets', (value, read, write) => {\n if (value === false) {\n write('autoClosingBrackets', 'never');\n if (typeof read('autoClosingQuotes') === 'undefined') {\n write('autoClosingQuotes', 'never');\n }\n if (typeof read('autoSurround') === 'undefined') {\n write('autoSurround', 'never');\n }\n }\n});\nregisterEditorSettingMigration('renderIndentGuides', (value, read, write) => {\n if (typeof value !== 'undefined') {\n write('renderIndentGuides', undefined);\n if (typeof read('guides.indentation') === 'undefined') {\n write('guides.indentation', !!value);\n }\n }\n});\nregisterEditorSettingMigration('highlightActiveIndentGuide', (value, read, write) => {\n if (typeof value !== 'undefined') {\n write('highlightActiveIndentGuide', undefined);\n if (typeof read('guides.highlightActiveIndentation') === 'undefined') {\n write('guides.highlightActiveIndentation', !!value);\n }\n }\n});\nconst suggestFilteredTypesMapping = {\n method: 'showMethods',\n function: 'showFunctions',\n constructor: 'showConstructors',\n deprecated: 'showDeprecated',\n field: 'showFields',\n variable: 'showVariables',\n class: 'showClasses',\n struct: 'showStructs',\n interface: 'showInterfaces',\n module: 'showModules',\n property: 'showProperties',\n event: 'showEvents',\n operator: 'showOperators',\n unit: 'showUnits',\n value: 'showValues',\n constant: 'showConstants',\n enum: 'showEnums',\n enumMember: 'showEnumMembers',\n keyword: 'showKeywords',\n text: 'showWords',\n color: 'showColors',\n file: 'showFiles',\n reference: 'showReferences',\n folder: 'showFolders',\n typeParameter: 'showTypeParameters',\n snippet: 'showSnippets',\n};\nregisterEditorSettingMigration('suggest.filteredTypes', (value, read, write) => {\n if (value && typeof value === 'object') {\n for (const entry of Object.entries(suggestFilteredTypesMapping)) {\n const v = value[entry[0]];\n if (v === false) {\n if (typeof read(`suggest.${entry[1]}`) === 'undefined') {\n write(`suggest.${entry[1]}`, false);\n }\n }\n }\n write('suggest.filteredTypes', undefined);\n }\n});\nregisterEditorSettingMigration('quickSuggestions', (input, read, write) => {\n if (typeof input === 'boolean') {\n const value = input ? 'on' : 'off';\n const newValue = { comments: value, strings: value, other: value };\n write('quickSuggestions', newValue);\n }\n});\n// Sticky Scroll\nregisterEditorSettingMigration('experimental.stickyScroll.enabled', (value, read, write) => {\n if (typeof value === 'boolean') {\n write('experimental.stickyScroll.enabled', undefined);\n if (typeof read('stickyScroll.enabled') === 'undefined') {\n write('stickyScroll.enabled', value);\n }\n }\n});\nregisterEditorSettingMigration('experimental.stickyScroll.maxLineCount', (value, read, write) => {\n if (typeof value === 'number') {\n write('experimental.stickyScroll.maxLineCount', undefined);\n if (typeof read('stickyScroll.maxLineCount') === 'undefined') {\n write('stickyScroll.maxLineCount', value);\n }\n }\n});\n// Code Actions on Save\nregisterEditorSettingMigration('codeActionsOnSave', (value, read, write) => {\n if (value && typeof value === 'object') {\n let toBeModified = false;\n const newValue = {};\n for (const entry of Object.entries(value)) {\n if (typeof entry[1] === 'boolean') {\n toBeModified = true;\n newValue[entry[0]] = entry[1] ? 'explicit' : 'never';\n }\n else {\n newValue[entry[0]] = entry[1];\n }\n }\n if (toBeModified) {\n write(`codeActionsOnSave`, newValue);\n }\n }\n});\n// Migrate Quick Fix Settings\nregisterEditorSettingMigration('codeActionWidget.includeNearbyQuickfixes', (value, read, write) => {\n if (typeof value === 'boolean') {\n write('codeActionWidget.includeNearbyQuickfixes', undefined);\n if (typeof read('codeActionWidget.includeNearbyQuickFixes') === 'undefined') {\n write('codeActionWidget.includeNearbyQuickFixes', value);\n }\n }\n});\n// Migrate the lightbulb settings\nregisterEditorSettingMigration('lightbulb.enabled', (value, read, write) => {\n if (typeof value === 'boolean') {\n write('lightbulb.enabled', value ? undefined : 'off');\n }\n});\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Emitter } from '../../../base/common/event.js';\nclass TabFocusImpl {\n constructor() {\n this._tabFocus = false;\n this._onDidChangeTabFocus = new Emitter();\n this.onDidChangeTabFocus = this._onDidChangeTabFocus.event;\n }\n getTabFocusMode() {\n return this._tabFocus;\n }\n setTabFocusMode(tabFocusMode) {\n this._tabFocus = tabFocusMode;\n this._onDidChangeTabFocus.fire(this._tabFocus);\n }\n}\n/**\n * Control what pressing Tab does.\n * If it is false, pressing Tab or Shift-Tab will be handled by the editor.\n * If it is true, pressing Tab or Shift-Tab will move the browser focus.\n * Defaults to false.\n */\nexport const TabFocus = new TabFocusImpl();\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { RawContextKey } from '../../contextkey/common/contextkey.js';\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\nexport const IAccessibilityService = createDecorator('accessibilityService');\nexport const CONTEXT_ACCESSIBILITY_MODE_ENABLED = new RawContextKey('accessibilityModeEnabled', false);\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport * as browser from '../../../base/browser/browser.js';\nimport * as arrays from '../../../base/common/arrays.js';\nimport { Emitter } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport * as objects from '../../../base/common/objects.js';\nimport * as platform from '../../../base/common/platform.js';\nimport { ElementSizeObserver } from './elementSizeObserver.js';\nimport { FontMeasurements } from './fontMeasurements.js';\nimport { migrateOptions } from './migrateOptions.js';\nimport { TabFocus } from './tabFocus.js';\nimport { ComputeOptionsMemory, ConfigurationChangedEvent, editorOptionsRegistry } from '../../common/config/editorOptions.js';\nimport { EditorZoom } from '../../common/config/editorZoom.js';\nimport { BareFontInfo } from '../../common/config/fontInfo.js';\nimport { IAccessibilityService } from '../../../platform/accessibility/common/accessibility.js';\nlet EditorConfiguration = class EditorConfiguration extends Disposable {\n constructor(isSimpleWidget, options, container, _accessibilityService) {\n super();\n this._accessibilityService = _accessibilityService;\n this._onDidChange = this._register(new Emitter());\n this.onDidChange = this._onDidChange.event;\n this._onDidChangeFast = this._register(new Emitter());\n this.onDidChangeFast = this._onDidChangeFast.event;\n this._isDominatedByLongLines = false;\n this._viewLineCount = 1;\n this._lineNumbersDigitCount = 1;\n this._reservedHeight = 0;\n this._glyphMarginDecorationLaneCount = 1;\n this._computeOptionsMemory = new ComputeOptionsMemory();\n this.isSimpleWidget = isSimpleWidget;\n this._containerObserver = this._register(new ElementSizeObserver(container, options.dimension));\n this._rawOptions = deepCloneAndMigrateOptions(options);\n this._validatedOptions = EditorOptionsUtil.validateOptions(this._rawOptions);\n this.options = this._computeOptions();\n if (this.options.get(13 /* EditorOption.automaticLayout */)) {\n this._containerObserver.startObserving();\n }\n this._register(EditorZoom.onDidChangeZoomLevel(() => this._recomputeOptions()));\n this._register(TabFocus.onDidChangeTabFocus(() => this._recomputeOptions()));\n this._register(this._containerObserver.onDidChange(() => this._recomputeOptions()));\n this._register(FontMeasurements.onDidChange(() => this._recomputeOptions()));\n this._register(browser.PixelRatio.onDidChange(() => this._recomputeOptions()));\n this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(() => this._recomputeOptions()));\n }\n _recomputeOptions() {\n const newOptions = this._computeOptions();\n const changeEvent = EditorOptionsUtil.checkEquals(this.options, newOptions);\n if (changeEvent === null) {\n // nothing changed!\n return;\n }\n this.options = newOptions;\n this._onDidChangeFast.fire(changeEvent);\n this._onDidChange.fire(changeEvent);\n }\n _computeOptions() {\n const partialEnv = this._readEnvConfiguration();\n const bareFontInfo = BareFontInfo.createFromValidatedSettings(this._validatedOptions, partialEnv.pixelRatio, this.isSimpleWidget);\n const fontInfo = this._readFontInfo(bareFontInfo);\n const env = {\n memory: this._computeOptionsMemory,\n outerWidth: partialEnv.outerWidth,\n outerHeight: partialEnv.outerHeight - this._reservedHeight,\n fontInfo: fontInfo,\n extraEditorClassName: partialEnv.extraEditorClassName,\n isDominatedByLongLines: this._isDominatedByLongLines,\n viewLineCount: this._viewLineCount,\n lineNumbersDigitCount: this._lineNumbersDigitCount,\n emptySelectionClipboard: partialEnv.emptySelectionClipboard,\n pixelRatio: partialEnv.pixelRatio,\n tabFocusMode: TabFocus.getTabFocusMode(),\n accessibilitySupport: partialEnv.accessibilitySupport,\n glyphMarginDecorationLaneCount: this._glyphMarginDecorationLaneCount\n };\n return EditorOptionsUtil.computeOptions(this._validatedOptions, env);\n }\n _readEnvConfiguration() {\n return {\n extraEditorClassName: getExtraEditorClassName(),\n outerWidth: this._containerObserver.getWidth(),\n outerHeight: this._containerObserver.getHeight(),\n emptySelectionClipboard: browser.isWebKit || browser.isFirefox,\n pixelRatio: browser.PixelRatio.value,\n accessibilitySupport: (this._accessibilityService.isScreenReaderOptimized()\n ? 2 /* AccessibilitySupport.Enabled */\n : this._accessibilityService.getAccessibilitySupport())\n };\n }\n _readFontInfo(bareFontInfo) {\n return FontMeasurements.readFontInfo(bareFontInfo);\n }\n getRawOptions() {\n return this._rawOptions;\n }\n updateOptions(_newOptions) {\n const newOptions = deepCloneAndMigrateOptions(_newOptions);\n const didChange = EditorOptionsUtil.applyUpdate(this._rawOptions, newOptions);\n if (!didChange) {\n return;\n }\n this._validatedOptions = EditorOptionsUtil.validateOptions(this._rawOptions);\n this._recomputeOptions();\n }\n observeContainer(dimension) {\n this._containerObserver.observe(dimension);\n }\n setIsDominatedByLongLines(isDominatedByLongLines) {\n if (this._isDominatedByLongLines === isDominatedByLongLines) {\n return;\n }\n this._isDominatedByLongLines = isDominatedByLongLines;\n this._recomputeOptions();\n }\n setModelLineCount(modelLineCount) {\n const lineNumbersDigitCount = digitCount(modelLineCount);\n if (this._lineNumbersDigitCount === lineNumbersDigitCount) {\n return;\n }\n this._lineNumbersDigitCount = lineNumbersDigitCount;\n this._recomputeOptions();\n }\n setViewLineCount(viewLineCount) {\n if (this._viewLineCount === viewLineCount) {\n return;\n }\n this._viewLineCount = viewLineCount;\n this._recomputeOptions();\n }\n setReservedHeight(reservedHeight) {\n if (this._reservedHeight === reservedHeight) {\n return;\n }\n this._reservedHeight = reservedHeight;\n this._recomputeOptions();\n }\n setGlyphMarginDecorationLaneCount(decorationLaneCount) {\n if (this._glyphMarginDecorationLaneCount === decorationLaneCount) {\n return;\n }\n this._glyphMarginDecorationLaneCount = decorationLaneCount;\n this._recomputeOptions();\n }\n};\nEditorConfiguration = __decorate([\n __param(3, IAccessibilityService)\n], EditorConfiguration);\nexport { EditorConfiguration };\nfunction digitCount(n) {\n let r = 0;\n while (n) {\n n = Math.floor(n / 10);\n r++;\n }\n return r ? r : 1;\n}\nfunction getExtraEditorClassName() {\n let extra = '';\n if (!browser.isSafari && !browser.isWebkitWebView) {\n // Use user-select: none in all browsers except Safari and native macOS WebView\n extra += 'no-user-select ';\n }\n if (browser.isSafari) {\n // See https://github.com/microsoft/vscode/issues/108822\n extra += 'no-minimap-shadow ';\n extra += 'enable-user-select ';\n }\n if (platform.isMacintosh) {\n extra += 'mac ';\n }\n return extra;\n}\nclass ValidatedEditorOptions {\n constructor() {\n this._values = [];\n }\n _read(option) {\n return this._values[option];\n }\n get(id) {\n return this._values[id];\n }\n _write(option, value) {\n this._values[option] = value;\n }\n}\nexport class ComputedEditorOptions {\n constructor() {\n this._values = [];\n }\n _read(id) {\n if (id >= this._values.length) {\n throw new Error('Cannot read uninitialized value');\n }\n return this._values[id];\n }\n get(id) {\n return this._read(id);\n }\n _write(id, value) {\n this._values[id] = value;\n }\n}\nclass EditorOptionsUtil {\n static validateOptions(options) {\n const result = new ValidatedEditorOptions();\n for (const editorOption of editorOptionsRegistry) {\n const value = (editorOption.name === '_never_' ? undefined : options[editorOption.name]);\n result._write(editorOption.id, editorOption.validate(value));\n }\n return result;\n }\n static computeOptions(options, env) {\n const result = new ComputedEditorOptions();\n for (const editorOption of editorOptionsRegistry) {\n result._write(editorOption.id, editorOption.compute(env, result, options._read(editorOption.id)));\n }\n return result;\n }\n static _deepEquals(a, b) {\n if (typeof a !== 'object' || typeof b !== 'object' || !a || !b) {\n return a === b;\n }\n if (Array.isArray(a) || Array.isArray(b)) {\n return (Array.isArray(a) && Array.isArray(b) ? arrays.equals(a, b) : false);\n }\n if (Object.keys(a).length !== Object.keys(b).length) {\n return false;\n }\n for (const key in a) {\n if (!EditorOptionsUtil._deepEquals(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n static checkEquals(a, b) {\n const result = [];\n let somethingChanged = false;\n for (const editorOption of editorOptionsRegistry) {\n const changed = !EditorOptionsUtil._deepEquals(a._read(editorOption.id), b._read(editorOption.id));\n result[editorOption.id] = changed;\n if (changed) {\n somethingChanged = true;\n }\n }\n return (somethingChanged ? new ConfigurationChangedEvent(result) : null);\n }\n /**\n * Returns true if something changed.\n * Modifies `options`.\n */\n static applyUpdate(options, update) {\n let changed = false;\n for (const editorOption of editorOptionsRegistry) {\n if (update.hasOwnProperty(editorOption.name)) {\n const result = editorOption.applyUpdate(options[editorOption.name], update[editorOption.name]);\n options[editorOption.name] = result.newValue;\n changed = changed || result.didChange;\n }\n }\n return changed;\n }\n}\nfunction deepCloneAndMigrateOptions(_options) {\n const options = objects.deepClone(_options);\n migrateOptions(options);\n return options;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport var inputLatency;\n(function (inputLatency) {\n const totalKeydownTime = { total: 0, min: Number.MAX_VALUE, max: 0 };\n const totalInputTime = { ...totalKeydownTime };\n const totalRenderTime = { ...totalKeydownTime };\n const totalInputLatencyTime = { ...totalKeydownTime };\n let measurementsCount = 0;\n const state = {\n keydown: 0 /* EventPhase.Before */,\n input: 0 /* EventPhase.Before */,\n render: 0 /* EventPhase.Before */,\n };\n /**\n * Record the start of the keydown event.\n */\n function onKeyDown() {\n /** Direct Check C. See explanation in {@link recordIfFinished} */\n recordIfFinished();\n performance.mark('inputlatency/start');\n performance.mark('keydown/start');\n state.keydown = 1 /* EventPhase.InProgress */;\n queueMicrotask(markKeyDownEnd);\n }\n inputLatency.onKeyDown = onKeyDown;\n /**\n * Mark the end of the keydown event.\n */\n function markKeyDownEnd() {\n if (state.keydown === 1 /* EventPhase.InProgress */) {\n performance.mark('keydown/end');\n state.keydown = 2 /* EventPhase.Finished */;\n }\n }\n /**\n * Record the start of the beforeinput event.\n */\n function onBeforeInput() {\n performance.mark('input/start');\n state.input = 1 /* EventPhase.InProgress */;\n /** Schedule Task A. See explanation in {@link recordIfFinished} */\n scheduleRecordIfFinishedTask();\n }\n inputLatency.onBeforeInput = onBeforeInput;\n /**\n * Record the start of the input event.\n */\n function onInput() {\n if (state.input === 0 /* EventPhase.Before */) {\n // it looks like we didn't receive a `beforeinput`\n onBeforeInput();\n }\n queueMicrotask(markInputEnd);\n }\n inputLatency.onInput = onInput;\n function markInputEnd() {\n if (state.input === 1 /* EventPhase.InProgress */) {\n performance.mark('input/end');\n state.input = 2 /* EventPhase.Finished */;\n }\n }\n /**\n * Record the start of the keyup event.\n */\n function onKeyUp() {\n /** Direct Check D. See explanation in {@link recordIfFinished} */\n recordIfFinished();\n }\n inputLatency.onKeyUp = onKeyUp;\n /**\n * Record the start of the selectionchange event.\n */\n function onSelectionChange() {\n /** Direct Check E. See explanation in {@link recordIfFinished} */\n recordIfFinished();\n }\n inputLatency.onSelectionChange = onSelectionChange;\n /**\n * Record the start of the animation frame performing the rendering.\n */\n function onRenderStart() {\n // Render may be triggered during input, but we only measure the following animation frame\n if (state.keydown === 2 /* EventPhase.Finished */ && state.input === 2 /* EventPhase.Finished */ && state.render === 0 /* EventPhase.Before */) {\n // Only measure the first render after keyboard input\n performance.mark('render/start');\n state.render = 1 /* EventPhase.InProgress */;\n queueMicrotask(markRenderEnd);\n /** Schedule Task B. See explanation in {@link recordIfFinished} */\n scheduleRecordIfFinishedTask();\n }\n }\n inputLatency.onRenderStart = onRenderStart;\n /**\n * Mark the end of the animation frame performing the rendering.\n */\n function markRenderEnd() {\n if (state.render === 1 /* EventPhase.InProgress */) {\n performance.mark('render/end');\n state.render = 2 /* EventPhase.Finished */;\n }\n }\n function scheduleRecordIfFinishedTask() {\n // Here we can safely assume that the `setTimeout` will not be\n // artificially delayed by 4ms because we schedule it from\n // event handlers\n setTimeout(recordIfFinished);\n }\n /**\n * Record the input latency sample if input handling and rendering are finished.\n *\n * The challenge here is that we want to record the latency in such a way that it includes\n * also the layout and painting work the browser does during the animation frame task.\n *\n * Simply scheduling a new task (via `setTimeout`) from the animation frame task would\n * schedule the new task at the end of the task queue (after other code that uses `setTimeout`),\n * so we need to use multiple strategies to make sure our task runs before others:\n *\n * We schedule tasks (A and B):\n * - we schedule a task A (via a `setTimeout` call) when the input starts in `markInputStart`.\n * If the animation frame task is scheduled quickly by the browser, then task A has a very good\n * chance of being the very first task after the animation frame and thus will record the input latency.\n * - however, if the animation frame task is scheduled a bit later, then task A might execute\n * before the animation frame task. We therefore schedule another task B from `markRenderStart`.\n *\n * We do direct checks in browser event handlers (C, D, E):\n * - if the browser has multiple keydown events queued up, they will be scheduled before the `setTimeout` tasks,\n * so we do a direct check in the keydown event handler (C).\n * - depending on timing, sometimes the animation frame is scheduled even before the `keyup` event, so we\n * do a direct check there too (E).\n * - the browser oftentimes emits a `selectionchange` event after an `input`, so we do a direct check there (D).\n */\n function recordIfFinished() {\n if (state.keydown === 2 /* EventPhase.Finished */ && state.input === 2 /* EventPhase.Finished */ && state.render === 2 /* EventPhase.Finished */) {\n performance.mark('inputlatency/end');\n performance.measure('keydown', 'keydown/start', 'keydown/end');\n performance.measure('input', 'input/start', 'input/end');\n performance.measure('render', 'render/start', 'render/end');\n performance.measure('inputlatency', 'inputlatency/start', 'inputlatency/end');\n addMeasure('keydown', totalKeydownTime);\n addMeasure('input', totalInputTime);\n addMeasure('render', totalRenderTime);\n addMeasure('inputlatency', totalInputLatencyTime);\n // console.info(\n // \t`input latency=${performance.getEntriesByName('inputlatency')[0].duration.toFixed(1)} [` +\n // \t`keydown=${performance.getEntriesByName('keydown')[0].duration.toFixed(1)}, ` +\n // \t`input=${performance.getEntriesByName('input')[0].duration.toFixed(1)}, ` +\n // \t`render=${performance.getEntriesByName('render')[0].duration.toFixed(1)}` +\n // \t`]`\n // );\n measurementsCount++;\n reset();\n }\n }\n function addMeasure(entryName, cumulativeMeasurement) {\n const duration = performance.getEntriesByName(entryName)[0].duration;\n cumulativeMeasurement.total += duration;\n cumulativeMeasurement.min = Math.min(cumulativeMeasurement.min, duration);\n cumulativeMeasurement.max = Math.max(cumulativeMeasurement.max, duration);\n }\n /**\n * Clear the current sample.\n */\n function reset() {\n performance.clearMarks('keydown/start');\n performance.clearMarks('keydown/end');\n performance.clearMarks('input/start');\n performance.clearMarks('input/end');\n performance.clearMarks('render/start');\n performance.clearMarks('render/end');\n performance.clearMarks('inputlatency/start');\n performance.clearMarks('inputlatency/end');\n performance.clearMeasures('keydown');\n performance.clearMeasures('input');\n performance.clearMeasures('render');\n performance.clearMeasures('inputlatency');\n state.keydown = 0 /* EventPhase.Before */;\n state.input = 0 /* EventPhase.Before */;\n state.render = 0 /* EventPhase.Before */;\n }\n /**\n * Gets all input latency samples and clears the internal buffers to start recording a new set\n * of samples.\n */\n function getAndClearMeasurements() {\n if (measurementsCount === 0) {\n return undefined;\n }\n // Assemble the result\n const result = {\n keydown: cumulativeToFinalMeasurement(totalKeydownTime),\n input: cumulativeToFinalMeasurement(totalInputTime),\n render: cumulativeToFinalMeasurement(totalRenderTime),\n total: cumulativeToFinalMeasurement(totalInputLatencyTime),\n sampleCount: measurementsCount\n };\n // Clear the cumulative measurements\n clearCumulativeMeasurement(totalKeydownTime);\n clearCumulativeMeasurement(totalInputTime);\n clearCumulativeMeasurement(totalRenderTime);\n clearCumulativeMeasurement(totalInputLatencyTime);\n measurementsCount = 0;\n return result;\n }\n inputLatency.getAndClearMeasurements = getAndClearMeasurements;\n function cumulativeToFinalMeasurement(cumulative) {\n return {\n average: cumulative.total / measurementsCount,\n max: cumulative.max,\n min: cumulative.min,\n };\n }\n function clearCumulativeMeasurement(cumulative) {\n cumulative.total = 0;\n cumulative.min = Number.MAX_VALUE;\n cumulative.max = 0;\n }\n})(inputLatency || (inputLatency = {}));\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as dom from './dom.js';\nimport { DisposableStore, toDisposable } from '../common/lifecycle.js';\nexport class GlobalPointerMoveMonitor {\n constructor() {\n this._hooks = new DisposableStore();\n this._pointerMoveCallback = null;\n this._onStopCallback = null;\n }\n dispose() {\n this.stopMonitoring(false);\n this._hooks.dispose();\n }\n stopMonitoring(invokeStopCallback, browserEvent) {\n if (!this.isMonitoring()) {\n // Not monitoring\n return;\n }\n // Unhook\n this._hooks.clear();\n this._pointerMoveCallback = null;\n const onStopCallback = this._onStopCallback;\n this._onStopCallback = null;\n if (invokeStopCallback && onStopCallback) {\n onStopCallback(browserEvent);\n }\n }\n isMonitoring() {\n return !!this._pointerMoveCallback;\n }\n startMonitoring(initialElement, pointerId, initialButtons, pointerMoveCallback, onStopCallback) {\n if (this.isMonitoring()) {\n this.stopMonitoring(false);\n }\n this._pointerMoveCallback = pointerMoveCallback;\n this._onStopCallback = onStopCallback;\n let eventSource = initialElement;\n try {\n initialElement.setPointerCapture(pointerId);\n this._hooks.add(toDisposable(() => {\n try {\n initialElement.releasePointerCapture(pointerId);\n }\n catch (err) {\n // See https://github.com/microsoft/vscode/issues/161731\n //\n // `releasePointerCapture` sometimes fails when being invoked with the exception:\n // DOMException: Failed to execute 'releasePointerCapture' on 'Element':\n // No active pointer with the given id is found.\n //\n // There's no need to do anything in case of failure\n }\n }));\n }\n catch (err) {\n // See https://github.com/microsoft/vscode/issues/144584\n // See https://github.com/microsoft/vscode/issues/146947\n // `setPointerCapture` sometimes fails when being invoked\n // from a `mousedown` listener on macOS and Windows\n // and it always fails on Linux with the exception:\n // DOMException: Failed to execute 'setPointerCapture' on 'Element':\n // No active pointer with the given id is found.\n // In case of failure, we bind the listeners on the window\n eventSource = dom.getWindow(initialElement);\n }\n this._hooks.add(dom.addDisposableListener(eventSource, dom.EventType.POINTER_MOVE, (e) => {\n if (e.buttons !== initialButtons) {\n // Buttons state has changed in the meantime\n this.stopMonitoring(true);\n return;\n }\n e.preventDefault();\n this._pointerMoveCallback(e);\n }));\n this._hooks.add(dom.addDisposableListener(eventSource, dom.EventType.POINTER_UP, (e) => this.stopMonitoring(true)));\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { assertNever } from '../../../base/common/assert.js';\nimport { RunOnceScheduler } from '../../../base/common/async.js';\nimport { Color, RGBA } from '../../../base/common/color.js';\nimport { Emitter } from '../../../base/common/event.js';\nimport * as nls from '../../../nls.js';\nimport { Extensions as JSONExtensions } from '../../jsonschemas/common/jsonContributionRegistry.js';\nimport * as platform from '../../registry/common/platform.js';\n/**\n * Returns the css variable name for the given color identifier. Dots (`.`) are replaced with hyphens (`-`) and\n * everything is prefixed with `--vscode-`.\n *\n * @sample `editorSuggestWidget.background` is `--vscode-editorSuggestWidget-background`.\n */\nexport function asCssVariableName(colorIdent) {\n return `--vscode-${colorIdent.replace(/\\./g, '-')}`;\n}\nexport function asCssVariable(color) {\n return `var(${asCssVariableName(color)})`;\n}\nexport function asCssVariableWithDefault(color, defaultCssValue) {\n return `var(${asCssVariableName(color)}, ${defaultCssValue})`;\n}\n// color registry\nexport const Extensions = {\n ColorContribution: 'base.contributions.colors'\n};\nclass ColorRegistry {\n constructor() {\n this._onDidChangeSchema = new Emitter();\n this.onDidChangeSchema = this._onDidChangeSchema.event;\n this.colorSchema = { type: 'object', properties: {} };\n this.colorReferenceSchema = { type: 'string', enum: [], enumDescriptions: [] };\n this.colorsById = {};\n }\n registerColor(id, defaults, description, needsTransparency = false, deprecationMessage) {\n const colorContribution = { id, description, defaults, needsTransparency, deprecationMessage };\n this.colorsById[id] = colorContribution;\n const propertySchema = { type: 'string', description, format: 'color-hex', defaultSnippets: [{ body: '${1:#ff0000}' }] };\n if (deprecationMessage) {\n propertySchema.deprecationMessage = deprecationMessage;\n }\n if (needsTransparency) {\n propertySchema.pattern = '^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$';\n propertySchema.patternErrorMessage = 'This color must be transparent or it will obscure content';\n }\n this.colorSchema.properties[id] = propertySchema;\n this.colorReferenceSchema.enum.push(id);\n this.colorReferenceSchema.enumDescriptions.push(description);\n this._onDidChangeSchema.fire();\n return id;\n }\n getColors() {\n return Object.keys(this.colorsById).map(id => this.colorsById[id]);\n }\n resolveDefaultColor(id, theme) {\n const colorDesc = this.colorsById[id];\n if (colorDesc && colorDesc.defaults) {\n const colorValue = colorDesc.defaults[theme.type];\n return resolveColorValue(colorValue, theme);\n }\n return undefined;\n }\n getColorSchema() {\n return this.colorSchema;\n }\n toString() {\n const sorter = (a, b) => {\n const cat1 = a.indexOf('.') === -1 ? 0 : 1;\n const cat2 = b.indexOf('.') === -1 ? 0 : 1;\n if (cat1 !== cat2) {\n return cat1 - cat2;\n }\n return a.localeCompare(b);\n };\n return Object.keys(this.colorsById).sort(sorter).map(k => `- \\`${k}\\`: ${this.colorsById[k].description}`).join('\\n');\n }\n}\nconst colorRegistry = new ColorRegistry();\nplatform.Registry.add(Extensions.ColorContribution, colorRegistry);\nexport function registerColor(id, defaults, description, needsTransparency, deprecationMessage) {\n return colorRegistry.registerColor(id, defaults, description, needsTransparency, deprecationMessage);\n}\n// ----- base colors\nexport const foreground = registerColor('foreground', { dark: '#CCCCCC', light: '#616161', hcDark: '#FFFFFF', hcLight: '#292929' }, nls.localize('foreground', \"Overall foreground color. This color is only used if not overridden by a component.\"));\nexport const disabledForeground = registerColor('disabledForeground', { dark: '#CCCCCC80', light: '#61616180', hcDark: '#A5A5A5', hcLight: '#7F7F7F' }, nls.localize('disabledForeground', \"Overall foreground for disabled elements. This color is only used if not overridden by a component.\"));\nexport const errorForeground = registerColor('errorForeground', { dark: '#F48771', light: '#A1260D', hcDark: '#F48771', hcLight: '#B5200D' }, nls.localize('errorForeground', \"Overall foreground color for error messages. This color is only used if not overridden by a component.\"));\nexport const descriptionForeground = registerColor('descriptionForeground', { light: '#717171', dark: transparent(foreground, 0.7), hcDark: transparent(foreground, 0.7), hcLight: transparent(foreground, 0.7) }, nls.localize('descriptionForeground', \"Foreground color for description text providing additional information, for example for a label.\"));\nexport const iconForeground = registerColor('icon.foreground', { dark: '#C5C5C5', light: '#424242', hcDark: '#FFFFFF', hcLight: '#292929' }, nls.localize('iconForeground', \"The default color for icons in the workbench.\"));\nexport const focusBorder = registerColor('focusBorder', { dark: '#007FD4', light: '#0090F1', hcDark: '#F38518', hcLight: '#006BBD' }, nls.localize('focusBorder', \"Overall border color for focused elements. This color is only used if not overridden by a component.\"));\nexport const contrastBorder = registerColor('contrastBorder', { light: null, dark: null, hcDark: '#6FC3DF', hcLight: '#0F4A85' }, nls.localize('contrastBorder', \"An extra border around elements to separate them from others for greater contrast.\"));\nexport const activeContrastBorder = registerColor('contrastActiveBorder', { light: null, dark: null, hcDark: focusBorder, hcLight: focusBorder }, nls.localize('activeContrastBorder', \"An extra border around active elements to separate them from others for greater contrast.\"));\nexport const selectionBackground = registerColor('selection.background', { light: null, dark: null, hcDark: null, hcLight: null }, nls.localize('selectionBackground', \"The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.\"));\n// ------ text colors\nexport const textSeparatorForeground = registerColor('textSeparator.foreground', { light: '#0000002e', dark: '#ffffff2e', hcDark: Color.black, hcLight: '#292929' }, nls.localize('textSeparatorForeground', \"Color for text separators.\"));\nexport const textLinkForeground = registerColor('textLink.foreground', { light: '#006AB1', dark: '#3794FF', hcDark: '#3794FF', hcLight: '#0F4A85' }, nls.localize('textLinkForeground', \"Foreground color for links in text.\"));\nexport const textLinkActiveForeground = registerColor('textLink.activeForeground', { light: '#006AB1', dark: '#3794FF', hcDark: '#3794FF', hcLight: '#0F4A85' }, nls.localize('textLinkActiveForeground', \"Foreground color for links in text when clicked on and on mouse hover.\"));\nexport const textPreformatForeground = registerColor('textPreformat.foreground', { light: '#A31515', dark: '#D7BA7D', hcDark: '#000000', hcLight: '#FFFFFF' }, nls.localize('textPreformatForeground', \"Foreground color for preformatted text segments.\"));\nexport const textPreformatBackground = registerColor('textPreformat.background', { light: '#0000001A', dark: '#FFFFFF1A', hcDark: '#FFFFFF', hcLight: '#09345f' }, nls.localize('textPreformatBackground', \"Background color for preformatted text segments.\"));\nexport const textBlockQuoteBackground = registerColor('textBlockQuote.background', { light: '#f2f2f2', dark: '#222222', hcDark: null, hcLight: '#F2F2F2' }, nls.localize('textBlockQuoteBackground', \"Background color for block quotes in text.\"));\nexport const textBlockQuoteBorder = registerColor('textBlockQuote.border', { light: '#007acc80', dark: '#007acc80', hcDark: Color.white, hcLight: '#292929' }, nls.localize('textBlockQuoteBorder', \"Border color for block quotes in text.\"));\nexport const textCodeBlockBackground = registerColor('textCodeBlock.background', { light: '#dcdcdc66', dark: '#0a0a0a66', hcDark: Color.black, hcLight: '#F2F2F2' }, nls.localize('textCodeBlockBackground', \"Background color for code blocks in text.\"));\n// ----- widgets\nexport const widgetShadow = registerColor('widget.shadow', { dark: transparent(Color.black, .36), light: transparent(Color.black, .16), hcDark: null, hcLight: null }, nls.localize('widgetShadow', 'Shadow color of widgets such as find/replace inside the editor.'));\nexport const widgetBorder = registerColor('widget.border', { dark: null, light: null, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('widgetBorder', 'Border color of widgets such as find/replace inside the editor.'));\nexport const inputBackground = registerColor('input.background', { dark: '#3C3C3C', light: Color.white, hcDark: Color.black, hcLight: Color.white }, nls.localize('inputBoxBackground', \"Input box background.\"));\nexport const inputForeground = registerColor('input.foreground', { dark: foreground, light: foreground, hcDark: foreground, hcLight: foreground }, nls.localize('inputBoxForeground', \"Input box foreground.\"));\nexport const inputBorder = registerColor('input.border', { dark: null, light: null, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('inputBoxBorder', \"Input box border.\"));\nexport const inputActiveOptionBorder = registerColor('inputOption.activeBorder', { dark: '#007ACC', light: '#007ACC', hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('inputBoxActiveOptionBorder', \"Border color of activated options in input fields.\"));\nexport const inputActiveOptionHoverBackground = registerColor('inputOption.hoverBackground', { dark: '#5a5d5e80', light: '#b8b8b850', hcDark: null, hcLight: null }, nls.localize('inputOption.hoverBackground', \"Background color of activated options in input fields.\"));\nexport const inputActiveOptionBackground = registerColor('inputOption.activeBackground', { dark: transparent(focusBorder, 0.4), light: transparent(focusBorder, 0.2), hcDark: Color.transparent, hcLight: Color.transparent }, nls.localize('inputOption.activeBackground', \"Background hover color of options in input fields.\"));\nexport const inputActiveOptionForeground = registerColor('inputOption.activeForeground', { dark: Color.white, light: Color.black, hcDark: foreground, hcLight: foreground }, nls.localize('inputOption.activeForeground', \"Foreground color of activated options in input fields.\"));\nexport const inputPlaceholderForeground = registerColor('input.placeholderForeground', { light: transparent(foreground, 0.5), dark: transparent(foreground, 0.5), hcDark: transparent(foreground, 0.7), hcLight: transparent(foreground, 0.7) }, nls.localize('inputPlaceholderForeground', \"Input box foreground color for placeholder text.\"));\nexport const inputValidationInfoBackground = registerColor('inputValidation.infoBackground', { dark: '#063B49', light: '#D6ECF2', hcDark: Color.black, hcLight: Color.white }, nls.localize('inputValidationInfoBackground', \"Input validation background color for information severity.\"));\nexport const inputValidationInfoForeground = registerColor('inputValidation.infoForeground', { dark: null, light: null, hcDark: null, hcLight: foreground }, nls.localize('inputValidationInfoForeground', \"Input validation foreground color for information severity.\"));\nexport const inputValidationInfoBorder = registerColor('inputValidation.infoBorder', { dark: '#007acc', light: '#007acc', hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('inputValidationInfoBorder', \"Input validation border color for information severity.\"));\nexport const inputValidationWarningBackground = registerColor('inputValidation.warningBackground', { dark: '#352A05', light: '#F6F5D2', hcDark: Color.black, hcLight: Color.white }, nls.localize('inputValidationWarningBackground', \"Input validation background color for warning severity.\"));\nexport const inputValidationWarningForeground = registerColor('inputValidation.warningForeground', { dark: null, light: null, hcDark: null, hcLight: foreground }, nls.localize('inputValidationWarningForeground', \"Input validation foreground color for warning severity.\"));\nexport const inputValidationWarningBorder = registerColor('inputValidation.warningBorder', { dark: '#B89500', light: '#B89500', hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('inputValidationWarningBorder', \"Input validation border color for warning severity.\"));\nexport const inputValidationErrorBackground = registerColor('inputValidation.errorBackground', { dark: '#5A1D1D', light: '#F2DEDE', hcDark: Color.black, hcLight: Color.white }, nls.localize('inputValidationErrorBackground', \"Input validation background color for error severity.\"));\nexport const inputValidationErrorForeground = registerColor('inputValidation.errorForeground', { dark: null, light: null, hcDark: null, hcLight: foreground }, nls.localize('inputValidationErrorForeground', \"Input validation foreground color for error severity.\"));\nexport const inputValidationErrorBorder = registerColor('inputValidation.errorBorder', { dark: '#BE1100', light: '#BE1100', hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('inputValidationErrorBorder', \"Input validation border color for error severity.\"));\nexport const selectBackground = registerColor('dropdown.background', { dark: '#3C3C3C', light: Color.white, hcDark: Color.black, hcLight: Color.white }, nls.localize('dropdownBackground', \"Dropdown background.\"));\nexport const selectListBackground = registerColor('dropdown.listBackground', { dark: null, light: null, hcDark: Color.black, hcLight: Color.white }, nls.localize('dropdownListBackground', \"Dropdown list background.\"));\nexport const selectForeground = registerColor('dropdown.foreground', { dark: '#F0F0F0', light: foreground, hcDark: Color.white, hcLight: foreground }, nls.localize('dropdownForeground', \"Dropdown foreground.\"));\nexport const selectBorder = registerColor('dropdown.border', { dark: selectBackground, light: '#CECECE', hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('dropdownBorder', \"Dropdown border.\"));\nexport const buttonForeground = registerColor('button.foreground', { dark: Color.white, light: Color.white, hcDark: Color.white, hcLight: Color.white }, nls.localize('buttonForeground', \"Button foreground color.\"));\nexport const buttonSeparator = registerColor('button.separator', { dark: transparent(buttonForeground, .4), light: transparent(buttonForeground, .4), hcDark: transparent(buttonForeground, .4), hcLight: transparent(buttonForeground, .4) }, nls.localize('buttonSeparator', \"Button separator color.\"));\nexport const buttonBackground = registerColor('button.background', { dark: '#0E639C', light: '#007ACC', hcDark: null, hcLight: '#0F4A85' }, nls.localize('buttonBackground', \"Button background color.\"));\nexport const buttonHoverBackground = registerColor('button.hoverBackground', { dark: lighten(buttonBackground, 0.2), light: darken(buttonBackground, 0.2), hcDark: buttonBackground, hcLight: buttonBackground }, nls.localize('buttonHoverBackground', \"Button background color when hovering.\"));\nexport const buttonBorder = registerColor('button.border', { dark: contrastBorder, light: contrastBorder, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('buttonBorder', \"Button border color.\"));\nexport const buttonSecondaryForeground = registerColor('button.secondaryForeground', { dark: Color.white, light: Color.white, hcDark: Color.white, hcLight: foreground }, nls.localize('buttonSecondaryForeground', \"Secondary button foreground color.\"));\nexport const buttonSecondaryBackground = registerColor('button.secondaryBackground', { dark: '#3A3D41', light: '#5F6A79', hcDark: null, hcLight: Color.white }, nls.localize('buttonSecondaryBackground', \"Secondary button background color.\"));\nexport const buttonSecondaryHoverBackground = registerColor('button.secondaryHoverBackground', { dark: lighten(buttonSecondaryBackground, 0.2), light: darken(buttonSecondaryBackground, 0.2), hcDark: null, hcLight: null }, nls.localize('buttonSecondaryHoverBackground', \"Secondary button background color when hovering.\"));\nexport const badgeBackground = registerColor('badge.background', { dark: '#4D4D4D', light: '#C4C4C4', hcDark: Color.black, hcLight: '#0F4A85' }, nls.localize('badgeBackground', \"Badge background color. Badges are small information labels, e.g. for search results count.\"));\nexport const badgeForeground = registerColor('badge.foreground', { dark: Color.white, light: '#333', hcDark: Color.white, hcLight: Color.white }, nls.localize('badgeForeground', \"Badge foreground color. Badges are small information labels, e.g. for search results count.\"));\nexport const scrollbarShadow = registerColor('scrollbar.shadow', { dark: '#000000', light: '#DDDDDD', hcDark: null, hcLight: null }, nls.localize('scrollbarShadow', \"Scrollbar shadow to indicate that the view is scrolled.\"));\nexport const scrollbarSliderBackground = registerColor('scrollbarSlider.background', { dark: Color.fromHex('#797979').transparent(0.4), light: Color.fromHex('#646464').transparent(0.4), hcDark: transparent(contrastBorder, 0.6), hcLight: transparent(contrastBorder, 0.4) }, nls.localize('scrollbarSliderBackground', \"Scrollbar slider background color.\"));\nexport const scrollbarSliderHoverBackground = registerColor('scrollbarSlider.hoverBackground', { dark: Color.fromHex('#646464').transparent(0.7), light: Color.fromHex('#646464').transparent(0.7), hcDark: transparent(contrastBorder, 0.8), hcLight: transparent(contrastBorder, 0.8) }, nls.localize('scrollbarSliderHoverBackground', \"Scrollbar slider background color when hovering.\"));\nexport const scrollbarSliderActiveBackground = registerColor('scrollbarSlider.activeBackground', { dark: Color.fromHex('#BFBFBF').transparent(0.4), light: Color.fromHex('#000000').transparent(0.6), hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('scrollbarSliderActiveBackground', \"Scrollbar slider background color when clicked on.\"));\nexport const progressBarBackground = registerColor('progressBar.background', { dark: Color.fromHex('#0E70C0'), light: Color.fromHex('#0E70C0'), hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('progressBarBackground', \"Background color of the progress bar that can show for long running operations.\"));\nexport const editorErrorBackground = registerColor('editorError.background', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('editorError.background', 'Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations.'), true);\nexport const editorErrorForeground = registerColor('editorError.foreground', { dark: '#F14C4C', light: '#E51400', hcDark: '#F48771', hcLight: '#B5200D' }, nls.localize('editorError.foreground', 'Foreground color of error squigglies in the editor.'));\nexport const editorErrorBorder = registerColor('editorError.border', { dark: null, light: null, hcDark: Color.fromHex('#E47777').transparent(0.8), hcLight: '#B5200D' }, nls.localize('errorBorder', 'If set, color of double underlines for errors in the editor.'));\nexport const editorWarningBackground = registerColor('editorWarning.background', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('editorWarning.background', 'Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations.'), true);\nexport const editorWarningForeground = registerColor('editorWarning.foreground', { dark: '#CCA700', light: '#BF8803', hcDark: '#FFD370', hcLight: '#895503' }, nls.localize('editorWarning.foreground', 'Foreground color of warning squigglies in the editor.'));\nexport const editorWarningBorder = registerColor('editorWarning.border', { dark: null, light: null, hcDark: Color.fromHex('#FFCC00').transparent(0.8), hcLight: Color.fromHex('#FFCC00').transparent(0.8) }, nls.localize('warningBorder', 'If set, color of double underlines for warnings in the editor.'));\nexport const editorInfoBackground = registerColor('editorInfo.background', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('editorInfo.background', 'Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations.'), true);\nexport const editorInfoForeground = registerColor('editorInfo.foreground', { dark: '#3794FF', light: '#1a85ff', hcDark: '#3794FF', hcLight: '#1a85ff' }, nls.localize('editorInfo.foreground', 'Foreground color of info squigglies in the editor.'));\nexport const editorInfoBorder = registerColor('editorInfo.border', { dark: null, light: null, hcDark: Color.fromHex('#3794FF').transparent(0.8), hcLight: '#292929' }, nls.localize('infoBorder', 'If set, color of double underlines for infos in the editor.'));\nexport const editorHintForeground = registerColor('editorHint.foreground', { dark: Color.fromHex('#eeeeee').transparent(0.7), light: '#6c6c6c', hcDark: null, hcLight: null }, nls.localize('editorHint.foreground', 'Foreground color of hint squigglies in the editor.'));\nexport const editorHintBorder = registerColor('editorHint.border', { dark: null, light: null, hcDark: Color.fromHex('#eeeeee').transparent(0.8), hcLight: '#292929' }, nls.localize('hintBorder', 'If set, color of double underlines for hints in the editor.'));\nexport const sashHoverBorder = registerColor('sash.hoverBorder', { dark: focusBorder, light: focusBorder, hcDark: focusBorder, hcLight: focusBorder }, nls.localize('sashActiveBorder', \"Border color of active sashes.\"));\n/**\n * Editor background color.\n */\nexport const editorBackground = registerColor('editor.background', { light: '#ffffff', dark: '#1E1E1E', hcDark: Color.black, hcLight: Color.white }, nls.localize('editorBackground', \"Editor background color.\"));\n/**\n * Editor foreground color.\n */\nexport const editorForeground = registerColor('editor.foreground', { light: '#333333', dark: '#BBBBBB', hcDark: Color.white, hcLight: foreground }, nls.localize('editorForeground', \"Editor default foreground color.\"));\n/**\n * Sticky scroll\n */\nexport const editorStickyScrollBackground = registerColor('editorStickyScroll.background', { light: editorBackground, dark: editorBackground, hcDark: editorBackground, hcLight: editorBackground }, nls.localize('editorStickyScrollBackground', \"Background color of sticky scroll in the editor\"));\nexport const editorStickyScrollHoverBackground = registerColor('editorStickyScrollHover.background', { dark: '#2A2D2E', light: '#F0F0F0', hcDark: null, hcLight: Color.fromHex('#0F4A85').transparent(0.1) }, nls.localize('editorStickyScrollHoverBackground', \"Background color of sticky scroll on hover in the editor\"));\nexport const editorStickyScrollBorder = registerColor('editorStickyScroll.border', { dark: null, light: null, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('editorStickyScrollBorder', \"Border color of sticky scroll in the editor\"));\nexport const editorStickyScrollShadow = registerColor('editorStickyScroll.shadow', { dark: scrollbarShadow, light: scrollbarShadow, hcDark: scrollbarShadow, hcLight: scrollbarShadow }, nls.localize('editorStickyScrollShadow', \" Shadow color of sticky scroll in the editor\"));\n/**\n * Editor widgets\n */\nexport const editorWidgetBackground = registerColor('editorWidget.background', { dark: '#252526', light: '#F3F3F3', hcDark: '#0C141F', hcLight: Color.white }, nls.localize('editorWidgetBackground', 'Background color of editor widgets, such as find/replace.'));\nexport const editorWidgetForeground = registerColor('editorWidget.foreground', { dark: foreground, light: foreground, hcDark: foreground, hcLight: foreground }, nls.localize('editorWidgetForeground', 'Foreground color of editor widgets, such as find/replace.'));\nexport const editorWidgetBorder = registerColor('editorWidget.border', { dark: '#454545', light: '#C8C8C8', hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('editorWidgetBorder', 'Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.'));\nexport const editorWidgetResizeBorder = registerColor('editorWidget.resizeBorder', { light: null, dark: null, hcDark: null, hcLight: null }, nls.localize('editorWidgetResizeBorder', \"Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.\"));\n/**\n * Quick pick widget\n */\nexport const quickInputBackground = registerColor('quickInput.background', { dark: editorWidgetBackground, light: editorWidgetBackground, hcDark: editorWidgetBackground, hcLight: editorWidgetBackground }, nls.localize('pickerBackground', \"Quick picker background color. The quick picker widget is the container for pickers like the command palette.\"));\nexport const quickInputForeground = registerColor('quickInput.foreground', { dark: editorWidgetForeground, light: editorWidgetForeground, hcDark: editorWidgetForeground, hcLight: editorWidgetForeground }, nls.localize('pickerForeground', \"Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.\"));\nexport const quickInputTitleBackground = registerColor('quickInputTitle.background', { dark: new Color(new RGBA(255, 255, 255, 0.105)), light: new Color(new RGBA(0, 0, 0, 0.06)), hcDark: '#000000', hcLight: Color.white }, nls.localize('pickerTitleBackground', \"Quick picker title background color. The quick picker widget is the container for pickers like the command palette.\"));\nexport const pickerGroupForeground = registerColor('pickerGroup.foreground', { dark: '#3794FF', light: '#0066BF', hcDark: Color.white, hcLight: '#0F4A85' }, nls.localize('pickerGroupForeground', \"Quick picker color for grouping labels.\"));\nexport const pickerGroupBorder = registerColor('pickerGroup.border', { dark: '#3F3F46', light: '#CCCEDB', hcDark: Color.white, hcLight: '#0F4A85' }, nls.localize('pickerGroupBorder', \"Quick picker color for grouping borders.\"));\n/**\n * Keybinding label\n */\nexport const keybindingLabelBackground = registerColor('keybindingLabel.background', { dark: new Color(new RGBA(128, 128, 128, 0.17)), light: new Color(new RGBA(221, 221, 221, 0.4)), hcDark: Color.transparent, hcLight: Color.transparent }, nls.localize('keybindingLabelBackground', \"Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.\"));\nexport const keybindingLabelForeground = registerColor('keybindingLabel.foreground', { dark: Color.fromHex('#CCCCCC'), light: Color.fromHex('#555555'), hcDark: Color.white, hcLight: foreground }, nls.localize('keybindingLabelForeground', \"Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.\"));\nexport const keybindingLabelBorder = registerColor('keybindingLabel.border', { dark: new Color(new RGBA(51, 51, 51, 0.6)), light: new Color(new RGBA(204, 204, 204, 0.4)), hcDark: new Color(new RGBA(111, 195, 223)), hcLight: contrastBorder }, nls.localize('keybindingLabelBorder', \"Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.\"));\nexport const keybindingLabelBottomBorder = registerColor('keybindingLabel.bottomBorder', { dark: new Color(new RGBA(68, 68, 68, 0.6)), light: new Color(new RGBA(187, 187, 187, 0.4)), hcDark: new Color(new RGBA(111, 195, 223)), hcLight: foreground }, nls.localize('keybindingLabelBottomBorder', \"Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.\"));\n/**\n * Editor selection colors.\n */\nexport const editorSelectionBackground = registerColor('editor.selectionBackground', { light: '#ADD6FF', dark: '#264F78', hcDark: '#f3f518', hcLight: '#0F4A85' }, nls.localize('editorSelectionBackground', \"Color of the editor selection.\"));\nexport const editorSelectionForeground = registerColor('editor.selectionForeground', { light: null, dark: null, hcDark: '#000000', hcLight: Color.white }, nls.localize('editorSelectionForeground', \"Color of the selected text for high contrast.\"));\nexport const editorInactiveSelection = registerColor('editor.inactiveSelectionBackground', { light: transparent(editorSelectionBackground, 0.5), dark: transparent(editorSelectionBackground, 0.5), hcDark: transparent(editorSelectionBackground, 0.7), hcLight: transparent(editorSelectionBackground, 0.5) }, nls.localize('editorInactiveSelection', \"Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations.\"), true);\nexport const editorSelectionHighlight = registerColor('editor.selectionHighlightBackground', { light: lessProminent(editorSelectionBackground, editorBackground, 0.3, 0.6), dark: lessProminent(editorSelectionBackground, editorBackground, 0.3, 0.6), hcDark: null, hcLight: null }, nls.localize('editorSelectionHighlight', 'Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations.'), true);\nexport const editorSelectionHighlightBorder = registerColor('editor.selectionHighlightBorder', { light: null, dark: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize('editorSelectionHighlightBorder', \"Border color for regions with the same content as the selection.\"));\n/**\n * Editor find match colors.\n */\nexport const editorFindMatch = registerColor('editor.findMatchBackground', { light: '#A8AC94', dark: '#515C6A', hcDark: null, hcLight: null }, nls.localize('editorFindMatch', \"Color of the current search match.\"));\nexport const editorFindMatchHighlight = registerColor('editor.findMatchHighlightBackground', { light: '#EA5C0055', dark: '#EA5C0055', hcDark: null, hcLight: null }, nls.localize('findMatchHighlight', \"Color of the other search matches. The color must not be opaque so as not to hide underlying decorations.\"), true);\nexport const editorFindRangeHighlight = registerColor('editor.findRangeHighlightBackground', { dark: '#3a3d4166', light: '#b4b4b44d', hcDark: null, hcLight: null }, nls.localize('findRangeHighlight', \"Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations.\"), true);\nexport const editorFindMatchBorder = registerColor('editor.findMatchBorder', { light: null, dark: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize('editorFindMatchBorder', \"Border color of the current search match.\"));\nexport const editorFindMatchHighlightBorder = registerColor('editor.findMatchHighlightBorder', { light: null, dark: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize('findMatchHighlightBorder', \"Border color of the other search matches.\"));\nexport const editorFindRangeHighlightBorder = registerColor('editor.findRangeHighlightBorder', { dark: null, light: null, hcDark: transparent(activeContrastBorder, 0.4), hcLight: transparent(activeContrastBorder, 0.4) }, nls.localize('findRangeHighlightBorder', \"Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations.\"), true);\n/**\n * Search Editor query match colors.\n *\n * Distinct from normal editor find match to allow for better differentiation\n */\nexport const searchEditorFindMatch = registerColor('searchEditor.findMatchBackground', { light: transparent(editorFindMatchHighlight, 0.66), dark: transparent(editorFindMatchHighlight, 0.66), hcDark: editorFindMatchHighlight, hcLight: editorFindMatchHighlight }, nls.localize('searchEditor.queryMatch', \"Color of the Search Editor query matches.\"));\nexport const searchEditorFindMatchBorder = registerColor('searchEditor.findMatchBorder', { light: transparent(editorFindMatchHighlightBorder, 0.66), dark: transparent(editorFindMatchHighlightBorder, 0.66), hcDark: editorFindMatchHighlightBorder, hcLight: editorFindMatchHighlightBorder }, nls.localize('searchEditor.editorFindMatchBorder', \"Border color of the Search Editor query matches.\"));\n/**\n * Search Viewlet colors.\n */\nexport const searchResultsInfoForeground = registerColor('search.resultsInfoForeground', { light: foreground, dark: transparent(foreground, 0.65), hcDark: foreground, hcLight: foreground }, nls.localize('search.resultsInfoForeground', \"Color of the text in the search viewlet's completion message.\"));\n/**\n * Editor hover\n */\nexport const editorHoverHighlight = registerColor('editor.hoverHighlightBackground', { light: '#ADD6FF26', dark: '#264f7840', hcDark: '#ADD6FF26', hcLight: null }, nls.localize('hoverHighlight', 'Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations.'), true);\nexport const editorHoverBackground = registerColor('editorHoverWidget.background', { light: editorWidgetBackground, dark: editorWidgetBackground, hcDark: editorWidgetBackground, hcLight: editorWidgetBackground }, nls.localize('hoverBackground', 'Background color of the editor hover.'));\nexport const editorHoverForeground = registerColor('editorHoverWidget.foreground', { light: editorWidgetForeground, dark: editorWidgetForeground, hcDark: editorWidgetForeground, hcLight: editorWidgetForeground }, nls.localize('hoverForeground', 'Foreground color of the editor hover.'));\nexport const editorHoverBorder = registerColor('editorHoverWidget.border', { light: editorWidgetBorder, dark: editorWidgetBorder, hcDark: editorWidgetBorder, hcLight: editorWidgetBorder }, nls.localize('hoverBorder', 'Border color of the editor hover.'));\nexport const editorHoverStatusBarBackground = registerColor('editorHoverWidget.statusBarBackground', { dark: lighten(editorHoverBackground, 0.2), light: darken(editorHoverBackground, 0.05), hcDark: editorWidgetBackground, hcLight: editorWidgetBackground }, nls.localize('statusBarBackground', \"Background color of the editor hover status bar.\"));\n/**\n * Editor link colors\n */\nexport const editorActiveLinkForeground = registerColor('editorLink.activeForeground', { dark: '#4E94CE', light: Color.blue, hcDark: Color.cyan, hcLight: '#292929' }, nls.localize('activeLinkForeground', 'Color of active links.'));\n/**\n * Inline hints\n */\nexport const editorInlayHintForeground = registerColor('editorInlayHint.foreground', { dark: '#969696', light: '#969696', hcDark: Color.white, hcLight: Color.black }, nls.localize('editorInlayHintForeground', 'Foreground color of inline hints'));\nexport const editorInlayHintBackground = registerColor('editorInlayHint.background', { dark: transparent(badgeBackground, .10), light: transparent(badgeBackground, .10), hcDark: transparent(Color.white, .10), hcLight: transparent(badgeBackground, .10) }, nls.localize('editorInlayHintBackground', 'Background color of inline hints'));\nexport const editorInlayHintTypeForeground = registerColor('editorInlayHint.typeForeground', { dark: editorInlayHintForeground, light: editorInlayHintForeground, hcDark: editorInlayHintForeground, hcLight: editorInlayHintForeground }, nls.localize('editorInlayHintForegroundTypes', 'Foreground color of inline hints for types'));\nexport const editorInlayHintTypeBackground = registerColor('editorInlayHint.typeBackground', { dark: editorInlayHintBackground, light: editorInlayHintBackground, hcDark: editorInlayHintBackground, hcLight: editorInlayHintBackground }, nls.localize('editorInlayHintBackgroundTypes', 'Background color of inline hints for types'));\nexport const editorInlayHintParameterForeground = registerColor('editorInlayHint.parameterForeground', { dark: editorInlayHintForeground, light: editorInlayHintForeground, hcDark: editorInlayHintForeground, hcLight: editorInlayHintForeground }, nls.localize('editorInlayHintForegroundParameter', 'Foreground color of inline hints for parameters'));\nexport const editorInlayHintParameterBackground = registerColor('editorInlayHint.parameterBackground', { dark: editorInlayHintBackground, light: editorInlayHintBackground, hcDark: editorInlayHintBackground, hcLight: editorInlayHintBackground }, nls.localize('editorInlayHintBackgroundParameter', 'Background color of inline hints for parameters'));\n/**\n * Editor lightbulb icon colors\n */\nexport const editorLightBulbForeground = registerColor('editorLightBulb.foreground', { dark: '#FFCC00', light: '#DDB100', hcDark: '#FFCC00', hcLight: '#007ACC' }, nls.localize('editorLightBulbForeground', \"The color used for the lightbulb actions icon.\"));\nexport const editorLightBulbAutoFixForeground = registerColor('editorLightBulbAutoFix.foreground', { dark: '#75BEFF', light: '#007ACC', hcDark: '#75BEFF', hcLight: '#007ACC' }, nls.localize('editorLightBulbAutoFixForeground', \"The color used for the lightbulb auto fix actions icon.\"));\nexport const editorLightBulbAiForeground = registerColor('editorLightBulbAi.foreground', { dark: editorLightBulbForeground, light: editorLightBulbForeground, hcDark: editorLightBulbForeground, hcLight: editorLightBulbForeground }, nls.localize('editorLightBulbAiForeground', \"The color used for the lightbulb AI icon.\"));\n/**\n * Diff Editor Colors\n */\nexport const defaultInsertColor = new Color(new RGBA(155, 185, 85, .2));\nexport const defaultRemoveColor = new Color(new RGBA(255, 0, 0, .2));\nexport const diffInserted = registerColor('diffEditor.insertedTextBackground', { dark: '#9ccc2c33', light: '#9ccc2c40', hcDark: null, hcLight: null }, nls.localize('diffEditorInserted', 'Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations.'), true);\nexport const diffRemoved = registerColor('diffEditor.removedTextBackground', { dark: '#ff000033', light: '#ff000033', hcDark: null, hcLight: null }, nls.localize('diffEditorRemoved', 'Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations.'), true);\nexport const diffInsertedLine = registerColor('diffEditor.insertedLineBackground', { dark: defaultInsertColor, light: defaultInsertColor, hcDark: null, hcLight: null }, nls.localize('diffEditorInsertedLines', 'Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations.'), true);\nexport const diffRemovedLine = registerColor('diffEditor.removedLineBackground', { dark: defaultRemoveColor, light: defaultRemoveColor, hcDark: null, hcLight: null }, nls.localize('diffEditorRemovedLines', 'Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations.'), true);\nexport const diffInsertedLineGutter = registerColor('diffEditorGutter.insertedLineBackground', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('diffEditorInsertedLineGutter', 'Background color for the margin where lines got inserted.'));\nexport const diffRemovedLineGutter = registerColor('diffEditorGutter.removedLineBackground', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('diffEditorRemovedLineGutter', 'Background color for the margin where lines got removed.'));\nexport const diffOverviewRulerInserted = registerColor('diffEditorOverview.insertedForeground', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('diffEditorOverviewInserted', 'Diff overview ruler foreground for inserted content.'));\nexport const diffOverviewRulerRemoved = registerColor('diffEditorOverview.removedForeground', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('diffEditorOverviewRemoved', 'Diff overview ruler foreground for removed content.'));\nexport const diffInsertedOutline = registerColor('diffEditor.insertedTextBorder', { dark: null, light: null, hcDark: '#33ff2eff', hcLight: '#374E06' }, nls.localize('diffEditorInsertedOutline', 'Outline color for the text that got inserted.'));\nexport const diffRemovedOutline = registerColor('diffEditor.removedTextBorder', { dark: null, light: null, hcDark: '#FF008F', hcLight: '#AD0707' }, nls.localize('diffEditorRemovedOutline', 'Outline color for text that got removed.'));\nexport const diffBorder = registerColor('diffEditor.border', { dark: null, light: null, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('diffEditorBorder', 'Border color between the two text editors.'));\nexport const diffDiagonalFill = registerColor('diffEditor.diagonalFill', { dark: '#cccccc33', light: '#22222233', hcDark: null, hcLight: null }, nls.localize('diffDiagonalFill', \"Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.\"));\nexport const diffUnchangedRegionBackground = registerColor('diffEditor.unchangedRegionBackground', { dark: 'sideBar.background', light: 'sideBar.background', hcDark: 'sideBar.background', hcLight: 'sideBar.background' }, nls.localize('diffEditor.unchangedRegionBackground', \"The background color of unchanged blocks in the diff editor.\"));\nexport const diffUnchangedRegionForeground = registerColor('diffEditor.unchangedRegionForeground', { dark: 'foreground', light: 'foreground', hcDark: 'foreground', hcLight: 'foreground' }, nls.localize('diffEditor.unchangedRegionForeground', \"The foreground color of unchanged blocks in the diff editor.\"));\nexport const diffUnchangedTextBackground = registerColor('diffEditor.unchangedCodeBackground', { dark: '#74747429', light: '#b8b8b829', hcDark: null, hcLight: null }, nls.localize('diffEditor.unchangedCodeBackground', \"The background color of unchanged code in the diff editor.\"));\n/**\n * List and tree colors\n */\nexport const listFocusBackground = registerColor('list.focusBackground', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('listFocusBackground', \"List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.\"));\nexport const listFocusForeground = registerColor('list.focusForeground', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('listFocusForeground', \"List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.\"));\nexport const listFocusOutline = registerColor('list.focusOutline', { dark: focusBorder, light: focusBorder, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize('listFocusOutline', \"List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.\"));\nexport const listFocusAndSelectionOutline = registerColor('list.focusAndSelectionOutline', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('listFocusAndSelectionOutline', \"List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.\"));\nexport const listActiveSelectionBackground = registerColor('list.activeSelectionBackground', { dark: '#04395E', light: '#0060C0', hcDark: null, hcLight: Color.fromHex('#0F4A85').transparent(0.1) }, nls.localize('listActiveSelectionBackground', \"List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.\"));\nexport const listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: Color.white, light: Color.white, hcDark: null, hcLight: null }, nls.localize('listActiveSelectionForeground', \"List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.\"));\nexport const listActiveSelectionIconForeground = registerColor('list.activeSelectionIconForeground', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('listActiveSelectionIconForeground', \"List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.\"));\nexport const listInactiveSelectionBackground = registerColor('list.inactiveSelectionBackground', { dark: '#37373D', light: '#E4E6F1', hcDark: null, hcLight: Color.fromHex('#0F4A85').transparent(0.1) }, nls.localize('listInactiveSelectionBackground', \"List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.\"));\nexport const listInactiveSelectionForeground = registerColor('list.inactiveSelectionForeground', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('listInactiveSelectionForeground', \"List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.\"));\nexport const listInactiveSelectionIconForeground = registerColor('list.inactiveSelectionIconForeground', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('listInactiveSelectionIconForeground', \"List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.\"));\nexport const listInactiveFocusBackground = registerColor('list.inactiveFocusBackground', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('listInactiveFocusBackground', \"List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.\"));\nexport const listInactiveFocusOutline = registerColor('list.inactiveFocusOutline', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('listInactiveFocusOutline', \"List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.\"));\nexport const listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hcDark: Color.white.transparent(0.1), hcLight: Color.fromHex('#0F4A85').transparent(0.1) }, nls.localize('listHoverBackground', \"List/Tree background when hovering over items using the mouse.\"));\nexport const listHoverForeground = registerColor('list.hoverForeground', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('listHoverForeground', \"List/Tree foreground when hovering over items using the mouse.\"));\nexport const listDropOverBackground = registerColor('list.dropBackground', { dark: '#062F4A', light: '#D6EBFF', hcDark: null, hcLight: null }, nls.localize('listDropBackground', \"List/Tree drag and drop background when moving items over other items when using the mouse.\"));\nexport const listDropBetweenBackground = registerColor('list.dropBetweenBackground', { dark: iconForeground, light: iconForeground, hcDark: null, hcLight: null }, nls.localize('listDropBetweenBackground', \"List/Tree drag and drop border color when moving items between items when using the mouse.\"));\nexport const listHighlightForeground = registerColor('list.highlightForeground', { dark: '#2AAAFF', light: '#0066BF', hcDark: focusBorder, hcLight: focusBorder }, nls.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.'));\nexport const listFocusHighlightForeground = registerColor('list.focusHighlightForeground', { dark: listHighlightForeground, light: ifDefinedThenElse(listActiveSelectionBackground, listHighlightForeground, '#BBE7FF'), hcDark: listHighlightForeground, hcLight: listHighlightForeground }, nls.localize('listFocusHighlightForeground', 'List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.'));\nexport const listInvalidItemForeground = registerColor('list.invalidItemForeground', { dark: '#B89500', light: '#B89500', hcDark: '#B89500', hcLight: '#B5200D' }, nls.localize('invalidItemForeground', 'List/Tree foreground color for invalid items, for example an unresolved root in explorer.'));\nexport const listErrorForeground = registerColor('list.errorForeground', { dark: '#F88070', light: '#B01011', hcDark: null, hcLight: null }, nls.localize('listErrorForeground', 'Foreground color of list items containing errors.'));\nexport const listWarningForeground = registerColor('list.warningForeground', { dark: '#CCA700', light: '#855F00', hcDark: null, hcLight: null }, nls.localize('listWarningForeground', 'Foreground color of list items containing warnings.'));\nexport const listFilterWidgetBackground = registerColor('listFilterWidget.background', { light: darken(editorWidgetBackground, 0), dark: lighten(editorWidgetBackground, 0), hcDark: editorWidgetBackground, hcLight: editorWidgetBackground }, nls.localize('listFilterWidgetBackground', 'Background color of the type filter widget in lists and trees.'));\nexport const listFilterWidgetOutline = registerColor('listFilterWidget.outline', { dark: Color.transparent, light: Color.transparent, hcDark: '#f38518', hcLight: '#007ACC' }, nls.localize('listFilterWidgetOutline', 'Outline color of the type filter widget in lists and trees.'));\nexport const listFilterWidgetNoMatchesOutline = registerColor('listFilterWidget.noMatchesOutline', { dark: '#BE1100', light: '#BE1100', hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('listFilterWidgetNoMatchesOutline', 'Outline color of the type filter widget in lists and trees, when there are no matches.'));\nexport const listFilterWidgetShadow = registerColor('listFilterWidget.shadow', { dark: widgetShadow, light: widgetShadow, hcDark: widgetShadow, hcLight: widgetShadow }, nls.localize('listFilterWidgetShadow', 'Shadow color of the type filter widget in lists and trees.'));\nexport const listFilterMatchHighlight = registerColor('list.filterMatchBackground', { dark: editorFindMatchHighlight, light: editorFindMatchHighlight, hcDark: null, hcLight: null }, nls.localize('listFilterMatchHighlight', 'Background color of the filtered match.'));\nexport const listFilterMatchHighlightBorder = registerColor('list.filterMatchBorder', { dark: editorFindMatchHighlightBorder, light: editorFindMatchHighlightBorder, hcDark: contrastBorder, hcLight: activeContrastBorder }, nls.localize('listFilterMatchHighlightBorder', 'Border color of the filtered match.'));\nexport const treeIndentGuidesStroke = registerColor('tree.indentGuidesStroke', { dark: '#585858', light: '#a9a9a9', hcDark: '#a9a9a9', hcLight: '#a5a5a5' }, nls.localize('treeIndentGuidesStroke', \"Tree stroke color for the indentation guides.\"));\nexport const treeInactiveIndentGuidesStroke = registerColor('tree.inactiveIndentGuidesStroke', { dark: transparent(treeIndentGuidesStroke, 0.4), light: transparent(treeIndentGuidesStroke, 0.4), hcDark: transparent(treeIndentGuidesStroke, 0.4), hcLight: transparent(treeIndentGuidesStroke, 0.4) }, nls.localize('treeInactiveIndentGuidesStroke', \"Tree stroke color for the indentation guides that are not active.\"));\nexport const tableColumnsBorder = registerColor('tree.tableColumnsBorder', { dark: '#CCCCCC20', light: '#61616120', hcDark: null, hcLight: null }, nls.localize('tableColumnsBorder', \"Table border color between columns.\"));\nexport const tableOddRowsBackgroundColor = registerColor('tree.tableOddRowsBackground', { dark: transparent(foreground, 0.04), light: transparent(foreground, 0.04), hcDark: null, hcLight: null }, nls.localize('tableOddRowsBackgroundColor', \"Background color for odd table rows.\"));\nexport const listDeemphasizedForeground = registerColor('list.deemphasizedForeground', { dark: '#8C8C8C', light: '#8E8E90', hcDark: '#A7A8A9', hcLight: '#666666' }, nls.localize('listDeemphasizedForeground', \"List/Tree foreground color for items that are deemphasized. \"));\n/**\n * Checkboxes\n */\nexport const checkboxBackground = registerColor('checkbox.background', { dark: selectBackground, light: selectBackground, hcDark: selectBackground, hcLight: selectBackground }, nls.localize('checkbox.background', \"Background color of checkbox widget.\"));\nexport const checkboxSelectBackground = registerColor('checkbox.selectBackground', { dark: editorWidgetBackground, light: editorWidgetBackground, hcDark: editorWidgetBackground, hcLight: editorWidgetBackground }, nls.localize('checkbox.select.background', \"Background color of checkbox widget when the element it's in is selected.\"));\nexport const checkboxForeground = registerColor('checkbox.foreground', { dark: selectForeground, light: selectForeground, hcDark: selectForeground, hcLight: selectForeground }, nls.localize('checkbox.foreground', \"Foreground color of checkbox widget.\"));\nexport const checkboxBorder = registerColor('checkbox.border', { dark: selectBorder, light: selectBorder, hcDark: selectBorder, hcLight: selectBorder }, nls.localize('checkbox.border', \"Border color of checkbox widget.\"));\nexport const checkboxSelectBorder = registerColor('checkbox.selectBorder', { dark: iconForeground, light: iconForeground, hcDark: iconForeground, hcLight: iconForeground }, nls.localize('checkbox.select.border', \"Border color of checkbox widget when the element it's in is selected.\"));\n/**\n * Quick pick widget (dependent on List and tree colors)\n */\nexport const _deprecatedQuickInputListFocusBackground = registerColor('quickInput.list.focusBackground', { dark: null, light: null, hcDark: null, hcLight: null }, '', undefined, nls.localize('quickInput.list.focusBackground deprecation', \"Please use quickInputList.focusBackground instead\"));\nexport const quickInputListFocusForeground = registerColor('quickInputList.focusForeground', { dark: listActiveSelectionForeground, light: listActiveSelectionForeground, hcDark: listActiveSelectionForeground, hcLight: listActiveSelectionForeground }, nls.localize('quickInput.listFocusForeground', \"Quick picker foreground color for the focused item.\"));\nexport const quickInputListFocusIconForeground = registerColor('quickInputList.focusIconForeground', { dark: listActiveSelectionIconForeground, light: listActiveSelectionIconForeground, hcDark: listActiveSelectionIconForeground, hcLight: listActiveSelectionIconForeground }, nls.localize('quickInput.listFocusIconForeground', \"Quick picker icon foreground color for the focused item.\"));\nexport const quickInputListFocusBackground = registerColor('quickInputList.focusBackground', { dark: oneOf(_deprecatedQuickInputListFocusBackground, listActiveSelectionBackground), light: oneOf(_deprecatedQuickInputListFocusBackground, listActiveSelectionBackground), hcDark: null, hcLight: null }, nls.localize('quickInput.listFocusBackground', \"Quick picker background color for the focused item.\"));\n/**\n * Menu colors\n */\nexport const menuBorder = registerColor('menu.border', { dark: null, light: null, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('menuBorder', \"Border color of menus.\"));\nexport const menuForeground = registerColor('menu.foreground', { dark: selectForeground, light: selectForeground, hcDark: selectForeground, hcLight: selectForeground }, nls.localize('menuForeground', \"Foreground color of menu items.\"));\nexport const menuBackground = registerColor('menu.background', { dark: selectBackground, light: selectBackground, hcDark: selectBackground, hcLight: selectBackground }, nls.localize('menuBackground', \"Background color of menu items.\"));\nexport const menuSelectionForeground = registerColor('menu.selectionForeground', { dark: listActiveSelectionForeground, light: listActiveSelectionForeground, hcDark: listActiveSelectionForeground, hcLight: listActiveSelectionForeground }, nls.localize('menuSelectionForeground', \"Foreground color of the selected menu item in menus.\"));\nexport const menuSelectionBackground = registerColor('menu.selectionBackground', { dark: listActiveSelectionBackground, light: listActiveSelectionBackground, hcDark: listActiveSelectionBackground, hcLight: listActiveSelectionBackground }, nls.localize('menuSelectionBackground', \"Background color of the selected menu item in menus.\"));\nexport const menuSelectionBorder = registerColor('menu.selectionBorder', { dark: null, light: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize('menuSelectionBorder', \"Border color of the selected menu item in menus.\"));\nexport const menuSeparatorBackground = registerColor('menu.separatorBackground', { dark: '#606060', light: '#D4D4D4', hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('menuSeparatorBackground', \"Color of a separator menu item in menus.\"));\n/**\n * Toolbar colors\n */\nexport const toolbarHoverBackground = registerColor('toolbar.hoverBackground', { dark: '#5a5d5e50', light: '#b8b8b850', hcDark: null, hcLight: null }, nls.localize('toolbarHoverBackground', \"Toolbar background when hovering over actions using the mouse\"));\nexport const toolbarHoverOutline = registerColor('toolbar.hoverOutline', { dark: null, light: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize('toolbarHoverOutline', \"Toolbar outline when hovering over actions using the mouse\"));\nexport const toolbarActiveBackground = registerColor('toolbar.activeBackground', { dark: lighten(toolbarHoverBackground, 0.1), light: darken(toolbarHoverBackground, 0.1), hcDark: null, hcLight: null }, nls.localize('toolbarActiveBackground', \"Toolbar background when holding the mouse over actions\"));\n/**\n * Snippet placeholder colors\n */\nexport const snippetTabstopHighlightBackground = registerColor('editor.snippetTabstopHighlightBackground', { dark: new Color(new RGBA(124, 124, 124, 0.3)), light: new Color(new RGBA(10, 50, 100, 0.2)), hcDark: new Color(new RGBA(124, 124, 124, 0.3)), hcLight: new Color(new RGBA(10, 50, 100, 0.2)) }, nls.localize('snippetTabstopHighlightBackground', \"Highlight background color of a snippet tabstop.\"));\nexport const snippetTabstopHighlightBorder = registerColor('editor.snippetTabstopHighlightBorder', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('snippetTabstopHighlightBorder', \"Highlight border color of a snippet tabstop.\"));\nexport const snippetFinalTabstopHighlightBackground = registerColor('editor.snippetFinalTabstopHighlightBackground', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('snippetFinalTabstopHighlightBackground', \"Highlight background color of the final tabstop of a snippet.\"));\nexport const snippetFinalTabstopHighlightBorder = registerColor('editor.snippetFinalTabstopHighlightBorder', { dark: '#525252', light: new Color(new RGBA(10, 50, 100, 0.5)), hcDark: '#525252', hcLight: '#292929' }, nls.localize('snippetFinalTabstopHighlightBorder', \"Highlight border color of the final tabstop of a snippet.\"));\n/**\n * Breadcrumb colors\n */\nexport const breadcrumbsForeground = registerColor('breadcrumb.foreground', { light: transparent(foreground, 0.8), dark: transparent(foreground, 0.8), hcDark: transparent(foreground, 0.8), hcLight: transparent(foreground, 0.8) }, nls.localize('breadcrumbsFocusForeground', \"Color of focused breadcrumb items.\"));\nexport const breadcrumbsBackground = registerColor('breadcrumb.background', { light: editorBackground, dark: editorBackground, hcDark: editorBackground, hcLight: editorBackground }, nls.localize('breadcrumbsBackground', \"Background color of breadcrumb items.\"));\nexport const breadcrumbsFocusForeground = registerColor('breadcrumb.focusForeground', { light: darken(foreground, 0.2), dark: lighten(foreground, 0.1), hcDark: lighten(foreground, 0.1), hcLight: lighten(foreground, 0.1) }, nls.localize('breadcrumbsFocusForeground', \"Color of focused breadcrumb items.\"));\nexport const breadcrumbsActiveSelectionForeground = registerColor('breadcrumb.activeSelectionForeground', { light: darken(foreground, 0.2), dark: lighten(foreground, 0.1), hcDark: lighten(foreground, 0.1), hcLight: lighten(foreground, 0.1) }, nls.localize('breadcrumbsSelectedForeground', \"Color of selected breadcrumb items.\"));\nexport const breadcrumbsPickerBackground = registerColor('breadcrumbPicker.background', { light: editorWidgetBackground, dark: editorWidgetBackground, hcDark: editorWidgetBackground, hcLight: editorWidgetBackground }, nls.localize('breadcrumbsSelectedBackground', \"Background color of breadcrumb item picker.\"));\n/**\n * Merge-conflict colors\n */\nconst headerTransparency = 0.5;\nconst currentBaseColor = Color.fromHex('#40C8AE').transparent(headerTransparency);\nconst incomingBaseColor = Color.fromHex('#40A6FF').transparent(headerTransparency);\nconst commonBaseColor = Color.fromHex('#606060').transparent(0.4);\nconst contentTransparency = 0.4;\nconst rulerTransparency = 1;\nexport const mergeCurrentHeaderBackground = registerColor('merge.currentHeaderBackground', { dark: currentBaseColor, light: currentBaseColor, hcDark: null, hcLight: null }, nls.localize('mergeCurrentHeaderBackground', 'Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.'), true);\nexport const mergeCurrentContentBackground = registerColor('merge.currentContentBackground', { dark: transparent(mergeCurrentHeaderBackground, contentTransparency), light: transparent(mergeCurrentHeaderBackground, contentTransparency), hcDark: transparent(mergeCurrentHeaderBackground, contentTransparency), hcLight: transparent(mergeCurrentHeaderBackground, contentTransparency) }, nls.localize('mergeCurrentContentBackground', 'Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.'), true);\nexport const mergeIncomingHeaderBackground = registerColor('merge.incomingHeaderBackground', { dark: incomingBaseColor, light: incomingBaseColor, hcDark: null, hcLight: null }, nls.localize('mergeIncomingHeaderBackground', 'Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.'), true);\nexport const mergeIncomingContentBackground = registerColor('merge.incomingContentBackground', { dark: transparent(mergeIncomingHeaderBackground, contentTransparency), light: transparent(mergeIncomingHeaderBackground, contentTransparency), hcDark: transparent(mergeIncomingHeaderBackground, contentTransparency), hcLight: transparent(mergeIncomingHeaderBackground, contentTransparency) }, nls.localize('mergeIncomingContentBackground', 'Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.'), true);\nexport const mergeCommonHeaderBackground = registerColor('merge.commonHeaderBackground', { dark: commonBaseColor, light: commonBaseColor, hcDark: null, hcLight: null }, nls.localize('mergeCommonHeaderBackground', 'Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.'), true);\nexport const mergeCommonContentBackground = registerColor('merge.commonContentBackground', { dark: transparent(mergeCommonHeaderBackground, contentTransparency), light: transparent(mergeCommonHeaderBackground, contentTransparency), hcDark: transparent(mergeCommonHeaderBackground, contentTransparency), hcLight: transparent(mergeCommonHeaderBackground, contentTransparency) }, nls.localize('mergeCommonContentBackground', 'Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.'), true);\nexport const mergeBorder = registerColor('merge.border', { dark: null, light: null, hcDark: '#C3DF6F', hcLight: '#007ACC' }, nls.localize('mergeBorder', 'Border color on headers and the splitter in inline merge-conflicts.'));\nexport const overviewRulerCurrentContentForeground = registerColor('editorOverviewRuler.currentContentForeground', { dark: transparent(mergeCurrentHeaderBackground, rulerTransparency), light: transparent(mergeCurrentHeaderBackground, rulerTransparency), hcDark: mergeBorder, hcLight: mergeBorder }, nls.localize('overviewRulerCurrentContentForeground', 'Current overview ruler foreground for inline merge-conflicts.'));\nexport const overviewRulerIncomingContentForeground = registerColor('editorOverviewRuler.incomingContentForeground', { dark: transparent(mergeIncomingHeaderBackground, rulerTransparency), light: transparent(mergeIncomingHeaderBackground, rulerTransparency), hcDark: mergeBorder, hcLight: mergeBorder }, nls.localize('overviewRulerIncomingContentForeground', 'Incoming overview ruler foreground for inline merge-conflicts.'));\nexport const overviewRulerCommonContentForeground = registerColor('editorOverviewRuler.commonContentForeground', { dark: transparent(mergeCommonHeaderBackground, rulerTransparency), light: transparent(mergeCommonHeaderBackground, rulerTransparency), hcDark: mergeBorder, hcLight: mergeBorder }, nls.localize('overviewRulerCommonContentForeground', 'Common ancestor overview ruler foreground for inline merge-conflicts.'));\nexport const overviewRulerFindMatchForeground = registerColor('editorOverviewRuler.findMatchForeground', { dark: '#d186167e', light: '#d186167e', hcDark: '#AB5A00', hcLight: '' }, nls.localize('overviewRulerFindMatchForeground', 'Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations.'), true);\nexport const overviewRulerSelectionHighlightForeground = registerColor('editorOverviewRuler.selectionHighlightForeground', { dark: '#A0A0A0CC', light: '#A0A0A0CC', hcDark: '#A0A0A0CC', hcLight: '#A0A0A0CC' }, nls.localize('overviewRulerSelectionHighlightForeground', 'Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations.'), true);\nexport const minimapFindMatch = registerColor('minimap.findMatchHighlight', { light: '#d18616', dark: '#d18616', hcDark: '#AB5A00', hcLight: '#0F4A85' }, nls.localize('minimapFindMatchHighlight', 'Minimap marker color for find matches.'), true);\nexport const minimapSelectionOccurrenceHighlight = registerColor('minimap.selectionOccurrenceHighlight', { light: '#c9c9c9', dark: '#676767', hcDark: '#ffffff', hcLight: '#0F4A85' }, nls.localize('minimapSelectionOccurrenceHighlight', 'Minimap marker color for repeating editor selections.'), true);\nexport const minimapSelection = registerColor('minimap.selectionHighlight', { light: '#ADD6FF', dark: '#264F78', hcDark: '#ffffff', hcLight: '#0F4A85' }, nls.localize('minimapSelectionHighlight', 'Minimap marker color for the editor selection.'), true);\nexport const minimapInfo = registerColor('minimap.infoHighlight', { dark: editorInfoForeground, light: editorInfoForeground, hcDark: editorInfoBorder, hcLight: editorInfoBorder }, nls.localize('minimapInfo', 'Minimap marker color for infos.'));\nexport const minimapWarning = registerColor('minimap.warningHighlight', { dark: editorWarningForeground, light: editorWarningForeground, hcDark: editorWarningBorder, hcLight: editorWarningBorder }, nls.localize('overviewRuleWarning', 'Minimap marker color for warnings.'));\nexport const minimapError = registerColor('minimap.errorHighlight', { dark: new Color(new RGBA(255, 18, 18, 0.7)), light: new Color(new RGBA(255, 18, 18, 0.7)), hcDark: new Color(new RGBA(255, 50, 50, 1)), hcLight: '#B5200D' }, nls.localize('minimapError', 'Minimap marker color for errors.'));\nexport const minimapBackground = registerColor('minimap.background', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('minimapBackground', \"Minimap background color.\"));\nexport const minimapForegroundOpacity = registerColor('minimap.foregroundOpacity', { dark: Color.fromHex('#000f'), light: Color.fromHex('#000f'), hcDark: Color.fromHex('#000f'), hcLight: Color.fromHex('#000f') }, nls.localize('minimapForegroundOpacity', 'Opacity of foreground elements rendered in the minimap. For example, \"#000000c0\" will render the elements with 75% opacity.'));\nexport const minimapSliderBackground = registerColor('minimapSlider.background', { light: transparent(scrollbarSliderBackground, 0.5), dark: transparent(scrollbarSliderBackground, 0.5), hcDark: transparent(scrollbarSliderBackground, 0.5), hcLight: transparent(scrollbarSliderBackground, 0.5) }, nls.localize('minimapSliderBackground', \"Minimap slider background color.\"));\nexport const minimapSliderHoverBackground = registerColor('minimapSlider.hoverBackground', { light: transparent(scrollbarSliderHoverBackground, 0.5), dark: transparent(scrollbarSliderHoverBackground, 0.5), hcDark: transparent(scrollbarSliderHoverBackground, 0.5), hcLight: transparent(scrollbarSliderHoverBackground, 0.5) }, nls.localize('minimapSliderHoverBackground', \"Minimap slider background color when hovering.\"));\nexport const minimapSliderActiveBackground = registerColor('minimapSlider.activeBackground', { light: transparent(scrollbarSliderActiveBackground, 0.5), dark: transparent(scrollbarSliderActiveBackground, 0.5), hcDark: transparent(scrollbarSliderActiveBackground, 0.5), hcLight: transparent(scrollbarSliderActiveBackground, 0.5) }, nls.localize('minimapSliderActiveBackground', \"Minimap slider background color when clicked on.\"));\nexport const problemsErrorIconForeground = registerColor('problemsErrorIcon.foreground', { dark: editorErrorForeground, light: editorErrorForeground, hcDark: editorErrorForeground, hcLight: editorErrorForeground }, nls.localize('problemsErrorIconForeground', \"The color used for the problems error icon.\"));\nexport const problemsWarningIconForeground = registerColor('problemsWarningIcon.foreground', { dark: editorWarningForeground, light: editorWarningForeground, hcDark: editorWarningForeground, hcLight: editorWarningForeground }, nls.localize('problemsWarningIconForeground', \"The color used for the problems warning icon.\"));\nexport const problemsInfoIconForeground = registerColor('problemsInfoIcon.foreground', { dark: editorInfoForeground, light: editorInfoForeground, hcDark: editorInfoForeground, hcLight: editorInfoForeground }, nls.localize('problemsInfoIconForeground', \"The color used for the problems info icon.\"));\n/**\n * Chart colors\n */\nexport const chartsForeground = registerColor('charts.foreground', { dark: foreground, light: foreground, hcDark: foreground, hcLight: foreground }, nls.localize('chartsForeground', \"The foreground color used in charts.\"));\nexport const chartsLines = registerColor('charts.lines', { dark: transparent(foreground, .5), light: transparent(foreground, .5), hcDark: transparent(foreground, .5), hcLight: transparent(foreground, .5) }, nls.localize('chartsLines', \"The color used for horizontal lines in charts.\"));\nexport const chartsRed = registerColor('charts.red', { dark: editorErrorForeground, light: editorErrorForeground, hcDark: editorErrorForeground, hcLight: editorErrorForeground }, nls.localize('chartsRed', \"The red color used in chart visualizations.\"));\nexport const chartsBlue = registerColor('charts.blue', { dark: editorInfoForeground, light: editorInfoForeground, hcDark: editorInfoForeground, hcLight: editorInfoForeground }, nls.localize('chartsBlue', \"The blue color used in chart visualizations.\"));\nexport const chartsYellow = registerColor('charts.yellow', { dark: editorWarningForeground, light: editorWarningForeground, hcDark: editorWarningForeground, hcLight: editorWarningForeground }, nls.localize('chartsYellow', \"The yellow color used in chart visualizations.\"));\nexport const chartsOrange = registerColor('charts.orange', { dark: minimapFindMatch, light: minimapFindMatch, hcDark: minimapFindMatch, hcLight: minimapFindMatch }, nls.localize('chartsOrange', \"The orange color used in chart visualizations.\"));\nexport const chartsGreen = registerColor('charts.green', { dark: '#89D185', light: '#388A34', hcDark: '#89D185', hcLight: '#374e06' }, nls.localize('chartsGreen', \"The green color used in chart visualizations.\"));\nexport const chartsPurple = registerColor('charts.purple', { dark: '#B180D7', light: '#652D90', hcDark: '#B180D7', hcLight: '#652D90' }, nls.localize('chartsPurple', \"The purple color used in chart visualizations.\"));\n// ----- color functions\nexport function executeTransform(transform, theme) {\n var _a, _b, _c, _d;\n switch (transform.op) {\n case 0 /* ColorTransformType.Darken */:\n return (_a = resolveColorValue(transform.value, theme)) === null || _a === void 0 ? void 0 : _a.darken(transform.factor);\n case 1 /* ColorTransformType.Lighten */:\n return (_b = resolveColorValue(transform.value, theme)) === null || _b === void 0 ? void 0 : _b.lighten(transform.factor);\n case 2 /* ColorTransformType.Transparent */:\n return (_c = resolveColorValue(transform.value, theme)) === null || _c === void 0 ? void 0 : _c.transparent(transform.factor);\n case 3 /* ColorTransformType.Opaque */: {\n const backgroundColor = resolveColorValue(transform.background, theme);\n if (!backgroundColor) {\n return resolveColorValue(transform.value, theme);\n }\n return (_d = resolveColorValue(transform.value, theme)) === null || _d === void 0 ? void 0 : _d.makeOpaque(backgroundColor);\n }\n case 4 /* ColorTransformType.OneOf */:\n for (const candidate of transform.values) {\n const color = resolveColorValue(candidate, theme);\n if (color) {\n return color;\n }\n }\n return undefined;\n case 6 /* ColorTransformType.IfDefinedThenElse */:\n return resolveColorValue(theme.defines(transform.if) ? transform.then : transform.else, theme);\n case 5 /* ColorTransformType.LessProminent */: {\n const from = resolveColorValue(transform.value, theme);\n if (!from) {\n return undefined;\n }\n const backgroundColor = resolveColorValue(transform.background, theme);\n if (!backgroundColor) {\n return from.transparent(transform.factor * transform.transparency);\n }\n return from.isDarkerThan(backgroundColor)\n ? Color.getLighterColor(from, backgroundColor, transform.factor).transparent(transform.transparency)\n : Color.getDarkerColor(from, backgroundColor, transform.factor).transparent(transform.transparency);\n }\n default:\n throw assertNever(transform);\n }\n}\nexport function darken(colorValue, factor) {\n return { op: 0 /* ColorTransformType.Darken */, value: colorValue, factor };\n}\nexport function lighten(colorValue, factor) {\n return { op: 1 /* ColorTransformType.Lighten */, value: colorValue, factor };\n}\nexport function transparent(colorValue, factor) {\n return { op: 2 /* ColorTransformType.Transparent */, value: colorValue, factor };\n}\nexport function oneOf(...colorValues) {\n return { op: 4 /* ColorTransformType.OneOf */, values: colorValues };\n}\nexport function ifDefinedThenElse(ifArg, thenArg, elseArg) {\n return { op: 6 /* ColorTransformType.IfDefinedThenElse */, if: ifArg, then: thenArg, else: elseArg };\n}\nfunction lessProminent(colorValue, backgroundColorValue, factor, transparency) {\n return { op: 5 /* ColorTransformType.LessProminent */, value: colorValue, background: backgroundColorValue, factor, transparency };\n}\n// ----- implementation\n/**\n * @param colorValue Resolve a color value in the context of a theme\n */\nexport function resolveColorValue(colorValue, theme) {\n if (colorValue === null) {\n return undefined;\n }\n else if (typeof colorValue === 'string') {\n if (colorValue[0] === '#') {\n return Color.fromHex(colorValue);\n }\n return theme.getColor(colorValue);\n }\n else if (colorValue instanceof Color) {\n return colorValue;\n }\n else if (typeof colorValue === 'object') {\n return executeTransform(colorValue, theme);\n }\n return undefined;\n}\nexport const workbenchColorsSchemaId = 'vscode://schemas/workbench-colors';\nconst schemaRegistry = platform.Registry.as(JSONExtensions.JSONContribution);\nschemaRegistry.registerSchema(workbenchColorsSchemaId, colorRegistry.getColorSchema());\nconst delayer = new RunOnceScheduler(() => schemaRegistry.notifySchemaChanged(workbenchColorsSchemaId), 200);\ncolorRegistry.onDidChangeSchema(() => {\n if (!delayer.isScheduled()) {\n delayer.schedule();\n }\n});\n// setTimeout(_ => console.log(colorRegistry.toString()), 5000);\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as dom from '../../base/browser/dom.js';\nimport { GlobalPointerMoveMonitor } from '../../base/browser/globalPointerMoveMonitor.js';\nimport { StandardMouseEvent } from '../../base/browser/mouseEvent.js';\nimport { RunOnceScheduler } from '../../base/common/async.js';\nimport { Disposable, DisposableStore } from '../../base/common/lifecycle.js';\nimport { asCssVariable } from '../../platform/theme/common/colorRegistry.js';\n/**\n * Coordinates relative to the whole document (e.g. mouse event's pageX and pageY)\n */\nexport class PageCoordinates {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n this._pageCoordinatesBrand = undefined;\n }\n toClientCoordinates(targetWindow) {\n return new ClientCoordinates(this.x - targetWindow.scrollX, this.y - targetWindow.scrollY);\n }\n}\n/**\n * Coordinates within the application's client area (i.e. origin is document's scroll position).\n *\n * For example, clicking in the top-left corner of the client area will\n * always result in a mouse event with a client.x value of 0, regardless\n * of whether the page is scrolled horizontally.\n */\nexport class ClientCoordinates {\n constructor(clientX, clientY) {\n this.clientX = clientX;\n this.clientY = clientY;\n this._clientCoordinatesBrand = undefined;\n }\n toPageCoordinates(targetWindow) {\n return new PageCoordinates(this.clientX + targetWindow.scrollX, this.clientY + targetWindow.scrollY);\n }\n}\n/**\n * The position of the editor in the page.\n */\nexport class EditorPagePosition {\n constructor(x, y, width, height) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this._editorPagePositionBrand = undefined;\n }\n}\n/**\n * Coordinates relative to the the (top;left) of the editor that can be used safely with other internal editor metrics.\n * **NOTE**: This position is obtained by taking page coordinates and transforming them relative to the\n * editor's (top;left) position in a way in which scale transformations are taken into account.\n * **NOTE**: These coordinates could be negative if the mouse position is outside the editor.\n */\nexport class CoordinatesRelativeToEditor {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n this._positionRelativeToEditorBrand = undefined;\n }\n}\nexport function createEditorPagePosition(editorViewDomNode) {\n const editorPos = dom.getDomNodePagePosition(editorViewDomNode);\n return new EditorPagePosition(editorPos.left, editorPos.top, editorPos.width, editorPos.height);\n}\nexport function createCoordinatesRelativeToEditor(editorViewDomNode, editorPagePosition, pos) {\n // The editor's page position is read from the DOM using getBoundingClientRect().\n //\n // getBoundingClientRect() returns the actual dimensions, while offsetWidth and offsetHeight\n // reflect the unscaled size. We can use this difference to detect a transform:scale()\n // and we will apply the transformation in inverse to get mouse coordinates that make sense inside the editor.\n //\n // This could be expanded to cover rotation as well maybe by walking the DOM up from `editorViewDomNode`\n // and computing the effective transformation matrix using getComputedStyle(element).transform.\n //\n const scaleX = editorPagePosition.width / editorViewDomNode.offsetWidth;\n const scaleY = editorPagePosition.height / editorViewDomNode.offsetHeight;\n // Adjust mouse offsets if editor appears to be scaled via transforms\n const relativeX = (pos.x - editorPagePosition.x) / scaleX;\n const relativeY = (pos.y - editorPagePosition.y) / scaleY;\n return new CoordinatesRelativeToEditor(relativeX, relativeY);\n}\nexport class EditorMouseEvent extends StandardMouseEvent {\n constructor(e, isFromPointerCapture, editorViewDomNode) {\n super(dom.getWindow(editorViewDomNode), e);\n this._editorMouseEventBrand = undefined;\n this.isFromPointerCapture = isFromPointerCapture;\n this.pos = new PageCoordinates(this.posx, this.posy);\n this.editorPos = createEditorPagePosition(editorViewDomNode);\n this.relativePos = createCoordinatesRelativeToEditor(editorViewDomNode, this.editorPos, this.pos);\n }\n}\nexport class EditorMouseEventFactory {\n constructor(editorViewDomNode) {\n this._editorViewDomNode = editorViewDomNode;\n }\n _create(e) {\n return new EditorMouseEvent(e, false, this._editorViewDomNode);\n }\n onContextMenu(target, callback) {\n return dom.addDisposableListener(target, 'contextmenu', (e) => {\n callback(this._create(e));\n });\n }\n onMouseUp(target, callback) {\n return dom.addDisposableListener(target, 'mouseup', (e) => {\n callback(this._create(e));\n });\n }\n onMouseDown(target, callback) {\n return dom.addDisposableListener(target, dom.EventType.MOUSE_DOWN, (e) => {\n callback(this._create(e));\n });\n }\n onPointerDown(target, callback) {\n return dom.addDisposableListener(target, dom.EventType.POINTER_DOWN, (e) => {\n callback(this._create(e), e.pointerId);\n });\n }\n onMouseLeave(target, callback) {\n return dom.addDisposableListener(target, dom.EventType.MOUSE_LEAVE, (e) => {\n callback(this._create(e));\n });\n }\n onMouseMove(target, callback) {\n return dom.addDisposableListener(target, 'mousemove', (e) => callback(this._create(e)));\n }\n}\nexport class EditorPointerEventFactory {\n constructor(editorViewDomNode) {\n this._editorViewDomNode = editorViewDomNode;\n }\n _create(e) {\n return new EditorMouseEvent(e, false, this._editorViewDomNode);\n }\n onPointerUp(target, callback) {\n return dom.addDisposableListener(target, 'pointerup', (e) => {\n callback(this._create(e));\n });\n }\n onPointerDown(target, callback) {\n return dom.addDisposableListener(target, dom.EventType.POINTER_DOWN, (e) => {\n callback(this._create(e), e.pointerId);\n });\n }\n onPointerLeave(target, callback) {\n return dom.addDisposableListener(target, dom.EventType.POINTER_LEAVE, (e) => {\n callback(this._create(e));\n });\n }\n onPointerMove(target, callback) {\n return dom.addDisposableListener(target, 'pointermove', (e) => callback(this._create(e)));\n }\n}\nexport class GlobalEditorPointerMoveMonitor extends Disposable {\n constructor(editorViewDomNode) {\n super();\n this._editorViewDomNode = editorViewDomNode;\n this._globalPointerMoveMonitor = this._register(new GlobalPointerMoveMonitor());\n this._keydownListener = null;\n }\n startMonitoring(initialElement, pointerId, initialButtons, pointerMoveCallback, onStopCallback) {\n // Add a <> keydown event listener that will cancel the monitoring\n // if something other than a modifier key is pressed\n this._keydownListener = dom.addStandardDisposableListener(initialElement.ownerDocument, 'keydown', (e) => {\n const chord = e.toKeyCodeChord();\n if (chord.isModifierKey()) {\n // Allow modifier keys\n return;\n }\n this._globalPointerMoveMonitor.stopMonitoring(true, e.browserEvent);\n }, true);\n this._globalPointerMoveMonitor.startMonitoring(initialElement, pointerId, initialButtons, (e) => {\n pointerMoveCallback(new EditorMouseEvent(e, true, this._editorViewDomNode));\n }, (e) => {\n this._keydownListener.dispose();\n onStopCallback(e);\n });\n }\n stopMonitoring() {\n this._globalPointerMoveMonitor.stopMonitoring(true);\n }\n}\n/**\n * A helper to create dynamic css rules, bound to a class name.\n * Rules are reused.\n * Reference counting and delayed garbage collection ensure that no rules leak.\n*/\nexport class DynamicCssRules {\n constructor(_editor) {\n this._editor = _editor;\n this._instanceId = ++DynamicCssRules._idPool;\n this._counter = 0;\n this._rules = new Map();\n // We delay garbage collection so that hanging rules can be reused.\n this._garbageCollectionScheduler = new RunOnceScheduler(() => this.garbageCollect(), 1000);\n }\n createClassNameRef(options) {\n const rule = this.getOrCreateRule(options);\n rule.increaseRefCount();\n return {\n className: rule.className,\n dispose: () => {\n rule.decreaseRefCount();\n this._garbageCollectionScheduler.schedule();\n }\n };\n }\n getOrCreateRule(properties) {\n const key = this.computeUniqueKey(properties);\n let existingRule = this._rules.get(key);\n if (!existingRule) {\n const counter = this._counter++;\n existingRule = new RefCountedCssRule(key, `dyn-rule-${this._instanceId}-${counter}`, dom.isInShadowDOM(this._editor.getContainerDomNode())\n ? this._editor.getContainerDomNode()\n : undefined, properties);\n this._rules.set(key, existingRule);\n }\n return existingRule;\n }\n computeUniqueKey(properties) {\n return JSON.stringify(properties);\n }\n garbageCollect() {\n for (const rule of this._rules.values()) {\n if (!rule.hasReferences()) {\n this._rules.delete(rule.key);\n rule.dispose();\n }\n }\n }\n}\nDynamicCssRules._idPool = 0;\nclass RefCountedCssRule {\n constructor(key, className, _containerElement, properties) {\n this.key = key;\n this.className = className;\n this.properties = properties;\n this._referenceCount = 0;\n this._styleElementDisposables = new DisposableStore();\n this._styleElement = dom.createStyleSheet(_containerElement, undefined, this._styleElementDisposables);\n this._styleElement.textContent = this.getCssText(this.className, this.properties);\n }\n getCssText(className, properties) {\n let str = `.${className} {`;\n for (const prop in properties) {\n const value = properties[prop];\n let cssValue;\n if (typeof value === 'object') {\n cssValue = asCssVariable(value.id);\n }\n else {\n cssValue = value;\n }\n const cssPropName = camelToDashes(prop);\n str += `\\n\\t${cssPropName}: ${cssValue};`;\n }\n str += `\\n}`;\n return str;\n }\n dispose() {\n this._styleElementDisposables.dispose();\n this._styleElement = undefined;\n }\n increaseRefCount() {\n this._referenceCount++;\n }\n decreaseRefCount() {\n this._referenceCount--;\n }\n hasReferences() {\n return this._referenceCount > 0;\n }\n}\nfunction camelToDashes(str) {\n return str.replace(/(^[A-Z])/, ([first]) => first.toLowerCase())\n .replace(/([A-Z])/g, ([letter]) => `-${letter.toLowerCase()}`);\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Disposable } from '../../base/common/lifecycle.js';\nexport class ViewEventHandler extends Disposable {\n constructor() {\n super();\n this._shouldRender = true;\n }\n shouldRender() {\n return this._shouldRender;\n }\n forceShouldRender() {\n this._shouldRender = true;\n }\n setShouldRender() {\n this._shouldRender = true;\n }\n onDidRender() {\n this._shouldRender = false;\n }\n // --- begin event handlers\n onCompositionStart(e) {\n return false;\n }\n onCompositionEnd(e) {\n return false;\n }\n onConfigurationChanged(e) {\n return false;\n }\n onCursorStateChanged(e) {\n return false;\n }\n onDecorationsChanged(e) {\n return false;\n }\n onFlushed(e) {\n return false;\n }\n onFocusChanged(e) {\n return false;\n }\n onLanguageConfigurationChanged(e) {\n return false;\n }\n onLineMappingChanged(e) {\n return false;\n }\n onLinesChanged(e) {\n return false;\n }\n onLinesDeleted(e) {\n return false;\n }\n onLinesInserted(e) {\n return false;\n }\n onRevealRangeRequest(e) {\n return false;\n }\n onScrollChanged(e) {\n return false;\n }\n onThemeChanged(e) {\n return false;\n }\n onTokensChanged(e) {\n return false;\n }\n onTokensColorsChanged(e) {\n return false;\n }\n onZonesChanged(e) {\n return false;\n }\n // --- end event handlers\n handleEvents(events) {\n let shouldRender = false;\n for (let i = 0, len = events.length; i < len; i++) {\n const e = events[i];\n switch (e.type) {\n case 0 /* viewEvents.ViewEventType.ViewCompositionStart */:\n if (this.onCompositionStart(e)) {\n shouldRender = true;\n }\n break;\n case 1 /* viewEvents.ViewEventType.ViewCompositionEnd */:\n if (this.onCompositionEnd(e)) {\n shouldRender = true;\n }\n break;\n case 2 /* viewEvents.ViewEventType.ViewConfigurationChanged */:\n if (this.onConfigurationChanged(e)) {\n shouldRender = true;\n }\n break;\n case 3 /* viewEvents.ViewEventType.ViewCursorStateChanged */:\n if (this.onCursorStateChanged(e)) {\n shouldRender = true;\n }\n break;\n case 4 /* viewEvents.ViewEventType.ViewDecorationsChanged */:\n if (this.onDecorationsChanged(e)) {\n shouldRender = true;\n }\n break;\n case 5 /* viewEvents.ViewEventType.ViewFlushed */:\n if (this.onFlushed(e)) {\n shouldRender = true;\n }\n break;\n case 6 /* viewEvents.ViewEventType.ViewFocusChanged */:\n if (this.onFocusChanged(e)) {\n shouldRender = true;\n }\n break;\n case 7 /* viewEvents.ViewEventType.ViewLanguageConfigurationChanged */:\n if (this.onLanguageConfigurationChanged(e)) {\n shouldRender = true;\n }\n break;\n case 8 /* viewEvents.ViewEventType.ViewLineMappingChanged */:\n if (this.onLineMappingChanged(e)) {\n shouldRender = true;\n }\n break;\n case 9 /* viewEvents.ViewEventType.ViewLinesChanged */:\n if (this.onLinesChanged(e)) {\n shouldRender = true;\n }\n break;\n case 10 /* viewEvents.ViewEventType.ViewLinesDeleted */:\n if (this.onLinesDeleted(e)) {\n shouldRender = true;\n }\n break;\n case 11 /* viewEvents.ViewEventType.ViewLinesInserted */:\n if (this.onLinesInserted(e)) {\n shouldRender = true;\n }\n break;\n case 12 /* viewEvents.ViewEventType.ViewRevealRangeRequest */:\n if (this.onRevealRangeRequest(e)) {\n shouldRender = true;\n }\n break;\n case 13 /* viewEvents.ViewEventType.ViewScrollChanged */:\n if (this.onScrollChanged(e)) {\n shouldRender = true;\n }\n break;\n case 15 /* viewEvents.ViewEventType.ViewTokensChanged */:\n if (this.onTokensChanged(e)) {\n shouldRender = true;\n }\n break;\n case 14 /* viewEvents.ViewEventType.ViewThemeChanged */:\n if (this.onThemeChanged(e)) {\n shouldRender = true;\n }\n break;\n case 16 /* viewEvents.ViewEventType.ViewTokensColorsChanged */:\n if (this.onTokensColorsChanged(e)) {\n shouldRender = true;\n }\n break;\n case 17 /* viewEvents.ViewEventType.ViewZonesChanged */:\n if (this.onZonesChanged(e)) {\n shouldRender = true;\n }\n break;\n default:\n console.info('View received unknown event: ');\n console.info(e);\n }\n }\n if (shouldRender) {\n this._shouldRender = true;\n }\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { ViewEventHandler } from '../../common/viewEventHandler.js';\nexport class ViewPart extends ViewEventHandler {\n constructor(context) {\n super();\n this._context = context;\n this._context.addEventHandler(this);\n }\n dispose() {\n this._context.removeEventHandler(this);\n super.dispose();\n }\n}\nexport class PartFingerprints {\n static write(target, partId) {\n target.setAttribute('data-mprt', String(partId));\n }\n static read(target) {\n const r = target.getAttribute('data-mprt');\n if (r === null) {\n return 0 /* PartFingerprint.None */;\n }\n return parseInt(r, 10);\n }\n static collect(child, stopAt) {\n const result = [];\n let resultLen = 0;\n while (child && child !== child.ownerDocument.body) {\n if (child === stopAt) {\n break;\n }\n if (child.nodeType === child.ELEMENT_NODE) {\n result[resultLen++] = this.read(child);\n }\n child = child.parentElement;\n }\n const r = new Uint8Array(resultLen);\n for (let i = 0; i < resultLen; i++) {\n r[i] = result[resultLen - i - 1];\n }\n return r;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport class RestrictedRenderingContext {\n constructor(viewLayout, viewportData) {\n this._restrictedRenderingContextBrand = undefined;\n this._viewLayout = viewLayout;\n this.viewportData = viewportData;\n this.scrollWidth = this._viewLayout.getScrollWidth();\n this.scrollHeight = this._viewLayout.getScrollHeight();\n this.visibleRange = this.viewportData.visibleRange;\n this.bigNumbersDelta = this.viewportData.bigNumbersDelta;\n const vInfo = this._viewLayout.getCurrentViewport();\n this.scrollTop = vInfo.top;\n this.scrollLeft = vInfo.left;\n this.viewportWidth = vInfo.width;\n this.viewportHeight = vInfo.height;\n }\n getScrolledTopFromAbsoluteTop(absoluteTop) {\n return absoluteTop - this.scrollTop;\n }\n getVerticalOffsetForLineNumber(lineNumber, includeViewZones) {\n return this._viewLayout.getVerticalOffsetForLineNumber(lineNumber, includeViewZones);\n }\n getVerticalOffsetAfterLineNumber(lineNumber, includeViewZones) {\n return this._viewLayout.getVerticalOffsetAfterLineNumber(lineNumber, includeViewZones);\n }\n getDecorationsInViewport() {\n return this.viewportData.getDecorationsInViewport();\n }\n}\nexport class RenderingContext extends RestrictedRenderingContext {\n constructor(viewLayout, viewportData, viewLines) {\n super(viewLayout, viewportData);\n this._renderingContextBrand = undefined;\n this._viewLines = viewLines;\n }\n linesVisibleRangesForRange(range, includeNewLines) {\n return this._viewLines.linesVisibleRangesForRange(range, includeNewLines);\n }\n visibleRangeForPosition(position) {\n return this._viewLines.visibleRangeForPosition(position);\n }\n}\nexport class LineVisibleRanges {\n constructor(outsideRenderedLine, lineNumber, ranges, \n /**\n * Indicates if the requested range does not end in this line, but continues on the next line.\n */\n continuesOnNextLine) {\n this.outsideRenderedLine = outsideRenderedLine;\n this.lineNumber = lineNumber;\n this.ranges = ranges;\n this.continuesOnNextLine = continuesOnNextLine;\n }\n}\nexport class HorizontalRange {\n static from(ranges) {\n const result = new Array(ranges.length);\n for (let i = 0, len = ranges.length; i < len; i++) {\n const range = ranges[i];\n result[i] = new HorizontalRange(range.left, range.width);\n }\n return result;\n }\n constructor(left, width) {\n this._horizontalRangeBrand = undefined;\n this.left = Math.round(left);\n this.width = Math.round(width);\n }\n toString() {\n return `[${this.left},${this.width}]`;\n }\n}\nexport class FloatHorizontalRange {\n constructor(left, width) {\n this._floatHorizontalRangeBrand = undefined;\n this.left = left;\n this.width = width;\n }\n toString() {\n return `[${this.left},${this.width}]`;\n }\n static compare(a, b) {\n return a.left - b.left;\n }\n}\nexport class HorizontalPosition {\n constructor(outsideRenderedLine, left) {\n this.outsideRenderedLine = outsideRenderedLine;\n this.originalLeft = left;\n this.left = Math.round(this.originalLeft);\n }\n}\nexport class VisibleRanges {\n constructor(outsideRenderedLine, ranges) {\n this.outsideRenderedLine = outsideRenderedLine;\n this.ranges = ranges;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { FloatHorizontalRange } from '../../view/renderingContext.js';\nexport class RangeUtil {\n static _createRange() {\n if (!this._handyReadyRange) {\n this._handyReadyRange = document.createRange();\n }\n return this._handyReadyRange;\n }\n static _detachRange(range, endNode) {\n // Move range out of the span node, IE doesn't like having many ranges in\n // the same spot and will act badly for lines containing dashes ('-')\n range.selectNodeContents(endNode);\n }\n static _readClientRects(startElement, startOffset, endElement, endOffset, endNode) {\n const range = this._createRange();\n try {\n range.setStart(startElement, startOffset);\n range.setEnd(endElement, endOffset);\n return range.getClientRects();\n }\n catch (e) {\n // This is life ...\n return null;\n }\n finally {\n this._detachRange(range, endNode);\n }\n }\n static _mergeAdjacentRanges(ranges) {\n if (ranges.length === 1) {\n // There is nothing to merge\n return ranges;\n }\n ranges.sort(FloatHorizontalRange.compare);\n const result = [];\n let resultLen = 0;\n let prev = ranges[0];\n for (let i = 1, len = ranges.length; i < len; i++) {\n const range = ranges[i];\n if (prev.left + prev.width + 0.9 /* account for browser's rounding errors*/ >= range.left) {\n prev.width = Math.max(prev.width, range.left + range.width - prev.left);\n }\n else {\n result[resultLen++] = prev;\n prev = range;\n }\n }\n result[resultLen++] = prev;\n return result;\n }\n static _createHorizontalRangesFromClientRects(clientRects, clientRectDeltaLeft, clientRectScale) {\n if (!clientRects || clientRects.length === 0) {\n return null;\n }\n // We go through FloatHorizontalRange because it has been observed in bi-di text\n // that the clientRects are not coming in sorted from the browser\n const result = [];\n for (let i = 0, len = clientRects.length; i < len; i++) {\n const clientRect = clientRects[i];\n result[i] = new FloatHorizontalRange(Math.max(0, (clientRect.left - clientRectDeltaLeft) / clientRectScale), clientRect.width / clientRectScale);\n }\n return this._mergeAdjacentRanges(result);\n }\n static readHorizontalRanges(domNode, startChildIndex, startOffset, endChildIndex, endOffset, context) {\n // Panic check\n const min = 0;\n const max = domNode.children.length - 1;\n if (min > max) {\n return null;\n }\n startChildIndex = Math.min(max, Math.max(min, startChildIndex));\n endChildIndex = Math.min(max, Math.max(min, endChildIndex));\n if (startChildIndex === endChildIndex && startOffset === endOffset && startOffset === 0 && !domNode.children[startChildIndex].firstChild) {\n // We must find the position at the beginning of a \n // To cover cases of empty s, avoid using a range and use the 's bounding box\n const clientRects = domNode.children[startChildIndex].getClientRects();\n context.markDidDomLayout();\n return this._createHorizontalRangesFromClientRects(clientRects, context.clientRectDeltaLeft, context.clientRectScale);\n }\n // If crossing over to a span only to select offset 0, then use the previous span's maximum offset\n // Chrome is buggy and doesn't handle 0 offsets well sometimes.\n if (startChildIndex !== endChildIndex) {\n if (endChildIndex > 0 && endOffset === 0) {\n endChildIndex--;\n endOffset = 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */;\n }\n }\n let startElement = domNode.children[startChildIndex].firstChild;\n let endElement = domNode.children[endChildIndex].firstChild;\n if (!startElement || !endElement) {\n // When having an empty (without any text content), try to move to the previous \n if (!startElement && startOffset === 0 && startChildIndex > 0) {\n startElement = domNode.children[startChildIndex - 1].firstChild;\n startOffset = 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */;\n }\n if (!endElement && endOffset === 0 && endChildIndex > 0) {\n endElement = domNode.children[endChildIndex - 1].firstChild;\n endOffset = 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */;\n }\n }\n if (!startElement || !endElement) {\n return null;\n }\n startOffset = Math.min(startElement.textContent.length, Math.max(0, startOffset));\n endOffset = Math.min(endElement.textContent.length, Math.max(0, endOffset));\n const clientRects = this._readClientRects(startElement, startOffset, endElement, endOffset, context.endNode);\n context.markDidDomLayout();\n return this._createHorizontalRangesFromClientRects(clientRects, context.clientRectDeltaLeft, context.clientRectScale);\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/**\n * Color scheme used by the OS and by color themes.\n */\nexport var ColorScheme;\n(function (ColorScheme) {\n ColorScheme[\"DARK\"] = \"dark\";\n ColorScheme[\"LIGHT\"] = \"light\";\n ColorScheme[\"HIGH_CONTRAST_DARK\"] = \"hcDark\";\n ColorScheme[\"HIGH_CONTRAST_LIGHT\"] = \"hcLight\";\n})(ColorScheme || (ColorScheme = {}));\nexport function isHighContrast(scheme) {\n return scheme === ColorScheme.HIGH_CONTRAST_DARK || scheme === ColorScheme.HIGH_CONTRAST_LIGHT;\n}\nexport function isDark(scheme) {\n return scheme === ColorScheme.DARK || scheme === ColorScheme.HIGH_CONTRAST_DARK;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as browser from '../../../../base/browser/browser.js';\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode.js';\nimport * as platform from '../../../../base/common/platform.js';\nimport { RangeUtil } from './rangeUtil.js';\nimport { FloatHorizontalRange, VisibleRanges } from '../../view/renderingContext.js';\nimport { LineDecoration } from '../../../common/viewLayout/lineDecorations.js';\nimport { RenderLineInput, renderViewLine, LineRange, DomPosition } from '../../../common/viewLayout/viewLineRenderer.js';\nimport { isHighContrast } from '../../../../platform/theme/common/theme.js';\nimport { EditorFontLigatures } from '../../../common/config/editorOptions.js';\nconst canUseFastRenderedViewLine = (function () {\n if (platform.isNative) {\n // In VSCode we know very well when the zoom level changes\n return true;\n }\n if (platform.isLinux || browser.isFirefox || browser.isSafari) {\n // On Linux, it appears that zooming affects char widths (in pixels), which is unexpected.\n // --\n // Even though we read character widths correctly, having read them at a specific zoom level\n // does not mean they are the same at the current zoom level.\n // --\n // This could be improved if we ever figure out how to get an event when browsers zoom,\n // but until then we have to stick with reading client rects.\n // --\n // The same has been observed with Firefox on Windows7\n // --\n // The same has been oversved with Safari\n return false;\n }\n return true;\n})();\nlet monospaceAssumptionsAreValid = true;\nexport class ViewLineOptions {\n constructor(config, themeType) {\n this.themeType = themeType;\n const options = config.options;\n const fontInfo = options.get(50 /* EditorOption.fontInfo */);\n const experimentalWhitespaceRendering = options.get(38 /* EditorOption.experimentalWhitespaceRendering */);\n if (experimentalWhitespaceRendering === 'off') {\n this.renderWhitespace = options.get(98 /* EditorOption.renderWhitespace */);\n }\n else {\n // whitespace is rendered in a different layer\n this.renderWhitespace = 'none';\n }\n this.renderControlCharacters = options.get(93 /* EditorOption.renderControlCharacters */);\n this.spaceWidth = fontInfo.spaceWidth;\n this.middotWidth = fontInfo.middotWidth;\n this.wsmiddotWidth = fontInfo.wsmiddotWidth;\n this.useMonospaceOptimizations = (fontInfo.isMonospace\n && !options.get(33 /* EditorOption.disableMonospaceOptimizations */));\n this.canUseHalfwidthRightwardsArrow = fontInfo.canUseHalfwidthRightwardsArrow;\n this.lineHeight = options.get(66 /* EditorOption.lineHeight */);\n this.stopRenderingLineAfter = options.get(116 /* EditorOption.stopRenderingLineAfter */);\n this.fontLigatures = options.get(51 /* EditorOption.fontLigatures */);\n }\n equals(other) {\n return (this.themeType === other.themeType\n && this.renderWhitespace === other.renderWhitespace\n && this.renderControlCharacters === other.renderControlCharacters\n && this.spaceWidth === other.spaceWidth\n && this.middotWidth === other.middotWidth\n && this.wsmiddotWidth === other.wsmiddotWidth\n && this.useMonospaceOptimizations === other.useMonospaceOptimizations\n && this.canUseHalfwidthRightwardsArrow === other.canUseHalfwidthRightwardsArrow\n && this.lineHeight === other.lineHeight\n && this.stopRenderingLineAfter === other.stopRenderingLineAfter\n && this.fontLigatures === other.fontLigatures);\n }\n}\nexport class ViewLine {\n constructor(options) {\n this._options = options;\n this._isMaybeInvalid = true;\n this._renderedViewLine = null;\n }\n // --- begin IVisibleLineData\n getDomNode() {\n if (this._renderedViewLine && this._renderedViewLine.domNode) {\n return this._renderedViewLine.domNode.domNode;\n }\n return null;\n }\n setDomNode(domNode) {\n if (this._renderedViewLine) {\n this._renderedViewLine.domNode = createFastDomNode(domNode);\n }\n else {\n throw new Error('I have no rendered view line to set the dom node to...');\n }\n }\n onContentChanged() {\n this._isMaybeInvalid = true;\n }\n onTokensChanged() {\n this._isMaybeInvalid = true;\n }\n onDecorationsChanged() {\n this._isMaybeInvalid = true;\n }\n onOptionsChanged(newOptions) {\n this._isMaybeInvalid = true;\n this._options = newOptions;\n }\n onSelectionChanged() {\n if (isHighContrast(this._options.themeType) || this._options.renderWhitespace === 'selection') {\n this._isMaybeInvalid = true;\n return true;\n }\n return false;\n }\n renderLine(lineNumber, deltaTop, viewportData, sb) {\n if (this._isMaybeInvalid === false) {\n // it appears that nothing relevant has changed\n return false;\n }\n this._isMaybeInvalid = false;\n const lineData = viewportData.getViewLineRenderingData(lineNumber);\n const options = this._options;\n const actualInlineDecorations = LineDecoration.filter(lineData.inlineDecorations, lineNumber, lineData.minColumn, lineData.maxColumn);\n // Only send selection information when needed for rendering whitespace\n let selectionsOnLine = null;\n if (isHighContrast(options.themeType) || this._options.renderWhitespace === 'selection') {\n const selections = viewportData.selections;\n for (const selection of selections) {\n if (selection.endLineNumber < lineNumber || selection.startLineNumber > lineNumber) {\n // Selection does not intersect line\n continue;\n }\n const startColumn = (selection.startLineNumber === lineNumber ? selection.startColumn : lineData.minColumn);\n const endColumn = (selection.endLineNumber === lineNumber ? selection.endColumn : lineData.maxColumn);\n if (startColumn < endColumn) {\n if (isHighContrast(options.themeType)) {\n actualInlineDecorations.push(new LineDecoration(startColumn, endColumn, 'inline-selected-text', 0 /* InlineDecorationType.Regular */));\n }\n if (this._options.renderWhitespace === 'selection') {\n if (!selectionsOnLine) {\n selectionsOnLine = [];\n }\n selectionsOnLine.push(new LineRange(startColumn - 1, endColumn - 1));\n }\n }\n }\n }\n const renderLineInput = new RenderLineInput(options.useMonospaceOptimizations, options.canUseHalfwidthRightwardsArrow, lineData.content, lineData.continuesWithWrappedLine, lineData.isBasicASCII, lineData.containsRTL, lineData.minColumn - 1, lineData.tokens, actualInlineDecorations, lineData.tabSize, lineData.startVisibleColumn, options.spaceWidth, options.middotWidth, options.wsmiddotWidth, options.stopRenderingLineAfter, options.renderWhitespace, options.renderControlCharacters, options.fontLigatures !== EditorFontLigatures.OFF, selectionsOnLine);\n if (this._renderedViewLine && this._renderedViewLine.input.equals(renderLineInput)) {\n // no need to do anything, we have the same render input\n return false;\n }\n sb.appendString('
');\n const output = renderViewLine(renderLineInput, sb);\n sb.appendString('
');\n let renderedViewLine = null;\n if (monospaceAssumptionsAreValid && canUseFastRenderedViewLine && lineData.isBasicASCII && options.useMonospaceOptimizations && output.containsForeignElements === 0 /* ForeignElementType.None */) {\n renderedViewLine = new FastRenderedViewLine(this._renderedViewLine ? this._renderedViewLine.domNode : null, renderLineInput, output.characterMapping);\n }\n if (!renderedViewLine) {\n renderedViewLine = createRenderedLine(this._renderedViewLine ? this._renderedViewLine.domNode : null, renderLineInput, output.characterMapping, output.containsRTL, output.containsForeignElements);\n }\n this._renderedViewLine = renderedViewLine;\n return true;\n }\n layoutLine(lineNumber, deltaTop) {\n if (this._renderedViewLine && this._renderedViewLine.domNode) {\n this._renderedViewLine.domNode.setTop(deltaTop);\n this._renderedViewLine.domNode.setHeight(this._options.lineHeight);\n }\n }\n // --- end IVisibleLineData\n getWidth(context) {\n if (!this._renderedViewLine) {\n return 0;\n }\n return this._renderedViewLine.getWidth(context);\n }\n getWidthIsFast() {\n if (!this._renderedViewLine) {\n return true;\n }\n return this._renderedViewLine.getWidthIsFast();\n }\n needsMonospaceFontCheck() {\n if (!this._renderedViewLine) {\n return false;\n }\n return (this._renderedViewLine instanceof FastRenderedViewLine);\n }\n monospaceAssumptionsAreValid() {\n if (!this._renderedViewLine) {\n return monospaceAssumptionsAreValid;\n }\n if (this._renderedViewLine instanceof FastRenderedViewLine) {\n return this._renderedViewLine.monospaceAssumptionsAreValid();\n }\n return monospaceAssumptionsAreValid;\n }\n onMonospaceAssumptionsInvalidated() {\n if (this._renderedViewLine && this._renderedViewLine instanceof FastRenderedViewLine) {\n this._renderedViewLine = this._renderedViewLine.toSlowRenderedLine();\n }\n }\n getVisibleRangesForRange(lineNumber, startColumn, endColumn, context) {\n if (!this._renderedViewLine) {\n return null;\n }\n startColumn = Math.min(this._renderedViewLine.input.lineContent.length + 1, Math.max(1, startColumn));\n endColumn = Math.min(this._renderedViewLine.input.lineContent.length + 1, Math.max(1, endColumn));\n const stopRenderingLineAfter = this._renderedViewLine.input.stopRenderingLineAfter;\n if (stopRenderingLineAfter !== -1 && startColumn > stopRenderingLineAfter + 1 && endColumn > stopRenderingLineAfter + 1) {\n // This range is obviously not visible\n return new VisibleRanges(true, [new FloatHorizontalRange(this.getWidth(context), 0)]);\n }\n if (stopRenderingLineAfter !== -1 && startColumn > stopRenderingLineAfter + 1) {\n startColumn = stopRenderingLineAfter + 1;\n }\n if (stopRenderingLineAfter !== -1 && endColumn > stopRenderingLineAfter + 1) {\n endColumn = stopRenderingLineAfter + 1;\n }\n const horizontalRanges = this._renderedViewLine.getVisibleRangesForRange(lineNumber, startColumn, endColumn, context);\n if (horizontalRanges && horizontalRanges.length > 0) {\n return new VisibleRanges(false, horizontalRanges);\n }\n return null;\n }\n getColumnOfNodeOffset(spanNode, offset) {\n if (!this._renderedViewLine) {\n return 1;\n }\n return this._renderedViewLine.getColumnOfNodeOffset(spanNode, offset);\n }\n}\nViewLine.CLASS_NAME = 'view-line';\n/**\n * A rendered line which is guaranteed to contain only regular ASCII and is rendered with a monospace font.\n */\nclass FastRenderedViewLine {\n constructor(domNode, renderLineInput, characterMapping) {\n this._cachedWidth = -1;\n this.domNode = domNode;\n this.input = renderLineInput;\n const keyColumnCount = Math.floor(renderLineInput.lineContent.length / 300 /* Constants.MaxMonospaceDistance */);\n if (keyColumnCount > 0) {\n this._keyColumnPixelOffsetCache = new Float32Array(keyColumnCount);\n for (let i = 0; i < keyColumnCount; i++) {\n this._keyColumnPixelOffsetCache[i] = -1;\n }\n }\n else {\n this._keyColumnPixelOffsetCache = null;\n }\n this._characterMapping = characterMapping;\n this._charWidth = renderLineInput.spaceWidth;\n }\n getWidth(context) {\n if (!this.domNode || this.input.lineContent.length < 300 /* Constants.MaxMonospaceDistance */) {\n const horizontalOffset = this._characterMapping.getHorizontalOffset(this._characterMapping.length);\n return Math.round(this._charWidth * horizontalOffset);\n }\n if (this._cachedWidth === -1) {\n this._cachedWidth = this._getReadingTarget(this.domNode).offsetWidth;\n context === null || context === void 0 ? void 0 : context.markDidDomLayout();\n }\n return this._cachedWidth;\n }\n getWidthIsFast() {\n return (this.input.lineContent.length < 300 /* Constants.MaxMonospaceDistance */) || this._cachedWidth !== -1;\n }\n monospaceAssumptionsAreValid() {\n if (!this.domNode) {\n return monospaceAssumptionsAreValid;\n }\n if (this.input.lineContent.length < 300 /* Constants.MaxMonospaceDistance */) {\n const expectedWidth = this.getWidth(null);\n const actualWidth = this.domNode.domNode.firstChild.offsetWidth;\n if (Math.abs(expectedWidth - actualWidth) >= 2) {\n // more than 2px off\n console.warn(`monospace assumptions have been violated, therefore disabling monospace optimizations!`);\n monospaceAssumptionsAreValid = false;\n }\n }\n return monospaceAssumptionsAreValid;\n }\n toSlowRenderedLine() {\n return createRenderedLine(this.domNode, this.input, this._characterMapping, false, 0 /* ForeignElementType.None */);\n }\n getVisibleRangesForRange(lineNumber, startColumn, endColumn, context) {\n const startPosition = this._getColumnPixelOffset(lineNumber, startColumn, context);\n const endPosition = this._getColumnPixelOffset(lineNumber, endColumn, context);\n return [new FloatHorizontalRange(startPosition, endPosition - startPosition)];\n }\n _getColumnPixelOffset(lineNumber, column, context) {\n if (column <= 300 /* Constants.MaxMonospaceDistance */) {\n const horizontalOffset = this._characterMapping.getHorizontalOffset(column);\n return this._charWidth * horizontalOffset;\n }\n const keyColumnOrdinal = Math.floor((column - 1) / 300 /* Constants.MaxMonospaceDistance */) - 1;\n const keyColumn = (keyColumnOrdinal + 1) * 300 /* Constants.MaxMonospaceDistance */ + 1;\n let keyColumnPixelOffset = -1;\n if (this._keyColumnPixelOffsetCache) {\n keyColumnPixelOffset = this._keyColumnPixelOffsetCache[keyColumnOrdinal];\n if (keyColumnPixelOffset === -1) {\n keyColumnPixelOffset = this._actualReadPixelOffset(lineNumber, keyColumn, context);\n this._keyColumnPixelOffsetCache[keyColumnOrdinal] = keyColumnPixelOffset;\n }\n }\n if (keyColumnPixelOffset === -1) {\n // Could not read actual key column pixel offset\n const horizontalOffset = this._characterMapping.getHorizontalOffset(column);\n return this._charWidth * horizontalOffset;\n }\n const keyColumnHorizontalOffset = this._characterMapping.getHorizontalOffset(keyColumn);\n const horizontalOffset = this._characterMapping.getHorizontalOffset(column);\n return keyColumnPixelOffset + this._charWidth * (horizontalOffset - keyColumnHorizontalOffset);\n }\n _getReadingTarget(myDomNode) {\n return myDomNode.domNode.firstChild;\n }\n _actualReadPixelOffset(lineNumber, column, context) {\n if (!this.domNode) {\n return -1;\n }\n const domPosition = this._characterMapping.getDomPosition(column);\n const r = RangeUtil.readHorizontalRanges(this._getReadingTarget(this.domNode), domPosition.partIndex, domPosition.charIndex, domPosition.partIndex, domPosition.charIndex, context);\n if (!r || r.length === 0) {\n return -1;\n }\n return r[0].left;\n }\n getColumnOfNodeOffset(spanNode, offset) {\n return getColumnOfNodeOffset(this._characterMapping, spanNode, offset);\n }\n}\n/**\n * Every time we render a line, we save what we have rendered in an instance of this class.\n */\nclass RenderedViewLine {\n constructor(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements) {\n this.domNode = domNode;\n this.input = renderLineInput;\n this._characterMapping = characterMapping;\n this._isWhitespaceOnly = /^\\s*$/.test(renderLineInput.lineContent);\n this._containsForeignElements = containsForeignElements;\n this._cachedWidth = -1;\n this._pixelOffsetCache = null;\n if (!containsRTL || this._characterMapping.length === 0 /* the line is empty */) {\n this._pixelOffsetCache = new Float32Array(Math.max(2, this._characterMapping.length + 1));\n for (let column = 0, len = this._characterMapping.length; column <= len; column++) {\n this._pixelOffsetCache[column] = -1;\n }\n }\n }\n // --- Reading from the DOM methods\n _getReadingTarget(myDomNode) {\n return myDomNode.domNode.firstChild;\n }\n /**\n * Width of the line in pixels\n */\n getWidth(context) {\n if (!this.domNode) {\n return 0;\n }\n if (this._cachedWidth === -1) {\n this._cachedWidth = this._getReadingTarget(this.domNode).offsetWidth;\n context === null || context === void 0 ? void 0 : context.markDidDomLayout();\n }\n return this._cachedWidth;\n }\n getWidthIsFast() {\n if (this._cachedWidth === -1) {\n return false;\n }\n return true;\n }\n /**\n * Visible ranges for a model range\n */\n getVisibleRangesForRange(lineNumber, startColumn, endColumn, context) {\n if (!this.domNode) {\n return null;\n }\n if (this._pixelOffsetCache !== null) {\n // the text is LTR\n const startOffset = this._readPixelOffset(this.domNode, lineNumber, startColumn, context);\n if (startOffset === -1) {\n return null;\n }\n const endOffset = this._readPixelOffset(this.domNode, lineNumber, endColumn, context);\n if (endOffset === -1) {\n return null;\n }\n return [new FloatHorizontalRange(startOffset, endOffset - startOffset)];\n }\n return this._readVisibleRangesForRange(this.domNode, lineNumber, startColumn, endColumn, context);\n }\n _readVisibleRangesForRange(domNode, lineNumber, startColumn, endColumn, context) {\n if (startColumn === endColumn) {\n const pixelOffset = this._readPixelOffset(domNode, lineNumber, startColumn, context);\n if (pixelOffset === -1) {\n return null;\n }\n else {\n return [new FloatHorizontalRange(pixelOffset, 0)];\n }\n }\n else {\n return this._readRawVisibleRangesForRange(domNode, startColumn, endColumn, context);\n }\n }\n _readPixelOffset(domNode, lineNumber, column, context) {\n if (this._characterMapping.length === 0) {\n // This line has no content\n if (this._containsForeignElements === 0 /* ForeignElementType.None */) {\n // We can assume the line is really empty\n return 0;\n }\n if (this._containsForeignElements === 2 /* ForeignElementType.After */) {\n // We have foreign elements after the (empty) line\n return 0;\n }\n if (this._containsForeignElements === 1 /* ForeignElementType.Before */) {\n // We have foreign elements before the (empty) line\n return this.getWidth(context);\n }\n // We have foreign elements before & after the (empty) line\n const readingTarget = this._getReadingTarget(domNode);\n if (readingTarget.firstChild) {\n context.markDidDomLayout();\n return readingTarget.firstChild.offsetWidth;\n }\n else {\n return 0;\n }\n }\n if (this._pixelOffsetCache !== null) {\n // the text is LTR\n const cachedPixelOffset = this._pixelOffsetCache[column];\n if (cachedPixelOffset !== -1) {\n return cachedPixelOffset;\n }\n const result = this._actualReadPixelOffset(domNode, lineNumber, column, context);\n this._pixelOffsetCache[column] = result;\n return result;\n }\n return this._actualReadPixelOffset(domNode, lineNumber, column, context);\n }\n _actualReadPixelOffset(domNode, lineNumber, column, context) {\n if (this._characterMapping.length === 0) {\n // This line has no content\n const r = RangeUtil.readHorizontalRanges(this._getReadingTarget(domNode), 0, 0, 0, 0, context);\n if (!r || r.length === 0) {\n return -1;\n }\n return r[0].left;\n }\n if (column === this._characterMapping.length && this._isWhitespaceOnly && this._containsForeignElements === 0 /* ForeignElementType.None */) {\n // This branch helps in the case of whitespace only lines which have a width set\n return this.getWidth(context);\n }\n const domPosition = this._characterMapping.getDomPosition(column);\n const r = RangeUtil.readHorizontalRanges(this._getReadingTarget(domNode), domPosition.partIndex, domPosition.charIndex, domPosition.partIndex, domPosition.charIndex, context);\n if (!r || r.length === 0) {\n return -1;\n }\n const result = r[0].left;\n if (this.input.isBasicASCII) {\n const horizontalOffset = this._characterMapping.getHorizontalOffset(column);\n const expectedResult = Math.round(this.input.spaceWidth * horizontalOffset);\n if (Math.abs(expectedResult - result) <= 1) {\n return expectedResult;\n }\n }\n return result;\n }\n _readRawVisibleRangesForRange(domNode, startColumn, endColumn, context) {\n if (startColumn === 1 && endColumn === this._characterMapping.length) {\n // This branch helps IE with bidi text & gives a performance boost to other browsers when reading visible ranges for an entire line\n return [new FloatHorizontalRange(0, this.getWidth(context))];\n }\n const startDomPosition = this._characterMapping.getDomPosition(startColumn);\n const endDomPosition = this._characterMapping.getDomPosition(endColumn);\n return RangeUtil.readHorizontalRanges(this._getReadingTarget(domNode), startDomPosition.partIndex, startDomPosition.charIndex, endDomPosition.partIndex, endDomPosition.charIndex, context);\n }\n /**\n * Returns the column for the text found at a specific offset inside a rendered dom node\n */\n getColumnOfNodeOffset(spanNode, offset) {\n return getColumnOfNodeOffset(this._characterMapping, spanNode, offset);\n }\n}\nclass WebKitRenderedViewLine extends RenderedViewLine {\n _readVisibleRangesForRange(domNode, lineNumber, startColumn, endColumn, context) {\n const output = super._readVisibleRangesForRange(domNode, lineNumber, startColumn, endColumn, context);\n if (!output || output.length === 0 || startColumn === endColumn || (startColumn === 1 && endColumn === this._characterMapping.length)) {\n return output;\n }\n // WebKit is buggy and returns an expanded range (to contain words in some cases)\n // The last client rect is enlarged (I think)\n if (!this.input.containsRTL) {\n // This is an attempt to patch things up\n // Find position of last column\n const endPixelOffset = this._readPixelOffset(domNode, lineNumber, endColumn, context);\n if (endPixelOffset !== -1) {\n const lastRange = output[output.length - 1];\n if (lastRange.left < endPixelOffset) {\n // Trim down the width of the last visible range to not go after the last column's position\n lastRange.width = endPixelOffset - lastRange.left;\n }\n }\n }\n return output;\n }\n}\nconst createRenderedLine = (function () {\n if (browser.isWebKit) {\n return createWebKitRenderedLine;\n }\n return createNormalRenderedLine;\n})();\nfunction createWebKitRenderedLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements) {\n return new WebKitRenderedViewLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements);\n}\nfunction createNormalRenderedLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements) {\n return new RenderedViewLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements);\n}\nexport function getColumnOfNodeOffset(characterMapping, spanNode, offset) {\n const spanNodeTextContentLength = spanNode.textContent.length;\n let spanIndex = -1;\n while (spanNode) {\n spanNode = spanNode.previousSibling;\n spanIndex++;\n }\n return characterMapping.getColumn(new DomPosition(spanIndex, offset), spanNodeTextContentLength);\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as strings from '../../../base/common/strings.js';\n/**\n * A column in a position is the gap between two adjacent characters. The methods here\n * work with a concept called \"visible column\". A visible column is a very rough approximation\n * of the horizontal screen position of a column. For example, using a tab size of 4:\n * ```txt\n * |||T|ext\n * | | | \\---- column = 4, visible column = 9\n * | | \\------ column = 3, visible column = 8\n * | \\------------ column = 2, visible column = 4\n * \\------------------ column = 1, visible column = 0\n * ```\n *\n * **NOTE**: Visual columns do not work well for RTL text or variable-width fonts or characters.\n *\n * **NOTE**: These methods work and make sense both on the model and on the view model.\n */\nexport class CursorColumns {\n static _nextVisibleColumn(codePoint, visibleColumn, tabSize) {\n if (codePoint === 9 /* CharCode.Tab */) {\n return CursorColumns.nextRenderTabStop(visibleColumn, tabSize);\n }\n if (strings.isFullWidthCharacter(codePoint) || strings.isEmojiImprecise(codePoint)) {\n return visibleColumn + 2;\n }\n return visibleColumn + 1;\n }\n /**\n * Returns a visible column from a column.\n * @see {@link CursorColumns}\n */\n static visibleColumnFromColumn(lineContent, column, tabSize) {\n const textLen = Math.min(column - 1, lineContent.length);\n const text = lineContent.substring(0, textLen);\n const iterator = new strings.GraphemeIterator(text);\n let result = 0;\n while (!iterator.eol()) {\n const codePoint = strings.getNextCodePoint(text, textLen, iterator.offset);\n iterator.nextGraphemeLength();\n result = this._nextVisibleColumn(codePoint, result, tabSize);\n }\n return result;\n }\n /**\n * Returns a column from a visible column.\n * @see {@link CursorColumns}\n */\n static columnFromVisibleColumn(lineContent, visibleColumn, tabSize) {\n if (visibleColumn <= 0) {\n return 1;\n }\n const lineContentLength = lineContent.length;\n const iterator = new strings.GraphemeIterator(lineContent);\n let beforeVisibleColumn = 0;\n let beforeColumn = 1;\n while (!iterator.eol()) {\n const codePoint = strings.getNextCodePoint(lineContent, lineContentLength, iterator.offset);\n iterator.nextGraphemeLength();\n const afterVisibleColumn = this._nextVisibleColumn(codePoint, beforeVisibleColumn, tabSize);\n const afterColumn = iterator.offset + 1;\n if (afterVisibleColumn >= visibleColumn) {\n const beforeDelta = visibleColumn - beforeVisibleColumn;\n const afterDelta = afterVisibleColumn - visibleColumn;\n if (afterDelta < beforeDelta) {\n return afterColumn;\n }\n else {\n return beforeColumn;\n }\n }\n beforeVisibleColumn = afterVisibleColumn;\n beforeColumn = afterColumn;\n }\n // walked the entire string\n return lineContentLength + 1;\n }\n /**\n * ATTENTION: This works with 0-based columns (as opposed to the regular 1-based columns)\n * @see {@link CursorColumns}\n */\n static nextRenderTabStop(visibleColumn, tabSize) {\n return visibleColumn + tabSize - visibleColumn % tabSize;\n }\n /**\n * ATTENTION: This works with 0-based columns (as opposed to the regular 1-based columns)\n * @see {@link CursorColumns}\n */\n static nextIndentTabStop(visibleColumn, indentSize) {\n return visibleColumn + indentSize - visibleColumn % indentSize;\n }\n /**\n * ATTENTION: This works with 0-based columns (as opposed to the regular 1-based columns)\n * @see {@link CursorColumns}\n */\n static prevRenderTabStop(column, tabSize) {\n return Math.max(0, column - 1 - (column - 1) % tabSize);\n }\n /**\n * ATTENTION: This works with 0-based columns (as opposed to the regular 1-based columns)\n * @see {@link CursorColumns}\n */\n static prevIndentTabStop(column, indentSize) {\n return Math.max(0, column - 1 - (column - 1) % indentSize);\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { CursorColumns } from '../core/cursorColumns.js';\nexport class AtomicTabMoveOperations {\n /**\n * Get the visible column at the position. If we get to a non-whitespace character first\n * or past the end of string then return -1.\n *\n * **Note** `position` and the return value are 0-based.\n */\n static whitespaceVisibleColumn(lineContent, position, tabSize) {\n const lineLength = lineContent.length;\n let visibleColumn = 0;\n let prevTabStopPosition = -1;\n let prevTabStopVisibleColumn = -1;\n for (let i = 0; i < lineLength; i++) {\n if (i === position) {\n return [prevTabStopPosition, prevTabStopVisibleColumn, visibleColumn];\n }\n if (visibleColumn % tabSize === 0) {\n prevTabStopPosition = i;\n prevTabStopVisibleColumn = visibleColumn;\n }\n const chCode = lineContent.charCodeAt(i);\n switch (chCode) {\n case 32 /* CharCode.Space */:\n visibleColumn += 1;\n break;\n case 9 /* CharCode.Tab */:\n // Skip to the next multiple of tabSize.\n visibleColumn = CursorColumns.nextRenderTabStop(visibleColumn, tabSize);\n break;\n default:\n return [-1, -1, -1];\n }\n }\n if (position === lineLength) {\n return [prevTabStopPosition, prevTabStopVisibleColumn, visibleColumn];\n }\n return [-1, -1, -1];\n }\n /**\n * Return the position that should result from a move left, right or to the\n * nearest tab, if atomic tabs are enabled. Left and right are used for the\n * arrow key movements, nearest is used for mouse selection. It returns\n * -1 if atomic tabs are not relevant and you should fall back to normal\n * behaviour.\n *\n * **Note**: `position` and the return value are 0-based.\n */\n static atomicPosition(lineContent, position, tabSize, direction) {\n const lineLength = lineContent.length;\n // Get the 0-based visible column corresponding to the position, or return\n // -1 if it is not in the initial whitespace.\n const [prevTabStopPosition, prevTabStopVisibleColumn, visibleColumn] = AtomicTabMoveOperations.whitespaceVisibleColumn(lineContent, position, tabSize);\n if (visibleColumn === -1) {\n return -1;\n }\n // Is the output left or right of the current position. The case for nearest\n // where it is the same as the current position is handled in the switch.\n let left;\n switch (direction) {\n case 0 /* Direction.Left */:\n left = true;\n break;\n case 1 /* Direction.Right */:\n left = false;\n break;\n case 2 /* Direction.Nearest */:\n // The code below assumes the output position is either left or right\n // of the input position. If it is the same, return immediately.\n if (visibleColumn % tabSize === 0) {\n return position;\n }\n // Go to the nearest indentation.\n left = visibleColumn % tabSize <= (tabSize / 2);\n break;\n }\n // If going left, we can just use the info about the last tab stop position and\n // last tab stop visible column that we computed in the first walk over the whitespace.\n if (left) {\n if (prevTabStopPosition === -1) {\n return -1;\n }\n // If the direction is left, we need to keep scanning right to ensure\n // that targetVisibleColumn + tabSize is before non-whitespace.\n // This is so that when we press left at the end of a partial\n // indentation it only goes one character. For example ' foo' with\n // tabSize 4, should jump from position 6 to position 5, not 4.\n let currentVisibleColumn = prevTabStopVisibleColumn;\n for (let i = prevTabStopPosition; i < lineLength; ++i) {\n if (currentVisibleColumn === prevTabStopVisibleColumn + tabSize) {\n // It is a full indentation.\n return prevTabStopPosition;\n }\n const chCode = lineContent.charCodeAt(i);\n switch (chCode) {\n case 32 /* CharCode.Space */:\n currentVisibleColumn += 1;\n break;\n case 9 /* CharCode.Tab */:\n currentVisibleColumn = CursorColumns.nextRenderTabStop(currentVisibleColumn, tabSize);\n break;\n default:\n return -1;\n }\n }\n if (currentVisibleColumn === prevTabStopVisibleColumn + tabSize) {\n return prevTabStopPosition;\n }\n // It must have been a partial indentation.\n return -1;\n }\n // We are going right.\n const targetVisibleColumn = CursorColumns.nextRenderTabStop(visibleColumn, tabSize);\n // We can just continue from where whitespaceVisibleColumn got to.\n let currentVisibleColumn = visibleColumn;\n for (let i = position; i < lineLength; i++) {\n if (currentVisibleColumn === targetVisibleColumn) {\n return i;\n }\n const chCode = lineContent.charCodeAt(i);\n switch (chCode) {\n case 32 /* CharCode.Space */:\n currentVisibleColumn += 1;\n break;\n case 9 /* CharCode.Tab */:\n currentVisibleColumn = CursorColumns.nextRenderTabStop(currentVisibleColumn, tabSize);\n break;\n default:\n return -1;\n }\n }\n // This condition handles when the target column is at the end of the line.\n if (currentVisibleColumn === targetVisibleColumn) {\n return lineLength;\n }\n return -1;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { PageCoordinates } from '../editorDom.js';\nimport { PartFingerprints } from '../view/viewPart.js';\nimport { ViewLine } from '../viewParts/lines/viewLine.js';\nimport { Position } from '../../common/core/position.js';\nimport { Range as EditorRange } from '../../common/core/range.js';\nimport { CursorColumns } from '../../common/core/cursorColumns.js';\nimport * as dom from '../../../base/browser/dom.js';\nimport { AtomicTabMoveOperations } from '../../common/cursor/cursorAtomicMoveOperations.js';\nclass UnknownHitTestResult {\n constructor(hitTarget = null) {\n this.hitTarget = hitTarget;\n this.type = 0 /* HitTestResultType.Unknown */;\n }\n}\nclass ContentHitTestResult {\n constructor(position, spanNode, injectedText) {\n this.position = position;\n this.spanNode = spanNode;\n this.injectedText = injectedText;\n this.type = 1 /* HitTestResultType.Content */;\n }\n}\nvar HitTestResult;\n(function (HitTestResult) {\n function createFromDOMInfo(ctx, spanNode, offset) {\n const position = ctx.getPositionFromDOMInfo(spanNode, offset);\n if (position) {\n return new ContentHitTestResult(position, spanNode, null);\n }\n return new UnknownHitTestResult(spanNode);\n }\n HitTestResult.createFromDOMInfo = createFromDOMInfo;\n})(HitTestResult || (HitTestResult = {}));\nexport class PointerHandlerLastRenderData {\n constructor(lastViewCursorsRenderData, lastTextareaPosition) {\n this.lastViewCursorsRenderData = lastViewCursorsRenderData;\n this.lastTextareaPosition = lastTextareaPosition;\n }\n}\nexport class MouseTarget {\n static _deduceRage(position, range = null) {\n if (!range && position) {\n return new EditorRange(position.lineNumber, position.column, position.lineNumber, position.column);\n }\n return range !== null && range !== void 0 ? range : null;\n }\n static createUnknown(element, mouseColumn, position) {\n return { type: 0 /* MouseTargetType.UNKNOWN */, element, mouseColumn, position, range: this._deduceRage(position) };\n }\n static createTextarea(element, mouseColumn) {\n return { type: 1 /* MouseTargetType.TEXTAREA */, element, mouseColumn, position: null, range: null };\n }\n static createMargin(type, element, mouseColumn, position, range, detail) {\n return { type, element, mouseColumn, position, range, detail };\n }\n static createViewZone(type, element, mouseColumn, position, detail) {\n return { type, element, mouseColumn, position, range: this._deduceRage(position), detail };\n }\n static createContentText(element, mouseColumn, position, range, detail) {\n return { type: 6 /* MouseTargetType.CONTENT_TEXT */, element, mouseColumn, position, range: this._deduceRage(position, range), detail };\n }\n static createContentEmpty(element, mouseColumn, position, detail) {\n return { type: 7 /* MouseTargetType.CONTENT_EMPTY */, element, mouseColumn, position, range: this._deduceRage(position), detail };\n }\n static createContentWidget(element, mouseColumn, detail) {\n return { type: 9 /* MouseTargetType.CONTENT_WIDGET */, element, mouseColumn, position: null, range: null, detail };\n }\n static createScrollbar(element, mouseColumn, position) {\n return { type: 11 /* MouseTargetType.SCROLLBAR */, element, mouseColumn, position, range: this._deduceRage(position) };\n }\n static createOverlayWidget(element, mouseColumn, detail) {\n return { type: 12 /* MouseTargetType.OVERLAY_WIDGET */, element, mouseColumn, position: null, range: null, detail };\n }\n static createOutsideEditor(mouseColumn, position, outsidePosition, outsideDistance) {\n return { type: 13 /* MouseTargetType.OUTSIDE_EDITOR */, element: null, mouseColumn, position, range: this._deduceRage(position), outsidePosition, outsideDistance };\n }\n static _typeToString(type) {\n if (type === 1 /* MouseTargetType.TEXTAREA */) {\n return 'TEXTAREA';\n }\n if (type === 2 /* MouseTargetType.GUTTER_GLYPH_MARGIN */) {\n return 'GUTTER_GLYPH_MARGIN';\n }\n if (type === 3 /* MouseTargetType.GUTTER_LINE_NUMBERS */) {\n return 'GUTTER_LINE_NUMBERS';\n }\n if (type === 4 /* MouseTargetType.GUTTER_LINE_DECORATIONS */) {\n return 'GUTTER_LINE_DECORATIONS';\n }\n if (type === 5 /* MouseTargetType.GUTTER_VIEW_ZONE */) {\n return 'GUTTER_VIEW_ZONE';\n }\n if (type === 6 /* MouseTargetType.CONTENT_TEXT */) {\n return 'CONTENT_TEXT';\n }\n if (type === 7 /* MouseTargetType.CONTENT_EMPTY */) {\n return 'CONTENT_EMPTY';\n }\n if (type === 8 /* MouseTargetType.CONTENT_VIEW_ZONE */) {\n return 'CONTENT_VIEW_ZONE';\n }\n if (type === 9 /* MouseTargetType.CONTENT_WIDGET */) {\n return 'CONTENT_WIDGET';\n }\n if (type === 10 /* MouseTargetType.OVERVIEW_RULER */) {\n return 'OVERVIEW_RULER';\n }\n if (type === 11 /* MouseTargetType.SCROLLBAR */) {\n return 'SCROLLBAR';\n }\n if (type === 12 /* MouseTargetType.OVERLAY_WIDGET */) {\n return 'OVERLAY_WIDGET';\n }\n return 'UNKNOWN';\n }\n static toString(target) {\n return this._typeToString(target.type) + ': ' + target.position + ' - ' + target.range + ' - ' + JSON.stringify(target.detail);\n }\n}\nclass ElementPath {\n static isTextArea(path) {\n return (path.length === 2\n && path[0] === 3 /* PartFingerprint.OverflowGuard */\n && path[1] === 7 /* PartFingerprint.TextArea */);\n }\n static isChildOfViewLines(path) {\n return (path.length >= 4\n && path[0] === 3 /* PartFingerprint.OverflowGuard */\n && path[3] === 8 /* PartFingerprint.ViewLines */);\n }\n static isStrictChildOfViewLines(path) {\n return (path.length > 4\n && path[0] === 3 /* PartFingerprint.OverflowGuard */\n && path[3] === 8 /* PartFingerprint.ViewLines */);\n }\n static isChildOfScrollableElement(path) {\n return (path.length >= 2\n && path[0] === 3 /* PartFingerprint.OverflowGuard */\n && path[1] === 6 /* PartFingerprint.ScrollableElement */);\n }\n static isChildOfMinimap(path) {\n return (path.length >= 2\n && path[0] === 3 /* PartFingerprint.OverflowGuard */\n && path[1] === 9 /* PartFingerprint.Minimap */);\n }\n static isChildOfContentWidgets(path) {\n return (path.length >= 4\n && path[0] === 3 /* PartFingerprint.OverflowGuard */\n && path[3] === 1 /* PartFingerprint.ContentWidgets */);\n }\n static isChildOfOverflowGuard(path) {\n return (path.length >= 1\n && path[0] === 3 /* PartFingerprint.OverflowGuard */);\n }\n static isChildOfOverflowingContentWidgets(path) {\n return (path.length >= 1\n && path[0] === 2 /* PartFingerprint.OverflowingContentWidgets */);\n }\n static isChildOfOverlayWidgets(path) {\n return (path.length >= 2\n && path[0] === 3 /* PartFingerprint.OverflowGuard */\n && path[1] === 4 /* PartFingerprint.OverlayWidgets */);\n }\n static isChildOfOverflowingOverlayWidgets(path) {\n return (path.length >= 1\n && path[0] === 5 /* PartFingerprint.OverflowingOverlayWidgets */);\n }\n}\nexport class HitTestContext {\n constructor(context, viewHelper, lastRenderData) {\n this.viewModel = context.viewModel;\n const options = context.configuration.options;\n this.layoutInfo = options.get(143 /* EditorOption.layoutInfo */);\n this.viewDomNode = viewHelper.viewDomNode;\n this.lineHeight = options.get(66 /* EditorOption.lineHeight */);\n this.stickyTabStops = options.get(115 /* EditorOption.stickyTabStops */);\n this.typicalHalfwidthCharacterWidth = options.get(50 /* EditorOption.fontInfo */).typicalHalfwidthCharacterWidth;\n this.lastRenderData = lastRenderData;\n this._context = context;\n this._viewHelper = viewHelper;\n }\n getZoneAtCoord(mouseVerticalOffset) {\n return HitTestContext.getZoneAtCoord(this._context, mouseVerticalOffset);\n }\n static getZoneAtCoord(context, mouseVerticalOffset) {\n // The target is either a view zone or the empty space after the last view-line\n const viewZoneWhitespace = context.viewLayout.getWhitespaceAtVerticalOffset(mouseVerticalOffset);\n if (viewZoneWhitespace) {\n const viewZoneMiddle = viewZoneWhitespace.verticalOffset + viewZoneWhitespace.height / 2;\n const lineCount = context.viewModel.getLineCount();\n let positionBefore = null;\n let position;\n let positionAfter = null;\n if (viewZoneWhitespace.afterLineNumber !== lineCount) {\n // There are more lines after this view zone\n positionAfter = new Position(viewZoneWhitespace.afterLineNumber + 1, 1);\n }\n if (viewZoneWhitespace.afterLineNumber > 0) {\n // There are more lines above this view zone\n positionBefore = new Position(viewZoneWhitespace.afterLineNumber, context.viewModel.getLineMaxColumn(viewZoneWhitespace.afterLineNumber));\n }\n if (positionAfter === null) {\n position = positionBefore;\n }\n else if (positionBefore === null) {\n position = positionAfter;\n }\n else if (mouseVerticalOffset < viewZoneMiddle) {\n position = positionBefore;\n }\n else {\n position = positionAfter;\n }\n return {\n viewZoneId: viewZoneWhitespace.id,\n afterLineNumber: viewZoneWhitespace.afterLineNumber,\n positionBefore: positionBefore,\n positionAfter: positionAfter,\n position: position\n };\n }\n return null;\n }\n getFullLineRangeAtCoord(mouseVerticalOffset) {\n if (this._context.viewLayout.isAfterLines(mouseVerticalOffset)) {\n // Below the last line\n const lineNumber = this._context.viewModel.getLineCount();\n const maxLineColumn = this._context.viewModel.getLineMaxColumn(lineNumber);\n return {\n range: new EditorRange(lineNumber, maxLineColumn, lineNumber, maxLineColumn),\n isAfterLines: true\n };\n }\n const lineNumber = this._context.viewLayout.getLineNumberAtVerticalOffset(mouseVerticalOffset);\n const maxLineColumn = this._context.viewModel.getLineMaxColumn(lineNumber);\n return {\n range: new EditorRange(lineNumber, 1, lineNumber, maxLineColumn),\n isAfterLines: false\n };\n }\n getLineNumberAtVerticalOffset(mouseVerticalOffset) {\n return this._context.viewLayout.getLineNumberAtVerticalOffset(mouseVerticalOffset);\n }\n isAfterLines(mouseVerticalOffset) {\n return this._context.viewLayout.isAfterLines(mouseVerticalOffset);\n }\n isInTopPadding(mouseVerticalOffset) {\n return this._context.viewLayout.isInTopPadding(mouseVerticalOffset);\n }\n isInBottomPadding(mouseVerticalOffset) {\n return this._context.viewLayout.isInBottomPadding(mouseVerticalOffset);\n }\n getVerticalOffsetForLineNumber(lineNumber) {\n return this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber);\n }\n findAttribute(element, attr) {\n return HitTestContext._findAttribute(element, attr, this._viewHelper.viewDomNode);\n }\n static _findAttribute(element, attr, stopAt) {\n while (element && element !== element.ownerDocument.body) {\n if (element.hasAttribute && element.hasAttribute(attr)) {\n return element.getAttribute(attr);\n }\n if (element === stopAt) {\n return null;\n }\n element = element.parentNode;\n }\n return null;\n }\n getLineWidth(lineNumber) {\n return this._viewHelper.getLineWidth(lineNumber);\n }\n visibleRangeForPosition(lineNumber, column) {\n return this._viewHelper.visibleRangeForPosition(lineNumber, column);\n }\n getPositionFromDOMInfo(spanNode, offset) {\n return this._viewHelper.getPositionFromDOMInfo(spanNode, offset);\n }\n getCurrentScrollTop() {\n return this._context.viewLayout.getCurrentScrollTop();\n }\n getCurrentScrollLeft() {\n return this._context.viewLayout.getCurrentScrollLeft();\n }\n}\nclass BareHitTestRequest {\n constructor(ctx, editorPos, pos, relativePos) {\n this.editorPos = editorPos;\n this.pos = pos;\n this.relativePos = relativePos;\n this.mouseVerticalOffset = Math.max(0, ctx.getCurrentScrollTop() + this.relativePos.y);\n this.mouseContentHorizontalOffset = ctx.getCurrentScrollLeft() + this.relativePos.x - ctx.layoutInfo.contentLeft;\n this.isInMarginArea = (this.relativePos.x < ctx.layoutInfo.contentLeft && this.relativePos.x >= ctx.layoutInfo.glyphMarginLeft);\n this.isInContentArea = !this.isInMarginArea;\n this.mouseColumn = Math.max(0, MouseTargetFactory._getMouseColumn(this.mouseContentHorizontalOffset, ctx.typicalHalfwidthCharacterWidth));\n }\n}\nclass HitTestRequest extends BareHitTestRequest {\n constructor(ctx, editorPos, pos, relativePos, target) {\n super(ctx, editorPos, pos, relativePos);\n this._ctx = ctx;\n if (target) {\n this.target = target;\n this.targetPath = PartFingerprints.collect(target, ctx.viewDomNode);\n }\n else {\n this.target = null;\n this.targetPath = new Uint8Array(0);\n }\n }\n toString() {\n return `pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\\n\\ttarget: ${this.target ? this.target.outerHTML : null}`;\n }\n _getMouseColumn(position = null) {\n if (position && position.column < this._ctx.viewModel.getLineMaxColumn(position.lineNumber)) {\n // Most likely, the line contains foreign decorations...\n return CursorColumns.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(position.lineNumber), position.column, this._ctx.viewModel.model.getOptions().tabSize) + 1;\n }\n return this.mouseColumn;\n }\n fulfillUnknown(position = null) {\n return MouseTarget.createUnknown(this.target, this._getMouseColumn(position), position);\n }\n fulfillTextarea() {\n return MouseTarget.createTextarea(this.target, this._getMouseColumn());\n }\n fulfillMargin(type, position, range, detail) {\n return MouseTarget.createMargin(type, this.target, this._getMouseColumn(position), position, range, detail);\n }\n fulfillViewZone(type, position, detail) {\n return MouseTarget.createViewZone(type, this.target, this._getMouseColumn(position), position, detail);\n }\n fulfillContentText(position, range, detail) {\n return MouseTarget.createContentText(this.target, this._getMouseColumn(position), position, range, detail);\n }\n fulfillContentEmpty(position, detail) {\n return MouseTarget.createContentEmpty(this.target, this._getMouseColumn(position), position, detail);\n }\n fulfillContentWidget(detail) {\n return MouseTarget.createContentWidget(this.target, this._getMouseColumn(), detail);\n }\n fulfillScrollbar(position) {\n return MouseTarget.createScrollbar(this.target, this._getMouseColumn(position), position);\n }\n fulfillOverlayWidget(detail) {\n return MouseTarget.createOverlayWidget(this.target, this._getMouseColumn(), detail);\n }\n withTarget(target) {\n return new HitTestRequest(this._ctx, this.editorPos, this.pos, this.relativePos, target);\n }\n}\nconst EMPTY_CONTENT_AFTER_LINES = { isAfterLines: true };\nfunction createEmptyContentDataInLines(horizontalDistanceToText) {\n return {\n isAfterLines: false,\n horizontalDistanceToText: horizontalDistanceToText\n };\n}\nexport class MouseTargetFactory {\n constructor(context, viewHelper) {\n this._context = context;\n this._viewHelper = viewHelper;\n }\n mouseTargetIsWidget(e) {\n const t = e.target;\n const path = PartFingerprints.collect(t, this._viewHelper.viewDomNode);\n // Is it a content widget?\n if (ElementPath.isChildOfContentWidgets(path) || ElementPath.isChildOfOverflowingContentWidgets(path)) {\n return true;\n }\n // Is it an overlay widget?\n if (ElementPath.isChildOfOverlayWidgets(path) || ElementPath.isChildOfOverflowingOverlayWidgets(path)) {\n return true;\n }\n return false;\n }\n createMouseTarget(lastRenderData, editorPos, pos, relativePos, target) {\n const ctx = new HitTestContext(this._context, this._viewHelper, lastRenderData);\n const request = new HitTestRequest(ctx, editorPos, pos, relativePos, target);\n try {\n const r = MouseTargetFactory._createMouseTarget(ctx, request, false);\n if (r.type === 6 /* MouseTargetType.CONTENT_TEXT */) {\n // Snap to the nearest soft tab boundary if atomic soft tabs are enabled.\n if (ctx.stickyTabStops && r.position !== null) {\n const position = MouseTargetFactory._snapToSoftTabBoundary(r.position, ctx.viewModel);\n const range = EditorRange.fromPositions(position, position).plusRange(r.range);\n return request.fulfillContentText(position, range, r.detail);\n }\n }\n // console.log(MouseTarget.toString(r));\n return r;\n }\n catch (err) {\n // console.log(err);\n return request.fulfillUnknown();\n }\n }\n static _createMouseTarget(ctx, request, domHitTestExecuted) {\n // console.log(`${domHitTestExecuted ? '=>' : ''}CAME IN REQUEST: ${request}`);\n // First ensure the request has a target\n if (request.target === null) {\n if (domHitTestExecuted) {\n // Still no target... and we have already executed hit test...\n return request.fulfillUnknown();\n }\n const hitTestResult = MouseTargetFactory._doHitTest(ctx, request);\n if (hitTestResult.type === 1 /* HitTestResultType.Content */) {\n return MouseTargetFactory.createMouseTargetFromHitTestPosition(ctx, request, hitTestResult.spanNode, hitTestResult.position, hitTestResult.injectedText);\n }\n return this._createMouseTarget(ctx, request.withTarget(hitTestResult.hitTarget), true);\n }\n // we know for a fact that request.target is not null\n const resolvedRequest = request;\n let result = null;\n if (!ElementPath.isChildOfOverflowGuard(request.targetPath) && !ElementPath.isChildOfOverflowingContentWidgets(request.targetPath) && !ElementPath.isChildOfOverflowingOverlayWidgets(request.targetPath)) {\n // We only render dom nodes inside the overflow guard or in the overflowing content widgets\n result = result || request.fulfillUnknown();\n }\n result = result || MouseTargetFactory._hitTestContentWidget(ctx, resolvedRequest);\n result = result || MouseTargetFactory._hitTestOverlayWidget(ctx, resolvedRequest);\n result = result || MouseTargetFactory._hitTestMinimap(ctx, resolvedRequest);\n result = result || MouseTargetFactory._hitTestScrollbarSlider(ctx, resolvedRequest);\n result = result || MouseTargetFactory._hitTestViewZone(ctx, resolvedRequest);\n result = result || MouseTargetFactory._hitTestMargin(ctx, resolvedRequest);\n result = result || MouseTargetFactory._hitTestViewCursor(ctx, resolvedRequest);\n result = result || MouseTargetFactory._hitTestTextArea(ctx, resolvedRequest);\n result = result || MouseTargetFactory._hitTestViewLines(ctx, resolvedRequest, domHitTestExecuted);\n result = result || MouseTargetFactory._hitTestScrollbar(ctx, resolvedRequest);\n return (result || request.fulfillUnknown());\n }\n static _hitTestContentWidget(ctx, request) {\n // Is it a content widget?\n if (ElementPath.isChildOfContentWidgets(request.targetPath) || ElementPath.isChildOfOverflowingContentWidgets(request.targetPath)) {\n const widgetId = ctx.findAttribute(request.target, 'widgetId');\n if (widgetId) {\n return request.fulfillContentWidget(widgetId);\n }\n else {\n return request.fulfillUnknown();\n }\n }\n return null;\n }\n static _hitTestOverlayWidget(ctx, request) {\n // Is it an overlay widget?\n if (ElementPath.isChildOfOverlayWidgets(request.targetPath) || ElementPath.isChildOfOverflowingOverlayWidgets(request.targetPath)) {\n const widgetId = ctx.findAttribute(request.target, 'widgetId');\n if (widgetId) {\n return request.fulfillOverlayWidget(widgetId);\n }\n else {\n return request.fulfillUnknown();\n }\n }\n return null;\n }\n static _hitTestViewCursor(ctx, request) {\n if (request.target) {\n // Check if we've hit a painted cursor\n const lastViewCursorsRenderData = ctx.lastRenderData.lastViewCursorsRenderData;\n for (const d of lastViewCursorsRenderData) {\n if (request.target === d.domNode) {\n return request.fulfillContentText(d.position, null, { mightBeForeignElement: false, injectedText: null });\n }\n }\n }\n if (request.isInContentArea) {\n // Edge has a bug when hit-testing the exact position of a cursor,\n // instead of returning the correct dom node, it returns the\n // first or last rendered view line dom node, therefore help it out\n // and first check if we are on top of a cursor\n const lastViewCursorsRenderData = ctx.lastRenderData.lastViewCursorsRenderData;\n const mouseContentHorizontalOffset = request.mouseContentHorizontalOffset;\n const mouseVerticalOffset = request.mouseVerticalOffset;\n for (const d of lastViewCursorsRenderData) {\n if (mouseContentHorizontalOffset < d.contentLeft) {\n // mouse position is to the left of the cursor\n continue;\n }\n if (mouseContentHorizontalOffset > d.contentLeft + d.width) {\n // mouse position is to the right of the cursor\n continue;\n }\n const cursorVerticalOffset = ctx.getVerticalOffsetForLineNumber(d.position.lineNumber);\n if (cursorVerticalOffset <= mouseVerticalOffset\n && mouseVerticalOffset <= cursorVerticalOffset + d.height) {\n return request.fulfillContentText(d.position, null, { mightBeForeignElement: false, injectedText: null });\n }\n }\n }\n return null;\n }\n static _hitTestViewZone(ctx, request) {\n const viewZoneData = ctx.getZoneAtCoord(request.mouseVerticalOffset);\n if (viewZoneData) {\n const mouseTargetType = (request.isInContentArea ? 8 /* MouseTargetType.CONTENT_VIEW_ZONE */ : 5 /* MouseTargetType.GUTTER_VIEW_ZONE */);\n return request.fulfillViewZone(mouseTargetType, viewZoneData.position, viewZoneData);\n }\n return null;\n }\n static _hitTestTextArea(ctx, request) {\n // Is it the textarea?\n if (ElementPath.isTextArea(request.targetPath)) {\n if (ctx.lastRenderData.lastTextareaPosition) {\n return request.fulfillContentText(ctx.lastRenderData.lastTextareaPosition, null, { mightBeForeignElement: false, injectedText: null });\n }\n return request.fulfillTextarea();\n }\n return null;\n }\n static _hitTestMargin(ctx, request) {\n if (request.isInMarginArea) {\n const res = ctx.getFullLineRangeAtCoord(request.mouseVerticalOffset);\n const pos = res.range.getStartPosition();\n let offset = Math.abs(request.relativePos.x);\n const detail = {\n isAfterLines: res.isAfterLines,\n glyphMarginLeft: ctx.layoutInfo.glyphMarginLeft,\n glyphMarginWidth: ctx.layoutInfo.glyphMarginWidth,\n lineNumbersWidth: ctx.layoutInfo.lineNumbersWidth,\n offsetX: offset\n };\n offset -= ctx.layoutInfo.glyphMarginLeft;\n if (offset <= ctx.layoutInfo.glyphMarginWidth) {\n // On the glyph margin\n const modelCoordinate = ctx.viewModel.coordinatesConverter.convertViewPositionToModelPosition(res.range.getStartPosition());\n const lanes = ctx.viewModel.glyphLanes.getLanesAtLine(modelCoordinate.lineNumber);\n detail.glyphMarginLane = lanes[Math.floor(offset / ctx.lineHeight)];\n return request.fulfillMargin(2 /* MouseTargetType.GUTTER_GLYPH_MARGIN */, pos, res.range, detail);\n }\n offset -= ctx.layoutInfo.glyphMarginWidth;\n if (offset <= ctx.layoutInfo.lineNumbersWidth) {\n // On the line numbers\n return request.fulfillMargin(3 /* MouseTargetType.GUTTER_LINE_NUMBERS */, pos, res.range, detail);\n }\n offset -= ctx.layoutInfo.lineNumbersWidth;\n // On the line decorations\n return request.fulfillMargin(4 /* MouseTargetType.GUTTER_LINE_DECORATIONS */, pos, res.range, detail);\n }\n return null;\n }\n static _hitTestViewLines(ctx, request, domHitTestExecuted) {\n if (!ElementPath.isChildOfViewLines(request.targetPath)) {\n return null;\n }\n if (ctx.isInTopPadding(request.mouseVerticalOffset)) {\n return request.fulfillContentEmpty(new Position(1, 1), EMPTY_CONTENT_AFTER_LINES);\n }\n // Check if it is below any lines and any view zones\n if (ctx.isAfterLines(request.mouseVerticalOffset) || ctx.isInBottomPadding(request.mouseVerticalOffset)) {\n // This most likely indicates it happened after the last view-line\n const lineCount = ctx.viewModel.getLineCount();\n const maxLineColumn = ctx.viewModel.getLineMaxColumn(lineCount);\n return request.fulfillContentEmpty(new Position(lineCount, maxLineColumn), EMPTY_CONTENT_AFTER_LINES);\n }\n if (domHitTestExecuted) {\n // Check if we are hitting a view-line (can happen in the case of inline decorations on empty lines)\n // See https://github.com/microsoft/vscode/issues/46942\n if (ElementPath.isStrictChildOfViewLines(request.targetPath)) {\n const lineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\n if (ctx.viewModel.getLineLength(lineNumber) === 0) {\n const lineWidth = ctx.getLineWidth(lineNumber);\n const detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth);\n return request.fulfillContentEmpty(new Position(lineNumber, 1), detail);\n }\n const lineWidth = ctx.getLineWidth(lineNumber);\n if (request.mouseContentHorizontalOffset >= lineWidth) {\n const detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth);\n const pos = new Position(lineNumber, ctx.viewModel.getLineMaxColumn(lineNumber));\n return request.fulfillContentEmpty(pos, detail);\n }\n }\n // We have already executed hit test...\n return request.fulfillUnknown();\n }\n const hitTestResult = MouseTargetFactory._doHitTest(ctx, request);\n if (hitTestResult.type === 1 /* HitTestResultType.Content */) {\n return MouseTargetFactory.createMouseTargetFromHitTestPosition(ctx, request, hitTestResult.spanNode, hitTestResult.position, hitTestResult.injectedText);\n }\n return this._createMouseTarget(ctx, request.withTarget(hitTestResult.hitTarget), true);\n }\n static _hitTestMinimap(ctx, request) {\n if (ElementPath.isChildOfMinimap(request.targetPath)) {\n const possibleLineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\n const maxColumn = ctx.viewModel.getLineMaxColumn(possibleLineNumber);\n return request.fulfillScrollbar(new Position(possibleLineNumber, maxColumn));\n }\n return null;\n }\n static _hitTestScrollbarSlider(ctx, request) {\n if (ElementPath.isChildOfScrollableElement(request.targetPath)) {\n if (request.target && request.target.nodeType === 1) {\n const className = request.target.className;\n if (className && /\\b(slider|scrollbar)\\b/.test(className)) {\n const possibleLineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\n const maxColumn = ctx.viewModel.getLineMaxColumn(possibleLineNumber);\n return request.fulfillScrollbar(new Position(possibleLineNumber, maxColumn));\n }\n }\n }\n return null;\n }\n static _hitTestScrollbar(ctx, request) {\n // Is it the overview ruler?\n // Is it a child of the scrollable element?\n if (ElementPath.isChildOfScrollableElement(request.targetPath)) {\n const possibleLineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\n const maxColumn = ctx.viewModel.getLineMaxColumn(possibleLineNumber);\n return request.fulfillScrollbar(new Position(possibleLineNumber, maxColumn));\n }\n return null;\n }\n getMouseColumn(relativePos) {\n const options = this._context.configuration.options;\n const layoutInfo = options.get(143 /* EditorOption.layoutInfo */);\n const mouseContentHorizontalOffset = this._context.viewLayout.getCurrentScrollLeft() + relativePos.x - layoutInfo.contentLeft;\n return MouseTargetFactory._getMouseColumn(mouseContentHorizontalOffset, options.get(50 /* EditorOption.fontInfo */).typicalHalfwidthCharacterWidth);\n }\n static _getMouseColumn(mouseContentHorizontalOffset, typicalHalfwidthCharacterWidth) {\n if (mouseContentHorizontalOffset < 0) {\n return 1;\n }\n const chars = Math.round(mouseContentHorizontalOffset / typicalHalfwidthCharacterWidth);\n return (chars + 1);\n }\n static createMouseTargetFromHitTestPosition(ctx, request, spanNode, pos, injectedText) {\n const lineNumber = pos.lineNumber;\n const column = pos.column;\n const lineWidth = ctx.getLineWidth(lineNumber);\n if (request.mouseContentHorizontalOffset > lineWidth) {\n const detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth);\n return request.fulfillContentEmpty(pos, detail);\n }\n const visibleRange = ctx.visibleRangeForPosition(lineNumber, column);\n if (!visibleRange) {\n return request.fulfillUnknown(pos);\n }\n const columnHorizontalOffset = visibleRange.left;\n if (Math.abs(request.mouseContentHorizontalOffset - columnHorizontalOffset) < 1) {\n return request.fulfillContentText(pos, null, { mightBeForeignElement: !!injectedText, injectedText });\n }\n const points = [];\n points.push({ offset: visibleRange.left, column: column });\n if (column > 1) {\n const visibleRange = ctx.visibleRangeForPosition(lineNumber, column - 1);\n if (visibleRange) {\n points.push({ offset: visibleRange.left, column: column - 1 });\n }\n }\n const lineMaxColumn = ctx.viewModel.getLineMaxColumn(lineNumber);\n if (column < lineMaxColumn) {\n const visibleRange = ctx.visibleRangeForPosition(lineNumber, column + 1);\n if (visibleRange) {\n points.push({ offset: visibleRange.left, column: column + 1 });\n }\n }\n points.sort((a, b) => a.offset - b.offset);\n const mouseCoordinates = request.pos.toClientCoordinates(dom.getWindow(ctx.viewDomNode));\n const spanNodeClientRect = spanNode.getBoundingClientRect();\n const mouseIsOverSpanNode = (spanNodeClientRect.left <= mouseCoordinates.clientX && mouseCoordinates.clientX <= spanNodeClientRect.right);\n let rng = null;\n for (let i = 1; i < points.length; i++) {\n const prev = points[i - 1];\n const curr = points[i];\n if (prev.offset <= request.mouseContentHorizontalOffset && request.mouseContentHorizontalOffset <= curr.offset) {\n rng = new EditorRange(lineNumber, prev.column, lineNumber, curr.column);\n // See https://github.com/microsoft/vscode/issues/152819\n // Due to the use of zwj, the browser's hit test result is skewed towards the left\n // Here we try to correct that if the mouse horizontal offset is closer to the right than the left\n const prevDelta = Math.abs(prev.offset - request.mouseContentHorizontalOffset);\n const nextDelta = Math.abs(curr.offset - request.mouseContentHorizontalOffset);\n pos = (prevDelta < nextDelta\n ? new Position(lineNumber, prev.column)\n : new Position(lineNumber, curr.column));\n break;\n }\n }\n return request.fulfillContentText(pos, rng, { mightBeForeignElement: !mouseIsOverSpanNode || !!injectedText, injectedText });\n }\n /**\n * Most probably WebKit browsers and Edge\n */\n static _doHitTestWithCaretRangeFromPoint(ctx, request) {\n // In Chrome, especially on Linux it is possible to click between lines,\n // so try to adjust the `hity` below so that it lands in the center of a line\n const lineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\n const lineStartVerticalOffset = ctx.getVerticalOffsetForLineNumber(lineNumber);\n const lineEndVerticalOffset = lineStartVerticalOffset + ctx.lineHeight;\n const isBelowLastLine = (lineNumber === ctx.viewModel.getLineCount()\n && request.mouseVerticalOffset > lineEndVerticalOffset);\n if (!isBelowLastLine) {\n const lineCenteredVerticalOffset = Math.floor((lineStartVerticalOffset + lineEndVerticalOffset) / 2);\n let adjustedPageY = request.pos.y + (lineCenteredVerticalOffset - request.mouseVerticalOffset);\n if (adjustedPageY <= request.editorPos.y) {\n adjustedPageY = request.editorPos.y + 1;\n }\n if (adjustedPageY >= request.editorPos.y + request.editorPos.height) {\n adjustedPageY = request.editorPos.y + request.editorPos.height - 1;\n }\n const adjustedPage = new PageCoordinates(request.pos.x, adjustedPageY);\n const r = this._actualDoHitTestWithCaretRangeFromPoint(ctx, adjustedPage.toClientCoordinates(dom.getWindow(ctx.viewDomNode)));\n if (r.type === 1 /* HitTestResultType.Content */) {\n return r;\n }\n }\n // Also try to hit test without the adjustment (for the edge cases that we are near the top or bottom)\n return this._actualDoHitTestWithCaretRangeFromPoint(ctx, request.pos.toClientCoordinates(dom.getWindow(ctx.viewDomNode)));\n }\n static _actualDoHitTestWithCaretRangeFromPoint(ctx, coords) {\n const shadowRoot = dom.getShadowRoot(ctx.viewDomNode);\n let range;\n if (shadowRoot) {\n if (typeof shadowRoot.caretRangeFromPoint === 'undefined') {\n range = shadowCaretRangeFromPoint(shadowRoot, coords.clientX, coords.clientY);\n }\n else {\n range = shadowRoot.caretRangeFromPoint(coords.clientX, coords.clientY);\n }\n }\n else {\n range = ctx.viewDomNode.ownerDocument.caretRangeFromPoint(coords.clientX, coords.clientY);\n }\n if (!range || !range.startContainer) {\n return new UnknownHitTestResult();\n }\n // Chrome always hits a TEXT_NODE, while Edge sometimes hits a token span\n const startContainer = range.startContainer;\n if (startContainer.nodeType === startContainer.TEXT_NODE) {\n // startContainer is expected to be the token text\n const parent1 = startContainer.parentNode; // expected to be the token span\n const parent2 = parent1 ? parent1.parentNode : null; // expected to be the view line container span\n const parent3 = parent2 ? parent2.parentNode : null; // expected to be the view line div\n const parent3ClassName = parent3 && parent3.nodeType === parent3.ELEMENT_NODE ? parent3.className : null;\n if (parent3ClassName === ViewLine.CLASS_NAME) {\n return HitTestResult.createFromDOMInfo(ctx, parent1, range.startOffset);\n }\n else {\n return new UnknownHitTestResult(startContainer.parentNode);\n }\n }\n else if (startContainer.nodeType === startContainer.ELEMENT_NODE) {\n // startContainer is expected to be the token span\n const parent1 = startContainer.parentNode; // expected to be the view line container span\n const parent2 = parent1 ? parent1.parentNode : null; // expected to be the view line div\n const parent2ClassName = parent2 && parent2.nodeType === parent2.ELEMENT_NODE ? parent2.className : null;\n if (parent2ClassName === ViewLine.CLASS_NAME) {\n return HitTestResult.createFromDOMInfo(ctx, startContainer, startContainer.textContent.length);\n }\n else {\n return new UnknownHitTestResult(startContainer);\n }\n }\n return new UnknownHitTestResult();\n }\n /**\n * Most probably Gecko\n */\n static _doHitTestWithCaretPositionFromPoint(ctx, coords) {\n const hitResult = ctx.viewDomNode.ownerDocument.caretPositionFromPoint(coords.clientX, coords.clientY);\n if (hitResult.offsetNode.nodeType === hitResult.offsetNode.TEXT_NODE) {\n // offsetNode is expected to be the token text\n const parent1 = hitResult.offsetNode.parentNode; // expected to be the token span\n const parent2 = parent1 ? parent1.parentNode : null; // expected to be the view line container span\n const parent3 = parent2 ? parent2.parentNode : null; // expected to be the view line div\n const parent3ClassName = parent3 && parent3.nodeType === parent3.ELEMENT_NODE ? parent3.className : null;\n if (parent3ClassName === ViewLine.CLASS_NAME) {\n return HitTestResult.createFromDOMInfo(ctx, hitResult.offsetNode.parentNode, hitResult.offset);\n }\n else {\n return new UnknownHitTestResult(hitResult.offsetNode.parentNode);\n }\n }\n // For inline decorations, Gecko sometimes returns the `` of the line and the offset is the `` with the inline decoration\n // Some other times, it returns the `` with the inline decoration\n if (hitResult.offsetNode.nodeType === hitResult.offsetNode.ELEMENT_NODE) {\n const parent1 = hitResult.offsetNode.parentNode;\n const parent1ClassName = parent1 && parent1.nodeType === parent1.ELEMENT_NODE ? parent1.className : null;\n const parent2 = parent1 ? parent1.parentNode : null;\n const parent2ClassName = parent2 && parent2.nodeType === parent2.ELEMENT_NODE ? parent2.className : null;\n if (parent1ClassName === ViewLine.CLASS_NAME) {\n // it returned the `` of the line and the offset is the `` with the inline decoration\n const tokenSpan = hitResult.offsetNode.childNodes[Math.min(hitResult.offset, hitResult.offsetNode.childNodes.length - 1)];\n if (tokenSpan) {\n return HitTestResult.createFromDOMInfo(ctx, tokenSpan, 0);\n }\n }\n else if (parent2ClassName === ViewLine.CLASS_NAME) {\n // it returned the `` with the inline decoration\n return HitTestResult.createFromDOMInfo(ctx, hitResult.offsetNode, 0);\n }\n }\n return new UnknownHitTestResult(hitResult.offsetNode);\n }\n static _snapToSoftTabBoundary(position, viewModel) {\n const lineContent = viewModel.getLineContent(position.lineNumber);\n const { tabSize } = viewModel.model.getOptions();\n const newPosition = AtomicTabMoveOperations.atomicPosition(lineContent, position.column - 1, tabSize, 2 /* Direction.Nearest */);\n if (newPosition !== -1) {\n return new Position(position.lineNumber, newPosition + 1);\n }\n return position;\n }\n static _doHitTest(ctx, request) {\n let result = new UnknownHitTestResult();\n if (typeof ctx.viewDomNode.ownerDocument.caretRangeFromPoint === 'function') {\n result = this._doHitTestWithCaretRangeFromPoint(ctx, request);\n }\n else if (ctx.viewDomNode.ownerDocument.caretPositionFromPoint) {\n result = this._doHitTestWithCaretPositionFromPoint(ctx, request.pos.toClientCoordinates(dom.getWindow(ctx.viewDomNode)));\n }\n if (result.type === 1 /* HitTestResultType.Content */) {\n const injectedText = ctx.viewModel.getInjectedTextAt(result.position);\n const normalizedPosition = ctx.viewModel.normalizePosition(result.position, 2 /* PositionAffinity.None */);\n if (injectedText || !normalizedPosition.equals(result.position)) {\n result = new ContentHitTestResult(normalizedPosition, result.spanNode, injectedText);\n }\n }\n return result;\n }\n}\nfunction shadowCaretRangeFromPoint(shadowRoot, x, y) {\n const range = document.createRange();\n // Get the element under the point\n let el = shadowRoot.elementFromPoint(x, y);\n if (el !== null) {\n // Get the last child of the element until its firstChild is a text node\n // This assumes that the pointer is on the right of the line, out of the tokens\n // and that we want to get the offset of the last token of the line\n while (el && el.firstChild && el.firstChild.nodeType !== el.firstChild.TEXT_NODE && el.lastChild && el.lastChild.firstChild) {\n el = el.lastChild;\n }\n // Grab its rect\n const rect = el.getBoundingClientRect();\n // And its font (the computed shorthand font property might be empty, see #3217)\n const elWindow = dom.getWindow(el);\n const fontStyle = elWindow.getComputedStyle(el, null).getPropertyValue('font-style');\n const fontVariant = elWindow.getComputedStyle(el, null).getPropertyValue('font-variant');\n const fontWeight = elWindow.getComputedStyle(el, null).getPropertyValue('font-weight');\n const fontSize = elWindow.getComputedStyle(el, null).getPropertyValue('font-size');\n const lineHeight = elWindow.getComputedStyle(el, null).getPropertyValue('line-height');\n const fontFamily = elWindow.getComputedStyle(el, null).getPropertyValue('font-family');\n const font = `${fontStyle} ${fontVariant} ${fontWeight} ${fontSize}/${lineHeight} ${fontFamily}`;\n // And also its txt content\n const text = el.innerText;\n // Position the pixel cursor at the left of the element\n let pixelCursor = rect.left;\n let offset = 0;\n let step;\n // If the point is on the right of the box put the cursor after the last character\n if (x > rect.left + rect.width) {\n offset = text.length;\n }\n else {\n const charWidthReader = CharWidthReader.getInstance();\n // Goes through all the characters of the innerText, and checks if the x of the point\n // belongs to the character.\n for (let i = 0; i < text.length + 1; i++) {\n // The step is half the width of the character\n step = charWidthReader.getCharWidth(text.charAt(i), font) / 2;\n // Move to the center of the character\n pixelCursor += step;\n // If the x of the point is smaller that the position of the cursor, the point is over that character\n if (x < pixelCursor) {\n offset = i;\n break;\n }\n // Move between the current character and the next\n pixelCursor += step;\n }\n }\n // Creates a range with the text node of the element and set the offset found\n range.setStart(el.firstChild, offset);\n range.setEnd(el.firstChild, offset);\n }\n return range;\n}\nclass CharWidthReader {\n static getInstance() {\n if (!CharWidthReader._INSTANCE) {\n CharWidthReader._INSTANCE = new CharWidthReader();\n }\n return CharWidthReader._INSTANCE;\n }\n constructor() {\n this._cache = {};\n this._canvas = document.createElement('canvas');\n }\n getCharWidth(char, font) {\n const cacheKey = char + font;\n if (this._cache[cacheKey]) {\n return this._cache[cacheKey];\n }\n const context = this._canvas.getContext('2d');\n context.font = font;\n const metrics = context.measureText(char);\n const width = metrics.width;\n this._cache[cacheKey] = width;\n return width;\n }\n}\nCharWidthReader._INSTANCE = null;\n", "export function memoize(_target, key, descriptor) {\n let fnKey = null;\n let fn = null;\n if (typeof descriptor.value === 'function') {\n fnKey = 'value';\n fn = descriptor.value;\n if (fn.length !== 0) {\n console.warn('Memoize should only be used in functions with zero parameters');\n }\n }\n else if (typeof descriptor.get === 'function') {\n fnKey = 'get';\n fn = descriptor.get;\n }\n if (!fn) {\n throw new Error('not supported');\n }\n const memoizeKey = `$memoize$${key}`;\n descriptor[fnKey] = function (...args) {\n if (!this.hasOwnProperty(memoizeKey)) {\n Object.defineProperty(this, memoizeKey, {\n configurable: false,\n enumerable: false,\n writable: false,\n value: fn.apply(this, args)\n });\n }\n return this[memoizeKey];\n };\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport * as DomUtils from './dom.js';\nimport { mainWindow } from './window.js';\nimport * as arrays from '../common/arrays.js';\nimport { memoize } from '../common/decorators.js';\nimport { Event as EventUtils } from '../common/event.js';\nimport { Disposable, markAsSingleton, toDisposable } from '../common/lifecycle.js';\nimport { LinkedList } from '../common/linkedList.js';\nexport var EventType;\n(function (EventType) {\n EventType.Tap = '-monaco-gesturetap';\n EventType.Change = '-monaco-gesturechange';\n EventType.Start = '-monaco-gesturestart';\n EventType.End = '-monaco-gesturesend';\n EventType.Contextmenu = '-monaco-gesturecontextmenu';\n})(EventType || (EventType = {}));\nexport class Gesture extends Disposable {\n constructor() {\n super();\n this.dispatched = false;\n this.targets = new LinkedList();\n this.ignoreTargets = new LinkedList();\n this.activeTouches = {};\n this.handle = null;\n this._lastSetTapCountTime = 0;\n this._register(EventUtils.runAndSubscribe(DomUtils.onDidRegisterWindow, ({ window, disposables }) => {\n disposables.add(DomUtils.addDisposableListener(window.document, 'touchstart', (e) => this.onTouchStart(e), { passive: false }));\n disposables.add(DomUtils.addDisposableListener(window.document, 'touchend', (e) => this.onTouchEnd(window, e)));\n disposables.add(DomUtils.addDisposableListener(window.document, 'touchmove', (e) => this.onTouchMove(e), { passive: false }));\n }, { window: mainWindow, disposables: this._store }));\n }\n static addTarget(element) {\n if (!Gesture.isTouchDevice()) {\n return Disposable.None;\n }\n if (!Gesture.INSTANCE) {\n Gesture.INSTANCE = markAsSingleton(new Gesture());\n }\n const remove = Gesture.INSTANCE.targets.push(element);\n return toDisposable(remove);\n }\n static ignoreTarget(element) {\n if (!Gesture.isTouchDevice()) {\n return Disposable.None;\n }\n if (!Gesture.INSTANCE) {\n Gesture.INSTANCE = markAsSingleton(new Gesture());\n }\n const remove = Gesture.INSTANCE.ignoreTargets.push(element);\n return toDisposable(remove);\n }\n static isTouchDevice() {\n // `'ontouchstart' in window` always evaluates to true with typescript's modern typings. This causes `window` to be\n // `never` later in `window.navigator`. That's why we need the explicit `window as Window` cast\n return 'ontouchstart' in mainWindow || navigator.maxTouchPoints > 0;\n }\n dispose() {\n if (this.handle) {\n this.handle.dispose();\n this.handle = null;\n }\n super.dispose();\n }\n onTouchStart(e) {\n const timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based.\n if (this.handle) {\n this.handle.dispose();\n this.handle = null;\n }\n for (let i = 0, len = e.targetTouches.length; i < len; i++) {\n const touch = e.targetTouches.item(i);\n this.activeTouches[touch.identifier] = {\n id: touch.identifier,\n initialTarget: touch.target,\n initialTimeStamp: timestamp,\n initialPageX: touch.pageX,\n initialPageY: touch.pageY,\n rollingTimestamps: [timestamp],\n rollingPageX: [touch.pageX],\n rollingPageY: [touch.pageY]\n };\n const evt = this.newGestureEvent(EventType.Start, touch.target);\n evt.pageX = touch.pageX;\n evt.pageY = touch.pageY;\n this.dispatchEvent(evt);\n }\n if (this.dispatched) {\n e.preventDefault();\n e.stopPropagation();\n this.dispatched = false;\n }\n }\n onTouchEnd(targetWindow, e) {\n const timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based.\n const activeTouchCount = Object.keys(this.activeTouches).length;\n for (let i = 0, len = e.changedTouches.length; i < len; i++) {\n const touch = e.changedTouches.item(i);\n if (!this.activeTouches.hasOwnProperty(String(touch.identifier))) {\n console.warn('move of an UNKNOWN touch', touch);\n continue;\n }\n const data = this.activeTouches[touch.identifier], holdTime = Date.now() - data.initialTimeStamp;\n if (holdTime < Gesture.HOLD_DELAY\n && Math.abs(data.initialPageX - arrays.tail(data.rollingPageX)) < 30\n && Math.abs(data.initialPageY - arrays.tail(data.rollingPageY)) < 30) {\n const evt = this.newGestureEvent(EventType.Tap, data.initialTarget);\n evt.pageX = arrays.tail(data.rollingPageX);\n evt.pageY = arrays.tail(data.rollingPageY);\n this.dispatchEvent(evt);\n }\n else if (holdTime >= Gesture.HOLD_DELAY\n && Math.abs(data.initialPageX - arrays.tail(data.rollingPageX)) < 30\n && Math.abs(data.initialPageY - arrays.tail(data.rollingPageY)) < 30) {\n const evt = this.newGestureEvent(EventType.Contextmenu, data.initialTarget);\n evt.pageX = arrays.tail(data.rollingPageX);\n evt.pageY = arrays.tail(data.rollingPageY);\n this.dispatchEvent(evt);\n }\n else if (activeTouchCount === 1) {\n const finalX = arrays.tail(data.rollingPageX);\n const finalY = arrays.tail(data.rollingPageY);\n const deltaT = arrays.tail(data.rollingTimestamps) - data.rollingTimestamps[0];\n const deltaX = finalX - data.rollingPageX[0];\n const deltaY = finalY - data.rollingPageY[0];\n // We need to get all the dispatch targets on the start of the inertia event\n const dispatchTo = [...this.targets].filter(t => data.initialTarget instanceof Node && t.contains(data.initialTarget));\n this.inertia(targetWindow, dispatchTo, timestamp, // time now\n Math.abs(deltaX) / deltaT, // speed\n deltaX > 0 ? 1 : -1, // x direction\n finalX, // x now\n Math.abs(deltaY) / deltaT, // y speed\n deltaY > 0 ? 1 : -1, // y direction\n finalY // y now\n );\n }\n this.dispatchEvent(this.newGestureEvent(EventType.End, data.initialTarget));\n // forget about this touch\n delete this.activeTouches[touch.identifier];\n }\n if (this.dispatched) {\n e.preventDefault();\n e.stopPropagation();\n this.dispatched = false;\n }\n }\n newGestureEvent(type, initialTarget) {\n const event = document.createEvent('CustomEvent');\n event.initEvent(type, false, true);\n event.initialTarget = initialTarget;\n event.tapCount = 0;\n return event;\n }\n dispatchEvent(event) {\n if (event.type === EventType.Tap) {\n const currentTime = (new Date()).getTime();\n let setTapCount = 0;\n if (currentTime - this._lastSetTapCountTime > Gesture.CLEAR_TAP_COUNT_TIME) {\n setTapCount = 1;\n }\n else {\n setTapCount = 2;\n }\n this._lastSetTapCountTime = currentTime;\n event.tapCount = setTapCount;\n }\n else if (event.type === EventType.Change || event.type === EventType.Contextmenu) {\n // tap is canceled by scrolling or context menu\n this._lastSetTapCountTime = 0;\n }\n if (event.initialTarget instanceof Node) {\n for (const ignoreTarget of this.ignoreTargets) {\n if (ignoreTarget.contains(event.initialTarget)) {\n return;\n }\n }\n for (const target of this.targets) {\n if (target.contains(event.initialTarget)) {\n target.dispatchEvent(event);\n this.dispatched = true;\n }\n }\n }\n }\n inertia(targetWindow, dispatchTo, t1, vX, dirX, x, vY, dirY, y) {\n this.handle = DomUtils.scheduleAtNextAnimationFrame(targetWindow, () => {\n const now = Date.now();\n // velocity: old speed + accel_over_time\n const deltaT = now - t1;\n let delta_pos_x = 0, delta_pos_y = 0;\n let stopped = true;\n vX += Gesture.SCROLL_FRICTION * deltaT;\n vY += Gesture.SCROLL_FRICTION * deltaT;\n if (vX > 0) {\n stopped = false;\n delta_pos_x = dirX * vX * deltaT;\n }\n if (vY > 0) {\n stopped = false;\n delta_pos_y = dirY * vY * deltaT;\n }\n // dispatch translation event\n const evt = this.newGestureEvent(EventType.Change);\n evt.translationX = delta_pos_x;\n evt.translationY = delta_pos_y;\n dispatchTo.forEach(d => d.dispatchEvent(evt));\n if (!stopped) {\n this.inertia(targetWindow, dispatchTo, now, vX, dirX, x + delta_pos_x, vY, dirY, y + delta_pos_y);\n }\n });\n }\n onTouchMove(e) {\n const timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based.\n for (let i = 0, len = e.changedTouches.length; i < len; i++) {\n const touch = e.changedTouches.item(i);\n if (!this.activeTouches.hasOwnProperty(String(touch.identifier))) {\n console.warn('end of an UNKNOWN touch', touch);\n continue;\n }\n const data = this.activeTouches[touch.identifier];\n const evt = this.newGestureEvent(EventType.Change, data.initialTarget);\n evt.translationX = touch.pageX - arrays.tail(data.rollingPageX);\n evt.translationY = touch.pageY - arrays.tail(data.rollingPageY);\n evt.pageX = touch.pageX;\n evt.pageY = touch.pageY;\n this.dispatchEvent(evt);\n // only keep a few data points, to average the final speed\n if (data.rollingPageX.length > 3) {\n data.rollingPageX.shift();\n data.rollingPageY.shift();\n data.rollingTimestamps.shift();\n }\n data.rollingPageX.push(touch.pageX);\n data.rollingPageY.push(touch.pageY);\n data.rollingTimestamps.push(timestamp);\n }\n if (this.dispatched) {\n e.preventDefault();\n e.stopPropagation();\n this.dispatched = false;\n }\n }\n}\nGesture.SCROLL_FRICTION = -0.005;\nGesture.HOLD_DELAY = 700;\nGesture.CLEAR_TAP_COUNT_TIME = 400; // ms\n__decorate([\n memoize\n], Gesture, \"isTouchDevice\", null);\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as dom from '../dom.js';\nimport { StandardKeyboardEvent } from '../keyboardEvent.js';\nimport { StandardMouseEvent } from '../mouseEvent.js';\nimport { Gesture } from '../touch.js';\nimport { Disposable } from '../../common/lifecycle.js';\nexport class Widget extends Disposable {\n onclick(domNode, listener) {\n this._register(dom.addDisposableListener(domNode, dom.EventType.CLICK, (e) => listener(new StandardMouseEvent(dom.getWindow(domNode), e))));\n }\n onmousedown(domNode, listener) {\n this._register(dom.addDisposableListener(domNode, dom.EventType.MOUSE_DOWN, (e) => listener(new StandardMouseEvent(dom.getWindow(domNode), e))));\n }\n onmouseover(domNode, listener) {\n this._register(dom.addDisposableListener(domNode, dom.EventType.MOUSE_OVER, (e) => listener(new StandardMouseEvent(dom.getWindow(domNode), e))));\n }\n onmouseleave(domNode, listener) {\n this._register(dom.addDisposableListener(domNode, dom.EventType.MOUSE_LEAVE, (e) => listener(new StandardMouseEvent(dom.getWindow(domNode), e))));\n }\n onkeydown(domNode, listener) {\n this._register(dom.addDisposableListener(domNode, dom.EventType.KEY_DOWN, (e) => listener(new StandardKeyboardEvent(e))));\n }\n onkeyup(domNode, listener) {\n this._register(dom.addDisposableListener(domNode, dom.EventType.KEY_UP, (e) => listener(new StandardKeyboardEvent(e))));\n }\n oninput(domNode, listener) {\n this._register(dom.addDisposableListener(domNode, dom.EventType.INPUT, listener));\n }\n onblur(domNode, listener) {\n this._register(dom.addDisposableListener(domNode, dom.EventType.BLUR, listener));\n }\n onfocus(domNode, listener) {\n this._register(dom.addDisposableListener(domNode, dom.EventType.FOCUS, listener));\n }\n ignoreGesture(domNode) {\n return Gesture.ignoreTarget(domNode);\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { GlobalPointerMoveMonitor } from '../../globalPointerMoveMonitor.js';\nimport { Widget } from '../widget.js';\nimport { TimeoutTimer } from '../../../common/async.js';\nimport { ThemeIcon } from '../../../common/themables.js';\nimport * as dom from '../../dom.js';\n/**\n * The arrow image size.\n */\nexport const ARROW_IMG_SIZE = 11;\nexport class ScrollbarArrow extends Widget {\n constructor(opts) {\n super();\n this._onActivate = opts.onActivate;\n this.bgDomNode = document.createElement('div');\n this.bgDomNode.className = 'arrow-background';\n this.bgDomNode.style.position = 'absolute';\n this.bgDomNode.style.width = opts.bgWidth + 'px';\n this.bgDomNode.style.height = opts.bgHeight + 'px';\n if (typeof opts.top !== 'undefined') {\n this.bgDomNode.style.top = '0px';\n }\n if (typeof opts.left !== 'undefined') {\n this.bgDomNode.style.left = '0px';\n }\n if (typeof opts.bottom !== 'undefined') {\n this.bgDomNode.style.bottom = '0px';\n }\n if (typeof opts.right !== 'undefined') {\n this.bgDomNode.style.right = '0px';\n }\n this.domNode = document.createElement('div');\n this.domNode.className = opts.className;\n this.domNode.classList.add(...ThemeIcon.asClassNameArray(opts.icon));\n this.domNode.style.position = 'absolute';\n this.domNode.style.width = ARROW_IMG_SIZE + 'px';\n this.domNode.style.height = ARROW_IMG_SIZE + 'px';\n if (typeof opts.top !== 'undefined') {\n this.domNode.style.top = opts.top + 'px';\n }\n if (typeof opts.left !== 'undefined') {\n this.domNode.style.left = opts.left + 'px';\n }\n if (typeof opts.bottom !== 'undefined') {\n this.domNode.style.bottom = opts.bottom + 'px';\n }\n if (typeof opts.right !== 'undefined') {\n this.domNode.style.right = opts.right + 'px';\n }\n this._pointerMoveMonitor = this._register(new GlobalPointerMoveMonitor());\n this._register(dom.addStandardDisposableListener(this.bgDomNode, dom.EventType.POINTER_DOWN, (e) => this._arrowPointerDown(e)));\n this._register(dom.addStandardDisposableListener(this.domNode, dom.EventType.POINTER_DOWN, (e) => this._arrowPointerDown(e)));\n this._pointerdownRepeatTimer = this._register(new dom.WindowIntervalTimer());\n this._pointerdownScheduleRepeatTimer = this._register(new TimeoutTimer());\n }\n _arrowPointerDown(e) {\n if (!e.target || !(e.target instanceof Element)) {\n return;\n }\n const scheduleRepeater = () => {\n this._pointerdownRepeatTimer.cancelAndSet(() => this._onActivate(), 1000 / 24, dom.getWindow(e));\n };\n this._onActivate();\n this._pointerdownRepeatTimer.cancel();\n this._pointerdownScheduleRepeatTimer.cancelAndSet(scheduleRepeater, 200);\n this._pointerMoveMonitor.startMonitoring(e.target, e.pointerId, e.buttons, (pointerMoveData) => { }, () => {\n this._pointerdownRepeatTimer.cancel();\n this._pointerdownScheduleRepeatTimer.cancel();\n });\n e.preventDefault();\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { TimeoutTimer } from '../../../common/async.js';\nimport { Disposable } from '../../../common/lifecycle.js';\nexport class ScrollbarVisibilityController extends Disposable {\n constructor(visibility, visibleClassName, invisibleClassName) {\n super();\n this._visibility = visibility;\n this._visibleClassName = visibleClassName;\n this._invisibleClassName = invisibleClassName;\n this._domNode = null;\n this._isVisible = false;\n this._isNeeded = false;\n this._rawShouldBeVisible = false;\n this._shouldBeVisible = false;\n this._revealTimer = this._register(new TimeoutTimer());\n }\n setVisibility(visibility) {\n if (this._visibility !== visibility) {\n this._visibility = visibility;\n this._updateShouldBeVisible();\n }\n }\n // ----------------- Hide / Reveal\n setShouldBeVisible(rawShouldBeVisible) {\n this._rawShouldBeVisible = rawShouldBeVisible;\n this._updateShouldBeVisible();\n }\n _applyVisibilitySetting() {\n if (this._visibility === 2 /* ScrollbarVisibility.Hidden */) {\n return false;\n }\n if (this._visibility === 3 /* ScrollbarVisibility.Visible */) {\n return true;\n }\n return this._rawShouldBeVisible;\n }\n _updateShouldBeVisible() {\n const shouldBeVisible = this._applyVisibilitySetting();\n if (this._shouldBeVisible !== shouldBeVisible) {\n this._shouldBeVisible = shouldBeVisible;\n this.ensureVisibility();\n }\n }\n setIsNeeded(isNeeded) {\n if (this._isNeeded !== isNeeded) {\n this._isNeeded = isNeeded;\n this.ensureVisibility();\n }\n }\n setDomNode(domNode) {\n this._domNode = domNode;\n this._domNode.setClassName(this._invisibleClassName);\n // Now that the flags & the dom node are in a consistent state, ensure the Hidden/Visible configuration\n this.setShouldBeVisible(false);\n }\n ensureVisibility() {\n if (!this._isNeeded) {\n // Nothing to be rendered\n this._hide(false);\n return;\n }\n if (this._shouldBeVisible) {\n this._reveal();\n }\n else {\n this._hide(true);\n }\n }\n _reveal() {\n if (this._isVisible) {\n return;\n }\n this._isVisible = true;\n // The CSS animation doesn't play otherwise\n this._revealTimer.setIfNotSet(() => {\n var _a;\n (_a = this._domNode) === null || _a === void 0 ? void 0 : _a.setClassName(this._visibleClassName);\n }, 0);\n }\n _hide(withFadeAway) {\n var _a;\n this._revealTimer.cancel();\n if (!this._isVisible) {\n return;\n }\n this._isVisible = false;\n (_a = this._domNode) === null || _a === void 0 ? void 0 : _a.setClassName(this._invisibleClassName + (withFadeAway ? ' fade' : ''));\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as dom from '../../dom.js';\nimport { createFastDomNode } from '../../fastDomNode.js';\nimport { GlobalPointerMoveMonitor } from '../../globalPointerMoveMonitor.js';\nimport { ScrollbarArrow } from './scrollbarArrow.js';\nimport { ScrollbarVisibilityController } from './scrollbarVisibilityController.js';\nimport { Widget } from '../widget.js';\nimport * as platform from '../../../common/platform.js';\n/**\n * The orthogonal distance to the slider at which dragging \"resets\". This implements \"snapping\"\n */\nconst POINTER_DRAG_RESET_DISTANCE = 140;\nexport class AbstractScrollbar extends Widget {\n constructor(opts) {\n super();\n this._lazyRender = opts.lazyRender;\n this._host = opts.host;\n this._scrollable = opts.scrollable;\n this._scrollByPage = opts.scrollByPage;\n this._scrollbarState = opts.scrollbarState;\n this._visibilityController = this._register(new ScrollbarVisibilityController(opts.visibility, 'visible scrollbar ' + opts.extraScrollbarClassName, 'invisible scrollbar ' + opts.extraScrollbarClassName));\n this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded());\n this._pointerMoveMonitor = this._register(new GlobalPointerMoveMonitor());\n this._shouldRender = true;\n this.domNode = createFastDomNode(document.createElement('div'));\n this.domNode.setAttribute('role', 'presentation');\n this.domNode.setAttribute('aria-hidden', 'true');\n this._visibilityController.setDomNode(this.domNode);\n this.domNode.setPosition('absolute');\n this._register(dom.addDisposableListener(this.domNode.domNode, dom.EventType.POINTER_DOWN, (e) => this._domNodePointerDown(e)));\n }\n // ----------------- creation\n /**\n * Creates the dom node for an arrow & adds it to the container\n */\n _createArrow(opts) {\n const arrow = this._register(new ScrollbarArrow(opts));\n this.domNode.domNode.appendChild(arrow.bgDomNode);\n this.domNode.domNode.appendChild(arrow.domNode);\n }\n /**\n * Creates the slider dom node, adds it to the container & hooks up the events\n */\n _createSlider(top, left, width, height) {\n this.slider = createFastDomNode(document.createElement('div'));\n this.slider.setClassName('slider');\n this.slider.setPosition('absolute');\n this.slider.setTop(top);\n this.slider.setLeft(left);\n if (typeof width === 'number') {\n this.slider.setWidth(width);\n }\n if (typeof height === 'number') {\n this.slider.setHeight(height);\n }\n this.slider.setLayerHinting(true);\n this.slider.setContain('strict');\n this.domNode.domNode.appendChild(this.slider.domNode);\n this._register(dom.addDisposableListener(this.slider.domNode, dom.EventType.POINTER_DOWN, (e) => {\n if (e.button === 0) {\n e.preventDefault();\n this._sliderPointerDown(e);\n }\n }));\n this.onclick(this.slider.domNode, e => {\n if (e.leftButton) {\n e.stopPropagation();\n }\n });\n }\n // ----------------- Update state\n _onElementSize(visibleSize) {\n if (this._scrollbarState.setVisibleSize(visibleSize)) {\n this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded());\n this._shouldRender = true;\n if (!this._lazyRender) {\n this.render();\n }\n }\n return this._shouldRender;\n }\n _onElementScrollSize(elementScrollSize) {\n if (this._scrollbarState.setScrollSize(elementScrollSize)) {\n this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded());\n this._shouldRender = true;\n if (!this._lazyRender) {\n this.render();\n }\n }\n return this._shouldRender;\n }\n _onElementScrollPosition(elementScrollPosition) {\n if (this._scrollbarState.setScrollPosition(elementScrollPosition)) {\n this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded());\n this._shouldRender = true;\n if (!this._lazyRender) {\n this.render();\n }\n }\n return this._shouldRender;\n }\n // ----------------- rendering\n beginReveal() {\n this._visibilityController.setShouldBeVisible(true);\n }\n beginHide() {\n this._visibilityController.setShouldBeVisible(false);\n }\n render() {\n if (!this._shouldRender) {\n return;\n }\n this._shouldRender = false;\n this._renderDomNode(this._scrollbarState.getRectangleLargeSize(), this._scrollbarState.getRectangleSmallSize());\n this._updateSlider(this._scrollbarState.getSliderSize(), this._scrollbarState.getArrowSize() + this._scrollbarState.getSliderPosition());\n }\n // ----------------- DOM events\n _domNodePointerDown(e) {\n if (e.target !== this.domNode.domNode) {\n return;\n }\n this._onPointerDown(e);\n }\n delegatePointerDown(e) {\n const domTop = this.domNode.domNode.getClientRects()[0].top;\n const sliderStart = domTop + this._scrollbarState.getSliderPosition();\n const sliderStop = domTop + this._scrollbarState.getSliderPosition() + this._scrollbarState.getSliderSize();\n const pointerPos = this._sliderPointerPosition(e);\n if (sliderStart <= pointerPos && pointerPos <= sliderStop) {\n // Act as if it was a pointer down on the slider\n if (e.button === 0) {\n e.preventDefault();\n this._sliderPointerDown(e);\n }\n }\n else {\n // Act as if it was a pointer down on the scrollbar\n this._onPointerDown(e);\n }\n }\n _onPointerDown(e) {\n let offsetX;\n let offsetY;\n if (e.target === this.domNode.domNode && typeof e.offsetX === 'number' && typeof e.offsetY === 'number') {\n offsetX = e.offsetX;\n offsetY = e.offsetY;\n }\n else {\n const domNodePosition = dom.getDomNodePagePosition(this.domNode.domNode);\n offsetX = e.pageX - domNodePosition.left;\n offsetY = e.pageY - domNodePosition.top;\n }\n const offset = this._pointerDownRelativePosition(offsetX, offsetY);\n this._setDesiredScrollPositionNow(this._scrollByPage\n ? this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(offset)\n : this._scrollbarState.getDesiredScrollPositionFromOffset(offset));\n if (e.button === 0) {\n // left button\n e.preventDefault();\n this._sliderPointerDown(e);\n }\n }\n _sliderPointerDown(e) {\n if (!e.target || !(e.target instanceof Element)) {\n return;\n }\n const initialPointerPosition = this._sliderPointerPosition(e);\n const initialPointerOrthogonalPosition = this._sliderOrthogonalPointerPosition(e);\n const initialScrollbarState = this._scrollbarState.clone();\n this.slider.toggleClassName('active', true);\n this._pointerMoveMonitor.startMonitoring(e.target, e.pointerId, e.buttons, (pointerMoveData) => {\n const pointerOrthogonalPosition = this._sliderOrthogonalPointerPosition(pointerMoveData);\n const pointerOrthogonalDelta = Math.abs(pointerOrthogonalPosition - initialPointerOrthogonalPosition);\n if (platform.isWindows && pointerOrthogonalDelta > POINTER_DRAG_RESET_DISTANCE) {\n // The pointer has wondered away from the scrollbar => reset dragging\n this._setDesiredScrollPositionNow(initialScrollbarState.getScrollPosition());\n return;\n }\n const pointerPosition = this._sliderPointerPosition(pointerMoveData);\n const pointerDelta = pointerPosition - initialPointerPosition;\n this._setDesiredScrollPositionNow(initialScrollbarState.getDesiredScrollPositionFromDelta(pointerDelta));\n }, () => {\n this.slider.toggleClassName('active', false);\n this._host.onDragEnd();\n });\n this._host.onDragStart();\n }\n _setDesiredScrollPositionNow(_desiredScrollPosition) {\n const desiredScrollPosition = {};\n this.writeScrollPosition(desiredScrollPosition, _desiredScrollPosition);\n this._scrollable.setScrollPositionNow(desiredScrollPosition);\n }\n updateScrollbarSize(scrollbarSize) {\n this._updateScrollbarSize(scrollbarSize);\n this._scrollbarState.setScrollbarSize(scrollbarSize);\n this._shouldRender = true;\n if (!this._lazyRender) {\n this.render();\n }\n }\n isNeeded() {\n return this._scrollbarState.isNeeded();\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/**\n * The minimal size of the slider (such that it can still be clickable) -- it is artificially enlarged.\n */\nconst MINIMUM_SLIDER_SIZE = 20;\nexport class ScrollbarState {\n constructor(arrowSize, scrollbarSize, oppositeScrollbarSize, visibleSize, scrollSize, scrollPosition) {\n this._scrollbarSize = Math.round(scrollbarSize);\n this._oppositeScrollbarSize = Math.round(oppositeScrollbarSize);\n this._arrowSize = Math.round(arrowSize);\n this._visibleSize = visibleSize;\n this._scrollSize = scrollSize;\n this._scrollPosition = scrollPosition;\n this._computedAvailableSize = 0;\n this._computedIsNeeded = false;\n this._computedSliderSize = 0;\n this._computedSliderRatio = 0;\n this._computedSliderPosition = 0;\n this._refreshComputedValues();\n }\n clone() {\n return new ScrollbarState(this._arrowSize, this._scrollbarSize, this._oppositeScrollbarSize, this._visibleSize, this._scrollSize, this._scrollPosition);\n }\n setVisibleSize(visibleSize) {\n const iVisibleSize = Math.round(visibleSize);\n if (this._visibleSize !== iVisibleSize) {\n this._visibleSize = iVisibleSize;\n this._refreshComputedValues();\n return true;\n }\n return false;\n }\n setScrollSize(scrollSize) {\n const iScrollSize = Math.round(scrollSize);\n if (this._scrollSize !== iScrollSize) {\n this._scrollSize = iScrollSize;\n this._refreshComputedValues();\n return true;\n }\n return false;\n }\n setScrollPosition(scrollPosition) {\n const iScrollPosition = Math.round(scrollPosition);\n if (this._scrollPosition !== iScrollPosition) {\n this._scrollPosition = iScrollPosition;\n this._refreshComputedValues();\n return true;\n }\n return false;\n }\n setScrollbarSize(scrollbarSize) {\n this._scrollbarSize = Math.round(scrollbarSize);\n }\n setOppositeScrollbarSize(oppositeScrollbarSize) {\n this._oppositeScrollbarSize = Math.round(oppositeScrollbarSize);\n }\n static _computeValues(oppositeScrollbarSize, arrowSize, visibleSize, scrollSize, scrollPosition) {\n const computedAvailableSize = Math.max(0, visibleSize - oppositeScrollbarSize);\n const computedRepresentableSize = Math.max(0, computedAvailableSize - 2 * arrowSize);\n const computedIsNeeded = (scrollSize > 0 && scrollSize > visibleSize);\n if (!computedIsNeeded) {\n // There is no need for a slider\n return {\n computedAvailableSize: Math.round(computedAvailableSize),\n computedIsNeeded: computedIsNeeded,\n computedSliderSize: Math.round(computedRepresentableSize),\n computedSliderRatio: 0,\n computedSliderPosition: 0,\n };\n }\n // We must artificially increase the size of the slider if needed, since the slider would be too small to grab with the mouse otherwise\n const computedSliderSize = Math.round(Math.max(MINIMUM_SLIDER_SIZE, Math.floor(visibleSize * computedRepresentableSize / scrollSize)));\n // The slider can move from 0 to `computedRepresentableSize` - `computedSliderSize`\n // in the same way `scrollPosition` can move from 0 to `scrollSize` - `visibleSize`.\n const computedSliderRatio = (computedRepresentableSize - computedSliderSize) / (scrollSize - visibleSize);\n const computedSliderPosition = (scrollPosition * computedSliderRatio);\n return {\n computedAvailableSize: Math.round(computedAvailableSize),\n computedIsNeeded: computedIsNeeded,\n computedSliderSize: Math.round(computedSliderSize),\n computedSliderRatio: computedSliderRatio,\n computedSliderPosition: Math.round(computedSliderPosition),\n };\n }\n _refreshComputedValues() {\n const r = ScrollbarState._computeValues(this._oppositeScrollbarSize, this._arrowSize, this._visibleSize, this._scrollSize, this._scrollPosition);\n this._computedAvailableSize = r.computedAvailableSize;\n this._computedIsNeeded = r.computedIsNeeded;\n this._computedSliderSize = r.computedSliderSize;\n this._computedSliderRatio = r.computedSliderRatio;\n this._computedSliderPosition = r.computedSliderPosition;\n }\n getArrowSize() {\n return this._arrowSize;\n }\n getScrollPosition() {\n return this._scrollPosition;\n }\n getRectangleLargeSize() {\n return this._computedAvailableSize;\n }\n getRectangleSmallSize() {\n return this._scrollbarSize;\n }\n isNeeded() {\n return this._computedIsNeeded;\n }\n getSliderSize() {\n return this._computedSliderSize;\n }\n getSliderPosition() {\n return this._computedSliderPosition;\n }\n /**\n * Compute a desired `scrollPosition` such that `offset` ends up in the center of the slider.\n * `offset` is based on the same coordinate system as the `sliderPosition`.\n */\n getDesiredScrollPositionFromOffset(offset) {\n if (!this._computedIsNeeded) {\n // no need for a slider\n return 0;\n }\n const desiredSliderPosition = offset - this._arrowSize - this._computedSliderSize / 2;\n return Math.round(desiredSliderPosition / this._computedSliderRatio);\n }\n /**\n * Compute a desired `scrollPosition` from if offset is before or after the slider position.\n * If offset is before slider, treat as a page up (or left). If after, page down (or right).\n * `offset` and `_computedSliderPosition` are based on the same coordinate system.\n * `_visibleSize` corresponds to a \"page\" of lines in the returned coordinate system.\n */\n getDesiredScrollPositionFromOffsetPaged(offset) {\n if (!this._computedIsNeeded) {\n // no need for a slider\n return 0;\n }\n const correctedOffset = offset - this._arrowSize; // compensate if has arrows\n let desiredScrollPosition = this._scrollPosition;\n if (correctedOffset < this._computedSliderPosition) {\n desiredScrollPosition -= this._visibleSize; // page up/left\n }\n else {\n desiredScrollPosition += this._visibleSize; // page down/right\n }\n return desiredScrollPosition;\n }\n /**\n * Compute a desired `scrollPosition` such that the slider moves by `delta`.\n */\n getDesiredScrollPositionFromDelta(delta) {\n if (!this._computedIsNeeded) {\n // no need for a slider\n return 0;\n }\n const desiredSliderPosition = this._computedSliderPosition + delta;\n return Math.round(desiredSliderPosition / this._computedSliderRatio);\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { StandardWheelEvent } from '../../mouseEvent.js';\nimport { AbstractScrollbar } from './abstractScrollbar.js';\nimport { ARROW_IMG_SIZE } from './scrollbarArrow.js';\nimport { ScrollbarState } from './scrollbarState.js';\nimport { Codicon } from '../../../common/codicons.js';\nexport class HorizontalScrollbar extends AbstractScrollbar {\n constructor(scrollable, options, host) {\n const scrollDimensions = scrollable.getScrollDimensions();\n const scrollPosition = scrollable.getCurrentScrollPosition();\n super({\n lazyRender: options.lazyRender,\n host: host,\n scrollbarState: new ScrollbarState((options.horizontalHasArrows ? options.arrowSize : 0), (options.horizontal === 2 /* ScrollbarVisibility.Hidden */ ? 0 : options.horizontalScrollbarSize), (options.vertical === 2 /* ScrollbarVisibility.Hidden */ ? 0 : options.verticalScrollbarSize), scrollDimensions.width, scrollDimensions.scrollWidth, scrollPosition.scrollLeft),\n visibility: options.horizontal,\n extraScrollbarClassName: 'horizontal',\n scrollable: scrollable,\n scrollByPage: options.scrollByPage\n });\n if (options.horizontalHasArrows) {\n const arrowDelta = (options.arrowSize - ARROW_IMG_SIZE) / 2;\n const scrollbarDelta = (options.horizontalScrollbarSize - ARROW_IMG_SIZE) / 2;\n this._createArrow({\n className: 'scra',\n icon: Codicon.scrollbarButtonLeft,\n top: scrollbarDelta,\n left: arrowDelta,\n bottom: undefined,\n right: undefined,\n bgWidth: options.arrowSize,\n bgHeight: options.horizontalScrollbarSize,\n onActivate: () => this._host.onMouseWheel(new StandardWheelEvent(null, 1, 0)),\n });\n this._createArrow({\n className: 'scra',\n icon: Codicon.scrollbarButtonRight,\n top: scrollbarDelta,\n left: undefined,\n bottom: undefined,\n right: arrowDelta,\n bgWidth: options.arrowSize,\n bgHeight: options.horizontalScrollbarSize,\n onActivate: () => this._host.onMouseWheel(new StandardWheelEvent(null, -1, 0)),\n });\n }\n this._createSlider(Math.floor((options.horizontalScrollbarSize - options.horizontalSliderSize) / 2), 0, undefined, options.horizontalSliderSize);\n }\n _updateSlider(sliderSize, sliderPosition) {\n this.slider.setWidth(sliderSize);\n this.slider.setLeft(sliderPosition);\n }\n _renderDomNode(largeSize, smallSize) {\n this.domNode.setWidth(largeSize);\n this.domNode.setHeight(smallSize);\n this.domNode.setLeft(0);\n this.domNode.setBottom(0);\n }\n onDidScroll(e) {\n this._shouldRender = this._onElementScrollSize(e.scrollWidth) || this._shouldRender;\n this._shouldRender = this._onElementScrollPosition(e.scrollLeft) || this._shouldRender;\n this._shouldRender = this._onElementSize(e.width) || this._shouldRender;\n return this._shouldRender;\n }\n _pointerDownRelativePosition(offsetX, offsetY) {\n return offsetX;\n }\n _sliderPointerPosition(e) {\n return e.pageX;\n }\n _sliderOrthogonalPointerPosition(e) {\n return e.pageY;\n }\n _updateScrollbarSize(size) {\n this.slider.setHeight(size);\n }\n writeScrollPosition(target, scrollPosition) {\n target.scrollLeft = scrollPosition;\n }\n updateOptions(options) {\n this.updateScrollbarSize(options.horizontal === 2 /* ScrollbarVisibility.Hidden */ ? 0 : options.horizontalScrollbarSize);\n this._scrollbarState.setOppositeScrollbarSize(options.vertical === 2 /* ScrollbarVisibility.Hidden */ ? 0 : options.verticalScrollbarSize);\n this._visibilityController.setVisibility(options.horizontal);\n this._scrollByPage = options.scrollByPage;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { StandardWheelEvent } from '../../mouseEvent.js';\nimport { AbstractScrollbar } from './abstractScrollbar.js';\nimport { ARROW_IMG_SIZE } from './scrollbarArrow.js';\nimport { ScrollbarState } from './scrollbarState.js';\nimport { Codicon } from '../../../common/codicons.js';\nexport class VerticalScrollbar extends AbstractScrollbar {\n constructor(scrollable, options, host) {\n const scrollDimensions = scrollable.getScrollDimensions();\n const scrollPosition = scrollable.getCurrentScrollPosition();\n super({\n lazyRender: options.lazyRender,\n host: host,\n scrollbarState: new ScrollbarState((options.verticalHasArrows ? options.arrowSize : 0), (options.vertical === 2 /* ScrollbarVisibility.Hidden */ ? 0 : options.verticalScrollbarSize), \n // give priority to vertical scroll bar over horizontal and let it scroll all the way to the bottom\n 0, scrollDimensions.height, scrollDimensions.scrollHeight, scrollPosition.scrollTop),\n visibility: options.vertical,\n extraScrollbarClassName: 'vertical',\n scrollable: scrollable,\n scrollByPage: options.scrollByPage\n });\n if (options.verticalHasArrows) {\n const arrowDelta = (options.arrowSize - ARROW_IMG_SIZE) / 2;\n const scrollbarDelta = (options.verticalScrollbarSize - ARROW_IMG_SIZE) / 2;\n this._createArrow({\n className: 'scra',\n icon: Codicon.scrollbarButtonUp,\n top: arrowDelta,\n left: scrollbarDelta,\n bottom: undefined,\n right: undefined,\n bgWidth: options.verticalScrollbarSize,\n bgHeight: options.arrowSize,\n onActivate: () => this._host.onMouseWheel(new StandardWheelEvent(null, 0, 1)),\n });\n this._createArrow({\n className: 'scra',\n icon: Codicon.scrollbarButtonDown,\n top: undefined,\n left: scrollbarDelta,\n bottom: arrowDelta,\n right: undefined,\n bgWidth: options.verticalScrollbarSize,\n bgHeight: options.arrowSize,\n onActivate: () => this._host.onMouseWheel(new StandardWheelEvent(null, 0, -1)),\n });\n }\n this._createSlider(0, Math.floor((options.verticalScrollbarSize - options.verticalSliderSize) / 2), options.verticalSliderSize, undefined);\n }\n _updateSlider(sliderSize, sliderPosition) {\n this.slider.setHeight(sliderSize);\n this.slider.setTop(sliderPosition);\n }\n _renderDomNode(largeSize, smallSize) {\n this.domNode.setWidth(smallSize);\n this.domNode.setHeight(largeSize);\n this.domNode.setRight(0);\n this.domNode.setTop(0);\n }\n onDidScroll(e) {\n this._shouldRender = this._onElementScrollSize(e.scrollHeight) || this._shouldRender;\n this._shouldRender = this._onElementScrollPosition(e.scrollTop) || this._shouldRender;\n this._shouldRender = this._onElementSize(e.height) || this._shouldRender;\n return this._shouldRender;\n }\n _pointerDownRelativePosition(offsetX, offsetY) {\n return offsetY;\n }\n _sliderPointerPosition(e) {\n return e.pageY;\n }\n _sliderOrthogonalPointerPosition(e) {\n return e.pageX;\n }\n _updateScrollbarSize(size) {\n this.slider.setWidth(size);\n }\n writeScrollPosition(target, scrollPosition) {\n target.scrollTop = scrollPosition;\n }\n updateOptions(options) {\n this.updateScrollbarSize(options.vertical === 2 /* ScrollbarVisibility.Hidden */ ? 0 : options.verticalScrollbarSize);\n // give priority to vertical scroll bar over horizontal and let it scroll all the way to the bottom\n this._scrollbarState.setOppositeScrollbarSize(0);\n this._visibilityController.setVisibility(options.vertical);\n this._scrollByPage = options.scrollByPage;\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Emitter } from './event.js';\nimport { Disposable } from './lifecycle.js';\nexport class ScrollState {\n constructor(_forceIntegerValues, width, scrollWidth, scrollLeft, height, scrollHeight, scrollTop) {\n this._forceIntegerValues = _forceIntegerValues;\n this._scrollStateBrand = undefined;\n if (this._forceIntegerValues) {\n width = width | 0;\n scrollWidth = scrollWidth | 0;\n scrollLeft = scrollLeft | 0;\n height = height | 0;\n scrollHeight = scrollHeight | 0;\n scrollTop = scrollTop | 0;\n }\n this.rawScrollLeft = scrollLeft; // before validation\n this.rawScrollTop = scrollTop; // before validation\n if (width < 0) {\n width = 0;\n }\n if (scrollLeft + width > scrollWidth) {\n scrollLeft = scrollWidth - width;\n }\n if (scrollLeft < 0) {\n scrollLeft = 0;\n }\n if (height < 0) {\n height = 0;\n }\n if (scrollTop + height > scrollHeight) {\n scrollTop = scrollHeight - height;\n }\n if (scrollTop < 0) {\n scrollTop = 0;\n }\n this.width = width;\n this.scrollWidth = scrollWidth;\n this.scrollLeft = scrollLeft;\n this.height = height;\n this.scrollHeight = scrollHeight;\n this.scrollTop = scrollTop;\n }\n equals(other) {\n return (this.rawScrollLeft === other.rawScrollLeft\n && this.rawScrollTop === other.rawScrollTop\n && this.width === other.width\n && this.scrollWidth === other.scrollWidth\n && this.scrollLeft === other.scrollLeft\n && this.height === other.height\n && this.scrollHeight === other.scrollHeight\n && this.scrollTop === other.scrollTop);\n }\n withScrollDimensions(update, useRawScrollPositions) {\n return new ScrollState(this._forceIntegerValues, (typeof update.width !== 'undefined' ? update.width : this.width), (typeof update.scrollWidth !== 'undefined' ? update.scrollWidth : this.scrollWidth), useRawScrollPositions ? this.rawScrollLeft : this.scrollLeft, (typeof update.height !== 'undefined' ? update.height : this.height), (typeof update.scrollHeight !== 'undefined' ? update.scrollHeight : this.scrollHeight), useRawScrollPositions ? this.rawScrollTop : this.scrollTop);\n }\n withScrollPosition(update) {\n return new ScrollState(this._forceIntegerValues, this.width, this.scrollWidth, (typeof update.scrollLeft !== 'undefined' ? update.scrollLeft : this.rawScrollLeft), this.height, this.scrollHeight, (typeof update.scrollTop !== 'undefined' ? update.scrollTop : this.rawScrollTop));\n }\n createScrollEvent(previous, inSmoothScrolling) {\n const widthChanged = (this.width !== previous.width);\n const scrollWidthChanged = (this.scrollWidth !== previous.scrollWidth);\n const scrollLeftChanged = (this.scrollLeft !== previous.scrollLeft);\n const heightChanged = (this.height !== previous.height);\n const scrollHeightChanged = (this.scrollHeight !== previous.scrollHeight);\n const scrollTopChanged = (this.scrollTop !== previous.scrollTop);\n return {\n inSmoothScrolling: inSmoothScrolling,\n oldWidth: previous.width,\n oldScrollWidth: previous.scrollWidth,\n oldScrollLeft: previous.scrollLeft,\n width: this.width,\n scrollWidth: this.scrollWidth,\n scrollLeft: this.scrollLeft,\n oldHeight: previous.height,\n oldScrollHeight: previous.scrollHeight,\n oldScrollTop: previous.scrollTop,\n height: this.height,\n scrollHeight: this.scrollHeight,\n scrollTop: this.scrollTop,\n widthChanged: widthChanged,\n scrollWidthChanged: scrollWidthChanged,\n scrollLeftChanged: scrollLeftChanged,\n heightChanged: heightChanged,\n scrollHeightChanged: scrollHeightChanged,\n scrollTopChanged: scrollTopChanged,\n };\n }\n}\nexport class Scrollable extends Disposable {\n constructor(options) {\n super();\n this._scrollableBrand = undefined;\n this._onScroll = this._register(new Emitter());\n this.onScroll = this._onScroll.event;\n this._smoothScrollDuration = options.smoothScrollDuration;\n this._scheduleAtNextAnimationFrame = options.scheduleAtNextAnimationFrame;\n this._state = new ScrollState(options.forceIntegerValues, 0, 0, 0, 0, 0, 0);\n this._smoothScrolling = null;\n }\n dispose() {\n if (this._smoothScrolling) {\n this._smoothScrolling.dispose();\n this._smoothScrolling = null;\n }\n super.dispose();\n }\n setSmoothScrollDuration(smoothScrollDuration) {\n this._smoothScrollDuration = smoothScrollDuration;\n }\n validateScrollPosition(scrollPosition) {\n return this._state.withScrollPosition(scrollPosition);\n }\n getScrollDimensions() {\n return this._state;\n }\n setScrollDimensions(dimensions, useRawScrollPositions) {\n var _a;\n const newState = this._state.withScrollDimensions(dimensions, useRawScrollPositions);\n this._setState(newState, Boolean(this._smoothScrolling));\n // Validate outstanding animated scroll position target\n (_a = this._smoothScrolling) === null || _a === void 0 ? void 0 : _a.acceptScrollDimensions(this._state);\n }\n /**\n * Returns the final scroll position that the instance will have once the smooth scroll animation concludes.\n * If no scroll animation is occurring, it will return the current scroll position instead.\n */\n getFutureScrollPosition() {\n if (this._smoothScrolling) {\n return this._smoothScrolling.to;\n }\n return this._state;\n }\n /**\n * Returns the current scroll position.\n * Note: This result might be an intermediate scroll position, as there might be an ongoing smooth scroll animation.\n */\n getCurrentScrollPosition() {\n return this._state;\n }\n setScrollPositionNow(update) {\n // no smooth scrolling requested\n const newState = this._state.withScrollPosition(update);\n // Terminate any outstanding smooth scrolling\n if (this._smoothScrolling) {\n this._smoothScrolling.dispose();\n this._smoothScrolling = null;\n }\n this._setState(newState, false);\n }\n setScrollPositionSmooth(update, reuseAnimation) {\n if (this._smoothScrollDuration === 0) {\n // Smooth scrolling not supported.\n return this.setScrollPositionNow(update);\n }\n if (this._smoothScrolling) {\n // Combine our pending scrollLeft/scrollTop with incoming scrollLeft/scrollTop\n update = {\n scrollLeft: (typeof update.scrollLeft === 'undefined' ? this._smoothScrolling.to.scrollLeft : update.scrollLeft),\n scrollTop: (typeof update.scrollTop === 'undefined' ? this._smoothScrolling.to.scrollTop : update.scrollTop)\n };\n // Validate `update`\n const validTarget = this._state.withScrollPosition(update);\n if (this._smoothScrolling.to.scrollLeft === validTarget.scrollLeft && this._smoothScrolling.to.scrollTop === validTarget.scrollTop) {\n // No need to interrupt or extend the current animation since we're going to the same place\n return;\n }\n let newSmoothScrolling;\n if (reuseAnimation) {\n newSmoothScrolling = new SmoothScrollingOperation(this._smoothScrolling.from, validTarget, this._smoothScrolling.startTime, this._smoothScrolling.duration);\n }\n else {\n newSmoothScrolling = this._smoothScrolling.combine(this._state, validTarget, this._smoothScrollDuration);\n }\n this._smoothScrolling.dispose();\n this._smoothScrolling = newSmoothScrolling;\n }\n else {\n // Validate `update`\n const validTarget = this._state.withScrollPosition(update);\n this._smoothScrolling = SmoothScrollingOperation.start(this._state, validTarget, this._smoothScrollDuration);\n }\n // Begin smooth scrolling animation\n this._smoothScrolling.animationFrameDisposable = this._scheduleAtNextAnimationFrame(() => {\n if (!this._smoothScrolling) {\n return;\n }\n this._smoothScrolling.animationFrameDisposable = null;\n this._performSmoothScrolling();\n });\n }\n hasPendingScrollAnimation() {\n return Boolean(this._smoothScrolling);\n }\n _performSmoothScrolling() {\n if (!this._smoothScrolling) {\n return;\n }\n const update = this._smoothScrolling.tick();\n const newState = this._state.withScrollPosition(update);\n this._setState(newState, true);\n if (!this._smoothScrolling) {\n // Looks like someone canceled the smooth scrolling\n // from the scroll event handler\n return;\n }\n if (update.isDone) {\n this._smoothScrolling.dispose();\n this._smoothScrolling = null;\n return;\n }\n // Continue smooth scrolling animation\n this._smoothScrolling.animationFrameDisposable = this._scheduleAtNextAnimationFrame(() => {\n if (!this._smoothScrolling) {\n return;\n }\n this._smoothScrolling.animationFrameDisposable = null;\n this._performSmoothScrolling();\n });\n }\n _setState(newState, inSmoothScrolling) {\n const oldState = this._state;\n if (oldState.equals(newState)) {\n // no change\n return;\n }\n this._state = newState;\n this._onScroll.fire(this._state.createScrollEvent(oldState, inSmoothScrolling));\n }\n}\nexport class SmoothScrollingUpdate {\n constructor(scrollLeft, scrollTop, isDone) {\n this.scrollLeft = scrollLeft;\n this.scrollTop = scrollTop;\n this.isDone = isDone;\n }\n}\nfunction createEaseOutCubic(from, to) {\n const delta = to - from;\n return function (completion) {\n return from + delta * easeOutCubic(completion);\n };\n}\nfunction createComposed(a, b, cut) {\n return function (completion) {\n if (completion < cut) {\n return a(completion / cut);\n }\n return b((completion - cut) / (1 - cut));\n };\n}\nexport class SmoothScrollingOperation {\n constructor(from, to, startTime, duration) {\n this.from = from;\n this.to = to;\n this.duration = duration;\n this.startTime = startTime;\n this.animationFrameDisposable = null;\n this._initAnimations();\n }\n _initAnimations() {\n this.scrollLeft = this._initAnimation(this.from.scrollLeft, this.to.scrollLeft, this.to.width);\n this.scrollTop = this._initAnimation(this.from.scrollTop, this.to.scrollTop, this.to.height);\n }\n _initAnimation(from, to, viewportSize) {\n const delta = Math.abs(from - to);\n if (delta > 2.5 * viewportSize) {\n let stop1, stop2;\n if (from < to) {\n // scroll to 75% of the viewportSize\n stop1 = from + 0.75 * viewportSize;\n stop2 = to - 0.75 * viewportSize;\n }\n else {\n stop1 = from - 0.75 * viewportSize;\n stop2 = to + 0.75 * viewportSize;\n }\n return createComposed(createEaseOutCubic(from, stop1), createEaseOutCubic(stop2, to), 0.33);\n }\n return createEaseOutCubic(from, to);\n }\n dispose() {\n if (this.animationFrameDisposable !== null) {\n this.animationFrameDisposable.dispose();\n this.animationFrameDisposable = null;\n }\n }\n acceptScrollDimensions(state) {\n this.to = state.withScrollPosition(this.to);\n this._initAnimations();\n }\n tick() {\n return this._tick(Date.now());\n }\n _tick(now) {\n const completion = (now - this.startTime) / this.duration;\n if (completion < 1) {\n const newScrollLeft = this.scrollLeft(completion);\n const newScrollTop = this.scrollTop(completion);\n return new SmoothScrollingUpdate(newScrollLeft, newScrollTop, false);\n }\n return new SmoothScrollingUpdate(this.to.scrollLeft, this.to.scrollTop, true);\n }\n combine(from, to, duration) {\n return SmoothScrollingOperation.start(from, to, duration);\n }\n static start(from, to, duration) {\n // +10 / -10 : pretend the animation already started for a quicker response to a scroll request\n duration = duration + 10;\n const startTime = Date.now() - 10;\n return new SmoothScrollingOperation(from, to, startTime, duration);\n }\n}\nfunction easeInCubic(t) {\n return Math.pow(t, 3);\n}\nfunction easeOutCubic(t) {\n return 1 - easeInCubic(1 - t);\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n\t/* In front of peek view */\n\tz-index: 11;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n\tbox-shadow: var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top.left {\n\tbox-shadow: var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset;\n}\n\n.monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: var(--vscode-scrollbarSlider-background);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: var(--vscode-scrollbarSlider-hoverBackground);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: var(--vscode-scrollbarSlider-activeBackground);\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { getZoomFactor, isChrome } from '../../browser.js';\nimport * as dom from '../../dom.js';\nimport { createFastDomNode } from '../../fastDomNode.js';\nimport { StandardWheelEvent } from '../../mouseEvent.js';\nimport { HorizontalScrollbar } from './horizontalScrollbar.js';\nimport { VerticalScrollbar } from './verticalScrollbar.js';\nimport { Widget } from '../widget.js';\nimport { TimeoutTimer } from '../../../common/async.js';\nimport { Emitter } from '../../../common/event.js';\nimport { dispose } from '../../../common/lifecycle.js';\nimport * as platform from '../../../common/platform.js';\nimport { Scrollable } from '../../../common/scrollable.js';\nimport './media/scrollbars.css';\nconst HIDE_TIMEOUT = 500;\nconst SCROLL_WHEEL_SENSITIVITY = 50;\nconst SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED = true;\nclass MouseWheelClassifierItem {\n constructor(timestamp, deltaX, deltaY) {\n this.timestamp = timestamp;\n this.deltaX = deltaX;\n this.deltaY = deltaY;\n this.score = 0;\n }\n}\nexport class MouseWheelClassifier {\n constructor() {\n this._capacity = 5;\n this._memory = [];\n this._front = -1;\n this._rear = -1;\n }\n isPhysicalMouseWheel() {\n if (this._front === -1 && this._rear === -1) {\n // no elements\n return false;\n }\n // 0.5 * last + 0.25 * 2nd last + 0.125 * 3rd last + ...\n let remainingInfluence = 1;\n let score = 0;\n let iteration = 1;\n let index = this._rear;\n do {\n const influence = (index === this._front ? remainingInfluence : Math.pow(2, -iteration));\n remainingInfluence -= influence;\n score += this._memory[index].score * influence;\n if (index === this._front) {\n break;\n }\n index = (this._capacity + index - 1) % this._capacity;\n iteration++;\n } while (true);\n return (score <= 0.5);\n }\n acceptStandardWheelEvent(e) {\n if (isChrome) {\n const targetWindow = dom.getWindow(e.browserEvent);\n const pageZoomFactor = getZoomFactor(targetWindow);\n // On Chrome, the incoming delta events are multiplied with the OS zoom factor.\n // The OS zoom factor can be reverse engineered by using the device pixel ratio and the configured zoom factor into account.\n this.accept(Date.now(), e.deltaX * pageZoomFactor, e.deltaY * pageZoomFactor);\n }\n else {\n this.accept(Date.now(), e.deltaX, e.deltaY);\n }\n }\n accept(timestamp, deltaX, deltaY) {\n const item = new MouseWheelClassifierItem(timestamp, deltaX, deltaY);\n item.score = this._computeScore(item);\n if (this._front === -1 && this._rear === -1) {\n this._memory[0] = item;\n this._front = 0;\n this._rear = 0;\n }\n else {\n this._rear = (this._rear + 1) % this._capacity;\n if (this._rear === this._front) {\n // Drop oldest\n this._front = (this._front + 1) % this._capacity;\n }\n this._memory[this._rear] = item;\n }\n }\n /**\n * A score between 0 and 1 for `item`.\n * - a score towards 0 indicates that the source appears to be a physical mouse wheel\n * - a score towards 1 indicates that the source appears to be a touchpad or magic mouse, etc.\n */\n _computeScore(item) {\n if (Math.abs(item.deltaX) > 0 && Math.abs(item.deltaY) > 0) {\n // both axes exercised => definitely not a physical mouse wheel\n return 1;\n }\n let score = 0.5;\n const prev = (this._front === -1 && this._rear === -1 ? null : this._memory[this._rear]);\n if (prev) {\n // const deltaT = item.timestamp - prev.timestamp;\n // if (deltaT < 1000 / 30) {\n // \t// sooner than X times per second => indicator that this is not a physical mouse wheel\n // \tscore += 0.25;\n // }\n // if (item.deltaX === prev.deltaX && item.deltaY === prev.deltaY) {\n // \t// equal amplitude => indicator that this is a physical mouse wheel\n // \tscore -= 0.25;\n // }\n }\n if (!this._isAlmostInt(item.deltaX) || !this._isAlmostInt(item.deltaY)) {\n // non-integer deltas => indicator that this is not a physical mouse wheel\n score += 0.25;\n }\n return Math.min(Math.max(score, 0), 1);\n }\n _isAlmostInt(value) {\n const delta = Math.abs(Math.round(value) - value);\n return (delta < 0.01);\n }\n}\nMouseWheelClassifier.INSTANCE = new MouseWheelClassifier();\nexport class AbstractScrollableElement extends Widget {\n get options() {\n return this._options;\n }\n constructor(element, options, scrollable) {\n super();\n this._onScroll = this._register(new Emitter());\n this.onScroll = this._onScroll.event;\n this._onWillScroll = this._register(new Emitter());\n element.style.overflow = 'hidden';\n this._options = resolveOptions(options);\n this._scrollable = scrollable;\n this._register(this._scrollable.onScroll((e) => {\n this._onWillScroll.fire(e);\n this._onDidScroll(e);\n this._onScroll.fire(e);\n }));\n const scrollbarHost = {\n onMouseWheel: (mouseWheelEvent) => this._onMouseWheel(mouseWheelEvent),\n onDragStart: () => this._onDragStart(),\n onDragEnd: () => this._onDragEnd(),\n };\n this._verticalScrollbar = this._register(new VerticalScrollbar(this._scrollable, this._options, scrollbarHost));\n this._horizontalScrollbar = this._register(new HorizontalScrollbar(this._scrollable, this._options, scrollbarHost));\n this._domNode = document.createElement('div');\n this._domNode.className = 'monaco-scrollable-element ' + this._options.className;\n this._domNode.setAttribute('role', 'presentation');\n this._domNode.style.position = 'relative';\n this._domNode.style.overflow = 'hidden';\n this._domNode.appendChild(element);\n this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode);\n this._domNode.appendChild(this._verticalScrollbar.domNode.domNode);\n if (this._options.useShadows) {\n this._leftShadowDomNode = createFastDomNode(document.createElement('div'));\n this._leftShadowDomNode.setClassName('shadow');\n this._domNode.appendChild(this._leftShadowDomNode.domNode);\n this._topShadowDomNode = createFastDomNode(document.createElement('div'));\n this._topShadowDomNode.setClassName('shadow');\n this._domNode.appendChild(this._topShadowDomNode.domNode);\n this._topLeftShadowDomNode = createFastDomNode(document.createElement('div'));\n this._topLeftShadowDomNode.setClassName('shadow');\n this._domNode.appendChild(this._topLeftShadowDomNode.domNode);\n }\n else {\n this._leftShadowDomNode = null;\n this._topShadowDomNode = null;\n this._topLeftShadowDomNode = null;\n }\n this._listenOnDomNode = this._options.listenOnDomNode || this._domNode;\n this._mouseWheelToDispose = [];\n this._setListeningToMouseWheel(this._options.handleMouseWheel);\n this.onmouseover(this._listenOnDomNode, (e) => this._onMouseOver(e));\n this.onmouseleave(this._listenOnDomNode, (e) => this._onMouseLeave(e));\n this._hideTimeout = this._register(new TimeoutTimer());\n this._isDragging = false;\n this._mouseIsOver = false;\n this._shouldRender = true;\n this._revealOnScroll = true;\n }\n dispose() {\n this._mouseWheelToDispose = dispose(this._mouseWheelToDispose);\n super.dispose();\n }\n /**\n * Get the generated 'scrollable' dom node\n */\n getDomNode() {\n return this._domNode;\n }\n getOverviewRulerLayoutInfo() {\n return {\n parent: this._domNode,\n insertBefore: this._verticalScrollbar.domNode.domNode,\n };\n }\n /**\n * Delegate a pointer down event to the vertical scrollbar.\n * This is to help with clicking somewhere else and having the scrollbar react.\n */\n delegateVerticalScrollbarPointerDown(browserEvent) {\n this._verticalScrollbar.delegatePointerDown(browserEvent);\n }\n getScrollDimensions() {\n return this._scrollable.getScrollDimensions();\n }\n setScrollDimensions(dimensions) {\n this._scrollable.setScrollDimensions(dimensions, false);\n }\n /**\n * Update the class name of the scrollable element.\n */\n updateClassName(newClassName) {\n this._options.className = newClassName;\n // Defaults are different on Macs\n if (platform.isMacintosh) {\n this._options.className += ' mac';\n }\n this._domNode.className = 'monaco-scrollable-element ' + this._options.className;\n }\n /**\n * Update configuration options for the scrollbar.\n */\n updateOptions(newOptions) {\n if (typeof newOptions.handleMouseWheel !== 'undefined') {\n this._options.handleMouseWheel = newOptions.handleMouseWheel;\n this._setListeningToMouseWheel(this._options.handleMouseWheel);\n }\n if (typeof newOptions.mouseWheelScrollSensitivity !== 'undefined') {\n this._options.mouseWheelScrollSensitivity = newOptions.mouseWheelScrollSensitivity;\n }\n if (typeof newOptions.fastScrollSensitivity !== 'undefined') {\n this._options.fastScrollSensitivity = newOptions.fastScrollSensitivity;\n }\n if (typeof newOptions.scrollPredominantAxis !== 'undefined') {\n this._options.scrollPredominantAxis = newOptions.scrollPredominantAxis;\n }\n if (typeof newOptions.horizontal !== 'undefined') {\n this._options.horizontal = newOptions.horizontal;\n }\n if (typeof newOptions.vertical !== 'undefined') {\n this._options.vertical = newOptions.vertical;\n }\n if (typeof newOptions.horizontalScrollbarSize !== 'undefined') {\n this._options.horizontalScrollbarSize = newOptions.horizontalScrollbarSize;\n }\n if (typeof newOptions.verticalScrollbarSize !== 'undefined') {\n this._options.verticalScrollbarSize = newOptions.verticalScrollbarSize;\n }\n if (typeof newOptions.scrollByPage !== 'undefined') {\n this._options.scrollByPage = newOptions.scrollByPage;\n }\n this._horizontalScrollbar.updateOptions(this._options);\n this._verticalScrollbar.updateOptions(this._options);\n if (!this._options.lazyRender) {\n this._render();\n }\n }\n delegateScrollFromMouseWheelEvent(browserEvent) {\n this._onMouseWheel(new StandardWheelEvent(browserEvent));\n }\n // -------------------- mouse wheel scrolling --------------------\n _setListeningToMouseWheel(shouldListen) {\n const isListening = (this._mouseWheelToDispose.length > 0);\n if (isListening === shouldListen) {\n // No change\n return;\n }\n // Stop listening (if necessary)\n this._mouseWheelToDispose = dispose(this._mouseWheelToDispose);\n // Start listening (if necessary)\n if (shouldListen) {\n const onMouseWheel = (browserEvent) => {\n this._onMouseWheel(new StandardWheelEvent(browserEvent));\n };\n this._mouseWheelToDispose.push(dom.addDisposableListener(this._listenOnDomNode, dom.EventType.MOUSE_WHEEL, onMouseWheel, { passive: false }));\n }\n }\n _onMouseWheel(e) {\n var _a;\n if ((_a = e.browserEvent) === null || _a === void 0 ? void 0 : _a.defaultPrevented) {\n return;\n }\n const classifier = MouseWheelClassifier.INSTANCE;\n if (SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED) {\n classifier.acceptStandardWheelEvent(e);\n }\n // console.log(`${Date.now()}, ${e.deltaY}, ${e.deltaX}`);\n let didScroll = false;\n if (e.deltaY || e.deltaX) {\n let deltaY = e.deltaY * this._options.mouseWheelScrollSensitivity;\n let deltaX = e.deltaX * this._options.mouseWheelScrollSensitivity;\n if (this._options.scrollPredominantAxis) {\n if (this._options.scrollYToX && deltaX + deltaY === 0) {\n // when configured to map Y to X and we both see\n // no dominant axis and X and Y are competing with\n // identical values into opposite directions, we\n // ignore the delta as we cannot make a decision then\n deltaX = deltaY = 0;\n }\n else if (Math.abs(deltaY) >= Math.abs(deltaX)) {\n deltaX = 0;\n }\n else {\n deltaY = 0;\n }\n }\n if (this._options.flipAxes) {\n [deltaY, deltaX] = [deltaX, deltaY];\n }\n // Convert vertical scrolling to horizontal if shift is held, this\n // is handled at a higher level on Mac\n const shiftConvert = !platform.isMacintosh && e.browserEvent && e.browserEvent.shiftKey;\n if ((this._options.scrollYToX || shiftConvert) && !deltaX) {\n deltaX = deltaY;\n deltaY = 0;\n }\n if (e.browserEvent && e.browserEvent.altKey) {\n // fastScrolling\n deltaX = deltaX * this._options.fastScrollSensitivity;\n deltaY = deltaY * this._options.fastScrollSensitivity;\n }\n const futureScrollPosition = this._scrollable.getFutureScrollPosition();\n let desiredScrollPosition = {};\n if (deltaY) {\n const deltaScrollTop = SCROLL_WHEEL_SENSITIVITY * deltaY;\n // Here we convert values such as -0.3 to -1 or 0.3 to 1, otherwise low speed scrolling will never scroll\n const desiredScrollTop = futureScrollPosition.scrollTop - (deltaScrollTop < 0 ? Math.floor(deltaScrollTop) : Math.ceil(deltaScrollTop));\n this._verticalScrollbar.writeScrollPosition(desiredScrollPosition, desiredScrollTop);\n }\n if (deltaX) {\n const deltaScrollLeft = SCROLL_WHEEL_SENSITIVITY * deltaX;\n // Here we convert values such as -0.3 to -1 or 0.3 to 1, otherwise low speed scrolling will never scroll\n const desiredScrollLeft = futureScrollPosition.scrollLeft - (deltaScrollLeft < 0 ? Math.floor(deltaScrollLeft) : Math.ceil(deltaScrollLeft));\n this._horizontalScrollbar.writeScrollPosition(desiredScrollPosition, desiredScrollLeft);\n }\n // Check that we are scrolling towards a location which is valid\n desiredScrollPosition = this._scrollable.validateScrollPosition(desiredScrollPosition);\n if (futureScrollPosition.scrollLeft !== desiredScrollPosition.scrollLeft || futureScrollPosition.scrollTop !== desiredScrollPosition.scrollTop) {\n const canPerformSmoothScroll = (SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED\n && this._options.mouseWheelSmoothScroll\n && classifier.isPhysicalMouseWheel());\n if (canPerformSmoothScroll) {\n this._scrollable.setScrollPositionSmooth(desiredScrollPosition);\n }\n else {\n this._scrollable.setScrollPositionNow(desiredScrollPosition);\n }\n didScroll = true;\n }\n }\n let consumeMouseWheel = didScroll;\n if (!consumeMouseWheel && this._options.alwaysConsumeMouseWheel) {\n consumeMouseWheel = true;\n }\n if (!consumeMouseWheel && this._options.consumeMouseWheelIfScrollbarIsNeeded && (this._verticalScrollbar.isNeeded() || this._horizontalScrollbar.isNeeded())) {\n consumeMouseWheel = true;\n }\n if (consumeMouseWheel) {\n e.preventDefault();\n e.stopPropagation();\n }\n }\n _onDidScroll(e) {\n this._shouldRender = this._horizontalScrollbar.onDidScroll(e) || this._shouldRender;\n this._shouldRender = this._verticalScrollbar.onDidScroll(e) || this._shouldRender;\n if (this._options.useShadows) {\n this._shouldRender = true;\n }\n if (this._revealOnScroll) {\n this._reveal();\n }\n if (!this._options.lazyRender) {\n this._render();\n }\n }\n /**\n * Render / mutate the DOM now.\n * Should be used together with the ctor option `lazyRender`.\n */\n renderNow() {\n if (!this._options.lazyRender) {\n throw new Error('Please use `lazyRender` together with `renderNow`!');\n }\n this._render();\n }\n _render() {\n if (!this._shouldRender) {\n return;\n }\n this._shouldRender = false;\n this._horizontalScrollbar.render();\n this._verticalScrollbar.render();\n if (this._options.useShadows) {\n const scrollState = this._scrollable.getCurrentScrollPosition();\n const enableTop = scrollState.scrollTop > 0;\n const enableLeft = scrollState.scrollLeft > 0;\n const leftClassName = (enableLeft ? ' left' : '');\n const topClassName = (enableTop ? ' top' : '');\n const topLeftClassName = (enableLeft || enableTop ? ' top-left-corner' : '');\n this._leftShadowDomNode.setClassName(`shadow${leftClassName}`);\n this._topShadowDomNode.setClassName(`shadow${topClassName}`);\n this._topLeftShadowDomNode.setClassName(`shadow${topLeftClassName}${topClassName}${leftClassName}`);\n }\n }\n // -------------------- fade in / fade out --------------------\n _onDragStart() {\n this._isDragging = true;\n this._reveal();\n }\n _onDragEnd() {\n this._isDragging = false;\n this._hide();\n }\n _onMouseLeave(e) {\n this._mouseIsOver = false;\n this._hide();\n }\n _onMouseOver(e) {\n this._mouseIsOver = true;\n this._reveal();\n }\n _reveal() {\n this._verticalScrollbar.beginReveal();\n this._horizontalScrollbar.beginReveal();\n this._scheduleHide();\n }\n _hide() {\n if (!this._mouseIsOver && !this._isDragging) {\n this._verticalScrollbar.beginHide();\n this._horizontalScrollbar.beginHide();\n }\n }\n _scheduleHide() {\n if (!this._mouseIsOver && !this._isDragging) {\n this._hideTimeout.cancelAndSet(() => this._hide(), HIDE_TIMEOUT);\n }\n }\n}\nexport class ScrollableElement extends AbstractScrollableElement {\n constructor(element, options) {\n options = options || {};\n options.mouseWheelSmoothScroll = false;\n const scrollable = new Scrollable({\n forceIntegerValues: true,\n smoothScrollDuration: 0,\n scheduleAtNextAnimationFrame: (callback) => dom.scheduleAtNextAnimationFrame(dom.getWindow(element), callback)\n });\n super(element, options, scrollable);\n this._register(scrollable);\n }\n setScrollPosition(update) {\n this._scrollable.setScrollPositionNow(update);\n }\n}\nexport class SmoothScrollableElement extends AbstractScrollableElement {\n constructor(element, options, scrollable) {\n super(element, options, scrollable);\n }\n setScrollPosition(update) {\n if (update.reuseAnimation) {\n this._scrollable.setScrollPositionSmooth(update, update.reuseAnimation);\n }\n else {\n this._scrollable.setScrollPositionNow(update);\n }\n }\n getScrollPosition() {\n return this._scrollable.getCurrentScrollPosition();\n }\n}\nexport class DomScrollableElement extends AbstractScrollableElement {\n constructor(element, options) {\n options = options || {};\n options.mouseWheelSmoothScroll = false;\n const scrollable = new Scrollable({\n forceIntegerValues: false, // See https://github.com/microsoft/vscode/issues/139877\n smoothScrollDuration: 0,\n scheduleAtNextAnimationFrame: (callback) => dom.scheduleAtNextAnimationFrame(dom.getWindow(element), callback)\n });\n super(element, options, scrollable);\n this._register(scrollable);\n this._element = element;\n this._register(this.onScroll((e) => {\n if (e.scrollTopChanged) {\n this._element.scrollTop = e.scrollTop;\n }\n if (e.scrollLeftChanged) {\n this._element.scrollLeft = e.scrollLeft;\n }\n }));\n this.scanDomNode();\n }\n setScrollPosition(update) {\n this._scrollable.setScrollPositionNow(update);\n }\n getScrollPosition() {\n return this._scrollable.getCurrentScrollPosition();\n }\n scanDomNode() {\n // width, scrollLeft, scrollWidth, height, scrollTop, scrollHeight\n this.setScrollDimensions({\n width: this._element.clientWidth,\n scrollWidth: this._element.scrollWidth,\n height: this._element.clientHeight,\n scrollHeight: this._element.scrollHeight\n });\n this.setScrollPosition({\n scrollLeft: this._element.scrollLeft,\n scrollTop: this._element.scrollTop,\n });\n }\n}\nfunction resolveOptions(opts) {\n const result = {\n lazyRender: (typeof opts.lazyRender !== 'undefined' ? opts.lazyRender : false),\n className: (typeof opts.className !== 'undefined' ? opts.className : ''),\n useShadows: (typeof opts.useShadows !== 'undefined' ? opts.useShadows : true),\n handleMouseWheel: (typeof opts.handleMouseWheel !== 'undefined' ? opts.handleMouseWheel : true),\n flipAxes: (typeof opts.flipAxes !== 'undefined' ? opts.flipAxes : false),\n consumeMouseWheelIfScrollbarIsNeeded: (typeof opts.consumeMouseWheelIfScrollbarIsNeeded !== 'undefined' ? opts.consumeMouseWheelIfScrollbarIsNeeded : false),\n alwaysConsumeMouseWheel: (typeof opts.alwaysConsumeMouseWheel !== 'undefined' ? opts.alwaysConsumeMouseWheel : false),\n scrollYToX: (typeof opts.scrollYToX !== 'undefined' ? opts.scrollYToX : false),\n mouseWheelScrollSensitivity: (typeof opts.mouseWheelScrollSensitivity !== 'undefined' ? opts.mouseWheelScrollSensitivity : 1),\n fastScrollSensitivity: (typeof opts.fastScrollSensitivity !== 'undefined' ? opts.fastScrollSensitivity : 5),\n scrollPredominantAxis: (typeof opts.scrollPredominantAxis !== 'undefined' ? opts.scrollPredominantAxis : true),\n mouseWheelSmoothScroll: (typeof opts.mouseWheelSmoothScroll !== 'undefined' ? opts.mouseWheelSmoothScroll : true),\n arrowSize: (typeof opts.arrowSize !== 'undefined' ? opts.arrowSize : 11),\n listenOnDomNode: (typeof opts.listenOnDomNode !== 'undefined' ? opts.listenOnDomNode : null),\n horizontal: (typeof opts.horizontal !== 'undefined' ? opts.horizontal : 1 /* ScrollbarVisibility.Auto */),\n horizontalScrollbarSize: (typeof opts.horizontalScrollbarSize !== 'undefined' ? opts.horizontalScrollbarSize : 10),\n horizontalSliderSize: (typeof opts.horizontalSliderSize !== 'undefined' ? opts.horizontalSliderSize : 0),\n horizontalHasArrows: (typeof opts.horizontalHasArrows !== 'undefined' ? opts.horizontalHasArrows : false),\n vertical: (typeof opts.vertical !== 'undefined' ? opts.vertical : 1 /* ScrollbarVisibility.Auto */),\n verticalScrollbarSize: (typeof opts.verticalScrollbarSize !== 'undefined' ? opts.verticalScrollbarSize : 10),\n verticalHasArrows: (typeof opts.verticalHasArrows !== 'undefined' ? opts.verticalHasArrows : false),\n verticalSliderSize: (typeof opts.verticalSliderSize !== 'undefined' ? opts.verticalSliderSize : 0),\n scrollByPage: (typeof opts.scrollByPage !== 'undefined' ? opts.scrollByPage : false)\n };\n result.horizontalSliderSize = (typeof opts.horizontalSliderSize !== 'undefined' ? opts.horizontalSliderSize : result.horizontalScrollbarSize);\n result.verticalSliderSize = (typeof opts.verticalSliderSize !== 'undefined' ? opts.verticalSliderSize : result.verticalScrollbarSize);\n // Defaults are different on Macs\n if (platform.isMacintosh) {\n result.className += ' mac';\n }\n return result;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as dom from '../../../base/browser/dom.js';\nimport { StandardWheelEvent } from '../../../base/browser/mouseEvent.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport * as platform from '../../../base/common/platform.js';\nimport { HitTestContext, MouseTarget, MouseTargetFactory } from './mouseTarget.js';\nimport { ClientCoordinates, EditorMouseEvent, EditorMouseEventFactory, GlobalEditorPointerMoveMonitor, createEditorPagePosition, createCoordinatesRelativeToEditor, PageCoordinates } from '../editorDom.js';\nimport { EditorZoom } from '../../common/config/editorZoom.js';\nimport { Position } from '../../common/core/position.js';\nimport { Selection } from '../../common/core/selection.js';\nimport { ViewEventHandler } from '../../common/viewEventHandler.js';\nimport { MouseWheelClassifier } from '../../../base/browser/ui/scrollbar/scrollableElement.js';\nexport class MouseHandler extends ViewEventHandler {\n constructor(context, viewController, viewHelper) {\n super();\n this._mouseLeaveMonitor = null;\n this._context = context;\n this.viewController = viewController;\n this.viewHelper = viewHelper;\n this.mouseTargetFactory = new MouseTargetFactory(this._context, viewHelper);\n this._mouseDownOperation = this._register(new MouseDownOperation(this._context, this.viewController, this.viewHelper, this.mouseTargetFactory, (e, testEventTarget) => this._createMouseTarget(e, testEventTarget), (e) => this._getMouseColumn(e)));\n this.lastMouseLeaveTime = -1;\n this._height = this._context.configuration.options.get(143 /* EditorOption.layoutInfo */).height;\n const mouseEvents = new EditorMouseEventFactory(this.viewHelper.viewDomNode);\n this._register(mouseEvents.onContextMenu(this.viewHelper.viewDomNode, (e) => this._onContextMenu(e, true)));\n this._register(mouseEvents.onMouseMove(this.viewHelper.viewDomNode, (e) => {\n this._onMouseMove(e);\n // See https://github.com/microsoft/vscode/issues/138789\n // When moving the mouse really quickly, the browser sometimes forgets to\n // send us a `mouseleave` or `mouseout` event. We therefore install here\n // a global `mousemove` listener to manually recover if the mouse goes outside\n // the editor. As soon as the mouse leaves outside of the editor, we\n // remove this listener\n if (!this._mouseLeaveMonitor) {\n this._mouseLeaveMonitor = dom.addDisposableListener(this.viewHelper.viewDomNode.ownerDocument, 'mousemove', (e) => {\n if (!this.viewHelper.viewDomNode.contains(e.target)) {\n // went outside the editor!\n this._onMouseLeave(new EditorMouseEvent(e, false, this.viewHelper.viewDomNode));\n }\n });\n }\n }));\n this._register(mouseEvents.onMouseUp(this.viewHelper.viewDomNode, (e) => this._onMouseUp(e)));\n this._register(mouseEvents.onMouseLeave(this.viewHelper.viewDomNode, (e) => this._onMouseLeave(e)));\n // `pointerdown` events can't be used to determine if there's a double click, or triple click\n // because their `e.detail` is always 0.\n // We will therefore save the pointer id for the mouse and then reuse it in the `mousedown` event\n // for `element.setPointerCapture`.\n let capturePointerId = 0;\n this._register(mouseEvents.onPointerDown(this.viewHelper.viewDomNode, (e, pointerId) => {\n capturePointerId = pointerId;\n }));\n // The `pointerup` listener registered by `GlobalEditorPointerMoveMonitor` does not get invoked 100% of the times.\n // I speculate that this is because the `pointerup` listener is only registered during the `mousedown` event, and perhaps\n // the `pointerup` event is already queued for dispatching, which makes it that the new listener doesn't get fired.\n // See https://github.com/microsoft/vscode/issues/146486 for repro steps.\n // To compensate for that, we simply register here a `pointerup` listener and just communicate it.\n this._register(dom.addDisposableListener(this.viewHelper.viewDomNode, dom.EventType.POINTER_UP, (e) => {\n this._mouseDownOperation.onPointerUp();\n }));\n this._register(mouseEvents.onMouseDown(this.viewHelper.viewDomNode, (e) => this._onMouseDown(e, capturePointerId)));\n this._setupMouseWheelZoomListener();\n this._context.addEventHandler(this);\n }\n _setupMouseWheelZoomListener() {\n const classifier = MouseWheelClassifier.INSTANCE;\n let prevMouseWheelTime = 0;\n let gestureStartZoomLevel = EditorZoom.getZoomLevel();\n let gestureHasZoomModifiers = false;\n let gestureAccumulatedDelta = 0;\n const onMouseWheel = (browserEvent) => {\n this.viewController.emitMouseWheel(browserEvent);\n if (!this._context.configuration.options.get(75 /* EditorOption.mouseWheelZoom */)) {\n return;\n }\n const e = new StandardWheelEvent(browserEvent);\n classifier.acceptStandardWheelEvent(e);\n if (classifier.isPhysicalMouseWheel()) {\n if (hasMouseWheelZoomModifiers(browserEvent)) {\n const zoomLevel = EditorZoom.getZoomLevel();\n const delta = e.deltaY > 0 ? 1 : -1;\n EditorZoom.setZoomLevel(zoomLevel + delta);\n e.preventDefault();\n e.stopPropagation();\n }\n }\n else {\n // we consider mousewheel events that occur within 50ms of each other to be part of the same gesture\n // we don't want to consider mouse wheel events where ctrl/cmd is pressed during the inertia phase\n // we also want to accumulate deltaY values from the same gesture and use that to set the zoom level\n if (Date.now() - prevMouseWheelTime > 50) {\n // reset if more than 50ms have passed\n gestureStartZoomLevel = EditorZoom.getZoomLevel();\n gestureHasZoomModifiers = hasMouseWheelZoomModifiers(browserEvent);\n gestureAccumulatedDelta = 0;\n }\n prevMouseWheelTime = Date.now();\n gestureAccumulatedDelta += e.deltaY;\n if (gestureHasZoomModifiers) {\n EditorZoom.setZoomLevel(gestureStartZoomLevel + gestureAccumulatedDelta / 5);\n e.preventDefault();\n e.stopPropagation();\n }\n }\n };\n this._register(dom.addDisposableListener(this.viewHelper.viewDomNode, dom.EventType.MOUSE_WHEEL, onMouseWheel, { capture: true, passive: false }));\n function hasMouseWheelZoomModifiers(browserEvent) {\n return (platform.isMacintosh\n // on macOS we support cmd + two fingers scroll (`metaKey` set)\n // and also the two fingers pinch gesture (`ctrKey` set)\n ? ((browserEvent.metaKey || browserEvent.ctrlKey) && !browserEvent.shiftKey && !browserEvent.altKey)\n : (browserEvent.ctrlKey && !browserEvent.metaKey && !browserEvent.shiftKey && !browserEvent.altKey));\n }\n }\n dispose() {\n this._context.removeEventHandler(this);\n if (this._mouseLeaveMonitor) {\n this._mouseLeaveMonitor.dispose();\n this._mouseLeaveMonitor = null;\n }\n super.dispose();\n }\n // --- begin event handlers\n onConfigurationChanged(e) {\n if (e.hasChanged(143 /* EditorOption.layoutInfo */)) {\n // layout change\n const height = this._context.configuration.options.get(143 /* EditorOption.layoutInfo */).height;\n if (this._height !== height) {\n this._height = height;\n this._mouseDownOperation.onHeightChanged();\n }\n }\n return false;\n }\n onCursorStateChanged(e) {\n this._mouseDownOperation.onCursorStateChanged(e);\n return false;\n }\n onFocusChanged(e) {\n return false;\n }\n // --- end event handlers\n getTargetAtClientPoint(clientX, clientY) {\n const clientPos = new ClientCoordinates(clientX, clientY);\n const pos = clientPos.toPageCoordinates(dom.getWindow(this.viewHelper.viewDomNode));\n const editorPos = createEditorPagePosition(this.viewHelper.viewDomNode);\n if (pos.y < editorPos.y || pos.y > editorPos.y + editorPos.height || pos.x < editorPos.x || pos.x > editorPos.x + editorPos.width) {\n return null;\n }\n const relativePos = createCoordinatesRelativeToEditor(this.viewHelper.viewDomNode, editorPos, pos);\n return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(), editorPos, pos, relativePos, null);\n }\n _createMouseTarget(e, testEventTarget) {\n let target = e.target;\n if (!this.viewHelper.viewDomNode.contains(target)) {\n const shadowRoot = dom.getShadowRoot(this.viewHelper.viewDomNode);\n if (shadowRoot) {\n target = shadowRoot.elementsFromPoint(e.posx, e.posy).find((el) => this.viewHelper.viewDomNode.contains(el));\n }\n }\n return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(), e.editorPos, e.pos, e.relativePos, testEventTarget ? target : null);\n }\n _getMouseColumn(e) {\n return this.mouseTargetFactory.getMouseColumn(e.relativePos);\n }\n _onContextMenu(e, testEventTarget) {\n this.viewController.emitContextMenu({\n event: e,\n target: this._createMouseTarget(e, testEventTarget)\n });\n }\n _onMouseMove(e) {\n const targetIsWidget = this.mouseTargetFactory.mouseTargetIsWidget(e);\n if (!targetIsWidget) {\n e.preventDefault();\n }\n if (this._mouseDownOperation.isActive()) {\n // In selection/drag operation\n return;\n }\n const actualMouseMoveTime = e.timestamp;\n if (actualMouseMoveTime < this.lastMouseLeaveTime) {\n // Due to throttling, this event occurred before the mouse left the editor, therefore ignore it.\n return;\n }\n this.viewController.emitMouseMove({\n event: e,\n target: this._createMouseTarget(e, true)\n });\n }\n _onMouseLeave(e) {\n if (this._mouseLeaveMonitor) {\n this._mouseLeaveMonitor.dispose();\n this._mouseLeaveMonitor = null;\n }\n this.lastMouseLeaveTime = (new Date()).getTime();\n this.viewController.emitMouseLeave({\n event: e,\n target: null\n });\n }\n _onMouseUp(e) {\n this.viewController.emitMouseUp({\n event: e,\n target: this._createMouseTarget(e, true)\n });\n }\n _onMouseDown(e, pointerId) {\n const t = this._createMouseTarget(e, true);\n const targetIsContent = (t.type === 6 /* MouseTargetType.CONTENT_TEXT */ || t.type === 7 /* MouseTargetType.CONTENT_EMPTY */);\n const targetIsGutter = (t.type === 2 /* MouseTargetType.GUTTER_GLYPH_MARGIN */ || t.type === 3 /* MouseTargetType.GUTTER_LINE_NUMBERS */ || t.type === 4 /* MouseTargetType.GUTTER_LINE_DECORATIONS */);\n const targetIsLineNumbers = (t.type === 3 /* MouseTargetType.GUTTER_LINE_NUMBERS */);\n const selectOnLineNumbers = this._context.configuration.options.get(108 /* EditorOption.selectOnLineNumbers */);\n const targetIsViewZone = (t.type === 8 /* MouseTargetType.CONTENT_VIEW_ZONE */ || t.type === 5 /* MouseTargetType.GUTTER_VIEW_ZONE */);\n const targetIsWidget = (t.type === 9 /* MouseTargetType.CONTENT_WIDGET */);\n let shouldHandle = e.leftButton || e.middleButton;\n if (platform.isMacintosh && e.leftButton && e.ctrlKey) {\n shouldHandle = false;\n }\n const focus = () => {\n e.preventDefault();\n this.viewHelper.focusTextArea();\n };\n if (shouldHandle && (targetIsContent || (targetIsLineNumbers && selectOnLineNumbers))) {\n focus();\n this._mouseDownOperation.start(t.type, e, pointerId);\n }\n else if (targetIsGutter) {\n // Do not steal focus\n e.preventDefault();\n }\n else if (targetIsViewZone) {\n const viewZoneData = t.detail;\n if (shouldHandle && this.viewHelper.shouldSuppressMouseDownOnViewZone(viewZoneData.viewZoneId)) {\n focus();\n this._mouseDownOperation.start(t.type, e, pointerId);\n e.preventDefault();\n }\n }\n else if (targetIsWidget && this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)) {\n focus();\n e.preventDefault();\n }\n this.viewController.emitMouseDown({\n event: e,\n target: t\n });\n }\n}\nclass MouseDownOperation extends Disposable {\n constructor(_context, _viewController, _viewHelper, _mouseTargetFactory, createMouseTarget, getMouseColumn) {\n super();\n this._context = _context;\n this._viewController = _viewController;\n this._viewHelper = _viewHelper;\n this._mouseTargetFactory = _mouseTargetFactory;\n this._createMouseTarget = createMouseTarget;\n this._getMouseColumn = getMouseColumn;\n this._mouseMoveMonitor = this._register(new GlobalEditorPointerMoveMonitor(this._viewHelper.viewDomNode));\n this._topBottomDragScrolling = this._register(new TopBottomDragScrolling(this._context, this._viewHelper, this._mouseTargetFactory, (position, inSelectionMode, revealType) => this._dispatchMouse(position, inSelectionMode, revealType)));\n this._mouseState = new MouseDownState();\n this._currentSelection = new Selection(1, 1, 1, 1);\n this._isActive = false;\n this._lastMouseEvent = null;\n }\n dispose() {\n super.dispose();\n }\n isActive() {\n return this._isActive;\n }\n _onMouseDownThenMove(e) {\n this._lastMouseEvent = e;\n this._mouseState.setModifiers(e);\n const position = this._findMousePosition(e, false);\n if (!position) {\n // Ignoring because position is unknown\n return;\n }\n if (this._mouseState.isDragAndDrop) {\n this._viewController.emitMouseDrag({\n event: e,\n target: position\n });\n }\n else {\n if (position.type === 13 /* MouseTargetType.OUTSIDE_EDITOR */ && (position.outsidePosition === 'above' || position.outsidePosition === 'below')) {\n this._topBottomDragScrolling.start(position, e);\n }\n else {\n this._topBottomDragScrolling.stop();\n this._dispatchMouse(position, true, 1 /* NavigationCommandRevealType.Minimal */);\n }\n }\n }\n start(targetType, e, pointerId) {\n this._lastMouseEvent = e;\n this._mouseState.setStartedOnLineNumbers(targetType === 3 /* MouseTargetType.GUTTER_LINE_NUMBERS */);\n this._mouseState.setStartButtons(e);\n this._mouseState.setModifiers(e);\n const position = this._findMousePosition(e, true);\n if (!position || !position.position) {\n // Ignoring because position is unknown\n return;\n }\n this._mouseState.trySetCount(e.detail, position.position);\n // Overwrite the detail of the MouseEvent, as it will be sent out in an event and contributions might rely on it.\n e.detail = this._mouseState.count;\n const options = this._context.configuration.options;\n if (!options.get(90 /* EditorOption.readOnly */)\n && options.get(35 /* EditorOption.dragAndDrop */)\n && !options.get(22 /* EditorOption.columnSelection */)\n && !this._mouseState.altKey // we don't support multiple mouse\n && e.detail < 2 // only single click on a selection can work\n && !this._isActive // the mouse is not down yet\n && !this._currentSelection.isEmpty() // we don't drag single cursor\n && (position.type === 6 /* MouseTargetType.CONTENT_TEXT */) // single click on text\n && position.position && this._currentSelection.containsPosition(position.position) // single click on a selection\n ) {\n this._mouseState.isDragAndDrop = true;\n this._isActive = true;\n this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode, pointerId, e.buttons, (e) => this._onMouseDownThenMove(e), (browserEvent) => {\n const position = this._findMousePosition(this._lastMouseEvent, false);\n if (dom.isKeyboardEvent(browserEvent)) {\n // cancel\n this._viewController.emitMouseDropCanceled();\n }\n else {\n this._viewController.emitMouseDrop({\n event: this._lastMouseEvent,\n target: (position ? this._createMouseTarget(this._lastMouseEvent, true) : null) // Ignoring because position is unknown, e.g., Content View Zone\n });\n }\n this._stop();\n });\n return;\n }\n this._mouseState.isDragAndDrop = false;\n this._dispatchMouse(position, e.shiftKey, 1 /* NavigationCommandRevealType.Minimal */);\n if (!this._isActive) {\n this._isActive = true;\n this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode, pointerId, e.buttons, (e) => this._onMouseDownThenMove(e), () => this._stop());\n }\n }\n _stop() {\n this._isActive = false;\n this._topBottomDragScrolling.stop();\n }\n onHeightChanged() {\n this._mouseMoveMonitor.stopMonitoring();\n }\n onPointerUp() {\n this._mouseMoveMonitor.stopMonitoring();\n }\n onCursorStateChanged(e) {\n this._currentSelection = e.selections[0];\n }\n _getPositionOutsideEditor(e) {\n const editorContent = e.editorPos;\n const model = this._context.viewModel;\n const viewLayout = this._context.viewLayout;\n const mouseColumn = this._getMouseColumn(e);\n if (e.posy < editorContent.y) {\n const outsideDistance = editorContent.y - e.posy;\n const verticalOffset = Math.max(viewLayout.getCurrentScrollTop() - outsideDistance, 0);\n const viewZoneData = HitTestContext.getZoneAtCoord(this._context, verticalOffset);\n if (viewZoneData) {\n const newPosition = this._helpPositionJumpOverViewZone(viewZoneData);\n if (newPosition) {\n return MouseTarget.createOutsideEditor(mouseColumn, newPosition, 'above', outsideDistance);\n }\n }\n const aboveLineNumber = viewLayout.getLineNumberAtVerticalOffset(verticalOffset);\n return MouseTarget.createOutsideEditor(mouseColumn, new Position(aboveLineNumber, 1), 'above', outsideDistance);\n }\n if (e.posy > editorContent.y + editorContent.height) {\n const outsideDistance = e.posy - editorContent.y - editorContent.height;\n const verticalOffset = viewLayout.getCurrentScrollTop() + e.relativePos.y;\n const viewZoneData = HitTestContext.getZoneAtCoord(this._context, verticalOffset);\n if (viewZoneData) {\n const newPosition = this._helpPositionJumpOverViewZone(viewZoneData);\n if (newPosition) {\n return MouseTarget.createOutsideEditor(mouseColumn, newPosition, 'below', outsideDistance);\n }\n }\n const belowLineNumber = viewLayout.getLineNumberAtVerticalOffset(verticalOffset);\n return MouseTarget.createOutsideEditor(mouseColumn, new Position(belowLineNumber, model.getLineMaxColumn(belowLineNumber)), 'below', outsideDistance);\n }\n const possibleLineNumber = viewLayout.getLineNumberAtVerticalOffset(viewLayout.getCurrentScrollTop() + e.relativePos.y);\n if (e.posx < editorContent.x) {\n const outsideDistance = editorContent.x - e.posx;\n return MouseTarget.createOutsideEditor(mouseColumn, new Position(possibleLineNumber, 1), 'left', outsideDistance);\n }\n if (e.posx > editorContent.x + editorContent.width) {\n const outsideDistance = e.posx - editorContent.x - editorContent.width;\n return MouseTarget.createOutsideEditor(mouseColumn, new Position(possibleLineNumber, model.getLineMaxColumn(possibleLineNumber)), 'right', outsideDistance);\n }\n return null;\n }\n _findMousePosition(e, testEventTarget) {\n const positionOutsideEditor = this._getPositionOutsideEditor(e);\n if (positionOutsideEditor) {\n return positionOutsideEditor;\n }\n const t = this._createMouseTarget(e, testEventTarget);\n const hintedPosition = t.position;\n if (!hintedPosition) {\n return null;\n }\n if (t.type === 8 /* MouseTargetType.CONTENT_VIEW_ZONE */ || t.type === 5 /* MouseTargetType.GUTTER_VIEW_ZONE */) {\n const newPosition = this._helpPositionJumpOverViewZone(t.detail);\n if (newPosition) {\n return MouseTarget.createViewZone(t.type, t.element, t.mouseColumn, newPosition, t.detail);\n }\n }\n return t;\n }\n _helpPositionJumpOverViewZone(viewZoneData) {\n // Force position on view zones to go above or below depending on where selection started from\n const selectionStart = new Position(this._currentSelection.selectionStartLineNumber, this._currentSelection.selectionStartColumn);\n const positionBefore = viewZoneData.positionBefore;\n const positionAfter = viewZoneData.positionAfter;\n if (positionBefore && positionAfter) {\n if (positionBefore.isBefore(selectionStart)) {\n return positionBefore;\n }\n else {\n return positionAfter;\n }\n }\n return null;\n }\n _dispatchMouse(position, inSelectionMode, revealType) {\n if (!position.position) {\n return;\n }\n this._viewController.dispatchMouse({\n position: position.position,\n mouseColumn: position.mouseColumn,\n startedOnLineNumbers: this._mouseState.startedOnLineNumbers,\n revealType,\n inSelectionMode: inSelectionMode,\n mouseDownCount: this._mouseState.count,\n altKey: this._mouseState.altKey,\n ctrlKey: this._mouseState.ctrlKey,\n metaKey: this._mouseState.metaKey,\n shiftKey: this._mouseState.shiftKey,\n leftButton: this._mouseState.leftButton,\n middleButton: this._mouseState.middleButton,\n onInjectedText: position.type === 6 /* MouseTargetType.CONTENT_TEXT */ && position.detail.injectedText !== null\n });\n }\n}\nclass TopBottomDragScrolling extends Disposable {\n constructor(_context, _viewHelper, _mouseTargetFactory, _dispatchMouse) {\n super();\n this._context = _context;\n this._viewHelper = _viewHelper;\n this._mouseTargetFactory = _mouseTargetFactory;\n this._dispatchMouse = _dispatchMouse;\n this._operation = null;\n }\n dispose() {\n super.dispose();\n this.stop();\n }\n start(position, mouseEvent) {\n if (this._operation) {\n this._operation.setPosition(position, mouseEvent);\n }\n else {\n this._operation = new TopBottomDragScrollingOperation(this._context, this._viewHelper, this._mouseTargetFactory, this._dispatchMouse, position, mouseEvent);\n }\n }\n stop() {\n if (this._operation) {\n this._operation.dispose();\n this._operation = null;\n }\n }\n}\nclass TopBottomDragScrollingOperation extends Disposable {\n constructor(_context, _viewHelper, _mouseTargetFactory, _dispatchMouse, position, mouseEvent) {\n super();\n this._context = _context;\n this._viewHelper = _viewHelper;\n this._mouseTargetFactory = _mouseTargetFactory;\n this._dispatchMouse = _dispatchMouse;\n this._position = position;\n this._mouseEvent = mouseEvent;\n this._lastTime = Date.now();\n this._animationFrameDisposable = dom.scheduleAtNextAnimationFrame(dom.getWindow(mouseEvent.browserEvent), () => this._execute());\n }\n dispose() {\n this._animationFrameDisposable.dispose();\n super.dispose();\n }\n setPosition(position, mouseEvent) {\n this._position = position;\n this._mouseEvent = mouseEvent;\n }\n /**\n * update internal state and return elapsed ms since last time\n */\n _tick() {\n const now = Date.now();\n const elapsed = now - this._lastTime;\n this._lastTime = now;\n return elapsed;\n }\n /**\n * get the number of lines per second to auto-scroll\n */\n _getScrollSpeed() {\n const lineHeight = this._context.configuration.options.get(66 /* EditorOption.lineHeight */);\n const viewportInLines = this._context.configuration.options.get(143 /* EditorOption.layoutInfo */).height / lineHeight;\n const outsideDistanceInLines = this._position.outsideDistance / lineHeight;\n if (outsideDistanceInLines <= 1.5) {\n return Math.max(30, viewportInLines * (1 + outsideDistanceInLines));\n }\n if (outsideDistanceInLines <= 3) {\n return Math.max(60, viewportInLines * (2 + outsideDistanceInLines));\n }\n return Math.max(200, viewportInLines * (7 + outsideDistanceInLines));\n }\n _execute() {\n const lineHeight = this._context.configuration.options.get(66 /* EditorOption.lineHeight */);\n const scrollSpeedInLines = this._getScrollSpeed();\n const elapsed = this._tick();\n const scrollInPixels = scrollSpeedInLines * (elapsed / 1000) * lineHeight;\n const scrollValue = (this._position.outsidePosition === 'above' ? -scrollInPixels : scrollInPixels);\n this._context.viewModel.viewLayout.deltaScrollNow(0, scrollValue);\n this._viewHelper.renderNow();\n const viewportData = this._context.viewLayout.getLinesViewportData();\n const edgeLineNumber = (this._position.outsidePosition === 'above' ? viewportData.startLineNumber : viewportData.endLineNumber);\n // First, try to find a position that matches the horizontal position of the mouse\n let mouseTarget;\n {\n const editorPos = createEditorPagePosition(this._viewHelper.viewDomNode);\n const horizontalScrollbarHeight = this._context.configuration.options.get(143 /* EditorOption.layoutInfo */).horizontalScrollbarHeight;\n const pos = new PageCoordinates(this._mouseEvent.pos.x, editorPos.y + editorPos.height - horizontalScrollbarHeight - 0.1);\n const relativePos = createCoordinatesRelativeToEditor(this._viewHelper.viewDomNode, editorPos, pos);\n mouseTarget = this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(), editorPos, pos, relativePos, null);\n }\n if (!mouseTarget.position || mouseTarget.position.lineNumber !== edgeLineNumber) {\n if (this._position.outsidePosition === 'above') {\n mouseTarget = MouseTarget.createOutsideEditor(this._position.mouseColumn, new Position(edgeLineNumber, 1), 'above', this._position.outsideDistance);\n }\n else {\n mouseTarget = MouseTarget.createOutsideEditor(this._position.mouseColumn, new Position(edgeLineNumber, this._context.viewModel.getLineMaxColumn(edgeLineNumber)), 'below', this._position.outsideDistance);\n }\n }\n this._dispatchMouse(mouseTarget, true, 2 /* NavigationCommandRevealType.None */);\n this._animationFrameDisposable = dom.scheduleAtNextAnimationFrame(dom.getWindow(mouseTarget.element), () => this._execute());\n }\n}\nclass MouseDownState {\n get altKey() { return this._altKey; }\n get ctrlKey() { return this._ctrlKey; }\n get metaKey() { return this._metaKey; }\n get shiftKey() { return this._shiftKey; }\n get leftButton() { return this._leftButton; }\n get middleButton() { return this._middleButton; }\n get startedOnLineNumbers() { return this._startedOnLineNumbers; }\n constructor() {\n this._altKey = false;\n this._ctrlKey = false;\n this._metaKey = false;\n this._shiftKey = false;\n this._leftButton = false;\n this._middleButton = false;\n this._startedOnLineNumbers = false;\n this._lastMouseDownPosition = null;\n this._lastMouseDownPositionEqualCount = 0;\n this._lastMouseDownCount = 0;\n this._lastSetMouseDownCountTime = 0;\n this.isDragAndDrop = false;\n }\n get count() {\n return this._lastMouseDownCount;\n }\n setModifiers(source) {\n this._altKey = source.altKey;\n this._ctrlKey = source.ctrlKey;\n this._metaKey = source.metaKey;\n this._shiftKey = source.shiftKey;\n }\n setStartButtons(source) {\n this._leftButton = source.leftButton;\n this._middleButton = source.middleButton;\n }\n setStartedOnLineNumbers(startedOnLineNumbers) {\n this._startedOnLineNumbers = startedOnLineNumbers;\n }\n trySetCount(setMouseDownCount, newMouseDownPosition) {\n // a. Invalidate multiple clicking if too much time has passed (will be hit by IE because the detail field of mouse events contains garbage in IE10)\n const currentTime = (new Date()).getTime();\n if (currentTime - this._lastSetMouseDownCountTime > MouseDownState.CLEAR_MOUSE_DOWN_COUNT_TIME) {\n setMouseDownCount = 1;\n }\n this._lastSetMouseDownCountTime = currentTime;\n // b. Ensure that we don't jump from single click to triple click in one go (will be hit by IE because the detail field of mouse events contains garbage in IE10)\n if (setMouseDownCount > this._lastMouseDownCount + 1) {\n setMouseDownCount = this._lastMouseDownCount + 1;\n }\n // c. Invalidate multiple clicking if the logical position is different\n if (this._lastMouseDownPosition && this._lastMouseDownPosition.equals(newMouseDownPosition)) {\n this._lastMouseDownPositionEqualCount++;\n }\n else {\n this._lastMouseDownPositionEqualCount = 1;\n }\n this._lastMouseDownPosition = newMouseDownPosition;\n // Finally set the lastMouseDownCount\n this._lastMouseDownCount = Math.min(setMouseDownCount, this._lastMouseDownPositionEqualCount);\n }\n}\nMouseDownState.CLEAR_MOUSE_DOWN_COUNT_TIME = 400; // ms\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Emitter } from '../common/event.js';\nexport class DomEmitter {\n get event() {\n return this.emitter.event;\n }\n constructor(element, type, useCapture) {\n const fn = (e) => this.emitter.fire(e);\n this.emitter = new Emitter({\n onWillAddFirstListener: () => element.addEventListener(type, fn, useCapture),\n onDidRemoveLastListener: () => element.removeEventListener(type, fn, useCapture)\n });\n }\n dispose() {\n this.emitter.dispose();\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as strings from '../../../base/common/strings.js';\nimport { Range } from '../../common/core/range.js';\nexport const _debugComposition = false;\nexport class TextAreaState {\n constructor(value, \n /** the offset where selection starts inside `value` */\n selectionStart, \n /** the offset where selection ends inside `value` */\n selectionEnd, \n /** the editor range in the view coordinate system that matches the selection inside `value` */\n selection, \n /** the visible line count (wrapped, not necessarily matching \\n characters) for the text in `value` before `selectionStart` */\n newlineCountBeforeSelection) {\n this.value = value;\n this.selectionStart = selectionStart;\n this.selectionEnd = selectionEnd;\n this.selection = selection;\n this.newlineCountBeforeSelection = newlineCountBeforeSelection;\n }\n toString() {\n return `[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`;\n }\n static readFromTextArea(textArea, previousState) {\n const value = textArea.getValue();\n const selectionStart = textArea.getSelectionStart();\n const selectionEnd = textArea.getSelectionEnd();\n let newlineCountBeforeSelection = undefined;\n if (previousState) {\n const valueBeforeSelectionStart = value.substring(0, selectionStart);\n const previousValueBeforeSelectionStart = previousState.value.substring(0, previousState.selectionStart);\n if (valueBeforeSelectionStart === previousValueBeforeSelectionStart) {\n newlineCountBeforeSelection = previousState.newlineCountBeforeSelection;\n }\n }\n return new TextAreaState(value, selectionStart, selectionEnd, null, newlineCountBeforeSelection);\n }\n collapseSelection() {\n if (this.selectionStart === this.value.length) {\n return this;\n }\n return new TextAreaState(this.value, this.value.length, this.value.length, null, undefined);\n }\n writeToTextArea(reason, textArea, select) {\n if (_debugComposition) {\n console.log(`writeToTextArea ${reason}: ${this.toString()}`);\n }\n textArea.setValue(reason, this.value);\n if (select) {\n textArea.setSelectionRange(reason, this.selectionStart, this.selectionEnd);\n }\n }\n deduceEditorPosition(offset) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n if (offset <= this.selectionStart) {\n const str = this.value.substring(offset, this.selectionStart);\n return this._finishDeduceEditorPosition((_b = (_a = this.selection) === null || _a === void 0 ? void 0 : _a.getStartPosition()) !== null && _b !== void 0 ? _b : null, str, -1);\n }\n if (offset >= this.selectionEnd) {\n const str = this.value.substring(this.selectionEnd, offset);\n return this._finishDeduceEditorPosition((_d = (_c = this.selection) === null || _c === void 0 ? void 0 : _c.getEndPosition()) !== null && _d !== void 0 ? _d : null, str, 1);\n }\n const str1 = this.value.substring(this.selectionStart, offset);\n if (str1.indexOf(String.fromCharCode(8230)) === -1) {\n return this._finishDeduceEditorPosition((_f = (_e = this.selection) === null || _e === void 0 ? void 0 : _e.getStartPosition()) !== null && _f !== void 0 ? _f : null, str1, 1);\n }\n const str2 = this.value.substring(offset, this.selectionEnd);\n return this._finishDeduceEditorPosition((_h = (_g = this.selection) === null || _g === void 0 ? void 0 : _g.getEndPosition()) !== null && _h !== void 0 ? _h : null, str2, -1);\n }\n _finishDeduceEditorPosition(anchor, deltaText, signum) {\n let lineFeedCnt = 0;\n let lastLineFeedIndex = -1;\n while ((lastLineFeedIndex = deltaText.indexOf('\\n', lastLineFeedIndex + 1)) !== -1) {\n lineFeedCnt++;\n }\n return [anchor, signum * deltaText.length, lineFeedCnt];\n }\n static deduceInput(previousState, currentState, couldBeEmojiInput) {\n if (!previousState) {\n // This is the EMPTY state\n return {\n text: '',\n replacePrevCharCnt: 0,\n replaceNextCharCnt: 0,\n positionDelta: 0\n };\n }\n if (_debugComposition) {\n console.log('------------------------deduceInput');\n console.log(`PREVIOUS STATE: ${previousState.toString()}`);\n console.log(`CURRENT STATE: ${currentState.toString()}`);\n }\n const prefixLength = Math.min(strings.commonPrefixLength(previousState.value, currentState.value), previousState.selectionStart, currentState.selectionStart);\n const suffixLength = Math.min(strings.commonSuffixLength(previousState.value, currentState.value), previousState.value.length - previousState.selectionEnd, currentState.value.length - currentState.selectionEnd);\n const previousValue = previousState.value.substring(prefixLength, previousState.value.length - suffixLength);\n const currentValue = currentState.value.substring(prefixLength, currentState.value.length - suffixLength);\n const previousSelectionStart = previousState.selectionStart - prefixLength;\n const previousSelectionEnd = previousState.selectionEnd - prefixLength;\n const currentSelectionStart = currentState.selectionStart - prefixLength;\n const currentSelectionEnd = currentState.selectionEnd - prefixLength;\n if (_debugComposition) {\n console.log(`AFTER DIFFING PREVIOUS STATE: <${previousValue}>, selectionStart: ${previousSelectionStart}, selectionEnd: ${previousSelectionEnd}`);\n console.log(`AFTER DIFFING CURRENT STATE: <${currentValue}>, selectionStart: ${currentSelectionStart}, selectionEnd: ${currentSelectionEnd}`);\n }\n if (currentSelectionStart === currentSelectionEnd) {\n // no current selection\n const replacePreviousCharacters = (previousState.selectionStart - prefixLength);\n if (_debugComposition) {\n console.log(`REMOVE PREVIOUS: ${replacePreviousCharacters} chars`);\n }\n return {\n text: currentValue,\n replacePrevCharCnt: replacePreviousCharacters,\n replaceNextCharCnt: 0,\n positionDelta: 0\n };\n }\n // there is a current selection => composition case\n const replacePreviousCharacters = previousSelectionEnd - previousSelectionStart;\n return {\n text: currentValue,\n replacePrevCharCnt: replacePreviousCharacters,\n replaceNextCharCnt: 0,\n positionDelta: 0\n };\n }\n static deduceAndroidCompositionInput(previousState, currentState) {\n if (!previousState) {\n // This is the EMPTY state\n return {\n text: '',\n replacePrevCharCnt: 0,\n replaceNextCharCnt: 0,\n positionDelta: 0\n };\n }\n if (_debugComposition) {\n console.log('------------------------deduceAndroidCompositionInput');\n console.log(`PREVIOUS STATE: ${previousState.toString()}`);\n console.log(`CURRENT STATE: ${currentState.toString()}`);\n }\n if (previousState.value === currentState.value) {\n return {\n text: '',\n replacePrevCharCnt: 0,\n replaceNextCharCnt: 0,\n positionDelta: currentState.selectionEnd - previousState.selectionEnd\n };\n }\n const prefixLength = Math.min(strings.commonPrefixLength(previousState.value, currentState.value), previousState.selectionEnd);\n const suffixLength = Math.min(strings.commonSuffixLength(previousState.value, currentState.value), previousState.value.length - previousState.selectionEnd);\n const previousValue = previousState.value.substring(prefixLength, previousState.value.length - suffixLength);\n const currentValue = currentState.value.substring(prefixLength, currentState.value.length - suffixLength);\n const previousSelectionStart = previousState.selectionStart - prefixLength;\n const previousSelectionEnd = previousState.selectionEnd - prefixLength;\n const currentSelectionStart = currentState.selectionStart - prefixLength;\n const currentSelectionEnd = currentState.selectionEnd - prefixLength;\n if (_debugComposition) {\n console.log(`AFTER DIFFING PREVIOUS STATE: <${previousValue}>, selectionStart: ${previousSelectionStart}, selectionEnd: ${previousSelectionEnd}`);\n console.log(`AFTER DIFFING CURRENT STATE: <${currentValue}>, selectionStart: ${currentSelectionStart}, selectionEnd: ${currentSelectionEnd}`);\n }\n return {\n text: currentValue,\n replacePrevCharCnt: previousSelectionEnd,\n replaceNextCharCnt: previousValue.length - previousSelectionEnd,\n positionDelta: currentSelectionEnd - currentValue.length\n };\n }\n}\nTextAreaState.EMPTY = new TextAreaState('', 0, 0, null, undefined);\nexport class PagedScreenReaderStrategy {\n static _getPageOfLine(lineNumber, linesPerPage) {\n return Math.floor((lineNumber - 1) / linesPerPage);\n }\n static _getRangeForPage(page, linesPerPage) {\n const offset = page * linesPerPage;\n const startLineNumber = offset + 1;\n const endLineNumber = offset + linesPerPage;\n return new Range(startLineNumber, 1, endLineNumber + 1, 1);\n }\n static fromEditorSelection(model, selection, linesPerPage, trimLongText) {\n // Chromium handles very poorly text even of a few thousand chars\n // Cut text to avoid stalling the entire UI\n const LIMIT_CHARS = 500;\n const selectionStartPage = PagedScreenReaderStrategy._getPageOfLine(selection.startLineNumber, linesPerPage);\n const selectionStartPageRange = PagedScreenReaderStrategy._getRangeForPage(selectionStartPage, linesPerPage);\n const selectionEndPage = PagedScreenReaderStrategy._getPageOfLine(selection.endLineNumber, linesPerPage);\n const selectionEndPageRange = PagedScreenReaderStrategy._getRangeForPage(selectionEndPage, linesPerPage);\n let pretextRange = selectionStartPageRange.intersectRanges(new Range(1, 1, selection.startLineNumber, selection.startColumn));\n if (trimLongText && model.getValueLengthInRange(pretextRange, 1 /* EndOfLinePreference.LF */) > LIMIT_CHARS) {\n const pretextStart = model.modifyPosition(pretextRange.getEndPosition(), -LIMIT_CHARS);\n pretextRange = Range.fromPositions(pretextStart, pretextRange.getEndPosition());\n }\n const pretext = model.getValueInRange(pretextRange, 1 /* EndOfLinePreference.LF */);\n const lastLine = model.getLineCount();\n const lastLineMaxColumn = model.getLineMaxColumn(lastLine);\n let posttextRange = selectionEndPageRange.intersectRanges(new Range(selection.endLineNumber, selection.endColumn, lastLine, lastLineMaxColumn));\n if (trimLongText && model.getValueLengthInRange(posttextRange, 1 /* EndOfLinePreference.LF */) > LIMIT_CHARS) {\n const posttextEnd = model.modifyPosition(posttextRange.getStartPosition(), LIMIT_CHARS);\n posttextRange = Range.fromPositions(posttextRange.getStartPosition(), posttextEnd);\n }\n const posttext = model.getValueInRange(posttextRange, 1 /* EndOfLinePreference.LF */);\n let text;\n if (selectionStartPage === selectionEndPage || selectionStartPage + 1 === selectionEndPage) {\n // take full selection\n text = model.getValueInRange(selection, 1 /* EndOfLinePreference.LF */);\n }\n else {\n const selectionRange1 = selectionStartPageRange.intersectRanges(selection);\n const selectionRange2 = selectionEndPageRange.intersectRanges(selection);\n text = (model.getValueInRange(selectionRange1, 1 /* EndOfLinePreference.LF */)\n + String.fromCharCode(8230)\n + model.getValueInRange(selectionRange2, 1 /* EndOfLinePreference.LF */));\n }\n if (trimLongText && text.length > 2 * LIMIT_CHARS) {\n text = text.substring(0, LIMIT_CHARS) + String.fromCharCode(8230) + text.substring(text.length - LIMIT_CHARS, text.length);\n }\n return new TextAreaState(pretext + text + posttext, pretext.length, pretext.length + text.length, selection, pretextRange.endLineNumber - pretextRange.startLineNumber);\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport * as browser from '../../../base/browser/browser.js';\nimport * as dom from '../../../base/browser/dom.js';\nimport { DomEmitter } from '../../../base/browser/event.js';\nimport { StandardKeyboardEvent } from '../../../base/browser/keyboardEvent.js';\nimport { inputLatency } from '../../../base/browser/performance.js';\nimport { RunOnceScheduler } from '../../../base/common/async.js';\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { Disposable, MutableDisposable } from '../../../base/common/lifecycle.js';\nimport { Mimes } from '../../../base/common/mime.js';\nimport * as strings from '../../../base/common/strings.js';\nimport { TextAreaState, _debugComposition } from './textAreaState.js';\nimport { Selection } from '../../common/core/selection.js';\nimport { IAccessibilityService } from '../../../platform/accessibility/common/accessibility.js';\nimport { ILogService } from '../../../platform/log/common/log.js';\nexport var TextAreaSyntethicEvents;\n(function (TextAreaSyntethicEvents) {\n TextAreaSyntethicEvents.Tap = '-monaco-textarea-synthetic-tap';\n})(TextAreaSyntethicEvents || (TextAreaSyntethicEvents = {}));\nexport const CopyOptions = {\n forceCopyWithSyntaxHighlighting: false\n};\n/**\n * Every time we write to the clipboard, we record a bit of extra metadata here.\n * Every time we read from the cipboard, if the text matches our last written text,\n * we can fetch the previous metadata.\n */\nexport class InMemoryClipboardMetadataManager {\n constructor() {\n this._lastState = null;\n }\n set(lastCopiedValue, data) {\n this._lastState = { lastCopiedValue, data };\n }\n get(pastedText) {\n if (this._lastState && this._lastState.lastCopiedValue === pastedText) {\n // match!\n return this._lastState.data;\n }\n this._lastState = null;\n return null;\n }\n}\nInMemoryClipboardMetadataManager.INSTANCE = new InMemoryClipboardMetadataManager();\nclass CompositionContext {\n constructor() {\n this._lastTypeTextLength = 0;\n }\n handleCompositionUpdate(text) {\n text = text || '';\n const typeInput = {\n text: text,\n replacePrevCharCnt: this._lastTypeTextLength,\n replaceNextCharCnt: 0,\n positionDelta: 0\n };\n this._lastTypeTextLength = text.length;\n return typeInput;\n }\n}\n/**\n * Writes screen reader content to the textarea and is able to analyze its input events to generate:\n * - onCut\n * - onPaste\n * - onType\n *\n * Composition events are generated for presentation purposes (composition input is reflected in onType).\n */\nlet TextAreaInput = class TextAreaInput extends Disposable {\n get textAreaState() {\n return this._textAreaState;\n }\n constructor(_host, _textArea, _OS, _browser, _accessibilityService, _logService) {\n super();\n this._host = _host;\n this._textArea = _textArea;\n this._OS = _OS;\n this._browser = _browser;\n this._accessibilityService = _accessibilityService;\n this._logService = _logService;\n this._onFocus = this._register(new Emitter());\n this.onFocus = this._onFocus.event;\n this._onBlur = this._register(new Emitter());\n this.onBlur = this._onBlur.event;\n this._onKeyDown = this._register(new Emitter());\n this.onKeyDown = this._onKeyDown.event;\n this._onKeyUp = this._register(new Emitter());\n this.onKeyUp = this._onKeyUp.event;\n this._onCut = this._register(new Emitter());\n this.onCut = this._onCut.event;\n this._onPaste = this._register(new Emitter());\n this.onPaste = this._onPaste.event;\n this._onType = this._register(new Emitter());\n this.onType = this._onType.event;\n this._onCompositionStart = this._register(new Emitter());\n this.onCompositionStart = this._onCompositionStart.event;\n this._onCompositionUpdate = this._register(new Emitter());\n this.onCompositionUpdate = this._onCompositionUpdate.event;\n this._onCompositionEnd = this._register(new Emitter());\n this.onCompositionEnd = this._onCompositionEnd.event;\n this._onSelectionChangeRequest = this._register(new Emitter());\n this.onSelectionChangeRequest = this._onSelectionChangeRequest.event;\n this._asyncFocusGainWriteScreenReaderContent = this._register(new MutableDisposable());\n this._asyncTriggerCut = this._register(new RunOnceScheduler(() => this._onCut.fire(), 0));\n this._textAreaState = TextAreaState.EMPTY;\n this._selectionChangeListener = null;\n if (this._accessibilityService.isScreenReaderOptimized()) {\n this.writeNativeTextAreaContent('ctor');\n }\n this._register(Event.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized, () => {\n if (this._accessibilityService.isScreenReaderOptimized() && !this._asyncFocusGainWriteScreenReaderContent.value) {\n this._asyncFocusGainWriteScreenReaderContent.value = this._register(new RunOnceScheduler(() => this.writeNativeTextAreaContent('asyncFocusGain'), 0));\n }\n else {\n this._asyncFocusGainWriteScreenReaderContent.clear();\n }\n }));\n this._hasFocus = false;\n this._currentComposition = null;\n let lastKeyDown = null;\n this._register(this._textArea.onKeyDown((_e) => {\n const e = new StandardKeyboardEvent(_e);\n if (e.keyCode === 114 /* KeyCode.KEY_IN_COMPOSITION */\n || (this._currentComposition && e.keyCode === 1 /* KeyCode.Backspace */)) {\n // Stop propagation for keyDown events if the IME is processing key input\n e.stopPropagation();\n }\n if (e.equals(9 /* KeyCode.Escape */)) {\n // Prevent default always for `Esc`, otherwise it will generate a keypress\n // See https://msdn.microsoft.com/en-us/library/ie/ms536939(v=vs.85).aspx\n e.preventDefault();\n }\n lastKeyDown = e;\n this._onKeyDown.fire(e);\n }));\n this._register(this._textArea.onKeyUp((_e) => {\n const e = new StandardKeyboardEvent(_e);\n this._onKeyUp.fire(e);\n }));\n this._register(this._textArea.onCompositionStart((e) => {\n if (_debugComposition) {\n console.log(`[compositionstart]`, e);\n }\n const currentComposition = new CompositionContext();\n if (this._currentComposition) {\n // simply reset the composition context\n this._currentComposition = currentComposition;\n return;\n }\n this._currentComposition = currentComposition;\n if (this._OS === 2 /* OperatingSystem.Macintosh */\n && lastKeyDown\n && lastKeyDown.equals(114 /* KeyCode.KEY_IN_COMPOSITION */)\n && this._textAreaState.selectionStart === this._textAreaState.selectionEnd\n && this._textAreaState.selectionStart > 0\n && this._textAreaState.value.substr(this._textAreaState.selectionStart - 1, 1) === e.data\n && (lastKeyDown.code === 'ArrowRight' || lastKeyDown.code === 'ArrowLeft')) {\n // Handling long press case on Chromium/Safari macOS + arrow key => pretend the character was selected\n if (_debugComposition) {\n console.log(`[compositionstart] Handling long press case on macOS + arrow key`, e);\n }\n // Pretend the previous character was composed (in order to get it removed by subsequent compositionupdate events)\n currentComposition.handleCompositionUpdate('x');\n this._onCompositionStart.fire({ data: e.data });\n return;\n }\n if (this._browser.isAndroid) {\n // when tapping on the editor, Android enters composition mode to edit the current word\n // so we cannot clear the textarea on Android and we must pretend the current word was selected\n this._onCompositionStart.fire({ data: e.data });\n return;\n }\n this._onCompositionStart.fire({ data: e.data });\n }));\n this._register(this._textArea.onCompositionUpdate((e) => {\n if (_debugComposition) {\n console.log(`[compositionupdate]`, e);\n }\n const currentComposition = this._currentComposition;\n if (!currentComposition) {\n // should not be possible to receive a 'compositionupdate' without a 'compositionstart'\n return;\n }\n if (this._browser.isAndroid) {\n // On Android, the data sent with the composition update event is unusable.\n // For example, if the cursor is in the middle of a word like Mic|osoft\n // and Microsoft is chosen from the keyboard's suggestions, the e.data will contain \"Microsoft\".\n // This is not really usable because it doesn't tell us where the edit began and where it ended.\n const newState = TextAreaState.readFromTextArea(this._textArea, this._textAreaState);\n const typeInput = TextAreaState.deduceAndroidCompositionInput(this._textAreaState, newState);\n this._textAreaState = newState;\n this._onType.fire(typeInput);\n this._onCompositionUpdate.fire(e);\n return;\n }\n const typeInput = currentComposition.handleCompositionUpdate(e.data);\n this._textAreaState = TextAreaState.readFromTextArea(this._textArea, this._textAreaState);\n this._onType.fire(typeInput);\n this._onCompositionUpdate.fire(e);\n }));\n this._register(this._textArea.onCompositionEnd((e) => {\n if (_debugComposition) {\n console.log(`[compositionend]`, e);\n }\n const currentComposition = this._currentComposition;\n if (!currentComposition) {\n // https://github.com/microsoft/monaco-editor/issues/1663\n // On iOS 13.2, Chinese system IME randomly trigger an additional compositionend event with empty data\n return;\n }\n this._currentComposition = null;\n if (this._browser.isAndroid) {\n // On Android, the data sent with the composition update event is unusable.\n // For example, if the cursor is in the middle of a word like Mic|osoft\n // and Microsoft is chosen from the keyboard's suggestions, the e.data will contain \"Microsoft\".\n // This is not really usable because it doesn't tell us where the edit began and where it ended.\n const newState = TextAreaState.readFromTextArea(this._textArea, this._textAreaState);\n const typeInput = TextAreaState.deduceAndroidCompositionInput(this._textAreaState, newState);\n this._textAreaState = newState;\n this._onType.fire(typeInput);\n this._onCompositionEnd.fire();\n return;\n }\n const typeInput = currentComposition.handleCompositionUpdate(e.data);\n this._textAreaState = TextAreaState.readFromTextArea(this._textArea, this._textAreaState);\n this._onType.fire(typeInput);\n this._onCompositionEnd.fire();\n }));\n this._register(this._textArea.onInput((e) => {\n if (_debugComposition) {\n console.log(`[input]`, e);\n }\n // Pretend here we touched the text area, as the `input` event will most likely\n // result in a `selectionchange` event which we want to ignore\n this._textArea.setIgnoreSelectionChangeTime('received input event');\n if (this._currentComposition) {\n return;\n }\n const newState = TextAreaState.readFromTextArea(this._textArea, this._textAreaState);\n const typeInput = TextAreaState.deduceInput(this._textAreaState, newState, /*couldBeEmojiInput*/ this._OS === 2 /* OperatingSystem.Macintosh */);\n if (typeInput.replacePrevCharCnt === 0 && typeInput.text.length === 1) {\n // one character was typed\n if (strings.isHighSurrogate(typeInput.text.charCodeAt(0))\n || typeInput.text.charCodeAt(0) === 0x7f /* Delete */) {\n // Ignore invalid input but keep it around for next time\n return;\n }\n }\n this._textAreaState = newState;\n if (typeInput.text !== ''\n || typeInput.replacePrevCharCnt !== 0\n || typeInput.replaceNextCharCnt !== 0\n || typeInput.positionDelta !== 0) {\n this._onType.fire(typeInput);\n }\n }));\n // --- Clipboard operations\n this._register(this._textArea.onCut((e) => {\n // Pretend here we touched the text area, as the `cut` event will most likely\n // result in a `selectionchange` event which we want to ignore\n this._textArea.setIgnoreSelectionChangeTime('received cut event');\n this._ensureClipboardGetsEditorSelection(e);\n this._asyncTriggerCut.schedule();\n }));\n this._register(this._textArea.onCopy((e) => {\n this._ensureClipboardGetsEditorSelection(e);\n }));\n this._register(this._textArea.onPaste((e) => {\n // Pretend here we touched the text area, as the `paste` event will most likely\n // result in a `selectionchange` event which we want to ignore\n this._textArea.setIgnoreSelectionChangeTime('received paste event');\n e.preventDefault();\n if (!e.clipboardData) {\n return;\n }\n let [text, metadata] = ClipboardEventUtils.getTextData(e.clipboardData);\n if (!text) {\n return;\n }\n // try the in-memory store\n metadata = metadata || InMemoryClipboardMetadataManager.INSTANCE.get(text);\n this._onPaste.fire({\n text: text,\n metadata: metadata\n });\n }));\n this._register(this._textArea.onFocus(() => {\n const hadFocus = this._hasFocus;\n this._setHasFocus(true);\n if (this._accessibilityService.isScreenReaderOptimized() && this._browser.isSafari && !hadFocus && this._hasFocus) {\n // When \"tabbing into\" the textarea, immediately after dispatching the 'focus' event,\n // Safari will always move the selection at offset 0 in the textarea\n if (!this._asyncFocusGainWriteScreenReaderContent.value) {\n this._asyncFocusGainWriteScreenReaderContent.value = new RunOnceScheduler(() => this.writeNativeTextAreaContent('asyncFocusGain'), 0);\n }\n this._asyncFocusGainWriteScreenReaderContent.value.schedule();\n }\n }));\n this._register(this._textArea.onBlur(() => {\n if (this._currentComposition) {\n // See https://github.com/microsoft/vscode/issues/112621\n // where compositionend is not triggered when the editor\n // is taken off-dom during a composition\n // Clear the flag to be able to write to the textarea\n this._currentComposition = null;\n // Clear the textarea to avoid an unwanted cursor type\n this.writeNativeTextAreaContent('blurWithoutCompositionEnd');\n // Fire artificial composition end\n this._onCompositionEnd.fire();\n }\n this._setHasFocus(false);\n }));\n this._register(this._textArea.onSyntheticTap(() => {\n if (this._browser.isAndroid && this._currentComposition) {\n // on Android, tapping does not cancel the current composition, so the\n // textarea is stuck showing the old composition\n // Clear the flag to be able to write to the textarea\n this._currentComposition = null;\n // Clear the textarea to avoid an unwanted cursor type\n this.writeNativeTextAreaContent('tapWithoutCompositionEnd');\n // Fire artificial composition end\n this._onCompositionEnd.fire();\n }\n }));\n }\n _installSelectionChangeListener() {\n // See https://github.com/microsoft/vscode/issues/27216 and https://github.com/microsoft/vscode/issues/98256\n // When using a Braille display, it is possible for users to reposition the\n // system caret. This is reflected in Chrome as a `selectionchange` event.\n //\n // The `selectionchange` event appears to be emitted under numerous other circumstances,\n // so it is quite a challenge to distinguish a `selectionchange` coming in from a user\n // using a Braille display from all the other cases.\n //\n // The problems with the `selectionchange` event are:\n // * the event is emitted when the textarea is focused programmatically -- textarea.focus()\n // * the event is emitted when the selection is changed in the textarea programmatically -- textarea.setSelectionRange(...)\n // * the event is emitted when the value of the textarea is changed programmatically -- textarea.value = '...'\n // * the event is emitted when tabbing into the textarea\n // * the event is emitted asynchronously (sometimes with a delay as high as a few tens of ms)\n // * the event sometimes comes in bursts for a single logical textarea operation\n // `selectionchange` events often come multiple times for a single logical change\n // so throttle multiple `selectionchange` events that burst in a short period of time.\n let previousSelectionChangeEventTime = 0;\n return dom.addDisposableListener(this._textArea.ownerDocument, 'selectionchange', (e) => {\n inputLatency.onSelectionChange();\n if (!this._hasFocus) {\n return;\n }\n if (this._currentComposition) {\n return;\n }\n if (!this._browser.isChrome) {\n // Support only for Chrome until testing happens on other browsers\n return;\n }\n const now = Date.now();\n const delta1 = now - previousSelectionChangeEventTime;\n previousSelectionChangeEventTime = now;\n if (delta1 < 5) {\n // received another `selectionchange` event within 5ms of the previous `selectionchange` event\n // => ignore it\n return;\n }\n const delta2 = now - this._textArea.getIgnoreSelectionChangeTime();\n this._textArea.resetSelectionChangeTime();\n if (delta2 < 100) {\n // received a `selectionchange` event within 100ms since we touched the textarea\n // => ignore it, since we caused it\n return;\n }\n if (!this._textAreaState.selection) {\n // Cannot correlate a position in the textarea with a position in the editor...\n return;\n }\n const newValue = this._textArea.getValue();\n if (this._textAreaState.value !== newValue) {\n // Cannot correlate a position in the textarea with a position in the editor...\n return;\n }\n const newSelectionStart = this._textArea.getSelectionStart();\n const newSelectionEnd = this._textArea.getSelectionEnd();\n if (this._textAreaState.selectionStart === newSelectionStart && this._textAreaState.selectionEnd === newSelectionEnd) {\n // Nothing to do...\n return;\n }\n const _newSelectionStartPosition = this._textAreaState.deduceEditorPosition(newSelectionStart);\n const newSelectionStartPosition = this._host.deduceModelPosition(_newSelectionStartPosition[0], _newSelectionStartPosition[1], _newSelectionStartPosition[2]);\n const _newSelectionEndPosition = this._textAreaState.deduceEditorPosition(newSelectionEnd);\n const newSelectionEndPosition = this._host.deduceModelPosition(_newSelectionEndPosition[0], _newSelectionEndPosition[1], _newSelectionEndPosition[2]);\n const newSelection = new Selection(newSelectionStartPosition.lineNumber, newSelectionStartPosition.column, newSelectionEndPosition.lineNumber, newSelectionEndPosition.column);\n this._onSelectionChangeRequest.fire(newSelection);\n });\n }\n dispose() {\n super.dispose();\n if (this._selectionChangeListener) {\n this._selectionChangeListener.dispose();\n this._selectionChangeListener = null;\n }\n }\n focusTextArea() {\n // Setting this._hasFocus and writing the screen reader content\n // will result in a focus() and setSelectionRange() in the textarea\n this._setHasFocus(true);\n // If the editor is off DOM, focus cannot be really set, so let's double check that we have managed to set the focus\n this.refreshFocusState();\n }\n isFocused() {\n return this._hasFocus;\n }\n refreshFocusState() {\n this._setHasFocus(this._textArea.hasFocus());\n }\n _setHasFocus(newHasFocus) {\n if (this._hasFocus === newHasFocus) {\n // no change\n return;\n }\n this._hasFocus = newHasFocus;\n if (this._selectionChangeListener) {\n this._selectionChangeListener.dispose();\n this._selectionChangeListener = null;\n }\n if (this._hasFocus) {\n this._selectionChangeListener = this._installSelectionChangeListener();\n }\n if (this._hasFocus) {\n this.writeNativeTextAreaContent('focusgain');\n }\n if (this._hasFocus) {\n this._onFocus.fire();\n }\n else {\n this._onBlur.fire();\n }\n }\n _setAndWriteTextAreaState(reason, textAreaState) {\n if (!this._hasFocus) {\n textAreaState = textAreaState.collapseSelection();\n }\n textAreaState.writeToTextArea(reason, this._textArea, this._hasFocus);\n this._textAreaState = textAreaState;\n }\n writeNativeTextAreaContent(reason) {\n if ((!this._accessibilityService.isScreenReaderOptimized() && reason === 'render') || this._currentComposition) {\n // Do not write to the text on render unless a screen reader is being used #192278\n // Do not write to the text area when doing composition\n return;\n }\n this._logService.trace(`writeTextAreaState(reason: ${reason})`);\n this._setAndWriteTextAreaState(reason, this._host.getScreenReaderContent());\n }\n _ensureClipboardGetsEditorSelection(e) {\n const dataToCopy = this._host.getDataToCopy();\n const storedMetadata = {\n version: 1,\n isFromEmptySelection: dataToCopy.isFromEmptySelection,\n multicursorText: dataToCopy.multicursorText,\n mode: dataToCopy.mode\n };\n InMemoryClipboardMetadataManager.INSTANCE.set(\n // When writing \"LINE\\r\\n\" to the clipboard and then pasting,\n // Firefox pastes \"LINE\\n\", so let's work around this quirk\n (this._browser.isFirefox ? dataToCopy.text.replace(/\\r\\n/g, '\\n') : dataToCopy.text), storedMetadata);\n e.preventDefault();\n if (e.clipboardData) {\n ClipboardEventUtils.setTextData(e.clipboardData, dataToCopy.text, dataToCopy.html, storedMetadata);\n }\n }\n};\nTextAreaInput = __decorate([\n __param(4, IAccessibilityService),\n __param(5, ILogService)\n], TextAreaInput);\nexport { TextAreaInput };\nexport const ClipboardEventUtils = {\n getTextData(clipboardData) {\n const text = clipboardData.getData(Mimes.text);\n let metadata = null;\n const rawmetadata = clipboardData.getData('vscode-editor-data');\n if (typeof rawmetadata === 'string') {\n try {\n metadata = JSON.parse(rawmetadata);\n if (metadata.version !== 1) {\n metadata = null;\n }\n }\n catch (err) {\n // no problem!\n }\n }\n if (text.length === 0 && metadata === null && clipboardData.files.length > 0) {\n // no textual data pasted, generate text from file names\n const files = Array.prototype.slice.call(clipboardData.files, 0);\n return [files.map(file => file.name).join('\\n'), null];\n }\n return [text, metadata];\n },\n setTextData(clipboardData, text, html, metadata) {\n clipboardData.setData(Mimes.text, text);\n if (typeof html === 'string') {\n clipboardData.setData('text/html', html);\n }\n clipboardData.setData('vscode-editor-data', JSON.stringify(metadata));\n }\n};\nexport class TextAreaWrapper extends Disposable {\n get ownerDocument() {\n return this._actual.ownerDocument;\n }\n constructor(_actual) {\n super();\n this._actual = _actual;\n this.onKeyDown = this._register(new DomEmitter(this._actual, 'keydown')).event;\n this.onKeyUp = this._register(new DomEmitter(this._actual, 'keyup')).event;\n this.onCompositionStart = this._register(new DomEmitter(this._actual, 'compositionstart')).event;\n this.onCompositionUpdate = this._register(new DomEmitter(this._actual, 'compositionupdate')).event;\n this.onCompositionEnd = this._register(new DomEmitter(this._actual, 'compositionend')).event;\n this.onBeforeInput = this._register(new DomEmitter(this._actual, 'beforeinput')).event;\n this.onInput = this._register(new DomEmitter(this._actual, 'input')).event;\n this.onCut = this._register(new DomEmitter(this._actual, 'cut')).event;\n this.onCopy = this._register(new DomEmitter(this._actual, 'copy')).event;\n this.onPaste = this._register(new DomEmitter(this._actual, 'paste')).event;\n this.onFocus = this._register(new DomEmitter(this._actual, 'focus')).event;\n this.onBlur = this._register(new DomEmitter(this._actual, 'blur')).event;\n this._onSyntheticTap = this._register(new Emitter());\n this.onSyntheticTap = this._onSyntheticTap.event;\n this._ignoreSelectionChangeTime = 0;\n this._register(this.onKeyDown(() => inputLatency.onKeyDown()));\n this._register(this.onBeforeInput(() => inputLatency.onBeforeInput()));\n this._register(this.onInput(() => inputLatency.onInput()));\n this._register(this.onKeyUp(() => inputLatency.onKeyUp()));\n this._register(dom.addDisposableListener(this._actual, TextAreaSyntethicEvents.Tap, () => this._onSyntheticTap.fire()));\n }\n hasFocus() {\n const shadowRoot = dom.getShadowRoot(this._actual);\n if (shadowRoot) {\n return shadowRoot.activeElement === this._actual;\n }\n else if (this._actual.isConnected) {\n return dom.getActiveElement() === this._actual;\n }\n else {\n return false;\n }\n }\n setIgnoreSelectionChangeTime(reason) {\n this._ignoreSelectionChangeTime = Date.now();\n }\n getIgnoreSelectionChangeTime() {\n return this._ignoreSelectionChangeTime;\n }\n resetSelectionChangeTime() {\n this._ignoreSelectionChangeTime = 0;\n }\n getValue() {\n // console.log('current value: ' + this._textArea.value);\n return this._actual.value;\n }\n setValue(reason, value) {\n const textArea = this._actual;\n if (textArea.value === value) {\n // No change\n return;\n }\n // console.log('reason: ' + reason + ', current value: ' + textArea.value + ' => new value: ' + value);\n this.setIgnoreSelectionChangeTime('setValue');\n textArea.value = value;\n }\n getSelectionStart() {\n return this._actual.selectionDirection === 'backward' ? this._actual.selectionEnd : this._actual.selectionStart;\n }\n getSelectionEnd() {\n return this._actual.selectionDirection === 'backward' ? this._actual.selectionStart : this._actual.selectionEnd;\n }\n setSelectionRange(reason, selectionStart, selectionEnd) {\n const textArea = this._actual;\n let activeElement = null;\n const shadowRoot = dom.getShadowRoot(textArea);\n if (shadowRoot) {\n activeElement = shadowRoot.activeElement;\n }\n else {\n activeElement = dom.getActiveElement();\n }\n const activeWindow = dom.getWindow(activeElement);\n const currentIsFocused = (activeElement === textArea);\n const currentSelectionStart = textArea.selectionStart;\n const currentSelectionEnd = textArea.selectionEnd;\n if (currentIsFocused && currentSelectionStart === selectionStart && currentSelectionEnd === selectionEnd) {\n // No change\n // Firefox iframe bug https://github.com/microsoft/monaco-editor/issues/643#issuecomment-367871377\n if (browser.isFirefox && activeWindow.parent !== activeWindow) {\n textArea.focus();\n }\n return;\n }\n // console.log('reason: ' + reason + ', setSelectionRange: ' + selectionStart + ' -> ' + selectionEnd);\n if (currentIsFocused) {\n // No need to focus, only need to change the selection range\n this.setIgnoreSelectionChangeTime('setSelectionRange');\n textArea.setSelectionRange(selectionStart, selectionEnd);\n if (browser.isFirefox && activeWindow.parent !== activeWindow) {\n textArea.focus();\n }\n return;\n }\n // If the focus is outside the textarea, browsers will try really hard to reveal the textarea.\n // Here, we try to undo the browser's desperate reveal.\n try {\n const scrollState = dom.saveParentsScrollTop(textArea);\n this.setIgnoreSelectionChangeTime('setSelectionRange');\n textArea.focus();\n textArea.setSelectionRange(selectionStart, selectionEnd);\n dom.restoreParentsScrollTop(textArea, scrollState);\n }\n catch (e) {\n // Sometimes IE throws when setting selection (e.g. textarea is off-DOM)\n }\n }\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { BrowserFeatures } from '../../../base/browser/canIUse.js';\nimport * as dom from '../../../base/browser/dom.js';\nimport { EventType, Gesture } from '../../../base/browser/touch.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport * as platform from '../../../base/common/platform.js';\nimport { MouseHandler } from './mouseHandler.js';\nimport { TextAreaSyntethicEvents } from './textAreaInput.js';\nimport { EditorMouseEvent, EditorPointerEventFactory } from '../editorDom.js';\n/**\n * Currently only tested on iOS 13/ iPadOS.\n */\nexport class PointerEventHandler extends MouseHandler {\n constructor(context, viewController, viewHelper) {\n super(context, viewController, viewHelper);\n this._register(Gesture.addTarget(this.viewHelper.linesContentDomNode));\n this._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Tap, (e) => this.onTap(e)));\n this._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Change, (e) => this.onChange(e)));\n this._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Contextmenu, (e) => this._onContextMenu(new EditorMouseEvent(e, false, this.viewHelper.viewDomNode), false)));\n this._lastPointerType = 'mouse';\n this._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, 'pointerdown', (e) => {\n const pointerType = e.pointerType;\n if (pointerType === 'mouse') {\n this._lastPointerType = 'mouse';\n return;\n }\n else if (pointerType === 'touch') {\n this._lastPointerType = 'touch';\n }\n else {\n this._lastPointerType = 'pen';\n }\n }));\n // PonterEvents\n const pointerEvents = new EditorPointerEventFactory(this.viewHelper.viewDomNode);\n this._register(pointerEvents.onPointerMove(this.viewHelper.viewDomNode, (e) => this._onMouseMove(e)));\n this._register(pointerEvents.onPointerUp(this.viewHelper.viewDomNode, (e) => this._onMouseUp(e)));\n this._register(pointerEvents.onPointerLeave(this.viewHelper.viewDomNode, (e) => this._onMouseLeave(e)));\n this._register(pointerEvents.onPointerDown(this.viewHelper.viewDomNode, (e, pointerId) => this._onMouseDown(e, pointerId)));\n }\n onTap(event) {\n if (!event.initialTarget || !this.viewHelper.linesContentDomNode.contains(event.initialTarget)) {\n return;\n }\n event.preventDefault();\n this.viewHelper.focusTextArea();\n this._dispatchGesture(event, /*inSelectionMode*/ false);\n }\n onChange(event) {\n if (this._lastPointerType === 'touch') {\n this._context.viewModel.viewLayout.deltaScrollNow(-event.translationX, -event.translationY);\n }\n if (this._lastPointerType === 'pen') {\n this._dispatchGesture(event, /*inSelectionMode*/ true);\n }\n }\n _dispatchGesture(event, inSelectionMode) {\n const target = this._createMouseTarget(new EditorMouseEvent(event, false, this.viewHelper.viewDomNode), false);\n if (target.position) {\n this.viewController.dispatchMouse({\n position: target.position,\n mouseColumn: target.position.column,\n startedOnLineNumbers: false,\n revealType: 1 /* NavigationCommandRevealType.Minimal */,\n mouseDownCount: event.tapCount,\n inSelectionMode,\n altKey: false,\n ctrlKey: false,\n metaKey: false,\n shiftKey: false,\n leftButton: false,\n middleButton: false,\n onInjectedText: target.type === 6 /* MouseTargetType.CONTENT_TEXT */ && target.detail.injectedText !== null\n });\n }\n }\n _onMouseDown(e, pointerId) {\n if (e.browserEvent.pointerType === 'touch') {\n return;\n }\n super._onMouseDown(e, pointerId);\n }\n}\nclass TouchHandler extends MouseHandler {\n constructor(context, viewController, viewHelper) {\n super(context, viewController, viewHelper);\n this._register(Gesture.addTarget(this.viewHelper.linesContentDomNode));\n this._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Tap, (e) => this.onTap(e)));\n this._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Change, (e) => this.onChange(e)));\n this._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Contextmenu, (e) => this._onContextMenu(new EditorMouseEvent(e, false, this.viewHelper.viewDomNode), false)));\n }\n onTap(event) {\n event.preventDefault();\n this.viewHelper.focusTextArea();\n const target = this._createMouseTarget(new EditorMouseEvent(event, false, this.viewHelper.viewDomNode), false);\n if (target.position) {\n // Send the tap event also to the