monaco-editor
Version:
A browser based code editor
7 lines (5 loc) • 3.7 MB
JavaScript
var J4e=Object.defineProperty;var e5e=(yn,rl,kc)=>rl in yn?J4e(yn,rl,{enumerable:!0,configurable:!0,writable:!0,value:kc}):yn[rl]=kc;var Vi=(yn,rl,kc)=>(e5e(yn,typeof rl!="symbol"?rl+"":rl,kc),kc);define("vs/editor.api.001a2486",["exports"],function(yn){var lte,cte,dte,hte,vS,Ob,Fb,_p,fc,Vb,yS,zb,Eu,Ub,$b,jb,qb,Cp,Kb,Gb,Zb,Nu,vp,ES,wp,Ru,Sp,TS,Qb,Jb,yp,Lp,xp,eC,tC,iC,nC,sC,Mu,oC,rC,aC,lC,cC,dC,hC,kp,Ip,uC,gC,RS,MS,Xd,pC,Dp,mC,_C,Cc,Ep,bC,CC,vC,AS,wC,Pu,Tp,SC,yC,LC,PS,OS,Mp,Ap,DC,EC,TC,NC,RC,BS,Pp,HS,MC,VS,zS,Op,AC,PC,OC,vc,Jd,wc,BC,HC,VC,zC,UC;"use strict";function rl(){return globalThis._VSCODE_NLS_MESSAGES}function kc(){return globalThis._VSCODE_NLS_LANGUAGE}const Mte=kc()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function QS(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(i,n)=>{const s=n[0],r=e[s];let a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),Mte&&(t="\uFF3B"+t.replace(/[aouei]/g,"$&$&")+"\uFF3D"),t}function m(o,e,...t){return QS(typeof o=="number"?RB(o,e):e,t)}function RB(o,e){var i;const t=(i=rl())==null?void 0:i[o];if(typeof t!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${o} !!!`)}return t}function z(o,e,...t){let i;typeof o=="number"?i=RB(o,e):i=e;const n=QS(i,t);return{value:n,original:e===i?n:QS(e,t)}}function Ate(o,e){const t=o;typeof t.vscodeWindowId!="number"&&Object.defineProperty(t,"vscodeWindowId",{get:()=>e})}const Ct=window,nT=class{constructor(){this.mapWindowIdToZoomFactor=new Map}getZoomFactor(e){var t;return(t=this.mapWindowIdToZoomFactor.get(this.getWindowId(e)))!=null?t:1}getWindowId(e){return e.vscodeWindowId}};let GN=nT;(()=>{nT.INSTANCE=new nT})();function MB(o,e,t){typeof e=="string"&&(e=o.matchMedia(e)),e.addEventListener("change",t)}function ZN(o){return GN.INSTANCE.getZoomFactor(o)}const Wp=navigator.userAgent,Mo=Wp.indexOf("Firefox")>=0,Wu=Wp.indexOf("AppleWebKit")>=0,ZC=Wp.indexOf("Chrome")>=0,nh=!ZC&&Wp.indexOf("Safari")>=0,AB=!ZC&&!nh&&Wu;Wp.indexOf("Electron/")>=0;const PB=Wp.indexOf("Android")>=0;let JS=!1;if(typeof Ct.matchMedia=="function"){const o=Ct.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=Ct.matchMedia("(display-mode: fullscreen)");JS=o.matches,MB(Ct,o,({matches:t})=>{JS&&e.matches||(JS=t)})}function Pte(){return JS}class Ote{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Bp.isErrorNoTelemetry(e)?new Bp(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)}}const YN=new Ote;function ey(o){YN.onUnexpectedError(o)}function Te(o){Ao(o)||YN.onUnexpectedError(o)}function Ti(o){Ao(o)||YN.onUnexpectedExternalError(o)}function XN(o){if(o instanceof Error){const{name:e,message:t,cause:i}=o,n=o.stacktrace||o.stack;return{$isError:!0,name:e,message:t,stack:n,noTelemetry:Bp.isErrorNoTelemetry(o),cause:i?XN(i):void 0,code:o.code}}return o}const ty="Canceled";function Ao(o){return o instanceof gr?!0:o instanceof Error&&o.name===ty&&o.message===ty}class gr extends Error{constructor(){super(ty),this.name=this.message}}function Fte(){const o=new Error(ty);return o.name=o.message,o}function fr(o){return o?new Error(`Illegal argument: ${o}`):new Error("Illegal argument")}function iy(o){return o?new Error(`Illegal state: ${o}`):new Error("Illegal state")}class Wte extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class Bp extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof Bp)return e;const t=new Bp;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class ve extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,ve.prototype)}}function QN(o,e){if(!o)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}function ny(o,e="Unreachable"){throw new Error(e)}function YC(o,e="unexpected state"){if(!o)throw typeof e=="string"?new ve(`Assertion Failed: ${e}`):e}function OB(o,e="Soft Assertion Failed"){o||Te(new ve(e))}function sh(o){if(!o()){debugger;o(),Te(new ve("Assertion Failed"))}}function XC(o,e){let t=0;for(;t<o.length-1;){const i=o[t],n=o[t+1];if(!e(i,n))return!1;t++}return!0}function Gi(o){return typeof o=="string"}function sn(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function Bte(o){const e=Object.getPrototypeOf(Uint8Array);return typeof o=="object"&&o instanceof e}function Ic(o){return typeof o=="number"&&!isNaN(o)}function JN(o){return!!o&&typeof o[Symbol.iterator]=="function"}function FB(o){return o===!0||o===!1}function es(o){return typeof o>"u"}function Ln(o){return!pr(o)}function pr(o){return es(o)||o===null}function ot(o,e){if(!o)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function oh(o){return YC(o!=null,"Argument is `undefined` or `null`."),o}function Bu(o){return typeof o=="function"}function Hte(o,e){const t=Math.min(o.length,e.length);for(let i=0;i<t;i++)Vte(o[i],e[i])}function Vte(o,e){if(Gi(e)){if(typeof o!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if(Bu(e)){try{if(o instanceof e)return}catch{}if(!pr(o)&&o.constructor===e||e.length===1&&e.call(void 0,o)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function t5e(o){return o}const Hu="en";let QC=!1,JC=!1,e1=!1,WB=!1,eR=!1,tR=!1,BB=!1,sy,oy=Hu,HB=Hu,zte,Sa;const Dc=globalThis;let ts;typeof Dc.vscode<"u"&&typeof Dc.vscode.process<"u"?ts=Dc.vscode.process:typeof process<"u"&&typeof((lte=process==null?void 0:process.versions)==null?void 0:lte.node)=="string"&&(ts=process);const Ute=typeof((cte=ts==null?void 0:ts.versions)==null?void 0:cte.electron)=="string"&&(ts==null?void 0:ts.type)==="renderer";if(typeof ts=="object"){QC=ts.platform==="win32",JC=ts.platform==="darwin",e1=ts.platform==="linux",e1&&!!ts.env.SNAP&&ts.env.SNAP_REVISION,!!ts.env.CI||!!ts.env.BUILD_ARTIFACTSTAGINGDIRECTORY||ts.env.GITHUB_WORKSPACE,sy=Hu,oy=Hu;const o=ts.env.VSCODE_NLS_CONFIG;if(o)try{const e=JSON.parse(o);sy=e.userLocale,HB=e.osLocale,oy=e.resolvedLanguage||Hu,zte=(dte=e.languagePack)==null?void 0:dte.translationsConfigFile}catch{}WB=!0}else typeof navigator=="object"&&!Ute?(Sa=navigator.userAgent,QC=Sa.indexOf("Windows")>=0,JC=Sa.indexOf("Macintosh")>=0,tR=(Sa.indexOf("Macintosh")>=0||Sa.indexOf("iPad")>=0||Sa.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,e1=Sa.indexOf("Linux")>=0,BB=(Sa==null?void 0:Sa.indexOf("Mobi"))>=0,eR=!0,oy=kc()||Hu,sy=navigator.language.toLowerCase(),HB=sy):console.error("Unable to resolve platform.");let ry=0;JC?ry=1:QC?ry=3:e1&&(ry=2);const pn=QC,je=JC,_s=e1,qr=WB,al=eR,$te=eR&&typeof Dc.importScripts=="function"?Dc.origin:void 0,mr=tR,VB=BB,iR=ry,ll=Sa,jte=oy,qte=typeof Dc.postMessage=="function"&&!Dc.importScripts,ay=(()=>{if(qte){const o=[];Dc.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=o.length;i<n;i++){const s=o[i];if(s.id===t.data.vscodeScheduleAsyncWork){o.splice(i,1),s.callback();return}}});let e=0;return t=>{const i=++e;o.push({id:i,callback:t}),Dc.postMessage({vscodeScheduleAsyncWork:i},"*")}}return o=>setTimeout(o)})(),lo=JC||tR?2:QC?1:3;let zB=!0,UB=!1;function $B(){if(!UB){UB=!0;const o=new Uint8Array(2);o[0]=1,o[1]=2,zB=new Uint16Array(o.buffer)[0]===(2<<8)+1}return zB}const nR=!!(ll&&ll.indexOf("Chrome")>=0),Kte=!!(ll&&ll.indexOf("Firefox")>=0),Gte=!!(!nR&&ll&&ll.indexOf("Safari")>=0),jB=!!(ll&&ll.indexOf("Edg/")>=0),Zte=!!(ll&&ll.indexOf("Android")>=0),t1={clipboard:{writeText:qr||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:qr||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>qr||Pte()?0:navigator.keyboard||nh?1:2)(),touch:"ontouchstart"in Ct||navigator.maxTouchPoints>0,pointerEvents:Ct.PointerEvent&&("ontouchstart"in Ct||navigator.maxTouchPoints>0)};class sR{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const ly=new sR,oR=new sR,rR=new sR,qB=new Array(230),Yte=Object.create(null),Xte=Object.create(null),aR=[];for(let o=0;o<=193;o++)aR[o]=-1;(function(){const o="",e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",o,o],[1,1,"Hyper",0,o,0,o,o,o],[1,2,"Super",0,o,0,o,o,o],[1,3,"Fn",0,o,0,o,o,o],[1,4,"FnLock",0,o,0,o,o,o],[1,5,"Suspend",0,o,0,o,o,o],[1,6,"Resume",0,o,0,o,o,o],[1,7,"Turbo",0,o,0,o,o,o],[1,8,"Sleep",0,o,0,"VK_SLEEP",o,o],[1,9,"WakeUp",0,o,0,o,o,o],[0,10,"KeyA",31,"A",65,"VK_A",o,o],[0,11,"KeyB",32,"B",66,"VK_B",o,o],[0,12,"KeyC",33,"C",67,"VK_C",o,o],[0,13,"KeyD",34,"D",68,"VK_D",o,o],[0,14,"KeyE",35,"E",69,"VK_E",o,o],[0,15,"KeyF",36,"F",70,"VK_F",o,o],[0,16,"KeyG",37,"G",71,"VK_G",o,o],[0,17,"KeyH",38,"H",72,"VK_H",o,o],[0,18,"KeyI",39,"I",73,"VK_I",o,o],[0,19,"KeyJ",40,"J",74,"VK_J",o,o],[0,20,"KeyK",41,"K",75,"VK_K",o,o],[0,21,"KeyL",42,"L",76,"VK_L",o,o],[0,22,"KeyM",43,"M",77,"VK_M",o,o],[0,23,"KeyN",44,"N",78,"VK_N",o,o],[0,24,"KeyO",45,"O",79,"VK_O",o,o],[0,25,"KeyP",46,"P",80,"VK_P",o,o],[0,26,"KeyQ",47,"Q",81,"VK_Q",o,o],[0,27,"KeyR",48,"R",82,"VK_R",o,o],[0,28,"KeyS",49,"S",83,"VK_S",o,o],[0,29,"KeyT",50,"T",84,"VK_T",o,o],[0,30,"KeyU",51,"U",85,"VK_U",o,o],[0,31,"KeyV",52,"V",86,"VK_V",o,o],[0,32,"KeyW",53,"W",87,"VK_W",o,o],[0,33,"KeyX",54,"X",88,"VK_X",o,o],[0,34,"KeyY",55,"Y",89,"VK_Y",o,o],[0,35,"KeyZ",56,"Z",90,"VK_Z",o,o],[0,36,"Digit1",22,"1",49,"VK_1",o,o],[0,37,"Digit2",23,"2",50,"VK_2",o,o],[0,38,"Digit3",24,"3",51,"VK_3",o,o],[0,39,"Digit4",25,"4",52,"VK_4",o,o],[0,40,"Digit5",26,"5",53,"VK_5",o,o],[0,41,"Digit6",27,"6",54,"VK_6",o,o],[0,42,"Digit7",28,"7",55,"VK_7",o,o],[0,43,"Digit8",29,"8",56,"VK_8",o,o],[0,44,"Digit9",30,"9",57,"VK_9",o,o],[0,45,"Digit0",21,"0",48,"VK_0",o,o],[1,46,"Enter",3,"Enter",13,"VK_RETURN",o,o],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",o,o],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",o,o],[1,49,"Tab",2,"Tab",9,"VK_TAB",o,o],[1,50,"Space",10,"Space",32,"VK_SPACE",o,o],[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,o,0,o,o,o],[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",o,o],[1,64,"F1",59,"F1",112,"VK_F1",o,o],[1,65,"F2",60,"F2",113,"VK_F2",o,o],[1,66,"F3",61,"F3",114,"VK_F3",o,o],[1,67,"F4",62,"F4",115,"VK_F4",o,o],[1,68,"F5",63,"F5",116,"VK_F5",o,o],[1,69,"F6",64,"F6",117,"VK_F6",o,o],[1,70,"F7",65,"F7",118,"VK_F7",o,o],[1,71,"F8",66,"F8",119,"VK_F8",o,o],[1,72,"F9",67,"F9",120,"VK_F9",o,o],[1,73,"F10",68,"F10",121,"VK_F10",o,o],[1,74,"F11",69,"F11",122,"VK_F11",o,o],[1,75,"F12",70,"F12",123,"VK_F12",o,o],[1,76,"PrintScreen",0,o,0,o,o,o],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",o,o],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",o,o],[1,79,"Insert",19,"Insert",45,"VK_INSERT",o,o],[1,80,"Home",14,"Home",36,"VK_HOME",o,o],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",o,o],[1,82,"Delete",20,"Delete",46,"VK_DELETE",o,o],[1,83,"End",13,"End",35,"VK_END",o,o],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",o,o],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",o],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",o],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",o],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",o],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",o,o],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",o,o],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",o,o],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",o,o],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",o,o],[1,94,"NumpadEnter",3,o,0,o,o,o],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",o,o],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",o,o],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",o,o],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",o,o],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",o,o],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",o,o],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",o,o],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",o,o],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",o,o],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",o,o],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",o,o],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",o,o],[1,107,"ContextMenu",58,"ContextMenu",93,o,o,o],[1,108,"Power",0,o,0,o,o,o],[1,109,"NumpadEqual",0,o,0,o,o,o],[1,110,"F13",71,"F13",124,"VK_F13",o,o],[1,111,"F14",72,"F14",125,"VK_F14",o,o],[1,112,"F15",73,"F15",126,"VK_F15",o,o],[1,113,"F16",74,"F16",127,"VK_F16",o,o],[1,114,"F17",75,"F17",128,"VK_F17",o,o],[1,115,"F18",76,"F18",129,"VK_F18",o,o],[1,116,"F19",77,"F19",130,"VK_F19",o,o],[1,117,"F20",78,"F20",131,"VK_F20",o,o],[1,118,"F21",79,"F21",132,"VK_F21",o,o],[1,119,"F22",80,"F22",133,"VK_F22",o,o],[1,120,"F23",81,"F23",134,"VK_F23",o,o],[1,121,"F24",82,"F24",135,"VK_F24",o,o],[1,122,"Open",0,o,0,o,o,o],[1,123,"Help",0,o,0,o,o,o],[1,124,"Select",0,o,0,o,o,o],[1,125,"Again",0,o,0,o,o,o],[1,126,"Undo",0,o,0,o,o,o],[1,127,"Cut",0,o,0,o,o,o],[1,128,"Copy",0,o,0,o,o,o],[1,129,"Paste",0,o,0,o,o,o],[1,130,"Find",0,o,0,o,o,o],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",o,o],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",o,o],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",o,o],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",o,o],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",o,o],[1,136,"KanaMode",0,o,0,o,o,o],[0,137,"IntlYen",0,o,0,o,o,o],[1,138,"Convert",0,o,0,o,o,o],[1,139,"NonConvert",0,o,0,o,o,o],[1,140,"Lang1",0,o,0,o,o,o],[1,141,"Lang2",0,o,0,o,o,o],[1,142,"Lang3",0,o,0,o,o,o],[1,143,"Lang4",0,o,0,o,o,o],[1,144,"Lang5",0,o,0,o,o,o],[1,145,"Abort",0,o,0,o,o,o],[1,146,"Props",0,o,0,o,o,o],[1,147,"NumpadParenLeft",0,o,0,o,o,o],[1,148,"NumpadParenRight",0,o,0,o,o,o],[1,149,"NumpadBackspace",0,o,0,o,o,o],[1,150,"NumpadMemoryStore",0,o,0,o,o,o],[1,151,"NumpadMemoryRecall",0,o,0,o,o,o],[1,152,"NumpadMemoryClear",0,o,0,o,o,o],[1,153,"NumpadMemoryAdd",0,o,0,o,o,o],[1,154,"NumpadMemorySubtract",0,o,0,o,o,o],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",o,o],[1,156,"NumpadClearEntry",0,o,0,o,o,o],[1,0,o,5,"Ctrl",17,"VK_CONTROL",o,o],[1,0,o,4,"Shift",16,"VK_SHIFT",o,o],[1,0,o,6,"Alt",18,"VK_MENU",o,o],[1,0,o,57,"Meta",91,"VK_COMMAND",o,o],[1,157,"ControlLeft",5,o,0,"VK_LCONTROL",o,o],[1,158,"ShiftLeft",4,o,0,"VK_LSHIFT",o,o],[1,159,"AltLeft",6,o,0,"VK_LMENU",o,o],[1,160,"MetaLeft",57,o,0,"VK_LWIN",o,o],[1,161,"ControlRight",5,o,0,"VK_RCONTROL",o,o],[1,162,"ShiftRight",4,o,0,"VK_RSHIFT",o,o],[1,163,"AltRight",6,o,0,"VK_RMENU",o,o],[1,164,"MetaRight",57,o,0,"VK_RWIN",o,o],[1,165,"BrightnessUp",0,o,0,o,o,o],[1,166,"BrightnessDown",0,o,0,o,o,o],[1,167,"MediaPlay",0,o,0,o,o,o],[1,168,"MediaRecord",0,o,0,o,o,o],[1,169,"MediaFastForward",0,o,0,o,o,o],[1,170,"MediaRewind",0,o,0,o,o,o],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",o,o],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",o,o],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",o,o],[1,174,"Eject",0,o,0,o,o,o],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",o,o],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",o,o],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",o,o],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",o,o],[1,179,"LaunchApp1",0,o,0,"VK_MEDIA_LAUNCH_APP1",o,o],[1,180,"SelectTask",0,o,0,o,o,o],[1,181,"LaunchScreenSaver",0,o,0,o,o,o],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",o,o],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",o,o],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",o,o],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",o,o],[1,186,"BrowserStop",0,o,0,"VK_BROWSER_STOP",o,o],[1,187,"BrowserRefresh",0,o,0,"VK_BROWSER_REFRESH",o,o],[1,188,"BrowserFavorites",0,o,0,"VK_BROWSER_FAVORITES",o,o],[1,189,"ZoomToggle",0,o,0,o,o,o],[1,190,"MailReply",0,o,0,o,o,o],[1,191,"MailForward",0,o,0,o,o,o],[1,192,"MailSend",0,o,0,o,o,o],[1,0,o,114,"KeyInComposition",229,o,o,o],[1,0,o,116,"ABNT_C2",194,"VK_ABNT_C2",o,o],[1,0,o,96,"OEM_8",223,"VK_OEM_8",o,o],[1,0,o,0,o,0,"VK_KANA",o,o],[1,0,o,0,o,0,"VK_HANGUL",o,o],[1,0,o,0,o,0,"VK_JUNJA",o,o],[1,0,o,0,o,0,"VK_FINAL",o,o],[1,0,o,0,o,0,"VK_HANJA",o,o],[1,0,o,0,o,0,"VK_KANJI",o,o],[1,0,o,0,o,0,"VK_CONVERT",o,o],[1,0,o,0,o,0,"VK_NONCONVERT",o,o],[1,0,o,0,o,0,"VK_ACCEPT",o,o],[1,0,o,0,o,0,"VK_MODECHANGE",o,o],[1,0,o,0,o,0,"VK_SELECT",o,o],[1,0,o,0,o,0,"VK_PRINT",o,o],[1,0,o,0,o,0,"VK_EXECUTE",o,o],[1,0,o,0,o,0,"VK_SNAPSHOT",o,o],[1,0,o,0,o,0,"VK_HELP",o,o],[1,0,o,0,o,0,"VK_APPS",o,o],[1,0,o,0,o,0,"VK_PROCESSKEY",o,o],[1,0,o,0,o,0,"VK_PACKET",o,o],[1,0,o,0,o,0,"VK_DBE_SBCSCHAR",o,o],[1,0,o,0,o,0,"VK_DBE_DBCSCHAR",o,o],[1,0,o,0,o,0,"VK_ATTN",o,o],[1,0,o,0,o,0,"VK_CRSEL",o,o],[1,0,o,0,o,0,"VK_EXSEL",o,o],[1,0,o,0,o,0,"VK_EREOF",o,o],[1,0,o,0,o,0,"VK_PLAY",o,o],[1,0,o,0,o,0,"VK_ZOOM",o,o],[1,0,o,0,o,0,"VK_NONAME",o,o],[1,0,o,0,o,0,"VK_PA1",o,o],[1,0,o,0,o,0,"VK_OEM_CLEAR",o,o]],t=[],i=[];for(const n of e){const[s,r,a,l,c,d,h,u,g]=n;if(i[r]||(i[r]=!0,Yte[a]=r,Xte[a.toLowerCase()]=r,s&&(aR[r]=l)),!t[l]){if(t[l]=!0,!c)throw new Error(`String representation missing for key code ${l} around scan code ${a}`);ly.define(l,c),oR.define(l,u||c),rR.define(l,g||u||c)}d&&(qB[d]=l)}})();var Ec;(function(o){function e(a){return ly.keyCodeToStr(a)}o.toString=e;function t(a){return ly.strToKeyCode(a)}o.fromString=t;function i(a){return oR.keyCodeToStr(a)}o.toUserSettingsUS=i;function n(a){return rR.keyCodeToStr(a)}o.toUserSettingsGeneral=n;function s(a){return oR.strToKeyCode(a)||rR.strToKeyCode(a)}o.fromUserSettings=s;function r(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 ly.keyCodeToStr(a)}o.toElectronAccelerator=r})(Ec||(Ec={}));function Ni(o,e){const t=(e&65535)<<16>>>0;return(o|t)>>>0}function lR(o,e){if(typeof o=="number"){if(o===0)return null;const t=(o&65535)>>>0,i=(o&4294901760)>>>16;return i!==0?new cR([cy(t,e),cy(i,e)]):new cR([cy(t,e)])}else{const t=[];for(let i=0;i<o.length;i++)t.push(cy(o[i],e));return new cR(t)}}function cy(o,e){const t=!!(o&2048),i=!!(o&256),n=e===2?i:t,s=!!(o&1024),r=!!(o&512),a=e===2?t:i,l=o&255;return new Tc(n,s,r,a,l)}class Tc{constructor(e,t,i,n,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=s}equals(e){return e instanceof Tc&&this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}class cR{constructor(e){if(e.length===0)throw fr("chords");this.chords=e}}class Qte{constructor(e,t,i,n,s,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=s,this.keyAriaLabel=r}}class Jte{}function eie(o){if(o.charCode){const t=String.fromCharCode(o.charCode).toUpperCase();return Ec.fromString(t)}const e=o.keyCode;if(e===3)return 7;if(Mo)switch(e){case 59:return 85;case 60:if(_s)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(je)return 57;break}else if(Wu){if(je&&e===93)return 57;if(!je&&e===92)return 57}return qB[e]||0}const tie=je?256:2048,iie=512,nie=1024,sie=je?2048:256;class yt{constructor(e){var i;this._standardKeyboardEventBrand=!0;const t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=(i=t.getModifierState)==null?void 0:i.call(t,"AltGraph"),this.keyCode=eie(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|=tie),this.altKey&&(t|=iie),this.shiftKey&&(t|=nie),this.metaKey&&(t|=sie),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new Tc(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}const KB=new WeakMap;function oie(o){if(!o.parent||o.parent===o)return null;try{const e=o.location,t=o.parent.location;if(e.origin!=="null"&&t.origin!=="null"&&e.origin!==t.origin)return null}catch{return null}return o.parent}class rie{static getSameOriginWindowChain(e){let t=KB.get(e);if(!t){t=[],KB.set(e,t);let i=e,n;do n=oie(i),n?t.push({window:new WeakRef(i),iframeElement:i.frameElement||null}):t.push({window:new WeakRef(i),iframeElement:null}),i=n;while(i)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){var r,a;if(!t||e===t)return{top:0,left:0};let i=0,n=0;const s=this.getSameOriginWindowChain(e);for(const l of s){const c=l.window.deref();if(i+=(r=c==null?void 0:c.scrollY)!=null?r:0,n+=(a=c==null?void 0:c.scrollX)!=null?a:0,c===t||!l.iframeElement)break;const d=l.iframeElement.getBoundingClientRect();i+=d.top,n+=d.left}return{top:i,left:n}}}class xn{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.defaultPrevented=t.defaultPrevented,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);const i=rie.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=i.left,this.posy-=i.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class Vu{constructor(e,t=0,i=0){var s;this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t;let n=!1;if(ZC){const r=navigator.userAgent.match(/Chrome\/(\d+)/);n=(r?parseInt(r[1]):123)<=122}if(e){const r=e,a=e,l=((s=e.view)==null?void 0:s.devicePixelRatio)||1;if(typeof r.wheelDeltaY<"u")n?this.deltaY=r.wheelDeltaY/(120*l):this.deltaY=r.wheelDeltaY/120;else if(typeof a.VERTICAL_AXIS<"u"&&a.axis===a.VERTICAL_AXIS)this.deltaY=-a.detail/3;else if(e.type==="wheel"){const c=e;c.deltaMode===c.DOM_DELTA_LINE?Mo&&!je?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof r.wheelDeltaX<"u")nh&&pn?this.deltaX=-(r.wheelDeltaX/120):n?this.deltaX=r.wheelDeltaX/(120*l):this.deltaX=r.wheelDeltaX/120;else if(typeof a.HORIZONTAL_AXIS<"u"&&a.axis===a.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){const c=e;c.deltaMode===c.DOM_DELTA_LINE?Mo&&!je?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(n?this.deltaY=e.wheelDelta/(120*l):this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;(e=this.browserEvent)==null||e.preventDefault()}stopPropagation(){var e;(e=this.browserEvent)==null||e.stopPropagation()}}function rh(o,e){const t=this;let i=!1,n;return function(){if(i)return n;if(i=!0,e)try{n=o.apply(t,arguments)}finally{e()}else n=o.apply(t,arguments);return n}}var Je;(function(o){function e(L){return!!L&&typeof L=="object"&&typeof L[Symbol.iterator]=="function"}o.is=e;const t=Object.freeze([]);function i(){return t}o.empty=i;function*n(L){yield L}o.single=n;function s(L){return e(L)?L:n(L)}o.wrap=s;function r(L){return L||t}o.from=r;function*a(L){for(let I=L.length-1;I>=0;I--)yield L[I]}o.reverse=a;function l(L){return!L||L[Symbol.iterator]().next().done===!0}o.isEmpty=l;function c(L){return L[Symbol.iterator]().next().value}o.first=c;function d(L,I){let D=0;for(const R of L)if(I(R,D++))return!0;return!1}o.some=d;function h(L,I){let D=0;for(const R of L)if(!I(R,D++))return!1;return!0}o.every=h;function u(L,I){for(const D of L)if(I(D))return D}o.find=u;function*g(L,I){for(const D of L)I(D)&&(yield D)}o.filter=g;function*f(L,I){let D=0;for(const R of L)yield I(R,D++)}o.map=f;function*p(L,I){let D=0;for(const R of L)yield*I(R,D++)}o.flatMap=p;function*_(...L){for(const I of L)JN(I)?yield*I:yield I}o.concat=_;function b(L,I,D){let R=D;for(const F of L)R=I(R,F);return R}o.reduce=b;function v(L){let I=0;for(const D of L)I++;return I}o.length=v;function*C(L,I,D=L.length){for(I<-L.length&&(I=0),I<0&&(I+=L.length),D<0?D+=L.length:D>L.length&&(D=L.length);I<D;I++)yield L[I]}o.slice=C;function w(L,I=Number.POSITIVE_INFINITY){const D=[];if(I===0)return[D,L];const R=L[Symbol.iterator]();for(let F=0;F<I;F++){const A=R.next();if(A.done)return[D,o.empty()];D.push(A.value)}return[D,{[Symbol.iterator](){return R}}]}o.consume=w;async function S(L){const I=[];for await(const D of L)I.push(D);return I}o.asyncToArray=S;async function y(L){let I=[];for await(const D of L)I=I.concat(D);return I}o.asyncToArrayFlat=y})(Je||(Je={}));let Kr=null;function Hp(o){return Kr==null||Kr.trackDisposable(o),o}function Vp(o){Kr==null||Kr.markAsDisposed(o)}function dy(o,e){Kr==null||Kr.setParent(o,e)}function cl(o){return Kr==null||Kr.markAsSingleton(o),o}function zu(o){return typeof o=="object"&&o!==null&&typeof o.dispose=="function"&&o.dispose.length===0}function mt(o){if(Je.is(o)){const e=[];for(const t of o)if(t)try{t.dispose()}catch(i){e.push(i)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(o)?[]:o}else if(o)return o.dispose(),o}function Gr(...o){return he(()=>mt(o))}function he(o){const e=Hp({dispose:rh(()=>{Vp(e),o()})});return e}const sT=class{constructor(){this._toDispose=new Set,this._isDisposed=!1,Hp(this)}dispose(){this._isDisposed||(Vp(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{mt(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===O.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return dy(e,this),this._isDisposed?sT.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}delete(e){if(!!e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}};let U=sT;(()=>{sT.DISABLE_DISPOSED_WARNING=!1})();const fB=class{constructor(){this._store=new U,Hp(this),dy(this._store,this)}dispose(){Vp(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};let O=fB;(()=>{fB.None=Object.freeze({dispose(){}})})();class ft{constructor(){this._isDisposed=!1,Hp(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.dispose(),e&&dy(e,this),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,Vp(this),(e=this._value)==null||e.dispose(),this._value=void 0}}class aie{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}class lie{constructor(e){this.object=e}dispose(){}}class hy{constructor(){this._store=new Map,this._isDisposed=!1,Hp(this)}dispose(){Vp(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(!!this._store.size)try{mt(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,i=!1){var n;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),i||(n=this._store.get(e))==null||n.dispose(),this._store.set(e,t),dy(t,this)}deleteAndDispose(e){var t;(t=this._store.get(e))==null||t.dispose(),this._store.delete(e)}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}}const Ib=class{constructor(e){this.element=e,this.next=Ib.Undefined,this.prev=Ib.Undefined}};let zi=Ib;(()=>{Ib.Undefined=new Ib(void 0)})();class is{constructor(){this._first=zi.Undefined,this._last=zi.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===zi.Undefined}clear(){let e=this._first;for(;e!==zi.Undefined;){const t=e.next;e.prev=zi.Undefined,e.next=zi.Undefined,e=t}this._first=zi.Undefined,this._last=zi.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new zi(e);if(this._first===zi.Undefined)this._first=i,this._last=i;else if(t){const s=this._last;this._last=i,i.prev=s,s.next=i}else{const s=this._first;this._first=i,i.next=s,s.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==zi.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==zi.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==zi.Undefined&&e.next!==zi.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===zi.Undefined&&e.next===zi.Undefined?(this._first=zi.Undefined,this._last=zi.Undefined):e.next===zi.Undefined?(this._last=this._last.prev,this._last.next=zi.Undefined):e.prev===zi.Undefined&&(this._first=this._first.next,this._first.prev=zi.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==zi.Undefined;)yield e.element,e=e.next}}const cie=globalThis.performance.now.bind(globalThis.performance);class Zi{static create(e){return new Zi(e)}constructor(e){this._now=e===!1?Date.now:cie,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}var ne;(function(o){o.None=()=>O.None;function e(A,W){return u(A,()=>{},0,void 0,!0,void 0,W)}o.defer=e;function t(A){return(W,V=null,B)=>{let G=!1,ie;return ie=A(ae=>{if(!G)return ie?ie.dispose():G=!0,W.call(V,ae)},null,B),G&&ie.dispose(),ie}}o.once=t;function i(A,W){return o.once(o.filter(A,W))}o.onceIf=i;function n(A,W,V){return d((B,G=null,ie)=>A(ae=>B.call(G,W(ae)),null,ie),V)}o.map=n;function s(A,W,V){return d((B,G=null,ie)=>A(ae=>{W(ae),B.call(G,ae)},null,ie),V)}o.forEach=s;function r(A,W,V){return d((B,G=null,ie)=>A(ae=>W(ae)&&B.call(G,ae),null,ie),V)}o.filter=r;function a(A){return A}o.signal=a;function l(...A){return(W,V=null,B)=>{const G=Gr(...A.map(ie=>ie(ae=>W.call(V,ae))));return h(G,B)}}o.any=l;function c(A,W,V,B){let G=V;return n(A,ie=>(G=W(G,ie),G),B)}o.reduce=c;function d(A,W){let V;const B={onWillAddFirstListener(){V=A(G.fire,G)},onDidRemoveLastListener(){V==null||V.dispose()}},G=new P(B);return W==null||W.add(G),G.event}function h(A,W){return W instanceof Array?W.push(A):W&&W.add(A),A}function u(A,W,V=100,B=!1,G=!1,ie,ae){let de,be,De,Oe=0,Fe;const Dt={leakWarningThreshold:ie,onWillAddFirstListener(){de=A(ze=>{Oe++,be=W(be,ze),B&&!De&&(qe.fire(be),be=void 0),Fe=()=>{const Li=be;be=void 0,De=void 0,(!B||Oe>1)&&qe.fire(Li),Oe=0},typeof V=="number"?(De&&clearTimeout(De),De=setTimeout(Fe,V)):De===void 0&&(De=null,queueMicrotask(Fe))})},onWillRemoveListener(){G&&Oe>0&&(Fe==null||Fe())},onDidRemoveLastListener(){Fe=void 0,de.dispose()}},qe=new P(Dt);return ae==null||ae.add(qe),qe.event}o.debounce=u;function g(A,W=0,V){return o.debounce(A,(B,G)=>B?(B.push(G),B):[G],W,void 0,!0,void 0,V)}o.accumulate=g;function f(A,W=(B,G)=>B===G,V){let B=!0,G;return r(A,ie=>{const ae=B||!W(ie,G);return B=!1,G=ie,ae},V)}o.latch=f;function p(A,W,V){return[o.filter(A,W,V),o.filter(A,B=>!W(B),V)]}o.split=p;function _(A,W=!1,V=[],B){let G=V.slice(),ie=A(be=>{G?G.push(be):de.fire(be)});B&&B.add(ie);const ae=()=>{G==null||G.forEach(be=>de.fire(be)),G=null},de=new P({onWillAddFirstListener(){ie||(ie=A(be=>de.fire(be)),B&&B.add(ie))},onDidAddFirstListener(){G&&(W?setTimeout(ae):ae())},onDidRemoveLastListener(){ie&&ie.dispose(),ie=null}});return B&&B.add(de),de.event}o.buffer=_;function b(A,W){return(B,G,ie)=>{const ae=W(new C);return A(function(de){const be=ae.evaluate(de);be!==v&&B.call(G,be)},void 0,ie)}}o.chain=b;const v=Symbol("HaltChainable");class C{constructor(){this.steps=[]}map(W){return this.steps.push(W),this}forEach(W){return this.steps.push(V=>(W(V),V)),this}filter(W){return this.steps.push(V=>W(V)?V:v),this}reduce(W,V){let B=V;return this.steps.push(G=>(B=W(B,G),B)),this}latch(W=(V,B)=>V===B){let V=!0,B;return this.steps.push(G=>{const ie=V||!W(G,B);return V=!1,B=G,ie?G:v}),this}evaluate(W){for(const V of this.steps)if(W=V(W),W===v)break;return W}}function w(A,W,V=B=>B){const B=(...de)=>ae.fire(V(...de)),G=()=>A.on(W,B),ie=()=>A.removeListener(W,B),ae=new P({onWillAddFirstListener:G,onDidRemoveLastListener:ie});return ae.event}o.fromNodeEventEmitter=w;function S(A,W,V=B=>B){const B=(...de)=>ae.fire(V(...de)),G=()=>A.addEventListener(W,B),ie=()=>A.removeEventListener(W,B),ae=new P({onWillAddFirstListener:G,onDidRemoveLastListener:ie});return ae.event}o.fromDOMEventEmitter=S;function y(A,W){let V;const B=new Promise((G,ie)=>{const ae=t(A)(G,null,W);V=()=>ae.dispose()});return B.cancel=V,B}o.toPromise=y;function L(A,W){return A(V=>W.fire(V))}o.forward=L;function I(A,W,V){return W(V),A(B=>W(B))}o.runAndSubscribe=I;class D{constructor(W,V){this._observable=W,this._counter=0,this._hasChanged=!1;const B={onWillAddFirstListener:()=>{W.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{W.removeObserver(this)}};this.emitter=new P(B),V&&V.add(this.emitter)}beginUpdate(W){this._counter++}handlePossibleChange(W){}handleChange(W,V){this._hasChanged=!0}endUpdate(W){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function R(A,W){return new D(A,W).emitter.event}o.fromObservable=R;function F(A){return(W,V,B)=>{let G=0,ie=!1;const ae={beginUpdate(){G++},endUpdate(){G--,G===0&&(A.reportChanges(),ie&&(ie=!1,W.call(V)))},handlePossibleChange(){},handleChange(){ie=!0}};A.addObserver(ae),A.reportChanges();const de={dispose(){A.removeObserver(ae)}};return B instanceof U?B.add(de):Array.isArray(B)&&B.push(de),de}}o.fromObservableLight=F})(ne||(ne={}));const Db=class{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${Db._idPool++}`,Db.all.add(this)}start(e){this._stopWatch=new Zi,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};let dR=Db;(()=>{Db.all=new Set})(),(()=>{Db._idPool=0})();let die=-1;const oT=class{constructor(e,t,i=(oT._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=t,this.name=i,this._warnCountdown=0}dispose(){var e;(e=this._stacks)==null||e.clear()}check(e,t){const i=this.threshold;if(i<=0||t<i)return;this._stacks||(this._stacks=new Map);const n=this._stacks.get(e.value)||0;if(this._stacks.set(e.value,n+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=i*.5;const[s,r]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${t} listeners already. MOST frequent listener (${r}):`;console.warn(a),console.warn(s);const l=new hie(a,s);this._errorHandler(l)}return()=>{const s=this._stacks.get(e.value)||0;this._stacks.set(e.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(const[i,n]of this._stacks)(!e||t<n)&&(e=[i,n],t=n);return e}};let hR=oT;(()=>{oT._idPool=1})();class uR{static create(){var t;const e=new Error;return new uR((t=e.stack)!=null?t:"")}constructor(e){this.value=e}print(){console.warn(this.value.split(`
`).slice(2).join(`
`))}}class hie extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}}class uie extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}}class gR{constructor(e){this.value=e}}const gie=2;class P{constructor(e){var t,i,n,s,r,a;this._size=0,this._options=e,this._leakageMon=(t=this._options)!=null&&t.leakWarningThreshold?new hR((i=e==null?void 0:e.onListenerError)!=null?i:Te,(s=(n=this._options)==null?void 0:n.leakWarningThreshold)!=null?s:die):void 0,this._perfMon=(r=this._options)!=null&&r._profName?new dR(this._options._profName):void 0,this._deliveryQueue=(a=this._options)==null?void 0:a.deliveryQueue}dispose(){var e,t,i,n;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)==null?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(i=(t=this._options)==null?void 0:t.onDidRemoveLastListener)==null||i.call(t),(n=this._leakageMon)==null||n.dispose())}get event(){var e;return(e=this._event)!=null||(this._event=(t,i,n)=>{var l,c,d,h,u,g,f,p,_;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const b=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(b);const v=(l=this._leakageMon.getMostFrequentStack())!=null?l:["UNKNOWN stack",-1],C=new uie(`${b}. HINT: Stack shows most frequent listener (${v[1]}-times)`,v[0]);return(((c=this._options)==null?void 0:c.onListenerError)||Te)(C),O.None}if(this._disposed)return O.None;i&&(t=t.bind(i));const s=new gR(t);let r;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=uR.create(),r=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof gR?((f=this._deliveryQueue)!=null||(this._deliveryQueue=new GB),this._listeners=[this._listeners,s]):this._listeners.push(s):((h=(d=this._options)==null?void 0:d.onWillAddFirstListener)==null||h.call(d,this),this._listeners=s,(g=(u=this._options)==null?void 0:u.onDidAddFirstListener)==null||g.call(u,this)),(_=(p=this._options)==null?void 0:p.onDidAddListener)==null||_.call(p,this),this._size++;const a=he(()=>{r==null||r(),this._removeListener(s)});return n instanceof U?n.add(a):Array.isArray(n)&&n.push(a),a}),this._event}_removeListener(e){var s,r,a,l;if((r=(s=this._options)==null?void 0:s.onWillRemoveListener)==null||r.call(s,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(l=(a=this._options)==null?void 0:a.onDidRemoveLastListener)==null||l.call(a,this),this._size=0;return}const t=this._listeners,i=t.indexOf(e);if(i===-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--,t[i]=void 0;const n=this._deliveryQueue.current===this;if(this._size*gie<=t.length){let c=0;for(let d=0;d<t.length;d++)t[d]?t[c++]=t[d]:n&&c<this._deliveryQueue.end&&(this._deliveryQueue.end--,c<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=c}}_deliver(e,t){var n;if(!e)return;const i=((n=this._options)==null?void 0:n.onListenerError)||Te;if(!i){e.value(t);return}try{e.value(t)}catch(s){i(s)}}_deliverQueue(e){const t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){var t,i,n,s;if((t=this._deliveryQueue)!=null&&t.current&&(this._deliverQueue(this._deliveryQueue),(i=this._perfMon)==null||i.stop()),(n=this._perfMon)==null||n.start(this._size),this._listeners)if(this._listeners instanceof gR)this._deliver(this._listeners,e);else{const r=this._deliveryQueue;r.enqueue(this,e,this._listeners.length),this._deliverQueue(r)}(s=this._perfMon)==null||s.stop()}hasListeners(){return this._size>0}}const fie=()=>new GB;class GB{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class Uu extends P{constructor(e){super(e),this._isPaused=0,this._eventQueue=new is,this._mergeFn=e==null?void 0:e.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const 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))}}class ZB extends Uu{constructor(e){var t;super(e),this._delay=(t=e.delay)!=null?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}}class pie extends P{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e==null?void 0: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=[]}))}}class mie{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new P({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),he(rh(()=>{this.hasListeners&&this.unhook(t);const n=this.events.indexOf(t);this.events.splice(n,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){var t;(t=e.listener)==null||t.dispose(),e.listener=null}dispose(){var e;this.emitter.dispose();for(const t of this.events)(e=t.listener)==null||e.dispose();this.events=[]}}class i1{constructor(){this.data=[]}wrapEvent(e,t,i){return(n,s,r)=>e(a=>{var d;const l=this.data[this.data.length-1];if(!t){l?l.buffers.push(()=>n.call(s,a)):n.call(s,a);return}const c=l;if(!c){n.call(s,t(i,a));return}(d=c.items)!=null||(c.items=[]),c.items.push(a),c.buffers.length===0&&l.buffers.push(()=>{var h;(h=c.reducedResult)!=null||(c.reducedResult=i?c.items.reduce(t,i):c.items.reduce(t)),n.call(s,c.reducedResult)})},void 0,r)}bufferEvents(e){const t={buffers:new Array};this.data.push(t);const i=e();return this.data.pop(),t.buffers.forEach(n=>n()),i}}class n1{constructor(){this.listening=!1,this.inputEvent=ne.None,this.inputEventListener=O.None,this.emitter=new P({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()}}const YB=Object.freeze(function(o,e){const t=setTimeout(o.bind(e),0);return{dispose(){clearTimeout(t)}}});var Ue;(function(o){function e(t){return t===o.None||t===o.Cancelled||t instanceof uy?!0:!t||typeof t!="object"?!1:typeof t.isCancellationRequested=="boolean"&&typeof t.onCancellationRequested=="function"}o.isCancellationToken=e,o.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ne.None}),o.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:YB})})(Ue||(Ue={}));class uy{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?YB:(this._emitter||(this._emitter=new P),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Xt{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 uy),this._token}cancel(){this._token?this._token instanceof uy&&this._token.cancel():this._token=Ue.Cancelled}dispose(e=!1){var t;e&&this.cancel(),(t=this._parentListener)==null||t.dispose(),this._token?this._token instanceof uy&&this._token.dispose():this._token=Ue.None}}function fR(o){const e=new Xt;return o.add({dispose(){e.cancel()}}),e.token}const XB=Symbol("MicrotaskDelay");function pR(o){return!!o&&typeof o.then=="function"}function ji(o){const e=new Xt,t=o(e.token);let i=!1;const n=new Promise((s,r)=>{const a=e.token.onCancellationRequested(()=>{i=!0,a.dispose(),r(new gr)});Promise.resolve(t).then(l=>{a.dispose(),e.dispose(),i?zu(l)&&l.dispose():s(l)},l=>{a.dispose(),e.dispose(),r(l)})});return new class{cancel(){e.cancel(),e.dispose()}then(s,r){return n.then(s,r)}catch(s){return this.then(void 0,s)}finally(s){return n.finally(s)}}}function zp(o,e,t){return new Promise((i,n)=>{const s=e.onCancellationRequested(()=>{s.dispose(),i(t)});o.then(i,n).finally(()=>s.dispose())})}function _ie(o,e){return new Promise((t,i)=>{const n=e.onCancellationRequested(()=>{n.dispose(),i(new gr)});o.then(t,i).finally(()=>n.dispose())})}class bie{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){const t=()=>{if(this.queuedPromise=null,this.isDisposed)return;const i=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,i};this.queuedPromise=new Promise(i=>{this.activePromise.then(t,t).then(i)})}return new Promise((t,i)=>{this.queuedPromise.then(t,i)})}return this.activePromise=e(),new Promise((t,i)=>{this.activePromise.then(n=>{this.activePromise=null,t(n)},n=>{this.activePromise=null,i(n)})})}dispose(){this.isDisposed=!0}}const Cie=(o,e)=>{let t=!0;const i=setTimeout(()=>{t=!1,e()},o);return{isTriggered:()=>t,dispose:()=>{clearTimeout(i),t=!1}}},vie=o=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,o())}),{isTriggered:()=>e,dispose:()=>{e=!1}}};class _r{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((n,s)=>{this.doResolve=n,this.doReject=s}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const n=this.task;return this.task=null,n()}}));const i=()=>{var n;this.deferred=null,(n=this.doResolve)==null||n.call(this,null)};return this.deferred=t===XB?vie(i):Cie(t,i),this.completionPromise}isTriggered(){var e;return!!((e=this.deferred)!=null&&e.isTriggered())}cancel(){var e;this.cancelTimeout(),this.completionPromise&&((e=this.doReject)==null||e.call(this,new gr),this.completionPromise=null)}cancelTimeout(){var e;(e=this.deferred)==null||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class QB{constructor(e){this.delayer=new _r(e),this.throttler=new bie}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function dl(o,e){return e?new Promise((t,i)=>{const n=setTimeout(()=>{s.dispose(),t()},o),s=e.onCancellationRequested(()=>{clearTimeout(n),s.dispose(),i(new gr)})}):ji(t=>dl(o,t))}function Nc(o,e=0,t){const i=setTimeout(()=>{o(),t&&n.dispose()},e),n=he(()=>{clearTimeout(i),t==null||t.delete(n)});return t==null||t.add(n),n}function mR(o,e=i=>!!i,t=null){let i=0;const n=o.length,s=()=>{if(i>=n)return Promise.resolve(t);const r=o[i++];return Promise.resolve(r()).then(l=>e(l)?Promise.resolve(l):s())};return s()}class wie{constructor(){this._runningTask=void 0,this._pendingTasks=[]}schedule(e){const t=new $u;return this._pendingTasks.push({task:e,deferred:t,setUndefinedWhenCleared:!1}),this._runIfNotRunning(),t.p}_runIfNotRunning(){this._runningTask===void 0&&this._processQueue()}async _processQueue(){if(this._pendingT