@opensumi/cli-engine 3.9.1-next-1749562467.0 → 3.9.1-next-1749713628.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33223,7 +33223,7 @@ You MUST use the following format when citing code regions or blocks:
33223
33223
  \`\`\`
33224
33224
  This is the ONLY acceptable format for code citations. The format is \`\`\`startLine:endLine:filepath where startLine and endLine are line numbers.`},58196:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolInvocationRegistryManagerImpl=t.ToolInvocationRegistryManager=t.ToolInvocationRegistryImpl=t.ToolProvider=t.ToolInvocationRegistry=t.ToolRequest=t.ToolParameterSchema=void 0;const n=e(85608),r=e(75995),o=e(76003);t.ToolParameterSchema=r.z.object({type:r.z.enum(["string","number","boolean","object","array"]),description:r.z.string().optional(),enum:r.z.array(r.z.any()).optional(),items:r.z.lazy(()=>t.ToolParameterSchema).optional(),properties:r.z.record(r.z.lazy(()=>t.ToolParameterSchema)).optional(),required:r.z.array(r.z.string()).optional()});var l;(function(p){function m(s){return t.ToolParameterSchema.safeParse(s).success}p.isToolParameter=m})(l||(t.ToolRequest=l={})),t.ToolInvocationRegistry=Symbol("ToolInvocationRegistry"),t.ToolProvider=Symbol("ToolProvider");class _{constructor(){this.tools=new Map}unregisterProviderTools(m){const s=[];for(const[g,a]of this.tools.entries())a.providerName===m&&s.push(g);s.forEach(g=>this.tools.delete(g))}getAllFunctions(){return Array.from(this.tools.values())}registerTool(m){this.tools.has(m.id)?this.tools.set(m.id,m):this.tools.set(m.id,m)}getFunction(m){return this.tools.get(m)}getFunctions(...m){return m.map(g=>{const a=this.tools.get(g);if(a)return a;throw new Error(`\u627E\u4E0D\u5230 ID \u4E3A ${g} \u7684\u51FD\u6570`)})}}t.ToolInvocationRegistryImpl=_,t.ToolInvocationRegistryManager=Symbol("ToolInvocationRegistryManager");let v=class{constructor(){this.registries=new Map}getRegistry(m){let s=this.registries.get(m);return s||(s=new _,this.registries.set(m,s)),s}removeRegistry(m){this.registries.delete(m)}hasRegistry(m){return this.registries.has(m)}};t.ToolInvocationRegistryManagerImpl=v,t.ToolInvocationRegistryManagerImpl=v=n.__decorate([(0,o.Injectable)()],v)},69820:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EPartialEdit=t.MCP_SERVER_TYPE=t.NearestCodeBlockType=void 0;var e;(function(o){o.Block="block",o.Line="line"})(e||(t.NearestCodeBlockType=e={}));var n;(function(o){o.STDIO="stdio",o.SSE="sse",o.BUILTIN="builtin"})(n||(t.MCP_SERVER_TYPE=n={}));var r;(function(o){o.accept="accept",o.discard="discard"})(r||(t.EPartialEdit=r={}))},98864:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cleanAttachedTextWrapper=t.getToolName=t.TOOL_NAME_SEPARATOR=t.toClaudeToolName=t.extractCodeBlocks=t.isDocumentValid=t.isDocumentTooShort=t.isDocumentTooLarge=void 0;const n=e(19413),r="```",o=10,l=a=>{try{a.getText()}catch(h){if(h instanceof RangeError)return!0}return!1};t.isDocumentTooLarge=l;const _=a=>a.getText().length<o;t.isDocumentTooShort=_;const v=a=>!((0,t.isDocumentTooLarge)(a)||(0,t.isDocumentTooShort)(a));t.isDocumentValid=v;const p=a=>{const h=a.split(`
33225
33225
  `);let u=[],c=!1,E=0;return h.forEach((f,d)=>{if(!c&&f.trim().startsWith(r))c=!0,E=d+1;else if(c&&f.trim().startsWith(r)){c=!1;const y=d;u=h.slice(E,y)}c&&E!==d+1&&u.push(f)}),u.join(`
33226
- `)};t.extractCodeBlocks=p;const m=a=>a.replace(/[^a-zA-Z0-9_-]/g,"").slice(0,64);t.toClaudeToolName=m,t.TOOL_NAME_SEPARATOR="__";const s=(a,h)=>h===n.BUILTIN_MCP_SERVER_NAME?a:(0,t.toClaudeToolName)(`mcp${t.TOOL_NAME_SEPARATOR}${h}${t.TOOL_NAME_SEPARATOR}${a}`);t.getToolName=s;const g=a=>{const h=/`<attached_file>(.*)`/g,u=/`<attached_folder>(.*)`/g;return a=a.replace(h,"$1"),a=a.replace(u,"$1"),a};t.cleanAttachedTextWrapper=g},26471:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(19413),t)},15504:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentReactions=t.CommentReactionSwitcher=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),l=e(81878),_=e(25918),v=e(93899),p=e(52416),m=e(69635),s=n.__importDefault(e(38877)),g=({thread:h,comment:u,className:c})=>{const E=`${h.providerId}_${h.id}_${u.id}`,f=`${v.MenuId.CommentReactionSwitcherMenu}_${E}`,d=(0,o.useInjectable)(v.IMenuRegistry),y=(0,o.useInjectable)(v.AbstractMenuService);r.default.useEffect(()=>{const A=new o.Disposable,S=`${v.MenuId.CommentReactionSwitcherSubmenu}_${E}`;return A.addDispose(d.registerMenuItem(f,{submenu:S,label:S,iconClass:(0,o.getExternalIcon)("reactions"),group:"navigation"})),A.addDispose(d.registerMenuItems(S,u.reactions.map(D=>({command:{id:m.SwitchCommandReaction,label:D.label},extraTailArgs:[{thread:h,comment:u,reaction:D}]})))),()=>A.dispose()},[]);const b=r.default.useMemo(()=>y.createMenu(f),[]);return r.default.createElement(_.InlineActionBar,{className:c,menus:b,regroup:A=>[A,[]],type:"icon"})};t.CommentReactionSwitcher=g;const a=({thread:h,comment:u})=>{var c;const E=(0,o.useInjectable)(o.IEventBus),f=(0,o.useInjectable)(p.IIconService),d=r.default.useCallback(y=>{E.fire(new m.CommentReactionClick({thread:h,comment:u,reaction:y}))},[]);return r.default.createElement("div",{className:s.default.comment_reactions},(c=u.reactions)===null||c===void 0?void 0:c.filter(y=>y.count!==0).map(y=>r.default.createElement(l.Button,{key:y.label,onClick:()=>d(y),type:"secondary",size:"small",title:y.label,className:s.default.comment_reaction,iconClass:f.fromIcon("",y.iconPath.toString(),p.IconType.Background)},"\xA0",y.count)))};t.CommentReactions=a},54143:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsBody=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(43144)),l=e(84605),_=n.__importDefault(e(38877)),v=e(70154),p=({root:m,children:s})=>o.default.createPortal(s,m);t.CommentsBody=r.default.memo(({body:m})=>{const s=r.default.useRef(null),[g,a]=r.default.useState(null),h=r.default.useMemo(()=>{const u=(0,l.createMarkedRenderer)();return u.link=({href:c,title:E,text:f})=>`<a target="_blank" rel="noopener" href="${c}" title="${E||""}">${f}</a>`,u},[]);return r.default.useEffect(()=>{if(s.current){const u=s.current.attachShadow({mode:"open"});g||a(u)}},[]),r.default.createElement("div",{ref:s,className:_.default.comment_shadow_box},g&&r.default.createElement(p,{root:g},r.default.createElement("style",null,v.markdownCss),r.default.createElement("div",{dangerouslySetInnerHTML:{__html:(0,l.toMarkdownHtml)(typeof m=="string"?m:m.value,{gfm:!0,breaks:!1,pedantic:!1,renderer:h})}})))})},66480:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsFeatureRegistry=void 0;const n=e(85608),r=e(76003);let o=class{constructor(){this.config={},this.options={},this.panelTreeNodeHandlers=[],this.mentionsOptions={},this.providerFeature=new Map}registerConfig(_){this.config={...this.config,..._}}registerPanelTreeNodeHandler(_){this.panelTreeNodeHandlers.push(_)}registerPanelOptions(_){this.options={...this.options,..._}}registerFileUploadHandler(_){this.fileUploadHandler=_}registerMentionsOptions(_){this.mentionsOptions=_}registerZoneWidgetRender(_){this.zoneWidgetRender=_}getConfig(){return this.config}getCommentsPanelOptions(){return this.options}getCommentsPanelTreeNodeHandlers(){return this.panelTreeNodeHandlers}getFileUploadHandler(){return this.fileUploadHandler}getMentionsOptions(){return this.mentionsOptions}getZoneWidgetRender(){return this.zoneWidgetRender}registerProviderFeature(_,v){this.providerFeature.set(_,v)}getProviderFeature(_){return this.providerFeature.get(_)}};t.CommentsFeatureRegistry=o,t.CommentsFeatureRegistry=o=n.__decorate([(0,r.Injectable)()],o)},37357:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentItem=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(97267),l=e(41869),_=e(25918),v=e(93899),p=e(69635),m=e(15504),s=e(54143),g=e(42018),a=n.__importDefault(e(38877)),h=({timestamp:f})=>{const d=r.default.useMemo(()=>{const y=new Date(f);return(0,l.toLocalString)(y)},[f]);return r.default.createElement("span",{className:a.default.comment_item_timestamp},d)},u=(f,d)=>{const y=(0,l.useInjectable)(v.AbstractMenuService),{body:b,contextValue:A}=d,[S,D]=r.default.useState(""),I=(0,l.useInjectable)(p.ICommentsFeatureRegistry),w=r.default.useMemo(()=>I.getFileUploadHandler(),[]);r.default.useEffect(()=>{D(b)},[b]);const T=r.default.useMemo(()=>f.createScoped(),[]),R=r.default.useMemo(()=>T.createKey("commentIsEmpty",!d.body),[]),M=r.default.useMemo(()=>y.createMenu(v.MenuId.CommentsCommentContext,T),[]),O=r.default.useMemo(()=>y.createMenu(v.MenuId.CommentsCommentTitle,T),[]),x=r.default.useRef(T.createKey("comment",A));r.default.useEffect(()=>{x.current.set(A)},[A]);const k=r.default.useCallback(L=>{R.set(!L.target.value),D(L.target.value)},[]),F=r.default.useCallback(async L=>{if(w){const B=await w(S,L);D(U=>{const W=U+B;return R.set(!W),W})}},[S]);return[S,D,k,M,O,F]},c=({reply:f,thread:d})=>{var y;const{contextKeyService:b}=d,{author:A,label:S,body:D,mode:I,timestamp:w}=f,T=(y=A.iconPath)===null||y===void 0?void 0:y.toString(),[R,M,O,x,k,F]=u(b,f),L=r.default.useMemo(()=>{const B=(0,l.toMarkdownHtml)(typeof D=="string"?D:D.value);return/^\<p\>[^<>]+\<\/p\>\n$/.test(B)},[D]);return r.default.createElement("div",{className:a.default.reply_item},(0,l.isUndefined)(I)||I===p.CommentMode.Preview?r.default.createElement("div",null,L?r.default.createElement(r.default.Fragment,null,T&&r.default.createElement("img",{className:a.default.reply_item_icon,src:T,alt:A.name}),r.default.createElement("span",{className:a.default.comment_item_author_name},A.name),w&&r.default.createElement(h,{timestamp:w}),typeof S=="string"?r.default.createElement("span",{className:a.default.comment_item_label},S):S," : ",r.default.createElement("span",{className:a.default.comment_item_body},typeof D=="string"?D:D.value),f.reactions&&f.reactions.length>0&&r.default.createElement(m.CommentReactionSwitcher,{className:a.default.reply_item_title,thread:d,comment:f}),r.default.createElement(_.InlineActionBar,{separator:"inline",className:a.default.reply_item_title,menus:k,context:[{thread:d,comment:f,menuId:v.MenuId.CommentsCommentTitle}],type:"icon"})):r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:a.default.comment_item_markdown_header},r.default.createElement("div",null,T&&r.default.createElement("img",{className:a.default.reply_item_icon,src:T,alt:A.name}),r.default.createElement("span",{className:a.default.comment_item_author_name},A.name),w&&r.default.createElement(h,{timestamp:w}),typeof S=="string"?r.default.createElement("span",{className:a.default.comment_item_label},S):S," : "),r.default.createElement(_.InlineActionBar,{separator:"inline",className:a.default.reply_item_title,menus:k,context:[{thread:d,comment:f,menuId:v.MenuId.CommentsCommentTitle}],type:"icon"})),r.default.createElement(s.CommentsBody,{body:D}))):r.default.createElement("div",null,r.default.createElement(g.CommentsTextArea,{value:typeof R=="string"?R:R.value,autoFocus:!0,onChange:O,dragFiles:F}),r.default.createElement(_.InlineActionBar,{className:a.default.comment_item_reply,menus:x,context:[{thread:d,comment:f,body:R,menuId:v.MenuId.CommentsCommentContext}],type:"button",separator:"inline",afterClick:()=>{M(D)}})),f.reactions&&f.reactions.length>0&&r.default.createElement(m.CommentReactions,{thread:d,comment:f}))},E=({thread:f,commentThreadContext:d,widget:y})=>{var b,A;const[S,D]=r.default.useState(!1),[I,w]=r.default.useState(""),{contextKeyService:T}=f,R=(0,l.useAutorun)(f.readOnly),[M,...O]=(0,l.useAutorun)(f.comments),{author:x,label:k,body:F,mode:L,timestamp:B}=M,U=(0,l.isString)(x.iconPath)?x.iconPath:!((b=x.iconPath)===null||b===void 0)&&b.authority?(A=x.iconPath)===null||A===void 0?void 0:A.toString():"",[W,j,Q,G,Z,$]=u(T,M),V=(0,l.useInjectable)(p.ICommentsFeatureRegistry),H=r.default.useMemo(()=>V.getFileUploadHandler(),[]),K=r.default.useMemo(()=>T.createKey("commentIsEmpty",!0),[]);function Y(re){K.set(!re.target.value),w(re.target.value)}const X=r.default.useCallback(async re=>{if(H){const oe=await H(W,re);w(he=>{const me=he+oe;return K.set(!me),me})}},[I]);return r.default.createElement("div",{className:a.default.comment_item},U&&r.default.createElement("img",{className:a.default.comment_item_icon,src:U,alt:x.name}),r.default.createElement("div",{className:a.default.comment_item_content},r.default.createElement("div",{className:a.default.comment_item_head},r.default.createElement("div",{className:a.default.comment_item_name},r.default.createElement("span",{className:a.default.comment_item_author_name},x.name),B&&r.default.createElement(h,{timestamp:B}),typeof k=="string"?r.default.createElement("span",{className:a.default.comment_item_label},k):k),r.default.createElement("div",{className:a.default.comment_item_actions},M.reactions&&M.reactions.length>0&&r.default.createElement(m.CommentReactionSwitcher,{thread:f,comment:M}),!R&&r.default.createElement(o.Button,{className:a.default.comment_item_reply_button,size:"small",type:"secondary",onClick:()=>D(!0)},(0,l.localize)("comments.thread.action.reply")),r.default.createElement(_.InlineActionBar,{menus:Z,context:[{thread:f,comment:M,menuId:v.MenuId.CommentsCommentTitle}],type:"button"}))),(0,l.isUndefined)(L)||L===p.CommentMode.Preview?r.default.createElement(s.CommentsBody,{body:F}):r.default.createElement("div",null,r.default.createElement(g.CommentsTextArea,{value:typeof W=="string"?W:W.value,autoFocus:!0,onChange:Q,dragFiles:$}),r.default.createElement(_.InlineActionBar,{className:a.default.comment_item_context,menus:G,context:[{thread:f,comment:M,body:W,menuId:v.MenuId.CommentsCommentContext}],separator:"inline",type:"button",afterClick:()=>{j(F)}})),M.reactions&&M.reactions.length>0&&r.default.createElement(m.CommentReactions,{thread:f,comment:M}),(O.length>0||S)&&r.default.createElement("div",{className:a.default.comment_item_reply_wrap},O.map(re=>r.default.createElement(c,{key:re.id,thread:f,reply:re})),S&&r.default.createElement("div",null,r.default.createElement(g.CommentsTextArea,{autoFocus:!0,value:I,onChange:Y,placeholder:`${(0,l.localize)("comments.reply.placeholder")}...`,dragFiles:X}),r.default.createElement(_.InlineActionBar,{className:a.default.comment_item_reply,menus:d,context:[{thread:f,text:I,widget:y,menuId:v.MenuId.CommentsCommentThreadContext}],separator:"inline",type:"button",afterClick:()=>{w(""),D(!1)}})))))};t.CommentItem=E},53878:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsPanel=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),l=e(41869),_=e(69635),v=n.__importDefault(e(38877)),p=e(5167),m=e(47842),s=({viewState:g})=>{const a=(0,l.useInjectable)(m.CommentModelService),[h,u]=(0,r.useState)(),c=(0,r.useRef)(null),E=(0,l.useInjectable)(_.ICommentsFeatureRegistry),{handleTreeBlur:f}=a;(0,r.useEffect)(()=>{u(a.treeModel);const I=a.onDidUpdateTreeModel(w=>{u(w)});return()=>{I.dispose()}},[]);const d=(0,r.useCallback)(I=>{a.handleTreeHandler(I)},[a]),y=(0,r.useCallback)(I=>r.default.createElement(p.CommentNodeRendered,{item:I.item,itemType:I.itemType,decorations:a.decorations.getDecorations(I.item),defaultLeftPadding:8,onTwistierClick:a.handleTwistierClick,onClick:a.handleItemClick,leftPadding:8}),[h]),b=(0,r.useMemo)(()=>E.getCommentsPanelOptions(),[]),A=(0,r.useMemo)(()=>b.header,[b]),S=(0,r.useMemo)(()=>r.default.createElement("div",{className:v.default.panel_placeholder},b.defaultPlaceholder||(0,l.localize)("comments.panel.placeholder")),[b]),D=(0,r.useCallback)(()=>h?r.default.createElement(o.RecycleTree,{height:g.height-(A?.height||0),itemHeight:p.COMMENT_TREE_NODE_HEIGHT,onReady:d,model:h,placeholder:()=>S},y):S,[h,A,g.height]);return r.default.createElement("div",{className:v.default.comment_panel,tabIndex:-1,onBlur:f,ref:c},A?.component,D())};t.CommentsPanel=s},42018:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsTextArea=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(34801),l=e(97267),_=e(41869),v=e(69635),p=e(54143),m=n.__importDefault(e(38877)),s=e(73136),g="@",a="@[__display__](__id__)",h=(u,c)=>`@${c}`;t.CommentsTextArea=r.default.forwardRef((u,c)=>{const{focusDelay:E=0,autoFocus:f=!1,placeholder:d="",onFocus:y,onBlur:b,onChange:A,maxRows:S=10,minRows:D=2,value:I,initialHeight:w,dragFiles:T}=u,[R,M]=r.default.useState(0),O=(0,_.useInjectable)(v.ICommentsFeatureRegistry),x=r.default.useRef(null),k=r.default.useRef(null),F=r.default.useRef(null);r.default.useImperativeHandle(c,()=>x.current);const L=r.default.useCallback(async Z=>{var $;Z.stopPropagation(),Z.preventDefault();const V=($=Z.clipboardData)===null||$===void 0?void 0:$.files;V&&T&&await T(V),x.current&&(x.current.focus(),W(x.current.value))},[T]),B=r.default.useCallback(async Z=>{var $;Z.stopPropagation(),Z.preventDefault();const V=($=Z.dataTransfer)===null||$===void 0?void 0:$.files;V&&T&&await T(V),x.current&&(x.current.focus(),W(x.current.value))},[T]),U=r.default.useCallback(Z=>{Z.stopPropagation(),Z.preventDefault(),Z.dataTransfer.dropEffect="copy"},[]),W=r.default.useCallback(Z=>{const $=x.current;if($){const V=Z.toString().length;$.setSelectionRange(V,V)}},[]);r.default.useEffect(()=>{var Z;const $=x.current;if(!$)return;w&&$.style&&($.style.height=w),E&&setTimeout(()=>{$.focus({preventScroll:!0})},E),W(I);function V(H){var K,Y,X;const re=H.target;re&&(re.nodeName.toUpperCase()==="TEXTAREA"&&re.scrollHeight>re.clientHeight||re.nodeName.toUpperCase()==="UL"||((K=re.parentElement)===null||K===void 0?void 0:K.nodeName.toUpperCase())==="UL"||((X=(Y=re.parentElement)===null||Y===void 0?void 0:Y.parentElement)===null||X===void 0?void 0:X.nodeName.toUpperCase())==="UL")&&H.stopPropagation()}return(Z=k.current)===null||Z===void 0||Z.addEventListener("mousewheel",V,!0),()=>{var H;(H=k.current)===null||H===void 0||H.removeEventListener("mousewheel",V,!0)}},[]),r.default.useEffect(()=>{R===0&&(setTimeout(()=>{var Z;(Z=x.current)===null||Z===void 0||Z.focus({preventScroll:!0})},E),W(I))},[R]);const j=r.default.useMemo(()=>(0,s.getMentionBoxStyle)({minRows:D,maxRows:S}),[D,S]),Q=r.default.useMemo(()=>O.getMentionsOptions(),[O]),G=r.default.useCallback(async(Z,$)=>{if(Q.providerData){const V=await Q.providerData(Z);$(V)}else $([])},[Q]);return r.default.createElement("div",{className:m.default.textarea_container},r.default.createElement(l.Tabs,{mini:!0,value:R,onChange:Z=>M(Z),tabs:[(0,_.localize)("comments.thread.textarea.write"),(0,_.localize)("comments.thread.textarea.preview")]}),r.default.createElement("div",null,R===0?r.default.createElement("div",{ref:k},r.default.createElement(o.MentionsInput,{autoFocus:f,onPaste:L,inputRef:x,onDragOver:U,onDrop:B,ref:F,value:I,placeholder:d,onChange:A,onFocus:y,onBlur:b,style:j},r.default.createElement(o.Mention,{markup:Q.markup||a,renderSuggestion:Q.renderSuggestion,trigger:g,data:G,displayTransform:Q.displayTransform||h}))):r.default.createElement("div",{className:m.default.textarea_preview},r.default.createElement(p.CommentsBody,{body:I}))))})},49867:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsThread=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(91830),_=e(54414),v=e(28423),p=e(69635),m=e(90366);let s=class extends o.Disposable{set contextValue(a){this._contextKeyService.createKey("thread",a)}get contextValue(){return this._contextKeyService.getContextKeyValue("thread")}get onDidChangeCollapsibleState(){return this.onDidChangeCollapsibleStateEmitter.event}get onDidChange(){return this.onDidChangeEmitter.event}constructor(a,h,u,c){super(),this.uri=a,this.range=h,this.providerId=u,this.options=c,this.comments=(0,v.observableValue)(this,[]),this.label=(0,v.observableValue)(this,void 0),this.readOnly=(0,v.observableValue)(this,!1),this.isCollapsed=(0,v.observableValue)(this,!1),this.onDidChangeCollapsibleStateEmitter=new o.Emitter,this.widgets=new Map,this._id=`thread_${(0,o.uuid)()}`,this.onDidChangeEmitter=new o.Emitter,this.pendingShowTimeouts=new Set,this.threadHeaderTitle=(0,v.derived)(this,S=>{const D=this.label.read(S);if(D)return D;const I=this.comments.read(S);if(I.length){const w=new Set(I.map(T=>`@${T.author.name}`));return`${(0,o.localize)("comments.participants")}: `+[...w].join(" ")}else return(0,o.localize)("comments.zone.title")}),this.toggle=S=>{if(this.comments.get().length>0){const I=this.widgets.get(S);I&&I.toggle()}else this.dispose()},this.updateComments(c.comments?c.comments.map(S=>({...S,id:(0,o.uuid)()})):[]),this.data=this.options.data,this._contextKeyService=this.registerDispose(this.globalContextKeyService.createScoped()),new l.ResourceContextKey(this._contextKeyService).set(a),this._contextKeyService.createKey("thread",c.contextValue),(0,v.transaction)(S=>{this.setReadOnly(!!c.readOnly),this.label.set(c.label,S),this.isCollapsed.set(!!this.options.isCollapsed,S)});const f=this._contextKeyService.createKey("threadsLength",this.commentsService.getThreadsByUri(a).length),d=this.comments.get(),y=this._contextKeyService.createKey("commentsLength",d.length),b=this._contextKeyService.createKey("commentThreadIsEmpty",!d.length);this._contextKeyService.createKey("commentController",u),this.addDispose((0,v.autorun)(S=>{const D=this.comments.read(S).length;y.set(D),b.set(!D)})),this.getEditorsByUri(this.uri).forEach(S=>{this.widgets.get(S)||this.addWidgetByEditor(S)}),this.addDispose((0,v.autorun)(S=>{this.isCollapsed.read(S)?this.hideAll():this.showAll()})),this.addDispose(this.commentsService.onThreadsChanged(S=>{S.uri.isEqual(a)&&f.set(this.commentsService.getThreadsByUri(a).length)})),this.addDispose({dispose:()=>{this.updateComments([]),this.pendingShowTimeouts.forEach(S=>clearTimeout(S)),this.pendingShowTimeouts.clear()}}),this.onDidChangeEmitter.fire()}updateComments(a){(0,v.transaction)(h=>{this.comments.set(a,h)})}getWidgetByEditor(a){return this.widgets.get(a)}get id(){return this._id}get contextKeyService(){return this._contextKeyService}setReadOnly(a){(0,v.transaction)(h=>{this.readOnly.set(a,h),this._contextKeyService.createKey("readOnly",a)})}getEditorsByUri(a){return this.editorCollectionService.listEditors().filter(h=>{var u;return(u=h.currentUri)===null||u===void 0?void 0:u.isEqual(a)})}addWidgetByEditor(a){const h=this.injector.get(m.CommentsZoneWidget,[a,this,{arrowColor:"var(--peekView-border)"}]);return this.addDispose(h.onChangeZoneWidget(()=>{const u=this.commentsService.commentsThreads.filter(f=>this.isEqual(f)),c=u.findIndex(f=>f===this),E=u.slice(c+1);for(const f of E)if(f.isShowWidget(a)){const d=f.getWidgetByEditor(a);d?.resize()}})),this.addDispose(h),this.widgets.set(a,h),a.onDispose(()=>{h.dispose(),this.widgets.delete(a)}),h}show(a){if(a){let h=this.widgets.get(a);h||(h=this.addWidgetByEditor(a)),h.show()}else this.getEditorsByUri(this.uri).forEach(u=>{var c;let E=this.widgets.get(u);E||(E=this.addWidgetByEditor(u)),E&&(!((c=u.currentUri)===null||c===void 0)&&c.isEqual(this.uri))&&E.show()})}removePaddingShowedWidgets(){this.pendingShowTimeouts.forEach(a=>clearTimeout(a)),this.pendingShowTimeouts.clear()}showWidgetsIfShowed(){var a;this.pendingShowTimeouts.forEach(h=>clearTimeout(h)),this.pendingShowTimeouts.clear();for(const h of this.getEditorsByUri(this.uri)){let u=this.widgets.get(h);if(u||(u=this.addWidgetByEditor(h)),!((a=h.currentUri)===null||a===void 0)&&a.isEqual(this.uri)){const c=setTimeout(()=>{var E;u&&(!((E=h.currentUri)===null||E===void 0)&&E.isEqual(this.uri))&&u.show(),this.pendingShowTimeouts.delete(c)},100);this.pendingShowTimeouts.add(c)}}}hideWidgetsByDispose(){var a;for(const[h,u]of this.widgets)!(!((a=h.currentUri)===null||a===void 0)&&a.isEqual(this.uri))&&u.dispose()}isShowWidget(a){if(a){const h=this.widgets.get(a);return h?h.isShow:!1}else{for(const[,h]of this.widgets)return h.isShow;return!1}}hide(a){if(a){const h=this.widgets.get(a);h?.hide()}else this.hideAll()}showAll(){(0,v.transaction)(a=>{this.isCollapsed.set(!1,a)});for(const[,a]of this.widgets)a.show();this.onDidChangeCollapsibleStateEmitter.fire(p.CommentThreadCollapsibleState.Expanded)}hideAll(a){var h;(0,v.transaction)(u=>{this.isCollapsed.set(!0,u)});for(const[u,c]of this.widgets)a?!(!((h=u.currentUri)===null||h===void 0)&&h.isEqual(this.uri))&&c.dispose():c.hide();this.onDidChangeCollapsibleStateEmitter.fire(p.CommentThreadCollapsibleState.Collapsed)}addComment(...a){const h=this.comments.get();(0,v.transaction)(u=>{this.comments.set([...h,...a.map(c=>({...c,id:(0,o.uuid)()}))],u)}),this.onDidChangeEmitter.fire()}removeComment(a){(0,v.transaction)(h=>{this.comments.set(this.comments.get().filter(u=>u!==a),h)}),this.onDidChangeEmitter.fire()}isEqual(a){return a.uri.isEqual(this.uri)&&a.range.startLineNumber===this.range.startLineNumber&&a.range.endLineNumber===this.range.endLineNumber}};t.CommentsThread=s,n.__decorate([(0,r.Autowired)(p.ICommentsService),n.__metadata("design:type",Object)],s.prototype,"commentsService",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],s.prototype,"globalContextKeyService",void 0),n.__decorate([(0,r.Autowired)(_.EditorCollectionService),n.__metadata("design:type",_.EditorCollectionService)],s.prototype,"editorCollectionService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],s.prototype,"injector",void 0),t.CommentsThread=s=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[o.URI,Object,String,Object])],s)},73804:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsZoneService=void 0;const n=e(85608),r=e(76003),o=e(93899),l=e(43718),_=e(69635),v=e(49867);let p=class extends l.Disposable{constructor(s){super(),this.thread=s}setCurrentCommentThread(s){this.commentService.setCurrentCommentThread(s)}get commentThreadTitle(){return this.registerDispose(this.menuService.createMenu(o.MenuId.CommentsCommentThreadTitle,this.thread.contextKeyService))}get commentThreadContext(){return this.registerDispose(this.menuService.createMenu(o.MenuId.CommentsCommentThreadContext,this.thread.contextKeyService))}};t.CommentsZoneService=p,n.__decorate([(0,r.Autowired)(o.AbstractMenuService),n.__metadata("design:type",o.AbstractMenuService)],p.prototype,"menuService",void 0),n.__decorate([(0,r.Autowired)(_.ICommentsService),n.__metadata("design:type",Object)],p.prototype,"commentService",void 0),n.__decorate([l.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],p.prototype,"commentThreadTitle",null),n.__decorate([l.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],p.prototype,"commentThreadContext",null),t.CommentsZoneService=p=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[v.CommentsThread])],p)},90366:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsZoneWidget=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=n.__importDefault(e(25873)),_=e(76003),v=e(41869),p=e(25918),m=e(93899),s=e(20303),g=e(69635),a=e(37357),h=e(42018),u=e(73804),c=n.__importDefault(e(38877)),E=({thread:d,widget:y})=>{const{contextKeyService:b}=d,A=(0,v.useAutorun)(d.comments),S=(0,v.useAutorun)(d.threadHeaderTitle),I=(0,v.useInjectable)(_.INJECTOR_TOKEN).get(u.CommentsZoneService,[d]),w=(0,v.useInjectable)(g.ICommentsFeatureRegistry),T=o.default.useMemo(()=>w.getFileUploadHandler(),[]),[R,M]=o.default.useState(""),O=o.default.useMemo(()=>b.createKey("commentIsEmpty",!R),[]),x=I.commentThreadTitle,k=I.commentThreadContext,F=o.default.useCallback(G=>{const{value:Z}=G.target;M(Z),O.set(!Z)},[]),L=o.default.useMemo(()=>{var G;return((G=w.getProviderFeature(d.providerId))===null||G===void 0?void 0:G.placeholder)||`${(0,v.localize)("comments.reply.placeholder")}...`},[]),B=o.default.useCallback(async G=>{if(T){const Z=await T(R,G);M($=>{const V=$+Z;return O.set(!V),V})}},[R]);o.default.useEffect(()=>{const G=y.onFirstDisplay(()=>{setTimeout(()=>{y.coreEditor.monacoEditor.revealLine(d.range.endLineNumber+1)},0)});return()=>{G.dispose()}},[]);const U=o.default.useCallback(()=>{I.setCurrentCommentThread(I.thread)},[]),W=o.default.useCallback(()=>{I.setCurrentCommentThread(void 0)},[]),j=o.default.useCallback(()=>{I.setCurrentCommentThread(I.thread)},[]),Q=o.default.useCallback(()=>{I.setCurrentCommentThread(void 0)},[]);return o.default.createElement("div",{tabIndex:-1,onMouseOver:U,onMouseOut:W,onFocus:j,onBlur:Q,className:(0,r.default)(d.options.threadClassName,c.default.comment_container)},o.default.createElement("div",{className:(0,r.default)(d.options.threadHeadClassName,c.default.head)},o.default.createElement("div",{className:c.default.review_title},S),o.default.createElement(p.InlineActionBar,{menus:x,context:[{thread:d,widget:y,menuId:m.MenuId.CommentsCommentThreadTitle}],separator:"inline",type:"icon"})),o.default.createElement("div",{className:c.default.comment_body},A.length>0?o.default.createElement(a.CommentItem,{widget:y,commentThreadContext:k,thread:d}):o.default.createElement("div",null,o.default.createElement(h.CommentsTextArea,{focusDelay:100,initialHeight:"auto",value:R,onChange:F,placeholder:L,dragFiles:B}),o.default.createElement("div",{className:c.default.comment_bottom_actions},o.default.createElement(p.InlineActionBar,{className:c.default.comment_reply_actions,separator:"inline",type:"button",context:[{text:R,widget:y,thread:d,menuId:m.MenuId.CommentsCommentThreadContext}],menus:k})))))};let f=class extends s.ResizeZoneWidget{_fillContainer(){}constructor(y,b,A){super(y.monacoEditor,b.range,{...A,showInHiddenAreas:!0}),this.thread=b,this._onShow=new v.Emitter,this.onShow=this._onShow.event,this._onHide=new v.Emitter,this.onHide=this._onHide.event,this._editor=y,this._isShow=!b.isCollapsed.get();const S=document.createElement("div");this._container.appendChild(S),this.observeContainer(S);const D=this.commentsFeatureRegistry.getZoneWidgetRender();this.wrapperRoot=l.default.createRoot(S),this.wrapperRoot.render(o.default.createElement(v.ConfigProvider,{value:this.appConfig},D?D(this.thread,this):o.default.createElement(E,{thread:this.thread,widget:this})));const I=y.monacoEditor.onDidChangeModel(()=>{b.hide()});this.addDispose({dispose:()=>{var w;(w=this.wrapperRoot)===null||w===void 0||w.unmount(),this.wrapperRoot=void 0,I.dispose()}})}get coreEditor(){return this._editor}get isShow(){return this._isShow}show(){super.show(),this._isShow=!0,this._onShow.fire()}hide(){super.hide(),this._isShow=!1,this._onHide.fire()}toggle(){this._isShow?this.hide():this.show()}applyClass(){}applyStyle(){}};t.CommentsZoneWidget=f,n.__decorate([(0,_.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],f.prototype,"appConfig",void 0),n.__decorate([(0,_.Autowired)(g.ICommentsFeatureRegistry),n.__metadata("design:type",Object)],f.prototype,"commentsFeatureRegistry",void 0),t.CommentsZoneWidget=f=n.__decorate([(0,_.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object,Object])],f)},62604:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsBrowserContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),_=e(57517),v=e(63067),p=e(69635),m=e(47842);let s=class extends o.Disposable{onStart(){this.registerCommentsFeature(),this.listenToCreateCommentsPanel(),this.commentsService.init()}get panelBadge(){const a=this.commentsService.commentsThreads.length;return a?a+"":""}registerCommands(a){a.registerCommand({id:p.CollapseId,label:"%comments.panel.action.collapse%",iconClass:(0,o.getIcon)("collapse-all")},{execute:()=>{this.commentModelService.collapsedAll()}}),a.registerCommand({id:p.CloseThreadId,label:"%comments.thread.action.close%",iconClass:(0,o.getIcon)("up")},{execute:h=>{const{thread:u,widget:c}=h;u.comments.get().length?c.isShow&&c.toggle():u.dispose()}}),a.registerCommand({id:p.SwitchCommandReaction},{execute:h=>{this.eventBus.fire(new p.CommentReactionClick(h))}})}registerMenus(a){a.registerMenuItem(l.MenuId.CommentsCommentThreadTitle,{command:p.CloseThreadId,group:"inline",order:Number.MAX_SAFE_INTEGER})}registerToolbarItems(a){a.registerItem({id:p.CollapseId,viewId:p.CommentPanelId,command:p.CollapseId,tooltip:(0,o.localize)("comments.panel.action.collapse")})}registerCommentsFeature(){this.contributions.getContributions().forEach((a,h)=>{this.addDispose(this.commentsService.registerCommentRangeProvider(`contribution_${h}`,{getCommentingRanges:u=>a.provideCommentingRanges(u)})),a.registerCommentsFeature&&a.registerCommentsFeature(this.commentsFeatureRegistry)})}listenToCreateCommentsPanel(){this.commentsFeatureRegistry.getCommentsPanelOptions().defaultShow?this.commentsService.registerCommentPanel():o.Event.once(this.commentsService.onThreadsCreated)(()=>{this.commentsService.registerCommentPanel()}),this.addDispose(o.Event.debounce(this.commentsService.onThreadsChanged,()=>{},100)(()=>{const a=this.layoutService.getTabbarHandler(p.CommentPanelId);a?.setBadge(this.panelBadge)},this))}registerEditorFeature(a){a.registerEditorFeatureContribution({contribute:h=>this.commentsService.handleOnCreateEditor(h),provideEditorOptionsForUri:async h=>(await this.commentsService.getContributionRanges(h)).length?{lineDecorationsWidth:25,lineNumbersMinChars:5}:{}})}};t.CommentsBrowserContribution=s,n.__decorate([(0,r.Autowired)(p.ICommentsService),n.__metadata("design:type",Object)],s.prototype,"commentsService",void 0),n.__decorate([(0,r.Autowired)(v.IMainLayoutService),n.__metadata("design:type",Object)],s.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(p.ICommentsFeatureRegistry),n.__metadata("design:type",Object)],s.prototype,"commentsFeatureRegistry",void 0),n.__decorate([(0,r.Autowired)(p.CommentsContribution),n.__metadata("design:type",Object)],s.prototype,"contributions",void 0),n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],s.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(m.CommentModelService),n.__metadata("design:type",m.CommentModelService)],s.prototype,"commentModelService",void 0),t.CommentsBrowserContribution=s=n.__decorate([(0,o.Domain)(o.ClientAppContribution,_.BrowserEditorContribution,o.CommandContribution,o.TabBarToolbarContribution,l.MenuContribution)],s)},55011:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsService=void 0;const n=e(85608),r=n.__importDefault(e(53435)),o=n.__importDefault(e(87809)),l=e(76003),_=e(41869),v=e(54414),p=e(57517),m=e(63067),s=e(20868),g=n.__importStar(e(20868)),a=e(62663),h=e(52416),u=n.__importStar(e(24347)),c=e(69635),E=e(53878),f=e(49867),d=e(53711);let y=class extends _.Disposable{constructor(){super(...arguments),this.decorationChangeEmitter=new _.Emitter,this.threads=new Map,this.threadsChangeEmitter=new _.Emitter,this.threadsCommentChangeEmitter=new _.Emitter,this.commentRangeProviderChangeEmitter=new _.Emitter,this.onDidChangeCurrentCommentThreadEmitter=new _.Emitter,this.threadsCreatedEmitter=new _.Emitter,this.rangeProviderMap=new Map,this.rangeOwner=new Map,this.providerDecorationCache=new _.LRUCache(1e4),this.commentRangeDecorationMap=new Map,this.shouldShowCommentsSchemes=new Set(["file","git","diff"]),this.decorationProviderDisposer=_.Disposable.NULL,this.editorRenderAbortControllers=new Map,this.activeThreadDecorationIds=[],this.allEditors=[],this.editorDisposerMap=new Map,this.editorCommentingRangeSpaceReservedMap=new Map,this.editorLineDecorationsWidthMap=new Map}get commentsThreads(){return[...this.threads.values()]}get isMultiCommentsForSingleLine(){var A;return!!(!((A=this.commentsFeatureRegistry.getConfig())===null||A===void 0)&&A.isMultiCommentsForSingleLine)}get currentAuthorAvatar(){var A,S;return(S=(A=this.commentsFeatureRegistry.getConfig())===null||A===void 0?void 0:A.author)===null||S===void 0?void 0:S.avatar}get filterThreadDecoration(){var A;return(A=this.commentsFeatureRegistry.getConfig())===null||A===void 0?void 0:A.filterThreadDecoration}get onThreadsChanged(){return this.threadsChangeEmitter.event}get onThreadsCommentChange(){return this.threadsCommentChangeEmitter.event}get onThreadsCreated(){return this.threadsCreatedEmitter.event}get onCommentRangeProviderChange(){return this.commentRangeProviderChangeEmitter.event}get onDidChangeCurrentCommentThread(){return this.onDidChangeCurrentCommentThreadEmitter.event}setCurrentCommentThread(A){this.onDidChangeCurrentCommentThreadEmitter.fire(A)}createThreadDecoration(A){var S;const D=A.comments.get(),I=D.length===0?this.currentAuthorAvatar:(S=D[0].author.iconPath)===null||S===void 0?void 0:S.toString(),w=I?`${this.iconService.fromIcon("",I,h.IconType.Background)} avatar-icon`:this.iconService.fromString("$(comment)"),T={description:"comments-thread-decoration",glyphMarginClassName:I?["comment-thread",w].join(" "):["comment-range","comment-thread",w].join(" ")};return u.ModelDecorationOptions.createDynamic(T)}updateActiveThreadDecoration(A){var S;const D=this.getCurrentEditor(A?.uri);if(!D)return;(S=this.currentThreadCollapseStateListener)===null||S===void 0||S.dispose();const I=[];if(A){const w=A.range;A.isCollapsed.get()||(this.currentThreadCollapseStateListener=A.onDidChangeCollapsibleState(T=>{T===c.CommentThreadCollapsibleState.Collapsed&&this.updateActiveThreadDecoration(void 0)}),I.push({range:w,options:this.createThreadRangeActiveDecoration()}))}this.activeThreadDecorationIds=D.monacoEditor.deltaDecorations(this.activeThreadDecorationIds,I)}createDottedRangeDecoration(){const A={description:"comments-multiline-hover-decoration",linesDecorationsClassName:["comment-range","multiline-add"].join(" ")};return u.ModelDecorationOptions.createDynamic(A)}createHoverDecoration(){const A={description:"comments-hover-decoration",linesDecorationsClassName:["comment-range","line-hover","comment-add"].join(" ")};return u.ModelDecorationOptions.createDynamic(A)}createThreadRangeActiveDecoration(){const A={description:"comments-thread-range-active-decoration",isWholeLine:!1,zIndex:20,className:"comment-thread-range-current",shouldFillLineOnLineBreak:!0};return u.ModelDecorationOptions.createDynamic(A)}createThreadRangeDecoration(){const A={description:"comments-thread-range-decoration",isWholeLine:!1,zIndex:20,className:"comment-thread-range",shouldFillLineOnLineBreak:!0};return u.ModelDecorationOptions.createDynamic(A)}createCommentRangeDecoration(){const A={description:"comments-range-decoration",linesDecorationsClassName:["comment-range","comment-diff-added"].join(" ")};return u.ModelDecorationOptions.createDynamic(A)}init(){const A=this.resourceService.getSupportedSchemes();for(const S of A)this.shouldShowCommentsSchemes.add(S);this.addDispose(this.resourceService.onRegisterResourceProvider(S=>{S.scheme&&(this.shouldShowCommentsSchemes.add(S.scheme),this.registerDecorationProvider())})),this.addDispose(this.resourceService.onUnregisterResourceProvider(S=>{S.scheme&&(this.shouldShowCommentsSchemes.delete(S.scheme),this.registerDecorationProvider())})),this.registerDecorationProvider()}getCurrentEditor(A){var S;if(A){for(const D of this.allEditors)if(!((S=D.currentUri)===null||S===void 0)&&S.isEqual(A))return this.editor=D,D}return this.editor}handleOnCreateEditor(A){const S=new _.Disposable;if(this.allEditors.some(w=>w.monacoEditor.getId()===A.monacoEditor.getId()))return this.editorDisposerMap.get(A.monacoEditor.getId())||S;this.editorDisposerMap.set(A.monacoEditor.getId(),S),this.allEditors.push(A),S.addDispose(_.Disposable.create(()=>{const w=this.editorRenderAbortControllers.get(A.getId());w&&(w.abort(),this.editorRenderAbortControllers.delete(A.getId()))})),this.editor=A;let D=[],I=!1;return S.addDispose(A.monacoEditor.onMouseDown(w=>{if(w.target.type===a.monacoBrowser.editor.MouseTargetType.GUTTER_LINE_DECORATIONS&&w.target.element&&w.target.element.className.indexOf("comment-add")>-1){const{target:T}=w;if(T&&T.range){const{range:R}=T;this.startCommentRange=R,w.event.stopPropagation()}}else if(w.target.type===a.monacoBrowser.editor.MouseTargetType.GUTTER_GLYPH_MARGIN&&w.target.element&&w.target.element.className.indexOf("comment-thread")>-1){const{target:T}=w;if(T&&T.range){const{range:R}=T,M=this.commentsThreads.filter(O=>A.currentUri&&O.uri.isEqual(A.currentUri)&&O.range.endLineNumber===R.endLineNumber);M.length&&(M.some(x=>x.isShowWidget(A))?M.forEach(x=>x.hide(A)):M.forEach(x=>x.show(A)))}w.event.stopPropagation()}})),S.addDispose(A.monacoEditor.onMouseUp(async w=>{if(this.startCommentRange){if(I){this.renderCommentRange(A),I=!1,this.startCommentRange=null,this.endCommentRange=null;return}let T=this.startCommentRange;this.endCommentRange&&(this.endCommentRange.startLineNumber<this.startCommentRange.startLineNumber?(T.startColumn=this.endCommentRange.startColumn,T.startLineNumber=this.endCommentRange.startLineNumber):(T.endColumn=this.endCommentRange.endColumn,T.endLineNumber=this.endCommentRange.endLineNumber)),A.currentUri&&(T=await this.getValidRange(T,A.currentUri)),T&&(this.commentsThreads.some(R=>R.comments.get().length===0&&A.currentUri&&R.uri.isEqual(A.currentUri)&&R.range.startLineNumber===T.startLineNumber&&R.range.endLineNumber===T.endLineNumber)||this.createThread(A.currentUri,T).show(A),w.event.stopPropagation())}else if(w.target.type===a.monacoBrowser.editor.MouseTargetType.GUTTER_LINE_DECORATIONS&&w.target.element&&w.target.element.className.indexOf("comment-range")>-1&&w.target.element.className.indexOf("comment-thread")<0){const{target:T}=w,R=T.range;R&&(this.commentsThreads.some(M=>M.comments.get().length===0&&A.currentUri&&M.uri.isEqual(A.currentUri)&&M.range.startLineNumber===R.startLineNumber&&M.range.endLineNumber===R.endLineNumber)||this.createThread(A.currentUri,R).show(A),w.event.stopPropagation())}this.startCommentRange=null,this.endCommentRange=null})),S.addDispose(A.monacoEditor.onMouseMove(async w=>{var T,R,M;const O=A.currentUri,x=w.target.range;if(this.startCommentRange){if(!((T=w.target.element)===null||T===void 0)&&T.className||!((M=(R=w.target.element)===null||R===void 0?void 0:R.offsetParent)===null||M===void 0)&&M.className.includes("diff-hidden-lines")&&(I=!0),O&&x){let k={startLineNumber:this.startCommentRange.startLineNumber,endLineNumber:x.endLineNumber,startColumn:this.startCommentRange.startColumn,endColumn:x.endColumn};this.startCommentRange.startLineNumber>x.startLineNumber&&(k={startLineNumber:x.startLineNumber,endLineNumber:this.startCommentRange.endLineNumber,startColumn:x.startColumn,endColumn:this.startCommentRange.endColumn}),this.renderCommentRange(A,k),this.endCommentRange=x}}else if(O&&x&&await this.shouldShowHoverDecoration(O,x)){const k=[{range:(0,s.positionToRange)(x.startLineNumber),options:this.createHoverDecoration()}];D=A.monacoEditor.deltaDecorations(D,k)}})),S.addDispose(A.monacoEditor.onMouseLeave(async w=>{var T;const R=(T=w.target)===null||T===void 0?void 0:T.range,M=[];!this.startCommentRange&&R&&M.push({range:(0,s.positionToRange)(R.startLineNumber),options:this.createCommentRangeDecoration()}),D=A.monacoEditor.deltaDecorations(D,M)})),S.addDispose(this.onCommentRangeProviderChange(()=>{this.renderCommentRange(A)})),S.addDispose(_.Event.any(this.onThreadsChanged,this.onThreadsCommentChange,this.onThreadsCreated)(w=>{const T=this.getCurrentEditor(w.uri);T&&this.renderCommentRange(T),this.updateActiveThreadDecoration(void 0)})),S.addDispose(this.onDidChangeCurrentCommentThread(w=>{this.updateActiveThreadDecoration(w)})),this.tryUpdateReservedSpace(A),S.addDispose(A.monacoEditor.onDidChangeModel(w=>{var T;const{newModelUrl:R}=w;R&&this.editorCollectionService.listMultiDiffEditors()[0]&&((T=A.updateDocumentModel)===null||T===void 0||T.call(A,_.URI.from(R))),this.renderCommentRange(A).then(()=>{this.tryUpdateReservedSpace(A)})})),S}async getValidRange(A,S){if(!S)return A;const D=await this.getContributionRanges(S);if(D.length===0)return A;const I=D.find(w=>{if(A.startLineNumber>=w.startLineNumber&&A.startLineNumber<=w.endLineNumber)return!0});return I&&I.endLineNumber<A.endLineNumber?{startLineNumber:A.startLineNumber,startColumn:A.startColumn,endLineNumber:I.endLineNumber,endColumn:I.endColumn}:A}ensureCommentingRangeReservedAmount(A){const S=this.getExistingCommentEditorOptions(A),D=this.editorLineDecorationsWidthMap.get(A.getId());S.lineDecorationsWidth!==D&&A.updateOptions({lineDecorationsWidth:this.getWithCommentsLineDecorationWidth(A,S.lineDecorationsWidth)})}tryUpdateReservedSpace(A){if(!A)return;let S=this.editorCommentingRangeSpaceReservedMap.get(A.getId())||!1;const D=A.currentUri?this.shouldShowCommentsSchemes.has(A.currentUri.scheme):!1,I=this.commentsThreads.some(T=>A.currentUri&&T.uri.isEqual(A.currentUri)&&T.comments.get().length>0),w=D||I;if(w)if(S)this.ensureCommentingRangeReservedAmount(A);else{S=!0;const{lineDecorationsWidth:T,extraEditorClassName:R}=this.getExistingCommentEditorOptions(A),M=this.getWithCommentsEditorOptions(A,R,T);this.updateEditorLayoutOptions(A,M.extraEditorClassName,M.lineDecorationsWidth)}else if(!w&&S){S=!1;const{lineDecorationsWidth:T,extraEditorClassName:R}=this.getExistingCommentEditorOptions(A),M=this.getWithoutCommentsEditorOptions(A,R,T);this.updateEditorLayoutOptions(A,M.extraEditorClassName,M.lineDecorationsWidth)}this.editorCommentingRangeSpaceReservedMap.set(A.getId(),S)}getExistingCommentEditorOptions(A){const S=A.monacoEditor.getOption(g.EditorOption.lineDecorationsWidth);let D=[];const I=A.monacoEditor.getRawOptions().extraEditorClassName;return I&&(D=I.split(" ")),{lineDecorationsWidth:S,extraEditorClassName:D}}getWithoutCommentsEditorOptions(A,S,D){let I=D;const w=S.findIndex(R=>R==="inline-comment");w>=0&&S.splice(w,1);const T=A.monacoEditor.getOptions();return T.get(g.EditorOption.folding)&&T.get(g.EditorOption.showFoldingControls)!=="never"&&(I+=11),I-=24,{extraEditorClassName:S,lineDecorationsWidth:I}}updateEditorLayoutOptions(A,S,D){A.updateOptions({extraEditorClassName:S.join(" "),lineDecorationsWidth:D})}getWithCommentsEditorOptions(A,S,D){return S.push("inline-comment"),{lineDecorationsWidth:this.getWithCommentsLineDecorationWidth(A,D),extraEditorClassName:S}}getWithCommentsLineDecorationWidth(A,S){let D=S;const I=A.monacoEditor.getOptions();return I.get(g.EditorOption.folding)&&I.get(g.EditorOption.showFoldingControls)!=="never"&&(D-=11),D+=24,this.editorLineDecorationsWidthMap.set(A.getId(),D),D}async renderCommentRange(A,S={startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:0}){if(!A.currentUri)return;const D=this.editorRenderAbortControllers.get(A.getId());D&&D.abort();const I=new AbortController;this.editorRenderAbortControllers.set(A.getId(),I);try{const w=await this.getContributionRanges(A.currentUri);if(I.signal.aborted)return;if(w.length>0){const T=[];if(w.map(M=>{if(!I.signal.aborted){if(S.startLineNumber===0&&S.endLineNumber===0)T.push({range:M,options:this.createCommentRangeDecoration()});else if(S.startLineNumber<=M.startLineNumber&&S.endLineNumber>=M.endLineNumber)T.push({range:M,options:this.createDottedRangeDecoration()},{range:M,options:this.createThreadRangeDecoration()});else if(S.endLineNumber>=M.endLineNumber)if(S.startLineNumber<=M.endLineNumber){const O={startLineNumber:S.startLineNumber,endLineNumber:M.endLineNumber,startColumn:S.startColumn,endColumn:S.endColumn},x={startLineNumber:M.startLineNumber,endLineNumber:O.startLineNumber-1,startColumn:M.startColumn,endColumn:O.endColumn};T.push({range:x,options:this.createCommentRangeDecoration()},{range:O,options:this.createDottedRangeDecoration()},{range:O,options:this.createThreadRangeDecoration()})}else T.push({range:M,options:this.createCommentRangeDecoration()});else if(S.endLineNumber<M.endLineNumber)if(S.endLineNumber>=M.startLineNumber)if(S.startLineNumber>=M.startLineNumber){const O={startLineNumber:M.startLineNumber,startColumn:M.startColumn,endLineNumber:S.startLineNumber-1,endColumn:S.startColumn},x={startLineNumber:S.endLineNumber+1,startColumn:S.endColumn,endLineNumber:M.endLineNumber,endColumn:M.endColumn},k=S.startLineNumber!==M.startLineNumber?[{range:O,options:this.createCommentRangeDecoration()}]:[];k.push({range:S,options:this.createDottedRangeDecoration()}),k.push({range:S,options:this.createThreadRangeDecoration()}),k.push({range:x,options:this.createCommentRangeDecoration()}),T.push(...k)}else{const O={startLineNumber:M.startLineNumber,startColumn:M.startColumn,endLineNumber:S.endLineNumber,endColumn:S.endColumn},x={startLineNumber:O.endLineNumber+1,startColumn:O.endColumn,endLineNumber:M.endLineNumber,endColumn:M.endColumn};T.push({range:O,options:this.createDottedRangeDecoration()},{range:O,options:this.createThreadRangeDecoration()},{range:x,options:this.createCommentRangeDecoration()})}else T.push({range:M,options:this.createCommentRangeDecoration()})}}),I.signal.aborted)return;const R=this.commentRangeDecorationMap.get(A.currentUri.toString())||[];this.commentRangeDecorationMap.set(A.currentUri.toString(),A.monacoEditor.deltaDecorations(R,T))}else this.commentRangeDecorationMap.set(A.currentUri.toString(),[])}finally{this.editorRenderAbortControllers.get(A.getId())===I&&this.editorRenderAbortControllers.delete(A.getId())}}async shouldShowHoverDecoration(A,S){return this.shouldShowCommentsSchemes.has(A.scheme)?(await this.getContributionRanges(A)).some(w=>S.startLineNumber<=w.endLineNumber):!1}createThread(A,S,D={comments:[],readOnly:!1}){const I=this.getProviderIdsByLine(S.endLineNumber)[0],w=this.injector.get(f.CommentsThread,[A,S,I,D]);return w.onDispose(()=>{this.threads.delete(w.id),this.threadsChangeEmitter.fire(w),this.decorationChangeEmitter.fire(A)}),w.onDidChange(()=>{this.threadsChangeEmitter.fire(w)}),this.threads.set(w.id,w),this.addDispose(w),this.threadsChangeEmitter.fire(w),this.threadsCreatedEmitter.fire(w),this.decorationChangeEmitter.fire(A),w}getThreadsByUri(A){return this.commentsThreads.filter(S=>S.uri.isEqual(A)).sort((S,D)=>S.range.startLineNumber-D.range.startLineNumber)}handleCommentFileNode(A){const S=[],D=[...this.threads.values()].filter(w=>w.comments.get().length),I=(0,o.default)(D,w=>w.uri);return Object.keys(I).map(w=>{var T;const R=I[w];if(R.length===0)return;const M=new _.URI(this.appConfig.workspaceDir),O=new _.URI(w),x=(T=M.relative(O))===null||T===void 0?void 0:T.toString();S.push(new d.CommentFileNode(this,R,x,O.codeUri.fsPath,this.labelService.getIcon(O),O,A))}),S}handleCommentContentNode(A){var S;const D=[];for(const I of A.threads){const w=I.comments.get(),[T]=w,R=typeof T.body=="string"?T.body:T.body.value;let M=`[Ln ${I.range.startLineNumber}]`;I.range.startLineNumber!==I.range.endLineNumber&&(M=`[Ln ${I.range.startLineNumber}-${I.range.endLineNumber}]`),D.push(new d.CommentContentNode(this,I,R,M,T.author.iconPath&&(!((S=T.author.iconPath)===null||S===void 0)&&S.authority)?this.iconService.fromIcon("",T.author.iconPath.toString(),h.IconType.Background):(0,_.getIcon)("message"),T.author,A.resource,A))}return D}handleCommentReplyNode(A){const S=[],D=A.thread,I=D.comments.get(),[w,...T]=I,R=T[T.length-1].author.name;return S.push(new d.CommentReplyNode(this,D,(0,_.formatLocalize)("comment.reply.count",T?.length||0),(0,_.formatLocalize)("comment.reply.lastReply",R),"",A.resource,A)),S}async resolveChildren(A){let S=[];if(A?d.CommentRoot.isRoot(A)?S=this.handleCommentFileNode(A):d.CommentFileNode.is(A)?S=this.handleCommentContentNode(A):d.CommentContentNode.is(A)&&(S=this.handleCommentReplyNode(A)):S.push(new d.CommentRoot(this)),S.length===1&&d.CommentRoot.isRoot(S[0]))return S;const D=this.commentsFeatureRegistry.getCommentsPanelTreeNodeHandlers();if(D.length>0)for(const I of D)S=I(S);return S}async getContributionRanges(A){const S=this.providerDecorationCache.get(A.toString());if(S)return await S.promise;const D=this.documentService.getModelReference(A,"Get Comment Range"),I=[];for(const M of this.rangeProviderMap){const[O,x]=M;I.push((async()=>{if(!D?.instance)return;const k=await x.getCommentingRanges(D.instance);return k&&k.length&&this.rangeOwner.set(O,k),k})())}const w=new _.Deferred;this.providerDecorationCache.set(A.toString(),w);const T=(await Promise.all(I)).filter(Boolean);D?.dispose();const R=(0,r.default)(T).filter(Boolean);return w.resolve(R),R}fireThreadCommentChange(A){this.threadsCommentChangeEmitter.fire(A)}registerDecorationProvider(){this.decorationProviderDisposer.dispose(),this.decorationProviderDisposer=this.editorDecorationCollectionService.registerDecorationProvider({schemes:[...this.shouldShowCommentsSchemes.values()],key:"comments",onDidDecorationChange:this.decorationChangeEmitter.event,provideEditorDecoration:A=>this.commentsThreads.map(S=>{if(S.uri.isEqual(A)){const D=this.editorCollectionService.getEditorByUri(S.uri);D?S.show(D):S.hide()}else S.hide();return S}).filter(S=>{const D=S.uri.isEqual(A);return this.filterThreadDecoration?D&&this.filterThreadDecoration(S):D}).map(S=>({range:{startLineNumber:S.range.endLineNumber,endLineNumber:S.range.endLineNumber,startColumn:S.range.endColumn,endColumn:S.range.endColumn},options:this.createThreadDecoration(S)}))}),this.addDispose(this.decorationProviderDisposer)}registerCommentPanel(){this.layoutService.getTabbarHandler(c.CommentPanelId)||this.layoutService.collectTabbarComponent([{id:c.CommentPanelId,component:E.CommentsPanel}],{badge:this.panelBadge,containerId:c.CommentPanelId,title:(0,_.localize)("comments").toUpperCase(),hidden:!1,activateKeyBinding:"ctrlcmd+shift+c",...this.commentsFeatureRegistry.getCommentsPanelOptions()},"bottom")}get panelBadge(){const A=this.commentsThreads.length;return A?A+"":""}registerCommentRangeProvider(A,S){return this.rangeProviderMap.set(A,S),this.providerDecorationCache.clear(),this.commentRangeProviderChangeEmitter.fire(),_.Disposable.create(()=>{this.rangeProviderMap.delete(A),this.rangeOwner.delete(A),this.providerDecorationCache.clear()})}forceUpdateDecoration(){var A,S,D;const I=(A=this.workbenchEditorService.currentEditor)===null||A===void 0?void 0:A.currentUri;I&&this.decorationChangeEmitter.fire(I);const w=(D=(S=this.workbenchEditorService.currentEditorGroup)===null||S===void 0?void 0:S.diffEditor)===null||D===void 0?void 0:D.originalEditor.currentUri;w&&this.decorationChangeEmitter.fire(w)}getProviderIdsByLine(A){const S=[];if(this.rangeOwner.size===1)return[this.rangeOwner.keys().next().value];for(const D of this.rangeOwner){const[I,w]=D;w&&w.some(T=>T.startLineNumber<=A&&A<=T.endLineNumber)&&S.push(I)}return S}};t.CommentsService=y,n.__decorate([(0,l.Autowired)(l.INJECTOR_TOKEN),n.__metadata("design:type",l.Injector)],y.prototype,"injector",void 0),n.__decorate([(0,l.Autowired)(_.AppConfig),n.__metadata("design:type",Object)],y.prototype,"appConfig",void 0),n.__decorate([(0,l.Autowired)(p.IEditorDecorationCollectionService),n.__metadata("design:type",Object)],y.prototype,"editorDecorationCollectionService",void 0),n.__decorate([(0,l.Autowired)(h.IIconService),n.__metadata("design:type",Object)],y.prototype,"iconService",void 0),n.__decorate([(0,l.Autowired)(_.LabelService),n.__metadata("design:type",_.LabelService)],y.prototype,"labelService",void 0),n.__decorate([(0,l.Autowired)(c.ICommentsFeatureRegistry),n.__metadata("design:type",Object)],y.prototype,"commentsFeatureRegistry",void 0),n.__decorate([(0,l.Autowired)(p.IEditorDocumentModelService),n.__metadata("design:type",Object)],y.prototype,"documentService",void 0),n.__decorate([(0,l.Autowired)(m.IMainLayoutService),n.__metadata("design:type",Object)],y.prototype,"layoutService",void 0),n.__decorate([(0,l.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],y.prototype,"workbenchEditorService",void 0),n.__decorate([(0,l.Autowired)(v.EditorCollectionService),n.__metadata("design:type",v.EditorCollectionService)],y.prototype,"editorCollectionService",void 0),n.__decorate([(0,l.Autowired)(p.ResourceService),n.__metadata("design:type",p.ResourceService)],y.prototype,"resourceService",void 0),n.__decorate([_.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],y.prototype,"isMultiCommentsForSingleLine",null),n.__decorate([_.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],y.prototype,"currentAuthorAvatar",null),n.__decorate([_.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],y.prototype,"filterThreadDecoration",null),t.CommentsService=y=n.__decorate([(0,l.Injectable)()],y)},54230:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(69635),_=e(66480),v=e(62604),p=e(55011),m=e(47842);let s=class extends o.BrowserModule{constructor(){super(...arguments),this.contributionProvider=l.CommentsContribution,this.providers=[{token:l.ICommentsService,useClass:p.CommentsService},{token:m.CommentModelService,useClass:m.CommentModelService},{token:l.ICommentsFeatureRegistry,useClass:_.CommentsFeatureRegistry},v.CommentsBrowserContribution]}};t.CommentsModule=s,t.CommentsModule=s=n.__decorate([(0,r.Injectable)()],s)},70154:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.markdownCss=void 0,t.markdownCss=`
33226
+ `)};t.extractCodeBlocks=p;const m=a=>a.replace(/[^a-zA-Z0-9_-]/g,"").slice(0,64);t.toClaudeToolName=m,t.TOOL_NAME_SEPARATOR="__";const s=(a,h)=>h===n.BUILTIN_MCP_SERVER_NAME?a:(0,t.toClaudeToolName)(`mcp${t.TOOL_NAME_SEPARATOR}${h}${t.TOOL_NAME_SEPARATOR}${a}`);t.getToolName=s;const g=a=>{const h=/`<attached_file>(.*)`/g,u=/`<attached_folder>(.*)`/g;return a=a.replace(h,"$1"),a=a.replace(u,"$1"),a};t.cleanAttachedTextWrapper=g},26471:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(19413),t)},15504:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentReactions=t.CommentReactionSwitcher=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),l=e(81878),_=e(25918),v=e(93899),p=e(52416),m=e(69635),s=n.__importDefault(e(38877)),g=({thread:h,comment:u,className:c})=>{const E=`${h.providerId}_${h.id}_${u.id}`,f=`${v.MenuId.CommentReactionSwitcherMenu}_${E}`,d=(0,o.useInjectable)(v.IMenuRegistry),y=(0,o.useInjectable)(v.AbstractMenuService);r.default.useEffect(()=>{const A=new o.Disposable,S=`${v.MenuId.CommentReactionSwitcherSubmenu}_${E}`;return A.addDispose(d.registerMenuItem(f,{submenu:S,label:S,iconClass:(0,o.getExternalIcon)("reactions"),group:"navigation"})),A.addDispose(d.registerMenuItems(S,u.reactions.map(D=>({command:{id:m.SwitchCommandReaction,label:D.label},extraTailArgs:[{thread:h,comment:u,reaction:D}]})))),()=>A.dispose()},[]);const b=r.default.useMemo(()=>y.createMenu(f),[]);return r.default.createElement(_.InlineActionBar,{className:c,menus:b,regroup:A=>[A,[]],type:"icon"})};t.CommentReactionSwitcher=g;const a=({thread:h,comment:u})=>{var c;const E=(0,o.useInjectable)(o.IEventBus),f=(0,o.useInjectable)(p.IIconService),d=r.default.useCallback(y=>{E.fire(new m.CommentReactionClick({thread:h,comment:u,reaction:y}))},[]);return r.default.createElement("div",{className:s.default.comment_reactions},(c=u.reactions)===null||c===void 0?void 0:c.filter(y=>y.count!==0).map(y=>r.default.createElement(l.Button,{key:y.label,onClick:()=>d(y),type:"secondary",size:"small",title:y.label,className:s.default.comment_reaction,iconClass:f.fromIcon("",y.iconPath.toString(),p.IconType.Background)},"\xA0",y.count)))};t.CommentReactions=a},54143:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsBody=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(43144)),l=e(84605),_=n.__importDefault(e(38877)),v=e(70154),p=({root:m,children:s})=>o.default.createPortal(s,m);t.CommentsBody=r.default.memo(({body:m})=>{const s=r.default.useRef(null),[g,a]=r.default.useState(null),h=r.default.useMemo(()=>{const u=(0,l.createMarkedRenderer)();return u.link=({href:c,title:E,text:f})=>`<a target="_blank" rel="noopener" href="${c}" title="${E||""}">${f}</a>`,u},[]);return r.default.useEffect(()=>{if(s.current){const u=s.current.attachShadow({mode:"open"});g||a(u)}},[]),r.default.createElement("div",{ref:s,className:_.default.comment_shadow_box},g&&r.default.createElement(p,{root:g},r.default.createElement("style",null,v.markdownCss),r.default.createElement("div",{dangerouslySetInnerHTML:{__html:(0,l.toMarkdownHtml)(typeof m=="string"?m:m.value,{gfm:!0,breaks:!1,pedantic:!1,renderer:h})}})))})},66480:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsFeatureRegistry=void 0;const n=e(85608),r=e(76003);let o=class{constructor(){this.config={},this.options={},this.panelTreeNodeHandlers=[],this.mentionsOptions={},this.providerFeature=new Map}registerConfig(_){this.config={...this.config,..._}}registerPanelTreeNodeHandler(_){this.panelTreeNodeHandlers.push(_)}registerPanelOptions(_){this.options={...this.options,..._}}registerFileUploadHandler(_){this.fileUploadHandler=_}registerMentionsOptions(_){this.mentionsOptions=_}registerZoneWidgetRender(_){this.zoneWidgetRender=_}getConfig(){return this.config}getCommentsPanelOptions(){return this.options}getCommentsPanelTreeNodeHandlers(){return this.panelTreeNodeHandlers}getFileUploadHandler(){return this.fileUploadHandler}getMentionsOptions(){return this.mentionsOptions}getZoneWidgetRender(){return this.zoneWidgetRender}registerProviderFeature(_,v){this.providerFeature.set(_,v)}getProviderFeature(_){return this.providerFeature.get(_)}};t.CommentsFeatureRegistry=o,t.CommentsFeatureRegistry=o=n.__decorate([(0,r.Injectable)()],o)},37357:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentItem=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(97267),l=e(41869),_=e(25918),v=e(93899),p=e(69635),m=e(15504),s=e(54143),g=e(42018),a=n.__importDefault(e(38877)),h=({timestamp:f})=>{const d=r.default.useMemo(()=>{const y=new Date(f);return(0,l.toLocalString)(y)},[f]);return r.default.createElement("span",{className:a.default.comment_item_timestamp},d)},u=(f,d)=>{const y=(0,l.useInjectable)(v.AbstractMenuService),{body:b,contextValue:A}=d,[S,D]=r.default.useState(""),I=(0,l.useInjectable)(p.ICommentsFeatureRegistry),w=r.default.useMemo(()=>I.getFileUploadHandler(),[]);r.default.useEffect(()=>{D(b)},[b]);const T=r.default.useMemo(()=>f.createScoped(),[]),R=r.default.useMemo(()=>T.createKey("commentIsEmpty",!d.body),[]),M=r.default.useMemo(()=>y.createMenu(v.MenuId.CommentsCommentContext,T),[]),O=r.default.useMemo(()=>y.createMenu(v.MenuId.CommentsCommentTitle,T),[]),x=r.default.useRef(T.createKey("comment",A));r.default.useEffect(()=>{x.current.set(A)},[A]);const k=r.default.useCallback(L=>{R.set(!L.target.value),D(L.target.value)},[]),F=r.default.useCallback(async L=>{if(w){const B=await w(S,L);D(U=>{const W=U+B;return R.set(!W),W})}},[S]);return[S,D,k,M,O,F]},c=({reply:f,thread:d})=>{var y;const{contextKeyService:b}=d,{author:A,label:S,body:D,mode:I,timestamp:w}=f,T=(y=A.iconPath)===null||y===void 0?void 0:y.toString(),[R,M,O,x,k,F]=u(b,f),L=r.default.useMemo(()=>{const B=(0,l.toMarkdownHtml)(typeof D=="string"?D:D.value);return/^\<p\>[^<>]+\<\/p\>\n$/.test(B)},[D]);return r.default.createElement("div",{className:a.default.reply_item},(0,l.isUndefined)(I)||I===p.CommentMode.Preview?r.default.createElement("div",null,L?r.default.createElement(r.default.Fragment,null,T&&r.default.createElement("img",{className:a.default.reply_item_icon,src:T,alt:A.name}),r.default.createElement("span",{className:a.default.comment_item_author_name},A.name),w&&r.default.createElement(h,{timestamp:w}),typeof S=="string"?r.default.createElement("span",{className:a.default.comment_item_label},S):S," : ",r.default.createElement("span",{className:a.default.comment_item_body},typeof D=="string"?D:D.value),f.reactions&&f.reactions.length>0&&r.default.createElement(m.CommentReactionSwitcher,{className:a.default.reply_item_title,thread:d,comment:f}),r.default.createElement(_.InlineActionBar,{separator:"inline",className:a.default.reply_item_title,menus:k,context:[{thread:d,comment:f,menuId:v.MenuId.CommentsCommentTitle}],type:"icon"})):r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:a.default.comment_item_markdown_header},r.default.createElement("div",null,T&&r.default.createElement("img",{className:a.default.reply_item_icon,src:T,alt:A.name}),r.default.createElement("span",{className:a.default.comment_item_author_name},A.name),w&&r.default.createElement(h,{timestamp:w}),typeof S=="string"?r.default.createElement("span",{className:a.default.comment_item_label},S):S," : "),r.default.createElement(_.InlineActionBar,{separator:"inline",className:a.default.reply_item_title,menus:k,context:[{thread:d,comment:f,menuId:v.MenuId.CommentsCommentTitle}],type:"icon"})),r.default.createElement(s.CommentsBody,{body:D}))):r.default.createElement("div",null,r.default.createElement(g.CommentsTextArea,{value:typeof R=="string"?R:R.value,autoFocus:!0,onChange:O,dragFiles:F}),r.default.createElement(_.InlineActionBar,{className:a.default.comment_item_reply,menus:x,context:[{thread:d,comment:f,body:R,menuId:v.MenuId.CommentsCommentContext}],type:"button",separator:"inline",afterClick:()=>{M(D)}})),f.reactions&&f.reactions.length>0&&r.default.createElement(m.CommentReactions,{thread:d,comment:f}))},E=({thread:f,commentThreadContext:d,widget:y})=>{var b,A;const[S,D]=r.default.useState(!1),[I,w]=r.default.useState(""),{contextKeyService:T}=f,R=(0,l.useAutorun)(f.readOnly),[M,...O]=(0,l.useAutorun)(f.comments),{author:x,label:k,body:F,mode:L,timestamp:B}=M,U=(0,l.isString)(x.iconPath)?x.iconPath:!((b=x.iconPath)===null||b===void 0)&&b.authority?(A=x.iconPath)===null||A===void 0?void 0:A.toString():"",[W,j,Q,G,Z,$]=u(T,M),V=(0,l.useInjectable)(p.ICommentsFeatureRegistry),H=r.default.useMemo(()=>V.getFileUploadHandler(),[]),K=r.default.useMemo(()=>T.createKey("commentIsEmpty",!0),[]);function Y(re){K.set(!re.target.value),w(re.target.value)}const X=r.default.useCallback(async re=>{if(H){const oe=await H(W,re);w(he=>{const me=he+oe;return K.set(!me),me})}},[I]);return r.default.createElement("div",{className:a.default.comment_item},U&&r.default.createElement("img",{className:a.default.comment_item_icon,src:U,alt:x.name}),r.default.createElement("div",{className:a.default.comment_item_content},r.default.createElement("div",{className:a.default.comment_item_head},r.default.createElement("div",{className:a.default.comment_item_name},r.default.createElement("span",{className:a.default.comment_item_author_name},x.name),B&&r.default.createElement(h,{timestamp:B}),typeof k=="string"?r.default.createElement("span",{className:a.default.comment_item_label},k):k),r.default.createElement("div",{className:a.default.comment_item_actions},M.reactions&&M.reactions.length>0&&r.default.createElement(m.CommentReactionSwitcher,{thread:f,comment:M}),!R&&r.default.createElement(o.Button,{className:a.default.comment_item_reply_button,size:"small",type:"secondary",onClick:()=>D(!0)},(0,l.localize)("comments.thread.action.reply")),r.default.createElement(_.InlineActionBar,{menus:Z,context:[{thread:f,comment:M,menuId:v.MenuId.CommentsCommentTitle}],type:"button"}))),(0,l.isUndefined)(L)||L===p.CommentMode.Preview?r.default.createElement(s.CommentsBody,{body:F}):r.default.createElement("div",null,r.default.createElement(g.CommentsTextArea,{value:typeof W=="string"?W:W.value,autoFocus:!0,onChange:Q,dragFiles:$}),r.default.createElement(_.InlineActionBar,{className:a.default.comment_item_context,menus:G,context:[{thread:f,comment:M,body:W,menuId:v.MenuId.CommentsCommentContext}],separator:"inline",type:"button",afterClick:()=>{j(F)}})),M.reactions&&M.reactions.length>0&&r.default.createElement(m.CommentReactions,{thread:f,comment:M}),(O.length>0||S)&&r.default.createElement("div",{className:a.default.comment_item_reply_wrap},O.map(re=>r.default.createElement(c,{key:re.id,thread:f,reply:re})),S&&r.default.createElement("div",null,r.default.createElement(g.CommentsTextArea,{autoFocus:!0,value:I,onChange:Y,placeholder:`${(0,l.localize)("comments.reply.placeholder")}...`,dragFiles:X}),r.default.createElement(_.InlineActionBar,{className:a.default.comment_item_reply,menus:d,context:[{thread:f,text:I,widget:y,menuId:v.MenuId.CommentsCommentThreadContext}],separator:"inline",type:"button",afterClick:()=>{w(""),D(!1)}})))))};t.CommentItem=E},53878:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsPanel=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),l=e(41869),_=e(69635),v=n.__importDefault(e(38877)),p=e(5167),m=e(47842),s=({viewState:g})=>{const a=(0,l.useInjectable)(m.CommentModelService),[h,u]=(0,r.useState)(),c=(0,r.useRef)(null),E=(0,l.useInjectable)(_.ICommentsFeatureRegistry),{handleTreeBlur:f}=a;(0,r.useEffect)(()=>{u(a.treeModel);const I=a.onDidUpdateTreeModel(w=>{u(w)});return()=>{I.dispose()}},[]);const d=(0,r.useCallback)(I=>{a.handleTreeHandler(I)},[a]),y=(0,r.useCallback)(I=>r.default.createElement(p.CommentNodeRendered,{item:I.item,itemType:I.itemType,decorations:a.decorations.getDecorations(I.item),defaultLeftPadding:8,onTwistierClick:a.handleTwistierClick,onClick:a.handleItemClick,leftPadding:8}),[h]),b=(0,r.useMemo)(()=>E.getCommentsPanelOptions(),[]),A=(0,r.useMemo)(()=>b.header,[b]),S=(0,r.useMemo)(()=>r.default.createElement("div",{className:v.default.panel_placeholder},b.defaultPlaceholder||(0,l.localize)("comments.panel.placeholder")),[b]),D=(0,r.useCallback)(()=>h?r.default.createElement(o.RecycleTree,{height:g.height-(A?.height||0),itemHeight:p.COMMENT_TREE_NODE_HEIGHT,onReady:d,model:h,placeholder:()=>S},y):S,[h,A,g.height]);return r.default.createElement("div",{className:v.default.comment_panel,tabIndex:-1,onBlur:f,ref:c},A?.component,D())};t.CommentsPanel=s},42018:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsTextArea=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(34801),l=e(97267),_=e(41869),v=e(69635),p=e(54143),m=n.__importDefault(e(38877)),s=e(73136),g="@",a="@[__display__](__id__)",h=(u,c)=>`@${c}`;t.CommentsTextArea=r.default.forwardRef((u,c)=>{const{focusDelay:E=0,autoFocus:f=!1,placeholder:d="",onFocus:y,onBlur:b,onChange:A,maxRows:S=10,minRows:D=2,value:I,initialHeight:w,dragFiles:T}=u,[R,M]=r.default.useState(0),O=(0,_.useInjectable)(v.ICommentsFeatureRegistry),x=r.default.useRef(null),k=r.default.useRef(null),F=r.default.useRef(null);r.default.useImperativeHandle(c,()=>x.current);const L=r.default.useCallback(async Z=>{var $;Z.stopPropagation(),Z.preventDefault();const V=($=Z.clipboardData)===null||$===void 0?void 0:$.files;V&&T&&await T(V),x.current&&(x.current.focus(),W(x.current.value))},[T]),B=r.default.useCallback(async Z=>{var $;Z.stopPropagation(),Z.preventDefault();const V=($=Z.dataTransfer)===null||$===void 0?void 0:$.files;V&&T&&await T(V),x.current&&(x.current.focus(),W(x.current.value))},[T]),U=r.default.useCallback(Z=>{Z.stopPropagation(),Z.preventDefault(),Z.dataTransfer.dropEffect="copy"},[]),W=r.default.useCallback(Z=>{const $=x.current;if($){const V=Z.toString().length;$.setSelectionRange(V,V)}},[]);r.default.useEffect(()=>{var Z;const $=x.current;if(!$)return;w&&$.style&&($.style.height=w),E&&setTimeout(()=>{$.focus({preventScroll:!0})},E),W(I);function V(H){var K,Y,X;const re=H.target;re&&(re.nodeName.toUpperCase()==="TEXTAREA"&&re.scrollHeight>re.clientHeight||re.nodeName.toUpperCase()==="UL"||((K=re.parentElement)===null||K===void 0?void 0:K.nodeName.toUpperCase())==="UL"||((X=(Y=re.parentElement)===null||Y===void 0?void 0:Y.parentElement)===null||X===void 0?void 0:X.nodeName.toUpperCase())==="UL")&&H.stopPropagation()}return(Z=k.current)===null||Z===void 0||Z.addEventListener("mousewheel",V,!0),()=>{var H;(H=k.current)===null||H===void 0||H.removeEventListener("mousewheel",V,!0)}},[]),r.default.useEffect(()=>{R===0&&(setTimeout(()=>{var Z;(Z=x.current)===null||Z===void 0||Z.focus({preventScroll:!0})},E),W(I))},[R]);const j=r.default.useMemo(()=>(0,s.getMentionBoxStyle)({minRows:D,maxRows:S}),[D,S]),Q=r.default.useMemo(()=>O.getMentionsOptions(),[O]),G=r.default.useCallback(async(Z,$)=>{if(Q.providerData){const V=await Q.providerData(Z);$(V)}else $([])},[Q]);return r.default.createElement("div",{className:m.default.textarea_container},r.default.createElement(l.Tabs,{mini:!0,value:R,onChange:Z=>M(Z),tabs:[(0,_.localize)("comments.thread.textarea.write"),(0,_.localize)("comments.thread.textarea.preview")]}),r.default.createElement("div",null,R===0?r.default.createElement("div",{ref:k},r.default.createElement(o.MentionsInput,{autoFocus:f,onPaste:L,inputRef:x,onDragOver:U,onDrop:B,ref:F,value:I,placeholder:d,onChange:A,onFocus:y,onBlur:b,style:j},r.default.createElement(o.Mention,{markup:Q.markup||a,renderSuggestion:Q.renderSuggestion,trigger:g,data:G,displayTransform:Q.displayTransform||h}))):r.default.createElement("div",{className:m.default.textarea_preview},r.default.createElement(p.CommentsBody,{body:I}))))})},49867:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsThread=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(91830),_=e(54414),v=e(28423),p=e(69635),m=e(90366);let s=class extends o.Disposable{set contextValue(a){this._contextKeyService.createKey("thread",a)}get contextValue(){return this._contextKeyService.getContextKeyValue("thread")}get onDidChangeCollapsibleState(){return this.onDidChangeCollapsibleStateEmitter.event}get onDidChange(){return this.onDidChangeEmitter.event}constructor(a,h,u,c){super(),this.uri=a,this.range=h,this.providerId=u,this.options=c,this.comments=(0,v.observableValue)(this,[]),this.label=(0,v.observableValue)(this,void 0),this.readOnly=(0,v.observableValue)(this,!1),this.isCollapsed=(0,v.observableValue)(this,!1),this.onDidChangeCollapsibleStateEmitter=new o.Emitter,this.widgets=new Map,this._id=`thread_${(0,o.uuid)()}`,this.onDidChangeEmitter=new o.Emitter,this.pendingShowTimeouts=new Set,this.threadHeaderTitle=(0,v.derived)(this,S=>{const D=this.label.read(S);if(D)return D;const I=this.comments.read(S);if(I.length){const w=new Set(I.map(T=>`@${T.author.name}`));return`${(0,o.localize)("comments.participants")}: `+[...w].join(" ")}else return(0,o.localize)("comments.zone.title")}),this.toggle=S=>{if(this.comments.get().length>0){const I=this.widgets.get(S);I&&I.toggle()}else this.dispose()},this.updateComments(c.comments?c.comments.map(S=>({...S,id:(0,o.uuid)()})):[]),this.data=this.options.data,this._contextKeyService=this.registerDispose(this.globalContextKeyService.createScoped()),new l.ResourceContextKey(this._contextKeyService).set(a),this._contextKeyService.createKey("thread",c.contextValue),(0,v.transaction)(S=>{this.setReadOnly(!!c.readOnly),this.label.set(c.label,S),this.isCollapsed.set(!!this.options.isCollapsed,S)});const f=this._contextKeyService.createKey("threadsLength",this.commentsService.getThreadsByUri(a).length),d=this.comments.get(),y=this._contextKeyService.createKey("commentsLength",d.length),b=this._contextKeyService.createKey("commentThreadIsEmpty",!d.length);this._contextKeyService.createKey("commentController",u),this.addDispose((0,v.autorun)(S=>{const D=this.comments.read(S).length;y.set(D),b.set(!D)})),this.getEditorsByUri(this.uri).forEach(S=>{this.widgets.get(S)||this.addWidgetByEditor(S)}),this.addDispose((0,v.autorun)(S=>{this.isCollapsed.read(S)?this.hideAll():this.showAll()})),this.addDispose(this.commentsService.onThreadsChanged(S=>{S.uri.isEqual(a)&&f.set(this.commentsService.getThreadsByUri(a).length)})),this.addDispose({dispose:()=>{this.updateComments([]),this.pendingShowTimeouts.forEach(S=>clearTimeout(S)),this.pendingShowTimeouts.clear()}}),this.onDidChangeEmitter.fire()}updateComments(a){(0,v.transaction)(h=>{this.comments.set(a,h)})}getWidgetByEditor(a){return this.widgets.get(a)}get id(){return this._id}get contextKeyService(){return this._contextKeyService}setReadOnly(a){(0,v.transaction)(h=>{this.readOnly.set(a,h),this._contextKeyService.createKey("readOnly",a)})}getEditorsByUri(a){return this.editorCollectionService.listEditors().filter(h=>{var u;return(u=h.currentUri)===null||u===void 0?void 0:u.isEqual(a)})}addWidgetByEditor(a){const h=this.injector.get(m.CommentsZoneWidget,[a,this,{arrowColor:"var(--peekView-border)"}]);return this.addDispose(h.onChangeZoneWidget(()=>{const u=this.commentsService.commentsThreads.filter(f=>this.isEqual(f)),c=u.findIndex(f=>f===this),E=u.slice(c+1);for(const f of E)if(f.isShowWidget(a)){const d=f.getWidgetByEditor(a);d?.resize()}})),this.addDispose(h),this.widgets.set(a,h),a.onDispose(()=>{h.dispose(),this.widgets.delete(a)}),h}show(a){if(a){let h=this.widgets.get(a);h||(h=this.addWidgetByEditor(a)),h.show()}else this.getEditorsByUri(this.uri).forEach(u=>{var c;let E=this.widgets.get(u);E||(E=this.addWidgetByEditor(u)),E&&(!((c=u.currentUri)===null||c===void 0)&&c.isEqual(this.uri))&&E.show()})}removePendingShowedWidgets(){this.pendingShowTimeouts.forEach(a=>clearTimeout(a)),this.pendingShowTimeouts.clear()}showWidgetsIfShowed(){var a;this.pendingShowTimeouts.forEach(h=>clearTimeout(h)),this.pendingShowTimeouts.clear();for(const h of this.getEditorsByUri(this.uri)){let u=this.widgets.get(h);if(u||(u=this.addWidgetByEditor(h)),!((a=h.currentUri)===null||a===void 0)&&a.isEqual(this.uri)){const c=setTimeout(()=>{var E;u&&(!((E=h.currentUri)===null||E===void 0)&&E.isEqual(this.uri))&&u.show(),this.pendingShowTimeouts.delete(c)},100);this.pendingShowTimeouts.add(c)}}}hideWidgetsByDispose(){var a;for(const[h,u]of this.widgets)!(!((a=h.currentUri)===null||a===void 0)&&a.isEqual(this.uri))&&u.dispose()}isShowWidget(a){if(a){const h=this.widgets.get(a);return h?h.isShow:!1}else{for(const[,h]of this.widgets)return h.isShow;return!1}}hide(a){if(a){const h=this.widgets.get(a);h?.hide()}else this.hideAll()}showAll(){(0,v.transaction)(a=>{this.isCollapsed.set(!1,a)});for(const[,a]of this.widgets)a.show();this.onDidChangeCollapsibleStateEmitter.fire(p.CommentThreadCollapsibleState.Expanded)}hideAll(a){var h;(0,v.transaction)(u=>{this.isCollapsed.set(!0,u)});for(const[u,c]of this.widgets)a?!(!((h=u.currentUri)===null||h===void 0)&&h.isEqual(this.uri))&&c.dispose():c.hide();this.onDidChangeCollapsibleStateEmitter.fire(p.CommentThreadCollapsibleState.Collapsed)}addComment(...a){const h=this.comments.get();(0,v.transaction)(u=>{this.comments.set([...h,...a.map(c=>({...c,id:(0,o.uuid)()}))],u)}),this.onDidChangeEmitter.fire()}removeComment(a){(0,v.transaction)(h=>{this.comments.set(this.comments.get().filter(u=>u!==a),h)}),this.onDidChangeEmitter.fire()}isEqual(a){return a.uri.isEqual(this.uri)&&a.range.startLineNumber===this.range.startLineNumber&&a.range.endLineNumber===this.range.endLineNumber}};t.CommentsThread=s,n.__decorate([(0,r.Autowired)(p.ICommentsService),n.__metadata("design:type",Object)],s.prototype,"commentsService",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],s.prototype,"globalContextKeyService",void 0),n.__decorate([(0,r.Autowired)(_.EditorCollectionService),n.__metadata("design:type",_.EditorCollectionService)],s.prototype,"editorCollectionService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],s.prototype,"injector",void 0),t.CommentsThread=s=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[o.URI,Object,String,Object])],s)},73804:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsZoneService=void 0;const n=e(85608),r=e(76003),o=e(93899),l=e(43718),_=e(69635),v=e(49867);let p=class extends l.Disposable{constructor(s){super(),this.thread=s}setCurrentCommentThread(s){this.commentService.setCurrentCommentThread(s)}get commentThreadTitle(){return this.registerDispose(this.menuService.createMenu(o.MenuId.CommentsCommentThreadTitle,this.thread.contextKeyService))}get commentThreadContext(){return this.registerDispose(this.menuService.createMenu(o.MenuId.CommentsCommentThreadContext,this.thread.contextKeyService))}};t.CommentsZoneService=p,n.__decorate([(0,r.Autowired)(o.AbstractMenuService),n.__metadata("design:type",o.AbstractMenuService)],p.prototype,"menuService",void 0),n.__decorate([(0,r.Autowired)(_.ICommentsService),n.__metadata("design:type",Object)],p.prototype,"commentService",void 0),n.__decorate([l.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],p.prototype,"commentThreadTitle",null),n.__decorate([l.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],p.prototype,"commentThreadContext",null),t.CommentsZoneService=p=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[v.CommentsThread])],p)},90366:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsZoneWidget=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=n.__importDefault(e(25873)),_=e(76003),v=e(41869),p=e(25918),m=e(93899),s=e(20303),g=e(69635),a=e(37357),h=e(42018),u=e(73804),c=n.__importDefault(e(38877)),E=({thread:d,widget:y})=>{const{contextKeyService:b}=d,A=(0,v.useAutorun)(d.comments),S=(0,v.useAutorun)(d.threadHeaderTitle),I=(0,v.useInjectable)(_.INJECTOR_TOKEN).get(u.CommentsZoneService,[d]),w=(0,v.useInjectable)(g.ICommentsFeatureRegistry),T=o.default.useMemo(()=>w.getFileUploadHandler(),[]),[R,M]=o.default.useState(""),O=o.default.useMemo(()=>b.createKey("commentIsEmpty",!R),[]),x=I.commentThreadTitle,k=I.commentThreadContext,F=o.default.useCallback(G=>{const{value:Z}=G.target;M(Z),O.set(!Z)},[]),L=o.default.useMemo(()=>{var G;return((G=w.getProviderFeature(d.providerId))===null||G===void 0?void 0:G.placeholder)||`${(0,v.localize)("comments.reply.placeholder")}...`},[]),B=o.default.useCallback(async G=>{if(T){const Z=await T(R,G);M($=>{const V=$+Z;return O.set(!V),V})}},[R]);o.default.useEffect(()=>{const G=y.onFirstDisplay(()=>{setTimeout(()=>{y.coreEditor.monacoEditor.revealLine(d.range.endLineNumber+1)},0)});return()=>{G.dispose()}},[]);const U=o.default.useCallback(()=>{I.setCurrentCommentThread(I.thread)},[]),W=o.default.useCallback(()=>{I.setCurrentCommentThread(void 0)},[]),j=o.default.useCallback(()=>{I.setCurrentCommentThread(I.thread)},[]),Q=o.default.useCallback(()=>{I.setCurrentCommentThread(void 0)},[]);return o.default.createElement("div",{tabIndex:-1,onMouseOver:U,onMouseOut:W,onFocus:j,onBlur:Q,className:(0,r.default)(d.options.threadClassName,c.default.comment_container)},o.default.createElement("div",{className:(0,r.default)(d.options.threadHeadClassName,c.default.head)},o.default.createElement("div",{className:c.default.review_title},S),o.default.createElement(p.InlineActionBar,{menus:x,context:[{thread:d,widget:y,menuId:m.MenuId.CommentsCommentThreadTitle}],separator:"inline",type:"icon"})),o.default.createElement("div",{className:c.default.comment_body},A.length>0?o.default.createElement(a.CommentItem,{widget:y,commentThreadContext:k,thread:d}):o.default.createElement("div",null,o.default.createElement(h.CommentsTextArea,{focusDelay:100,initialHeight:"auto",value:R,onChange:F,placeholder:L,dragFiles:B}),o.default.createElement("div",{className:c.default.comment_bottom_actions},o.default.createElement(p.InlineActionBar,{className:c.default.comment_reply_actions,separator:"inline",type:"button",context:[{text:R,widget:y,thread:d,menuId:m.MenuId.CommentsCommentThreadContext}],menus:k})))))};let f=class extends s.ResizeZoneWidget{_fillContainer(){}constructor(y,b,A){super(y.monacoEditor,b.range,{...A,showInHiddenAreas:!0}),this.thread=b,this._onShow=new v.Emitter,this.onShow=this._onShow.event,this._onHide=new v.Emitter,this.onHide=this._onHide.event,this._editor=y,this._isShow=!b.isCollapsed.get();const S=document.createElement("div");this._container.appendChild(S),this.observeContainer(S);const D=this.commentsFeatureRegistry.getZoneWidgetRender();this.wrapperRoot=l.default.createRoot(S),this.wrapperRoot.render(o.default.createElement(v.ConfigProvider,{value:this.appConfig},D?D(this.thread,this):o.default.createElement(E,{thread:this.thread,widget:this})));const I=y.monacoEditor.onDidChangeModel(()=>{b.hide()});this.addDispose({dispose:()=>{var w;(w=this.wrapperRoot)===null||w===void 0||w.unmount(),this.wrapperRoot=void 0,I.dispose()}})}get coreEditor(){return this._editor}get isShow(){return this._isShow}show(){super.show(),this._isShow=!0,this._onShow.fire()}hide(){super.hide(),this._isShow=!1,this._onHide.fire()}toggle(){this._isShow?this.hide():this.show()}applyClass(){}applyStyle(){}};t.CommentsZoneWidget=f,n.__decorate([(0,_.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],f.prototype,"appConfig",void 0),n.__decorate([(0,_.Autowired)(g.ICommentsFeatureRegistry),n.__metadata("design:type",Object)],f.prototype,"commentsFeatureRegistry",void 0),t.CommentsZoneWidget=f=n.__decorate([(0,_.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object,Object])],f)},62604:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsBrowserContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),_=e(57517),v=e(63067),p=e(69635),m=e(47842);let s=class extends o.Disposable{onStart(){this.registerCommentsFeature(),this.listenToCreateCommentsPanel(),this.commentsService.init()}get panelBadge(){const a=this.commentsService.commentsThreads.length;return a?a+"":""}registerCommands(a){a.registerCommand({id:p.CollapseId,label:"%comments.panel.action.collapse%",iconClass:(0,o.getIcon)("collapse-all")},{execute:()=>{this.commentModelService.collapsedAll()}}),a.registerCommand({id:p.CloseThreadId,label:"%comments.thread.action.close%",iconClass:(0,o.getIcon)("up")},{execute:h=>{const{thread:u,widget:c}=h;u.comments.get().length?c.isShow&&c.toggle():u.dispose()}}),a.registerCommand({id:p.SwitchCommandReaction},{execute:h=>{this.eventBus.fire(new p.CommentReactionClick(h))}})}registerMenus(a){a.registerMenuItem(l.MenuId.CommentsCommentThreadTitle,{command:p.CloseThreadId,group:"inline",order:Number.MAX_SAFE_INTEGER})}registerToolbarItems(a){a.registerItem({id:p.CollapseId,viewId:p.CommentPanelId,command:p.CollapseId,tooltip:(0,o.localize)("comments.panel.action.collapse")})}registerCommentsFeature(){this.contributions.getContributions().forEach((a,h)=>{this.addDispose(this.commentsService.registerCommentRangeProvider(`contribution_${h}`,{getCommentingRanges:u=>a.provideCommentingRanges(u)})),a.registerCommentsFeature&&a.registerCommentsFeature(this.commentsFeatureRegistry)})}listenToCreateCommentsPanel(){this.commentsFeatureRegistry.getCommentsPanelOptions().defaultShow?this.commentsService.registerCommentPanel():o.Event.once(this.commentsService.onThreadsCreated)(()=>{this.commentsService.registerCommentPanel()}),this.addDispose(o.Event.debounce(this.commentsService.onThreadsChanged,()=>{},100)(()=>{const a=this.layoutService.getTabbarHandler(p.CommentPanelId);a?.setBadge(this.panelBadge)},this))}registerEditorFeature(a){a.registerEditorFeatureContribution({contribute:h=>this.commentsService.handleOnCreateEditor(h),provideEditorOptionsForUri:async h=>(await this.commentsService.getContributionRanges(h)).length?{lineDecorationsWidth:25,lineNumbersMinChars:5}:{}})}};t.CommentsBrowserContribution=s,n.__decorate([(0,r.Autowired)(p.ICommentsService),n.__metadata("design:type",Object)],s.prototype,"commentsService",void 0),n.__decorate([(0,r.Autowired)(v.IMainLayoutService),n.__metadata("design:type",Object)],s.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(p.ICommentsFeatureRegistry),n.__metadata("design:type",Object)],s.prototype,"commentsFeatureRegistry",void 0),n.__decorate([(0,r.Autowired)(p.CommentsContribution),n.__metadata("design:type",Object)],s.prototype,"contributions",void 0),n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],s.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(m.CommentModelService),n.__metadata("design:type",m.CommentModelService)],s.prototype,"commentModelService",void 0),t.CommentsBrowserContribution=s=n.__decorate([(0,o.Domain)(o.ClientAppContribution,_.BrowserEditorContribution,o.CommandContribution,o.TabBarToolbarContribution,l.MenuContribution)],s)},55011:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsService=void 0;const n=e(85608),r=n.__importDefault(e(53435)),o=n.__importDefault(e(87809)),l=e(76003),_=e(41869),v=e(54414),p=e(57517),m=e(63067),s=e(20868),g=n.__importStar(e(20868)),a=e(62663),h=e(52416),u=n.__importStar(e(24347)),c=e(69635),E=e(53878),f=e(49867),d=e(53711);let y=class extends _.Disposable{constructor(){super(...arguments),this.decorationChangeEmitter=new _.Emitter,this.threads=new Map,this.threadsChangeEmitter=new _.Emitter,this.threadsCommentChangeEmitter=new _.Emitter,this.commentRangeProviderChangeEmitter=new _.Emitter,this.onDidChangeCurrentCommentThreadEmitter=new _.Emitter,this.threadsCreatedEmitter=new _.Emitter,this.rangeProviderMap=new Map,this.rangeOwner=new Map,this.providerDecorationCache=new _.LRUCache(1e4),this.commentRangeDecorationMap=new Map,this.shouldShowCommentsSchemes=new Set(["file","git","diff"]),this.decorationProviderDisposer=_.Disposable.NULL,this.editorRenderAbortControllers=new Map,this.activeThreadDecorationIds=[],this.allEditors=[],this.editorDisposerMap=new Map,this.editorCommentingRangeSpaceReservedMap=new Map,this.editorLineDecorationsWidthMap=new Map}get commentsThreads(){return[...this.threads.values()]}get isMultiCommentsForSingleLine(){var A;return!!(!((A=this.commentsFeatureRegistry.getConfig())===null||A===void 0)&&A.isMultiCommentsForSingleLine)}get currentAuthorAvatar(){var A,S;return(S=(A=this.commentsFeatureRegistry.getConfig())===null||A===void 0?void 0:A.author)===null||S===void 0?void 0:S.avatar}get filterThreadDecoration(){var A;return(A=this.commentsFeatureRegistry.getConfig())===null||A===void 0?void 0:A.filterThreadDecoration}get onThreadsChanged(){return this.threadsChangeEmitter.event}get onThreadsCommentChange(){return this.threadsCommentChangeEmitter.event}get onThreadsCreated(){return this.threadsCreatedEmitter.event}get onCommentRangeProviderChange(){return this.commentRangeProviderChangeEmitter.event}get onDidChangeCurrentCommentThread(){return this.onDidChangeCurrentCommentThreadEmitter.event}setCurrentCommentThread(A){this.onDidChangeCurrentCommentThreadEmitter.fire(A)}createThreadDecoration(A){var S;const D=A.comments.get(),I=D.length===0?this.currentAuthorAvatar:(S=D[0].author.iconPath)===null||S===void 0?void 0:S.toString(),w=I?`${this.iconService.fromIcon("",I,h.IconType.Background)} avatar-icon`:this.iconService.fromString("$(comment)"),T={description:"comments-thread-decoration",glyphMarginClassName:I?["comment-thread",w].join(" "):["comment-range","comment-thread",w].join(" ")};return u.ModelDecorationOptions.createDynamic(T)}updateActiveThreadDecoration(A){var S;const D=this.getCurrentEditor(A?.uri);if(!D)return;(S=this.currentThreadCollapseStateListener)===null||S===void 0||S.dispose();const I=[];if(A){const w=A.range;A.isCollapsed.get()||(this.currentThreadCollapseStateListener=A.onDidChangeCollapsibleState(T=>{T===c.CommentThreadCollapsibleState.Collapsed&&this.updateActiveThreadDecoration(void 0)}),I.push({range:w,options:this.createThreadRangeActiveDecoration()}))}this.activeThreadDecorationIds=D.monacoEditor.deltaDecorations(this.activeThreadDecorationIds,I)}createDottedRangeDecoration(){const A={description:"comments-multiline-hover-decoration",linesDecorationsClassName:["comment-range","multiline-add"].join(" ")};return u.ModelDecorationOptions.createDynamic(A)}createHoverDecoration(){const A={description:"comments-hover-decoration",linesDecorationsClassName:["comment-range","line-hover","comment-add"].join(" ")};return u.ModelDecorationOptions.createDynamic(A)}createThreadRangeActiveDecoration(){const A={description:"comments-thread-range-active-decoration",isWholeLine:!1,zIndex:20,className:"comment-thread-range-current",shouldFillLineOnLineBreak:!0};return u.ModelDecorationOptions.createDynamic(A)}createThreadRangeDecoration(){const A={description:"comments-thread-range-decoration",isWholeLine:!1,zIndex:20,className:"comment-thread-range",shouldFillLineOnLineBreak:!0};return u.ModelDecorationOptions.createDynamic(A)}createCommentRangeDecoration(){const A={description:"comments-range-decoration",linesDecorationsClassName:["comment-range","comment-diff-added"].join(" ")};return u.ModelDecorationOptions.createDynamic(A)}init(){const A=this.resourceService.getSupportedSchemes();for(const S of A)this.shouldShowCommentsSchemes.add(S);this.addDispose(this.resourceService.onRegisterResourceProvider(S=>{S.scheme&&(this.shouldShowCommentsSchemes.add(S.scheme),this.registerDecorationProvider())})),this.addDispose(this.resourceService.onUnregisterResourceProvider(S=>{S.scheme&&(this.shouldShowCommentsSchemes.delete(S.scheme),this.registerDecorationProvider())})),this.registerDecorationProvider()}getCurrentEditor(A){var S;if(A){for(const D of this.allEditors)if(!((S=D.currentUri)===null||S===void 0)&&S.isEqual(A))return this.editor=D,D}return this.editor}handleOnCreateEditor(A){const S=new _.Disposable;if(this.allEditors.some(w=>w.monacoEditor.getId()===A.monacoEditor.getId()))return this.editorDisposerMap.get(A.monacoEditor.getId())||S;this.editorDisposerMap.set(A.monacoEditor.getId(),S),this.allEditors.push(A),S.addDispose(_.Disposable.create(()=>{const w=this.editorRenderAbortControllers.get(A.getId());w&&(w.abort(),this.editorRenderAbortControllers.delete(A.getId()))})),this.editor=A;let D=[],I=!1;return S.addDispose(A.monacoEditor.onMouseDown(w=>{if(w.target.type===a.monacoBrowser.editor.MouseTargetType.GUTTER_LINE_DECORATIONS&&w.target.element&&w.target.element.className.indexOf("comment-add")>-1){const{target:T}=w;if(T&&T.range){const{range:R}=T;this.startCommentRange=R,w.event.stopPropagation()}}else if(w.target.type===a.monacoBrowser.editor.MouseTargetType.GUTTER_GLYPH_MARGIN&&w.target.element&&w.target.element.className.indexOf("comment-thread")>-1){const{target:T}=w;if(T&&T.range){const{range:R}=T,M=this.commentsThreads.filter(O=>A.currentUri&&O.uri.isEqual(A.currentUri)&&O.range.endLineNumber===R.endLineNumber);M.length&&(M.some(x=>x.isShowWidget(A))?M.forEach(x=>x.hide(A)):M.forEach(x=>x.show(A)))}w.event.stopPropagation()}})),S.addDispose(A.monacoEditor.onMouseUp(async w=>{if(this.startCommentRange){if(I){this.renderCommentRange(A),I=!1,this.startCommentRange=null,this.endCommentRange=null;return}let T=this.startCommentRange;this.endCommentRange&&(this.endCommentRange.startLineNumber<this.startCommentRange.startLineNumber?(T.startColumn=this.endCommentRange.startColumn,T.startLineNumber=this.endCommentRange.startLineNumber):(T.endColumn=this.endCommentRange.endColumn,T.endLineNumber=this.endCommentRange.endLineNumber)),A.currentUri&&(T=await this.getValidRange(T,A.currentUri)),T&&(this.commentsThreads.some(R=>R.comments.get().length===0&&A.currentUri&&R.uri.isEqual(A.currentUri)&&R.range.startLineNumber===T.startLineNumber&&R.range.endLineNumber===T.endLineNumber)||this.createThread(A.currentUri,T).show(A),w.event.stopPropagation())}else if(w.target.type===a.monacoBrowser.editor.MouseTargetType.GUTTER_LINE_DECORATIONS&&w.target.element&&w.target.element.className.indexOf("comment-range")>-1&&w.target.element.className.indexOf("comment-thread")<0){const{target:T}=w,R=T.range;R&&(this.commentsThreads.some(M=>M.comments.get().length===0&&A.currentUri&&M.uri.isEqual(A.currentUri)&&M.range.startLineNumber===R.startLineNumber&&M.range.endLineNumber===R.endLineNumber)||this.createThread(A.currentUri,R).show(A),w.event.stopPropagation())}this.startCommentRange=null,this.endCommentRange=null})),S.addDispose(A.monacoEditor.onMouseMove(async w=>{var T,R,M;const O=A.currentUri,x=w.target.range;if(this.startCommentRange){if(!((T=w.target.element)===null||T===void 0)&&T.className||!((M=(R=w.target.element)===null||R===void 0?void 0:R.offsetParent)===null||M===void 0)&&M.className.includes("diff-hidden-lines")&&(I=!0),O&&x){let k={startLineNumber:this.startCommentRange.startLineNumber,endLineNumber:x.endLineNumber,startColumn:this.startCommentRange.startColumn,endColumn:x.endColumn};this.startCommentRange.startLineNumber>x.startLineNumber&&(k={startLineNumber:x.startLineNumber,endLineNumber:this.startCommentRange.endLineNumber,startColumn:x.startColumn,endColumn:this.startCommentRange.endColumn}),this.renderCommentRange(A,k),this.endCommentRange=x}}else if(O&&x&&await this.shouldShowHoverDecoration(O,x)){const k=[{range:(0,s.positionToRange)(x.startLineNumber),options:this.createHoverDecoration()}];D=A.monacoEditor.deltaDecorations(D,k)}})),S.addDispose(A.monacoEditor.onMouseLeave(async w=>{var T;const R=(T=w.target)===null||T===void 0?void 0:T.range,M=[];!this.startCommentRange&&R&&M.push({range:(0,s.positionToRange)(R.startLineNumber),options:this.createCommentRangeDecoration()}),D=A.monacoEditor.deltaDecorations(D,M)})),S.addDispose(this.onCommentRangeProviderChange(()=>{this.renderCommentRange(A)})),S.addDispose(_.Event.any(this.onThreadsChanged,this.onThreadsCommentChange,this.onThreadsCreated)(w=>{const T=this.getCurrentEditor(w.uri);T&&this.renderCommentRange(T),this.updateActiveThreadDecoration(void 0)})),S.addDispose(this.onDidChangeCurrentCommentThread(w=>{this.updateActiveThreadDecoration(w)})),this.tryUpdateReservedSpace(A),S.addDispose(A.monacoEditor.onDidChangeModel(w=>{var T;const{newModelUrl:R}=w;R&&this.editorCollectionService.listMultiDiffEditors()[0]&&((T=A.updateDocumentModel)===null||T===void 0||T.call(A,_.URI.from(R))),this.renderCommentRange(A).then(()=>{this.tryUpdateReservedSpace(A)})})),S}async getValidRange(A,S){if(!S)return A;const D=await this.getContributionRanges(S);if(D.length===0)return A;const I=D.find(w=>{if(A.startLineNumber>=w.startLineNumber&&A.startLineNumber<=w.endLineNumber)return!0});return I&&I.endLineNumber<A.endLineNumber?{startLineNumber:A.startLineNumber,startColumn:A.startColumn,endLineNumber:I.endLineNumber,endColumn:I.endColumn}:A}ensureCommentingRangeReservedAmount(A){const S=this.getExistingCommentEditorOptions(A),D=this.editorLineDecorationsWidthMap.get(A.getId());S.lineDecorationsWidth!==D&&A.updateOptions({lineDecorationsWidth:this.getWithCommentsLineDecorationWidth(A,S.lineDecorationsWidth)})}tryUpdateReservedSpace(A){if(!A)return;let S=this.editorCommentingRangeSpaceReservedMap.get(A.getId())||!1;const D=A.currentUri?this.shouldShowCommentsSchemes.has(A.currentUri.scheme):!1,I=this.commentsThreads.some(T=>A.currentUri&&T.uri.isEqual(A.currentUri)&&T.comments.get().length>0),w=D||I;if(w)if(S)this.ensureCommentingRangeReservedAmount(A);else{S=!0;const{lineDecorationsWidth:T,extraEditorClassName:R}=this.getExistingCommentEditorOptions(A),M=this.getWithCommentsEditorOptions(A,R,T);this.updateEditorLayoutOptions(A,M.extraEditorClassName,M.lineDecorationsWidth)}else if(!w&&S){S=!1;const{lineDecorationsWidth:T,extraEditorClassName:R}=this.getExistingCommentEditorOptions(A),M=this.getWithoutCommentsEditorOptions(A,R,T);this.updateEditorLayoutOptions(A,M.extraEditorClassName,M.lineDecorationsWidth)}this.editorCommentingRangeSpaceReservedMap.set(A.getId(),S)}getExistingCommentEditorOptions(A){const S=A.monacoEditor.getOption(g.EditorOption.lineDecorationsWidth);let D=[];const I=A.monacoEditor.getRawOptions().extraEditorClassName;return I&&(D=I.split(" ")),{lineDecorationsWidth:S,extraEditorClassName:D}}getWithoutCommentsEditorOptions(A,S,D){let I=D;const w=S.findIndex(R=>R==="inline-comment");w>=0&&S.splice(w,1);const T=A.monacoEditor.getOptions();return T.get(g.EditorOption.folding)&&T.get(g.EditorOption.showFoldingControls)!=="never"&&(I+=11),I-=24,{extraEditorClassName:S,lineDecorationsWidth:I}}updateEditorLayoutOptions(A,S,D){A.updateOptions({extraEditorClassName:S.join(" "),lineDecorationsWidth:D})}getWithCommentsEditorOptions(A,S,D){return S.push("inline-comment"),{lineDecorationsWidth:this.getWithCommentsLineDecorationWidth(A,D),extraEditorClassName:S}}getWithCommentsLineDecorationWidth(A,S){let D=S;const I=A.monacoEditor.getOptions();return I.get(g.EditorOption.folding)&&I.get(g.EditorOption.showFoldingControls)!=="never"&&(D-=11),D+=24,this.editorLineDecorationsWidthMap.set(A.getId(),D),D}async renderCommentRange(A,S={startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:0}){if(!A.currentUri)return;const D=this.editorRenderAbortControllers.get(A.getId());D&&D.abort();const I=new AbortController;this.editorRenderAbortControllers.set(A.getId(),I);try{const w=await this.getContributionRanges(A.currentUri);if(I.signal.aborted)return;if(w.length>0){const T=[];if(w.map(M=>{if(!I.signal.aborted){if(S.startLineNumber===0&&S.endLineNumber===0)T.push({range:M,options:this.createCommentRangeDecoration()});else if(S.startLineNumber<=M.startLineNumber&&S.endLineNumber>=M.endLineNumber)T.push({range:M,options:this.createDottedRangeDecoration()},{range:M,options:this.createThreadRangeDecoration()});else if(S.endLineNumber>=M.endLineNumber)if(S.startLineNumber<=M.endLineNumber){const O={startLineNumber:S.startLineNumber,endLineNumber:M.endLineNumber,startColumn:S.startColumn,endColumn:S.endColumn},x={startLineNumber:M.startLineNumber,endLineNumber:O.startLineNumber-1,startColumn:M.startColumn,endColumn:O.endColumn};T.push({range:x,options:this.createCommentRangeDecoration()},{range:O,options:this.createDottedRangeDecoration()},{range:O,options:this.createThreadRangeDecoration()})}else T.push({range:M,options:this.createCommentRangeDecoration()});else if(S.endLineNumber<M.endLineNumber)if(S.endLineNumber>=M.startLineNumber)if(S.startLineNumber>=M.startLineNumber){const O={startLineNumber:M.startLineNumber,startColumn:M.startColumn,endLineNumber:S.startLineNumber-1,endColumn:S.startColumn},x={startLineNumber:S.endLineNumber+1,startColumn:S.endColumn,endLineNumber:M.endLineNumber,endColumn:M.endColumn},k=S.startLineNumber!==M.startLineNumber?[{range:O,options:this.createCommentRangeDecoration()}]:[];k.push({range:S,options:this.createDottedRangeDecoration()}),k.push({range:S,options:this.createThreadRangeDecoration()}),k.push({range:x,options:this.createCommentRangeDecoration()}),T.push(...k)}else{const O={startLineNumber:M.startLineNumber,startColumn:M.startColumn,endLineNumber:S.endLineNumber,endColumn:S.endColumn},x={startLineNumber:O.endLineNumber+1,startColumn:O.endColumn,endLineNumber:M.endLineNumber,endColumn:M.endColumn};T.push({range:O,options:this.createDottedRangeDecoration()},{range:O,options:this.createThreadRangeDecoration()},{range:x,options:this.createCommentRangeDecoration()})}else T.push({range:M,options:this.createCommentRangeDecoration()})}}),I.signal.aborted)return;const R=this.commentRangeDecorationMap.get(A.currentUri.toString())||[];this.commentRangeDecorationMap.set(A.currentUri.toString(),A.monacoEditor.deltaDecorations(R,T))}else this.commentRangeDecorationMap.set(A.currentUri.toString(),[])}finally{this.editorRenderAbortControllers.get(A.getId())===I&&this.editorRenderAbortControllers.delete(A.getId())}}async shouldShowHoverDecoration(A,S){return this.shouldShowCommentsSchemes.has(A.scheme)?(await this.getContributionRanges(A)).some(w=>S.startLineNumber<=w.endLineNumber):!1}createThread(A,S,D={comments:[],readOnly:!1}){const I=this.getProviderIdsByLine(S.endLineNumber)[0],w=this.injector.get(f.CommentsThread,[A,S,I,D]);return w.onDispose(()=>{this.threads.delete(w.id),this.threadsChangeEmitter.fire(w),this.decorationChangeEmitter.fire(A)}),w.onDidChange(()=>{this.threadsChangeEmitter.fire(w)}),this.threads.set(w.id,w),this.addDispose(w),this.threadsChangeEmitter.fire(w),this.threadsCreatedEmitter.fire(w),this.decorationChangeEmitter.fire(A),w}getThreadsByUri(A){return this.commentsThreads.filter(S=>S.uri.isEqual(A)).sort((S,D)=>S.range.startLineNumber-D.range.startLineNumber)}handleCommentFileNode(A){const S=[],D=[...this.threads.values()].filter(w=>w.comments.get().length),I=(0,o.default)(D,w=>w.uri);return Object.keys(I).map(w=>{var T;const R=I[w];if(R.length===0)return;const M=new _.URI(this.appConfig.workspaceDir),O=new _.URI(w),x=(T=M.relative(O))===null||T===void 0?void 0:T.toString();S.push(new d.CommentFileNode(this,R,x,O.codeUri.fsPath,this.labelService.getIcon(O),O,A))}),S}handleCommentContentNode(A){var S;const D=[];for(const I of A.threads){const w=I.comments.get(),[T]=w,R=typeof T.body=="string"?T.body:T.body.value;let M=`[Ln ${I.range.startLineNumber}]`;I.range.startLineNumber!==I.range.endLineNumber&&(M=`[Ln ${I.range.startLineNumber}-${I.range.endLineNumber}]`),D.push(new d.CommentContentNode(this,I,R,M,T.author.iconPath&&(!((S=T.author.iconPath)===null||S===void 0)&&S.authority)?this.iconService.fromIcon("",T.author.iconPath.toString(),h.IconType.Background):(0,_.getIcon)("message"),T.author,A.resource,A))}return D}handleCommentReplyNode(A){const S=[],D=A.thread,I=D.comments.get(),[w,...T]=I,R=T[T.length-1].author.name;return S.push(new d.CommentReplyNode(this,D,(0,_.formatLocalize)("comment.reply.count",T?.length||0),(0,_.formatLocalize)("comment.reply.lastReply",R),"",A.resource,A)),S}async resolveChildren(A){let S=[];if(A?d.CommentRoot.isRoot(A)?S=this.handleCommentFileNode(A):d.CommentFileNode.is(A)?S=this.handleCommentContentNode(A):d.CommentContentNode.is(A)&&(S=this.handleCommentReplyNode(A)):S.push(new d.CommentRoot(this)),S.length===1&&d.CommentRoot.isRoot(S[0]))return S;const D=this.commentsFeatureRegistry.getCommentsPanelTreeNodeHandlers();if(D.length>0)for(const I of D)S=I(S);return S}async getContributionRanges(A){const S=this.providerDecorationCache.get(A.toString());if(S)return await S.promise;const D=this.documentService.getModelReference(A,"Get Comment Range"),I=[];for(const M of this.rangeProviderMap){const[O,x]=M;I.push((async()=>{if(!D?.instance)return;const k=await x.getCommentingRanges(D.instance);return k&&k.length&&this.rangeOwner.set(O,k),k})())}const w=new _.Deferred;this.providerDecorationCache.set(A.toString(),w);const T=(await Promise.all(I)).filter(Boolean);D?.dispose();const R=(0,r.default)(T).filter(Boolean);return w.resolve(R),R}fireThreadCommentChange(A){this.threadsCommentChangeEmitter.fire(A)}registerDecorationProvider(){this.decorationProviderDisposer.dispose(),this.decorationProviderDisposer=this.editorDecorationCollectionService.registerDecorationProvider({schemes:[...this.shouldShowCommentsSchemes.values()],key:"comments",onDidDecorationChange:this.decorationChangeEmitter.event,provideEditorDecoration:A=>this.commentsThreads.map(S=>{if(S.uri.isEqual(A)){const D=this.editorCollectionService.getEditorByUri(S.uri);D?S.show(D):S.hide()}else S.hide();return S}).filter(S=>{const D=S.uri.isEqual(A);return this.filterThreadDecoration?D&&this.filterThreadDecoration(S):D}).map(S=>({range:{startLineNumber:S.range.endLineNumber,endLineNumber:S.range.endLineNumber,startColumn:S.range.endColumn,endColumn:S.range.endColumn},options:this.createThreadDecoration(S)}))}),this.addDispose(this.decorationProviderDisposer)}registerCommentPanel(){this.layoutService.getTabbarHandler(c.CommentPanelId)||this.layoutService.collectTabbarComponent([{id:c.CommentPanelId,component:E.CommentsPanel}],{badge:this.panelBadge,containerId:c.CommentPanelId,title:(0,_.localize)("comments").toUpperCase(),hidden:!1,activateKeyBinding:"ctrlcmd+shift+c",...this.commentsFeatureRegistry.getCommentsPanelOptions()},"bottom")}get panelBadge(){const A=this.commentsThreads.length;return A?A+"":""}registerCommentRangeProvider(A,S){return this.rangeProviderMap.set(A,S),this.providerDecorationCache.clear(),this.commentRangeProviderChangeEmitter.fire(),_.Disposable.create(()=>{this.rangeProviderMap.delete(A),this.rangeOwner.delete(A),this.providerDecorationCache.clear()})}forceUpdateDecoration(){var A,S,D;const I=(A=this.workbenchEditorService.currentEditor)===null||A===void 0?void 0:A.currentUri;I&&this.decorationChangeEmitter.fire(I);const w=(D=(S=this.workbenchEditorService.currentEditorGroup)===null||S===void 0?void 0:S.diffEditor)===null||D===void 0?void 0:D.originalEditor.currentUri;w&&this.decorationChangeEmitter.fire(w)}getProviderIdsByLine(A){const S=[];if(this.rangeOwner.size===1)return[this.rangeOwner.keys().next().value];for(const D of this.rangeOwner){const[I,w]=D;w&&w.some(T=>T.startLineNumber<=A&&A<=T.endLineNumber)&&S.push(I)}return S}};t.CommentsService=y,n.__decorate([(0,l.Autowired)(l.INJECTOR_TOKEN),n.__metadata("design:type",l.Injector)],y.prototype,"injector",void 0),n.__decorate([(0,l.Autowired)(_.AppConfig),n.__metadata("design:type",Object)],y.prototype,"appConfig",void 0),n.__decorate([(0,l.Autowired)(p.IEditorDecorationCollectionService),n.__metadata("design:type",Object)],y.prototype,"editorDecorationCollectionService",void 0),n.__decorate([(0,l.Autowired)(h.IIconService),n.__metadata("design:type",Object)],y.prototype,"iconService",void 0),n.__decorate([(0,l.Autowired)(_.LabelService),n.__metadata("design:type",_.LabelService)],y.prototype,"labelService",void 0),n.__decorate([(0,l.Autowired)(c.ICommentsFeatureRegistry),n.__metadata("design:type",Object)],y.prototype,"commentsFeatureRegistry",void 0),n.__decorate([(0,l.Autowired)(p.IEditorDocumentModelService),n.__metadata("design:type",Object)],y.prototype,"documentService",void 0),n.__decorate([(0,l.Autowired)(m.IMainLayoutService),n.__metadata("design:type",Object)],y.prototype,"layoutService",void 0),n.__decorate([(0,l.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],y.prototype,"workbenchEditorService",void 0),n.__decorate([(0,l.Autowired)(v.EditorCollectionService),n.__metadata("design:type",v.EditorCollectionService)],y.prototype,"editorCollectionService",void 0),n.__decorate([(0,l.Autowired)(p.ResourceService),n.__metadata("design:type",p.ResourceService)],y.prototype,"resourceService",void 0),n.__decorate([_.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],y.prototype,"isMultiCommentsForSingleLine",null),n.__decorate([_.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],y.prototype,"currentAuthorAvatar",null),n.__decorate([_.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],y.prototype,"filterThreadDecoration",null),t.CommentsService=y=n.__decorate([(0,l.Injectable)()],y)},54230:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(69635),_=e(66480),v=e(62604),p=e(55011),m=e(47842);let s=class extends o.BrowserModule{constructor(){super(...arguments),this.contributionProvider=l.CommentsContribution,this.providers=[{token:l.ICommentsService,useClass:p.CommentsService},{token:m.CommentModelService,useClass:m.CommentModelService},{token:l.ICommentsFeatureRegistry,useClass:_.CommentsFeatureRegistry},v.CommentsBrowserContribution]}};t.CommentsModule=s,t.CommentsModule=s=n.__decorate([(0,r.Injectable)()],s)},70154:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.markdownCss=void 0,t.markdownCss=`
33227
33227
  h1, h2, h3, h4, h5, h6, p {
33228
33228
  color: var(--foreground);
33229
33229
  word-break: break-all;
@@ -33293,7 +33293,7 @@ ${y}`)}return this.keybindingsChanged.fire({affectsCommands:[f.command]}),{dispo
33293
33293
  `:`
33294
33294
  `}async provideEditorDocumentModelContent(m,s){return(await this.read(m,{encoding:s})).content}async isReadonly(m){const s=this.editorPreferences["editor.readonlyFiles"];if(s&&s.length){for(const g of s)if(m.isEqual(o.URI.file(g))||m.matchGlobPattern(g)||m.toString().endsWith(g.replace("./","")))return!0}return this.fileServiceClient.isReadonly(m.toString())}async saveDocumentModel(m,s,g,a,h,u=!1){try{const c=await this.fileServiceClient.getFileStat(m.toString());return c?await this.fileServiceClient.setContent(c,s,{encoding:h}):await this.fileServiceClient.createFile(m.toString(),{content:s,overwrite:!0,encoding:h}),{state:o.SaveTaskResponseState.SUCCESS}}catch(c){return{state:o.SaveTaskResponseState.ERROR,errorMessage:c.message}}}onDidDisposeModel(m){this._fileContentMd5OnBrowserFs.delete(m.toString())}async guessEncoding(m){return(await this.read(m,{autoGuessEncoding:!0})).encoding}getReadEncoding(m,s,g){let a;return s?.encoding?g===o.UTF8_with_bom&&s.encoding===o.UTF8?a=o.UTF8_with_bom:a=s.encoding:g&&(a=g),this.getEncodingForResource(m,a)}async getEncodingForResource(m,s){return this.encodingRegistry.getEncodingForResource(m,s)}};t.BaseFileSystemEditorDocumentProvider=v,n.__decorate([(0,r.Autowired)(l.IFileServiceClient),n.__metadata("design:type",Object)],v.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(_.EditorPreferences),n.__metadata("design:type",Object)],v.prototype,"editorPreferences",void 0),n.__decorate([(0,r.Autowired)(o.IApplicationService),n.__metadata("design:type",Object)],v.prototype,"applicationService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],v.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.EncodingRegistry),n.__metadata("design:type",o.EncodingRegistry)],v.prototype,"encodingRegistry",void 0),t.BaseFileSystemEditorDocumentProvider=v=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],v)},10:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemResourceProvider=void 0;const r=e(85608),o=e(76003),l=e(41869),_=e(26542),v=e(43718),p=e(42933),m=e(72665),s=e(23418),g=e(96689),a=e(5580),{Path:h}=v.path;let u=n=class extends l.WithEventBus{constructor(){super(),this.cachedFileStat=new l.LRUMap(200,100),this.ready=this.init(),this.listen()}async init(){const f=await this.applicationService.getBackendOS();this.involvedFiles=new a.FileTreeSet(f===l.OperatingSystem.Windows)}handlesUri(f){const d=f.scheme;return this.fileServiceClient.handlesScheme(d)?10:-1}listen(){this.fileServiceClient.onFilesChanged(f=>{f.forEach(d=>{var y;d.type===v.FileChangeType.ADDED||d.type===v.FileChangeType.DELETED?((y=this.involvedFiles)===null||y===void 0?void 0:y.effects(new l.URI(d.uri).codeUri.fsPath)).forEach(A=>{const S=l.URI.file(A);this.cachedFileStat.delete(S.toString()),this.eventBus.fire(new s.ResourceNeedUpdateEvent(S))}):this.cachedFileStat.has(d.uri)&&this.cachedFileStat.get(d.uri)===void 0&&(this.cachedFileStat.delete(d.uri),this.eventBus.fire(new s.ResourceNeedUpdateEvent(new l.URI(d.uri))))})}),this.labelService.onDidChange(f=>{var d;f.codeUri.fsPath&&(!((d=this.involvedFiles)===null||d===void 0)&&d.effects(f.codeUri.fsPath))&&this.eventBus.fire(new s.ResourceNeedUpdateEvent(f))})}async getFileStat(f){return this.cachedFileStat.has(f)||this.cachedFileStat.set(f,await this.fileServiceClient.getFileStat(f.toString())),this.cachedFileStat.get(f)}async getCurrentUserHome(){if(!this.userhomePath)try{const f=await this.fileServiceClient.getCurrentUserHome();f&&(this.userhomePath=new l.URI(f.uri))}catch{}return this.userhomePath}async getReadableTooltip(f){const d=f.toString(),y=await this.getCurrentUserHome();if(!y)return decodeURIComponent(f.withScheme("").toString());if(y.isEqualOrParent(f)){const b=y&&y.toString();return decodeURIComponent(d.replace(b,"~"))}return decodeURIComponent(f.withScheme("").toString())}async provideResource(f){return await this.ready,this.involvedFiles.add(f.codeUri.fsPath),Promise.all([this.getFileStat(f.toString()),this.labelService.getName(f),this.labelService.getIcon(f),this.getReadableTooltip(f)]).then(([d,y,b,A])=>({name:d?y:y+(0,l.localize)("file.resource-deleted","(\u5DF2\u5220\u9664)"),icon:b,uri:f,metadata:null,deleted:!d,supportsRevive:!0,title:A}))}provideResourceSubname(f,d){const y=[];for(const b of d)this.fileServiceClient.handlesScheme(b.uri.scheme)&&b.uri.displayName===f.uri.displayName&&b!==f&&y.push(b.uri);if(y.length>0){const b=c(f.uri,y);return b.startsWith(h.separator)?b.length>n.SUBNAME_LIMIT?"..."+b.slice(b.length-n.SUBNAME_LIMIT):b:"..."+h.separator+c(f.uri,y)}else return null}onDisposeResource(f){var d;(d=this.involvedFiles)===null||d===void 0||d.delete(f.uri.codeUri.fsPath),this.cachedFileStat.delete(f.uri.toString())}async shouldCloseResourceWithoutConfirm(f){const d=this.documentModelService.getModelDescription(f.uri,"close-resource-check");return!!(d&&d.dirty)}async close(f,d){const y=this.documentModelService.getModelReference(f.uri,"close-resource-check");if(!y)return!1;if(d===s.AskSaveResult.SAVE){const b=await y.instance.save();return y.dispose(),b}else return d===s.AskSaveResult.REVERT?(await y.instance.revert(),y.dispose(),!0):!d||d===s.AskSaveResult.CANCEL?(y.dispose(),!1):(y.dispose(),!0)}async shouldCloseResource(f,d){let y=0;for(const I of d)for(const w of I)if(w.uri.scheme===s.DIFF_SCHEME&&w.metadata&&w.metadata.modified.toString()===f.uri.toString()&&y++,this.fileServiceClient.handlesScheme(w.uri.scheme)&&w.uri.toString()===f.uri.toString()&&y++,y>1)return!0;const b=this.documentModelService.getModelDescription(f.uri,"close-resource-check");if(!b||!b.dirty)return!0;const A={[(0,l.localize)("file.prompt.dontSave","Don't Save")]:s.AskSaveResult.REVERT,[(0,l.localize)("file.prompt.save","Save")]:s.AskSaveResult.SAVE,[(0,l.localize)("file.prompt.cancel","Cancel")]:s.AskSaveResult.CANCEL},S=await this.dialogService.open({message:(0,l.formatLocalize)("saveChangesMessage",f.name),type:l.MessageType.Info,buttons:Object.keys(A)}),D=A[S];return this.close(f,D)}};t.FileSystemResourceProvider=u,u.SUBNAME_LIMIT=20,r.__decorate([(0,o.Autowired)(),r.__metadata("design:type",_.LabelService)],u.prototype,"labelService",void 0),r.__decorate([(0,o.Autowired)(p.IFileServiceClient),r.__metadata("design:type",Object)],u.prototype,"fileServiceClient",void 0),r.__decorate([(0,o.Autowired)(m.IDialogService),r.__metadata("design:type",Object)],u.prototype,"dialogService",void 0),r.__decorate([(0,o.Autowired)(g.IEditorDocumentModelService),r.__metadata("design:type",Object)],u.prototype,"documentModelService",void 0),r.__decorate([(0,o.Autowired)(l.IApplicationService),r.__metadata("design:type",Object)],u.prototype,"applicationService",void 0),t.FileSystemResourceProvider=u=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],u);function c(E,f){const d=E.path.dir.toString().split(h.separator).reverse(),y=f.map(b=>b.path.dir.toString().split(h.separator).reverse());for(let b=0;b<d.length;b++){let A=!1;for(const S of y)if(S[b]===d[b]){A=!0;break}if(!A)return d.slice(0,b+1).reverse().join(h.separator)}return d.reverse().join(h.separator)}},69728:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemResourceContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(82196),_=e(68692),v=e(10);let p=class{registerResource(s){s.registerResourceProvider(this.fsResourceProvider)}registerEditorDocumentModelContentProvider(s){s.registerEditorDocumentModelContentProvider(this.fsDocProvider)}};t.FileSystemResourceContribution=p,n.__decorate([(0,r.Autowired)(v.FileSystemResourceProvider),n.__metadata("design:type",v.FileSystemResourceProvider)],p.prototype,"fsResourceProvider",void 0),n.__decorate([(0,r.Autowired)(_.BaseFileSystemEditorDocumentProvider),n.__metadata("design:type",_.BaseFileSystemEditorDocumentProvider)],p.prototype,"fsDocProvider",void 0),t.FileSystemResourceContribution=p=n.__decorate([(0,o.Domain)(l.BrowserEditorContribution)],p)},47049:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitDirection=t.EditorGrid=t.editorGridUid=void 0,t.splitDirectionMatches=p;const n=e(41869),r=e(43718),o=e(23418),l=e(82196);t.editorGridUid=new Set;class _{constructor(s){this.parent=s,this._disposables=new r.DisposableStore,this.editorGroup=null,this.children=[],this._onDidGridStateChange=this._disposables.add(new n.Emitter),this.onDidGridStateChange=this._onDidGridStateChange.event,this._onDidGridAndDesendantStateChange=this._disposables.add(new n.Emitter),this.onDidGridAndDesendantStateChange=this._onDidGridAndDesendantStateChange.event;let g=(0,r.makeRandomHexString)(5);for(;t.editorGridUid.has(g);)g=(0,r.makeRandomHexString)(5);this.uid=g,t.editorGridUid.add(g),this._disposables.add(this.onDidGridStateChange(()=>{var a;this._onDidGridAndDesendantStateChange.fire(),(a=this.parent)===null||a===void 0||a._onDidGridAndDesendantStateChange.fire()}))}setEditorGroup(s){this.editorGroup=s,s.grid=this,this.splitDirection=void 0}generateSplitParent(s,g,a){this.splitDirection=s;const h=new _(this);h.setEditorGroup(this.editorGroup),this.editorGroup=null;const u=new _(this);u.setEditorGroup(g),a?this.children=[u,h]:this.children=[h,u],this._onDidGridStateChange.fire()}generateSplitSibling(s,g){if(this.parent){const a=this.parent.children.indexOf(this),h=new _(this.parent);h.setEditorGroup(s),g?this.parent.children.splice(a,0,h):this.parent.children.splice(a+1,0,h),this.parent._onDidGridStateChange.fire()}}split(s,g,a){this.splitDirection||(this.parent?this.parent.splitDirection===s?this.generateSplitSibling(g,a):this.parent.splitDirection!==s&&this.generateSplitParent(s,g,a):this.generateSplitParent(s,g,a))}dispose(){if(this.editorGroup){if(this.editorGroup=null,!this.parent)return;const s=this.parent.children.indexOf(this);this.parent.children.splice(s,1),this.parent.children.length===1&&this.parent.replaceBy(this.parent.children[0]),this.parent._onDidGridStateChange.fire()}this._disposables.dispose()}replaceBy(s){s.editorGroup&&this.setEditorGroup(s.editorGroup),this.splitDirection=s.splitDirection,this.children.splice(0,this.children.length,...s.children.splice(0,s.children.length)),this.children.forEach(g=>{g.parent=this}),this.parent&&this.parent._onDidGridStateChange.fire()}emitResizeWithEventBus(s){s.fire(new l.GridResizeEvent({gridId:this.uid})),s.fireDirective(l.GridResizeEvent.createDirective(this.uid)),this.children.forEach(g=>{g.emitResizeWithEventBus(s)})}serialize(){if(this.editorGroup){const s=this.editorGroup.getState();return this.parent&&s.uris.length===0?null:{editorGroup:s}}else{if(this.parent&&this.children.length===0)return null;const s=this.children.map(g=>g.serialize()).filter(g=>!!g);return s.length===1?s[0]:{splitDirection:this.splitDirection,children:s}}}async deserialize(s,g,a){const h=[];return s.editorGroup?(this.setEditorGroup(g()),a.push(this.editorGroup.restoreState(s.editorGroup))):(this.splitDirection=s.splitDirection,this.children=(s.children||[]).map(u=>{const c=new _(this);return h.push(c.deserialize(u,g,a)),c})),Promise.all(h)}findGird(s,g=0){if(this.splitDirection&&p(this.splitDirection,s)){const a=g+(s===o.Direction.LEFT||s===o.Direction.UP?-1:1);if(this.children[a])return this.children[a].getFirstLeaf()}return this.parent?this.parent.findGird(s,this.parent.children.indexOf(this)):null}getFirstLeaf(){return this.editorGroup?this:this.children.length>0?this.children[0].getFirstLeaf():null}sortEditorGroups(s){this.editorGroup?s.push(this.editorGroup):this.children.length>0&&this.children.forEach(g=>{g.sortEditorGroups(s)})}move(s){if(this.parent){if(this.parent.splitDirection===v.Horizontal){if(s===o.Direction.LEFT){const g=this.parent.children.indexOf(this);g>0&&(this.parent.children.splice(g,1),this.parent.children.splice(g-1,0,this),this.parent._onDidGridStateChange.fire())}else if(s===o.Direction.RIGHT){const g=this.parent.children.indexOf(this);g<this.parent.children.length&&(this.parent.children.splice(g,1),this.parent.children.splice(g+1,0,this),this.parent._onDidGridStateChange.fire())}}else if(this.parent.splitDirection===v.Vertical){if(s===o.Direction.UP){const g=this.parent.children.indexOf(this);g>0&&(this.parent.children.splice(g,1),this.parent.children.splice(g-1,0,this),this.parent._onDidGridStateChange.fire())}else if(s===o.Direction.DOWN){const g=this.parent.children.indexOf(this);g<this.parent.children.length&&(this.parent.children.splice(g,1),this.parent.children.splice(g+1,0,this),this.parent._onDidGridStateChange.fire())}}}}}t.EditorGrid=_;var v;(function(m){m[m.Horizontal=1]="Horizontal",m[m.Vertical=2]="Vertical"})(v||(t.SplitDirection=v={}));function p(m,s){return s===o.Direction.UP||s===o.Direction.DOWN?m===v.Vertical:s===o.Direction.LEFT||s===o.Direction.RIGHT?m===v.Horizontal:!1}},95338:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EditorHistoryState=t.EditorHistoryService=void 0;const r=e(85608),o=e(76003),l=e(41869),_=e(23418),v=e(82196),p=7,m=200,s=100;let g=n=class extends l.WithEventBus{constructor(){super(...arguments),this.currentIndex=-1,this.stack=[],this.closedStack=[]}init(){this.registerMouseNavigationListener()}registerMouseNavigationListener(){const u=new l.DisposableCollection,c=()=>{u.dispose(),this.preferenceService.get(n.MOUSE_NAVIGATION_SETTING)&&u.push((0,l.addDisposableListener)(window.document,l.EventType.MOUSE_DOWN,E=>this.onMouseDown(E))),this.disposables.push(u)};this.disposables.push(this.preferenceService.onSpecificPreferenceChange(n.MOUSE_NAVIGATION_SETTING,()=>{this.preferenceService.get(n.MOUSE_NAVIGATION_SETTING)&&c()})),c()}onMouseDown(u){switch(u.button){case 3:u.stopPropagation(),this.back();break;case 4:u.stopPropagation(),this.forward();break}}onEditorSelectionChangeEvent(u){u.payload.selections[0]&&this.onNewState(new a(u.payload.editorUri,{lineNumber:u.payload.selections[0].selectionStartLineNumber,column:u.payload.selections[0].selectionStartColumn},u.payload.group.index,!1))}onEditorGroupChangeEvent(u){if(u.payload.newOpenType&&(u.payload.newOpenType.type===v.EditorOpenType.code||u.payload.newOpenType.type===v.EditorOpenType.diff)){const c=u.payload.group.currentEditor.getSelections();c&&c.length>0&&this.onNewState(new a(u.payload.newResource.uri,{lineNumber:c[0].selectionStartLineNumber,column:c[0].selectionStartColumn},u.payload.group.index,!0))}}onEditorGroupCloseEvent(u){this.pushClosed(u.payload.resource.uri)}onNewState(u){if(this.currentIndex!==this.stack.length-1&&(u.isTabChange&&this.currentState.isRelevant(u)||this.currentState&&this.currentState.isEqual(u)))return;const c=this.currentState&&this.currentState.isRelevant(u);this.doPushState(u,c)}get currentState(){return this.stack[this.currentIndex]}doPushState(u,c){this.stack.splice(this.currentIndex+(c?0:1)),this.stack.push(u),this.stack.length>m&&this.stack.splice(0,this.stack.length-s),this.currentIndex=this.stack.length-1}forward(){this.currentIndex<this.stack.length-1&&(this.currentIndex++,this.restoreState(this.currentState))}back(){this.currentIndex>0&&(this.currentIndex--,this.restoreState(this.currentState))}restoreState(u){if(!u)return;(this.editorService.editorGroups[u.groupIndex]||this.editorService.currentEditorGroup).open(u.uri,{range:{startColumn:u.position.column,startLineNumber:u.position.lineNumber,endColumn:u.position.column,endLineNumber:u.position.lineNumber},focus:!0})}pushClosed(u){this.closedStack.push(u),this.closedStack.length>m&&this.closedStack.splice(0,this.closedStack.length-s)}popClosed(){const u=this.closedStack.pop();u&&(this.editorService.open(u,{focus:!0}),this.closedStack=this.closedStack.filter(c=>!u.isEqual(c)))}};t.EditorHistoryService=g,g.MOUSE_NAVIGATION_SETTING="editor.mouseBackForwardToNavigate",r.__decorate([(0,o.Autowired)(l.PreferenceService),r.__metadata("design:type",Object)],g.prototype,"preferenceService",void 0),r.__decorate([(0,o.Autowired)(_.WorkbenchEditorService),r.__metadata("design:type",_.WorkbenchEditorService)],g.prototype,"editorService",void 0),r.__decorate([(0,l.OnEvent)(v.EditorSelectionChangeEvent),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[v.EditorSelectionChangeEvent]),r.__metadata("design:returntype",void 0)],g.prototype,"onEditorSelectionChangeEvent",null),r.__decorate([(0,l.OnEvent)(v.EditorGroupChangeEvent),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[v.EditorGroupChangeEvent]),r.__metadata("design:returntype",void 0)],g.prototype,"onEditorGroupChangeEvent",null),r.__decorate([(0,l.OnEvent)(v.EditorGroupCloseEvent),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[v.EditorGroupCloseEvent]),r.__metadata("design:returntype",void 0)],g.prototype,"onEditorGroupCloseEvent",null),t.EditorHistoryService=g=n=r.__decorate([(0,o.Injectable)()],g);class a{constructor(u,c,E,f){this.uri=u,this.position=c,this.groupIndex=E,this.isTabChange=f}isRelevant(u){return!!(this.uri.isEqual(u.uri)&&(u.position.lineNumber<this.position.lineNumber+p&&u.position.lineNumber>this.position.lineNumber-p||this.isTabChange||u.isTabChange))}isEqual(u){return this.uri.isEqual(u.uri)&&this.position.lineNumber===u.position.lineNumber&&this.position.column===u.position.column}}t.EditorHistoryState=a},64544:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useEditorDocumentModel=l;const n=e(14041),r=e(41869),o=e(96689);function l(_){const v=(0,r.useInjectable)(o.IEditorDocumentModelService),[p,m]=(0,n.useState)(null);return(0,n.useEffect)(()=>{const s=new r.DisposableStore,g=()=>{const a=v.getModelReference(_);a&&(m(a.instance),a.dispose())};return s.add(v.onDocumentModelCreated(_.toString(),()=>{g()})),g(),()=>{s.dispose()}},[_]),p}},57517:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorClientAppContribution=t.EditorModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(55218),_=e(21880),v=e(62660),p=e(28694),m=e(23418),s=e(93107),g=e(64335),a=e(88895),h=e(11673),u=e(57581),c=e(84158),E=e(80487),f=e(37275),d=e(66537),y=e(96689),b=e(71624),A=e(17315),S=e(60362),D=e(2863),I=e(30612),w=e(59879),T=e(69728),R=e(1015),M=e(49746),O=e(78889),x=e(8135),k=e(32837),F=e(6950),L=e(59137),B=e(9447),U=e(54324),W=e(36168),j=e(94558),Q=e(71145),G=e(34885),Z=e(24328),$=e(80200),V=e(82196),H=e(17878),K=e(51553);n.__exportStar(e(80487),t),n.__exportStar(e(96689),t),n.__exportStar(e(24739),t),n.__exportStar(e(24328),t),n.__exportStar(e(82196),t),n.__exportStar(e(33835),t);let Y=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:m.EditorCollectionService,useClass:b.EditorCollectionServiceImpl},{token:H.UntitledDocumentIdCounter,useClass:H.UntitledDocumentIdCounter},{token:m.WorkbenchEditorService,useClass:K.WorkbenchEditorServiceImpl},{token:m.ResourceService,useClass:$.ResourceServiceImpl},{token:V.EditorComponentRegistry,useClass:h.EditorComponentRegistryImpl},{token:V.IEditorDecorationCollectionService,useClass:D.EditorDecorationCollectionService},{token:y.IEditorDocumentModelContentRegistry,useClass:f.EditorDocumentModelContentRegistryImpl},{token:y.IEditorDocumentModelService,useClass:f.EditorDocumentModelServiceImpl},{token:m.ILanguageService,useClass:O.LanguageService},{token:V.IEditorActionRegistry,useClass:x.EditorActionRegistryImpl},{token:s.IDocPersistentCacheProvider,useClass:E.EmptyDocCacheImpl},{token:V.ICompareService,useClass:c.CompareService},{token:V.IBreadCrumbService,useClass:a.BreadCrumbServiceImpl},{token:V.IEditorFeatureRegistry,useClass:w.EditorFeatureRegistryImpl},{token:Z.EditorPreferences,useFactory:oe=>{const he=oe.get(o.PreferenceService);return(0,o.createPreferenceProxy)(he,Z.editorPreferenceSchema)}},{token:l.ICallHierarchyService,useClass:L.CallHierarchyService},{token:p.ITypeHierarchyService,useClass:L.TypeHierarchyService},{token:_.ICommandServiceToken,useClass:B.MonacoCommandService},{token:_.IMonacoCommandsRegistry,useClass:B.MonacoCommandRegistry},{token:_.IMonacoActionRegistry,useClass:B.MonacoActionRegistry},{token:v.ITextmateTokenizer,useClass:U.TextmateService},{token:V.ILanguageStatusService,useClass:M.LanguageStatusService},{token:V.IEditorTabService,useClass:I.EditorTabService},{token:V.INotebookService,useClass:Q.NotebookService},{token:g.IMultiDiffSourceResolverService,useClass:j.MultiDiffSourceResolverService},G.EditorPreferenceContribution,u.DefaultDiffEditorContribution,W.MultiDiffEditorContribution,F.MergeEditorContribution,X,S.EditorContribution,c.CompareEditorContribution,S.EditorAutoSaveEditorContribution,d.SaveParticipantsContribution,T.FileSystemResourceContribution,L.CallHierarchyContribution,L.TypeHierarchyContribution,R.LanguageStatusContribution,k.OpenTypeMenuContribution],this.electronProviders=[A.EditorElectronContribution],this.contributionProvider=[V.BrowserEditorContribution,V.MultiDiffSourceContribution]}};t.EditorModule=Y,t.EditorModule=Y=n.__decorate([(0,r.Injectable)()],Y);let X=class{async initialize(){for(const oe of this.contributions.getContributions())oe.registerResource&&oe.registerResource(this.resourceService),oe.registerEditorComponent&&oe.registerEditorComponent(this.editorComponentRegistry),oe.registerEditorDocumentModelContentProvider&&oe.registerEditorDocumentModelContentProvider(this.modelContentRegistry),oe.registerEditorActions&&oe.registerEditorActions(this.editorActionRegistry),oe.registerEditorFeature&&oe.registerEditorFeature(this.editorFeatureRegistry);for(const oe of this.multiDiffSourceContribution.getContributions())oe.registerMultiDiffSourceResolver(this.multiDiffSourceResolverService);this.workbenchEditorService.contributionsReady.resolve(),await Promise.all([this.workbenchEditorService.initialize(),this.modelService.initialize()])}async onDidStart(){this.workbenchEditorService.prepareContextKeyService()}};t.EditorClientAppContribution=X,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",m.ResourceService)],X.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",V.EditorComponentRegistry)],X.prototype,"editorComponentRegistry",void 0),n.__decorate([(0,r.Autowired)(m.WorkbenchEditorService),n.__metadata("design:type",K.WorkbenchEditorServiceImpl)],X.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(y.IEditorDocumentModelContentRegistry),n.__metadata("design:type",Object)],X.prototype,"modelContentRegistry",void 0),n.__decorate([(0,r.Autowired)(V.IEditorActionRegistry),n.__metadata("design:type",Object)],X.prototype,"editorActionRegistry",void 0),n.__decorate([(0,r.Autowired)(V.IEditorFeatureRegistry),n.__metadata("design:type",Object)],X.prototype,"editorFeatureRegistry",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],X.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(y.IEditorDocumentModelService),n.__metadata("design:type",f.EditorDocumentModelServiceImpl)],X.prototype,"modelService",void 0),n.__decorate([(0,r.Autowired)(g.IMultiDiffSourceResolverService),n.__metadata("design:type",Object)],X.prototype,"multiDiffSourceResolverService",void 0),n.__decorate([(0,r.Autowired)(V.BrowserEditorContribution),n.__metadata("design:type",Object)],X.prototype,"contributions",void 0),n.__decorate([(0,r.Autowired)(V.MultiDiffSourceContribution),n.__metadata("design:type",Object)],X.prototype,"multiDiffSourceContribution",void 0),t.EditorClientAppContribution=X=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],X)},37906:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoModelDiagnostics=t.MonacoDiagnosticCollection=void 0;const n=e(85608),r=e(43718),o=n.__importStar(e(20868)),l=e(52902),_=e(23418);class v{constructor(s){this.name=s,this.diagnostics=new Map,this.toDispose=new r.DisposableCollection}dispose(){this.toDispose.dispose()}get(s){const g=this.diagnostics.get(s);return g?g.diagnostics:[]}set(s,g){const a=this.diagnostics.get(s);if(a)a.diagnostics=g;else{const h=new p(s,g,this.name);this.diagnostics.set(s,h),this.toDispose.push(r.Disposable.create(()=>{this.diagnostics.delete(s),h.dispose()}))}}}t.MonacoDiagnosticCollection=v;class p{constructor(s,g,a){this.owner=a,this._markers=[],this._diagnostics=[],this.uri=o.Uri.parse(s),this.diagnostics=g,l.monacoApi.editor.onDidCreateModel(h=>this.doUpdateModelMarkers(h))}set diagnostics(s){this._diagnostics=s,this._markers=(0,_.asMonacoDiagnostics)(s)||[],this.updateModelMarkers()}get diagnostics(){return this._diagnostics}get markers(){return this._markers}dispose(){this._markers=[],this.updateModelMarkers()}updateModelMarkers(){const s=l.monacoApi.editor.getModel(this.uri);this.doUpdateModelMarkers(s)}doUpdateModelMarkers(s){s&&this.uri.toString()===s.uri.toString()&&l.monacoApi.editor.setModelMarkers(s,this.owner,this._markers)}}t.MonacoModelDiagnostics=p},1015:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageStatusContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(23418),_=e(96689);let v=class extends o.WithEventBus{initialize(){this.workbenchEditorService.onActiveResourceChange(()=>{this.updateLanguageStatus(this.workbenchEditorService.currentEditor)}),this.eventBus.on(_.EditorDocumentModelOptionChangedEvent,m=>{const s=this.workbenchEditorService.currentEditor;s&&s.currentUri&&s.currentUri.isEqual(m.payload.uri)&&this.updateLanguageStatus(this.workbenchEditorService.currentEditor)})}updateLanguageStatus(m){if(!m){this.statusBar.removeElement("editor-status-language-status");return}const s=m.currentDocumentModel;if(s){const g=this.languageStatusService.getLanguageStatus(s.getMonacoModel());g.length&&this.statusBar.addElement("editor-status-language-status",{name:(0,o.localize)("status-bar.editor-langStatus"),alignment:o.StatusBarAlignment.RIGHT,text:this.getLanguageStatusText(g),priority:1.1,hoverContents:g.map(a=>({title:a.label,name:a.name,command:a.command})),onClick:()=>{}})}}getLanguageStatusText(m){if(m.length===0)return;const[s]=m;switch(s.severity){case o.Severity.Error:return"$(bracket-error)";case o.Severity.Warning:return"$(bracket-dot)";default:return"$(bracket)"}}};t.LanguageStatusContribution=v,n.__decorate([(0,r.Autowired)(o.IStatusBarService),n.__metadata("design:type",Object)],v.prototype,"statusBar",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",l.WorkbenchEditorService)],v.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(l.ILanguageStatusService),n.__metadata("design:type",Object)],v.prototype,"languageStatusService",void 0),t.LanguageStatusContribution=v=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],v)},49746:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageStatusService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(40497),{compare:_}=o.strings;let v=class{constructor(){this._provider=new l.LanguageFeatureRegistry,this.onDidChange=this._provider.onDidChange}addStatus(m){return this._provider.register(m.selector,m)}getLanguageStatus(m){return this._provider.ordered(m).sort((s,g)=>{let a=g.severity-s.severity;return a===0&&(a=_(s.source,g.source)),a===0&&(a=_(s.id,g.id)),a})}};t.LanguageStatusService=v,t.LanguageStatusService=v=n.__decorate([(0,r.Injectable)()],v)},78889:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageService=void 0,t.reviveMarker=g;const n=e(85608),r=e(76003),o=e(43718),l=e(62660),_=e(23418),v=e(37906);function p(h){switch(h){case o.MarkerSeverity.Error:return _.DiagnosticSeverity.Error;case o.MarkerSeverity.Warning:return _.DiagnosticSeverity.Warning;case o.MarkerSeverity.Info:return _.DiagnosticSeverity.Information;case o.MarkerSeverity.Hint:return _.DiagnosticSeverity.Hint}}function m(h,u,c,E){return{start:{line:h-1,character:u-1},end:{line:c-1,character:E-1}}}function s(h){return{message:h.message,location:{uri:h.resource,range:m(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn)}}}function g(h){const u={code:typeof h.codeHref<"u"?{value:String(h.code),target:h.codeHref}:h.code,severity:p(h.severity),range:m(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn),message:h.message,source:h.source,relatedInformation:void 0,tags:h.tags};return h.relatedInformation&&(u.relatedInformation=h.relatedInformation.map(s)),u}let a=class{constructor(){this.markers=new Map,this.workspaceSymbolProviders=[];for(const u of this.markerManager.getResources())this.updateMarkers(new o.URI(u));this.markerManager.onMarkerChanged(u=>{u&&u.forEach(c=>this.updateMarkers(new o.URI(c)))})}get languages(){return[...this.mergeLanguages(this.textmateService.getLanguages()).values()]}getLanguage(u){return this.mergeLanguages(this.textmateService.getLanguages().filter(c=>c.id===u)).get(u)}mergeLanguages(u){const c=new Map;for(const{id:E,aliases:f,extensions:d,filenames:y}of u){const b=c.get(E)||{id:E,name:"",extensions:new Set,filenames:new Set};if(!b.name&&f&&f.length&&(b.name=f[0]),d&&d.length)for(const A of d)b.extensions.add(A);if(y&&y.length)for(const A of y)b.filenames.add(A);c.set(E,b)}for(const[E,f]of c)f.name||(f.name=E);return c}registerWorkspaceSymbolProvider(u){return this.workspaceSymbolProviders.push(u),o.Disposable.create(()=>{const c=this.workspaceSymbolProviders.indexOf(u);c!==-1&&this.workspaceSymbolProviders.splice(c,1)})}updateMarkers(u){const c=u.toString(),E=new Map;for(const d of this.markerManager.getMarkers({resource:u.toString()})){const y=E.get(d.type)||[];y.push(g(d)),E.set(d.type,y)}const f=new Set(this.markers.keys());for(const[d,y]of E){f.delete(d);const b=this.markers.get(d)||new v.MonacoDiagnosticCollection(d);b.set(c,y),this.markers.set(d,b)}for(const d of f){const y=this.markers.get(d);y&&y.set(c,[])}}};t.LanguageService=a,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",o.MarkerManager)],a.prototype,"markerManager",void 0),n.__decorate([(0,r.Autowired)(l.ITextmateTokenizer),n.__metadata("design:type",Object)],a.prototype,"textmateService",void 0),t.LanguageService=a=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],a)},26209:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreadCrumbsMenuService=void 0;const n=e(85608),r=e(76003),o=e(93899);let l=class{show(v,p,m,s){const g=m.contextKeyService,h=this.ctxMenuService.createMenu({id:o.MenuId.BreadcrumbsTitleContext,contextKeyService:g}).getMergedMenuNodes();this.ctxMenuRenderer.show({anchor:{x:v,y:p},menuNodes:h,args:[{uri:s,group:m}]})}};t.BreadCrumbsMenuService=l,n.__decorate([(0,r.Autowired)(o.AbstractContextMenuService),n.__metadata("design:type",o.AbstractContextMenuService)],l.prototype,"ctxMenuService",void 0),n.__decorate([(0,r.Autowired)(o.ICtxMenuRenderer),n.__metadata("design:type",o.ICtxMenuRenderer)],l.prototype,"ctxMenuRenderer",void 0),t.BreadCrumbsMenuService=l=n.__decorate([(0,r.Injectable)()],l)},94617:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorContextMenuController=void 0;const n=e(85608),r=e(41869),o=e(93899),l=n.__importStar(e(20868)),_=n.__importStar(e(50189)),v=e(85139),p=e(19582),m=e(31324),s=e(27416);class g extends r.Disposable{static get(h){return h.getContribution(s.ContextMenuController.ID)}constructor(h,u,c,E){super(),this.contextMenuService=h,this.globalContextKeyService=u,this.contextMenuRenderer=c,this.codeEditor=E,this.contextKeyService=this.registerDispose(this.globalContextKeyService.createScoped(this.codeEditor._contextKeyService)),this.addDispose(this.codeEditor.onContextMenu(f=>this.onContextMenu(f))),this.addDispose(this.codeEditor.onKeyDown(f=>{f.keyCode===v.KeyCode.ContextMenu&&(f.preventDefault(),f.stopPropagation(),this.showContextMenu())}))}showContextMenu(h){if(!this.codeEditor.getOption(m.EditorOption.contextmenu)||!this.codeEditor.hasModel())return;if(!this.contextMenuService){this.codeEditor.focus();return}const u=this.getMenuNodes();u.length>0&&this._doShowContextMenu(u,h)}onContextMenu(h){if(!this.codeEditor.hasModel())return;if(!this.codeEditor.getOption(m.EditorOption.contextmenu)){this.codeEditor.focus(),h.target.position&&!this.codeEditor.getSelection().containsPosition(h.target.position)&&this.codeEditor.setPosition(h.target.position);return}if(h.target.type===p.MouseTargetType.OVERLAY_WIDGET||h.target.type===p.MouseTargetType.CONTENT_TEXT&&h.target.detail.injectedText||(h.event.preventDefault(),h.event.stopPropagation(),h.target.type!==p.MouseTargetType.CONTENT_TEXT&&h.target.type!==p.MouseTargetType.CONTENT_EMPTY&&h.target.type!==p.MouseTargetType.TEXTAREA))return;if(this.codeEditor.focus(),h.target.position){let c=!1;for(const E of this.codeEditor.getSelections())if(E.containsPosition(h.target.position)){c=!0;break}c||this.codeEditor.setPosition(h.target.position)}let u=null;h.target.type!==p.MouseTargetType.TEXTAREA&&(u={x:h.event.posx-1,width:2,y:h.event.posy-1,height:2}),this.showContextMenu(u)}_doShowContextMenu(h,u){const c=this.codeEditor;if(!c.hasModel())return;const E=c.getOption(l.editor.EditorOption.hover);if(c.updateOptions({hover:{enabled:!1}}),!u){c.revealPosition(c.getPosition(),l.editor.ScrollType.Immediate),c.render();const f=c.getScrolledVisiblePosition(c.getPosition()),d=_.getDomNodePagePosition(c.getDomNode()),y=d.left+f.left,b=d.top+f.top+f.height;u={x:y,y:b}}this.contextMenuRenderer.show({anchor:{x:u.x-window.scrollX,y:u.y-window.scrollY},menuNodes:h,args:[c.getModel().uri],onHide:()=>{this.codeEditor.updateOptions({hover:E}),this.codeEditor.focus()}})}getMenuNodes(){const h=this.contextMenuService.createMenu({id:o.MenuId.EditorContext,contextKeyService:this.contextKeyService}),u=h.getMergedMenuNodes();return h.dispose(),u}}t.EditorContextMenuController=g,g.ID="editor.contrib.contextmenu"},8135:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorActionRegistryImpl=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899);let _=class extends o.Disposable{constructor(){super(...arguments),this._cachedMenus=new Map}registerEditorAction(){return this.logger.warn(new Error("registerEditorAction has been deprecated, use menu apis instead")),new o.Disposable}getMenu(p){const m=p.currentFocusedEditor?"editor-menu-"+p.currentFocusedEditor.getId():"editor-group-menu-"+p.name;if(!this._cachedMenus.has(m)){const s=p.currentFocusedEditor?this.contextKeyService.createScoped(p.currentFocusedEditor.monacoEditor._contextKeyService):p.contextKeyService,g=this.registerDispose(this.menuService.createMenu({id:l.MenuId.EditorTitle,contextKeyService:s}));this._cachedMenus.set(m,g)}return this._cachedMenus.get(m)}};t.EditorActionRegistryImpl=_,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],_.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(l.AbstractContextMenuService),n.__metadata("design:type",l.AbstractContextMenuService)],_.prototype,"menuService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],_.prototype,"logger",void 0),t.EditorActionRegistryImpl=_=n.__decorate([(0,r.Injectable)()],_)},32837:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenTypeMenuContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),_=e(43718),v=e(98295),p=e(82196),m=e(51553);var s;(function(a){a.EDITOR_OPEN_TYPE={id:"editor.opentype"}})(s||(s={}));let g=class extends _.Disposable{registerCommands(h){h.registerCommand(s.EDITOR_OPEN_TYPE,{execute:(...u)=>{const c=u[u.length-1];c&&typeof c=="string"&&this.workbenchEditorService.currentEditorGroup.changeOpenType(c)}})}constructor(){super(),this.registerEditorOpenTypes(),this.disposables.push(this.workbenchEditorService.onActiveResourceChange(h=>{this.registerEditorOpenTypes()}))}registerEditorOpenTypes(){const h=this.workbenchEditorService.currentEditorGroup.availableOpenTypes;this.menuRegistry.getMenuItems(l.MenuId.OpenTypeSubmenuContext).map(c=>c.command).forEach(c=>{this.menuRegistry.unregisterMenuItem(l.MenuId.OpenTypeSubmenuContext,c.id)}),this.menuRegistry.unregisterMenuItem(l.MenuId.EditorTitle,l.MenuId.OpenTypeSubmenuContext),h.length>=2&&this.registerMenuItem(h)}registerMenus(h){}registerMenuItem(h){const u={submenu:l.MenuId.OpenTypeSubmenuContext,label:(0,_.localize)("editor.openType"),group:"navigation",order:Number.MIN_SAFE_INTEGER,iconClass:(0,o.getIcon)("setting"),type:"default"};this.menuRegistry.registerMenuItem(l.MenuId.EditorTitle,u),h.forEach(c=>{var E;this.menuRegistry.registerMenuItem(l.MenuId.OpenTypeSubmenuContext,{command:{id:s.EDITOR_OPEN_TYPE.id,label:c.title||c.componentId||c.type},extraTailArgs:[(E=c.componentId)!==null&&E!==void 0?E:c.type],group:"navigation"})})}};t.OpenTypeMenuContribution=g,n.__decorate([(0,r.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",m.WorkbenchEditorServiceImpl)],g.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(l.IMenuRegistry),n.__metadata("design:type",l.IMenuRegistry)],g.prototype,"menuRegistry",void 0),t.OpenTypeMenuContribution=g=n.__decorate([(0,v.Domain)(_.CommandContribution,l.MenuContribution),n.__metadata("design:paramtypes",[])],g)},78680:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabTitleMenuService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(91830),_=e(93899);let v=class{get editorTitleContextKey(){return this._editorTitleContextKey||(this._editorTitleContextKey=this.contextKeyService.createKey("editorTitleContext",!1)),this._editorTitleContextKey}show(m,s,g,a){const h=a.contextKeyService.createScoped();new l.ResourceContextKey(h).set(g),this.editorTitleContextKey.set(!0);const c=this.ctxMenuService.createMenu({id:_.MenuId.EditorTitleContext,contextKeyService:h}),E=c.getMergedMenuNodes();c.dispose(),h.dispose(),this.ctxMenuRenderer.show({anchor:{x:m,y:s},menuNodes:E,args:[{uri:g,group:a}],onHide:()=>{this.editorTitleContextKey.set(!1)}})}};t.TabTitleMenuService=v,n.__decorate([(0,r.Autowired)(_.AbstractContextMenuService),n.__metadata("design:type",_.AbstractContextMenuService)],v.prototype,"ctxMenuService",void 0),n.__decorate([(0,r.Autowired)(_.ICtxMenuRenderer),n.__metadata("design:type",_.ICtxMenuRenderer)],v.prototype,"ctxMenuRenderer",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],v.prototype,"contextKeyService",void 0),t.TabTitleMenuService=v=n.__decorate([(0,r.Injectable)()],v)},86273:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentMergeConflict=t.MergeConflictParser=t.TextLine=void 0;const r=e(85608),o=e(76003),l=e(43718),_=r.__importStar(e(20868)),v="<<<<<<<",p="|||||||",m="=======",s=">>>>>>>";class g{constructor(f,d){if(typeof d!="number"||d<=0||d>f.getLineCount())throw new Error("Illegal value for `line`");this.text=f.getLineContent(d),this.firstNonWhitespaceCharacterIndex=/^(\s*)/.exec(this.text)[1].length,this.range=new _.Range(d,1,d,this.text.length+1),this.rangeIncludingLineBreak=d<=f.getLineCount()?new _.Range(d,1,d+1,1):this.range,this.lineNumber=d,this.isEmptyOrWhitespace=this.firstNonWhitespaceCharacterIndex===this.text.length}}t.TextLine=g;let a=n=class extends l.Disposable{constructor(){super(...arguments),this.cache=new l.LRUCache(100),this._conflictTextCaches=new Map,this._conflictRangeCaches=new Map}static createCacheKey(f){return`${f.uri.toString()}-${f.getVersionId()}`}scanDocument(f){const d=n.createCacheKey(f);if(this.cache.has(d))return this.cache.get(d);let y=null;const b=[],A=this._conflictTextCaches.get(f.uri.toString());for(let D=0;D<f.getLineCount();D++){const I=new g(f,D+1);if(!(!I||I.isEmptyOrWhitespace)){if(I.text.startsWith(v)){if(y!==null){y=null;break}y={startHeader:I,commonAncestors:[]}}else if(y&&!y.splitter&&I.text.startsWith(p))y.commonAncestors.push(I);else if(y&&!y.splitter&&I.text===m)y.splitter=I;else if(y&&I.text.startsWith(s)){y.endFooter=I;const w=h(f,y);w!==null&&b.push(w),y=null}}}if(!A&&b.length){this._conflictTextCaches.set(f.uri.toString(),f.getValue());const D=[];b.filter(Boolean).forEach(I=>{const w=I.range;D.push({id:(0,l.uuid)(),range:w,text:f.getValueInRange(w),isResolved:!1})}),this._conflictRangeCaches.set(f.uri.toString(),D)}const S=b?.filter(Boolean).map(D=>new c(D));return this.cache.set(d,S),S}getConflictText(f){return this._conflictTextCaches.get(f)}getAllConflictsByUri(f){return this._conflictRangeCaches.get(f)}getAllConflicts(){return this._conflictRangeCaches}setConflictResolved(f,d){const y=this._conflictRangeCaches.get(f);if(y){const b=y.find(A=>A.id===d);b&&(b.isResolved=!0)}}deleteConflictText(f){this._conflictTextCaches.delete(f)}dispose(){this._conflictTextCaches.clear(),this._conflictRangeCaches.clear()}};t.MergeConflictParser=a,t.MergeConflictParser=a=n=r.__decorate([(0,o.Injectable)()],a);function h(E,f){if(!f.startHeader||!f.splitter||!f.endFooter)return null;const d=f.commonAncestors[0]||f.splitter;return{current:{header:f.startHeader.range,decoratorContent:new _.Range(f.startHeader.rangeIncludingLineBreak.endLineNumber,f.startHeader.rangeIncludingLineBreak.endColumn,u(E,d.range.getStartPosition(),f.startHeader.rangeIncludingLineBreak.getEndPosition()).lineNumber,u(E,d.range.getStartPosition(),f.startHeader.rangeIncludingLineBreak.getEndPosition()).column),content:new _.Range(f.startHeader.rangeIncludingLineBreak.endLineNumber,f.startHeader.rangeIncludingLineBreak.endColumn,d.range.startLineNumber,d.range.startColumn),name:f.startHeader.text.substring(v.length+1)},commonAncestors:f.commonAncestors.map((y,b,A)=>{const S=A[b+1]||f.splitter;return{header:y.range,decoratorContent:new _.Range(y.rangeIncludingLineBreak.endLineNumber,y.rangeIncludingLineBreak.endColumn,u(E,S.range.getStartPosition(),y.rangeIncludingLineBreak.getEndPosition()).lineNumber,u(E,S.range.getStartPosition(),y.rangeIncludingLineBreak.getEndPosition()).lineNumber),content:new _.Range(y.rangeIncludingLineBreak.endLineNumber,y.rangeIncludingLineBreak.endColumn,S.range.startLineNumber,S.range.startColumn),name:y.text.substring(p.length+1)}}),splitter:f.splitter.range,incoming:{header:f.endFooter.range,decoratorContent:new _.Range(f.splitter.rangeIncludingLineBreak.endLineNumber,f.splitter.rangeIncludingLineBreak.endColumn,u(E,f.endFooter.range.getStartPosition(),f.splitter.rangeIncludingLineBreak.getEndPosition()).lineNumber,u(E,f.endFooter.range.getStartPosition(),f.splitter.rangeIncludingLineBreak.getEndPosition()).column),content:new _.Range(f.splitter.rangeIncludingLineBreak.endLineNumber,f.splitter.rangeIncludingLineBreak.endColumn,f.endFooter.range.startLineNumber,f.endFooter.range.startColumn),name:f.endFooter.text.substring(s.length+1)},range:new _.Range(f.startHeader.range.startLineNumber,f.startHeader.range.startColumn,f.endFooter.range.endLineNumber,f.endFooter.range.endColumn)}}function u(E,f,d){if(f.equals(d))return f;let y=f.lineNumber,b=f.column-1;return b<0&&(y--,b=new g(E,y).range.endColumn),new _.Position(y,b)}class c{constructor(f){this.range=f.range,this.current=f.current,this.incoming=f.incoming,this.commonAncestors=f.commonAncestors,this.splitter=f.splitter}}t.DocumentMergeConflict=c},31375:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(86273),t),n.__exportStar(e(87334),t)},71433:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useMergeConflictModel=m;const r=e(85608).__importDefault(e(12784)),o=e(14041),l=e(41869),_=e(70392),v=e(64544),p=e(90775);function m(s){const g=(0,v.useEditorDocumentModel)(s),[a,h]=(0,o.useState)(!1),[u,c]=(0,o.useState)(0),E=(0,l.useInjectable)(p.MergeConflictService),f=(0,o.useMemo)(()=>(0,l.formatLocalize)("merge-conflicts.merge.conflict.remain",u),[u]);return(0,o.useEffect)(()=>{const d=new _.DisposableStore;if(g){const y=()=>{const A=E.scanDocument(g.getMonacoModel());c(A),A>0&&h(!0)},b=(0,r.default)(y,150);return d.add(g.getMonacoModel().onDidChangeContent(()=>{b()})),y(),()=>{d.dispose(),E.clear(),h(!1),c(0)}}},[g]),{isVisiable:a,summary:f,canNavigate:u>0}}},90775:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MergeConflictService=void 0;const n=e(85608),r=e(76003),o=e(34712),l=e(72665),_=e(82196),v=e(86273);let p=class{constructor(){this.conflicts=[]}scanDocument(s){return this.conflicts=this.parser.scanDocument(s),this.conflicts.length}clear(){this.conflicts=[]}async navigate(s,g){this.conflicts=this.parser.scanDocument(s.monacoEditor.getModel());const a=this.conflicts.map(c=>c.range),h=(0,o.findRangeForNavigation)(g,a,s.monacoEditor.getPosition());if(h)if(h.canNavigate){if(!h.range)return}else{this.messageService.warning("No other merge conflicts within this file");return}else{this.messageService.warning("No merge conflicts found in this file");return}s.monacoEditor.setPosition(h.range.getStartPosition());const u=h.range.delta(-1);s.monacoEditor.revealRangeNearTopIfOutsideViewport(u),s.monacoEditor.focus()}navigateNext(){return this.navigate(this.editorService.currentEditor,o.NavigationDirection.Forwards)}navigatePrevious(){return this.navigate(this.editorService.currentEditor,o.NavigationDirection.Backwards)}};t.MergeConflictService=p,n.__decorate([(0,r.Autowired)(v.MergeConflictParser),n.__metadata("design:type",v.MergeConflictParser)],p.prototype,"parser",void 0),n.__decorate([(0,r.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],p.prototype,"editorService",void 0),n.__decorate([(0,r.Autowired)(l.IMessageService),n.__metadata("design:type",Object)],p.prototype,"messageService",void 0),t.MergeConflictService=p=n.__decorate([(0,r.Injectable)()],p)},87334:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AI_COMMAND=void 0;var e;(function(n){const r="merge-conflict";n.ACCEPT=`${r}.ai.accept`,n.REVERT=`${r}.ai.revert`})(e||(t.AI_COMMAND=e={}))},69647:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MergeEditorFloatComponents=void 0;const r=e(85608).__importStar(e(14041)),o=e(41869),l=e(61468),_=e(71433),v=e(90775),p=({resource:m})=>{const{uri:s}=m,g=(0,o.useInjectable)(v.MergeConflictService),a=(0,o.useInjectable)(o.CommandService),h=(0,o.useInjectable)(o.CommandRegistry),{canNavigate:u,isVisiable:c,summary:E}=(0,_.useMergeConflictModel)(s),[f,d]=(0,r.useState)(!1),y=(0,r.useCallback)(()=>{g.navigatePrevious()},[]),b=(0,r.useCallback)(()=>{g.navigateNext()},[]),A=(0,r.useCallback)(async()=>{d(!0),f?await a.executeCommand(o.MERGE_CONFLICT_COMMANDS.AI_ALL_ACCEPT_STOP.id,s):await a.executeCommand(o.MERGE_CONFLICT_COMMANDS.AI_ALL_ACCEPT.id,s),d(!1)},[s,f]);return c?r.default.createElement(l.MergeActions,{uri:s,editorType:"text",summary:E,canNavigate:u,handleNext:b,handlePrev:y,isAIResolving:f,onAIResolve:A,onReset:()=>{a.executeCommand(o.MERGE_CONFLICT_COMMANDS.ALL_RESET.id,s)},onSwitchEditor:()=>{[o.SCM_COMMANDS.GIT_OPEN_MERGE_EDITOR,o.SCM_COMMANDS._GIT_OPEN_MERGE_EDITOR].forEach(({id:S})=>{h.getCommand(S)&&h.isEnabled(S)&&a.executeCommand(S,s)})}}):null};t.MergeEditorFloatComponents=p},6950:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MergeEditorContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(82196),_=e(14769),v=e(69647),p="merge.editor.floating.widget";let m=class extends o.Disposable{registerResource(g){g.registerResourceProvider(this.mergeEditorResourceProvider)}registerEditorComponent(g){g.registerEditorComponentResolver(l.EditorOpenType.mergeEditor,(a,h)=>{h.push({type:l.EditorOpenType.mergeEditor})}),g.registerEditorSideWidget({id:p,component:v.MergeEditorFloatComponents,displaysOnResource:a=>{const{uri:h}=a;return h.scheme===o.Schemes.file}})}};t.MergeEditorContribution=m,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",_.MergeEditorResourceProvider)],m.prototype,"mergeEditorResourceProvider",void 0),t.MergeEditorContribution=m=n.__decorate([(0,o.Domain)(l.BrowserEditorContribution)],m)},14769:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MergeEditorResourceProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(96177);let _=class extends o.WithEventBus{constructor(){super(...arguments),this.scheme="mergeEditor"}provideResource(p){const{openMetadata:m,name:s}=p.getParsedQuery();try{const g=JSON.parse(m),{ancestor:a,input1:h,input2:u,output:c}=g,E=new o.URI(c),f=this.labelService.getIcon(E);return{supportsRevive:!0,name:s,icon:f,uri:p,metadata:{ancestor:a,input1:h,input2:u,output:c}}}catch{throw Error("invalid merge editor resource parse")}}shouldCloseResource(p,m){const{openMetadata:s}=p.uri.getParsedQuery();try{const g=JSON.parse(s),{output:a}=g,h=new o.URI(a);return this.mergeEditorService.fireRestoreState(h),!0}catch{throw Error("invalid merge editor resource parse")}}};t.MergeEditorResourceProvider=_,n.__decorate([(0,r.Autowired)(o.LabelService),n.__metadata("design:type",o.LabelService)],_.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(l.MergeEditorService),n.__metadata("design:type",l.MergeEditorService)],_.prototype,"mergeEditorService",void 0),t.MergeEditorResourceProvider=_=n.__decorate([(0,r.Injectable)()],_)},98388:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyContribution=t.executeProvideOutgoingCallsCommand=t.executeProvideIncomingCallsCommand=t.executePrepareCallHierarchyCommand=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(40191),_=e(55218),v=e(82196);t.executePrepareCallHierarchyCommand={id:"_executePrepareCallHierarchy"},t.executeProvideIncomingCallsCommand={id:"_executeProvideIncomingCalls"},t.executeProvideOutgoingCallsCommand={id:"_executeProvideOutgoingCalls"};const p=new l.RawContextKey("editorHasCallHierarchyProvider",!1);let m=class{registerCommands(g){g.registerCommand(t.executePrepareCallHierarchyCommand,{execute:(a,h)=>this.callHierarchyService.prepareCallHierarchyProvider(a,h)}),g.registerCommand(t.executeProvideIncomingCallsCommand,{execute:a=>this.callHierarchyService.provideIncomingCalls(a)}),g.registerCommand(t.executeProvideOutgoingCallsCommand,{execute:a=>this.callHierarchyService.provideOutgoingCalls(a)})}registerEditorFeature(g){this.ctxHasProvider=p.bind(this.contextKeyService),g.registerEditorFeatureContribution({contribute:a=>{const h=a.monacoEditor;return o.Event.any(h.onDidChangeModel,h.onDidChangeModelLanguage,_.CallHierarchyProviderRegistry.onDidChange)(()=>{h.hasModel()&&this.ctxHasProvider.set(_.CallHierarchyProviderRegistry.has(h.getModel()))})}})}};t.CallHierarchyContribution=m,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],m.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(_.ICallHierarchyService),n.__metadata("design:type",Object)],m.prototype,"callHierarchyService",void 0),t.CallHierarchyContribution=m=n.__decorate([(0,o.Domain)(o.CommandContribution,v.BrowserEditorContribution)],m)},45483:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyService=t.CallHierarchyModel=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(55218),_=e(96689),{isNonEmptyArray:v}=o.arrays;class p{static async create(g,a,h){const[u]=l.CallHierarchyProviderRegistry.ordered(g);if(!u)return;const c=await u.prepareCallHierarchy(g,a,h);if(c)return new p(c.roots.reduce((E,f)=>E+f._sessionId,""),u,c.roots,new o.RefCountedDisposable(c))}constructor(g,a,h,u){this.id=g,this.provider=a,this.roots=h,this.ref=u,this.root=h[0]}dispose(){this.ref.release()}fork(g){const a=this;return new class extends p{constructor(){super(a.id,a.provider,[g],a.ref.acquire())}}}async resolveIncomingCalls(g,a){try{const h=await this.provider.provideIncomingCalls(g,a);if(v(h))return h}catch(h){(0,o.onUnexpectedExternalError)(h)}return[]}async resolveOutgoingCalls(g,a){try{const h=await this.provider.provideOutgoingCalls(g,a);if(v(h))return h}catch(h){(0,o.onUnexpectedExternalError)(h)}return[]}}t.CallHierarchyModel=p;let m=class{constructor(){this.models=new Map}registerCallHierarchyProvider(g,a){l.CallHierarchyProviderRegistry.register(g,a)}async prepareCallHierarchyProvider(g,a){let h=this.modelService.getModelReference(o.URI.parse(g.toString())),u=h?.instance.getMonacoModel();if(h?.dispose(),!u){const c=await this.modelService.createModelReference(o.URI.parse(g.toString()));u=c.instance.getMonacoModel(),h=c}try{const c=await p.create(u,a,o.CancellationToken.None);return c?(this.models.set(c.id,c),this.models.forEach((E,f,d)=>{d.size>10&&(E.dispose(),this.models.delete(f))}),[c.root]):[]}finally{h?.dispose()}}provideIncomingCalls(g){const a=this.models.get(g._sessionId);if(a)return a.resolveIncomingCalls(g,o.CancellationToken.None)}provideOutgoingCalls(g){const a=this.models.get(g._sessionId);if(a)return a.resolveOutgoingCalls(g,o.CancellationToken.None)}};t.CallHierarchyService=m,n.__decorate([(0,r.Autowired)(_.IEditorDocumentModelService),n.__metadata("design:type",Object)],m.prototype,"modelService",void 0),t.CallHierarchyService=m=n.__decorate([(0,r.Injectable)()],m)},9447:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoActionRegistry=t.MonacoCommandRegistry=t.MonacoCommandService=t.MonacoCommandType=void 0;const r=e(85608),o=e(76003),l=e(41869),_=e(20868),v=e(21880),p=e(52902),m=e(60304),s=e(82196),g={"editor.action.smartSelect.grow":"editor.action.smartSelect.expand",cursorWordPartStartLeft:"cursorWordPartLeft",cursorWordPartStartLeftSelect:"cursorWordPartLeftSelect","editor.action.previewDeclaration":"editor.action.peekDefinition","editor.action.openDeclarationToTheSide":"editor.action.revealDefinitionAside","editor.action.goToDeclaration":"editor.action.revealDefinition"};var a;(function(E){E[E.ACTION=0]="ACTION",E[E.COMMAND=1]="COMMAND"})(a||(t.MonacoCommandType=a={}));let h=class{constructor(){this._onDidExecuteCommand=new l.Emitter,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._onWillExecuteCommand=new l.Emitter}setDelegate(f){this.delegate=f}get onWillExecuteCommand(){return this._onWillExecuteCommand.event}async executeCommand(f,...d){this.logger.debug("command: "+f),this._onWillExecuteCommand.fire({commandId:f,args:d});try{const y=await this.commandService.executeCommand(f,...d);return this._onDidExecuteCommand.fire({commandId:f,args:d}),y}catch(y){if(y?.name!==`${l.HANDLER_NOT_FOUND}:${f}`)throw y}if(this.delegate){const y=this.delegate.executeCommand(g[f]?g[f]:f,...d);return this._onDidExecuteCommand.fire({commandId:f,args:d}),y}return this.reporterService.point(l.REPORT_NAME.NOT_FOUND_COMMAND,f),Promise.reject(new Error(`command '${f}' not found`))}};t.MonacoCommandService=h,r.__decorate([(0,o.Autowired)(l.ILogger),r.__metadata("design:type",Object)],h.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(l.CommandRegistry),r.__metadata("design:type",Object)],h.prototype,"commandRegistry",void 0),r.__decorate([(0,o.Autowired)(l.CommandService),r.__metadata("design:type",Object)],h.prototype,"commandService",void 0),r.__decorate([(0,o.Autowired)(l.IReporterService),r.__metadata("design:type",Object)],h.prototype,"reporterService",void 0),t.MonacoCommandService=h=r.__decorate([(0,o.Injectable)()],h);let u=class{validate(f){var d;return(d=this.commands.getRawCommand(f))===null||d===void 0?void 0:d.id}registerCommand(f,d){this.commands.registerCommand(f,this.newHandler(d))}registerHandler(f,d){this.commands.registerHandler(f,this.newHandler(d))}newHandler(f){return{execute:(...d)=>this.execute(f,...d)}}execute(f,...d){const y=this.getActiveCodeEditor();return y?Promise.resolve(f.execute(y,...d)):Promise.resolve()}get codeEditorService(){return this.overrideServiceRegistry.getRegisteredService(l.ServiceNames.CODE_EDITOR_SERVICE)}getActiveCodeEditor(){var f;const d=(f=this.codeEditorService)===null||f===void 0?void 0:f.getFocusedCodeEditor();if(d)return d;if(this.editorCollectionService.currentEditor)return this.editorCollectionService.currentEditor.monacoEditor;const y=this.workbenchEditorService.currentEditorGroup;if(y){const b=y.currentOrPreviousFocusedEditor||y.currentEditor;if(b)return b.monacoEditor}}};t.MonacoCommandRegistry=u,r.__decorate([(0,o.Autowired)(l.CommandRegistry),r.__metadata("design:type",Object)],u.prototype,"commands",void 0),r.__decorate([(0,o.Autowired)(s.WorkbenchEditorService),r.__metadata("design:type",s.WorkbenchEditorService)],u.prototype,"workbenchEditorService",void 0),r.__decorate([(0,o.Autowired)(s.EditorCollectionService),r.__metadata("design:type",s.EditorCollectionService)],u.prototype,"editorCollectionService",void 0),r.__decorate([(0,o.Autowired)(l.MonacoOverrideServiceRegistry),r.__metadata("design:type",l.MonacoOverrideServiceRegistry)],u.prototype,"overrideServiceRegistry",void 0),t.MonacoCommandRegistry=u=r.__decorate([(0,o.Injectable)()],u);let c=n=class{get globalInstantiationService(){const f=this.overrideServiceRegistry.getRegisteredService(l.ServiceNames.CODE_EDITOR_SERVICE),d=this.overrideServiceRegistry.getRegisteredService(l.ServiceNames.TEXT_MODEL_SERVICE),y=this.overrideServiceRegistry.getRegisteredService(l.ServiceNames.CONTEXT_KEY_SERVICE);return m.StandaloneServices.initialize({codeEditorService:f,textModelService:d,contextKeyService:y})}get monacoEditorRegistry(){return v.EditorExtensionsRegistry}get monacoCommands(){return v.CommandsRegistry.getCommands()}registerMonacoActions(){var f;const d=new Map(Array.from(this.monacoEditorRegistry.getEditorActions()).map(({id:y,label:b,alias:A})=>[y,{label:b,alias:A}]));for(const y of this.monacoCommands.keys()){if(n.EXCLUDE_ACTIONS.includes(y))continue;const b=(f=d.get(y))!==null&&f!==void 0?f:{},A=this.actAndComHandler(d,y);this.monacoCommandRegistry.registerCommand({id:y,label:b.label,labelLocalized:b.label&&b.alias?{alias:b.alias,localized:b.label,raw:b.label}:void 0},A);const S=n.COMMON_ACTIONS.get(y);S&&this.monacoCommandRegistry.registerHandler(S,A)}}actAndComHandler(f,d){if(n.CONVERT_MONACO_ACTIONS_TO_CONTRIBUTION_ID.has(d)){const y=n.CONVERT_MONACO_ACTIONS_TO_CONTRIBUTION_ID.get(d);if(this.monacoEditorRegistry.getSomeEditorContributions([y]).length>0)return this.newCommandHandler(d)}return f.has(d)?this.newActionHandler(d):this.newCommandHandler(d)}isInternalExecuteCommand(f){return f.startsWith("_execute")}processInternalCommandArgument(f,d=[]){return this.isInternalExecuteCommand(f)?d.map(y=>y instanceof l.Uri?p.URI.revive(y):y):n.CONVERT_MONACO_COMMAND_ARGS.has(f)?n.CONVERT_MONACO_COMMAND_ARGS.get(f)(...d):d}newCommandHandler(f){return{execute:(d,...y)=>{var b;if(!d)return;const S=!!this.monacoEditorRegistry.getEditorCommand(f)||!(this.isInternalExecuteCommand(f)||f==="setContext"||n.COMMON_ACTIONS.has(f))?d&&d._instantiationService:this.globalInstantiationService;if(!S)return;const D=this.processInternalCommandArgument(f,y);return S.invokeFunction((b=this.monacoCommands.get(f))===null||b===void 0?void 0:b.handler,...D)}}}newActionHandler(f){return{execute:(d,...y)=>{const b=d.getAction(f);if(b&&b.isSupported())return this.runAction(f,d,...y)}}}runAction(f,d,...y){if(d){const b=d.getAction(f);if(b)return b.run(...y)}return Promise.resolve()}newKeyboardHandler(f){return{execute:(d,...y)=>d.trigger("keyboard",f,y)}}};t.MonacoActionRegistry=c,c.COMMON_ACTIONS=new Map([[_.DELEGATE_COMMANDS.UNDO,l.EDITOR_COMMANDS.UNDO.id],[_.DELEGATE_COMMANDS.REDO,l.EDITOR_COMMANDS.REDO.id],[_.DELEGATE_COMMANDS.SELECT_ALL,l.EDITOR_COMMANDS.SELECT_ALL.id]]),c.CONVERT_MONACO_COMMAND_ARGS=new Map([["editor.action.showReferences",(E,...f)=>[p.URI.parse(E),...f]],["editor.action.goToLocations",(E,...f)=>[p.URI.parse(E),...f]]]),c.CONVERT_MONACO_ACTIONS_TO_CONTRIBUTION_ID=new Map([["editor.action.rename","editor.contrib.renameController"]]),c.EXCLUDE_ACTIONS=["setContext","editor.action.quickCommand","editor.action.quickOutline","editor.action.toggleHighContrast","editor.action.gotoLine"],r.__decorate([(0,o.Autowired)(),r.__metadata("design:type",u)],c.prototype,"monacoCommandRegistry",void 0),r.__decorate([(0,o.Autowired)(l.MonacoOverrideServiceRegistry),r.__metadata("design:type",l.MonacoOverrideServiceRegistry)],c.prototype,"overrideServiceRegistry",void 0),r.__decorate([l.memoize,r.__metadata("design:type",Object),r.__metadata("design:paramtypes",[])],c.prototype,"globalInstantiationService",null),r.__decorate([l.memoize,r.__metadata("design:type",Object),r.__metadata("design:paramtypes",[])],c.prototype,"monacoEditorRegistry",null),r.__decorate([l.memoize,r.__metadata("design:type",Object),r.__metadata("design:paramtypes",[])],c.prototype,"monacoCommands",null),t.MonacoActionRegistry=c=n=r.__decorate([(0,o.Injectable)()],c)},59137:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(98388),t),n.__exportStar(e(45483),t),n.__exportStar(e(88412),t),n.__exportStar(e(7795),t)},41977:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextmateRegistry=void 0;const n=e(85608),r=e(76003),o=e(43718);let l=class{constructor(){this.scopeToProvider=new Map,this.languageToConfig=new Map,this.languageIdToScope=new Map}registerTextmateGrammarScope(v,p){return this.scopeToProvider.has(v)&&(0,o.getDebugLogger)().warn(new Error(`a registered grammar provider for '${v}' scope is overridden`)),this.scopeToProvider.set(v,p),()=>{this.scopeToProvider.delete(v)}}getProvider(v){return this.scopeToProvider.get(v)}mapLanguageIdToTextmateGrammar(v,p){const m=this.getScope(v);return typeof m=="string"&&(0,o.getDebugLogger)().warn(new Error(`'${v}' language is remapped from '${m}' to '${p}' scope`)),this.languageIdToScope.set(v,p),()=>{this.languageIdToScope.delete(v)}}getScope(v){return this.languageIdToScope.get(v)}getLanguageId(v){for(const p of this.languageIdToScope.keys())if(this.languageIdToScope.get(p)===v)return p}registerGrammarConfiguration(v,p){return this.languageToConfig.has(v),this.languageToConfig.set(v,p),()=>{this.languageToConfig.delete(v)}}getGrammarConfiguration(v){return this.languageToConfig.get(v)||(()=>({}))}};t.TextmateRegistry=l,t.TextmateRegistry=l=n.__decorate([(0,r.Injectable)()],l)},58837:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextMateTokenizer=t.TokenizerState=void 0;const n=e(25726),r=e(86560),o=e(38390);class l{constructor(p){this.ruleStack=p}clone(){return new l(this.ruleStack)}equals(p){return p instanceof l&&(p===this||p.ruleStack===this.ruleStack)}}t.TokenizerState=l;class _ extends r.Disposable{constructor(p,m,s){super(),this.grammar=p,this.options=m,this.conatinsEmbeddedLanguages=s,this.onDidEncounterLanguageEmitter=new r.Emitter,this.onDidEncounterLanguage=this.onDidEncounterLanguageEmitter.event,this.seenLanguages=[]}getInitialState(){return new l(n.INITIAL)}tokenizeEncoded(p,m){if(this.options.lineLimit!==void 0&&p.length>this.options.lineLimit){const g=new Uint32Array(2);return g[0]=0,g[1]=1<<o.MetadataConsts.LANGUAGEID_OFFSET|0<<o.MetadataConsts.TOKEN_TYPE_OFFSET|0<<o.MetadataConsts.FONT_STYLE_OFFSET|1<<o.MetadataConsts.FOREGROUND_OFFSET|2<<o.MetadataConsts.BACKGROUND_OFFSET|o.MetadataConsts.BALANCED_BRACKETS_MASK>>>0,{endState:new l(n.INITIAL),tokens:g}}const s=this.grammar.tokenizeLine2(p,m.ruleStack,500);if(this.conatinsEmbeddedLanguages){const g=this.seenLanguages,a=s.tokens;for(let h=0,u=a.length>>>1;h<u;h++){const c=a[(h<<1)+1],E=o.TokenMetadata.getLanguageId(c);g[E]||(g[E]=!0,this.onDidEncounterLanguageEmitter.fire(E))}}return{endState:new l(s.ruleStack),tokens:s.tokens}}tokenize(p,m){const s=this.grammar.tokenizeLine(p,m.ruleStack);return{endState:new l(s.ruleStack),tokens:s.tokens.map(g=>({...g,scopes:g.scopes.join(`\r
33295
33295
  `)}))}}}t.TextMateTokenizer=_},54324:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextmateService=void 0,t.getEncodedLanguageId=b,t.getLegalThemeName=A;const n=e(85608),r=e(27107),o=e(25726),l=e(76003),_=e(41869),v=e(6858),p=e(43718),m=e(42933),s=e(52902),g=e(33096),a=e(89944),h=e(96068),u=e(14162),c=e(16781),E=e(96689),f=e(41977),d=e(58837);let y=!1;function b(T){return s.monaco.languages.getEncodedLanguageId(T)}function A(T){return T.toLowerCase().replace(/[^a-z0-9-]/g,"-")}class S{createOnigScanner(R){return new r.OnigScanner(R)}createOnigString(R){return new r.OnigString(R)}}function D(T){if(!Array.isArray(T))return!1;for(let R=0,M=T.length;R<M;R++)if(typeof T[R]!="string")return!1;return!0}function I(T){return D(T)&&T.length===2}let w=class extends _.WithEventBus{constructor(){super(...arguments),this.registeredGrammarDisposableCollection=new Map,this.injections=new Map,this.activatedLanguage=new Set,this.languageConfigLocation=new Map,this.languageConfiguration=new Map,this.initialized=!1,this.dynamicLanguages=[]}init(){this.initGrammarRegistry(),this.listenThemeChange(),this.listenPreferenceChange()}listenThemeChange(){this.eventBus.on(a.ThemeChangedEvent,R=>{const M=R.payload.theme.themeData;M!==this.editorTheme&&(this.editorTheme=M,this.setTheme(M))})}async registerLanguage(R,M){return this.registerLanguages([R],M)}reviveLanguageConfiguration(R,M){return{wordPattern:this.createRegex(M.wordPattern),autoClosingPairs:this.extractValidAutoClosingPairs(R,M),brackets:this.extractValidBrackets(R,M),comments:this.extractValidCommentRule(R,M),folding:this.convertFolding(M.folding),surroundingPairs:this.extractValidSurroundingPairs(R,M),indentationRules:this.convertIndentationRules(M.indentationRules),autoCloseBefore:M.autoCloseBefore,colorizedBracketPairs:this.extractValidColorizedBracketPairs(R,M),onEnterRules:this.extractValidOnEnterRules(R,M)}}get monacoLanguageService(){return c.StandaloneServices.get(u.ILanguageService)}isEmbeddedLanguageOnly(R){return!R.filenames&&!R.extensions&&!R.filenamePatterns&&!R.firstLine&&!R.mimetypes&&(!R.aliases||R.aliases.length===0)}async registerLanguages(R,M){const O=R.map(x=>({id:x.id,aliases:x.aliases,extensions:x.extensions,filenamePatterns:x.filenamePatterns,filenames:x.filenames,firstLine:x.firstLine,mimetypes:x.mimetypes}));if(this.dynamicLanguages.push(...O.filter(x=>!this.isEmbeddedLanguageOnly(x))),this.monacoLanguageService._registry._registerLanguages(O),R.forEach(async x=>{this.languageConfigLocation.set(x.id,M),this.addDispose(s.monaco.languages.onLanguage(x.id,async()=>{await this.loadLanguageConfiguration(x,M),this.activateLanguage(x.id)})),this.languageConfiguration.set(x.id,x)}),this.initialized){const x=this.editorDocumentModelService.getAllModels().map(k=>k.uri);for(const k of x){const F=this.editorDocumentModelService.getModelReference(p.URI.parse(k.codeUri.toString()));if(F&&F.instance){const L=F.instance.getMonacoModel().getLanguageId();if(this.languageConfiguration.has(L)){const B=this.languageConfigLocation.get(L);await this.loadLanguageConfiguration(this.languageConfiguration.get(L),B),this.activateLanguage(L)}}F?.dispose()}}}async registerGrammar(R,M){if(R.path){const O=R.path.replace(/^\.\//,"");R.location=M.resolve(O)}this.doRegisterGrammar(R)}unregisterGrammar(R){const M=this.registeredGrammarDisposableCollection.get(R.scopeName);M&&M.dispose()}doRegisterGrammar(R){const M=new p.Disposable;if(R.injectTo)for(const O of R.injectTo){let x=this.injections.get(O);x||(x=[],M.addDispose(p.Disposable.create(()=>{this.injections.delete(O)})),this.injections.set(O,x)),x.push(R.scopeName)}M.addDispose(p.Disposable.create(this.textmateRegistry.registerTextmateGrammarScope(R.scopeName,{async getGrammarDefinition(){return{format:/\.json$/.test(R.path)?"json":"plist",location:R.location,content:await R.resolvedConfiguration}},getInjections:O=>{const x=O.split(".");let k=[];for(let F=1;F<=x.length;F++){const L=x.slice(0,F).join(".");k=[...k,...this.injections.get(L)||[]]}return k}}))),R.language&&(M.addDispose(p.Disposable.create(this.textmateRegistry.mapLanguageIdToTextmateGrammar(R.language,R.scopeName))),M.addDispose(p.Disposable.create(this.textmateRegistry.registerGrammarConfiguration(R.language,()=>({embeddedLanguages:this.convertEmbeddedLanguages(R.embeddedLanguages),tokenTypes:this.convertTokenTypes(R.tokenTypes),balancedBracketSelectors:(0,h.asStringArray)(R.balancedBracketScopes,["*"]),unbalancedBracketSelectors:(0,h.asStringArray)(R.unbalancedBracketScopes,[])}))))),this.registeredGrammarDisposableCollection.set(R.scopeName,M)}async loadLanguageConfiguration(R,M){let O;if(typeof R.resolvedConfiguration=="object"){const x=await R.resolvedConfiguration;O=this.reviveLanguageConfiguration(R.id,x)}else if(R.configuration){const x=R.configuration.replace(/^\.\//,""),k=M.resolve(x),L=(await this.fileServiceClient.resolveContent(k.toString())).content;if(L){const B=this.safeParseJSON(L);B&&(O=this.reviveLanguageConfiguration(R.id,B))}}O&&s.monaco.languages.setLanguageConfiguration(R.id,O)}async activateLanguage(R){this.eventBus.fire(new _.ExtensionActivateEvent({topic:"onLanguage",data:R})),!this.activatedLanguage.has(R)&&(this.activatedLanguage.add(R),this.setTokensProviderByLanguageId(R))}async setTokensProviderByLanguageId(R){const M=this.textmateRegistry.getScope(R);if(!M||!this.textmateRegistry.getProvider(M))return;const x={lineLimit:this.preferenceService.getValid("editor.maxTokenizationLineLength",2e4)},k=this.textmateRegistry.getGrammarConfiguration(R)(),F=b(R);try{const L=await this.grammarRegistry.loadGrammarWithConfiguration(M,F,k),B=k.tokenizerOption?k.tokenizerOption:x,U=k.embeddedLanguages&&Object.keys(k.embeddedLanguages).length>0;if(L){const W=new d.TextMateTokenizer(L,B,U);this.addDispose(W.onDidEncounterLanguage(async j=>{const Q=this.monacoLanguageService._registry.languageIdCodec.decodeLanguageId(j),G=this.languageConfigLocation.get(Q);G&&this.languageConfiguration.has(Q)&&(await this.loadLanguageConfiguration(this.languageConfiguration.get(Q),G),this.activateLanguage(Q))})),s.monaco.languages.setTokensProvider(R,W)}}catch(L){this.logger.warn("No grammar for this language id",R,L)}}setTheme(R){this.generateEncodedTokenColors(R),s.monaco.editor.defineTheme(A(R.name),R),s.monaco.editor.setTheme(A(R.name))}generateEncodedTokenColors(R){this.grammarRegistry.setTheme(R),R.encodedTokensColors=this.grammarRegistry.getColorMap(),R.encodedTokensColors[0]=null}createRegex(R){if(typeof R=="string")return new RegExp(R,"");if((0,p.isObject)(R)){if(typeof R.pattern!="string"||typeof R.flags<"u"&&typeof R.flags!="string")return;try{return new RegExp(R.pattern,R.flags)}catch{return}}}safeParseJSON(R){let M;try{return M=(0,_.parseWithComments)(R),M}catch(O){this.logger.error(`Language configuration file parsing error, ${O.stack}`);return}}convertFolding(R){if(!R)return;const M={offSide:R.offSide};return R.markers&&(M.markers={end:R.markers.end,start:R.markers.start}),M}convertIndentationRules(R){if(!R)return;const M={decreaseIndentPattern:this.createRegex(R.decreaseIndentPattern),increaseIndentPattern:this.createRegex(R.increaseIndentPattern)};return R.indentNextLinePattern&&(M.indentNextLinePattern=this.createRegex(R.indentNextLinePattern)),R.unIndentedLinePattern&&(M.unIndentedLinePattern=this.createRegex(R.unIndentedLinePattern)),M}convertEmbeddedLanguages(R){if(typeof R>"u"||R===null)return;const M=Object.create(null),O=Object.keys(R),x=O.length;for(let k=0;k<x;k++){const F=O[k],L=R[F];M[F]=b(L)}return M}convertTokenTypes(R){if(typeof R>"u"||R===null)return;const M=Object.create(null),O=Object.keys(R),x=O.length;for(let k=0;k<x;k++){const F=O[k];switch(R[F]){case"string":M[F]=2;break;case"other":M[F]=0;break;case"comment":M[F]=1;break}}return M}extractValidSurroundingPairs(R,M){if(!M)return;const O=M.surroundingPairs;if(typeof O>"u")return;if(!Array.isArray(O)){this.logger.warn(`[${R}: language configuration: expected \`surroundingPairs\` to be an array.`);return}let x;for(let k=0,F=O.length;k<F;k++){const L=O[k];if(Array.isArray(L)){if(!I(L)){this.logger.warn(`[${R}: language configuration: expected \`surroundingPairs[${k}]\` to be an array of two strings or an object.`);continue}x=x||[],x.push({open:L[0],close:L[1]})}else{if(typeof L!="object"){this.logger.warn(`[${R}: language configuration: expected \`surroundingPairs[${k}]\` to be an array of two strings or an object.`);continue}if(typeof L.open!="string"){this.logger.warn(`[${R}: language configuration: expected \`surroundingPairs[${k}].open\` to be a string.`);continue}if(typeof L.close!="string"){this.logger.warn(`[${R}: language configuration: expected \`surroundingPairs[${k}].close\` to be a string.`);continue}x=x||[],x.push({open:L.open,close:L.close})}}return x}extractValidColorizedBracketPairs(R,M){const O=M.colorizedBracketPairs;if(typeof O>"u")return;if(!Array.isArray(O)){this.logger.warn(`[${R}]: language configuration: expected \`colorizedBracketPairs\` to be an array.`);return}const x=[];for(let k=0,F=O.length;k<F;k++){const L=O[k];if(!I(L)){this.logger.warn(`[${R}]: language configuration: expected \`colorizedBracketPairs[${k}]\` to be an array of two strings.`);continue}x.push([L[0],L[1]])}return x}extractValidOnEnterRules(R,M){const O=M.onEnterRules;if(typeof O>"u")return;if(!Array.isArray(O)){this.logger.warn(`[${R}]: language configuration: expected \`onEnterRules\` to be an array.`);return}let x;for(let k=0,F=O.length;k<F;k++){const L=O[k];if(!(0,p.isObject)(L)){this.logger.warn(`[${R}]: language configuration: expected \`onEnterRules[${k}]\` to be an object.`);continue}if(!(0,p.isObject)(L.action)){this.logger.warn(`[${R}]: language configuration: expected \`onEnterRules[${k}].action\` to be an object.`);continue}let B;if(L.action.indent==="none")B=g.IndentAction.None;else if(L.action.indent==="indent")B=g.IndentAction.Indent;else if(L.action.indent==="indentOutdent")B=g.IndentAction.IndentOutdent;else if(L.action.indent==="outdent")B=g.IndentAction.Outdent;else{this.logger.warn(`[${R}]: language configuration: expected \`onEnterRules[${k}].action.indent\` to be 'none', 'indent', 'indentOutdent' or 'outdent'.`);continue}const U={indentAction:B};L.action.appendText&&(typeof L.action.appendText=="string"?U.appendText=L.action.appendText:this.logger.warn(`[${R}]: language configuration: expected \`onEnterRules[${k}].action.appendText\` to be undefined or a string.`)),L.action.removeText&&(typeof L.action.removeText=="number"?U.removeText=L.action.removeText:this.logger.warn(`[${R}]: language configuration: expected \`onEnterRules[${k}].action.removeText\` to be undefined or a number.`));const W=this.createRegex(L.beforeText);if(!W)continue;const j={beforeText:W,action:U};if(L.afterText){const Q=this.createRegex(L.afterText);Q&&(j.afterText=Q)}if(L.previousLineText){const Q=this.createRegex(L.previousLineText);Q&&(j.previousLineText=Q)}x=x||[],x.push(j)}return x}extractValidBrackets(R,M){const O=M.brackets;if(typeof O>"u")return;if(!Array.isArray(O)){this.logger.warn(`[${R}]: language configuration: expected \`brackets\` to be an array.`);return}let x;for(let k=0,F=O.length;k<F;k++){const L=O[k];if(!I(L)){this.logger.warn(`[${R}]: language configuration: expected \`brackets[${k}]\` to be an array of two strings.`);continue}x=x||[],x.push(L)}return x}extractValidAutoClosingPairs(R,M){const O=M.autoClosingPairs;if(typeof O>"u")return;if(!Array.isArray(O)){this.logger.warn(`[${R}]: language configuration: expected \`autoClosingPairs\` to be an array.`);return}let x;for(let k=0,F=O.length;k<F;k++){const L=O[k];if(Array.isArray(L)){if(!I(L)){this.logger.warn(`[${R}]: language configuration: expected \`autoClosingPairs[${k}]\` to be an array of two strings or an object.`);continue}x=x||[],x.push({open:L[0],close:L[1]})}else{if(typeof L!="object"){this.logger.warn(`[${R}]: language configuration: expected \`autoClosingPairs[${k}]\` to be an array of two strings or an object.`);continue}if(typeof L.open!="string"){this.logger.warn(`[${R}]: language configuration: expected \`autoClosingPairs[${k}].open\` to be a string.`);continue}if(typeof L.close!="string"){this.logger.warn(`[${R}]: language configuration: expected \`autoClosingPairs[${k}].close\` to be a string.`);continue}if(typeof L.notIn<"u"&&!D(L.notIn)){this.logger.warn(`[${R}]: language configuration: expected \`autoClosingPairs[${k}].notIn\` to be a string array.`);continue}x=x||[],x.push({open:L.open,close:L.close,notIn:L.notIn})}}return x}extractValidCommentRule(R,M){const O=M.comments;if(typeof O>"u")return;if(typeof O!="object"){this.logger.warn(`[${R}]: language configuration: expected \`comments\` to be an object.`);return}let x;return typeof O.lineComment<"u"&&(typeof O.lineComment!="string"?this.logger.warn(`[${R}]: language configuration: expected \`comments.lineComment\` to be a string.`):(x=x||{},x.lineComment=O.lineComment)),typeof O.blockComment<"u"&&(I(O.blockComment)?(x=x||{},x.blockComment=O.blockComment):this.logger.warn(`[${R}]: language configuration: expected \`comments.blockComment\` to be an array of two strings.`)),x}async initGrammarRegistry(){this.grammarRegistry=new o.Registry({onigLib:this.getOnigLib(),loadGrammar:async R=>{const M=this.textmateRegistry.getProvider(R);if(M){const O=await M.getGrammarDefinition();if(!O.content){const F=(await this.fileServiceClient.resolveContent(O.location.toString())).content;O.content=O.format==="json"?this.safeParseJSON(F):F}let x;return typeof O.content=="string"?x=(0,o.parseRawGrammar)(O.content,O.format==="json"?"grammar.json":"grammar.plist"):x=O.content,x}},getInjections:R=>{const M=this.textmateRegistry.getProvider(R);return M&&M.getInjections?M.getInjections(R):[]}}),this.activateLanguages()}getLanguages(){return[...s.monaco.languages.getLanguages(),...this.dynamicLanguages]}activateLanguages(){for(const{id:R}of this.getLanguages())this.editorDocumentModelService.hasLanguage(R)&&this.activateLanguage(R)}async getOnigLib(){if(y)return new S;const R=await this.rendererRuntime.provideResourceUri(v.EKnownResources.OnigWasm),O=await(await fetch(R)).arrayBuffer();return await(0,r.loadWASM)(O),y=!0,new S}listenPreferenceChange(){this.preferenceService.onPreferenceChanged(R=>{if(R.preferenceName==="editor.maxTokenizationLineLength")for(const M of this.activatedLanguage)this.setTokensProviderByLanguageId(M)})}async testTokenize(R,M){const O=this.textmateRegistry.getScope(M);if(!O)return;const x=this.textmateRegistry.getGrammarConfiguration(M)(),k=b(M),F=await this.grammarRegistry.loadGrammarWithConfiguration(O,k,x);let L=o.INITIAL;const B=F.tokenizeLine(R,L),U=(0,_.getDebugLogger)("tokenize");U.log(`
33296
- Tokenizing line: ${R}`);for(let W=0;W<B.tokens.length;W++){const j=B.tokens[W];U.log(` - token from ${j.startIndex} to ${j.endIndex} (${R.substring(j.startIndex,j.endIndex)}) with scopes ${j.scopes.join(", ")}`)}L=B.ruleStack}dispose(){super.dispose(),this.monacoLanguageService._requestedRichLanguages?this.monacoLanguageService._requestedRichLanguages.clear():this.logger.warn("monaco language service not found _requestedRichLanguages"),this.monacoLanguageService._requestedBasicLanguages?this.monacoLanguageService._requestedBasicLanguages.clear():this.logger.warn("monaco language service not found _requestedBasicLanguages")}};t.TextmateService=w,n.__decorate([(0,l.Autowired)(),n.__metadata("design:type",f.TextmateRegistry)],w.prototype,"textmateRegistry",void 0),n.__decorate([(0,l.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],w.prototype,"fileServiceClient",void 0),n.__decorate([(0,l.Autowired)(_.PreferenceService),n.__metadata("design:type",Object)],w.prototype,"preferenceService",void 0),n.__decorate([(0,l.Autowired)(_.ILogger),n.__metadata("design:type",Object)],w.prototype,"logger",void 0),n.__decorate([(0,l.Autowired)(E.IEditorDocumentModelService),n.__metadata("design:type",Object)],w.prototype,"editorDocumentModelService",void 0),n.__decorate([(0,l.Autowired)(v.RendererRuntime),n.__metadata("design:type",v.RendererRuntime)],w.prototype,"rendererRuntime",void 0),t.TextmateService=w=n.__decorate([(0,l.Injectable)()],w)},88412:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyContribution=t.executeProvideSubtypesCommand=t.executeProvideSupertypesCommand=t.executePrepareTypeHierarchyCommand=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(40191),_=e(28694),v=e(82196);t.executePrepareTypeHierarchyCommand={id:"_executePrepareTypeHierarchy"},t.executeProvideSupertypesCommand={id:"_executeProvideSupertypes"},t.executeProvideSubtypesCommand={id:"_executeProvideSubtypes"};const p=new l.RawContextKey("editorHasCallHierarchyProvider",!1);let m=class{registerCommands(g){g.registerCommand(t.executePrepareTypeHierarchyCommand,{execute:(a,h)=>this.typeHierarchyService.prepareTypeHierarchyProvider(a,h)}),g.registerCommand(t.executeProvideSupertypesCommand,{execute:a=>this.typeHierarchyService.provideSupertypes(a)}),g.registerCommand(t.executeProvideSubtypesCommand,{execute:a=>this.typeHierarchyService.provideSubtypes(a)})}registerEditorFeature(g){this.ctxHasProvider=p.bind(this.contextKeyService),g.registerEditorFeatureContribution({contribute:a=>{const h=a.monacoEditor;return o.Event.any(h.onDidChangeModel,h.onDidChangeModelLanguage,_.TypeHierarchyProviderRegistry.onDidChange)(()=>{h.hasModel()&&this.ctxHasProvider.set(_.TypeHierarchyProviderRegistry.has(h.getModel()))})}})}};t.TypeHierarchyContribution=m,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],m.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(_.ITypeHierarchyService),n.__metadata("design:type",Object)],m.prototype,"typeHierarchyService",void 0),t.TypeHierarchyContribution=m=n.__decorate([(0,o.Domain)(o.CommandContribution,v.BrowserEditorContribution)],m)},7795:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyService=t.TypeHierarchyModel=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(28694),_=e(96689),{isNonEmptyArray:v}=o.arrays;class p{static async create(g,a,h){const[u]=l.TypeHierarchyProviderRegistry.ordered(g);if(!u)return;const c=await u.prepareTypeHierarchy(g,a,h);if(c)return new p(c.roots.reduce((E,f)=>E+f._sessionId,""),u,c.roots,new o.RefCountedDisposable(c))}constructor(g,a,h,u){this.id=g,this.provider=a,this.roots=h,this.ref=u,this.root=h[0]}dispose(){this.ref.release()}fork(g){const a=this;return new class extends p{constructor(){super(a.id,a.provider,[g],a.ref.acquire())}}}async provideSupertypes(g,a){try{const h=await this.provider.provideSupertypes(g,a);if(v(h))return h}catch(h){(0,o.onUnexpectedExternalError)(h)}return[]}async provideSubtypes(g,a){try{const h=await this.provider.provideSubtypes(g,a);if(v(h))return h}catch(h){(0,o.onUnexpectedExternalError)(h)}return[]}}t.TypeHierarchyModel=p;let m=class{constructor(){this.models=new Map}registerTypeHierarchyProvider(g,a){l.TypeHierarchyProviderRegistry.register(g,a)}async prepareTypeHierarchyProvider(g,a){let h=this.modelService.getModelReference(o.URI.parse(g.toString())),u=h?.instance.getMonacoModel();if(h?.dispose(),!u){const c=await this.modelService.createModelReference(o.URI.parse(g.toString()));u=c.instance.getMonacoModel(),h=c}try{const c=await p.create(u,a,o.CancellationToken.None);return c?(this.models.set(c.id,c),this.models.forEach((E,f,d)=>{d.size>10&&(E.dispose(),this.models.delete(f))}),[c.root]):[]}finally{h?.dispose()}}async provideSupertypes(g){const a=this.models.get(g._sessionId);if(a)return a.provideSupertypes(g,o.CancellationToken.None)}async provideSubtypes(g){const a=this.models.get(g._sessionId);if(a)return a.provideSubtypes(g,o.CancellationToken.None)}};t.TypeHierarchyService=m,n.__decorate([(0,r.Autowired)(_.IEditorDocumentModelService),n.__metadata("design:type",Object)],m.prototype,"modelService",void 0),t.TypeHierarchyService=m=n.__decorate([(0,r.Injectable)()],m)},39266:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserMultiDiffEditor=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),_=e(28423),v=e(72665),p=e(65034),m=e(104),s=e(19087),g=e(55113),a=e(64335),h=e(30526),u=e(96689),c=e(82196);let E=class extends l.WithEventBus{constructor(d,y,b){super(),this.multiDiffWidget=d,this.convertedOptions=y,this.editorCollectionService=b,this.multiDiffModelChangeEmitter=new l.Emitter,this.onMultiDiffModelChange=this.multiDiffModelChangeEmitter.event,this.viewStateMap=new Map,this.editorCollectionService.addMultiDiffEditors([this])}onDocModelContentChangedEvent(d){var y;this.currentUri&&(((y=this.multiDiffModel)===null||y===void 0?void 0:y.documents.value)==="loading"||!this.multiDiffModel.documents.value.some(b=>{var A;return((A=b.object.modified)===null||A===void 0?void 0:A.uri.toString())===d.payload.uri.codeUri.toString()})||this.eventBus.fire(new c.ResourceDecorationNeedChangeEvent({uri:this.currentUri,decoration:{dirty:!!d.payload.dirty,readOnly:!!d.payload.readonly}})))}saveViewState(d){if(!d)return;const y=d.toString(),b=this.multiDiffWidget.getViewState();b&&this.viewStateMap.set(y,b)}restoreViewState(d){if(!d)return;const y=d.toString(),b=this.viewStateMap.get(y);b&&this.multiDiffWidget.setViewState(b)}createAndRegisterEditorParts(d,y,b,A,S){const D=[];if(d){const I=this.injector.get(h.DiffEditorPart,[d.editor,()=>b,g.EditorType.MODIFIED_DIFF,S]);D.push(I)}if(y){const I=this.injector.get(h.DiffEditorPart,[y.editor,()=>A,g.EditorType.ORIGINAL_DIFF,S]);D.push(I)}this.editorCollectionService.addEditors(D)}async compareMultiple(d,y,b){var A,S;this.currentUri&&this.saveViewState(this.currentUri);const D=!((A=y.metadata.sources)===null||A===void 0)&&A.length?{resources:p.ValueWithChangeEvent.const(y.metadata.sources)}:await this.multiDiffSourceResolverService.resolve(y.uri),I=D?(0,_.observableFromValueWithChangeEvent)(this,D.resources):(0,_.constObservable)([]),w=(0,_.mapObservableArrayCached)(this,I,async(k,F)=>{var L,B;let U,W;const j=new l.DisposableStore;try{[U,W]=await Promise.all([k.originalUri?this.documentModelManager.createModelReference(k.originalUri):void 0,k.modifiedUri?this.documentModelManager.createModelReference(k.modifiedUri):void 0]),U&&j.add(U),W&&j.add(W)}catch(Z){this.messageService.error(Z.message),this.logger.error(Z);return}const Q=(L=k.modifiedUri)!==null&&L!==void 0?L:k.originalUri,G={multiDiffEditorItem:k,original:U?.instance.getMonacoModel(),modified:W?.instance.getMonacoModel(),originalInstance:U?.instance,modifiedInstance:W?.instance,contextKeys:k.contextKeys,options:{readOnly:(B=W||U)===null||B===void 0?void 0:B.instance.readonly,...this.convertedOptions.diffOptions},onOptionsDidChange:Z=>this.preferenceService.onPreferenceChanged($=>{$.affects(Q.toString())&&$.preferenceName.includes("editor")&&Z()})};return F.add(m.RefCounted.createOfNonDisposable(G,j,this))},k=>{var F,L;return JSON.stringify([(F=k.modifiedUri)===null||F===void 0?void 0:F.toString(),(L=k.originalUri)===null||L===void 0?void 0:L.toString()])}),T=(0,_.observableValue)("documents","loading"),R=(0,_.derived)(async k=>{const F=w.read(k),B=(await Promise.all(F)).filter(U=>U!==void 0);T.set(B,void 0)}),M=(0,_.recomputeInitiallyAndOnChange)(R);await R.get(),(S=this.multiDiffModel)===null||S===void 0||S.dispose(),this.multiDiffModel={dispose:()=>M.dispose(),documents:new _.ValueWithChangeEventFromObservable(T),contextKeys:D?.contextKeys};const O=this.multiDiffWidget.createViewModel(this.multiDiffModel);await O.waitForDiffs(),this.multiDiffWidget.setViewModel(O),this.multiDiffWidget.getActiveControl(),this.currentUri=y.uri,this.restoreViewState(y.uri);const x=T.get();for(const k of x){if((0,l.isString)(k))continue;const F=k.object.modified,L=k.object.original;if(!F&&!L)continue;let B=F?this.multiDiffWidget.tryGetCodeEditor(F.uri):void 0,U=L?this.multiDiffWidget.tryGetCodeEditor(L.uri):void 0;if(!B&&!U){const W=F||L;if(!W)continue;l.Event.once(W.onDidChangeAttached)(()=>{setTimeout(()=>{B=F?this.multiDiffWidget.tryGetCodeEditor(F.uri):void 0,U=L?this.multiDiffWidget.tryGetCodeEditor(L.uri):void 0,this.createAndRegisterEditorParts(B,U,k.object.modifiedInstance,k.object.originalInstance,T)},0)});continue}this.createAndRegisterEditorParts(B,U,k.object.modifiedInstance,k.object.originalInstance,T)}this.multiDiffModelChangeEmitter.fire(this.multiDiffModel)}getDiffEntry(d){return this.multiDiffWidget.findDocumentDiffItem(d.codeUri)}getCurrentDiffEntry(){var d;const y=this.multiDiffWidget.getActiveControl();if(!y)return;const b=(d=y.getOriginalEditor().getModel())===null||d===void 0?void 0:d.uri;if(b)return this.multiDiffWidget.findDocumentDiffItem(b)}reveal(d,y){this.multiDiffWidget.reveal(d,y)}collapseAll(){const d=this.multiDiffWidget.getViewState(),y={...d,docStates:Object.keys(d.docStates||{}).reduce((b,A)=>(b[A]={...d.docStates[A],collapsed:!0},b),{})};this.multiDiffWidget.setViewState(y)}expandAll(){const d=this.multiDiffWidget.getViewState(),y={...d,docStates:Object.keys(d.docStates||{}).reduce((b,A)=>(b[A]={...d.docStates[A],collapsed:!1},b),{})};this.multiDiffWidget.setViewState(y)}layout(d){this.multiDiffWidget.layout(d)}focus(){const d=this.multiDiffWidget.getActiveControl();d&&d.focus()}tryGetCodeEditor(d){return this.multiDiffWidget.tryGetCodeEditor(d.codeUri)}dispose(){super.dispose(),this.multiDiffWidget.dispose()}};t.BrowserMultiDiffEditor=E,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],E.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(v.IMessageService),n.__metadata("design:type",Object)],E.prototype,"messageService",void 0),n.__decorate([(0,r.Autowired)(u.IEditorDocumentModelService),n.__metadata("design:type",Object)],E.prototype,"documentModelManager",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],E.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(a.IMultiDiffSourceResolverService),n.__metadata("design:type",Object)],E.prototype,"multiDiffSourceResolverService",void 0),n.__decorate([(0,r.Autowired)(l.ILogger),n.__metadata("design:type",Object)],E.prototype,"logger",void 0),n.__decorate([(0,l.OnEvent)(u.EditorDocumentModelContentChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[u.EditorDocumentModelContentChangedEvent]),n.__metadata("design:returntype",void 0)],E.prototype,"onDocModelContentChangedEvent",null),t.BrowserMultiDiffEditor=E=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[s.MultiDiffEditorWidget,Object,Function])],E)},86997:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiDiffResolver=void 0;const n=e(85608),r=e(76003),o=e(65034),l=e(64335);let _=class{constructor(){this.sourceValues=new Map}registerSources(p,m){const s=p.toString(),g=this.sourceValues.get(s);g?g.value=m:this.sourceValues.set(s,new o.ValueWithChangeEvent(m))}canHandleUri(p){return p.scheme===l.MULTI_DIFF_SCHEME}async resolveDiffSource(p){const m=this.sourceValues.get(p.toString());if(m)return{resources:m}}dispose(){this.sourceValues.clear()}};t.MultiDiffResolver=_,t.MultiDiffResolver=_=n.__decorate([(0,r.Injectable)()],_)},73691:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiDiffResourceProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26542),_=e(14951),v=e(23418),p=e(64335);let m=class extends o.WithEventBus{handlesUri(g){const a=this.multiDiffSourceResolverService.getResolvers();for(const h of a)if(h.canHandleUri(g))return 10;return-1}async provideResource(g){var a;const{name:h,sources:u}=g.getParsedQuery(),c=u?JSON.parse(u):[],E=c.length>0?new o.URI(c[0].modifiedUri):void 0,f=E?this.labelService.getIcon(E):void 0;return{name:`Multi-Diff: ${h||c.length+" files"}`,icon:f||(0,o.getIcon)("diff"),uri:g,supportsRevive:(a=this.appConfig.enableDiffRevive)!==null&&a!==void 0?a:!1,metadata:{sources:c}}}async shouldCloseResource(g,a){return!0}};t.MultiDiffResourceProvider=m,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",l.LabelService)],m.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(v.ResourceService),n.__metadata("design:type",v.ResourceService)],m.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(_.IFileServiceClient),n.__metadata("design:type",Object)],m.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(p.IMultiDiffSourceResolverService),n.__metadata("design:type",Object)],m.prototype,"multiDiffSourceResolverService",void 0),t.MultiDiffResourceProvider=m=n.__decorate([(0,r.Injectable)()],m)},36168:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiDiffEditorContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),_=e(23418),v=e(64335),p=e(82196),m=e(86997),s=e(73691);let g=class{registerMultiDiffSourceResolver(h){return h.registerResolver(this.multiDiffResolver)}registerResource(h){h.registerResourceProvider(this.multiDiffResourceProvider)}registerEditorComponent(h){h.registerEditorComponentResolver(u=>{const c=this.multiDiffSourceResolverService.getResolvers();for(const E of c)if(E.canHandleUri(o.URI.from({scheme:u,path:"empty"})))return 10;return-1},(u,c)=>{c.push({type:p.EditorOpenType.multiDiff})})}registerCommands(h){h.registerCommand(o.MULTI_DIFF_EDITOR_COMMANDS.COLLAPSE_FILES,{execute:()=>{var u;const c=this.workbenchEditorService.currentEditorGroup;((u=c.currentOpenType)===null||u===void 0?void 0:u.type)===p.EditorOpenType.multiDiff&&c.multiDiffEditor.collapseAll()}}),h.registerCommand(o.MULTI_DIFF_EDITOR_COMMANDS.EXPAND_FILES,{execute:()=>{var u;const c=this.workbenchEditorService.currentEditorGroup;((u=c.currentOpenType)===null||u===void 0?void 0:u.type)===p.EditorOpenType.multiDiff&&c.multiDiffEditor.expandAll()}})}registerMenus(h){h.registerMenuItems(l.MenuId.EditorTitle,[{command:{id:o.MULTI_DIFF_EDITOR_COMMANDS.COLLAPSE_FILES.id,label:(0,o.localize)("multiDiffEditor.action.collapseFiles")},iconClass:"codicon codicon-collapse-all",group:"navigation",when:"isInMultiDiffEditor"}]),h.registerMenuItems(l.MenuId.EditorTitle,[{command:{id:o.MULTI_DIFF_EDITOR_COMMANDS.EXPAND_FILES.id,label:(0,o.localize)("multiDiffEditor.action.expandFiles")},iconClass:"codicon codicon-expand-all",group:"navigation",when:"isInMultiDiffEditor"}])}};t.MultiDiffEditorContribution=g,n.__decorate([(0,r.Autowired)(v.IMultiDiffSourceResolverService),n.__metadata("design:type",Object)],g.prototype,"multiDiffSourceResolverService",void 0),n.__decorate([(0,r.Autowired)(m.MultiDiffResolver),n.__metadata("design:type",m.MultiDiffResolver)],g.prototype,"multiDiffResolver",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.MultiDiffResourceProvider)],g.prototype,"multiDiffResourceProvider",void 0),n.__decorate([(0,r.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],g.prototype,"workbenchEditorService",void 0),t.MultiDiffEditorContribution=g=n.__decorate([(0,o.Domain)(p.BrowserEditorContribution,p.MultiDiffSourceContribution,l.MenuContribution,o.CommandContribution)],g)},94558:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiDiffSourceResolverService=void 0;const n=e(85608),r=e(76003),o=e(70392);let l=class{constructor(){this._resolvers=new Set}registerResolver(v){if(this._resolvers.has(v))throw new Error("Duplicate resolver");return this._resolvers.add(v),(0,o.toDisposable)(()=>this._resolvers.delete(v))}resolve(v){for(const p of this._resolvers)if(p.canHandleUri(v))return p.resolveDiffSource(v);return Promise.resolve(void 0)}getResolvers(){return Array.from(this._resolvers)}};t.MultiDiffSourceResolverService=l,t.MultiDiffSourceResolverService=l=n.__decorate([(0,r.Injectable)()],l)},93532:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationMenuModel=t.NavigationBarViewService=t.NavigationMenuContainer=t.NavigationMenu=t.NavigationItem=t.NavigationBar=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(76003),_=e(97267),v=e(41869),p=e(28423),m=e(26209),s=n.__importDefault(e(69418)),g=e(82196),a=e(50674),h=({editorGroup:d})=>{const y=(0,v.useInjectable)(g.IBreadCrumbService),b=(0,v.useDesignStyles)(s.default.navigation_container,"navigation_container"),A=(0,v.useDesignStyles)(s.default.navigation_icon,"navigation_icon");if((0,a.useUpdateOnGroupTabChange)(d),(0,v.useUpdateOnEvent)(y.onDidUpdateBreadCrumbResults,[],D=>{var I;const w=d.currentEditor&&d.currentEditor.currentDocumentModel?d.currentEditor:null,T=d.currentEditor&&d.currentEditor.currentDocumentModel?d.currentEditor.currentDocumentModel.uri:(I=d.currentResource)===null||I===void 0?void 0:I.uri;return!!T&&D.editor===w&&D.uri.isEqual(T)}),d.resources.length===0||!d.currentResource)return null;let S;return d.currentEditor&&d.currentEditor.currentDocumentModel?S=y.getBreadCrumbs(d.currentEditor.currentDocumentModel.uri,d.currentEditor):S=y.getBreadCrumbs(d.currentResource.uri,null),S?S.length===0?null:o.default.createElement("div",{className:(0,r.default)("kt-navigation-container",b),onContextMenu:D=>{D.preventDefault()}},S.map((D,I)=>o.default.createElement(o.default.Fragment,{key:I+"-crumb:"+D.name},I>0&&o.default.createElement(_.Icon,{icon:"right",size:"small",className:A}),o.default.createElement(t.NavigationItem,{part:D,editorGroup:d})))):null};t.NavigationBar=h,t.NavigationItem=(0,o.memo)(({part:d,editorGroup:y})=>{const b=(0,v.useInjectable)(E),A=(0,v.useInjectable)(m.BreadCrumbsMenuService),S=(0,o.useRef)(),D=(0,v.useDesignStyles)(s.default["navigation-part"],"navigation-part"),I=(0,o.useCallback)(async()=>{if(d.getSiblings&&S.current){const{left:w,top:T,height:R}=S.current.getBoundingClientRect(),M=await d.getSiblings();let O=w;window.innerWidth-O<210&&(O=window.innerWidth-200-5),b.showMenu(M.parts,O,T+R+5,M.currentIndex,d.uri,y)}},[S.current,d]);return o.default.createElement("span",{onClick:I,onContextMenu:w=>{!d.isSymbol&&d.uri&&A.show(w.nativeEvent.x,w.nativeEvent.y,y,d.uri),w.preventDefault()},className:D,ref:S},d.icon&&o.default.createElement("span",{className:d.icon}),o.default.createElement("span",null,d.name))});const u=({model:d})=>{let y=window.innerHeight-d.y-20,b=d.y;const A=d.parts.length*22;y<100&&y<A&&(y=100,b=window.innerHeight-20-y);const S=(0,o.useRef)(),D=(0,v.useDesignStyles)(s.default.navigation_menu,"navigation_menu"),I=(0,v.useDesignStyles)(s.default.navigation_menu_item,"navigation_menu_item"),w=(0,v.useInjectable)(E),T=(0,v.useAutorun)(d.subMenu),R=(0,o.useCallback)(()=>{v.fastdom.measure(()=>{try{if(S.current){const M=S.current.querySelector(`.${s.default.navigation_menu_item_current}`);M&&M.scrollIntoView({behavior:"auto",block:"center"})}}catch{}})},[S.current]);return o.default.createElement("div",{className:D,style:{left:d.x+"px",top:b+"px",maxHeight:y+"px",height:A+"px"}},o.default.createElement(_.Scrollbars,{className:s.default.navigation_menu_items,universal:!0,forwardedRef:M=>{S.current=M,R()}},d.parts.map((M,O)=>{let x;const k=M.getChildren?async()=>{if(x){const{left:L,top:B,width:U}=x.getBoundingClientRect();let W=L+U+5;window.innerWidth-W<210&&(W=L-U-5);const j=await M.getChildren();d.showSubMenu(j,W,B,d)}}:void 0,F=M.onClick?()=>{M.onClick(),w.dispose()}:void 0;return o.default.createElement("div",{onClick:F||k,ref:L=>x=L,className:(0,r.default)(I,{[s.default.navigation_menu_item_current]:O===d.initialIndex}),key:"menu-"+M.name},o.default.createElement("span",{className:M.icon||(0,v.getIcon)("smile")}),o.default.createElement("span",{className:s.default.navigation_menu_item_label},M.name),M.getChildren&&o.default.createElement("span",{className:s.default.navigation_right,onClick:F&&k?L=>{L.stopPropagation(),k()}:void 0},o.default.createElement(_.Icon,{icon:"right",size:"small"})))})),T&&o.default.createElement(t.NavigationMenu,{model:T}))};t.NavigationMenu=u;const c=()=>{const d=(0,o.useRef)(),y=(0,v.useInjectable)(E),b=(0,v.useAutorun)(y.current);return(0,o.useEffect)(()=>{if(d.current){const A=new v.Disposable;return A.addDispose(new v.DomListener(window,"mouseup",()=>{y.dispose()})),A.addDispose(new v.DomListener(d.current,"mouseup",S=>{S.stopPropagation()})),A.dispose.bind(A)}}),b?o.default.createElement("div",{tabIndex:1,ref:d},o.default.createElement(t.NavigationMenu,{model:b})):null};t.NavigationMenuContainer=c;let E=class{constructor(){this.current=(0,p.observableValue)(this,null)}showMenu(y,b,A,S,D,I){(0,p.transaction)(w=>{this.current.set(new f(y,b,A,S,D),w)})}dispose(){(0,p.transaction)(y=>{const b=this.current.get();b?.dispose(),this.current.set(null,y)})}};t.NavigationBarViewService=E,t.NavigationBarViewService=E=n.__decorate([(0,l.Injectable)()],E);class f{constructor(y,b,A,S=-1,D){this.parts=y,this.x=b,this.y=A,this.initialIndex=S,this.uri=D,this.subMenu=(0,p.observableValue)(this,null)}showSubMenu(y,b,A,S){(0,p.transaction)(D=>{this.subMenu.set(new f(y,b,A,-1,S),D)})}dispose(){(0,p.transaction)(y=>{const b=this.subMenu.get();b?.dispose(),this.subMenu.set(null,y)})}}t.NavigationMenuModel=f},71145:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookService=void 0;const n=e(85608),r=e(76003),o=e(41869);let l=class extends o.WithEventBus{constructor(){super(...arguments),this._onDidOpenNotebookDocument=new o.Emitter,this.onDidOpenNotebookDocument=this._onDidOpenNotebookDocument.event,this._onDidCloseNotebookDocument=new o.Emitter,this.onDidCloseNotebookDocument=this._onDidCloseNotebookDocument.event,this._onDidSaveNotebookDocument=new o.Emitter,this.onDidSaveNotebookDocument=this._onDidSaveNotebookDocument.event,this._onDidChangeNotebookDocument=new o.Emitter,this.onDidChangeNotebookDocument=this._onDidChangeNotebookDocument.event}};t.NotebookService=l,t.NotebookService=l=n.__decorate([(0,r.Injectable)()],l)},34885:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorPreferenceContribution=void 0;const n=e(85608),r=e(41869),o=e(24328);let l=class{constructor(){this.schema=o.editorPreferenceSchema}};t.EditorPreferenceContribution=l,t.EditorPreferenceContribution=l=n.__decorate([(0,r.Domain)(r.PreferenceContribution)],l)},6043:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.diffEditorOptionsConverters=t.textModelUpdateOptionsConverters=t.editorOptionsConverters=void 0,t.isEditorOption=l,t.isDiffEditorOption=_,t.getConvertedMonacoOptions=s;const n=e(41869),{removeUndefined:r}=n.objects;t.editorOptionsConverters=new Map([["editor.ariaLabel",{monaco:"ariaLabel"}],["editor.rulers",{monaco:"rulers"}],["editor.wordSeparators",{monaco:"wordSeparators"}],["editor.selectionClipboard",{monaco:"selectionClipboard"}],["editor.lineNumbers",{monaco:"lineNumbers"}],["editor.renderFinalNewline",{monaco:"renderFinalNewline"}],["editor.selectOnLineNumbers",{monaco:"selectOnLineNumbers"}],["editor.lineNumbersMinChars",{monaco:"lineNumbersMinChars"}],["editor.glyphMargin",{monaco:"glyphMargin"}],["editor.lineDecorationsWidth",{monaco:"lineDecorationsWidth"}],["editor.revealHorizontalRightPadding",{monaco:"revealHorizontalRightPadding"}],["editor.roundedSelection",{monaco:"roundedSelection"}],["editor.extraEditorClassName",{monaco:"extraEditorClassName"}],["editor.readOnly",{monaco:"readOnly"}],["editor.scrollbar",{monaco:"scrollbar"}],["editor.minimap",{monaco:"minimap",convert:g=>({enabled:g})}],["editor.find",{monaco:"find"}],["editor.fixedOverflowWidgets",{monaco:"fixedOverflowWidgets"}],["editor.overviewRulerLanes",{monaco:"overviewRulerLanes"}],["editor.overviewRulerBorder",{monaco:"overviewRulerBorder"}],["editor.cursorBlinking",{monaco:"cursorBlinking"}],["editor.mouseWheelZoom",{monaco:"mouseWheelZoom"}],["editor.cursorSmoothCaretAnimation",{monaco:"cursorSmoothCaretAnimation"}],["editor.cursorStyle",{monaco:"cursorStyle"}],["editor.cursorWidth",{monaco:"cursorWidth"}],["editor.fontLigatures",{monaco:"fontLigatures"}],["editor.columnSelection",{monaco:"columnSelection"}],["editor.disableLayerHinting",{monaco:"disableLayerHinting"}],["editor.disableMonospaceOptimizations",{monaco:"disableMonospaceOptimizations"}],["editor.hideCursorInOverviewRuler",{monaco:"hideCursorInOverviewRuler"}],["editor.scrollBeyondLastLine",{monaco:"scrollBeyondLastLine"}],["editor.scrollBeyondLastColumn",{monaco:"scrollBeyondLastColumn"}],["editor.smoothScrolling",{monaco:"smoothScrolling"}],["editor.automaticLayout",{monaco:"automaticLayout"}],["editor.wordWrap",{monaco:"wordWrap"}],["editor.wordWrapColumn",{monaco:"wordWrapColumn"}],["editor.wordWrapMinified",{monaco:"wordWrapMinified"}],["editor.wrappingIndent",{monaco:"wrappingIndent"}],["editor.wordWrapBreakBeforeCharacters",{monaco:"wordWrapBreakBeforeCharacters"}],["editor.wordWrapBreakAfterCharacters",{monaco:"wordWrapBreakAfterCharacters"}],["editor.wordWrapBreakObtrusiveCharacters",{monaco:"wordWrapBreakObtrusiveCharacters"}],["editor.stopRenderingLineAfter",{monaco:"stopRenderingLineAfter"}],["editor.hover",{monaco:"hover"}],["editor.links",{monaco:"links"}],["editor.colorDecorators",{monaco:"colorDecorators"}],["editor.contextmenu",{monaco:"contextmenu"}],["editor.mouseWheelScrollSensitivity",{monaco:"mouseWheelScrollSensitivity"}],["editor.fastScrollSensitivity",{monaco:"fastScrollSensitivity"}],["editor.multiCursorModifier",{monaco:"multiCursorModifier"}],["editor.multiCursorMergeOverlapping",{monaco:"multiCursorMergeOverlapping"}],["editor.accessibilitySupport",{monaco:"accessibilitySupport"}],["editor.suggest",{monaco:"suggest"}],["editor.gotoLocation",{monaco:"gotoLocation"}],["editor.quickSuggestions",{monaco:"quickSuggestions"}],["editor.quickSuggestionsDelay",{monaco:"quickSuggestionsDelay"}],["editor.parameterHints",{monaco:"parameterHints"}],["editor.autoClosingBrackets",{monaco:"autoClosingBrackets"}],["editor.autoClosingQuotes",{monaco:"autoClosingQuotes"}],["editor.autoSurround",{monaco:"autoSurround"}],["editor.autoIndent",{monaco:"autoIndent"}],["editor.formatOnType",{monaco:"formatOnType"}],["editor.formatOnPaste",{monaco:"formatOnPaste"}],["editor.dragAndDrop",{monaco:"dragAndDrop"}],["editor.suggestOnTriggerCharacters",{monaco:"suggestOnTriggerCharacters"}],["editor.acceptSuggestionOnEnter",{monaco:"acceptSuggestionOnEnter"}],["editor.acceptSuggestionOnCommitCharacter",{monaco:"acceptSuggestionOnCommitCharacter"}],["editor.snippetSuggestions",{monaco:"snippetSuggestions"}],["editor.emptySelectionClipboard",{monaco:"emptySelectionClipboard"}],["editor.copyWithSyntaxHighlighting",{monaco:"copyWithSyntaxHighlighting"}],["editor.wordBasedSuggestions",{monaco:"wordBasedSuggestions"}],["editor.suggestSelection",{monaco:"suggestSelection"}],["editor.suggestFontSize",{monaco:"suggestFontSize"}],["editor.suggestLineHeight",{monaco:"suggestLineHeight"}],["editor.tabCompletion",{monaco:"tabCompletion"}],["editor.selectionHighlight",{monaco:"selectionHighlight"}],["editor.occurrencesHighlight",{monaco:"occurrencesHighlight"}],["editor.codeLens",{monaco:"codeLens"}],["editor.lightbulb",{monaco:"lightbulb"}],["editor.codeActionsOnSave",{monaco:"codeActionsOnSave"}],["editor.codeActionsOnSaveTimeout",{monaco:"codeActionsOnSaveTimeout"}],["editor.folding",{monaco:"folding"}],["editor.foldingStrategy",{monaco:"foldingStrategy"}],["editor.showFoldingControls",{monaco:"showFoldingControls"}],["editor.matchBrackets",{monaco:"matchBrackets"}],["editor.renderWhitespace",{monaco:"renderWhitespace"}],["editor.renderControlCharacters",{monaco:"renderControlCharacters"}],["editor.renderIndentGuides",{monaco:"guides.indentation"}],["editor.highlightActiveIndentGuide",{monaco:"guides.highlightActiveIndentation"}],["editor.guides",{monaco:"guides"}],["editor.renderLineHighlight",{monaco:"renderLineHighlight"}],["editor.useTabStops",{monaco:"useTabStops"}],["editor.fontFamily",{monaco:"fontFamily"}],["editor.fontWeight",{monaco:"fontWeight"}],["editor.fontSize",{monaco:"fontSize"}],["editor.lineHeight",{monaco:"lineHeight"}],["editor.letterSpacing",{monaco:"letterSpacing"}],["editor.showUnused",{monaco:"showUnused"}],["editor.rename.enablePreview",{monaco:"editor.rename.enablePreview"}],["editor.semanticHighlighting",{monaco:"semanticHighlighting"}],["editor.bracketPairColorization",{monaco:"bracketPairColorization"}],["editor.wrappingStrategy",{monaco:"wrappingStrategy"}],["editor.experimental.stickyScroll.enabled",{monaco:"experimental",convert:g=>({stickyScroll:{enabled:g}})}],["editor.forceReadOnly",{monaco:"readOnly",convert:g=>{if(g)return!0}}],["editor.unicodeHighlight",{monaco:"unicodeHighlight"}],["editor.inlineSuggest.showToolbar",{monaco:"inlineSuggest",convert:g=>{if(g)return{showToolbar:g}}}]]),t.textModelUpdateOptionsConverters=new Map([["editor.tabSize",{monaco:"tabSize"}],["editor.indentSize",{monaco:"indentSize"}],["editor.insertSpaces",{monaco:"insertSpaces"}],["editor.trimAutoWhitespace",{monaco:"trimAutoWhitespace"}]]),t.diffEditorOptionsConverters=new Map([["diffEditor.enableSplitViewResizing",{monaco:"enableSplitViewResizing"}],["diffEditor.renderSideBySide",{monaco:"renderSideBySide"}],["diffEditor.ignoreTrimWhitespace",{monaco:"ignoreTrimWhitespace"}],["diffEditor.renderIndicators",{monaco:"renderIndicators"}],["diffEditor.originalEditable",{monaco:"originalEditable"}],["diffEditor.minimap",{monaco:"minimap",convert:g=>({enabled:g})}],["diffEditor.experimental.stickyScroll.enabled",{monaco:"experimental",convert:g=>({stickyScroll:{enabled:g}})}],["diffEditor.hideUnchangedRegions.enabled",{monaco:"hideUnchangedRegions",convert:g=>({enabled:g})}],["diffEditor.hideUnchangedRegions.revealLineCount",{monaco:"hideUnchangedRegions",convert:g=>({revealLineCount:g})}],["diffEditor.hideUnchangedRegions.minimumLineCount",{monaco:"hideUnchangedRegions",convert:g=>({minimumLineCount:g})}],["diffEditor.hideUnchangedRegions.contextLineCount",{monaco:"hideUnchangedRegions",convert:g=>({contextLineCount:g})}],["diffEditor.experimental.showMoves",{monaco:"experimental",convert:g=>({showMoves:g})}],["diffEditor.experimental.showEmptyDecorations",{monaco:"experimental",convert:g=>({showEmptyDecorations:g})}]]);function o(g,a){if(a.has(g))return!0;{const h=a.keys();for(const u of h)if(g.startsWith(u))return!0}return!1}function l(g){return o(g,t.editorOptionsConverters)||o(g,t.textModelUpdateOptionsConverters)||o(g,t.diffEditorOptionsConverters)}function _(g){return o(g,t.diffEditorOptionsConverters)}const v=[...t.editorOptionsConverters.keys()],p=[...t.textModelUpdateOptionsConverters.keys()],m=[...t.diffEditorOptionsConverters.keys()];function s(g,a,h,u){const c=a?n.Uri.parse(a):void 0,E=(D,I)=>D.reduce((w,T)=>{const R=g.getValue(T,{resource:c,overrideIdentifier:h});if(R!==void 0){const M=I.get(T);if(!M)return w[T]=R,w;const O=M?M.monaco:T,x=M?.convert?M.convert(R):R;w[O]?Object.assign(w[O],x):w[O]=x}return w},{}),f=u?u.filter(D=>t.editorOptionsConverters.has(D)):[...v],d=u?u.filter(D=>t.textModelUpdateOptionsConverters.has(D)):[...p],y=u?u.filter(D=>t.diffEditorOptionsConverters.has(D)):[...m],b=r(E(f,t.editorOptionsConverters)),A=r(E(d,t.textModelUpdateOptionsConverters)),S=r(E(y,t.diffEditorOptionsConverters));return{editorOptions:b,modelOptions:A,diffOptions:S}}},24328:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorPreferences=t.editorPreferenceSchema=t.DIFF_EDITOR_DEFAULTS=t.EDITOR_DEFAULTS=t.EDITOR_INLINE_SUGGEST_DEFAULTS=t.EDITOR_SUGGEST_DEFAULTS=t.EDITOR_MODEL_DEFAULTS=t.EDITOR_FONT_DEFAULTS=t.USUAL_WORD_SEPARATORS=void 0;const n=e(41869),r=e(82196);t.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";const o="Consolas, 'Courier New', monospace",l="Menlo, Monaco, 'Courier New', monospace",_="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'";t.EDITOR_FONT_DEFAULTS={fontFamily:n.isOSX?l:n.isLinux?_:o,fontWeight:"normal",fontSize:12,tabSize:2,renderWhitespace:!1,cursorStyle:"line",insertSpace:!0,wordWrap:"off",wordWrapColumn:80,lineHeight:0,letterSpacing:0},t.EDITOR_MODEL_DEFAULTS={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},t.EDITOR_SUGGEST_DEFAULTS={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,maxVisibleSuggestions:12,showMethods:!0,showFunctions:!0,showConstructors:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0,detailsVisible:!0,preview:!0,statusBar:{visible:!1}},t.EDITOR_INLINE_SUGGEST_DEFAULTS={enabled:!0,showToolbar:"onHover"},t.EDITOR_DEFAULTS={inDiffEditor:!1,wordSeparators:t.USUAL_WORD_SEPARATORS,lineNumbersMinChars:3,lineDecorationsWidth:10,readOnly:!1,columnSelection:!1,mouseStyle:"text",disableLayerHinting:!1,automaticLayout:!0,wordWrap:"off",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:1,wordWrapBreakBeforeCharacters:"([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B",wordWrapBreakAfterCharacters:" })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63",wordWrapBreakObtrusiveCharacters:".",autoClosingBrackets:"languageDefined",autoClosingQuotes:"languageDefined",autoSurround:"languageDefined",autoIndent:!0,dragAndDrop:!0,emptySelectionClipboard:!0,copyWithSyntaxHighlighting:!0,useTabStops:!0,multiCursorModifier:"altKey",multiCursorMergeOverlapping:!0,accessibilitySupport:"off",showUnused:!0,wrappingStrategy:"simple",viewInfo:{extraEditorClassName:"",disableMonospaceOptimizations:!1,rulers:[],ariaLabel:(0,n.localize)("editorViewAccessibleLabel","Editor Content"),renderLineNumbers:0,renderCustomLineNumbers:null,renderFinalNewline:!0,selectOnLineNumbers:!0,glyphMargin:!0,revealHorizontalRightPadding:30,roundedSelection:!0,overviewRulerLanes:2,overviewRulerBorder:!0,cursorBlinking:1,mouseWheelZoom:!1,cursorSmoothCaretAnimation:!1,cursorStyle:1,cursorWidth:0,hideCursorInOverviewRuler:!1,scrollBeyondLastLine:!0,scrollBeyondLastColumn:5,smoothScrolling:!1,stopRenderingLineAfter:1e4,renderWhitespace:"none",renderControlCharacters:!1,fontLigatures:!1,renderLineHighlight:"none",scrollbar:{vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:10,horizontalSliderSize:10,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,mouseWheelScrollSensitivity:1,fastScrollSensitivity:5},minimap:{enabled:!0,side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120},guides:{indentation:!0,highlightActiveIndentGuide:!0,bracketPairs:!0},fixedOverflowWidgets:!0},contribInfo:{selectionClipboard:!0,hover:{enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0},links:!0,contextmenu:!0,quickSuggestions:{other:!0,comments:!1,strings:!1},quickSuggestionsDelay:10,parameterHints:{enabled:!0,cycle:!1},formatOnType:!1,formatOnPaste:!1,suggestOnTriggerCharacters:!0,acceptSuggestionOnEnter:"on",acceptSuggestionOnCommitCharacter:!0,wordBasedSuggestions:!1,suggestSelection:"recentlyUsed",suggestFontSize:0,suggestLineHeight:0,tabCompletion:"off",gotoLocation:{multiple:"peek"},selectionHighlight:!0,occurrencesHighlight:!0,codeLens:!0,folding:!0,foldingStrategy:"auto",showFoldingControls:"mouseover",matchBrackets:!0,find:{seedSearchStringFromSelection:!0,autoFindInSelection:!1,globalFindClipboard:!1,addExtraSpaceOnTop:!0},colorDecorators:!0,lightbulbEnabled:r.ShowLightbulbIconMode.On,codeActionsOnSave:{},codeActionsOnSaveTimeout:750}},t.DIFF_EDITOR_DEFAULTS={renderIndicators:!0,minimap:!1,renderSideBySide:!0,ignoreTrimWhitespace:!1,hideUnchangedRegions:{enabled:!0,revealLineCount:20,minimumLineCount:3,contextLineCount:3},experimental:{showMoves:!1,showEmptyDecorations:!0,collapseUnchangedRegions:!0,stickyScroll:{enable:!1}}};const v={"editor.ariaLabel":{type:"string",default:t.EDITOR_DEFAULTS.viewInfo.ariaLabel,description:"%editor.configuration.ariaLabel%"},"editor.extraEditorClassName":{type:"string",description:"%editor.configuration.extraEditorClassName%"},"editor.fixedOverflowWidgets":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.fixedOverflowWidgets,description:"%editor.configuration.fixedOverflowWidgets%"},"editor.revealHorizontalRightPadding":{type:"number",description:"%editor.configuration.revealHorizontalRightPadding%"},"editor.selectOnLineNumbers":{type:"boolean",description:"%editor.configuration.selectOnLineNumbers%"},"editor.wordWrapMinified":{type:"boolean",description:"%editor.configuration.wordWrapMinified%"},"editor.wordWrapBreakAfterCharacters":{type:"string",default:" })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63",description:"%editor.configuration.wordWrapBreakAfterCharacters%"},"editor.wrappingStrategy":{type:"string",enum:["advanced","simple"],default:"simple",description:"%editor.configuration.wrappingStrategy%"},"editor.wordWrapBreakBeforeCharacters":{type:"string",default:"([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B",description:"%editor.configuration.wordWrapBreakBeforeCharacters%"},"editor.lineNumbersMinChars":{type:"number",default:t.EDITOR_DEFAULTS.lineNumbersMinChars,description:"%editor.configuration.lineNumbersMinChars%"},"editor.lineDecorationsWidth":{type:"number",default:t.EDITOR_DEFAULTS.lineDecorationsWidth,description:"%editor.configuration.lineDecorationsWidth%"},"editor.fontFamily":{type:"string",default:t.EDITOR_FONT_DEFAULTS.fontFamily,description:"%editor.configuration.fontFamily%"},"editor.fontWeight":{type:"string",default:t.EDITOR_FONT_DEFAULTS.fontWeight,description:"%editor.configuration.fontWeight%"},"editor.fontSize":{type:"number",default:t.EDITOR_FONT_DEFAULTS.fontSize,description:(0,n.localize)("fontSize","Controls the font size in pixels.")},"editor.lineHeight":{type:"number",default:t.EDITOR_FONT_DEFAULTS.lineHeight,description:(0,n.localize)("lineHeight","Controls the line height. Use 0 to compute the line height from the font size.")},"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[(0,n.localize)("editor.configuration.suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),(0,n.localize)("editor.configuration.suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:"insert",description:"%editor.configuration.suggest.insertMode%"},"editor.suggest.filterGraceful":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.filterGraceful,description:"%editor.configuration.suggest.filterGraceful%"},"editor.suggest.localityBonus":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.localityBonus,description:"%editor.configuration.suggest.localityBonus%"},"editor.suggest.shareSuggestSelections":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.shareSuggestSelections,description:"%editor.configuration.suggest.shareSuggestSelections%"},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.snippetsPreventQuickSuggestions,description:"%editor.configuration.suggest.snippetsPreventQuickSuggestions%"},"editor.suggest.showIcons":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.showIcons,description:"%editor.configuration.suggest.showIcons%"},"editor.suggest.maxVisibleSuggestions":{type:"number",default:t.EDITOR_SUGGEST_DEFAULTS.maxVisibleSuggestions,minimum:1,maximum:15,description:"%editor.configuration.suggest.maxVisibleSuggestions%"},"editor.suggest.showMethods":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showMethods%"},"editor.suggest.showFunctions":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showFunctions%"},"editor.suggest.showConstructors":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showConstructors%"},"editor.suggest.showFields":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showFields%"},"editor.suggest.showVariables":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showVariables%"},"editor.suggest.showClasses":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showClasss%"},"editor.suggest.showStructs":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showStructs%"},"editor.suggest.showInterfaces":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showInterfaces%"},"editor.suggest.showModules":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showModules%"},"editor.suggest.showProperties":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showPropertys%"},"editor.suggest.showEvents":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showEvents%"},"editor.suggest.showOperators":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showOperators%"},"editor.suggest.showUnits":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showUnits%"},"editor.suggest.showValues":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showValues%"},"editor.suggest.showConstants":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showConstants%"},"editor.suggest.showEnums":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showEnums%"},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showEnumMembers%"},"editor.suggest.showKeywords":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showKeywords%"},"editor.suggest.showWords":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showTexts%"},"editor.suggest.showColors":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showColors%"},"editor.suggest.showFiles":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showFiles%"},"editor.suggest.showReferences":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showReferences%"},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showCustomcolors%"},"editor.suggest.showFolders":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showFolders%"},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showTypeParameters%"},"editor.suggest.showSnippets":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showSnippets%"},"editor.suggest.showUsers":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showUsers%"},"editor.suggest.showIssues":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showIssues%"},"editor.suggest.statusBar.visible":{type:"boolean",default:!1,description:"%editor.configuration.suggest.statusBar.visible%"},"editor.suggest.preview":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.preview,description:"%editor.configuration.suggest.preview%"},"editor.suggest.details.visible":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.detailsVisible,description:"%editor.configuration.suggest.details.visible%"},"editor.inlineSuggest.enabled":{type:"boolean",default:t.EDITOR_INLINE_SUGGEST_DEFAULTS.enabled,description:"%editor.configuration.inlineSuggest.enabled%"},"editor.inlineSuggest.showToolbar":{type:"string",default:t.EDITOR_INLINE_SUGGEST_DEFAULTS.showToolbar,enum:["always","onHover","never"],enumDescriptions:[(0,n.localize)("editor.configuration.inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),(0,n.localize)("editor.configuration.inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),(0,n.localize)("editor.configuration.inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:"%editor.configuration.inlineSuggest.showToolbar%"},"editor.experimental.stickyScroll.enabled":{type:"boolean",default:!0,description:"%editor.configuration.experimental.stickyScroll%"},"editor.customCodeActionMenu.showHeaders":{type:"boolean",default:!0,description:"%editor.configuration.customCodeActionMenu.showHeaders"},"editor.useCustomCodeActionMenu":{type:"boolean",default:!0,description:"%editor.configuration.useCustomCodeActionMenu%"},"editor.letterSpacing":{type:"number",default:t.EDITOR_FONT_DEFAULTS.letterSpacing,description:"%editor.configuration.letterSpacing%"},"editor.lineNumbers":{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[(0,n.localize)("editor.configuration.lineNumbers.off","Line numbers are not rendered."),(0,n.localize)("editor.configuration.lineNumbers.on","Line numbers are rendered as absolute number."),(0,n.localize)("editor.configuration.lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),(0,n.localize)("editor.configuration.lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:"%editor.configuration.lineNumbers%"},"editor.renderFinalNewline":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.renderFinalNewline,description:"%editor.configuration.renderFinalNewline%"},"editor.rulers":{type:"array",items:{type:"number"},default:t.EDITOR_DEFAULTS.viewInfo.rulers,description:"%editor.configuration.rulers%"},"editor.wordSeparators":{type:"string",default:t.EDITOR_DEFAULTS.wordSeparators,description:"%editor.configuration.wordSeparators%"},"editor.tabSize":{type:"number",default:t.EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:"%editor.configuration.tabSize%"},"editor.insertSpaces":{type:"boolean",default:t.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:"%editor.configuration.insertSpaces%"},"editor.detectIndentation":{type:"boolean",default:t.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:"%editor.configuration.detectIndentation%"},"editor.roundedSelection":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.roundedSelection,description:"%editor.configuration.roundedSelection%"},"editor.scrollBeyondLastLine":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.scrollBeyondLastLine,description:"%editor.configuration.scrollBeyondLastLine%"},"editor.scrollBeyondLastColumn":{type:"number",default:t.EDITOR_DEFAULTS.viewInfo.scrollBeyondLastColumn,description:"%editor.configuration.scrollBeyondLastColumn%"},"editor.smoothScrolling":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.smoothScrolling,description:"%editor.configuration.smoothScrolling%"},"editor.minimap.enabled":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.minimap.enabled,description:"%editor.configuration.minimap.enabled%"},"editor.minimap.side":{type:"string",enum:["left","right"],default:t.EDITOR_DEFAULTS.viewInfo.minimap.side,description:"%editor.configuration.minimap.side%"},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:t.EDITOR_DEFAULTS.viewInfo.minimap.showSlider,description:"%editor.configuration.minimap.showSlider%"},"editor.minimap.renderCharacters":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.minimap.renderCharacters,description:"%editor.configuration.minimap.renderCharacters%"},"editor.minimap.maxColumn":{type:"number",default:t.EDITOR_DEFAULTS.viewInfo.minimap.maxColumn,description:"%editor.configuration.minimap.maxColumn%"},"editor.hover.enabled":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.hover.enabled,description:"%editor.configuration.hover.enabled%"},"editor.hover.delay":{type:"number",default:t.EDITOR_DEFAULTS.contribInfo.hover.delay,description:"%editor.configuration.hover.delay%"},"editor.hover.sticky":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.hover.sticky,description:"%editor.configuration.hover.sticky%"},"editor.hover.hidingDelay":{type:"number",default:t.EDITOR_DEFAULTS.contribInfo.hover.hidingDelay,description:"%editor.configuration.hover.hidingDelay%"},"editor.hover.above":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.hover.above,description:"%editor.configuration.hover.above%"},"editor.find.seedSearchStringFromSelection":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.find.seedSearchStringFromSelection,description:"%editor.configuration.find.seedSearchStringFromSelection%"},"editor.find.autoFindInSelection":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.find.autoFindInSelection,description:"%editor.configuration.find.autoFindInSelection%"},"editor.find.globalFindClipboard":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.find.globalFindClipboard,description:"%editor.configuration.find.globalFindClipboard%",included:n.isOSX},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:!0,description:"%editor.configuration.find.addExtraSpaceOnTop%"},"editor.wordWrap":{type:"string",enum:["off","on","wordWrapColumn","bounded"],markdownEnumDescriptions:[(0,n.localize)("editor.configuration.wordWrap.off","Lines will never wrap."),(0,n.localize)("editor.configuration.wordWrap.on","Lines will wrap at the viewport width."),(0,n.localize)("editor.configuration.wordWrap.wordWrapColumn","Lines will wrap at `#editor.wordWrapColumn#`."),(0,n.localize)("editor.configuration.wordWrap.bounded","Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],default:t.EDITOR_DEFAULTS.wordWrap,description:"%editor.configuration.wordWrap%"},"editor.wordWrapColumn":{type:"integer",default:t.EDITOR_DEFAULTS.wordWrapColumn,minimum:1,markdownDescription:"%editor.configuration.wordWrapColumn%"},"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[(0,n.localize)("editor.configuration.wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),(0,n.localize)("editor.configuration.wrappingIndent.same","Wrapped lines get the same indentation as the parent."),(0,n.localize)("editor.configuration.wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),(0,n.localize)("editor.configuration.wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],default:"same",description:"%editor.configuration.wrappingIndent%"},"editor.mouseWheelScrollSensitivity":{type:"number",default:t.EDITOR_DEFAULTS.viewInfo.scrollbar.mouseWheelScrollSensitivity,markdownDescription:"%editor.configuration.mouseWheelScrollSensitivity%"},"editor.fastScrollSensitivity":{type:"number",default:t.EDITOR_DEFAULTS.viewInfo.scrollbar.fastScrollSensitivity,markdownDescription:"%editor.configuration.fastScrollSensitivity%"},"editor.multiCursorModifier":{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,n.localize)("editor.configuration.multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,n.localize)("editor.configuration.multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"alt",markdownDescription:(0,n.localize)("multiCursorModifier","The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")},"editor.multiCursorMergeOverlapping":{type:"boolean",default:t.EDITOR_DEFAULTS.multiCursorMergeOverlapping,description:"%editor.configuration.multiCursorMergeOverlapping%"},"editor.quickSuggestions":{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:!1,description:(0,n.localize)("editor.configuration.quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:!1,description:(0,n.localize)("editor.configuration.quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:!0,description:"%editor.configuration.quickSuggestions.other%"}}}],default:t.EDITOR_DEFAULTS.contribInfo.quickSuggestions,description:"%editor.configuration.quickSuggestions%"},"editor.quickSuggestionsDelay":{type:"integer",default:t.EDITOR_DEFAULTS.contribInfo.quickSuggestionsDelay,minimum:0,description:"%editor.configuration.quickSuggestionsDelay%"},"editor.parameterHints.enabled":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.parameterHints.enabled,description:"%editor.configuration.parameterHints.enabled%"},"editor.parameterHints.cycle":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.parameterHints.cycle,description:"%editor.configuration.parameterHints.cycle%"},"editor.autoClosingBrackets":{type:"string",enum:["always","languageDefined","beforeWhitespace","never"],enumDescriptions:["",(0,n.localize)("editor.configuration.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),(0,n.localize)("editor.configuration.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],default:t.EDITOR_DEFAULTS.autoClosingBrackets,description:"%editor.configuration.autoClosingBrackets%"},"editor.autoClosingQuotes":{type:"string",enum:["always","languageDefined","beforeWhitespace","never"],enumDescriptions:["",(0,n.localize)("editor.configuration.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),(0,n.localize)("editor.configuration.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],default:t.EDITOR_DEFAULTS.autoClosingQuotes,description:"%editor.configuration.autoClosingQuotes%"},"editor.autoSurround":{type:"string",enum:["languageDefined","brackets","quotes","never"],enumDescriptions:[(0,n.localize)("editor.configuration.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),(0,n.localize)("editor.configuration.autoSurround.brackets","Surround with brackets but not quotes."),(0,n.localize)("editor.configuration.autoSurround.quotes","Surround with quotes but not brackets."),""],default:t.EDITOR_DEFAULTS.autoSurround,description:"%editor.configuration.autoSurround%"},"editor.formatOnType":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.formatOnType,description:"%editor.configuration.formatOnType%"},"editor.formatOnPaste":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.formatOnPaste,description:"%editor.configuration.formatOnPaste%"},"editor.autoIndent":{type:"boolean",default:t.EDITOR_DEFAULTS.autoIndent,description:"%editor.configuration.autoIndent%"},"editor.suggestOnTriggerCharacters":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.suggestOnTriggerCharacters,description:"%editor.configuration.suggestOnTriggerCharacters%"},"editor.acceptSuggestionOnEnter":{type:"string",enum:["on","smart","off"],default:t.EDITOR_DEFAULTS.contribInfo.acceptSuggestionOnEnter,markdownEnumDescriptions:["",(0,n.localize)("editor.configuration.acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:(0,n.localize)("editor.configuration.acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")},"editor.acceptSuggestionOnCommitCharacter":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.acceptSuggestionOnCommitCharacter,markdownDescription:(0,n.localize)("editor.configuration.acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")},"editor.snippetSuggestions":{type:"string",enum:["top","bottom","inline","none"],enumDescriptions:[(0,n.localize)("editor.configuration.snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),(0,n.localize)("editor.configuration.snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),(0,n.localize)("editor.configuration.snippetSuggestions.inline","Show snippets suggestions with other suggestions."),(0,n.localize)("editor.configuration.snippetSuggestions.none","Do not show snippet suggestions.")],default:"inline",description:"%editor.configuration.snippetSuggestions%"},"editor.emptySelectionClipboard":{type:"boolean",default:t.EDITOR_DEFAULTS.emptySelectionClipboard,description:"%editor.configuration.emptySelectionClipboard%"},"editor.copyWithSyntaxHighlighting":{type:"boolean",default:t.EDITOR_DEFAULTS.copyWithSyntaxHighlighting,description:"%editor.configuration.copyWithSyntaxHighlighting%"},"editor.wordBasedSuggestions":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.wordBasedSuggestions,description:"%editor.configuration.wordBasedSuggestions%"},"editor.suggestSelection":{type:"string",enum:["first","recentlyUsed","recentlyUsedByPrefix"],markdownEnumDescriptions:[(0,n.localize)("editor.configuration.suggestSelection.first","Always select the first suggestion."),(0,n.localize)("editor.configuration.suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),(0,n.localize)("editor.configuration.suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],default:"recentlyUsed",description:"%editor.configuration.suggestSelection%"},"editor.suggestFontSize":{type:"integer",default:0,minimum:0,markdownDescription:"%editor.configuration.suggestFontSize%"},"editor.suggestLineHeight":{type:"integer",default:0,minimum:0,markdownDescription:"%editor.configuration.suggestLineHeight%"},"editor.tabCompletion":{type:"string",default:"off",enum:["on","off","onlySnippets"],enumDescriptions:[(0,n.localize)("editor.configuration.tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),(0,n.localize)("editor.configuration.tabCompletion.off","Disable tab completions."),(0,n.localize)("editor.configuration.tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:"%editor.configuration.tabCompletion%"},"editor.suggest.filteredTypes":{type:"object",default:{keyword:!0,snippet:!0},markdownDescription:"%editor.configuration.suggest.filtered%",properties:{method:{type:"boolean",default:!0,markdownDescription:(0,n.localize)("editor.configuration.suggest.filtered.method","When set to `false` IntelliSense never shows `method` suggestions.")},function:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.function%"},constructor:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.constructor%"},field:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.field%"},variable:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.variable%"},class:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.class%"},struct:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.struct%"},interface:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.interface%"},module:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.module%"},property:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.property%"},event:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.event%"},operator:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.operator%"},unit:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.unit%"},value:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.value"},constant:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.constant%"},enum:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.enum%"},enumMember:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.enumMember%"},keyword:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.keyword%"},text:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.text%"},color:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.color%"},file:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.file%"},reference:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.reference%"},customcolor:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.customcolor%"},folder:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.folder%"},typeParameter:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.typeParameter%"},snippet:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.snippet%"}}},"editor.gotoLocation.multiple":{description:"%editor.configuration.editor.gotoLocation.multiple%",type:"string",enum:["peek","gotoAndPeek","goto"],default:t.EDITOR_DEFAULTS.contribInfo.gotoLocation.multiple,enumDescriptions:[(0,n.localize)("editor.configuration.gotoLocation.multiple.peek","Show peek view of the results (default)"),(0,n.localize)("editor.configuration.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),(0,n.localize)("editor.configuration.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},"editor.selectionHighlight":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.selectionHighlight,description:"%editor.configuration.selectionHighlight%"},"editor.columnSelection":{type:"boolean",default:t.EDITOR_DEFAULTS.columnSelection,description:"%editor.configuration.columnSelection%"},"editor.occurrencesHighlight":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.occurrencesHighlight,description:"%editor.configuration.occurrencesHighlight%"},"editor.overviewRulerLanes":{type:"integer",default:3,description:"%editor.configuration.overviewRulerLanes%"},"editor.overviewRulerBorder":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.overviewRulerBorder,description:"%editor.configuration.overviewRulerBorder%"},"editor.cursorBlinking":{type:"string",enum:["blink","smooth","phase","expand","solid"],default:"blink",description:"%editor.configuration.cursorBlinking%"},"editor.mouseWheelZoom":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.mouseWheelZoom,markdownDescription:"%editor.configuration.mouseWheelZoom%"},"editor.cursorSmoothCaretAnimation":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.cursorSmoothCaretAnimation,description:"%editor.configuration.cursorSmoothCaretAnimation%"},"editor.cursorStyle":{type:"string",enum:["block","block-outline","line","line-thin","underline","underline-thin"],default:t.EDITOR_FONT_DEFAULTS.cursorStyle,description:"%editor.configuration.cursorStyle%"},"editor.cursorWidth":{type:"integer",default:t.EDITOR_DEFAULTS.viewInfo.cursorWidth,markdownDescription:"%editor.configuration.cursorWidth%"},"editor.fontLigatures":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.fontLigatures,description:"%editor.configuration.fontLigatures%"},"editor.hideCursorInOverviewRuler":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.hideCursorInOverviewRuler,description:"%editor.configuration.hideCursorInOverviewRuler%"},"editor.renderWhitespace":{type:"string",enum:["none","boundary","selection","all"],enumDescriptions:["",(0,n.localize)("editor.configuration.renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),(0,n.localize)("editor.configuration.renderWhitespace.selection","Render whitespace characters only on selected text."),""],default:t.EDITOR_DEFAULTS.viewInfo.renderWhitespace,description:"%editor.configuration.renderWhitespace%"},"editor.rename.enablePreview":{type:"boolean",default:!0,description:"%editor.configuration.rename.enablePreview%"},"editor.renderControlCharacters":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.renderControlCharacters,description:"%editor.configuration.renderControlCharacters%"},"editor.guides.indentation":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.guides.indentation,description:"%editor.configuration.guides.indentation%"},"editor.guides.highlightActiveIndentation":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.guides.highlightActiveIndentGuide,description:"%editor.configuration.guides.highlightActiveIndentation%"},"editor.guides.bracketPairs":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.guides.bracketPairs,description:"%editor.configuration.guides.bracketPairs%"},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],enumDescriptions:["","","",(0,n.localize)("editor.configuration.renderLineHighlight.all","Highlights both the gutter and the current line.")],default:t.EDITOR_DEFAULTS.viewInfo.renderLineHighlight,description:"%editor.configuration.renderLineHighlight%"},"editor.codeLens":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.codeLens,description:"%editor.configuration.codeLens%"},"editor.folding":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.folding,description:"%editor.configuration.folding%"},"editor.foldingStrategy":{type:"string",enum:["auto","indentation"],default:t.EDITOR_DEFAULTS.contribInfo.foldingStrategy,markdownDescription:"%editor.configuration.foldingStrategy%"},"editor.showFoldingControls":{type:"string",enum:["always","mouseover"],default:t.EDITOR_DEFAULTS.contribInfo.showFoldingControls,description:"%editor.configuration.showFoldingControls%"},"editor.matchBrackets":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.matchBrackets,description:"%editor.configuration.matchBrackets%"},"editor.glyphMargin":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.glyphMargin,description:"%editor.configuration.glyphMargin%"},"editor.useTabStops":{type:"boolean",default:t.EDITOR_DEFAULTS.useTabStops,description:"%editor.configuration.useTabStops%"},"editor.trimAutoWhitespace":{type:"boolean",default:t.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:"%editor.configuration.trimAutoWhitespace%"},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:"%editor.configuration.stablePeek%"},"editor.dragAndDrop":{type:"boolean",default:t.EDITOR_DEFAULTS.dragAndDrop,description:"%editor.configuration.dragAndDrop%"},"editor.accessibilitySupport":{type:"string",enum:["auto","on","off"],enumDescriptions:[(0,n.localize)("editor.configuration.accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),(0,n.localize)("editor.configuration.accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader."),(0,n.localize)("editor.configuration.accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:t.EDITOR_DEFAULTS.accessibilitySupport,description:(0,n.localize)("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers.")},"editor.showUnused":{type:"boolean",default:t.EDITOR_DEFAULTS.showUnused,description:"%editor.configuration.showUnused%"},"editor.comments.insertSpace":{type:"boolean",default:!0,description:"%editor.configuration.comments.insertSpace%"},"editor.comments.ignoreEmptyLines":{type:"boolean",default:!0,description:"%editor.configuration.comments.ignoreEmptyLines%"},"editor.links":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.links,description:"%editor.configuration.links%"},"editor.colorDecorators":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.colorDecorators,description:"%editor.configuration.colorDecorators%"},"editor.lightbulb.enabled":{type:"string",default:t.EDITOR_DEFAULTS.contribInfo.lightbulbEnabled,enum:[r.ShowLightbulbIconMode.Off,r.ShowLightbulbIconMode.OnCode,r.ShowLightbulbIconMode.On],enumDescriptions:[],description:"%editor.configuration.lightbulb.enabled%"},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:"%editor.configuration.maxTokenizationLineLength%"},"editor.codeActionsOnSave":{type:"object",properties:{"source.organizeImports":{type:"boolean",description:"%editor.configuration.codeActionsOnSave.organizeImports%"},"source.fixAll":{type:"boolean",description:"%editor.configuration.codeActionsOnSave.fixAll%"}},additionalProperties:{type:"boolean"},default:t.EDITOR_DEFAULTS.contribInfo.codeActionsOnSave,description:"%editor.configuration.codeActionsOnSave%"},"editor.codeActionsOnSaveTimeout":{type:"number",default:t.EDITOR_DEFAULTS.contribInfo.codeActionsOnSaveTimeout,description:"%editor.configuration.codeActionsOnSaveTimeout%"},"editor.codeActionsOnSaveNotification":{type:"boolean",default:!0,description:"%editor.configuration.codeActionsOnSaveNotification%"},"editor.selectionClipboard":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.selectionClipboard,description:"%editor.configuration.selectionClipboard%",included:n.isLinux},"editor.largeFileOptimizations":{type:"boolean",default:t.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:"%editor.configuration.largeFileOptimizations%"},"editor.defaultFormatter":{type:"string",description:"%editor.configuration.defaultFormatter%"},"editor.unicodeHighlight.ambiguousCharacters":{type:"boolean",default:!0,description:"%editor.configuration.unicodeHighlight.ambiguousCharacters%"},"editor.unicodeHighlight.allowedCharacters":{type:"object",default:{},description:"%editor.configuration.unicodeHighlight.allowedCharacters%"},"editor.unicodeHighlight.allowedLocales":{type:"object",default:{},description:"%editor.configuration.unicodeHighlight.allowedLocales%"},"diffEditor.renderIndicators":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.renderIndicators,description:"%editor.configuration.renderIndicators%"},"diffEditor.minimap":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.minimap},"diffEditor.experimental.stickyScroll.enabled":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.experimental.stickyScroll.enable}},p={"editor.tokenColorCustomizations":{type:"object",description:"%editor.configuration.tokenColorCustomizations%",default:{}},"editor.askIfDiff":{type:"boolean",default:!0,description:"%editor.configuration.askIfDiff%"},"editor.showActionWhenGroupEmpty":{type:"boolean",default:!1,description:"%editor.configuration.showActionWhenGroupEmpty%"},"editor.autoSave":{type:"string",enum:["off","afterDelay","editorFocusChange","windowLostFocus"],default:"off",description:"%editor.configuration.autoSave%"},"editor.autoSaveDelay":{type:"number",default:1e3,markdownDescription:"%editor.configuration.autoSaveDelay%"},"editor.preferredFormatter":{type:"object",default:{},description:"%editor.configuration.preferredFormatter%"},"editor.previewMode":{type:"boolean",default:!0,description:"%editor.configuration.previewMode%"},"editor.preventScrollAfterFocused":{type:"boolean",default:!1,description:"%editor.configuration.preventScrollAfterFocused%"},"editor.wrapTab":{type:"boolean",default:!1,description:"%editor.configuration.wrapTab%"},"editor.enablePreviewFromCodeNavigation":{type:"boolean",default:!1,markdownDescription:"%editor.configuration.enablePreviewFromCodeNavigation%"},"editor.minimap":{type:"boolean",default:!0},"editor.forceReadOnly":{type:"boolean",default:!1,description:"%editor.configuration.forceReadOnly%"},"editor.languageFeatureEnabledMaxSize":{type:"number",default:4*1024*1024*1024,description:"%editor.configuration.languageFeatureEnabledMaxSize%"},"editor.docExtHostSyncMaxSize":{type:"number",default:4*1024*1024*1024,description:"%editor.configuration.docExtHostSyncMaxSize%"},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],default:"all",description:"%editor.configuration.renderLineHighlight%"},"editor.fontFamily":{type:"string",default:t.EDITOR_FONT_DEFAULTS.fontFamily},"editor.fontSize":{type:"number",default:t.EDITOR_FONT_DEFAULTS.fontSize,minimum:6},"editor.tabSize":{type:"number",default:t.EDITOR_FONT_DEFAULTS.tabSize,minimum:1,description:"%editor.configuration.tabSize%"},"editor.formatOnPaste":{type:"boolean",default:!1},"editor.detectIndentation":{type:"boolean",default:!0},"editor.renderWhitespace":{type:"boolean",default:t.EDITOR_FONT_DEFAULTS.renderWhitespace},"editor.cursorStyle":{type:"string",enum:["line","block","block-outline","line-thin","underline","underline-thin"],default:t.EDITOR_FONT_DEFAULTS.cursorStyle},"editor.insertSpaces":{type:"boolean",default:t.EDITOR_FONT_DEFAULTS.insertSpace},"editor.wordWrap":{type:"string",enum:["off","on"],default:t.EDITOR_FONT_DEFAULTS.wordWrap},"editor.wordWrapColumn":{type:"number",default:t.EDITOR_FONT_DEFAULTS.wordWrapColumn,description:"%editor.configuration.wordWrapColumn%"},"editor.readonlyFiles":{type:"array",default:[],items:{type:"string"}},"editor.formatOnSave":{type:"boolean",default:!1,description:"%editor.configuration.formatOnSave%"},"editor.formatOnSaveTimeout":{type:"number",default:750,markdownDescription:"%editor.configuration.formatOnSaveTimeout%"},"editor.lineHeight":{type:"number",default:0,description:"%editor.lineHeight.description%"},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:"%editor.configuration.maxTokenizationLineLength%"},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[(0,n.localize)("editor.configuration.semanticHighlighting.true","Semantic highlighting enabled for all color themes."),(0,n.localize)("editor.configuration.semanticHighlighting.false","Semantic highlighting disabled for all color themes."),(0,n.localize)("editor.configuration.semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:!0,description:"%editor.configuration.semanticHighlighting.enabled%"},"editor.bracketPairColorization.enabled":{type:"boolean",default:!0,description:"%editor.configuration.bracketPairColorization.enabled%"},"editor.largeFile":{type:"number",default:4*1024*1024*1024,description:"%editor.configuration.largeFileSize%"},"editor.quickSuggestionsDelay":{type:"integer",default:100,description:"%editor.configuration.quickSuggestionsDelay%"},"editor.modelDisposeTime":{type:"integer",default:3e3},"workbench.editorAssociations":{type:"object",markdownDescription:"%editor.configuration.workbench.editorAssociations%",default:{},additionalProperties:{type:"string"}},"editor.experimental.stickyScroll.enabled":{type:"boolean",default:!1,description:"%editor.configuration.experimental.stickyScroll.enabled%"},"editor.mouseBackForwardToNavigate":{type:"boolean",default:!0,description:"%editor.configuration.mouseBackForwardToNavigate%"},"diffEditor.renderSideBySide":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.renderSideBySide,description:"%diffEditor.configuration.renderSideBySide%"},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.ignoreTrimWhitespace,description:"%diffEditor.configuration.ignoreTrimWhitespace%"},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.hideUnchangedRegions.enabled,description:"Controls whether the diff editor shows unchanged regions."},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:t.DIFF_EDITOR_DEFAULTS.hideUnchangedRegions.revealLineCount,description:"Controls how many lines are used for unchanged regions.",minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:t.DIFF_EDITOR_DEFAULTS.hideUnchangedRegions.minimumLineCount,description:"Controls how many lines are used as a minimum for unchanged regions.",minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:t.DIFF_EDITOR_DEFAULTS.hideUnchangedRegions.contextLineCount,description:"Controls how many lines are used as context when comparing unchanged regions.",minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.experimental.showMoves,description:"Controls whether the diff editor should show detected code moves."},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.experimental.showEmptyDecorations,description:"Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted."},"diffEditor.experimental.collapseUnchangedRegions":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.experimental.collapseUnchangedRegions,description:"Controls whether the diff editor shows unchanged regions."}};t.editorPreferenceSchema={type:"object",properties:{...v,...p}},t.EditorPreferences=Symbol("EditorPreference")},90915:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEditorPreferenceProxy=o;const n=e(41869),r=e(24328);function o(l,_,v){return(0,n.createPreferenceProxy)(l,r.editorPreferenceSchema,{resourceUri:_,overrideIdentifier:v})}},53135:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GoToLineQuickOpenHandler=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(74404),_=n.__importStar(e(20868)),v=e(55979),p=e(82196);class m extends v.AbstractGotoLineQuickAccessProvider{clearDecorations(a){super.clearDecorations(a)}preview(a,h){a.revealRangeInCenter(h,_.editor.ScrollType.Smooth),this.addDecorations(a,h)}goTo(a,h,u=!0){this.gotoLocation({editor:a},{range:h,preserveFocus:u,keyMods:{alt:!1,ctrlCmd:!1}})}}let s=class{constructor(){this.prefix=":",this.description=(0,o.localize)("quickopen.goToLine.desc"),this.quickAccess=new m}getFirstSelection(){const a=this.workbenchEditorService.currentEditor,h=a?.getSelections();return h?.[0]}getRange(a=1,h=1){return{startLineNumber:a,endLineNumber:a,startColumn:h,endColumn:h}}init(){var a;this.savedViewState=(0,o.withNullAsUndefined)((a=this.workbenchEditorService.currentEditor)===null||a===void 0?void 0:a.monacoEditor.saveViewState())}getModel(){var a,h,u,c,E;const f=this.workbenchEditorService.currentEditor,d=this.getFirstSelection();if(!d||!f)return{onType:(S,D)=>{D([new l.QuickOpenItem({label:(0,o.localize)("quickopen.goToLine.notValid"),run:()=>!1})])}};const y=(a=d.positionLineNumber)!==null&&a!==void 0?a:1,b=(h=d.positionColumn)!==null&&h!==void 0?h:1,A=(E=(c=(u=f.currentDocumentModel)===null||u===void 0?void 0:u.getMonacoModel())===null||c===void 0?void 0:c.getLineCount())!==null&&E!==void 0?E:1;return{onType:(S,D)=>{const I=S.split(/,|:|#|:|,/).map(R=>parseInt(R,10)).filter(R=>!isNaN(R)),w=I[0],T=I[1];if(w){let R=(0,o.formatLocalize)("quickopen.goToLine.lineInfo",w);T&&(R+=(0,o.formatLocalize)("quickopen.goToLine.colInfo",T));const M=this.getRange(w,T);D([new l.QuickOpenItem({label:R,run:O=>O===l.Mode.PREVIEW?(this.quickAccess.preview(f.monacoEditor,M),!1):(this.quickAccess.goTo(f.monacoEditor,M,!0),!0)})])}else this.quickAccess.clearDecorations(f.monacoEditor),D([new l.QuickOpenItem({label:(0,o.formatLocalize)("quickopen.goToLine.defaultMessage",y,b,A),run:()=>!1})])}}}getOptions(){return{}}onClose(a){const h=this.workbenchEditorService.currentEditor;h&&(h.monacoEditor.focus(),this.quickAccess.clearDecorations(h.monacoEditor),a&&this.savedViewState&&h.monacoEditor.restoreViewState(this.savedViewState))}};t.GoToLineQuickOpenHandler=s,n.__decorate([(0,r.Autowired)(l.PrefixQuickOpenService),n.__metadata("design:type",Object)],s.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],s.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],s.prototype,"workbenchEditorService",void 0),t.GoToLineQuickOpenHandler=s=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],s)},50236:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SymbolInformationQuickOpenItem=t.WorkspaceSymbolQuickOpenHandler=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),_=e(97821),v=e(51500),p=e(40540),m=e(23418);let s=class extends _.QuickOpenBaseAction{constructor(){super({id:"workspace-symbol:splitToRight",tooltip:(0,l.localize)("quickOpen.openOnTheRightSide"),class:(0,o.getIcon)("embed")})}async run(c){await c.openSide()}};s=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],s);let g=class{hasActions(){return!0}getActions(){return[this.workspaceSymbolOpenSideActionOpen]}};n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s)],g.prototype,"workspaceSymbolOpenSideActionOpen",void 0),g=n.__decorate([(0,r.Injectable)()],g);let a=class{constructor(){this.prefix="#",this.cancellationSource=new o.CancellationTokenSource}get description(){return(0,l.localize)("editor.workspaceSymbol.description")}getModel(){return{onType:(c,E)=>{if(c===""){E([new o.QuickOpenItem({label:(0,l.localize)("editor.workspaceSymbol.search"),run:()=>!1})]);return}if(c==="#")return void E([new o.QuickOpenItem({label:(0,l.localize)("editor.workspaceSymbolClass.search"),run:()=>!1})]);if(this.languageService.workspaceSymbolProviders.length===0){E([new o.QuickOpenItem({label:(0,l.localize)("editor.workspaceSymbol.notfound"),run:()=>!1})]);return}const f=c[0]==="#",d=[];this.cancellationSource.cancel();const y=new o.CancellationTokenSource;this.cancellationSource=y;const b={query:f?c.slice(1):c},A=this.reporterService.time(l.REPORT_NAME.QUICK_OPEN_MEASURE);Promise.all(this.languageService.workspaceSymbolProviders.map(async S=>{let D=await S.provideWorkspaceSymbols(b,y.token);if(f&&(D=D?.filter(I=>I.kind===p.SymbolKind.Class)),D&&D.length&&!y.token.isCancellationRequested){const I=await Promise.all(D.map(async w=>{const T=await this.workspaceService.asRelativePath(new o.URI(w.location.uri).parent);return new h(w,S,this.workbenchEditorService,y.token,T?.path||"")}));d.push(...I),E(d,this.workspaceSymbolActionProvider)}return D})).catch(S=>{this.logger.log(S)}).finally(()=>{y.token.isCancellationRequested||(d.length||E([]),A.timeEnd(f?"class":"symbol",{lookFor:c,stat:{symbol:d.length}}))})}}}getOptions(){return{fuzzyMatchLabel:{enableSeparateSubstringMatching:!0},showItemsWithoutHighlight:!0,fuzzyMatchDescription:!1,getPlaceholderItem:(c,E)=>new o.QuickOpenItem({label:(0,l.localize)(E.startsWith("##")?"editor.workspaceSymbolClass.notfound":"editor.workspaceSymbol.notfound"),run:()=>!1})}}onClose(){this.cancellationSource.cancel()}onToggle(){this.cancellationSource.cancel()}};t.WorkspaceSymbolQuickOpenHandler=a,n.__decorate([(0,r.Autowired)(m.ILanguageService),n.__metadata("design:type",Object)],a.prototype,"languageService",void 0),n.__decorate([(0,r.Autowired)(v.IWorkspaceService),n.__metadata("design:type",Object)],a.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(l.ILogger),n.__metadata("design:type",Object)],a.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(m.WorkbenchEditorService),n.__metadata("design:type",m.WorkbenchEditorService)],a.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",g)],a.prototype,"workspaceSymbolActionProvider",void 0),n.__decorate([(0,r.Autowired)(l.IReporterService),n.__metadata("design:type",Object)],a.prototype,"reporterService",void 0),t.WorkspaceSymbolQuickOpenHandler=a=n.__decorate([(0,r.Injectable)()],a);class h extends o.QuickOpenItem{constructor(c,E,f,d,y){super({}),this.symbol=c,this.provider=E,this.workbenchEditorService=f,this.token=d,this.relativePath=y}getLabel(){return this.symbol.name}getUri(){return new o.URI(this.symbol.location.uri)}getIconClass(){return(0,o.getSymbolIcon)(this.symbol.kind)}getDescription(){const c=this.symbol.containerName;return`${c?`${c} \xB7 `:""}${decodeURIComponent(this.relativePath)}`}fromRange(c){if(!c)return;const{start:E,end:f}=c;return{startLineNumber:E.line+1,startColumn:E.character+1,endLineNumber:f.line+1,endColumn:f.character+1}}open(c,E){this.workbenchEditorService.open(c,{range:this.fromRange(E)})}run(c){const E=this.getUri();return c===o.QuickOpenMode.OPEN&&this.provider.resolveWorkspaceSymbol(this.symbol,this.token).then(f=>{f?this.open(E,f.location.range):this.open(E,this.symbol.location.range)}),!0}openSide(){const c=this.getUri();return this.provider.resolveWorkspaceSymbol(this.symbol,this.token).then(E=>{this.workbenchEditorService.open(c,{preview:!1,split:m.EditorGroupSplitAction.Right,range:this.fromRange(E?E.location.range:this.symbol.location.range),focus:!0})})}}t.SymbolInformationQuickOpenItem=h},80200:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceServiceImpl=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),_=e(23418),{addElement:v}=l.arrays;let p=class extends o.WithEventBus{constructor(){super(),this.providers=[],this.resources=new Map,this.gettingResources=new Map,this.resourceDecoration=new Map,this.cachedProvider=new l.LRUMap(500,200),this.onRegisterResourceProviderEmitter=new l.Emitter,this.onRegisterResourceProvider=this.onRegisterResourceProviderEmitter.event,this.onUnregisterResourceProviderEmitter=new l.Emitter,this.onUnregisterResourceProvider=this.onUnregisterResourceProviderEmitter.event}onResourceNeedUpdateEvent(a){const h=a.payload;if(this.resources.has(h.toString())){const u=this.resources.get(h.toString());this.doGetResource(h).then(c=>{u&&(Object.assign(u?.resource,c?.resource),u.provider=c?.provider),this.eventBus.fire(new _.ResourceDidUpdateEvent(h))})}}onResourceDecorationNeedChangeEvent(a){this.getResourceDecoration(a.payload.uri);let h=!1;const u=this.resourceDecoration.get(a.payload.uri.toString())||{};new Set([...Object.keys(u),...Object.keys(a.payload.decoration)]).forEach(c=>{u[c]!==a.payload.decoration[c]&&(h=!0)}),h&&(Object.assign(this.resourceDecoration.get(a.payload.uri.toString()),a.payload.decoration),this.eventBus.fire(new _.ResourceDecorationChangeEvent(a.payload)))}getSupportedSchemes(){return Array.from(this.providers.values()).map(a=>a.scheme).filter(Boolean)}async getResource(a){if(!this.resources.has(a.toString())){const h=await this.doGetResource(a);if(!h)return null;const u={resource:h.resource,provider:h.provider};this.resources.set(a.toString(),u)}return this.resources.get(a.toString()).resource}handlesUri(a){return!!this.calculateProvider(a)}async doGetResource(a){if(!this.gettingResources.has(a.toString())){const h=(async()=>{const u=this.calculateProvider(a);if(u){const c=await u.provideResource(a);return c.uri=a,{resource:c,provider:u}}else return this.logger.error("URI has no resource provider: "+a),null})();this.gettingResources.set(a.toString(),h),h.finally(()=>{this.gettingResources.delete(a.toString())})}return this.gettingResources.get(a.toString())}registerResourceProvider(a){this.onRegisterResourceProviderEmitter.fire(a);const h=new l.Disposable;return h.addDispose(v(this.providers,a)),h.addDispose({dispose:()=>{for(const u of this.resources.values())u.provider===a&&(u.provider=s,this.onUnregisterResourceProviderEmitter.fire(a));this.cachedProvider.clear()}}),this.cachedProvider.clear(),h}async shouldCloseResource(a,h){const u=this.getProvider(a.uri);return!u||!u.shouldCloseResource?!0:await u.shouldCloseResource(a,h)}async shouldCloseResourceWithoutConfirm(a){const h=this.getProvider(a.uri);return h&&h.shouldCloseResourceWithoutConfirm?await h.shouldCloseResourceWithoutConfirm(a):!1}async close(a,h){const u=this.getProvider(a.uri);return!u||!u.close?!0:await u.close(a,h)}calculateProvider(a){if(this.cachedProvider.has(a.toString()))return this.cachedProvider.get(a.toString());let h,u={weight:-1,index:-1};function c(E,f,d){u={weight:f,index:d},h=E}return this.providers.forEach((E,f)=>{let d=-1;E.handlesUri?d=E.handlesUri(a):E.scheme&&(d=E.scheme===a.scheme?10:-1),d>=0&&(d>u.weight||d===u.weight&&f>u.index)&&c(E,d,f)}),this.cachedProvider.set(a.toString(),h),h}getProvider(a){const h=this.resources.get(a.toString());if(h)return h.provider}getResourceDecoration(a){return this.resourceDecoration.has(a.toString())||this.resourceDecoration.set(a.toString(),{...m}),this.resourceDecoration.get(a.toString())}getResourceSubname(a,h){const u=this.getProvider(a.uri);return u&&u.provideResourceSubname?u.provideResourceSubname(a,h):null}disposeResource(a){const h=this.getProvider(a.uri);if(this.resources.delete(a.uri.toString()),this.resourceDecoration.delete(a.uri.toString()),!(!h||!h.onDisposeResource))return h.onDisposeResource(a)}};t.ResourceServiceImpl=p,n.__decorate([(0,r.Autowired)(l.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,o.OnEvent)(_.ResourceNeedUpdateEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.ResourceNeedUpdateEvent]),n.__metadata("design:returntype",void 0)],p.prototype,"onResourceNeedUpdateEvent",null),n.__decorate([(0,o.OnEvent)(_.ResourceDecorationNeedChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.ResourceDecorationNeedChangeEvent]),n.__metadata("design:returntype",void 0)],p.prototype,"onResourceDecorationNeedChangeEvent",null),t.ResourceServiceImpl=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p);const m={dirty:!1,readOnly:!1},s={handlesUri:()=>-1,provideResource:g=>({uri:g,name:"",icon:""})}},52795:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorActions=t.Tabs=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(41869),_=e(25918),v=e(1149),p=e(63373),m=e(93899),s=e(48560),g=e(43718),a=e(23418),h=e(19352),u=n.__importDefault(e(62711)),c=e(78680),E=e(82196),f=e(50674),d=e(72570).UU,y=({group:A})=>{const S=(0,o.useRef)(),D=(0,o.useRef)(),I=(0,o.useRef)(),w=(0,o.useRef)(null),T=(0,o.useRef)(null),R=(0,s.useInjectable)(a.ResourceService),M=(0,s.useInjectable)(l.IEventBus),O=(0,o.useContext)(l.ConfigContext),x=(0,s.useInjectable)(a.WorkbenchEditorService),k=(0,s.useInjectable)(c.TabTitleMenuService),F=(0,s.useInjectable)(l.PreferenceService),L=(0,s.useInjectable)(m.IMenuRegistry),B=(0,s.useInjectable)(E.IEditorTabService),U=(0,s.useInjectable)(v.LayoutViewSizeConfig),W=(0,s.useInjectable)(l.ComponentRegistry),j=(0,l.useDesignStyles)(u.default.tab_right,"tab_right"),Q=(0,l.useDesignStyles)(u.default.close_tab,"close_tab"),G=(0,l.useDesignStyles)(u.default.kt_editor_close_icon,"kt_editor_close_icon"),Z=(0,l.useDesignStyles)(u.default.kt_editor_tabs_content,"kt_editor_tabs_content"),$=(0,l.useDesignStyles)(u.default.kt_editor_tabs_current_last,"kt_editor_tabs_current_last"),V=(0,l.useDesignStyles)(u.default.kt_editor_tab,"kt_editor_tab"),H=(0,l.useDesignStyles)(u.default.kt_editor_tab_current_prev,"kt_editor_tab_current_prev"),K=(0,l.useDesignStyles)(u.default.kt_editor_tab_current_next,"kt_editor_tab_current_next"),Y=(0,l.useDesignStyles)(u.default.kt_editor_tab_current,"kt_editor_tab_current"),X=(0,l.useDesignStyles)(u.default.kt_editor_tab_dirty,"kt_editor_tab_dirty"),re=(0,l.useDesignStyles)(u.default.kt_editor_tabs,"kt_editor_tabs"),oe=(0,l.useDesignStyles)(u.default.kt_editor_tabs_scroll_wrapper,"kt_editor_tabs_scroll_wrapper"),[he,me]=(0,o.useState)({}),[q,Ae]=(0,o.useState)(!!F.get("editor.wrapTab")),[ge,te]=(0,o.useState)(new Map),[fe,Re]=(0,o.useState)(),Pe=(0,o.useMemo)(()=>(0,l.getSlotLocation)(d,O.layoutConfig),[]),Oe=o.default.useMemo(()=>{var ye,Ue;const Ye=(Ue=(ye=W.getComponentRegistryInfo(a.TabbarRightExtraContentId))===null||ye===void 0?void 0:ye.views)===null||Ue===void 0?void 0:Ue[0];if(Ye)return Ye},[]);(0,f.useUpdateOnGroupTabChange)(A),(0,s.useUpdateOnEventBusEvent)(a.ResourceDidUpdateEvent,[A.resources],ye=>!!I&&A.resources.findIndex(Ue=>Ue.uri.isEqual(ye))!==-1),(0,o.useEffect)(()=>{const ye=new l.Disposable;return ye.addDispose(A.onDidEditorGroupContentLoading(Ue=>{var Ye;(Ye=A.resourceStatus.get(Ue))===null||Ye===void 0||Ye.finally(()=>{me(Object.assign({},he,{[Ue.uri.toString()]:!1}))}),me(Object.assign({},he,{[Ue.uri.toString()]:!0}))})),ye.addDispose(A.onDidEditorGroupTabChanged(()=>{q||De()})),()=>{ye.dispose()}},[A]);const Be=(0,o.useCallback)((ye,Ue,Ye)=>{if(ye.dataTransfer.getData("uri")){const He=new l.URI(ye.dataTransfer.getData("uri"));let _t;ye.dataTransfer.getData("uri-source-group")&&(_t=x.getEditorGroup(ye.dataTransfer.getData("uri-source-group"))),A.dropUri(He,E.DragOverPosition.CENTER,_t,Ye)}ye.dataTransfer.files.length>0&&M.fire(new E.EditorGroupFileDropEvent({group:A,tabIndex:Ue,files:ye.dataTransfer.files}))},[A]),De=(0,o.useCallback)(()=>{l.fastdom.measure(()=>{try{if(S.current&&A.currentResource){const ye=S.current.querySelector("."+u.default.kt_editor_tab+"[data-uri='"+A.currentResource.uri.toString()+"']");ye&&ye.scrollIntoView({block:"nearest",inline:"nearest"})}}catch{}})},[A,S.current]),_e=(0,o.useCallback)(()=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{l.fastdom.measure(()=>{var ye;const Ue=(ye=T.current)===null||ye===void 0?void 0:ye.offsetWidth;Ue!==fe&&Re(Ue)})},200)},[T.current,w.current,fe]);(0,o.useEffect)(()=>{q||queueMicrotask(()=>{De()})},[q,S.current]),(0,o.useEffect)(()=>{if(!q){const ye=new l.Disposable;return S.current&&ye.addDispose(new l.DomListener(S.current,"mousewheel",b)),ye.addDispose(M.onDirective(l.ResizeEvent.createDirective(Pe),()=>{De()})),ye.addDispose(M.onDirective(E.GridResizeEvent.createDirective(A.grid.uid),()=>{De()})),()=>{ye.dispose()}}},[q]);const Ne=(0,o.useCallback)(()=>{l.fastdom.measureAtNextFrame(()=>{if(I.current&&q){const ye=new Map;let Ue,Ye;const He=Array.from(I.current.children);He.pop(),He.forEach(_t=>{_t.offsetTop!==Ue&&(Ue=_t.offsetTop,Ye&&ye.set(He.indexOf(Ye),!0)),Ye=_t,ye.set(He.indexOf(_t),!1)}),te(ye)}})},[I.current,q]);(0,o.useEffect)(()=>{_e()},[T.current,q]),(0,o.useEffect)(Ne,[q,I.current,A,A.resources.length]),(0,o.useEffect)(()=>{const ye=new l.DisposableCollection;return ye.push(M.onDirective(l.ResizeEvent.createDirective(Pe),()=>{Ne()})),ye.push(F.onPreferenceChanged(Ue=>{Ue.preferenceName==="editor.wrapTab"&&Ae(!!Ue.newValue)})),ye.push(x.onDidCurrentEditorGroupChanged(()=>{_e()})),ye.push(l.Event.debounce(l.Event.filter(L.onDidChangeMenu,Ue=>Ue===m.MenuId.EditorTitle),()=>{},200)(()=>{_e()})),()=>{ye.dispose()}},[]),(0,o.useEffect)(()=>{const ye=new l.DisposableCollection;return ye.push(A.onDidEditorFocusChange(()=>{_e()})),()=>{ye.dispose()}},[A]);const Te=(0,o.useCallback)(ye=>{ye.preventDefault(),ye.stopPropagation(),D.current&&D.current.classList.add(u.default.kt_on_drag_over)},[D.current]),We=(0,o.useCallback)(ye=>{D.current&&D.current.classList.remove(u.default.kt_on_drag_over)},[D.current]),pe=(0,o.useCallback)(ye=>{D.current&&D.current.classList.remove(u.default.kt_on_drag_over),Be&&Be(ye,-1)},[Be,D.current]),ie=(0,o.useCallback)(ye=>{ye.target===ye.currentTarget&&x.createUntitledResource()},[x]),le=o.default.useCallback((ye,Ue)=>{const Ye=R.getResourceDecoration(ye.uri),He=R.getResourceSubname(ye,A.resources);return B.renderEditorTab(o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:he[ye.uri.toString()]?"loading_indicator":(0,r.default)(ye.icon)}," "),o.default.createElement("div",{tabIndex:0,role:"tab","aria-selected":Ue?"true":"false"},ye.name),He?o.default.createElement("div",{className:u.default.subname},He):null,Ye.readOnly?o.default.createElement("span",{className:(0,r.default)((0,l.getExternalIcon)("lock"),u.default.editor_readonly_icon)}):null,o.default.createElement("div",{className:j},o.default.createElement("div",{className:(0,r.default)({[u.default.kt_hidden]:!Ye.dirty,[u.default.dirty]:!0})}),o.default.createElement("div",{className:Q,onMouseDown:_t=>{_t.stopPropagation(),A.close(ye.uri)}},B.renderTabCloseComponent(o.default.createElement("div",{className:(0,r.default)((0,l.getIcon)("close"),G),tabIndex:0,role:"button","aria-label":(0,g.formatLocalize)("editor.closeTab.title",ye.name)}))))),Ue)},[B]),Se=()=>{const ye=A.resources.length===0,Ue=A.resources.findIndex(Ye=>A.currentResource===Ye);return o.default.createElement("div",{draggable:!1,className:(0,r.default)({[Z]:!0,[u.default.kt_editor_tabs_content_empty]:ye,[$]:Ue===A.resources.length-1}),ref:I,role:"tablist"},A.resources.map((Ye,He)=>{let _t;const vt=R.getResourceDecoration(Ye.uri);return o.default.createElement("div",{draggable:!0,title:Ye.title,className:(0,r.default)({[V]:!0,[u.default.last_in_row]:ge.get(He),[H]:Ue-1===He,[K]:Ue+1===He,[Y]:A.currentResource===Ye,[u.default.kt_editor_tab_preview]:A.previewURI&&A.previewURI.isEqual(Ye.uri),[X]:vt.dirty}),style:q&&He===A.resources.length-1?{marginRight:fe,height:U.editorTabsHeight}:{height:U.editorTabsHeight},onContextMenu:Lt=>{k.show(Lt.nativeEvent.x,Lt.nativeEvent.y,Ye&&Ye.uri,A),Lt.preventDefault()},key:Ye.uri.toString(),onMouseUp:Lt=>{Lt.nativeEvent.button===l.MouseEventButton.Middle&&(Lt.preventDefault(),Lt.stopPropagation(),A.close(Ye.uri))},onMouseDown:Lt=>{Lt.nativeEvent.button===l.MouseEventButton.Left&&A.open(Ye.uri,{focus:!0})},"data-uri":Ye.uri.toString(),onDragOver:Lt=>{Lt.preventDefault(),Lt.stopPropagation(),_t&&_t.classList.add(u.default.kt_on_drag_over)},onDragLeave:Lt=>{_t&&_t.classList.remove(u.default.kt_on_drag_over)},onDrop:Lt=>{_t&&_t.classList.remove(u.default.kt_on_drag_over),Be&&Be(Lt,He,Ye)},onDoubleClick:Lt=>{A.pinPreviewed(Ye.uri)},ref:Lt=>_t=Lt,onDragStart:Lt=>{Lt.dataTransfer.setData("uri",Ye.uri.toString()),Lt.dataTransfer.setData("uri-source-group",A.name)}},le(Ye,A.currentResource===Ye))}))};return o.default.createElement("div",{id:p.VIEW_CONTAINERS.EDITOR_TABS,className:re},o.default.createElement("div",{className:oe,ref:D,onDragOver:Te,onDragLeave:We,onDrop:pe,onDoubleClick:ie},q?o.default.createElement("div",{className:u.default.kt_editor_wrap_container},Se()):o.default.createElement(h.Scroll,{forwardedRef:ye=>ye?S.current=ye:null,className:u.default.kt_editor_tabs_scroll},Se())),o.default.createElement(t.EditorActions,{className:(0,r.default)({[u.default.kt_editor_wrap_mode_action]:q}),ref:T,group:A}),(0,l.renderView)(Oe))};t.Tabs=y,t.EditorActions=(0,o.forwardRef)((A,S)=>{const D=(0,l.useDesignStyles)(u.default.editor_actions,"editor_actions"),{group:I,className:w}=A,T=(0,o.useCallback)(()=>{var W,j;return I.currentResource?[I.currentResource.uri,I,((W=I.currentOrPreviousFocusedEditor)===null||W===void 0?void 0:W.currentUri)||((j=I.currentEditor)===null||j===void 0?void 0:j.currentUri)]:void 0},[I]),R=(0,s.useInjectable)(E.IEditorActionRegistry),M=(0,s.useInjectable)(a.WorkbenchEditorService),O=(0,s.useInjectable)(v.LayoutViewSizeConfig),x=R.getMenu(I),[k,F]=(0,o.useState)(M.currentEditorGroup===I),[L,B]=(0,o.useState)(T()),U=x.getMergedMenuNodes().length===0;return(0,o.useEffect)(()=>{const W=new l.DisposableCollection;return W.push(M.onDidCurrentEditorGroupChanged(()=>{F(M.currentEditorGroup===I)})),W.push(M.onActiveResourceChange(()=>{B(T())})),W.push(I.onDidEditorGroupTabChanged(()=>{B(T())})),()=>{W.dispose()}},[I]),o.default.createElement("div",{ref:S,className:(0,r.default)(D,w,{[u.default.editor_actions_no_actions]:U}),style:{height:O.editorTabsHeight}},o.default.createElement(_.InlineMenuBar,{menus:x,context:L,regroup:(W,j)=>k?[W,j]:[[],j]}))});function b(A){(this.offsetWidth+this.scrollLeft+A.deltaX>this.scrollWidth||this.scrollLeft+A.deltaX<0)&&A.preventDefault()}},82196:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEditorTabService=t.ResoucesOfActiveComponentChangedEvent=t.CodeEditorDidVisibleEvent=t.EditorComponentDisposeEvent=t.ResourceOpenTypeChangedEvent=t.IEditorFeatureRegistry=t.IBreadCrumbService=t.CompareResult=t.ICompareService=t.IEditorActionRegistry=t.EditorDecorationTypeRemovedEvent=t.EditorDecorationChangeEvent=t.EditorDecorationProviderRegistrationEvent=t.RegisterEditorSideComponentEvent=t.EditorGroupsResetSizeEvent=t.EditorGroupIndexChangedEvent=t.EditorConfigurationChangedEvent=t.EditorVisibleChangeEvent=t.EditorSelectionChangeEvent=t.IEditorDecorationCollectionService=t.EditorGroupFileDropEvent=t.EditorActiveResourceStateChangedEvent=t.EditorGroupChangeEvent=t.EditorGroupDisposeEvent=t.EditorGroupCloseEvent=t.EditorGroupOpenEvent=t.GridResizeEvent=t.MultiDiffSourceContribution=t.BrowserEditorContribution=t.EditorComponentRegistry=t.RegisterEditorComponentEvent=t.RegisterEditorComponentResolverEvent=t.EditorComponentRenderMode=void 0;const n=e(85608),r=e(41869);n.__exportStar(e(23418),t);var o;(function(O){O[O.ONE_PER_RESOURCE=1]="ONE_PER_RESOURCE",O[O.ONE_PER_GROUP=2]="ONE_PER_GROUP",O[O.ONE_PER_WORKBENCH=3]="ONE_PER_WORKBENCH"})(o||(t.EditorComponentRenderMode=o={}));class l extends r.BasicEvent{}t.RegisterEditorComponentResolverEvent=l;class _ extends r.BasicEvent{}t.RegisterEditorComponentEvent=_;class v{}t.EditorComponentRegistry=v,t.BrowserEditorContribution=Symbol("BrowserEditorContribution"),t.MultiDiffSourceContribution=Symbol("MultiDiffSourceContribution");class p extends r.BasicEvent{static createDirective(x){return`grid-resize-${x}`}}t.GridResizeEvent=p;class m extends r.BasicEvent{}t.EditorGroupOpenEvent=m;class s extends r.BasicEvent{}t.EditorGroupCloseEvent=s;class g extends r.BasicEvent{}t.EditorGroupDisposeEvent=g;class a extends r.BasicEvent{}t.EditorGroupChangeEvent=a;class h extends r.BasicEvent{}t.EditorActiveResourceStateChangedEvent=h;class u extends r.BasicEvent{}t.EditorGroupFileDropEvent=u,t.IEditorDecorationCollectionService=Symbol("IEditorDecorationCollectionService");class c extends r.BasicEvent{}t.EditorSelectionChangeEvent=c;class E extends r.BasicEvent{}t.EditorVisibleChangeEvent=E;class f extends r.BasicEvent{}t.EditorConfigurationChangedEvent=f;class d extends r.BasicEvent{}t.EditorGroupIndexChangedEvent=d;class y extends r.BasicEvent{}t.EditorGroupsResetSizeEvent=y;class b extends r.BasicEvent{}t.RegisterEditorSideComponentEvent=b;class A extends r.BasicEvent{}t.EditorDecorationProviderRegistrationEvent=A;class S extends r.BasicEvent{}t.EditorDecorationChangeEvent=S;class D extends r.BasicEvent{}t.EditorDecorationTypeRemovedEvent=D,t.IEditorActionRegistry=Symbol("IEditorActionRegistry"),t.ICompareService=Symbol("ICompareService");var I;(function(O){O.revert="revert",O.accept="accept",O.cancel="cancel"})(I||(t.CompareResult=I={})),t.IBreadCrumbService=Symbol("IBreadScrumbService"),t.IEditorFeatureRegistry=Symbol("IEditorFeatureRegistry");class w extends r.BasicEvent{}t.ResourceOpenTypeChangedEvent=w;class T extends r.BasicEvent{}t.EditorComponentDisposeEvent=T;class R extends r.BasicEvent{}t.CodeEditorDidVisibleEvent=R;class M extends r.BasicEvent{}t.ResoucesOfActiveComponentChangedEvent=M,t.IEditorTabService=Symbol("IEditorTabService")},17878:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.UntitledSchemeResourceProvider=t.UntitledSchemeDocumentProvider=t.UntitledDocumentIdCounter=void 0;const r=e(85608),o=e(76003),l=e(41869),_=e(72665),v=e(51500),p=e(23418),m=e(96689);let s=n=class{constructor(){this._id=1}async update(){this._id=await this.getLatestUnitiedIndex()}async getLatestUnitiedIndex(u){var c;await this.workspaceService.whenReady;const d=(u||((c=this.workspaceService.workspace)===null||c===void 0?void 0:c.children)||[]).filter(y=>l.URI.file(y.uri).displayName.startsWith(n.UNTITLED_FILE_NAME_PREFIX)).map(y=>{const b=l.URI.file(y.uri).displayName.match(new RegExp(`^${n.UNTITLED_FILE_NAME_PREFIX}(\\d+)`,"i"));return b?parseInt(b[1],10):-1}).filter(y=>y!==-1);return d.length>0?Math.max(...d)+1:1}get id(){return this._id++}};t.UntitledDocumentIdCounter=s,s.UNTITLED_FILE_NAME_PREFIX="Untitled-",r.__decorate([(0,o.Autowired)(v.IWorkspaceService),r.__metadata("design:type",Object)],s.prototype,"workspaceService",void 0),t.UntitledDocumentIdCounter=s=n=r.__decorate([(0,o.Injectable)()],s);let g=class{constructor(){this._onDidChangeContent=new l.Emitter,this.onDidChangeContent=this._onDidChangeContent.event}handlesScheme(u){return u===l.Schemes.untitled}async provideEncoding(u){return this.preferenceService.get("files.encoding",void 0,u.toString(),(0,l.getLanguageIdFromMonaco)(u))||"utf8"}async provideEOL(u){const c=await this.applicationService.getBackendOS(),E=this.preferenceService.get("files.eol","auto",u.toString(),(0,l.getLanguageIdFromMonaco)(u));return E!=="auto"?E:c===l.OperatingSystem.Windows?`\r
33296
+ Tokenizing line: ${R}`);for(let W=0;W<B.tokens.length;W++){const j=B.tokens[W];U.log(` - token from ${j.startIndex} to ${j.endIndex} (${R.substring(j.startIndex,j.endIndex)}) with scopes ${j.scopes.join(", ")}`)}L=B.ruleStack}dispose(){super.dispose(),this.monacoLanguageService._requestedRichLanguages?this.monacoLanguageService._requestedRichLanguages.clear():this.logger.warn("monaco language service not found _requestedRichLanguages"),this.monacoLanguageService._requestedBasicLanguages?this.monacoLanguageService._requestedBasicLanguages.clear():this.logger.warn("monaco language service not found _requestedBasicLanguages")}};t.TextmateService=w,n.__decorate([(0,l.Autowired)(),n.__metadata("design:type",f.TextmateRegistry)],w.prototype,"textmateRegistry",void 0),n.__decorate([(0,l.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],w.prototype,"fileServiceClient",void 0),n.__decorate([(0,l.Autowired)(_.PreferenceService),n.__metadata("design:type",Object)],w.prototype,"preferenceService",void 0),n.__decorate([(0,l.Autowired)(_.ILogger),n.__metadata("design:type",Object)],w.prototype,"logger",void 0),n.__decorate([(0,l.Autowired)(E.IEditorDocumentModelService),n.__metadata("design:type",Object)],w.prototype,"editorDocumentModelService",void 0),n.__decorate([(0,l.Autowired)(v.RendererRuntime),n.__metadata("design:type",v.RendererRuntime)],w.prototype,"rendererRuntime",void 0),t.TextmateService=w=n.__decorate([(0,l.Injectable)()],w)},88412:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyContribution=t.executeProvideSubtypesCommand=t.executeProvideSupertypesCommand=t.executePrepareTypeHierarchyCommand=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(40191),_=e(28694),v=e(82196);t.executePrepareTypeHierarchyCommand={id:"_executePrepareTypeHierarchy"},t.executeProvideSupertypesCommand={id:"_executeProvideSupertypes"},t.executeProvideSubtypesCommand={id:"_executeProvideSubtypes"};const p=new l.RawContextKey("editorHasCallHierarchyProvider",!1);let m=class{registerCommands(g){g.registerCommand(t.executePrepareTypeHierarchyCommand,{execute:(a,h)=>this.typeHierarchyService.prepareTypeHierarchyProvider(a,h)}),g.registerCommand(t.executeProvideSupertypesCommand,{execute:a=>this.typeHierarchyService.provideSupertypes(a)}),g.registerCommand(t.executeProvideSubtypesCommand,{execute:a=>this.typeHierarchyService.provideSubtypes(a)})}registerEditorFeature(g){this.ctxHasProvider=p.bind(this.contextKeyService),g.registerEditorFeatureContribution({contribute:a=>{const h=a.monacoEditor;return o.Event.any(h.onDidChangeModel,h.onDidChangeModelLanguage,_.TypeHierarchyProviderRegistry.onDidChange)(()=>{h.hasModel()&&this.ctxHasProvider.set(_.TypeHierarchyProviderRegistry.has(h.getModel()))})}})}};t.TypeHierarchyContribution=m,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],m.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(_.ITypeHierarchyService),n.__metadata("design:type",Object)],m.prototype,"typeHierarchyService",void 0),t.TypeHierarchyContribution=m=n.__decorate([(0,o.Domain)(o.CommandContribution,v.BrowserEditorContribution)],m)},7795:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyService=t.TypeHierarchyModel=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(28694),_=e(96689),{isNonEmptyArray:v}=o.arrays;class p{static async create(g,a,h){const[u]=l.TypeHierarchyProviderRegistry.ordered(g);if(!u)return;const c=await u.prepareTypeHierarchy(g,a,h);if(c)return new p(c.roots.reduce((E,f)=>E+f._sessionId,""),u,c.roots,new o.RefCountedDisposable(c))}constructor(g,a,h,u){this.id=g,this.provider=a,this.roots=h,this.ref=u,this.root=h[0]}dispose(){this.ref.release()}fork(g){const a=this;return new class extends p{constructor(){super(a.id,a.provider,[g],a.ref.acquire())}}}async provideSupertypes(g,a){try{const h=await this.provider.provideSupertypes(g,a);if(v(h))return h}catch(h){(0,o.onUnexpectedExternalError)(h)}return[]}async provideSubtypes(g,a){try{const h=await this.provider.provideSubtypes(g,a);if(v(h))return h}catch(h){(0,o.onUnexpectedExternalError)(h)}return[]}}t.TypeHierarchyModel=p;let m=class{constructor(){this.models=new Map}registerTypeHierarchyProvider(g,a){l.TypeHierarchyProviderRegistry.register(g,a)}async prepareTypeHierarchyProvider(g,a){let h=this.modelService.getModelReference(o.URI.parse(g.toString())),u=h?.instance.getMonacoModel();if(h?.dispose(),!u){const c=await this.modelService.createModelReference(o.URI.parse(g.toString()));u=c.instance.getMonacoModel(),h=c}try{const c=await p.create(u,a,o.CancellationToken.None);return c?(this.models.set(c.id,c),this.models.forEach((E,f,d)=>{d.size>10&&(E.dispose(),this.models.delete(f))}),[c.root]):[]}finally{h?.dispose()}}async provideSupertypes(g){const a=this.models.get(g._sessionId);if(a)return a.provideSupertypes(g,o.CancellationToken.None)}async provideSubtypes(g){const a=this.models.get(g._sessionId);if(a)return a.provideSubtypes(g,o.CancellationToken.None)}};t.TypeHierarchyService=m,n.__decorate([(0,r.Autowired)(_.IEditorDocumentModelService),n.__metadata("design:type",Object)],m.prototype,"modelService",void 0),t.TypeHierarchyService=m=n.__decorate([(0,r.Injectable)()],m)},39266:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserMultiDiffEditor=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),_=e(28423),v=e(72665),p=e(65034),m=e(104),s=e(19087),g=e(55113),a=e(64335),h=e(30526),u=e(96689),c=e(82196);let E=class extends l.WithEventBus{constructor(d,y,b){super(),this.multiDiffWidget=d,this.convertedOptions=y,this.editorCollectionService=b,this.multiDiffModelChangeEmitter=new l.Emitter,this.onMultiDiffModelChange=this.multiDiffModelChangeEmitter.event,this.viewStateMap=new Map,this.editorCollectionService.addMultiDiffEditors([this])}onDocModelContentChangedEvent(d){var y;this.currentUri&&(((y=this.multiDiffModel)===null||y===void 0?void 0:y.documents.value)==="loading"||!this.multiDiffModel.documents.value.some(b=>{var A;return((A=b.object.modified)===null||A===void 0?void 0:A.uri.toString())===d.payload.uri.codeUri.toString()})||this.eventBus.fire(new c.ResourceDecorationNeedChangeEvent({uri:this.currentUri,decoration:{dirty:!!d.payload.dirty,readOnly:!!d.payload.readonly}})))}saveViewState(d){if(!d)return;const y=d.toString(),b=this.multiDiffWidget.getViewState();b&&this.viewStateMap.set(y,b)}restoreViewState(d){if(!d)return;const y=d.toString(),b=this.viewStateMap.get(y);b&&this.multiDiffWidget.setViewState(b)}createAndRegisterEditorParts(d,y,b,A,S){const D=[];if(d){const I=this.injector.get(h.DiffEditorPart,[d.editor,()=>b,g.EditorType.MODIFIED_DIFF,S]);D.push(I)}if(y){const I=this.injector.get(h.DiffEditorPart,[y.editor,()=>A,g.EditorType.ORIGINAL_DIFF,S]);D.push(I)}this.editorCollectionService.addEditors(D)}async compareMultiple(d,y,b){var A,S;this.currentUri&&this.saveViewState(this.currentUri);const D=!((A=y.metadata.sources)===null||A===void 0)&&A.length?{resources:p.ValueWithChangeEvent.const(y.metadata.sources)}:await this.multiDiffSourceResolverService.resolve(y.uri),I=D?(0,_.observableFromValueWithChangeEvent)(this,D.resources):(0,_.constObservable)([]),w=(0,_.mapObservableArrayCached)(this,I,async(k,F)=>{var L,B;let U,W;const j=new l.DisposableStore;try{[U,W]=await Promise.all([k.originalUri?this.documentModelManager.createModelReference(k.originalUri):void 0,k.modifiedUri?this.documentModelManager.createModelReference(k.modifiedUri):void 0]),U&&j.add(U),W&&j.add(W)}catch(Z){this.messageService.error(Z.message),this.logger.error(Z);return}const Q=(L=k.modifiedUri)!==null&&L!==void 0?L:k.originalUri,G={multiDiffEditorItem:k,original:U?.instance.getMonacoModel(),modified:W?.instance.getMonacoModel(),originalInstance:U?.instance,modifiedInstance:W?.instance,contextKeys:k.contextKeys,options:{readOnly:(B=W||U)===null||B===void 0?void 0:B.instance.readonly,...this.convertedOptions.diffOptions},onOptionsDidChange:Z=>this.preferenceService.onPreferenceChanged($=>{$.affects(Q.toString())&&$.preferenceName.includes("editor")&&Z()})};return F.add(m.RefCounted.createOfNonDisposable(G,j,this))},k=>{var F,L;return JSON.stringify([(F=k.modifiedUri)===null||F===void 0?void 0:F.toString(),(L=k.originalUri)===null||L===void 0?void 0:L.toString()])}),T=(0,_.observableValue)("documents","loading"),R=(0,_.derived)(async k=>{const F=w.read(k),B=(await Promise.all(F)).filter(U=>U!==void 0);T.set(B,void 0)}),M=(0,_.recomputeInitiallyAndOnChange)(R);await R.get(),(S=this.multiDiffModel)===null||S===void 0||S.dispose(),this.multiDiffModel={dispose:()=>M.dispose(),documents:new _.ValueWithChangeEventFromObservable(T),contextKeys:D?.contextKeys};const O=this.multiDiffWidget.createViewModel(this.multiDiffModel);await O.waitForDiffs(),this.multiDiffWidget.setViewModel(O),this.multiDiffWidget.getActiveControl(),this.currentUri=y.uri,this.restoreViewState(y.uri);const x=T.get();for(const k of x){if((0,l.isString)(k))continue;const F=k.object.modified,L=k.object.original;if(!F&&!L)continue;let B=F?this.multiDiffWidget.tryGetCodeEditor(F.uri):void 0,U=L?this.multiDiffWidget.tryGetCodeEditor(L.uri):void 0;if(!B&&!U){const W=F||L;if(!W)continue;l.Event.once(W.onDidChangeAttached)(async()=>{await Promise.resolve(),B=F?this.multiDiffWidget.tryGetCodeEditor(F.uri):void 0,U=L?this.multiDiffWidget.tryGetCodeEditor(L.uri):void 0,this.createAndRegisterEditorParts(B,U,k.object.modifiedInstance,k.object.originalInstance,T)});continue}this.createAndRegisterEditorParts(B,U,k.object.modifiedInstance,k.object.originalInstance,T)}this.multiDiffModelChangeEmitter.fire(this.multiDiffModel)}getDiffEntry(d){return this.multiDiffWidget.findDocumentDiffItem(d.codeUri)}getCurrentDiffEntry(){var d;const y=this.multiDiffWidget.getActiveControl();if(!y)return;const b=(d=y.getOriginalEditor().getModel())===null||d===void 0?void 0:d.uri;if(b)return this.multiDiffWidget.findDocumentDiffItem(b)}reveal(d,y){this.multiDiffWidget.reveal(d,y)}collapseAll(){const d=this.multiDiffWidget.getViewState(),y={...d,docStates:Object.keys(d.docStates||{}).reduce((b,A)=>(b[A]={...d.docStates[A],collapsed:!0},b),{})};this.multiDiffWidget.setViewState(y)}expandAll(){const d=this.multiDiffWidget.getViewState(),y={...d,docStates:Object.keys(d.docStates||{}).reduce((b,A)=>(b[A]={...d.docStates[A],collapsed:!1},b),{})};this.multiDiffWidget.setViewState(y)}layout(d){this.multiDiffWidget.layout(d)}focus(){const d=this.multiDiffWidget.getActiveControl();d&&d.focus()}tryGetCodeEditor(d){return this.multiDiffWidget.tryGetCodeEditor(d.codeUri)}dispose(){super.dispose(),this.multiDiffWidget.dispose()}};t.BrowserMultiDiffEditor=E,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],E.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(v.IMessageService),n.__metadata("design:type",Object)],E.prototype,"messageService",void 0),n.__decorate([(0,r.Autowired)(u.IEditorDocumentModelService),n.__metadata("design:type",Object)],E.prototype,"documentModelManager",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],E.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(a.IMultiDiffSourceResolverService),n.__metadata("design:type",Object)],E.prototype,"multiDiffSourceResolverService",void 0),n.__decorate([(0,r.Autowired)(l.ILogger),n.__metadata("design:type",Object)],E.prototype,"logger",void 0),n.__decorate([(0,l.OnEvent)(u.EditorDocumentModelContentChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[u.EditorDocumentModelContentChangedEvent]),n.__metadata("design:returntype",void 0)],E.prototype,"onDocModelContentChangedEvent",null),t.BrowserMultiDiffEditor=E=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[s.MultiDiffEditorWidget,Object,Function])],E)},86997:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiDiffResolver=void 0;const n=e(85608),r=e(76003),o=e(65034),l=e(64335);let _=class{constructor(){this.sourceValues=new Map}registerSources(p,m){const s=p.toString(),g=this.sourceValues.get(s);g?g.value=m:this.sourceValues.set(s,new o.ValueWithChangeEvent(m))}canHandleUri(p){return p.scheme===l.MULTI_DIFF_SCHEME}async resolveDiffSource(p){const m=this.sourceValues.get(p.toString());if(m)return{resources:m}}dispose(){this.sourceValues.clear()}};t.MultiDiffResolver=_,t.MultiDiffResolver=_=n.__decorate([(0,r.Injectable)()],_)},73691:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiDiffResourceProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26542),_=e(14951),v=e(23418),p=e(64335);let m=class extends o.WithEventBus{handlesUri(g){const a=this.multiDiffSourceResolverService.getResolvers();for(const h of a)if(h.canHandleUri(g))return 10;return-1}async provideResource(g){var a;const{name:h,sources:u}=g.getParsedQuery(),c=u?JSON.parse(u):[],E=c.length>0?new o.URI(c[0].modifiedUri):void 0,f=E?this.labelService.getIcon(E):void 0;return{name:`Multi-Diff: ${h||c.length+" files"}`,icon:f||(0,o.getIcon)("diff"),uri:g,supportsRevive:(a=this.appConfig.enableDiffRevive)!==null&&a!==void 0?a:!1,metadata:{sources:c}}}async shouldCloseResource(g,a){return!0}};t.MultiDiffResourceProvider=m,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",l.LabelService)],m.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(v.ResourceService),n.__metadata("design:type",v.ResourceService)],m.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(_.IFileServiceClient),n.__metadata("design:type",Object)],m.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(p.IMultiDiffSourceResolverService),n.__metadata("design:type",Object)],m.prototype,"multiDiffSourceResolverService",void 0),t.MultiDiffResourceProvider=m=n.__decorate([(0,r.Injectable)()],m)},36168:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiDiffEditorContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),_=e(23418),v=e(64335),p=e(82196),m=e(86997),s=e(73691);let g=class{registerMultiDiffSourceResolver(h){return h.registerResolver(this.multiDiffResolver)}registerResource(h){h.registerResourceProvider(this.multiDiffResourceProvider)}registerEditorComponent(h){h.registerEditorComponentResolver(u=>{const c=this.multiDiffSourceResolverService.getResolvers();for(const E of c)if(E.canHandleUri(o.URI.from({scheme:u,path:"empty"})))return 10;return-1},(u,c)=>{c.push({type:p.EditorOpenType.multiDiff})})}registerCommands(h){h.registerCommand(o.MULTI_DIFF_EDITOR_COMMANDS.COLLAPSE_FILES,{execute:()=>{var u;const c=this.workbenchEditorService.currentEditorGroup;((u=c.currentOpenType)===null||u===void 0?void 0:u.type)===p.EditorOpenType.multiDiff&&c.multiDiffEditor.collapseAll()}}),h.registerCommand(o.MULTI_DIFF_EDITOR_COMMANDS.EXPAND_FILES,{execute:()=>{var u;const c=this.workbenchEditorService.currentEditorGroup;((u=c.currentOpenType)===null||u===void 0?void 0:u.type)===p.EditorOpenType.multiDiff&&c.multiDiffEditor.expandAll()}})}registerMenus(h){h.registerMenuItems(l.MenuId.EditorTitle,[{command:{id:o.MULTI_DIFF_EDITOR_COMMANDS.COLLAPSE_FILES.id,label:(0,o.localize)("multiDiffEditor.action.collapseFiles")},iconClass:"codicon codicon-collapse-all",group:"navigation",when:"isInMultiDiffEditor"}]),h.registerMenuItems(l.MenuId.EditorTitle,[{command:{id:o.MULTI_DIFF_EDITOR_COMMANDS.EXPAND_FILES.id,label:(0,o.localize)("multiDiffEditor.action.expandFiles")},iconClass:"codicon codicon-expand-all",group:"navigation",when:"isInMultiDiffEditor"}])}};t.MultiDiffEditorContribution=g,n.__decorate([(0,r.Autowired)(v.IMultiDiffSourceResolverService),n.__metadata("design:type",Object)],g.prototype,"multiDiffSourceResolverService",void 0),n.__decorate([(0,r.Autowired)(m.MultiDiffResolver),n.__metadata("design:type",m.MultiDiffResolver)],g.prototype,"multiDiffResolver",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.MultiDiffResourceProvider)],g.prototype,"multiDiffResourceProvider",void 0),n.__decorate([(0,r.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],g.prototype,"workbenchEditorService",void 0),t.MultiDiffEditorContribution=g=n.__decorate([(0,o.Domain)(p.BrowserEditorContribution,p.MultiDiffSourceContribution,l.MenuContribution,o.CommandContribution)],g)},94558:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiDiffSourceResolverService=void 0;const n=e(85608),r=e(76003),o=e(70392);let l=class{constructor(){this._resolvers=new Set}registerResolver(v){if(this._resolvers.has(v))throw new Error("Duplicate resolver");return this._resolvers.add(v),(0,o.toDisposable)(()=>this._resolvers.delete(v))}resolve(v){for(const p of this._resolvers)if(p.canHandleUri(v))return p.resolveDiffSource(v);return Promise.resolve(void 0)}getResolvers(){return Array.from(this._resolvers)}};t.MultiDiffSourceResolverService=l,t.MultiDiffSourceResolverService=l=n.__decorate([(0,r.Injectable)()],l)},93532:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationMenuModel=t.NavigationBarViewService=t.NavigationMenuContainer=t.NavigationMenu=t.NavigationItem=t.NavigationBar=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(76003),_=e(97267),v=e(41869),p=e(28423),m=e(26209),s=n.__importDefault(e(69418)),g=e(82196),a=e(50674),h=({editorGroup:d})=>{const y=(0,v.useInjectable)(g.IBreadCrumbService),b=(0,v.useDesignStyles)(s.default.navigation_container,"navigation_container"),A=(0,v.useDesignStyles)(s.default.navigation_icon,"navigation_icon");if((0,a.useUpdateOnGroupTabChange)(d),(0,v.useUpdateOnEvent)(y.onDidUpdateBreadCrumbResults,[],D=>{var I;const w=d.currentEditor&&d.currentEditor.currentDocumentModel?d.currentEditor:null,T=d.currentEditor&&d.currentEditor.currentDocumentModel?d.currentEditor.currentDocumentModel.uri:(I=d.currentResource)===null||I===void 0?void 0:I.uri;return!!T&&D.editor===w&&D.uri.isEqual(T)}),d.resources.length===0||!d.currentResource)return null;let S;return d.currentEditor&&d.currentEditor.currentDocumentModel?S=y.getBreadCrumbs(d.currentEditor.currentDocumentModel.uri,d.currentEditor):S=y.getBreadCrumbs(d.currentResource.uri,null),S?S.length===0?null:o.default.createElement("div",{className:(0,r.default)("kt-navigation-container",b),onContextMenu:D=>{D.preventDefault()}},S.map((D,I)=>o.default.createElement(o.default.Fragment,{key:I+"-crumb:"+D.name},I>0&&o.default.createElement(_.Icon,{icon:"right",size:"small",className:A}),o.default.createElement(t.NavigationItem,{part:D,editorGroup:d})))):null};t.NavigationBar=h,t.NavigationItem=(0,o.memo)(({part:d,editorGroup:y})=>{const b=(0,v.useInjectable)(E),A=(0,v.useInjectable)(m.BreadCrumbsMenuService),S=(0,o.useRef)(),D=(0,v.useDesignStyles)(s.default["navigation-part"],"navigation-part"),I=(0,o.useCallback)(async()=>{if(d.getSiblings&&S.current){const{left:w,top:T,height:R}=S.current.getBoundingClientRect(),M=await d.getSiblings();let O=w;window.innerWidth-O<210&&(O=window.innerWidth-200-5),b.showMenu(M.parts,O,T+R+5,M.currentIndex,d.uri,y)}},[S.current,d]);return o.default.createElement("span",{onClick:I,onContextMenu:w=>{!d.isSymbol&&d.uri&&A.show(w.nativeEvent.x,w.nativeEvent.y,y,d.uri),w.preventDefault()},className:D,ref:S},d.icon&&o.default.createElement("span",{className:d.icon}),o.default.createElement("span",null,d.name))});const u=({model:d})=>{let y=window.innerHeight-d.y-20,b=d.y;const A=d.parts.length*22;y<100&&y<A&&(y=100,b=window.innerHeight-20-y);const S=(0,o.useRef)(),D=(0,v.useDesignStyles)(s.default.navigation_menu,"navigation_menu"),I=(0,v.useDesignStyles)(s.default.navigation_menu_item,"navigation_menu_item"),w=(0,v.useInjectable)(E),T=(0,v.useAutorun)(d.subMenu),R=(0,o.useCallback)(()=>{v.fastdom.measure(()=>{try{if(S.current){const M=S.current.querySelector(`.${s.default.navigation_menu_item_current}`);M&&M.scrollIntoView({behavior:"auto",block:"center"})}}catch{}})},[S.current]);return o.default.createElement("div",{className:D,style:{left:d.x+"px",top:b+"px",maxHeight:y+"px",height:A+"px"}},o.default.createElement(_.Scrollbars,{className:s.default.navigation_menu_items,universal:!0,forwardedRef:M=>{S.current=M,R()}},d.parts.map((M,O)=>{let x;const k=M.getChildren?async()=>{if(x){const{left:L,top:B,width:U}=x.getBoundingClientRect();let W=L+U+5;window.innerWidth-W<210&&(W=L-U-5);const j=await M.getChildren();d.showSubMenu(j,W,B,d)}}:void 0,F=M.onClick?()=>{M.onClick(),w.dispose()}:void 0;return o.default.createElement("div",{onClick:F||k,ref:L=>x=L,className:(0,r.default)(I,{[s.default.navigation_menu_item_current]:O===d.initialIndex}),key:"menu-"+M.name},o.default.createElement("span",{className:M.icon||(0,v.getIcon)("smile")}),o.default.createElement("span",{className:s.default.navigation_menu_item_label},M.name),M.getChildren&&o.default.createElement("span",{className:s.default.navigation_right,onClick:F&&k?L=>{L.stopPropagation(),k()}:void 0},o.default.createElement(_.Icon,{icon:"right",size:"small"})))})),T&&o.default.createElement(t.NavigationMenu,{model:T}))};t.NavigationMenu=u;const c=()=>{const d=(0,o.useRef)(),y=(0,v.useInjectable)(E),b=(0,v.useAutorun)(y.current);return(0,o.useEffect)(()=>{if(d.current){const A=new v.Disposable;return A.addDispose(new v.DomListener(window,"mouseup",()=>{y.dispose()})),A.addDispose(new v.DomListener(d.current,"mouseup",S=>{S.stopPropagation()})),A.dispose.bind(A)}}),b?o.default.createElement("div",{tabIndex:1,ref:d},o.default.createElement(t.NavigationMenu,{model:b})):null};t.NavigationMenuContainer=c;let E=class{constructor(){this.current=(0,p.observableValue)(this,null)}showMenu(y,b,A,S,D,I){(0,p.transaction)(w=>{this.current.set(new f(y,b,A,S,D),w)})}dispose(){(0,p.transaction)(y=>{const b=this.current.get();b?.dispose(),this.current.set(null,y)})}};t.NavigationBarViewService=E,t.NavigationBarViewService=E=n.__decorate([(0,l.Injectable)()],E);class f{constructor(y,b,A,S=-1,D){this.parts=y,this.x=b,this.y=A,this.initialIndex=S,this.uri=D,this.subMenu=(0,p.observableValue)(this,null)}showSubMenu(y,b,A,S){(0,p.transaction)(D=>{this.subMenu.set(new f(y,b,A,-1,S),D)})}dispose(){(0,p.transaction)(y=>{const b=this.subMenu.get();b?.dispose(),this.subMenu.set(null,y)})}}t.NavigationMenuModel=f},71145:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookService=void 0;const n=e(85608),r=e(76003),o=e(41869);let l=class extends o.WithEventBus{constructor(){super(...arguments),this._onDidOpenNotebookDocument=new o.Emitter,this.onDidOpenNotebookDocument=this._onDidOpenNotebookDocument.event,this._onDidCloseNotebookDocument=new o.Emitter,this.onDidCloseNotebookDocument=this._onDidCloseNotebookDocument.event,this._onDidSaveNotebookDocument=new o.Emitter,this.onDidSaveNotebookDocument=this._onDidSaveNotebookDocument.event,this._onDidChangeNotebookDocument=new o.Emitter,this.onDidChangeNotebookDocument=this._onDidChangeNotebookDocument.event}};t.NotebookService=l,t.NotebookService=l=n.__decorate([(0,r.Injectable)()],l)},34885:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorPreferenceContribution=void 0;const n=e(85608),r=e(41869),o=e(24328);let l=class{constructor(){this.schema=o.editorPreferenceSchema}};t.EditorPreferenceContribution=l,t.EditorPreferenceContribution=l=n.__decorate([(0,r.Domain)(r.PreferenceContribution)],l)},6043:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.diffEditorOptionsConverters=t.textModelUpdateOptionsConverters=t.editorOptionsConverters=void 0,t.isEditorOption=l,t.isDiffEditorOption=_,t.getConvertedMonacoOptions=s;const n=e(41869),{removeUndefined:r}=n.objects;t.editorOptionsConverters=new Map([["editor.ariaLabel",{monaco:"ariaLabel"}],["editor.rulers",{monaco:"rulers"}],["editor.wordSeparators",{monaco:"wordSeparators"}],["editor.selectionClipboard",{monaco:"selectionClipboard"}],["editor.lineNumbers",{monaco:"lineNumbers"}],["editor.renderFinalNewline",{monaco:"renderFinalNewline"}],["editor.selectOnLineNumbers",{monaco:"selectOnLineNumbers"}],["editor.lineNumbersMinChars",{monaco:"lineNumbersMinChars"}],["editor.glyphMargin",{monaco:"glyphMargin"}],["editor.lineDecorationsWidth",{monaco:"lineDecorationsWidth"}],["editor.revealHorizontalRightPadding",{monaco:"revealHorizontalRightPadding"}],["editor.roundedSelection",{monaco:"roundedSelection"}],["editor.extraEditorClassName",{monaco:"extraEditorClassName"}],["editor.readOnly",{monaco:"readOnly"}],["editor.scrollbar",{monaco:"scrollbar"}],["editor.minimap",{monaco:"minimap",convert:g=>({enabled:g})}],["editor.find",{monaco:"find"}],["editor.fixedOverflowWidgets",{monaco:"fixedOverflowWidgets"}],["editor.overviewRulerLanes",{monaco:"overviewRulerLanes"}],["editor.overviewRulerBorder",{monaco:"overviewRulerBorder"}],["editor.cursorBlinking",{monaco:"cursorBlinking"}],["editor.mouseWheelZoom",{monaco:"mouseWheelZoom"}],["editor.cursorSmoothCaretAnimation",{monaco:"cursorSmoothCaretAnimation"}],["editor.cursorStyle",{monaco:"cursorStyle"}],["editor.cursorWidth",{monaco:"cursorWidth"}],["editor.fontLigatures",{monaco:"fontLigatures"}],["editor.columnSelection",{monaco:"columnSelection"}],["editor.disableLayerHinting",{monaco:"disableLayerHinting"}],["editor.disableMonospaceOptimizations",{monaco:"disableMonospaceOptimizations"}],["editor.hideCursorInOverviewRuler",{monaco:"hideCursorInOverviewRuler"}],["editor.scrollBeyondLastLine",{monaco:"scrollBeyondLastLine"}],["editor.scrollBeyondLastColumn",{monaco:"scrollBeyondLastColumn"}],["editor.smoothScrolling",{monaco:"smoothScrolling"}],["editor.automaticLayout",{monaco:"automaticLayout"}],["editor.wordWrap",{monaco:"wordWrap"}],["editor.wordWrapColumn",{monaco:"wordWrapColumn"}],["editor.wordWrapMinified",{monaco:"wordWrapMinified"}],["editor.wrappingIndent",{monaco:"wrappingIndent"}],["editor.wordWrapBreakBeforeCharacters",{monaco:"wordWrapBreakBeforeCharacters"}],["editor.wordWrapBreakAfterCharacters",{monaco:"wordWrapBreakAfterCharacters"}],["editor.wordWrapBreakObtrusiveCharacters",{monaco:"wordWrapBreakObtrusiveCharacters"}],["editor.stopRenderingLineAfter",{monaco:"stopRenderingLineAfter"}],["editor.hover",{monaco:"hover"}],["editor.links",{monaco:"links"}],["editor.colorDecorators",{monaco:"colorDecorators"}],["editor.contextmenu",{monaco:"contextmenu"}],["editor.mouseWheelScrollSensitivity",{monaco:"mouseWheelScrollSensitivity"}],["editor.fastScrollSensitivity",{monaco:"fastScrollSensitivity"}],["editor.multiCursorModifier",{monaco:"multiCursorModifier"}],["editor.multiCursorMergeOverlapping",{monaco:"multiCursorMergeOverlapping"}],["editor.accessibilitySupport",{monaco:"accessibilitySupport"}],["editor.suggest",{monaco:"suggest"}],["editor.gotoLocation",{monaco:"gotoLocation"}],["editor.quickSuggestions",{monaco:"quickSuggestions"}],["editor.quickSuggestionsDelay",{monaco:"quickSuggestionsDelay"}],["editor.parameterHints",{monaco:"parameterHints"}],["editor.autoClosingBrackets",{monaco:"autoClosingBrackets"}],["editor.autoClosingQuotes",{monaco:"autoClosingQuotes"}],["editor.autoSurround",{monaco:"autoSurround"}],["editor.autoIndent",{monaco:"autoIndent"}],["editor.formatOnType",{monaco:"formatOnType"}],["editor.formatOnPaste",{monaco:"formatOnPaste"}],["editor.dragAndDrop",{monaco:"dragAndDrop"}],["editor.suggestOnTriggerCharacters",{monaco:"suggestOnTriggerCharacters"}],["editor.acceptSuggestionOnEnter",{monaco:"acceptSuggestionOnEnter"}],["editor.acceptSuggestionOnCommitCharacter",{monaco:"acceptSuggestionOnCommitCharacter"}],["editor.snippetSuggestions",{monaco:"snippetSuggestions"}],["editor.emptySelectionClipboard",{monaco:"emptySelectionClipboard"}],["editor.copyWithSyntaxHighlighting",{monaco:"copyWithSyntaxHighlighting"}],["editor.wordBasedSuggestions",{monaco:"wordBasedSuggestions"}],["editor.suggestSelection",{monaco:"suggestSelection"}],["editor.suggestFontSize",{monaco:"suggestFontSize"}],["editor.suggestLineHeight",{monaco:"suggestLineHeight"}],["editor.tabCompletion",{monaco:"tabCompletion"}],["editor.selectionHighlight",{monaco:"selectionHighlight"}],["editor.occurrencesHighlight",{monaco:"occurrencesHighlight"}],["editor.codeLens",{monaco:"codeLens"}],["editor.lightbulb",{monaco:"lightbulb"}],["editor.codeActionsOnSave",{monaco:"codeActionsOnSave"}],["editor.codeActionsOnSaveTimeout",{monaco:"codeActionsOnSaveTimeout"}],["editor.folding",{monaco:"folding"}],["editor.foldingStrategy",{monaco:"foldingStrategy"}],["editor.showFoldingControls",{monaco:"showFoldingControls"}],["editor.matchBrackets",{monaco:"matchBrackets"}],["editor.renderWhitespace",{monaco:"renderWhitespace"}],["editor.renderControlCharacters",{monaco:"renderControlCharacters"}],["editor.renderIndentGuides",{monaco:"guides.indentation"}],["editor.highlightActiveIndentGuide",{monaco:"guides.highlightActiveIndentation"}],["editor.guides",{monaco:"guides"}],["editor.renderLineHighlight",{monaco:"renderLineHighlight"}],["editor.useTabStops",{monaco:"useTabStops"}],["editor.fontFamily",{monaco:"fontFamily"}],["editor.fontWeight",{monaco:"fontWeight"}],["editor.fontSize",{monaco:"fontSize"}],["editor.lineHeight",{monaco:"lineHeight"}],["editor.letterSpacing",{monaco:"letterSpacing"}],["editor.showUnused",{monaco:"showUnused"}],["editor.rename.enablePreview",{monaco:"editor.rename.enablePreview"}],["editor.semanticHighlighting",{monaco:"semanticHighlighting"}],["editor.bracketPairColorization",{monaco:"bracketPairColorization"}],["editor.wrappingStrategy",{monaco:"wrappingStrategy"}],["editor.experimental.stickyScroll.enabled",{monaco:"experimental",convert:g=>({stickyScroll:{enabled:g}})}],["editor.forceReadOnly",{monaco:"readOnly",convert:g=>{if(g)return!0}}],["editor.unicodeHighlight",{monaco:"unicodeHighlight"}],["editor.inlineSuggest.showToolbar",{monaco:"inlineSuggest",convert:g=>{if(g)return{showToolbar:g}}}]]),t.textModelUpdateOptionsConverters=new Map([["editor.tabSize",{monaco:"tabSize"}],["editor.indentSize",{monaco:"indentSize"}],["editor.insertSpaces",{monaco:"insertSpaces"}],["editor.trimAutoWhitespace",{monaco:"trimAutoWhitespace"}]]),t.diffEditorOptionsConverters=new Map([["diffEditor.enableSplitViewResizing",{monaco:"enableSplitViewResizing"}],["diffEditor.renderSideBySide",{monaco:"renderSideBySide"}],["diffEditor.ignoreTrimWhitespace",{monaco:"ignoreTrimWhitespace"}],["diffEditor.renderIndicators",{monaco:"renderIndicators"}],["diffEditor.originalEditable",{monaco:"originalEditable"}],["diffEditor.minimap",{monaco:"minimap",convert:g=>({enabled:g})}],["diffEditor.experimental.stickyScroll.enabled",{monaco:"experimental",convert:g=>({stickyScroll:{enabled:g}})}],["diffEditor.hideUnchangedRegions.enabled",{monaco:"hideUnchangedRegions",convert:g=>({enabled:g})}],["diffEditor.hideUnchangedRegions.revealLineCount",{monaco:"hideUnchangedRegions",convert:g=>({revealLineCount:g})}],["diffEditor.hideUnchangedRegions.minimumLineCount",{monaco:"hideUnchangedRegions",convert:g=>({minimumLineCount:g})}],["diffEditor.hideUnchangedRegions.contextLineCount",{monaco:"hideUnchangedRegions",convert:g=>({contextLineCount:g})}],["diffEditor.experimental.showMoves",{monaco:"experimental",convert:g=>({showMoves:g})}],["diffEditor.experimental.showEmptyDecorations",{monaco:"experimental",convert:g=>({showEmptyDecorations:g})}]]);function o(g,a){if(a.has(g))return!0;{const h=a.keys();for(const u of h)if(g.startsWith(u))return!0}return!1}function l(g){return o(g,t.editorOptionsConverters)||o(g,t.textModelUpdateOptionsConverters)||o(g,t.diffEditorOptionsConverters)}function _(g){return o(g,t.diffEditorOptionsConverters)}const v=[...t.editorOptionsConverters.keys()],p=[...t.textModelUpdateOptionsConverters.keys()],m=[...t.diffEditorOptionsConverters.keys()];function s(g,a,h,u){const c=a?n.Uri.parse(a):void 0,E=(D,I)=>D.reduce((w,T)=>{const R=g.getValue(T,{resource:c,overrideIdentifier:h});if(R!==void 0){const M=I.get(T);if(!M)return w[T]=R,w;const O=M?M.monaco:T,x=M?.convert?M.convert(R):R;w[O]?Object.assign(w[O],x):w[O]=x}return w},{}),f=u?u.filter(D=>t.editorOptionsConverters.has(D)):[...v],d=u?u.filter(D=>t.textModelUpdateOptionsConverters.has(D)):[...p],y=u?u.filter(D=>t.diffEditorOptionsConverters.has(D)):[...m],b=r(E(f,t.editorOptionsConverters)),A=r(E(d,t.textModelUpdateOptionsConverters)),S=r(E(y,t.diffEditorOptionsConverters));return{editorOptions:b,modelOptions:A,diffOptions:S}}},24328:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorPreferences=t.editorPreferenceSchema=t.DIFF_EDITOR_DEFAULTS=t.EDITOR_DEFAULTS=t.EDITOR_INLINE_SUGGEST_DEFAULTS=t.EDITOR_SUGGEST_DEFAULTS=t.EDITOR_MODEL_DEFAULTS=t.EDITOR_FONT_DEFAULTS=t.USUAL_WORD_SEPARATORS=void 0;const n=e(41869),r=e(82196);t.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";const o="Consolas, 'Courier New', monospace",l="Menlo, Monaco, 'Courier New', monospace",_="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'";t.EDITOR_FONT_DEFAULTS={fontFamily:n.isOSX?l:n.isLinux?_:o,fontWeight:"normal",fontSize:12,tabSize:2,renderWhitespace:!1,cursorStyle:"line",insertSpace:!0,wordWrap:"off",wordWrapColumn:80,lineHeight:0,letterSpacing:0},t.EDITOR_MODEL_DEFAULTS={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},t.EDITOR_SUGGEST_DEFAULTS={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,maxVisibleSuggestions:12,showMethods:!0,showFunctions:!0,showConstructors:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0,detailsVisible:!0,preview:!0,statusBar:{visible:!1}},t.EDITOR_INLINE_SUGGEST_DEFAULTS={enabled:!0,showToolbar:"onHover"},t.EDITOR_DEFAULTS={inDiffEditor:!1,wordSeparators:t.USUAL_WORD_SEPARATORS,lineNumbersMinChars:3,lineDecorationsWidth:10,readOnly:!1,columnSelection:!1,mouseStyle:"text",disableLayerHinting:!1,automaticLayout:!0,wordWrap:"off",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:1,wordWrapBreakBeforeCharacters:"([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B",wordWrapBreakAfterCharacters:" })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63",wordWrapBreakObtrusiveCharacters:".",autoClosingBrackets:"languageDefined",autoClosingQuotes:"languageDefined",autoSurround:"languageDefined",autoIndent:!0,dragAndDrop:!0,emptySelectionClipboard:!0,copyWithSyntaxHighlighting:!0,useTabStops:!0,multiCursorModifier:"altKey",multiCursorMergeOverlapping:!0,accessibilitySupport:"off",showUnused:!0,wrappingStrategy:"simple",viewInfo:{extraEditorClassName:"",disableMonospaceOptimizations:!1,rulers:[],ariaLabel:(0,n.localize)("editorViewAccessibleLabel","Editor Content"),renderLineNumbers:0,renderCustomLineNumbers:null,renderFinalNewline:!0,selectOnLineNumbers:!0,glyphMargin:!0,revealHorizontalRightPadding:30,roundedSelection:!0,overviewRulerLanes:2,overviewRulerBorder:!0,cursorBlinking:1,mouseWheelZoom:!1,cursorSmoothCaretAnimation:!1,cursorStyle:1,cursorWidth:0,hideCursorInOverviewRuler:!1,scrollBeyondLastLine:!0,scrollBeyondLastColumn:5,smoothScrolling:!1,stopRenderingLineAfter:1e4,renderWhitespace:"none",renderControlCharacters:!1,fontLigatures:!1,renderLineHighlight:"none",scrollbar:{vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:10,horizontalSliderSize:10,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,mouseWheelScrollSensitivity:1,fastScrollSensitivity:5},minimap:{enabled:!0,side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120},guides:{indentation:!0,highlightActiveIndentGuide:!0,bracketPairs:!0},fixedOverflowWidgets:!0},contribInfo:{selectionClipboard:!0,hover:{enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0},links:!0,contextmenu:!0,quickSuggestions:{other:!0,comments:!1,strings:!1},quickSuggestionsDelay:10,parameterHints:{enabled:!0,cycle:!1},formatOnType:!1,formatOnPaste:!1,suggestOnTriggerCharacters:!0,acceptSuggestionOnEnter:"on",acceptSuggestionOnCommitCharacter:!0,wordBasedSuggestions:!1,suggestSelection:"recentlyUsed",suggestFontSize:0,suggestLineHeight:0,tabCompletion:"off",gotoLocation:{multiple:"peek"},selectionHighlight:!0,occurrencesHighlight:!0,codeLens:!0,folding:!0,foldingStrategy:"auto",showFoldingControls:"mouseover",matchBrackets:!0,find:{seedSearchStringFromSelection:!0,autoFindInSelection:!1,globalFindClipboard:!1,addExtraSpaceOnTop:!0},colorDecorators:!0,lightbulbEnabled:r.ShowLightbulbIconMode.On,codeActionsOnSave:{},codeActionsOnSaveTimeout:750}},t.DIFF_EDITOR_DEFAULTS={renderIndicators:!0,minimap:!1,renderSideBySide:!0,ignoreTrimWhitespace:!1,hideUnchangedRegions:{enabled:!0,revealLineCount:20,minimumLineCount:3,contextLineCount:3},experimental:{showMoves:!1,showEmptyDecorations:!0,collapseUnchangedRegions:!0,stickyScroll:{enable:!1}}};const v={"editor.ariaLabel":{type:"string",default:t.EDITOR_DEFAULTS.viewInfo.ariaLabel,description:"%editor.configuration.ariaLabel%"},"editor.extraEditorClassName":{type:"string",description:"%editor.configuration.extraEditorClassName%"},"editor.fixedOverflowWidgets":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.fixedOverflowWidgets,description:"%editor.configuration.fixedOverflowWidgets%"},"editor.revealHorizontalRightPadding":{type:"number",description:"%editor.configuration.revealHorizontalRightPadding%"},"editor.selectOnLineNumbers":{type:"boolean",description:"%editor.configuration.selectOnLineNumbers%"},"editor.wordWrapMinified":{type:"boolean",description:"%editor.configuration.wordWrapMinified%"},"editor.wordWrapBreakAfterCharacters":{type:"string",default:" })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63",description:"%editor.configuration.wordWrapBreakAfterCharacters%"},"editor.wrappingStrategy":{type:"string",enum:["advanced","simple"],default:"simple",description:"%editor.configuration.wrappingStrategy%"},"editor.wordWrapBreakBeforeCharacters":{type:"string",default:"([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B",description:"%editor.configuration.wordWrapBreakBeforeCharacters%"},"editor.lineNumbersMinChars":{type:"number",default:t.EDITOR_DEFAULTS.lineNumbersMinChars,description:"%editor.configuration.lineNumbersMinChars%"},"editor.lineDecorationsWidth":{type:"number",default:t.EDITOR_DEFAULTS.lineDecorationsWidth,description:"%editor.configuration.lineDecorationsWidth%"},"editor.fontFamily":{type:"string",default:t.EDITOR_FONT_DEFAULTS.fontFamily,description:"%editor.configuration.fontFamily%"},"editor.fontWeight":{type:"string",default:t.EDITOR_FONT_DEFAULTS.fontWeight,description:"%editor.configuration.fontWeight%"},"editor.fontSize":{type:"number",default:t.EDITOR_FONT_DEFAULTS.fontSize,description:(0,n.localize)("fontSize","Controls the font size in pixels.")},"editor.lineHeight":{type:"number",default:t.EDITOR_FONT_DEFAULTS.lineHeight,description:(0,n.localize)("lineHeight","Controls the line height. Use 0 to compute the line height from the font size.")},"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[(0,n.localize)("editor.configuration.suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),(0,n.localize)("editor.configuration.suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:"insert",description:"%editor.configuration.suggest.insertMode%"},"editor.suggest.filterGraceful":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.filterGraceful,description:"%editor.configuration.suggest.filterGraceful%"},"editor.suggest.localityBonus":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.localityBonus,description:"%editor.configuration.suggest.localityBonus%"},"editor.suggest.shareSuggestSelections":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.shareSuggestSelections,description:"%editor.configuration.suggest.shareSuggestSelections%"},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.snippetsPreventQuickSuggestions,description:"%editor.configuration.suggest.snippetsPreventQuickSuggestions%"},"editor.suggest.showIcons":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.showIcons,description:"%editor.configuration.suggest.showIcons%"},"editor.suggest.maxVisibleSuggestions":{type:"number",default:t.EDITOR_SUGGEST_DEFAULTS.maxVisibleSuggestions,minimum:1,maximum:15,description:"%editor.configuration.suggest.maxVisibleSuggestions%"},"editor.suggest.showMethods":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showMethods%"},"editor.suggest.showFunctions":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showFunctions%"},"editor.suggest.showConstructors":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showConstructors%"},"editor.suggest.showFields":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showFields%"},"editor.suggest.showVariables":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showVariables%"},"editor.suggest.showClasses":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showClasss%"},"editor.suggest.showStructs":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showStructs%"},"editor.suggest.showInterfaces":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showInterfaces%"},"editor.suggest.showModules":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showModules%"},"editor.suggest.showProperties":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showPropertys%"},"editor.suggest.showEvents":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showEvents%"},"editor.suggest.showOperators":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showOperators%"},"editor.suggest.showUnits":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showUnits%"},"editor.suggest.showValues":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showValues%"},"editor.suggest.showConstants":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showConstants%"},"editor.suggest.showEnums":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showEnums%"},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showEnumMembers%"},"editor.suggest.showKeywords":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showKeywords%"},"editor.suggest.showWords":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showTexts%"},"editor.suggest.showColors":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showColors%"},"editor.suggest.showFiles":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showFiles%"},"editor.suggest.showReferences":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showReferences%"},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showCustomcolors%"},"editor.suggest.showFolders":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showFolders%"},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showTypeParameters%"},"editor.suggest.showSnippets":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showSnippets%"},"editor.suggest.showUsers":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showUsers%"},"editor.suggest.showIssues":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showIssues%"},"editor.suggest.statusBar.visible":{type:"boolean",default:!1,description:"%editor.configuration.suggest.statusBar.visible%"},"editor.suggest.preview":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.preview,description:"%editor.configuration.suggest.preview%"},"editor.suggest.details.visible":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.detailsVisible,description:"%editor.configuration.suggest.details.visible%"},"editor.inlineSuggest.enabled":{type:"boolean",default:t.EDITOR_INLINE_SUGGEST_DEFAULTS.enabled,description:"%editor.configuration.inlineSuggest.enabled%"},"editor.inlineSuggest.showToolbar":{type:"string",default:t.EDITOR_INLINE_SUGGEST_DEFAULTS.showToolbar,enum:["always","onHover","never"],enumDescriptions:[(0,n.localize)("editor.configuration.inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),(0,n.localize)("editor.configuration.inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),(0,n.localize)("editor.configuration.inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:"%editor.configuration.inlineSuggest.showToolbar%"},"editor.experimental.stickyScroll.enabled":{type:"boolean",default:!0,description:"%editor.configuration.experimental.stickyScroll%"},"editor.customCodeActionMenu.showHeaders":{type:"boolean",default:!0,description:"%editor.configuration.customCodeActionMenu.showHeaders"},"editor.useCustomCodeActionMenu":{type:"boolean",default:!0,description:"%editor.configuration.useCustomCodeActionMenu%"},"editor.letterSpacing":{type:"number",default:t.EDITOR_FONT_DEFAULTS.letterSpacing,description:"%editor.configuration.letterSpacing%"},"editor.lineNumbers":{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[(0,n.localize)("editor.configuration.lineNumbers.off","Line numbers are not rendered."),(0,n.localize)("editor.configuration.lineNumbers.on","Line numbers are rendered as absolute number."),(0,n.localize)("editor.configuration.lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),(0,n.localize)("editor.configuration.lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:"%editor.configuration.lineNumbers%"},"editor.renderFinalNewline":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.renderFinalNewline,description:"%editor.configuration.renderFinalNewline%"},"editor.rulers":{type:"array",items:{type:"number"},default:t.EDITOR_DEFAULTS.viewInfo.rulers,description:"%editor.configuration.rulers%"},"editor.wordSeparators":{type:"string",default:t.EDITOR_DEFAULTS.wordSeparators,description:"%editor.configuration.wordSeparators%"},"editor.tabSize":{type:"number",default:t.EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:"%editor.configuration.tabSize%"},"editor.insertSpaces":{type:"boolean",default:t.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:"%editor.configuration.insertSpaces%"},"editor.detectIndentation":{type:"boolean",default:t.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:"%editor.configuration.detectIndentation%"},"editor.roundedSelection":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.roundedSelection,description:"%editor.configuration.roundedSelection%"},"editor.scrollBeyondLastLine":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.scrollBeyondLastLine,description:"%editor.configuration.scrollBeyondLastLine%"},"editor.scrollBeyondLastColumn":{type:"number",default:t.EDITOR_DEFAULTS.viewInfo.scrollBeyondLastColumn,description:"%editor.configuration.scrollBeyondLastColumn%"},"editor.smoothScrolling":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.smoothScrolling,description:"%editor.configuration.smoothScrolling%"},"editor.minimap.enabled":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.minimap.enabled,description:"%editor.configuration.minimap.enabled%"},"editor.minimap.side":{type:"string",enum:["left","right"],default:t.EDITOR_DEFAULTS.viewInfo.minimap.side,description:"%editor.configuration.minimap.side%"},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:t.EDITOR_DEFAULTS.viewInfo.minimap.showSlider,description:"%editor.configuration.minimap.showSlider%"},"editor.minimap.renderCharacters":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.minimap.renderCharacters,description:"%editor.configuration.minimap.renderCharacters%"},"editor.minimap.maxColumn":{type:"number",default:t.EDITOR_DEFAULTS.viewInfo.minimap.maxColumn,description:"%editor.configuration.minimap.maxColumn%"},"editor.hover.enabled":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.hover.enabled,description:"%editor.configuration.hover.enabled%"},"editor.hover.delay":{type:"number",default:t.EDITOR_DEFAULTS.contribInfo.hover.delay,description:"%editor.configuration.hover.delay%"},"editor.hover.sticky":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.hover.sticky,description:"%editor.configuration.hover.sticky%"},"editor.hover.hidingDelay":{type:"number",default:t.EDITOR_DEFAULTS.contribInfo.hover.hidingDelay,description:"%editor.configuration.hover.hidingDelay%"},"editor.hover.above":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.hover.above,description:"%editor.configuration.hover.above%"},"editor.find.seedSearchStringFromSelection":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.find.seedSearchStringFromSelection,description:"%editor.configuration.find.seedSearchStringFromSelection%"},"editor.find.autoFindInSelection":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.find.autoFindInSelection,description:"%editor.configuration.find.autoFindInSelection%"},"editor.find.globalFindClipboard":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.find.globalFindClipboard,description:"%editor.configuration.find.globalFindClipboard%",included:n.isOSX},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:!0,description:"%editor.configuration.find.addExtraSpaceOnTop%"},"editor.wordWrap":{type:"string",enum:["off","on","wordWrapColumn","bounded"],markdownEnumDescriptions:[(0,n.localize)("editor.configuration.wordWrap.off","Lines will never wrap."),(0,n.localize)("editor.configuration.wordWrap.on","Lines will wrap at the viewport width."),(0,n.localize)("editor.configuration.wordWrap.wordWrapColumn","Lines will wrap at `#editor.wordWrapColumn#`."),(0,n.localize)("editor.configuration.wordWrap.bounded","Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],default:t.EDITOR_DEFAULTS.wordWrap,description:"%editor.configuration.wordWrap%"},"editor.wordWrapColumn":{type:"integer",default:t.EDITOR_DEFAULTS.wordWrapColumn,minimum:1,markdownDescription:"%editor.configuration.wordWrapColumn%"},"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[(0,n.localize)("editor.configuration.wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),(0,n.localize)("editor.configuration.wrappingIndent.same","Wrapped lines get the same indentation as the parent."),(0,n.localize)("editor.configuration.wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),(0,n.localize)("editor.configuration.wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],default:"same",description:"%editor.configuration.wrappingIndent%"},"editor.mouseWheelScrollSensitivity":{type:"number",default:t.EDITOR_DEFAULTS.viewInfo.scrollbar.mouseWheelScrollSensitivity,markdownDescription:"%editor.configuration.mouseWheelScrollSensitivity%"},"editor.fastScrollSensitivity":{type:"number",default:t.EDITOR_DEFAULTS.viewInfo.scrollbar.fastScrollSensitivity,markdownDescription:"%editor.configuration.fastScrollSensitivity%"},"editor.multiCursorModifier":{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,n.localize)("editor.configuration.multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,n.localize)("editor.configuration.multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"alt",markdownDescription:(0,n.localize)("multiCursorModifier","The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")},"editor.multiCursorMergeOverlapping":{type:"boolean",default:t.EDITOR_DEFAULTS.multiCursorMergeOverlapping,description:"%editor.configuration.multiCursorMergeOverlapping%"},"editor.quickSuggestions":{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:!1,description:(0,n.localize)("editor.configuration.quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:!1,description:(0,n.localize)("editor.configuration.quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:!0,description:"%editor.configuration.quickSuggestions.other%"}}}],default:t.EDITOR_DEFAULTS.contribInfo.quickSuggestions,description:"%editor.configuration.quickSuggestions%"},"editor.quickSuggestionsDelay":{type:"integer",default:t.EDITOR_DEFAULTS.contribInfo.quickSuggestionsDelay,minimum:0,description:"%editor.configuration.quickSuggestionsDelay%"},"editor.parameterHints.enabled":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.parameterHints.enabled,description:"%editor.configuration.parameterHints.enabled%"},"editor.parameterHints.cycle":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.parameterHints.cycle,description:"%editor.configuration.parameterHints.cycle%"},"editor.autoClosingBrackets":{type:"string",enum:["always","languageDefined","beforeWhitespace","never"],enumDescriptions:["",(0,n.localize)("editor.configuration.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),(0,n.localize)("editor.configuration.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],default:t.EDITOR_DEFAULTS.autoClosingBrackets,description:"%editor.configuration.autoClosingBrackets%"},"editor.autoClosingQuotes":{type:"string",enum:["always","languageDefined","beforeWhitespace","never"],enumDescriptions:["",(0,n.localize)("editor.configuration.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),(0,n.localize)("editor.configuration.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],default:t.EDITOR_DEFAULTS.autoClosingQuotes,description:"%editor.configuration.autoClosingQuotes%"},"editor.autoSurround":{type:"string",enum:["languageDefined","brackets","quotes","never"],enumDescriptions:[(0,n.localize)("editor.configuration.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),(0,n.localize)("editor.configuration.autoSurround.brackets","Surround with brackets but not quotes."),(0,n.localize)("editor.configuration.autoSurround.quotes","Surround with quotes but not brackets."),""],default:t.EDITOR_DEFAULTS.autoSurround,description:"%editor.configuration.autoSurround%"},"editor.formatOnType":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.formatOnType,description:"%editor.configuration.formatOnType%"},"editor.formatOnPaste":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.formatOnPaste,description:"%editor.configuration.formatOnPaste%"},"editor.autoIndent":{type:"boolean",default:t.EDITOR_DEFAULTS.autoIndent,description:"%editor.configuration.autoIndent%"},"editor.suggestOnTriggerCharacters":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.suggestOnTriggerCharacters,description:"%editor.configuration.suggestOnTriggerCharacters%"},"editor.acceptSuggestionOnEnter":{type:"string",enum:["on","smart","off"],default:t.EDITOR_DEFAULTS.contribInfo.acceptSuggestionOnEnter,markdownEnumDescriptions:["",(0,n.localize)("editor.configuration.acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:(0,n.localize)("editor.configuration.acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")},"editor.acceptSuggestionOnCommitCharacter":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.acceptSuggestionOnCommitCharacter,markdownDescription:(0,n.localize)("editor.configuration.acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")},"editor.snippetSuggestions":{type:"string",enum:["top","bottom","inline","none"],enumDescriptions:[(0,n.localize)("editor.configuration.snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),(0,n.localize)("editor.configuration.snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),(0,n.localize)("editor.configuration.snippetSuggestions.inline","Show snippets suggestions with other suggestions."),(0,n.localize)("editor.configuration.snippetSuggestions.none","Do not show snippet suggestions.")],default:"inline",description:"%editor.configuration.snippetSuggestions%"},"editor.emptySelectionClipboard":{type:"boolean",default:t.EDITOR_DEFAULTS.emptySelectionClipboard,description:"%editor.configuration.emptySelectionClipboard%"},"editor.copyWithSyntaxHighlighting":{type:"boolean",default:t.EDITOR_DEFAULTS.copyWithSyntaxHighlighting,description:"%editor.configuration.copyWithSyntaxHighlighting%"},"editor.wordBasedSuggestions":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.wordBasedSuggestions,description:"%editor.configuration.wordBasedSuggestions%"},"editor.suggestSelection":{type:"string",enum:["first","recentlyUsed","recentlyUsedByPrefix"],markdownEnumDescriptions:[(0,n.localize)("editor.configuration.suggestSelection.first","Always select the first suggestion."),(0,n.localize)("editor.configuration.suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),(0,n.localize)("editor.configuration.suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],default:"recentlyUsed",description:"%editor.configuration.suggestSelection%"},"editor.suggestFontSize":{type:"integer",default:0,minimum:0,markdownDescription:"%editor.configuration.suggestFontSize%"},"editor.suggestLineHeight":{type:"integer",default:0,minimum:0,markdownDescription:"%editor.configuration.suggestLineHeight%"},"editor.tabCompletion":{type:"string",default:"off",enum:["on","off","onlySnippets"],enumDescriptions:[(0,n.localize)("editor.configuration.tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),(0,n.localize)("editor.configuration.tabCompletion.off","Disable tab completions."),(0,n.localize)("editor.configuration.tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:"%editor.configuration.tabCompletion%"},"editor.suggest.filteredTypes":{type:"object",default:{keyword:!0,snippet:!0},markdownDescription:"%editor.configuration.suggest.filtered%",properties:{method:{type:"boolean",default:!0,markdownDescription:(0,n.localize)("editor.configuration.suggest.filtered.method","When set to `false` IntelliSense never shows `method` suggestions.")},function:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.function%"},constructor:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.constructor%"},field:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.field%"},variable:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.variable%"},class:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.class%"},struct:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.struct%"},interface:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.interface%"},module:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.module%"},property:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.property%"},event:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.event%"},operator:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.operator%"},unit:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.unit%"},value:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.value"},constant:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.constant%"},enum:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.enum%"},enumMember:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.enumMember%"},keyword:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.keyword%"},text:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.text%"},color:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.color%"},file:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.file%"},reference:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.reference%"},customcolor:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.customcolor%"},folder:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.folder%"},typeParameter:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.typeParameter%"},snippet:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.snippet%"}}},"editor.gotoLocation.multiple":{description:"%editor.configuration.editor.gotoLocation.multiple%",type:"string",enum:["peek","gotoAndPeek","goto"],default:t.EDITOR_DEFAULTS.contribInfo.gotoLocation.multiple,enumDescriptions:[(0,n.localize)("editor.configuration.gotoLocation.multiple.peek","Show peek view of the results (default)"),(0,n.localize)("editor.configuration.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),(0,n.localize)("editor.configuration.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},"editor.selectionHighlight":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.selectionHighlight,description:"%editor.configuration.selectionHighlight%"},"editor.columnSelection":{type:"boolean",default:t.EDITOR_DEFAULTS.columnSelection,description:"%editor.configuration.columnSelection%"},"editor.occurrencesHighlight":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.occurrencesHighlight,description:"%editor.configuration.occurrencesHighlight%"},"editor.overviewRulerLanes":{type:"integer",default:3,description:"%editor.configuration.overviewRulerLanes%"},"editor.overviewRulerBorder":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.overviewRulerBorder,description:"%editor.configuration.overviewRulerBorder%"},"editor.cursorBlinking":{type:"string",enum:["blink","smooth","phase","expand","solid"],default:"blink",description:"%editor.configuration.cursorBlinking%"},"editor.mouseWheelZoom":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.mouseWheelZoom,markdownDescription:"%editor.configuration.mouseWheelZoom%"},"editor.cursorSmoothCaretAnimation":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.cursorSmoothCaretAnimation,description:"%editor.configuration.cursorSmoothCaretAnimation%"},"editor.cursorStyle":{type:"string",enum:["block","block-outline","line","line-thin","underline","underline-thin"],default:t.EDITOR_FONT_DEFAULTS.cursorStyle,description:"%editor.configuration.cursorStyle%"},"editor.cursorWidth":{type:"integer",default:t.EDITOR_DEFAULTS.viewInfo.cursorWidth,markdownDescription:"%editor.configuration.cursorWidth%"},"editor.fontLigatures":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.fontLigatures,description:"%editor.configuration.fontLigatures%"},"editor.hideCursorInOverviewRuler":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.hideCursorInOverviewRuler,description:"%editor.configuration.hideCursorInOverviewRuler%"},"editor.renderWhitespace":{type:"string",enum:["none","boundary","selection","all"],enumDescriptions:["",(0,n.localize)("editor.configuration.renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),(0,n.localize)("editor.configuration.renderWhitespace.selection","Render whitespace characters only on selected text."),""],default:t.EDITOR_DEFAULTS.viewInfo.renderWhitespace,description:"%editor.configuration.renderWhitespace%"},"editor.rename.enablePreview":{type:"boolean",default:!0,description:"%editor.configuration.rename.enablePreview%"},"editor.renderControlCharacters":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.renderControlCharacters,description:"%editor.configuration.renderControlCharacters%"},"editor.guides.indentation":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.guides.indentation,description:"%editor.configuration.guides.indentation%"},"editor.guides.highlightActiveIndentation":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.guides.highlightActiveIndentGuide,description:"%editor.configuration.guides.highlightActiveIndentation%"},"editor.guides.bracketPairs":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.guides.bracketPairs,description:"%editor.configuration.guides.bracketPairs%"},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],enumDescriptions:["","","",(0,n.localize)("editor.configuration.renderLineHighlight.all","Highlights both the gutter and the current line.")],default:t.EDITOR_DEFAULTS.viewInfo.renderLineHighlight,description:"%editor.configuration.renderLineHighlight%"},"editor.codeLens":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.codeLens,description:"%editor.configuration.codeLens%"},"editor.folding":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.folding,description:"%editor.configuration.folding%"},"editor.foldingStrategy":{type:"string",enum:["auto","indentation"],default:t.EDITOR_DEFAULTS.contribInfo.foldingStrategy,markdownDescription:"%editor.configuration.foldingStrategy%"},"editor.showFoldingControls":{type:"string",enum:["always","mouseover"],default:t.EDITOR_DEFAULTS.contribInfo.showFoldingControls,description:"%editor.configuration.showFoldingControls%"},"editor.matchBrackets":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.matchBrackets,description:"%editor.configuration.matchBrackets%"},"editor.glyphMargin":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.glyphMargin,description:"%editor.configuration.glyphMargin%"},"editor.useTabStops":{type:"boolean",default:t.EDITOR_DEFAULTS.useTabStops,description:"%editor.configuration.useTabStops%"},"editor.trimAutoWhitespace":{type:"boolean",default:t.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:"%editor.configuration.trimAutoWhitespace%"},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:"%editor.configuration.stablePeek%"},"editor.dragAndDrop":{type:"boolean",default:t.EDITOR_DEFAULTS.dragAndDrop,description:"%editor.configuration.dragAndDrop%"},"editor.accessibilitySupport":{type:"string",enum:["auto","on","off"],enumDescriptions:[(0,n.localize)("editor.configuration.accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),(0,n.localize)("editor.configuration.accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader."),(0,n.localize)("editor.configuration.accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:t.EDITOR_DEFAULTS.accessibilitySupport,description:(0,n.localize)("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers.")},"editor.showUnused":{type:"boolean",default:t.EDITOR_DEFAULTS.showUnused,description:"%editor.configuration.showUnused%"},"editor.comments.insertSpace":{type:"boolean",default:!0,description:"%editor.configuration.comments.insertSpace%"},"editor.comments.ignoreEmptyLines":{type:"boolean",default:!0,description:"%editor.configuration.comments.ignoreEmptyLines%"},"editor.links":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.links,description:"%editor.configuration.links%"},"editor.colorDecorators":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.colorDecorators,description:"%editor.configuration.colorDecorators%"},"editor.lightbulb.enabled":{type:"string",default:t.EDITOR_DEFAULTS.contribInfo.lightbulbEnabled,enum:[r.ShowLightbulbIconMode.Off,r.ShowLightbulbIconMode.OnCode,r.ShowLightbulbIconMode.On],enumDescriptions:[],description:"%editor.configuration.lightbulb.enabled%"},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:"%editor.configuration.maxTokenizationLineLength%"},"editor.codeActionsOnSave":{type:"object",properties:{"source.organizeImports":{type:"boolean",description:"%editor.configuration.codeActionsOnSave.organizeImports%"},"source.fixAll":{type:"boolean",description:"%editor.configuration.codeActionsOnSave.fixAll%"}},additionalProperties:{type:"boolean"},default:t.EDITOR_DEFAULTS.contribInfo.codeActionsOnSave,description:"%editor.configuration.codeActionsOnSave%"},"editor.codeActionsOnSaveTimeout":{type:"number",default:t.EDITOR_DEFAULTS.contribInfo.codeActionsOnSaveTimeout,description:"%editor.configuration.codeActionsOnSaveTimeout%"},"editor.codeActionsOnSaveNotification":{type:"boolean",default:!0,description:"%editor.configuration.codeActionsOnSaveNotification%"},"editor.selectionClipboard":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.selectionClipboard,description:"%editor.configuration.selectionClipboard%",included:n.isLinux},"editor.largeFileOptimizations":{type:"boolean",default:t.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:"%editor.configuration.largeFileOptimizations%"},"editor.defaultFormatter":{type:"string",description:"%editor.configuration.defaultFormatter%"},"editor.unicodeHighlight.ambiguousCharacters":{type:"boolean",default:!0,description:"%editor.configuration.unicodeHighlight.ambiguousCharacters%"},"editor.unicodeHighlight.allowedCharacters":{type:"object",default:{},description:"%editor.configuration.unicodeHighlight.allowedCharacters%"},"editor.unicodeHighlight.allowedLocales":{type:"object",default:{},description:"%editor.configuration.unicodeHighlight.allowedLocales%"},"diffEditor.renderIndicators":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.renderIndicators,description:"%editor.configuration.renderIndicators%"},"diffEditor.minimap":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.minimap},"diffEditor.experimental.stickyScroll.enabled":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.experimental.stickyScroll.enable}},p={"editor.tokenColorCustomizations":{type:"object",description:"%editor.configuration.tokenColorCustomizations%",default:{}},"editor.askIfDiff":{type:"boolean",default:!0,description:"%editor.configuration.askIfDiff%"},"editor.showActionWhenGroupEmpty":{type:"boolean",default:!1,description:"%editor.configuration.showActionWhenGroupEmpty%"},"editor.autoSave":{type:"string",enum:["off","afterDelay","editorFocusChange","windowLostFocus"],default:"off",description:"%editor.configuration.autoSave%"},"editor.autoSaveDelay":{type:"number",default:1e3,markdownDescription:"%editor.configuration.autoSaveDelay%"},"editor.preferredFormatter":{type:"object",default:{},description:"%editor.configuration.preferredFormatter%"},"editor.previewMode":{type:"boolean",default:!0,description:"%editor.configuration.previewMode%"},"editor.preventScrollAfterFocused":{type:"boolean",default:!1,description:"%editor.configuration.preventScrollAfterFocused%"},"editor.wrapTab":{type:"boolean",default:!1,description:"%editor.configuration.wrapTab%"},"editor.enablePreviewFromCodeNavigation":{type:"boolean",default:!1,markdownDescription:"%editor.configuration.enablePreviewFromCodeNavigation%"},"editor.minimap":{type:"boolean",default:!0},"editor.forceReadOnly":{type:"boolean",default:!1,description:"%editor.configuration.forceReadOnly%"},"editor.languageFeatureEnabledMaxSize":{type:"number",default:4*1024*1024*1024,description:"%editor.configuration.languageFeatureEnabledMaxSize%"},"editor.docExtHostSyncMaxSize":{type:"number",default:4*1024*1024*1024,description:"%editor.configuration.docExtHostSyncMaxSize%"},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],default:"all",description:"%editor.configuration.renderLineHighlight%"},"editor.fontFamily":{type:"string",default:t.EDITOR_FONT_DEFAULTS.fontFamily},"editor.fontSize":{type:"number",default:t.EDITOR_FONT_DEFAULTS.fontSize,minimum:6},"editor.tabSize":{type:"number",default:t.EDITOR_FONT_DEFAULTS.tabSize,minimum:1,description:"%editor.configuration.tabSize%"},"editor.formatOnPaste":{type:"boolean",default:!1},"editor.detectIndentation":{type:"boolean",default:!0},"editor.renderWhitespace":{type:"boolean",default:t.EDITOR_FONT_DEFAULTS.renderWhitespace},"editor.cursorStyle":{type:"string",enum:["line","block","block-outline","line-thin","underline","underline-thin"],default:t.EDITOR_FONT_DEFAULTS.cursorStyle},"editor.insertSpaces":{type:"boolean",default:t.EDITOR_FONT_DEFAULTS.insertSpace},"editor.wordWrap":{type:"string",enum:["off","on"],default:t.EDITOR_FONT_DEFAULTS.wordWrap},"editor.wordWrapColumn":{type:"number",default:t.EDITOR_FONT_DEFAULTS.wordWrapColumn,description:"%editor.configuration.wordWrapColumn%"},"editor.readonlyFiles":{type:"array",default:[],items:{type:"string"}},"editor.formatOnSave":{type:"boolean",default:!1,description:"%editor.configuration.formatOnSave%"},"editor.formatOnSaveTimeout":{type:"number",default:750,markdownDescription:"%editor.configuration.formatOnSaveTimeout%"},"editor.lineHeight":{type:"number",default:0,description:"%editor.lineHeight.description%"},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:"%editor.configuration.maxTokenizationLineLength%"},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[(0,n.localize)("editor.configuration.semanticHighlighting.true","Semantic highlighting enabled for all color themes."),(0,n.localize)("editor.configuration.semanticHighlighting.false","Semantic highlighting disabled for all color themes."),(0,n.localize)("editor.configuration.semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:!0,description:"%editor.configuration.semanticHighlighting.enabled%"},"editor.bracketPairColorization.enabled":{type:"boolean",default:!0,description:"%editor.configuration.bracketPairColorization.enabled%"},"editor.largeFile":{type:"number",default:4*1024*1024*1024,description:"%editor.configuration.largeFileSize%"},"editor.quickSuggestionsDelay":{type:"integer",default:100,description:"%editor.configuration.quickSuggestionsDelay%"},"editor.modelDisposeTime":{type:"integer",default:3e3},"workbench.editorAssociations":{type:"object",markdownDescription:"%editor.configuration.workbench.editorAssociations%",default:{},additionalProperties:{type:"string"}},"editor.experimental.stickyScroll.enabled":{type:"boolean",default:!1,description:"%editor.configuration.experimental.stickyScroll.enabled%"},"editor.mouseBackForwardToNavigate":{type:"boolean",default:!0,description:"%editor.configuration.mouseBackForwardToNavigate%"},"diffEditor.renderSideBySide":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.renderSideBySide,description:"%diffEditor.configuration.renderSideBySide%"},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.ignoreTrimWhitespace,description:"%diffEditor.configuration.ignoreTrimWhitespace%"},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.hideUnchangedRegions.enabled,description:"Controls whether the diff editor shows unchanged regions."},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:t.DIFF_EDITOR_DEFAULTS.hideUnchangedRegions.revealLineCount,description:"Controls how many lines are used for unchanged regions.",minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:t.DIFF_EDITOR_DEFAULTS.hideUnchangedRegions.minimumLineCount,description:"Controls how many lines are used as a minimum for unchanged regions.",minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:t.DIFF_EDITOR_DEFAULTS.hideUnchangedRegions.contextLineCount,description:"Controls how many lines are used as context when comparing unchanged regions.",minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.experimental.showMoves,description:"Controls whether the diff editor should show detected code moves."},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.experimental.showEmptyDecorations,description:"Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted."},"diffEditor.experimental.collapseUnchangedRegions":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.experimental.collapseUnchangedRegions,description:"Controls whether the diff editor shows unchanged regions."}};t.editorPreferenceSchema={type:"object",properties:{...v,...p}},t.EditorPreferences=Symbol("EditorPreference")},90915:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEditorPreferenceProxy=o;const n=e(41869),r=e(24328);function o(l,_,v){return(0,n.createPreferenceProxy)(l,r.editorPreferenceSchema,{resourceUri:_,overrideIdentifier:v})}},53135:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GoToLineQuickOpenHandler=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(74404),_=n.__importStar(e(20868)),v=e(55979),p=e(82196);class m extends v.AbstractGotoLineQuickAccessProvider{clearDecorations(a){super.clearDecorations(a)}preview(a,h){a.revealRangeInCenter(h,_.editor.ScrollType.Smooth),this.addDecorations(a,h)}goTo(a,h,u=!0){this.gotoLocation({editor:a},{range:h,preserveFocus:u,keyMods:{alt:!1,ctrlCmd:!1}})}}let s=class{constructor(){this.prefix=":",this.description=(0,o.localize)("quickopen.goToLine.desc"),this.quickAccess=new m}getFirstSelection(){const a=this.workbenchEditorService.currentEditor,h=a?.getSelections();return h?.[0]}getRange(a=1,h=1){return{startLineNumber:a,endLineNumber:a,startColumn:h,endColumn:h}}init(){var a;this.savedViewState=(0,o.withNullAsUndefined)((a=this.workbenchEditorService.currentEditor)===null||a===void 0?void 0:a.monacoEditor.saveViewState())}getModel(){var a,h,u,c,E;const f=this.workbenchEditorService.currentEditor,d=this.getFirstSelection();if(!d||!f)return{onType:(S,D)=>{D([new l.QuickOpenItem({label:(0,o.localize)("quickopen.goToLine.notValid"),run:()=>!1})])}};const y=(a=d.positionLineNumber)!==null&&a!==void 0?a:1,b=(h=d.positionColumn)!==null&&h!==void 0?h:1,A=(E=(c=(u=f.currentDocumentModel)===null||u===void 0?void 0:u.getMonacoModel())===null||c===void 0?void 0:c.getLineCount())!==null&&E!==void 0?E:1;return{onType:(S,D)=>{const I=S.split(/,|:|#|:|,/).map(R=>parseInt(R,10)).filter(R=>!isNaN(R)),w=I[0],T=I[1];if(w){let R=(0,o.formatLocalize)("quickopen.goToLine.lineInfo",w);T&&(R+=(0,o.formatLocalize)("quickopen.goToLine.colInfo",T));const M=this.getRange(w,T);D([new l.QuickOpenItem({label:R,run:O=>O===l.Mode.PREVIEW?(this.quickAccess.preview(f.monacoEditor,M),!1):(this.quickAccess.goTo(f.monacoEditor,M,!0),!0)})])}else this.quickAccess.clearDecorations(f.monacoEditor),D([new l.QuickOpenItem({label:(0,o.formatLocalize)("quickopen.goToLine.defaultMessage",y,b,A),run:()=>!1})])}}}getOptions(){return{}}onClose(a){const h=this.workbenchEditorService.currentEditor;h&&(h.monacoEditor.focus(),this.quickAccess.clearDecorations(h.monacoEditor),a&&this.savedViewState&&h.monacoEditor.restoreViewState(this.savedViewState))}};t.GoToLineQuickOpenHandler=s,n.__decorate([(0,r.Autowired)(l.PrefixQuickOpenService),n.__metadata("design:type",Object)],s.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],s.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],s.prototype,"workbenchEditorService",void 0),t.GoToLineQuickOpenHandler=s=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],s)},50236:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SymbolInformationQuickOpenItem=t.WorkspaceSymbolQuickOpenHandler=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),_=e(97821),v=e(51500),p=e(40540),m=e(23418);let s=class extends _.QuickOpenBaseAction{constructor(){super({id:"workspace-symbol:splitToRight",tooltip:(0,l.localize)("quickOpen.openOnTheRightSide"),class:(0,o.getIcon)("embed")})}async run(c){await c.openSide()}};s=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],s);let g=class{hasActions(){return!0}getActions(){return[this.workspaceSymbolOpenSideActionOpen]}};n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s)],g.prototype,"workspaceSymbolOpenSideActionOpen",void 0),g=n.__decorate([(0,r.Injectable)()],g);let a=class{constructor(){this.prefix="#",this.cancellationSource=new o.CancellationTokenSource}get description(){return(0,l.localize)("editor.workspaceSymbol.description")}getModel(){return{onType:(c,E)=>{if(c===""){E([new o.QuickOpenItem({label:(0,l.localize)("editor.workspaceSymbol.search"),run:()=>!1})]);return}if(c==="#")return void E([new o.QuickOpenItem({label:(0,l.localize)("editor.workspaceSymbolClass.search"),run:()=>!1})]);if(this.languageService.workspaceSymbolProviders.length===0){E([new o.QuickOpenItem({label:(0,l.localize)("editor.workspaceSymbol.notfound"),run:()=>!1})]);return}const f=c[0]==="#",d=[];this.cancellationSource.cancel();const y=new o.CancellationTokenSource;this.cancellationSource=y;const b={query:f?c.slice(1):c},A=this.reporterService.time(l.REPORT_NAME.QUICK_OPEN_MEASURE);Promise.all(this.languageService.workspaceSymbolProviders.map(async S=>{let D=await S.provideWorkspaceSymbols(b,y.token);if(f&&(D=D?.filter(I=>I.kind===p.SymbolKind.Class)),D&&D.length&&!y.token.isCancellationRequested){const I=await Promise.all(D.map(async w=>{const T=await this.workspaceService.asRelativePath(new o.URI(w.location.uri).parent);return new h(w,S,this.workbenchEditorService,y.token,T?.path||"")}));d.push(...I),E(d,this.workspaceSymbolActionProvider)}return D})).catch(S=>{this.logger.log(S)}).finally(()=>{y.token.isCancellationRequested||(d.length||E([]),A.timeEnd(f?"class":"symbol",{lookFor:c,stat:{symbol:d.length}}))})}}}getOptions(){return{fuzzyMatchLabel:{enableSeparateSubstringMatching:!0},showItemsWithoutHighlight:!0,fuzzyMatchDescription:!1,getPlaceholderItem:(c,E)=>new o.QuickOpenItem({label:(0,l.localize)(E.startsWith("##")?"editor.workspaceSymbolClass.notfound":"editor.workspaceSymbol.notfound"),run:()=>!1})}}onClose(){this.cancellationSource.cancel()}onToggle(){this.cancellationSource.cancel()}};t.WorkspaceSymbolQuickOpenHandler=a,n.__decorate([(0,r.Autowired)(m.ILanguageService),n.__metadata("design:type",Object)],a.prototype,"languageService",void 0),n.__decorate([(0,r.Autowired)(v.IWorkspaceService),n.__metadata("design:type",Object)],a.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(l.ILogger),n.__metadata("design:type",Object)],a.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(m.WorkbenchEditorService),n.__metadata("design:type",m.WorkbenchEditorService)],a.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",g)],a.prototype,"workspaceSymbolActionProvider",void 0),n.__decorate([(0,r.Autowired)(l.IReporterService),n.__metadata("design:type",Object)],a.prototype,"reporterService",void 0),t.WorkspaceSymbolQuickOpenHandler=a=n.__decorate([(0,r.Injectable)()],a);class h extends o.QuickOpenItem{constructor(c,E,f,d,y){super({}),this.symbol=c,this.provider=E,this.workbenchEditorService=f,this.token=d,this.relativePath=y}getLabel(){return this.symbol.name}getUri(){return new o.URI(this.symbol.location.uri)}getIconClass(){return(0,o.getSymbolIcon)(this.symbol.kind)}getDescription(){const c=this.symbol.containerName;return`${c?`${c} \xB7 `:""}${decodeURIComponent(this.relativePath)}`}fromRange(c){if(!c)return;const{start:E,end:f}=c;return{startLineNumber:E.line+1,startColumn:E.character+1,endLineNumber:f.line+1,endColumn:f.character+1}}open(c,E){this.workbenchEditorService.open(c,{range:this.fromRange(E)})}run(c){const E=this.getUri();return c===o.QuickOpenMode.OPEN&&this.provider.resolveWorkspaceSymbol(this.symbol,this.token).then(f=>{f?this.open(E,f.location.range):this.open(E,this.symbol.location.range)}),!0}openSide(){const c=this.getUri();return this.provider.resolveWorkspaceSymbol(this.symbol,this.token).then(E=>{this.workbenchEditorService.open(c,{preview:!1,split:m.EditorGroupSplitAction.Right,range:this.fromRange(E?E.location.range:this.symbol.location.range),focus:!0})})}}t.SymbolInformationQuickOpenItem=h},80200:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceServiceImpl=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),_=e(23418),{addElement:v}=l.arrays;let p=class extends o.WithEventBus{constructor(){super(),this.providers=[],this.resources=new Map,this.gettingResources=new Map,this.resourceDecoration=new Map,this.cachedProvider=new l.LRUMap(500,200),this.onRegisterResourceProviderEmitter=new l.Emitter,this.onRegisterResourceProvider=this.onRegisterResourceProviderEmitter.event,this.onUnregisterResourceProviderEmitter=new l.Emitter,this.onUnregisterResourceProvider=this.onUnregisterResourceProviderEmitter.event}onResourceNeedUpdateEvent(a){const h=a.payload;if(this.resources.has(h.toString())){const u=this.resources.get(h.toString());this.doGetResource(h).then(c=>{u&&(Object.assign(u?.resource,c?.resource),u.provider=c?.provider),this.eventBus.fire(new _.ResourceDidUpdateEvent(h))})}}onResourceDecorationNeedChangeEvent(a){this.getResourceDecoration(a.payload.uri);let h=!1;const u=this.resourceDecoration.get(a.payload.uri.toString())||{};new Set([...Object.keys(u),...Object.keys(a.payload.decoration)]).forEach(c=>{u[c]!==a.payload.decoration[c]&&(h=!0)}),h&&(Object.assign(this.resourceDecoration.get(a.payload.uri.toString()),a.payload.decoration),this.eventBus.fire(new _.ResourceDecorationChangeEvent(a.payload)))}getSupportedSchemes(){return Array.from(this.providers.values()).map(a=>a.scheme).filter(Boolean)}async getResource(a){if(!this.resources.has(a.toString())){const h=await this.doGetResource(a);if(!h)return null;const u={resource:h.resource,provider:h.provider};this.resources.set(a.toString(),u)}return this.resources.get(a.toString()).resource}handlesUri(a){return!!this.calculateProvider(a)}async doGetResource(a){if(!this.gettingResources.has(a.toString())){const h=(async()=>{const u=this.calculateProvider(a);if(u){const c=await u.provideResource(a);return c.uri=a,{resource:c,provider:u}}else return this.logger.error("URI has no resource provider: "+a),null})();this.gettingResources.set(a.toString(),h),h.finally(()=>{this.gettingResources.delete(a.toString())})}return this.gettingResources.get(a.toString())}registerResourceProvider(a){this.onRegisterResourceProviderEmitter.fire(a);const h=new l.Disposable;return h.addDispose(v(this.providers,a)),h.addDispose({dispose:()=>{for(const u of this.resources.values())u.provider===a&&(u.provider=s,this.onUnregisterResourceProviderEmitter.fire(a));this.cachedProvider.clear()}}),this.cachedProvider.clear(),h}async shouldCloseResource(a,h){const u=this.getProvider(a.uri);return!u||!u.shouldCloseResource?!0:await u.shouldCloseResource(a,h)}async shouldCloseResourceWithoutConfirm(a){const h=this.getProvider(a.uri);return h&&h.shouldCloseResourceWithoutConfirm?await h.shouldCloseResourceWithoutConfirm(a):!1}async close(a,h){const u=this.getProvider(a.uri);return!u||!u.close?!0:await u.close(a,h)}calculateProvider(a){if(this.cachedProvider.has(a.toString()))return this.cachedProvider.get(a.toString());let h,u={weight:-1,index:-1};function c(E,f,d){u={weight:f,index:d},h=E}return this.providers.forEach((E,f)=>{let d=-1;E.handlesUri?d=E.handlesUri(a):E.scheme&&(d=E.scheme===a.scheme?10:-1),d>=0&&(d>u.weight||d===u.weight&&f>u.index)&&c(E,d,f)}),this.cachedProvider.set(a.toString(),h),h}getProvider(a){const h=this.resources.get(a.toString());if(h)return h.provider}getResourceDecoration(a){return this.resourceDecoration.has(a.toString())||this.resourceDecoration.set(a.toString(),{...m}),this.resourceDecoration.get(a.toString())}getResourceSubname(a,h){const u=this.getProvider(a.uri);return u&&u.provideResourceSubname?u.provideResourceSubname(a,h):null}disposeResource(a){const h=this.getProvider(a.uri);if(this.resources.delete(a.uri.toString()),this.resourceDecoration.delete(a.uri.toString()),!(!h||!h.onDisposeResource))return h.onDisposeResource(a)}};t.ResourceServiceImpl=p,n.__decorate([(0,r.Autowired)(l.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,o.OnEvent)(_.ResourceNeedUpdateEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.ResourceNeedUpdateEvent]),n.__metadata("design:returntype",void 0)],p.prototype,"onResourceNeedUpdateEvent",null),n.__decorate([(0,o.OnEvent)(_.ResourceDecorationNeedChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.ResourceDecorationNeedChangeEvent]),n.__metadata("design:returntype",void 0)],p.prototype,"onResourceDecorationNeedChangeEvent",null),t.ResourceServiceImpl=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p);const m={dirty:!1,readOnly:!1},s={handlesUri:()=>-1,provideResource:g=>({uri:g,name:"",icon:""})}},52795:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorActions=t.Tabs=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(41869),_=e(25918),v=e(1149),p=e(63373),m=e(93899),s=e(48560),g=e(43718),a=e(23418),h=e(19352),u=n.__importDefault(e(62711)),c=e(78680),E=e(82196),f=e(50674),d=e(72570).UU,y=({group:A})=>{const S=(0,o.useRef)(),D=(0,o.useRef)(),I=(0,o.useRef)(),w=(0,o.useRef)(null),T=(0,o.useRef)(null),R=(0,s.useInjectable)(a.ResourceService),M=(0,s.useInjectable)(l.IEventBus),O=(0,o.useContext)(l.ConfigContext),x=(0,s.useInjectable)(a.WorkbenchEditorService),k=(0,s.useInjectable)(c.TabTitleMenuService),F=(0,s.useInjectable)(l.PreferenceService),L=(0,s.useInjectable)(m.IMenuRegistry),B=(0,s.useInjectable)(E.IEditorTabService),U=(0,s.useInjectable)(v.LayoutViewSizeConfig),W=(0,s.useInjectable)(l.ComponentRegistry),j=(0,l.useDesignStyles)(u.default.tab_right,"tab_right"),Q=(0,l.useDesignStyles)(u.default.close_tab,"close_tab"),G=(0,l.useDesignStyles)(u.default.kt_editor_close_icon,"kt_editor_close_icon"),Z=(0,l.useDesignStyles)(u.default.kt_editor_tabs_content,"kt_editor_tabs_content"),$=(0,l.useDesignStyles)(u.default.kt_editor_tabs_current_last,"kt_editor_tabs_current_last"),V=(0,l.useDesignStyles)(u.default.kt_editor_tab,"kt_editor_tab"),H=(0,l.useDesignStyles)(u.default.kt_editor_tab_current_prev,"kt_editor_tab_current_prev"),K=(0,l.useDesignStyles)(u.default.kt_editor_tab_current_next,"kt_editor_tab_current_next"),Y=(0,l.useDesignStyles)(u.default.kt_editor_tab_current,"kt_editor_tab_current"),X=(0,l.useDesignStyles)(u.default.kt_editor_tab_dirty,"kt_editor_tab_dirty"),re=(0,l.useDesignStyles)(u.default.kt_editor_tabs,"kt_editor_tabs"),oe=(0,l.useDesignStyles)(u.default.kt_editor_tabs_scroll_wrapper,"kt_editor_tabs_scroll_wrapper"),[he,me]=(0,o.useState)({}),[q,Ae]=(0,o.useState)(!!F.get("editor.wrapTab")),[ge,te]=(0,o.useState)(new Map),[fe,Re]=(0,o.useState)(),Pe=(0,o.useMemo)(()=>(0,l.getSlotLocation)(d,O.layoutConfig),[]),Oe=o.default.useMemo(()=>{var ye,Ue;const Ye=(Ue=(ye=W.getComponentRegistryInfo(a.TabbarRightExtraContentId))===null||ye===void 0?void 0:ye.views)===null||Ue===void 0?void 0:Ue[0];if(Ye)return Ye},[]);(0,f.useUpdateOnGroupTabChange)(A),(0,s.useUpdateOnEventBusEvent)(a.ResourceDidUpdateEvent,[A.resources],ye=>!!I&&A.resources.findIndex(Ue=>Ue.uri.isEqual(ye))!==-1),(0,o.useEffect)(()=>{const ye=new l.Disposable;return ye.addDispose(A.onDidEditorGroupContentLoading(Ue=>{var Ye;(Ye=A.resourceStatus.get(Ue))===null||Ye===void 0||Ye.finally(()=>{me(Object.assign({},he,{[Ue.uri.toString()]:!1}))}),me(Object.assign({},he,{[Ue.uri.toString()]:!0}))})),ye.addDispose(A.onDidEditorGroupTabChanged(()=>{q||De()})),()=>{ye.dispose()}},[A]);const Be=(0,o.useCallback)((ye,Ue,Ye)=>{if(ye.dataTransfer.getData("uri")){const He=new l.URI(ye.dataTransfer.getData("uri"));let _t;ye.dataTransfer.getData("uri-source-group")&&(_t=x.getEditorGroup(ye.dataTransfer.getData("uri-source-group"))),A.dropUri(He,E.DragOverPosition.CENTER,_t,Ye)}ye.dataTransfer.files.length>0&&M.fire(new E.EditorGroupFileDropEvent({group:A,tabIndex:Ue,files:ye.dataTransfer.files}))},[A]),De=(0,o.useCallback)(()=>{l.fastdom.measure(()=>{try{if(S.current&&A.currentResource){const ye=S.current.querySelector("."+u.default.kt_editor_tab+"[data-uri='"+A.currentResource.uri.toString()+"']");ye&&ye.scrollIntoView({block:"nearest",inline:"nearest"})}}catch{}})},[A,S.current]),_e=(0,o.useCallback)(()=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{l.fastdom.measure(()=>{var ye;const Ue=(ye=T.current)===null||ye===void 0?void 0:ye.offsetWidth;Ue!==fe&&Re(Ue)})},200)},[T.current,w.current,fe]);(0,o.useEffect)(()=>{q||queueMicrotask(()=>{De()})},[q,S.current]),(0,o.useEffect)(()=>{if(!q){const ye=new l.Disposable;return S.current&&ye.addDispose(new l.DomListener(S.current,"mousewheel",b)),ye.addDispose(M.onDirective(l.ResizeEvent.createDirective(Pe),()=>{De()})),ye.addDispose(M.onDirective(E.GridResizeEvent.createDirective(A.grid.uid),()=>{De()})),()=>{ye.dispose()}}},[q]);const Ne=(0,o.useCallback)(()=>{l.fastdom.measureAtNextFrame(()=>{if(I.current&&q){const ye=new Map;let Ue,Ye;const He=Array.from(I.current.children);He.pop(),He.forEach(_t=>{_t.offsetTop!==Ue&&(Ue=_t.offsetTop,Ye&&ye.set(He.indexOf(Ye),!0)),Ye=_t,ye.set(He.indexOf(_t),!1)}),te(ye)}})},[I.current,q]);(0,o.useEffect)(()=>{_e()},[T.current,q]),(0,o.useEffect)(Ne,[q,I.current,A,A.resources.length]),(0,o.useEffect)(()=>{const ye=new l.DisposableCollection;return ye.push(M.onDirective(l.ResizeEvent.createDirective(Pe),()=>{Ne()})),ye.push(F.onPreferenceChanged(Ue=>{Ue.preferenceName==="editor.wrapTab"&&Ae(!!Ue.newValue)})),ye.push(x.onDidCurrentEditorGroupChanged(()=>{_e()})),ye.push(l.Event.debounce(l.Event.filter(L.onDidChangeMenu,Ue=>Ue===m.MenuId.EditorTitle),()=>{},200)(()=>{_e()})),()=>{ye.dispose()}},[]),(0,o.useEffect)(()=>{const ye=new l.DisposableCollection;return ye.push(A.onDidEditorFocusChange(()=>{_e()})),()=>{ye.dispose()}},[A]);const Te=(0,o.useCallback)(ye=>{ye.preventDefault(),ye.stopPropagation(),D.current&&D.current.classList.add(u.default.kt_on_drag_over)},[D.current]),We=(0,o.useCallback)(ye=>{D.current&&D.current.classList.remove(u.default.kt_on_drag_over)},[D.current]),pe=(0,o.useCallback)(ye=>{D.current&&D.current.classList.remove(u.default.kt_on_drag_over),Be&&Be(ye,-1)},[Be,D.current]),ie=(0,o.useCallback)(ye=>{ye.target===ye.currentTarget&&x.createUntitledResource()},[x]),le=o.default.useCallback((ye,Ue)=>{const Ye=R.getResourceDecoration(ye.uri),He=R.getResourceSubname(ye,A.resources);return B.renderEditorTab(o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:he[ye.uri.toString()]?"loading_indicator":(0,r.default)(ye.icon)}," "),o.default.createElement("div",{tabIndex:0,role:"tab","aria-selected":Ue?"true":"false"},ye.name),He?o.default.createElement("div",{className:u.default.subname},He):null,Ye.readOnly?o.default.createElement("span",{className:(0,r.default)((0,l.getExternalIcon)("lock"),u.default.editor_readonly_icon)}):null,o.default.createElement("div",{className:j},o.default.createElement("div",{className:(0,r.default)({[u.default.kt_hidden]:!Ye.dirty,[u.default.dirty]:!0})}),o.default.createElement("div",{className:Q,onMouseDown:_t=>{_t.stopPropagation(),A.close(ye.uri)}},B.renderTabCloseComponent(o.default.createElement("div",{className:(0,r.default)((0,l.getIcon)("close"),G),tabIndex:0,role:"button","aria-label":(0,g.formatLocalize)("editor.closeTab.title",ye.name)}))))),Ue)},[B]),Se=()=>{const ye=A.resources.length===0,Ue=A.resources.findIndex(Ye=>A.currentResource===Ye);return o.default.createElement("div",{draggable:!1,className:(0,r.default)({[Z]:!0,[u.default.kt_editor_tabs_content_empty]:ye,[$]:Ue===A.resources.length-1}),ref:I,role:"tablist"},A.resources.map((Ye,He)=>{let _t;const vt=R.getResourceDecoration(Ye.uri);return o.default.createElement("div",{draggable:!0,title:Ye.title,className:(0,r.default)({[V]:!0,[u.default.last_in_row]:ge.get(He),[H]:Ue-1===He,[K]:Ue+1===He,[Y]:A.currentResource===Ye,[u.default.kt_editor_tab_preview]:A.previewURI&&A.previewURI.isEqual(Ye.uri),[X]:vt.dirty}),style:q&&He===A.resources.length-1?{marginRight:fe,height:U.editorTabsHeight}:{height:U.editorTabsHeight},onContextMenu:Lt=>{k.show(Lt.nativeEvent.x,Lt.nativeEvent.y,Ye&&Ye.uri,A),Lt.preventDefault()},key:Ye.uri.toString(),onMouseUp:Lt=>{Lt.nativeEvent.button===l.MouseEventButton.Middle&&(Lt.preventDefault(),Lt.stopPropagation(),A.close(Ye.uri))},onMouseDown:Lt=>{Lt.nativeEvent.button===l.MouseEventButton.Left&&A.open(Ye.uri,{focus:!0})},"data-uri":Ye.uri.toString(),onDragOver:Lt=>{Lt.preventDefault(),Lt.stopPropagation(),_t&&_t.classList.add(u.default.kt_on_drag_over)},onDragLeave:Lt=>{_t&&_t.classList.remove(u.default.kt_on_drag_over)},onDrop:Lt=>{_t&&_t.classList.remove(u.default.kt_on_drag_over),Be&&Be(Lt,He,Ye)},onDoubleClick:Lt=>{A.pinPreviewed(Ye.uri)},ref:Lt=>_t=Lt,onDragStart:Lt=>{Lt.dataTransfer.setData("uri",Ye.uri.toString()),Lt.dataTransfer.setData("uri-source-group",A.name)}},le(Ye,A.currentResource===Ye))}))};return o.default.createElement("div",{id:p.VIEW_CONTAINERS.EDITOR_TABS,className:re},o.default.createElement("div",{className:oe,ref:D,onDragOver:Te,onDragLeave:We,onDrop:pe,onDoubleClick:ie},q?o.default.createElement("div",{className:u.default.kt_editor_wrap_container},Se()):o.default.createElement(h.Scroll,{forwardedRef:ye=>ye?S.current=ye:null,className:u.default.kt_editor_tabs_scroll},Se())),o.default.createElement(t.EditorActions,{className:(0,r.default)({[u.default.kt_editor_wrap_mode_action]:q}),ref:T,group:A}),(0,l.renderView)(Oe))};t.Tabs=y,t.EditorActions=(0,o.forwardRef)((A,S)=>{const D=(0,l.useDesignStyles)(u.default.editor_actions,"editor_actions"),{group:I,className:w}=A,T=(0,o.useCallback)(()=>{var W,j;return I.currentResource?[I.currentResource.uri,I,((W=I.currentOrPreviousFocusedEditor)===null||W===void 0?void 0:W.currentUri)||((j=I.currentEditor)===null||j===void 0?void 0:j.currentUri)]:void 0},[I]),R=(0,s.useInjectable)(E.IEditorActionRegistry),M=(0,s.useInjectable)(a.WorkbenchEditorService),O=(0,s.useInjectable)(v.LayoutViewSizeConfig),x=R.getMenu(I),[k,F]=(0,o.useState)(M.currentEditorGroup===I),[L,B]=(0,o.useState)(T()),U=x.getMergedMenuNodes().length===0;return(0,o.useEffect)(()=>{const W=new l.DisposableCollection;return W.push(M.onDidCurrentEditorGroupChanged(()=>{F(M.currentEditorGroup===I)})),W.push(M.onActiveResourceChange(()=>{B(T())})),W.push(I.onDidEditorGroupTabChanged(()=>{B(T())})),()=>{W.dispose()}},[I]),o.default.createElement("div",{ref:S,className:(0,r.default)(D,w,{[u.default.editor_actions_no_actions]:U}),style:{height:O.editorTabsHeight}},o.default.createElement(_.InlineMenuBar,{menus:x,context:L,regroup:(W,j)=>k?[W,j]:[[],j]}))});function b(A){(this.offsetWidth+this.scrollLeft+A.deltaX>this.scrollWidth||this.scrollLeft+A.deltaX<0)&&A.preventDefault()}},82196:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEditorTabService=t.ResoucesOfActiveComponentChangedEvent=t.CodeEditorDidVisibleEvent=t.EditorComponentDisposeEvent=t.ResourceOpenTypeChangedEvent=t.IEditorFeatureRegistry=t.IBreadCrumbService=t.CompareResult=t.ICompareService=t.IEditorActionRegistry=t.EditorDecorationTypeRemovedEvent=t.EditorDecorationChangeEvent=t.EditorDecorationProviderRegistrationEvent=t.RegisterEditorSideComponentEvent=t.EditorGroupsResetSizeEvent=t.EditorGroupIndexChangedEvent=t.EditorConfigurationChangedEvent=t.EditorVisibleChangeEvent=t.EditorSelectionChangeEvent=t.IEditorDecorationCollectionService=t.EditorGroupFileDropEvent=t.EditorActiveResourceStateChangedEvent=t.EditorGroupChangeEvent=t.EditorGroupDisposeEvent=t.EditorGroupCloseEvent=t.EditorGroupOpenEvent=t.GridResizeEvent=t.MultiDiffSourceContribution=t.BrowserEditorContribution=t.EditorComponentRegistry=t.RegisterEditorComponentEvent=t.RegisterEditorComponentResolverEvent=t.EditorComponentRenderMode=void 0;const n=e(85608),r=e(41869);n.__exportStar(e(23418),t);var o;(function(O){O[O.ONE_PER_RESOURCE=1]="ONE_PER_RESOURCE",O[O.ONE_PER_GROUP=2]="ONE_PER_GROUP",O[O.ONE_PER_WORKBENCH=3]="ONE_PER_WORKBENCH"})(o||(t.EditorComponentRenderMode=o={}));class l extends r.BasicEvent{}t.RegisterEditorComponentResolverEvent=l;class _ extends r.BasicEvent{}t.RegisterEditorComponentEvent=_;class v{}t.EditorComponentRegistry=v,t.BrowserEditorContribution=Symbol("BrowserEditorContribution"),t.MultiDiffSourceContribution=Symbol("MultiDiffSourceContribution");class p extends r.BasicEvent{static createDirective(x){return`grid-resize-${x}`}}t.GridResizeEvent=p;class m extends r.BasicEvent{}t.EditorGroupOpenEvent=m;class s extends r.BasicEvent{}t.EditorGroupCloseEvent=s;class g extends r.BasicEvent{}t.EditorGroupDisposeEvent=g;class a extends r.BasicEvent{}t.EditorGroupChangeEvent=a;class h extends r.BasicEvent{}t.EditorActiveResourceStateChangedEvent=h;class u extends r.BasicEvent{}t.EditorGroupFileDropEvent=u,t.IEditorDecorationCollectionService=Symbol("IEditorDecorationCollectionService");class c extends r.BasicEvent{}t.EditorSelectionChangeEvent=c;class E extends r.BasicEvent{}t.EditorVisibleChangeEvent=E;class f extends r.BasicEvent{}t.EditorConfigurationChangedEvent=f;class d extends r.BasicEvent{}t.EditorGroupIndexChangedEvent=d;class y extends r.BasicEvent{}t.EditorGroupsResetSizeEvent=y;class b extends r.BasicEvent{}t.RegisterEditorSideComponentEvent=b;class A extends r.BasicEvent{}t.EditorDecorationProviderRegistrationEvent=A;class S extends r.BasicEvent{}t.EditorDecorationChangeEvent=S;class D extends r.BasicEvent{}t.EditorDecorationTypeRemovedEvent=D,t.IEditorActionRegistry=Symbol("IEditorActionRegistry"),t.ICompareService=Symbol("ICompareService");var I;(function(O){O.revert="revert",O.accept="accept",O.cancel="cancel"})(I||(t.CompareResult=I={})),t.IBreadCrumbService=Symbol("IBreadScrumbService"),t.IEditorFeatureRegistry=Symbol("IEditorFeatureRegistry");class w extends r.BasicEvent{}t.ResourceOpenTypeChangedEvent=w;class T extends r.BasicEvent{}t.EditorComponentDisposeEvent=T;class R extends r.BasicEvent{}t.CodeEditorDidVisibleEvent=R;class M extends r.BasicEvent{}t.ResoucesOfActiveComponentChangedEvent=M,t.IEditorTabService=Symbol("IEditorTabService")},17878:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.UntitledSchemeResourceProvider=t.UntitledSchemeDocumentProvider=t.UntitledDocumentIdCounter=void 0;const r=e(85608),o=e(76003),l=e(41869),_=e(72665),v=e(51500),p=e(23418),m=e(96689);let s=n=class{constructor(){this._id=1}async update(){this._id=await this.getLatestUnitiedIndex()}async getLatestUnitiedIndex(u){var c;await this.workspaceService.whenReady;const d=(u||((c=this.workspaceService.workspace)===null||c===void 0?void 0:c.children)||[]).filter(y=>l.URI.file(y.uri).displayName.startsWith(n.UNTITLED_FILE_NAME_PREFIX)).map(y=>{const b=l.URI.file(y.uri).displayName.match(new RegExp(`^${n.UNTITLED_FILE_NAME_PREFIX}(\\d+)`,"i"));return b?parseInt(b[1],10):-1}).filter(y=>y!==-1);return d.length>0?Math.max(...d)+1:1}get id(){return this._id++}};t.UntitledDocumentIdCounter=s,s.UNTITLED_FILE_NAME_PREFIX="Untitled-",r.__decorate([(0,o.Autowired)(v.IWorkspaceService),r.__metadata("design:type",Object)],s.prototype,"workspaceService",void 0),t.UntitledDocumentIdCounter=s=n=r.__decorate([(0,o.Injectable)()],s);let g=class{constructor(){this._onDidChangeContent=new l.Emitter,this.onDidChangeContent=this._onDidChangeContent.event}handlesScheme(u){return u===l.Schemes.untitled}async provideEncoding(u){return this.preferenceService.get("files.encoding",void 0,u.toString(),(0,l.getLanguageIdFromMonaco)(u))||"utf8"}async provideEOL(u){const c=await this.applicationService.getBackendOS(),E=this.preferenceService.get("files.eol","auto",u.toString(),(0,l.getLanguageIdFromMonaco)(u));return E!=="auto"?E:c===l.OperatingSystem.Windows?`\r
33297
33297
  `:`
33298
33298
  `}async provideEditorDocumentModelContent(u,c){return""}isReadonly(u){return!1}isAlwaysDirty(u){return!0}disposeEvenDirty(u){return!0}closeAutoSave(u){return!0}async saveDocumentModel(u,c,E,f,d,y=!1){const{name:b}=u.getParsedQuery(),A=u.path.toString()!=="/"?l.path.dirname(u.path.toString()):this.appConfig.workspaceDir,S=await this.commandService.tryExecuteCommand("file.save",{showNameInput:!0,defaultFileName:b||u.displayName,defaultUri:l.URI.file(l.isWindows?A.replaceAll("\\","/"):A)});return S&&(await this.editorDocumentModelService.saveEditorDocumentModel(S,c,E,f,d,y),await this.workbenchEditorService.open(S,{preview:!1,focus:!0,replace:!0,forceClose:!0})),{state:l.SaveTaskResponseState.SUCCESS}}onDidDisposeModel(){}};t.UntitledSchemeDocumentProvider=g,r.__decorate([(0,o.Autowired)(m.IEditorDocumentModelService),r.__metadata("design:type",Object)],g.prototype,"editorDocumentModelService",void 0),r.__decorate([(0,o.Autowired)(p.WorkbenchEditorService),r.__metadata("design:type",p.WorkbenchEditorService)],g.prototype,"workbenchEditorService",void 0),r.__decorate([(0,o.Autowired)(l.CommandService),r.__metadata("design:type",Object)],g.prototype,"commandService",void 0),r.__decorate([(0,o.Autowired)(l.AppConfig),r.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),r.__decorate([(0,o.Autowired)(l.IApplicationService),r.__metadata("design:type",Object)],g.prototype,"applicationService",void 0),r.__decorate([(0,o.Autowired)(s),r.__metadata("design:type",s)],g.prototype,"untitledIndex",void 0),r.__decorate([(0,o.Autowired)(l.PreferenceService),r.__metadata("design:type",Object)],g.prototype,"preferenceService",void 0),t.UntitledSchemeDocumentProvider=g=r.__decorate([(0,o.Injectable)()],g);let a=class extends l.WithEventBus{constructor(){super(...arguments),this.scheme=l.Schemes.untitled}provideResource(u){const{name:c}=u.getParsedQuery();return{name:c||u.displayName,uri:u,icon:"",metadata:null}}async shouldCloseResourceWithoutConfirm(u){const c=this.documentModelService.getModelDescription(u.uri,"close-resource-check");return!!(c&&c.dirty)}async close(u,c){const E=this.documentModelService.getModelReference(u.uri,"close-resource-check");if(!E)return!1;if(c===p.AskSaveResult.SAVE){const f=await E.instance.save();return E.dispose(),f}else return c===p.AskSaveResult.REVERT?(await E.instance.revert(),E.dispose(),!0):!c||c===p.AskSaveResult.CANCEL?(E.dispose(),!1):(E.dispose(),!0)}async shouldCloseResource(u){const c=this.documentModelService.getModelDescription(u.uri,"close-resource-check");if(!c||!c.dirty)return!0;const E={[(0,l.localize)("file.prompt.dontSave","Don't Save")]:p.AskSaveResult.REVERT,[(0,l.localize)("file.prompt.save","Save")]:p.AskSaveResult.SAVE,[(0,l.localize)("file.prompt.cancel","Cancel")]:p.AskSaveResult.CANCEL},f=await this.dialogService.open({message:(0,l.formatLocalize)("saveChangesMessage",u.name),type:l.MessageType.Info,buttons:Object.keys(E)});return await this.close(u,E[f])}};t.UntitledSchemeResourceProvider=a,r.__decorate([(0,o.Autowired)(_.IDialogService),r.__metadata("design:type",Object)],a.prototype,"dialogService",void 0),r.__decorate([(0,o.Autowired)(m.IEditorDocumentModelService),r.__metadata("design:type",Object)],a.prototype,"documentModelService",void 0),t.UntitledSchemeResourceProvider=a=r.__decorate([(0,o.Injectable)()],a)},33835:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeEditor=void 0;const r=e(85608).__importDefault(e(14041)),o=e(41869),l=e(23418),_=e(96689),v=p=>{const m=r.default.useRef(),s=(0,o.useInjectable)(l.EditorCollectionService),g=(0,o.useInjectable)(_.IEditorDocumentModelService),[a,h]=r.default.useState(void 0),[u,c]=r.default.useState(void 0),[E,f]=r.default.useState(void 0),[d,y]=r.default.useState(void 0);let b=!1;return r.default.useEffect(()=>{if(m.current){a&&a.dispose();const A=s.createCodeEditor(m.current,{automaticLayout:!0,...p.options});h(A),u&&A.open(u)}return()=>{b=!0,a&&a.dispose(),u&&u.dispose()}},[m.current]),p&&a&&p.editorRef&&p.editorRef(a),E&&d!==E&&(y(E),g.createModelReference(new o.URI(E),"editor-react-component").then(A=>{u&&u.dispose(),!b&&A.instance.uri.toString()===E?c(A):A.dispose()})),u&&a&&a.currentDocumentModel!==u.instance&&a.open(u),p.uri&&p.uri.toString()!==E&&f(p.uri.toString()),r.default.createElement("div",{ref:A=>A&&(m.current=A),...p})};t.CodeEditor=v},50674:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useUpdateOnGroupTabChange=r;const n=e(41869);function r(o){return(0,n.useUpdateOnEvent)(o.onDidEditorGroupTabChanged,[o])}},6670:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorSuggestWidgetContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),_=e(76835);let v=class{contribute(m){const s=new o.DisposableCollection,g=m.monacoEditor.getContribution(_.SuggestController.ID);if(g&&g.widget&&g.widget.value){const a=g.widget.value;s.push(a.onDidSelect(h=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidSelect",data:h}))})),s.push(a.onDidHide(h=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidHide",data:h}))})),s.push(a.onDidShow(h=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidShow",data:h}))})),s.push(a.onDidFocus(h=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidFocus",data:h}))})),a&&a._setDetailsVisible&&a._setDetailsVisible(this.preferenceService.get("editor.suggest.details.visible",!0))}return s}};t.EditorSuggestWidgetContribution=v,n.__decorate([(0,r.Autowired)(l.IEventBus),n.__metadata("design:type",Object)],v.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],v.prototype,"preferenceService",void 0),t.EditorSuggestWidgetContribution=v=n.__decorate([(0,r.Injectable)()],v)},67903:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorTopPaddingContribution=void 0;class e{contribute(r){return r.monacoEditor.onDidChangeModel(()=>{r.monacoEditor.changeViewZones(o=>{o.addZone({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:0})})})}}t.EditorTopPaddingContribution=e},51553:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorGroup=t.WorkbenchEditorServiceImpl=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(91830),_=e(75524),v=e(43718),p=e(14951),m=n.__importStar(e(20868)),s=e(72665),g=e(50189),a=e(23418),h=e(96689),u=e(76759),c=e(47049),E=e(82196),f=e(17878),d=10,y=I=>!!(I.supportsRevive&&!I.deleted);let b=class extends v.WithEventBus{constructor(){super(),this.editorGroups=[],this._onDidEditorGroupsChanged=new v.Emitter,this.onDidEditorGroupsChanged=this._onDidEditorGroupsChanged.event,this._sortedEditorGroups=[],this._onActiveResourceChange=new v.Emitter,this.onActiveResourceChange=this._onActiveResourceChange.event,this._onActiveEditorUriChange=new v.Emitter,this.onActiveEditorUriChange=this._onActiveEditorUriChange.event,this._onCursorChange=new v.Emitter,this.onCursorChange=this._onCursorChange.event,this._onDidCurrentEditorGroupChanged=new v.Emitter,this.onDidCurrentEditorGroupChanged=this._onDidCurrentEditorGroupChanged.event,this._restoring=!0,this.contributionsReady=new v.Deferred,this.untitledCloseIndex=[],this.gridReady=!1,this._onDidGridReady=new v.Emitter,this.onDidGridReady=this._onDidGridReady.event,this.editorGroupIdGen=0,this.untitledIndex.update(),this.initialize()}setEditorContextKeyService(w){this.editorContextKeyService=w}setCurrentGroup(w){var T;if(w){if(this._currentEditorGroup===w)return;this._currentEditorGroup=w,this._onActiveResourceChange.fire(w.currentResource),this.eventBus.fire(new E.EditorActiveResourceStateChangedEvent({resource:w.currentResource,openType:w.currentOpenType,editorUri:(T=this.currentEditor)===null||T===void 0?void 0:T.currentUri})),this._onDidCurrentEditorGroupChanged.fire(this._currentEditorGroup)}}onEditorGroupChangeEvent(w){var T;w.payload.group===this.currentEditorGroup&&this.eventBus.fire(new E.EditorActiveResourceStateChangedEvent({resource:w.payload.newResource,openType:w.payload.newOpenType,editorUri:(T=this.currentEditor)===null||T===void 0?void 0:T.currentUri}))}getAllOpenedUris(){const w=[];for(const T of this.editorGroups)for(const R of T.resources)w.findIndex(O=>O.isEqual(R.uri))===-1&&w.push(R.uri);return w}async getAllOpenedDocuments(){const w=[];for(const T of this.editorGroups)for(const R of T.resources){if(R.uri.scheme!=="file")continue;if(w.findIndex(O=>O.uri.isEqual(R.uri))===-1){const O=await T.getDocumentModelRef(R.uri);O&&w.push(O.instance)}}return w}async save(w){if(this.editorGroups.length)try{for(const T of this.editorGroups){const R=T.resources.find(M=>M.uri.isEqual(w));R&&await T.saveResource(R)}return w}catch(T){throw new Error(`Save Failed: ${T.message}`)}}getDefaultSavePath(w){const T=w.path.toString()!=="/"?v.path.dirname(w.path.toString()):this.appConfig.workspaceDir;return v.isWindows?T.replace(/\\/g,"/"):T}async saveAs(w){var T,R;if(!(!this._currentEditorGroup||!((T=this._currentEditorGroup.currentResource)===null||T===void 0)&&T.deleted))try{const M=this.getDefaultSavePath(w);return await this.windowDialogService.showSaveDialog({saveLabel:"SaveAs File:",showNameInput:!0,defaultFileName:(R=this._currentEditorGroup.currentResource)===null||R===void 0?void 0:R.name,defaultUri:v.URI.file(M),saveAs:!0})}catch(M){throw new Error(`SaveAs Failed: ${M.message}`)}}async saveAll(w,T){for(const R of this.editorGroups)await R.saveAll(w,T)}hasDirty(){for(const w of this.editorGroups)if(w.hasDirty())return!0;return!1}calcDirtyCount(){const w=new Set;return this.editorGroups.reduce((T,R)=>T+R.calcDirtyCount(w),0)}createEditorGroup(){const w=this.injector.get(A,[this.generateRandomEditorGroupName(),this.editorGroupIdGen++]);this.editorGroups.push(w);const T=new v.Disposable(w.onDidEditorGroupBodyChanged(()=>{w===this.currentEditorGroup&&(!w.currentOpenType&&w.currentResource||this._onActiveResourceChange.fire(w.currentResource))}),w.onDidEditorFocusChange(()=>{var M;w===this.currentEditorGroup&&(!w.currentOpenType&&w.currentResource||this._onActiveEditorUriChange.fire((M=w.currentOrPreviousFocusedEditor)===null||M===void 0?void 0:M.currentUri))}));w.addDispose({dispose:()=>{T.dispose()}});const R=w.onDidEditorGroupTabChanged(()=>{this.saveOpenedResourceState()});return w.addDispose({dispose:()=>{R.dispose()}}),w.onCurrentEditorCursorChange(M=>{this._currentEditorGroup===w&&this._onCursorChange.fire(M)}),w}generateRandomEditorGroupName(){let w=(0,v.makeRandomHexString)(5);for(;this.editorGroups.findIndex(T=>T.name===w)!==-1;)w=(0,v.makeRandomHexString)(5);return w}initialize(){return this.initializing||(this.initializing=this.doInitialize()),this.initializing}async doInitialize(){this.openedResourceState=await this.initializeState(),await this.contributionsReady.promise,await this.restoreState(),this._currentEditorGroup=this.editorGroups[0]}async initializeState(){return await this.getStorage(v.STORAGE_NAMESPACE.WORKBENCH)}get currentEditor(){return this.currentEditorGroup&&this.currentEditorGroup.currentEditor}get currentCodeEditor(){return this.currentEditorGroup.currentCodeEditor}get currentEditorGroup(){return this._currentEditorGroup}get currentOrPreviousFocusedEditor(){return this.currentEditorGroup&&this.currentEditorGroup.currentOrPreviousFocusedEditor}async open(w,T){await this.initialize();let R=this.currentEditorGroup,M;if(T&&typeof T.groupIndex<"u"?M=T.groupIndex:T&&T.relativeGroupIndex&&(M=this.currentEditorGroup.index+T.relativeGroupIndex),typeof M=="number"&&M>=0){if(M>=this.editorGroups.length)return R.open(w,Object.assign({},T,{split:a.EditorGroupSplitAction.Right}));R=this.sortedEditorGroups[M]||this.currentEditorGroup}return R.open(w,T)}async openUris(w){await this.initialize(),await this.currentEditorGroup.openUris(w)}getEditorGroup(w){return this.editorGroups.find(T=>T.name===w)}get currentResource(){return this.currentEditorGroup?this.currentEditorGroup.currentResource:null}removeGroup(w){const T=this.editorGroups.findIndex(R=>R===w);if(T!==-1){if(this.editorGroups.length===1)return;this.editorGroups.splice(T,1),this.currentEditorGroup===w&&this.setCurrentGroup(this.editorGroups[0]);for(let R=T;R<this.editorGroups.length;R++)this.eventBus.fire(new E.EditorGroupIndexChangedEvent({group:this.editorGroups[R],index:R}))}}async saveOpenedResourceState(){if(this._restoring)return;const w=this.topGrid.serialize();await this.openedResourceState.set("grid",w)}prepareContextKeyService(){const w=R=>{let M=null;const O=this.documentModelManager.getModelDescription(R,"resourceContextKey");return O&&(M=O.languageId),M},T=new l.ResourceContextKey(this.editorContextKeyService,R=>{const M=w(R);return M||w(R)});this.onActiveResourceChange(R=>{this.currentEditor&&this.currentEditor.currentUri?T.set(this.currentEditor.currentUri):R?T.set(R.uri):T.reset()}),this.currentEditor&&this.currentEditor.currentUri?T.set(this.currentEditor.currentUri):this.currentResource?T.set(this.currentResource.uri):T.reset()}onDomCreated(w){this.editorContextKeyService&&this.editorContextKeyService.attachToDomNode(w)}notifyGroupChanged(){this._sortedEditorGroups=void 0,this._onDidEditorGroupsChanged.fire()}async restoreState(){let w={editorGroup:{uris:[],previewIndex:-1}};this.appConfig.disableRestoreEditorGroupState||(w=this.openedResourceState.get("grid",w)),this.topGrid=new c.EditorGrid,this.addDispose(this.topGrid),this.addDispose(this.topGrid.onDidGridAndDesendantStateChange(()=>{this._sortedEditorGroups=void 0,this._onDidEditorGroupsChanged.fire()}));const T=[],R=this.topGrid.deserialize(w,()=>this.createEditorGroup(),T).then(()=>{this.topGrid.children.length===0&&!this.topGrid.editorGroup&&this.topGrid.setEditorGroup(this.createEditorGroup()),this.gridReady=!0,this._onDidGridReady.fire(),this.notifyGroupChanged()});return Promise.all(T).then(()=>{this._restoring=!1;for(const M of this.contributions.getContributions())M.onDidRestoreState&&M.onDidRestoreState()}),R}async closeAll(w,T){for(const R of this.editorGroups.slice(0))w?await R.close(w,{force:T}):await R.closeAll()}async closeAllOnlyConfirmOnce(){const w=[];for(const L of this.editorGroups)for(const B of L.resources)w.push(B);const R=(await Promise.all(w.map(async L=>({shouldClose:await this.resourceService.shouldCloseResourceWithoutConfirm(L),resource:L})))).filter(L=>L.shouldClose);if(R.length===0)return!1;const M={[(0,v.localize)("file.prompt.dontSave","Don't Save")]:E.AskSaveResult.REVERT,[(0,v.localize)("file.prompt.save","Save")]:E.AskSaveResult.SAVE,[(0,v.localize)("file.prompt.cancel","Cancel")]:E.AskSaveResult.CANCEL};let x=R.slice(0,d).map(L=>L.resource.name).join("\u3001");R.length>d&&(R.length-d===1?x+=(0,v.localize)("file.prompt.more.one"):x+=(0,v.formatLocalize)("file.prompt.more.number",R.length-d));const k=await this.dialogService.open({message:(0,o.toMarkdown)((0,v.formatLocalize)("saveNFilesChangesMessage",R.length,x),this.openner),type:v.MessageType.Info,buttons:Object.keys(M)}),F=M[k];return F===E.AskSaveResult.SAVE?(await Promise.all(R.map(L=>{var B,U;return(U=(B=this.resourceService).close)===null||U===void 0?void 0:U.call(B,L.resource,E.AskSaveResult.SAVE)})),!1):F===E.AskSaveResult.REVERT?(await Promise.all(R.map(L=>{var B,U;return(U=(B=this.resourceService).close)===null||U===void 0?void 0:U.call(B,L.resource,E.AskSaveResult.REVERT)})),!1):!0}async close(w,T){return this.closeAll(w,T)}get sortedEditorGroups(){return this._sortedEditorGroups||(this._sortedEditorGroups=[],this.topGrid.sortEditorGroups(this._sortedEditorGroups)),this._sortedEditorGroups}handleOnCloseUntitledResource(w){if(w.payload.resource.uri.scheme===v.Schemes.untitled){const{index:T}=w.payload.resource.uri.getParsedQuery();this.untitledCloseIndex.push(parseInt(T,10)),this.untitledCloseIndex.sort((R,M)=>R-M)}}createUntitledURI(){const w=this.untitledCloseIndex.shift()||this.untitledIndex.id;return new v.URI().withScheme(v.Schemes.untitled).withQuery(`name=${f.UntitledDocumentIdCounter.UNTITLED_FILE_NAME_PREFIX}${w}&index=${w}`)}createUntitledResource(w={uri:this.createUntitledURI()}){return this.open(w.uri,{preview:!1,focus:!0,...w.resourceOpenOptions})}};t.WorkbenchEditorServiceImpl=b,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],b.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(a.ResourceService),n.__metadata("design:type",a.ResourceService)],b.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],b.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],b.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(v.StorageProvider),n.__metadata("design:type",Function)],b.prototype,"getStorage",void 0),n.__decorate([(0,r.Autowired)(s.IDialogService),n.__metadata("design:type",Object)],b.prototype,"dialogService",void 0),n.__decorate([(0,r.Autowired)(o.IOpenerService),n.__metadata("design:type",Object)],b.prototype,"openner",void 0),n.__decorate([(0,r.Autowired)(E.BrowserEditorContribution),n.__metadata("design:type",Object)],b.prototype,"contributions",void 0),n.__decorate([(0,r.Autowired)(h.IEditorDocumentModelService),n.__metadata("design:type",Object)],b.prototype,"documentModelManager",void 0),n.__decorate([(0,r.Autowired)(f.UntitledDocumentIdCounter),n.__metadata("design:type",f.UntitledDocumentIdCounter)],b.prototype,"untitledIndex",void 0),n.__decorate([(0,r.Autowired)(s.IWindowDialogService),n.__metadata("design:type",Object)],b.prototype,"windowDialogService",void 0),n.__decorate([(0,v.OnEvent)(E.EditorGroupChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[E.EditorGroupChangeEvent]),n.__metadata("design:returntype",void 0)],b.prototype,"onEditorGroupChangeEvent",null),n.__decorate([(0,v.OnEvent)(E.EditorGroupCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[E.EditorGroupCloseEvent]),n.__metadata("design:returntype",void 0)],b.prototype,"handleOnCloseUntitledResource",null),t.WorkbenchEditorServiceImpl=b=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],b);let A=class extends v.WithEventBus{constructor(w,T){super(),this.name=w,this.groupId=T,this.openingPromise=new Map,this._onDidEditorFocusChange=this.registerDispose(new v.Emitter),this.onDidEditorFocusChange=this._onDidEditorFocusChange.event,this._onDidEditorGroupTabChanged=new v.Emitter,this.onDidEditorGroupTabChanged=this._onDidEditorGroupTabChanged.event,this._onDidEditorGroupTabOperation=new v.Emitter,this.onDidEditorGroupTabOperation=this._onDidEditorGroupTabOperation.event,this._onDidEditorGroupBodyChanged=new v.Emitter,this.onDidEditorGroupBodyChanged=this._onDidEditorGroupBodyChanged.event,this._onDidEditorGroupContentLoading=new v.Emitter,this.onDidEditorGroupContentLoading=this._onDidEditorGroupContentLoading.event,this.previewURI=null,this.resources=[],this.resourceStatus=new Map,this.cachedResourcesActiveOpenTypes=new Map,this.cachedResourcesOpenTypes=new Map,this.availableOpenTypes=[],this.activeComponents=new Map,this.activateComponentsProps=new Map,this.holdDocumentModelRefs=new Map,this.toDispose=[],this._prevDomHeight=0,this._prevDomWidth=0,this._onCurrentEditorCursorChange=new v.Emitter,this.onCurrentEditorCursorChange=this._onCurrentEditorCursorChange.event,this.resourceOpenHistory=[],this._domNode=null,this._diffEditorDomNode=null,this._diffEditorDomNodeAttached=!1,this._multiFileDiffEditorDomNode=null,this._multiFileDiffEditorDomNodeAttached=!1,this._mergeEditorDomNode=null,this._mergeEditorDomNodeAttached=!1,this.codeEditorReady=new v.ReadyEvent,this.diffEditorReady=new v.ReadyEvent,this.diffEditorDomReady=new v.ReadyEvent,this.multiDiffEditorDomReady=new v.ReadyEvent,this.mergeEditorReady=new v.ReadyEvent,this.mergeEditorDomReady=new v.ReadyEvent,this._restoringState=!1,this._multiDiffEditorDomNodeAttached=!1,this.eventBus.onDirective(o.ResizeEvent.createDirective((0,o.getSlotLocation)("@opensumi/ide-editor",this.config.layoutConfig)),()=>{this.doLayoutEditors()}),this.eventBus.on(E.GridResizeEvent,R=>{R.payload.gridId===this.grid.uid&&this.doLayoutEditors()}),this.eventBus.on(E.EditorComponentDisposeEvent,R=>{this.activeComponents.delete(R.payload),this.activateComponentsProps.delete(R.payload)}),this.listenToExplorerAutoRevealConfig()}listenToExplorerAutoRevealConfig(){this.explorerAutoRevealConfig=!!this.preferenceService.get("explorer.autoReveal"),this.disposables.push(this.preferenceService.onPreferenceChanged(w=>{w.preferenceName==="explorer.autoReveal"&&(this.explorerAutoRevealConfig=w.newValue)}))}attachDiffEditorDom(w){this._diffEditorDomNodeAttached||(this._diffEditorDomNode=w,this.diffEditorDomReady.ready(),this._diffEditorDomNodeAttached=!0)}attachMergeEditorDom(w){this._mergeEditorDomNodeAttached||(this._mergeEditorDomNode=w,this.mergeEditorDomReady.ready(),this._mergeEditorDomNodeAttached=!0)}attachToDom(w){this._domNode=w,w&&(this.contextKeyService.attachToDomNode(w),this.layoutEditors())}layoutEditors(){o.fastdom.measure(()=>{if(this._domNode){const w=this._domNode.offsetWidth,T=this._domNode.offsetHeight;(w!==this._prevDomWidth||T!==this._prevDomHeight)&&this.doLayoutEditors(),this._prevDomWidth=w,this._prevDomHeight=T}})}_layoutEditorWorker(){if(this.currentOpenType)switch(this.currentOpenType.type){case E.EditorOpenType.code:this.codeEditor&&this.codeEditor.layout();break;case E.EditorOpenType.diff:this.diffEditor&&this.diffEditor.layout();break;case E.EditorOpenType.multiDiff:this.multiDiffEditor&&this._multiDiffEditorDomNodeAttached&&this.multiDiffEditor.layout(new g.Dimension(this._multiDiffEditorDomNode.offsetWidth,this._multiDiffEditorDomNode.offsetHeight));break;default:break}}doLayoutEditors(){this._measure&&this._measure.dispose(),this._measure=o.fastdom.mutate(()=>{this._layoutEditorWorker()})}setContextKeys(){var w;if(!this._resourceContext){const T=R=>{let M=null;const O=this.documentModelManager.getModelDescription(R,"resourceContextKey");return O&&(M=O.languageId),M};this._resourceContext=new l.ResourceContextKey(this.contextKeyService,R=>T(R)),this._diffResourceContextKey=new l.ResourceContextKey(this.contextKeyService,R=>T(R),"diffResource"),this._editorLangIDContextKey=this.contextKeyService.createKey("editorLangId",""),this._isInDiffEditorContextKey=this.contextKeyService.createKey("isInDiffEditor",!1),this._isInMultiDiffEditorContextKey=this.contextKeyService.createKey("isInMultiDiffEditor",!1),this._activeEditorIsDirtyContextKey=this.contextKeyService.createKey("activeEditorIsDirty",!1),this._isInDiffRightEditorContextKey=this.contextKeyService.createKey("isInDiffRightEditor",!1),this._isInEditorComponentContextKey=this.contextKeyService.createKey("inEditorComponent",!1)}this.currentOrPreviousFocusedEditor&&this.currentOrPreviousFocusedEditor.currentUri?(this._resourceContext.set(this.currentOrPreviousFocusedEditor.currentUri),this.currentOrPreviousFocusedEditor.currentDocumentModel&&this._editorLangIDContextKey.set(this.currentOrPreviousFocusedEditor.currentDocumentModel.languageId)):this.currentEditor&&this.currentEditor.currentUri?(this._resourceContext.set(this.currentEditor.currentUri),this.currentEditor.currentDocumentModel&&this._editorLangIDContextKey.set(this.currentEditor.currentDocumentModel.languageId)):(this.currentResource?this._resourceContext.set(this.currentResource.uri):this._resourceContext.reset(),this._editorLangIDContextKey.reset()),this._activeEditorIsDirtyContextKey.set(this.activeEditorIsDirty()),this._isInDiffEditorContextKey.set(this.isDiffEditorMode()),this._isInMultiDiffEditorContextKey.set(this.isMultiDiffEditorMode()),this._isInDiffRightEditorContextKey.set(this.isDiffEditorMode()),this._isInEditorComponentContextKey.set(this.isComponentMode()),this.isDiffEditorMode()&&this._diffResourceContextKey.set((w=this.currentResource)===null||w===void 0?void 0:w.uri),this.updateContextKeyWhenDiffEditorChangesFocus()}updateContextKeyWhenDiffEditorChangesFocus(){if(this.updateContextKeyWhenEditorChangesFocusDisposer||!this.diffEditor)return;const w=()=>{this.currentFocusedEditor||(this.setContextKeys(),this._onDidEditorFocusChange.fire())};this.updateContextKeyWhenEditorChangesFocusDisposer=new v.Disposable(this.diffEditor.modifiedEditor.onFocus(()=>{this._currentOrPreviousFocusedEditor=this.diffEditor.modifiedEditor,this.setContextKeys(),this._onDidEditorFocusChange.fire()}),this.diffEditor.originalEditor.onFocus(()=>{this._currentOrPreviousFocusedEditor=this.diffEditor.originalEditor,this.setContextKeys(),this._onDidEditorFocusChange.fire()}),this.codeEditor.onFocus(()=>{this.codeEditor.currentUri&&this.locateInFileTree(this.codeEditor.currentUri),this._currentOrPreviousFocusedEditor=this.codeEditor,this.setContextKeys(),this._onDidEditorFocusChange.fire()}),this.codeEditor.onBlur(w),this.diffEditor.originalEditor.onBlur(w),this.diffEditor.modifiedEditor.onBlur(w)),this.addDispose(this.updateContextKeyWhenEditorChangesFocusDisposer)}get contextKeyService(){return this._contextKeyService||(this._contextKeyService=this.workbenchEditorService.editorContextKeyService.createScoped()),this._contextKeyService}get index(){return this.workbenchEditorService.sortedEditorGroups.indexOf(this)}onResourceDecorationChangeEvent(w){w.payload.decoration.dirty&&this.previewURI&&this.previewURI.isEqual(w.payload.uri)&&this.pinPreviewed(),this.resources.find(R=>R.uri.isEqual(w.payload.uri))&&this.notifyTabChanged()}resetOpenType(){this._currentOpenType=null}oResourceOpenTypeChangedEvent(w){const T=w.payload;this.cachedResourcesOpenTypes.has(T.toString())&&this.cachedResourcesOpenTypes.delete(T.toString()),this.currentResource&&this.currentResource.uri.isEqual(T)&&(this.resetOpenType(),this.notifyBodyChanged(),this.displayResourceComponent(this.currentResource,{}))}async onRegisterEditorComponentEvent(){if(this.currentResource){const w=this.currentResource,T=await this.editorComponentRegistry.resolveEditorComponent(w);this.currentResource===w&&(this.availableOpenTypes=T,this.cachedResourcesOpenTypes.set(w.uri.toString(),T))}}pinPreviewed(w){const T=this.previewURI;w===void 0?this.previewURI=null:this.previewURI&&this.previewURI.isEqual(w)&&(this.previewURI=null),T!==this.previewURI&&this.notifyTabChanged()}notifyTabChanged(){this._restoringState||this._onDidEditorGroupTabChanged.fire()}notifyBodyChanged(){this._onDidEditorGroupBodyChanged.fire()}notifyTabLoading(w){this._onDidEditorGroupContentLoading.fire(w)}get currentEditor(){return this.currentOpenType?this.currentOpenType.type===E.EditorOpenType.code?this.codeEditor:this.currentOpenType.type===E.EditorOpenType.diff?this.diffEditor.modifiedEditor:null:null}get currentOrPreviousFocusedEditor(){return this._currentOrPreviousFocusedEditor||this.currentEditor}get currentFocusedEditor(){if(this.currentOpenType){if(this.currentOpenType.type===E.EditorOpenType.code){if(this.codeEditor.monacoEditor.hasWidgetFocus())return this.codeEditor}else if(this.currentOpenType.type===E.EditorOpenType.diff){if(this.diffEditor.modifiedEditor.monacoEditor.hasTextFocus())return this.diffEditor.modifiedEditor;if(this.diffEditor.originalEditor.monacoEditor.hasTextFocus())return this.diffEditor.originalEditor;if(this.diffEditor.modifiedEditor.monacoEditor.hasWidgetFocus())return this.diffEditor.modifiedEditor;if(this.diffEditor.originalEditor.monacoEditor.hasWidgetFocus())return this.diffEditor.originalEditor}}return null}get currentCodeEditor(){return this.currentOpenType&&this.currentOpenType.type===E.EditorOpenType.code?this.codeEditor:null}createEditor(w){this.codeEditor=this.collectionService.createCodeEditor(w,{},{[o.ServiceNames.CONTEXT_KEY_SERVICE]:this.contextKeyService.contextKeyService}),setTimeout(()=>{this.doLayoutEditors()}),this.addDispose(this.codeEditor.onRefOpen(()=>{this.doLayoutEditors()})),this.toDispose.push(this.codeEditor.onCursorPositionChanged(T=>{this._onCurrentEditorCursorChange.fire(T)})),this.toDispose.push(this.codeEditor.onSelectionsChanged(T=>{this.currentOpenType&&this.currentOpenType.type===E.EditorOpenType.code&&this.eventBus.fire(new E.EditorSelectionChangeEvent({group:this,resource:this.currentResource,selections:T.selections,source:T.source,editorUri:this.codeEditor.currentUri}))})),this.toDispose.push(this.codeEditor.onVisibleRangesChanged(T=>{this.currentOpenType&&this.currentOpenType.type===E.EditorOpenType.code&&this.eventBus.fire(new E.EditorVisibleChangeEvent({group:this,resource:this.currentResource,visibleRanges:T,editorUri:this.codeEditor.currentUri}))})),this.toDispose.push(this.codeEditor.onConfigurationChanged(()=>{this.currentOpenType&&this.currentOpenType.type===E.EditorOpenType.code&&this.eventBus.fire(new E.EditorConfigurationChangedEvent({group:this,resource:this.currentResource,editorUri:this.codeEditor.currentUri}))})),this.eventBus.fire(new E.CodeEditorDidVisibleEvent({groupName:this.name,type:E.EditorOpenType.code,editorId:this.codeEditor.getId()})),this.toDispose.push(this.codeEditor.monacoEditor.onDidChangeModelContent(()=>{this._activeEditorIsDirtyContextKey.set(this.activeEditorIsDirty())})),this.codeEditorReady.ready()}createMergeEditor(w){this.mergeEditor=this.collectionService.createMergeEditor(w,{},{[o.ServiceNames.CONTEXT_KEY_SERVICE]:this.contextKeyService.contextKeyService}),this.mergeEditorReady.ready()}createDiffEditor(w){this.diffEditor=this.collectionService.createDiffEditor(w,{},{[o.ServiceNames.CONTEXT_KEY_SERVICE]:this.contextKeyService.contextKeyService}),setTimeout(()=>{this.doLayoutEditors()}),this.diffEditor.onRefOpen(()=>{this.doLayoutEditors()}),this.addDiffEditorEventListeners(this.diffEditor.originalEditor,"original"),this.addDiffEditorEventListeners(this.diffEditor.modifiedEditor,"modified"),this.eventBus.fire(new E.CodeEditorDidVisibleEvent({groupName:this.name,type:E.EditorOpenType.diff,editorId:this.diffEditor.modifiedEditor.getId()})),this.eventBus.fire(new E.CodeEditorDidVisibleEvent({groupName:this.name,type:E.EditorOpenType.diff,editorId:this.diffEditor.originalEditor.getId()})),this.diffEditorReady.ready()}addDiffEditorEventListeners(w,T){this.toDispose.push(w.onSelectionsChanged(R=>{this.currentOpenType&&this.currentOpenType.type===E.EditorOpenType.diff&&this.eventBus.fire(new E.EditorSelectionChangeEvent({group:this,resource:this.currentResource,selections:R.selections,source:R.source,editorUri:v.URI.from(w.monacoEditor.getModel().uri),side:T}))})),this.toDispose.push(w.onVisibleRangesChanged(R=>{this.currentOpenType&&this.currentOpenType.type===E.EditorOpenType.diff&&this.eventBus.fire(new E.EditorVisibleChangeEvent({group:this,resource:this.currentResource,visibleRanges:R,editorUri:w.currentUri}))})),this.toDispose.push(w.onConfigurationChanged(()=>{this.currentOpenType&&this.currentOpenType.type===E.EditorOpenType.diff&&this.eventBus.fire(new E.EditorConfigurationChangedEvent({group:this,resource:this.currentResource,editorUri:w.currentUri}))}))}async split(w,T,R){var M,O,x;const k=this.workbenchEditorService.createEditorGroup(),F=w===a.EditorGroupSplitAction.Left||w===a.EditorGroupSplitAction.Right?c.SplitDirection.Horizontal:c.SplitDirection.Vertical,L=w===a.EditorGroupSplitAction.Left||w===a.EditorGroupSplitAction.Top;if(this.grid.split(F,k,L),R&&!R.scrollTop&&(R.scrollTop=(M=this.currentEditor)===null||M===void 0?void 0:M.monacoEditor.getScrollTop()),R&&!R.scrollLeft&&(R.scrollLeft=(O=this.currentEditor)===null||O===void 0?void 0:O.monacoEditor.getScrollLeft()),R&&!R?.range){const B=(x=this.currentCodeEditor)===null||x===void 0?void 0:x.monacoEditor.getSelection();B&&(R.range=new m.Range(B.startLineNumber,B.startColumn,B.endLineNumber,B.endColumn))}return k.open(T,{...R,preview:!1,revealRangeInCenter:!1})}async open(w,T={}){if(w.scheme===v.Schemes.file&&this.recentFilesManager.setMostRecentlyOpenedFile(w.withoutFragment().toString()),T&&T.split)return this.split(T.split,w,Object.assign({},T,{split:void 0,preview:!1}));if(!this.openingPromise.has(w.toString())){const M=this.doOpen(w,T);this.openingPromise.set(w.toString(),M),M.then(()=>{this.openingPromise.delete(w.toString())},()=>{this.openingPromise.delete(w.toString())})}return this.preferenceService.get("editor.previewMode")&&((0,v.isUndefinedOrNull)(T.preview)?!0:T.preview)||this.openingPromise.get(w.toString()).then(()=>{this.pinPreviewed(w)}),this.openingPromise.get(w.toString())}async pin(w){return this.pinPreviewed(w)}getPreventScrollOption(w={}){var T;return(T=w.preventScroll)!==null&&T!==void 0?T:this.preferenceService.get("editor.preventScrollAfterFocused")}async doOpen(w,T={}){var R,M,O;if(!this.resourceService.handlesUri(w))return this.openerService.open(w),!1;let x;try{const k=this.preferenceService.get("editor.previewMode")&&((0,v.isUndefinedOrNull)(T.preview)?!0:T.preview);if(this.currentResource&&this.currentResource.uri.isEqual(w)&&(!T.forceOpenType||T.forceOpenType.type===((R=this.currentOpenType)===null||R===void 0?void 0:R.type))){if(T.focus&&this.currentEditor){const F=this.getPreventScrollOption(T);(M=this._domNode)===null||M===void 0||M.focus({preventScroll:F}),this.currentEditor.monacoEditor.focus()}return T.range&&this.currentEditor&&(this.currentEditor.monacoEditor.setSelection(T.range),setTimeout(()=>{var F;(F=this.currentEditor)===null||F===void 0||F.monacoEditor.revealRangeInCenter(T.range,0)},0)),this.locationInTree(T,w),this.notifyTabChanged(),{group:this,resource:this.currentResource}}else{const F=this._currentOpenType,L=this._currentResource;let B=null,U=this.resources.find(Q=>Q.uri.toString()===w.toString());if(!U){if(U=await this.resourceService.getResource(w),!U)throw new Error("This uri cannot be opened!: "+w);if(U.deleted){if(T.deletedPolicy==="fail")throw new Error("resource deleted "+w);if(T.deletedPolicy==="skip")return!1}T&&T.label&&(U.name=T.label),T&&(0,v.isDefined)(T.supportsRevive)&&(U.supportsRevive=T.supportsRevive);let Q=null;if(T&&T.index!==void 0&&T.index<this.resources.length)Q=this.resources[T.index],this.resources.splice(T.index,0,U),B={type:"open",resource:U,index:T.index};else if(this.currentResource){const G=this.resources.indexOf(this.currentResource);this.resources.splice(G+1,0,U),B={type:"open",resource:U,index:G+1},Q=this.currentResource}else this.resources.push(U),B={type:"open",resource:U,index:this.resources.length-1};k&&(this.previewURI&&await this.close(this.previewURI,{treatAsNotCurrent:!0,force:T.forceClose}),this.previewURI=U.uri),T.replace&&Q&&await this.close(Q.uri,{treatAsNotCurrent:!0,force:T.forceClose})}if(T.backend)return this.notifyTabChanged(),!1;if(L&&this.resourceOpenHistory[this.resourceOpenHistory.length-1]!==L.uri){this.resourceOpenHistory.push(L.uri);const Q=(O=this.currentCodeEditor)===null||O===void 0?void 0:O.getSelections();Q&&Q.length>0&&this.recentFilesManager.updateMostRecentlyOpenedFile(L.uri.toString(),{lineNumber:Q[0].selectionStartLineNumber,column:Q[0].selectionStartColumn})}this._currentOpenType=null,this._currentResource=U;const W=this.reporterService.time(v.REPORT_NAME.EDITOR_REACTIVE);x=new v.Deferred,this.resourceStatus.set(U,x.promise);const j=setTimeout(()=>{this.notifyTabLoading(U)},60);this.notifyTabChanged(),this.notifyBodyChanged();try{await this.displayResourceComponent(U,T)}finally{B&&this._onDidEditorGroupTabOperation.fire(B)}return this._currentOrPreviousFocusedEditor=this.currentEditor,clearTimeout(j),x.resolve(),W.timeEnd(U.uri.toString()),this._onDidEditorFocusChange.fire(),this.setContextKeys(),this.eventBus.fire(new E.EditorGroupOpenEvent({group:this,resource:U})),this.locationInTree(T,w),this.eventBus.fire(new E.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:F,oldResource:L})),{group:this,resource:U}}}catch(k){return(0,v.getDebugLogger)().error(k),x&&x.reject(),(0,u.isEditorError)(k,u.EditorTabChangedError)||this.messageService.error((0,v.formatLocalize)("editor.failToOpen",w.displayName,k.message),[],!0),!1}}locationInTree(w,T){w?.backend||(w?.disableNavigate||this.locateInFileTree(T),w.disableNavigateOnOpendEditor||this.locateInOpenedEditor(T))}locateInFileTree(w){this.explorerAutoRevealConfig&&this.commands.tryExecuteCommand(o.FILE_COMMANDS.LOCATION.id,w)}locateInOpenedEditor(w){this.explorerAutoRevealConfig&&this.commands.tryExecuteCommand(o.OPEN_EDITORS_COMMANDS.LOCATION.id,w)}async openUris(w){for(const T of w)await this.open(T)}async getDocumentModelRef(w){const T=w.toString();return this.holdDocumentModelRefs.has(T)||this.holdDocumentModelRefs.set(T,await this.documentModelManager.createModelReference(w,"editor-group-"+this.name)),this.holdDocumentModelRefs.get(T)}disposeDocumentRef(w){if(w.scheme==="diff"){const T=w.getParsedQuery();this.doDisposeDocRef(new v.URI(T.original)),this.doDisposeDocRef(new v.URI(T.modified))}else w.scheme==="mergeEditor"?this.mergeEditor&&this.mergeEditor.dispose():this.doDisposeDocRef(w)}doDisposeDocRef(w){const T=w.toString();this.holdDocumentModelRefs.has(T)&&(this.holdDocumentModelRefs.get(T).dispose(),this.holdDocumentModelRefs.delete(T))}async openCodeEditor(w,T){this.resolveTabChanged(w,this.currentResource),await this.codeEditorReady.onceReady(async()=>{var R;const M=await this.getDocumentModelRef(w.uri);if(await this.codeEditor.open(M),T.range){const O=new m.Range(T.range.startLineNumber,T.range.startColumn,T.range.endLineNumber,T.range.endColumn);this.codeEditor.monacoEditor.setSelection(O),T.revealRangeInCenter&&setTimeout(()=>{this.codeEditor.monacoEditor.revealRangeInCenter(O,1)})}if(queueMicrotask(()=>{T.scrollTop&&this.codeEditor.monacoEditor.setScrollTop(T.scrollTop),T.scrollLeft&&this.codeEditor.monacoEditor.setScrollLeft(T.scrollLeft)}),T.focus){const O=this.getPreventScrollOption(T);(R=this._domNode)===null||R===void 0||R.focus({preventScroll:O});const x=this.eventBus.on(E.CodeEditorDidVisibleEvent,k=>{var F;if(k.payload.groupName===this.name&&k.payload.type===E.EditorOpenType.code){if(x.dispose(),this.disposed||this!==this.workbenchEditorService.currentEditorGroup)return;if(this.currentEditor===this.codeEditor&&(!((F=this.codeEditor.currentUri)===null||F===void 0)&&F.isEqual(w.uri)))try{this.codeEditor.focus()}catch{}}})}M.instance.dirty&&this.pinPreviewed(w.uri)})}async openDiffEditor(w,T){this.diffEditor||await this.diffEditorDomReady.onceReady(()=>{var x;const k=document.createElement("div");(x=this._diffEditorDomNode)===null||x===void 0||x.appendChild(k),this.createDiffEditor(k)});const R=w,[M,O]=await Promise.all([this.getDocumentModelRef(R.metadata.original),this.getDocumentModelRef(R.metadata.modified)]);await this.diffEditorReady.onceReady(async()=>{var x;if(!(!M||!O)&&(await this.diffEditor.compare(M,O,T,w.uri),T.focus)){const k=this.getPreventScrollOption(T);(x=this._domNode)===null||x===void 0||x.focus({preventScroll:k});const F=this.eventBus.on(E.CodeEditorDidVisibleEvent,L=>{if(L.payload.groupName===this.name&&L.payload.type===E.EditorOpenType.diff){if(F.dispose(),this.disposed||this!==this.workbenchEditorService.currentEditorGroup)return;if(this.currentEditor===this.diffEditor.modifiedEditor)try{this.diffEditor.focus()}catch{}}})}})}async openMergeEditor(w){const{metadata:T}=w;if(!T)return;this.mergeEditor||await this.mergeEditorDomReady.onceReady(()=>{var j;const Q=document.createElement("div");(j=this._mergeEditorDomNode)===null||j===void 0||j.appendChild(Q),this.createMergeEditor(Q)});const{ancestor:R,input1:M,input2:O,output:x}=T,k=_.MergeEditorInputData.from(M),F=_.MergeEditorInputData.from(O),[L,B,U,W]=await Promise.all([this.getDocumentModelRef(v.URI.parse(R)),this.getDocumentModelRef(k.uri),this.getDocumentModelRef(v.URI.parse(x)),this.getDocumentModelRef(F.uri)]);await this.mergeEditorReady.onceReady(async()=>{await this.mergeEditor.open({ancestor:{uri:v.URI.parse(T.ancestor),textModel:L.instance.getMonacoModel(),baseContent:L.instance.baseContent||""},input1:k.setTextModel(B.instance.getMonacoModel()),input2:F.setTextModel(W.instance.getMonacoModel()),output:{uri:v.URI.parse(T.output),textModel:U.instance.getMonacoModel()}})})}async openCustomEditor(w,T){const R=this.editorComponentRegistry.getEditorComponent(T),M=this.editorComponentRegistry.getEditorInitialProps(T);if(R){if(this.activateComponentsProps.set(R,M),R.renderMode===E.EditorComponentRenderMode.ONE_PER_RESOURCE){const O=this.activeComponents.get(R)||[];O.findIndex(k=>k.uri.toString()===w.uri.toString())===-1&&O.push(w),this.activeComponents.set(R,O)}else if(R.renderMode===E.EditorComponentRenderMode.ONE_PER_GROUP)this.activeComponents.set(R,[w]);else if(R.renderMode===E.EditorComponentRenderMode.ONE_PER_WORKBENCH){const O=[];this.workbenchEditorService.editorGroups.forEach(x=>{if(x===this)return;const k=x.resources.find(F=>F.uri.isEqual(w.uri));k&&O.push(x.close(k.uri))}),await Promise.all(O).catch((0,v.getDebugLogger)().error),this.activeComponents.set(R,[w])}}else throw new Error("Cannot find Editor Component with id: "+T);this._onCurrentEditorCursorChange.fire({position:null,selectionLength:0})}async displayResourceComponent(w,T){T.revealRangeInCenter===void 0&&(T.revealRangeInCenter=!0);const R=w,M=await this.resolveOpenType(w,T);if(M){const{activeOpenType:O,openTypes:x}=M;switch(this.availableOpenTypes=x,T.preserveFocus&&(T.focus=!1),O.type){case E.EditorOpenType.code:await this.openCodeEditor(w,T);break;case E.EditorOpenType.diff:await this.openDiffEditor(w,T);break;case E.EditorOpenType.multiDiff:await this.openMultiDiffEditor(w,T);break;case E.EditorOpenType.mergeEditor:await this.openMergeEditor(w);break;case E.EditorOpenType.component:await this.openCustomEditor(w,O.componentId);break;default:return}this.resolveTabChanged(R,this.currentResource),this._currentOpenType=O,this.notifyBodyChanged(),this.doLayoutEditors(),this.cachedResourcesActiveOpenTypes.set(w.uri.toString(),O)}}resolveTabChanged(w,T){if(w!==T)throw new u.EditorTabChangedError}getLastOpenType(w){return this.cachedResourcesActiveOpenTypes.get(w.uri.toString())}async resolveOpenType(w,T){const R=this.cachedResourcesOpenTypes.get(w.uri.toString())||await this.editorComponentRegistry.resolveEditorComponent(w),M=this.preferenceService.get("workbench.editorAssociations"),O=S(R,this.cachedResourcesActiveOpenTypes.get(w.uri.toString()),w,M,T.forceOpenType);return this.cachedResourcesOpenTypes.set(w.uri.toString(),R),{activeOpenType:O,openTypes:R}}async close(w,{treatAsNotCurrent:T,force:R}={}){const M=this.resources.findIndex(O=>O.uri.toString()===w.toString());if(M!==-1){const O=this.resources[M];if(!R&&!await this.shouldClose(O))return!1;if(this.resources.splice(M,1),this._onDidEditorGroupTabOperation.fire({type:"close",resource:O,index:M}),this.eventBus.fire(new E.EditorGroupCloseEvent({group:this,resource:O})),this.previewURI&&this.previewURI.isEqual(w)&&(this.previewURI=null),O===this.currentResource&&!T){let x;for(;this.resourceOpenHistory.length>0;)if(this.resources.findIndex(k=>k.uri===this.resourceOpenHistory[this.resourceOpenHistory.length-1])!==-1){x=this.resourceOpenHistory.pop();break}else this.resourceOpenHistory.pop();if(x)this.open(x);else{let k=M;for(;k>0&&!this.resources[k];)k--;this.resources[k]?this.open(this.resources[k].uri):this.backToEmpty()}}else this.notifyTabChanged();this.removeResouceFromActiveComponents(O),this.disposeDocumentRef(w)}return this.resources.length===0&&(this.grid.parent&&this.dispose(),this.availableOpenTypes=[]),!0}removeResouceFromActiveComponents(w){this.activeComponents.forEach((T,R)=>{const M=T.indexOf(w);M!==-1&&(T.splice(M,1),this.eventBus.fire(new E.ResoucesOfActiveComponentChangedEvent({component:R,resources:T})))})}async shouldClose(w){const T=this.workbenchEditorService.editorGroups.map(R=>R.resources);if(await this.resourceService.shouldCloseResource(w,T)){let R=0;for(const M of T)for(const O of M)if(O.uri.isEqual(w.uri)&&(R++,R>=2))break;return R<=1&&this.resourceService.disposeResource(w),!0}else return!1}backToEmpty(){const w=this._currentOpenType,T=this._currentResource;this._currentResource=null,this.resetOpenType(),this.notifyTabChanged(),this.notifyBodyChanged(),this._currentOrPreviousFocusedEditor=null,this._onDidEditorFocusChange.fire(),this.eventBus.fire(new E.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:w,oldResource:T}))}async closeAll(){for(const T of this.resources)if(!await this.shouldClose(T))return!1;return this.resources.splice(0,this.resources.length).reverse().forEach((T,R)=>{this.clearResourceOnClose(T),this._onDidEditorGroupTabOperation.fire({type:"close",resource:T,index:R})}),this.activeComponents.clear(),this.workbenchEditorService.editorGroups.length>1&&this.dispose(),this.previewURI=null,this.backToEmpty(),!0}async closeSaved(){const w=this.resources.filter(T=>{const R=this.resourceService.getResourceDecoration(T.uri);if(!R||!R.dirty)return!0});for(const T of w)if(!await this.shouldClose(T))return;for(const T of w)await this.close(T.uri)}async closeToRight(w){const T=this.resources.findIndex(R=>R.uri.toString()===w.toString());if(T!==-1){const R=this.resources.slice(T+1);for(const M of R)if(!await this.shouldClose(M))return;this.resources.splice(T+1),R.reverse().forEach((M,O)=>{this._onDidEditorGroupTabOperation.fire({type:"close",resource:M,index:T+1+(R.length-1-O)})});for(const M of R)this.clearResourceOnClose(M);this.open(w)}}clearResourceOnClose(w){this.eventBus.fire(new E.EditorGroupCloseEvent({group:this,resource:w})),this.removeResouceFromActiveComponents(w)}async closeOthers(w){const T=this.resources.findIndex(R=>R.uri.toString()===w.toString());if(T!==-1){const R=this.resources.filter((O,x)=>x!==T);for(const O of R)if(!await this.shouldClose(O))return;const M=this.resources;this.resources=[this.resources[T]],R.reverse().forEach(O=>{this._onDidEditorGroupTabOperation.fire({type:"close",resource:O,index:M.indexOf(O)})});for(const O of R)this.clearResourceOnClose(O);await this.open(w)}}get currentResource(){return this._currentResource}get currentOpenType(){return this._currentOpenType}async changeOpenType(w){const T=this.availableOpenTypes.find(M=>M.type===w||M.componentId===w);if(!T||!this.currentResource||D(T,this.currentOpenType))return;const R=this.currentOpenType;await this.displayResourceComponent(this.currentResource,{forceOpenType:T}),this.eventBus.fire(new E.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:R,oldResource:this.currentResource}))}async dropUri(w,T,R,M){if(T!==E.DragOverPosition.CENTER)await this.split((0,a.getSplitActionFromDragDrop)(T),w,{preview:!1,focus:!0});else if(!M)await this.open(w,{preview:!1,focus:!0});else{const O=this.resources.indexOf(M);if(O===-1)await this.open(w,{preview:!1,focus:!0});else{const x=this.resources.findIndex(k=>k.uri.toString()===w.toString());if(x===-1)await this.open(w,{index:O,preview:!1});else{const k=this.resources[x];x>O?(this.resources.splice(x,1),this.resources.splice(O,0,k),this._onDidEditorGroupTabOperation.fire({type:"move",resource:k,oldIndex:x,index:O}),await this.open(w,{preview:!1})):x<O&&(this.resources.splice(O+1,0,k),this.resources.splice(x,1),this._onDidEditorGroupTabOperation.fire({type:"move",resource:k,oldIndex:x,index:O}),await this.open(w,{preview:!1}))}}}R&&(R!==this?await R.close(w):T!==E.DragOverPosition.CENTER&&await this.close(w))}gainFocus(){this.workbenchEditorService.setCurrentGroup(this)}focus(){this.gainFocus(),this.currentOpenType&&this.currentOpenType.type===E.EditorOpenType.code&&this.codeEditor.focus(),this.currentOpenType&&this.currentOpenType.type===E.EditorOpenType.diff&&this.diffEditor.focus()}dispose(){var w;(w=this.grid)===null||w===void 0||w.dispose(),this.workbenchEditorService.removeGroup(this),super.dispose(),this.codeEditor&&this.codeEditor.dispose(),this.diffEditor&&this.diffEditor.dispose(),this.multiDiffEditor&&this.multiDiffEditor.dispose(),this.toDispose.forEach(T=>T.dispose()),this.eventBus.fire(new E.EditorGroupDisposeEvent({group:this}))}getState(){const w=this.resources.filter(y).map(T=>T.uri.toString());return{uris:w,current:this.currentResource&&y(this.currentResource)?this.currentResource.uri.toString():void 0,previewIndex:this.previewURI?w.indexOf(this.previewURI.toString()):-1}}isCodeEditorMode(){return!!this.currentOpenType&&this.currentOpenType.type===E.EditorOpenType.code}isDiffEditorMode(){return!!this.currentOpenType&&this.currentOpenType.type===E.EditorOpenType.diff}isMultiDiffEditorMode(){return!!this.currentOpenType&&this.currentOpenType.type===E.EditorOpenType.multiDiff}activeEditorIsDirty(){return this.hasDirty()&&this.workbenchEditorService.currentEditorGroup===this}isComponentMode(){return!!this.currentOpenType&&this.currentOpenType.type===E.EditorOpenType.component}async restoreState(w){this._restoringState=!0,this.previewURI=w.uris[w.previewIndex]?new v.URI(w.uris[w.previewIndex]):null;for(const R of w.uris)await this.doOpen(new v.URI(R),{disableNavigate:!0,backend:!0,preview:!1,deletedPolicy:"skip"});let T;w.current?T=new v.URI(w.current):w.uris.length>0&&(T=new v.URI(w.uris[w.uris.length-1])),T&&(await this.open(T,{deletedPolicy:"skip"})||this.resources[0]&&await this.open(this.resources[0].uri)),this._restoringState=!1,this.notifyTabChanged()}async saveAll(w,T){for(const R of this.resources)!w&&R.uri.scheme===v.Schemes.untitled||await this.saveResource(R,T)}async saveResource(w,T=a.SaveReason.Manual){if(await this.saveByOpenType(w,T))return;const R=this.documentModelManager.getModelReference(w.uri);R&&(await R.instance.save(void 0,T),R.dispose())}async saveByOpenType(w,T){const R=this.cachedResourcesActiveOpenTypes.get(w.uri.toString());if(R&&R.saveResource)try{return await R.saveResource(w,T),!0}catch(M){this.logger.error(M)}return!1}async saveCurrent(w=a.SaveReason.Manual){const T=this.currentResource;if(T&&!await this.saveByOpenType(T,w)&&this.currentEditor)return this.currentEditor.save()}hasDirty(){for(const w of this.resources){const T=this.documentModelManager.getModelDescription(w.uri);if(T&&T.dirty)return!0}return!1}calcDirtyCount(w=new Set){let T=0;for(const R of this.resources){const M=this.documentModelManager.getModelDescription(R.uri,"calc-dirty-count");w.has(R.uri.toString())||(w.add(R.uri.toString()),M&&M.dirty&&(T+=1))}return T}componentUndo(){const w=this.currentOpenType;w?.undo&&w.undo(this.currentResource)}componentRedo(){const w=this.currentOpenType;w?.redo&&w.redo(this.currentResource)}toJSON(){return{name:this.name}}attachMultiDiffEditorDom(w){this._multiDiffEditorDomNodeAttached||(this._multiDiffEditorDomNode=w,this.multiDiffEditorDomReady.ready(),this._multiDiffEditorDomNodeAttached=!0)}createMultiDiffEditor(w){const T=this.collectionService.createMultiDiffEditor(w,{},{[o.ServiceNames.CONTEXT_KEY_SERVICE]:this.contextKeyService.contextKeyService});this.multiDiffEditor=T}async openMultiDiffEditor(w,T){this.multiDiffEditor||await this.multiDiffEditorDomReady.onceReady(()=>{var R;const M=document.createElement("div");(R=this._multiDiffEditorDomNode)===null||R===void 0||R.appendChild(M),this.createMultiDiffEditor(M)}),await this.multiDiffEditor.compareMultiple(this.multiDiffEditor,w,T)}};t.EditorGroup=A,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",a.EditorCollectionService)],A.prototype,"collectionService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",a.ResourceService)],A.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",E.EditorComponentRegistry)],A.prototype,"editorComponentRegistry",void 0),n.__decorate([(0,r.Autowired)(a.WorkbenchEditorService),n.__metadata("design:type",b)],A.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(h.IEditorDocumentModelService),n.__metadata("design:type",Object)],A.prototype,"documentModelManager",void 0),n.__decorate([(0,r.Autowired)(v.CommandService),n.__metadata("design:type",Object)],A.prototype,"commands",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],A.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.RecentFilesManager),n.__metadata("design:type",o.RecentFilesManager)],A.prototype,"recentFilesManager",void 0),n.__decorate([(0,r.Autowired)(s.IMessageService),n.__metadata("design:type",Object)],A.prototype,"messageService",void 0),n.__decorate([(0,r.Autowired)(v.IReporterService),n.__metadata("design:type",Object)],A.prototype,"reporterService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],A.prototype,"config",void 0),n.__decorate([(0,r.Autowired)(o.IOpenerService),n.__metadata("design:type",Object)],A.prototype,"openerService",void 0),n.__decorate([(0,r.Autowired)(v.ILogger),n.__metadata("design:type",Object)],A.prototype,"logger",void 0),n.__decorate([(0,v.OnEvent)(a.ResourceDecorationChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[a.ResourceDecorationChangeEvent]),n.__metadata("design:returntype",void 0)],A.prototype,"onResourceDecorationChangeEvent",null),n.__decorate([(0,v.OnEvent)(E.ResourceOpenTypeChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[E.ResourceOpenTypeChangedEvent]),n.__metadata("design:returntype",void 0)],A.prototype,"oResourceOpenTypeChangedEvent",null),n.__decorate([(0,v.OnEvent)(E.RegisterEditorComponentEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Promise)],A.prototype,"onRegisterEditorComponentEvent",null),t.EditorGroup=A=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Number])],A);function S(I,w,T,R,M){if(M)return I.find(O=>D(O,M))||I[0];if(w)return I.find(O=>D(O,w))||I[0];if(R){const O=I.find(x=>{const k=Object.keys(R).find(B=>(0,v.match)(B,T.uri.path.toString().toLowerCase())||(0,v.match)(B,T.uri.path.base.toLowerCase())),F=k&&R[k];if(!F)return!1;const L=`${v.CUSTOM_EDITOR_SCHEME}-${F}`;return x.componentId===L});if(O)return O}return I[0]}function D(I,w){return I.type===w.type&&(I.type!==E.EditorOpenType.component||I.componentId===w.componentId)}},94180:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabbarLeftExtraContentId=t.TabbarRightExtraContentId=void 0,t.TabbarRightExtraContentId="tabbar-right-extra-content",t.TabbarLeftExtraContentId="tabbar-left-extra-content"},93107:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDocPersistentCacheProvider=void 0,t.isDocContentCache=e,t.isDocChangesCache=n,t.parseCacheValueFrom=r,t.IDocPersistentCacheProvider=Symbol("IDocPersistentCacheProvider");function e(o){return o.hasOwnProperty("content")}function n(o){return o.hasOwnProperty("changeMatrix")}function r(o){const l=o.text,_=o.range.startLineNumber,v=o.range.startColumn,p=o.range.endLineNumber,m=o.range.endColumn;return[l,_,v,p,m]}},55113:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AUTO_SAVE_MODE=t.SaveReason=t.Direction=t.EditorGroupSplitAction=t.DragOverPosition=t.EditorOpenType=t.IEditorPriority=t.OverviewRulerLane=t.WorkbenchEditorService=t.DidApplyEditorDecorationFromProvider=t.DidChangeEditorGroupUriEvent=t.CollectionEditorsUpdateEvent=t.EditorCollectionService=t.EditorType=t.ShowLightbulbIconMode=void 0,t.getSimpleEditorOptions=b,t.isTextEditorViewState=A;const n=e(85608),r=e(76003),o=e(43718);var l=e(20868);Object.defineProperty(t,"ShowLightbulbIconMode",{enumerable:!0,get:function(){return l.ShowLightbulbIconMode}});var _;(function(S){S[S.CODE=0]="CODE",S[S.ORIGINAL_DIFF=1]="ORIGINAL_DIFF",S[S.MODIFIED_DIFF=2]="MODIFIED_DIFF",S.MERGE_EDITOR_DIFF="MERGE_EDITOR_DIFF"})(_||(t.EditorType=_={}));let v=class{};t.EditorCollectionService=v,t.EditorCollectionService=v=n.__decorate([(0,r.Injectable)()],v);class p extends o.BasicEvent{}t.CollectionEditorsUpdateEvent=p;class m extends o.BasicEvent{}t.DidChangeEditorGroupUriEvent=m;class s extends o.BasicEvent{}t.DidApplyEditorDecorationFromProvider=s;class g{}t.WorkbenchEditorService=g;var a;(function(S){S[S.Left=1]="Left",S[S.Center=2]="Center",S[S.Right=4]="Right",S[S.Full=7]="Full"})(a||(t.OverviewRulerLane=a={}));var h;(function(S){S.builtin="builtin",S.option="option",S.exclusive="exclusive",S.default="default"})(h||(t.IEditorPriority=h={}));var u;(function(S){S.code="code",S.diff="diff",S.mergeEditor="mergeEditor",S.component="component",S.multiDiff="multiDiff"})(u||(t.EditorOpenType=u={}));var c;(function(S){S.LEFT="left",S.RIGHT="right",S.TOP="top",S.BOTTOM="bottom",S.CENTER="center"})(c||(t.DragOverPosition=c={}));var E;(function(S){S[S.Top=1]="Top",S[S.Bottom=2]="Bottom",S[S.Left=3]="Left",S[S.Right=4]="Right"})(E||(t.EditorGroupSplitAction=E={}));var f;(function(S){S.UP="up",S.DOWN="down",S.LEFT="left",S.RIGHT="right"})(f||(t.Direction=f={}));var d;(function(S){S[S.Manual=1]="Manual",S[S.AfterDelay=2]="AfterDelay",S[S.FocusOut=3]="FocusOut"})(d||(t.SaveReason=d={}));var y;(function(S){S.OFF="off",S.AFTER_DELAY="afterDelay",S.EDITOR_FOCUS_CHANGE="editorFocusChange",S.WINDOWS_LOST_FOCUS="windowLostFocus"})(y||(t.AUTO_SAVE_MODE=y={}));function b(){return{fontSize:12,fontWeight:"normal",lineHeight:0,wordWrap:"on",overviewRulerLanes:0,glyphMargin:!1,lineNumbers:"off",folding:!1,selectOnLineNumbers:!1,hideCursorInOverviewRuler:!0,selectionHighlight:!1,scrollbar:{horizontal:"hidden"},lineDecorationsWidth:0,overviewRulerBorder:!1,scrollBeyondLastLine:!1,renderLineHighlight:"none",fixedOverflowWidgets:!0,acceptSuggestionOnEnter:"smart",minimap:{enabled:!1},guides:{highlightActiveIndentation:!1,indentation:!1,bracketPairs:!1}}}function A(S){const D=S;if(!D)return!1;const I=D;if(I.modified)return A(I.modified);const w=D;return!!(w.contributionsState&&w.viewState&&Array.isArray(w.cursorState))}},23418:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(94180),t),n.__exportStar(e(93107),t),n.__exportStar(e(55113),t),n.__exportStar(e(23950),t),n.__exportStar(e(27693),t),n.__exportStar(e(46225),t),n.__exportStar(e(4308),t),n.__exportStar(e(39467),t)},27693:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILanguageStatusService=void 0,t.ILanguageStatusService=Symbol("ILanguageStatusService")},23950:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticTag=t.DiagnosticSeverity=t.ILanguageService=void 0,t.asSeverity=l,t.asRelatedInformations=_,t.asRelatedInformation=v,t.asMonacoDiagnostics=p,t.asMonacoDiagnostic=m;const n=e(43718);t.ILanguageService=Symbol("ILanguageService");var r;(function(s){s[s.Error=1]="Error",s[s.Warning=2]="Warning",s[s.Information=3]="Information",s[s.Hint=4]="Hint"})(r||(t.DiagnosticSeverity=r={}));var o;(function(s){s[s.Unnecessary=1]="Unnecessary",s[s.Deprecated=2]="Deprecated"})(o||(t.DiagnosticTag=o={}));function l(s){return s===1?n.MarkerSeverity.Error:s===2?n.MarkerSeverity.Warning:s===3?n.MarkerSeverity.Info:n.MarkerSeverity.Hint}function _(s){if(s)return s.map(g=>v(g))}function v(s){return{resource:n.Uri.parse(s.location.uri),startLineNumber:s.location.range.start.line+1,startColumn:s.location.range.start.character+1,endLineNumber:s.location.range.end.line+1,endColumn:s.location.range.end.character+1,message:s.message}}function p(s){if(s)return s.map(g=>m(g))}function m(s){return{code:typeof s.code=="number"?s.code.toString():typeof s.code=="object"?{value:s.code.value.toString(),target:s.code.target}:s.code,severity:l(s.severity),message:s.message,source:s.source,startLineNumber:s.range.start.line+1,startColumn:s.range.start.character+1,endLineNumber:s.range.end.line+1,endColumn:s.range.end.character+1,relatedInformation:_(s.relatedInformation),tags:s.tags}}},64335:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiDiffEditorItem=t.IMultiDiffSourceResolverService=t.MULTI_DIFF_SCHEME=void 0,t.MULTI_DIFF_SCHEME="multi-diff-editor",t.IMultiDiffSourceResolverService=Symbol("IMultiDiffSourceResolverService");class e{constructor(r,o,l,_){if(this.originalUri=r,this.modifiedUri=o,this.goToFileUri=l,this.contextKeys=_,!r&&!o)throw new Error("Invalid arguments")}getKey(){var r,o;return JSON.stringify([(r=this.modifiedUri)===null||r===void 0?void 0:r.toString(),(o=this.originalUri)===null||o===void 0?void 0:o.toString()])}}t.MultiDiffEditorItem=e},46225:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notebookCellScheme=t.INotebookService=t.CellKind=t.NotebookCellsChangeType=void 0;var e;(function(r){r[r.ModelChange=1]="ModelChange",r[r.Move=2]="Move",r[r.ChangeCellLanguage=5]="ChangeCellLanguage",r[r.Initialize=6]="Initialize",r[r.ChangeCellMetadata=7]="ChangeCellMetadata",r[r.Output=8]="Output",r[r.OutputItem=9]="OutputItem",r[r.ChangeCellContent=10]="ChangeCellContent",r[r.ChangeDocumentMetadata=11]="ChangeDocumentMetadata",r[r.ChangeCellInternalMetadata=12]="ChangeCellInternalMetadata",r[r.ChangeCellMime=13]="ChangeCellMime",r[r.Unknown=100]="Unknown"})(e||(t.NotebookCellsChangeType=e={}));var n;(function(r){r[r.Markup=1]="Markup",r[r.Code=2]="Code"})(n||(t.CellKind=n={})),t.INotebookService=Symbol("INotebookService"),t.notebookCellScheme="vscode-notebook-cell"},4308:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AskSaveResult=t.DIFF_SCHEME=t.ResourceDecorationNeedChangeEvent=t.ResourceDecorationChangeEvent=t.ResourceRemoveEvent=t.ResourceDidUpdateEvent=t.ResourceNeedUpdateEvent=t.ResourceService=void 0,t.isDiffResource=m;const n=e(43718);class r{}t.ResourceService=r;class o extends n.BasicEvent{}t.ResourceNeedUpdateEvent=o;class l extends n.BasicEvent{}t.ResourceDidUpdateEvent=l;class _ extends n.BasicEvent{}t.ResourceRemoveEvent=_;class v extends n.BasicEvent{}t.ResourceDecorationChangeEvent=v;class p extends n.BasicEvent{}t.ResourceDecorationNeedChangeEvent=p,t.DIFF_SCHEME="diff";function m(g){return g.uri.scheme===t.DIFF_SCHEME}var s;(function(g){g[g.REVERT=1]="REVERT",g[g.SAVE=2]="SAVE",g[g.CANCEL=3]="CANCEL"})(s||(t.AskSaveResult=s={}))},39467:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSplitActionFromDragDrop=r;const n=e(55113);function r(o){return{[n.DragOverPosition.LEFT]:n.EditorGroupSplitAction.Left,[n.DragOverPosition.RIGHT]:n.EditorGroupSplitAction.Right,[n.DragOverPosition.BOTTOM]:n.EditorGroupSplitAction.Bottom,[n.DragOverPosition.TOP]:n.EditorGroupSplitAction.Top}[o]}},54414:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(23418),t)},32595:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExplorerContribution=t.EXPLORER_CONTAINER_ID=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(30144);Object.defineProperty(t,"EXPLORER_CONTAINER_ID",{enumerable:!0,get:function(){return l.EXPLORER_CONTAINER_ID}});const _=e(21634),v=e(68456),p=e(43718);let m=class{registerComponent(g){g.register("@opensumi/ide-explorer",[],{iconClass:(0,o.getIcon)("explorer"),title:(0,o.localize)("explorer.title"),priority:10,containerId:l.EXPLORER_CONTAINER_ID,activateKeyBinding:"ctrlcmd+shift+e"})}onStart(){this.extensionsSchemaService.appendExtensionPoint(["browserViews","properties"],{extensionPoint:l.EXPLORER_CONTAINER_ID,frameworkKind:["opensumi"],jsonSchema:{..._.browserViews.properties,description:(0,o.formatLocalize)("sumiContributes.browserViews.location.custom",(0,o.localize)("explorer.title"))}})}};t.ExplorerContribution=m,n.__decorate([(0,r.Autowired)(p.IExtensionsSchemaService),n.__metadata("design:type",Object)],m.prototype,"extensionsSchemaService",void 0),t.ExplorerContribution=m=n.__decorate([(0,o.Domain)(o.ClientAppContribution,v.ComponentContribution)],m)},59027:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExplorerModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(32595);let _=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[l.ExplorerContribution]}};t.ExplorerModule=_,t.ExplorerModule=_=n.__decorate([(0,r.Injectable)()],_)},18531:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExpressFileServerContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(32242),_=e(90242);let v=class{registerStaticResolver(m){m.registerStaticResourceProvider({scheme:o.Schemes.file,resolveStaticResource:s=>{const g=new o.URI(this.appConfig.staticServicePath||_.EXPRESS_SERVER_PATH),[a,h]=s.codeUri.path.split("?");return g.resolve(`assets${decodeURIComponent(a)}`).withQuery(h)},roots:[this.appConfig.staticServicePath||_.EXPRESS_SERVER_PATH]})}};t.ExpressFileServerContribution=v,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],v.prototype,"appConfig",void 0),t.ExpressFileServerContribution=v=n.__decorate([(0,o.Domain)(l.StaticResourceContribution)],v)},98885:(P,t,e)=>{"use strict";var n;n={value:!0},t.Q=void 0;const r=e(85608),o=e(76003),l=e(41869),_=e(18531);let v=class extends l.BrowserModule{constructor(){super(...arguments),this.providers=[_.ExpressFileServerContribution]}};t.Q=v,t.Q=v=r.__decorate([(0,o.Injectable)()],v)},90242:(P,t,e)=>{"use strict";var n=e(39907);Object.defineProperty(t,"__esModule",{value:!0}),t.ALLOW_MIME=t.EXPRESS_SERVER_PATH=t.EXPRESS_SERVER_PORT=void 0,t.EXPRESS_SERVER_PORT=8e3,t.EXPRESS_SERVER_PATH=n.env.STATIC_SERVER_PATH||`http://127.0.0.1:${t.EXPRESS_SERVER_PORT}/`,t.ALLOW_MIME={gif:"image/gif",jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",webp:"image/webp",svg:"image/svg+xml",ttf:"font/ttf",eot:"font/eot",otf:"font/otf",woff:"font/woff",woff2:"font/woff2",js:"application/javascript",css:"text/css",mp4:"video/mp4",ogg:"video/ogg",webm:"video/webm"}},21082:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENSION_SCHEME=t.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID=void 0;const n=e(30144);t.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID=n.EXTENSION_CONTAINER_ID,t.EXTENSION_SCHEME="extension"},6449:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionOverview=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),l=e(68974),_=e(95422),v=e(43718),p=e(93374),m=e(29150),s=n.__importDefault(e(40769));var g;(function(u){u.details="Details",u.changelog="ChangeLog",u.deps="Dependencies"})(g||(g={}));const a=[g.details,g.changelog,g.deps],h=({resource:u})=>{var c,E,f,d,y,b,A,S,D,I,w,T,R,M,O,x,k,F,L,B,U,W,j,Q,G;const Z=(0,_.useInjectable)(m.VSXExtensionServiceToken),[$,V]=(0,r.useState)(!0),[H,K]=(0,r.useState)(((c=u.metadata)===null||c===void 0?void 0:c.state)===m.InstallState.INSTALLED?4:0),[Y,X]=(0,r.useState)(g.details),[re,oe]=(0,r.useState)({}),he=(0,r.useCallback)(te=>{const fe=a[te];fe&&X(fe)},[]),me=(0,r.useCallback)(async()=>{var te;const fe=await Z.getRemoteRawExtension((te=u.metadata)===null||te===void 0?void 0:te.extensionId);if(fe){const Re=["readme","changelog"].map(Be=>{var De,_e;const Ne=(De=fe.files)===null||De===void 0?void 0:De[Be];return Ne?fetch(Ne).then(Te=>Te.text()):(_e=fe[Be])!==null&&_e!==void 0?_e:""}),[Pe,Oe]=await Promise.all(Re);oe({readme:Pe,changelog:Oe,downloadCount:fe.downloadCount})}V(!1)},[u]),q=(0,r.useCallback)(async()=>{var te;const fe=await Z.getLocalExtension((te=u.metadata)===null||te===void 0?void 0:te.extensionId);fe&&(K(1),Z.install(fe).finally(()=>{K(4)}))},[u]),Ae=(0,r.useCallback)(async()=>{var te;const fe=await Z.getLocalExtension((te=u.metadata)===null||te===void 0?void 0:te.extensionId);fe&&(K(2),Z.uninstall(fe).finally(()=>{K(3)}))},[u]);(0,r.useEffect)(()=>{me()},[u]);const ge=(0,r.useMemo)(()=>{var te,fe,Re;const Pe=[];if(((te=u.metadata)===null||te===void 0?void 0:te.state)!==m.InstallState.NOT_INSTALLED)if(H!==3)Pe.push(r.default.createElement(o.Button,{size:"small",key:"uninstall",onClick:Ae,disabled:H===2},(0,v.localize)(H===2?"marketplace.extension.uninstalling":"marketplace.extension.uninstall")));else return Pe.push(r.default.createElement(o.Button,{size:"small",key:"uninstalled",disabled:!0},(0,v.localize)("marketplace.extension.uninstalled"))),Pe;return((fe=u.metadata)===null||fe===void 0?void 0:fe.state)===m.InstallState.NOT_INSTALLED?H===4?Pe.push(r.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,v.localize)("marketplace.extension.installed"))):Pe.push(r.default.createElement(o.Button,{size:"small",key:"install",onClick:q,disabled:H!==0},(0,v.localize)(H===1?"marketplace.extension.installing":"marketplace.extension.install"))):((Re=u.metadata)===null||Re===void 0?void 0:Re.state)===m.InstallState.SHOULD_UPDATE?H===4?Pe.push(r.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,v.localize)("marketplace.extension.installed"))):Pe.push(r.default.createElement(o.Button,{size:"small",key:"update",onClick:q,disabled:H!==0},(0,v.localize)(H===1?"marketplace.extension.updating":"marketplace.extension.update"))):Pe.push(r.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,v.localize)("marketplace.extension.installed"))),Pe},[u,H]);return r.default.createElement("div",{className:s.default.extension_overview_container},r.default.createElement(l.Progress,{loading:$}),r.default.createElement("div",{className:s.default.extension_overview_header},!((E=u.metadata)===null||E===void 0)&&E.iconUrl?r.default.createElement("img",{src:(f=u.metadata)===null||f===void 0?void 0:f.iconUrl,alt:(0,v.replaceLocalizePlaceholder)((d=u.metadata)===null||d===void 0?void 0:d.displayName,(y=u.metadata)===null||y===void 0?void 0:y.extensionId)}):r.default.createElement("div",{className:s.default.default_icon},r.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("extension")})),r.default.createElement("div",{className:s.default.extension_detail},r.default.createElement("div",{className:s.default.extension_name},r.default.createElement("h1",null,r.default.createElement("a",{href:`${(b=u.metadata)===null||b===void 0?void 0:b.openVSXRegistry}/extension/${(A=u.metadata)===null||A===void 0?void 0:A.namespace.toLowerCase()}/${(S=u.metadata)===null||S===void 0?void 0:S.name.toLowerCase()}`,target:"_blank",rel:"noopener noreferrer"},(0,v.replaceLocalizePlaceholder)((D=u.metadata)===null||D===void 0?void 0:D.displayName,(I=u.metadata)===null||I===void 0?void 0:I.extensionId)||((w=u.metadata)===null||w===void 0?void 0:w.name))),r.default.createElement("span",{className:s.default.extension_id},((T=u.metadata)===null||T===void 0?void 0:T.namespace.toLowerCase())+"."+((R=u.metadata)===null||R===void 0?void 0:R.name.toLowerCase()))),r.default.createElement("div",{className:s.default.manifest},r.default.createElement("span",null,r.default.createElement("a",{href:(M=u.metadata)===null||M===void 0?void 0:M.namespaceUrl,target:"_blank",rel:"noopener noreferrer"},(O=u.metadata)===null||O===void 0?void 0:O.namespace)),r.default.createElement("span",null,r.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("download")}),((x=u.metadata)===null||x===void 0?void 0:x.downloadCount)||re.downloadCount),((k=u.metadata)===null||k===void 0?void 0:k.averageRating)&&r.default.createElement("span",null,(F=u.metadata)===null||F===void 0?void 0:F.averageRating),((L=u.metadata)===null||L===void 0?void 0:L.repository)&&r.default.createElement("span",null,r.default.createElement("a",{href:(B=u.metadata)===null||B===void 0?void 0:B.repository,target:"blank"},"Repository")),((U=u.metadata)===null||U===void 0?void 0:U.license)&&r.default.createElement("span",null,r.default.createElement("a",{href:(W=u.metadata)===null||W===void 0?void 0:W.files.license,target:"blank"},"License")),r.default.createElement("span",null,"v",(j=u.metadata)===null||j===void 0?void 0:j.version)),r.default.createElement("div",{className:s.default.description},(0,v.replaceLocalizePlaceholder)((Q=u.metadata)===null||Q===void 0?void 0:Q.description,(G=u.metadata)===null||G===void 0?void 0:G.extensionId)),r.default.createElement("div",{className:s.default.buttons},ge))),r.default.createElement("div",{className:s.default.extension_overview_body},r.default.createElement(o.Tabs,{className:s.default.tabs,value:Y,onChange:he,tabs:[g.details,g.changelog]}),r.default.createElement("div",{className:s.default.extension_content},Y===g.details&&re.readme&&r.default.createElement(p.Markdown,{content:re.readme}),Y===g.changelog&&re.changelog&&r.default.createElement(p.Markdown,{content:re.changelog}))))};t.ExtensionOverview=h},87791:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extension=t.ExtensionViewType=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),l=e(41869),_=e(43718),v=e(29150),p=n.__importDefault(e(90425));var m;(function(s){s[s.MARKETPLACE=0]="MARKETPLACE",s[s.INSTALLED=1]="INSTALLED"})(m||(t.ExtensionViewType=m={})),t.Extension=r.default.memo(({extension:s,onInstall:g,onClick:a,type:h,installedExtensions:u,openVSXRegistry:c})=>{const E=(0,l.useDesignStyles)(p.default.extension_item,"extension_item"),[f,d]=(0,r.useState)(),y=u?.find(T=>T.namespace===s.namespace&&T.name===s.name),b=!!(h===m.INSTALLED||y),A=b&&h===m.MARKETPLACE&&y?.version!==s.version,[S,D]=(0,r.useState)(b),I=(0,r.useCallback)(T=>{T.stopPropagation(),d(!0),g(s).then(()=>{d(!1),D(!0)})},[s]),w=(0,r.useCallback)(()=>{a(s,S?A?v.InstallState.SHOULD_UPDATE:v.InstallState.INSTALLED:v.InstallState.NOT_INSTALLED)},[s]);return r.default.createElement("div",{className:E,onClick:w},s.iconUrl?r.default.createElement("img",{className:p.default.icon,src:s.iconUrl,alt:(0,_.replaceLocalizePlaceholder)(s.displayName,`${s.publisher}.${s.name}`)}):r.default.createElement("div",{className:p.default.default_icon},r.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("extension")})),r.default.createElement("div",{className:p.default.extension_detail},r.default.createElement("div",{className:p.default.base_info},r.default.createElement("span",{className:p.default.display_name},(0,_.replaceLocalizePlaceholder)(s.displayName,`${s.publisher}.${s.name}`)||s.name),r.default.createElement("span",{className:p.default.version},s.version),!S&&r.default.createElement("span",{className:p.default.download_count},r.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("download")}),s.downloadCount)),r.default.createElement("span",{className:p.default.description},(0,_.replaceLocalizePlaceholder)(s.description,`${s.publisher}.${s.name}`)),r.default.createElement("div",{className:p.default.footer},r.default.createElement("span",{className:p.default.namespace},s.namespace),h===m.MARKETPLACE&&(b?A?r.default.createElement(o.Button,{type:"primary",size:"small",onClick:I,disabled:f},(0,_.localize)(f?"marketplace.extension.updating":"marketplace.extension.update")):r.default.createElement("span",{className:p.default.state_text},(0,_.localize)("marketplace.extension.installed")):r.default.createElement(o.Button,{type:"primary",size:"small",onClick:I,disabled:f},(0,_.localize)(f?"marketplace.extension.installing":"marketplace.extension.install"))),h===m.INSTALLED&&r.default.createElement(o.Button,{type:"primary",size:"small",onClick:I,disabled:!0},(0,_.localize)("marketplace.extension.installed")))))})},38105:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenVsxExtensionManagerModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(29150),_=e(70274),v=e(67761);let p=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[_.VSXExtensionContribution,{token:l.VSXExtensionServiceToken,useClass:v.VSXExtensionService}],this.backServices=[{servicePath:l.VSXExtensionServicePath}]}};t.OpenVsxExtensionManagerModule=p,t.OpenVsxExtensionManagerModule=p=n.__decorate([(0,r.Injectable)()],p)},70274:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VSXExtensionContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),_=e(57517),v=e(63067),p=e(52416),m=e(29150),s=e(21082),g=e(6449),a=e(73689);let h=class{initialize(){}onDidRender(){const c=this.mainLayoutService.getTabbarHandler(s.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID);c&&(c.isActivated()?this.vsxExtensionService.getOpenVSXRegistry().then(()=>{this.vsxExtensionService.search("")}):c.onActivate(async()=>{!this.vsxExtensionService.openVSXRegistry&&await this.vsxExtensionService.getOpenVSXRegistry(),this.vsxExtensionService.search("")}))}registerResource(c){c.registerResourceProvider({scheme:s.EXTENSION_SCHEME,provideResource:async E=>{const{extensionId:f,state:d}=E.getParsedQuery(),y=await this.vsxExtensionService.getLocalExtension(f),b=this.iconService.fromIcon("",y?.iconUrl,p.IconType.Background);return{uri:E,metadata:{...y,extensionId:f,state:d,openVSXRegistry:this.vsxExtensionService.openVSXRegistry},icon:b||(0,o.getIcon)("extension"),name:(0,l.replaceLocalizePlaceholder)(y?.displayName,f)||""}}})}registerEditorComponent(c){const E=`${s.EXTENSION_SCHEME}_detail`;c.registerEditorComponent({component:g.ExtensionOverview,uid:E,scheme:s.EXTENSION_SCHEME}),c.registerEditorComponentResolver(s.EXTENSION_SCHEME,(f,d,y)=>{y?.([{type:_.EditorOpenType.component,componentId:E}])})}registerComponent(c){c.register("@opensumi/ide-extension-manager",[],{iconClass:(0,o.getIcon)("extension"),title:(0,l.localize)("marketplace.extension.container"),priority:5,containerId:s.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID,component:a.VSXExtensionView,activateKeyBinding:"ctrlcmd+shift+x"})}};t.VSXExtensionContribution=h,n.__decorate([(0,r.Autowired)(v.IMainLayoutService),n.__metadata("design:type",Object)],h.prototype,"mainLayoutService",void 0),n.__decorate([(0,r.Autowired)(m.VSXExtensionServiceToken),n.__metadata("design:type",Object)],h.prototype,"vsxExtensionService",void 0),n.__decorate([(0,r.Autowired)(p.IIconService),n.__metadata("design:type",Object)],h.prototype,"iconService",void 0),t.VSXExtensionContribution=h=n.__decorate([(0,l.Domain)(o.ClientAppContribution,v.MainLayoutContribution,o.ComponentContribution,_.BrowserEditorContribution)],h)},67761:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VSXExtensionService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(57517),_=e(98453),v=e(71354),p=e(28423),m=e(52416),s=e(12456),g=e(29150);let a=class extends o.Disposable{get extensions(){return this.extensionsObservable.get()}get installedExtensions(){return this.installedExtensionsObservable.get()}get openVSXRegistry(){return this.openVSXRegistryObservable.get()}constructor(){super(),this.extensionsObservable=(0,p.observableValue)(this,[]),this.installedExtensionsObservable=(0,p.observableValue)(this,[]),this.openVSXRegistryObservable=(0,p.observableValue)(this,""),this.tasks=new Map,this.getInstalledExtensions(),this.disposables.push(this.extensionInstanceService.onDidChange(()=>{this.getInstalledExtensions(),this.search(this.searchValue)}))}updateStatusBar(){if(this.tasks.size===0){this.installStatus&&(this.installStatus.dispose(),this.installStatus=void 0);return}const u="sumi-upload-file-status";if(this.tasks.size===1){const c=(0,o.localize)("marketplace.extension.installing"),E={text:c,alignment:o.StatusBarAlignment.RIGHT,tooltip:c,iconClass:"kaitian-icon kticon-cloud-server"};this.installStatus=this.statusBarService.addElement(u,E)}}async install(u){var c,E;const f=this.getExtensionId(u);if(this.tasks.has(f)||!u.downloadUrl)return;const d=this.backService.install({id:f,name:(c=u.name)!==null&&c!==void 0?c:"-",url:u.downloadUrl,version:(E=u.version)!==null&&E!==void 0?E:"-"});return this.tasks.set(f,d),this.updateStatusBar(),d.then(async y=>{if(this.tasks.delete(f),this.updateStatusBar(),await this.extensionManagementService.postChangedExtension(!1,y),this.themeService.getAvailableThemeInfos().some(D=>D.extensionId===u.originId)){this.commandService.executeCommand(s.THEME_TOGGLE_COMMAND.id,{extensionId:u.originId});return}if(this.iconService.getAvailableThemeInfos().some(D=>D.extensionId===u.originId)){this.commandService.executeCommand(s.ICON_THEME_TOGGLE_COMMAND.id,{extensionId:u.originId});return}if(this.productIconService.getAvailableThemeInfos().some(D=>D.extensionId===u.originId)){this.commandService.executeCommand(s.PRODUCT_ICON_THEME_TOGGLE_COMMAND.id,{extensionId:u.originId});return}})}async uninstall(u){u&&u.path&&await this.extensionManagementService.postUninstallExtension(u.path)}async disable(u){u&&u.path&&this.extensionManagementService.postDisableExtension(u.path)}async enable(u){u&&u.path&&this.extensionManagementService.postEnableExtension(u.path)}getExtensionId(u){var c,E,f;return(c=u?.extensionId)!==null&&c!==void 0?c:((E=u?.namespace)===null||E===void 0?void 0:E.toLowerCase())+"."+((f=u?.name)===null||f===void 0?void 0:f.toLowerCase())}async getLocalExtension(u){return u?this.extensions.find(E=>this.getExtensionId(E)===u)||this.installedExtensions.find(E=>this.getExtensionId(E)===u):void 0}async getRemoteRawExtension(u){if(!u)return;const c={extensionId:u},E=await this.backService.getExtension(c);if(E&&E.extensions&&E.extensions.length>=1)return Object.assign({},E.extensions[0])}async getOpenVSXRegistry(){const u=await this.backService.getOpenVSXRegistry();(0,p.transaction)(c=>{this.openVSXRegistryObservable.set(u,c)})}async openExtensionEditor(u,c){this.workbenchEditorService.open(new o.URI(`extension://?extensionId=${u}&state=${c}`),{preview:!0})}async search(u){const c={query:u,size:50,sortBy:"downloadCount"};this.searchValue=u;const E=await this.backService.search(c);E.extensions&&(0,p.transaction)(f=>{this.extensionsObservable.set(E.extensions.filter(d=>!this.installedExtensions.find(y=>this.getExtensionId(y)===this.getExtensionId(d))).map(d=>({...d,publisher:d.namespace,iconUrl:d.files.icon,downloadUrl:d.files.download,readme:d.files.readme})),f)})}async searchInstalledExtensions(u){(0,p.transaction)(c=>{const E=this.installedExtensions;this.installedExtensionsObservable.set(E.sort((f,d)=>{const y=(0,o.fuzzyScore)(u,u.toLowerCase(),0,f.name,f.name.toLowerCase(),0,!0),b=(0,o.fuzzyScore)(u,u.toLowerCase(),0,d.name,d.name.toLowerCase(),0,!0);return y?b?b[0]-y[0]:-1:1}),c)})}getInstalledExtensions(){const u=this.extensionInstanceService.getExtensionInstances().map(c=>{const E=c.extensionId;return{namespace:E&&E.includes(".")?E.split(".")[0]:c.packageJSON.publisher,name:c.packageJSON.name,id:c.extensionId,version:c.packageJSON.version,displayName:c.packageJSON.displayName,description:c.packageJSON.description,publisher:c.packageJSON.publisher,iconUrl:c.packageJSON.icon&&c.extensionLocation.toString()+`/${c.packageJSON.icon}`,path:c.path,realpath:c.realPath}});(0,p.transaction)(c=>{this.installedExtensionsObservable.set(u,c)})}};t.VSXExtensionService=a,n.__decorate([(0,r.Autowired)(g.VSXExtensionServicePath),n.__metadata("design:type",Object)],a.prototype,"backService",void 0),n.__decorate([(0,r.Autowired)(l.WorkbenchEditorService),n.__metadata("design:type",l.WorkbenchEditorService)],a.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(v.AbstractExtInstanceManagementService),n.__metadata("design:type",v.AbstractExtInstanceManagementService)],a.prototype,"extensionInstanceService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",_.ExtensionManagementService)],a.prototype,"extensionManagementService",void 0),n.__decorate([(0,r.Autowired)(m.IThemeService),n.__metadata("design:type",Object)],a.prototype,"themeService",void 0),n.__decorate([(0,r.Autowired)(m.IIconService),n.__metadata("design:type",Object)],a.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(m.IProductIconService),n.__metadata("design:type",Object)],a.prototype,"productIconService",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],a.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.IStatusBarService),n.__metadata("design:type",Object)],a.prototype,"statusBarService",void 0),n.__decorate([(0,o.pMemoize)(h=>h),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[String]),n.__metadata("design:returntype",Promise)],a.prototype,"search",null),t.VSXExtensionService=a=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],a)},73689:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VSXExtensionView=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=n.__importStar(e(14041)),l=e(14041),_=e(97267),v=e(41869),p=e(68974),m=e(43718),s=e(5567),g=e(29150),a=e(21082),h=e(87791),u=n.__importDefault(e(68143)),c=[g.TabActiveKey.MARKETPLACE,g.TabActiveKey.INSTALLED],E=()=>{const[f,d]=(0,l.useState)(g.TabActiveKey.MARKETPLACE),[y,b]=(0,l.useState)(!1),A=(0,v.useInjectable)(g.VSXExtensionServiceToken),S=(0,v.useAutorun)(A.extensionsObservable),D=(0,v.useAutorun)(A.installedExtensionsObservable),I=(0,v.useAutorun)(A.openVSXRegistryObservable),w=(0,r.default)(O=>{b(!0);let x;f===g.TabActiveKey.MARKETPLACE?x=A.search(O):x=A.searchInstalledExtensions(O),typeof x=="object"&&x.then&&x.then(()=>{b(!1)})},500),T=(0,l.useCallback)(O=>A.install(O),[]),R=(0,l.useCallback)((O,x)=>{const k=A.getExtensionId(O);A.openExtensionEditor(k,x)},[]),M=(0,l.useCallback)(O=>{const x=c[O];x&&d(x)},[]);return o.createElement("div",{className:u.default.panel},o.createElement(_.Tabs,{mini:!0,className:u.default.tabs,value:c.indexOf(f),onChange:M,tabs:[(0,m.localize)("marketplace.panel.tab.marketplace"),(0,m.localize)("marketplace.tab.installed")]}),o.createElement("div",{style:{padding:"8px"}},o.createElement(s.AutoFocusedInput,{containerId:a.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID,placeholder:(0,m.localize)("marketplace.panel.tab.placeholder.search"),value:"",onChange:O=>w(O.target.value)})),f===g.TabActiveKey.MARKETPLACE&&o.createElement("div",{className:u.default.extensions_view},o.createElement(p.Progress,{loading:y}),S.map((O,x)=>o.createElement(h.Extension,{key:`${x}:${O.namespace}-${O.name}`,onClick:R,onInstall:T,extension:O,type:h.ExtensionViewType.MARKETPLACE,installedExtensions:D,openVSXRegistry:I}))),f===g.TabActiveKey.INSTALLED&&o.createElement("div",{className:u.default.extensions_view},D.map((O,x)=>o.createElement(h.Extension,{key:`${x}:${O.namespace}-${O.name}`,onClick:R,onInstall:T,extension:O,type:h.ExtensionViewType.INSTALLED,openVSXRegistry:I}))))};t.VSXExtensionView=E},29150:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IOpenvsxMarketplaceService=t.VSXExtensionServicePath=t.VSXExtensionServiceToken=t.VSXExtension=t.InstallState=t.TabActiveKey=t.EnableScope=void 0;var e;(function(l){l.GLOBAL="GLOBAL",l.WORKSPACE="WORKSPACE"})(e||(t.EnableScope=e={}));var n;(function(l){l.MARKETPLACE="marketplace",l.INSTALLED="installed"})(n||(t.TabActiveKey=n={}));var r;(function(l){l.INSTALLED="INSTALLED",l.NOT_INSTALLED="NOT_INSTALLED",l.SHOULD_UPDATE="SHOULD_UPDATE"})(r||(t.InstallState=r={}));class o{}t.VSXExtension=o,o.KEYS=new Set(["version","iconUrl","publisher","name","displayName","description","averageRating","downloadCount","downloadUrl","readmeUrl","licenseUrl","repository","license","readme","preview","namespaceAccess","publishedBy"]),t.VSXExtensionServiceToken=Symbol("VSXExtensionSerivceToken"),t.VSXExtensionServicePath="VSXExtensionServicePath",t.IOpenvsxMarketplaceService=Symbol("IOpenvsxMarketplaceService")},53599:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionStorageContribution=t.ExtensionStorageModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93584),_=e(7446),v=e(16132),p=e(10207),m=e(19227);let s=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:l.IExtensionStorageService,useClass:p.ExtensionStorageService},{token:l.IExtensionStoragePathServer,useClass:v.ExtensionStoragePathServer},{token:l.IExtensionStorageServer,useClass:_.ExtensionStorageServer},g]}};t.ExtensionStorageModule=s,t.ExtensionStorageModule=s=n.__decorate([(0,o.Domain)(m.name)],s);let g=class{onReconnect(){this.extensionStorageService.reConnectInit()}};t.ExtensionStorageContribution=g,n.__decorate([(0,r.Autowired)(l.IExtensionStorageService),n.__metadata("design:type",Object)],g.prototype,"extensionStorageService",void 0),t.ExtensionStorageContribution=g=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],g),n.__exportStar(e(10207),t)},16132:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionStoragePathServer=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),_=e(96405),v=e(14951),p=e(73344),m=e(51500),{Path:s}=l.path;let g=class{constructor(){this.windowsDataFolders=[l.StoragePaths.WINDOWS_APP_DATA_DIR,l.StoragePaths.WINDOWS_ROAMING_DIR],this.deferredWorkspaceStoragePath=new l.Deferred,this.deferredStoragePath=new l.Deferred,this.storagePathInitialized=!1}get workspaceSuffixName(){return this.appConfig.workspaceSuffixName||m.DEFAULT_WORKSPACE_SUFFIX_NAME}async provideHostLogPath(){const h=await this.getLogsDirPath();if(!h)throw new Error("Unable to get parent log directory");const u=h,c=l.URI.file(u).toString();return await this.fileSystem.access(c)||await this.fileSystem.createFolder(c),new l.URI(h)}async provideHostStoragePath(h,u,c){const E=await this.getWorkspaceStorageDirPath(c);if(!E)throw new Error("Unable to get parent storage directory");await this.fileSystem.access(l.URI.file(E).toString())||await this.fileSystem.createFolder(l.URI.file(E).toString());const f=await this.buildWorkspaceId(h,u,c),d=new s(E).join(f).toString();await this.fileSystem.access(l.URI.file(d).toString())||await this.fileSystem.createFolder(l.URI.file(d).toString());const y=new l.URI(d);return this.storagePathInitialized||(this.deferredWorkspaceStoragePath.resolve(y.path.toString()),this.deferredStoragePath.resolve(E),this.storagePathInitialized=!0),this.cachedStoragePath=y}async getLastWorkspaceStoragePath(){var h;return this.storagePathInitialized?(h=this.cachedStoragePath)===null||h===void 0?void 0:h.path.toString():this.deferredWorkspaceStoragePath.promise}async getLastStoragePath(){return this.deferredStoragePath.promise}doHash(h){return this.hashCalculateService.calculate(h)}async buildWorkspaceId(h,u,c){const E=await this.getUserHomeDir(),f=b=>b.resolve(c||m.WORKSPACE_USER_STORAGE_FOLDER_NAME).resolve(`${m.UNTITLED_WORKSPACE}.${this.workspaceSuffixName}`).withScheme(l.Schemes.file),d=b=>b.resolve(c||m.WORKSPACE_USER_STORAGE_FOLDER_NAME).resolve(`${m.UNTITLED_WORKSPACE}`).withScheme(l.Schemes.file);if(!h){const b=d(new l.URI(E));return this.doHash(b.toString())}if(f(new l.URI(E)).toString()===h.uri){const b=u.map(A=>A.uri).sort().join(",");return this.doHash(b)}else{const b=new l.URI(h.uri);return this.doHash(b.toString())}}async getLogsDirPath(){const h=await this.loggerManager.getLogFolder();return new s(h).join(l.StoragePaths.EXTENSIONS_LOGS_DIR).toString()}async getWorkspaceStorageDirPath(h){const u=await this.getWorkspaceDataDirPath(h);return new s(u).join(l.StoragePaths.EXTENSIONS_WORKSPACE_STORAGE_DIR).toString()}async getWorkspaceDataDirPath(h){const u=await this.getUserHomeDir(),c=h;return new s(u).join(...l.isWindows?this.windowsDataFolders:[""],c).toString()}async getUserHomeDir(){const h=await this.fileSystem.getCurrentUserHome();if(!h)throw new Error("Unable to get user home directory");return await this.fileSystem.getFsPath(h.uri)}};t.ExtensionStoragePathServer=g,n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],g.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(p.ILoggerManagerClient),n.__metadata("design:type",Object)],g.prototype,"loggerManager",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(_.IHashCalculateService),n.__metadata("design:type",Object)],g.prototype,"hashCalculateService",void 0),t.ExtensionStoragePathServer=g=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],g)},7446:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionStorageServer=void 0;const r=e(85608),o=e(76003),l=e(43718),_=e(14951),v=e(93584),{Path:p}=l.path;let m=n=class{constructor(){this.deferredWorkspaceDataDirPath=new l.Deferred,this.storageThrottler=new l.Throttler,this.storageTasks={},this.storageExistPromises=new Map}async init(g,a,h){return this.storageDelayer=new l.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),await this.setupDirectories(g,a,h||v.DEFAULT_EXTENSION_STORAGE_DIR_NAME)}async asAccess(g,a){if(a)return await this.fileSystem.access(g);if(!this.storageExistPromises.has(g)){const h=this.fileSystem.access(g);this.storageExistPromises.set(g,h)}return await this.storageExistPromises.get(g)}async setupDirectories(g,a,h){const u=await this.extensionStoragePathsServer.getWorkspaceDataDirPath(h),c=l.URI.file(u).toString();await this.fileSystem.access(c)||await this.fileSystem.createFolder(c),this.workspaceDataDirPath=u,this.globalDataPath=new p(this.workspaceDataDirPath).join(l.StoragePaths.EXTENSIONS_GLOBAL_STORAGE_DIR).toString();const E=l.URI.file(this.globalDataPath).toString();await this.fileSystem.access(E)||await this.fileSystem.createFolder(E),this.deferredWorkspaceDataDirPath.resolve(this.workspaceDataDirPath);const f=await this.extensionStoragePathsServer.provideHostLogPath(),d=await this.extensionStoragePathsServer.provideHostStoragePath(g,a,h);return{logUri:f.codeUri,storageUri:d.codeUri,globalStorageUri:l.Uri.file(this.globalDataPath)}}async resolveStorageTask(g){const a=Object.keys(g);for(const h of a){const u=await this.readFromFile(h);for(const{key:c,value:E}of g[h])E===void 0||(0,l.isEmptyObject)(E)?delete u[c]:u[c]=E;await this.writeToFile(h,u)}}doSet(){const g={...this.storageTasks};return this.storageTasks={},this.resolveStorageTask(g)}async set(g,a,h){const u=await this.getDataPath(h);if(!u)throw new Error("Cannot save data: no opened workspace");return this.storageTasks[u]||(this.storageTasks[u]=[]),this.storageTasks[u].push({key:g,value:a}),this.storageDelayer.trigger(()=>this.storageThrottler.queue(this.doSet.bind(this)))}async get(g,a){const h=await this.getDataPath(a);return h?(await this.readFromFile(h))[g]:{}}async getAll(g){const a=await this.getDataPath(g);return a?await this.readFromFile(a):{}}async getDataPath(g){if(this.workspaceDataDirPath===void 0&&await this.deferredWorkspaceDataDirPath.promise,g)return new p(this.globalDataPath).join("global-state.json").toString();{const a=await this.extensionStoragePathsServer.getLastWorkspaceStoragePath();return a?new p(a).join("workspace-state.json").toString():void 0}}async readFromFile(g){const a=l.URI.file(g);if(!await this.asAccess(a.toString(),!0))return{};try{const{content:u}=await this.fileSystem.readFile(a.toString());return JSON.parse(u.toString())}catch(u){return this.logger.error('Failed to parse data from "',a.toString(),'". Reason:',u),{}}}async writeToFile(g,a){const h=l.URI.file(g);await this.asAccess(h.parent.toString())||await this.fileSystem.createFolder(h.parent.toString());const c=JSON.stringify(a);let E=await this.fileSystem.getFileStat(h.toString());E||(E=await this.fileSystem.createFile(h.toString())),await this.fileSystem.setContent(E,c)}};t.ExtensionStorageServer=m,m.DEFAULT_FLUSH_DELAY=100,r.__decorate([(0,o.Autowired)(v.IExtensionStoragePathServer),r.__metadata("design:type",Object)],m.prototype,"extensionStoragePathsServer",void 0),r.__decorate([(0,o.Autowired)(_.IFileServiceClient),r.__metadata("design:type",Object)],m.prototype,"fileSystem",void 0),r.__decorate([(0,o.Autowired)(l.ILogger),r.__metadata("design:type",Object)],m.prototype,"logger",void 0),t.ExtensionStorageServer=m=n=r.__decorate([(0,o.Injectable)()],m)},10207:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionStorageService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),_=e(51500),v=e(93584);let p=class{constructor(){this._init=this.init(),this.updateEnvState()}get whenReady(){return this._init}get extensionStoragePath(){return this._extensionStoragePath}async init(){const s=await this.workspaceService.roots,g=this.workspaceService.workspace,a=this.appConfig.extensionStorageDirName||v.DEFAULT_EXTENSION_STORAGE_DIR_NAME;return this._extensionStoragePath=await this.extensionStorageServer.init(g,s,a),this._extensionStoragePath}async updateEnvState(){await this.get(l.firstSessionDateStorageKey,!0)===void 0&&await this.set(l.firstSessionDateStorageKey,{date:new Date().toUTCString()},!0)}set(s,g,a){return this.extensionStorageServer.set(s,g,a)}get(s,g){return this.extensionStorageServer.get(s,g)}getAll(s=!1){return this.extensionStorageServer.getAll(s)}async reConnectInit(){const s=await this.workspaceService.roots,g=this.workspaceService.workspace,a=this.appConfig.extensionStorageDirName||v.DEFAULT_EXTENSION_STORAGE_DIR_NAME;return this._extensionStoragePath=await this.extensionStorageServer.init(g,s,a),this._extensionStoragePath}};t.ExtensionStorageService=p,n.__decorate([(0,r.Autowired)(v.IExtensionStorageServer),n.__metadata("design:type",Object)],p.prototype,"extensionStorageServer",void 0),n.__decorate([(0,r.Autowired)(_.IWorkspaceService),n.__metadata("design:type",Object)],p.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),t.ExtensionStorageService=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p)},93584:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(85853),t),n.__exportStar(e(56969),t),n.__exportStar(e(23618),t)},85853:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_EXTENSION_STORAGE_DIR_NAME=t.IExtensionStoragePathServer=void 0,t.IExtensionStoragePathServer=Symbol("IExtensionStoragePathServer"),t.DEFAULT_EXTENSION_STORAGE_DIR_NAME=".sumi"},56969:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IExtensionStorageService=t.IExtensionStorageServer=void 0,t.IExtensionStorageServer=Symbol("ExtensionStorageServer"),t.IExtensionStorageService=Symbol("ExtensionStorageService")},23618:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},50492:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(93584),t)},57962:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActivationEventServiceImpl=void 0;const n=e(85608),r=n.__importDefault(e(80076)),o=e(76003),l=e(43718);let _=class{constructor(){this.eventListeners=new Map,this.collectTopicData=new l.MultiMap,this.wildCardTopics=new Set,this.activatedEventSet=new Set,this.wildCardTopics.add("workspaceContains")}getTopicsData(p){return this.collectTopicData.get(p)||[]}async fireEvent(p,m=""){this.activatedEventSet.add(JSON.stringify({topic:p,data:m}));let s;if(this.wildCardTopics.has(p)?s=this.eventListeners.get(p):this.eventListeners.has(p)?s=this.eventListeners.get(p):s=this.eventListeners.get(p+":"+m),s){const g=await Promise.allSettled(s.map(a=>this.tryRun(p,m,a)));for(const a of g)a.status==="rejected"&&this.logger.error(`fire event ${p}:${m} error: ${a.reason}`)}}addWildCardTopic(p){return this.wildCardTopics.add(p),{dispose:()=>{this.wildCardTopics.delete(p)}}}onEvent(p,m){const s=p.indexOf(":");let g,a;return s===-1?(g=p,a=""):(g=p.substr(0,s),a=p.substr(s+1)),this.addListener(g,{topic:g,data:a,execute:m})}addListener(p,m){if(this.collectTopicData.set(m.topic,m.data),this.wildCardTopics.has(p))return this.eventListeners.has(p)||this.eventListeners.set(p,[]),this.eventListeners.get(p).push(m),{dispose:()=>{const s=this.eventListeners.get(p).indexOf(m);s!==-1&&this.eventListeners.get(p).splice(s,1)}};{const s=p+":"+m.data;return this.eventListeners.has(s)||this.eventListeners.set(s,[]),this.eventListeners.get(s).push(m),{dispose:()=>{const g=this.eventListeners.get(s).indexOf(m);g!==-1&&this.eventListeners.get(s).splice(g,1)}}}}async tryRun(p,m,s){this.wildCardTopics.has(p)?(0,r.default)(s.data)(m)&&await s.execute():await s.execute()}};t.ActivationEventServiceImpl=_,n.__decorate([(0,o.Autowired)(l.ILogger),n.__metadata("design:type",Object)],_.prototype,"logger",void 0),t.ActivationEventServiceImpl=_=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],_)},63056:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionNoExportsView=t.ExtensionLoadingView=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),l=e(68974),_=n.__importDefault(e(17267)),v=({style:m})=>r.default.createElement("div",{style:m||{},className:_.default.kt_extension_view},r.default.createElement(l.Progress,{loading:!0}));t.ExtensionLoadingView=v;const p=(m,s)=>r.default.createElement("div",{className:_.default.kt_extension_no_exports_view},(0,o.formatLocalize)("extension.no.view.found",m,s));t.ExtensionNoExportsView=p},56405:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PortalRoot=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(41869),_=e(87420),v=e(25600),p=m=>{var s;const[g,a]=o.default.useState(null),h=(0,l.useInjectable)(v.AbstractViewExtProcessService),u=(0,l.useInjectable)(_.IThemeService);o.default.useEffect(()=>{const E=new l.DisposableCollection;return u.getCurrentTheme().then(f=>a(f.type)),E.push(u.onThemeChange(f=>{f.type&&f.type!==g&&a(f.type)})),E.dispose.bind(E)},[]);const c=m.original;return o.default.createElement(c,{...m.otherProps,className:(0,r.default)((s=m.otherProps)===null||s===void 0?void 0:s.className,(0,_.getThemeTypeSelector)(g)),getContainer:()=>h.getPortalShadowRoot(m.extensionId)})};t.PortalRoot=p},82443:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TREE_VIEW_NODE_HEIGHT=t.TreeViewNode=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),_=e(41869),v=e(25918),p=e(93899),m=e(95422),s=e(69589),g=e(42912),a=n.__importDefault(e(50790)),h=({item:u,onClick:c,onChange:E,onContextMenu:f,itemType:d,leftPadding:y=8,onTwistierClick:b,decorations:A,defaultLeftPadding:S=8,treeViewId:D,decorationService:I,draggable:w,onDragStart:T,onDragEnter:R,onDragLeave:M,onDragOver:O,onDrop:x})=>{const k=(0,m.useInjectable)(g.IIconService),F=(0,_.useDesignStyles)(a.default.expansion_toggle,"expansion_toggle"),L=(0,_.useDesignStyles)(a.default.tree_view_node,"tree_view_node"),[B,U]=(0,o.useState)(u.uri&&I.getDecoration(u.uri,!1));(0,o.useEffect)(()=>{const Be=I.onDidChangeDecorations(De=>{u.uri&&De.affectsResource(u.uri)&&U(I.getDecoration(u.uri,!1))});return()=>{Be.dispose()}},[]);const W=(0,m.useInjectable)(g.IThemeService),j=(0,o.useCallback)(Be=>{(d===l.TreeNodeType.TreeNode||d===l.TreeNodeType.CompositeTreeNode)&&c(Be,u,d)},[u,d,c]),Q=(0,o.useCallback)(Be=>{(d===l.TreeNodeType.TreeNode||d===l.TreeNodeType.CompositeTreeNode)&&(b?b(Be,u,d):c(Be,u,d))},[u,d,b,c]),G=(0,o.useCallback)(Be=>{Be.nativeEvent.which===0||!f||(d===l.TreeNodeType.TreeNode||d===l.TreeNodeType.CompositeTreeNode)&&f(Be,u,d)},[u,d,f]),Z=(0,o.useCallback)(Be=>{T&&T(Be,u)},[u,T]),$=(0,o.useCallback)(Be=>{R&&R(Be,u)},[u,R]),V=(0,o.useCallback)(Be=>{M&&M(Be,u)},[u,M]),H=(0,o.useCallback)(Be=>{O&&O(Be,u)},[u,O]),K=(0,o.useCallback)(Be=>{x&&x(Be,u)},[u,x]),Y=(0,o.useCallback)(Be=>{E(u),Be.stopPropagation()},[u,E]),X=d===l.TreeNodeType.CompositeTreeNode,re=X?`${S+(u.depth||0)*(y||0)}px`:`${S+(u.depth||0)*(y||0)+8}px`,oe={height:t.TREE_VIEW_NODE_HEIGHT,lineHeight:`${t.TREE_VIEW_NODE_HEIGHT}px`,paddingLeft:re},he=(Be,De)=>A&&A?.classlist.indexOf(a.default.mod_loading)>-1?o.default.createElement(l.Loading,null):o.default.createElement("div",{onClick:De,className:(0,r.default)(a.default.tree_view_node_segment,F,(0,_.getIcon)("arrow-right"),{[`${a.default.mod_collapsed}`]:!Be.expanded})}),me=Be=>o.default.createElement("div",{className:(0,r.default)(a.default.file_icon,Be.icon),style:{maxHeight:t.TREE_VIEW_NODE_HEIGHT}}),q=Be=>{var De;return Be.checkboxInfo===void 0?null:o.default.createElement(l.CheckBox,{"data-node-id":Be.treeItemId,readOnly:!0,onChange:_e=>Y(_e),checked:!!Be.checkboxInfo.checked,id:Be.treeItemId,role:(De=Be.checkboxInfo.accessibilityInformation)===null||De===void 0?void 0:De.role,title:Be.checkboxInfo.tooltip})},Ae=Be=>{const De=()=>{if(Be.highlights){let _e=[],Ne=0;const Te=Be.highlights.sort((We,pe)=>We[0]-pe[0]);return _e=Te.map((We,pe)=>{const[ie,le]=We,Se=Be.displayName.slice(Ne,ie);Ne=le;const ye=Be.displayName.slice(ie,le),Ue=[o.default.createElement("span",{key:`line_begin_${pe}_${Se}`},Se),o.default.createElement("span",{className:a.default.highlight,key:`line_hightlight_${pe}_${ye}`},ye)];if(pe===Te.length-1){const Ye=Be.displayName.slice(le);Ue.push(o.default.createElement("span",{key:`line_end_${pe}_${Ye}`},Ye))}return Ue}),_e}else return Be.displayName};return o.default.createElement("div",{className:(0,r.default)(a.default.tree_view_node_segment,a.default.tree_view_node_displayname,Be.strikethrough&&a.default.strikethrough)},De())},ge=()=>o.default.createElement("div",{className:(0,r.default)(a.default.tree_view_node_segment,a.default.tree_view_node_tail)},te()),te=()=>{if(u.actions.length>0)return o.default.createElement("div",{className:a.default.tree_view_actions},o.default.createElement(v.TitleActionList,{className:a.default.inlineMenu,context:[{treeViewId:D,treeItemId:u.treeItemId}],nav:u.actions,menuId:p.MenuId.ViewItemContext}))},fe=Be=>{if(X)return he(Be,Q)},Re=()=>u.tooltip||u.name,Pe=Be=>o.default.createElement("div",{className:(0,r.default)(a.default.tree_view_node_segment_grow,a.default.tree_view_node_description)},!Be.name&&!Be.description?"\u2014\u2014":Be.description),Oe=()=>{if(!B)return null;const Be=B.badge||"",De=B.color,_e=De&&W.getColor({id:De});return o.default.createElement("div",{className:a.default.tree_view_node_tail,style:{color:_e}},(0,s.transformLabelWithCodicon)(Be.slice(),{},k.fromString.bind(k)))};return o.default.createElement("div",{key:u.id,onClick:j,onContextMenu:G,onDragStart:Z,onDragOver:H,onDragEnter:$,onDragLeave:V,onDrop:K,title:Re(),className:(0,r.default)(L,A?A.classlist:null),"data-id":u.id,style:oe,draggable:w},o.default.createElement("div",{className:(0,r.default)(a.default.tree_view_node_content)},fe(u),q(u),me(u),o.default.createElement("div",{className:a.default.tree_view_node_overflow_wrap},Ae(u),Pe(u)),ge(),Oe()))};t.TreeViewNode=h,t.TREE_VIEW_NODE_HEIGHT=22},81302:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionTabBarTreeView=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),l=e(41869),_=e(68974),v=e(41893),p=e(24429),m=e(72260),s=e(82443),g=n.__importDefault(e(17267)),a=({viewState:c,model:E,dataProvider:f,treeViewId:d})=>{const y=(0,l.useInjectable)(m.IMainLayoutService),b=(0,l.useInjectable)(v.IDecorationsService),A=(0,r.useMemo)(()=>y.getViewAccordionService(d),[]),S=(0,r.useMemo)(()=>{const Z=A?.getViewState(d);return Z?!Z.collapsed&&!Z.hidden:!1},[A]),{height:D}=c,{canSelectMany:I}=E.treeViewOptions||{},w=(0,r.useRef)(null),T=(0,r.useCallback)(Z=>{E.handleTreeHandler({...Z,getModel:()=>E.treeModel,hasDirectFocus:()=>w.current===document.activeElement})},[E]),R=(0,r.useCallback)((Z,$)=>{Z.stopPropagation();const{toggleDirectory:V}=E;V($)},[E]),M=(0,r.useCallback)(Z=>O(Z)?!1:Z.shiftKey,[]),O=(0,r.useCallback)(Z=>{const{metaKey:$,ctrlKey:V}=Z;return l.isOSX&&$||V},[]),x=(0,r.useCallback)((Z,$,V)=>{Z.stopPropagation();const{handleItemClick:H,handleItemToggleClick:K,handleItemRangeClick:Y}=E;if(!$)return;const X=M(event),re=O(event);I?X?Y($,V):re?K($,V):H($,V):H($,V)},[I,E]),k=(0,r.useCallback)(Z=>{const{handleCheckBoxChange:$}=E;Z&&$(Z)},[E]),F=(0,r.useCallback)((Z,$)=>{const{handleContextMenu:V}=E;V(Z,$)},[E]),L=Z=>{const{handleContextMenu:$}=E;$(Z)},B=(0,r.useCallback)(()=>{const{enactiveNodeDecoration:Z}=E;Z()},[E]),U=(0,r.useCallback)((Z,$)=>{const{handleDragStart:V}=E;V(Z,$)},[E]),W=(0,r.useCallback)((Z,$)=>{const{handleDragOver:V}=E;V(Z,$)},[E]),j=(0,r.useCallback)((Z,$)=>{const{handleDragEnter:V}=E;V(Z,$)},[E]),Q=(0,r.useCallback)((Z,$)=>{const{handleDrop:V}=E;V(Z,$)},[E]),G=(0,r.useCallback)((Z,$)=>{const{handleDragLeave:V}=E;V(Z,$)},[E]);return(0,r.useEffect)(()=>{var Z;const $=()=>{E.handleTreeBlur()};return(Z=w.current)===null||Z===void 0||Z.addEventListener("blur",$,!0),()=>{var V;(V=w.current)===null||V===void 0||V.removeEventListener("blur",$,!0)}},[w.current]),r.default.createElement("div",{className:g.default.kt_extension_view,tabIndex:-1,ref:w,onContextMenu:L,onClick:B,"data-tree-view-id":d},r.default.createElement(u,{height:D,isVisible:S,handleTreeReady:T,handleItemClicked:x,handleCheckBoxChange:k,handleTwistierClick:R,handleContextMenu:F,handleDragStart:U,handleDragOver:W,handleDragEnter:j,handleDragLeave:G,handleDrop:Q,draggable:E.draggable,treeViewId:d,model:E,dataProvider:f,decorationService:b}))};t.ExtensionTabBarTreeView=a;function h(c,E){return c.isVisible===E.isVisible&&c.model===E.model&&c.treeViewId===E.treeViewId&&c.height===E.height}const u=(0,r.memo)(({model:c,treeViewId:E,height:f,isVisible:d,dataProvider:y,handleTreeReady:b,handleItemClicked:A,handleCheckBoxChange:S,handleTwistierClick:D,handleContextMenu:I,handleDragStart:w,handleDragOver:T,handleDragEnter:R,handleDragLeave:M,handleDrop:O,draggable:x,decorationService:k})=>{const[F,L]=(0,r.useState)(!1),[B,U]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let j=!1;return(async()=>(await c.whenReady,c.treeModel&&d&&await c.treeModel.ensureReady,j||L(!0)))(),()=>{j=!0,c&&c.removeNodeDecoration()}},[c,d]),(0,r.useEffect)(()=>{const j=y.onDidChangeEmpty(()=>{y.isTreeEmpty!==B&&U(y.isTreeEmpty)});return()=>j.dispose()},[]);const W=(0,r.useCallback)(j=>r.default.createElement(s.TreeViewNode,{item:j.item,itemType:j.itemType,decorations:c.decorations.getDecorations(j.item),onClick:A,onChange:S,onTwistierClick:D,onContextMenu:I,onDragStart:w,onDragOver:T,onDragEnter:R,onDragLeave:M,onDrop:O,defaultLeftPadding:8,leftPadding:8,treeViewId:E,draggable:x,decorationService:k}),[c.treeModel]);if(F){if(B)return r.default.createElement(p.WelcomeView,{viewId:E});if(c.treeModel)return r.default.createElement(o.RecycleTree,{height:f,itemHeight:s.TREE_VIEW_NODE_HEIGHT,onReady:b,model:c.treeModel},W)}else return r.default.createElement(_.Progress,{loading:!0});return null},h);u.displayName="ExtensionsTreeView"},88341:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionWebviewView=t.WebviewViewShouldShowEvent=void 0;const r=e(85608).__importDefault(e(14041)),o=e(41869),l=e(99220);class _ extends o.BasicEvent{}t.WebviewViewShouldShowEvent=_;const v=({viewId:p})=>{const m=r.default.useRef(null),s=(0,o.useInjectable)(o.IEventBus),g=(0,o.useInjectable)(l.ExtensionService);return r.default.useEffect(()=>{const a=new o.CancellationTokenSource,h=new o.Disposable({dispose:()=>a.cancel()});return g.eagerExtensionsActivated.promise.then(()=>{a.token.isCancellationRequested||m.current&&s.fire(new _({viewType:p,container:m.current,title:"",cancellationToken:a.token,disposer:h}))}),()=>{h.dispose()}},[]),r.default.createElement("div",{style:{height:"100%",width:"100%",position:"relative"},className:"webview-view-component",ref:m})};t.ExtensionWebviewView=v},17428:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(81302),t),n.__exportStar(e(63056),t)},21167:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalkthroughsEditorView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),_=e(41869),v=e(93374),p=e(52416),m=e(99220),s=e(17441),g=n.__importDefault(e(42076)),a=({resource:{uri:E}})=>{const f=(0,_.useInjectable)(s.WalkthroughsService),d=(0,_.useInjectable)(_.IContextKeyService),{query:y,authority:b}=E,[A,S]=(0,o.useState)(),[D,I]=(0,o.useState)();(0,o.useEffect)(()=>{A&&A.steps.length>0&&(D||I(A.steps[0].id))},[A,D]),(0,o.useEffect)(()=>{y&&S(f.getWalkthrough(y))},[y,A]);const w=(0,o.useCallback)(()=>{var T;return A&&((T=A.steps.find(R=>R.id===D))===null||T===void 0?void 0:T.media)},[D,A]);return o.default.createElement("div",{className:g.default.getting_started_container},o.default.createElement("div",{className:g.default.getting_started_detailsContent},o.default.createElement("div",{className:g.default.category_container},o.default.createElement("div",{className:g.default.category_icon},A&&A.icon.type==="image"&&o.default.createElement("img",{src:A.icon.path})),o.default.createElement("div",{className:g.default.category_description_container},o.default.createElement("h2",{className:g.default.category_title},A?.title),o.default.createElement("div",{className:g.default.category_description},A?.description))),o.default.createElement("div",{className:g.default.steps_container},o.default.createElement("div",{className:g.default.getting_started_detail_container},o.default.createElement("div",{className:g.default.step_list_container},A?A.steps.filter(T=>d.match(T.when)).map(T=>o.default.createElement(h,{key:T.id,step:T,isExpanded:T.id===D,onSelected:I})):null))),o.default.createElement("div",{className:g.default.getting_started_media},D&&o.default.createElement(u,{media:w(),extensionId:b,stepId:D}))))};t.WalkthroughsEditorView=a;const h=({step:E,isExpanded:f,onSelected:d})=>{const y=(0,_.useInjectable)(_.IOpenerService),b=(0,_.useInjectable)(s.WalkthroughsService),A=(0,_.useInjectable)(p.IIconService),[S,D]=(0,o.useState)(!1),{description:I}=E;(0,o.useEffect)(()=>{const O=b.onDidProgressStep(x=>{const{id:k,done:F}=x;k===E.id&&F&&D(F)});return()=>O.dispose()},[]);const w=(0,o.useCallback)(()=>{D(!S),b.progressByEvent(m.CompletionEventsType.stepSelected+":"+E.id)},[S,E.id]),T=(0,o.useCallback)(O=>{const{href:x}=O;y.open(x),/^http(s)?:\/\//.test(x)&&b.progressByEvent(m.CompletionEventsType.onLink+":"+x)},[]),R=(0,o.useCallback)(()=>{if(I.length===0)return null;const O=[];return I.map((x,k)=>{if(x.nodes.length===1&&typeof x.nodes[0]!="string"){const F=x.nodes[0];O.push(o.default.createElement("div",{key:k.toString()+O.length,title:F.title},o.default.createElement(l.Button,{onClick:()=>T(F)},(0,_.transformLabelWithCodicon)(F.label,{},A.fromString.bind(A)))))}else{const F=x.nodes.map((L,B)=>typeof L=="string"?L:o.default.createElement("a",{key:L.label+"#"+B,title:L.title,onClick:()=>T(L)},L.label));O.push(o.default.createElement("p",{key:k.toString()+O.length.toString()+F.length.toString()},F))}}),o.default.createElement("div",{className:g.default.step_description_container},o.default.createElement(o.default.Fragment,null,O))},[I]),M=(0,o.useCallback)(()=>(0,_.transformLabelWithCodicon)(E.title,{},A.fromString.bind(A)),[E.title]);return o.default.createElement("div",{className:(0,r.default)(g.default.getting_started_step,f&&g.default.expanded),onClick:()=>d(E.id)},o.default.createElement("div",{className:g.default.checkbox},o.default.createElement(l.CheckBox,{id:E.id,onChange:w,checked:S})),o.default.createElement("div",{className:g.default.step_container},o.default.createElement("h3",{className:g.default.step_title},M()),f&&R()))},u=({media:E,extensionId:f,stepId:d})=>{const y=(0,_.useInjectable)(p.IThemeService),b=(0,_.useInjectable)(s.WalkthroughsService),[A,S]=(0,o.useState)(""),[D,I]=(0,o.useState)(""),w=(0,o.useCallback)(async T=>E?.type==="image"?"":T?(await b.getFileContent(f,T)).toString():"",[E]);if((0,o.useEffect)(()=>{const T=b.getStepsByExtension(d);T&&(E&&E.type==="svg"&&T.media.svg&&w(T.media.svg).then(S),E&&E.type==="markdown"&&T.media.markdown&&w(T.media.markdown).then(I))},[E,d]),!E)return null;if(E.type==="image"){const T=y.getCurrentThemeSync().type,R=E.path[T].toString(!0).replace(/ /g,"%20");return o.default.createElement(o.default.Fragment,null,o.default.createElement("img",{alt:E.altText,srcSet:R.toLowerCase().endsWith(".svg")?R:R+" 1.5x"}))}return E.type==="svg"?o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:g.default.media_svg_container,dangerouslySetInnerHTML:{__html:A}})):E.type==="markdown"?o.default.createElement(o.default.Fragment,null,o.default.createElement(c,{content:D,media:E})):null},c=({content:E,media:f})=>{const d=(0,_.useInjectable)(_.IOpenerService);if(f.type!=="markdown")return null;const y=(0,o.useCallback)(()=>f.base.resolve("/").toString(),[f,E]);return o.default.createElement(v.Markdown,{content:E,options:{baseUrl:y()},onLinkClick:b=>d.open(b)})}},87444:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtCommandManagementImpl=void 0;const n=e(85608),r=e(76003),o=e(43718);let l=class extends o.Disposable{constructor(){super(...arguments),this.commandEnvRegistry=new Map,this.proxyCommandExecutorRegistry=new Map}dispose(){this.commandEnvRegistry.clear(),this.proxyCommandExecutorRegistry.clear()}registerProxyCommandExecutor(v,p){this.proxyCommandExecutorRegistry.set(v,p)}async executeExtensionCommand(v,p,m){const s=this.proxyCommandExecutorRegistry.get(v);if(!s)throw new Error('Proxy command executor "'+v+'" is not existed');return s.$executeExtensionCommand(p,...m)}registerExtensionCommandEnv(v,p="node"){return this.commandEnvRegistry.set(v,p),{dispose:()=>{this.commandEnvRegistry.delete(v)}}}getExtensionCommandEnv(v){return this.commandEnvRegistry.get(v)}};t.ExtCommandManagementImpl=l,t.ExtCommandManagementImpl=l=n.__decorate([(0,r.Injectable)()],l)},49413:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtInstanceManagementService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),_=e(99220),v=e(42734);let p=class extends o.Disposable{constructor(){super(),this.onDidChangeEmitter=new l.Emitter,this.extensionMap=new Map,this._whenReady=this.init()}async init(){this.workspaceStorage=await this.storageProvider(o.STORAGE_NAMESPACE.EXTENSIONS),this.globalStorage=await this.storageProvider(o.STORAGE_NAMESPACE.GLOBAL_EXTENSIONS)}get whenReady(){return this._whenReady}get onDidChange(){return this.onDidChangeEmitter.event}dispose(){this.disposeExtensionInstances()}getExtensionInstances(){return Array.from(this.extensionMap.values())}disposeExtensionInstances(){for(const s of this.extensionMap.values())s.dispose();this.extensionMap=new Map}disposeExtensionInstancesByPath(s){s.forEach(g=>{var a;(a=this.extensionMap.get(g))===null||a===void 0||a.dispose()})}resetExtensionInstances(){for(const s of this.extensionMap.values())s.reset()}getExtensionInstanceByPath(s){return this.extensionMap.get(s)}getExtensionInstanceByExtId(s){for(const g of this.extensionMap.values())if(g.id===s)return g}deleteExtensionInstanceByPath(s){this.extensionMap.delete(s),this.onDidChangeEmitter.fire()}addExtensionInstance(s){this.extensionMap.set(s.path,s),this.onDidChangeEmitter.fire()}async checkExtensionEnable(s){await this.whenReady;const g=this.globalStorage.get(s.extensionId,_.EXTENSION_ENABLE.ENABLE);return this.workspaceStorage.get(s.extensionId,g)===_.EXTENSION_ENABLE.ENABLE}async createExtensionInstance(s,g,a){const h=typeof s=="string"?await this.extensionNodeClient.getExtension(s,(0,l.getLanguageId)(),{}):s;if(h)return this.injector.get(v.Extension,[h,await this.checkExtensionEnable(h),g||(this.appConfig.extensionDir?h.realPath.startsWith(this.appConfig.extensionDir):!1),!!a])}checkIsBuiltin(s){const g=this.getExtensionCandidateByPath(s.realPath);return(this.appConfig.extensionDir?s.realPath.startsWith(this.appConfig.extensionDir):!1)||(g?g.isBuiltin:!1)}checkIsDevelopment(s){const g=this.getExtensionCandidateByPath(s.realPath);return!!g?.isDevelopment}getExtensionCandidateByPath(s){return this.appConfig.extensionCandidate&&this.appConfig.extensionCandidate.find(g=>g.path===s)}};t.ExtInstanceManagementService=p,n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],p.prototype,"storageProvider",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],p.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(_.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],p.prototype,"extensionNodeClient",void 0),t.ExtInstanceManagementService=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p)},98453:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionManagementService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(14951),_=e(99220),v=e(82389),p=e(71354),m=e(35321);let s=class extends o.WithEventBus{async getExtensionProps(a,h){const u=await this.extensionNodeClient.getExtension(a,(0,o.getLanguageId)(),h);if(u){const c=this.getExtensionByPath(a);if(c)return{...c.toJSON(),extraMetadata:u.extraMetadata}}}getExtensionByPath(a){return this.extInstanceManagementService.getExtensionInstances().find(h=>a===h.path)}getExtensionByExtId(a){return this.extInstanceManagementService.getExtensionInstances().find(h=>a===h.id)}async postChangedExtension(a,h,u){const{upgrade:c,extensionPath:E,oldExtensionPath:f,isBuiltin:d}=typeof a=="boolean"?{upgrade:a,extensionPath:h,oldExtensionPath:u,isBuiltin:!1}:a,y=this.extInstanceManagementService.getExtensionInstanceByPath(E);if(y){this.logger.warn(`Extension ${y.id} already exists, skip activate`);return}const b=await this.extInstanceManagementService.createExtensionInstance(E,!!d);if(b)return c&&this.disableExtension(f),await this.enableExtension(b)}async postEnableExtension(a){const h=await this.extInstanceManagementService.getExtensionInstanceByPath(a);if(h)return await this.enableExtension(h)}async postDisableExtension(a){return this.disableExtension(a)}async postUninstallExtension(a){return this.uninstallExtension(a)}getAllExtensionJson(){return this.extInstanceManagementService.getExtensionInstances().map(a=>a.toJSON())}disableExtension(a){const h=this.extInstanceManagementService.getExtensionInstanceByPath(a);h&&(h.disable(),this.extInstanceManagementService.deleteExtensionInstanceByPath(a))}async enableExtension(a){this.extInstanceManagementService.addExtensionInstance(a),a.enable(),await a.initialize(),this.eventBus.fire(new p.ExtensionDidEnabledEvent(a.toJSON())),this.sumiContributesService.register(a.id,a.packageJSON.sumiContributes||{}),this.contributesService.register(a.id,a.contributes),this.sumiContributesService.initialize(),this.contributesService.initialize()}async removeExtension(a){try{return await this.fileService.delete(o.URI.file(a).toString()),!0}catch(h){return this.logger.error(h),!1}}async uninstallExtension(a){const h=this.extInstanceManagementService.getExtensionInstanceByPath(a);h&&(h.dispose(),this.extInstanceManagementService.deleteExtensionInstanceByPath(a)),await this.removeExtension(a),this.eventBus.fire(new p.ExtensionDidUninstalledEvent)}};t.ExtensionManagementService=s,n.__decorate([(0,r.Autowired)(p.AbstractExtInstanceManagementService),n.__metadata("design:type",p.AbstractExtInstanceManagementService)],s.prototype,"extInstanceManagementService",void 0),n.__decorate([(0,r.Autowired)(_.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],s.prototype,"extensionNodeClient",void 0),n.__decorate([(0,r.Autowired)(m.VSCodeContributesServiceToken),n.__metadata("design:type",m.VSCodeContributesService)],s.prototype,"contributesService",void 0),n.__decorate([(0,r.Autowired)(v.SumiContributionsServiceToken),n.__metadata("design:type",v.SumiContributionsService)],s.prototype,"sumiContributesService",void 0),n.__decorate([(0,r.Autowired)(l.IFileServiceClient),n.__metadata("design:type",Object)],s.prototype,"fileService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],s.prototype,"logger",void 0),t.ExtensionManagementService=s=n.__decorate([(0,r.Injectable)()],s)},20670:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeExtProcessService=void 0;const n=e(85608),r=e(76003),o=e(8919),l=e(18740),_=e(41869),v=e(99220),p=e(72464),m=e(46147),s=e(37846),g=e(28949),a=e(51072),h=e(17802);let u=class{constructor(){this._apiFactoryDisposables=new _.DisposableStore,this.ready=new _.Deferred,this._extHostUpdated=new _.Deferred,this.extensions=[]}disposeApiFactory(){this._apiFactoryDisposables.clear()}async disposeProcess(){this.disposeApiFactory(),await this.extensionNodeClient.disposeClientExtProcess(this.clientId,!1)}async activate(){return await this.createExtProcess(),this.protocol&&(this.ready.resolve(),await this.createBrowserMainThreadAPI(),await(await this.getProxy()).$updateExtHostData(),this._extHostUpdated.resolve()),this.protocol}async activeExtension(E,f){!this.appConfig.noExtHost&&!f&&(await this._extHostUpdated.promise,await(await this.getProxy()).$activateExtension(E.id))}async updateExtensionData(E){if(this.extensions=E,this.protocol){const f=await this.getProxy();await f.$updateExtHostData(),f.$fireChangeEvent()}}getExtension(E){return this.extensions.find(f=>f.id===E)}async $activateExtension(E){const f=this.extensions.find(d=>d.path===E);f&&await f.activate()}async $getExtensions(){return this.extensions.map(E=>E.toJSON())}async getProxy(){return await this.ready.promise,this.protocol.getProxy(m.ExtHostAPIIdentifier.ExtHostExtensionService)}async createBrowserMainThreadAPI(){const E=(0,h.initSharedAPIProxy)(this.protocol,this.injector);this._apiFactoryDisposables.add(E),this._apiFactoryDisposables.add((0,_.toDisposable)((0,a.initNodeThreadAPIProxy)(this.protocol,this.injector,this))),this._apiFactoryDisposables.add((0,_.toDisposable)((0,g.createSumiAPIFactory)(this.protocol,this.injector))),this._apiFactoryDisposables.add(this.createExternalSumiAPIFactory()),await E.setup()}getSpawnOptions(){return{}}createExternalSumiAPIFactory(){const E=new _.Disposable,f=this.mainThreadExtenderContributionProvider.getContributions();for(const y of f)y.registerMainThreadExtender(this.mainThreadExtenderService);const d=this.mainThreadExtenderService.getMainThreadExtenders();for(const y of d){const b=this.injector.get(y.serviceClass,[this.protocol]);this.protocol.set(y.identifier,b),E.addDispose(b)}return E}async getActivatedExtensions(){return await(await this.getProxy()).$getActivatedExtensions()}get clientId(){return this.applicationService.clientId}async createExtProcess(){await this.extensionNodeClient.createProcess(this.clientId,{enableDebugExtensionHost:this.appConfig.enableDebugExtensionHost,inspectExtensionHost:this.appConfig.inspectExtensionHost,extensionConnectOption:this.appConfig.extensionConnectOption,extHostSpawnOptions:this.getSpawnOptions()}),await this.initExtProtocol()}async initExtProtocol(){var E,f;this.channel&&this.channel.dispose(),this.protocol&&((f=(E=this.protocol).dispose)===null||f===void 0||f.call(E)),this.channel=await this.channelHandler.openChannel(v.CONNECTION_HANDLE_BETWEEN_EXTENSION_AND_MAIN_THREAD),this.connection=this.channel.createConnection(),this.protocol=new o.SumiConnectionMultiplexer(this.connection,{timeout:this.appConfig.rpcMessageTimeout,name:"node-ext-host",io:(0,o.createExtMessageIO)(s.knownProtocols)})}};t.NodeExtProcessService=u,n.__decorate([(0,r.Autowired)(_.AppConfig),n.__metadata("design:type",Object)],u.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],u.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(v.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],u.prototype,"extensionNodeClient",void 0),n.__decorate([(0,r.Autowired)(_.IApplicationService),n.__metadata("design:type",Object)],u.prototype,"applicationService",void 0),n.__decorate([(0,r.Autowired)(l.WSChannelHandler),n.__metadata("design:type",l.WSChannelHandler)],u.prototype,"channelHandler",void 0),n.__decorate([(0,r.Autowired)(p.IMainThreadExtenderService),n.__metadata("design:type",Object)],u.prototype,"mainThreadExtenderService",void 0),n.__decorate([(0,r.Autowired)(p.MainThreadExtenderContribution),n.__metadata("design:type",Object)],u.prototype,"mainThreadExtenderContributionProvider",void 0),t.NodeExtProcessService=u=n.__decorate([(0,r.Injectable)()],u)},90731:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ViewExtProcessService=void 0;const r=e(85608),o=e(76003),l=e(65973),_=e(8919),v=e(41869),p=e(40827),m=e(43718),s=e(61656),g=e(99220),a=e(25600),h=e(17428),u=e(54107),c=e(9438),E=e(8403),f=e(31738),{Path:d,posix:y}=v.path,b="load";let A=n=class extends m.Disposable{constructor(){super(...arguments),this.debugLogger=(0,m.getDebugLogger)(),this.extensions=[],this.activatedViewExtensionMap=new Map,this.portalShadowRootMap=new Map,this.shadowRootBodyMap=new Map}getExtension(D){return this.extensions.find(I=>I.id===D)}async initExtension(D){this.extensions=D}async getActivatedExtensions(){return[]}getProxy(){}async $activateExtension(D){}async $getExtensions(){return this.extensions.map(D=>D.toJSON())}async disposeProcess(){}activate(){const D=this.requireInterceptorContributionProvider.getContributions();for(const I of D)I.registerRequireInterceptor(this.requireInterceptorService);this.extendExtensionErrorStackTrace()}extendExtensionErrorStackTrace(){Error.stackTraceLimit=100,Error.prepareStackTrace=(D,I)=>{let w,T=`Error: ${D.message}`;for(const R of I)if(T+=`
33299
33299
  at ${R.toString()}`,!w&&R.isEval()){const M=R.getEvalOrigin(),O=this.getExtension.apply(this,[M]);if(O){w=O;const x=R.getColumnNumber(),k=R.getLineNumber();T=`