11 lines
66 KiB
JavaScript
11 lines
66 KiB
JavaScript
/*!--------------------------------------------------------
|
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
*--------------------------------------------------------*/(function(){var B=["require","exports","vs/base/common/errors","vs/platform/instantiation/common/instantiation","vs/base/common/charCode","vs/base/common/strings","vs/base/common/path","vs/base/common/platform","vs/nls","vs/nls!vs/platform/profiling/electron-sandbox/profileAnalysisWorker","vs/base/common/uri","vs/base/common/types","vs/base/common/network","vs/base/browser/trustedTypes","vs/base/common/ternarySearchTree","vs/base/common/arrays","vs/nls!vs/base/common/errorMessage","vs/base/common/errorMessage","vs/base/common/extpath","vs/base/common/resources","vs/base/browser/defaultWorkerFactory","vs/base/common/worker/simpleWorker","vs/base/common/lifecycle","vs/nls!vs/platform/contextkey/common/contextkey","vs/nls!vs/platform/contextkey/common/scanner","vs/nls!vs/platform/log/common/log","vs/platform/contextkey/common/scanner","vs/platform/instantiation/common/descriptors","vs/platform/instantiation/common/extensions","vs/platform/contextkey/common/contextkey","vs/platform/log/common/log","vs/platform/profiling/common/profiling","vs/platform/profiling/common/profilingModel","vs/platform/profiling/common/profilingTelemetrySpec","vs/platform/telemetry/common/telemetry","vs/platform/profiling/electron-sandbox/profileAnalysisWorkerService","vs/base/common/event","vs/base/common/hash","vs/base/common/map","vs/platform/profiling/electron-sandbox/profileAnalysisWorker"],U=function(R){for(var t=[],f=0,p=R.length;f<p;f++)t[f]=B[R[f]];return t};define(B[13],U([0,1,2]),function(R,t,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$vV=p;function p(k,c){const T=globalThis.MonacoEnvironment;if(T?.createTrustedTypesPolicy)try{return T.createTrustedTypesPolicy(k,c)}catch(d){(0,f.$3)(d);return}try{return globalThis.trustedTypes?.createPolicy(k,c)}catch(d){(0,f.$3)(d);return}}}),define(B[14],U([0,1,15,4,5]),function(R,t,f,p,k){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$Mi=t.$Li=t.$Ki=t.$Ji=t.$Ii=void 0;class c{constructor(){this.b="",this.c=0}reset(s){return this.b=s,this.c=0,this}next(){return this.c+=1,this}hasNext(){return this.c<this.b.length-1}cmp(s){const i=s.charCodeAt(0),r=this.b.charCodeAt(this.c);return i-r}value(){return this.b[this.c]}}t.$Ii=c;class T{constructor(s=!0){this.e=s}reset(s){return this.b=s,this.c=0,this.d=0,this.next()}hasNext(){return this.d<this.b.length}next(){this.c=this.d;let s=!0;for(;this.d<this.b.length;this.d++)if(this.b.charCodeAt(this.d)===p.CharCode.Period)if(s)this.c++;else break;else s=!1;return this}cmp(s){return this.e?(0,k.$Bf)(s,this.b,0,s.length,this.c,this.d):(0,k.$Df)(s,this.b,0,s.length,this.c,this.d)}value(){return this.b.substring(this.c,this.d)}}t.$Ji=T;class d{constructor(s=!0,i=!0){this.f=s,this.g=i}reset(s){this.d=0,this.e=0,this.b=s,this.c=s.length;for(let i=s.length-1;i>=0;i--,this.c--){const r=this.b.charCodeAt(i);if(!(r===p.CharCode.Slash||this.f&&r===p.CharCode.Backslash))break}return this.next()}hasNext(){return this.e<this.c}next(){this.d=this.e;let s=!0;for(;this.e<this.c;this.e++){const i=this.b.charCodeAt(this.e);if(i===p.CharCode.Slash||this.f&&i===p.CharCode.Backslash)if(s)this.d++;else break;else s=!1}return this}cmp(s){return this.g?(0,k.$Bf)(s,this.b,0,s.length,this.d,this.e):(0,k.$Df)(s,this.b,0,s.length,this.d,this.e)}value(){return this.b.substring(this.d,this.e)}}t.$Ki=d;var w;(function(C){C[C.Scheme=1]="Scheme",C[C.Authority=2]="Authority",C[C.Path=3]="Path",C[C.Query=4]="Query",C[C.Fragment=5]="Fragment"})(w||(w={}));class E{constructor(s,i){this.f=s,this.g=i,this.d=[],this.e=0}reset(s){return this.c=s,this.d=[],this.c.scheme&&this.d.push(w.Scheme),this.c.authority&&this.d.push(w.Authority),this.c.path&&(this.b=new d(!1,!this.f(s)),this.b.reset(s.path),this.b.value()&&this.d.push(w.Path)),this.g(s)||(this.c.query&&this.d.push(w.Query),this.c.fragment&&this.d.push(w.Fragment)),this.e=0,this}next(){return this.d[this.e]===w.Path&&this.b.hasNext()?this.b.next():this.e+=1,this}hasNext(){return this.d[this.e]===w.Path&&this.b.hasNext()||this.e<this.d.length-1}cmp(s){if(this.d[this.e]===w.Scheme)return(0,k.$Cf)(s,this.c.scheme);if(this.d[this.e]===w.Authority)return(0,k.$Cf)(s,this.c.authority);if(this.d[this.e]===w.Path)return this.b.cmp(s);if(this.d[this.e]===w.Query)return(0,k.$Af)(s,this.c.query);if(this.d[this.e]===w.Fragment)return(0,k.$Af)(s,this.c.fragment);throw new Error}value(){if(this.d[this.e]===w.Scheme)return this.c.scheme;if(this.d[this.e]===w.Authority)return this.c.authority;if(this.d[this.e]===w.Path)return this.b.value();if(this.d[this.e]===w.Query)return this.c.query;if(this.d[this.e]===w.Fragment)return this.c.fragment;throw new Error}}t.$Li=E;class y{constructor(){this.height=1}isEmpty(){return!this.left&&!this.mid&&!this.right&&!this.value}rotateLeft(){const s=this.right;return this.right=s.left,s.left=this,this.updateHeight(),s.updateHeight(),s}rotateRight(){const s=this.left;return this.left=s.right,s.right=this,this.updateHeight(),s.updateHeight(),s}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){return this.left?.height??0}get heightRight(){return this.right?.height??0}}var a;(function(C){C[C.Left=-1]="Left",C[C.Mid=0]="Mid",C[C.Right=1]="Right"})(a||(a={}));class ${static forUris(s=()=>!1,i=()=>!1){return new $(new E(s,i))}static forPaths(s=!1){return new $(new d(void 0,!s))}static forStrings(){return new $(new c)}static forConfigKeys(){return new $(new T)}constructor(s){this.b=s}clear(){this.c=void 0}fill(s,i){if(i){const r=i.slice(0);(0,f.$Zb)(r);for(const l of r)this.set(l,s)}else{const r=s.slice(0);(0,f.$Zb)(r);for(const l of r)this.set(l[0],l[1])}}set(s,i){const r=this.b.reset(s);let l;this.c||(this.c=new y,this.c.segment=r.value());const o=[];for(l=this.c;;){const N=r.cmp(l.segment);if(N>0)l.left||(l.left=new y,l.left.segment=r.value()),o.push([a.Left,l]),l=l.left;else if(N<0)l.right||(l.right=new y,l.right.segment=r.value()),o.push([a.Right,l]),l=l.right;else if(r.hasNext())r.next(),l.mid||(l.mid=new y,l.mid.segment=r.value()),o.push([a.Mid,l]),l=l.mid;else break}const b=l.value;l.value=i,l.key=s;for(let N=o.length-1;N>=0;N--){const j=o[N][1];j.updateHeight();const O=j.balanceFactor();if(O<-1||O>1){const F=o[N][0],H=o[N+1][0];if(F===a.Right&&H===a.Right)o[N][1]=j.rotateLeft();else if(F===a.Left&&H===a.Left)o[N][1]=j.rotateRight();else if(F===a.Right&&H===a.Left)j.right=o[N+1][1]=o[N+1][1].rotateRight(),o[N][1]=j.rotateLeft();else if(F===a.Left&&H===a.Right)j.left=o[N+1][1]=o[N+1][1].rotateLeft(),o[N][1]=j.rotateRight();else throw new Error;if(N>0)switch(o[N-1][0]){case a.Left:o[N-1][1].left=o[N][1];break;case a.Right:o[N-1][1].right=o[N][1];break;case a.Mid:o[N-1][1].mid=o[N][1];break}else this.c=o[0][1]}}return b}get(s){return this.d(s)?.value}d(s){const i=this.b.reset(s);let r=this.c;for(;r;){const l=i.cmp(r.segment);if(l>0)r=r.left;else if(l<0)r=r.right;else if(i.hasNext())i.next(),r=r.mid;else break}return r}has(s){const i=this.d(s);return!(i?.value===void 0&&i?.mid===void 0)}delete(s){return this.e(s,!1)}deleteSuperstr(s){return this.e(s,!0)}e(s,i){const r=this.b.reset(s),l=[];let o=this.c;for(;o;){const b=r.cmp(o.segment);if(b>0)l.push([a.Left,o]),o=o.left;else if(b<0)l.push([a.Right,o]),o=o.right;else if(r.hasNext())r.next(),l.push([a.Mid,o]),o=o.mid;else break}if(o){if(i?(o.left=void 0,o.mid=void 0,o.right=void 0,o.height=1):(o.key=void 0,o.value=void 0),!o.mid&&!o.value)if(o.left&&o.right){const b=this.f(o.right);if(b.key){const{key:N,value:j,segment:O}=b;this.e(b.key,!1),o.key=N,o.value=j,o.segment=O}}else{const b=o.left??o.right;if(l.length>0){const[N,j]=l[l.length-1];switch(N){case a.Left:j.left=b;break;case a.Mid:j.mid=b;break;case a.Right:j.right=b;break}}else this.c=b}for(let b=l.length-1;b>=0;b--){const N=l[b][1];N.updateHeight();const j=N.balanceFactor();if(j>1?(N.right.balanceFactor()>=0||(N.right=N.right.rotateRight()),l[b][1]=N.rotateLeft()):j<-1&&(N.left.balanceFactor()<=0||(N.left=N.left.rotateLeft()),l[b][1]=N.rotateRight()),b>0)switch(l[b-1][0]){case a.Left:l[b-1][1].left=l[b][1];break;case a.Right:l[b-1][1].right=l[b][1];break;case a.Mid:l[b-1][1].mid=l[b][1];break}else this.c=l[0][1]}}}f(s){for(;s.left;)s=s.left;return s}findSubstr(s){const i=this.b.reset(s);let r=this.c,l;for(;r;){const o=i.cmp(r.segment);if(o>0)r=r.left;else if(o<0)r=r.right;else if(i.hasNext())i.next(),l=r.value||l,r=r.mid;else break}return r&&r.value||l}findSuperstr(s){return this.g(s,!1)}g(s,i){const r=this.b.reset(s);let l=this.c;for(;l;){const o=r.cmp(l.segment);if(o>0)l=l.left;else if(o<0)l=l.right;else if(r.hasNext())r.next(),l=l.mid;else return l.mid?this.h(l.mid):i?l.value:void 0}}hasElementOrSubtree(s){return this.g(s,!0)!==void 0}forEach(s){for(const[i,r]of this)s(r,i)}*[Symbol.iterator](){yield*this.h(this.c)}h(s){const i=[];return this.j(s,i),i[Symbol.iterator]()}j(s,i){s&&(s.left&&this.j(s.left,i),s.value&&i.push([s.key,s.value]),s.mid&&this.j(s.mid,i),s.right&&this.j(s.right,i))}_isBalanced(){const s=i=>{if(!i)return!0;const r=i.balanceFactor();return r<-1||r>1?!1:s(i.left)&&s(i.right)};return s(this.c)}}t.$Mi=$}),define(B[16],U([8,9]),function(R,t){return R.create("vs/base/common/errorMessage",t)});var de=this&&this.__createBinding||(Object.create?function(R,t,f,p){p===void 0&&(p=f);var k=Object.getOwnPropertyDescriptor(t,f);(!k||("get"in k?!t.__esModule:k.writable||k.configurable))&&(k={enumerable:!0,get:function(){return t[f]}}),Object.defineProperty(R,p,k)}:function(R,t,f,p){p===void 0&&(p=f),R[p]=t[f]}),me=this&&this.__setModuleDefault||(Object.create?function(R,t){Object.defineProperty(R,"default",{enumerable:!0,value:t})}:function(R,t){R.default=t}),K=this&&this.__importStar||function(R){if(R&&R.__esModule)return R;var t={};if(R!=null)for(var f in R)f!=="default"&&Object.prototype.hasOwnProperty.call(R,f)&&de(t,R,f);return me(t,R),t};define(B[17],U([0,1,15,11,16]),function(R,t,f,p,k){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$rj=w,t.$sj=E,t.$tj=y,f=K(f),p=K(p),k=K(k);function c(a,$){return $&&(a.stack||a.stacktrace)?k.localize(0,null,d(a),T(a.stack)||T(a.stacktrace)):d(a)}function T(a){return Array.isArray(a)?a.join(`
|
|
`):a}function d(a){return a.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${a.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof a.code=="string"&&typeof a.errno=="number"&&typeof a.syscall=="string"?k.localize(1,null,a.message):a.message||k.localize(2,null)}function w(a=null,$=!1){if(!a)return k.localize(3,null);if(Array.isArray(a)){const C=f.$Kb(a),s=w(C[0],$);return C.length>1?k.localize(4,null,s,C.length):s}if(p.$gg(a))return a;if(a.detail){const C=a.detail;if(C.error)return c(C.error,$);if(C.exception)return c(C.exception,$)}return a.stack?c(a,$):a.message?a.message:k.localize(5,null)}function E(a){const $=a;return $ instanceof Error&&Array.isArray($.actions)}function y(a,$){let C;return typeof a=="string"?C=new Error(a):C=a,C.actions=$,C}}),define(B[18],U([0,1,4,6,7,5,11]),function(R,t,f,p,k,c,T){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$yg=d,t.$zg=w,t.$Ag=E,t.$Bg=y,t.$Cg=a,t.$Dg=i,t.$Eg=r,t.$Fg=l,t.$Gg=o,t.$Hg=b,t.$Ig=N,t.$Jg=j,t.$Kg=O,t.$Lg=F,t.$Mg=H,t.$Ng=Z,t.$Og=G;function d(g){return g===f.CharCode.Slash||g===f.CharCode.Backslash}function w(g){return g.replace(/[\\/]/g,p.$jc.sep)}function E(g){return g.indexOf("/")===-1&&(g=w(g)),/^[a-zA-Z]:(\/|$)/.test(g)&&(g="/"+g),g}function y(g,S=p.$jc.sep){if(!g)return"";const q=g.length,A=g.charCodeAt(0);if(d(A)){if(d(g.charCodeAt(1))&&!d(g.charCodeAt(2))){let h=3;const P=h;for(;h<q&&!d(g.charCodeAt(h));h++);if(P!==h&&!d(g.charCodeAt(h+1))){for(h+=1;h<q;h++)if(d(g.charCodeAt(h)))return g.slice(0,h+1).replace(/[\\/]/g,S)}}return S}else if(o(A)&&g.charCodeAt(1)===f.CharCode.Colon)return d(g.charCodeAt(2))?g.slice(0,2)+S:g.slice(0,2);let u=g.indexOf("://");if(u!==-1){for(u+=3;u<q;u++)if(d(g.charCodeAt(u)))return g.slice(0,u+1)}return""}function a(g){if(!k.$i||!g||g.length<5)return!1;let S=g.charCodeAt(0);if(S!==f.CharCode.Backslash||(S=g.charCodeAt(1),S!==f.CharCode.Backslash))return!1;let q=2;const A=q;for(;q<g.length&&(S=g.charCodeAt(q),S!==f.CharCode.Backslash);q++);return!(A===q||(S=g.charCodeAt(q+1),isNaN(S)||S===f.CharCode.Backslash))}const $=/[\\/:\*\?"<>\|]/g,C=/[/]/g,s=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])(\.(.*?))?$/i;function i(g,S=k.$i){const q=S?$:C;return!(!g||g.length===0||/^\s+$/.test(g)||(q.lastIndex=0,q.test(g))||S&&s.test(g)||g==="."||g===".."||S&&g[g.length-1]==="."||S&&g.length!==g.trim().length||g.length>255)}function r(g,S,q){const A=g===S;return!q||A?A:!g||!S?!1:(0,c.$Hf)(g,S)}function l(g,S,q,A=p.sep){if(g===S)return!0;if(!g||!S||S.length>g.length)return!1;if(q){if(!(0,c.$If)(g,S))return!1;if(S.length===g.length)return!0;let h=S.length;return S.charAt(S.length-1)===A&&h--,g.charAt(h)===A}return S.charAt(S.length-1)!==A&&(S+=A),g.indexOf(S)===0}function o(g){return g>=f.CharCode.A&&g<=f.CharCode.Z||g>=f.CharCode.a&&g<=f.CharCode.z}function b(g,S){return k.$i&&g.endsWith(":")&&(g+=p.sep),(0,p.$lc)(g)||(g=(0,p.$mc)(S,g)),g=(0,p.$kc)(g),N(g)}function N(g){return k.$i?(g=(0,c.$pf)(g,p.sep),g.endsWith(":")&&(g+=p.sep)):(g=(0,c.$pf)(g,p.sep),g||(g=p.sep)),g}function j(g){const S=(0,p.$kc)(g);return k.$i?g.length>3?!1:O(S)&&(g.length===2||S.charCodeAt(2)===f.CharCode.Backslash):S===p.$jc.sep}function O(g,S=k.$i){return S?o(g.charCodeAt(0))&&g.charCodeAt(1)===f.CharCode.Colon:!1}function F(g,S=k.$i){return O(g,S)?g[0]:void 0}function H(g,S,q){return S.length>g.length?-1:g===S?0:(q&&(g=g.toLowerCase(),S=S.toLowerCase()),g.indexOf(S))}function Z(g){const S=g.split(":");let q,A,u;for(const h of S){const P=Number(h);(0,T.$kg)(P)?A===void 0?A=P:u===void 0&&(u=P):q=q?[q,h].join(":"):h}if(!q)throw new Error("Format for `--goto` should be: `FILE:LINE(:COLUMN)`");return{path:q,line:A!==void 0?A:void 0,column:u!==void 0?u:A!==void 0?1:void 0}}const X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",W="BDEFGHIJKMOQRSTUVWXYZbdefghijkmoqrstuvwxyz0123456789";function G(g,S,q=8){let A="";for(let h=0;h<q;h++){let P;h===0&&k.$i&&!S&&(q===3||q===4)?P=W:P=X,A+=P.charAt(Math.floor(Math.random()*P.length))}let u;return S?u=`${S}-${A}`:u=A,g?(0,p.$mc)(g,u):u}}),define(B[12],U([0,1,2,7,5,10,6]),function(R,t,f,p,k,c,T){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.COI=t.$1g=t.$Zg=t.$Yg=t.$Xg=t.$Wg=t.$Vg=t.$Tg=t.$Sg=t.$Rg=t.Schemas=void 0,t.$Pg=w,t.$Qg=E,t.$Ug=a,f=K(f),p=K(p),T=K(T);var d;(function(s){s.inMemory="inmemory",s.vscode="vscode",s.internal="private",s.walkThrough="walkThrough",s.walkThroughSnippet="walkThroughSnippet",s.http="http",s.https="https",s.file="file",s.mailto="mailto",s.untitled="untitled",s.data="data",s.command="command",s.vscodeRemote="vscode-remote",s.vscodeRemoteResource="vscode-remote-resource",s.vscodeManagedRemoteResource="vscode-managed-remote-resource",s.vscodeUserData="vscode-userdata",s.vscodeCustomEditor="vscode-custom-editor",s.vscodeNotebookCell="vscode-notebook-cell",s.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",s.vscodeNotebookCellOutput="vscode-notebook-cell-output",s.vscodeInteractiveInput="vscode-interactive-input",s.vscodeSettings="vscode-settings",s.vscodeWorkspaceTrust="vscode-workspace-trust",s.vscodeTerminal="vscode-terminal",s.vscodeChatCodeBlock="vscode-chat-code-block",s.vscodeCopilotBackingChatCodeBlock="vscode-copilot-chat-code-block",s.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",s.vscodeChatSesssion="vscode-chat-editor",s.webviewPanel="webview-panel",s.vscodeWebview="vscode-webview",s.extension="extension",s.vscodeFileResource="vscode-file",s.tmp="tmp",s.vsls="vsls",s.vscodeSourceControl="vscode-scm",s.commentsInput="comment",s.codeSetting="code-setting"})(d||(t.Schemas=d={}));function w(s,i){return c.URI.isUri(s)?(0,k.$Hf)(s.scheme,i):(0,k.$If)(s,i+":")}function E(s,...i){return i.some(r=>w(s,r))}t.$Rg="vscode-tkn",t.$Sg="tkn";class y{constructor(){this.a=Object.create(null),this.b=Object.create(null),this.c=Object.create(null),this.d="http",this.e=null,this.f="/"}setPreferredWebSchema(i){this.d=i}setDelegate(i){this.e=i}setServerRootPath(i,r){this.f=a(i,r)}getServerRootPath(){return this.f}get g(){return T.$jc.join(this.f,d.vscodeRemoteResource)}set(i,r,l){this.a[i]=r,this.b[i]=l}setConnectionToken(i,r){this.c[i]=r}getPreferredWebSchema(){return this.d}rewrite(i){if(this.e)try{return this.e(i)}catch(j){return f.$3(j),i}const r=i.authority;let l=this.a[r];l&&l.indexOf(":")!==-1&&l.indexOf("[")===-1&&(l=`[${l}]`);const o=this.b[r],b=this.c[r];let N=`path=${encodeURIComponent(i.path)}`;return typeof b=="string"&&(N+=`&${t.$Sg}=${encodeURIComponent(b)}`),c.URI.from({scheme:p.$o?this.d:d.vscodeRemoteResource,authority:`${l}:${o}`,path:this.g,query:N})}}t.$Tg=new y;function a(s,i){return T.$jc.join(i??"/",`${s.quality??"oss"}-${s.commit??"dev"}`)}t.$Vg="vs/../../extensions",t.$Wg="vs/../../node_modules",t.$Xg="vs/../../node_modules.asar",t.$Yg="vs/../../node_modules.asar.unpacked",t.$Zg="vscode-app";class ${static{this.a=t.$Zg}asBrowserUri(i){const r=this.b(i,R);return this.uriToBrowserUri(r)}uriToBrowserUri(i){return i.scheme===d.vscodeRemote?t.$Tg.rewrite(i):i.scheme===d.file&&(p.$m||p.$q===`${d.vscodeFileResource}://${$.a}`)?i.with({scheme:d.vscodeFileResource,authority:i.authority||$.a,query:null,fragment:null}):i}asFileUri(i){const r=this.b(i,R);return this.uriToFileUri(r)}uriToFileUri(i){return i.scheme===d.vscodeFileResource?i.with({scheme:d.file,authority:i.authority!==$.a?i.authority:null,query:null,fragment:null}):i}b(i,r){return c.URI.isUri(i)?i:c.URI.parse(r.toUrl(i))}}t.$1g=new $;var C;(function(s){const i=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"}]]);s.CoopAndCoep=Object.freeze(i.get("3"));const r="vscode-coi";function l(b){let N;typeof b=="string"?N=new URL(b).searchParams:b instanceof URL?N=b.searchParams:c.URI.isUri(b)&&(N=new URL(b.toString(!0)).searchParams);const j=N?.get(r);if(j)return i.get(j)}s.getHeadersFromQuery=l;function o(b,N,j){if(!globalThis.crossOriginIsolated)return;const O=N&&j?"3":j?"2":"1";b instanceof URLSearchParams?b.set(r,O):b[r]=O}s.addSearchParam=o})(C||(t.COI=C={}))}),define(B[19],U([0,1,4,18,12,6,7,5,10]),function(R,t,f,p,k,c,T,d,w){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataUri=t.$ph=t.$oh=t.$nh=t.$mh=t.$lh=t.$kh=t.$jh=t.$ih=t.$hh=t.$gh=t.$fh=t.$eh=t.$dh=t.$ch=t.$bh=t.$ah=t.$_g=t.$$g=t.$0g=t.$9g=void 0,t.$8g=E,t.$qh=a,t.$rh=C,p=K(p),c=K(c);function E(s){return(0,w.$zc)(s,!0)}class y{constructor(i){this.a=i}compare(i,r,l=!1){return i===r?0:(0,d.$Af)(this.getComparisonKey(i,l),this.getComparisonKey(r,l))}isEqual(i,r,l=!1){return i===r?!0:!i||!r?!1:this.getComparisonKey(i,l)===this.getComparisonKey(r,l)}getComparisonKey(i,r=!1){return i.with({path:this.a(i)?i.path.toLowerCase():void 0,fragment:r?null:void 0}).toString()}ignorePathCasing(i){return this.a(i)}isEqualOrParent(i,r,l=!1){if(i.scheme===r.scheme){if(i.scheme===k.Schemas.file)return p.$Fg(E(i),E(r),this.a(i))&&i.query===r.query&&(l||i.fragment===r.fragment);if((0,t.$mh)(i.authority,r.authority))return p.$Fg(i.path,r.path,this.a(i),"/")&&i.query===r.query&&(l||i.fragment===r.fragment)}return!1}joinPath(i,...r){return w.URI.joinPath(i,...r)}basenameOrAuthority(i){return(0,t.$eh)(i)||i.authority}basename(i){return c.$jc.basename(i.path)}extname(i){return c.$jc.extname(i.path)}dirname(i){if(i.path.length===0)return i;let r;return i.scheme===k.Schemas.file?r=w.URI.file(c.$pc(E(i))).path:(r=c.$jc.dirname(i.path),i.authority&&r.length&&r.charCodeAt(0)!==f.CharCode.Slash&&(console.error(`dirname("${i.toString})) resulted in a relative path`),r="/")),i.with({path:r})}normalizePath(i){if(!i.path.length)return i;let r;return i.scheme===k.Schemas.file?r=w.URI.file(c.$kc(E(i))).path:r=c.$jc.normalize(i.path),i.with({path:r})}relativePath(i,r){if(i.scheme!==r.scheme||!(0,t.$mh)(i.authority,r.authority))return;if(i.scheme===k.Schemas.file){const b=c.$oc(E(i),E(r));return T.$i?p.$zg(b):b}let l=i.path||"/";const o=r.path||"/";if(this.a(i)){let b=0;for(const N=Math.min(l.length,o.length);b<N&&!(l.charCodeAt(b)!==o.charCodeAt(b)&&l.charAt(b).toLowerCase()!==o.charAt(b).toLowerCase());b++);l=o.substr(0,b)+l.substr(b)}return c.$jc.relative(l,o)}resolvePath(i,r){if(i.scheme===k.Schemas.file){const l=w.URI.file(c.$nc(E(i),r));return i.with({authority:l.authority,path:l.path})}return r=p.$Ag(r),i.with({path:c.$jc.resolve(i.path,r)})}isAbsolutePath(i){return!!i.path&&i.path[0]==="/"}isEqualAuthority(i,r){return i===r||i!==void 0&&r!==void 0&&(0,d.$Hf)(i,r)}hasTrailingPathSeparator(i,r=c.sep){if(i.scheme===k.Schemas.file){const l=E(i);return l.length>p.$Bg(l).length&&l[l.length-1]===r}else{const l=i.path;return l.length>1&&l.charCodeAt(l.length-1)===f.CharCode.Slash&&!/^[a-zA-Z]:(\/$|\\$)/.test(i.fsPath)}}removeTrailingPathSeparator(i,r=c.sep){return(0,t.$nh)(i,r)?i.with({path:i.path.substr(0,i.path.length-1)}):i}addTrailingPathSeparator(i,r=c.sep){let l=!1;if(i.scheme===k.Schemas.file){const o=E(i);l=o!==void 0&&o.length===p.$Bg(o).length&&o[o.length-1]===r}else{r="/";const o=i.path;l=o.length===1&&o.charCodeAt(o.length-1)===f.CharCode.Slash}return!l&&!(0,t.$nh)(i,r)?i.with({path:i.path+"/"}):i}}t.$9g=y,t.$0g=new y(()=>!1),t.$$g=new y(s=>s.scheme===k.Schemas.file?!T.$k:!0),t.$_g=new y(s=>!0),t.$ah=t.$0g.isEqual.bind(t.$0g),t.$bh=t.$0g.isEqualOrParent.bind(t.$0g),t.$ch=t.$0g.getComparisonKey.bind(t.$0g),t.$dh=t.$0g.basenameOrAuthority.bind(t.$0g),t.$eh=t.$0g.basename.bind(t.$0g),t.$fh=t.$0g.extname.bind(t.$0g),t.$gh=t.$0g.dirname.bind(t.$0g),t.$hh=t.$0g.joinPath.bind(t.$0g),t.$ih=t.$0g.normalizePath.bind(t.$0g),t.$jh=t.$0g.relativePath.bind(t.$0g),t.$kh=t.$0g.resolvePath.bind(t.$0g),t.$lh=t.$0g.isAbsolutePath.bind(t.$0g),t.$mh=t.$0g.isEqualAuthority.bind(t.$0g),t.$nh=t.$0g.hasTrailingPathSeparator.bind(t.$0g),t.$oh=t.$0g.removeTrailingPathSeparator.bind(t.$0g),t.$ph=t.$0g.addTrailingPathSeparator.bind(t.$0g);function a(s,i){const r=[];for(let l=0;l<s.length;l++){const o=i(s[l]);s.some((b,N)=>N===l?!1:(0,t.$bh)(o,i(b)))||r.push(s[l])}return r}var $;(function(s){s.META_DATA_LABEL="label",s.META_DATA_DESCRIPTION="description",s.META_DATA_SIZE="size",s.META_DATA_MIME="mime";function i(r){const l=new Map;r.path.substring(r.path.indexOf(";")+1,r.path.lastIndexOf(";")).split(";").forEach(N=>{const[j,O]=N.split(":");j&&O&&l.set(j,O)});const b=r.path.substring(0,r.path.indexOf(";"));return b&&l.set(s.META_DATA_MIME,b),l}s.parseMetaData=i})($||(t.DataUri=$={}));function C(s,i,r){if(i){let l=s.path;return l&&l[0]!==c.$jc.sep&&(l=c.$jc.sep+l),s.with({scheme:r,authority:i,path:l})}return s.with({scheme:r})}}),define(B[20],U([0,1,13,2,12,21,22]),function(R,t,f,p,k,c,T){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$CV=void 0,t.$AV=w,t.$BV=y;const d=(0,f.$vV)("defaultWorkerFactory",{createScriptURL:s=>s});function w(s,i){if(!s.startsWith("blob:"))throw new URIError("Not a blob-url: "+s);return new Worker(d?d.createScriptURL(s):s,i)}function E(s){const i=globalThis.MonacoEnvironment;if(i){if(typeof i.getWorker=="function")return i.getWorker("workerMain.js",s);if(typeof i.getWorkerUrl=="function"){const r=i.getWorkerUrl("workerMain.js",s);return new Worker(d?d.createScriptURL(r):r,{name:s})}}if(typeof R=="function"){const r=R.toUrl("vs/base/worker/workerMain.js"),l=y(r,s);return new Worker(d?d.createScriptURL(l):l,{name:s})}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function y(s,i){if(/^((http:)|(https:)|(file:))/.test(s)&&s.substring(0,globalThis.origin.length)!==globalThis.origin){const N="vs/base/worker/defaultWorkerFactory.js",j=R.toUrl(N).slice(0,-N.length),O=`/*${i}*/globalThis.MonacoEnvironment={baseUrl: '${j}'};const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });importScripts(ttPolicy?.createScriptURL('${s}') ?? '${s}');/*${i}*/`,F=new Blob([O],{type:"application/javascript"});return URL.createObjectURL(F)}const r=s.lastIndexOf("?"),l=s.lastIndexOf("#",r),o=r>0?new URLSearchParams(s.substring(r+1,~l?l:void 0)):new URLSearchParams;return k.COI.addSearchParam(o,!0,!0),o.toString()?`${s}?${o.toString()}#${i}`:`${s}#${i}`}function a(s){return typeof s.then=="function"}class $ extends T.$Xc{constructor(i,r,l,o,b){super(),this.a=r,this.b=l;const N=E(l);a(N)?this.c=N:this.c=Promise.resolve(N),this.postMessage(i,[]),this.c.then(j=>{j.onmessage=function(O){o(O.data)},j.onmessageerror=b,typeof j.addEventListener=="function"&&j.addEventListener("error",b)}),this.B((0,T.$Vc)(()=>{this.c?.then(j=>{j.onmessage=null,j.onmessageerror=null,j.removeEventListener("error",b),j.terminate()}),this.c=null}))}getId(){return this.a}postMessage(i,r){this.c?.then(l=>{try{l.postMessage(i,r)}catch(o){(0,p.$3)(o),(0,p.$3)(new Error(`FAILED to post message to '${this.b}'-worker`,{cause:o}))}})}}class C{static{this.a=0}constructor(i){this.b=i,this.c=!1}create(i,r,l){const o=++C.a;if(this.c)throw this.c;return new $(i,o,this.b||"anonymous"+o,r,b=>{(0,c.logOnceWebWorkerWarning)(b),this.c=b,l(b)})}}t.$CV=C}),define(B[23],U([8,9]),function(R,t){return R.create("vs/platform/contextkey/common/contextkey",t)}),define(B[24],U([8,9]),function(R,t){return R.create("vs/platform/contextkey/common/scanner",t)}),define(B[25],U([8,9]),function(R,t){return R.create("vs/platform/log/common/log",t)}),define(B[26],U([0,1,4,2,24]),function(R,t,f,p,k){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$Bj=t.TokenType=void 0;var c;(function(y){y[y.LParen=0]="LParen",y[y.RParen=1]="RParen",y[y.Neg=2]="Neg",y[y.Eq=3]="Eq",y[y.NotEq=4]="NotEq",y[y.Lt=5]="Lt",y[y.LtEq=6]="LtEq",y[y.Gt=7]="Gt",y[y.GtEq=8]="GtEq",y[y.RegexOp=9]="RegexOp",y[y.RegexStr=10]="RegexStr",y[y.True=11]="True",y[y.False=12]="False",y[y.In=13]="In",y[y.Not=14]="Not",y[y.And=15]="And",y[y.Or=16]="Or",y[y.Str=17]="Str",y[y.QuotedStr=18]="QuotedStr",y[y.Error=19]="Error",y[y.EOF=20]="EOF"})(c||(t.TokenType=c={}));function T(...y){switch(y.length){case 1:return(0,k.localize)(0,null,y[0]);case 2:return(0,k.localize)(1,null,y[0],y[1]);case 3:return(0,k.localize)(2,null,y[0],y[1],y[2]);default:return}}const d=(0,k.localize)(3,null),w=(0,k.localize)(4,null);class E{constructor(){this.c="",this.d=0,this.e=0,this.f=[],this.g=[],this.m=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(a){switch(a.type){case c.LParen:return"(";case c.RParen:return")";case c.Neg:return"!";case c.Eq:return a.isTripleEq?"===":"==";case c.NotEq:return a.isTripleEq?"!==":"!=";case c.Lt:return"<";case c.LtEq:return"<=";case c.Gt:return">=";case c.GtEq:return">=";case c.RegexOp:return"=~";case c.RegexStr:return a.lexeme;case c.True:return"true";case c.False:return"false";case c.In:return"in";case c.Not:return"not";case c.And:return"&&";case c.Or:return"||";case c.Str:return a.lexeme;case c.QuotedStr:return a.lexeme;case c.Error:return a.lexeme;case c.EOF:return"EOF";default:throw(0,p.$$)(`unhandled token type: ${JSON.stringify(a)}; have you forgotten to add a case?`)}}static{this.a=new Set(["i","g","s","m","y","u"].map(a=>a.charCodeAt(0)))}static{this.b=new Map([["not",c.Not],["in",c.In],["false",c.False],["true",c.True]])}get errors(){return this.g}reset(a){return this.c=a,this.d=0,this.e=0,this.f=[],this.g=[],this}scan(){for(;!this.r();)switch(this.d=this.e,this.i()){case f.CharCode.OpenParen:this.k(c.LParen);break;case f.CharCode.CloseParen:this.k(c.RParen);break;case f.CharCode.ExclamationMark:if(this.h(f.CharCode.Equals)){const $=this.h(f.CharCode.Equals);this.f.push({type:c.NotEq,offset:this.d,isTripleEq:$})}else this.k(c.Neg);break;case f.CharCode.SingleQuote:this.o();break;case f.CharCode.Slash:this.q();break;case f.CharCode.Equals:if(this.h(f.CharCode.Equals)){const $=this.h(f.CharCode.Equals);this.f.push({type:c.Eq,offset:this.d,isTripleEq:$})}else this.h(f.CharCode.Tilde)?this.k(c.RegexOp):this.l(T("==","=~"));break;case f.CharCode.LessThan:this.k(this.h(f.CharCode.Equals)?c.LtEq:c.Lt);break;case f.CharCode.GreaterThan:this.k(this.h(f.CharCode.Equals)?c.GtEq:c.Gt);break;case f.CharCode.Ampersand:this.h(f.CharCode.Ampersand)?this.k(c.And):this.l(T("&&"));break;case f.CharCode.Pipe:this.h(f.CharCode.Pipe)?this.k(c.Or):this.l(T("||"));break;case f.CharCode.Space:case f.CharCode.CarriageReturn:case f.CharCode.Tab:case f.CharCode.LineFeed:case f.CharCode.NoBreakSpace:break;default:this.n()}return this.d=this.e,this.k(c.EOF),Array.from(this.f)}h(a){return this.r()||this.c.charCodeAt(this.e)!==a?!1:(this.e++,!0)}i(){return this.c.charCodeAt(this.e++)}j(){return this.r()?f.CharCode.Null:this.c.charCodeAt(this.e)}k(a){this.f.push({type:a,offset:this.d})}l(a){const $=this.d,C=this.c.substring(this.d,this.e),s={type:c.Error,offset:this.d,lexeme:C};this.g.push({offset:$,lexeme:C,additionalInfo:a}),this.f.push(s)}n(){this.m.lastIndex=this.d;const a=this.m.exec(this.c);if(a){this.e=this.d+a[0].length;const $=this.c.substring(this.d,this.e),C=E.b.get($);C?this.k(C):this.f.push({type:c.Str,lexeme:$,offset:this.d})}}o(){for(;this.j()!==f.CharCode.SingleQuote&&!this.r();)this.i();if(this.r()){this.l(d);return}this.i(),this.f.push({type:c.QuotedStr,lexeme:this.c.substring(this.d+1,this.e-1),offset:this.d+1})}q(){let a=this.e,$=!1,C=!1;for(;;){if(a>=this.c.length){this.e=a,this.l(w);return}const i=this.c.charCodeAt(a);if($)$=!1;else if(i===f.CharCode.Slash&&!C){a++;break}else i===f.CharCode.OpenSquareBracket?C=!0:i===f.CharCode.Backslash?$=!0:i===f.CharCode.CloseSquareBracket&&(C=!1);a++}for(;a<this.c.length&&E.a.has(this.c.charCodeAt(a));)a++;this.e=a;const s=this.c.substring(this.d,this.e);this.f.push({type:c.RegexStr,lexeme:s,offset:this.d})}r(){return this.e>=this.c.length}}t.$Bj=E}),define(B[27],U([0,1]),function(R,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$Di=void 0;class f{constructor(k,c=[],T=!1){this.ctor=k,this.staticArguments=c,this.supportsDelayedInstantiation=T}}t.$Di=f}),define(B[28],U([0,1,27]),function(R,t,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InstantiationType=void 0,t.$Ps=c,t.$Qs=T;const p=[];var k;(function(d){d[d.Eager=0]="Eager",d[d.Delayed=1]="Delayed"})(k||(t.InstantiationType=k={}));function c(d,w,E){w instanceof f.$Di||(w=new f.$Di(w,[],!!E)),p.push([d,w])}function T(){return p}}),define(B[3],U([0,1]),function(R,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$Fi=t._util=void 0,t.$Gi=k,t.$Hi=c;var f;(function(T){T.serviceIds=new Map,T.DI_TARGET="$di$target",T.DI_DEPENDENCIES="$di$dependencies";function d(w){return w[T.DI_DEPENDENCIES]||[]}T.getServiceDependencies=d})(f||(t._util=f={})),t.$Fi=k("instantiationService");function p(T,d,w){d[f.DI_TARGET]===d?d[f.DI_DEPENDENCIES].push({id:T,index:w}):(d[f.DI_DEPENDENCIES]=[{id:T,index:w}],d[f.DI_TARGET]=d)}function k(T){if(f.serviceIds.has(T))return f.serviceIds.get(T);const d=function(w,E,y){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");p(d,w,y)};return d.toString=()=>T,f.serviceIds.set(T,d),d}function c(T){return T}}),define(B[29],U([0,1,4,7,5,26,3,23,2]),function(R,t,f,p,k,c,T,d,w){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$Yj=t.$Xj=t.$Wj=t.$Vj=t.$Uj=t.$Tj=t.$Sj=t.$Rj=t.$Qj=t.$Pj=t.$Oj=t.$Nj=t.$Mj=t.$Lj=t.$Kj=t.$Jj=t.$Ij=t.$Hj=t.$Ej=t.$Dj=t.ContextKeyExprType=void 0,t.$Cj=y,t.$Fj=H,t.$Gj=Z,t.$Zj=ce;const E=new Map;E.set("false",!1),E.set("true",!0),E.set("isMac",p.$j),E.set("isLinux",p.$k),E.set("isWindows",p.$i),E.set("isWeb",p.$o),E.set("isMacNative",p.$j&&!p.$o),E.set("isEdge",p.$H),E.set("isFirefox",p.$F),E.set("isChrome",p.$E),E.set("isSafari",p.$G);function y(I,e){if(E.get(I)!==void 0)throw(0,w.$0)("contextkey.setConstant(k, v) invoked with already set constant `k`");E.set(I,e)}const a=Object.prototype.hasOwnProperty;var $;(function(I){I[I.False=0]="False",I[I.True=1]="True",I[I.Defined=2]="Defined",I[I.Not=3]="Not",I[I.Equals=4]="Equals",I[I.NotEquals=5]="NotEquals",I[I.And=6]="And",I[I.Regex=7]="Regex",I[I.NotRegex=8]="NotRegex",I[I.Or=9]="Or",I[I.In=10]="In",I[I.NotIn=11]="NotIn",I[I.Greater=12]="Greater",I[I.GreaterEquals=13]="GreaterEquals",I[I.Smaller=14]="Smaller",I[I.SmallerEquals=15]="SmallerEquals"})($||(t.ContextKeyExprType=$={}));const C={regexParsingWithErrorRecovery:!0},s=(0,d.localize)(0,null),i=(0,d.localize)(1,null),r=(0,d.localize)(2,null),l=(0,d.localize)(3,null),o=(0,d.localize)(4,null),b=(0,d.localize)(5,null),N=(0,d.localize)(6,null),j=(0,d.localize)(7,null);class O{static{this.c=new Error}get lexingErrors(){return this.d.errors}get parsingErrors(){return this.h}constructor(e=C){this.k=e,this.d=new c.$Bj,this.f=[],this.g=0,this.h=[],this.v=/g|y/g}parse(e){if(e===""){this.h.push({message:s,offset:0,lexeme:"",additionalInfo:i});return}this.f=this.d.reset(e).scan(),this.g=0,this.h=[];try{const n=this.l();if(!this.E()){const v=this.D(),m=v.type===c.TokenType.Str?b:void 0;throw this.h.push({message:o,offset:v.offset,lexeme:c.$Bj.getLexeme(v),additionalInfo:m}),O.c}return n}catch(n){if(n!==O.c)throw n;return}}l(){return this.m()}m(){const e=[this.o()];for(;this.y(c.TokenType.Or);){const n=this.o();e.push(n)}return e.length===1?e[0]:F.or(...e)}o(){const e=[this.s()];for(;this.y(c.TokenType.And);){const n=this.s();e.push(n)}return e.length===1?e[0]:F.and(...e)}s(){if(this.y(c.TokenType.Neg)){const e=this.D();switch(e.type){case c.TokenType.True:return this.z(),W.INSTANCE;case c.TokenType.False:return this.z(),G.INSTANCE;case c.TokenType.LParen:{this.z();const n=this.l();return this.A(c.TokenType.RParen,l),n?.negate()}case c.TokenType.Str:return this.z(),h.create(e.lexeme);default:throw this.B("KEY | true | false | '(' expression ')'",e)}}return this.t()}t(){const e=this.D();switch(e.type){case c.TokenType.True:return this.z(),F.true();case c.TokenType.False:return this.z(),F.false();case c.TokenType.LParen:{this.z();const n=this.l();return this.A(c.TokenType.RParen,l),n}case c.TokenType.Str:{const n=e.lexeme;if(this.z(),this.y(c.TokenType.RegexOp)){const m=this.D();if(!this.k.regexParsingWithErrorRecovery){if(this.z(),m.type!==c.TokenType.RegexStr)throw this.B("REGEX",m);const D=m.lexeme,L=D.lastIndexOf("/"),M=L===D.length-1?void 0:this.w(D.substring(L+1));let V;try{V=new RegExp(D.substring(1,L),M)}catch{throw this.B("REGEX",m)}return re.create(n,V)}switch(m.type){case c.TokenType.RegexStr:case c.TokenType.Error:{const D=[m.lexeme];this.z();let L=this.D(),M=0;for(let J=0;J<m.lexeme.length;J++)m.lexeme.charCodeAt(J)===f.CharCode.OpenParen?M++:m.lexeme.charCodeAt(J)===f.CharCode.CloseParen&&M--;for(;!this.E()&&L.type!==c.TokenType.And&&L.type!==c.TokenType.Or;){switch(L.type){case c.TokenType.LParen:M++;break;case c.TokenType.RParen:M--;break;case c.TokenType.RegexStr:case c.TokenType.QuotedStr:for(let J=0;J<L.lexeme.length;J++)L.lexeme.charCodeAt(J)===f.CharCode.OpenParen?M++:m.lexeme.charCodeAt(J)===f.CharCode.CloseParen&&M--}if(M<0)break;D.push(c.$Bj.getLexeme(L)),this.z(),L=this.D()}const V=D.join(""),te=V.lastIndexOf("/"),le=te===V.length-1?void 0:this.w(V.substring(te+1));let ue;try{ue=new RegExp(V.substring(1,te),le)}catch{throw this.B("REGEX",m)}return F.regex(n,ue)}case c.TokenType.QuotedStr:{const D=m.lexeme;this.z();let L=null;if(!(0,k.$ef)(D)){const M=D.indexOf("/"),V=D.lastIndexOf("/");if(M!==V&&M>=0){const te=D.slice(M+1,V),le=D[V+1]==="i"?"i":"";try{L=new RegExp(te,le)}catch{throw this.B("REGEX",m)}}}if(L===null)throw this.B("REGEX",m);return re.create(n,L)}default:throw this.B("REGEX",this.D())}}if(this.y(c.TokenType.Not)){this.A(c.TokenType.In,r);const m=this.u();return F.notIn(n,m)}switch(this.D().type){case c.TokenType.Eq:{this.z();const m=this.u();if(this.x().type===c.TokenType.QuotedStr)return F.equals(n,m);switch(m){case"true":return F.has(n);case"false":return F.not(n);default:return F.equals(n,m)}}case c.TokenType.NotEq:{this.z();const m=this.u();if(this.x().type===c.TokenType.QuotedStr)return F.notEquals(n,m);switch(m){case"true":return F.not(n);case"false":return F.has(n);default:return F.notEquals(n,m)}}case c.TokenType.Lt:return this.z(),x.create(n,this.u());case c.TokenType.LtEq:return this.z(),_.create(n,this.u());case c.TokenType.Gt:return this.z(),z.create(n,this.u());case c.TokenType.GtEq:return this.z(),Q.create(n,this.u());case c.TokenType.In:return this.z(),F.in(n,this.u());default:return F.has(n)}}case c.TokenType.EOF:throw this.h.push({message:N,offset:e.offset,lexeme:"",additionalInfo:j}),O.c;default:throw this.B(`true | false | KEY
|
|
| KEY '=~' REGEX
|
|
| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this.D())}}u(){const e=this.D();switch(e.type){case c.TokenType.Str:case c.TokenType.QuotedStr:return this.z(),e.lexeme;case c.TokenType.True:return this.z(),"true";case c.TokenType.False:return this.z(),"false";case c.TokenType.In:return this.z(),"in";default:return""}}w(e){return e.replaceAll(this.v,"")}x(){return this.f[this.g-1]}y(e){return this.C(e)?(this.z(),!0):!1}z(){return this.E()||this.g++,this.x()}A(e,n){if(this.C(e))return this.z();throw this.B(n,this.D())}B(e,n,v){const m=(0,d.localize)(8,null,e,c.$Bj.getLexeme(n)),D=n.offset,L=c.$Bj.getLexeme(n);return this.h.push({message:m,offset:D,lexeme:L,additionalInfo:v}),O.c}C(e){return this.D().type===e}D(){return this.f[this.g]}E(){return this.D().type===c.TokenType.EOF}}t.$Dj=O;class F{static false(){return W.INSTANCE}static true(){return G.INSTANCE}static has(e){return g.create(e)}static equals(e,n){return S.create(e,n)}static notEquals(e,n){return u.create(e,n)}static regex(e,n){return re.create(e,n)}static in(e,n){return q.create(e,n)}static notIn(e,n){return A.create(e,n)}static not(e){return h.create(e)}static and(...e){return ee.create(e,null,!0)}static or(...e){return Y.create(e,null,!0)}static greater(e,n){return z.create(e,n)}static greaterEquals(e,n){return Q.create(e,n)}static smaller(e,n){return x.create(e,n)}static smallerEquals(e,n){return _.create(e,n)}static{this.c=new O({regexParsingWithErrorRecovery:!1})}static deserialize(e){return e==null?void 0:this.c.parse(e)}}t.$Ej=F;function H(I){const e=new O({regexParsingWithErrorRecovery:!1});return I.map(n=>(e.parse(n),e.lexingErrors.length>0?e.lexingErrors.map(v=>({errorMessage:v.additionalInfo?(0,d.localize)(9,null,v.additionalInfo):(0,d.localize)(10,null),offset:v.offset,length:v.lexeme.length})):e.parsingErrors.length>0?e.parsingErrors.map(v=>({errorMessage:v.additionalInfo?`${v.message}. ${v.additionalInfo}`:v.message,offset:v.offset,length:v.lexeme.length})):[]))}function Z(I,e){const n=I?I.substituteConstants():void 0,v=e?e.substituteConstants():void 0;return!n&&!v?!0:!n||!v?!1:n.equals(v)}function X(I,e){return I.cmp(e)}class W{static{this.INSTANCE=new W}constructor(){this.type=$.False}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[]}map(e){return this}negate(){return G.INSTANCE}}t.$Hj=W;class G{static{this.INSTANCE=new G}constructor(){this.type=$.True}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[]}map(e){return this}negate(){return W.INSTANCE}}t.$Ij=G;class g{static create(e,n=null){const v=E.get(e);return typeof v=="boolean"?v?G.INSTANCE:W.INSTANCE:new g(e,n)}constructor(e,n){this.key=e,this.c=n,this.type=$.Defined}cmp(e){return e.type!==this.type?this.type-e.type:oe(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=E.get(this.key);return typeof e=="boolean"?e?G.INSTANCE:W.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}map(e){return e.mapDefined(this.key)}negate(){return this.c||(this.c=h.create(this.key,this)),this.c}}t.$Jj=g;class S{static create(e,n,v=null){if(typeof n=="boolean")return n?g.create(e,v):h.create(e,v);const m=E.get(e);return typeof m=="boolean"?n===(m?"true":"false")?G.INSTANCE:W.INSTANCE:new S(e,n,v)}constructor(e,n,v){this.c=e,this.d=n,this.f=v,this.type=$.Equals}cmp(e){return e.type!==this.type?this.type-e.type:ie(this.c,this.d,e.c,e.d)}equals(e){return e.type===this.type?this.c===e.c&&this.d===e.d:!1}substituteConstants(){const e=E.get(this.c);if(typeof e=="boolean"){const n=e?"true":"false";return this.d===n?G.INSTANCE:W.INSTANCE}return this}evaluate(e){return e.getValue(this.c)==this.d}serialize(){return`${this.c} == '${this.d}'`}keys(){return[this.c]}map(e){return e.mapEquals(this.c,this.d)}negate(){return this.f||(this.f=u.create(this.c,this.d,this)),this.f}}t.$Kj=S;class q{static create(e,n){return new q(e,n)}constructor(e,n){this.d=e,this.f=n,this.type=$.In,this.c=null}cmp(e){return e.type!==this.type?this.type-e.type:ie(this.d,this.f,e.d,e.f)}equals(e){return e.type===this.type?this.d===e.d&&this.f===e.f:!1}substituteConstants(){return this}evaluate(e){const n=e.getValue(this.f),v=e.getValue(this.d);return Array.isArray(n)?n.includes(v):typeof v=="string"&&typeof n=="object"&&n!==null?a.call(n,v):!1}serialize(){return`${this.d} in '${this.f}'`}keys(){return[this.d,this.f]}map(e){return e.mapIn(this.d,this.f)}negate(){return this.c||(this.c=A.create(this.d,this.f)),this.c}}t.$Lj=q;class A{static create(e,n){return new A(e,n)}constructor(e,n){this.d=e,this.f=n,this.type=$.NotIn,this.c=q.create(e,n)}cmp(e){return e.type!==this.type?this.type-e.type:this.c.cmp(e.c)}equals(e){return e.type===this.type?this.c.equals(e.c):!1}substituteConstants(){return this}evaluate(e){return!this.c.evaluate(e)}serialize(){return`${this.d} not in '${this.f}'`}keys(){return this.c.keys()}map(e){return e.mapNotIn(this.d,this.f)}negate(){return this.c}}t.$Mj=A;class u{static create(e,n,v=null){if(typeof n=="boolean")return n?h.create(e,v):g.create(e,v);const m=E.get(e);return typeof m=="boolean"?n===(m?"true":"false")?W.INSTANCE:G.INSTANCE:new u(e,n,v)}constructor(e,n,v){this.c=e,this.d=n,this.f=v,this.type=$.NotEquals}cmp(e){return e.type!==this.type?this.type-e.type:ie(this.c,this.d,e.c,e.d)}equals(e){return e.type===this.type?this.c===e.c&&this.d===e.d:!1}substituteConstants(){const e=E.get(this.c);if(typeof e=="boolean"){const n=e?"true":"false";return this.d===n?W.INSTANCE:G.INSTANCE}return this}evaluate(e){return e.getValue(this.c)!=this.d}serialize(){return`${this.c} != '${this.d}'`}keys(){return[this.c]}map(e){return e.mapNotEquals(this.c,this.d)}negate(){return this.f||(this.f=S.create(this.c,this.d,this)),this.f}}t.$Nj=u;class h{static create(e,n=null){const v=E.get(e);return typeof v=="boolean"?v?W.INSTANCE:G.INSTANCE:new h(e,n)}constructor(e,n){this.c=e,this.d=n,this.type=$.Not}cmp(e){return e.type!==this.type?this.type-e.type:oe(this.c,e.c)}equals(e){return e.type===this.type?this.c===e.c:!1}substituteConstants(){const e=E.get(this.c);return typeof e=="boolean"?e?W.INSTANCE:G.INSTANCE:this}evaluate(e){return!e.getValue(this.c)}serialize(){return`!${this.c}`}keys(){return[this.c]}map(e){return e.mapNot(this.c)}negate(){return this.d||(this.d=g.create(this.c,this)),this.d}}t.$Oj=h;function P(I,e){if(typeof I=="string"){const n=parseFloat(I);isNaN(n)||(I=n)}return typeof I=="string"||typeof I=="number"?e(I):W.INSTANCE}class z{static create(e,n,v=null){return P(n,m=>new z(e,m,v))}constructor(e,n,v){this.c=e,this.d=n,this.f=v,this.type=$.Greater}cmp(e){return e.type!==this.type?this.type-e.type:ie(this.c,this.d,e.c,e.d)}equals(e){return e.type===this.type?this.c===e.c&&this.d===e.d:!1}substituteConstants(){return this}evaluate(e){return typeof this.d=="string"?!1:parseFloat(e.getValue(this.c))>this.d}serialize(){return`${this.c} > ${this.d}`}keys(){return[this.c]}map(e){return e.mapGreater(this.c,this.d)}negate(){return this.f||(this.f=_.create(this.c,this.d,this)),this.f}}t.$Pj=z;class Q{static create(e,n,v=null){return P(n,m=>new Q(e,m,v))}constructor(e,n,v){this.c=e,this.d=n,this.f=v,this.type=$.GreaterEquals}cmp(e){return e.type!==this.type?this.type-e.type:ie(this.c,this.d,e.c,e.d)}equals(e){return e.type===this.type?this.c===e.c&&this.d===e.d:!1}substituteConstants(){return this}evaluate(e){return typeof this.d=="string"?!1:parseFloat(e.getValue(this.c))>=this.d}serialize(){return`${this.c} >= ${this.d}`}keys(){return[this.c]}map(e){return e.mapGreaterEquals(this.c,this.d)}negate(){return this.f||(this.f=x.create(this.c,this.d,this)),this.f}}t.$Qj=Q;class x{static create(e,n,v=null){return P(n,m=>new x(e,m,v))}constructor(e,n,v){this.c=e,this.d=n,this.f=v,this.type=$.Smaller}cmp(e){return e.type!==this.type?this.type-e.type:ie(this.c,this.d,e.c,e.d)}equals(e){return e.type===this.type?this.c===e.c&&this.d===e.d:!1}substituteConstants(){return this}evaluate(e){return typeof this.d=="string"?!1:parseFloat(e.getValue(this.c))<this.d}serialize(){return`${this.c} < ${this.d}`}keys(){return[this.c]}map(e){return e.mapSmaller(this.c,this.d)}negate(){return this.f||(this.f=Q.create(this.c,this.d,this)),this.f}}t.$Rj=x;class _{static create(e,n,v=null){return P(n,m=>new _(e,m,v))}constructor(e,n,v){this.c=e,this.d=n,this.f=v,this.type=$.SmallerEquals}cmp(e){return e.type!==this.type?this.type-e.type:ie(this.c,this.d,e.c,e.d)}equals(e){return e.type===this.type?this.c===e.c&&this.d===e.d:!1}substituteConstants(){return this}evaluate(e){return typeof this.d=="string"?!1:parseFloat(e.getValue(this.c))<=this.d}serialize(){return`${this.c} <= ${this.d}`}keys(){return[this.c]}map(e){return e.mapSmallerEquals(this.c,this.d)}negate(){return this.f||(this.f=z.create(this.c,this.d,this)),this.f}}t.$Sj=_;class re{static create(e,n){return new re(e,n)}constructor(e,n){this.d=e,this.f=n,this.type=$.Regex,this.c=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.d<e.d)return-1;if(this.d>e.d)return 1;const n=this.f?this.f.source:"",v=e.f?e.f.source:"";return n<v?-1:n>v?1:0}equals(e){if(e.type===this.type){const n=this.f?this.f.source:"",v=e.f?e.f.source:"";return this.d===e.d&&n===v}return!1}substituteConstants(){return this}evaluate(e){const n=e.getValue(this.d);return this.f?this.f.test(n):!1}serialize(){const e=this.f?`/${this.f.source}/${this.f.flags}`:"/invalid/";return`${this.d} =~ ${e}`}keys(){return[this.d]}map(e){return e.mapRegex(this.d,this.f)}negate(){return this.c||(this.c=se.create(this)),this.c}}t.$Tj=re;class se{static create(e){return new se(e)}constructor(e){this.c=e,this.type=$.NotRegex}cmp(e){return e.type!==this.type?this.type-e.type:this.c.cmp(e.c)}equals(e){return e.type===this.type?this.c.equals(e.c):!1}substituteConstants(){return this}evaluate(e){return!this.c.evaluate(e)}serialize(){return`!(${this.c.serialize()})`}keys(){return this.c.keys()}map(e){return new se(this.c.map(e))}negate(){return this.c}}t.$Uj=se;function he(I){let e=null;for(let n=0,v=I.length;n<v;n++){const m=I[n].substituteConstants();if(I[n]!==m&&e===null){e=[];for(let D=0;D<n;D++)e[D]=I[D]}e!==null&&(e[n]=m)}return e===null?I:e}class ee{static create(e,n,v){return ee.d(e,n,v)}constructor(e,n){this.expr=e,this.c=n,this.type=$.And}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let n=0,v=this.expr.length;n<v;n++){const m=X(this.expr[n],e.expr[n]);if(m!==0)return m}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let n=0,v=this.expr.length;n<v;n++)if(!this.expr[n].equals(e.expr[n]))return!1;return!0}return!1}substituteConstants(){const e=he(this.expr);return e===this.expr?this:ee.create(e,this.c,!1)}evaluate(e){for(let n=0,v=this.expr.length;n<v;n++)if(!this.expr[n].evaluate(e))return!1;return!0}static d(e,n,v){const m=[];let D=!1;for(const L of e)if(L){if(L.type===$.True){D=!0;continue}if(L.type===$.False)return W.INSTANCE;if(L.type===$.And){m.push(...L.expr);continue}m.push(L)}if(m.length===0&&D)return G.INSTANCE;if(m.length!==0){if(m.length===1)return m[0];m.sort(X);for(let L=1;L<m.length;L++)m[L-1].equals(m[L])&&(m.splice(L,1),L--);if(m.length===1)return m[0];for(;m.length>1;){const L=m[m.length-1];if(L.type!==$.Or)break;m.pop();const M=m.pop(),V=m.length===0,te=Y.create(L.expr.map(le=>ee.create([le,M],null,v)),null,V);te&&(m.push(te),m.sort(X))}if(m.length===1)return m[0];if(v){for(let L=0;L<m.length;L++)for(let M=L+1;M<m.length;M++)if(m[L].negate().equals(m[M]))return W.INSTANCE;if(m.length===1)return m[0]}return new ee(m,n)}}serialize(){return this.expr.map(e=>e.serialize()).join(" && ")}keys(){const e=[];for(const n of this.expr)e.push(...n.keys());return e}map(e){return new ee(this.expr.map(n=>n.map(e)),null)}negate(){if(!this.c){const e=[];for(const n of this.expr)e.push(n.negate());this.c=Y.create(e,this,!0)}return this.c}}t.$Vj=ee;class Y{static create(e,n,v){return Y.d(e,n,v)}constructor(e,n){this.expr=e,this.c=n,this.type=$.Or}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let n=0,v=this.expr.length;n<v;n++){const m=X(this.expr[n],e.expr[n]);if(m!==0)return m}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let n=0,v=this.expr.length;n<v;n++)if(!this.expr[n].equals(e.expr[n]))return!1;return!0}return!1}substituteConstants(){const e=he(this.expr);return e===this.expr?this:Y.create(e,this.c,!1)}evaluate(e){for(let n=0,v=this.expr.length;n<v;n++)if(this.expr[n].evaluate(e))return!0;return!1}static d(e,n,v){let m=[],D=!1;if(e){for(let L=0,M=e.length;L<M;L++){const V=e[L];if(V){if(V.type===$.False){D=!0;continue}if(V.type===$.True)return G.INSTANCE;if(V.type===$.Or){m=m.concat(V.expr);continue}m.push(V)}}if(m.length===0&&D)return W.INSTANCE;m.sort(X)}if(m.length!==0){if(m.length===1)return m[0];for(let L=1;L<m.length;L++)m[L-1].equals(m[L])&&(m.splice(L,1),L--);if(m.length===1)return m[0];if(v){for(let L=0;L<m.length;L++)for(let M=L+1;M<m.length;M++)if(m[L].negate().equals(m[M]))return G.INSTANCE;if(m.length===1)return m[0]}return new Y(m,n)}}serialize(){return this.expr.map(e=>e.serialize()).join(" || ")}keys(){const e=[];for(const n of this.expr)e.push(...n.keys());return e}map(e){return new Y(this.expr.map(n=>n.map(e)),null)}negate(){if(!this.c){const e=[];for(const n of this.expr)e.push(n.negate());for(;e.length>1;){const n=e.shift(),v=e.shift(),m=[];for(const D of ge(n))for(const L of ge(v))m.push(ee.create([D,L],null,!1));e.unshift(Y.create(m,null,!1))}this.c=Y.create(e,this,!0)}return this.c}}t.$Wj=Y;class ne extends g{static{this.d=[]}static all(){return ne.d.values()}constructor(e,n,v){super(e,null),this.f=n,typeof v=="object"?ne.d.push({...v,key:e}):v!==!0&&ne.d.push({key:e,description:v,type:n!=null?typeof n:void 0})}bindTo(e){return e.createKey(this.key,this.f)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return S.create(this.key,e)}notEqualsTo(e){return u.create(this.key,e)}}t.$Xj=ne,t.$Yj=(0,T.$Gi)("contextKeyService");function oe(I,e){return I<e?-1:I>e?1:0}function ie(I,e,n,v){return I<n?-1:I>n?1:e<v?-1:e>v?1:0}function ce(I,e){if(I.type===$.False||e.type===$.True)return!0;if(I.type===$.Or)return e.type===$.Or?fe(I.expr,e.expr):!1;if(e.type===$.Or){for(const n of e.expr)if(ce(I,n))return!0;return!1}if(I.type===$.And){if(e.type===$.And)return fe(e.expr,I.expr);for(const n of I.expr)if(ce(n,e))return!0;return!1}return I.equals(e)}function fe(I,e){let n=0,v=0;for(;n<I.length&&v<e.length;){const m=I[n].cmp(e[v]);if(m<0)return!1;m===0&&n++,v++}return n===I.length}function ge(I){return I.type===$.Or?I.expr:[I]}}),define(B[30],U([0,1,25,17,36,37,22,38,7,19,11,10,29,3]),function(R,t,f,p,k,c,T,d,w,E,y,a,$,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$sk=t.$nk=t.$mk=t.$lk=t.$kk=t.$jk=t.$ik=t.$hk=t.$gk=t.$fk=t.$dk=t.LogLevel=t.$bk=t.$ak=void 0,t.$ck=i,t.log=l,t.$ok=G,t.$pk=g,t.$qk=S,t.$rk=q,f=K(f),t.$ak=(0,C.$Gi)("logService"),t.$bk=(0,C.$Gi)("loggerService");function s(){return new Date().toISOString()}function i(A){return(0,y.$kg)(A)}var r;(function(A){A[A.Off=0]="Off",A[A.Trace=1]="Trace",A[A.Debug=2]="Debug",A[A.Info=3]="Info",A[A.Warning=4]="Warning",A[A.Error=5]="Error"})(r||(t.LogLevel=r={})),t.$dk=r.Info;function l(A,u,h){switch(u){case r.Trace:A.trace(h);break;case r.Debug:A.debug(h);break;case r.Info:A.info(h);break;case r.Warning:A.warn(h);break;case r.Error:A.error(h);break;case r.Off:break;default:throw new Error(`Invalid log level ${u}`)}}function o(A,u=!1){let h="";for(let P=0;P<A.length;P++){let z=A[P];if(z instanceof Error&&(z=(0,p.$rj)(z,u)),typeof z=="object")try{z=JSON.stringify(z)}catch{}h+=(P>0?" ":"")+z}return h}class b extends T.$Xc{constructor(){super(...arguments),this.b=t.$dk,this.c=this.B(new k.$ne),this.onDidChangeLogLevel=this.c.event}setLevel(u){this.b!==u&&(this.b=u,this.c.fire(this.b))}getLevel(){return this.b}f(u){return this.b!==r.Off&&this.b<=u}}t.$fk=b;class N extends b{constructor(u){super(),this.h=u}f(u){return this.h||super.f(u)}trace(u,...h){this.f(r.Trace)&&this.g(r.Trace,o([u,...h],!0))}debug(u,...h){this.f(r.Debug)&&this.g(r.Debug,o([u,...h]))}info(u,...h){this.f(r.Info)&&this.g(r.Info,o([u,...h]))}warn(u,...h){this.f(r.Warning)&&this.g(r.Warning,o([u,...h]))}error(u,...h){if(this.f(r.Error))if(u instanceof Error){const P=Array.prototype.slice.call(arguments);P[0]=u.stack,this.g(r.Error,o(P))}else this.g(r.Error,o([u,...h]))}flush(){}}t.$gk=N;class j extends b{constructor(u=t.$dk){super(),this.setLevel(u),this.g=!w.$i}trace(u,...h){this.f(r.Trace)&&(this.g?console.log(`\x1B[90m[main ${s()}]\x1B[0m`,u,...h):console.log(`[main ${s()}]`,u,...h))}debug(u,...h){this.f(r.Debug)&&(this.g?console.log(`\x1B[90m[main ${s()}]\x1B[0m`,u,...h):console.log(`[main ${s()}]`,u,...h))}info(u,...h){this.f(r.Info)&&(this.g?console.log(`\x1B[90m[main ${s()}]\x1B[0m`,u,...h):console.log(`[main ${s()}]`,u,...h))}warn(u,...h){this.f(r.Warning)&&(this.g?console.warn(`\x1B[93m[main ${s()}]\x1B[0m`,u,...h):console.warn(`[main ${s()}]`,u,...h))}error(u,...h){this.f(r.Error)&&(this.g?console.error(`\x1B[91m[main ${s()}]\x1B[0m`,u,...h):console.error(`[main ${s()}]`,u,...h))}flush(){}}t.$hk=j;class O extends b{constructor(u=t.$dk,h=!0){super(),this.g=h,this.setLevel(u)}trace(u,...h){this.f(r.Trace)&&(this.g?console.log("%cTRACE","color: #888",u,...h):console.log(u,...h))}debug(u,...h){this.f(r.Debug)&&(this.g?console.log("%cDEBUG","background: #eee; color: #888",u,...h):console.log(u,...h))}info(u,...h){this.f(r.Info)&&(this.g?console.log("%c INFO","color: #33f",u,...h):console.log(u,...h))}warn(u,...h){this.f(r.Warning)&&(this.g?console.log("%c WARN","color: #993",u,...h):console.log(u,...h))}error(u,...h){this.f(r.Error)&&(this.g?console.log("%c ERR","color: #f33",u,...h):console.error(u,...h))}flush(){}}t.$ik=O;class F extends b{constructor(u,h=t.$dk){super(),this.g=u,this.setLevel(h)}trace(u,...h){this.f(r.Trace)&&this.g.log(r.Trace,[this.h(u),...h])}debug(u,...h){this.f(r.Debug)&&this.g.log(r.Debug,[this.h(u),...h])}info(u,...h){this.f(r.Info)&&this.g.log(r.Info,[this.h(u),...h])}warn(u,...h){this.f(r.Warning)&&this.g.log(r.Warning,[this.h(u),...h])}error(u,...h){this.f(r.Error)&&this.g.log(r.Error,[this.h(u),...h])}h(u){return typeof u=="string"?u:(0,p.$rj)(u,this.f(r.Trace))}flush(){}}t.$jk=F;class H extends b{constructor(u){super(),this.g=u,u.length&&this.setLevel(u[0].getLevel())}setLevel(u){for(const h of this.g)h.setLevel(u);super.setLevel(u)}trace(u,...h){for(const P of this.g)P.trace(u,...h)}debug(u,...h){for(const P of this.g)P.debug(u,...h)}info(u,...h){for(const P of this.g)P.info(u,...h)}warn(u,...h){for(const P of this.g)P.warn(u,...h)}error(u,...h){for(const P of this.g)P.error(u,...h)}flush(){for(const u of this.g)u.flush()}dispose(){for(const u of this.g)u.dispose();super.dispose()}}t.$kk=H;class Z extends T.$Xc{constructor(u,h,P){if(super(),this.h=u,this.j=h,this.b=new d.$Dc,this.c=this.B(new k.$ne),this.onDidChangeLoggers=this.c.event,this.f=this.B(new k.$ne),this.onDidChangeLogLevel=this.f.event,this.g=this.B(new k.$ne),this.onDidChangeVisibility=this.g.event,P)for(const z of P)this.b.set(z.resource,{logger:void 0,info:z})}m(u){return(0,y.$gg)(u)?[...this.b.values()].find(h=>h.info.id===u):this.b.get(u)}getLogger(u){return this.m(u)?.logger}createLogger(u,h){const P=this.n(u),z=(0,y.$gg)(u)?u:h?.id??(0,c.$uj)(P.toString()).toString(16);let Q=this.b.get(P)?.logger;const x=h?.logLevel==="always"?r.Trace:h?.logLevel;Q||(Q=this.s(P,x??this.getLogLevel(P)??this.h,{...h,id:z}));const _={logger:Q,info:{resource:P,id:z,logLevel:x,name:h?.name,hidden:h?.hidden,extensionId:h?.extensionId,when:h?.when}};return this.registerLogger(_.info),this.b.set(P,_),Q}n(u){return(0,y.$gg)(u)?(0,E.$hh)(this.j,`${u}.log`):u}setLogLevel(u,h){if(a.URI.isUri(u)){const P=u,z=h,Q=this.b.get(P);Q&&z!==Q.info.logLevel&&(Q.info.logLevel=z===this.h?void 0:z,Q.logger?.setLevel(z),this.b.set(Q.info.resource,Q),this.f.fire([P,z]))}else{this.h=u;for(const[P,z]of this.b.entries())this.b.get(P)?.info.logLevel===void 0&&z.logger?.setLevel(this.h);this.f.fire(this.h)}}setVisibility(u,h){const P=this.m(u);P&&h!==!P.info.hidden&&(P.info.hidden=!h,this.b.set(P.info.resource,P),this.g.fire([P.info.resource,h]))}getLogLevel(u){let h;return u&&(h=this.b.get(u)?.info.logLevel),h??this.h}registerLogger(u){const h=this.b.get(u.resource);h?h.info.hidden!==u.hidden&&this.setVisibility(u.resource,!u.hidden):(this.b.set(u.resource,{info:u,logger:void 0}),this.c.fire({added:[u],removed:[]}))}deregisterLogger(u){const h=this.b.get(u);h&&(h.logger&&h.logger.dispose(),this.b.delete(u),this.c.fire({added:[],removed:[h.info]}))}*getRegisteredLoggers(){for(const u of this.b.values())yield u.info}getRegisteredLogger(u){return this.b.get(u)?.info}dispose(){this.b.forEach(u=>u.logger?.dispose()),this.b.clear(),super.dispose()}}t.$lk=Z;class X{constructor(){this.onDidChangeLogLevel=new k.$ne().event}setLevel(u){}getLevel(){return r.Info}trace(u,...h){}debug(u,...h){}info(u,...h){}warn(u,...h){}error(u,...h){}critical(u,...h){}dispose(){}flush(){}}t.$mk=X;class W extends X{}t.$nk=W;function G(A){if(A.verbose)return r.Trace;if(typeof A.logLevel=="string"){const u=q(A.logLevel.toLowerCase());if(u!==void 0)return u}return t.$dk}function g(A){switch(A){case r.Trace:return"trace";case r.Debug:return"debug";case r.Info:return"info";case r.Warning:return"warn";case r.Error:return"error";case r.Off:return"off"}}function S(A){switch(A){case r.Trace:return{original:"Trace",value:f.localize(0,null)};case r.Debug:return{original:"Debug",value:f.localize(1,null)};case r.Info:return{original:"Info",value:f.localize(2,null)};case r.Warning:return{original:"Warning",value:f.localize(3,null)};case r.Error:return{original:"Error",value:f.localize(4,null)};case r.Off:return{original:"Off",value:f.localize(5,null)}}}function q(A){switch(A){case"trace":return r.Trace;case"debug":return r.Debug;case"info":return r.Info;case"warn":return r.Warning;case"error":return r.Error;case"critical":return r.Error;case"off":return r.Off}}t.$sk=new $.$Xj("logLevel",g(r.Info))}),define(B[31],U([0,1,6,3]),function(R,t,f,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=t.$NG=void 0,t.$NG=(0,p.$Gi)("IV8InspectProfilingService");var k;(function(c){function T(w){return!!(w.samples&&w.timeDeltas)}c.isValidProfile=T;function d(w,E="noAbsolutePaths"){for(const y of w.nodes)y.callFrame&&y.callFrame.url&&((0,f.$lc)(y.callFrame.url)||/^\w[\w\d+.-]*:\/\/\/?/.test(y.callFrame.url))&&(y.callFrame.url=(0,f.$mc)(E,(0,f.$qc)(y.callFrame.url)));return w}c.rewriteAbsolutePaths=d})(k||(t.Utils=k={}))}),define(B[32],U([0,1]),function(R,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$Flc=t.$Elc=t.$Dlc=void 0;const f=(d,w)=>{const E=w[d];if(E.aggregateTime)return E.aggregateTime;let y=E.selfTime;for(const a of E.children)y+=f(a,w);return E.aggregateTime=y},p=d=>{let w=0;const E=new Map,y=a=>{const $=[a.functionName,a.url,a.scriptId,a.lineNumber,a.columnNumber].join(":"),C=E.get($);if(C)return C.id;const s=w++;return E.set($,{id:s,callFrame:a,location:{lineNumber:a.lineNumber+1,columnNumber:a.columnNumber+1}}),s};for(const a of d.nodes)a.locationId=y(a.callFrame),a.positionTicks=a.positionTicks?.map($=>({...$,startLocationId:y({...a.callFrame,lineNumber:$.line-1,columnNumber:0}),endLocationId:y({...a.callFrame,lineNumber:$.line,columnNumber:0})}));return[...E.values()].sort((a,$)=>a.id-$.id).map(a=>({locations:[a.location],callFrame:a.callFrame}))},k=d=>{if(!d.timeDeltas||!d.samples)return{nodes:[],locations:[],samples:d.samples||[],timeDeltas:d.timeDeltas||[],duration:d.endTime-d.startTime};const{samples:w,timeDeltas:E}=d,a=p(d).map((l,o)=>{const b=l.locations[0];return{id:o,selfTime:0,aggregateTime:0,ticks:0,callFrame:l.callFrame,src:b}}),$=new Map,C=l=>{let o=$.get(l);return o===void 0&&(o=$.size,$.set(l,o)),o},s=new Array(d.nodes.length);for(let l=0;l<d.nodes.length;l++){const o=d.nodes[l],b=C(o.id);s[b]={id:b,selfTime:0,aggregateTime:0,locationId:o.locationId,children:o.children?.map(C)||[]};for(const N of o.positionTicks||[])N.startLocationId&&(a[N.startLocationId].ticks+=N.ticks)}for(const l of s)for(const o of l.children)s[o].parent=l.id;const i=d.endTime-d.startTime;let r=i-E[0];for(let l=0;l<E.length-1;l++){const o=E[l+1];s[C(w[l])].selfTime+=o,r-=o}s.length&&(s[C(w[E.length-1])].selfTime+=r,E.push(r));for(let l=0;l<s.length;l++){const o=s[l],b=a[o.locationId];b.aggregateTime+=f(l,s),b.selfTime+=o.selfTime}return{nodes:s,locations:a,samples:w.map(C),timeDeltas:E,duration:i}};t.$Dlc=k;class c{static root(){return new c({id:-1,selfTime:0,aggregateTime:0,ticks:0,callFrame:{functionName:"(root)",lineNumber:-1,columnNumber:-1,scriptId:"0",url:""}})}get id(){return this.location.id}get callFrame(){return this.location.callFrame}get src(){return this.location.src}constructor(w,E){this.location=w,this.parent=E,this.children={},this.aggregateTime=0,this.selfTime=0,this.ticks=0,this.childrenSize=0}addNode(w){this.selfTime+=w.selfTime,this.aggregateTime+=w.aggregateTime}}t.$Elc=c;const T=(d,w,E,y=w)=>{let a=d.children[w.locationId];a||(a=new c(E.locations[w.locationId],d),d.childrenSize++,d.children[w.locationId]=a),a.addNode(y),w.parent&&(0,t.$Flc)(a,E.nodes[w.parent],E,y)};t.$Flc=T}),define(B[33],U([0,1,2]),function(R,t,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$Glc=p;function p(c,T,d,w){const{sample:E,perfBaseline:y,source:a}=c;T.publicLog2("unresponsive.sample",{perfBaseline:y,selfTime:E.selfTime,totalTime:E.totalTime,percentage:E.percentage,functionName:E.location,callers:E.caller.map(C=>C.location).join("<"),callersAnnotated:E.caller.map(C=>`${C.percentage}|${C.location}`).join("<"),source:a});const $=new k(c);w?f.$Z.onUnexpectedError($):d.error($)}class k extends Error{constructor(T){super(`PerfSampleError: by ${T.source} in ${T.sample.location}`),this.name="PerfSampleError",this.selfTime=T.sample.selfTime;const d=[T.sample.absLocation,...T.sample.caller.map(w=>w.absLocation)];this.stack=`
|
|
at ${d.join(`
|
|
at `)}`}}}),define(B[34],U([0,1,3]),function(R,t,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryConfiguration=t.TelemetryLevel=t.$km=t.$jm=t.$im=t.$hm=t.$gm=t.$fm=t.$em=t.$dm=t.$cm=t.$bm=t.$am=t.$_l=void 0,t.$_l=(0,f.$Gi)("telemetryService"),t.$am=(0,f.$Gi)("customEndpointTelemetryService"),t.$bm="telemetry.currentSessionDate",t.$cm="telemetry.firstSessionDate",t.$dm="telemetry.lastSessionDate",t.$em="telemetry.machineId",t.$fm="telemetry.sqmId",t.$gm="telemetry.devDeviceId",t.$hm="telemetry",t.$im="telemetry.telemetryLevel",t.$jm="telemetry.enableCrashReporter",t.$km="telemetry.enableTelemetry";var p;(function(c){c[c.NONE=0]="NONE",c[c.CRASH=1]="CRASH",c[c.ERROR=2]="ERROR",c[c.USAGE=3]="USAGE"})(p||(t.TelemetryLevel=p={}));var k;(function(c){c.OFF="off",c.CRASH="crash",c.ERROR="error",c.ON="all"})(k||(t.TelemetryConfiguration=k={}))});var $e=this&&this.__decorate||function(R,t,f,p){var k=arguments.length,c=k<3?t:p===null?p=Object.getOwnPropertyDescriptor(t,f):p,T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(R,t,f,p);else for(var d=R.length-1;d>=0;d--)(T=R[d])&&(c=(k<3?T(c):k>3?T(t,f,c):T(t,f))||c);return k>3&&c&&Object.defineProperty(t,f,c),c},ae=this&&this.__param||function(R,t){return function(f,p){t(f,p,R)}};define(B[35],U([0,1,20,21,28,3,30,33,34]),function(R,t,f,p,k,c,T,d,w){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$Hlc=t.ProfilingOutput=void 0;var E;(function(a){a[a.Failure=0]="Failure",a[a.Irrelevant=1]="Irrelevant",a[a.Interesting=2]="Interesting"})(E||(t.ProfilingOutput=E={})),t.$Hlc=(0,c.$Gi)("IProfileAnalysisWorkerService");let y=class{constructor($,C){this.b=$,this.c=C,this.a=new f.$CV("CpuProfileAnalysis")}async d($){const C=new p.SimpleWorkerClient(this.a,"vs/platform/profiling/electron-sandbox/profileAnalysisWorker",{});try{return await $(await C.getProxyObject())}finally{C.dispose()}}async analyseBottomUp($,C,s,i){return this.d(async r=>{const l=await r.analyseBottomUp($);if(l.kind===E.Interesting)for(const o of l.samples)(0,d.$Glc)({sample:o,perfBaseline:s,source:C(o.url)},this.b,this.c,i);return l.kind})}async analyseByLocation($,C){return this.d(async s=>await s.analyseByUrlCategory($,C))}};y=$e([ae(0,w.$_l),ae(1,T.$ak)],y),(0,k.$Ps)(t.$Hlc,y,k.InstantiationType.Delayed)}),define(B[39],U([0,1,6,14,10,31,32,35]),function(R,t,f,p,k,c,T,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.create=w;function w(){return new E}class E{analyseBottomUp(r){if(!c.Utils.isValidProfile(r))return{kind:d.ProfilingOutput.Irrelevant,samples:[]};const l=(0,T.$Dlc)(r),o=s(l,5).filter(b=>!b.isSpecial);return o.length===0||o[0].percentage<10?{kind:d.ProfilingOutput.Irrelevant,samples:[]}:{kind:d.ProfilingOutput.Interesting,samples:o}}analyseByUrlCategory(r,l){const o=p.$Mi.forUris();o.fill(l);const b=(0,T.$Dlc)(r),N=new Map;for(const O of b.nodes){const F=b.locations[O.locationId];let H;try{H=o.findSubstr(k.URI.parse(F.callFrame.url))}catch{}H||(H=a(F.callFrame));const X=(N.get(H)??0)+O.selfTime;N.set(H,X)}const j=[];for(const[O,F]of N)j.push([O,F]);return j}}function y(i){return i.functionName.startsWith("(")&&i.functionName.endsWith(")")}function a(i){let r=i.functionName||"(anonymous)";return i.url&&(r+="#",r+=(0,f.$qc)(i.url),i.lineNumber>=0&&(r+=":",r+=i.lineNumber+1),i.columnNumber>=0&&(r+=":",r+=i.columnNumber+1)),r}function $(i){let r=i.functionName||"(anonymous)";return i.url&&(r+=" (",r+=i.url,i.lineNumber>=0&&(r+=":",r+=i.lineNumber+1),i.columnNumber>=0&&(r+=":",r+=i.columnNumber+1),r+=")"),r}function C(i,r){const l={};for(const b of i.nodes)l[b.locationId]=(l[b.locationId]||0)+b.selfTime;const o=Object.entries(l).sort(([,b],[,N])=>N-b).slice(0,r).map(([b])=>Number(b));return new Set(o)}function s(i,r){const l=T.$Elc.root(),o=C(i,r);for(const j of i.nodes)o.has(j.locationId)&&((0,T.$Flc)(l,j,i),l.addNode(j));const b=Object.values(l.children).sort((j,O)=>O.selfTime-j.selfTime).slice(0,r),N=[];for(const j of b){const O={selfTime:Math.round(j.selfTime/1e3),totalTime:Math.round(j.aggregateTime/1e3),location:a(j.callFrame),absLocation:$(j.callFrame),url:j.callFrame.url,caller:[],percentage:Math.round(j.selfTime/(i.duration/100)),isSpecial:y(j.callFrame)},F=[j];for(;F.length;){const H=F.pop();let Z;for(const X of Object.values(H.children))(!Z||Z.selfTime<X.selfTime)&&(Z=X);if(Z){const X=Math.round(Z.selfTime/(H.selfTime/100));O.caller.push({percentage:X,location:a(Z.callFrame),absLocation:$(Z.callFrame)}),F.push(Z)}}N.push(O)}return N}})}).call(this);
|
|
|
|
//# sourceMappingURL=https://main.vscode-cdn.net/sourcemaps/ea1445cc7016315d0f5728f8e8b12a45dc0a7286/core/vs/platform/profiling/electron-sandbox/profileAnalysisWorker.js.map
|