@opensumi/cli-engine 3.9.1-next-1749204089.0 → 3.9.1-next-1749452811.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.
@@ -31895,7 +31895,7 @@ ${m.content}
31895
31895
  \`\`\`
31896
31896
  </current_opened_file>`:""}};t.DefaultChatAgentPromptProvider=p,n.__decorate([(0,r.Autowired)(o.WorkbenchEditorService),n.__metadata("design:type",o.WorkbenchEditorService)],p.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(a.IWorkspaceService),n.__metadata("design:type",Object)],p.prototype,"workspaceService",void 0),t.DefaultChatAgentPromptProvider=p=n.__decorate([(0,r.Injectable)()],p)},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.toClaudeToolName=t.extractCodeBlocks=t.isDocumentValid=t.isDocumentTooShort=t.isDocumentTooLarge=void 0;const n=e(19413),r="```",o=10,a=l=>{try{l.getText()}catch(h){if(h instanceof RangeError)return!0}return!1};t.isDocumentTooLarge=a;const p=l=>l.getText().length<o;t.isDocumentTooShort=p;const v=l=>!((0,t.isDocumentTooLarge)(l)||(0,t.isDocumentTooShort)(l));t.isDocumentValid=v;const m=l=>{const h=l.split(`
31897
31897
  `);let u=[],d=!1,E=0;return h.forEach((f,c)=>{if(!d&&f.trim().startsWith(r))d=!0,E=c+1;else if(d&&f.trim().startsWith(r)){d=!1;const y=c;u=h.slice(E,y)}d&&E!==c+1&&u.push(f)}),u.join(`
31898
- `)};t.extractCodeBlocks=m;const _=l=>l.replace(/[^a-zA-Z0-9_-]/g,"").slice(0,64);t.toClaudeToolName=_;const s=(l,h)=>h===n.BUILTIN_MCP_SERVER_NAME?l:(0,t.toClaudeToolName)(`mcp_${h}_${l}`);t.getToolName=s;const g=l=>{const h=/`<attached_file>(.*)`/g,u=/`<attached_folder>(.*)`/g;return l=l.replace(h,"$1"),l=l.replace(u,"$1"),l};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),a=e(81878),p=e(25918),v=e(93899),m=e(52416),_=e(69635),s=n.__importDefault(e(38877)),g=({thread:h,comment:u,className:d})=>{const E=`${h.providerId}_${h.id}_${u.id}`,f=`${v.MenuId.CommentReactionSwitcherMenu}_${E}`,c=(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(c.registerMenuItem(f,{submenu:S,label:S,iconClass:(0,o.getExternalIcon)("reactions"),group:"navigation"})),A.addDispose(c.registerMenuItems(S,u.reactions.map(D=>({command:{id:_.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(p.InlineActionBar,{className:d,menus:b,regroup:A=>[A,[]],type:"icon"})};t.CommentReactionSwitcher=g;const l=({thread:h,comment:u})=>{var d;const E=(0,o.useInjectable)(o.IEventBus),f=(0,o.useInjectable)(m.IIconService),c=r.default.useCallback(y=>{E.fire(new _.CommentReactionClick({thread:h,comment:u,reaction:y}))},[]);return r.default.createElement("div",{className:s.default.comment_reactions},(d=u.reactions)===null||d===void 0?void 0:d.filter(y=>y.count!==0).map(y=>r.default.createElement(a.Button,{key:y.label,onClick:()=>c(y),type:"secondary",size:"small",title:y.label,className:s.default.comment_reaction,iconClass:f.fromIcon("",y.iconPath.toString(),m.IconType.Background)},"\xA0",y.count)))};t.CommentReactions=l},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)),a=e(84605),p=n.__importDefault(e(38877)),v=e(70154),m=({root:_,children:s})=>o.default.createPortal(s,_);t.CommentsBody=r.default.memo(({body:_})=>{const s=r.default.useRef(null),[g,l]=r.default.useState(null),h=r.default.useMemo(()=>{const u=(0,a.createMarkedRenderer)();return u.link=({href:d,title:E,text:f})=>`<a target="_blank" rel="noopener" href="${d}" title="${E||""}">${f}</a>`,u},[]);return r.default.useEffect(()=>{if(s.current){const u=s.current.attachShadow({mode:"open"});g||l(u)}},[]),r.default.createElement("div",{ref:s,className:p.default.comment_shadow_box},g&&r.default.createElement(m,{root:g},r.default.createElement("style",null,v.markdownCss),r.default.createElement("div",{dangerouslySetInnerHTML:{__html:(0,a.toMarkdownHtml)(typeof _=="string"?_:_.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(p){this.config={...this.config,...p}}registerPanelTreeNodeHandler(p){this.panelTreeNodeHandlers.push(p)}registerPanelOptions(p){this.options={...this.options,...p}}registerFileUploadHandler(p){this.fileUploadHandler=p}registerMentionsOptions(p){this.mentionsOptions=p}registerZoneWidgetRender(p){this.zoneWidgetRender=p}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(p,v){this.providerFeature.set(p,v)}getProviderFeature(p){return this.providerFeature.get(p)}};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),a=e(41869),p=e(25918),v=e(93899),m=e(69635),_=e(15504),s=e(54143),g=e(42018),l=n.__importDefault(e(38877)),h=({timestamp:f})=>{const c=r.default.useMemo(()=>{const y=new Date(f);return(0,a.toLocalString)(y)},[f]);return r.default.createElement("span",{className:l.default.comment_item_timestamp},c)},u=(f,c)=>{const y=(0,a.useInjectable)(v.AbstractMenuService),{body:b,contextValue:A}=c,[S,D]=r.default.useState(""),I=(0,a.useInjectable)(m.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",!c.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]},d=({reply:f,thread:c})=>{var y;const{contextKeyService:b}=c,{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,a.toMarkdownHtml)(typeof D=="string"?D:D.value);return/^\<p\>[^<>]+\<\/p\>\n$/.test(B)},[D]);return r.default.createElement("div",{className:l.default.reply_item},(0,a.isUndefined)(I)||I===m.CommentMode.Preview?r.default.createElement("div",null,L?r.default.createElement(r.default.Fragment,null,T&&r.default.createElement("img",{className:l.default.reply_item_icon,src:T,alt:A.name}),r.default.createElement("span",{className:l.default.comment_item_author_name},A.name),w&&r.default.createElement(h,{timestamp:w}),typeof S=="string"?r.default.createElement("span",{className:l.default.comment_item_label},S):S," : ",r.default.createElement("span",{className:l.default.comment_item_body},typeof D=="string"?D:D.value),f.reactions&&f.reactions.length>0&&r.default.createElement(_.CommentReactionSwitcher,{className:l.default.reply_item_title,thread:c,comment:f}),r.default.createElement(p.InlineActionBar,{separator:"inline",className:l.default.reply_item_title,menus:k,context:[{thread:c,comment:f,menuId:v.MenuId.CommentsCommentTitle}],type:"icon"})):r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:l.default.comment_item_markdown_header},r.default.createElement("div",null,T&&r.default.createElement("img",{className:l.default.reply_item_icon,src:T,alt:A.name}),r.default.createElement("span",{className:l.default.comment_item_author_name},A.name),w&&r.default.createElement(h,{timestamp:w}),typeof S=="string"?r.default.createElement("span",{className:l.default.comment_item_label},S):S," : "),r.default.createElement(p.InlineActionBar,{separator:"inline",className:l.default.reply_item_title,menus:k,context:[{thread:c,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(p.InlineActionBar,{className:l.default.comment_item_reply,menus:x,context:[{thread:c,comment:f,body:R,menuId:v.MenuId.CommentsCommentContext}],type:"button",separator:"inline",afterClick:()=>{M(D)}})),f.reactions&&f.reactions.length>0&&r.default.createElement(_.CommentReactions,{thread:c,comment:f}))},E=({thread:f,commentThreadContext:c,widget:y})=>{var b,A;const[S,D]=r.default.useState(!1),[I,w]=r.default.useState(""),{contextKeyService:T}=f,R=(0,a.useAutorun)(f.readOnly),[M,...O]=(0,a.useAutorun)(f.comments),{author:x,label:k,body:F,mode:L,timestamp:B}=M,U=(0,a.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,a.useInjectable)(m.ICommentsFeatureRegistry),H=r.default.useMemo(()=>V.getFileUploadHandler(),[]),K=r.default.useMemo(()=>T.createKey("commentIsEmpty",!0),[]);function Y(oe){K.set(!oe.target.value),w(oe.target.value)}const X=r.default.useCallback(async oe=>{if(H){const ie=await H(W,oe);w(he=>{const me=he+ie;return K.set(!me),me})}},[I]);return r.default.createElement("div",{className:l.default.comment_item},U&&r.default.createElement("img",{className:l.default.comment_item_icon,src:U,alt:x.name}),r.default.createElement("div",{className:l.default.comment_item_content},r.default.createElement("div",{className:l.default.comment_item_head},r.default.createElement("div",{className:l.default.comment_item_name},r.default.createElement("span",{className:l.default.comment_item_author_name},x.name),B&&r.default.createElement(h,{timestamp:B}),typeof k=="string"?r.default.createElement("span",{className:l.default.comment_item_label},k):k),r.default.createElement("div",{className:l.default.comment_item_actions},M.reactions&&M.reactions.length>0&&r.default.createElement(_.CommentReactionSwitcher,{thread:f,comment:M}),!R&&r.default.createElement(o.Button,{className:l.default.comment_item_reply_button,size:"small",type:"secondary",onClick:()=>D(!0)},(0,a.localize)("comments.thread.action.reply")),r.default.createElement(p.InlineActionBar,{menus:Z,context:[{thread:f,comment:M,menuId:v.MenuId.CommentsCommentTitle}],type:"button"}))),(0,a.isUndefined)(L)||L===m.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(p.InlineActionBar,{className:l.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(_.CommentReactions,{thread:f,comment:M}),(O.length>0||S)&&r.default.createElement("div",{className:l.default.comment_item_reply_wrap},O.map(oe=>r.default.createElement(d,{key:oe.id,thread:f,reply:oe})),S&&r.default.createElement("div",null,r.default.createElement(g.CommentsTextArea,{autoFocus:!0,value:I,onChange:Y,placeholder:`${(0,a.localize)("comments.reply.placeholder")}...`,dragFiles:X}),r.default.createElement(p.InlineActionBar,{className:l.default.comment_item_reply,menus:c,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),a=e(41869),p=e(69635),v=n.__importDefault(e(38877)),m=e(5167),_=e(47842),s=({viewState:g})=>{const l=(0,a.useInjectable)(_.CommentModelService),[h,u]=(0,r.useState)(),d=(0,r.useRef)(null),E=(0,a.useInjectable)(p.ICommentsFeatureRegistry),{handleTreeBlur:f}=l;(0,r.useEffect)(()=>{u(l.treeModel);const I=l.onDidUpdateTreeModel(w=>{u(w)});return()=>{I.dispose()}},[]);const c=(0,r.useCallback)(I=>{l.handleTreeHandler(I)},[l]),y=(0,r.useCallback)(I=>r.default.createElement(m.CommentNodeRendered,{item:I.item,itemType:I.itemType,decorations:l.decorations.getDecorations(I.item),defaultLeftPadding:8,onTwistierClick:l.handleTwistierClick,onClick:l.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,a.localize)("comments.panel.placeholder")),[b]),D=(0,r.useCallback)(()=>h?r.default.createElement(o.RecycleTree,{height:g.height-(A?.height||0),itemHeight:m.COMMENT_TREE_NODE_HEIGHT,onReady:c,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:d},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),a=e(97267),p=e(41869),v=e(69635),m=e(54143),_=n.__importDefault(e(38877)),s=e(73136),g="@",l="@[__display__](__id__)",h=(u,d)=>`@${d}`;t.CommentsTextArea=r.default.forwardRef((u,d)=>{const{focusDelay:E=0,autoFocus:f=!1,placeholder:c="",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,p.useInjectable)(v.ICommentsFeatureRegistry),x=r.default.useRef(null),k=r.default.useRef(null),F=r.default.useRef(null);r.default.useImperativeHandle(d,()=>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 oe=H.target;oe&&(oe.nodeName.toUpperCase()==="TEXTAREA"&&oe.scrollHeight>oe.clientHeight||oe.nodeName.toUpperCase()==="UL"||((K=oe.parentElement)===null||K===void 0?void 0:K.nodeName.toUpperCase())==="UL"||((X=(Y=oe.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:_.default.textarea_container},r.default.createElement(a.Tabs,{mini:!0,value:R,onChange:Z=>M(Z),tabs:[(0,p.localize)("comments.thread.textarea.write"),(0,p.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:c,onChange:A,onFocus:y,onBlur:b,style:j},r.default.createElement(o.Mention,{markup:Q.markup||l,renderSuggestion:Q.renderSuggestion,trigger:g,data:G,displayTransform:Q.displayTransform||h}))):r.default.createElement("div",{className:_.default.textarea_preview},r.default.createElement(m.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),a=e(91830),p=e(54414),v=e(28423),m=e(69635),_=e(90366);let s=class extends o.Disposable{set contextValue(l){this._contextKeyService.createKey("thread",l)}get contextValue(){return this._contextKeyService.getContextKeyValue("thread")}get onDidChangeCollapsibleState(){return this.onDidChangeCollapsibleStateEmitter.event}get onDidChange(){return this.onDidChangeEmitter.event}constructor(l,h,u,d){super(),this.uri=l,this.range=h,this.providerId=u,this.options=d,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(d.comments?d.comments.map(S=>({...S,id:(0,o.uuid)()})):[]),this.data=this.options.data,this._contextKeyService=this.registerDispose(this.globalContextKeyService.createScoped()),new a.ResourceContextKey(this._contextKeyService).set(l),this._contextKeyService.createKey("thread",d.contextValue),(0,v.transaction)(S=>{this.setReadOnly(!!d.readOnly),this.label.set(d.label,S),this.isCollapsed.set(!!this.options.isCollapsed,S)});const f=this._contextKeyService.createKey("threadsLength",this.commentsService.getThreadsByUri(l).length),c=this.comments.get(),y=this._contextKeyService.createKey("commentsLength",c.length),b=this._contextKeyService.createKey("commentThreadIsEmpty",!c.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=>{var D;let I=this.widgets.get(S);I||(I=this.addWidgetByEditor(S)),!((D=S.currentUri)===null||D===void 0)&&D.isEqual(this.uri)&&I.show()}),this.addDispose((0,v.autorun)(S=>{this.isCollapsed.read(S)?this.hideAll():this.showAll()})),this.addDispose(this.commentsService.onThreadsChanged(S=>{S.uri.isEqual(l)&&f.set(this.commentsService.getThreadsByUri(l).length)})),this.addDispose({dispose:()=>{this.updateComments([]),this.pendingShowTimeouts.forEach(S=>clearTimeout(S)),this.pendingShowTimeouts.clear()}}),this.onDidChangeEmitter.fire()}updateComments(l){(0,v.transaction)(h=>{this.comments.set(l,h)})}getWidgetByEditor(l){return this.widgets.get(l)}get id(){return this._id}get contextKeyService(){return this._contextKeyService}setReadOnly(l){(0,v.transaction)(h=>{this.readOnly.set(l,h),this._contextKeyService.createKey("readOnly",l)})}getEditorsByUri(l){return this.editorCollectionService.listEditors().filter(h=>{var u;return(u=h.currentUri)===null||u===void 0?void 0:u.isEqual(l)})}addWidgetByEditor(l){const h=this.injector.get(_.CommentsZoneWidget,[l,this,{arrowColor:"var(--peekView-border)"}]);return this.addDispose(h.onChangeZoneWidget(()=>{const u=this.commentsService.commentsThreads.filter(f=>this.isEqual(f)),d=u.findIndex(f=>f===this),E=u.slice(d+1);for(const f of E)if(f.isShowWidget(l)){const c=f.getWidgetByEditor(l);c?.resize()}})),this.addDispose(h),this.widgets.set(l,h),l.onDispose(()=>{h.dispose(),this.widgets.delete(l)}),h}show(l){if(l){let h=this.widgets.get(l);h||(h=this.addWidgetByEditor(l)),h.show()}else this.getEditorsByUri(this.uri).forEach(u=>{var d;let E=this.widgets.get(u);E||(E=this.addWidgetByEditor(u)),!((d=u.currentUri)===null||d===void 0)&&d.isEqual(this.uri)&&E.show()})}removePaddingShowedWidgets(){this.pendingShowTimeouts.forEach(l=>clearTimeout(l)),this.pendingShowTimeouts.clear()}showWidgetsIfShowed(){var l;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)),!((l=h.currentUri)===null||l===void 0)&&l.isEqual(this.uri)){const d=setTimeout(()=>{var E;u&&(!((E=h.currentUri)===null||E===void 0)&&E.isEqual(this.uri))&&u.show(),this.pendingShowTimeouts.delete(d)},100);this.pendingShowTimeouts.add(d)}}}hideWidgetsByDispose(){var l;for(const[h,u]of this.widgets)!(!((l=h.currentUri)===null||l===void 0)&&l.isEqual(this.uri))&&u.dispose()}isShowWidget(l){if(l){const h=this.widgets.get(l);return h?h.isShow:!1}else{for(const[,h]of this.widgets)return h.isShow;return!1}}hide(l){if(l){const h=this.widgets.get(l);h?.hide()}else this.hideAll()}showAll(){(0,v.transaction)(l=>{this.isCollapsed.set(!1,l)});for(const[,l]of this.widgets)l.show();this.onDidChangeCollapsibleStateEmitter.fire(m.CommentThreadCollapsibleState.Expanded)}hideAll(l){var h;(0,v.transaction)(u=>{this.isCollapsed.set(!0,u)});for(const[u,d]of this.widgets)l?!(!((h=u.currentUri)===null||h===void 0)&&h.isEqual(this.uri))&&d.dispose():d.hide();this.onDidChangeCollapsibleStateEmitter.fire(m.CommentThreadCollapsibleState.Collapsed)}addComment(...l){const h=this.comments.get();(0,v.transaction)(u=>{this.comments.set([...h,...l.map(d=>({...d,id:(0,o.uuid)()}))],u)}),this.onDidChangeEmitter.fire()}removeComment(l){(0,v.transaction)(h=>{this.comments.set(this.comments.get().filter(u=>u!==l),h)}),this.onDidChangeEmitter.fire()}isEqual(l){return l.uri.isEqual(this.uri)&&l.range.startLineNumber===this.range.startLineNumber&&l.range.endLineNumber===this.range.endLineNumber}};t.CommentsThread=s,n.__decorate([(0,r.Autowired)(m.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)(p.EditorCollectionService),n.__metadata("design:type",p.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),a=e(43718),p=e(69635),v=e(49867);let m=class extends a.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=m,n.__decorate([(0,r.Autowired)(o.AbstractMenuService),n.__metadata("design:type",o.AbstractMenuService)],m.prototype,"menuService",void 0),n.__decorate([(0,r.Autowired)(p.ICommentsService),n.__metadata("design:type",Object)],m.prototype,"commentService",void 0),n.__decorate([a.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],m.prototype,"commentThreadTitle",null),n.__decorate([a.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],m.prototype,"commentThreadContext",null),t.CommentsZoneService=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[v.CommentsThread])],m)},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)),a=n.__importDefault(e(25873)),p=e(76003),v=e(41869),m=e(25918),_=e(93899),s=e(20303),g=e(69635),l=e(37357),h=e(42018),u=e(73804),d=n.__importDefault(e(38877)),E=({thread:c,widget:y})=>{const{contextKeyService:b}=c,A=(0,v.useAutorun)(c.comments),S=(0,v.useAutorun)(c.threadHeaderTitle),I=(0,v.useInjectable)(p.INJECTOR_TOKEN).get(u.CommentsZoneService,[c]),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(c.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(c.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)(c.options.threadClassName,d.default.comment_container)},o.default.createElement("div",{className:(0,r.default)(c.options.threadHeadClassName,d.default.head)},o.default.createElement("div",{className:d.default.review_title},S),o.default.createElement(m.InlineActionBar,{menus:x,context:[{thread:c,widget:y,menuId:_.MenuId.CommentsCommentThreadTitle}],separator:"inline",type:"icon"})),o.default.createElement("div",{className:d.default.comment_body},A.length>0?o.default.createElement(l.CommentItem,{widget:y,commentThreadContext:k,thread:c}):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:d.default.comment_bottom_actions},o.default.createElement(m.InlineActionBar,{className:d.default.comment_reply_actions,separator:"inline",type:"button",context:[{text:R,widget:y,thread:c,menuId:_.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=a.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}))),this.addDispose({dispose:()=>{var I;(I=this.wrapperRoot)===null||I===void 0||I.unmount(),this.wrapperRoot=void 0}})}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,p.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],f.prototype,"appConfig",void 0),n.__decorate([(0,p.Autowired)(g.ICommentsFeatureRegistry),n.__metadata("design:type",Object)],f.prototype,"commentsFeatureRegistry",void 0),t.CommentsZoneWidget=f=n.__decorate([(0,p.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),a=e(93899),p=e(57517),v=e(63067),m=e(69635),_=e(47842);let s=class extends o.Disposable{onStart(){this.registerCommentsFeature(),this.listenToCreateCommentsPanel(),this.commentsService.init()}get panelBadge(){const l=this.commentsService.commentsThreads.length;return l?l+"":""}registerCommands(l){l.registerCommand({id:m.CollapseId,label:"%comments.panel.action.collapse%",iconClass:(0,o.getIcon)("collapse-all")},{execute:()=>{this.commentModelService.collapsedAll()}}),l.registerCommand({id:m.CloseThreadId,label:"%comments.thread.action.close%",iconClass:(0,o.getIcon)("up")},{execute:h=>{const{thread:u,widget:d}=h;u.comments.get().length?d.isShow&&d.toggle():u.dispose()}}),l.registerCommand({id:m.SwitchCommandReaction},{execute:h=>{this.eventBus.fire(new m.CommentReactionClick(h))}})}registerMenus(l){l.registerMenuItem(a.MenuId.CommentsCommentThreadTitle,{command:m.CloseThreadId,group:"inline",order:Number.MAX_SAFE_INTEGER})}registerToolbarItems(l){l.registerItem({id:m.CollapseId,viewId:m.CommentPanelId,command:m.CollapseId,tooltip:(0,o.localize)("comments.panel.action.collapse")})}registerCommentsFeature(){this.contributions.getContributions().forEach((l,h)=>{this.addDispose(this.commentsService.registerCommentRangeProvider(`contribution_${h}`,{getCommentingRanges:u=>l.provideCommentingRanges(u)})),l.registerCommentsFeature&&l.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 l=this.layoutService.getTabbarHandler(m.CommentPanelId);l?.setBadge(this.panelBadge)},this))}registerEditorFeature(l){l.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)(m.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)(m.ICommentsFeatureRegistry),n.__metadata("design:type",Object)],s.prototype,"commentsFeatureRegistry",void 0),n.__decorate([(0,r.Autowired)(m.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)(_.CommentModelService),n.__metadata("design:type",_.CommentModelService)],s.prototype,"commentModelService",void 0),t.CommentsBrowserContribution=s=n.__decorate([(0,o.Domain)(o.ClientAppContribution,p.BrowserEditorContribution,o.CommandContribution,o.TabBarToolbarContribution,a.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)),a=e(76003),p=e(41869),v=e(54414),m=e(57517),_=e(63067),s=e(20868),g=n.__importStar(e(20868)),l=e(62663),h=e(52416),u=n.__importStar(e(24347)),d=e(69635),E=e(53878),f=e(49867),c=e(53711);let y=class extends p.Disposable{constructor(){super(...arguments),this.decorationChangeEmitter=new p.Emitter,this.threads=new Map,this.threadsChangeEmitter=new p.Emitter,this.threadsCommentChangeEmitter=new p.Emitter,this.commentRangeProviderChangeEmitter=new p.Emitter,this.onDidChangeCurrentCommentThreadEmitter=new p.Emitter,this.threadsCreatedEmitter=new p.Emitter,this.rangeProviderMap=new Map,this.rangeOwner=new Map,this.providerDecorationCache=new p.LRUCache(1e4),this.commentRangeDecorationMap=new Map,this.shouldShowCommentsSchemes=new Set(["file","git","diff"]),this.decorationProviderDisposer=p.Disposable.NULL,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===d.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){var S;const D=new p.Disposable;this.allEditors.some(T=>T.monacoEditor===A.monacoEditor)&&((S=this.editorDisposerMap.get(A.monacoEditor.getId()))===null||S===void 0||S.dispose(),this.editorDisposerMap.set(A.monacoEditor.getId(),D)),this.editorDisposerMap.set(A.monacoEditor.getId(),D),this.allEditors.push(A),this.editor=A;let I=[],w=!1;return D.addDispose(A.monacoEditor.onMouseDown(T=>{if(T.target.type===l.monacoBrowser.editor.MouseTargetType.GUTTER_LINE_DECORATIONS&&T.target.element&&T.target.element.className.indexOf("comment-add")>-1){const{target:R}=T;if(R&&R.range){const{range:M}=R;this.startCommentRange=M,T.event.stopPropagation()}}else if(T.target.type===l.monacoBrowser.editor.MouseTargetType.GUTTER_GLYPH_MARGIN&&T.target.element&&T.target.element.className.indexOf("comment-thread")>-1){const{target:R}=T;if(R&&R.range){const{range:M}=R,O=this.commentsThreads.filter(x=>A.currentUri&&x.uri.isEqual(A.currentUri)&&x.range.endLineNumber===M.endLineNumber);O.length&&(O.some(k=>k.isShowWidget(A))?O.forEach(k=>k.hide(A)):O.forEach(k=>k.show(A)))}T.event.stopPropagation()}})),D.addDispose(A.monacoEditor.onMouseUp(async T=>{if(this.startCommentRange){if(w){this.renderCommentRange(A),w=!1,this.startCommentRange=null,this.endCommentRange=null;return}let R=this.startCommentRange;this.endCommentRange&&(this.endCommentRange.startLineNumber<this.startCommentRange.startLineNumber?(R.startColumn=this.endCommentRange.startColumn,R.startLineNumber=this.endCommentRange.startLineNumber):(R.endColumn=this.endCommentRange.endColumn,R.endLineNumber=this.endCommentRange.endLineNumber)),A.currentUri&&(R=await this.getValidRange(R,A.currentUri)),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),T.event.stopPropagation())}else if(T.target.type===l.monacoBrowser.editor.MouseTargetType.GUTTER_LINE_DECORATIONS&&T.target.element&&T.target.element.className.indexOf("comment-range")>-1&&T.target.element.className.indexOf("comment-thread")<0){const{target:R}=T,M=R.range;M&&(this.commentsThreads.some(O=>O.comments.get().length===0&&A.currentUri&&O.uri.isEqual(A.currentUri)&&O.range.startLineNumber===M.startLineNumber&&O.range.endLineNumber===M.endLineNumber)||this.createThread(A.currentUri,M).show(A),T.event.stopPropagation())}this.startCommentRange=null,this.endCommentRange=null})),D.addDispose(A.monacoEditor.onMouseMove(async T=>{var R,M,O;const x=A.currentUri,k=T.target.range;if(this.startCommentRange){if(!((R=T.target.element)===null||R===void 0)&&R.className||!((O=(M=T.target.element)===null||M===void 0?void 0:M.offsetParent)===null||O===void 0)&&O.className.includes("diff-hidden-lines")&&(w=!0),x&&k){let F={startLineNumber:this.startCommentRange.startLineNumber,endLineNumber:k.endLineNumber,startColumn:this.startCommentRange.startColumn,endColumn:k.endColumn};this.startCommentRange.startLineNumber>k.startLineNumber&&(F={startLineNumber:k.startLineNumber,endLineNumber:this.startCommentRange.endLineNumber,startColumn:k.startColumn,endColumn:this.startCommentRange.endColumn}),this.renderCommentRange(A,F),this.endCommentRange=k}}else if(x&&k&&await this.shouldShowHoverDecoration(x,k)){const F=[{range:(0,s.positionToRange)(k.startLineNumber),options:this.createHoverDecoration()}];I=A.monacoEditor.deltaDecorations(I,F)}})),D.addDispose(A.monacoEditor.onMouseLeave(async T=>{var R;const M=(R=T.target)===null||R===void 0?void 0:R.range,O=[];!this.startCommentRange&&M&&O.push({range:(0,s.positionToRange)(M.startLineNumber),options:this.createCommentRangeDecoration()}),I=A.monacoEditor.deltaDecorations(I,O)})),D.addDispose(this.onCommentRangeProviderChange(()=>{this.renderCommentRange(A)})),D.addDispose(p.Event.any(this.onThreadsChanged,this.onThreadsCommentChange,this.onThreadsCreated)(T=>{const R=this.getCurrentEditor(T.uri);R&&this.renderCommentRange(R),this.updateActiveThreadDecoration(void 0)})),D.addDispose(this.onDidChangeCurrentCommentThread(T=>{this.updateActiveThreadDecoration(T)})),this.tryUpdateReservedSpace(A),D.addDispose(A.monacoEditor.onDidChangeModel(()=>{this.renderCommentRange(A),this.tryUpdateReservedSpace(A)})),D}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)})}async 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=await this.getContributionRanges(A.currentUri);if(D.length>0){const I=[];D.map(T=>{if(S.startLineNumber===0&&S.endLineNumber===0)I.push({range:T,options:this.createCommentRangeDecoration()});else if(S.startLineNumber<=T.startLineNumber&&S.endLineNumber>=T.endLineNumber)I.push({range:T,options:this.createDottedRangeDecoration()},{range:T,options:this.createThreadRangeDecoration()});else if(S.endLineNumber>=T.endLineNumber)if(S.startLineNumber<=T.endLineNumber){const R={startLineNumber:S.startLineNumber,endLineNumber:T.endLineNumber,startColumn:S.startColumn,endColumn:S.endColumn},M={startLineNumber:T.startLineNumber,endLineNumber:R.startLineNumber-1,startColumn:T.startColumn,endColumn:R.endColumn};I.push({range:M,options:this.createCommentRangeDecoration()},{range:R,options:this.createDottedRangeDecoration()},{range:R,options:this.createThreadRangeDecoration()})}else I.push({range:T,options:this.createCommentRangeDecoration()});else if(S.endLineNumber<T.endLineNumber)if(S.endLineNumber>=T.startLineNumber)if(S.startLineNumber>=T.startLineNumber){const R={startLineNumber:T.startLineNumber,startColumn:T.startColumn,endLineNumber:S.startLineNumber-1,endColumn:S.startColumn},M={startLineNumber:S.endLineNumber+1,startColumn:S.endColumn,endLineNumber:T.endLineNumber,endColumn:T.endColumn},O=S.startLineNumber!==T.startLineNumber?[{range:R,options:this.createCommentRangeDecoration()}]:[];O.push({range:S,options:this.createDottedRangeDecoration()}),O.push({range:S,options:this.createThreadRangeDecoration()}),O.push({range:M,options:this.createCommentRangeDecoration()}),I.push(...O)}else{const R={startLineNumber:T.startLineNumber,startColumn:T.startColumn,endLineNumber:S.endLineNumber,endColumn:S.endColumn},M={startLineNumber:R.endLineNumber+1,startColumn:R.endColumn,endLineNumber:T.endLineNumber,endColumn:T.endColumn};I.push({range:R,options:this.createDottedRangeDecoration()},{range:R,options:this.createThreadRangeDecoration()},{range:M,options:this.createCommentRangeDecoration()})}else I.push({range:T,options:this.createCommentRangeDecoration()})});const w=this.commentRangeDecorationMap.get(A.currentUri.toString())||[];this.commentRangeDecorationMap.set(A.currentUri.toString(),A.monacoEditor.deltaDecorations(w,I))}else this.commentRangeDecorationMap.set(A.currentUri.toString(),[])}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 p.URI(this.appConfig.workspaceDir),O=new p.URI(w),x=(T=M.relative(O))===null||T===void 0?void 0:T.toString();S.push(new c.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 c.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,p.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 c.CommentReplyNode(this,D,(0,p.formatLocalize)("comment.reply.count",T?.length||0),(0,p.formatLocalize)("comment.reply.lastReply",R),"",A.resource,A)),S}async resolveChildren(A){let S=[];if(A?c.CommentRoot.isRoot(A)?S=this.handleCommentFileNode(A):c.CommentFileNode.is(A)?S=this.handleCommentContentNode(A):c.CommentContentNode.is(A)&&(S=this.handleCommentReplyNode(A)):S.push(new c.CommentRoot(this)),S.length===1&&c.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 p.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=>{const S=this.commentsThreads.filter(w=>w.uri.codeUri.path===A.codeUri.path),D=this.editorCollectionService.listMultiDiffEditors();if(D.length>0){const w=D[0];console.log("currentEditor =>",w)}for(const w of S)w.show();return S.filter(w=>{const T=w.uri.isEqual(A);return this.filterThreadDecoration?T&&this.filterThreadDecoration(w):T}).map(w=>({range:{startLineNumber:w.range.endLineNumber,endLineNumber:w.range.endLineNumber,startColumn:w.range.endColumn,endColumn:w.range.endColumn},options:this.createThreadDecoration(w)}))}}),this.addDispose(this.decorationProviderDisposer)}registerCommentPanel(){this.layoutService.getTabbarHandler(d.CommentPanelId)||this.layoutService.collectTabbarComponent([{id:d.CommentPanelId,component:E.CommentsPanel}],{badge:this.panelBadge,containerId:d.CommentPanelId,title:(0,p.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(),p.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,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],y.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(p.AppConfig),n.__metadata("design:type",Object)],y.prototype,"appConfig",void 0),n.__decorate([(0,a.Autowired)(m.IEditorDecorationCollectionService),n.__metadata("design:type",Object)],y.prototype,"editorDecorationCollectionService",void 0),n.__decorate([(0,a.Autowired)(h.IIconService),n.__metadata("design:type",Object)],y.prototype,"iconService",void 0),n.__decorate([(0,a.Autowired)(p.LabelService),n.__metadata("design:type",p.LabelService)],y.prototype,"labelService",void 0),n.__decorate([(0,a.Autowired)(d.ICommentsFeatureRegistry),n.__metadata("design:type",Object)],y.prototype,"commentsFeatureRegistry",void 0),n.__decorate([(0,a.Autowired)(m.IEditorDocumentModelService),n.__metadata("design:type",Object)],y.prototype,"documentService",void 0),n.__decorate([(0,a.Autowired)(_.IMainLayoutService),n.__metadata("design:type",Object)],y.prototype,"layoutService",void 0),n.__decorate([(0,a.Autowired)(m.WorkbenchEditorService),n.__metadata("design:type",m.WorkbenchEditorService)],y.prototype,"workbenchEditorService",void 0),n.__decorate([(0,a.Autowired)(v.EditorCollectionService),n.__metadata("design:type",v.EditorCollectionService)],y.prototype,"editorCollectionService",void 0),n.__decorate([(0,a.Autowired)(m.ResourceService),n.__metadata("design:type",m.ResourceService)],y.prototype,"resourceService",void 0),n.__decorate([p.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],y.prototype,"isMultiCommentsForSingleLine",null),n.__decorate([p.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],y.prototype,"currentAuthorAvatar",null),n.__decorate([p.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],y.prototype,"filterThreadDecoration",null),t.CommentsService=y=n.__decorate([(0,a.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),a=e(69635),p=e(66480),v=e(62604),m=e(55011),_=e(47842);let s=class extends o.BrowserModule{constructor(){super(...arguments),this.contributionProvider=a.CommentsContribution,this.providers=[{token:a.ICommentsService,useClass:m.CommentsService},{token:_.CommentModelService,useClass:_.CommentModelService},{token:a.ICommentsFeatureRegistry,useClass:p.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=`
31898
+ `)};t.extractCodeBlocks=m;const _=l=>l.replace(/[^a-zA-Z0-9_-]/g,"").slice(0,64);t.toClaudeToolName=_;const s=(l,h)=>h===n.BUILTIN_MCP_SERVER_NAME?l:(0,t.toClaudeToolName)(`mcp_${h}_${l}`);t.getToolName=s;const g=l=>{const h=/`<attached_file>(.*)`/g,u=/`<attached_folder>(.*)`/g;return l=l.replace(h,"$1"),l=l.replace(u,"$1"),l};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),a=e(81878),p=e(25918),v=e(93899),m=e(52416),_=e(69635),s=n.__importDefault(e(38877)),g=({thread:h,comment:u,className:d})=>{const E=`${h.providerId}_${h.id}_${u.id}`,f=`${v.MenuId.CommentReactionSwitcherMenu}_${E}`,c=(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(c.registerMenuItem(f,{submenu:S,label:S,iconClass:(0,o.getExternalIcon)("reactions"),group:"navigation"})),A.addDispose(c.registerMenuItems(S,u.reactions.map(D=>({command:{id:_.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(p.InlineActionBar,{className:d,menus:b,regroup:A=>[A,[]],type:"icon"})};t.CommentReactionSwitcher=g;const l=({thread:h,comment:u})=>{var d;const E=(0,o.useInjectable)(o.IEventBus),f=(0,o.useInjectable)(m.IIconService),c=r.default.useCallback(y=>{E.fire(new _.CommentReactionClick({thread:h,comment:u,reaction:y}))},[]);return r.default.createElement("div",{className:s.default.comment_reactions},(d=u.reactions)===null||d===void 0?void 0:d.filter(y=>y.count!==0).map(y=>r.default.createElement(a.Button,{key:y.label,onClick:()=>c(y),type:"secondary",size:"small",title:y.label,className:s.default.comment_reaction,iconClass:f.fromIcon("",y.iconPath.toString(),m.IconType.Background)},"\xA0",y.count)))};t.CommentReactions=l},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)),a=e(84605),p=n.__importDefault(e(38877)),v=e(70154),m=({root:_,children:s})=>o.default.createPortal(s,_);t.CommentsBody=r.default.memo(({body:_})=>{const s=r.default.useRef(null),[g,l]=r.default.useState(null),h=r.default.useMemo(()=>{const u=(0,a.createMarkedRenderer)();return u.link=({href:d,title:E,text:f})=>`<a target="_blank" rel="noopener" href="${d}" title="${E||""}">${f}</a>`,u},[]);return r.default.useEffect(()=>{if(s.current){const u=s.current.attachShadow({mode:"open"});g||l(u)}},[]),r.default.createElement("div",{ref:s,className:p.default.comment_shadow_box},g&&r.default.createElement(m,{root:g},r.default.createElement("style",null,v.markdownCss),r.default.createElement("div",{dangerouslySetInnerHTML:{__html:(0,a.toMarkdownHtml)(typeof _=="string"?_:_.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(p){this.config={...this.config,...p}}registerPanelTreeNodeHandler(p){this.panelTreeNodeHandlers.push(p)}registerPanelOptions(p){this.options={...this.options,...p}}registerFileUploadHandler(p){this.fileUploadHandler=p}registerMentionsOptions(p){this.mentionsOptions=p}registerZoneWidgetRender(p){this.zoneWidgetRender=p}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(p,v){this.providerFeature.set(p,v)}getProviderFeature(p){return this.providerFeature.get(p)}};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),a=e(41869),p=e(25918),v=e(93899),m=e(69635),_=e(15504),s=e(54143),g=e(42018),l=n.__importDefault(e(38877)),h=({timestamp:f})=>{const c=r.default.useMemo(()=>{const y=new Date(f);return(0,a.toLocalString)(y)},[f]);return r.default.createElement("span",{className:l.default.comment_item_timestamp},c)},u=(f,c)=>{const y=(0,a.useInjectable)(v.AbstractMenuService),{body:b,contextValue:A}=c,[S,D]=r.default.useState(""),I=(0,a.useInjectable)(m.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",!c.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]},d=({reply:f,thread:c})=>{var y;const{contextKeyService:b}=c,{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,a.toMarkdownHtml)(typeof D=="string"?D:D.value);return/^\<p\>[^<>]+\<\/p\>\n$/.test(B)},[D]);return r.default.createElement("div",{className:l.default.reply_item},(0,a.isUndefined)(I)||I===m.CommentMode.Preview?r.default.createElement("div",null,L?r.default.createElement(r.default.Fragment,null,T&&r.default.createElement("img",{className:l.default.reply_item_icon,src:T,alt:A.name}),r.default.createElement("span",{className:l.default.comment_item_author_name},A.name),w&&r.default.createElement(h,{timestamp:w}),typeof S=="string"?r.default.createElement("span",{className:l.default.comment_item_label},S):S," : ",r.default.createElement("span",{className:l.default.comment_item_body},typeof D=="string"?D:D.value),f.reactions&&f.reactions.length>0&&r.default.createElement(_.CommentReactionSwitcher,{className:l.default.reply_item_title,thread:c,comment:f}),r.default.createElement(p.InlineActionBar,{separator:"inline",className:l.default.reply_item_title,menus:k,context:[{thread:c,comment:f,menuId:v.MenuId.CommentsCommentTitle}],type:"icon"})):r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:l.default.comment_item_markdown_header},r.default.createElement("div",null,T&&r.default.createElement("img",{className:l.default.reply_item_icon,src:T,alt:A.name}),r.default.createElement("span",{className:l.default.comment_item_author_name},A.name),w&&r.default.createElement(h,{timestamp:w}),typeof S=="string"?r.default.createElement("span",{className:l.default.comment_item_label},S):S," : "),r.default.createElement(p.InlineActionBar,{separator:"inline",className:l.default.reply_item_title,menus:k,context:[{thread:c,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(p.InlineActionBar,{className:l.default.comment_item_reply,menus:x,context:[{thread:c,comment:f,body:R,menuId:v.MenuId.CommentsCommentContext}],type:"button",separator:"inline",afterClick:()=>{M(D)}})),f.reactions&&f.reactions.length>0&&r.default.createElement(_.CommentReactions,{thread:c,comment:f}))},E=({thread:f,commentThreadContext:c,widget:y})=>{var b,A;const[S,D]=r.default.useState(!1),[I,w]=r.default.useState(""),{contextKeyService:T}=f,R=(0,a.useAutorun)(f.readOnly),[M,...O]=(0,a.useAutorun)(f.comments),{author:x,label:k,body:F,mode:L,timestamp:B}=M,U=(0,a.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,a.useInjectable)(m.ICommentsFeatureRegistry),H=r.default.useMemo(()=>V.getFileUploadHandler(),[]),K=r.default.useMemo(()=>T.createKey("commentIsEmpty",!0),[]);function Y(oe){K.set(!oe.target.value),w(oe.target.value)}const X=r.default.useCallback(async oe=>{if(H){const ie=await H(W,oe);w(he=>{const me=he+ie;return K.set(!me),me})}},[I]);return r.default.createElement("div",{className:l.default.comment_item},U&&r.default.createElement("img",{className:l.default.comment_item_icon,src:U,alt:x.name}),r.default.createElement("div",{className:l.default.comment_item_content},r.default.createElement("div",{className:l.default.comment_item_head},r.default.createElement("div",{className:l.default.comment_item_name},r.default.createElement("span",{className:l.default.comment_item_author_name},x.name),B&&r.default.createElement(h,{timestamp:B}),typeof k=="string"?r.default.createElement("span",{className:l.default.comment_item_label},k):k),r.default.createElement("div",{className:l.default.comment_item_actions},M.reactions&&M.reactions.length>0&&r.default.createElement(_.CommentReactionSwitcher,{thread:f,comment:M}),!R&&r.default.createElement(o.Button,{className:l.default.comment_item_reply_button,size:"small",type:"secondary",onClick:()=>D(!0)},(0,a.localize)("comments.thread.action.reply")),r.default.createElement(p.InlineActionBar,{menus:Z,context:[{thread:f,comment:M,menuId:v.MenuId.CommentsCommentTitle}],type:"button"}))),(0,a.isUndefined)(L)||L===m.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(p.InlineActionBar,{className:l.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(_.CommentReactions,{thread:f,comment:M}),(O.length>0||S)&&r.default.createElement("div",{className:l.default.comment_item_reply_wrap},O.map(oe=>r.default.createElement(d,{key:oe.id,thread:f,reply:oe})),S&&r.default.createElement("div",null,r.default.createElement(g.CommentsTextArea,{autoFocus:!0,value:I,onChange:Y,placeholder:`${(0,a.localize)("comments.reply.placeholder")}...`,dragFiles:X}),r.default.createElement(p.InlineActionBar,{className:l.default.comment_item_reply,menus:c,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),a=e(41869),p=e(69635),v=n.__importDefault(e(38877)),m=e(5167),_=e(47842),s=({viewState:g})=>{const l=(0,a.useInjectable)(_.CommentModelService),[h,u]=(0,r.useState)(),d=(0,r.useRef)(null),E=(0,a.useInjectable)(p.ICommentsFeatureRegistry),{handleTreeBlur:f}=l;(0,r.useEffect)(()=>{u(l.treeModel);const I=l.onDidUpdateTreeModel(w=>{u(w)});return()=>{I.dispose()}},[]);const c=(0,r.useCallback)(I=>{l.handleTreeHandler(I)},[l]),y=(0,r.useCallback)(I=>r.default.createElement(m.CommentNodeRendered,{item:I.item,itemType:I.itemType,decorations:l.decorations.getDecorations(I.item),defaultLeftPadding:8,onTwistierClick:l.handleTwistierClick,onClick:l.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,a.localize)("comments.panel.placeholder")),[b]),D=(0,r.useCallback)(()=>h?r.default.createElement(o.RecycleTree,{height:g.height-(A?.height||0),itemHeight:m.COMMENT_TREE_NODE_HEIGHT,onReady:c,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:d},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),a=e(97267),p=e(41869),v=e(69635),m=e(54143),_=n.__importDefault(e(38877)),s=e(73136),g="@",l="@[__display__](__id__)",h=(u,d)=>`@${d}`;t.CommentsTextArea=r.default.forwardRef((u,d)=>{const{focusDelay:E=0,autoFocus:f=!1,placeholder:c="",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,p.useInjectable)(v.ICommentsFeatureRegistry),x=r.default.useRef(null),k=r.default.useRef(null),F=r.default.useRef(null);r.default.useImperativeHandle(d,()=>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 oe=H.target;oe&&(oe.nodeName.toUpperCase()==="TEXTAREA"&&oe.scrollHeight>oe.clientHeight||oe.nodeName.toUpperCase()==="UL"||((K=oe.parentElement)===null||K===void 0?void 0:K.nodeName.toUpperCase())==="UL"||((X=(Y=oe.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:_.default.textarea_container},r.default.createElement(a.Tabs,{mini:!0,value:R,onChange:Z=>M(Z),tabs:[(0,p.localize)("comments.thread.textarea.write"),(0,p.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:c,onChange:A,onFocus:y,onBlur:b,style:j},r.default.createElement(o.Mention,{markup:Q.markup||l,renderSuggestion:Q.renderSuggestion,trigger:g,data:G,displayTransform:Q.displayTransform||h}))):r.default.createElement("div",{className:_.default.textarea_preview},r.default.createElement(m.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),a=e(91830),p=e(54414),v=e(28423),m=e(69635),_=e(90366);let s=class extends o.Disposable{set contextValue(l){this._contextKeyService.createKey("thread",l)}get contextValue(){return this._contextKeyService.getContextKeyValue("thread")}get onDidChangeCollapsibleState(){return this.onDidChangeCollapsibleStateEmitter.event}get onDidChange(){return this.onDidChangeEmitter.event}constructor(l,h,u,d){super(),this.uri=l,this.range=h,this.providerId=u,this.options=d,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(d.comments?d.comments.map(S=>({...S,id:(0,o.uuid)()})):[]),this.data=this.options.data,this._contextKeyService=this.registerDispose(this.globalContextKeyService.createScoped()),new a.ResourceContextKey(this._contextKeyService).set(l),this._contextKeyService.createKey("thread",d.contextValue),(0,v.transaction)(S=>{this.setReadOnly(!!d.readOnly),this.label.set(d.label,S),this.isCollapsed.set(!!this.options.isCollapsed,S)});const f=this._contextKeyService.createKey("threadsLength",this.commentsService.getThreadsByUri(l).length),c=this.comments.get(),y=this._contextKeyService.createKey("commentsLength",c.length),b=this._contextKeyService.createKey("commentThreadIsEmpty",!c.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=>{var D;let I=this.widgets.get(S);I||(I=this.addWidgetByEditor(S)),!((D=S.currentUri)===null||D===void 0)&&D.isEqual(this.uri)&&I.show()}),this.addDispose((0,v.autorun)(S=>{this.isCollapsed.read(S)?this.hideAll():this.showAll()})),this.addDispose(this.commentsService.onThreadsChanged(S=>{S.uri.isEqual(l)&&f.set(this.commentsService.getThreadsByUri(l).length)})),this.addDispose({dispose:()=>{this.updateComments([]),this.pendingShowTimeouts.forEach(S=>clearTimeout(S)),this.pendingShowTimeouts.clear()}}),this.onDidChangeEmitter.fire()}updateComments(l){(0,v.transaction)(h=>{this.comments.set(l,h)})}getWidgetByEditor(l){return this.widgets.get(l)}get id(){return this._id}get contextKeyService(){return this._contextKeyService}setReadOnly(l){(0,v.transaction)(h=>{this.readOnly.set(l,h),this._contextKeyService.createKey("readOnly",l)})}getEditorsByUri(l){return this.editorCollectionService.listEditors().filter(h=>{var u;return(u=h.currentUri)===null||u===void 0?void 0:u.isEqual(l)})}addWidgetByEditor(l){const h=this.injector.get(_.CommentsZoneWidget,[l,this,{arrowColor:"var(--peekView-border)"}]);return this.addDispose(h.onChangeZoneWidget(()=>{const u=this.commentsService.commentsThreads.filter(f=>this.isEqual(f)),d=u.findIndex(f=>f===this),E=u.slice(d+1);for(const f of E)if(f.isShowWidget(l)){const c=f.getWidgetByEditor(l);c?.resize()}})),this.addDispose(h),this.widgets.set(l,h),l.onDispose(()=>{h.dispose(),this.widgets.delete(l)}),h}show(l){if(l){let h=this.widgets.get(l);h||(h=this.addWidgetByEditor(l)),h.show()}else this.getEditorsByUri(this.uri).forEach(u=>{var d;let E=this.widgets.get(u);E||(E=this.addWidgetByEditor(u)),!((d=u.currentUri)===null||d===void 0)&&d.isEqual(this.uri)&&E.show()})}removePaddingShowedWidgets(){this.pendingShowTimeouts.forEach(l=>clearTimeout(l)),this.pendingShowTimeouts.clear()}showWidgetsIfShowed(){var l;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)),!((l=h.currentUri)===null||l===void 0)&&l.isEqual(this.uri)){const d=setTimeout(()=>{var E;u&&(!((E=h.currentUri)===null||E===void 0)&&E.isEqual(this.uri))&&u.show(),this.pendingShowTimeouts.delete(d)},100);this.pendingShowTimeouts.add(d)}}}hideWidgetsByDispose(){var l;for(const[h,u]of this.widgets)!(!((l=h.currentUri)===null||l===void 0)&&l.isEqual(this.uri))&&u.dispose()}isShowWidget(l){if(l){const h=this.widgets.get(l);return h?h.isShow:!1}else{for(const[,h]of this.widgets)return h.isShow;return!1}}hide(l){if(l){const h=this.widgets.get(l);h?.hide()}else this.hideAll()}showAll(){(0,v.transaction)(l=>{this.isCollapsed.set(!1,l)});for(const[,l]of this.widgets)l.show();this.onDidChangeCollapsibleStateEmitter.fire(m.CommentThreadCollapsibleState.Expanded)}hideAll(l){var h;(0,v.transaction)(u=>{this.isCollapsed.set(!0,u)});for(const[u,d]of this.widgets)l?!(!((h=u.currentUri)===null||h===void 0)&&h.isEqual(this.uri))&&d.dispose():d.hide();this.onDidChangeCollapsibleStateEmitter.fire(m.CommentThreadCollapsibleState.Collapsed)}addComment(...l){const h=this.comments.get();(0,v.transaction)(u=>{this.comments.set([...h,...l.map(d=>({...d,id:(0,o.uuid)()}))],u)}),this.onDidChangeEmitter.fire()}removeComment(l){(0,v.transaction)(h=>{this.comments.set(this.comments.get().filter(u=>u!==l),h)}),this.onDidChangeEmitter.fire()}isEqual(l){return l.uri.isEqual(this.uri)&&l.range.startLineNumber===this.range.startLineNumber&&l.range.endLineNumber===this.range.endLineNumber}};t.CommentsThread=s,n.__decorate([(0,r.Autowired)(m.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)(p.EditorCollectionService),n.__metadata("design:type",p.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),a=e(43718),p=e(69635),v=e(49867);let m=class extends a.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=m,n.__decorate([(0,r.Autowired)(o.AbstractMenuService),n.__metadata("design:type",o.AbstractMenuService)],m.prototype,"menuService",void 0),n.__decorate([(0,r.Autowired)(p.ICommentsService),n.__metadata("design:type",Object)],m.prototype,"commentService",void 0),n.__decorate([a.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],m.prototype,"commentThreadTitle",null),n.__decorate([a.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],m.prototype,"commentThreadContext",null),t.CommentsZoneService=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[v.CommentsThread])],m)},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)),a=n.__importDefault(e(25873)),p=e(76003),v=e(41869),m=e(25918),_=e(93899),s=e(20303),g=e(69635),l=e(37357),h=e(42018),u=e(73804),d=n.__importDefault(e(38877)),E=({thread:c,widget:y})=>{const{contextKeyService:b}=c,A=(0,v.useAutorun)(c.comments),S=(0,v.useAutorun)(c.threadHeaderTitle),I=(0,v.useInjectable)(p.INJECTOR_TOKEN).get(u.CommentsZoneService,[c]),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(c.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(c.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)(c.options.threadClassName,d.default.comment_container)},o.default.createElement("div",{className:(0,r.default)(c.options.threadHeadClassName,d.default.head)},o.default.createElement("div",{className:d.default.review_title},S),o.default.createElement(m.InlineActionBar,{menus:x,context:[{thread:c,widget:y,menuId:_.MenuId.CommentsCommentThreadTitle}],separator:"inline",type:"icon"})),o.default.createElement("div",{className:d.default.comment_body},A.length>0?o.default.createElement(l.CommentItem,{widget:y,commentThreadContext:k,thread:c}):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:d.default.comment_bottom_actions},o.default.createElement(m.InlineActionBar,{className:d.default.comment_reply_actions,separator:"inline",type:"button",context:[{text:R,widget:y,thread:c,menuId:_.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=a.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}))),this.addDispose({dispose:()=>{var I;(I=this.wrapperRoot)===null||I===void 0||I.unmount(),this.wrapperRoot=void 0}})}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,p.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],f.prototype,"appConfig",void 0),n.__decorate([(0,p.Autowired)(g.ICommentsFeatureRegistry),n.__metadata("design:type",Object)],f.prototype,"commentsFeatureRegistry",void 0),t.CommentsZoneWidget=f=n.__decorate([(0,p.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),a=e(93899),p=e(57517),v=e(63067),m=e(69635),_=e(47842);let s=class extends o.Disposable{onStart(){this.registerCommentsFeature(),this.listenToCreateCommentsPanel(),this.commentsService.init()}get panelBadge(){const l=this.commentsService.commentsThreads.length;return l?l+"":""}registerCommands(l){l.registerCommand({id:m.CollapseId,label:"%comments.panel.action.collapse%",iconClass:(0,o.getIcon)("collapse-all")},{execute:()=>{this.commentModelService.collapsedAll()}}),l.registerCommand({id:m.CloseThreadId,label:"%comments.thread.action.close%",iconClass:(0,o.getIcon)("up")},{execute:h=>{const{thread:u,widget:d}=h;u.comments.get().length?d.isShow&&d.toggle():u.dispose()}}),l.registerCommand({id:m.SwitchCommandReaction},{execute:h=>{this.eventBus.fire(new m.CommentReactionClick(h))}})}registerMenus(l){l.registerMenuItem(a.MenuId.CommentsCommentThreadTitle,{command:m.CloseThreadId,group:"inline",order:Number.MAX_SAFE_INTEGER})}registerToolbarItems(l){l.registerItem({id:m.CollapseId,viewId:m.CommentPanelId,command:m.CollapseId,tooltip:(0,o.localize)("comments.panel.action.collapse")})}registerCommentsFeature(){this.contributions.getContributions().forEach((l,h)=>{this.addDispose(this.commentsService.registerCommentRangeProvider(`contribution_${h}`,{getCommentingRanges:u=>l.provideCommentingRanges(u)})),l.registerCommentsFeature&&l.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 l=this.layoutService.getTabbarHandler(m.CommentPanelId);l?.setBadge(this.panelBadge)},this))}registerEditorFeature(l){l.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)(m.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)(m.ICommentsFeatureRegistry),n.__metadata("design:type",Object)],s.prototype,"commentsFeatureRegistry",void 0),n.__decorate([(0,r.Autowired)(m.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)(_.CommentModelService),n.__metadata("design:type",_.CommentModelService)],s.prototype,"commentModelService",void 0),t.CommentsBrowserContribution=s=n.__decorate([(0,o.Domain)(o.ClientAppContribution,p.BrowserEditorContribution,o.CommandContribution,o.TabBarToolbarContribution,a.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)),a=e(76003),p=e(41869),v=e(54414),m=e(57517),_=e(63067),s=e(20868),g=n.__importStar(e(20868)),l=e(62663),h=e(52416),u=n.__importStar(e(24347)),d=e(69635),E=e(53878),f=e(49867),c=e(53711);let y=class extends p.Disposable{constructor(){super(...arguments),this.decorationChangeEmitter=new p.Emitter,this.threads=new Map,this.threadsChangeEmitter=new p.Emitter,this.threadsCommentChangeEmitter=new p.Emitter,this.commentRangeProviderChangeEmitter=new p.Emitter,this.onDidChangeCurrentCommentThreadEmitter=new p.Emitter,this.threadsCreatedEmitter=new p.Emitter,this.rangeProviderMap=new Map,this.rangeOwner=new Map,this.providerDecorationCache=new p.LRUCache(1e4),this.commentRangeDecorationMap=new Map,this.shouldShowCommentsSchemes=new Set(["file","git","diff"]),this.decorationProviderDisposer=p.Disposable.NULL,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===d.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){var S;const D=new p.Disposable;this.allEditors.some(T=>T.monacoEditor===A.monacoEditor)&&((S=this.editorDisposerMap.get(A.monacoEditor.getId()))===null||S===void 0||S.dispose(),this.editorDisposerMap.set(A.monacoEditor.getId(),D)),this.editorDisposerMap.set(A.monacoEditor.getId(),D),this.allEditors.push(A),this.editor=A;let I=[],w=!1;return D.addDispose(A.monacoEditor.onMouseDown(T=>{if(T.target.type===l.monacoBrowser.editor.MouseTargetType.GUTTER_LINE_DECORATIONS&&T.target.element&&T.target.element.className.indexOf("comment-add")>-1){const{target:R}=T;if(R&&R.range){const{range:M}=R;this.startCommentRange=M,T.event.stopPropagation()}}else if(T.target.type===l.monacoBrowser.editor.MouseTargetType.GUTTER_GLYPH_MARGIN&&T.target.element&&T.target.element.className.indexOf("comment-thread")>-1){const{target:R}=T;if(R&&R.range){const{range:M}=R,O=this.commentsThreads.filter(x=>A.currentUri&&x.uri.isEqual(A.currentUri)&&x.range.endLineNumber===M.endLineNumber);O.length&&(O.some(k=>k.isShowWidget(A))?O.forEach(k=>k.hide(A)):O.forEach(k=>k.show(A)))}T.event.stopPropagation()}})),D.addDispose(A.monacoEditor.onMouseUp(async T=>{if(this.startCommentRange){if(w){this.renderCommentRange(A),w=!1,this.startCommentRange=null,this.endCommentRange=null;return}let R=this.startCommentRange;this.endCommentRange&&(this.endCommentRange.startLineNumber<this.startCommentRange.startLineNumber?(R.startColumn=this.endCommentRange.startColumn,R.startLineNumber=this.endCommentRange.startLineNumber):(R.endColumn=this.endCommentRange.endColumn,R.endLineNumber=this.endCommentRange.endLineNumber)),A.currentUri&&(R=await this.getValidRange(R,A.currentUri)),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),T.event.stopPropagation())}else if(T.target.type===l.monacoBrowser.editor.MouseTargetType.GUTTER_LINE_DECORATIONS&&T.target.element&&T.target.element.className.indexOf("comment-range")>-1&&T.target.element.className.indexOf("comment-thread")<0){const{target:R}=T,M=R.range;M&&(this.commentsThreads.some(O=>O.comments.get().length===0&&A.currentUri&&O.uri.isEqual(A.currentUri)&&O.range.startLineNumber===M.startLineNumber&&O.range.endLineNumber===M.endLineNumber)||this.createThread(A.currentUri,M).show(A),T.event.stopPropagation())}this.startCommentRange=null,this.endCommentRange=null})),D.addDispose(A.monacoEditor.onMouseMove(async T=>{var R,M,O;const x=A.currentUri,k=T.target.range;if(this.startCommentRange){if(!((R=T.target.element)===null||R===void 0)&&R.className||!((O=(M=T.target.element)===null||M===void 0?void 0:M.offsetParent)===null||O===void 0)&&O.className.includes("diff-hidden-lines")&&(w=!0),x&&k){let F={startLineNumber:this.startCommentRange.startLineNumber,endLineNumber:k.endLineNumber,startColumn:this.startCommentRange.startColumn,endColumn:k.endColumn};this.startCommentRange.startLineNumber>k.startLineNumber&&(F={startLineNumber:k.startLineNumber,endLineNumber:this.startCommentRange.endLineNumber,startColumn:k.startColumn,endColumn:this.startCommentRange.endColumn}),this.renderCommentRange(A,F),this.endCommentRange=k}}else if(x&&k&&await this.shouldShowHoverDecoration(x,k)){const F=[{range:(0,s.positionToRange)(k.startLineNumber),options:this.createHoverDecoration()}];I=A.monacoEditor.deltaDecorations(I,F)}})),D.addDispose(A.monacoEditor.onMouseLeave(async T=>{var R;const M=(R=T.target)===null||R===void 0?void 0:R.range,O=[];!this.startCommentRange&&M&&O.push({range:(0,s.positionToRange)(M.startLineNumber),options:this.createCommentRangeDecoration()}),I=A.monacoEditor.deltaDecorations(I,O)})),D.addDispose(this.onCommentRangeProviderChange(()=>{this.renderCommentRange(A)})),D.addDispose(p.Event.any(this.onThreadsChanged,this.onThreadsCommentChange,this.onThreadsCreated)(T=>{const R=this.getCurrentEditor(T.uri);R&&this.renderCommentRange(R),this.updateActiveThreadDecoration(void 0)})),D.addDispose(this.onDidChangeCurrentCommentThread(T=>{this.updateActiveThreadDecoration(T)})),this.tryUpdateReservedSpace(A),D.addDispose(A.monacoEditor.onDidChangeModel(T=>{var R;const{newModelUrl:M}=T;M&&this.editorCollectionService.listMultiDiffEditors()[0]&&((R=A.updateDocumentModel)===null||R===void 0||R.call(A,p.URI.from(M))),this.renderCommentRange(A),this.tryUpdateReservedSpace(A)})),D}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)})}async 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=await this.getContributionRanges(A.currentUri);if(D.length>0){const I=[];D.map(T=>{if(S.startLineNumber===0&&S.endLineNumber===0)I.push({range:T,options:this.createCommentRangeDecoration()});else if(S.startLineNumber<=T.startLineNumber&&S.endLineNumber>=T.endLineNumber)I.push({range:T,options:this.createDottedRangeDecoration()},{range:T,options:this.createThreadRangeDecoration()});else if(S.endLineNumber>=T.endLineNumber)if(S.startLineNumber<=T.endLineNumber){const R={startLineNumber:S.startLineNumber,endLineNumber:T.endLineNumber,startColumn:S.startColumn,endColumn:S.endColumn},M={startLineNumber:T.startLineNumber,endLineNumber:R.startLineNumber-1,startColumn:T.startColumn,endColumn:R.endColumn};I.push({range:M,options:this.createCommentRangeDecoration()},{range:R,options:this.createDottedRangeDecoration()},{range:R,options:this.createThreadRangeDecoration()})}else I.push({range:T,options:this.createCommentRangeDecoration()});else if(S.endLineNumber<T.endLineNumber)if(S.endLineNumber>=T.startLineNumber)if(S.startLineNumber>=T.startLineNumber){const R={startLineNumber:T.startLineNumber,startColumn:T.startColumn,endLineNumber:S.startLineNumber-1,endColumn:S.startColumn},M={startLineNumber:S.endLineNumber+1,startColumn:S.endColumn,endLineNumber:T.endLineNumber,endColumn:T.endColumn},O=S.startLineNumber!==T.startLineNumber?[{range:R,options:this.createCommentRangeDecoration()}]:[];O.push({range:S,options:this.createDottedRangeDecoration()}),O.push({range:S,options:this.createThreadRangeDecoration()}),O.push({range:M,options:this.createCommentRangeDecoration()}),I.push(...O)}else{const R={startLineNumber:T.startLineNumber,startColumn:T.startColumn,endLineNumber:S.endLineNumber,endColumn:S.endColumn},M={startLineNumber:R.endLineNumber+1,startColumn:R.endColumn,endLineNumber:T.endLineNumber,endColumn:T.endColumn};I.push({range:R,options:this.createDottedRangeDecoration()},{range:R,options:this.createThreadRangeDecoration()},{range:M,options:this.createCommentRangeDecoration()})}else I.push({range:T,options:this.createCommentRangeDecoration()})});const w=this.commentRangeDecorationMap.get(A.currentUri.toString())||[];this.commentRangeDecorationMap.set(A.currentUri.toString(),A.monacoEditor.deltaDecorations(w,I))}else this.commentRangeDecorationMap.set(A.currentUri.toString(),[])}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 p.URI(this.appConfig.workspaceDir),O=new p.URI(w),x=(T=M.relative(O))===null||T===void 0?void 0:T.toString();S.push(new c.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 c.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,p.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 c.CommentReplyNode(this,D,(0,p.formatLocalize)("comment.reply.count",T?.length||0),(0,p.formatLocalize)("comment.reply.lastReply",R),"",A.resource,A)),S}async resolveChildren(A){let S=[];if(A?c.CommentRoot.isRoot(A)?S=this.handleCommentFileNode(A):c.CommentFileNode.is(A)?S=this.handleCommentContentNode(A):c.CommentContentNode.is(A)&&(S=this.handleCommentReplyNode(A)):S.push(new c.CommentRoot(this)),S.length===1&&c.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 p.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=>{const S=this.commentsThreads.filter(w=>w.uri.codeUri.path===A.codeUri.path),D=this.editorCollectionService.listMultiDiffEditors();if(D.length>0){const w=D[0];console.log("currentEditor =>",w)}for(const w of S)w.show();return S.filter(w=>{const T=w.uri.isEqual(A);return this.filterThreadDecoration?T&&this.filterThreadDecoration(w):T}).map(w=>({range:{startLineNumber:w.range.endLineNumber,endLineNumber:w.range.endLineNumber,startColumn:w.range.endColumn,endColumn:w.range.endColumn},options:this.createThreadDecoration(w)}))}}),this.addDispose(this.decorationProviderDisposer)}registerCommentPanel(){this.layoutService.getTabbarHandler(d.CommentPanelId)||this.layoutService.collectTabbarComponent([{id:d.CommentPanelId,component:E.CommentsPanel}],{badge:this.panelBadge,containerId:d.CommentPanelId,title:(0,p.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(),p.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,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],y.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(p.AppConfig),n.__metadata("design:type",Object)],y.prototype,"appConfig",void 0),n.__decorate([(0,a.Autowired)(m.IEditorDecorationCollectionService),n.__metadata("design:type",Object)],y.prototype,"editorDecorationCollectionService",void 0),n.__decorate([(0,a.Autowired)(h.IIconService),n.__metadata("design:type",Object)],y.prototype,"iconService",void 0),n.__decorate([(0,a.Autowired)(p.LabelService),n.__metadata("design:type",p.LabelService)],y.prototype,"labelService",void 0),n.__decorate([(0,a.Autowired)(d.ICommentsFeatureRegistry),n.__metadata("design:type",Object)],y.prototype,"commentsFeatureRegistry",void 0),n.__decorate([(0,a.Autowired)(m.IEditorDocumentModelService),n.__metadata("design:type",Object)],y.prototype,"documentService",void 0),n.__decorate([(0,a.Autowired)(_.IMainLayoutService),n.__metadata("design:type",Object)],y.prototype,"layoutService",void 0),n.__decorate([(0,a.Autowired)(m.WorkbenchEditorService),n.__metadata("design:type",m.WorkbenchEditorService)],y.prototype,"workbenchEditorService",void 0),n.__decorate([(0,a.Autowired)(v.EditorCollectionService),n.__metadata("design:type",v.EditorCollectionService)],y.prototype,"editorCollectionService",void 0),n.__decorate([(0,a.Autowired)(m.ResourceService),n.__metadata("design:type",m.ResourceService)],y.prototype,"resourceService",void 0),n.__decorate([p.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],y.prototype,"isMultiCommentsForSingleLine",null),n.__decorate([p.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],y.prototype,"currentAuthorAvatar",null),n.__decorate([p.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],y.prototype,"filterThreadDecoration",null),t.CommentsService=y=n.__decorate([(0,a.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),a=e(69635),p=e(66480),v=e(62604),m=e(55011),_=e(47842);let s=class extends o.BrowserModule{constructor(){super(...arguments),this.contributionProvider=a.CommentsContribution,this.providers=[{token:a.ICommentsService,useClass:m.CommentsService},{token:_.CommentModelService,useClass:_.CommentModelService},{token:a.ICommentsFeatureRegistry,useClass:p.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=`
31899
31899
  h1, h2, h3, h4, h5, h6, p {
31900
31900
  color: var(--foreground);
31901
31901
  word-break: break-all;
@@ -31919,7 +31919,7 @@ img {
31919
31919
  a {
31920
31920
  color: var(--textLink-foreground);
31921
31921
  }
31922
- `},73136:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMentionBoxStyle=void 0;const e=20,n=({maxRows:r=10,minRows:o=2})=>({control:{fontSize:12},highlighter:{overflow:"hidden"},input:{margin:0},"&multiLine":{control:{border:"none"},highlighter:{padding:9},input:{boxSizing:"content-box",padding:"8px 0",lineHeight:`${e}px`,minHeight:`${e*o}px`,maxHeight:`${e*r}px`,outline:0,border:0,overflowY:"auto"}},suggestions:{dataA:"aaa",list:{backgroundColor:"var(--kt-selectDropdown-background)",fontSize:12,maxHeight:200,overflowY:"auto"},item:{backgroundColor:"var(--kt-selectDropdown-background)",color:"var(--kt-selectDropdown-foreground)",padding:"4px 16px","&focused":{backgroundColor:"var(--kt-selectDropdown-selectionBackground)"}}}});t.getMentionBoxStyle=n},5167:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.COMMENT_TREE_NODE_HEIGHT=t.CommentNodeRendered=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(41869),p=e(53711),v=n.__importDefault(e(65887)),m=({item:_,defaultLeftPadding:s=8,leftPadding:g=8,decorations:l,onClick:h,onTwistierClick:u})=>{const d=(0,a.useDesignStyles)(v.default.expansion_toggle,"expansion_toggle"),E=(0,o.useCallback)(T=>{_.onSelect?_.onSelect(_):h(T,_)},[h]),f=(0,o.useCallback)(T=>{u(T,_)},[u]),c=`${s+(_.depth||0)*(g||0)+(p.CommentContentNode.is(_)?16:p.CommentFileNode.is(_)?0:28)}px`,y={height:t.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${t.COMMENT_TREE_NODE_HEIGHT}px`,paddingLeft:c},b=(0,o.useCallback)(T=>{if(p.CommentContentNode.is(T)||p.CommentFileNode.is(T))return o.default.createElement("div",{className:(0,r.default)(v.default.icon,T.icon),style:{height:t.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${t.COMMENT_TREE_NODE_HEIGHT}px`}})},[]),A=(0,o.useCallback)(T=>p.CommentContentNode.is(T)?o.default.createElement("div",{className:(0,r.default)(v.default.segment,v.default.displayname)},T.renderedLabel?T.renderedLabel:o.default.createElement(o.default.Fragment,null,T.comment,o.default.createElement("span",{className:v.default.separator},"\xB7"),T.author.name)):o.default.createElement("div",{className:(0,r.default)(v.default.segment,v.default.displayname)},T.renderedLabel),[]),S=(0,o.useCallback)(T=>o.default.createElement("div",{className:(0,r.default)(v.default.segment_grow,v.default.description)},T.renderedDescription),[]),D=(0,o.useCallback)(T=>o.default.createElement("div",{onClick:f,className:(0,r.default)(v.default.segment,d,(0,a.getIcon)("arrow-right"),{[`${v.default.mod_collapsed}`]:!T.expanded})}),[f]),I=(0,o.useCallback)(T=>{if(p.CommentFileNode.is(T)||T?.isAllowToggle)return D(T)},[]),w=(0,o.useCallback)(()=>_.tooltip,[_]);return o.default.createElement("div",{key:_.id,onClick:E,title:w(),className:(0,r.default)(v.default.comment_node,l?l.classlist:null),style:y,"data-id":_.id},o.default.createElement("div",{className:v.default.content},I(_),b(_),o.default.createElement("div",{className:v.default.overflow_wrap},A(_),S(_))))};t.CommentNodeRendered=m,t.COMMENT_TREE_NODE_HEIGHT=22},47842:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentModelService=t.CommentTreeModel=void 0;const n=e(85608),r=e(76003),o=e(97267),a=e(41869),p=e(23418),v=e(69635),m=e(53711),_=n.__importDefault(e(65887));let s=class extends o.TreeModel{constructor(h){super(),this.init(h)}};t.CommentTreeModel=s,t.CommentTreeModel=s=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[m.CommentRoot])],s);let g=class extends a.Disposable{constructor(){super(),this.selectedDecoration=new o.Decoration(_.default.mod_selected),this.focusedDecoration=new o.Decoration(_.default.mod_focused),this._selectedNodes=[],this.onDidUpdateTreeModelEmitter=new a.Emitter,this.disposableCollection=new a.DisposableCollection,this.applyFocusedDecoration=(h,u=!0)=>{var d;if(h){for(const E of this._selectedNodes)this.selectedDecoration.removeTarget(E);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(h),this.focusedDecoration.addTarget(h),this._focusedNode=h,this._selectedNodes=[h],u&&((d=this.treeModel)===null||d===void 0||d.dispatchChange())}},this.removeFocusedDecoration=()=>{var h;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),(h=this.treeModel)===null||h===void 0||h.dispatchChange()),this._focusedNode=null},this.handleTreeBlur=()=>{this.removeFocusedDecoration()},this.handleTwistierClick=async(h,u)=>{(m.CommentFileNode.is(u)||u?.isAllowToggle)&&this.toggleDirectory(u)},this.handleItemClick=async(h,u)=>{this.applyFocusedDecoration(u),(m.CommentFileNode.is(u)||u?.isAllowToggle)&&this.toggleDirectory(u);let d,E;u instanceof m.CommentReplyNode||u instanceof m.CommentContentNode?(d=u.thread.uri,E=u.thread.range):d=u.resource,this.editorService.open(d,{range:E}).then(()=>{u.thread&&u.thread.show()})},this.toggleDirectory=h=>{h.expanded?this.commentTreeHandle.collapseNode(h):this.commentTreeHandle.expandNode(h)},this._whenReady=this.initTreeModel()}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get whenReady(){return this._whenReady}get commentTreeHandle(){return this._commentTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}async initTreeModel(){const h=await this.commentService.resolveChildren();if(!h)return;const u=h[0];u&&(this._treeModel=this.injector.get(s,[u]),await this._treeModel.ensureReady,this.initDecorations(u),this.disposables.push(a.Event.any(this.commentService.onThreadsCommentChange,this.commentService.onThreadsChanged,this.commentService.onThreadsCreated)(()=>{this.refresh()})),this.onDidUpdateTreeModelEmitter.fire(this._treeModel))}initDecorations(h){return this._decorations=new o.DecorationsManager(h),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations}handleTreeHandler(h){this._commentTreeHandle=h}async refresh(){await this.whenReady,(0,a.runWhenIdle)(()=>{this.treeModel.root.refresh()})}async collapsedAll(){return await this.whenReady,this.treeModel.root.collapsedAll()}dispose(){this.disposableCollection.dispose()}};t.CommentModelService=g,n.__decorate([(0,r.Autowired)(v.ICommentsService),n.__metadata("design:type",Object)],g.prototype,"commentService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],g.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],g.prototype,"editorService",void 0),t.CommentModelService=g=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],g)},53711:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentReplyNode=t.CommentContentNode=t.CommentFileNode=t.CommentRoot=void 0;const n=e(97267);class r extends n.CompositeTreeNode{static is(m){return!!m&&!m.parent}constructor(m){super(m,void 0)}get expanded(){return!0}}t.CommentRoot=r;class o extends n.CompositeTreeNode{static is(m){return n.CompositeTreeNode.is(m)&&"threads"in m}constructor(m,_,s="",g,l,h,u){super(m,u),this.threads=_,this.tooltip=g,this.icon=l,this.resource=h,this.isExpanded=!0,this._renderedLabel=this.resource.displayName,this._renderedDescription=s}set label(m){this._renderedLabel=m}set description(m){this._renderedDescription=m}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(m){this._onSelectHandler=m}get onSelect(){return this._onSelectHandler}}t.CommentFileNode=o;class a extends n.CompositeTreeNode{static is(m){return n.CompositeTreeNode.is(m)&&"author"in m}constructor(m,_,s,g="",l,h,u,d){super(m,d),this.thread=_,this.comment=s,this.icon=l,this.author=h,this.resource=u,this._renderedDescription=g,this.isExpanded=!0,this._isAllowToggle=!1}get isAllowToggle(){return this._isAllowToggle}setIsAllowToggle(m){this._isAllowToggle=m}set label(m){this._renderedLabel=m}set description(m){this._renderedDescription=m}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(m){this._onSelectHandler=m}get onSelect(){return this._onSelectHandler}}t.CommentContentNode=a;class p extends n.TreeNode{constructor(m,_,s,g="",l,h,u){super(m,u),this.thread=_,this.icon=l,this.resource=h,this._renderedLabel=s,this._renderedDescription=g}set label(m){this._renderedLabel=m}set description(m){this._renderedDescription=m}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(m){this._onSelectHandler=m}get onSelect(){return this._onSelectHandler}}t.CommentReplyNode=p},69635:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentReactionClick=t.CommentPanelCollapse=t.SwitchCommandReaction=t.CloseThreadId=t.CollapseId=t.ICommentsService=t.CommentsContribution=t.ICommentsFeatureRegistry=t.CommentPanelId=t.CommentGutterType=t.CommentThreadCollapsibleState=t.CommentMode=void 0;const n=e(41869);var r;(function(m){m[m.Editor=0]="Editor",m[m.Preview=1]="Preview"})(r||(t.CommentMode=r={}));var o;(function(m){m[m.Collapsed=0]="Collapsed",m[m.Expanded=1]="Expanded"})(o||(t.CommentThreadCollapsibleState=o={}));var a;(function(m){m.Thread="thread",m.Empty="empty"})(a||(t.CommentGutterType=a={})),t.CommentPanelId="CommentPanel",t.ICommentsFeatureRegistry=Symbol("ICommentsFeatureRegistry"),t.CommentsContribution=Symbol("CommentsContribution"),t.ICommentsService=Symbol("ICommentsService"),t.CollapseId="comments.panel.action.collapse",t.CloseThreadId="comments.thread.action.close",t.SwitchCommandReaction="comments.comment.action.switchCommand";class p extends n.BasicEvent{}t.CommentPanelCollapse=p;class v extends n.BasicEvent{}t.CommentReactionClick=v},86077:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(69635),t)},79383:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Badge=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041));e(4418);const a=({className:p,children:v,...m})=>o.default.createElement("span",{className:(0,r.default)("kt-badge",p),...m},v);t.Badge=a},48412:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Button=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(99613),p=e(54713);e(71682);const v=()=>o.default.createElement("svg",{viewBox:"0 0 1024 1024",focusable:"false",className:"kt-button-anticon-spin","data-icon":"loading",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},o.default.createElement("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}));function m(){}t.Button=o.default.memo(({children:_,loading:s,className:g,type:l="primary",htmlType:h,size:u,ghost:d=!1,onClick:E,disabled:f,block:c,iconClass:y,icon:b,more:A,moreIconClass:S,menu:D,moreVisible:I,placement:w,title:T,showLoadingIcon:R=!0,onVisibleChange:M,...O})=>{const x=(0,r.default)("kt-button",g,{[`kt-${l}-button-loading`]:s,[`ghost-${l}-button`]:d&&!s&&l!=="link",[`${l}-button`]:l,[`${u}-button-size`]:u,"ghost-button":d&&l!=="link","block-button":c}),k=(0,r.default)(g,{"kt-clickable-icon":!!E});if(l==="icon")return o.default.createElement(p.Icon,{tooltip:T,disabled:f,icon:b,onClick:s||f?m:E,className:k,iconClass:y,...O});const F=y?o.default.createElement(p.Icon,{iconClass:y,disabled:f}):null;return D?o.default.createElement(a.Dropdown,{visible:I,className:"kt-menu",overlay:D,trigger:["click"],onVisibleChange:M,placement:w},o.default.createElement("button",{...O,disabled:f,className:x,type:h,onClick:s||f?m:E},s&&l!=="link"&&R&&o.default.createElement(v,null),F&&F,_,A&&o.default.createElement(p.Icon,{iconClass:S||(0,p.getIcon)("down"),className:"kt-button-secondary-more"}))):o.default.createElement("button",{...O,disabled:f,className:x,type:h,onClick:s||f?m:E},s&&l!=="link"&&R&&o.default.createElement(v,null),F&&F,_)})},7273:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckBox=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(65973);e(6099);const p=()=>o.default.createElement("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},o.default.createElement("path",{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"})),v=({insertClass:m,className:_,label:s,size:g="default",disabled:l,checked:h,wrapTabIndex:u,...d})=>{(0,a.warning)(!m,"`insertClass` was deprecated, please use `className` instead");const E=d;return E.checked=h??!1,o.default.createElement("label",{className:(0,r.default)("kt-checkbox",m,_,{"kt-checkbox-large":g==="large","kt-checkbox-disabled":l}),tabIndex:u},o.default.createElement("span",{className:"kt-checkbox-lump"},o.default.createElement("input",{type:"checkbox",disabled:l,...E}),o.default.createElement("span",{className:"kt-checkbox-icon"},o.default.createElement(p,null))),s||" ")};t.CheckBox=v,t.CheckBox.displayName="OpenSumiCheckBox"},58998:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClickOutside=void 0;const r=e(85608).__importDefault(e(14041)),o=({mouseEvents:a=["click"],onOutsideClick:p,children:v,...m})=>{const _=r.default.useRef(null),s=r.default.useCallback(g=>{_.current&&g.target&&!_.current.contains(g.target)&&p(g)},[p]);return r.default.useEffect(()=>(a.forEach(g=>{window.addEventListener(g,s,!0)}),()=>{a.forEach(g=>{window.removeEventListener(g,s,!0)})}),[a]),r.default.createElement("div",{...m,ref:_},v)};t.ClickOutside=o},50570:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageType=void 0;var e;(function(n){n[n.Error=0]="Error",n[n.Warning=1]="Warning",n[n.Info=2]="Info",n[n.Empty=3]="Empty"})(e||(t.MessageType=e={}))},89832:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Dialog=t.DialogContent=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(43718),p=e(48412),v=e(54713),m=e(79024);e(65773);const _=({onCancel:l,onOk:h,cancelText:u,okText:d})=>o.default.createElement(o.default.Fragment,null,o.default.createElement(p.Button,{onClick:l,type:"secondary"},u||(0,a.localize)("ButtonCancel")),o.default.createElement(p.Button,{onClick:h},d||(0,a.localize)("ButtonOK"))),s=({onClose:l,closable:h,type:u="confirm",messageType:d=a.MessageType.Info,icon:E,message:f,buttons:c,title:y,onOk:b,onCancel:A,okText:S,cancelText:D})=>{const{getIcon:I}=o.default.useContext(v.IconContext);return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-dialog-content"},E&&o.default.createElement("div",{style:{color:E.color},className:(0,r.default)("kt-dialog-icon",(0,v.getIcon)(E.className)||I(E.className))}),o.default.createElement("div",{className:"kt-dialog-content_area"},o.default.createElement("div",{className:"kt-dialog-content_title"},y),f&&o.default.createElement("span",{className:"kt-dialog-message"},f)),h&&u!=="basic"&&o.default.createElement("button",{className:(0,r.default)("kt-dialog-closex",(0,v.getIcon)("close")),onClick:l})),d!==a.MessageType.Empty&&u!=="basic"&&o.default.createElement("div",{className:"kt-dialog-buttonWrap"},u==="confirm"?c||o.default.createElement(_,{onCancel:A,onOk:b,okText:S,cancelText:D}):o.default.createElement(p.Button,{onClick:l},"OK")))};t.DialogContent=s;const g=({visible:l,onClose:h,closable:u,afterClose:d,messageType:E,icon:f,message:c,detail:y,buttons:b,type:A="confirm",title:S,onOk:D,onCancel:I,okText:w,cancelText:T,getContainer:R,keyboard:M,...O})=>o.default.createElement(m.Overlay,{visible:l,onClose:h,title:A==="basic"?S:null,closable:A==="basic",getContainer:R,keyboard:M,footer:A==="basic"?b||o.default.createElement(_,{onCancel:I,onOk:D,okText:w,cancelText:T}):void 0,afterClose:d,...O},o.default.createElement(t.DialogContent,{title:c,message:y,buttons:b,visible:l,icon:f,...O}));t.Dialog=g},99665:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(62596)),o=n.__importDefault(e(53373)),a=n.__importStar(e(14041)),p=e(48412),v=n.__importDefault(e(35060)),m=_=>{var s;const{prefixCls:g,type:l="primary",size:h="default",danger:u,disabled:d,loading:E,onClick:f,htmlType:c,children:y,className:b,overlay:A,trigger:S,align:D,visible:I,onVisibleChange:w,placement:T,getPopupContainer:R,href:M,icon:O=a.createElement(r.default,null),title:x,buttonsRender:k=H=>H,mouseEnterDelay:F,mouseLeaveDelay:L,overlayClassName:B,overlayStyle:U,...W}=_,j=g||"kt-dropdown-button",Q={align:D,overlay:A,disabled:d,trigger:d?[]:S,getPopupContainer:R,mouseEnterDelay:F,mouseLeaveDelay:L,overlayClassName:B,overlayStyle:U};Q.placement=(s=_?.placement)!==null&&s!==void 0?s:"bottomRight";const G=a.createElement(p.Button,{size:h,type:l,disabled:d,loading:E,onClick:f,htmlType:c,title:x},y),Z=a.createElement(p.Button,{size:h,type:l},O??a.createElement(r.default,null)),[$,V]=k([G,Z]);return a.createElement("div",{...W,className:(0,o.default)(j,b)},$,a.createElement(v.default,{...Q},V))};t.default=m},35060:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(64797)),o=n.__importDefault(e(53373)),a=n.__importDefault(e(5147)),p=n.__importDefault(e(14041)),v=e(43953),m=e(65973),_=(0,v.tuple)("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight");class s extends p.default.Component{constructor(){super(...arguments),this.renderOverlay=l=>{const{overlay:h}=this.props;let u;typeof h=="function"?u=h():u=h,u=p.default.Children.only(u);const d=u.props;(0,m.warning)(!d.mode||d.mode==="vertical",`[Dropdown] mode="${d.mode}" is not supported for Dropdown's Menu.`);const{selectable:E=!1,focusable:f=!0}=d,c=p.default.createElement("span",{className:`${l}-menu-submenu-arrow`},p.default.createElement(r.default,{className:`${l}-menu-submenu-arrow-icon`}));return typeof u.type=="string"?h:p.default.cloneElement(u,{mode:"vertical",selectable:E,focusable:f,expandIcon:c})},this.renderDropDown=()=>{const{prefixCls:l,children:h,trigger:u,disabled:d,getPopupContainer:E}=this.props,f=l||"kt-dropdown",c=p.default.Children.only(h),y=p.default.cloneElement(c,{className:(0,o.default)(c.props.className,`${f}-trigger`),disabled:d}),b=d?[]:u;let A;return b&&b.indexOf("contextMenu")!==-1&&(A=!0),p.default.createElement(a.default,{alignPoint:A,...this.props,prefixCls:f,getPopupContainer:E,transitionName:this.getTransitionName(),trigger:b,overlay:()=>this.renderOverlay(f)},y)}}getTransitionName(){const{placement:l="",transitionName:h}=this.props;return h!==void 0?h:l.indexOf("top")>=0?"slide-down":"slide-up"}render(){return this.renderDropDown()}}s.defaultProps={mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft"},t.default=s},99613:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DropdownButton=t.Dropdown=void 0;const n=e(85608),r=n.__importDefault(e(35060));t.Dropdown=r.default;const o=n.__importDefault(e(99665));t.DropdownButton=o.default,e(34643)},80564:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=t._InternalIcon=t.IconContext=void 0,t.IconContextProvider=v;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(12122),p=e(76577);e(1914),t.IconContext=o.default.createContext({getIcon:(_,s)=>_});function v(_){return o.default.createElement(t.IconContext.Provider,{value:_.value},o.default.createElement(t.IconContext.Consumer,null,s=>_.value===s?_.children:null))}const m=function(_,s){const{size:g="small",loading:l,icon:h,iconClass:u,className:d,tooltip:E,rotate:f,anim:c,fill:y,disabled:b,onClick:A,children:S,resourceOptions:D,animate:I,style:w={},...T}=_,R={rotate:f,anim:c,fill:y};let M;if(h)if(a.defaultIconMap[h])M=(0,p.getIcon)(h,R);else{const{getIcon:O,getResourceIcon:x}=o.default.useContext(t.IconContext);D&&x?M=x(h,D):M=O(h,R)}else M=u;return I&&I==="spin"&&(w.animation="kt-icon-spin 1.5s steps(30) infinite"),o.default.createElement("span",{...T,title:E,onClick:A,ref:s,className:(0,r.default)("kt-icon",M,d,{"kt-icon-loading":l,"kt-icon-disabled":!!b,[`kt-icon-${g}`]:!!g,"kt-icon-clickable":!!A,"kt-icon-resource":!!D,expanded:!!D&&D.isOpenedDirectory}),style:w},S)};t._InternalIcon=o.default.memo(o.default.forwardRef(m)),t.Icon=o.default.memo(o.default.forwardRef(m))},10391:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFromIconfontCN=g;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(80564),p=e(76577),v=new Set;function m(l){return!!(typeof l=="string"&&l.length&&!v.has(l))}function _(l,h=0){const u=l[h];if(m(u)){const d=document.createElement("script");d.setAttribute("src",u),d.setAttribute("data-namespace",u),l.length>h+1&&(d.onload=()=>{_(l,h+1)},d.onerror=()=>{_(l,h+1)}),v.add(u),document.body.appendChild(d)}}const s={width:"1em",height:"1em",fill:"currentColor"};function g(l={}){const{scriptUrl:h,extraCommonProps:u={}}=l;h&&typeof document<"u"&&typeof window<"u"&&typeof document.createElement=="function"&&(Array.isArray(h)?_(h.reverse()):_([h]));const d=o.default.forwardRef((E,f)=>{const{icon:c,children:y,rotate:b,anim:A,fill:S,className:D="",...I}=E,w={rotate:b,anim:A,fill:S};let T=null;c&&(T=o.default.createElement("svg",{...s,focusable:"false"},o.default.createElement("use",{xlinkHref:`#${c}`}))),y&&(T=y);const R=(0,p.getIconShapeClxList)(w);return o.default.createElement(a._InternalIcon,{...u,...I,className:(0,r.default)(D,R),ref:f},T)});return d.displayName="Iconfont",d}},12122:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iconManager=t.defaultIconMap=t.defaultIconfont=void 0;const r=e(85608).__importDefault(e(65973)),o=e(81139);Object.defineProperty(t,"defaultIconfont",{enumerable:!0,get:function(){return o.defaultIconfont}});const a={"search-close":"close-square",fold:"collapse-all","setting-general":"setting","setting-file":"file-text","setting-extension":"extension","run-debug":"start","toggle-breakpoints":"deactivate-breakpoints",withdraw:"fallback",terminate1:"stop",stop1:"stop",add:"plus",rundebug:"start",terminate:"stop"},p=Object.assign({},o.defaultIconfont,a);t.defaultIconMap=new Proxy(p,{get(_,s){const g=a[s];return(0,r.default)(!g,`Icon '${s}' was a typo, please use '${g}' instead`),_[s]}});class v{constructor(){this._ktIconPrefixes=[],this._iconMap={}}update(s,g){this._iconMap[s]=g,this._ktIconPrefixes.push(s)}getIconClx(s){if(!s)return(0,r.default)(!1,"not a valid icon key:"+s),[];let g=this._ktIconPrefixes.length;for(;!this._iconMap[this._ktIconPrefixes[--g]][s]&&g!==0;);const l=this._iconMap[this._ktIconPrefixes[g]][s];return l?[`${this._ktIconPrefixes[g]}${l}`]:((0,r.default)(!1,"No icon found for "+s),[])}}t.iconManager=new v,t.iconManager.update("kaitian-icon kticon-",t.defaultIconMap)},81139:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIconfont=void 0,t.defaultIconfont={"Gitlab-fill":"Gitlab-fill",PR:"PR",ab:"ab",abl:"abl","activate-breakpoints":"activate-breakpoints","add-comments":"add-comments",afresh:"afresh","arrow-down":"arrow-down","arrow-right":"arrow-right",arrowdown:"arrowdown",arrowleft:"arrowleft",arrowright:"arrowright",arrowup:"arrowup",bash:"bash",bell:"bell",branches:"branches","breakpoint-activate":"breakpoint-activate","breakpoint-deactivate":"breakpoint-deactivate","breakpoint-disabled":"breakpoint-disabled","breakpoint-enabled":"breakpoint-enabled","breakpoint-stop":"breakpoint-stop","breakpoint-stop-before":"breakpoint-stop-before",brew:"brew","browser-preview":"browser-preview","caret-right":"caret-right",check:"check","check-circle-fill":"check-circle-fill","check-close-circle-o":"check-close-circle-o","check-square-o":"check-square-o","circle-pause":"circle-pause",clear:"clear","clear-bold":"clear-bold",close:"close","close-all":"close-all","close-circle":"close-circle","close-circle-fill":"close-circle-fill",close1:"close1",close_square:"close_square","cloud-download":"cloud-download","cloud-server":"cloud-server",code:"code",codebraces:"codebraces","collapse-all":"collapse-all",commit:"commit","content-search":"content-search",continue:"continue",control:"control",copy:"copy","create-pullrequest":"create-pullrequest","deactivate-breakpoints":"deactivate-breakpoints",debug:"debug","debug-alt-small":"debug-alt-small","debug-restart-frame":"debug-restart-frame","default-menu-icon":"default-menu-icon",delete:"delete",deploy:"deploy",detail:"detail",discard:"discard",disconnect:"disconnect","dock-down":"dock-down","dock-right":"dock-right",doubleleft:"doubleleft",doubleright:"doubleright",down:"down","down-arrow":"down-arrow",download:"download",drag:"drag",edit:"edit",editor:"editor",ellipsis:"ellipsis",embed:"embed",error:"error",expand:"expand","expand-all":"expand-all",experiment:"experiment",explorer:"explorer",extension:"extension",eye:"eye","eye-close":"eye-close",file:"file","file-copy":"file-copy","file-default":"file-default","file-exclamation":"file-exclamation","file-text":"file-text",filter:"filter",focus:"focus",folder:"folder","folder-default":"folder-default","follow-cursor":"follow-cursor",fullescreen:"fullescreen",fullscreen:"fullscreen","fullscreen-exit":"fullscreen-exit",git:"git","github-fill":"github-fill",gitlab:"gitlab","global-search":"global-search",go:"go",hex:"hex",image:"image","info-circle":"info-circle","info-circle-fill":"info-circle-fill",insert:"insert",java:"java",keyboard:"keyboard",kotlin:"kotlin",layout:"layout",layout1:"layout1",left:"left","left-nav-close":"left-nav-close","left-nav-open":"left-nav-open","left-right-subfield":"left-right-subfield",line:"line",link:"link",loading:"loading","magic-wand":"magic-wand",max:"max",mcp:"mcp","menubar-dashboard-back":"menubar-dashboard-back","menubar-edit":"menubar-edit","menubar-file":"menubar-file","menubar-go":"menubar-go","menubar-selection":"menubar-selection","menubar-setting":"menubar-setting","menubar-tool":"menubar-tool","menubar-view":"menubar-view","menubar-workspace":"menubar-workspace",message:"message",min:"min",minus:"minus",mobile:"mobile","mobile-phone":"mobile-phone",more:"more","new-file":"new-file","new-folder":"new-folder",node:"node",open:"open","open-changes":"open-changes",openfile:"openfile","out-link":"out-link",pause:"pause",pin:"pin",pipeline:"pipeline",plus:"plus","project-information":"project-information",python:"python","question-circle":"question-circle","question-circle-o":"question-circle-o",receive:"receive",refresh:"refresh",regex:"regex",reload:"reload",replace:"replace",repository:"repository",retrieval:"retrieval",revoke:"revoke","revoke-white":"revoke-white",right:"right","right-arrow":"right-arrow",rollback:"rollback",run:"run",rust:"rust","save-all":"save-all",scm:"scm",search:"search",send:"send","send-outlined":"send-outlined","send-solid":"send-solid",setting:"setting",sever:"sever",share:"share",shrink:"shrink",smile:"smile",start:"start",step:"step","step-in":"step-in","step-out":"step-out",stop:"stop",swap:"swap",sync:"sync",team:"team",terminal:"terminal",test:"test",thumbs:"thumbs","thumbs-fill":"thumbs-fill",thumbsdown:"thumbsdown","thumbsdown-fill":"thumbsdown-fill","time-circle":"time-circle",toolkit:"toolkit",tree:"tree",undock:"undock",unfullscreen:"unfullscreen",unmax:"unmax",unorderedlist:"unorderedlist",unpin:"unpin",up:"up","up-down-subfield":"up-down-subfield",vim:"vim",wait:"wait","warning-circle":"warning-circle",window:"window","window-close":"window-close","window-maximize":"window-maximize",zsh:"zsh",diff:"open-changes"}},54713:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFromIconfontCN=void 0;const n=e(85608);n.__exportStar(e(80564),t),n.__exportStar(e(76577),t);var r=e(10391);Object.defineProperty(t,"createFromIconfontCN",{enumerable:!0,get:function(){return r.createFromIconfontCN}})},76577:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateKaitianIconMap=t.getKaitianIcon=t.ANIM_TYPE=t.ROTATE_TYPE=void 0,t.updateIconMap=v,t.getIconShapeClxList=m,t.getIcon=_;const n=e(12122);var r;(function(s){s[s.rotate_90=0]="rotate_90",s[s.rotate_180=1]="rotate_180",s[s.rotate_270=2]="rotate_270",s[s.flip_horizontal=3]="flip_horizontal",s[s.flip_vertical=4]="flip_vertical",s[s.flip_both=5]="flip_both"})(r||(t.ROTATE_TYPE=r={}));var o;(function(s){s[s.spin=0]="spin",s[s.pulse=1]="pulse"})(o||(t.ANIM_TYPE=o={}));const a=["rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","flip-both"],p=["spin","pulse"];function v(s,g){n.iconManager.update(s,g)}function m(s){const{rotate:g,anim:l,fill:h}=s||{},u=[];return g!==void 0&&u.push(`iconfont-${a[g]}`),l!==void 0&&u.push(`iconfont-anim-${p[l]}`),h&&u.push("toggled"),u}function _(s,g){const l=n.iconManager.getIconClx(s),h=m(g);return l.push(...h),l.join(" ")}t.getKaitianIcon=_,t.updateKaitianIconMap=v},46541:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Image=void 0;const n=e(85608),r=n.__importDefault(e(24345)),o=n.__importDefault(e(14041));e(53960);const a=e(54713),p=v=>o.default.createElement(r.default,{prefixCls:"kt-image",preview:{getContainer:()=>{var m;return document.getElementById("main")||((m=document.getElementsByTagName("body"))===null||m===void 0?void 0:m[0])},mask:o.default.createElement("div",{className:"mask"},o.default.createElement(a.Icon,{iconClass:"codicon codicon-eye"}))},...v});t.Image=p},97267:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);e(39328),n.__exportStar(e(48412),t),n.__exportStar(e(79383),t),n.__exportStar(e(50708),t),n.__exportStar(e(7273),t),n.__exportStar(e(14640),t),n.__exportStar(e(54076),t),n.__exportStar(e(79024),t),n.__exportStar(e(89832),t),n.__exportStar(e(54713),t),n.__exportStar(e(46541),t),n.__exportStar(e(18875),t),n.__exportStar(e(91397),t),n.__exportStar(e(31059),t),n.__exportStar(e(72871),t),n.__exportStar(e(91416),t),n.__exportStar(e(34128),t),n.__exportStar(e(50570),t),n.__exportStar(e(77011),t),n.__exportStar(e(3660),t),n.__exportStar(e(58998),t),n.__exportStar(e(4981),t),n.__exportStar(e(99613),t)},15857:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryInputBox=void 0;const r=e(85608).__importDefault(e(14041)),o=e(54114),a=e(63924);class p extends r.default.Component{constructor(){super(...arguments),this.inputRef=r.default.createRef(),this.addToHistory=m=>{this.history&&m&&m!==this.getCurrentValue()&&this.history.add(m)},this.getHistory=()=>this.history&&this.history.getHistory()||[],this.showNextValue=()=>{const m=this.getCurrentValue()||"";this.history&&!this.history.has(m)&&this.addToHistory(m);let _=this.getNextValue();_&&(_=_===m?this.getNextValue():_),_&&this.onValueChange(_)},this.showPreviousValue=()=>{const m=this.getCurrentValue()||"";this.history&&!this.history.has(m)&&this.addToHistory(m);let _=this.getPreviousValue();_&&(_=_===m?this.getPreviousValue():_),_&&this.onValueChange(_)},this.clearHistory=()=>{this.history&&this.history.clear()},this.getCurrentValue=()=>{if(!this.history)return null;let m=this.history.current();return m||(m=this.history.last(),this.history.next()),m},this.getPreviousValue=()=>this.history&&(this.history.previous()||this.history.first())||null,this.getNextValue=()=>this.history&&(this.history.next()||this.history.last())||null,this.onValueChange=m=>{const{onValueChange:_}=this.props;this.setState({inputValue:m}),_&&_(m)},this.onKeyDown=m=>{const{onKeyDown:_}=this.props;_&&_(m)},this.focus=()=>{this.inputRef&&this.inputRef.current&&this.inputRef.current.focus()}}componentDidMount(){var m;const{history:_,onReady:s}=this.props;this.history=new o.HistoryNavigator(_||new Set([]),100),this.inputProps={...this.props},delete this.inputProps.onReady,this.setState({inputValue:((m=this.props.value)!==null&&m!==void 0?m:this.props.defaultValue)||""}),typeof s=="function"&&s({addToHistory:this.addToHistory,getHistory:this.getHistory,clearHistory:this.clearHistory,getCurrentValue:this.getCurrentValue,showNextValue:this.showNextValue,showPreviousValue:this.showPreviousValue,focus:this.focus})}render(){const m=this.state&&this.state.inputValue;return r.default.createElement(a.Input,{ref:this.inputRef,...this.inputProps,onValueChange:this.onValueChange,onKeyDown:this.onKeyDown,value:m})}}t.HistoryInputBox=p},63924:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Input=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(54713),p=n.__importDefault(e(65973));e(41065);function v(_){return typeof _>"u"}function m(_,s,g){if(typeof g=="function"){let l=s;if(s.type==="click"){l=Object.create(s),l.target=_,l.currentTarget=_;const h=_.value;_.value="",g(l),_.value=h;return}g(l)}}t.Input=o.default.forwardRef((_,s)=>{const{defaultValue:g,className:l,wrapperStyle:h,size:u="default",controls:d,onChange:E,selection:f,addonBefore:c,addonAfter:y,persistFocus:b=!0,hasClear:A,afterClear:S,value:D,onValueChange:I,onPressEnter:w,onKeyDown:T,as:R="input",...M}=_;(0,p.default)(!d,"[@opensumi/ide-components Input]: `controls` was deprecated, please use `addonAfter` instead");const O=o.default.useRef(null),[x,k]=o.default.useState(!1),[F,L]=o.default.useState(()=>(D??g)||""),[B,U]=o.default.useState(()=>(D??g)||"");o.default.useImperativeHandle(s,()=>O.current),o.default.useEffect(()=>{f&&!v(f.start)&&!x&&O.current.setSelectionRange(f.start,f.end)},[f,x]),o.default.useEffect(()=>{D===null||typeof D>"u"||(D!==B&&D!==F&&L(D),D!==B&&U(D))},[D]);const W=K=>{Q(K.target.value),m(O.current,K,E)},j=K=>{K.preventDefault(),Q(""),m(O.current,K,E),typeof S=="function"&&S()},Q=K=>{L(K),typeof I=="function"&&I(K),x||k(!0)},G=K=>{K.keyCode===13&&typeof w=="function"&&w(K),typeof T=="function"&&T(K)},Z=y||d,$=b?{onMouseDown:K=>{K.preventDefault()}}:{},V=(K,Y)=>K?o.default.createElement("div",{className:(0,r.default)("kt-input-addon",Y),...$},o.default.Children.map(K,X=>o.default.isValidElement(X)?o.default.cloneElement(X,$):null)):null,H=(0,r.default)("kt-input",l,{[`kt-input-${u}`]:u,"kt-input-disabled":_.disabled});return o.default.createElement("div",{className:H,style:h},V(c,"kt-input-addon-before"),o.default.createElement("div",{className:"kt-input-box"},o.default.createElement(R,{ref:O,type:"text",autoCapitalize:"off",autoCorrect:"off",autoComplete:"off",spellCheck:!1,...M,value:F,onChange:W,onKeyDown:G}),A&&F&&o.default.createElement(a.Icon,{className:"kt-input-clear",icon:"close-circle-fill",onClick:j,...$})),V(Z,"kt-input-addon-after"))}),t.Input.displayName="OpenSumiInput"},64545:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputNumber=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(32476)),a=n.__importDefault(e(14041));e(41065),e(17107);const p="kt-input-number",v=m=>{const{value:_,size:s="default",wrapperStyle:g,className:l,disabled:h,min:u,max:d,onChange:E,...f}=m,c=b=>{E&&E(b)},y=(0,r.default)("kt-input","kt-input-number",l,{[`kt-input-${s}`]:s,"kt-input-disabled":h});return a.default.createElement("div",{className:y,style:g},a.default.createElement("div",{className:"kt-input-box"},a.default.createElement(o.default,{prefixCls:p,min:u,max:d,value:_,type:"number",onChange:c,controls:!0,...f})))};t.InputNumber=v,t.InputNumber.displayName="OpenSumiInputNumber"},10413:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindInputElement=v;const r=e(85608).__importDefault(e(14041)),o=e(63924);class a extends r.default.Component{constructor(){super(...arguments),this.placeholderInputRef=r.default.createRef()}render(){const _={...this.props};return delete _.inputElement,delete _.innerRef,r.default.createElement(o.Input,{..._,type:"text",id:this.props.id,ref:this.placeholderInputRef})}componentDidMount(){const{innerRef:_,inputElement:s}=this.props;this.placeholderInputRef.current.parentElement.replaceChild(s,this.placeholderInputRef.current),this.applyAttributes(),s.focus(),typeof _=="function"?_(s):_!==null&&typeof _=="object"&&_.current===null&&(_.current=s)}UNSAFE_componentWillUnmount(){const{innerRef:_,inputElement:s}=this.props;s.parentElement.replaceChild(this.placeholderInputRef.current,s),_!==null&&typeof _=="object"&&_.current&&(_.current=null)}shouldComponentUpdate(_){return this.applyAttributes(_),!1}applyAttributes(_=this.props){const{className:s,id:g,inputElement:l,style:h}=_;if(typeof s=="string"&&(l.className=s),typeof g=="string"&&(l.id=g),h!==null&&typeof h=="object")for(const u in h)typeof h[u]=="string"&&l[u]&&(l[u]=h[u])}}const p=r.default.forwardRef((m,_)=>r.default.createElement(a,{...m,innerRef:_}));function v(m){return _=>r.default.createElement(p,{..._,inputElement:m})}},61172:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextArea=void 0;const r=e(85608).__importDefault(e(14041)),o=e(63924);t.TextArea=r.default.forwardRef((a,p)=>r.default.createElement(o.Input,{...a,as:"textarea",ref:p})),t.TextArea.displayName="OpenSumiTextArea"},34390:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidateInput=t.VALIDATE_TYPE=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(63924);e(13254);var p;(function(v){v[v.INFO=1]="INFO",v[v.ERROR=2]="ERROR",v[v.WARNING=3]="WARNING",v[v.IGNORE=4]="IGNORE"})(p||(t.VALIDATE_TYPE=p={})),t.ValidateInput=o.default.forwardRef(({type:v,className:m,validate:_,onChange:s,onValueChange:g,validateMessage:l,popup:h=!0,...u},d)=>{const[E,f]=o.default.useState();o.default.useEffect(()=>{f(l)},[l]);const c=(0,r.default)({"validate-error":E&&E.type===p.ERROR,"validate-warning":E&&E.type===p.WARNING,"validate-info":E&&E.type===p.INFO}),y=()=>{if(E&&E.message)return o.default.createElement("div",{className:(0,r.default)("validate-message",c,{popup:h})},E.message)},b=A=>{const S=A.target;let D;if(S.type==="number"?D=A.target.valueAsNumber:D=A.target.value,typeof _=="function"){let I;v==="number"?/^[0-9]+$/.test(D)?I=_(Number(D)):I=_(String(D)):I=_(D),f(I)}typeof s=="function"&&s(A),typeof g=="function"&&g(D)};return o.default.createElement("div",{className:(0,r.default)("input-box",{popup:h})},o.default.createElement(a.Input,{type:v,ref:d,className:(0,r.default)(m,E,c),onChange:b,...u}),y())}),t.ValidateInput.displayName="ValidateInput"},50708:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(61172),t),n.__exportStar(e(63924),t),n.__exportStar(e(34390),t),n.__exportStar(e(10413),t),n.__exportStar(e(64545),t)},3660:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(3205),t)},3205:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loading=void 0;const r=e(85608).__importDefault(e(14041));e(21221),t.Loading=r.default.memo(()=>r.default.createElement("div",{className:"loading_indicator"})),t.Loading.displayName="Loading"},4981:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalizeContext=void 0,t.LocalizeContextProvider=v,t.ComponentContextProvider=m;const r=e(85608).__importDefault(e(14041)),o=e(54713),a=e(65973),p=_=>((0,a.warning)(!1,"Using the default localize fn"),"");t.LocalizeContext=r.default.createContext({localize:p}),t.LocalizeContext.displayName="LocalizeContext";function v(_){return r.default.createElement(t.LocalizeContext.Provider,{value:_.value},r.default.createElement(t.LocalizeContext.Consumer,null,s=>_.value===s?_.children:null))}function m(_){return r.default.createElement(o.IconContextProvider,{value:_.value},r.default.createElement(v,{value:{localize:_.value.localize}},_.children))}},13719:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(44547),t),n.__exportStar(e(32592),t)},32592:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownReactParser=void 0;const n=e(85608),r=e(33714),o=n.__importDefault(e(14041));class a extends r.marked.Renderer{constructor(m){super(),this.renderer=m.renderer}parse(m){return m.map((_,s)=>{const g=(()=>{switch(_.type){case"html":{const l=_;return this.renderer.html(l.text)}case"space":return null;case"heading":{const l=_,h=l.depth;return this.renderer.heading(this.parseInline(l.tokens),h)}case"paragraph":{const l=_;return this.renderer.paragraph(this.parseInline(l.tokens))}case"text":{const l=_;return l.tokens?this.parseInline(l.tokens):l.text}case"blockquote":{const l=_,h=this.parse(l.tokens);return this.renderer.blockquote(h)}case"list":{const l=_,h=l.items.map((u,d)=>{var E;const f=[];return u.task&&f.push(this.renderer.checkbox((E=u.checked)!==null&&E!==void 0?E:!1)),f.push(this.parse(u.tokens)),o.default.cloneElement(this.renderer.listItem(f),{key:`list-item-${d}`})});return this.renderer.list(h,l.ordered)}case"code":{const l=_;return this.renderer.code(l.text,l.lang)}case"table":{const l=_,h=l.header.map((c,y)=>o.default.cloneElement(this.renderer.tableCell(this.parseInline(c.tokens),{header:!0,align:l.align[y]}),{key:`header-cell-${y}`})),u=o.default.cloneElement(this.renderer.tableRow(h),{key:"header-row"}),d=this.renderer.tableHeader(u),E=l.rows.map((c,y)=>{const b=c.map((A,S)=>o.default.cloneElement(this.renderer.tableCell(this.parseInline(A.tokens),{header:!1,align:l.align[S]}),{key:`body-cell-${y}-${S}`}));return o.default.cloneElement(this.renderer.tableRow(b),{key:`body-row-${y}`})}),f=this.renderer.tableBody(E);return this.renderer.table([d,f])}case"hr":return this.renderer.hr();default:return console.warn(`Token with "${_.type}" type was not found`),null}})();return o.default.isValidElement(g)?o.default.cloneElement(g,{key:`token-${s}`}):g})}parseInline(m=[]){return m.map(_=>{switch(_.type){case"text":{const g=p(_.text);return this.renderer.text(g)}case"strong":{const s=_;return this.renderer.strong(this.parseInline(s.tokens))}case"em":{const s=_;return this.renderer.em(this.parseInline(s.tokens))}case"del":{const s=_;return this.renderer.del(this.parseInline(s.tokens))}case"codespan":{const s=_;return this.renderer.codespan(p(s.text))}case"link":{const s=_;return this.renderer.link(s.href,this.parseInline(s.tokens))}case"image":{const s=_;return this.renderer.image(s.href,s.text,s.title)}case"html":{const s=_;return this.renderer.html(s.text)}case"br":return this.renderer.br();case"escape":{const s=_;return this.renderer.text(s.text)}default:return console.warn(`Token with "${_.type}" type was not found`),null}})}}t.MarkdownReactParser=a;function p(v){return v.replace(/&#(\d+);/g,(m,_)=>String.fromCharCode(_)).replace(/&#x([0-9A-Fa-f]+);/g,(m,_)=>String.fromCharCode(parseInt(_,16)))}},44547:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownReactRenderer=void 0;const r=e(85608).__importStar(e(14041));class o{constructor(p={}){this.uid=0,this.options=p}node(p,v=null,m={}){const _={key:`marked-react-${this.uid}`};return this.incrementUID(),(0,r.createElement)(p,{...m,..._},v)}incrementUID(){this.uid+=1}heading(p,v){return this.node(`h${v}`,p)}paragraph(p){return this.node("p",p)}joinBase(p,v){if(!v)return p;try{return new URL(p,v).href}catch{return p}}link(p,v){const m=this.joinBase(p,this.options.baseURL);return this.node("a",v,{href:m,target:"_blank",rel:"noopener noreferrer"})}image(p,v,m=null){const _=this.joinBase(p,this.options.baseURL);return this.node("img",null,{src:_,alt:v,title:m})}codespan(p,v=null){const m=v?`${this.options.langPrefix}${v}`:null;return this.node("code",p,{className:m})}code(p,v){return this.node("pre",this.codespan(p,v))}blockquote(p){return this.node("blockquote",p)}list(p,v){return this.node(v?"ol":"ul",p)}listItem(p){return this.node("li",p)}checkbox(p){return this.node("input",null,{type:"checkbox",disabled:!0,checked:p})}table(p){return this.node("table",p)}tableHeader(p){return this.node("thead",p)}tableBody(p){return this.node("tbody",p)}tableRow(p){return this.node("tr",p)}tableCell(p,v){const m=v.header?"th":"td";return this.node(m,p,{align:v.align})}strong(p){return this.node("strong",p)}em(p){return this.node("em",p)}del(p){return this.node("del",p)}text(p){return p}html(p){return r.default.createElement("div",{dangerouslySetInnerHTML:{__html:p}})}hr(){return this.node("hr")}br(){return this.node("br")}}t.MarkdownReactRenderer=o},56849:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultMarkedRenderer=t.linkify=void 0,t.Markdown=m;const n=e(85608),r=e(33714),o=n.__importDefault(e(14041)),a=e(39777),p=(_,s,g)=>`<a rel="noopener" ${a.DATA_SET_COMMAND}="${_}" title="${s??_}">${g}</a>`;t.linkify=p;class v extends r.Renderer{link({href:s,title:g,text:l}){return(0,t.linkify)(s,g||null,l)}}t.DefaultMarkedRenderer=v;function m(_){const s=(h,u)=>{const d=r.marked.parse(h,{renderer:u,async:!1});return typeof d=="string"?d:""},[g,l]=o.default.useState(s(_.value||"",_.renderer));return o.default.useEffect(()=>{l(s(_.value||"",_.renderer))},[_.renderer,_.value]),o.default.createElement(a.RenderWrapper,{opener:_.opener,html:g})}},39777:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenderWrapper=t.DATA_SET_COMMAND=void 0;const r=e(85608).__importStar(e(14041));e(28566),t.DATA_SET_COMMAND="data-command";const o=a=>{const p=(0,r.useRef)(),{html:v,opener:m}=a;(0,r.useEffect)(()=>(p&&p.current&&p.current.addEventListener("click",_),()=>{p&&p.current&&p.current.removeEventListener("click",_)}),[]);const _=s=>{let g=s.target;if(g.className.includes("codicon")&&(g=g.parentNode),g.tagName.toLowerCase()==="a"&&g.hasAttribute(t.DATA_SET_COMMAND)){const l=g.getAttribute(t.DATA_SET_COMMAND);l&&m&&m.open(l)}};return r.default.createElement("div",{className:"kt-md-renderer-wrap",dangerouslySetInnerHTML:{__html:v},ref:p})};t.RenderWrapper=o},98113:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=(0,e(14041).createContext)({inlineCollapsed:!1});t.default=r},64063:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=e(31363),o=n.__importDefault(e(14041)),a=n.__importDefault(e(98113));class p extends o.default.Component{constructor(){super(...arguments),this.renderItem=()=>{const{title:m,..._}=this.props;return o.default.createElement(a.default.Consumer,null,({inlineCollapsed:s})=>s?o.default.createElement(r.Item,{..._,title:m}):o.default.createElement(r.Item,{..._,title:m}))}}render(){return this.renderItem()}}p.isMenuItem=!0,t.default=p},91886:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(39067)),o=e(31363),a=n.__importDefault(e(14041));class p extends a.default.Component{render(){const{popupClassName:m}=this.props;return a.default.createElement(o.SubMenu,{...this.props,popupClassName:m})}}p.contextTypes={antdMenuTheme:r.default.string},p.isSubMenu=1,t.default=p},45803:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Menu=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(31363)),a=n.__importDefault(e(14041)),p=e(90146),v=e(2835),m=e(47768),_=e(65973),s=n.__importDefault(e(98113)),g=n.__importDefault(e(64063)),l=n.__importDefault(e(91886));e(42985);class h extends a.default.Component{static getDerivedStateFromProps(E,f){const{prevProps:c}=f,y={prevProps:E};return c.mode==="inline"&&E.mode!=="inline"&&(y.switchingModeFromInline=!0),"openKeys"in E?y.openKeys=E.openKeys:(E.inlineCollapsed&&!c.inlineCollapsed&&(y.switchingModeFromInline=!0,y.inlineOpenKeys=f.openKeys,y.openKeys=[]),!E.inlineCollapsed&&c.inlineCollapsed&&(y.openKeys=f.inlineOpenKeys,y.inlineOpenKeys=[])),y}constructor(E){super(E),this.handleMouseEnter=c=>{this.restoreModeVerticalFromInline();const{onMouseEnter:y}=this.props;y&&y(c)},this.handleTransitionEnd=c=>{const y=c.propertyName==="width"&&c.target===c.currentTarget,{className:b}=c.target,A=Object.prototype.toString.call(b)==="[object SVGAnimatedString]"?b.animVal:b,S=c.propertyName==="font-size"&&A.indexOf("anticon")>=0;(y||S)&&this.restoreModeVerticalFromInline()},this.handleClick=c=>{this.handleOpenChange([]);const{onClick:y}=this.props;y&&y(c)},this.handleOpenChange=c=>{this.setOpenKeys(c);const{onOpenChange:y}=this.props;y&&y(c)},this.renderMenu=()=>{const{prefixCls:c,className:y}=this.props,b=this.getRealMenuMode(),A=this.getOpenMotionProps(b),S=c||"kt-inner-menu",D=(0,r.default)(y,{[`${S}-inline-collapsed`]:this.getInlineCollapsed()}),I={openKeys:this.state.openKeys,onOpenChange:this.handleOpenChange,className:D,mode:b,...A};return b!=="inline"&&(I.onClick=this.handleClick),this.getInlineCollapsed()&&(I.openKeys=[]),a.default.createElement(o.default,{...this.props,...I,prefixCls:S,onTransitionEnd:this.handleTransitionEnd,onMouseEnter:this.handleMouseEnter})},(0,_.warning)(!("onOpen"in E||"onClose"in E),"[Menu] `onOpen` and `onClose` are removed, please use `onOpenChange` instead, see: https://u.ant.design/menu-on-open-change."),(0,_.warning)(!("inlineCollapsed"in E&&E.mode!=="inline"),"[Menu] `inlineCollapsed` should only be used when `mode` is inline.");let f;"openKeys"in E?f=E.openKeys:"defaultOpenKeys"in E&&(f=E.defaultOpenKeys),this.state={openKeys:f||[],switchingModeFromInline:!1,inlineOpenKeys:[],prevProps:E}}componentWillUnmount(){m.wrapperRaf.cancel(this.mountRafId)}setOpenKeys(E){"openKeys"in this.props||this.setState({openKeys:E})}getRealMenuMode(){const E=this.getInlineCollapsed();if(this.state.switchingModeFromInline&&E)return"inline";const{mode:f}=this.props;return E?"vertical":f}getInlineCollapsed(){const{inlineCollapsed:E}=this.props;return E}getOpenMotionProps(E){const{openTransitionName:f,openAnimation:c,motion:y}=this.props;return y?{motion:y}:c?((0,_.warning)(typeof c=="string","[Menu] `openAnimation` do not support object. Please use `motion` instead."),{openAnimation:c}):f?{openTransitionName:f}:E==="horizontal"?{motion:{motionName:"slide-up"}}:E==="inline"?{motion:v.collapseMotion}:{motion:{motionName:""}}}restoreModeVerticalFromInline(){const{switchingModeFromInline:E}=this.state;E&&this.setState({switchingModeFromInline:!1})}render(){return a.default.createElement(s.default.Provider,{value:{inlineCollapsed:this.getInlineCollapsed()||!1}},this.renderMenu())}}h.defaultProps={className:"",focusable:!1},(0,p.polyfill)(h);class u extends a.default.Component{render(){return a.default.createElement(h,{...this.props})}}t.Menu=u,u.Divider=o.Divider,u.Item=g.default,u.SubMenu=l.default,u.ItemGroup=o.ItemGroup},31059:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.message=void 0;const r=e(85608).__importDefault(e(71036));e(38663);function o(a){return(p,v)=>new Promise(m=>{r.default[a](p,v,m)})}t.message={success:o("success"),error:o("error"),info:o("info"),warning:o("warning"),loading:o("loading")}},71036:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(29517)),o=n.__importDefault(e(96041)),a=n.__importDefault(e(63492)),p=n.__importDefault(e(36117)),v=n.__importDefault(e(59303)),m=n.__importDefault(e(10435)),_=n.__importDefault(e(14041));let s=3,g,l,h=1,u="kt-message",d="move-up",E,f;function c(D){if(l){D(l);return}m.default.newInstance({prefixCls:u,transitionName:d,style:{top:g},getContainer:E,maxCount:f},I=>{if(l){D(l);return}l=I,D(I)})}const y={info:p.default,success:r.default,error:o.default,warning:a.default,loading:v.default};function b(D){const I=D.duration!==void 0?D.duration:s,w=D.key||h++,T=new Promise(M=>{const O=()=>(typeof D.onClose=="function"&&D.onClose(),M(!0));c(x=>{const k=y[D.type];x.notice({key:w,duration:I,style:{},content:_.default.createElement("div",{className:`${u}-custom-content${D.type?` ${u}-${D.type}`:""}`},D.icon||k&&_.default.createElement(k,null),_.default.createElement("span",null,D.content)),onClose:O})})}),R=()=>{l&&l.removeNotice(w)};return R.then=(M,O)=>T.then(M,O),R.promise=T,R}function A(D){return Object.prototype.toString.call(D)==="[object Object]"&&!!D.content}const S={open:b,config(D){D.top!==void 0&&(g=D.top,l=null),D.duration!==void 0&&(s=D.duration),D.prefixCls!==void 0&&(u=D.prefixCls),D.getContainer!==void 0&&(E=D.getContainer),D.transitionName!==void 0&&(d=D.transitionName,l=null),D.maxCount!==void 0&&(f=D.maxCount,l=null)},destroy(){l&&(l.destroy(),l=null)}};["success","info","warning","error","loading"].forEach(D=>{S[D]=(I,w,T)=>A(I)?S.open({...I,type:D}):(typeof w=="function"&&(T=w,w=void 0),S.open({content:I,duration:w,type:D,onClose:T}))}),S.warn=S.warning,t.default=S},6656:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.destroyFns=void 0;const n=e(85608),r=n.__importDefault(e(22143)),o=n.__importDefault(e(53373)),a=n.__importDefault(e(39067)),p=n.__importDefault(e(91812)),v=n.__importDefault(e(25946)),m=n.__importDefault(e(14041)),_=e(48412),s=e(69587);let g;t.destroyFns=[];const l=u=>{g={x:u.pageX,y:u.pageY},setTimeout(()=>g=null,100)};typeof window<"u"&&window.document&&window.document.documentElement&&(0,v.default)(document.documentElement,"click",l);class h extends m.default.Component{constructor(){super(...arguments),this.handleCancel=d=>{const{onCancel:E}=this.props;E&&E(d)},this.handleOk=d=>{const{onOk:E}=this.props;E&&E(d)},this.renderFooter=d=>{const{okText:E,okType:f,cancelText:c,confirmLoading:y}=this.props;return m.default.createElement("div",null,m.default.createElement(_.Button,{onClick:this.handleCancel,...this.props.cancelButtonProps},c||d.cancelText),m.default.createElement(_.Button,{type:f,loading:y,onClick:this.handleOk,...this.props.okButtonProps},E||d.okText))},this.renderModal=()=>{const{prefixCls:d,footer:E,visible:f,wrapClassName:c,centered:y,getContainer:b,closeIcon:A,closable:S=!0,...D}=this.props,I=d||"kt-modal",w=this.renderFooter((0,s.getConfirmLocale)()),T=m.default.createElement("span",{className:`${I}-close-x`},A||m.default.createElement(r.default,{className:`${I}-close-icon`}));return m.default.createElement(p.default,{...D,animation:this.props.animation,getContainer:b,prefixCls:I,wrapClassName:(0,o.default)({[`${I}-centered`]:!!y},c),footer:E===void 0?w:E,visible:f,mousePosition:g,onClose:this.handleCancel,closeIcon:T})}}render(){return this.renderModal()}}h.defaultProps={width:520,confirmLoading:!1,visible:!1,okType:"primary"},h.propTypes={prefixCls:a.default.string,onOk:a.default.func,onCancel:a.default.func,okText:a.default.node,cancelText:a.default.node,centered:a.default.bool,width:a.default.oneOfType([a.default.number,a.default.string]),confirmLoading:a.default.bool,visible:a.default.bool,footer:a.default.node,title:a.default.node,closable:a.default.bool,closeIcon:a.default.node},t.default=h},53017:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;const r=e(85608).__importDefault(e(6656));t.Modal=r.default,e(61349)},69587:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.changeConfirmLocale=r,t.getConfirmLocale=o;const e={okText:"OK",cancelText:"Cancel",justOkText:"OK"};let n={...e};function r(a){a?n={...n,...a}:n={...e}}function o(){return n}},18875:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notification=void 0,t.open=g,t.close=l,t.update=h;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(43718),p=e(70392),v=e(48412),m=n.__importDefault(e(70748));e(1477);const _={[a.MessageType.Info]:15,[a.MessageType.Warning]:18,[a.MessageType.Error]:20};m.default.config({placement:"bottomRight"}),t.notification=m.default;const s=new Map;function g(d,E,f=!0,c,y,b,A,S){return(0,p.createCancelablePromise)(D=>(D.onCancellationRequested(()=>{l(c)}),new Promise(I=>{const w={key:c,className:(0,r.default)("kt-notification-wrapper",{"kt-notification-info":E===a.MessageType.Info,"kt-notification-error":E===a.MessageType.Error,"kt-notification-warn":E===a.MessageType.Warning}),duration:(0,p.isUndefined)(A)?_[E]:A,onClose:()=>{S&&S(),s.delete(c),I(void 0)},btn:y?y.map((T,R)=>{const M=typeof T=="string",O={className:`${(0,r.default)("kt-notification-button")}${M?"":T.class}`,ghost:M?R===0:!T.primary,key:M?T:T.id,onClick:()=>{I(T),m.default.close(c),M||T.run()}},x=M?T:T.label;return o.default.createElement(v.Button,{size:"small",...O},x)}):null,message:d,description:b};s.set(c,[E,w]),f||(w.closeIcon=o.default.createElement("span",null)),u(E,w)})))}function l(d){t.notification.close(d)}function h(d,E){const f=s.get(d);u(f[0],{...f[1],key:d,message:E})}function u(d,E){switch(d){case a.MessageType.Info:t.notification.info(E);break;case a.MessageType.Warning:t.notification.warning(E);break;case a.MessageType.Error:t.notification.error(E);break;default:t.notification.open(E);break}}},70748:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(55435)),o=n.__importDefault(e(31079)),a=n.__importDefault(e(22143)),p=n.__importDefault(e(5550)),v=n.__importDefault(e(74339)),m=n.__importDefault(e(10435)),_=n.__importDefault(e(14041)),s=e(70392),g={};let l=4.5,h=24,u=24,d="topRight",E,f;function c(I){const{duration:w,placement:T,bottom:R,top:M,getContainer:O,closeIcon:x}=I;w!==void 0&&(l=w),T!==void 0&&(d=T),R!==void 0&&(u=R),M!==void 0&&(h=M),O!==void 0&&(E=O),x!==void 0&&(f=x)}function y(I,w=h,T=u){let R;switch(I){case"topLeft":R={left:0,top:w,bottom:"auto"};break;case"topRight":R={right:0,top:w,bottom:"auto"};break;case"bottomLeft":R={left:0,top:"auto",bottom:T};break;default:R={right:0,top:"auto",bottom:T};break}return R}function b({prefixCls:I,placement:w=d,getContainer:T=E,top:R,bottom:M,closeIcon:O=f},x){const k=`${I}-${w}`;if(g[k]){x(g[k]);return}const F=_.default.createElement("span",{className:`${I}-close-x`},O||_.default.createElement(a.default,{className:`${I}-close-icon`}));m.default.newInstance({prefixCls:I,className:`${I}-${w}`,style:y(w,R,M),getContainer:T,closeIcon:F},L=>{g[k]=L,x(L)})}const A={success:r.default,info:v.default,error:o.default,warning:p.default};function S(I){const w=I.prefixCls||"kt-notification",T=`${w}-notice`,R=(0,s.isUndefined)(I.duration)?l:I.duration;let M=null;I.icon?M=_.default.createElement("span",{className:`${T}-icon`},I.icon):I.type&&(M=_.default.createElement(A[I.type]||null,{className:`${T}-icon ${T}-icon-${I.type}`}));const{placement:O,top:x,bottom:k,getContainer:F,closeIcon:L}=I;b({prefixCls:w,placement:O,top:x,bottom:k,getContainer:F,closeIcon:L},B=>{B.notice({content:_.default.createElement("div",{className:M?`${T}-with-icon`:""},M,_.default.createElement("div",{className:`${T}-message`},I.message),_.default.createElement("div",{className:`${T}-description`},I.description),I.btn?_.default.createElement("span",{className:`${T}-btn`},I.btn):null),duration:R,closable:!0,onClose:I.onClose,onClick:I.onClick,key:I.key,style:I.style||{},className:I.className})})}const D={open:S,close(I){Object.keys(g).forEach(w=>g[w].removeNotice(I))},config:c,destroy(){Object.keys(g).forEach(I=>{g[I].destroy(),delete g[I]})}};["success","info","warning","error"].forEach(I=>{D[I]=w=>D.open({...w,type:I})}),D.warn=D.warning,t.default=D},79024:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Overlay=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(53017);e(45531);const p=({maskClosable:v=!1,closable:m=!0,className:_,onClose:s,children:g,footer:l,title:h,getContainer:u,keyboard:d,...E})=>o.default.createElement(a.Modal,{footer:l||null,maskClosable:v,closable:m,onCancel:s,title:h,getContainer:u,className:(0,r.default)("kt-overlay",_),keyboard:d,...E},g);t.Overlay=p},91397:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Popover=t.PopoverPosition=t.PopoverTriggerType=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(6208)),a=n.__importStar(e(14041));e(14856);const p=e(48412);var v;(function(s){s.hover="hover",s.click="click",s.focus="focus"})(v||(t.PopoverTriggerType=v={}));var m;(function(s){s.top="top",s.bottom="bottom",s.left="left",s.right="right",s.topLeft="topLeft",s.topRight="topRight",s.bottomLeft="bottomLeft",s.bottomRight="bottomRight",s.leftTop="leftTop",s.leftBottom="leftBottom",s.rightTop="rightTop",s.rightBottom="rightBottom"})(m||(t.PopoverPosition=m={}));const _=({children:s,trigger:g=v.hover,visible:l,content:h,position:u=m.top,showArrow:d=!0,title:E,titleClassName:f,overlay:c,overlayClassName:y,overlayStyle:b,action:A,delay:S=200,zIndex:D=1e3,onClickAction:I,onVisibleChange:w,getTooltipContainer:T,...R})=>{const M=(0,a.useCallback)(x=>{I&&I(x)},[I]),O=(0,a.useMemo)(()=>c||(!E&&!h?null:a.default.createElement(a.default.Fragment,null,E&&a.default.createElement("p",{className:(0,r.default)("kt-popover-title",f)},E,A&&a.default.createElement(p.Button,{size:"small",type:"link",onClick:M},A)),h||"")),[c,h,A,M]);return O?a.default.createElement(o.default,{...R,visible:l,placement:u,mouseEnterDelay:S?S/1e3:void 0,trigger:g,showArrow:d,onVisibleChange:w,overlayClassName:y,prefixCls:"kt-popover",overlayStyle:b,getTooltipContainer:T,overlay:O,zIndex:D},a.default.createElement("div",{className:"kt-popover-trigger"},s)):s};t.Popover=_},8573:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleList=t.RECYCLE_LIST_OVER_SCAN_COUNT=t.RECYCLE_LIST_STABILIZATION_TIME=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=n.__importDefault(e(19686)),p=e(58723),v=e(77011);t.RECYCLE_LIST_STABILIZATION_TIME=500,t.RECYCLE_LIST_OVER_SCAN_COUNT=50;const m=({width:_,height:s,maxHeight:g,minHeight:l,className:h,style:u,data:d,onReady:E,onScroll:f,itemHeight:c,header:y,footer:b,template:A,paddingBottomSize:S,getSize:D,hiddenVerticalScrollbar:I,hiddenHorizontalScrollbar:w})=>{const T=(0,o.useRef)(),R=(0,o.useRef)(),M=(0,o.useRef)({}),O=(0,o.useRef)(0),x=(0,o.useRef)();(0,o.useEffect)(()=>{typeof E=="function"&&E({scrollTo:K=>{var Y;(Y=T.current)===null||Y===void 0||Y.scrollTo(K)},scrollToIndex:(K,Y="start")=>{var X,oe;let ie=K;if(y&&ie++,typeof c=="number")(X=T.current)===null||X===void 0||X.scrollToItem(ie,Y);else{x.current&&clearTimeout(x.current);const me=(M.current?Object.keys(M.current):[]).slice(0,ie).reduce((q,Ee)=>q+F(Ee),0);(oe=T.current)===null||oe===void 0||oe.scrollToItem(K,Y),x.current=setTimeout(()=>{var q;(M.current?Object.keys(M.current):[]).slice(0,ie).reduce((te,fe)=>te+F(fe),0)!==me&&((q=T.current)===null||q===void 0||q.scrollToItem(K,Y)),x.current=null},t.RECYCLE_LIST_STABILIZATION_TIME)}}})},[]);const k=(H,K)=>{var Y;M.current[H]!==K&&(M.current={...M.current,[H]:K},T.current&&((Y=T.current)===null||Y===void 0||Y.resetAfterIndex(0)))},F=(0,o.useCallback)(H=>D?D(Number(H)):(M?.current||[])[H]||c||100,[c,D]),L=(0,o.useCallback)(()=>{if(g){let H=0;for(let K=0;K<d.length;K++)H+=F(K);return H>g?g:H}},[g,d]),B=(0,o.useCallback)(()=>{if(l)return l},[l,d]),U=(0,o.useMemo)(()=>{let H=d.length;return y&&H++,b&&H++,H},[d,b,y]),W=({index:H,style:K})=>{let Y;if(H===0&&y)return o.default.createElement("div",{style:K},o.default.createElement(y,null));if(H+1===U&&b)return o.default.createElement("div",{style:K},o.default.createElement(b,null));if(y?Y=d[H-1]:Y=d[H],!Y)return o.default.createElement("div",{style:K});const X={"aria-setsize":U,"aria-posinset":H};return o.default.createElement("div",{tabIndex:0,style:K,role:"listitem",...X},o.default.createElement(A,{data:Y,index:H}))},j=({index:H,style:K})=>{const Y=(0,o.useRef)(null),X=(0,o.useRef)(),oe=()=>{if(Y.current){let he=0;for(let me=0;me<Y.current.children.length;me++)he+=Y.current.children[me].getBoundingClientRect().height;k(H,he)}};(0,o.useEffect)(()=>{if(Y.current&&T.current){X.current=new MutationObserver(()=>{oe()});const he={childList:!0,attributes:!0,characterData:!0,attributeFilter:["class","style"],attributeOldValue:!0,characterDataOldValue:!0};X.current.observe(Y.current,he),oe()}return()=>{X.current.disconnect()}},[Y.current]);let ie;return H===0&&y?o.default.createElement("div",{style:K},o.default.createElement(y,null)):H+1===U&&b?o.default.createElement("div",{style:K},o.default.createElement(b,null)):(y?ie=d[H-1]:ie=d[H],ie?o.default.createElement("div",{style:K,ref:Y},o.default.createElement(A,{data:ie,index:H})):o.default.createElement("div",{style:K}))},Q=(0,o.useMemo)(()=>d.reduce((K,Y)=>K+F(Y),0)/d.length,[d]),G=(0,o.useCallback)(H=>{O.current=H.scrollOffset,f&&f(H)},[f]),Z=(0,o.useMemo)(()=>(0,o.forwardRef)((H,K)=>{const{style:Y,...X}=H;return o.default.createElement("div",{ref:K,style:{...Y,height:`${parseFloat(Y.height)+(S||0)}px`},...X})}),[S]),$=(0,o.useMemo)(()=>(0,o.forwardRef)((H,K)=>o.default.createElement(v.Scrollbars,{hiddenVertical:I,hiddenHorizontal:w,...H,thumbSize:10,forwardedRef:K})),[I,w]);return(()=>{const H=typeof c!="number",K=!_||!s;return(()=>{const X=({width:oe,height:ie})=>{R.current&&(R.current.scrollTop=O.current);const he=L(),me=B();let q=ie;return me?q=Math.min(ie,me):he&&(q=he),H?o.default.createElement(p.VariableSizeList,{onScroll:G,width:oe,height:q,itemData:[],itemSize:F,itemCount:U,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:T,style:{transform:"translate3d(0px, 0px, 0px)",...u},className:(0,r.default)(h,"kt-recycle-list"),innerElementType:Z,outerElementType:$,estimatedItemSize:Q},j):o.default.createElement(p.FixedSizeList,{onScroll:G,width:oe,height:q,itemData:[],itemSize:c,itemCount:U,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:T,outerRef:R,style:{transform:"translate3d(0px, 0px, 0px)",...u},className:(0,r.default)(h,"recycle-list"),innerElementType:Z,outerElementType:$},W)};return K?o.default.createElement(a.default,null,X):X({width:_,height:s})})()})()};t.RecycleList=m},34128:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(8573),t)},57621:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTree=t.RenderErrorType=void 0;const n=e(85608),r=n.__importDefault(e(39050)),o=n.__importStar(e(14041)),a=e(58723),p=e(70392),v=e(77011),m=e(48103),_=e(65601),s=e(43685),g=e(13429),l=e(34054);var h;(function(E){E[E.RENDER_ITEM=0]="RENDER_ITEM",E[E.GET_RENDED_KEY=1]="GET_RENDED_KEY",E[E.RENDER_ERROR=2]="RENDER_ERROR"})(h||(t.RenderErrorType=h={}));const u=o.default.forwardRef((E,f)=>{const{style:c,...y}=E;return o.default.createElement("div",{ref:f,style:{...c,height:`${parseFloat(c.height)+d.PADDING_BOTTOM_SIZE}px`},...y})});class d extends o.default.Component{constructor(){super(...arguments),this.idxToRendererPropsCache=new Map,this.dynamicSizeMap=new Map,this.listRef=o.default.createRef(),this.disposables=new p.DisposableCollection,this.onErrorEmitter=new p.Emitter,this.onDidUpdateEmitter=new p.Emitter,this.onDidModelChangeEmitter=new p.Emitter,this.newPromptInsertionIndex=-1,this.idToFilterRendererPropsCache=new Map,this.filterFlattenBranchChildrenCache=new Map,this.filterWatcherDisposeCollection=new p.DisposableCollection,this.queueUpdatePromise=null,this.updateCancelToken=new p.CancellationTokenSource,this.expandNodeCancelToken=new p.CancellationTokenSource,this.willUpdateTasks=0,this.queueUpdateThrottler=new p.Throttler,this.doBatchUpdate=(()=>{const f=(c,y)=>{if(this.disposables.disposed)return;const{root:b}=this.props.model;let A=-1;if(this.promptTargetID>-1&&this.promptHandle instanceof _.NewPromptHandle&&this.promptHandle.parent&&this.promptHandle.parent.expanded&&b.isItemVisibleAtSurface(this.promptHandle.parent)&&!this.promptHandle.destroyed){const S=b.getIndexAtTreeNodeId(this.promptTargetID);if(S>-1||this.promptHandle.parent===b)if(this.promptHandle.type===l.TreeNodeType.TreeNode){const D=this.promptHandle.parent;D?A=this.getNewPromptInsertIndex(S,D):A=S+1}else A=S+1;else this.promptTargetID=-1}if(A===-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed&&this.promptHandle.destroy(),this.newPromptInsertionIndex=A,this.idxToRendererPropsCache.clear(),y.isCancellationRequested){c();return}this.forceUpdate(()=>{c(),this.props.filter&&this.props.filterProvider&&this.props.filterProvider.filterAlways&&this.filterItems(this.props.filter)})};return()=>{const c=(A,S)=>{const D=!!this.willUpdateTasks;if(this.willUpdateTasks=0,!D)S.resolve();else{this.updateCancelToken.cancel(),this.updateCancelToken=new p.CancellationTokenSource;const I=this.updateCancelToken.token;requestAnimationFrame(()=>{if(I.isCancellationRequested){S();return}f(S,I)})}return A};let y;const b=new Promise(A=>y=A);return b.then(()=>{this.onDidUpdateEmitter.fire()}),c(b,y),b}})(),this.batchUpdate=()=>(this.willUpdateTasks++,this.queueUpdatePromise=this.queueUpdateThrottler.queue(this.doBatchUpdate),this.queueUpdatePromise),this.promptNewTreeNode=f=>this.promptNew(f),this.promptNewCompositeTreeNode=f=>this.promptNew(f,l.TreeNodeType.CompositeTreeNode),this.promptRename=async(f,c)=>{var y,b;const{root:A}=this.props.model,S=typeof f=="string"?await A.getTreeNodeByPath(f):f;if(!s.TreeNode.is(S)||s.CompositeTreeNode.isRoot(S))throw new TypeError(`Cannot rename object of type ${typeof S}`);const D=new m.RenamePromptHandle(c||S.name,S);return this.promptHandle=D,this.promptTargetID=S.id,A.isItemVisibleAtSurface(S)?await this.batchUpdate():await S.parent.setExpanded(!0),(b=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||b===void 0||b.scrollToItem(A.getIndexAtTreeNodeId(this.promptTargetID)),this.promptHandle},this.expandNode=async f=>{const{root:c}=this.props.model,y=typeof f=="string"?c.getTreeNodeByPath(f):f;if(this.expandNodeCancelToken.token.isCancellationRequested&&(this.expandNodeCancelToken=new p.CancellationTokenSource),y&&s.CompositeTreeNode.is(y)&&!y.disposed)return y.setExpanded(!1,!1,!0,this.expandNodeCancelToken.token)},this.collapseNode=async f=>{const{root:c}=this.props.model,y=typeof f=="string"?c.getTreeNodeByPath(f):f;if(y&&s.CompositeTreeNode.is(y)&&!y.disposed)return this.expandNodeCancelToken.cancel(),y.setCollapsed()},this._isEnsuring=!1,this.ensureVisible=async(f,c="smart",y=!1)=>{if(this._isEnsuring)return;this._isEnsuring=!0;const{root:b}=this.props.model,A=typeof f=="string"?b.getTreeNodeByPath(f)||await b.loadTreeNodeByPath(f):f;if(A&&!b.isItemVisibleAtSurface(A)&&await b.loadTreeNodeByPath(A.path),!s.TreeNode.is(A)||s.CompositeTreeNode.isRoot(A)){this._isEnsuring=!1;return}return y?this.tryScrollIntoViewWhileStable(A,c):this.tryScrollIntoView(A,c),this._isEnsuring=!1,A},this.getItemAtIndex=f=>{const{filter:c}=this.props;if(c&&this.filterFlattenBranch.length>0)return this.idToFilterRendererPropsCache.get(this.filterFlattenBranch[f]);let y=this.idxToRendererPropsCache.get(f);if(!y){const b=this.newPromptInsertionIndex,{root:A}=this.props.model;if(b>-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed)if(f===b)y={itemType:l.TreeNodeType.NewPrompt,item:this.promptHandle};else{const S=A.getTreeNodeAtIndex(f-(f>=b?1:0));y={itemType:s.CompositeTreeNode.is(S)?l.TreeNodeType.CompositeTreeNode:l.TreeNodeType.TreeNode,item:S}}else{const S=A.getTreeNodeAtIndex(f);S&&S.id===this.promptTargetID&&this.promptHandle&&this.promptHandle.constructor===m.RenamePromptHandle&&!this.promptHandle.destroyed?y={itemType:l.TreeNodeType.RenamePrompt,item:this.promptHandle}:y={itemType:s.CompositeTreeNode.is(S)?l.TreeNodeType.CompositeTreeNode:l.TreeNodeType.TreeNode,item:S}}this.idxToRendererPropsCache.set(f,y)}return y},this.handleListScroll=({scrollOffset:f})=>{const{model:c,height:y,itemHeight:b}=this.props;if(c.state.saveScrollOffset(f),!this.promptHandle||!b)return;let A;this.promptHandle instanceof _.NewPromptHandle&&this.newPromptInsertionIndex>-1?A=this.newPromptInsertionIndex:A=c.root.getIndexAtTreeNodeId(this.promptHandle.id),(f+y<A*b||A*b<f)&&this.promptHandle.destroy()},this.getItemKey=f=>{const c=this.getItemAtIndex(f),{getItemKey:y}=this.props,b=y?y(c):void 0;return b??f},this.filterItems=f=>{const{model:{root:c},filterProvider:y}=this.props;if(this.filterWatcherDisposeCollection.dispose(),this.idToFilterRendererPropsCache.clear(),!f)return;const b=/\//.test(f),A=new Set,S=new Map,D=[];for(let I=0,w=c.branchSize;I<w;I++){const T=c.getTreeNodeAtIndex(I);D.push(T)}if(b)D.forEach(I=>{if(I&&I.path.indexOf(f)>-1){A.add(I.id);let w=I.parent;for(;w&&!s.CompositeTreeNode.isRoot(w);)A.add(w.id),w=w.parent}});else{let I=[];y?I=r.default.filter(f,D,y.fuzzyOptions()):I=r.default.filter(f,D,d.FILTER_FUZZY_OPTIONS);const w=T=>{const R=T.children||[];if(R.length>0)for(const M of R)A.add(M.id),s.CompositeTreeNode.is(M)&&M.expanded&&w(M)};I.forEach(T=>{const R=T.original;A.add(R.id);let M=R.parent;for(S.set(R.id,()=>o.default.createElement("div",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},dangerouslySetInnerHTML:{__html:T.string||""}})),s.CompositeTreeNode.is(R)&&w(R);M&&!s.CompositeTreeNode.isRoot(M);)A.add(M.id),M=M.parent})}this.filterFlattenBranch=new Array(A.size);for(let I=0,w=0,T=c.branchSize;w<T;w++){const R=c.getTreeNodeAtIndex(w);R&&A.has(R.id)&&(this.filterFlattenBranch[I]=R.id,s.CompositeTreeNode.is(R)?this.idToFilterRendererPropsCache.set(R.id,{item:R,itemType:l.TreeNodeType.CompositeTreeNode,template:S.has(R.id)?S.get(R.id):void 0}):this.idToFilterRendererPropsCache.set(R.id,{item:R,itemType:l.TreeNodeType.TreeNode,template:S.has(R.id)?S.get(R.id):void 0}),I++)}this.filterWatcherDisposeCollection.push(c.watcher.on(l.TreeNodeEvent.DidChangeExpansionState,(I,w)=>{const T=this.filterFlattenBranch.indexOf(I.id);if(w){const R=this.filterFlattenBranchChildrenCache.get(I.id);R&&R.length>0&&(this.filterFlattenBranch=(0,s.spliceArray)(this.filterFlattenBranch,T+1,0,R),this.filterFlattenBranchChildrenCache.delete(I.id))}else{const R=[];for(let M=T+1;M<this.filterFlattenBranch.length;M++){const O=c.getTreeNodeById(this.filterFlattenBranch[M]);if(O&&O.depth>I.depth)R.push(O.id);else break}this.filterFlattenBranchChildrenCache.set(I.id,R),this.filterFlattenBranch=(0,s.spliceArray)(this.filterFlattenBranch,T+1,R.length)}})),this.filterWatcherDisposeCollection.push(p.Disposable.create(()=>{this.filterFlattenBranchChildrenCache.clear()}))},this.renderItem=({index:f,style:c})=>{var y,b,A,S,D,I,w;const{children:T,overflow:R="ellipsis",supportDynamicHeights:M}=this.props,O=this.getItemAtIndex(f),x=(0,o.useRef)(null),k=(0,o.useMemo)(()=>M?()=>{let j=0;if(x.current){const Q=x.current;j=Array.from(Q.children).reduce((G,Z)=>G+Z.getBoundingClientRect().height,0)}return j&&(this.dynamicSizeMap.set(f,j),this.layoutItem()),Math.max(j,d.DEFAULT_ITEM_HEIGHT)}:()=>{},[M]);if((0,o.useEffect)(()=>{x.current&&k()},[]),!O)return o.default.createElement(o.default.Fragment,null);const{item:F,itemType:L,template:B}=O;if(!F)return o.default.createElement("div",{style:c});let U;s.CompositeTreeNode.is(F)?U={"aria-label":(y=F.accessibilityInformation)===null||y===void 0?void 0:y.label,"aria-expanded":F.expanded,"aria-level":F.depth,"aria-setsize":(A=(b=F.parent)===null||b===void 0?void 0:b.children)===null||A===void 0?void 0:A.length,"aria-posinset":f}:s.TreeNode.is(F)&&(U={"aria-label":(S=F.accessibilityInformation)===null||S===void 0?void 0:S.label,"aria-level":F.depth,"aria-setsize":(I=(D=F.parent)===null||D===void 0?void 0:D.children)===null||I===void 0?void 0:I.length,"aria-posinset":f});const W=R==="ellipsis"?c:{...c,width:"auto",minWidth:"100%"};return o.default.createElement("div",{ref:x,style:W,role:((w=F.accessibilityInformation)===null||w===void 0?void 0:w.role)||"treeiem",...U},o.default.createElement(g.NodeRendererWrap,{item:F,depth:F.depth,itemType:L,template:B,hasPrompt:!!this.promptHandle&&!this.promptHandle.destroyed,expanded:s.CompositeTreeNode.is(F)?F.expanded:void 0},T))},this.layoutItem=()=>{var f,c,y,b;if(this.props.supportDynamicHeights&&this.listRef&&!((f=this.listRef)===null||f===void 0)&&f.current&&"_getRangeToRender"in((c=this.listRef)===null||c===void 0?void 0:c.current)){const A=(y=this.listRef)===null||y===void 0?void 0:y.current._getRangeToRender();if(A){const S=A[0];((b=this.listRef)===null||b===void 0?void 0:b.current).resetAfterIndex(S)}}}}getNewPromptInsertIndex(f,c){const{root:y}=this.props.model;let b=f+1;for(;b-f<=c.branchSize;b++){const A=y.getTreeNodeAtIndex(b);if(!A)return b;if(!s.CompositeTreeNode.is(A)){if(A?.depth>c.depth+1)continue;return b}}return b}UNSAFE_componentWillUpdate(f){this.props.filter!==f.filter&&this.filterItems(f.filter),this.props.model!==f.model&&(this.idxToRendererPropsCache.clear(),this.idToFilterRendererPropsCache.clear(),this.dynamicSizeMap.clear())}componentDidUpdate(f){var c,y;if(this.props.model!==f.model){this.disposables.dispose();const{model:b}=this.props;(y=(c=this.listRef)===null||c===void 0?void 0:c.current)===null||y===void 0||y.scrollTo(b.state.scrollOffset),this.disposables.push(b.onChange(this.batchUpdate.bind(this))),this.disposables.push(b.state.onDidLoadState(()=>{var A,S;(S=(A=this.listRef)===null||A===void 0?void 0:A.current)===null||S===void 0||S.scrollTo(b.state.scrollOffset)})),this.onDidModelChangeEmitter.fire({preModel:f.model,nextModel:b})}}async promptNew(f,c=l.TreeNodeType.TreeNode){var y,b;const{root:A}=this.props.model;let S=typeof f=="string"?await A.getTreeNodeByPath(f):f;if(c!==l.TreeNodeType.TreeNode&&c!==l.TreeNodeType.CompositeTreeNode)throw new TypeError(`Invalid type supplied. Expected 'TreeNodeType.TreeNode' or 'TreeNodeType.CompositeTreeNode', got ${c}`);if(S&&!s.CompositeTreeNode.is(S)&&(S=S.parent,!s.CompositeTreeNode.is(S)))throw new TypeError(`Cannot create new prompt at object of type ${typeof S}`);if(!S)throw new Error(`Cannot find node at ${f}`);const D=new _.NewPromptHandle(c,S);return this.promptHandle=D,this.promptTargetID=S.id,S!==A&&(!S.expanded||!A.isItemVisibleAtSurface(S))?await S.setExpanded(!0):await this.batchUpdate(),this.newPromptInsertionIndex>=0?(b=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||b===void 0||b.scrollToItem(this.newPromptInsertionIndex):this.tryScrollIntoViewWhileStable(this.promptHandle),this.promptHandle}tryScrollIntoView(f,c="auto"){var y,b,A,S;const{root:D}=this.props.model;f.constructor===_.NewPromptHandle&&!f.destroyed?(b=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||b===void 0||b.scrollToItem(this.newPromptInsertionIndex):D.isItemVisibleAtSurface(f)&&((S=(A=this.listRef)===null||A===void 0?void 0:A.current)===null||S===void 0||S.scrollToItem(D.getIndexAtTreeNode(f),c))}tryScrollIntoViewWhileStable(f,c="smart"){const{root:y}=this.props.model;if(this.tryEnsureVisibleTimes>d.TRY_ENSURE_VISIBLE_MAX_TIMES){this.tryEnsureVisibleTimes=0;return}p.Event.once(this.props.model.onChange)(async()=>{var b,A,S,D;await this.queueUpdatePromise,f.constructor===_.NewPromptHandle&&!f.destroyed?(A=(b=this.listRef)===null||b===void 0?void 0:b.current)===null||A===void 0||A.scrollToItem(this.newPromptInsertionIndex):y.isItemVisibleAtSurface(f)?((D=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||D===void 0||D.scrollToItem(y.getIndexAtTreeNode(f),c),this.tryEnsureVisibleTimes=0):(this.tryEnsureVisibleTimes++,this.tryScrollIntoViewWhileStable(f,c))})}componentDidMount(){var f,c;const{model:y,onReady:b}=this.props;if((c=(f=this.listRef)===null||f===void 0?void 0:f.current)===null||c===void 0||c.scrollTo(y.state.scrollOffset),this.disposables.push(y.onChange(this.batchUpdate.bind(this))),this.disposables.push(y.state.onDidLoadState(()=>{var A,S;(S=(A=this.listRef)===null||A===void 0?void 0:A.current)===null||S===void 0||S.scrollTo(y.state.scrollOffset)})),typeof b=="function"){const A={promptNewTreeNode:this.promptNewTreeNode,promptNewCompositeTreeNode:this.promptNewCompositeTreeNode,promptRename:this.promptRename,expandNode:this.expandNode,collapseNode:this.collapseNode,ensureVisible:this.ensureVisible,getModel:()=>this.props.model,layoutItem:this.layoutItem,getCurrentSize:()=>({width:this.props.width,height:this.props.height}),onDidChangeModel:this.onDidModelChangeEmitter.event,onDidUpdate:this.onDidUpdateEmitter.event,onOnceDidUpdate:p.Event.once(this.onDidUpdateEmitter.event),onError:this.onErrorEmitter.event};b(A)}}componentWillUnmount(){this.disposables.dispose()}set promptHandle(f){this._promptHandle!==f&&(this._promptHandle instanceof m.PromptHandle&&!this._promptHandle.destroyed&&this._promptHandle.destroy(),f.onDestroy(this.batchUpdate),this._promptHandle=f)}get promptHandle(){return this._promptHandle}get adjustedRowCount(){const{root:f}=this.props.model,{filter:c}=this.props;return c?this.filterFlattenBranch.length:this.newPromptInsertionIndex>-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed?f.branchSize+1:f.branchSize}getItemSize(f){return this.dynamicSizeMap.get(f)||this.props.itemHeight}render(){const{children:f,itemHeight:c,width:y="100%",height:b,style:A,className:S,placeholder:D,overScanCount:I,leaveBottomBlank:w,supportDynamicHeights:T}=this.props;if(D&&this.adjustedRowCount===0){const M=D;return o.default.createElement(M,null)}const R={children:f,height:b,width:y,itemData:[],itemCount:this.adjustedRowCount,itemKey:this.getItemKey,overscanCount:I||d.DEFAULT_OVER_SCAN_COUNT,onScroll:this.handleListScroll,style:{transform:"translate3d(0px, 0px, 0px)",...A},className:S,outerElementType:v.ScrollbarsVirtualList};return w&&(R.innerElementType=u),T?o.default.createElement(a.VariableSizeList,{ref:this.listRef,itemSize:this.getItemSize.bind(this),...R},this.renderItem):o.default.createElement(a.FixedSizeList,{ref:this.listRef,itemSize:c,...R},this.renderItem)}}t.RecycleTree=d,d.PADDING_BOTTOM_SIZE=22,d.DEFAULT_ITEM_HEIGHT=22,d.TRY_ENSURE_VISIBLE_MAX_TIMES=5,d.FILTER_FUZZY_OPTIONS={pre:"<match>",post:"</match>",extract:E=>E?.name||""},d.DEFAULT_OVER_SCAN_COUNT=50},13429:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRendererWrap=void 0;const r=e(85608).__importDefault(e(14041));class o extends r.default.Component{render(){const{item:p,itemType:v,children:m,template:_,hasPrompt:s}=this.props;return r.default.createElement(m,{item:p,itemType:v,template:_,hasPrompt:s,key:p.id})}shouldComponentUpdate(p){return!0}}t.NodeRendererWrap=o},75821:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicRecycleTree=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=n.__importDefault(e(26460)),a=e(58998),p=e(57621),v=e(64013),m=e(84225),_=e(17462),s=e(78569),g=e(45203);e(12794),e(34728),n.__exportStar(e(92532),t);const l=({width:h,height:u,itemHeight:d=22,itemClassname:E,indent:f,baseIndent:c,containerClassname:y,onClick:b,onContextMenu:A,onTwistierClick:S,onIconClick:D,onDbClick:I,resolveChildren:w,sortComparator:T,treeData:R,inlineMenus:M,inlineMenuActuator:O,onReady:x,contextMenus:k,contextMenuActuator:F,treeName:L,leaveBottomBlank:B=!0})=>{const[U,W]=(0,r.useState)({show:!1}),[j,Q]=(0,r.useState)([]),[G,Z]=(0,r.useState)(),$=(0,r.useRef)(!1),V=(0,r.useRef)(),H=(0,r.useRef)(),K=(0,r.useRef)(null),Y=(0,r.useCallback)(Pe=>{var we;return r.default.createElement(_.BasicTreeNodeRenderer,{item:Pe.item,itemType:Pe.itemType,itemHeight:d,indent:f,baseIndent:c,className:E,inlineMenus:M,inlineMenuActuator:O,onClick:he,onDbClick:q,onContextMenu:Ee,onTwistierClick:te,onIconClick:me,decorations:(we=V.current)===null||we===void 0?void 0:we.decorations.getDecorations(Pe.item)})},[G]);(0,r.useEffect)(()=>{var Pe,we;V.current=new g.BasicTreeService(R,w,T,{treeName:L});const _e=(Pe=V.current)===null||Pe===void 0?void 0:Pe.onDidUpdateTreeModel(Te=>{X(Te)}),Ne=()=>{var Te;(Te=V.current)===null||Te===void 0||Te.enactiveFocusedDecoration()};return(we=K.current)===null||we===void 0||we.addEventListener("blur",Ne,!0),()=>{var Te,We;$.current=!0,(Te=K.current)===null||Te===void 0||Te.removeEventListener("blur",Ne,!0),_e.dispose(),(We=V.current)===null||We===void 0||We.dispose()}},[]),(0,r.useEffect)(()=>{var Pe;(Pe=V.current)===null||Pe===void 0||Pe.updateTreeData(R)},[R]);const X=async Pe=>{Pe&&await Pe.ensureReady,$.current||Z(Pe)},oe=async Pe=>{var we;(we=V.current)===null||we===void 0||we.activeFocusedDecoration(Pe),s.BasicCompositeTreeNode.is(Pe)&&ue(Pe)},ie=(0,r.useCallback)(Pe=>{x&&x({...Pe,selectItem:oe,focusItem:async we=>{var _e;const Ne=`/${L}/${we}`;await G?.ensureReady;const Te=await Pe.ensureVisible(Ne,"auto",!0);Te&&((_e=V.current)===null||_e===void 0||_e.activeFocusedDecoration(Te))}}),H.current=Pe},[V.current]),he=(0,r.useCallback)((Pe,we)=>{oe(we),b&&b(Pe,we)},[b]),me=(0,r.useCallback)((Pe,we)=>{D&&D(Pe,we)},[D]),q=(0,r.useCallback)((Pe,we)=>{I&&I(Pe,we)},[I]),Ee=(0,r.useCallback)((Pe,we)=>{var _e,Ne;if(we?(_e=V.current)===null||_e===void 0||_e.activeContextMenuDecoration(we):(Ne=V.current)===null||Ne===void 0||Ne.enactiveFocusedDecoration(),A)A(Pe,we);else{let Te=[];Array.isArray(k)?Te=k:typeof k=="function"&&(Te=k(we));const We=new Set,pe={};for(const Ue of Te)We.add(Ue.group||"-1"),pe[Ue.group||"-1"]||(pe[Ue.group||"-1"]=[]),pe[Ue.group||"-1"].push(Ue);const re=Array.from(We).sort((Ue,Ye)=>Ue.localeCompare(Ye,"kn",{numeric:!0}));let ge=[];for(const Ue of re)ge=ge.concat(pe[Ue].map(Ye=>({id:Ye.id,label:Ye.title,group:Ye.group}))),ge=ge.concat([{id:`${Ue}_divider`,label:"",type:"divider"}]);ge.pop(),JSON.stringify(ge)!==JSON.stringify(j)&&Q(ge);const{x:De,y:Ae}=Pe.nativeEvent;W({show:!0,point:{pageX:De,pageY:Ae},activeNode:we})}},[I]),ue=(0,r.useCallback)(Pe=>{var we,_e;Pe.expanded?(we=H.current)===null||we===void 0||we.collapseNode(Pe):(_e=H.current)===null||_e===void 0||_e.expandNode(Pe)},[]),te=(0,r.useCallback)((Pe,we)=>{s.BasicCompositeTreeNode.is(we)&&ue(we),S&&S(Pe,we)},[S]),fe=(0,r.useCallback)(()=>{var Pe;(Pe=V.current)===null||Pe===void 0||Pe.enactiveFocusedDecoration()},[]),Ie=(0,r.useCallback)((Pe,we)=>{A&&A(Pe,we)},[]),Me=(0,r.useCallback)(()=>{W({...U,show:!1})},[U]),Be=(0,r.useCallback)(()=>k?r.default.createElement(o.default,{popupPlacement:"bottomLeft",popupVisible:U.show,action:["contextMenu"],popupAlign:{overflow:{adjustX:1,adjustY:1},offset:[window.scrollX,window.scrollY]},point:U.point||{},builtinPlacements:m.placements,popup:r.default.createElement(a.ClickOutside,{className:"basic_tree_menubars",mouseEvents:["click","contextmenu"],onOutsideClick:Me},j.map(({id:Pe,label:we,type:_e})=>r.default.createElement(v.BasicMenuItem,{key:Pe,id:Pe,label:we,type:_e,focusMode:U.show,onClick:Ne=>{F&&F(U.activeNode,Ne),W({show:!1})}}))),alignPoint:!0}):null,[j,F,U]);return r.default.createElement("div",{className:"basic_tree",tabIndex:-1,ref:K,onClick:fe,onContextMenu:Ie},Be(),G?r.default.createElement(p.RecycleTree,{height:u,width:h,itemHeight:d,model:G,onReady:ie,className:y,leaveBottomBlank:B},Y):null)};t.BasicRecycleTree=l},64013:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicMenuItem=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=({id:p,label:v,type:m,focusMode:_,onClick:s})=>{const[g,l]=o.default.useState(!1),h=o.default.useCallback(()=>{l(_?!0:d=>!d),s(p)},[p]),u=o.default.useCallback(()=>{},[p,_]);return m==="divider"?o.default.createElement("div",{className:"basic_menu_item_divider"}):o.default.createElement("div",{className:(0,r.default)("basic_menu_item",{"menu-open":g}),onMouseOver:u,onClick:h},v)};t.BasicMenuItem=a},84225:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.placements=void 0;const e={adjustX:1,adjustY:1},n=[0,0];t.placements={bottomLeft:{points:["tl","bl"],overflow:e,offset:[0,4],targetOffset:n}}},78569:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicTreeNode=t.BasicCompositeTreeNode=t.BasicTreeRoot=void 0;const n=e(43685);class r extends n.CompositeTreeNode{constructor(v,m,_,s={}){super(v,m,void 0,{treeName:s.treeName}),this._raw=_}get name(){var v;return(v=this.getMetadata("treeName"))!==null&&v!==void 0?v:`BasicTreeRoot_${this.id}`}get raw(){return this._raw}get expanded(){return!0}}t.BasicTreeRoot=r;class o extends n.CompositeTreeNode{constructor(v,m,_,s){super(v,m,void 0,{name:_.label}),this.isExpanded=_.expanded||!1,this.id=s||this.id,this._displayName=_.label,this._raw=_}get displayName(){return this._displayName}get renderLabel(){return this.raw.renderLabel}get icon(){return this.raw.icon}get iconClassName(){return this.raw.iconClassName}get className(){return this.raw.className}get twisterClassName(){return this.raw.twisterClassName}get twisterPlaceholderClassName(){return this.raw.twisterPlaceholderClassName}get indentOffset(){return this.raw.indentOffset}get description(){return this.raw.description}get raw(){return this._raw}get expandable(){return!!this._raw.expandable}}t.BasicCompositeTreeNode=o;class a extends n.TreeNode{constructor(v,m,_,s){super(v,m,void 0,{name:_.label}),this.id=s||this.id,this._displayName=_.label,this._raw=_}get displayName(){return this._displayName}get renderLabel(){return this.raw.renderLabel}get description(){return this.raw.description}get icon(){return this.raw.icon}get iconClassName(){return this.raw.iconClassName}get className(){return this.raw.className}get twisterClassName(){return this.raw.twisterClassName}get indentOffset(){return this.raw.indentOffset}get twisterPlaceholderClassName(){return this.raw.twisterPlaceholderClassName}get raw(){return this._raw}}t.BasicTreeNode=a},17462:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicTreeNodeRenderer=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(48412),p=e(54713),v=e(3660),m=e(78569),_=e(92532);e(12794);const s=({item:g,className:l,itemHeight:h=22,indent:u=8,baseIndent:d=8,onClick:E,onDbClick:f,onTwistierClick:c,onIconClick:y,onContextMenu:b,decorations:A,inlineMenus:S=[],inlineMenuActuator:D=()=>{}})=>{const I=(0,o.useCallback)($=>{E&&($.stopPropagation(),E($,g))},[E]),w=(0,o.useCallback)($=>{f&&($.stopPropagation(),f($,g))},[f]),T=(0,o.useCallback)($=>{b&&($.stopPropagation(),$.preventDefault(),b($,g))},[b]),R=(0,o.useCallback)($=>{$.stopPropagation(),c?c($,g):E&&E($,g)},[E,c]),M=(0,o.useCallback)($=>{$.stopPropagation(),y?y($,g):E&&E($,g)},[E,y]);let x=(g.depth>0?g.depth-1:0)*u;d&&(x+=d),g.indentOffset&&(x+=g.indentOffset);const k={height:h,lineHeight:`${h}px`,paddingLeft:`${x}px`},F=(0,o.useCallback)($=>o.default.createElement(p.Icon,{onClick:M,icon:$.icon,className:(0,r.default)("icon",$.iconClassName)}),[]),L=(0,o.useCallback)($=>$.displayName.replace(/\n/g,"\u21B5"),[]),B=(0,o.useCallback)($=>$.displayName&&o.default.createElement("div",{className:(0,r.default)("segment","display_name")},L($)),[]),U=(0,o.useCallback)($=>$.renderLabel,[]),W=(0,o.useCallback)($=>$.description?typeof $.description=="string"?o.default.createElement("div",{className:(0,r.default)("segment_grow","description")},$.description):$.description:null,[]),j=(0,o.useCallback)($=>{if(Array.isArray(S))return S;if(typeof S=="function")return S($)},[S]),Q=()=>{var $;const V=m.BasicCompositeTreeNode.is(g),H=($=j(g))===null||$===void 0?void 0:$.filter(Y=>V?Y.position===_.IBasicInlineMenuPosition.TREE_CONTAINER:Y.position===_.IBasicInlineMenuPosition.TREE_NODE);if(!H?.length)return null;const K=(0,o.useCallback)((Y,X)=>{Y.stopPropagation(),D(g,X)},[]);return o.default.createElement("div",{className:(0,r.default)("segment","tail")},H.map(Y=>o.default.createElement(a.Button,{style:{marginRight:"5px"},type:"icon",key:`${g.id}-${Y.icon}`,icon:Y.icon,title:Y.title,onClick:X=>K(X,Y)})))},G=($,V)=>A&&A?.classlist.indexOf(_.DECORATIONS.LOADING)>-1?o.default.createElement(v.Loading,null):o.default.createElement(p.Icon,{className:(0,r.default)("segment","expansion_toggle",$.twisterClassName,{mod_collapsed:!$.expanded}),onClick:V,icon:"arrow-right"}),Z=$=>{if(!$.expandable)return o.default.createElement("div",{className:(0,r.default)("segment","expansion_toggle",$.twisterPlaceholderClassName)});if(m.BasicCompositeTreeNode.is($))return G($,R)};return o.default.createElement("div",{key:g.id,onClick:I,onDoubleClick:w,onContextMenu:T,className:(0,r.default)("tree_node",l,A?A.classlist:null,g.className),style:k,"data-id":g.id},o.default.createElement("div",{className:"content"},Z(g),F(g),o.default.createElement("div",{className:"overflow_wrap"},U(g)||B(g),W(g)),Q()))};t.BasicTreeNodeRenderer=s},45203:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicTreeModel=t.BasicTreeService=void 0;const n=e(70392),r=e(43685),o=e(34054),a=e(78569),p=e(92532);class v extends r.Tree{constructor(s,g,l,h={}){super(),this._treeData=s,this._resolveChildren=g,this._sortComparator=l,this.treeOptions=h,this.selectedDecoration=new r.Decoration(p.DECORATIONS.SELECTED),this.focusedDecoration=new r.Decoration(p.DECORATIONS.FOCUSED),this.contextMenuDecoration=new r.Decoration(p.DECORATIONS.ACTIVED),this.loadingDecoration=new r.Decoration(p.DECORATIONS.LOADING),this._selectedNodes=[],this.disposableCollection=new n.DisposableCollection,this.decorationDisposableCollection=new n.DisposableCollection,this.onDidUpdateTreeModelEmitter=new n.Emitter,this.sortComparator=(u,d)=>{if(this._sortComparator){const E=this._sortComparator(u.raw,d.raw);if(typeof E<"u")return E}return super.sortComparator(u,d)},this.activeFocusedDecoration=u=>{var d;this._contextMenuNode&&(this.clearDecoration(this.contextMenuDecoration),this.clearDecoration(this.focusedDecoration),this.clearDecoration(this.selectedDecoration),this._contextMenuNode=void 0),u&&(this.selectedNodes.length>0&&this.clearDecoration(this.selectedDecoration),this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0),this.selectedDecoration.addTarget(u),this.focusedDecoration.addTarget(u),this._focusedNode=u,this._selectedNodes=[u],(d=this.model)===null||d===void 0||d.dispatchChange())},this.activeContextMenuDecoration=u=>{var d;this._contextMenuNode&&(this.clearDecoration(this.contextMenuDecoration),this._contextMenuNode=void 0),this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(u),this._contextMenuNode=u,(d=this.model)===null||d===void 0||d.dispatchChange()},this.enactiveFocusedDecoration=()=>{var u;this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0,(u=this.model)===null||u===void 0||u.dispatchChange())},this.disposableCollection.push(this.onDidUpdateTreeModelEmitter)}setUpTreeModel(){this._root=new a.BasicTreeRoot(this,void 0,{children:this._treeData,label:"",command:"",icon:""},{treeName:this.treeOptions.treeName}),this._model=new m,this._model.init(this._root),this.initDecorations(this._root),this.onDidUpdateTreeModelEmitter.fire(this._model)}resetState(){this._selectedNodes=[],this._contextMenuNode=void 0,this._focusedNode=void 0}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get model(){return this._model}get root(){return this._root}get decorations(){return this._decorations}initDecorations(s){this.decorationDisposableCollection.dispose(),this._decorations=new r.DecorationsManager(s),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration),this.decorationDisposableCollection.push(s.watcher.on(o.TreeNodeEvent.WillResolveChildren,g=>{this.loadingDecoration.addTarget(g)})),this.decorationDisposableCollection.push(s.watcher.on(o.TreeNodeEvent.DidResolveChildren,g=>{this.loadingDecoration.removeTarget(g)})),this.decorationDisposableCollection.push(this._decorations)}updateTreeData(s){this._treeData=s,this.resetState(),this.setUpTreeModel()}async resolveChildren(s){return this._resolveChildren?this.transformTreeNode(s,this._resolveChildren(s?.raw)||[]):this.transformTreeNode(s,s?.raw.children||[])}transformTreeNode(s,g){if(!g)return[];const l=[];for(const h of g)h.children?l.push(new a.BasicCompositeTreeNode(this,s,h)):l.push(new a.BasicTreeNode(this,s,h));return l}get selectedNodes(){return this._selectedNodes}get focusedNode(){return this._focusedNode}get contextMenuNode(){return this._contextMenuNode}clearDecoration(s){for(const g of s.appliedTargets.keys())s.removeTarget(g)}dispose(){super.dispose(),this.disposableCollection.dispose(),this.decorationDisposableCollection.dispose()}}t.BasicTreeService=v;class m extends r.TreeModel{}t.BasicTreeModel=m},92532:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DECORATIONS=t.IBasicInlineMenuPosition=void 0;var e;(function(n){n[n.TREE_NODE=1]="TREE_NODE",n[n.TREE_CONTAINER=2]="TREE_CONTAINER"})(e||(t.IBasicInlineMenuPosition=e={})),t.DECORATIONS={SELECTED:"mod_selected",FOCUSED:"mod_focused",ACTIVED:"mod_actived",LOADING:"mod_loading"}},24786:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTreeAdaptiveDecorator=void 0;const r=e(85608).__importDefault(e(14041)),o=e(34054),a=p=>v=>{const{model:m,itemHeight:_,onReady:s}=v,g=r.default.useRef(),l=r.default.useRef(!1),[h,u]=r.default.useState(0),d=()=>{u(m.root.branchSize*_)},E=f=>{s&&s({...f,promptNewTreeNode:async c=>{var y;const b=await f.promptNewTreeNode(c);return!((y=g.current)===null||y===void 0)&&y.root.branchSize?u(g.current.root.branchSize*_+_):u(_),l.current=!1,b.onDestroy(()=>{var A;!((A=g.current)===null||A===void 0)&&A.root.branchSize&&u(g.current.root.branchSize*_)}),b.onCancel(()=>{g.current&&u(g.current.root.branchSize*_)}),b.onBlur(()=>l.current),b},promptNewCompositeTreeNode:async c=>{var y;const b=await f.promptNewCompositeTreeNode(c);return!((y=g.current)===null||y===void 0)&&y.root.branchSize?u(g.current.root.branchSize*_+_):u(_),b.onDestroy(()=>{var A;!((A=g.current)===null||A===void 0)&&A.root.branchSize&&u(g.current.root.branchSize*_)}),b.onCancel(()=>{var A;!((A=g.current)===null||A===void 0)&&A.root.branchSize&&u(g.current.root.branchSize*_)}),b.onBlur(()=>l.current),b}})};return r.default.useEffect(()=>{g.current=m,g.current.root&&(u(g.current.root.branchSize*_),g.current.root.watcher.on(o.TreeNodeEvent.DidChangeExpansionState,d))},[m]),r.default.useEffect(()=>{setTimeout(()=>{l.current=!0},100)},[h]),r.default.createElement(r.default.Fragment,null,r.default.createElement(p,{...v,height:h,onReady:E}))};t.RecycleTreeAdaptiveDecorator=a},326:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTreeFilterDecorator=void 0;const n=e(85608),r=n.__importDefault(e(97331)),o=n.__importStar(e(14041)),a=e(54713),p=e(50708),v=e(4981);e(69715);const m=30,_=500,s=l=>{const{localize:h}=o.default.useContext(v.LocalizeContext);return o.default.createElement("div",{className:"kt-recycle-tree-filter-wrapper"},o.default.createElement(p.Input,{hasClear:!0,autoFocus:!0,className:"kt-recycle-tree-filter-input",size:"small",...l,placeholder:l.placeholder||h("tree.filter.placeholder"),addonBefore:o.default.createElement(a.Icon,{className:"kt-recycle-tree-filter-icon",icon:"retrieval"})}))},g=l=>h=>{const[u,d]=o.default.useState(""),[E,f]=o.default.useState(""),{beforeFilterValueChange:c,filterEnabled:y,height:b,filterPlaceholder:A,filterAfterClear:S,onReady:D,onFilterBlur:I,filterAutoFocus:w,...T}=h,R=(0,r.default)(async x=>{c&&await c(x),f(x)},_),M=(0,o.useCallback)(x=>{d(x),R(x)},[u]),O=(0,o.useCallback)(x=>{D&&D({...x,clearFilter:()=>{f(""),d("")}})},[D]);return o.default.createElement(o.default.Fragment,null,y&&o.default.createElement(s,{afterClear:S,placeholder:A,value:u,autoFocus:w,onBlur:I,onValueChange:M}),o.default.createElement(l,{...T,height:b-(y?m:0),onReady:O,filter:E}))};t.RecycleTreeFilterDecorator=g},72731:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(326),t),n.__exportStar(e(24786),t)},91416:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(57621),t),n.__exportStar(e(13429),t),n.__exportStar(e(48103),t),n.__exportStar(e(43685),t),n.__exportStar(e(34054),t),n.__exportStar(e(72731),t),n.__exportStar(e(75821),t)},65601:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NewPromptHandle=void 0;const n=e(43685),r=e(65747);class o extends r.PromptHandle{constructor(p,v){super(),this.type=p,this.parent=v,this._id=n.TreeNode.nextId()}get id(){return this._id}get depth(){return this.parent.depth+1}}t.NewPromptHandle=o},65747:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromptHandle=t.VALIDATE_CLASS_NAME=t.PROMPT_VALIDATE_TYPE=void 0;const n=e(70392),r=e(50708),o=e(84605),a=_=>new Promise(s=>setTimeout(s,_));var p;(function(_){_[_.INFO=1]="INFO",_[_.ERROR=2]="ERROR",_[_.WARNING=3]="WARNING"})(p||(t.PROMPT_VALIDATE_TYPE=p={}));var v;(function(_){_.INFO="validate-info",_.ERROR="validate-error",_.WARNING="validate-warning"})(v||(t.VALIDATE_CLASS_NAME=v={}));class m{constructor(){this.disposables=new n.DisposableCollection,this.isInPendingCommitState=!1,this._destroyed=!1,this._hasValidateElement=!1,this._hasAddonAfter=!1,this._inComposition=!1,this.onChangeEmitter=new n.Emitter,this.onCommitEmitter=new n.Emitter,this.onCancelEmitter=new n.Emitter,this.onFocusEmitter=new n.Emitter,this.onBlurEmitter=new n.Emitter,this.onDestroyEmitter=new n.Emitter,this.markdownRenderer=(0,o.createMarkedRenderer)(),this.handleClick=s=>{s.stopPropagation()},this.handleDBClick=s=>{s.stopPropagation()},this.handleCompositionstart=()=>{this._inComposition=!0},this.handleCompositionend=()=>{this._inComposition=!1},this.handleKeyup=()=>{this._inComposition||this.onChangeEmitter.fire(this.$.value)},this.handleKeydown=async s=>{if(!this._inComposition){if(s.key==="Escape"){if((await this.onCancelEmitter.fireAndAwait(this.$.value)).some(l=>l.result===!1||!!l.err))return;this.destroy()}if(s.key==="Enter"){if(this.isInPendingCommitState=!0,this.$.disabled=!0,(await this.onCommitEmitter.fireAndAwait(this.$.value)).some(l=>l.result===!1||!!l.err)){this.isInPendingCommitState=!1,this.$.disabled=!1,this.$.focus();return}this.isInPendingCommitState=!1,this.$.disabled=!1,this.destroy()}}},this.handleFocus=()=>{this.onFocusEmitter.fire(this.$.value)},this.handleBlur=async s=>{await a(0),!(!this.$.isConnected&&!this.destroyed||(await this.onBlurEmitter.fireAndAwait(this.$.value)).some(l=>l.result===!1||!!l.err))&&(this.isInPendingCommitState||this.destroy())},this.$=document.createElement("input"),this.$.setAttribute("type","text"),this.$.setAttribute("name","no_keybinding"),this.$.setAttribute("spellcheck","false"),this.$.setAttribute("autoCapitalize","off"),this.$.setAttribute("autoCorrect","off"),this.$.setAttribute("autoComplete","off"),this.ProxiedInput=(0,r.bindInputElement)(this.$),this.$.addEventListener("click",this.handleClick),this.$.addEventListener("dblclick",this.handleDBClick),this.$.addEventListener("keyup",this.handleKeyup),this.$.addEventListener("keydown",this.handleKeydown),this.$.addEventListener("focus",this.handleFocus),this.$.addEventListener("blur",this.handleBlur),this.$.addEventListener("compositionstart",this.handleCompositionstart),this.$.addEventListener("compositionend",this.handleCompositionend),this.$validate=document.createElement("div"),this.$validate.setAttribute("style","top: 100%;"),this.$addonAfter=document.createElement("div"),this.$addonAfter.setAttribute("class","kt-input-addon-after")}get destroyed(){return this._destroyed}get onChange(){return this.onChangeEmitter.event}get onCommit(){return this.onCommitEmitter.event}get onCancel(){return this.onCancelEmitter.event}get onFocus(){return this.onFocusEmitter.event}get onBlur(){return this.onBlurEmitter.event}get onDestroy(){return this.onDestroyEmitter.event}focus(){this.$.focus()}setSelectionRange(s,g){this.$.setSelectionRange(s,g)}addClassName(s){this.$.classList.add(s)}removeClassName(s){this.$.classList.remove(s)}addAddonAfter(s){var g,l;!this._hasAddonAfter&&!this._destroyed&&((l=(g=this.$.parentElement)===null||g===void 0?void 0:g.parentElement)===null||l===void 0||l.appendChild(this.$addonAfter),this._hasAddonAfter=!0);const h=document.createElement("div");h.setAttribute("class",s),this.$addonAfter.appendChild(h)}removeAddonAfter(){var s,g,l;this._hasAddonAfter&&((s=this.$addonAfter.firstChild)===null||s===void 0||s.remove(),(l=(g=this.$.parentElement)===null||g===void 0?void 0:g.parentElement)===null||l===void 0||l.removeChild(this.$addonAfter),this._hasAddonAfter=!1)}addValidateMessage(s){var g,l,h,u,d,E,f;!this._hasValidateElement&&!this._destroyed&&((h=(l=(g=this.$.parentElement)===null||g===void 0?void 0:g.parentElement)===null||l===void 0?void 0:l.parentElement)===null||h===void 0||h.appendChild(this.$validate),this._hasValidateElement=!0);let c="validate-message popup ";s&&s.type===p.ERROR?this._validateClassName=v.ERROR:s&&s.type===p.WARNING?this._validateClassName=v.WARNING:this._validateClassName=v.INFO,c+=this._validateClassName,this.$validate.classList.value=c;const y=(0,o.toMarkdownHtml)(s.message||"",{renderer:this.markdownRenderer});this.$validate.innerHTML=typeof y=="string"?y:"",(d=(u=this.$.parentElement)===null||u===void 0?void 0:u.parentElement)===null||d===void 0||d.classList.remove(v.INFO,v.ERROR,v.WARNING),(f=(E=this.$.parentElement)===null||E===void 0?void 0:E.parentElement)===null||f===void 0||f.classList.add(this._validateClassName)}removeValidateMessage(){var s,g,l,h,u;this._hasValidateElement&&((l=(g=(s=this.$.parentElement)===null||s===void 0?void 0:s.parentElement)===null||g===void 0?void 0:g.parentElement)===null||l===void 0||l.removeChild(this.$validate),this._hasValidateElement=!1,(u=(h=this.$.parentElement)===null||h===void 0?void 0:h.parentElement)===null||u===void 0||u.classList.remove(this._validateClassName))}destroy(){if(this._destroyed)return;const s=this.focusPrevActiveElement();this._destroyed=!0,this.$.removeEventListener("click",this.handleClick),this.$.removeEventListener("keyup",this.handleKeyup),this.$.removeEventListener("keydown",this.handleKeydown),this.$.removeEventListener("focus",this.handleFocus),this.$.removeEventListener("blur",this.handleBlur),this.removeValidateMessage(),this.removeAddonAfter(),this.$.disabled=!1,this.onDestroyEmitter.fire(this.$.value),this.disposables.dispose(),requestAnimationFrame(()=>{s?.focus()})}focusPrevActiveElement(){let s=this.$.parentElement;for(;s&&!(typeof s.attributes.tabindex<"u");)s=s?.parentElement;return s}}t.PromptHandle=m},58357:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenamePromptHandle=void 0;const n=e(65747);class r extends n.PromptHandle{constructor(a,p){super(),this.originalFileName=a,this.target=p,this.$.value=a,this.setSelectionRange(0,a.lastIndexOf("."))}get id(){return this.target.id}get depth(){return this.target.depth}}t.RenamePromptHandle=r},48103:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(65747),t),n.__exportStar(e(58357),t),n.__exportStar(e(65601),t)},29805:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tree=void 0;const n=e(70392),r=e(26353);class o{constructor(){this.onChangedEmitter=new n.Emitter,this.toDispose=new n.DisposableCollection,this.nodes={}}dispose(){var p;this.toDispose.dispose(),(p=this._root)===null||p===void 0||p.dispose()}get root(){return this._root}set root(p){var v;p!==this._root&&((v=this._root)===null||v===void 0||v.dispose(),this._root=p)}fireChanged(){this.onChangedEmitter.fire(void 0)}sortComparator(p,v){return p.constructor===v.constructor?p.name>v.name?1:p.name<v.name?-1:0:r.CompositeTreeNode.is(p)?-1:r.CompositeTreeNode.is(v)?1:0}}t.Tree=o},26353:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeTreeNode=t.TreeNode=t.BranchOperatorStatus=void 0,t.spliceArray=a;const n=e(70392),r=e(34054),{Path:o}=n.path;function a(_,s,g=0,l){const h=_.slice(0);return h.splice(s,g,...l||[]),h}var p;(function(_){_[_.EXPANDED=1]="EXPANDED",_[_.SHRINKED=2]="SHRINKED"})(p||(t.BranchOperatorStatus=p={}));class v{static is(s){return!!s&&"depth"in s&&"name"in s&&"path"in s&&"id"in s}static getTreeNodeById(s){return v.idToTreeNode.get(s)}static getTreeNodeByPath(s){return v.pathToTreeNode.get(s)}static setTreeNode(s,g,l){v.idToTreeNode.set(s,l),v.pathToTreeNode.set(g,l)}static removeTreeNode(s,g){v.idToTreeNode.delete(s),v.pathToTreeNode.delete(g)}static getIdByPath(s){return v.pathToId.get(s)}static setIdByPath(s,g){return v.pathToId.set(s,g)}static getGlobalTreeState(s){let g=v.pathToGlobalTreeState.get(s);return g||(g={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),g}static setGlobalTreeState(s,g){let l=v.pathToGlobalTreeState.get(s);return l||(l={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),l={...l,...g},v.pathToGlobalTreeState.set(s,l),l}constructor(s,g,l,h){this._uid=v.nextId(),this._parent=g,this._tree=s,this._disposed=!1,this._visible=!0,this._metadata={...h||{}},this._depth=g?g.depth+1:0,l?this._watcher=l:g&&(this._watcher=g.watcher)}get disposed(){return this._disposed}get depth(){return this._depth}get parent(){return this._parent}set parent(s){this._parent=s,this._path=""}get type(){return r.TreeNodeType.TreeNode}get id(){return this._uid}set id(s){this._uid=s}get displayName(){return this.name}get name(){return this.parent?this.getMetadata("name")||String(this.id):`root_${this.id}`}set name(s){this.addMetadata("name",s),this._path=""}get path(){return this._path||(this.parent?this._path=this.name.startsWith(o.separator)?`${this.parent.path}${this.name}`:`${this.parent.path}${o.separator}${this.name}`:this._path=this.name.startsWith(o.separator)?this.name:`${o.separator}${this.name}`),this._path}get checkboxInfo(){return{checked:!1,tooltip:"",accessibilityInformation:this.accessibilityInformation}}get accessibilityInformation(){return{label:this.name,role:"treeitem"}}getMetadata(s){return s==="name"&&!this._metadata[s]&&(this._metadata[s]=String(v.nextId())),this._metadata[s]}addMetadata(s,g){if(!(s in this._metadata))this._metadata[s]=g,this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Added,key:s,prevValue:void 0,value:g});else{const l=this._metadata[s];this._metadata[s]=g,this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Updated,key:s,prevValue:l,value:g})}}removeMetadata(s){if(s in this._metadata){const g=this._metadata[s];delete this._metadata[s],this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Removed,key:s,prevValue:g,value:void 0})}}mv(s,g=this.name){const l=this._parent;if(s===null||!m.is(s)){this._parent=void 0,this.dispose();return}const h=l!==s,u=this.path;this._depth=s.depth+1,(h||g!==this.name)&&(this.name=g,h&&this._watcher.notifyWillChangeParent(this,l,s),this.parent&&(this.parent.unlinkItem(this,!0),this.parent=s,this.parent.insertItem(this)),h&&this._watcher.notifyDidChangeParent(this,l,s)),this.path!==u&&this._watcher.notifyDidChangePath(this)}get visible(){return this._visible}setVisible(s){return this._visible=s,this}dispose(){this._disposed||(v.removeTreeNode(this.id,this.path),this._disposed=!0,this._watcher.notifyDidDispose(this))}}t.TreeNode=v,v.nextId=(()=>{let _=0;return()=>_++})(),v.idToTreeNode=new Map,v.pathToTreeNode=new Map,v.pathToId=new Map,v.pathToGlobalTreeState=new Map;class m extends v{static defaultSortComparator(s,g){return s.constructor===g.constructor?s.name>g.name?1:s.name<g.name?-1:0:m.is(s)?-1:m.is(g)?1:0}static is(s){return!!s&&"children"in s}static isRoot(s){return m.is(s)&&!s.parent}generatorWatcher(){const s=new n.Emitter,g=s.event,l=new n.DisposableCollection,h=d=>{this.watchEvents.delete(d)};return{notifyWillProcessWatchEvent:(d,E)=>{s.fire({type:r.TreeNodeEvent.WillProcessWatchEvent,args:[d,E]})},notifyWillChangeParent:(d,E,f)=>{s.fire({type:r.TreeNodeEvent.WillChangeParent,args:[d,E,f]})},notifyDidChangeParent:(d,E,f)=>{s.fire({type:r.TreeNodeEvent.DidChangeParent,args:[d,E,f]})},notifyDidDispose:d=>{s.fire({type:r.TreeNodeEvent.DidDispose,args:[d]})},notifyDidProcessWatchEvent:(d,E)=>{s.fire({type:r.TreeNodeEvent.DidProcessWatchEvent,args:[d,E]})},notifyDidChangePath:d=>{s.fire({type:r.TreeNodeEvent.DidChangePath,args:[d]})},notifyWillChangeExpansionState:(d,E)=>{const f=this.isItemVisibleAtSurface(d);s.fire({type:r.TreeNodeEvent.WillChangeExpansionState,args:[d,E,f]})},notifyDidChangeExpansionState:(d,E)=>{const f=this.isItemVisibleAtSurface(d);s.fire({type:r.TreeNodeEvent.DidChangeExpansionState,args:[d,E,f]})},notifyDidChangeMetadata:(d,E)=>{s.fire({type:r.TreeNodeEvent.DidChangeMetadata,args:[d,E]})},notifyDidUpdateBranch:()=>{s.fire({type:r.TreeNodeEvent.BranchDidUpdate,args:[]})},notifyWillResolveChildren:(d,E)=>{s.fire({type:r.TreeNodeEvent.WillResolveChildren,args:[d,E]})},notifyDidResolveChildren:(d,E)=>{s.fire({type:r.TreeNodeEvent.DidResolveChildren,args:[d,E]})},on:(d,E)=>{const f=g(c=>{c.type===d&&E(...c.args)});return l.push(f),f},onWatchEvent:(d,E)=>{const f=h;return this.watchEvents.set(d,{terminator:f,callback:E}),f},dispose:l}}constructor(s,g,l,h){super(s,g,l,h),this._children=null,this._lock=!1,this.refreshThrottler=new n.ThrottledDelayer(m.REFRESH_DELAY),this.toRefreshPathQueue=new Set,this.handleWatchEvent=async u=>{switch(this.watcher.notifyWillProcessWatchEvent(this,u),u.type){case r.WatchEvent.Moved:{const{oldPath:d,newPath:E}=u;if(typeof d!="string")throw new TypeError("Expected oldPath to be a string");if(typeof E!="string")throw new TypeError("Expected newPath to be a string");if(o.isRelative(d))throw new TypeError("oldPath must be absolute");if(o.isRelative(E))throw new TypeError("newPath must be absolute");this.transferItem(d,E);break}case r.WatchEvent.Added:{const{node:d}=u;if(!v.is(d))throw new TypeError("Expected node to be a TreeNode");this.insertItem(d);break}case r.WatchEvent.Removed:{const{path:d}=u,E=new o(d),f=E.dir.toString(),c=E.base.toString();if(f===this.path&&this.children){const y=this.children.find(b=>b.name===c);y&&this.unlinkItem(y)}break}default:this.isItemVisibleAtRootSurface(this)?await this.refresh():(this.isExpanded=!1,this._children=null);break}this.watcher.notifyDidProcessWatchEvent(this,u)},this.isExpanded=!g,this._branchSize=0,g?this._watcher=g.watcher:(this.watchEvents=new Map,this._watcher=this.generatorWatcher(),this._root=this,v.setTreeNode(this.id,this.path,this))}set name(s){const g=this.path;!m.isRoot(this)&&typeof this.watchTerminator=="function"?(this.watchTerminator(g),this.addMetadata("name",s),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent)):this.addMetadata("name",s),this._path=""}get name(){return this.parent?this.getMetadata("name"):`root_${this.id}`}get watcher(){return this._watcher}get type(){return r.TreeNodeType.CompositeTreeNode}get children(){return this._children}get expanded(){return this.isExpanded}get branchSize(){return this._branchSize}get flattenedBranch(){return this._flattenedBranch}get lock(){return this._lock}get root(){return(0,n.isUndefined)(this._root)&&(this._root=this.getRoot()||null),this._root}getRoot(){let s=this.parent;for(;s&&s.parent;)s=s.parent;return s}async ensureLoaded(s){if(!this._children)return await this.hardReloadChildren(s)}async setExpanded(s=!0,g=!1,l=!0,h){if(!this.disposed&&!m.isRoot(this)&&!this.isExpanded){if(l){const u=v.getGlobalTreeState(this.path);u.loadPathCancelToken.cancel(),u.refreshCancelToken.cancel(),v.setGlobalTreeState(this.path,{isExpanding:!0})}if(this.isExpanded=!0,this._children===null&&(this._watcher.notifyWillResolveChildren(this,this.isExpanded),await this.hardReloadChildren(h),this._watcher.notifyDidResolveChildren(this,this.isExpanded),!this.isExpanded||h?.isCancellationRequested)){l&&v.setGlobalTreeState(this.path,{isExpanding:!1});return}if(s&&this.parent&&m.is(this.parent)&&await this.parent.setExpanded(!0,!g,!1,h),h?.isCancellationRequested){l&&v.setGlobalTreeState(this.path,{isExpanding:!1});return}this.isExpanded&&(this._watcher.notifyWillChangeExpansionState(this,!0),this.expandBranch(this,g),this._watcher.notifyDidChangeExpansionState(this,!0)),l&&(v.setGlobalTreeState(this.path,{isExpanding:!1}),v.setTreeNode(this.id,this.path,this))}}getAllExpandedNodePath(){var s,g;const l=[];let h=0;m.isRoot(this)||(h=((s=this.root)===null||s===void 0?void 0:s.getIndexAtTreeNodeId(this.id))+1);const u=h+this.branchSize;for(let d=h;d<u;d++){const E=(g=this.root)===null||g===void 0?void 0:g.getTreeNodeAtIndex(d);m.is(E)&&E.expanded&&l.push(E.path)}return l}getAllCollapsedNodePath(){let s=[];if(this.children){for(let g=0;g<this.children.length;g++){const l=this.children[g];m.is(l)&&(l.isExpanded?s=s.concat(l.getAllCollapsedNodePath()):s.push(l.path))}return s}else return s}async resolveChildrens(s){var g,l,h;let u=this.children,d=[];try{u=await this._tree.resolveChildren(this)||[]}catch{u=[]}if(s?.isCancellationRequested)return!1;const E=new Array(u.length);this._children=Array(u.length);for(let c=0;c<u.length;c++){const y=u[c];y.id=v.getIdByPath(y.path)||y.id,this._children[c]=y,v.setIdByPath(y.path,y.id)}(g=this._children)===null||g===void 0||g.sort(this._tree.sortComparator||m.defaultSortComparator);for(let c=0;c<u.length;c++)E[c]=this._children[c].id;const f=[];for(let c=0,y=((l=this.children)===null||l===void 0?void 0:l.length)||0;c<y;c++){const b=(h=this.children)===null||h===void 0?void 0:h[c];if(m.is(b)&&b.expanded){const A=await b.resolveChildrens(s);if(A&&(d=d.concat(A)),s?.isCancellationRequested)return;f.push(b)}}this._branchSize=E.length,this.setFlattenedBranch(E);for(let c=0;c<f.length;c++){const y=f[c];y.expandBranch(y,!0)}return d.concat(f.map(c=>c.path.toString()))}updateTreeNodeCache(s){var g;if(v.setTreeNode(s.id,s.path,s),m.is(s)&&s.expanded&&(!((g=s.children)===null||g===void 0)&&g.length))for(let l=0;l<s.children.length;l++){const h=s.children[l];this.updateTreeNodeCache(h)}}async refreshTreeNodeByPaths(s=this.getAllExpandedNodePath(),g,l){if(!m.is(this))return;let h;const u=this.children;let d=this.children||[];if(this.expanded){if(this===l){try{d=await this._tree.resolveChildren(this)||[]}catch{d=[]}if(g?.isCancellationRequested)return;if(!this.expanded){if(this.children&&this.children&&this.parent){for(let E=0;E<this.children.length;E++)this.children[E].dispose();this._children=null}return}}for(;h=s.shift();){if(!(h.indexOf(`${this.path}${o.separator}`)>-1)){h===this.path&&(h=void 0);break}const f=d?.find(c=>c.path===h);if(f){if(m.is(f)&&!f.expanded){f.isExpanded=!0;const c=await f.resolveChildrens(g);if(g?.isCancellationRequested||(c&&(s=s.filter(y=>!c.find(b=>b.includes(y)))),s.length>0&&!g?.isCancellationRequested&&(s=await f.refreshTreeNodeByPaths([...s],g,l)||[],g?.isCancellationRequested)))return}}else{if(!d||d.length===0)break;for(let c=0;c<d.length;c++){const y=d[c];if(h.indexOf(`${y.path}${o.separator}`)===0&&m.is(y)){if(!m.is(y))continue;y.isExpanded=!0;const A=await y.resolveChildrens(g);if(g?.isCancellationRequested||(A&&(s=s.filter(S=>!A.find(D=>D===S))),y.path!==h&&!s.includes(y.path)&&s.unshift(h),s.length>0&&(s=await y.refreshTreeNodeByPaths([...s],g,l)||[],g?.isCancellationRequested)))return;break}}}}if(h){if(s.unshift(h),this===l){if(u){this.shrinkBranch(this,!0);for(let c=0;c<u.length;c++){const y=u[c];y?.dispose()}}const E=[],f=new Array(d.length);this._children=Array(d.length);for(let c=0;c<d.length;c++){const y=d[c];y.id=v.getIdByPath(y.path)||y.id,this._children[c]=y,v.setIdByPath(y.path,y.id),m.is(y)&&y.expanded&&E.push(y)}this._children.sort(this._tree.sortComparator||m.defaultSortComparator);for(let c=0;c<d.length;c++)f[c]=this._children[c].id;this._branchSize=f.length,this.setFlattenedBranch(f,!0),this.watcher.notifyDidUpdateBranch()}return this.parent!==l&&this.expandBranch(this,!0),s}else if(m.isRoot(this)){if(this.children){this.shrinkBranch(this,!0);for(let y=0;y<this.children.length;y++){const b=this.children[y];b?.dispose()}}const E=[],f=[],c=new Array(d.length);this._children=Array(d.length);for(let y=0;y<d.length;y++){const b=d[y];if(b.id=v.getIdByPath(b.path)||b.id,this._children[y]=b,v.setIdByPath(b.path,b.id),m.is(b)&&b.expanded){if(!b.children&&(await b.resolveChildrens(g),g?.isCancellationRequested))return;E.push(b)}else f.push(b)}this._children.sort(this._tree.sortComparator||m.defaultSortComparator);for(let y=0;y<d.length;y++)c[y]=this._children[y].id;this._branchSize=c.length,this.setFlattenedBranch(c,!0);for(let y=0;y<E.length;y++){const b=E[y];b.expandBranch(b,!0),this.updateTreeNodeCache(b)}for(let y=0;y<f.length;y++){const b=f[y];this.updateTreeNodeCache(b)}typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),this.watcher.notifyDidUpdateBranch()}else{const E=[];if(this===l){if(this.children&&this.shrinkBranch(this,!0),this.children)for(let c=0,y=this.children.length;c<y;c++)this.children[c].dispose();const f=new Array(d.length);this._children=Array(d.length);for(let c=0,y=d.length;c<y;c++){const b=d[c];b.id=v.getIdByPath(b.path)||b.id,this._children[c]=b,v.setIdByPath(b.path,b.id),m.is(b)&&b.expanded&&E.push(b),this.updateTreeNodeCache(b)}this._children.sort(this._tree.sortComparator||m.defaultSortComparator);for(let c=0;c<d.length;c++)f[c]=this._children[c].id;this._branchSize=f.length,this.setFlattenedBranch(f);for(let c=0;c<E.length;c++){const y=E[c];y.expandBranch(y,!0)}}else for(let f=0;f<d.length;f++){const c=d[f];c.expanded&&E.push(c)}for(let f=0;f<E.length;f++){const c=E[f];c.expandBranch(c,!0)}typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),this===l&&this.expandBranch(this)}}else{if(this.children&&this.children&&this.parent){for(let E=0,f=this.children.length;E<f;E++)this.children[E].dispose();this._children=null}return}}async expandedAll(s=this.getAllCollapsedNodePath()){if(!m.isRoot(this))return;s=s.sort((l,h)=>o.pathDepth(l)-o.pathDepth(h));let g;for(;s.length>0;){g=s.pop();const l=v.getTreeNodeByPath(g);m.is(l)&&await l.setExpanded(!1,!0)}this.watcher.notifyDidUpdateBranch()}async collapsedAll(s=this.getAllExpandedNodePath()){if(!m.isRoot(this))return;s=s.sort((l,h)=>o.pathDepth(l)-o.pathDepth(h));let g;for(;s.length>0;){g=s.pop();const l=v.getTreeNodeByPath(g);m.is(l)&&l.setCollapsed(!0)}this.watcher.notifyDidUpdateBranch()}setCollapsed(s=!1){if(m.isRoot(this)||this.disposed||!this.isExpanded)return;const g=v.getGlobalTreeState(this.path);g.isExpanding||(g.loadPathCancelToken.cancel(),g.refreshCancelToken.cancel(),this._watcher.notifyWillChangeExpansionState(this,!1),this._children&&this.parent&&this.shrinkBranch(this,s),this.isExpanded=!1,v.setTreeNode(this.id,this.path,this),this._watcher.notifyDidChangeExpansionState(this,!1))}mv(s,g=this.name){const l=this.path;if(super.mv(s,g),typeof this.watchTerminator=="function"&&(this.watchTerminator(l),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent)),this.children)for(let h=0;h<this.children.length;h++){const u=this.children[h];u.mv(u.parent,u.name)}}insertItem(s){if(s.parent!==this){s.mv(this,s.name);return}if(this.children){for(let f=0;f<this.children.length;f++)if(this.children[f].path===s.path){this.children[f]=s;return}}const g=1+(s instanceof m&&s.expanded?s._branchSize:0);this._children&&(this._children.push(s),this._children.sort(this._tree.sortComparator||m.defaultSortComparator)),this._branchSize+=g;let l=this;for(;!l._flattenedBranch;)l.parent&&(l=l.parent,l._branchSize+=g);if(!this._children)return;let h=this._children.indexOf(s),u;const d=this._children[h-1];d?h=l._flattenedBranch.indexOf(d.id)+(d instanceof m&&d.expanded?d._branchSize:0):h=l._flattenedBranch.indexOf(this.id),h===-1&&this._branchSize===1&&(h=0),u=h+1,l._flattenedBranch.length===0&&(u=0);let E=[s.id];return s instanceof m&&s.expanded&&s._flattenedBranch&&(E=E.concat(s._flattenedBranch),s.setFlattenedBranch(null)),l.setFlattenedBranch(a(l._flattenedBranch,u,0,E)),v.setTreeNode(s.id,s.path,s),s}unlinkItem(s,g){var l;if(!this._children)return;const h=this._children.indexOf(s);if(h===-1||!this.isItemVisibleAtRootSurface(this))return;(l=this._children)===null||l===void 0||l.splice(h,1);const u=1+(s instanceof m&&s.expanded?s._branchSize:0);this._branchSize-=u;let d=this;for(;!d._flattenedBranch;)d.parent&&(d=d.parent,d._branchSize-=u);const E=d._flattenedBranch.indexOf(s.id);E!==-1&&(s instanceof m&&s.expanded&&s.setFlattenedBranch(d._flattenedBranch.slice(E+1,E+u)),d.setFlattenedBranch(a(d._flattenedBranch,E,u)),!g&&s.parent===this&&s.mv(null))}transferItem(s,g){var l;const h=new o(s),u=h.dir.toString();if(u!==this.path)return;const d=h.base.toString(),E=(l=this._children)===null||l===void 0?void 0:l.find(b=>b.name===d);if(!E)return;const f=new o(g),c=f.dir.toString(),y=c===u?this:v.getTreeNodeByPath(c);if(!m.is(y)){this.unlinkItem(E);return}return E.mv(y,f.base.toString()),E}dispose(){if(this.watchEvents){const s=this.watchEvents.get(this.path);s&&s.terminator(),this.watchEvents.clear()}this._children&&(this.isExpanded=!1,this._children.forEach(s=>{s.dispose()}),this._children=null,this._flattenedBranch=null),super.dispose()}setFlattenedBranch(s,g){this._flattenedBranch=s,m.isRoot(this)&&!g&&this.watcher.notifyDidUpdateBranch()}expandBranch(s,g){if(this!==s&&s._flattenedBranch&&(this._branchSize+=s._branchSize),this!==s&&this._flattenedBranch){const l=this._flattenedBranch.indexOf(s.id)+1;if(l===0)return;this.setFlattenedBranch(a(this._flattenedBranch,l,0,s._flattenedBranch),g),s.setFlattenedBranch(null,g)}else this.parent&&this.parent.expandBranch(s,g)}shrinkBranch(s,g){if(this!==s&&(this._branchSize-=s._branchSize),this!==s&&this._flattenedBranch){const l=this._flattenedBranch.indexOf(s.id)+1;if(l===0)return;s.setFlattenedBranch(this._flattenedBranch.slice(l,l+s._branchSize),g),this.setFlattenedBranch(a(this._flattenedBranch,l,s._flattenedBranch?s._flattenedBranch.length:0),g)}else this.parent&&this.parent.shrinkBranch(s,g)}async hardReloadChildren(s){let g;const l=this.path;try{g=await this._tree.resolveChildren(this)||[]}catch{g=[]}if(!this.expanded||s?.isCancellationRequested)return!1;this.path!==l&&v.setGlobalTreeState(l,{isExpanding:!1,isLoadingPath:!1,isRefreshing:!1});const h=[],u=new Array(g.length),d=new Array(g.length);for(let E=0;E<g.length;E++){const f=g[E];if(f.id=v.getIdByPath(f.path)||f.id,d[E]=f,v.setIdByPath(f.path,f.id),m.is(f)&&f.expanded){if(f.children||await f.resolveChildrens(s),s?.isCancellationRequested)return!1;h.push(f)}}d.sort(this._tree.sortComparator||m.defaultSortComparator);for(let E=0;E<g.length;E++)u[E]=d[E].id;if(this.children&&this.shrinkBranch(this),this.children)for(let E=0;E<this.children.length;E++){const f=this.children[E];f?.dispose()}for(let E=0;E<d.length;E++)this.updateTreeNodeCache(d[E]);this._children=d,this._branchSize=u.length,this.setFlattenedBranch(u);for(let E=0;E<h.length;E++){const f=h[E];f.expandBranch(f,!0)}return typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),!0}moveNode(s,g){if(typeof s!="string")throw new TypeError("Expected oldPath to be a string");if(typeof g!="string")throw new TypeError("Expected newPath to be a string");if(o.isRelative(s))throw new TypeError("oldPath must be absolute");if(o.isRelative(g))throw new TypeError("newPath must be absolute");return this.transferItem(s,g)}addNode(s){if(!v.is(s))throw new TypeError("Expected node to be a TreeNode");return this.insertItem(s)}removeNode(s){const g=new o(s),l=g.dir.toString(),h=g.base.toString();if(l===this.path&&this.children){const u=this.children.find(d=>d.name===h);u&&this.unlinkItem(u)}}async refresh(s,g){if(!m.isRoot(this))return await this.root.refresh(s,this);const l=v.getGlobalTreeState(this.path);if(l.isLoadingPath||l.isExpanding)return;let h;if(s&&!s.token.isCancellationRequested)v.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:s}),h=s.token;else if(l.refreshCancelToken.token.isCancellationRequested){const u=new n.CancellationTokenSource;v.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:u}),h=u.token}else h=l.refreshCancelToken.token;this.toRefreshPathQueue.add((g||this).path),await this.refreshThrottler.trigger(()=>this.doRefresh(h)),v.setGlobalTreeState(this.path,{isRefreshing:!1})}async doRefresh(s){const g=this.getRefreshNode()||this;if(!m.is(g))return;const l=g.getAllExpandedNodePath();await g.refreshTreeNodeByPaths(l,s,g)}getRefreshNode(){let s=Array.from(this.toRefreshPathQueue);if(this.toRefreshPathQueue.clear(),!s.length)return this.root;if(s=s.sort((h,u)=>{const d=o.pathDepth(h),E=o.pathDepth(u);return d-E}),s.length===1||o.pathDepth(s[0])===1)return v.getTreeNodeByPath(s[0]);const g=s.map(h=>new o(h));let l=g[0];for(let h=1,u=g.length;h<u;h++)if(!l.isEqualOrParent(g[h]))for(;!l.isRoot&&(l=l.dir,!(!l||l.isEqualOrParent(g[h]))););return l?v.getTreeNodeByPath(l.toString()):this.root}isItemVisibleAtRootSurface(s){let g=s;for(;g.parent;)g=g.parent;return g.isItemVisibleAtSurface(s)}isItemVisibleAtSurface(s){return s===this?!0:!!this._flattenedBranch&&this._flattenedBranch.indexOf(s.id)>-1}transformToRelativePath(s){const{splitPath:g}=o,l=g(s);return l.shift(),l}async loadTreeNodeByPath(s,g=!1){if(!m.isRoot(this))return;const l=v.getGlobalTreeState(this.path);if(l.isExpanding)return;l.refreshCancelToken.cancel(),l.loadPathCancelToken.cancel();const h=new n.CancellationTokenSource;v.setGlobalTreeState(this.path,{isLoadingPath:!0,loadPathCancelToken:h});const u=h.token,d=[],{splitPath:E,isRelative:f}=o,c=f(s)?E(s):this.transformToRelativePath(s);if(c.length===0)return v.setGlobalTreeState(this.path,{isLoadingPath:!1}),this;if(this.children||await this.ensureLoaded(u),u.isCancellationRequested){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}let y=this._children,b,A="",S;for(;y&&(S=c.shift());){let D=y.find(I=>I.name.indexOf(S)===0);if(D){if(m.is(D)){if(D._watcher.notifyWillChangeExpansionState(D,!0),D.isExpanded=!0,!D.children&&(await D.resolveChildrens(u),u.isCancellationRequested)){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}d.push(D),D._watcher.notifyDidChangeExpansionState(D,!0)}if(c.length===0){b=D;break}}if(!D&&b){const I=E(b.name).slice(1);if(I[0]===S){for(I.shift();I.length>0&&I[0]===c[0];)I.shift(),c.shift();S=c.shift(),D=y.find(w=>w.name.indexOf(S)===0)}}if(!D||!m.is(D)&&c.length>0)break;if(m.is(D)){if(D.name.indexOf(o.separator)>0){const w=E(D.name).slice(1);for(;w.length>0&&w[0]===c[0];)w.shift(),c.shift()}if(!D._children&&(A=D.path,m.is(D))){if(D.isExpanded=!0,!D.children&&(await D.resolveChildrens(u),u.isCancellationRequested)){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}d.push(D)}if(D&&c.length===0){b=D;break}else{if(A&&A!==D.path){const w=E(A),T=E(D.path);T.length>w.length&&c.splice(0,T.length-w.length)}y=D._children,b=D}}}if(b){let D;if(b.disposed){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}for(;D=d.pop();)D.expandBranch(D,!0),d.length===0&&this.updateTreeNodeCache(D);return g||this.watcher.notifyDidUpdateBranch(),v.setGlobalTreeState(this.path,{isLoadingPath:!1}),b}v.setGlobalTreeState(this.path,{isLoadingPath:!1})}getIndexAtTreeNodeId(s){return this._flattenedBranch?this._flattenedBranch.indexOf(s):-1}getIndexAtTreeNode(s){return this._flattenedBranch?this._flattenedBranch.indexOf(s.id):-1}getTreeNodeAtIndex(s){var g;const l=(g=this._flattenedBranch)===null||g===void 0?void 0:g[s];if(l)return v.getTreeNodeById(l)}getTreeNodeById(s){return v.getTreeNodeById(s)}getTreeNodeByPath(s){return v.getTreeNodeByPath(s)}}t.CompositeTreeNode=m,m.REFRESH_DELAY=200},58781:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeDecoration=t.ChangeReason=t.CompositeDecorationType=t.ClasslistComposite=void 0;const n=e(70392),r=e(96336);class o{constructor(_,s){this.addChangeListener=_,this.removeChangeListener=s}}t.ClasslistComposite=o;var a;(function(m){m[m.Applicable=1]="Applicable",m[m.Inheritable=2]="Inheritable"})(a||(t.CompositeDecorationType=a={}));var p;(function(m){m[m.UnTargetDecoration=1]="UnTargetDecoration",m[m.TargetDecoration=2]="TargetDecoration"})(p||(t.ChangeReason=p={}));class v{constructor(_,s,g){this.handleDecorationDidAddClassname=l=>{const{classname:h}=l;!this.selfOwned||!h||(this.compositeCssClasslist.classlist.push(h),this.notifyClasslistChange())},this.handleDecorationDidRemoveClassname=l=>{const{classname:h}=l;if(!this.selfOwned||!h)return;const u=this.compositeCssClasslist.classlist.indexOf(h);u>-1&&(this.compositeCssClasslist.classlist.splice(u,1),this.notifyClasslistChange())},this.mergeDecorationClasslist=l=>{const{decoration:h}=l;this.selfOwned&&(this.compositeCssClasslist.classlist.push(...h.cssClassList),this.notifyClasslistChange())},this.handleDecorationDisable=l=>{const{decoration:h}=l;this.removeDecorationClasslist(h)},this.target=_,this.type=s,this.linkedComposites=new Set,this.classlistChangeCallbacks=new Set,this.compositeCssClasslist=new o(this.classlistChangeCallbacks.add.bind(this.classlistChangeCallbacks),this.classlistChangeCallbacks.delete.bind(this.classlistChangeCallbacks)),g?(this.selfOwned=!1,this.parent=g,this.renderedDecorations=g.renderedDecorations,this.compositeCssClasslist.classlist=g.compositeCssClasslist.classlist,g.linkedComposites.add(this)):(this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set,this.compositeCssClasslist.classlist=[],this.selfOwned=!0)}changeParent(_){if(_){if(!this.selfOwned)return this.parentOwn(_);for(const[s]of this.renderedDecorations)this.recursiveRefresh(this,!1,p.UnTargetDecoration,s,!1);this.parent!==_&&(this.parent.linkedComposites.delete(this),this.parent=_,_.linkedComposites.add(this));for(const[s]of _.renderedDecorations)this.recursiveRefresh(this,!1,p.TargetDecoration,s,!1)}}add(_){const s=_.appliedTargets.get(this.target),g=s&&(s===r.TargetMatchMode.Self||s===r.TargetMatchMode.SelfAndChildren),l=s&&(s===r.TargetMatchMode.Children||s===r.TargetMatchMode.SelfAndChildren);if(!(this.type===a.Applicable&&!g)&&!(this.type===a.Inheritable&&!l)){if(!this.selfOwned){this.selfOwn(p.TargetDecoration,_),this.targetedDecorations.add(_);return}this.targetedDecorations.has(_)||(this.targetedDecorations.add(_),this.recursiveRefresh(this,!1,p.TargetDecoration,_))}}remove(_){if(this.selfOwned&&this.targetedDecorations.delete(_)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn(void 0,p.UnTargetDecoration,_);this.recursiveRefresh(this,!1,p.UnTargetDecoration,_)}}negate(_){const s=_.negatedTargets.get(this.target),g=s&&(s===r.TargetMatchMode.Self||s===r.TargetMatchMode.SelfAndChildren),l=s&&(s===r.TargetMatchMode.Children||s===r.TargetMatchMode.SelfAndChildren);if(!(this.type===a.Applicable&&!g)&&!(this.type===a.Inheritable&&!l)){if(!this.selfOwned){this.selfOwn(p.UnTargetDecoration,_),this.negatedDecorations.add(_);return}this.negatedDecorations.has(_)||(this.negatedDecorations.add(_),this.renderedDecorations.has(_)&&this.removeDecorationClasslist(_))}}unNegate(_){if(this.selfOwned&&this.negatedDecorations.delete(_)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn();!this.renderedDecorations.has(_)&&(this.parent.renderedDecorations.has(_)||_.appliedTargets.has(this.target))&&this.recursiveRefresh(this,!1,p.TargetDecoration,_)}}selfOwn(_,s){if(this.selfOwned)throw new Error("CompositeDecoration is already self owned");const g=this.parent;this.selfOwned=!0,this.compositeCssClasslist.classlist=[],this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set;for(const[l]of g.renderedDecorations)l!==s&&this.processCompositeAlteration(p.TargetDecoration,l);_===p.UnTargetDecoration&&this.parent.renderedDecorations.has(s)&&!this.renderedDecorations.has(s)&&this.notifyClasslistChange(!1),this.recursiveRefresh(this,!0,_,s)}parentOwn(_,s,g){this.selfOwned=!1,this.targetedDecorations&&this.targetedDecorations.clear(),this.negatedDecorations&&this.negatedDecorations.clear(),_&&this.parent!==_&&(this.parent&&this.parent.linkedComposites.delete(this),_.linkedComposites.add(this),this.parent=_),this.recursiveRefresh(this,!0,s,g)}processCompositeAlteration(_,s){if(!this.selfOwned)throw new Error("CompositeDecoration is not self owned");if(_===p.UnTargetDecoration){const g=this.renderedDecorations.get(s);if(g){const l=s.appliedTargets.get(this.target),h=l&&(l===r.TargetMatchMode.Self||l===r.TargetMatchMode.SelfAndChildren),u=l&&(l===r.TargetMatchMode.Children||l===r.TargetMatchMode.SelfAndChildren);return h&&this.type===a.Applicable||u&&this.type===a.Inheritable?!1:(this.removeDecorationClasslist(s,!1),g&&g.dispose(),this.renderedDecorations.delete(s))}return!1}if(_===p.TargetDecoration){const g=s.negatedTargets.get(this.target),l=g&&(g===r.TargetMatchMode.Self||g===r.TargetMatchMode.SelfAndChildren),h=g&&(g===r.TargetMatchMode.Children||g===r.TargetMatchMode.SelfAndChildren);if(l&&this.type===a.Applicable||h&&this.type===a.Inheritable)return!1;if(!this.renderedDecorations.has(s)){const u=new n.DisposableCollection;return u.push(s.onDidAddCSSClassname(this.handleDecorationDidAddClassname)),u.push(s.onDidRemoveCSSClassname(this.handleDecorationDidRemoveClassname)),u.push(s.onDidDisableDecoration(this.handleDecorationDisable)),u.push(s.onDidEnableDecoration(this.mergeDecorationClasslist)),this.renderedDecorations.set(s,u),s.disabled?!1:(this.compositeCssClasslist.classlist.push(...s.cssClassList),!0)}}return!1}recursiveRefresh(_,s,g,l,h=!0){if(!this.selfOwned&&s&&(this.renderedDecorations=this.parent.renderedDecorations,this.compositeCssClasslist.classlist=this.parent.compositeCssClasslist.classlist),this.selfOwned&&s&&_!==this){for(const[u]of this.renderedDecorations)this.processCompositeAlteration(p.UnTargetDecoration,u);for(const[u]of this.parent.renderedDecorations)this.processCompositeAlteration(p.TargetDecoration,u);h&&this.notifyClasslistChange(!1)}else this.selfOwned&&g===p.UnTargetDecoration&&l&&this.renderedDecorations.has(l)?(this.processCompositeAlteration(g,l),h&&this.notifyClasslistChange(!1)):this.selfOwned&&g===p.TargetDecoration&&l&&this.processCompositeAlteration(g,l)&&h?this.notifyClasslistChange(!1):!this.selfOwned&&h&&this.notifyClasslistChange(!1);for(const u of this.linkedComposites)u.recursiveRefresh(_,s,g,l,h)}removeDecorationClasslist(_,s=!0){if(this.selfOwned){for(const g of _.cssClassList){const l=this.compositeCssClasslist.classlist.indexOf(g);l>-1&&this.compositeCssClasslist.classlist.splice(l,1)}s&&this.notifyClasslistChange()}}notifyClasslistChange(_=!0){for(const s of[...this.classlistChangeCallbacks])s();if(_)for(const s of this.linkedComposites)s.selfOwned||s.notifyClasslistChange()}}t.CompositeDecoration=v},96336:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Decoration=t.TargetMatchMode=void 0;const n=e(70392),r=e(26353);var o;(function(p){p[p.None=1]="None",p[p.Self=2]="Self",p[p.Children=3]="Children",p[p.SelfAndChildren=4]="SelfAndChildren"})(o||(t.TargetMatchMode=o={}));class a{constructor(...v){if(this._appliedTargets=new Map,this._negatedTargets=new Map,this._disabled=!1,this.appliedTargetsDisposables=new WeakMap,this.negatedTargetsDisposables=new WeakMap,this.onDidAddCSSClassnameEmitter=new n.Emitter,this.onDidRemoveCSSClassnameEmitter=new n.Emitter,this.onDidDisableDecorationEmitter=new n.Emitter,this.onDidEnableDecorationEmitter=new n.Emitter,this.onDidAddTargetEmitter=new n.Emitter,this.onDidRemoveTargetEmitter=new n.Emitter,this.onDidNegateTargetEmitter=new n.Emitter,this.onDidUnNegateTargetEmitter=new n.Emitter,Array.isArray(v))if(v.every(m=>typeof m=="string"))this._cssClassList=new Set(v);else throw new TypeError("classlist must be of type `Array<string>`");else this._cssClassList=new Set}get disabled(){return this._disabled}set disabled(v){this._disabled=v,v?this.onDidDisableDecorationEmitter.fire({decoration:this}):this.onDidEnableDecorationEmitter.fire({decoration:this})}get appliedTargets(){return this._appliedTargets}get negatedTargets(){return this._negatedTargets}get cssClassList(){return this._cssClassList}get onDidAddCSSClassname(){return this.onDidAddCSSClassnameEmitter.event}get onDidRemoveCSSClassname(){return this.onDidRemoveCSSClassnameEmitter.event}get onDidDisableDecoration(){return this.onDidDisableDecorationEmitter.event}get onDidEnableDecoration(){return this.onDidEnableDecorationEmitter.event}get onDidAddTarget(){return this.onDidAddTargetEmitter.event}get onDidRemoveTarget(){return this.onDidRemoveTargetEmitter.event}get onDidNegateTarget(){return this.onDidNegateTargetEmitter.event}get onDidUnNegateTarget(){return this.onDidUnNegateTargetEmitter.event}addCSSClass(v){this._cssClassList.has(v)||(this._cssClassList.add(v),this.onDidAddCSSClassnameEmitter.fire({decoration:this,classname:v}))}removeCSSClass(v){this._cssClassList.has(v)&&(this._cssClassList.delete(v),this.onDidRemoveCSSClassnameEmitter.fire({decoration:this,classname:v}))}hasTarget(v){return!!this._appliedTargets.get(v)}addTarget(v,m=o.Self){if(this._appliedTargets.get(v)===m||!r.TreeNode.is(v))return;this._appliedTargets.set(v,m);const s=n.Disposable.create(()=>{this.removeTarget(v)});return this.appliedTargetsDisposables.set(v,s),this.onDidAddTargetEmitter.fire({decoration:this,target:v}),s}removeTarget(v){if(this._appliedTargets.delete(v)){const m=this.appliedTargetsDisposables.get(v);m&&m.dispose(),this.onDidRemoveTargetEmitter.fire({decoration:this,target:v})}}clearAppliedTarget(){const v=Array.from(this._appliedTargets.keys());for(const m of v)this.removeTarget(m)}clearNegateTarget(){const v=Array.from(this._negatedTargets.keys());for(const m of v)this.unNegateTarget(m)}negateTarget(v,m=o.Self){if(this._negatedTargets.get(v)===m||!r.TreeNode.is(v))return;this._negatedTargets.set(v,m);const s=n.Disposable.create(()=>{this.unNegateTarget(v)});return this.negatedTargetsDisposables.set(v,s),this.onDidNegateTargetEmitter.fire({decoration:this,target:v}),s}unNegateTarget(v){if(this._negatedTargets.delete(v)){const m=this.negatedTargetsDisposables.get(v);m&&m.dispose(),this.onDidUnNegateTargetEmitter.fire({decoration:this,target:v})}}}t.Decoration=a},29701:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationsManager=void 0;const n=e(70392),r=e(34054),o=e(26353),a=e(58781);class p{constructor(m){this.root=m,this.decorations=new Map,this.decorationsMeta=new WeakMap,this.disposables=new n.DisposableCollection,this.disposed=!1,this.targetDecoration=_=>{const{decoration:s,target:g}=_,l=this.getDecorationData(g);if(l){const{applicable:h,inheritable:u}=l;h.add(s),u&&u.add(s)}},this.updateTarget=()=>{for(const[_]of this.decorations)for(const[s,g]of Array.from(_.appliedTargets)){_.removeTarget(s);const l=this.root.getTreeNodeByPath(s.path);l&&_.addTarget(l,g)}},this.unTargetDecoration=_=>{const{decoration:s,target:g}=_,l=this.getDecorationData(g);if(l){const{applicable:h,inheritable:u}=l;h.remove(s),u&&u.remove(s)}},this.negateDecoration=_=>{const{decoration:s,target:g}=_,l=this.getDecorationData(g);if(l){const{applicable:h,inheritable:u}=l;h.negate(s),u&&u.negate(s)}},this.unNegateDecoration=_=>{const{decoration:s,target:g}=_,l=this.getDecorationData(g);if(l){const{applicable:h,inheritable:u}=l;h.unNegate(s),u&&u.unNegate(s)}},this.switchParent=(_,s,g)=>{const l=this.decorationsMeta.get(_);if(!l)return;const h=this.getDecorationData(g);h&&(l.applicable.changeParent(h.inheritable),l.inheritable&&l.inheritable.changeParent(h.inheritable))},this.decorationsMeta.set(m,{applicable:new a.CompositeDecoration(m,a.CompositeDecorationType.Applicable),inheritable:new a.CompositeDecoration(m,a.CompositeDecorationType.Inheritable)}),this.disposables.push(m.watcher.on(r.TreeNodeEvent.DidChangeParent,this.switchParent)),this.disposables.push(m.watcher.on(r.TreeNodeEvent.DidDispose,_=>this.decorationsMeta.delete(_))),this.disposables.push(m.watcher.on(r.TreeNodeEvent.BranchDidUpdate,this.updateTarget))}dispose(){for(const[m]of this.decorations)this.removeDecoration(m);this.disposables.dispose(),this.disposed=!0}addDecoration(m){if(this.disposed)throw new Error("DecorationManager disposed");if(this.decorations.has(m))return;const _=new n.DisposableCollection;_.push(m.onDidAddTarget(this.targetDecoration)),_.push(m.onDidRemoveTarget(this.unTargetDecoration)),_.push(m.onDidNegateTarget(this.negateDecoration)),_.push(m.onDidUnNegateTarget(this.unNegateDecoration)),this.decorations.set(m,_);for(const[s]of m.appliedTargets)this.targetDecoration({decoration:m,target:s});for(const[s]of m.negatedTargets)this.negateDecoration({decoration:m,target:s})}removeDecoration(m){const _=this.decorations.get(m);if(_){for(const[s]of m.appliedTargets){const g=this.decorationsMeta.get(s);g&&(g.applicable.remove(m),g.inheritable&&g.inheritable.remove(m))}for(const[s]of m.negatedTargets){const g=this.decorationsMeta.get(s);g&&(g.applicable.unNegate(m),g.inheritable&&g.inheritable.unNegate(m))}_.dispose(),this.decorations.delete(m)}}getDecorations(m){if(!m||!o.TreeNode.is(m))return;const _=this.getDecorationData(m);if(_)return _.applicable.compositeCssClasslist}getDecorationData(m){if(this.disposed)return;const _=this.decorationsMeta.get(m);if(_)return _;if(!m||!m.parent)return;const s=this.getDecorationData(m.parent);if(s){const g={applicable:new a.CompositeDecoration(m,a.CompositeDecorationType.Applicable,s.inheritable),inheritable:o.CompositeTreeNode.is(m)?new a.CompositeDecoration(m,a.CompositeDecorationType.Inheritable,s.inheritable):void 0};return this.decorationsMeta.set(m,g),g}}}t.DecorationsManager=p},24936:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(96336),t),n.__exportStar(e(29701),t),n.__exportStar(e(58781),t)},43685:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(29805),t),n.__exportStar(e(26353),t),n.__exportStar(e(58615),t),n.__exportStar(e(24936),t)},13674:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeModel=void 0;const n=e(70392),r=e(34054),o=e(70609);class a{constructor(){this.onChangeEmitter=new n.Emitter,this.dispatchChange=()=>{this.onChangeEmitter.fire()}}get onChange(){return this.onChangeEmitter.event}get ensureReady(){return this._ensureReady}get root(){return this._root}set root(v){this._root=v,this.initState(v),this.root&&(this._ensureReady=this.root.ensureLoaded())}get state(){return this._state}set state(v){this._state=v}init(v){this.root=v,this.root.watcher.on(r.TreeNodeEvent.BranchDidUpdate,this.dispatchChange)}initState(v){this.state=new o.TreeStateManager(v)}loadTreeState(v){return typeof v=="string"&&(v=JSON.parse(v)),this.state.loadTreeState(v)}getTreeStateWatcher(v=!1){return new o.TreeStateWatcher(this.state,v)}resolveChildren(v){return Promise.resolve(Array.from(v.children))}}t.TreeModel=a},58615:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(13674),t)},12165:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateManager=t.Operation=void 0;const n=e(70392),r=e(34054),o=e(26353),{Path:a}=n.path;var p;(function(_){_[_.SetExpanded=1]="SetExpanded",_[_.SetCollapsed=2]="SetCollapsed",_[_.SetActive=3]="SetActive"})(p||(t.Operation=p={}));var v;(function(_){_[_.Expanded=1]="Expanded",_[_.Collapsed=2]="Collapsed",_[_.Disabled=4]="Disabled"})(v||(v={}));class m{constructor(s){this.expandedDirectories=new Map,this._scrollOffset=0,this.stashing=!1,this.stashLockingItems=new Set,this.onDidLoadStateEmitter=new n.Emitter,this.onChangeScrollOffsetEmitter=new n.Emitter,this.onDidChangeExpansionStateEmitter=new n.Emitter,this.onDidChangeRelativePathEmitter=new n.Emitter,this.handleExpansionChange=(g,l,h)=>{var u;if(this.stashing&&this.stashKeyframes&&this.stashKeyframes.set(g.id,l?v.Expanded:v.Collapsed),this.stashKeyframes&&!this.stashing){if(l){let E=g;for(;E;){if(this.stashKeyframes.has(E.id)){let f=this.stashKeyframes.get(E.id);f=f|v.Disabled,this.stashKeyframes.set(E.id,f)}E=E.parent}this.stashLockingItems.add(g)}if(this.stashLockingItems&&this.stashLockingItems.has(g)&&!l){let E=g;for(;E;){if(this.stashKeyframes.has(E.id)){let f=this.stashKeyframes.get(E.id);f&=~v.Disabled,this.stashKeyframes.set(E.id,f)}E=E.parent}this.stashLockingItems.delete(g)}}let d=this.expandedDirectories.get(g);l&&!d?(d=(u=new a(this.root.path).relative(new a(g.path)))===null||u===void 0?void 0:u.toString(),this.expandedDirectories.set(g,d),this.onDidChangeExpansionStateEmitter.fire({relativePath:d,isExpanded:l,isVisibleAtSurface:h})):!l&&d&&(this.expandedDirectories.delete(g),this.onDidChangeExpansionStateEmitter.fire({relativePath:d,isExpanded:l,isVisibleAtSurface:h}))},this.handleDidChangePath=g=>{var l;if(this.expandedDirectories.has(g)){const h=this.expandedDirectories.get(g),u=(l=new a(this.root.path).relative(new a(g.path)))===null||l===void 0?void 0:l.toString();this.expandedDirectories.set(g,u),this.onDidChangeRelativePathEmitter.fire({prevPath:h,newPath:u})}},this.root=s,this.root.watcher.on(r.TreeNodeEvent.DidChangeExpansionState,this.handleExpansionChange),this.root.watcher.on(r.TreeNodeEvent.DidChangePath,this.handleDidChangePath)}get scrollOffset(){return this._scrollOffset}saveScrollOffset(s){this._scrollOffset=s,this.onChangeScrollOffsetEmitter.fire(s)}get onDidLoadState(){return this.onDidLoadStateEmitter.event}get onChangeScrollOffset(){return this.onChangeScrollOffsetEmitter.event}get onDidChangeExpansionState(){return this.onDidChangeExpansionStateEmitter.event}get onDidChangeRelativePath(){return this.onDidChangeRelativePathEmitter.event}async loadTreeState(s){if(s){for(const g of s.expandedDirectories.buried)try{const l=await this.root.loadTreeNodeByPath(g);if(!l)break;l&&o.CompositeTreeNode.is(l)&&l.setCollapsed()}catch{}for(const g of s.expandedDirectories.atSurface)try{if(!await this.root.loadTreeNodeByPath(g,!0))break}catch{}this._scrollOffset=typeof s.scrollPosition=="number"&&s.scrollPosition>-1?s.scrollPosition:this._scrollOffset,this.root.watcher.notifyDidUpdateBranch(),this.onDidLoadStateEmitter.fire()}}excludeFromStash(s){this.stashKeyframes&&!this.stashing&&this.handleExpansionChange(o.CompositeTreeNode.is(s)?s:s.parent,!0,this.root.isItemVisibleAtSurface(s))}beginStashing(){this.stashing=!0,this.stashKeyframes=new Map}endStashing(){this.stashing=!1,this.stashLockingItems.clear()}async reverseStash(){if(!this.stashKeyframes)return;this.endStashing();const s=Array.from(this.stashKeyframes);this.stashKeyframes=null;for(const[g,l]of s){const h=(l&v.Disabled)===v.Disabled,u=o.TreeNode.getTreeNodeById(g);!u||h||((l&v.Expanded)===v.Expanded?u.setCollapsed():(l&v.Collapsed)===v.Collapsed&&await u.setExpanded())}}}t.TreeStateManager=m},72782:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcher=void 0;const n=e(70392),r=e(13440);class o{constructor(p,v=!1){this._disposed=!1,this.disposables=new n.DisposableCollection,this.onDidTreeStateChangeEmitter=new n.Emitter,this.currentState={specVersion:1,scrollPosition:0,expandedDirectories:{atSurface:[],buried:[]}},this.disposables.push(p.onChangeScrollOffset(m=>{this.currentState.scrollPosition=m,this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.ScrollOffset)})),this.disposables.push(p.onDidChangeRelativePath(({prevPath:m,newPath:_})=>{let s=!1;const g=new Set(this.currentState.expandedDirectories.atSurface);if(g.has(m)&&(g.delete(m),g.add(_),s=!0),this.currentState.expandedDirectories.atSurface=Array.from(g),v){const l=new Set(this.currentState.expandedDirectories.buried);l.has(m)&&(g.delete(m),g.add(_),s=!0),this.currentState.expandedDirectories.buried=Array.from(l)}s&&this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.PathsUpdated)})),this.disposables.push(p.onDidChangeExpansionState(({relativePath:m,isExpanded:_,isVisibleAtSurface:s})=>{let g=!1;const l=new Set(this.currentState.expandedDirectories.atSurface),h=new Set(this.currentState.expandedDirectories.buried);if(l.has(m)&&(!_||!s)){l.delete(m);const d=Array.from(l).filter(E=>E.indexOf(m)>=0);for(const E of d)l.delete(E),h.has(E)||h.add(E);g=!0}else _&&s&&(l.add(m),g=!0);this.currentState.expandedDirectories.atSurface=Array.from(l),v||(h.has(m)&&(!_||s)?(h.delete(m),g=!0):_&&!s&&(h.add(m),g=!0),this.currentState.expandedDirectories.buried=Array.from(h)),g&&this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.DirExpansionState)}))}get onDidChange(){return this.onDidTreeStateChangeEmitter.event}dispose(){this._disposed||(this._disposed=!0,this.disposables.dispose())}snapshot(){return{...this.currentState,expandedDirectories:{atSurface:this.currentState.expandedDirectories.atSurface.slice(),buried:this.currentState.expandedDirectories.buried.slice()}}}toString(){return JSON.stringify(this.currentState)}}t.TreeStateWatcher=o},70609:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcher=t.TreeStateManager=void 0;var n=e(12165);Object.defineProperty(t,"TreeStateManager",{enumerable:!0,get:function(){return n.TreeStateManager}});var r=e(72782);Object.defineProperty(t,"TreeStateWatcher",{enumerable:!0,get:function(){return r.TreeStateWatcher}})},13440:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcherChangeType=t.TreeStateEvent=void 0;var e;(function(r){r[r.DidChangeScrollOffset=1]="DidChangeScrollOffset",r[r.DidChangeDirExpansionState=2]="DidChangeDirExpansionState",r[r.DidChangeRelativePath=3]="DidChangeRelativePath",r[r.DidChange=4]="DidChange",r[r.DidLoadState=5]="DidLoadState"})(e||(t.TreeStateEvent=e={}));var n;(function(r){r[r.ScrollOffset=1]="ScrollOffset",r[r.DirExpansionState=2]="DirExpansionState",r[r.PathsUpdated=3]="PathsUpdated"})(n||(t.TreeStateWatcherChangeType=n={}))},34054:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(79632),t),n.__exportStar(e(32281),t),n.__exportStar(e(3754),t)},32281:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeNodeType=void 0;var e;(function(n){n[n.TreeNode=1]="TreeNode",n[n.CompositeTreeNode=2]="CompositeTreeNode",n[n.NewPrompt=3]="NewPrompt",n[n.RenamePrompt=4]="RenamePrompt"})(e||(t.TreeNodeType=e={}))},79632:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3754:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataChangeType=t.WatchEvent=t.TreeNodeEvent=void 0;var e;(function(o){o[o.WillChangeExpansionState=1]="WillChangeExpansionState",o[o.DidChangeExpansionState=2]="DidChangeExpansionState",o[o.WillChangeParent=3]="WillChangeParent",o[o.DidChangeParent=4]="DidChangeParent",o[o.DidDispose=5]="DidDispose",o[o.BranchDidUpdate=6]="BranchDidUpdate",o[o.DidChangePath=7]="DidChangePath",o[o.DidProcessWatchEvent=8]="DidProcessWatchEvent",o[o.WillProcessWatchEvent=9]="WillProcessWatchEvent",o[o.DidChangeMetadata=10]="DidChangeMetadata",o[o.DidResolveChildren=11]="DidResolveChildren",o[o.WillResolveChildren=12]="WillResolveChildren"})(e||(t.TreeNodeEvent=e={}));var n;(function(o){o[o.Added=1]="Added",o[o.Removed=2]="Removed",o[o.Changed=3]="Changed",o[o.Moved=4]="Moved"})(n||(t.WatchEvent=n={}));var r;(function(o){o[o.Added=1]="Added",o[o.Updated=2]="Updated",o[o.Removed=3]="Removed"})(r||(t.MetadataChangeType=r={}))},77011:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollbarsVirtualList=t.Scrollbars=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(97331)),a=n.__importStar(e(14041)),p=e(70392),v=e(56875);e(93324);const m=({onScroll:_,onUpdate:s,forwardedRef:g,style:l,children:h,className:u,onReachBottom:d,tabBarMode:E,thumbSize:f=5,hiddenVertical:c,hiddenHorizontal:y,universal:b=!1})=>{const A=(0,a.useRef)(new p.DisposableCollection),S=(0,a.useRef)(),D=(0,a.useCallback)(M=>{M?(S.current=M.view,g&&(typeof g=="function"?g(M.view):g.current=M.view)):g&&typeof g=="function"&&g(null)},[]),I=(0,a.useRef)(),w=(0,a.useRef)(),T=(0,a.useCallback)(M=>{if(!M)return;const{scrollTop:O,scrollHeight:x,clientHeight:k}=M;if(x===0&&k===0)return;(O+100)/(x-k)>1&&d&&d()},[d]),R=(0,a.useCallback)((0,o.default)(M=>{if(!M)return;const{scrollTop:O,scrollLeft:x}=M,k=1/20*Math.min(O,20),F=1/20*Math.min(x,20);I.current&&(I.current.style.opacity=String(k)),w.current&&(w.current.style.opacity=String(F)),T(M),s&&s(M)},100),[s,T,I.current,w.current]);return(0,a.useEffect)(()=>{const M=O=>{S.current&&(O.preventDefault(),O.stopPropagation(),S.current.clientHeight>=S.current.scrollHeight&&(O.deltaY!==0&&(S.current.scrollLeft+=O.deltaY),O.deltaX!==0&&(S.current.scrollLeft+=O.deltaX)))};return E&&S.current&&S.current.addEventListener("wheel",M),()=>{var O;(O=S.current)===null||O===void 0||O.removeEventListener("wheel",M)}},[S.current,E]),(0,a.useEffect)(()=>()=>A.current.dispose(),[]),a.default.createElement(v.Scrollbars,{ref:D,style:{...l,overflow:"hidden"},className:(0,r.default)(u,"kt-scrollbar"),onUpdate:R,onScroll:_,universal:b,renderTrackHorizontal:({style:M,...O})=>{const x={...M,height:f,left:0,right:0,bottom:1};return y&&(x.display="none"),a.default.createElement("div",{...O,style:x})},renderTrackVertical:({style:M,...O})=>{const x={...M,width:f,top:0,right:1,bottom:0};return c&&(x.display="none"),a.default.createElement("div",{...O,style:x})},renderThumbVertical:({style:M,className:O,...x})=>{const k={...M,width:f};return c&&(k.display="none"),a.default.createElement("div",{...x,style:k,className:(0,r.default)(O,"scrollbar-thumb-vertical")})},renderThumbHorizontal:({style:M,className:O,...x})=>{const k={...M,height:f,display:"none"};return y&&(k.display="none"),a.default.createElement("div",{...x,style:k,className:(0,r.default)(O,"scrollbar-thumb-horizontal")})}},a.default.createElement("div",{ref:M=>{I.current=M},className:"scrollbar-decoration-vertical"}),a.default.createElement("div",{ref:M=>{w.current=M},className:"scrollbar-decoration-horizontal"}),h)};t.Scrollbars=m,t.Scrollbars.displayName="CustomScrollbars",t.ScrollbarsVirtualList=a.default.forwardRef((_,s)=>a.default.createElement(t.Scrollbars,{..._,thumbSize:10,forwardedRef:s})),t.ScrollbarsVirtualList.displayName="ScrollbarsVirtualList"},14640:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectOptionsList=t.Option=void 0,t.isDataOptions=l,t.isDataOptionGroups=h,t.Select=A;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(54713),p=e(50708);e(11110);const v=({value:D,children:I,disabled:w,onClick:T,className:R,...M})=>o.default.createElement("span",{...M,className:(0,r.default)(R,{"kt-option-disabled":w}),onClick:()=>T&&!w&&T(D)},I);t.Option=v;function m(...D){}function _(D,I){return I?D.props[I]:D.props.value}function s(D,I){let w=[];return Array.isArray(D)?w=o.default.Children.toArray(D).map(I):w=[I(D)],w}function g(D,I,w=(T,R)=>T===R){const R=o.default.Children.toArray(I).filter(M=>o.default.isValidElement(M)).find(M=>{var O;return M.props&&w((O=M.props)===null||O===void 0?void 0:O.value,D)?M:null});return R?.props}function l(D){return D?D.length===0?!0:u(D[0]):!1}function h(D){return D?D.length===0?!0:d(D[0]):!1}function u(D){return D.value!==void 0}function d(D){return D.groupName!==void 0&&l(D.options)}function E(D){return o.default.createElement(o.default.Fragment,null,D.data.iconClass?o.default.createElement("div",{className:(0,r.default)(D.data.iconClass,"kt-select-option-icon")}):void 0,D.data.label)}function f({group:D,index:I}){return o.default.createElement("div",{key:"header_"+I,className:"kt-select-group-header"},D.iconClass?o.default.createElement("div",{className:(0,r.default)(D.iconClass,"kt-select-option-icon")}):void 0,o.default.createElement("div",null,D.groupName))}function c(D,I){let w=I.label;if(w===void 0)try{w=I.value.toString()}catch{w=void 0}return typeof w=="string"?w.indexOf(D)!==-1:!1}const y=o.default.memo(({selected:D,selectedRenderer:I})=>I?o.default.createElement(I,{data:D}):o.default.createElement(o.default.Fragment,null,D.iconClass&&o.default.createElement("div",{className:(0,r.default)(D.iconClass,"kt-select-option-icon")}),o.default.createElement("span",{className:"kt-select-option"},D.label))),b=o.default.memo(({value:D,onChange:I,placeholder:w,size:T="default"})=>o.default.createElement(p.Input,{className:"kt-select-search",value:D,size:T,onChange:R=>I(R.target.value),autoFocus:!0,placeholder:w||""}));function A({disabled:D,options:I,size:w="default",children:T,value:R,onChange:M,onMouseEnter:O,optionLabelProp:x,style:k,optionStyle:F,className:L,maxHeight:B,equals:U=(q,Ee)=>q===Ee,optionRenderer:W=E,groupTitleRenderer:j,footerComponent:Q,headerComponent:G,showSearch:Z=!1,filterOption:$=c,searchPlaceholder:V="",emptyComponent:H,selectedRenderer:K,onBeforeShowOptions:Y,allowOptionsOverflow:X,dropdownRenderType:oe="fixed",description:ie,notMatchWarning:he,onSearchChange:me}){const[q,Ee]=(0,o.useState)(!1),[ue,te]=(0,o.useState)(""),fe=o.default.useRef(null),Ie=o.default.useRef(null),Me=(0,o.useCallback)(Ae=>{Ae.preventDefault(),Ae.stopPropagation(),!(!q&&Y?.())&&Ee(!q)},[q,Y]),Pe=(0,o.useCallback)(()=>{var Ae,Ue,Ye,Ke,mt,_t,Mt,ct,wt;if(I&&l(I)){for(const st of I)if(U(R,st.value))return{iconClass:st.iconClass,label:st.label,value:st.value};return{iconClass:(Ae=I[0])===null||Ae===void 0?void 0:Ae.iconClass,label:(Ue=I[0])===null||Ue===void 0?void 0:Ue.label,value:(Ye=I[0])===null||Ye===void 0?void 0:Ye.value}}else if(I&&h(I)){for(const st of I)for(const rt of st.options)if(U(R,rt.value))return{iconClass:rt.iconClass,label:rt.label,value:rt.value};return{iconClass:(mt=(Ke=I[0])===null||Ke===void 0?void 0:Ke.options[0])===null||mt===void 0?void 0:mt.iconClass,label:(Mt=(_t=I[0])===null||_t===void 0?void 0:_t.options[0])===null||Mt===void 0?void 0:Mt.label,value:(wt=(ct=I[0])===null||ct===void 0?void 0:ct.options[0])===null||wt===void 0?void 0:wt.value}}else{const st=T&&g(R,T);if(st)return{label:st.label||st.value,value:st.value}}return{label:R,value:R,notMatch:!0}},[I,R,T])(),we=(0,r.default)("kt-select-options",{"kt-select-options-visible":q,[`kt-select-options-${w}`]:w}),_e=he&&Pe.notMatch,Ne=(0,r.default)("kt-select-value",{"kt-select-warning":_e,"kt-select-disabled":D,"kt-select-value-active":q,[`kt-select-value-${w}`]:w});function Te(Ae,Ue){var Ye;if(!Ae)return null;(typeof Ae=="string"||typeof Ae=="number")&&(Ae=o.default.createElement(t.Option,{value:Ae,label:String(Ae),key:`${Ae}_${Ue}`},Ae));const Ke=Ae,mt=((Ye=Ke.props)===null||Ye===void 0?void 0:Ye.disabled)||!1;return o.default.createElement("div",{key:`${Ke.props.value}_${Ue}`,className:(0,r.default)({"kt-select-option-select":R===Ke.props.value}),onMouseEnter:()=>O?.(Ke.props.value,Ue),onClick:mt?m:()=>{Ee(!1),M&&M(_(Ae,x))}},Ae)}(0,o.useEffect)(()=>{!q&&ue&&te("")},[]),(0,o.useEffect)(()=>{if(!q)return;const Ae=Ue=>{fe.current&&!fe.current.contains(Ue.target)&&Ee(!1)};return document.addEventListener("click",Ae),()=>document.removeEventListener("click",Ae)},[q]);const We=(0,o.useCallback)(()=>{if(!fe.current||!Ie.current)return;const Ae=fe.current.getBoundingClientRect(),Ue=Ie.current;X?(Ue.style.minWidth=`${Ae.width}px`,Ue.style.maxWidth=`${window.innerWidth-Ae.left-4}px`):Ue.style.width=`${Ae.width}px`;const Ye=window.innerHeight-Ae.bottom-50,Ke=Ue.clientHeight;Ye<Ke?Ue.style.bottom=`${Ae.height+4}px`:(Ue.style.maxHeight=`${Ye}px`,Ue.style.bottom="auto"),Ue.style.position=oe},[X,oe]);(0,o.useEffect)(()=>{if(q)return We(),window.addEventListener("resize",We),()=>window.removeEventListener("resize",We)},[q,We]);const pe=(0,o.useMemo)(()=>ue?l(I)?I.filter(Ae=>$(ue,Ae)):h(I)?I.reduce((Ae,Ue)=>{const Ye=Ue.options.filter(Ke=>$(ue,Ke,Ue));return Ye.length&&Ae.push({...Ue,options:Ye}),Ae},[]):I:I,[I,ue,$]),re=()=>o.default.createElement(o.default.Fragment,null,o.default.createElement(y,{selected:Pe,selectedRenderer:K}),o.default.createElement(a.Icon,{iconClass:(0,r.default)((0,a.getIcon)("down"),"kt-select-value-default-icon")})),ge=(0,o.useCallback)(Ae=>{te(Ae),me?.(Ae)},[ue,me]),De=()=>o.default.createElement(b,{value:ue,onChange:ge,placeholder:V});return o.default.createElement("div",{className:(0,r.default)("kt-select-container",L),ref:fe},o.default.createElement("div",{className:Ne,onClick:Me,style:k},Z&&q?De():re()),_e&&o.default.createElement("div",{className:"kt-select-warning-text"},he),q&&!ue&&(l(pe)||h(pe)?o.default.createElement(t.SelectOptionsList,{optionRenderer:W,options:pe,equals:U,optionStyle:F,currentValue:R,size:w,onSelect:Ae=>{M&&M(Ae),Ee(!1)},groupTitleRenderer:j,className:we,style:{maxHeight:`${B}px`},ref:Ie,footerComponent:Q,headerComponent:G,emptyComponent:H}):o.default.createElement("div",{className:we,style:{maxHeight:`${B}px`},ref:Ie},I&&I.map((Ae,Ue)=>Te(Ae,Ue)),T&&s(T,Te),ie&&o.default.createElement(S,{text:ie}),o.default.createElement("div",{className:"kt-select-overlay",onClick:Me}))))}function S({text:D}){return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-option-divider"}),o.default.createElement("div",{className:"kt-option-description"},D))}t.SelectOptionsList=o.default.forwardRef((D,I)=>{const{options:w,optionRenderer:T=E,equals:R=(H,K)=>H===K,onSelect:M,currentValue:O,optionStyle:x,size:k,className:F,style:L,groupTitleRenderer:B=f,renderCheck:U,headerComponent:W,footerComponent:j,emptyComponent:Q}=D,G=(0,r.default)("kt-select-options",{[`kt-select-options-${k}`]:!0},F);function Z(H){return H.map((K,Y)=>{const X=o.default.createElement(B,{group:K,index:Y});return o.default.createElement(o.default.Fragment,{key:"group_"+Y},X,$(K.options))})}function $(H){return H&&H.map((K,Y)=>{const X=R(O,K.value);return o.default.createElement(t.Option,{value:Y,key:Y,className:(0,r.default)({"kt-select-option-select":X,"kt-select-option-default":!0,"kt-option-with-check":U}),onClick:()=>M(K.value),style:x},U&&R(O,K.value)?o.default.createElement("div",{className:"kt-option-check"},o.default.createElement(a.Icon,{icon:"check"})):void 0,o.default.createElement(T,{data:K,isCurrent:X}))})}let V;return h(w)?V=w.filter(H=>H.options.length>0).length===0:V=w.length===0,o.default.createElement("div",{className:G,style:L,ref:I,onClick:H=>{H.stopPropagation()}},W?o.default.createElement(W,null):null,V&&Q?o.default.createElement(Q,null):(h(w)?Z(w):$(w))||Q&&o.default.createElement(Q,null),j?o.default.createElement(j,null):null)})},54076:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tabs=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041));e(1030);const a=p=>{const{tabs:v,className:m,value:_,onChange:s,mini:g,style:l,...h}=p,u=o.default.useCallback(d=>{typeof s=="function"&&s(d)},[]);return o.default.createElement("div",{...h,style:l,className:(0,r.default)("kt-tabs",m,{"kt-tabs-mini":g})},v.map((d,E)=>{const f=E===_?"kt-tab-selected":"";return typeof d=="string"?o.default.createElement("div",{key:E,className:(0,r.default)("kt-tab",f,{"kt-mini-tab":g}),onClick:u.bind(null,E)},d):o.default.createElement("div",{key:E,className:(0,r.default)("kt-custom-tab",f,{"kt-mini-tab":g}),onClick:u.bind(null,E)},d)}))};t.Tabs=a},72871:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tooltip=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041));e(24571);const a=({title:p,children:v,delay:m})=>{const[_,s]=(0,o.useState)(!1),g=(0,o.useRef)(null),l=(0,o.useRef)(null),h=(0,o.useRef)(null),u=(0,o.useRef)(null);(0,o.useEffect)(()=>()=>clearTimeout(u.current),[]);function d(){if(_){u.current&&clearTimeout(u.current);return}u.current=setTimeout(()=>{if(s(!0),l.current&&g.current&&h.current){const{x:f,y:c,width:y,height:b}=g.current.getBoundingClientRect(),A=l.current.getBoundingClientRect();c<A.height*1.5?(h.current.className+=" kt-tooltip-reverse-arrow",l.current.style.top=`${c+b+A.height/2}px`):l.current.style.top=`${c-A.height*1.5}px`,f+A.width/2>=document.body.offsetWidth?(h.current.style.right=`${y/2-7}px`,l.current.style.left=`${f+y-A.width}px`):f-A.width/2<=0?(h.current.style.left=`${y/2-7}px`,l.current.style.left=`${f}px`):(h.current.style.left=`${A.width/2-7}px`,l.current.style.left=`${f+y/2-A.width/2}px`)}clearTimeout(u.current)},m||500)}function E(){u.current&&clearTimeout(u.current),s(!1)}return o.default.createElement("p",{ref:g,className:"kt-tooltip-wrapper",onMouseEnter:d,onMouseLeave:E},v,_&&o.default.createElement("span",{ref:l,className:(0,r.default)("kt-tooltip-content")},p,o.default.createElement("span",{ref:h,className:"kt-tooltip-arrow-placeholder"})))};t.Tooltip=a},40604:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deprecated=a;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(65973));function a(p,v){return m=>(r.default.useEffect(()=>{(0,o.default)(!1,`${p.displayName||p.name} is deprecated: ${v}`)},[]),r.default.createElement(p,m))}},84605:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(40604),t),n.__exportStar(e(65973),t),n.__exportStar(e(43953),t),n.__exportStar(e(2835),t),n.__exportStar(e(47768),t),n.__exportStar(e(26809),t)},26809:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseWithoutEscape=t.toMarkdownHtml=t.parseMarkdown=t.createMarkedRenderer=t.marked=void 0;const n=e(33714);Object.defineProperty(t,"marked",{enumerable:!0,get:function(){return n.marked}});const r=()=>new n.Renderer;t.createMarkedRenderer=r;const o=(v,m)=>n.marked.parse(v,m);t.parseMarkdown=o;const a=(v,m)=>(0,n.marked)(v,m);t.toMarkdownHtml=a;const p=v=>{if(v.type==="escape"){const m=v;m.text=m.raw}return v};t.parseWithoutEscape=p},2835:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.collapseMotion=void 0;const e=()=>({height:0,opacity:0}),n=o=>({height:o.scrollHeight,opacity:1}),r=o=>({height:o.offsetHeight});t.collapseMotion={motionName:"kt-motion-collapse",onAppearStart:e,onEnterStart:e,onAppearActive:n,onEnterActive:n,onLeaveStart:r,onLeaveActive:e}},47768:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapperRaf=p;const r=e(85608).__importDefault(e(10719));let o=0;const a={};function p(v,m=1){const _=o++;let s=m;function g(){s-=1,s<=0?(v(),delete a[_]):a[_]=(0,r.default)(g)}return a[_]=(0,r.default)(g),_}p.cancel=function(m){m!==void 0&&(r.default.cancel(a[m]),delete a[m])},p.ids=a},43953:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tupleNum=t.tuple=void 0;const e=(...r)=>r;t.tuple=e;const n=(...r)=>r;t.tupleNum=n},65973:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warning=n,t.note=r,t.resetWarned=o,t.call=a,t.warningOnce=p,t.noteOnce=v;let e={};function n(m,_){}function r(m,_){}function o(){e={}}function a(m,_,s){!_&&!e[s]&&(m(!1,s),e[s]=!0)}function p(m,_){a(n,m,_)}function v(m,_){a(r,m,_)}t.default=p},91802:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualList=void 0;const r=e(85608).__importStar(e(14041)),o=e(24241),a=e(77011),p=({data:v,className:m,template:_,refSetter:s,onRangeChanged:g})=>{const l=(0,r.useRef)(null);return(0,r.useEffect)(()=>{s?.(l.current)},[l.current]),r.default.createElement(a.Scrollbars,{thumbSize:0},r.default.createElement(o.Virtuoso,{rangeChanged:h=>{g?.(h)},overscan:20,ref:l,style:{height:"100%"},className:m,data:v,itemContent:(h,u)=>r.default.createElement(_,{index:h,data:u})}))};t.VirtualList=p},18740:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(59019),t)},59019:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSChannelHandler=void 0;const n=e(40396),r=e(43718),o=e(54558),a=e(47561);class p{onChannelCreated(m,_){return this._onChannelCreatedEmitter.on(m,_)}constructor(m,_,s={}){this.connection=m,this._disposables=new r.DisposableStore,this._onChannelCreatedEmitter=this._disposables.add(new n.EventEmitter),this.channelMap=new Map,this.channelCloseEventMap=new r.MultiMap,this.logger=console,this.openingBarrier=new r.Barrier,this.logger=s.logger||this.logger,this.clientId=_,this.LOG_TAG=`[WSChannelHandler] [client-id:${this.clientId}]`;const g=s.serializer||o.furySerializer;this.wrappedConnection=(0,o.wrapSerializer)(this.connection,g)}replaceLogger(m){m&&(this.logger=m)}setReporter(m){this.reporterService=m}heartbeatMessage(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this.heartbeatMessageTimer=setTimeout(()=>{this.channelMap.forEach(m=>{m.ping()}),this.heartbeatMessage()},1e4)}async initHandler(){this.wrappedConnection.onMessage(_=>{switch(this.heartbeatMessage(),_.kind){case"pong":break;default:{const s=this.channelMap.get(_.id);s?s.dispatch(_):this.logger.warn(this.LOG_TAG,`channel ${_.id} not found`)}}});const m=()=>{this.channelMap.size>0&&this.channelMap.forEach(_=>{_.open(_.channelPath,this.clientId)})};this.connection.onClose((_,s)=>{this.channelMap.forEach(g=>{g.close(_,s)})}),this.connection.isOpen()&&(this.heartbeatMessage(),this.openingBarrier.open()),this.connection.onOpen(()=>{this.heartbeatMessage(),this.openingBarrier.isOpen()?m():this.openingBarrier.open()}),await this.openingBarrier.wait()}fillKey(m){return`${this.clientId}:${m}`}getChannel(m){return this.channelMap.get(this.fillKey(m))}async openChannel(m){const _=this.fillKey(m);this.channelMap.has(_)&&(this.channelMap.get(_).dispose(),this.logger.log(this.LOG_TAG,`channel ${_} already exists, dispose it`));const s=new a.WSChannel(this.wrappedConnection,{id:_,logger:this.logger,ensureServerReady:!0});this.channelMap.set(s.id,s),this._onChannelCreatedEmitter.emit(m,s);let g=0;s.onOpen(()=>{g++,g>1?(s.fireReopen(),this.logger.log(this.LOG_TAG,`channel reconnect ${this.clientId}:${s.channelPath}, count: ${g}`)):this.logger.log(this.LOG_TAG,`channel open ${this.clientId}:${s.channelPath}`);const u=this.channelCloseEventMap.get(s.id);u&&(u.forEach(d=>{this.reporterService&&this.reporterService.point(r.REPORT_NAME.CHANNEL_RECONNECT,r.REPORT_NAME.CHANNEL_RECONNECT,d)}),this.channelCloseEventMap.delete(s.id))}),s.onClose((u,d)=>{this.channelCloseEventMap.set(s.id,{channelPath:m,closeEvent:{code:u,reason:d},connectInfo:navigator.connection}),this.logger.log(this.LOG_TAG,`channel ${m} closed, code: ${u}, reason: ${d}`)});const l=new r.Deferred,h=s.onOpen(()=>{l.resolve(),h.dispose()});return s.open(m,this.clientId),await l.promise,s}dispose(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this._disposables.dispose()}awaitChannelReady(m){const _=this.getChannel(m),s=new r.Deferred;if(_)_.onServerReady(()=>{s.resolve()});else{const g=this.onChannelCreated(m,l=>{l.onServerReady(()=>{s.resolve()}),g.dispose()})}return s.promise}}t.WSChannelHandler=p},98710:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cursor=t.Buffers=t.emptyBuffer=void 0,t.copy=e,t.emptyBuffer=new Uint8Array(0);function e(o,a,p,v,m){a.set(o.subarray(v,m),p)}class n{constructor(){this.buffers=[],this.size=0}get byteLength(){return this.size}push(a){this.buffers.push(a),this.size+=a.length}unshift(a){this.buffers.unshift(a),this.size+=a.length}slice(a,p){const v=this.buffers;if(p===void 0&&(p=this.size),a===void 0&&(a=0),p>this.size&&(p=this.size),a>=p)return t.emptyBuffer;let m=0,_=0;for(;_<v.length&&m+v[_].length<=a;_++)m+=v[_].length;const s=new Uint8Array(p-a);let g=0;for(let l=_;g<p-a&&l<v.length;l++){const h=v[l].length,u=g===0?a-m:0,d=g+h>=p-a?Math.min(u+(p-a)-g,h):h;e(v[l],s,g,u,d),g+=d-u}return s}pos(a){if(a<0||a>=this.size)throw new Error(`out of range, ${a} not in [0, ${this.size})`);let p=a,v=0,m=null;for(;;){if(m=this.buffers[v],p<m.length)return{buf:v,offset:p};p-=m.length,v++}}copy(a,p=0,v=0,m=this.size){return e(this.slice(v,m),a,p,0,m-v)}splice(a,p,...v){const m=this.buffers,_=a>=0?a:this.size-a;p===void 0?p=this.size-_:p>this.size-_&&(p=this.size-_);for(const h of v)this.size+=h.length;const s=new n;let g=0,l=0;for(;l<m.length&&g+m[l].length<_;l++)g+=m[l].length;if(_-g>0){const h=_-g;if(h+p<m[l].length){s.push(m[l].slice(h,h+p));const u=m[l],d=new Uint8Array(h);for(let f=0;f<h;f++)d[f]=u[f];const E=new Uint8Array(u.length-h-p);for(let f=h+p;f<u.length;f++)E[f-p-h]=u[f];if(v.length>0){const f=v.slice();f.unshift(d),f.push(E),m.splice.apply(m,[l,1,...f]),l+=f.length,v=[]}else m.splice(l,1,d,E),l+=2}else s.push(m[l].slice(h)),m[l]=m[l].slice(0,h),l++}for(v.length>0&&(m.splice.apply(m,[l,0,...v]),l+=v.length);s.byteLength<p;){const h=m[l],u=h.length,d=Math.min(u,p-s.byteLength);d===u?(s.push(h),m.splice(l,1)):(s.push(h.slice(0,d)),m[l]=m[l].slice(d))}return this.size-=s.byteLength,s}get(a){const{buf:p,offset:v}=this.pos(a);return this.buffers[p][v]}set(a,p){const{buf:v,offset:m}=this.pos(a);this.buffers[v][m]=p}cursor(a=0){return new r(this,a)}dispose(){this.buffers=[],this.size=0}}t.Buffers=n;class r{constructor(a,p=0){this.buffers=a,this.offset=p,this.chunkIndex=0,this.chunkOffset=0,this.updatePosition()}updatePosition(){if(this.offset===0){this.chunkIndex=0,this.chunkOffset=0;return}const{buf:a,offset:p}=this.buffers.pos(this.offset);this.chunkIndex=a,this.chunkOffset=p}get line(){return this.chunkIndex}get lineWidth(){return this.buffers.buffers[this.chunkIndex].byteLength}get value(){return this.buffers.buffers[this.chunkIndex][this.chunkOffset]}get lineOffset(){return this.chunkOffset}*iterator(){for(;this.chunkIndex<this.buffers.buffers.length;){const a=this.buffers.buffers[this.chunkIndex],p=a.byteLength;for(;this.chunkOffset<p;){const v=a[this.chunkOffset];this.chunkOffset++,this.offset++,yield v}this.chunkOffset=0,this.chunkIndex++}}read(a){const p=this.offset+a,v=this.buffers.slice(this.offset,p);return this.skip(a),v}skip(a){let p=0;for(;this.chunkIndex<this.buffers.buffers.length;){const m=this.buffers.buffers[this.chunkIndex].byteLength;for(;this.chunkOffset<m;)if(this.chunkOffset++,this.offset++,++p===a)return;this.chunkOffset=0,this.chunkIndex++}}moveTo(a){this.offset=a,this.updatePosition()}dispose(){this.buffers=null,this.offset=0}reset(){this.offset=0,this.chunkIndex=0,this.chunkOffset=0}}t.Cursor=r},30613:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Capturer=t.ResponseStatus=t.MessageType=void 0,t.getCapturer=v;const n=e(43718),r=e(65265);var o;(function(_){_.SendNotification="sendNotification",_.SendRequest="sendRequest",_.RequestResult="requestResult",_.OnNotification="onNotification",_.OnRequest="onRequest",_.OnRequestResult="onRequestResult"})(o||(t.MessageType=o={}));var a;(function(_){_.Success="success",_.Fail="fail"})(a||(t.ResponseStatus=a={}));const p=typeof e.g>"u"?typeof window>"u"?{__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__:void 0}:window:e.g;function v(){const _=p.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__;if(_)return _.captureRPC}class m{constructor(s){this.source=s,this._disposables=new n.DisposableStore,this.capturer=null,this.setupListener=g=>{const{command:l}=g.detail;l===r.DevtoolsLantencyCommand.Start?this.capturer=v():l===r.DevtoolsLantencyCommand.Stop&&(this.capturer=null)},this.prefix=(0,n.randomString)(6),this.capturer=v(),typeof p.addEventListener=="function"&&(p.addEventListener(r.EDevtoolsEvent.Latency,this.setupListener),this._disposables.add({dispose:()=>{p.removeEventListener(r.EDevtoolsEvent.Latency,this.setupListener)}}))}capture(s){if(!this.capturer)return;const g={...s,source:this.source};g.data&&(0,n.isUint8Array)(g.data)&&(g.data="<Uint8Array>"),s.requestId&&(g.requestId=`${this.prefix}-${s.requestId}`),s.error&&(g.error=(0,n.transformErrorForSerialization)(s.error)),this.capturer(g)}captureOnRequest(s,g,l){this.capturer&&this.capture({type:o.OnRequest,requestId:`\u2193${s}`,serviceMethod:g,arguments:l})}captureOnRequestResult(s,g,l){this.capturer&&this.capture({type:o.OnRequestResult,status:a.Success,requestId:`\u2193${s}`,serviceMethod:g,data:l})}captureOnRequestFail(s,g,l){this.capturer&&this.capture({type:o.OnRequestResult,status:a.Fail,requestId:`\u2193${s}`,serviceMethod:g,error:l})}captureSendRequest(s,g,l){this.capturer&&this.capture({type:o.SendRequest,requestId:s,serviceMethod:g,arguments:l})}captureSendRequestResult(s,g,l){this.capturer&&this.capture({type:o.RequestResult,status:a.Success,requestId:s,serviceMethod:g,data:l})}captureSendRequestFail(s,g,l){this.capturer&&this.capture({type:o.RequestResult,status:a.Fail,requestId:s,serviceMethod:g,error:l})}captureSendNotification(s,g,l){this.capturer&&this.capture({type:o.SendNotification,serviceMethod:g,arguments:l,requestId:s})}captureOnNotification(s,g,l){this.capturer&&this.capture({type:o.OnNotification,serviceMethod:g,arguments:l,requestId:`\u2193${s}`})}dispose(){this._disposables.dispose()}}t.Capturer=m},29433:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(39048),t)},39048:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorMessageCode=void 0;var e;(function(n){n[n.ChannelNotFound=1]="ChannelNotFound"})(e||(t.ErrorMessageCode=e={}))},9811:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initRPCService=a,t.createRPCService=p,t.getRPCService=v;const n=e(85608),r=e(62199),o=e(8140);function a(m){return{createRPCService:(_,s)=>{const g=p(_,m);return s&&g.onRequestService(s),g},getRPCService:_=>v(_,m)}}function p(m,_){return new r.RPCServiceStub(m,_,o.ServiceType.Service).getProxy()}function v(m,_){return new r.RPCServiceStub(m,_,o.ServiceType.Stub).getProxy()}n.__exportStar(e(62199),t)},35821:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseConnection=void 0;class e{}t.BaseConnection=e},57358:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LengthFieldBasedFrameDecoder=t.indicator=void 0;const n=e(89212),r=e(43718),o=e(98710);t.indicator=new Uint8Array([13,10,13,10]);class a{constructor(){this.dataEmitter=new r.Emitter,this.onData=this.dataEmitter.event,this.buffers=new o.Buffers,this.cursor=this.buffers.cursor(),this.contentLength=-1,this.state=0,this.lengthFieldLength=4}reset(){this.contentLength=-1,this.state=0,this.cursor.reset()}push(v){this.buffers.push(v);let m=!1;for(;!m;)m=this.readFrame()}readFrame(){if(this.readLengthField()){const m=this.cursor.offset,_=m+this.contentLength,s=this.buffers.slice(m,_);if(this.dataEmitter.fire(s),this.buffers.byteLength>_)return this.contentLength=-1,this.state=0,this.cursor.moveTo(_),!1;this.buffers.splice(0,_),this.reset()}return!0}readLengthField(){const v=this.buffers.byteLength;if(this.state!==4){if(this.cursor.offset+t.indicator.length>v)return!1;this.readIndicator()}if(this.state!==4)return!1;if(this.contentLength===-1){if(this.cursor.offset+this.lengthFieldLength>v)return!1;const m=this.cursor.read(this.lengthFieldLength);this.contentLength=(0,r.readUInt32LE)(m,0)}return!(this.cursor.offset+this.contentLength>v)}readIndicator(){const v=this.cursor.iterator();let m=v.next();for(;!m.done;){switch(m.value){case 13:switch(this.state){case 0:this.state=1;break;case 2:this.state=3;break;default:this.state=0;break}break;case 10:switch(this.state){case 1:this.state=2;break;case 3:this.state=4,v.return();break;default:this.state=0;break}break;default:this.state=0;break}m=v.next()}}dispose(){this.dataEmitter.dispose(),this.buffers.dispose()}static construct(v){return a.writer.reset(),a.writer.buffer(t.indicator),a.writer.uint32(v.byteLength),a.writer.buffer(v),a.writer.dump()}}t.LengthFieldBasedFrameDecoder=a,a.writer=(0,n.BinaryWriter)({})},34982:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(35821),t),n.__exportStar(e(71056),t),n.__exportStar(e(57625),t),n.__exportStar(e(15272),t)},92917:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePortConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(a){super(),this.port=a,a.start()}send(a){this.port.postMessage(a)}onMessage(a){const p=v=>{a(v.data)};return this.port.addEventListener("message",p),{dispose:()=>{this.port.removeEventListener("message",p)}}}onceClose(a){return this.port.addEventListener("close",a),{dispose:()=>{this.port.addEventListener("close",a)}}}dispose(){}}t.MessagePortConnection=r},71056:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeMessagePortConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(a){super(),this.port=a}send(a){this.port.postMessage(a)}onMessage(a){return this.port.on("message",a),{dispose:()=>{this.port.off("message",a)}}}onceClose(a){return this.port.once("close",a),{dispose:()=>{this.port.off("close",a)}}}dispose(){this.port.removeAllListeners()}}t.NodeMessagePortConnection=r},91493:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReconnectingWebSocketConnection=void 0;const r=e(85608).__importDefault(e(31133)),o=e(35821);class a extends o.BaseConnection{constructor(v){super(),this.socket=v}send(v){this.socket.send(v)}isOpen(){return this.socket.readyState===this.socket.OPEN}onOpen(v){return this.socket.addEventListener("open",v),{dispose:()=>{this.socket.removeEventListener("open",v)}}}onMessage(v){const m=_=>{var s,g;let l;if(_.data instanceof Blob)l=_.data.arrayBuffer();else if(_.data instanceof ArrayBuffer)l=Promise.resolve(_.data);else if(((g=(s=_.data)===null||s===void 0?void 0:s.constructor)===null||g===void 0?void 0:g.name)==="Buffer")l=Promise.resolve(_.data);else throw new Error("unknown message type, expect Blob or ArrayBuffer, received: "+typeof _.data);l.then(h=>v(new Uint8Array(h,0,h.byteLength)))};return this.socket.addEventListener("message",m),{dispose:()=>{this.socket.removeEventListener("message",m)}}}onceClose(v){const m=this.onClose(_);return{dispose:()=>{m.dispose()}};function _(s,g){v(s,g),m.dispose()}}onClose(v){const m=_=>{v(_.code,_.reason)};return this.socket.addEventListener("close",m),{dispose:()=>{this.socket.removeEventListener("close",m)}}}onError(v){const m=_=>{v(_.error)};return this.socket.addEventListener("error",m),{dispose:()=>{this.socket.removeEventListener("error",m)}}}dispose(){}static forURL(v,m,_){const s=new r.default(v,m,_);return s.binaryType="arraybuffer",new a(s)}}t.ReconnectingWebSocketConnection=a},57625:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetSocketConnection=void 0;const n=e(36932);class r extends n.StreamConnection{constructor(a){super(a,a),this.socket=a}isOpen(){return this.socket.readyState==="open"}onOpen(a){return this.socket.on("connect",a),{dispose:()=>{this.socket.off("connect",a)}}}destroy(){this.socket.destroy()}}t.NetSocketConnection=r},36932:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamConnection=void 0;const n=e(35821),r=e(57358);class o extends n.BaseConnection{constructor(p,v){super(),this.readable=p,this.writable=v,this.decoder=new r.LengthFieldBasedFrameDecoder;const m=_=>{this.decoder.push(_)};this.readable.on("data",m),this.readable.once("close",()=>{this.decoder.dispose(),this.readable.off("data",m)})}send(p){const v=r.LengthFieldBasedFrameDecoder.construct(p);this.writable.write(v,()=>{})}onMessage(p){return this.decoder.onData(p)}onceClose(p){const v=this.onClose(m);return{dispose:()=>{v.dispose()}};function m(_,s){p(_,s),v.dispose()}}onClose(p){const v=m=>{p(m?1:0,m?"had error":"")};return this.readable.on("close",v),this.writable!==this.readable&&this.writable.on("close",v),{dispose:()=>{this.readable.off("close",v),this.writable!==this.readable&&this.writable.off("close",v)}}}onError(p){return this.readable.on("error",p),this.writable!==this.readable&&this.writable.on("error",p),{dispose:()=>{this.readable.off("error",p),this.writable!==this.readable&&this.writable.off("error",p)}}}dispose(){this.decoder.dispose()}}t.StreamConnection=o},15272:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSWebSocketConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(a){super(),this.socket=a}send(a){this.socket.send(a)}onMessage(a){return this.socket.on("message",a),{dispose:()=>{this.socket.off("message",a)}}}onceClose(a){return this.socket.once("close",a),{dispose:()=>{this.socket.off("close",a)}}}isOpen(){return this.socket.readyState===this.socket.OPEN}dispose(){this.socket.removeAllListeners()}}t.WSWebSocketConnection=r},90750:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(34982),t)},91676:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.METHOD_NOT_REGISTERED=void 0,t.METHOD_NOT_REGISTERED="$$METHOD_NOT_REGISTERED"},89104:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtObjectTransfer=t.AnySerializer=t.ProtocolType=void 0;const n=e(43718);var r;(function(v){v[v.String=0]="String",v[v.Buffer=1]="Buffer",v[v.Number=2]="Number",v[v.JSONObject=3]="JSONObject",v[v.BigInt=4]="BigInt",v[v.Array=5]="Array",v[v.Object=6]="Object",v[v.Undefined=7]="Undefined",v[v.Null=8]="Null",v[v.Boolean=9]="Boolean"})(r||(t.ProtocolType=r={}));class o{constructor(m,_,s){this.writer=m,this.reader=_,this.objectTransfer=s,this.deserialize=g=>(this.reader.reset(g),this.read()),this.serialize=g=>(this.writer.reset(),this.write(g),this.writer.dump())}write(m){var _;const{writer:s}=this,g=typeof m;switch(s.reserve(1),m){case null:s.uint8(r.Null);return;default:switch(g){case"undefined":s.uint8(r.Undefined);break;case"string":s.uint8(r.String),s.stringOfVarUInt32(m);break;case"boolean":s.reserve(1),s.uint8(r.Boolean),s.uint8(m?1:0);break;case"number":s.reserve(8),s.uint8(r.Number),s.double(m);break;case"bigint":s.reserve(8),s.uint8(r.BigInt),s.int64(m);break;case"object":if(Array.isArray(m)){s.reserve(4),s.uint8(r.Array),s.varUInt32(m.length);for(const l of m)this.write(l)}else(0,n.isUint8Array)(m)?(s.reserve(4),s.uint8(r.Buffer),s.varUInt32(m.byteLength),s.buffer(m)):(s.uint8(r.JSONObject),s.stringOfVarUInt32(JSON.stringify(m,(_=this.objectTransfer)===null||_===void 0?void 0:_.replacer)));break;default:throw new Error(`Unknown type ${g}`)}}}read(){var m;const{reader:_}=this,s=_.uint8();switch(s){case r.Undefined:return;case r.Null:return null;case r.String:return _.stringOfVarUInt32();case r.Buffer:{const g=_.varUInt32();return _.buffer(g)}case r.Number:return _.double();case r.JSONObject:{const g=_.stringOfVarUInt32();return JSON.parse(g,(m=this.objectTransfer)===null||m===void 0?void 0:m.reviver)}case r.BigInt:return _.int64();case r.Array:{const g=_.varUInt32(),l=[];for(let h=0;h<g;h++)l.push(this.read());return l}case r.Boolean:return _.uint8()===1;default:throw new Error(`Unknown type ${s}`)}}}t.AnySerializer=o;var a;(function(v){v.CODE_URI="CodeURI",v.BUFFER="Buffer"})(a||(a={}));class p{static replacer(m,_){if(_){switch(_.$mid){case 1:{const s=n.Uri.revive(_);return{$type:a.CODE_URI,data:s.toString()}}}if(_ instanceof Uint8Array||_ instanceof Uint32Array||_ instanceof Uint16Array)return{$type:"Buffer",data:Array.from(_)};if(_ instanceof ArrayBuffer)return{$type:"Buffer",data:Array.from(new Uint8Array(_))};if(_.type==="Buffer")return{$type:"Buffer",data:_.data}}return _}static reviver(m,_){if(_&&_.$type!==void 0&&_.data!==void 0)switch(_.$type){case a.CODE_URI:return n.Uri.parse(_.data);case a.BUFFER:return Uint8Array.from(_.data)}return _}}t.ExtObjectTransfer=p},94846:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oneOf=void 0;const n=e(26246),r=e(4405),o=8,a=(p,v)=>{v||(v=(0,r.furyFactory)());const{fury:m,reader:_,writer:s}=v,g=new Array(o),l=new Array(o),h={};return p.forEach((E,f)=>{const c=E.options.tag;g[f]=(0,n.generateSerializer)(m,E),l[f]=c,h[c]=f}),{deserialize:E=>{_.reset(E);const f=_.uint8();let c;switch(f){case 0:c=g[0].read();break;case 1:c=g[1].read();break;case 2:c=g[2].read();break;case 3:c=g[3].read();break;case 4:c=g[4].read();break;case 5:c=g[5].read();break;case 6:c=g[6].read();break;case 7:c=g[7].read();break}return c.kind=l[f],c},serialize:E=>{const f=h[E.kind];switch(s.reset(),s.uint8(f),f){case 0:g[0].write(E);break;case 1:g[1].write(E);break;case 2:g[2].write(E);break;case 3:g[3].write(E);break;case 4:g[4].write(E);break;case 5:g[5].write(E);break;case 6:g[6].write(E);break;case 7:g[7].write(E);break}return s.dump()}}};t.oneOf=a},4405:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.furyFactory=void 0;const r=e(85608).__importDefault(e(97419)),o=a=>{const p=new r.default(a),v=p.binaryReader,m=p.binaryWriter;return{fury:p,reader:v,writer:m}};t.furyFactory=o},25285:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(66748),t),n.__exportStar(e(62199),t),n.__exportStar(e(86058),t),n.__exportStar(e(15726),t),n.__exportStar(e(30613),t),n.__exportStar(e(47561),t),n.__exportStar(e(9811),t),n.__exportStar(e(8140),t),n.__exportStar(e(90750),t),n.__exportStar(e(54558),t),n.__exportStar(e(29433),t)},16908:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommonServerProtocol=void 0;const n=e(26387),r=e(43718);t.CommonServerProtocol={name:r.CommonServerPath,methods:[{method:"getBackendOS",request:[],response:{type:n.Type.uint16()}}]}},52890:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PositionProto=t.SelectionProto=t.RangeProto=t.UriComponentsProto=void 0;const n=e(26387);t.UriComponentsProto=n.Type.object("uri-components",{scheme:n.Type.string(),authority:n.Type.string(),path:n.Type.string(),query:n.Type.string(),fragment:n.Type.string()}),t.RangeProto=n.Type.object("range",{startLineNumber:n.Type.uint32(),startColumn:n.Type.uint32(),endLineNumber:n.Type.uint32(),endColumn:n.Type.uint32()}),t.SelectionProto=n.Type.object("selection",{selectionStartLineNumber:n.Type.uint32(),selectionStartColumn:n.Type.uint32(),positionLineNumber:n.Type.uint32(),positionColumn:n.Type.uint32()}),t.PositionProto=n.Type.object("position",{lineNumber:n.Type.uint32(),column:n.Type.uint32()})},11431:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDocumentProtocol=void 0;const n=e(26387),r=e(52890);t.ExtensionDocumentProtocol={name:"ExtHostDocuments",methods:[{method:"$fireModelChangedEvent",request:[{name:"event",type:n.Type.object("model-changed-event",{changes:n.Type.array(n.Type.object("model-changed-event-changes",{range:r.RangeProto,rangeLength:n.Type.uint32(),rangeOffset:n.Type.uint32(),text:n.Type.string()})),uri:n.Type.string(),versionId:n.Type.uint32(),eol:n.Type.string(),dirty:n.Type.bool(),isRedoing:n.Type.bool(),isUndoing:n.Type.bool()})}]},{method:"$fireModelOpenedEvent",request:[{name:"event",type:n.Type.object("model-open-event",{uri:n.Type.string(),lines:n.Type.array(n.Type.string()),eol:n.Type.string(),versionId:n.Type.uint32(),languageId:n.Type.string(),dirty:n.Type.bool()})}]},{method:"$provideTextDocumentContent",request:[{name:"path",type:n.Type.string()},{name:"encoding",type:n.Type.string()}],response:{type:n.Type.string()}}]}},26166:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceCenter=void 0,t.getNotificationName=s,t.getRequestName=g,t.getMethodName=l;const n=e(43718),r=e(96068),o=e(91676),a=e(8140),p=e(66748),v=e(92408),m=200;class _{constructor(u,d){this.bench=u,this._disposables=new n.DisposableStore,this.proxies=[],this.serviceRegistry=this._disposables.add(new v.ServiceRegistry),this.protocolRegistry=this._disposables.add(new v.ProtocolRegistry),this.deferred=new n.Deferred,this._reportThreshold=m,this.uid=(0,n.randomString)(6),this.logger=d||console}setReporter(u,d=m){this._reporterService=u,this._reportThreshold=d}registerService(u,d){d===a.ServiceType.Service&&this.bench&&this.bench.registerService(u)}ready(){return this.deferred.promise}loadProtocol(u){this.protocolRegistry.addProtocol(u,{nameConverter:d=>l(u.name,d)})}setSumiConnection(u){this.proxies.length===0&&this.deferred.resolve(),this.protocolRegistry.applyTo(u.io);const d=new p.ProxySumi(this.serviceRegistry,this.logger);d.listen(u);const E=(0,r.addElement)(this.proxies,d);return{dispose:()=>{E.dispose(),d.dispose()}}}setConnection(u){this.proxies.length===0&&this.deferred.resolve();const d=new p.ProxyJson(this.serviceRegistry,this.logger);d.listen(u);const E=(0,r.addElement)(this.proxies,d);return{dispose:()=>{E.dispose(),d.dispose()}}}onRequest(u,d,E){this.serviceRegistry.register(l(u,d),E)}onRequestService(u,d){this.serviceRegistry.registerService(d,{nameConverter:E=>l(u,E)})}async broadcast(u,d,...E){await this.ready();const f=l(u,d);let c;this._reporterService&&(c=this._reporterService.time(n.REPORT_NAME.RPC_TIMMING_MEASURE));const y=await Promise.all(this.proxies.map(S=>S.invoke(f,...E))),b=[],A=[];for(const S of y)S===o.METHOD_NOT_REGISTERED?b.push(S):A.push(S);if(b.length>0&&this.logger.warn(`broadcast rpc \`${f}\` getting doubtful responses: ${b.join(",")}`),A.length===0)throw c&&c.timeEnd(f,{success:!1},{minimumReportThresholdTime:this._reportThreshold}),new Error(`broadcast rpc \`${f}\` error: no remote service can handle this call`);return c&&c.timeEnd(f,{success:!0},{minimumReportThresholdTime:this._reportThreshold}),A.length===1?A[0]:A}dispose(){this._disposables.dispose(),this.proxies.forEach(u=>u.dispose()),this.proxies=[]}}t.RPCServiceCenter=_;function s(h,u){return`on:${h}:${u}`}function g(h,u){return`${h}:${u}`}function l(h,u){return u.startsWith("on")?s(h,u):g(h,u)}},62199:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCService=void 0;const n=e(85608);n.__exportStar(e(68855),t),n.__exportStar(e(26166),t),n.__exportStar(e(92408),t);class r{get client(){return this.rpcClient?this.rpcClient[0]:void 0}}t.RPCService=r},59875:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyBase=void 0;const n=e(43718),r=new Set(["then","finally"]);let o=0;class a{constructor(v,m){this.registry=v,this.connectionPromise=new n.Deferred,this._disposables=new n.DisposableStore,this.logger=m||console,this.registry.onServicesUpdate(_=>{this.connection&&this.bindMethods(_)})}nextRequestId(){return String(o++)}listen(v){this.connection=v,this._disposables.add(this.connection),this.bindMethods(this.registry.methods()),v.listen(),this.connectionPromise.resolve()}listenService(v){this.registry.registerService(v)}dispose(){this._disposables.dispose()}getInvokeProxy(){return new Proxy(Object.create(null),{get:(v,m)=>typeof m!="string"?null:r.has(m)?Promise.resolve():(v[m]||(v[m]=(..._)=>this.invoke(m,..._)),v[m])})}}t.ProxyBase=a},66748:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(33716),t),n.__exportStar(e(16420),t)},33716:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyJson=void 0;const n=e(30613),r=e(91676),o=e(59875);class a extends o.ProxyBase{constructor(){super(...arguments),this.engine="json",this.capturer=this._disposables.add(new n.Capturer(this.engine))}bindMethods(v){for(const m of v)m.startsWith("on")?this.connection.onNotification(m,async(..._)=>{this.capturer.captureOnNotification("_",m,_);try{await this.registry.invoke(m,...this.serializeArguments(_))}catch(s){this.logger.warn(`notification exec ${m} error`,s)}}):this.connection.onRequest(m,async(..._)=>{const s=this.nextRequestId();this.capturer.captureOnRequest(s,m,_);try{const g=await this.registry.invoke(m,...this.serializeArguments(_));return this.capturer.captureOnRequestResult(s,m,g),{error:!1,data:g}}catch(g){return this.capturer.captureOnRequestFail(s,m,g),{error:!0,data:{message:g.message,stack:g.stack}}}})}async invoke(v,...m){await this.connectionPromise.promise;let _=!1;if(m.length===1&&Array.isArray(m[0])&&(_=!0),v.startsWith("on"))this.capturer.captureSendNotification("_",v,m),_?this.connection.sendNotification(v,[...m]):this.connection.sendNotification(v,...m);else{const s=this.nextRequestId();let g;_?g=this.connection.sendRequest(v,[...m]):g=this.connection.sendRequest(v,...m),this.capturer.captureSendRequest(s,v,m);const l=await g;if(l.error){const h=new Error(l.data.message);throw l.data.stack&&(h.stack=l.data.stack),this.capturer.captureSendRequestFail(s,v,l.data),h}else return this.capturer.captureSendRequestResult(s,v,l.data),l.data}}serializeArguments(v){const m=v[v.length-1];return v.length===2&&Array.isArray(v[0])&&Object.prototype.hasOwnProperty.call(m,"_isCancelled")?[...v[0],m]:v}listen(v){super.listen(v),this._disposables.add(v.onRequest(m=>{if(!this.registry.has(m)){const _=this.nextRequestId();this.capturer.captureOnRequest(_,m,[]);const s={data:r.METHOD_NOT_REGISTERED};return this.capturer.captureOnRequestFail(_,m,s.data),s}}))}}t.ProxyJson=a},16420:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxySumi=void 0;const n=e(91676),r=e(59875);class o extends r.ProxyBase{constructor(){super(...arguments),this.engine="sumi"}bindMethods(p){for(const v of p)v.startsWith("on")?this.connection.onNotification(v,async(...m)=>{try{await this.registry.invoke(v,...m)}catch(_){this.logger.warn(`notification exec ${v} error`,_)}}):this.connection.onRequest(v,async(...m)=>await this.registry.invoke(v,...m))}async invoke(p,...v){if(await this.connectionPromise.promise,p.startsWith("on"))this.connection.sendNotification(p,...v);else return await this.connection.sendRequest(p,...v)}listen(p){super.listen(p),this._disposables.add(p.onRequestNotFound(()=>{throw n.METHOD_NOT_REGISTERED}))}}t.ProxySumi=o},92408:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolRegistry=t.ServiceRegistry=void 0,t.getServiceMethods=o;const n=e(43718),r=new Set(["constructor"]);function o(v){const m=new Set;let _=v;do{const g=Object.getOwnPropertyNames(_);for(const l of g)r.has(l)||typeof v[l]=="function"&&m.add(l)}while(_=Object.getPrototypeOf(_));const s=Array.from(m);return s.sort(),s}class a{constructor(){this._disposables=new n.DisposableStore,this.emitter=this._disposables.add(new n.Emitter),this.onServicesUpdate=this.emitter.event,this.serviceMethodMap=new Map}register(m,_){this.serviceMethodMap.set(m,_),this.emitter.fire([m])}registerService(m,_){const s=[],{nameConverter:g}=_||{},l=o(m);for(const h of l){let u=h;g&&(u=g(h)),this.serviceMethodMap.set(u,m[h].bind(m)),s.push(u)}this.emitter.fire(s)}has(m){return this.serviceMethodMap.has(m)}invoke(m,..._){return this.serviceMethodMap.get(m)(..._)}methods(){return Array.from(this.serviceMethodMap.keys())}dispose(){this._disposables.dispose()}}t.ServiceRegistry=a;class p{constructor(){this._disposables=new n.DisposableStore,this.emitter=this._disposables.add(new n.Emitter),this.onProtocolUpdate=this.emitter.event,this.protocolMap=new Map}addProtocol(m,_){const s=[],{nameConverter:g}=_||{},{methods:l}=m;for(const h of l){let u=h.method;g&&(u=g(u)),this.protocolMap.set(u,{...h,method:u}),s.push(u)}this.emitter.fire(s)}applyTo(m){if(m.loadProtocolMethod){for(const _ of this.protocolMap.values())m.loadProtocolMethod(_);this._disposables.add(this.onProtocolUpdate(_=>{if(m.loadProtocolMethod)for(const s of _){const g=this.protocolMap.get(s);g&&m.loadProtocolMethod(g)}}))}}dispose(){this._disposables.dispose()}}t.ProtocolRegistry=p},68855:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceStub=void 0;class e{constructor(r,o,a){this.serviceName=r,this.center=o,this.type=a,this.getProxy=()=>new Proxy(this,{get:(p,v)=>typeof v=="symbol"?Promise.resolve():(p[v]||(p[v]=(...m)=>this.broadcast(v,...m)),p[v])}),this.center.registerService(r,this.type)}on(r,o){this.onRequest(r,o)}onRequestService(r){this.center.onRequestService(this.serviceName,r)}onRequest(r,o){this.center.onRequest(this.serviceName,r,o)}broadcast(r,...o){return this.center.broadcast(this.serviceName,r,...o)}}t.RPCServiceStub=e},97349:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiConnection=void 0;const n=e(43718),r=e(70392),o=e(93062),a=e(30613),p=e(90750),v=e(91676),m=e(48218),_=e(76339),s={},g={chunked:!0};class l{constructor(u,d={}){this.socket=u,this.options=d,this.disposable=new r.DisposableStore,this._requestHandlers=new Map,this._notificationHandlers=new Map,this._requestId=0,this._callbacks=new Map,this._reqTimeoutHandles=new Map,this._cancellationTokenSources=new Map,this._knownCanceledRequests=new Set,this.activeRequestPool=new Map,d.logger?this.logger=d.logger:this.logger=(0,n.getDebugLogger)(),this.io=d.io||new _.MessageIO,this.capturer=new a.Capturer(d.name||"sumi"),this.disposable.add(this.capturer)}sendNotification(u,...d){const E=this._requestId++;this.capturer.captureSendNotification(E,u,d),this.socket.send(this.io.Notification(E,u,s,d))}sendRequest(u,...d){return new Promise((E,f)=>{const c=this._requestId++;if(this._callbacks.set(c,(b,A,S)=>{if(A){if(this.traceRequestError(c,u,d,A),A===v.METHOD_NOT_REGISTERED){E(A);return}f(A);return}this.capturer.captureSendRequestResult(c,u,S),E(S)}),this.options.timeout&&this.options.timeout!==-1){const b=setTimeout(()=>{this._handleTimeout(u,c)},this.options.timeout);this._reqTimeoutHandles.set(c,b)}const y=d.length&&r.CancellationToken.isCancellationToken(d[d.length-1])?d.pop():void 0;if(y&&y.isCancellationRequested)return Promise.reject((0,r.canceled)());y&&y.onCancellationRequested(()=>this.cancelRequest(c)),this.capturer.captureSendRequest(c,u,d),this.socket.send(this.io.Request(c,u,{cancelable:!!y||void 0},d))})}cancelRequest(u){this.socket.send(this.io.Cancel(u))}_handleTimeout(u,d){if(!this._callbacks.has(d)||!this._reqTimeoutHandles.has(d))return;const E=this._callbacks.get(d);this._callbacks.delete(d),this._reqTimeoutHandles.delete(d),E(s,new m.MethodTimeoutError(u))}onRequest(u,d){return this._requestHandlers.set(u,d),{dispose:()=>{this._requestHandlers.delete(u)}}}onRequestNotFound(u){return this._starRequestHandler=u,{dispose:()=>{this._starRequestHandler=void 0}}}onNotification(u,d){return this._notificationHandlers.set(u,d),{dispose:()=>{this._notificationHandlers.delete(u)}}}onNotificationNotFound(u){return this._starNotificationHandler=u,{dispose:()=>{this._starNotificationHandler=void 0}}}listen(){this.disposable.add(this.socket.onMessage(u=>{const d=this.io.parse(u),E=d.kind,f=d.requestId;switch(E===_.OperationType.Error&&this.logger.warn(`[${d.requestId}] Error received from server method ${d.method}: ${d.error}`),E){case _.OperationType.Error:case _.OperationType.Response:{const{headers:c,method:y}=d,b=d.error,A=d.result;this._reqTimeoutHandles.has(f)&&(clearTimeout(this._reqTimeoutHandles.get(f)),this._reqTimeoutHandles.delete(f));const S=(D,I,w)=>{const T=this._callbacks.get(f);if(!T){this.logger.error(`Cannot find callback for request ${f}: ${y}`);return}this._callbacks.delete(f),T(D,I,w)};if(c&&c.chunked){let D;if(this.activeRequestPool.has(f)?D=this.activeRequestPool.get(f):(D=new o.SumiReadableStream,this.activeRequestPool.set(f,D),S(c,void 0,D)),A===null){D.end(),this.activeRequestPool.delete(f);break}if(b){D.emitError(b);break}D.emitData(A);break}S(c,b,A);break}case _.OperationType.Notification:case _.OperationType.Request:{const{method:c,headers:y,args:b}=d;if(y.cancelable){const A=new r.CancellationTokenSource;this._cancellationTokenSources.set(f,A),b.push(A.token),this._knownCanceledRequests.has(f)&&(A.cancel(),this._knownCanceledRequests.delete(f))}switch(E){case _.OperationType.Request:{this.capturer.captureOnRequest(f,c,b);let A;try{let I;const w=this._requestHandlers.get(c);w?I=w(...b):this._starRequestHandler&&(I=this._starRequestHandler(c,b)),A=Promise.resolve(I)}catch(I){A=Promise.reject(I)}const S=I=>{this.capturer.captureOnRequestResult(f,c,I),(0,o.isReadableStream)(I)?(0,o.listenReadable)(I,{onData:w=>{this.socket.send(this.io.Response(f,c,g,w))},onEnd:()=>{this.socket.send(this.io.Response(f,c,g,null)),this._cancellationTokenSources.delete(f)},onError:w=>{this.socket.send(this.io.Error(f,c,g,w)),this._cancellationTokenSources.delete(f)}}):(this.socket.send(this.io.Response(f,c,s,I)),this._cancellationTokenSources.delete(f))},D=I=>{this.traceRequestError(f,c,b,I),this.socket.send(this.io.Error(f,c,s,I)),this._cancellationTokenSources.delete(f)};A.then(S).catch(D);break}case _.OperationType.Notification:{this.capturer.captureOnNotification(f,c,b);const A=this._notificationHandlers.get(c);A?A(...b):this._starNotificationHandler&&this._starNotificationHandler(c,b);break}}break}case _.OperationType.Cancel:{const c=this._cancellationTokenSources.get(f);c?c.cancel():this._knownCanceledRequests.add(f);break}default:break}}))}dispose(){this.disposable.dispose()}static forWSWebSocket(u,d={}){return new l(new p.WSWebSocketConnection(u),d)}static forNetSocket(u,d={}){return new l(new p.NetSocketConnection(u),d)}traceRequestError(u,d,E,f){this.capturer.captureSendRequestFail(u,d,f)}toJSON(){throw new Error(`You're trying to serialize a SumiConnection instance, which is not allowed.
31922
+ `},73136:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMentionBoxStyle=void 0;const e=20,n=({maxRows:r=10,minRows:o=2})=>({control:{fontSize:12},highlighter:{overflow:"hidden"},input:{margin:0},"&multiLine":{control:{border:"none"},highlighter:{padding:9},input:{boxSizing:"content-box",padding:"8px 0",lineHeight:`${e}px`,minHeight:`${e*o}px`,maxHeight:`${e*r}px`,outline:0,border:0,overflowY:"auto"}},suggestions:{dataA:"aaa",list:{backgroundColor:"var(--kt-selectDropdown-background)",fontSize:12,maxHeight:200,overflowY:"auto"},item:{backgroundColor:"var(--kt-selectDropdown-background)",color:"var(--kt-selectDropdown-foreground)",padding:"4px 16px","&focused":{backgroundColor:"var(--kt-selectDropdown-selectionBackground)"}}}});t.getMentionBoxStyle=n},5167:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.COMMENT_TREE_NODE_HEIGHT=t.CommentNodeRendered=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(41869),p=e(53711),v=n.__importDefault(e(65887)),m=({item:_,defaultLeftPadding:s=8,leftPadding:g=8,decorations:l,onClick:h,onTwistierClick:u})=>{const d=(0,a.useDesignStyles)(v.default.expansion_toggle,"expansion_toggle"),E=(0,o.useCallback)(T=>{_.onSelect?_.onSelect(_):h(T,_)},[h]),f=(0,o.useCallback)(T=>{u(T,_)},[u]),c=`${s+(_.depth||0)*(g||0)+(p.CommentContentNode.is(_)?16:p.CommentFileNode.is(_)?0:28)}px`,y={height:t.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${t.COMMENT_TREE_NODE_HEIGHT}px`,paddingLeft:c},b=(0,o.useCallback)(T=>{if(p.CommentContentNode.is(T)||p.CommentFileNode.is(T))return o.default.createElement("div",{className:(0,r.default)(v.default.icon,T.icon),style:{height:t.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${t.COMMENT_TREE_NODE_HEIGHT}px`}})},[]),A=(0,o.useCallback)(T=>p.CommentContentNode.is(T)?o.default.createElement("div",{className:(0,r.default)(v.default.segment,v.default.displayname)},T.renderedLabel?T.renderedLabel:o.default.createElement(o.default.Fragment,null,T.comment,o.default.createElement("span",{className:v.default.separator},"\xB7"),T.author.name)):o.default.createElement("div",{className:(0,r.default)(v.default.segment,v.default.displayname)},T.renderedLabel),[]),S=(0,o.useCallback)(T=>o.default.createElement("div",{className:(0,r.default)(v.default.segment_grow,v.default.description)},T.renderedDescription),[]),D=(0,o.useCallback)(T=>o.default.createElement("div",{onClick:f,className:(0,r.default)(v.default.segment,d,(0,a.getIcon)("arrow-right"),{[`${v.default.mod_collapsed}`]:!T.expanded})}),[f]),I=(0,o.useCallback)(T=>{if(p.CommentFileNode.is(T)||T?.isAllowToggle)return D(T)},[]),w=(0,o.useCallback)(()=>_.tooltip,[_]);return o.default.createElement("div",{key:_.id,onClick:E,title:w(),className:(0,r.default)(v.default.comment_node,l?l.classlist:null),style:y,"data-id":_.id},o.default.createElement("div",{className:v.default.content},I(_),b(_),o.default.createElement("div",{className:v.default.overflow_wrap},A(_),S(_))))};t.CommentNodeRendered=m,t.COMMENT_TREE_NODE_HEIGHT=22},47842:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentModelService=t.CommentTreeModel=void 0;const n=e(85608),r=e(76003),o=e(97267),a=e(41869),p=e(23418),v=e(69635),m=e(53711),_=n.__importDefault(e(65887));let s=class extends o.TreeModel{constructor(h){super(),this.init(h)}};t.CommentTreeModel=s,t.CommentTreeModel=s=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[m.CommentRoot])],s);let g=class extends a.Disposable{constructor(){super(),this.selectedDecoration=new o.Decoration(_.default.mod_selected),this.focusedDecoration=new o.Decoration(_.default.mod_focused),this._selectedNodes=[],this.onDidUpdateTreeModelEmitter=new a.Emitter,this.disposableCollection=new a.DisposableCollection,this.applyFocusedDecoration=(h,u=!0)=>{var d;if(h){for(const E of this._selectedNodes)this.selectedDecoration.removeTarget(E);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(h),this.focusedDecoration.addTarget(h),this._focusedNode=h,this._selectedNodes=[h],u&&((d=this.treeModel)===null||d===void 0||d.dispatchChange())}},this.removeFocusedDecoration=()=>{var h;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),(h=this.treeModel)===null||h===void 0||h.dispatchChange()),this._focusedNode=null},this.handleTreeBlur=()=>{this.removeFocusedDecoration()},this.handleTwistierClick=async(h,u)=>{(m.CommentFileNode.is(u)||u?.isAllowToggle)&&this.toggleDirectory(u)},this.handleItemClick=async(h,u)=>{this.applyFocusedDecoration(u),(m.CommentFileNode.is(u)||u?.isAllowToggle)&&this.toggleDirectory(u);let d,E;u instanceof m.CommentReplyNode||u instanceof m.CommentContentNode?(d=u.thread.uri,E=u.thread.range):d=u.resource,this.editorService.open(d,{range:E}).then(()=>{u.thread&&u.thread.show()})},this.toggleDirectory=h=>{h.expanded?this.commentTreeHandle.collapseNode(h):this.commentTreeHandle.expandNode(h)},this._whenReady=this.initTreeModel()}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get whenReady(){return this._whenReady}get commentTreeHandle(){return this._commentTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}async initTreeModel(){const h=await this.commentService.resolveChildren();if(!h)return;const u=h[0];u&&(this._treeModel=this.injector.get(s,[u]),await this._treeModel.ensureReady,this.initDecorations(u),this.disposables.push(a.Event.any(this.commentService.onThreadsCommentChange,this.commentService.onThreadsChanged,this.commentService.onThreadsCreated)(()=>{this.refresh()})),this.onDidUpdateTreeModelEmitter.fire(this._treeModel))}initDecorations(h){return this._decorations=new o.DecorationsManager(h),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations}handleTreeHandler(h){this._commentTreeHandle=h}async refresh(){await this.whenReady,(0,a.runWhenIdle)(()=>{this.treeModel.root.refresh()})}async collapsedAll(){return await this.whenReady,this.treeModel.root.collapsedAll()}dispose(){this.disposableCollection.dispose()}};t.CommentModelService=g,n.__decorate([(0,r.Autowired)(v.ICommentsService),n.__metadata("design:type",Object)],g.prototype,"commentService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],g.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],g.prototype,"editorService",void 0),t.CommentModelService=g=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],g)},53711:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentReplyNode=t.CommentContentNode=t.CommentFileNode=t.CommentRoot=void 0;const n=e(97267);class r extends n.CompositeTreeNode{static is(m){return!!m&&!m.parent}constructor(m){super(m,void 0)}get expanded(){return!0}}t.CommentRoot=r;class o extends n.CompositeTreeNode{static is(m){return n.CompositeTreeNode.is(m)&&"threads"in m}constructor(m,_,s="",g,l,h,u){super(m,u),this.threads=_,this.tooltip=g,this.icon=l,this.resource=h,this.isExpanded=!0,this._renderedLabel=this.resource.displayName,this._renderedDescription=s}set label(m){this._renderedLabel=m}set description(m){this._renderedDescription=m}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(m){this._onSelectHandler=m}get onSelect(){return this._onSelectHandler}}t.CommentFileNode=o;class a extends n.CompositeTreeNode{static is(m){return n.CompositeTreeNode.is(m)&&"author"in m}constructor(m,_,s,g="",l,h,u,d){super(m,d),this.thread=_,this.comment=s,this.icon=l,this.author=h,this.resource=u,this._renderedDescription=g,this.isExpanded=!0,this._isAllowToggle=!1}get isAllowToggle(){return this._isAllowToggle}setIsAllowToggle(m){this._isAllowToggle=m}set label(m){this._renderedLabel=m}set description(m){this._renderedDescription=m}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(m){this._onSelectHandler=m}get onSelect(){return this._onSelectHandler}}t.CommentContentNode=a;class p extends n.TreeNode{constructor(m,_,s,g="",l,h,u){super(m,u),this.thread=_,this.icon=l,this.resource=h,this._renderedLabel=s,this._renderedDescription=g}set label(m){this._renderedLabel=m}set description(m){this._renderedDescription=m}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(m){this._onSelectHandler=m}get onSelect(){return this._onSelectHandler}}t.CommentReplyNode=p},69635:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentReactionClick=t.CommentPanelCollapse=t.SwitchCommandReaction=t.CloseThreadId=t.CollapseId=t.ICommentsService=t.CommentsContribution=t.ICommentsFeatureRegistry=t.CommentPanelId=t.CommentGutterType=t.CommentThreadCollapsibleState=t.CommentMode=void 0;const n=e(41869);var r;(function(m){m[m.Editor=0]="Editor",m[m.Preview=1]="Preview"})(r||(t.CommentMode=r={}));var o;(function(m){m[m.Collapsed=0]="Collapsed",m[m.Expanded=1]="Expanded"})(o||(t.CommentThreadCollapsibleState=o={}));var a;(function(m){m.Thread="thread",m.Empty="empty"})(a||(t.CommentGutterType=a={})),t.CommentPanelId="CommentPanel",t.ICommentsFeatureRegistry=Symbol("ICommentsFeatureRegistry"),t.CommentsContribution=Symbol("CommentsContribution"),t.ICommentsService=Symbol("ICommentsService"),t.CollapseId="comments.panel.action.collapse",t.CloseThreadId="comments.thread.action.close",t.SwitchCommandReaction="comments.comment.action.switchCommand";class p extends n.BasicEvent{}t.CommentPanelCollapse=p;class v extends n.BasicEvent{}t.CommentReactionClick=v},86077:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(69635),t)},79383:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Badge=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041));e(4418);const a=({className:p,children:v,...m})=>o.default.createElement("span",{className:(0,r.default)("kt-badge",p),...m},v);t.Badge=a},48412:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Button=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(99613),p=e(54713);e(71682);const v=()=>o.default.createElement("svg",{viewBox:"0 0 1024 1024",focusable:"false",className:"kt-button-anticon-spin","data-icon":"loading",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},o.default.createElement("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}));function m(){}t.Button=o.default.memo(({children:_,loading:s,className:g,type:l="primary",htmlType:h,size:u,ghost:d=!1,onClick:E,disabled:f,block:c,iconClass:y,icon:b,more:A,moreIconClass:S,menu:D,moreVisible:I,placement:w,title:T,showLoadingIcon:R=!0,onVisibleChange:M,...O})=>{const x=(0,r.default)("kt-button",g,{[`kt-${l}-button-loading`]:s,[`ghost-${l}-button`]:d&&!s&&l!=="link",[`${l}-button`]:l,[`${u}-button-size`]:u,"ghost-button":d&&l!=="link","block-button":c}),k=(0,r.default)(g,{"kt-clickable-icon":!!E});if(l==="icon")return o.default.createElement(p.Icon,{tooltip:T,disabled:f,icon:b,onClick:s||f?m:E,className:k,iconClass:y,...O});const F=y?o.default.createElement(p.Icon,{iconClass:y,disabled:f}):null;return D?o.default.createElement(a.Dropdown,{visible:I,className:"kt-menu",overlay:D,trigger:["click"],onVisibleChange:M,placement:w},o.default.createElement("button",{...O,disabled:f,className:x,type:h,onClick:s||f?m:E},s&&l!=="link"&&R&&o.default.createElement(v,null),F&&F,_,A&&o.default.createElement(p.Icon,{iconClass:S||(0,p.getIcon)("down"),className:"kt-button-secondary-more"}))):o.default.createElement("button",{...O,disabled:f,className:x,type:h,onClick:s||f?m:E},s&&l!=="link"&&R&&o.default.createElement(v,null),F&&F,_)})},7273:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckBox=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(65973);e(6099);const p=()=>o.default.createElement("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},o.default.createElement("path",{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"})),v=({insertClass:m,className:_,label:s,size:g="default",disabled:l,checked:h,wrapTabIndex:u,...d})=>{(0,a.warning)(!m,"`insertClass` was deprecated, please use `className` instead");const E=d;return E.checked=h??!1,o.default.createElement("label",{className:(0,r.default)("kt-checkbox",m,_,{"kt-checkbox-large":g==="large","kt-checkbox-disabled":l}),tabIndex:u},o.default.createElement("span",{className:"kt-checkbox-lump"},o.default.createElement("input",{type:"checkbox",disabled:l,...E}),o.default.createElement("span",{className:"kt-checkbox-icon"},o.default.createElement(p,null))),s||" ")};t.CheckBox=v,t.CheckBox.displayName="OpenSumiCheckBox"},58998:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClickOutside=void 0;const r=e(85608).__importDefault(e(14041)),o=({mouseEvents:a=["click"],onOutsideClick:p,children:v,...m})=>{const _=r.default.useRef(null),s=r.default.useCallback(g=>{_.current&&g.target&&!_.current.contains(g.target)&&p(g)},[p]);return r.default.useEffect(()=>(a.forEach(g=>{window.addEventListener(g,s,!0)}),()=>{a.forEach(g=>{window.removeEventListener(g,s,!0)})}),[a]),r.default.createElement("div",{...m,ref:_},v)};t.ClickOutside=o},50570:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageType=void 0;var e;(function(n){n[n.Error=0]="Error",n[n.Warning=1]="Warning",n[n.Info=2]="Info",n[n.Empty=3]="Empty"})(e||(t.MessageType=e={}))},89832:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Dialog=t.DialogContent=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(43718),p=e(48412),v=e(54713),m=e(79024);e(65773);const _=({onCancel:l,onOk:h,cancelText:u,okText:d})=>o.default.createElement(o.default.Fragment,null,o.default.createElement(p.Button,{onClick:l,type:"secondary"},u||(0,a.localize)("ButtonCancel")),o.default.createElement(p.Button,{onClick:h},d||(0,a.localize)("ButtonOK"))),s=({onClose:l,closable:h,type:u="confirm",messageType:d=a.MessageType.Info,icon:E,message:f,buttons:c,title:y,onOk:b,onCancel:A,okText:S,cancelText:D})=>{const{getIcon:I}=o.default.useContext(v.IconContext);return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-dialog-content"},E&&o.default.createElement("div",{style:{color:E.color},className:(0,r.default)("kt-dialog-icon",(0,v.getIcon)(E.className)||I(E.className))}),o.default.createElement("div",{className:"kt-dialog-content_area"},o.default.createElement("div",{className:"kt-dialog-content_title"},y),f&&o.default.createElement("span",{className:"kt-dialog-message"},f)),h&&u!=="basic"&&o.default.createElement("button",{className:(0,r.default)("kt-dialog-closex",(0,v.getIcon)("close")),onClick:l})),d!==a.MessageType.Empty&&u!=="basic"&&o.default.createElement("div",{className:"kt-dialog-buttonWrap"},u==="confirm"?c||o.default.createElement(_,{onCancel:A,onOk:b,okText:S,cancelText:D}):o.default.createElement(p.Button,{onClick:l},"OK")))};t.DialogContent=s;const g=({visible:l,onClose:h,closable:u,afterClose:d,messageType:E,icon:f,message:c,detail:y,buttons:b,type:A="confirm",title:S,onOk:D,onCancel:I,okText:w,cancelText:T,getContainer:R,keyboard:M,...O})=>o.default.createElement(m.Overlay,{visible:l,onClose:h,title:A==="basic"?S:null,closable:A==="basic",getContainer:R,keyboard:M,footer:A==="basic"?b||o.default.createElement(_,{onCancel:I,onOk:D,okText:w,cancelText:T}):void 0,afterClose:d,...O},o.default.createElement(t.DialogContent,{title:c,message:y,buttons:b,visible:l,icon:f,...O}));t.Dialog=g},99665:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(62596)),o=n.__importDefault(e(53373)),a=n.__importStar(e(14041)),p=e(48412),v=n.__importDefault(e(35060)),m=_=>{var s;const{prefixCls:g,type:l="primary",size:h="default",danger:u,disabled:d,loading:E,onClick:f,htmlType:c,children:y,className:b,overlay:A,trigger:S,align:D,visible:I,onVisibleChange:w,placement:T,getPopupContainer:R,href:M,icon:O=a.createElement(r.default,null),title:x,buttonsRender:k=H=>H,mouseEnterDelay:F,mouseLeaveDelay:L,overlayClassName:B,overlayStyle:U,...W}=_,j=g||"kt-dropdown-button",Q={align:D,overlay:A,disabled:d,trigger:d?[]:S,getPopupContainer:R,mouseEnterDelay:F,mouseLeaveDelay:L,overlayClassName:B,overlayStyle:U};Q.placement=(s=_?.placement)!==null&&s!==void 0?s:"bottomRight";const G=a.createElement(p.Button,{size:h,type:l,disabled:d,loading:E,onClick:f,htmlType:c,title:x},y),Z=a.createElement(p.Button,{size:h,type:l},O??a.createElement(r.default,null)),[$,V]=k([G,Z]);return a.createElement("div",{...W,className:(0,o.default)(j,b)},$,a.createElement(v.default,{...Q},V))};t.default=m},35060:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(64797)),o=n.__importDefault(e(53373)),a=n.__importDefault(e(5147)),p=n.__importDefault(e(14041)),v=e(43953),m=e(65973),_=(0,v.tuple)("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight");class s extends p.default.Component{constructor(){super(...arguments),this.renderOverlay=l=>{const{overlay:h}=this.props;let u;typeof h=="function"?u=h():u=h,u=p.default.Children.only(u);const d=u.props;(0,m.warning)(!d.mode||d.mode==="vertical",`[Dropdown] mode="${d.mode}" is not supported for Dropdown's Menu.`);const{selectable:E=!1,focusable:f=!0}=d,c=p.default.createElement("span",{className:`${l}-menu-submenu-arrow`},p.default.createElement(r.default,{className:`${l}-menu-submenu-arrow-icon`}));return typeof u.type=="string"?h:p.default.cloneElement(u,{mode:"vertical",selectable:E,focusable:f,expandIcon:c})},this.renderDropDown=()=>{const{prefixCls:l,children:h,trigger:u,disabled:d,getPopupContainer:E}=this.props,f=l||"kt-dropdown",c=p.default.Children.only(h),y=p.default.cloneElement(c,{className:(0,o.default)(c.props.className,`${f}-trigger`),disabled:d}),b=d?[]:u;let A;return b&&b.indexOf("contextMenu")!==-1&&(A=!0),p.default.createElement(a.default,{alignPoint:A,...this.props,prefixCls:f,getPopupContainer:E,transitionName:this.getTransitionName(),trigger:b,overlay:()=>this.renderOverlay(f)},y)}}getTransitionName(){const{placement:l="",transitionName:h}=this.props;return h!==void 0?h:l.indexOf("top")>=0?"slide-down":"slide-up"}render(){return this.renderDropDown()}}s.defaultProps={mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft"},t.default=s},99613:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DropdownButton=t.Dropdown=void 0;const n=e(85608),r=n.__importDefault(e(35060));t.Dropdown=r.default;const o=n.__importDefault(e(99665));t.DropdownButton=o.default,e(34643)},80564:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=t._InternalIcon=t.IconContext=void 0,t.IconContextProvider=v;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(12122),p=e(76577);e(1914),t.IconContext=o.default.createContext({getIcon:(_,s)=>_});function v(_){return o.default.createElement(t.IconContext.Provider,{value:_.value},o.default.createElement(t.IconContext.Consumer,null,s=>_.value===s?_.children:null))}const m=function(_,s){const{size:g="small",loading:l,icon:h,iconClass:u,className:d,tooltip:E,rotate:f,anim:c,fill:y,disabled:b,onClick:A,children:S,resourceOptions:D,animate:I,style:w={},...T}=_,R={rotate:f,anim:c,fill:y};let M;if(h)if(a.defaultIconMap[h])M=(0,p.getIcon)(h,R);else{const{getIcon:O,getResourceIcon:x}=o.default.useContext(t.IconContext);D&&x?M=x(h,D):M=O(h,R)}else M=u;return I&&I==="spin"&&(w.animation="kt-icon-spin 1.5s steps(30) infinite"),o.default.createElement("span",{...T,title:E,onClick:A,ref:s,className:(0,r.default)("kt-icon",M,d,{"kt-icon-loading":l,"kt-icon-disabled":!!b,[`kt-icon-${g}`]:!!g,"kt-icon-clickable":!!A,"kt-icon-resource":!!D,expanded:!!D&&D.isOpenedDirectory}),style:w},S)};t._InternalIcon=o.default.memo(o.default.forwardRef(m)),t.Icon=o.default.memo(o.default.forwardRef(m))},10391:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFromIconfontCN=g;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(80564),p=e(76577),v=new Set;function m(l){return!!(typeof l=="string"&&l.length&&!v.has(l))}function _(l,h=0){const u=l[h];if(m(u)){const d=document.createElement("script");d.setAttribute("src",u),d.setAttribute("data-namespace",u),l.length>h+1&&(d.onload=()=>{_(l,h+1)},d.onerror=()=>{_(l,h+1)}),v.add(u),document.body.appendChild(d)}}const s={width:"1em",height:"1em",fill:"currentColor"};function g(l={}){const{scriptUrl:h,extraCommonProps:u={}}=l;h&&typeof document<"u"&&typeof window<"u"&&typeof document.createElement=="function"&&(Array.isArray(h)?_(h.reverse()):_([h]));const d=o.default.forwardRef((E,f)=>{const{icon:c,children:y,rotate:b,anim:A,fill:S,className:D="",...I}=E,w={rotate:b,anim:A,fill:S};let T=null;c&&(T=o.default.createElement("svg",{...s,focusable:"false"},o.default.createElement("use",{xlinkHref:`#${c}`}))),y&&(T=y);const R=(0,p.getIconShapeClxList)(w);return o.default.createElement(a._InternalIcon,{...u,...I,className:(0,r.default)(D,R),ref:f},T)});return d.displayName="Iconfont",d}},12122:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iconManager=t.defaultIconMap=t.defaultIconfont=void 0;const r=e(85608).__importDefault(e(65973)),o=e(81139);Object.defineProperty(t,"defaultIconfont",{enumerable:!0,get:function(){return o.defaultIconfont}});const a={"search-close":"close-square",fold:"collapse-all","setting-general":"setting","setting-file":"file-text","setting-extension":"extension","run-debug":"start","toggle-breakpoints":"deactivate-breakpoints",withdraw:"fallback",terminate1:"stop",stop1:"stop",add:"plus",rundebug:"start",terminate:"stop"},p=Object.assign({},o.defaultIconfont,a);t.defaultIconMap=new Proxy(p,{get(_,s){const g=a[s];return(0,r.default)(!g,`Icon '${s}' was a typo, please use '${g}' instead`),_[s]}});class v{constructor(){this._ktIconPrefixes=[],this._iconMap={}}update(s,g){this._iconMap[s]=g,this._ktIconPrefixes.push(s)}getIconClx(s){if(!s)return(0,r.default)(!1,"not a valid icon key:"+s),[];let g=this._ktIconPrefixes.length;for(;!this._iconMap[this._ktIconPrefixes[--g]][s]&&g!==0;);const l=this._iconMap[this._ktIconPrefixes[g]][s];return l?[`${this._ktIconPrefixes[g]}${l}`]:((0,r.default)(!1,"No icon found for "+s),[])}}t.iconManager=new v,t.iconManager.update("kaitian-icon kticon-",t.defaultIconMap)},81139:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIconfont=void 0,t.defaultIconfont={"Gitlab-fill":"Gitlab-fill",PR:"PR",ab:"ab",abl:"abl","activate-breakpoints":"activate-breakpoints","add-comments":"add-comments",afresh:"afresh","arrow-down":"arrow-down","arrow-right":"arrow-right",arrowdown:"arrowdown",arrowleft:"arrowleft",arrowright:"arrowright",arrowup:"arrowup",bash:"bash",bell:"bell",branches:"branches","breakpoint-activate":"breakpoint-activate","breakpoint-deactivate":"breakpoint-deactivate","breakpoint-disabled":"breakpoint-disabled","breakpoint-enabled":"breakpoint-enabled","breakpoint-stop":"breakpoint-stop","breakpoint-stop-before":"breakpoint-stop-before",brew:"brew","browser-preview":"browser-preview","caret-right":"caret-right",check:"check","check-circle-fill":"check-circle-fill","check-close-circle-o":"check-close-circle-o","check-square-o":"check-square-o","circle-pause":"circle-pause",clear:"clear","clear-bold":"clear-bold",close:"close","close-all":"close-all","close-circle":"close-circle","close-circle-fill":"close-circle-fill",close1:"close1",close_square:"close_square","cloud-download":"cloud-download","cloud-server":"cloud-server",code:"code",codebraces:"codebraces","collapse-all":"collapse-all",commit:"commit","content-search":"content-search",continue:"continue",control:"control",copy:"copy","create-pullrequest":"create-pullrequest","deactivate-breakpoints":"deactivate-breakpoints",debug:"debug","debug-alt-small":"debug-alt-small","debug-restart-frame":"debug-restart-frame","default-menu-icon":"default-menu-icon",delete:"delete",deploy:"deploy",detail:"detail",discard:"discard",disconnect:"disconnect","dock-down":"dock-down","dock-right":"dock-right",doubleleft:"doubleleft",doubleright:"doubleright",down:"down","down-arrow":"down-arrow",download:"download",drag:"drag",edit:"edit",editor:"editor",ellipsis:"ellipsis",embed:"embed",error:"error",expand:"expand","expand-all":"expand-all",experiment:"experiment",explorer:"explorer",extension:"extension",eye:"eye","eye-close":"eye-close",file:"file","file-copy":"file-copy","file-default":"file-default","file-exclamation":"file-exclamation","file-text":"file-text",filter:"filter",focus:"focus",folder:"folder","folder-default":"folder-default","follow-cursor":"follow-cursor",fullescreen:"fullescreen",fullscreen:"fullscreen","fullscreen-exit":"fullscreen-exit",git:"git","github-fill":"github-fill",gitlab:"gitlab","global-search":"global-search",go:"go",hex:"hex",image:"image","info-circle":"info-circle","info-circle-fill":"info-circle-fill",insert:"insert",java:"java",keyboard:"keyboard",kotlin:"kotlin",layout:"layout",layout1:"layout1",left:"left","left-nav-close":"left-nav-close","left-nav-open":"left-nav-open","left-right-subfield":"left-right-subfield",line:"line",link:"link",loading:"loading","magic-wand":"magic-wand",max:"max",mcp:"mcp","menubar-dashboard-back":"menubar-dashboard-back","menubar-edit":"menubar-edit","menubar-file":"menubar-file","menubar-go":"menubar-go","menubar-selection":"menubar-selection","menubar-setting":"menubar-setting","menubar-tool":"menubar-tool","menubar-view":"menubar-view","menubar-workspace":"menubar-workspace",message:"message",min:"min",minus:"minus",mobile:"mobile","mobile-phone":"mobile-phone",more:"more","new-file":"new-file","new-folder":"new-folder",node:"node",open:"open","open-changes":"open-changes",openfile:"openfile","out-link":"out-link",pause:"pause",pin:"pin",pipeline:"pipeline",plus:"plus","project-information":"project-information",python:"python","question-circle":"question-circle","question-circle-o":"question-circle-o",receive:"receive",refresh:"refresh",regex:"regex",reload:"reload",replace:"replace",repository:"repository",retrieval:"retrieval",revoke:"revoke","revoke-white":"revoke-white",right:"right","right-arrow":"right-arrow",rollback:"rollback",run:"run",rust:"rust","save-all":"save-all",scm:"scm",search:"search",send:"send","send-outlined":"send-outlined","send-solid":"send-solid",setting:"setting",sever:"sever",share:"share",shrink:"shrink",smile:"smile",start:"start",step:"step","step-in":"step-in","step-out":"step-out",stop:"stop",swap:"swap",sync:"sync",team:"team",terminal:"terminal",test:"test",thumbs:"thumbs","thumbs-fill":"thumbs-fill",thumbsdown:"thumbsdown","thumbsdown-fill":"thumbsdown-fill","time-circle":"time-circle",toolkit:"toolkit",tree:"tree",undock:"undock",unfullscreen:"unfullscreen",unmax:"unmax",unorderedlist:"unorderedlist",unpin:"unpin",up:"up","up-down-subfield":"up-down-subfield",vim:"vim",wait:"wait","warning-circle":"warning-circle",window:"window","window-close":"window-close","window-maximize":"window-maximize",zsh:"zsh",diff:"open-changes"}},54713:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFromIconfontCN=void 0;const n=e(85608);n.__exportStar(e(80564),t),n.__exportStar(e(76577),t);var r=e(10391);Object.defineProperty(t,"createFromIconfontCN",{enumerable:!0,get:function(){return r.createFromIconfontCN}})},76577:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateKaitianIconMap=t.getKaitianIcon=t.ANIM_TYPE=t.ROTATE_TYPE=void 0,t.updateIconMap=v,t.getIconShapeClxList=m,t.getIcon=_;const n=e(12122);var r;(function(s){s[s.rotate_90=0]="rotate_90",s[s.rotate_180=1]="rotate_180",s[s.rotate_270=2]="rotate_270",s[s.flip_horizontal=3]="flip_horizontal",s[s.flip_vertical=4]="flip_vertical",s[s.flip_both=5]="flip_both"})(r||(t.ROTATE_TYPE=r={}));var o;(function(s){s[s.spin=0]="spin",s[s.pulse=1]="pulse"})(o||(t.ANIM_TYPE=o={}));const a=["rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","flip-both"],p=["spin","pulse"];function v(s,g){n.iconManager.update(s,g)}function m(s){const{rotate:g,anim:l,fill:h}=s||{},u=[];return g!==void 0&&u.push(`iconfont-${a[g]}`),l!==void 0&&u.push(`iconfont-anim-${p[l]}`),h&&u.push("toggled"),u}function _(s,g){const l=n.iconManager.getIconClx(s),h=m(g);return l.push(...h),l.join(" ")}t.getKaitianIcon=_,t.updateKaitianIconMap=v},46541:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Image=void 0;const n=e(85608),r=n.__importDefault(e(24345)),o=n.__importDefault(e(14041));e(53960);const a=e(54713),p=v=>o.default.createElement(r.default,{prefixCls:"kt-image",preview:{getContainer:()=>{var m;return document.getElementById("main")||((m=document.getElementsByTagName("body"))===null||m===void 0?void 0:m[0])},mask:o.default.createElement("div",{className:"mask"},o.default.createElement(a.Icon,{iconClass:"codicon codicon-eye"}))},...v});t.Image=p},97267:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);e(39328),n.__exportStar(e(48412),t),n.__exportStar(e(79383),t),n.__exportStar(e(50708),t),n.__exportStar(e(7273),t),n.__exportStar(e(14640),t),n.__exportStar(e(54076),t),n.__exportStar(e(79024),t),n.__exportStar(e(89832),t),n.__exportStar(e(54713),t),n.__exportStar(e(46541),t),n.__exportStar(e(18875),t),n.__exportStar(e(91397),t),n.__exportStar(e(31059),t),n.__exportStar(e(72871),t),n.__exportStar(e(91416),t),n.__exportStar(e(34128),t),n.__exportStar(e(50570),t),n.__exportStar(e(77011),t),n.__exportStar(e(3660),t),n.__exportStar(e(58998),t),n.__exportStar(e(4981),t),n.__exportStar(e(99613),t)},15857:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryInputBox=void 0;const r=e(85608).__importDefault(e(14041)),o=e(54114),a=e(63924);class p extends r.default.Component{constructor(){super(...arguments),this.inputRef=r.default.createRef(),this.addToHistory=m=>{this.history&&m&&m!==this.getCurrentValue()&&this.history.add(m)},this.getHistory=()=>this.history&&this.history.getHistory()||[],this.showNextValue=()=>{const m=this.getCurrentValue()||"";this.history&&!this.history.has(m)&&this.addToHistory(m);let _=this.getNextValue();_&&(_=_===m?this.getNextValue():_),_&&this.onValueChange(_)},this.showPreviousValue=()=>{const m=this.getCurrentValue()||"";this.history&&!this.history.has(m)&&this.addToHistory(m);let _=this.getPreviousValue();_&&(_=_===m?this.getPreviousValue():_),_&&this.onValueChange(_)},this.clearHistory=()=>{this.history&&this.history.clear()},this.getCurrentValue=()=>{if(!this.history)return null;let m=this.history.current();return m||(m=this.history.last(),this.history.next()),m},this.getPreviousValue=()=>this.history&&(this.history.previous()||this.history.first())||null,this.getNextValue=()=>this.history&&(this.history.next()||this.history.last())||null,this.onValueChange=m=>{const{onValueChange:_}=this.props;this.setState({inputValue:m}),_&&_(m)},this.onKeyDown=m=>{const{onKeyDown:_}=this.props;_&&_(m)},this.focus=()=>{this.inputRef&&this.inputRef.current&&this.inputRef.current.focus()}}componentDidMount(){var m;const{history:_,onReady:s}=this.props;this.history=new o.HistoryNavigator(_||new Set([]),100),this.inputProps={...this.props},delete this.inputProps.onReady,this.setState({inputValue:((m=this.props.value)!==null&&m!==void 0?m:this.props.defaultValue)||""}),typeof s=="function"&&s({addToHistory:this.addToHistory,getHistory:this.getHistory,clearHistory:this.clearHistory,getCurrentValue:this.getCurrentValue,showNextValue:this.showNextValue,showPreviousValue:this.showPreviousValue,focus:this.focus})}render(){const m=this.state&&this.state.inputValue;return r.default.createElement(a.Input,{ref:this.inputRef,...this.inputProps,onValueChange:this.onValueChange,onKeyDown:this.onKeyDown,value:m})}}t.HistoryInputBox=p},63924:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Input=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(54713),p=n.__importDefault(e(65973));e(41065);function v(_){return typeof _>"u"}function m(_,s,g){if(typeof g=="function"){let l=s;if(s.type==="click"){l=Object.create(s),l.target=_,l.currentTarget=_;const h=_.value;_.value="",g(l),_.value=h;return}g(l)}}t.Input=o.default.forwardRef((_,s)=>{const{defaultValue:g,className:l,wrapperStyle:h,size:u="default",controls:d,onChange:E,selection:f,addonBefore:c,addonAfter:y,persistFocus:b=!0,hasClear:A,afterClear:S,value:D,onValueChange:I,onPressEnter:w,onKeyDown:T,as:R="input",...M}=_;(0,p.default)(!d,"[@opensumi/ide-components Input]: `controls` was deprecated, please use `addonAfter` instead");const O=o.default.useRef(null),[x,k]=o.default.useState(!1),[F,L]=o.default.useState(()=>(D??g)||""),[B,U]=o.default.useState(()=>(D??g)||"");o.default.useImperativeHandle(s,()=>O.current),o.default.useEffect(()=>{f&&!v(f.start)&&!x&&O.current.setSelectionRange(f.start,f.end)},[f,x]),o.default.useEffect(()=>{D===null||typeof D>"u"||(D!==B&&D!==F&&L(D),D!==B&&U(D))},[D]);const W=K=>{Q(K.target.value),m(O.current,K,E)},j=K=>{K.preventDefault(),Q(""),m(O.current,K,E),typeof S=="function"&&S()},Q=K=>{L(K),typeof I=="function"&&I(K),x||k(!0)},G=K=>{K.keyCode===13&&typeof w=="function"&&w(K),typeof T=="function"&&T(K)},Z=y||d,$=b?{onMouseDown:K=>{K.preventDefault()}}:{},V=(K,Y)=>K?o.default.createElement("div",{className:(0,r.default)("kt-input-addon",Y),...$},o.default.Children.map(K,X=>o.default.isValidElement(X)?o.default.cloneElement(X,$):null)):null,H=(0,r.default)("kt-input",l,{[`kt-input-${u}`]:u,"kt-input-disabled":_.disabled});return o.default.createElement("div",{className:H,style:h},V(c,"kt-input-addon-before"),o.default.createElement("div",{className:"kt-input-box"},o.default.createElement(R,{ref:O,type:"text",autoCapitalize:"off",autoCorrect:"off",autoComplete:"off",spellCheck:!1,...M,value:F,onChange:W,onKeyDown:G}),A&&F&&o.default.createElement(a.Icon,{className:"kt-input-clear",icon:"close-circle-fill",onClick:j,...$})),V(Z,"kt-input-addon-after"))}),t.Input.displayName="OpenSumiInput"},64545:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputNumber=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(32476)),a=n.__importDefault(e(14041));e(41065),e(17107);const p="kt-input-number",v=m=>{const{value:_,size:s="default",wrapperStyle:g,className:l,disabled:h,min:u,max:d,onChange:E,...f}=m,c=b=>{E&&E(b)},y=(0,r.default)("kt-input","kt-input-number",l,{[`kt-input-${s}`]:s,"kt-input-disabled":h});return a.default.createElement("div",{className:y,style:g},a.default.createElement("div",{className:"kt-input-box"},a.default.createElement(o.default,{prefixCls:p,min:u,max:d,value:_,type:"number",onChange:c,controls:!0,...f})))};t.InputNumber=v,t.InputNumber.displayName="OpenSumiInputNumber"},10413:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindInputElement=v;const r=e(85608).__importDefault(e(14041)),o=e(63924);class a extends r.default.Component{constructor(){super(...arguments),this.placeholderInputRef=r.default.createRef()}render(){const _={...this.props};return delete _.inputElement,delete _.innerRef,r.default.createElement(o.Input,{..._,type:"text",id:this.props.id,ref:this.placeholderInputRef})}componentDidMount(){const{innerRef:_,inputElement:s}=this.props;this.placeholderInputRef.current.parentElement.replaceChild(s,this.placeholderInputRef.current),this.applyAttributes(),s.focus(),typeof _=="function"?_(s):_!==null&&typeof _=="object"&&_.current===null&&(_.current=s)}UNSAFE_componentWillUnmount(){const{innerRef:_,inputElement:s}=this.props;s.parentElement.replaceChild(this.placeholderInputRef.current,s),_!==null&&typeof _=="object"&&_.current&&(_.current=null)}shouldComponentUpdate(_){return this.applyAttributes(_),!1}applyAttributes(_=this.props){const{className:s,id:g,inputElement:l,style:h}=_;if(typeof s=="string"&&(l.className=s),typeof g=="string"&&(l.id=g),h!==null&&typeof h=="object")for(const u in h)typeof h[u]=="string"&&l[u]&&(l[u]=h[u])}}const p=r.default.forwardRef((m,_)=>r.default.createElement(a,{...m,innerRef:_}));function v(m){return _=>r.default.createElement(p,{..._,inputElement:m})}},61172:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextArea=void 0;const r=e(85608).__importDefault(e(14041)),o=e(63924);t.TextArea=r.default.forwardRef((a,p)=>r.default.createElement(o.Input,{...a,as:"textarea",ref:p})),t.TextArea.displayName="OpenSumiTextArea"},34390:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidateInput=t.VALIDATE_TYPE=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(63924);e(13254);var p;(function(v){v[v.INFO=1]="INFO",v[v.ERROR=2]="ERROR",v[v.WARNING=3]="WARNING",v[v.IGNORE=4]="IGNORE"})(p||(t.VALIDATE_TYPE=p={})),t.ValidateInput=o.default.forwardRef(({type:v,className:m,validate:_,onChange:s,onValueChange:g,validateMessage:l,popup:h=!0,...u},d)=>{const[E,f]=o.default.useState();o.default.useEffect(()=>{f(l)},[l]);const c=(0,r.default)({"validate-error":E&&E.type===p.ERROR,"validate-warning":E&&E.type===p.WARNING,"validate-info":E&&E.type===p.INFO}),y=()=>{if(E&&E.message)return o.default.createElement("div",{className:(0,r.default)("validate-message",c,{popup:h})},E.message)},b=A=>{const S=A.target;let D;if(S.type==="number"?D=A.target.valueAsNumber:D=A.target.value,typeof _=="function"){let I;v==="number"?/^[0-9]+$/.test(D)?I=_(Number(D)):I=_(String(D)):I=_(D),f(I)}typeof s=="function"&&s(A),typeof g=="function"&&g(D)};return o.default.createElement("div",{className:(0,r.default)("input-box",{popup:h})},o.default.createElement(a.Input,{type:v,ref:d,className:(0,r.default)(m,E,c),onChange:b,...u}),y())}),t.ValidateInput.displayName="ValidateInput"},50708:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(61172),t),n.__exportStar(e(63924),t),n.__exportStar(e(34390),t),n.__exportStar(e(10413),t),n.__exportStar(e(64545),t)},3660:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(3205),t)},3205:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loading=void 0;const r=e(85608).__importDefault(e(14041));e(21221),t.Loading=r.default.memo(()=>r.default.createElement("div",{className:"loading_indicator"})),t.Loading.displayName="Loading"},4981:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalizeContext=void 0,t.LocalizeContextProvider=v,t.ComponentContextProvider=m;const r=e(85608).__importDefault(e(14041)),o=e(54713),a=e(65973),p=_=>((0,a.warning)(!1,"Using the default localize fn"),"");t.LocalizeContext=r.default.createContext({localize:p}),t.LocalizeContext.displayName="LocalizeContext";function v(_){return r.default.createElement(t.LocalizeContext.Provider,{value:_.value},r.default.createElement(t.LocalizeContext.Consumer,null,s=>_.value===s?_.children:null))}function m(_){return r.default.createElement(o.IconContextProvider,{value:_.value},r.default.createElement(v,{value:{localize:_.value.localize}},_.children))}},13719:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(44547),t),n.__exportStar(e(32592),t)},32592:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownReactParser=void 0;const n=e(85608),r=e(33714),o=n.__importDefault(e(14041));class a extends r.marked.Renderer{constructor(m){super(),this.renderer=m.renderer}parse(m){return m.map((_,s)=>{const g=(()=>{switch(_.type){case"html":{const l=_;return this.renderer.html(l.text)}case"space":return null;case"heading":{const l=_,h=l.depth;return this.renderer.heading(this.parseInline(l.tokens),h)}case"paragraph":{const l=_;return this.renderer.paragraph(this.parseInline(l.tokens))}case"text":{const l=_;return l.tokens?this.parseInline(l.tokens):l.text}case"blockquote":{const l=_,h=this.parse(l.tokens);return this.renderer.blockquote(h)}case"list":{const l=_,h=l.items.map((u,d)=>{var E;const f=[];return u.task&&f.push(this.renderer.checkbox((E=u.checked)!==null&&E!==void 0?E:!1)),f.push(this.parse(u.tokens)),o.default.cloneElement(this.renderer.listItem(f),{key:`list-item-${d}`})});return this.renderer.list(h,l.ordered)}case"code":{const l=_;return this.renderer.code(l.text,l.lang)}case"table":{const l=_,h=l.header.map((c,y)=>o.default.cloneElement(this.renderer.tableCell(this.parseInline(c.tokens),{header:!0,align:l.align[y]}),{key:`header-cell-${y}`})),u=o.default.cloneElement(this.renderer.tableRow(h),{key:"header-row"}),d=this.renderer.tableHeader(u),E=l.rows.map((c,y)=>{const b=c.map((A,S)=>o.default.cloneElement(this.renderer.tableCell(this.parseInline(A.tokens),{header:!1,align:l.align[S]}),{key:`body-cell-${y}-${S}`}));return o.default.cloneElement(this.renderer.tableRow(b),{key:`body-row-${y}`})}),f=this.renderer.tableBody(E);return this.renderer.table([d,f])}case"hr":return this.renderer.hr();default:return console.warn(`Token with "${_.type}" type was not found`),null}})();return o.default.isValidElement(g)?o.default.cloneElement(g,{key:`token-${s}`}):g})}parseInline(m=[]){return m.map(_=>{switch(_.type){case"text":{const g=p(_.text);return this.renderer.text(g)}case"strong":{const s=_;return this.renderer.strong(this.parseInline(s.tokens))}case"em":{const s=_;return this.renderer.em(this.parseInline(s.tokens))}case"del":{const s=_;return this.renderer.del(this.parseInline(s.tokens))}case"codespan":{const s=_;return this.renderer.codespan(p(s.text))}case"link":{const s=_;return this.renderer.link(s.href,this.parseInline(s.tokens))}case"image":{const s=_;return this.renderer.image(s.href,s.text,s.title)}case"html":{const s=_;return this.renderer.html(s.text)}case"br":return this.renderer.br();case"escape":{const s=_;return this.renderer.text(s.text)}default:return console.warn(`Token with "${_.type}" type was not found`),null}})}}t.MarkdownReactParser=a;function p(v){return v.replace(/&#(\d+);/g,(m,_)=>String.fromCharCode(_)).replace(/&#x([0-9A-Fa-f]+);/g,(m,_)=>String.fromCharCode(parseInt(_,16)))}},44547:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownReactRenderer=void 0;const r=e(85608).__importStar(e(14041));class o{constructor(p={}){this.uid=0,this.options=p}node(p,v=null,m={}){const _={key:`marked-react-${this.uid}`};return this.incrementUID(),(0,r.createElement)(p,{...m,..._},v)}incrementUID(){this.uid+=1}heading(p,v){return this.node(`h${v}`,p)}paragraph(p){return this.node("p",p)}joinBase(p,v){if(!v)return p;try{return new URL(p,v).href}catch{return p}}link(p,v){const m=this.joinBase(p,this.options.baseURL);return this.node("a",v,{href:m,target:"_blank",rel:"noopener noreferrer"})}image(p,v,m=null){const _=this.joinBase(p,this.options.baseURL);return this.node("img",null,{src:_,alt:v,title:m})}codespan(p,v=null){const m=v?`${this.options.langPrefix}${v}`:null;return this.node("code",p,{className:m})}code(p,v){return this.node("pre",this.codespan(p,v))}blockquote(p){return this.node("blockquote",p)}list(p,v){return this.node(v?"ol":"ul",p)}listItem(p){return this.node("li",p)}checkbox(p){return this.node("input",null,{type:"checkbox",disabled:!0,checked:p})}table(p){return this.node("table",p)}tableHeader(p){return this.node("thead",p)}tableBody(p){return this.node("tbody",p)}tableRow(p){return this.node("tr",p)}tableCell(p,v){const m=v.header?"th":"td";return this.node(m,p,{align:v.align})}strong(p){return this.node("strong",p)}em(p){return this.node("em",p)}del(p){return this.node("del",p)}text(p){return p}html(p){return r.default.createElement("div",{dangerouslySetInnerHTML:{__html:p}})}hr(){return this.node("hr")}br(){return this.node("br")}}t.MarkdownReactRenderer=o},56849:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultMarkedRenderer=t.linkify=void 0,t.Markdown=m;const n=e(85608),r=e(33714),o=n.__importDefault(e(14041)),a=e(39777),p=(_,s,g)=>`<a rel="noopener" ${a.DATA_SET_COMMAND}="${_}" title="${s??_}">${g}</a>`;t.linkify=p;class v extends r.Renderer{link({href:s,title:g,text:l}){return(0,t.linkify)(s,g||null,l)}}t.DefaultMarkedRenderer=v;function m(_){const s=(h,u)=>{const d=r.marked.parse(h,{renderer:u,async:!1});return typeof d=="string"?d:""},[g,l]=o.default.useState(s(_.value||"",_.renderer));return o.default.useEffect(()=>{l(s(_.value||"",_.renderer))},[_.renderer,_.value]),o.default.createElement(a.RenderWrapper,{opener:_.opener,html:g})}},39777:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenderWrapper=t.DATA_SET_COMMAND=void 0;const r=e(85608).__importStar(e(14041));e(28566),t.DATA_SET_COMMAND="data-command";const o=a=>{const p=(0,r.useRef)(),{html:v,opener:m}=a;(0,r.useEffect)(()=>(p&&p.current&&p.current.addEventListener("click",_),()=>{p&&p.current&&p.current.removeEventListener("click",_)}),[]);const _=s=>{let g=s.target;if(g.className.includes("codicon")&&(g=g.parentNode),g.tagName.toLowerCase()==="a"&&g.hasAttribute(t.DATA_SET_COMMAND)){const l=g.getAttribute(t.DATA_SET_COMMAND);l&&m&&m.open(l)}};return r.default.createElement("div",{className:"kt-md-renderer-wrap",dangerouslySetInnerHTML:{__html:v},ref:p})};t.RenderWrapper=o},98113:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=(0,e(14041).createContext)({inlineCollapsed:!1});t.default=r},64063:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=e(31363),o=n.__importDefault(e(14041)),a=n.__importDefault(e(98113));class p extends o.default.Component{constructor(){super(...arguments),this.renderItem=()=>{const{title:m,..._}=this.props;return o.default.createElement(a.default.Consumer,null,({inlineCollapsed:s})=>s?o.default.createElement(r.Item,{..._,title:m}):o.default.createElement(r.Item,{..._,title:m}))}}render(){return this.renderItem()}}p.isMenuItem=!0,t.default=p},91886:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(39067)),o=e(31363),a=n.__importDefault(e(14041));class p extends a.default.Component{render(){const{popupClassName:m}=this.props;return a.default.createElement(o.SubMenu,{...this.props,popupClassName:m})}}p.contextTypes={antdMenuTheme:r.default.string},p.isSubMenu=1,t.default=p},45803:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Menu=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(31363)),a=n.__importDefault(e(14041)),p=e(90146),v=e(2835),m=e(47768),_=e(65973),s=n.__importDefault(e(98113)),g=n.__importDefault(e(64063)),l=n.__importDefault(e(91886));e(42985);class h extends a.default.Component{static getDerivedStateFromProps(E,f){const{prevProps:c}=f,y={prevProps:E};return c.mode==="inline"&&E.mode!=="inline"&&(y.switchingModeFromInline=!0),"openKeys"in E?y.openKeys=E.openKeys:(E.inlineCollapsed&&!c.inlineCollapsed&&(y.switchingModeFromInline=!0,y.inlineOpenKeys=f.openKeys,y.openKeys=[]),!E.inlineCollapsed&&c.inlineCollapsed&&(y.openKeys=f.inlineOpenKeys,y.inlineOpenKeys=[])),y}constructor(E){super(E),this.handleMouseEnter=c=>{this.restoreModeVerticalFromInline();const{onMouseEnter:y}=this.props;y&&y(c)},this.handleTransitionEnd=c=>{const y=c.propertyName==="width"&&c.target===c.currentTarget,{className:b}=c.target,A=Object.prototype.toString.call(b)==="[object SVGAnimatedString]"?b.animVal:b,S=c.propertyName==="font-size"&&A.indexOf("anticon")>=0;(y||S)&&this.restoreModeVerticalFromInline()},this.handleClick=c=>{this.handleOpenChange([]);const{onClick:y}=this.props;y&&y(c)},this.handleOpenChange=c=>{this.setOpenKeys(c);const{onOpenChange:y}=this.props;y&&y(c)},this.renderMenu=()=>{const{prefixCls:c,className:y}=this.props,b=this.getRealMenuMode(),A=this.getOpenMotionProps(b),S=c||"kt-inner-menu",D=(0,r.default)(y,{[`${S}-inline-collapsed`]:this.getInlineCollapsed()}),I={openKeys:this.state.openKeys,onOpenChange:this.handleOpenChange,className:D,mode:b,...A};return b!=="inline"&&(I.onClick=this.handleClick),this.getInlineCollapsed()&&(I.openKeys=[]),a.default.createElement(o.default,{...this.props,...I,prefixCls:S,onTransitionEnd:this.handleTransitionEnd,onMouseEnter:this.handleMouseEnter})},(0,_.warning)(!("onOpen"in E||"onClose"in E),"[Menu] `onOpen` and `onClose` are removed, please use `onOpenChange` instead, see: https://u.ant.design/menu-on-open-change."),(0,_.warning)(!("inlineCollapsed"in E&&E.mode!=="inline"),"[Menu] `inlineCollapsed` should only be used when `mode` is inline.");let f;"openKeys"in E?f=E.openKeys:"defaultOpenKeys"in E&&(f=E.defaultOpenKeys),this.state={openKeys:f||[],switchingModeFromInline:!1,inlineOpenKeys:[],prevProps:E}}componentWillUnmount(){m.wrapperRaf.cancel(this.mountRafId)}setOpenKeys(E){"openKeys"in this.props||this.setState({openKeys:E})}getRealMenuMode(){const E=this.getInlineCollapsed();if(this.state.switchingModeFromInline&&E)return"inline";const{mode:f}=this.props;return E?"vertical":f}getInlineCollapsed(){const{inlineCollapsed:E}=this.props;return E}getOpenMotionProps(E){const{openTransitionName:f,openAnimation:c,motion:y}=this.props;return y?{motion:y}:c?((0,_.warning)(typeof c=="string","[Menu] `openAnimation` do not support object. Please use `motion` instead."),{openAnimation:c}):f?{openTransitionName:f}:E==="horizontal"?{motion:{motionName:"slide-up"}}:E==="inline"?{motion:v.collapseMotion}:{motion:{motionName:""}}}restoreModeVerticalFromInline(){const{switchingModeFromInline:E}=this.state;E&&this.setState({switchingModeFromInline:!1})}render(){return a.default.createElement(s.default.Provider,{value:{inlineCollapsed:this.getInlineCollapsed()||!1}},this.renderMenu())}}h.defaultProps={className:"",focusable:!1},(0,p.polyfill)(h);class u extends a.default.Component{render(){return a.default.createElement(h,{...this.props})}}t.Menu=u,u.Divider=o.Divider,u.Item=g.default,u.SubMenu=l.default,u.ItemGroup=o.ItemGroup},31059:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.message=void 0;const r=e(85608).__importDefault(e(71036));e(38663);function o(a){return(p,v)=>new Promise(m=>{r.default[a](p,v,m)})}t.message={success:o("success"),error:o("error"),info:o("info"),warning:o("warning"),loading:o("loading")}},71036:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(29517)),o=n.__importDefault(e(96041)),a=n.__importDefault(e(63492)),p=n.__importDefault(e(36117)),v=n.__importDefault(e(59303)),m=n.__importDefault(e(10435)),_=n.__importDefault(e(14041));let s=3,g,l,h=1,u="kt-message",d="move-up",E,f;function c(D){if(l){D(l);return}m.default.newInstance({prefixCls:u,transitionName:d,style:{top:g},getContainer:E,maxCount:f},I=>{if(l){D(l);return}l=I,D(I)})}const y={info:p.default,success:r.default,error:o.default,warning:a.default,loading:v.default};function b(D){const I=D.duration!==void 0?D.duration:s,w=D.key||h++,T=new Promise(M=>{const O=()=>(typeof D.onClose=="function"&&D.onClose(),M(!0));c(x=>{const k=y[D.type];x.notice({key:w,duration:I,style:{},content:_.default.createElement("div",{className:`${u}-custom-content${D.type?` ${u}-${D.type}`:""}`},D.icon||k&&_.default.createElement(k,null),_.default.createElement("span",null,D.content)),onClose:O})})}),R=()=>{l&&l.removeNotice(w)};return R.then=(M,O)=>T.then(M,O),R.promise=T,R}function A(D){return Object.prototype.toString.call(D)==="[object Object]"&&!!D.content}const S={open:b,config(D){D.top!==void 0&&(g=D.top,l=null),D.duration!==void 0&&(s=D.duration),D.prefixCls!==void 0&&(u=D.prefixCls),D.getContainer!==void 0&&(E=D.getContainer),D.transitionName!==void 0&&(d=D.transitionName,l=null),D.maxCount!==void 0&&(f=D.maxCount,l=null)},destroy(){l&&(l.destroy(),l=null)}};["success","info","warning","error","loading"].forEach(D=>{S[D]=(I,w,T)=>A(I)?S.open({...I,type:D}):(typeof w=="function"&&(T=w,w=void 0),S.open({content:I,duration:w,type:D,onClose:T}))}),S.warn=S.warning,t.default=S},6656:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.destroyFns=void 0;const n=e(85608),r=n.__importDefault(e(22143)),o=n.__importDefault(e(53373)),a=n.__importDefault(e(39067)),p=n.__importDefault(e(91812)),v=n.__importDefault(e(25946)),m=n.__importDefault(e(14041)),_=e(48412),s=e(69587);let g;t.destroyFns=[];const l=u=>{g={x:u.pageX,y:u.pageY},setTimeout(()=>g=null,100)};typeof window<"u"&&window.document&&window.document.documentElement&&(0,v.default)(document.documentElement,"click",l);class h extends m.default.Component{constructor(){super(...arguments),this.handleCancel=d=>{const{onCancel:E}=this.props;E&&E(d)},this.handleOk=d=>{const{onOk:E}=this.props;E&&E(d)},this.renderFooter=d=>{const{okText:E,okType:f,cancelText:c,confirmLoading:y}=this.props;return m.default.createElement("div",null,m.default.createElement(_.Button,{onClick:this.handleCancel,...this.props.cancelButtonProps},c||d.cancelText),m.default.createElement(_.Button,{type:f,loading:y,onClick:this.handleOk,...this.props.okButtonProps},E||d.okText))},this.renderModal=()=>{const{prefixCls:d,footer:E,visible:f,wrapClassName:c,centered:y,getContainer:b,closeIcon:A,closable:S=!0,...D}=this.props,I=d||"kt-modal",w=this.renderFooter((0,s.getConfirmLocale)()),T=m.default.createElement("span",{className:`${I}-close-x`},A||m.default.createElement(r.default,{className:`${I}-close-icon`}));return m.default.createElement(p.default,{...D,animation:this.props.animation,getContainer:b,prefixCls:I,wrapClassName:(0,o.default)({[`${I}-centered`]:!!y},c),footer:E===void 0?w:E,visible:f,mousePosition:g,onClose:this.handleCancel,closeIcon:T})}}render(){return this.renderModal()}}h.defaultProps={width:520,confirmLoading:!1,visible:!1,okType:"primary"},h.propTypes={prefixCls:a.default.string,onOk:a.default.func,onCancel:a.default.func,okText:a.default.node,cancelText:a.default.node,centered:a.default.bool,width:a.default.oneOfType([a.default.number,a.default.string]),confirmLoading:a.default.bool,visible:a.default.bool,footer:a.default.node,title:a.default.node,closable:a.default.bool,closeIcon:a.default.node},t.default=h},53017:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;const r=e(85608).__importDefault(e(6656));t.Modal=r.default,e(61349)},69587:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.changeConfirmLocale=r,t.getConfirmLocale=o;const e={okText:"OK",cancelText:"Cancel",justOkText:"OK"};let n={...e};function r(a){a?n={...n,...a}:n={...e}}function o(){return n}},18875:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notification=void 0,t.open=g,t.close=l,t.update=h;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(43718),p=e(70392),v=e(48412),m=n.__importDefault(e(70748));e(1477);const _={[a.MessageType.Info]:15,[a.MessageType.Warning]:18,[a.MessageType.Error]:20};m.default.config({placement:"bottomRight"}),t.notification=m.default;const s=new Map;function g(d,E,f=!0,c,y,b,A,S){return(0,p.createCancelablePromise)(D=>(D.onCancellationRequested(()=>{l(c)}),new Promise(I=>{const w={key:c,className:(0,r.default)("kt-notification-wrapper",{"kt-notification-info":E===a.MessageType.Info,"kt-notification-error":E===a.MessageType.Error,"kt-notification-warn":E===a.MessageType.Warning}),duration:(0,p.isUndefined)(A)?_[E]:A,onClose:()=>{S&&S(),s.delete(c),I(void 0)},btn:y?y.map((T,R)=>{const M=typeof T=="string",O={className:`${(0,r.default)("kt-notification-button")}${M?"":T.class}`,ghost:M?R===0:!T.primary,key:M?T:T.id,onClick:()=>{I(T),m.default.close(c),M||T.run()}},x=M?T:T.label;return o.default.createElement(v.Button,{size:"small",...O},x)}):null,message:d,description:b};s.set(c,[E,w]),f||(w.closeIcon=o.default.createElement("span",null)),u(E,w)})))}function l(d){t.notification.close(d)}function h(d,E){const f=s.get(d);u(f[0],{...f[1],key:d,message:E})}function u(d,E){switch(d){case a.MessageType.Info:t.notification.info(E);break;case a.MessageType.Warning:t.notification.warning(E);break;case a.MessageType.Error:t.notification.error(E);break;default:t.notification.open(E);break}}},70748:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(55435)),o=n.__importDefault(e(31079)),a=n.__importDefault(e(22143)),p=n.__importDefault(e(5550)),v=n.__importDefault(e(74339)),m=n.__importDefault(e(10435)),_=n.__importDefault(e(14041)),s=e(70392),g={};let l=4.5,h=24,u=24,d="topRight",E,f;function c(I){const{duration:w,placement:T,bottom:R,top:M,getContainer:O,closeIcon:x}=I;w!==void 0&&(l=w),T!==void 0&&(d=T),R!==void 0&&(u=R),M!==void 0&&(h=M),O!==void 0&&(E=O),x!==void 0&&(f=x)}function y(I,w=h,T=u){let R;switch(I){case"topLeft":R={left:0,top:w,bottom:"auto"};break;case"topRight":R={right:0,top:w,bottom:"auto"};break;case"bottomLeft":R={left:0,top:"auto",bottom:T};break;default:R={right:0,top:"auto",bottom:T};break}return R}function b({prefixCls:I,placement:w=d,getContainer:T=E,top:R,bottom:M,closeIcon:O=f},x){const k=`${I}-${w}`;if(g[k]){x(g[k]);return}const F=_.default.createElement("span",{className:`${I}-close-x`},O||_.default.createElement(a.default,{className:`${I}-close-icon`}));m.default.newInstance({prefixCls:I,className:`${I}-${w}`,style:y(w,R,M),getContainer:T,closeIcon:F},L=>{g[k]=L,x(L)})}const A={success:r.default,info:v.default,error:o.default,warning:p.default};function S(I){const w=I.prefixCls||"kt-notification",T=`${w}-notice`,R=(0,s.isUndefined)(I.duration)?l:I.duration;let M=null;I.icon?M=_.default.createElement("span",{className:`${T}-icon`},I.icon):I.type&&(M=_.default.createElement(A[I.type]||null,{className:`${T}-icon ${T}-icon-${I.type}`}));const{placement:O,top:x,bottom:k,getContainer:F,closeIcon:L}=I;b({prefixCls:w,placement:O,top:x,bottom:k,getContainer:F,closeIcon:L},B=>{B.notice({content:_.default.createElement("div",{className:M?`${T}-with-icon`:""},M,_.default.createElement("div",{className:`${T}-message`},I.message),_.default.createElement("div",{className:`${T}-description`},I.description),I.btn?_.default.createElement("span",{className:`${T}-btn`},I.btn):null),duration:R,closable:!0,onClose:I.onClose,onClick:I.onClick,key:I.key,style:I.style||{},className:I.className})})}const D={open:S,close(I){Object.keys(g).forEach(w=>g[w].removeNotice(I))},config:c,destroy(){Object.keys(g).forEach(I=>{g[I].destroy(),delete g[I]})}};["success","info","warning","error"].forEach(I=>{D[I]=w=>D.open({...w,type:I})}),D.warn=D.warning,t.default=D},79024:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Overlay=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(53017);e(45531);const p=({maskClosable:v=!1,closable:m=!0,className:_,onClose:s,children:g,footer:l,title:h,getContainer:u,keyboard:d,...E})=>o.default.createElement(a.Modal,{footer:l||null,maskClosable:v,closable:m,onCancel:s,title:h,getContainer:u,className:(0,r.default)("kt-overlay",_),keyboard:d,...E},g);t.Overlay=p},91397:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Popover=t.PopoverPosition=t.PopoverTriggerType=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(6208)),a=n.__importStar(e(14041));e(14856);const p=e(48412);var v;(function(s){s.hover="hover",s.click="click",s.focus="focus"})(v||(t.PopoverTriggerType=v={}));var m;(function(s){s.top="top",s.bottom="bottom",s.left="left",s.right="right",s.topLeft="topLeft",s.topRight="topRight",s.bottomLeft="bottomLeft",s.bottomRight="bottomRight",s.leftTop="leftTop",s.leftBottom="leftBottom",s.rightTop="rightTop",s.rightBottom="rightBottom"})(m||(t.PopoverPosition=m={}));const _=({children:s,trigger:g=v.hover,visible:l,content:h,position:u=m.top,showArrow:d=!0,title:E,titleClassName:f,overlay:c,overlayClassName:y,overlayStyle:b,action:A,delay:S=200,zIndex:D=1e3,onClickAction:I,onVisibleChange:w,getTooltipContainer:T,...R})=>{const M=(0,a.useCallback)(x=>{I&&I(x)},[I]),O=(0,a.useMemo)(()=>c||(!E&&!h?null:a.default.createElement(a.default.Fragment,null,E&&a.default.createElement("p",{className:(0,r.default)("kt-popover-title",f)},E,A&&a.default.createElement(p.Button,{size:"small",type:"link",onClick:M},A)),h||"")),[c,h,A,M]);return O?a.default.createElement(o.default,{...R,visible:l,placement:u,mouseEnterDelay:S?S/1e3:void 0,trigger:g,showArrow:d,onVisibleChange:w,overlayClassName:y,prefixCls:"kt-popover",overlayStyle:b,getTooltipContainer:T,overlay:O,zIndex:D},a.default.createElement("div",{className:"kt-popover-trigger"},s)):s};t.Popover=_},8573:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleList=t.RECYCLE_LIST_OVER_SCAN_COUNT=t.RECYCLE_LIST_STABILIZATION_TIME=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=n.__importDefault(e(19686)),p=e(58723),v=e(77011);t.RECYCLE_LIST_STABILIZATION_TIME=500,t.RECYCLE_LIST_OVER_SCAN_COUNT=50;const m=({width:_,height:s,maxHeight:g,minHeight:l,className:h,style:u,data:d,onReady:E,onScroll:f,itemHeight:c,header:y,footer:b,template:A,paddingBottomSize:S,getSize:D,hiddenVerticalScrollbar:I,hiddenHorizontalScrollbar:w})=>{const T=(0,o.useRef)(),R=(0,o.useRef)(),M=(0,o.useRef)({}),O=(0,o.useRef)(0),x=(0,o.useRef)();(0,o.useEffect)(()=>{typeof E=="function"&&E({scrollTo:K=>{var Y;(Y=T.current)===null||Y===void 0||Y.scrollTo(K)},scrollToIndex:(K,Y="start")=>{var X,oe;let ie=K;if(y&&ie++,typeof c=="number")(X=T.current)===null||X===void 0||X.scrollToItem(ie,Y);else{x.current&&clearTimeout(x.current);const me=(M.current?Object.keys(M.current):[]).slice(0,ie).reduce((q,Ee)=>q+F(Ee),0);(oe=T.current)===null||oe===void 0||oe.scrollToItem(K,Y),x.current=setTimeout(()=>{var q;(M.current?Object.keys(M.current):[]).slice(0,ie).reduce((te,fe)=>te+F(fe),0)!==me&&((q=T.current)===null||q===void 0||q.scrollToItem(K,Y)),x.current=null},t.RECYCLE_LIST_STABILIZATION_TIME)}}})},[]);const k=(H,K)=>{var Y;M.current[H]!==K&&(M.current={...M.current,[H]:K},T.current&&((Y=T.current)===null||Y===void 0||Y.resetAfterIndex(0)))},F=(0,o.useCallback)(H=>D?D(Number(H)):(M?.current||[])[H]||c||100,[c,D]),L=(0,o.useCallback)(()=>{if(g){let H=0;for(let K=0;K<d.length;K++)H+=F(K);return H>g?g:H}},[g,d]),B=(0,o.useCallback)(()=>{if(l)return l},[l,d]),U=(0,o.useMemo)(()=>{let H=d.length;return y&&H++,b&&H++,H},[d,b,y]),W=({index:H,style:K})=>{let Y;if(H===0&&y)return o.default.createElement("div",{style:K},o.default.createElement(y,null));if(H+1===U&&b)return o.default.createElement("div",{style:K},o.default.createElement(b,null));if(y?Y=d[H-1]:Y=d[H],!Y)return o.default.createElement("div",{style:K});const X={"aria-setsize":U,"aria-posinset":H};return o.default.createElement("div",{tabIndex:0,style:K,role:"listitem",...X},o.default.createElement(A,{data:Y,index:H}))},j=({index:H,style:K})=>{const Y=(0,o.useRef)(null),X=(0,o.useRef)(),oe=()=>{if(Y.current){let he=0;for(let me=0;me<Y.current.children.length;me++)he+=Y.current.children[me].getBoundingClientRect().height;k(H,he)}};(0,o.useEffect)(()=>{if(Y.current&&T.current){X.current=new MutationObserver(()=>{oe()});const he={childList:!0,attributes:!0,characterData:!0,attributeFilter:["class","style"],attributeOldValue:!0,characterDataOldValue:!0};X.current.observe(Y.current,he),oe()}return()=>{X.current.disconnect()}},[Y.current]);let ie;return H===0&&y?o.default.createElement("div",{style:K},o.default.createElement(y,null)):H+1===U&&b?o.default.createElement("div",{style:K},o.default.createElement(b,null)):(y?ie=d[H-1]:ie=d[H],ie?o.default.createElement("div",{style:K,ref:Y},o.default.createElement(A,{data:ie,index:H})):o.default.createElement("div",{style:K}))},Q=(0,o.useMemo)(()=>d.reduce((K,Y)=>K+F(Y),0)/d.length,[d]),G=(0,o.useCallback)(H=>{O.current=H.scrollOffset,f&&f(H)},[f]),Z=(0,o.useMemo)(()=>(0,o.forwardRef)((H,K)=>{const{style:Y,...X}=H;return o.default.createElement("div",{ref:K,style:{...Y,height:`${parseFloat(Y.height)+(S||0)}px`},...X})}),[S]),$=(0,o.useMemo)(()=>(0,o.forwardRef)((H,K)=>o.default.createElement(v.Scrollbars,{hiddenVertical:I,hiddenHorizontal:w,...H,thumbSize:10,forwardedRef:K})),[I,w]);return(()=>{const H=typeof c!="number",K=!_||!s;return(()=>{const X=({width:oe,height:ie})=>{R.current&&(R.current.scrollTop=O.current);const he=L(),me=B();let q=ie;return me?q=Math.min(ie,me):he&&(q=he),H?o.default.createElement(p.VariableSizeList,{onScroll:G,width:oe,height:q,itemData:[],itemSize:F,itemCount:U,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:T,style:{transform:"translate3d(0px, 0px, 0px)",...u},className:(0,r.default)(h,"kt-recycle-list"),innerElementType:Z,outerElementType:$,estimatedItemSize:Q},j):o.default.createElement(p.FixedSizeList,{onScroll:G,width:oe,height:q,itemData:[],itemSize:c,itemCount:U,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:T,outerRef:R,style:{transform:"translate3d(0px, 0px, 0px)",...u},className:(0,r.default)(h,"recycle-list"),innerElementType:Z,outerElementType:$},W)};return K?o.default.createElement(a.default,null,X):X({width:_,height:s})})()})()};t.RecycleList=m},34128:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(8573),t)},57621:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTree=t.RenderErrorType=void 0;const n=e(85608),r=n.__importDefault(e(39050)),o=n.__importStar(e(14041)),a=e(58723),p=e(70392),v=e(77011),m=e(48103),_=e(65601),s=e(43685),g=e(13429),l=e(34054);var h;(function(E){E[E.RENDER_ITEM=0]="RENDER_ITEM",E[E.GET_RENDED_KEY=1]="GET_RENDED_KEY",E[E.RENDER_ERROR=2]="RENDER_ERROR"})(h||(t.RenderErrorType=h={}));const u=o.default.forwardRef((E,f)=>{const{style:c,...y}=E;return o.default.createElement("div",{ref:f,style:{...c,height:`${parseFloat(c.height)+d.PADDING_BOTTOM_SIZE}px`},...y})});class d extends o.default.Component{constructor(){super(...arguments),this.idxToRendererPropsCache=new Map,this.dynamicSizeMap=new Map,this.listRef=o.default.createRef(),this.disposables=new p.DisposableCollection,this.onErrorEmitter=new p.Emitter,this.onDidUpdateEmitter=new p.Emitter,this.onDidModelChangeEmitter=new p.Emitter,this.newPromptInsertionIndex=-1,this.idToFilterRendererPropsCache=new Map,this.filterFlattenBranchChildrenCache=new Map,this.filterWatcherDisposeCollection=new p.DisposableCollection,this.queueUpdatePromise=null,this.updateCancelToken=new p.CancellationTokenSource,this.expandNodeCancelToken=new p.CancellationTokenSource,this.willUpdateTasks=0,this.queueUpdateThrottler=new p.Throttler,this.doBatchUpdate=(()=>{const f=(c,y)=>{if(this.disposables.disposed)return;const{root:b}=this.props.model;let A=-1;if(this.promptTargetID>-1&&this.promptHandle instanceof _.NewPromptHandle&&this.promptHandle.parent&&this.promptHandle.parent.expanded&&b.isItemVisibleAtSurface(this.promptHandle.parent)&&!this.promptHandle.destroyed){const S=b.getIndexAtTreeNodeId(this.promptTargetID);if(S>-1||this.promptHandle.parent===b)if(this.promptHandle.type===l.TreeNodeType.TreeNode){const D=this.promptHandle.parent;D?A=this.getNewPromptInsertIndex(S,D):A=S+1}else A=S+1;else this.promptTargetID=-1}if(A===-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed&&this.promptHandle.destroy(),this.newPromptInsertionIndex=A,this.idxToRendererPropsCache.clear(),y.isCancellationRequested){c();return}this.forceUpdate(()=>{c(),this.props.filter&&this.props.filterProvider&&this.props.filterProvider.filterAlways&&this.filterItems(this.props.filter)})};return()=>{const c=(A,S)=>{const D=!!this.willUpdateTasks;if(this.willUpdateTasks=0,!D)S.resolve();else{this.updateCancelToken.cancel(),this.updateCancelToken=new p.CancellationTokenSource;const I=this.updateCancelToken.token;requestAnimationFrame(()=>{if(I.isCancellationRequested){S();return}f(S,I)})}return A};let y;const b=new Promise(A=>y=A);return b.then(()=>{this.onDidUpdateEmitter.fire()}),c(b,y),b}})(),this.batchUpdate=()=>(this.willUpdateTasks++,this.queueUpdatePromise=this.queueUpdateThrottler.queue(this.doBatchUpdate),this.queueUpdatePromise),this.promptNewTreeNode=f=>this.promptNew(f),this.promptNewCompositeTreeNode=f=>this.promptNew(f,l.TreeNodeType.CompositeTreeNode),this.promptRename=async(f,c)=>{var y,b;const{root:A}=this.props.model,S=typeof f=="string"?await A.getTreeNodeByPath(f):f;if(!s.TreeNode.is(S)||s.CompositeTreeNode.isRoot(S))throw new TypeError(`Cannot rename object of type ${typeof S}`);const D=new m.RenamePromptHandle(c||S.name,S);return this.promptHandle=D,this.promptTargetID=S.id,A.isItemVisibleAtSurface(S)?await this.batchUpdate():await S.parent.setExpanded(!0),(b=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||b===void 0||b.scrollToItem(A.getIndexAtTreeNodeId(this.promptTargetID)),this.promptHandle},this.expandNode=async f=>{const{root:c}=this.props.model,y=typeof f=="string"?c.getTreeNodeByPath(f):f;if(this.expandNodeCancelToken.token.isCancellationRequested&&(this.expandNodeCancelToken=new p.CancellationTokenSource),y&&s.CompositeTreeNode.is(y)&&!y.disposed)return y.setExpanded(!1,!1,!0,this.expandNodeCancelToken.token)},this.collapseNode=async f=>{const{root:c}=this.props.model,y=typeof f=="string"?c.getTreeNodeByPath(f):f;if(y&&s.CompositeTreeNode.is(y)&&!y.disposed)return this.expandNodeCancelToken.cancel(),y.setCollapsed()},this._isEnsuring=!1,this.ensureVisible=async(f,c="smart",y=!1)=>{if(this._isEnsuring)return;this._isEnsuring=!0;const{root:b}=this.props.model,A=typeof f=="string"?b.getTreeNodeByPath(f)||await b.loadTreeNodeByPath(f):f;if(A&&!b.isItemVisibleAtSurface(A)&&await b.loadTreeNodeByPath(A.path),!s.TreeNode.is(A)||s.CompositeTreeNode.isRoot(A)){this._isEnsuring=!1;return}return y?this.tryScrollIntoViewWhileStable(A,c):this.tryScrollIntoView(A,c),this._isEnsuring=!1,A},this.getItemAtIndex=f=>{const{filter:c}=this.props;if(c&&this.filterFlattenBranch.length>0)return this.idToFilterRendererPropsCache.get(this.filterFlattenBranch[f]);let y=this.idxToRendererPropsCache.get(f);if(!y){const b=this.newPromptInsertionIndex,{root:A}=this.props.model;if(b>-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed)if(f===b)y={itemType:l.TreeNodeType.NewPrompt,item:this.promptHandle};else{const S=A.getTreeNodeAtIndex(f-(f>=b?1:0));y={itemType:s.CompositeTreeNode.is(S)?l.TreeNodeType.CompositeTreeNode:l.TreeNodeType.TreeNode,item:S}}else{const S=A.getTreeNodeAtIndex(f);S&&S.id===this.promptTargetID&&this.promptHandle&&this.promptHandle.constructor===m.RenamePromptHandle&&!this.promptHandle.destroyed?y={itemType:l.TreeNodeType.RenamePrompt,item:this.promptHandle}:y={itemType:s.CompositeTreeNode.is(S)?l.TreeNodeType.CompositeTreeNode:l.TreeNodeType.TreeNode,item:S}}this.idxToRendererPropsCache.set(f,y)}return y},this.handleListScroll=({scrollOffset:f})=>{const{model:c,height:y,itemHeight:b}=this.props;if(c.state.saveScrollOffset(f),!this.promptHandle||!b)return;let A;this.promptHandle instanceof _.NewPromptHandle&&this.newPromptInsertionIndex>-1?A=this.newPromptInsertionIndex:A=c.root.getIndexAtTreeNodeId(this.promptHandle.id),(f+y<A*b||A*b<f)&&this.promptHandle.destroy()},this.getItemKey=f=>{const c=this.getItemAtIndex(f),{getItemKey:y}=this.props,b=y?y(c):void 0;return b??f},this.filterItems=f=>{const{model:{root:c},filterProvider:y}=this.props;if(this.filterWatcherDisposeCollection.dispose(),this.idToFilterRendererPropsCache.clear(),!f)return;const b=/\//.test(f),A=new Set,S=new Map,D=[];for(let I=0,w=c.branchSize;I<w;I++){const T=c.getTreeNodeAtIndex(I);D.push(T)}if(b)D.forEach(I=>{if(I&&I.path.indexOf(f)>-1){A.add(I.id);let w=I.parent;for(;w&&!s.CompositeTreeNode.isRoot(w);)A.add(w.id),w=w.parent}});else{let I=[];y?I=r.default.filter(f,D,y.fuzzyOptions()):I=r.default.filter(f,D,d.FILTER_FUZZY_OPTIONS);const w=T=>{const R=T.children||[];if(R.length>0)for(const M of R)A.add(M.id),s.CompositeTreeNode.is(M)&&M.expanded&&w(M)};I.forEach(T=>{const R=T.original;A.add(R.id);let M=R.parent;for(S.set(R.id,()=>o.default.createElement("div",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},dangerouslySetInnerHTML:{__html:T.string||""}})),s.CompositeTreeNode.is(R)&&w(R);M&&!s.CompositeTreeNode.isRoot(M);)A.add(M.id),M=M.parent})}this.filterFlattenBranch=new Array(A.size);for(let I=0,w=0,T=c.branchSize;w<T;w++){const R=c.getTreeNodeAtIndex(w);R&&A.has(R.id)&&(this.filterFlattenBranch[I]=R.id,s.CompositeTreeNode.is(R)?this.idToFilterRendererPropsCache.set(R.id,{item:R,itemType:l.TreeNodeType.CompositeTreeNode,template:S.has(R.id)?S.get(R.id):void 0}):this.idToFilterRendererPropsCache.set(R.id,{item:R,itemType:l.TreeNodeType.TreeNode,template:S.has(R.id)?S.get(R.id):void 0}),I++)}this.filterWatcherDisposeCollection.push(c.watcher.on(l.TreeNodeEvent.DidChangeExpansionState,(I,w)=>{const T=this.filterFlattenBranch.indexOf(I.id);if(w){const R=this.filterFlattenBranchChildrenCache.get(I.id);R&&R.length>0&&(this.filterFlattenBranch=(0,s.spliceArray)(this.filterFlattenBranch,T+1,0,R),this.filterFlattenBranchChildrenCache.delete(I.id))}else{const R=[];for(let M=T+1;M<this.filterFlattenBranch.length;M++){const O=c.getTreeNodeById(this.filterFlattenBranch[M]);if(O&&O.depth>I.depth)R.push(O.id);else break}this.filterFlattenBranchChildrenCache.set(I.id,R),this.filterFlattenBranch=(0,s.spliceArray)(this.filterFlattenBranch,T+1,R.length)}})),this.filterWatcherDisposeCollection.push(p.Disposable.create(()=>{this.filterFlattenBranchChildrenCache.clear()}))},this.renderItem=({index:f,style:c})=>{var y,b,A,S,D,I,w;const{children:T,overflow:R="ellipsis",supportDynamicHeights:M}=this.props,O=this.getItemAtIndex(f),x=(0,o.useRef)(null),k=(0,o.useMemo)(()=>M?()=>{let j=0;if(x.current){const Q=x.current;j=Array.from(Q.children).reduce((G,Z)=>G+Z.getBoundingClientRect().height,0)}return j&&(this.dynamicSizeMap.set(f,j),this.layoutItem()),Math.max(j,d.DEFAULT_ITEM_HEIGHT)}:()=>{},[M]);if((0,o.useEffect)(()=>{x.current&&k()},[]),!O)return o.default.createElement(o.default.Fragment,null);const{item:F,itemType:L,template:B}=O;if(!F)return o.default.createElement("div",{style:c});let U;s.CompositeTreeNode.is(F)?U={"aria-label":(y=F.accessibilityInformation)===null||y===void 0?void 0:y.label,"aria-expanded":F.expanded,"aria-level":F.depth,"aria-setsize":(A=(b=F.parent)===null||b===void 0?void 0:b.children)===null||A===void 0?void 0:A.length,"aria-posinset":f}:s.TreeNode.is(F)&&(U={"aria-label":(S=F.accessibilityInformation)===null||S===void 0?void 0:S.label,"aria-level":F.depth,"aria-setsize":(I=(D=F.parent)===null||D===void 0?void 0:D.children)===null||I===void 0?void 0:I.length,"aria-posinset":f});const W=R==="ellipsis"?c:{...c,width:"auto",minWidth:"100%"};return o.default.createElement("div",{ref:x,style:W,role:((w=F.accessibilityInformation)===null||w===void 0?void 0:w.role)||"treeiem",...U},o.default.createElement(g.NodeRendererWrap,{item:F,depth:F.depth,itemType:L,template:B,hasPrompt:!!this.promptHandle&&!this.promptHandle.destroyed,expanded:s.CompositeTreeNode.is(F)?F.expanded:void 0},T))},this.layoutItem=()=>{var f,c,y,b;if(this.props.supportDynamicHeights&&this.listRef&&!((f=this.listRef)===null||f===void 0)&&f.current&&"_getRangeToRender"in((c=this.listRef)===null||c===void 0?void 0:c.current)){const A=(y=this.listRef)===null||y===void 0?void 0:y.current._getRangeToRender();if(A){const S=A[0];((b=this.listRef)===null||b===void 0?void 0:b.current).resetAfterIndex(S)}}}}getNewPromptInsertIndex(f,c){const{root:y}=this.props.model;let b=f+1;for(;b-f<=c.branchSize;b++){const A=y.getTreeNodeAtIndex(b);if(!A)return b;if(!s.CompositeTreeNode.is(A)){if(A?.depth>c.depth+1)continue;return b}}return b}UNSAFE_componentWillUpdate(f){this.props.filter!==f.filter&&this.filterItems(f.filter),this.props.model!==f.model&&(this.idxToRendererPropsCache.clear(),this.idToFilterRendererPropsCache.clear(),this.dynamicSizeMap.clear())}componentDidUpdate(f){var c,y;if(this.props.model!==f.model){this.disposables.dispose();const{model:b}=this.props;(y=(c=this.listRef)===null||c===void 0?void 0:c.current)===null||y===void 0||y.scrollTo(b.state.scrollOffset),this.disposables.push(b.onChange(this.batchUpdate.bind(this))),this.disposables.push(b.state.onDidLoadState(()=>{var A,S;(S=(A=this.listRef)===null||A===void 0?void 0:A.current)===null||S===void 0||S.scrollTo(b.state.scrollOffset)})),this.onDidModelChangeEmitter.fire({preModel:f.model,nextModel:b})}}async promptNew(f,c=l.TreeNodeType.TreeNode){var y,b;const{root:A}=this.props.model;let S=typeof f=="string"?await A.getTreeNodeByPath(f):f;if(c!==l.TreeNodeType.TreeNode&&c!==l.TreeNodeType.CompositeTreeNode)throw new TypeError(`Invalid type supplied. Expected 'TreeNodeType.TreeNode' or 'TreeNodeType.CompositeTreeNode', got ${c}`);if(S&&!s.CompositeTreeNode.is(S)&&(S=S.parent,!s.CompositeTreeNode.is(S)))throw new TypeError(`Cannot create new prompt at object of type ${typeof S}`);if(!S)throw new Error(`Cannot find node at ${f}`);const D=new _.NewPromptHandle(c,S);return this.promptHandle=D,this.promptTargetID=S.id,S!==A&&(!S.expanded||!A.isItemVisibleAtSurface(S))?await S.setExpanded(!0):await this.batchUpdate(),this.newPromptInsertionIndex>=0?(b=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||b===void 0||b.scrollToItem(this.newPromptInsertionIndex):this.tryScrollIntoViewWhileStable(this.promptHandle),this.promptHandle}tryScrollIntoView(f,c="auto"){var y,b,A,S;const{root:D}=this.props.model;f.constructor===_.NewPromptHandle&&!f.destroyed?(b=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||b===void 0||b.scrollToItem(this.newPromptInsertionIndex):D.isItemVisibleAtSurface(f)&&((S=(A=this.listRef)===null||A===void 0?void 0:A.current)===null||S===void 0||S.scrollToItem(D.getIndexAtTreeNode(f),c))}tryScrollIntoViewWhileStable(f,c="smart"){const{root:y}=this.props.model;if(this.tryEnsureVisibleTimes>d.TRY_ENSURE_VISIBLE_MAX_TIMES){this.tryEnsureVisibleTimes=0;return}p.Event.once(this.props.model.onChange)(async()=>{var b,A,S,D;await this.queueUpdatePromise,f.constructor===_.NewPromptHandle&&!f.destroyed?(A=(b=this.listRef)===null||b===void 0?void 0:b.current)===null||A===void 0||A.scrollToItem(this.newPromptInsertionIndex):y.isItemVisibleAtSurface(f)?((D=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||D===void 0||D.scrollToItem(y.getIndexAtTreeNode(f),c),this.tryEnsureVisibleTimes=0):(this.tryEnsureVisibleTimes++,this.tryScrollIntoViewWhileStable(f,c))})}componentDidMount(){var f,c;const{model:y,onReady:b}=this.props;if((c=(f=this.listRef)===null||f===void 0?void 0:f.current)===null||c===void 0||c.scrollTo(y.state.scrollOffset),this.disposables.push(y.onChange(this.batchUpdate.bind(this))),this.disposables.push(y.state.onDidLoadState(()=>{var A,S;(S=(A=this.listRef)===null||A===void 0?void 0:A.current)===null||S===void 0||S.scrollTo(y.state.scrollOffset)})),typeof b=="function"){const A={promptNewTreeNode:this.promptNewTreeNode,promptNewCompositeTreeNode:this.promptNewCompositeTreeNode,promptRename:this.promptRename,expandNode:this.expandNode,collapseNode:this.collapseNode,ensureVisible:this.ensureVisible,getModel:()=>this.props.model,layoutItem:this.layoutItem,getCurrentSize:()=>({width:this.props.width,height:this.props.height}),onDidChangeModel:this.onDidModelChangeEmitter.event,onDidUpdate:this.onDidUpdateEmitter.event,onOnceDidUpdate:p.Event.once(this.onDidUpdateEmitter.event),onError:this.onErrorEmitter.event};b(A)}}componentWillUnmount(){this.disposables.dispose()}set promptHandle(f){this._promptHandle!==f&&(this._promptHandle instanceof m.PromptHandle&&!this._promptHandle.destroyed&&this._promptHandle.destroy(),f.onDestroy(this.batchUpdate),this._promptHandle=f)}get promptHandle(){return this._promptHandle}get adjustedRowCount(){const{root:f}=this.props.model,{filter:c}=this.props;return c?this.filterFlattenBranch.length:this.newPromptInsertionIndex>-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed?f.branchSize+1:f.branchSize}getItemSize(f){return this.dynamicSizeMap.get(f)||this.props.itemHeight}render(){const{children:f,itemHeight:c,width:y="100%",height:b,style:A,className:S,placeholder:D,overScanCount:I,leaveBottomBlank:w,supportDynamicHeights:T}=this.props;if(D&&this.adjustedRowCount===0){const M=D;return o.default.createElement(M,null)}const R={children:f,height:b,width:y,itemData:[],itemCount:this.adjustedRowCount,itemKey:this.getItemKey,overscanCount:I||d.DEFAULT_OVER_SCAN_COUNT,onScroll:this.handleListScroll,style:{transform:"translate3d(0px, 0px, 0px)",...A},className:S,outerElementType:v.ScrollbarsVirtualList};return w&&(R.innerElementType=u),T?o.default.createElement(a.VariableSizeList,{ref:this.listRef,itemSize:this.getItemSize.bind(this),...R},this.renderItem):o.default.createElement(a.FixedSizeList,{ref:this.listRef,itemSize:c,...R},this.renderItem)}}t.RecycleTree=d,d.PADDING_BOTTOM_SIZE=22,d.DEFAULT_ITEM_HEIGHT=22,d.TRY_ENSURE_VISIBLE_MAX_TIMES=5,d.FILTER_FUZZY_OPTIONS={pre:"<match>",post:"</match>",extract:E=>E?.name||""},d.DEFAULT_OVER_SCAN_COUNT=50},13429:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRendererWrap=void 0;const r=e(85608).__importDefault(e(14041));class o extends r.default.Component{render(){const{item:p,itemType:v,children:m,template:_,hasPrompt:s}=this.props;return r.default.createElement(m,{item:p,itemType:v,template:_,hasPrompt:s,key:p.id})}shouldComponentUpdate(p){return!0}}t.NodeRendererWrap=o},75821:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicRecycleTree=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=n.__importDefault(e(26460)),a=e(58998),p=e(57621),v=e(64013),m=e(84225),_=e(17462),s=e(78569),g=e(45203);e(12794),e(34728),n.__exportStar(e(92532),t);const l=({width:h,height:u,itemHeight:d=22,itemClassname:E,indent:f,baseIndent:c,containerClassname:y,onClick:b,onContextMenu:A,onTwistierClick:S,onIconClick:D,onDbClick:I,resolveChildren:w,sortComparator:T,treeData:R,inlineMenus:M,inlineMenuActuator:O,onReady:x,contextMenus:k,contextMenuActuator:F,treeName:L,leaveBottomBlank:B=!0})=>{const[U,W]=(0,r.useState)({show:!1}),[j,Q]=(0,r.useState)([]),[G,Z]=(0,r.useState)(),$=(0,r.useRef)(!1),V=(0,r.useRef)(),H=(0,r.useRef)(),K=(0,r.useRef)(null),Y=(0,r.useCallback)(Pe=>{var we;return r.default.createElement(_.BasicTreeNodeRenderer,{item:Pe.item,itemType:Pe.itemType,itemHeight:d,indent:f,baseIndent:c,className:E,inlineMenus:M,inlineMenuActuator:O,onClick:he,onDbClick:q,onContextMenu:Ee,onTwistierClick:te,onIconClick:me,decorations:(we=V.current)===null||we===void 0?void 0:we.decorations.getDecorations(Pe.item)})},[G]);(0,r.useEffect)(()=>{var Pe,we;V.current=new g.BasicTreeService(R,w,T,{treeName:L});const _e=(Pe=V.current)===null||Pe===void 0?void 0:Pe.onDidUpdateTreeModel(Te=>{X(Te)}),Ne=()=>{var Te;(Te=V.current)===null||Te===void 0||Te.enactiveFocusedDecoration()};return(we=K.current)===null||we===void 0||we.addEventListener("blur",Ne,!0),()=>{var Te,We;$.current=!0,(Te=K.current)===null||Te===void 0||Te.removeEventListener("blur",Ne,!0),_e.dispose(),(We=V.current)===null||We===void 0||We.dispose()}},[]),(0,r.useEffect)(()=>{var Pe;(Pe=V.current)===null||Pe===void 0||Pe.updateTreeData(R)},[R]);const X=async Pe=>{Pe&&await Pe.ensureReady,$.current||Z(Pe)},oe=async Pe=>{var we;(we=V.current)===null||we===void 0||we.activeFocusedDecoration(Pe),s.BasicCompositeTreeNode.is(Pe)&&ue(Pe)},ie=(0,r.useCallback)(Pe=>{x&&x({...Pe,selectItem:oe,focusItem:async we=>{var _e;const Ne=`/${L}/${we}`;await G?.ensureReady;const Te=await Pe.ensureVisible(Ne,"auto",!0);Te&&((_e=V.current)===null||_e===void 0||_e.activeFocusedDecoration(Te))}}),H.current=Pe},[V.current]),he=(0,r.useCallback)((Pe,we)=>{oe(we),b&&b(Pe,we)},[b]),me=(0,r.useCallback)((Pe,we)=>{D&&D(Pe,we)},[D]),q=(0,r.useCallback)((Pe,we)=>{I&&I(Pe,we)},[I]),Ee=(0,r.useCallback)((Pe,we)=>{var _e,Ne;if(we?(_e=V.current)===null||_e===void 0||_e.activeContextMenuDecoration(we):(Ne=V.current)===null||Ne===void 0||Ne.enactiveFocusedDecoration(),A)A(Pe,we);else{let Te=[];Array.isArray(k)?Te=k:typeof k=="function"&&(Te=k(we));const We=new Set,pe={};for(const Ue of Te)We.add(Ue.group||"-1"),pe[Ue.group||"-1"]||(pe[Ue.group||"-1"]=[]),pe[Ue.group||"-1"].push(Ue);const re=Array.from(We).sort((Ue,Ye)=>Ue.localeCompare(Ye,"kn",{numeric:!0}));let ge=[];for(const Ue of re)ge=ge.concat(pe[Ue].map(Ye=>({id:Ye.id,label:Ye.title,group:Ye.group}))),ge=ge.concat([{id:`${Ue}_divider`,label:"",type:"divider"}]);ge.pop(),JSON.stringify(ge)!==JSON.stringify(j)&&Q(ge);const{x:De,y:Ae}=Pe.nativeEvent;W({show:!0,point:{pageX:De,pageY:Ae},activeNode:we})}},[I]),ue=(0,r.useCallback)(Pe=>{var we,_e;Pe.expanded?(we=H.current)===null||we===void 0||we.collapseNode(Pe):(_e=H.current)===null||_e===void 0||_e.expandNode(Pe)},[]),te=(0,r.useCallback)((Pe,we)=>{s.BasicCompositeTreeNode.is(we)&&ue(we),S&&S(Pe,we)},[S]),fe=(0,r.useCallback)(()=>{var Pe;(Pe=V.current)===null||Pe===void 0||Pe.enactiveFocusedDecoration()},[]),Ie=(0,r.useCallback)((Pe,we)=>{A&&A(Pe,we)},[]),Me=(0,r.useCallback)(()=>{W({...U,show:!1})},[U]),Be=(0,r.useCallback)(()=>k?r.default.createElement(o.default,{popupPlacement:"bottomLeft",popupVisible:U.show,action:["contextMenu"],popupAlign:{overflow:{adjustX:1,adjustY:1},offset:[window.scrollX,window.scrollY]},point:U.point||{},builtinPlacements:m.placements,popup:r.default.createElement(a.ClickOutside,{className:"basic_tree_menubars",mouseEvents:["click","contextmenu"],onOutsideClick:Me},j.map(({id:Pe,label:we,type:_e})=>r.default.createElement(v.BasicMenuItem,{key:Pe,id:Pe,label:we,type:_e,focusMode:U.show,onClick:Ne=>{F&&F(U.activeNode,Ne),W({show:!1})}}))),alignPoint:!0}):null,[j,F,U]);return r.default.createElement("div",{className:"basic_tree",tabIndex:-1,ref:K,onClick:fe,onContextMenu:Ie},Be(),G?r.default.createElement(p.RecycleTree,{height:u,width:h,itemHeight:d,model:G,onReady:ie,className:y,leaveBottomBlank:B},Y):null)};t.BasicRecycleTree=l},64013:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicMenuItem=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=({id:p,label:v,type:m,focusMode:_,onClick:s})=>{const[g,l]=o.default.useState(!1),h=o.default.useCallback(()=>{l(_?!0:d=>!d),s(p)},[p]),u=o.default.useCallback(()=>{},[p,_]);return m==="divider"?o.default.createElement("div",{className:"basic_menu_item_divider"}):o.default.createElement("div",{className:(0,r.default)("basic_menu_item",{"menu-open":g}),onMouseOver:u,onClick:h},v)};t.BasicMenuItem=a},84225:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.placements=void 0;const e={adjustX:1,adjustY:1},n=[0,0];t.placements={bottomLeft:{points:["tl","bl"],overflow:e,offset:[0,4],targetOffset:n}}},78569:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicTreeNode=t.BasicCompositeTreeNode=t.BasicTreeRoot=void 0;const n=e(43685);class r extends n.CompositeTreeNode{constructor(v,m,_,s={}){super(v,m,void 0,{treeName:s.treeName}),this._raw=_}get name(){var v;return(v=this.getMetadata("treeName"))!==null&&v!==void 0?v:`BasicTreeRoot_${this.id}`}get raw(){return this._raw}get expanded(){return!0}}t.BasicTreeRoot=r;class o extends n.CompositeTreeNode{constructor(v,m,_,s){super(v,m,void 0,{name:_.label}),this.isExpanded=_.expanded||!1,this.id=s||this.id,this._displayName=_.label,this._raw=_}get displayName(){return this._displayName}get renderLabel(){return this.raw.renderLabel}get icon(){return this.raw.icon}get iconClassName(){return this.raw.iconClassName}get className(){return this.raw.className}get twisterClassName(){return this.raw.twisterClassName}get twisterPlaceholderClassName(){return this.raw.twisterPlaceholderClassName}get indentOffset(){return this.raw.indentOffset}get description(){return this.raw.description}get raw(){return this._raw}get expandable(){return!!this._raw.expandable}}t.BasicCompositeTreeNode=o;class a extends n.TreeNode{constructor(v,m,_,s){super(v,m,void 0,{name:_.label}),this.id=s||this.id,this._displayName=_.label,this._raw=_}get displayName(){return this._displayName}get renderLabel(){return this.raw.renderLabel}get description(){return this.raw.description}get icon(){return this.raw.icon}get iconClassName(){return this.raw.iconClassName}get className(){return this.raw.className}get twisterClassName(){return this.raw.twisterClassName}get indentOffset(){return this.raw.indentOffset}get twisterPlaceholderClassName(){return this.raw.twisterPlaceholderClassName}get raw(){return this._raw}}t.BasicTreeNode=a},17462:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicTreeNodeRenderer=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(48412),p=e(54713),v=e(3660),m=e(78569),_=e(92532);e(12794);const s=({item:g,className:l,itemHeight:h=22,indent:u=8,baseIndent:d=8,onClick:E,onDbClick:f,onTwistierClick:c,onIconClick:y,onContextMenu:b,decorations:A,inlineMenus:S=[],inlineMenuActuator:D=()=>{}})=>{const I=(0,o.useCallback)($=>{E&&($.stopPropagation(),E($,g))},[E]),w=(0,o.useCallback)($=>{f&&($.stopPropagation(),f($,g))},[f]),T=(0,o.useCallback)($=>{b&&($.stopPropagation(),$.preventDefault(),b($,g))},[b]),R=(0,o.useCallback)($=>{$.stopPropagation(),c?c($,g):E&&E($,g)},[E,c]),M=(0,o.useCallback)($=>{$.stopPropagation(),y?y($,g):E&&E($,g)},[E,y]);let x=(g.depth>0?g.depth-1:0)*u;d&&(x+=d),g.indentOffset&&(x+=g.indentOffset);const k={height:h,lineHeight:`${h}px`,paddingLeft:`${x}px`},F=(0,o.useCallback)($=>o.default.createElement(p.Icon,{onClick:M,icon:$.icon,className:(0,r.default)("icon",$.iconClassName)}),[]),L=(0,o.useCallback)($=>$.displayName.replace(/\n/g,"\u21B5"),[]),B=(0,o.useCallback)($=>$.displayName&&o.default.createElement("div",{className:(0,r.default)("segment","display_name")},L($)),[]),U=(0,o.useCallback)($=>$.renderLabel,[]),W=(0,o.useCallback)($=>$.description?typeof $.description=="string"?o.default.createElement("div",{className:(0,r.default)("segment_grow","description")},$.description):$.description:null,[]),j=(0,o.useCallback)($=>{if(Array.isArray(S))return S;if(typeof S=="function")return S($)},[S]),Q=()=>{var $;const V=m.BasicCompositeTreeNode.is(g),H=($=j(g))===null||$===void 0?void 0:$.filter(Y=>V?Y.position===_.IBasicInlineMenuPosition.TREE_CONTAINER:Y.position===_.IBasicInlineMenuPosition.TREE_NODE);if(!H?.length)return null;const K=(0,o.useCallback)((Y,X)=>{Y.stopPropagation(),D(g,X)},[]);return o.default.createElement("div",{className:(0,r.default)("segment","tail")},H.map(Y=>o.default.createElement(a.Button,{style:{marginRight:"5px"},type:"icon",key:`${g.id}-${Y.icon}`,icon:Y.icon,title:Y.title,onClick:X=>K(X,Y)})))},G=($,V)=>A&&A?.classlist.indexOf(_.DECORATIONS.LOADING)>-1?o.default.createElement(v.Loading,null):o.default.createElement(p.Icon,{className:(0,r.default)("segment","expansion_toggle",$.twisterClassName,{mod_collapsed:!$.expanded}),onClick:V,icon:"arrow-right"}),Z=$=>{if(!$.expandable)return o.default.createElement("div",{className:(0,r.default)("segment","expansion_toggle",$.twisterPlaceholderClassName)});if(m.BasicCompositeTreeNode.is($))return G($,R)};return o.default.createElement("div",{key:g.id,onClick:I,onDoubleClick:w,onContextMenu:T,className:(0,r.default)("tree_node",l,A?A.classlist:null,g.className),style:k,"data-id":g.id},o.default.createElement("div",{className:"content"},Z(g),F(g),o.default.createElement("div",{className:"overflow_wrap"},U(g)||B(g),W(g)),Q()))};t.BasicTreeNodeRenderer=s},45203:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicTreeModel=t.BasicTreeService=void 0;const n=e(70392),r=e(43685),o=e(34054),a=e(78569),p=e(92532);class v extends r.Tree{constructor(s,g,l,h={}){super(),this._treeData=s,this._resolveChildren=g,this._sortComparator=l,this.treeOptions=h,this.selectedDecoration=new r.Decoration(p.DECORATIONS.SELECTED),this.focusedDecoration=new r.Decoration(p.DECORATIONS.FOCUSED),this.contextMenuDecoration=new r.Decoration(p.DECORATIONS.ACTIVED),this.loadingDecoration=new r.Decoration(p.DECORATIONS.LOADING),this._selectedNodes=[],this.disposableCollection=new n.DisposableCollection,this.decorationDisposableCollection=new n.DisposableCollection,this.onDidUpdateTreeModelEmitter=new n.Emitter,this.sortComparator=(u,d)=>{if(this._sortComparator){const E=this._sortComparator(u.raw,d.raw);if(typeof E<"u")return E}return super.sortComparator(u,d)},this.activeFocusedDecoration=u=>{var d;this._contextMenuNode&&(this.clearDecoration(this.contextMenuDecoration),this.clearDecoration(this.focusedDecoration),this.clearDecoration(this.selectedDecoration),this._contextMenuNode=void 0),u&&(this.selectedNodes.length>0&&this.clearDecoration(this.selectedDecoration),this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0),this.selectedDecoration.addTarget(u),this.focusedDecoration.addTarget(u),this._focusedNode=u,this._selectedNodes=[u],(d=this.model)===null||d===void 0||d.dispatchChange())},this.activeContextMenuDecoration=u=>{var d;this._contextMenuNode&&(this.clearDecoration(this.contextMenuDecoration),this._contextMenuNode=void 0),this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(u),this._contextMenuNode=u,(d=this.model)===null||d===void 0||d.dispatchChange()},this.enactiveFocusedDecoration=()=>{var u;this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0,(u=this.model)===null||u===void 0||u.dispatchChange())},this.disposableCollection.push(this.onDidUpdateTreeModelEmitter)}setUpTreeModel(){this._root=new a.BasicTreeRoot(this,void 0,{children:this._treeData,label:"",command:"",icon:""},{treeName:this.treeOptions.treeName}),this._model=new m,this._model.init(this._root),this.initDecorations(this._root),this.onDidUpdateTreeModelEmitter.fire(this._model)}resetState(){this._selectedNodes=[],this._contextMenuNode=void 0,this._focusedNode=void 0}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get model(){return this._model}get root(){return this._root}get decorations(){return this._decorations}initDecorations(s){this.decorationDisposableCollection.dispose(),this._decorations=new r.DecorationsManager(s),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration),this.decorationDisposableCollection.push(s.watcher.on(o.TreeNodeEvent.WillResolveChildren,g=>{this.loadingDecoration.addTarget(g)})),this.decorationDisposableCollection.push(s.watcher.on(o.TreeNodeEvent.DidResolveChildren,g=>{this.loadingDecoration.removeTarget(g)})),this.decorationDisposableCollection.push(this._decorations)}updateTreeData(s){this._treeData=s,this.resetState(),this.setUpTreeModel()}async resolveChildren(s){return this._resolveChildren?this.transformTreeNode(s,this._resolveChildren(s?.raw)||[]):this.transformTreeNode(s,s?.raw.children||[])}transformTreeNode(s,g){if(!g)return[];const l=[];for(const h of g)h.children?l.push(new a.BasicCompositeTreeNode(this,s,h)):l.push(new a.BasicTreeNode(this,s,h));return l}get selectedNodes(){return this._selectedNodes}get focusedNode(){return this._focusedNode}get contextMenuNode(){return this._contextMenuNode}clearDecoration(s){for(const g of s.appliedTargets.keys())s.removeTarget(g)}dispose(){super.dispose(),this.disposableCollection.dispose(),this.decorationDisposableCollection.dispose()}}t.BasicTreeService=v;class m extends r.TreeModel{}t.BasicTreeModel=m},92532:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DECORATIONS=t.IBasicInlineMenuPosition=void 0;var e;(function(n){n[n.TREE_NODE=1]="TREE_NODE",n[n.TREE_CONTAINER=2]="TREE_CONTAINER"})(e||(t.IBasicInlineMenuPosition=e={})),t.DECORATIONS={SELECTED:"mod_selected",FOCUSED:"mod_focused",ACTIVED:"mod_actived",LOADING:"mod_loading"}},24786:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTreeAdaptiveDecorator=void 0;const r=e(85608).__importDefault(e(14041)),o=e(34054),a=p=>v=>{const{model:m,itemHeight:_,onReady:s}=v,g=r.default.useRef(),l=r.default.useRef(!1),[h,u]=r.default.useState(0),d=()=>{u(m.root.branchSize*_)},E=f=>{s&&s({...f,promptNewTreeNode:async c=>{var y;const b=await f.promptNewTreeNode(c);return!((y=g.current)===null||y===void 0)&&y.root.branchSize?u(g.current.root.branchSize*_+_):u(_),l.current=!1,b.onDestroy(()=>{var A;!((A=g.current)===null||A===void 0)&&A.root.branchSize&&u(g.current.root.branchSize*_)}),b.onCancel(()=>{g.current&&u(g.current.root.branchSize*_)}),b.onBlur(()=>l.current),b},promptNewCompositeTreeNode:async c=>{var y;const b=await f.promptNewCompositeTreeNode(c);return!((y=g.current)===null||y===void 0)&&y.root.branchSize?u(g.current.root.branchSize*_+_):u(_),b.onDestroy(()=>{var A;!((A=g.current)===null||A===void 0)&&A.root.branchSize&&u(g.current.root.branchSize*_)}),b.onCancel(()=>{var A;!((A=g.current)===null||A===void 0)&&A.root.branchSize&&u(g.current.root.branchSize*_)}),b.onBlur(()=>l.current),b}})};return r.default.useEffect(()=>{g.current=m,g.current.root&&(u(g.current.root.branchSize*_),g.current.root.watcher.on(o.TreeNodeEvent.DidChangeExpansionState,d))},[m]),r.default.useEffect(()=>{setTimeout(()=>{l.current=!0},100)},[h]),r.default.createElement(r.default.Fragment,null,r.default.createElement(p,{...v,height:h,onReady:E}))};t.RecycleTreeAdaptiveDecorator=a},326:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTreeFilterDecorator=void 0;const n=e(85608),r=n.__importDefault(e(97331)),o=n.__importStar(e(14041)),a=e(54713),p=e(50708),v=e(4981);e(69715);const m=30,_=500,s=l=>{const{localize:h}=o.default.useContext(v.LocalizeContext);return o.default.createElement("div",{className:"kt-recycle-tree-filter-wrapper"},o.default.createElement(p.Input,{hasClear:!0,autoFocus:!0,className:"kt-recycle-tree-filter-input",size:"small",...l,placeholder:l.placeholder||h("tree.filter.placeholder"),addonBefore:o.default.createElement(a.Icon,{className:"kt-recycle-tree-filter-icon",icon:"retrieval"})}))},g=l=>h=>{const[u,d]=o.default.useState(""),[E,f]=o.default.useState(""),{beforeFilterValueChange:c,filterEnabled:y,height:b,filterPlaceholder:A,filterAfterClear:S,onReady:D,onFilterBlur:I,filterAutoFocus:w,...T}=h,R=(0,r.default)(async x=>{c&&await c(x),f(x)},_),M=(0,o.useCallback)(x=>{d(x),R(x)},[u]),O=(0,o.useCallback)(x=>{D&&D({...x,clearFilter:()=>{f(""),d("")}})},[D]);return o.default.createElement(o.default.Fragment,null,y&&o.default.createElement(s,{afterClear:S,placeholder:A,value:u,autoFocus:w,onBlur:I,onValueChange:M}),o.default.createElement(l,{...T,height:b-(y?m:0),onReady:O,filter:E}))};t.RecycleTreeFilterDecorator=g},72731:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(326),t),n.__exportStar(e(24786),t)},91416:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(57621),t),n.__exportStar(e(13429),t),n.__exportStar(e(48103),t),n.__exportStar(e(43685),t),n.__exportStar(e(34054),t),n.__exportStar(e(72731),t),n.__exportStar(e(75821),t)},65601:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NewPromptHandle=void 0;const n=e(43685),r=e(65747);class o extends r.PromptHandle{constructor(p,v){super(),this.type=p,this.parent=v,this._id=n.TreeNode.nextId()}get id(){return this._id}get depth(){return this.parent.depth+1}}t.NewPromptHandle=o},65747:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromptHandle=t.VALIDATE_CLASS_NAME=t.PROMPT_VALIDATE_TYPE=void 0;const n=e(70392),r=e(50708),o=e(84605),a=_=>new Promise(s=>setTimeout(s,_));var p;(function(_){_[_.INFO=1]="INFO",_[_.ERROR=2]="ERROR",_[_.WARNING=3]="WARNING"})(p||(t.PROMPT_VALIDATE_TYPE=p={}));var v;(function(_){_.INFO="validate-info",_.ERROR="validate-error",_.WARNING="validate-warning"})(v||(t.VALIDATE_CLASS_NAME=v={}));class m{constructor(){this.disposables=new n.DisposableCollection,this.isInPendingCommitState=!1,this._destroyed=!1,this._hasValidateElement=!1,this._hasAddonAfter=!1,this._inComposition=!1,this.onChangeEmitter=new n.Emitter,this.onCommitEmitter=new n.Emitter,this.onCancelEmitter=new n.Emitter,this.onFocusEmitter=new n.Emitter,this.onBlurEmitter=new n.Emitter,this.onDestroyEmitter=new n.Emitter,this.markdownRenderer=(0,o.createMarkedRenderer)(),this.handleClick=s=>{s.stopPropagation()},this.handleDBClick=s=>{s.stopPropagation()},this.handleCompositionstart=()=>{this._inComposition=!0},this.handleCompositionend=()=>{this._inComposition=!1},this.handleKeyup=()=>{this._inComposition||this.onChangeEmitter.fire(this.$.value)},this.handleKeydown=async s=>{if(!this._inComposition){if(s.key==="Escape"){if((await this.onCancelEmitter.fireAndAwait(this.$.value)).some(l=>l.result===!1||!!l.err))return;this.destroy()}if(s.key==="Enter"){if(this.isInPendingCommitState=!0,this.$.disabled=!0,(await this.onCommitEmitter.fireAndAwait(this.$.value)).some(l=>l.result===!1||!!l.err)){this.isInPendingCommitState=!1,this.$.disabled=!1,this.$.focus();return}this.isInPendingCommitState=!1,this.$.disabled=!1,this.destroy()}}},this.handleFocus=()=>{this.onFocusEmitter.fire(this.$.value)},this.handleBlur=async s=>{await a(0),!(!this.$.isConnected&&!this.destroyed||(await this.onBlurEmitter.fireAndAwait(this.$.value)).some(l=>l.result===!1||!!l.err))&&(this.isInPendingCommitState||this.destroy())},this.$=document.createElement("input"),this.$.setAttribute("type","text"),this.$.setAttribute("name","no_keybinding"),this.$.setAttribute("spellcheck","false"),this.$.setAttribute("autoCapitalize","off"),this.$.setAttribute("autoCorrect","off"),this.$.setAttribute("autoComplete","off"),this.ProxiedInput=(0,r.bindInputElement)(this.$),this.$.addEventListener("click",this.handleClick),this.$.addEventListener("dblclick",this.handleDBClick),this.$.addEventListener("keyup",this.handleKeyup),this.$.addEventListener("keydown",this.handleKeydown),this.$.addEventListener("focus",this.handleFocus),this.$.addEventListener("blur",this.handleBlur),this.$.addEventListener("compositionstart",this.handleCompositionstart),this.$.addEventListener("compositionend",this.handleCompositionend),this.$validate=document.createElement("div"),this.$validate.setAttribute("style","top: 100%;"),this.$addonAfter=document.createElement("div"),this.$addonAfter.setAttribute("class","kt-input-addon-after")}get destroyed(){return this._destroyed}get onChange(){return this.onChangeEmitter.event}get onCommit(){return this.onCommitEmitter.event}get onCancel(){return this.onCancelEmitter.event}get onFocus(){return this.onFocusEmitter.event}get onBlur(){return this.onBlurEmitter.event}get onDestroy(){return this.onDestroyEmitter.event}focus(){this.$.focus()}setSelectionRange(s,g){this.$.setSelectionRange(s,g)}addClassName(s){this.$.classList.add(s)}removeClassName(s){this.$.classList.remove(s)}addAddonAfter(s){var g,l;!this._hasAddonAfter&&!this._destroyed&&((l=(g=this.$.parentElement)===null||g===void 0?void 0:g.parentElement)===null||l===void 0||l.appendChild(this.$addonAfter),this._hasAddonAfter=!0);const h=document.createElement("div");h.setAttribute("class",s),this.$addonAfter.appendChild(h)}removeAddonAfter(){var s,g,l;this._hasAddonAfter&&((s=this.$addonAfter.firstChild)===null||s===void 0||s.remove(),(l=(g=this.$.parentElement)===null||g===void 0?void 0:g.parentElement)===null||l===void 0||l.removeChild(this.$addonAfter),this._hasAddonAfter=!1)}addValidateMessage(s){var g,l,h,u,d,E,f;!this._hasValidateElement&&!this._destroyed&&((h=(l=(g=this.$.parentElement)===null||g===void 0?void 0:g.parentElement)===null||l===void 0?void 0:l.parentElement)===null||h===void 0||h.appendChild(this.$validate),this._hasValidateElement=!0);let c="validate-message popup ";s&&s.type===p.ERROR?this._validateClassName=v.ERROR:s&&s.type===p.WARNING?this._validateClassName=v.WARNING:this._validateClassName=v.INFO,c+=this._validateClassName,this.$validate.classList.value=c;const y=(0,o.toMarkdownHtml)(s.message||"",{renderer:this.markdownRenderer});this.$validate.innerHTML=typeof y=="string"?y:"",(d=(u=this.$.parentElement)===null||u===void 0?void 0:u.parentElement)===null||d===void 0||d.classList.remove(v.INFO,v.ERROR,v.WARNING),(f=(E=this.$.parentElement)===null||E===void 0?void 0:E.parentElement)===null||f===void 0||f.classList.add(this._validateClassName)}removeValidateMessage(){var s,g,l,h,u;this._hasValidateElement&&((l=(g=(s=this.$.parentElement)===null||s===void 0?void 0:s.parentElement)===null||g===void 0?void 0:g.parentElement)===null||l===void 0||l.removeChild(this.$validate),this._hasValidateElement=!1,(u=(h=this.$.parentElement)===null||h===void 0?void 0:h.parentElement)===null||u===void 0||u.classList.remove(this._validateClassName))}destroy(){if(this._destroyed)return;const s=this.focusPrevActiveElement();this._destroyed=!0,this.$.removeEventListener("click",this.handleClick),this.$.removeEventListener("keyup",this.handleKeyup),this.$.removeEventListener("keydown",this.handleKeydown),this.$.removeEventListener("focus",this.handleFocus),this.$.removeEventListener("blur",this.handleBlur),this.removeValidateMessage(),this.removeAddonAfter(),this.$.disabled=!1,this.onDestroyEmitter.fire(this.$.value),this.disposables.dispose(),requestAnimationFrame(()=>{s?.focus()})}focusPrevActiveElement(){let s=this.$.parentElement;for(;s&&!(typeof s.attributes.tabindex<"u");)s=s?.parentElement;return s}}t.PromptHandle=m},58357:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenamePromptHandle=void 0;const n=e(65747);class r extends n.PromptHandle{constructor(a,p){super(),this.originalFileName=a,this.target=p,this.$.value=a,this.setSelectionRange(0,a.lastIndexOf("."))}get id(){return this.target.id}get depth(){return this.target.depth}}t.RenamePromptHandle=r},48103:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(65747),t),n.__exportStar(e(58357),t),n.__exportStar(e(65601),t)},29805:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tree=void 0;const n=e(70392),r=e(26353);class o{constructor(){this.onChangedEmitter=new n.Emitter,this.toDispose=new n.DisposableCollection,this.nodes={}}dispose(){var p;this.toDispose.dispose(),(p=this._root)===null||p===void 0||p.dispose()}get root(){return this._root}set root(p){var v;p!==this._root&&((v=this._root)===null||v===void 0||v.dispose(),this._root=p)}fireChanged(){this.onChangedEmitter.fire(void 0)}sortComparator(p,v){return p.constructor===v.constructor?p.name>v.name?1:p.name<v.name?-1:0:r.CompositeTreeNode.is(p)?-1:r.CompositeTreeNode.is(v)?1:0}}t.Tree=o},26353:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeTreeNode=t.TreeNode=t.BranchOperatorStatus=void 0,t.spliceArray=a;const n=e(70392),r=e(34054),{Path:o}=n.path;function a(_,s,g=0,l){const h=_.slice(0);return h.splice(s,g,...l||[]),h}var p;(function(_){_[_.EXPANDED=1]="EXPANDED",_[_.SHRINKED=2]="SHRINKED"})(p||(t.BranchOperatorStatus=p={}));class v{static is(s){return!!s&&"depth"in s&&"name"in s&&"path"in s&&"id"in s}static getTreeNodeById(s){return v.idToTreeNode.get(s)}static getTreeNodeByPath(s){return v.pathToTreeNode.get(s)}static setTreeNode(s,g,l){v.idToTreeNode.set(s,l),v.pathToTreeNode.set(g,l)}static removeTreeNode(s,g){v.idToTreeNode.delete(s),v.pathToTreeNode.delete(g)}static getIdByPath(s){return v.pathToId.get(s)}static setIdByPath(s,g){return v.pathToId.set(s,g)}static getGlobalTreeState(s){let g=v.pathToGlobalTreeState.get(s);return g||(g={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),g}static setGlobalTreeState(s,g){let l=v.pathToGlobalTreeState.get(s);return l||(l={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),l={...l,...g},v.pathToGlobalTreeState.set(s,l),l}constructor(s,g,l,h){this._uid=v.nextId(),this._parent=g,this._tree=s,this._disposed=!1,this._visible=!0,this._metadata={...h||{}},this._depth=g?g.depth+1:0,l?this._watcher=l:g&&(this._watcher=g.watcher)}get disposed(){return this._disposed}get depth(){return this._depth}get parent(){return this._parent}set parent(s){this._parent=s,this._path=""}get type(){return r.TreeNodeType.TreeNode}get id(){return this._uid}set id(s){this._uid=s}get displayName(){return this.name}get name(){return this.parent?this.getMetadata("name")||String(this.id):`root_${this.id}`}set name(s){this.addMetadata("name",s),this._path=""}get path(){return this._path||(this.parent?this._path=this.name.startsWith(o.separator)?`${this.parent.path}${this.name}`:`${this.parent.path}${o.separator}${this.name}`:this._path=this.name.startsWith(o.separator)?this.name:`${o.separator}${this.name}`),this._path}get checkboxInfo(){return{checked:!1,tooltip:"",accessibilityInformation:this.accessibilityInformation}}get accessibilityInformation(){return{label:this.name,role:"treeitem"}}getMetadata(s){return s==="name"&&!this._metadata[s]&&(this._metadata[s]=String(v.nextId())),this._metadata[s]}addMetadata(s,g){if(!(s in this._metadata))this._metadata[s]=g,this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Added,key:s,prevValue:void 0,value:g});else{const l=this._metadata[s];this._metadata[s]=g,this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Updated,key:s,prevValue:l,value:g})}}removeMetadata(s){if(s in this._metadata){const g=this._metadata[s];delete this._metadata[s],this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Removed,key:s,prevValue:g,value:void 0})}}mv(s,g=this.name){const l=this._parent;if(s===null||!m.is(s)){this._parent=void 0,this.dispose();return}const h=l!==s,u=this.path;this._depth=s.depth+1,(h||g!==this.name)&&(this.name=g,h&&this._watcher.notifyWillChangeParent(this,l,s),this.parent&&(this.parent.unlinkItem(this,!0),this.parent=s,this.parent.insertItem(this)),h&&this._watcher.notifyDidChangeParent(this,l,s)),this.path!==u&&this._watcher.notifyDidChangePath(this)}get visible(){return this._visible}setVisible(s){return this._visible=s,this}dispose(){this._disposed||(v.removeTreeNode(this.id,this.path),this._disposed=!0,this._watcher.notifyDidDispose(this))}}t.TreeNode=v,v.nextId=(()=>{let _=0;return()=>_++})(),v.idToTreeNode=new Map,v.pathToTreeNode=new Map,v.pathToId=new Map,v.pathToGlobalTreeState=new Map;class m extends v{static defaultSortComparator(s,g){return s.constructor===g.constructor?s.name>g.name?1:s.name<g.name?-1:0:m.is(s)?-1:m.is(g)?1:0}static is(s){return!!s&&"children"in s}static isRoot(s){return m.is(s)&&!s.parent}generatorWatcher(){const s=new n.Emitter,g=s.event,l=new n.DisposableCollection,h=d=>{this.watchEvents.delete(d)};return{notifyWillProcessWatchEvent:(d,E)=>{s.fire({type:r.TreeNodeEvent.WillProcessWatchEvent,args:[d,E]})},notifyWillChangeParent:(d,E,f)=>{s.fire({type:r.TreeNodeEvent.WillChangeParent,args:[d,E,f]})},notifyDidChangeParent:(d,E,f)=>{s.fire({type:r.TreeNodeEvent.DidChangeParent,args:[d,E,f]})},notifyDidDispose:d=>{s.fire({type:r.TreeNodeEvent.DidDispose,args:[d]})},notifyDidProcessWatchEvent:(d,E)=>{s.fire({type:r.TreeNodeEvent.DidProcessWatchEvent,args:[d,E]})},notifyDidChangePath:d=>{s.fire({type:r.TreeNodeEvent.DidChangePath,args:[d]})},notifyWillChangeExpansionState:(d,E)=>{const f=this.isItemVisibleAtSurface(d);s.fire({type:r.TreeNodeEvent.WillChangeExpansionState,args:[d,E,f]})},notifyDidChangeExpansionState:(d,E)=>{const f=this.isItemVisibleAtSurface(d);s.fire({type:r.TreeNodeEvent.DidChangeExpansionState,args:[d,E,f]})},notifyDidChangeMetadata:(d,E)=>{s.fire({type:r.TreeNodeEvent.DidChangeMetadata,args:[d,E]})},notifyDidUpdateBranch:()=>{s.fire({type:r.TreeNodeEvent.BranchDidUpdate,args:[]})},notifyWillResolveChildren:(d,E)=>{s.fire({type:r.TreeNodeEvent.WillResolveChildren,args:[d,E]})},notifyDidResolveChildren:(d,E)=>{s.fire({type:r.TreeNodeEvent.DidResolveChildren,args:[d,E]})},on:(d,E)=>{const f=g(c=>{c.type===d&&E(...c.args)});return l.push(f),f},onWatchEvent:(d,E)=>{const f=h;return this.watchEvents.set(d,{terminator:f,callback:E}),f},dispose:l}}constructor(s,g,l,h){super(s,g,l,h),this._children=null,this._lock=!1,this.refreshThrottler=new n.ThrottledDelayer(m.REFRESH_DELAY),this.toRefreshPathQueue=new Set,this.handleWatchEvent=async u=>{switch(this.watcher.notifyWillProcessWatchEvent(this,u),u.type){case r.WatchEvent.Moved:{const{oldPath:d,newPath:E}=u;if(typeof d!="string")throw new TypeError("Expected oldPath to be a string");if(typeof E!="string")throw new TypeError("Expected newPath to be a string");if(o.isRelative(d))throw new TypeError("oldPath must be absolute");if(o.isRelative(E))throw new TypeError("newPath must be absolute");this.transferItem(d,E);break}case r.WatchEvent.Added:{const{node:d}=u;if(!v.is(d))throw new TypeError("Expected node to be a TreeNode");this.insertItem(d);break}case r.WatchEvent.Removed:{const{path:d}=u,E=new o(d),f=E.dir.toString(),c=E.base.toString();if(f===this.path&&this.children){const y=this.children.find(b=>b.name===c);y&&this.unlinkItem(y)}break}default:this.isItemVisibleAtRootSurface(this)?await this.refresh():(this.isExpanded=!1,this._children=null);break}this.watcher.notifyDidProcessWatchEvent(this,u)},this.isExpanded=!g,this._branchSize=0,g?this._watcher=g.watcher:(this.watchEvents=new Map,this._watcher=this.generatorWatcher(),this._root=this,v.setTreeNode(this.id,this.path,this))}set name(s){const g=this.path;!m.isRoot(this)&&typeof this.watchTerminator=="function"?(this.watchTerminator(g),this.addMetadata("name",s),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent)):this.addMetadata("name",s),this._path=""}get name(){return this.parent?this.getMetadata("name"):`root_${this.id}`}get watcher(){return this._watcher}get type(){return r.TreeNodeType.CompositeTreeNode}get children(){return this._children}get expanded(){return this.isExpanded}get branchSize(){return this._branchSize}get flattenedBranch(){return this._flattenedBranch}get lock(){return this._lock}get root(){return(0,n.isUndefined)(this._root)&&(this._root=this.getRoot()||null),this._root}getRoot(){let s=this.parent;for(;s&&s.parent;)s=s.parent;return s}async ensureLoaded(s){if(!this._children)return await this.hardReloadChildren(s)}async setExpanded(s=!0,g=!1,l=!0,h){if(!this.disposed&&!m.isRoot(this)&&!this.isExpanded){if(l){const u=v.getGlobalTreeState(this.path);u.loadPathCancelToken.cancel(),u.refreshCancelToken.cancel(),v.setGlobalTreeState(this.path,{isExpanding:!0})}if(this.isExpanded=!0,this._children===null&&(this._watcher.notifyWillResolveChildren(this,this.isExpanded),await this.hardReloadChildren(h),this._watcher.notifyDidResolveChildren(this,this.isExpanded),!this.isExpanded||h?.isCancellationRequested)){l&&v.setGlobalTreeState(this.path,{isExpanding:!1});return}if(s&&this.parent&&m.is(this.parent)&&await this.parent.setExpanded(!0,!g,!1,h),h?.isCancellationRequested){l&&v.setGlobalTreeState(this.path,{isExpanding:!1});return}this.isExpanded&&(this._watcher.notifyWillChangeExpansionState(this,!0),this.expandBranch(this,g),this._watcher.notifyDidChangeExpansionState(this,!0)),l&&(v.setGlobalTreeState(this.path,{isExpanding:!1}),v.setTreeNode(this.id,this.path,this))}}getAllExpandedNodePath(){var s,g;const l=[];let h=0;m.isRoot(this)||(h=((s=this.root)===null||s===void 0?void 0:s.getIndexAtTreeNodeId(this.id))+1);const u=h+this.branchSize;for(let d=h;d<u;d++){const E=(g=this.root)===null||g===void 0?void 0:g.getTreeNodeAtIndex(d);m.is(E)&&E.expanded&&l.push(E.path)}return l}getAllCollapsedNodePath(){let s=[];if(this.children){for(let g=0;g<this.children.length;g++){const l=this.children[g];m.is(l)&&(l.isExpanded?s=s.concat(l.getAllCollapsedNodePath()):s.push(l.path))}return s}else return s}async resolveChildrens(s){var g,l,h;let u=this.children,d=[];try{u=await this._tree.resolveChildren(this)||[]}catch{u=[]}if(s?.isCancellationRequested)return!1;const E=new Array(u.length);this._children=Array(u.length);for(let c=0;c<u.length;c++){const y=u[c];y.id=v.getIdByPath(y.path)||y.id,this._children[c]=y,v.setIdByPath(y.path,y.id)}(g=this._children)===null||g===void 0||g.sort(this._tree.sortComparator||m.defaultSortComparator);for(let c=0;c<u.length;c++)E[c]=this._children[c].id;const f=[];for(let c=0,y=((l=this.children)===null||l===void 0?void 0:l.length)||0;c<y;c++){const b=(h=this.children)===null||h===void 0?void 0:h[c];if(m.is(b)&&b.expanded){const A=await b.resolveChildrens(s);if(A&&(d=d.concat(A)),s?.isCancellationRequested)return;f.push(b)}}this._branchSize=E.length,this.setFlattenedBranch(E);for(let c=0;c<f.length;c++){const y=f[c];y.expandBranch(y,!0)}return d.concat(f.map(c=>c.path.toString()))}updateTreeNodeCache(s){var g;if(v.setTreeNode(s.id,s.path,s),m.is(s)&&s.expanded&&(!((g=s.children)===null||g===void 0)&&g.length))for(let l=0;l<s.children.length;l++){const h=s.children[l];this.updateTreeNodeCache(h)}}async refreshTreeNodeByPaths(s=this.getAllExpandedNodePath(),g,l){if(!m.is(this))return;let h;const u=this.children;let d=this.children||[];if(this.expanded){if(this===l){try{d=await this._tree.resolveChildren(this)||[]}catch{d=[]}if(g?.isCancellationRequested)return;if(!this.expanded){if(this.children&&this.children&&this.parent){for(let E=0;E<this.children.length;E++)this.children[E].dispose();this._children=null}return}}for(;h=s.shift();){if(!(h.indexOf(`${this.path}${o.separator}`)>-1)){h===this.path&&(h=void 0);break}const f=d?.find(c=>c.path===h);if(f){if(m.is(f)&&!f.expanded){f.isExpanded=!0;const c=await f.resolveChildrens(g);if(g?.isCancellationRequested||(c&&(s=s.filter(y=>!c.find(b=>b.includes(y)))),s.length>0&&!g?.isCancellationRequested&&(s=await f.refreshTreeNodeByPaths([...s],g,l)||[],g?.isCancellationRequested)))return}}else{if(!d||d.length===0)break;for(let c=0;c<d.length;c++){const y=d[c];if(h.indexOf(`${y.path}${o.separator}`)===0&&m.is(y)){if(!m.is(y))continue;y.isExpanded=!0;const A=await y.resolveChildrens(g);if(g?.isCancellationRequested||(A&&(s=s.filter(S=>!A.find(D=>D===S))),y.path!==h&&!s.includes(y.path)&&s.unshift(h),s.length>0&&(s=await y.refreshTreeNodeByPaths([...s],g,l)||[],g?.isCancellationRequested)))return;break}}}}if(h){if(s.unshift(h),this===l){if(u){this.shrinkBranch(this,!0);for(let c=0;c<u.length;c++){const y=u[c];y?.dispose()}}const E=[],f=new Array(d.length);this._children=Array(d.length);for(let c=0;c<d.length;c++){const y=d[c];y.id=v.getIdByPath(y.path)||y.id,this._children[c]=y,v.setIdByPath(y.path,y.id),m.is(y)&&y.expanded&&E.push(y)}this._children.sort(this._tree.sortComparator||m.defaultSortComparator);for(let c=0;c<d.length;c++)f[c]=this._children[c].id;this._branchSize=f.length,this.setFlattenedBranch(f,!0),this.watcher.notifyDidUpdateBranch()}return this.parent!==l&&this.expandBranch(this,!0),s}else if(m.isRoot(this)){if(this.children){this.shrinkBranch(this,!0);for(let y=0;y<this.children.length;y++){const b=this.children[y];b?.dispose()}}const E=[],f=[],c=new Array(d.length);this._children=Array(d.length);for(let y=0;y<d.length;y++){const b=d[y];if(b.id=v.getIdByPath(b.path)||b.id,this._children[y]=b,v.setIdByPath(b.path,b.id),m.is(b)&&b.expanded){if(!b.children&&(await b.resolveChildrens(g),g?.isCancellationRequested))return;E.push(b)}else f.push(b)}this._children.sort(this._tree.sortComparator||m.defaultSortComparator);for(let y=0;y<d.length;y++)c[y]=this._children[y].id;this._branchSize=c.length,this.setFlattenedBranch(c,!0);for(let y=0;y<E.length;y++){const b=E[y];b.expandBranch(b,!0),this.updateTreeNodeCache(b)}for(let y=0;y<f.length;y++){const b=f[y];this.updateTreeNodeCache(b)}typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),this.watcher.notifyDidUpdateBranch()}else{const E=[];if(this===l){if(this.children&&this.shrinkBranch(this,!0),this.children)for(let c=0,y=this.children.length;c<y;c++)this.children[c].dispose();const f=new Array(d.length);this._children=Array(d.length);for(let c=0,y=d.length;c<y;c++){const b=d[c];b.id=v.getIdByPath(b.path)||b.id,this._children[c]=b,v.setIdByPath(b.path,b.id),m.is(b)&&b.expanded&&E.push(b),this.updateTreeNodeCache(b)}this._children.sort(this._tree.sortComparator||m.defaultSortComparator);for(let c=0;c<d.length;c++)f[c]=this._children[c].id;this._branchSize=f.length,this.setFlattenedBranch(f);for(let c=0;c<E.length;c++){const y=E[c];y.expandBranch(y,!0)}}else for(let f=0;f<d.length;f++){const c=d[f];c.expanded&&E.push(c)}for(let f=0;f<E.length;f++){const c=E[f];c.expandBranch(c,!0)}typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),this===l&&this.expandBranch(this)}}else{if(this.children&&this.children&&this.parent){for(let E=0,f=this.children.length;E<f;E++)this.children[E].dispose();this._children=null}return}}async expandedAll(s=this.getAllCollapsedNodePath()){if(!m.isRoot(this))return;s=s.sort((l,h)=>o.pathDepth(l)-o.pathDepth(h));let g;for(;s.length>0;){g=s.pop();const l=v.getTreeNodeByPath(g);m.is(l)&&await l.setExpanded(!1,!0)}this.watcher.notifyDidUpdateBranch()}async collapsedAll(s=this.getAllExpandedNodePath()){if(!m.isRoot(this))return;s=s.sort((l,h)=>o.pathDepth(l)-o.pathDepth(h));let g;for(;s.length>0;){g=s.pop();const l=v.getTreeNodeByPath(g);m.is(l)&&l.setCollapsed(!0)}this.watcher.notifyDidUpdateBranch()}setCollapsed(s=!1){if(m.isRoot(this)||this.disposed||!this.isExpanded)return;const g=v.getGlobalTreeState(this.path);g.isExpanding||(g.loadPathCancelToken.cancel(),g.refreshCancelToken.cancel(),this._watcher.notifyWillChangeExpansionState(this,!1),this._children&&this.parent&&this.shrinkBranch(this,s),this.isExpanded=!1,v.setTreeNode(this.id,this.path,this),this._watcher.notifyDidChangeExpansionState(this,!1))}mv(s,g=this.name){const l=this.path;if(super.mv(s,g),typeof this.watchTerminator=="function"&&(this.watchTerminator(l),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent)),this.children)for(let h=0;h<this.children.length;h++){const u=this.children[h];u.mv(u.parent,u.name)}}insertItem(s){if(s.parent!==this){s.mv(this,s.name);return}if(this.children){for(let f=0;f<this.children.length;f++)if(this.children[f].path===s.path){this.children[f]=s;return}}const g=1+(s instanceof m&&s.expanded?s._branchSize:0);this._children&&(this._children.push(s),this._children.sort(this._tree.sortComparator||m.defaultSortComparator)),this._branchSize+=g;let l=this;for(;!l._flattenedBranch;)l.parent&&(l=l.parent,l._branchSize+=g);if(!this._children)return;let h=this._children.indexOf(s),u;const d=this._children[h-1];d?h=l._flattenedBranch.indexOf(d.id)+(d instanceof m&&d.expanded?d._branchSize:0):h=l._flattenedBranch.indexOf(this.id),h===-1&&this._branchSize===1&&(h=0),u=h+1,l._flattenedBranch.length===0&&(u=0);let E=[s.id];return s instanceof m&&s.expanded&&s._flattenedBranch&&(E=E.concat(s._flattenedBranch),s.setFlattenedBranch(null)),l.setFlattenedBranch(a(l._flattenedBranch,u,0,E)),v.setTreeNode(s.id,s.path,s),s}unlinkItem(s,g){var l;if(!this._children)return;const h=this._children.indexOf(s);if(h===-1||!this.isItemVisibleAtRootSurface(this))return;(l=this._children)===null||l===void 0||l.splice(h,1);const u=1+(s instanceof m&&s.expanded?s._branchSize:0);this._branchSize-=u;let d=this;for(;!d._flattenedBranch;)d.parent&&(d=d.parent,d._branchSize-=u);const E=d._flattenedBranch.indexOf(s.id);E!==-1&&(s instanceof m&&s.expanded&&s.setFlattenedBranch(d._flattenedBranch.slice(E+1,E+u)),d.setFlattenedBranch(a(d._flattenedBranch,E,u)),!g&&s.parent===this&&s.mv(null))}transferItem(s,g){var l;const h=new o(s),u=h.dir.toString();if(u!==this.path)return;const d=h.base.toString(),E=(l=this._children)===null||l===void 0?void 0:l.find(b=>b.name===d);if(!E)return;const f=new o(g),c=f.dir.toString(),y=c===u?this:v.getTreeNodeByPath(c);if(!m.is(y)){this.unlinkItem(E);return}return E.mv(y,f.base.toString()),E}dispose(){if(this.watchEvents){const s=this.watchEvents.get(this.path);s&&s.terminator(),this.watchEvents.clear()}this._children&&(this.isExpanded=!1,this._children.forEach(s=>{s.dispose()}),this._children=null,this._flattenedBranch=null),super.dispose()}setFlattenedBranch(s,g){this._flattenedBranch=s,m.isRoot(this)&&!g&&this.watcher.notifyDidUpdateBranch()}expandBranch(s,g){if(this!==s&&s._flattenedBranch&&(this._branchSize+=s._branchSize),this!==s&&this._flattenedBranch){const l=this._flattenedBranch.indexOf(s.id)+1;if(l===0)return;this.setFlattenedBranch(a(this._flattenedBranch,l,0,s._flattenedBranch),g),s.setFlattenedBranch(null,g)}else this.parent&&this.parent.expandBranch(s,g)}shrinkBranch(s,g){if(this!==s&&(this._branchSize-=s._branchSize),this!==s&&this._flattenedBranch){const l=this._flattenedBranch.indexOf(s.id)+1;if(l===0)return;s.setFlattenedBranch(this._flattenedBranch.slice(l,l+s._branchSize),g),this.setFlattenedBranch(a(this._flattenedBranch,l,s._flattenedBranch?s._flattenedBranch.length:0),g)}else this.parent&&this.parent.shrinkBranch(s,g)}async hardReloadChildren(s){let g;const l=this.path;try{g=await this._tree.resolveChildren(this)||[]}catch{g=[]}if(!this.expanded||s?.isCancellationRequested)return!1;this.path!==l&&v.setGlobalTreeState(l,{isExpanding:!1,isLoadingPath:!1,isRefreshing:!1});const h=[],u=new Array(g.length),d=new Array(g.length);for(let E=0;E<g.length;E++){const f=g[E];if(f.id=v.getIdByPath(f.path)||f.id,d[E]=f,v.setIdByPath(f.path,f.id),m.is(f)&&f.expanded){if(f.children||await f.resolveChildrens(s),s?.isCancellationRequested)return!1;h.push(f)}}d.sort(this._tree.sortComparator||m.defaultSortComparator);for(let E=0;E<g.length;E++)u[E]=d[E].id;if(this.children&&this.shrinkBranch(this),this.children)for(let E=0;E<this.children.length;E++){const f=this.children[E];f?.dispose()}for(let E=0;E<d.length;E++)this.updateTreeNodeCache(d[E]);this._children=d,this._branchSize=u.length,this.setFlattenedBranch(u);for(let E=0;E<h.length;E++){const f=h[E];f.expandBranch(f,!0)}return typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),!0}moveNode(s,g){if(typeof s!="string")throw new TypeError("Expected oldPath to be a string");if(typeof g!="string")throw new TypeError("Expected newPath to be a string");if(o.isRelative(s))throw new TypeError("oldPath must be absolute");if(o.isRelative(g))throw new TypeError("newPath must be absolute");return this.transferItem(s,g)}addNode(s){if(!v.is(s))throw new TypeError("Expected node to be a TreeNode");return this.insertItem(s)}removeNode(s){const g=new o(s),l=g.dir.toString(),h=g.base.toString();if(l===this.path&&this.children){const u=this.children.find(d=>d.name===h);u&&this.unlinkItem(u)}}async refresh(s,g){if(!m.isRoot(this))return await this.root.refresh(s,this);const l=v.getGlobalTreeState(this.path);if(l.isLoadingPath||l.isExpanding)return;let h;if(s&&!s.token.isCancellationRequested)v.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:s}),h=s.token;else if(l.refreshCancelToken.token.isCancellationRequested){const u=new n.CancellationTokenSource;v.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:u}),h=u.token}else h=l.refreshCancelToken.token;this.toRefreshPathQueue.add((g||this).path),await this.refreshThrottler.trigger(()=>this.doRefresh(h)),v.setGlobalTreeState(this.path,{isRefreshing:!1})}async doRefresh(s){const g=this.getRefreshNode()||this;if(!m.is(g))return;const l=g.getAllExpandedNodePath();await g.refreshTreeNodeByPaths(l,s,g)}getRefreshNode(){let s=Array.from(this.toRefreshPathQueue);if(this.toRefreshPathQueue.clear(),!s.length)return this.root;if(s=s.sort((h,u)=>{const d=o.pathDepth(h),E=o.pathDepth(u);return d-E}),s.length===1||o.pathDepth(s[0])===1)return v.getTreeNodeByPath(s[0]);const g=s.map(h=>new o(h));let l=g[0];for(let h=1,u=g.length;h<u;h++)if(!l.isEqualOrParent(g[h]))for(;!l.isRoot&&(l=l.dir,!(!l||l.isEqualOrParent(g[h]))););return l?v.getTreeNodeByPath(l.toString()):this.root}isItemVisibleAtRootSurface(s){let g=s;for(;g.parent;)g=g.parent;return g.isItemVisibleAtSurface(s)}isItemVisibleAtSurface(s){return s===this?!0:!!this._flattenedBranch&&this._flattenedBranch.indexOf(s.id)>-1}transformToRelativePath(s){const{splitPath:g}=o,l=g(s);return l.shift(),l}async loadTreeNodeByPath(s,g=!1){if(!m.isRoot(this))return;const l=v.getGlobalTreeState(this.path);if(l.isExpanding)return;l.refreshCancelToken.cancel(),l.loadPathCancelToken.cancel();const h=new n.CancellationTokenSource;v.setGlobalTreeState(this.path,{isLoadingPath:!0,loadPathCancelToken:h});const u=h.token,d=[],{splitPath:E,isRelative:f}=o,c=f(s)?E(s):this.transformToRelativePath(s);if(c.length===0)return v.setGlobalTreeState(this.path,{isLoadingPath:!1}),this;if(this.children||await this.ensureLoaded(u),u.isCancellationRequested){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}let y=this._children,b,A="",S;for(;y&&(S=c.shift());){let D=y.find(I=>I.name.indexOf(S)===0);if(D){if(m.is(D)){if(D._watcher.notifyWillChangeExpansionState(D,!0),D.isExpanded=!0,!D.children&&(await D.resolveChildrens(u),u.isCancellationRequested)){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}d.push(D),D._watcher.notifyDidChangeExpansionState(D,!0)}if(c.length===0){b=D;break}}if(!D&&b){const I=E(b.name).slice(1);if(I[0]===S){for(I.shift();I.length>0&&I[0]===c[0];)I.shift(),c.shift();S=c.shift(),D=y.find(w=>w.name.indexOf(S)===0)}}if(!D||!m.is(D)&&c.length>0)break;if(m.is(D)){if(D.name.indexOf(o.separator)>0){const w=E(D.name).slice(1);for(;w.length>0&&w[0]===c[0];)w.shift(),c.shift()}if(!D._children&&(A=D.path,m.is(D))){if(D.isExpanded=!0,!D.children&&(await D.resolveChildrens(u),u.isCancellationRequested)){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}d.push(D)}if(D&&c.length===0){b=D;break}else{if(A&&A!==D.path){const w=E(A),T=E(D.path);T.length>w.length&&c.splice(0,T.length-w.length)}y=D._children,b=D}}}if(b){let D;if(b.disposed){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}for(;D=d.pop();)D.expandBranch(D,!0),d.length===0&&this.updateTreeNodeCache(D);return g||this.watcher.notifyDidUpdateBranch(),v.setGlobalTreeState(this.path,{isLoadingPath:!1}),b}v.setGlobalTreeState(this.path,{isLoadingPath:!1})}getIndexAtTreeNodeId(s){return this._flattenedBranch?this._flattenedBranch.indexOf(s):-1}getIndexAtTreeNode(s){return this._flattenedBranch?this._flattenedBranch.indexOf(s.id):-1}getTreeNodeAtIndex(s){var g;const l=(g=this._flattenedBranch)===null||g===void 0?void 0:g[s];if(l)return v.getTreeNodeById(l)}getTreeNodeById(s){return v.getTreeNodeById(s)}getTreeNodeByPath(s){return v.getTreeNodeByPath(s)}}t.CompositeTreeNode=m,m.REFRESH_DELAY=200},58781:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeDecoration=t.ChangeReason=t.CompositeDecorationType=t.ClasslistComposite=void 0;const n=e(70392),r=e(96336);class o{constructor(_,s){this.addChangeListener=_,this.removeChangeListener=s}}t.ClasslistComposite=o;var a;(function(m){m[m.Applicable=1]="Applicable",m[m.Inheritable=2]="Inheritable"})(a||(t.CompositeDecorationType=a={}));var p;(function(m){m[m.UnTargetDecoration=1]="UnTargetDecoration",m[m.TargetDecoration=2]="TargetDecoration"})(p||(t.ChangeReason=p={}));class v{constructor(_,s,g){this.handleDecorationDidAddClassname=l=>{const{classname:h}=l;!this.selfOwned||!h||(this.compositeCssClasslist.classlist.push(h),this.notifyClasslistChange())},this.handleDecorationDidRemoveClassname=l=>{const{classname:h}=l;if(!this.selfOwned||!h)return;const u=this.compositeCssClasslist.classlist.indexOf(h);u>-1&&(this.compositeCssClasslist.classlist.splice(u,1),this.notifyClasslistChange())},this.mergeDecorationClasslist=l=>{const{decoration:h}=l;this.selfOwned&&(this.compositeCssClasslist.classlist.push(...h.cssClassList),this.notifyClasslistChange())},this.handleDecorationDisable=l=>{const{decoration:h}=l;this.removeDecorationClasslist(h)},this.target=_,this.type=s,this.linkedComposites=new Set,this.classlistChangeCallbacks=new Set,this.compositeCssClasslist=new o(this.classlistChangeCallbacks.add.bind(this.classlistChangeCallbacks),this.classlistChangeCallbacks.delete.bind(this.classlistChangeCallbacks)),g?(this.selfOwned=!1,this.parent=g,this.renderedDecorations=g.renderedDecorations,this.compositeCssClasslist.classlist=g.compositeCssClasslist.classlist,g.linkedComposites.add(this)):(this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set,this.compositeCssClasslist.classlist=[],this.selfOwned=!0)}changeParent(_){if(_){if(!this.selfOwned)return this.parentOwn(_);for(const[s]of this.renderedDecorations)this.recursiveRefresh(this,!1,p.UnTargetDecoration,s,!1);this.parent!==_&&(this.parent.linkedComposites.delete(this),this.parent=_,_.linkedComposites.add(this));for(const[s]of _.renderedDecorations)this.recursiveRefresh(this,!1,p.TargetDecoration,s,!1)}}add(_){const s=_.appliedTargets.get(this.target),g=s&&(s===r.TargetMatchMode.Self||s===r.TargetMatchMode.SelfAndChildren),l=s&&(s===r.TargetMatchMode.Children||s===r.TargetMatchMode.SelfAndChildren);if(!(this.type===a.Applicable&&!g)&&!(this.type===a.Inheritable&&!l)){if(!this.selfOwned){this.selfOwn(p.TargetDecoration,_),this.targetedDecorations.add(_);return}this.targetedDecorations.has(_)||(this.targetedDecorations.add(_),this.recursiveRefresh(this,!1,p.TargetDecoration,_))}}remove(_){if(this.selfOwned&&this.targetedDecorations.delete(_)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn(void 0,p.UnTargetDecoration,_);this.recursiveRefresh(this,!1,p.UnTargetDecoration,_)}}negate(_){const s=_.negatedTargets.get(this.target),g=s&&(s===r.TargetMatchMode.Self||s===r.TargetMatchMode.SelfAndChildren),l=s&&(s===r.TargetMatchMode.Children||s===r.TargetMatchMode.SelfAndChildren);if(!(this.type===a.Applicable&&!g)&&!(this.type===a.Inheritable&&!l)){if(!this.selfOwned){this.selfOwn(p.UnTargetDecoration,_),this.negatedDecorations.add(_);return}this.negatedDecorations.has(_)||(this.negatedDecorations.add(_),this.renderedDecorations.has(_)&&this.removeDecorationClasslist(_))}}unNegate(_){if(this.selfOwned&&this.negatedDecorations.delete(_)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn();!this.renderedDecorations.has(_)&&(this.parent.renderedDecorations.has(_)||_.appliedTargets.has(this.target))&&this.recursiveRefresh(this,!1,p.TargetDecoration,_)}}selfOwn(_,s){if(this.selfOwned)throw new Error("CompositeDecoration is already self owned");const g=this.parent;this.selfOwned=!0,this.compositeCssClasslist.classlist=[],this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set;for(const[l]of g.renderedDecorations)l!==s&&this.processCompositeAlteration(p.TargetDecoration,l);_===p.UnTargetDecoration&&this.parent.renderedDecorations.has(s)&&!this.renderedDecorations.has(s)&&this.notifyClasslistChange(!1),this.recursiveRefresh(this,!0,_,s)}parentOwn(_,s,g){this.selfOwned=!1,this.targetedDecorations&&this.targetedDecorations.clear(),this.negatedDecorations&&this.negatedDecorations.clear(),_&&this.parent!==_&&(this.parent&&this.parent.linkedComposites.delete(this),_.linkedComposites.add(this),this.parent=_),this.recursiveRefresh(this,!0,s,g)}processCompositeAlteration(_,s){if(!this.selfOwned)throw new Error("CompositeDecoration is not self owned");if(_===p.UnTargetDecoration){const g=this.renderedDecorations.get(s);if(g){const l=s.appliedTargets.get(this.target),h=l&&(l===r.TargetMatchMode.Self||l===r.TargetMatchMode.SelfAndChildren),u=l&&(l===r.TargetMatchMode.Children||l===r.TargetMatchMode.SelfAndChildren);return h&&this.type===a.Applicable||u&&this.type===a.Inheritable?!1:(this.removeDecorationClasslist(s,!1),g&&g.dispose(),this.renderedDecorations.delete(s))}return!1}if(_===p.TargetDecoration){const g=s.negatedTargets.get(this.target),l=g&&(g===r.TargetMatchMode.Self||g===r.TargetMatchMode.SelfAndChildren),h=g&&(g===r.TargetMatchMode.Children||g===r.TargetMatchMode.SelfAndChildren);if(l&&this.type===a.Applicable||h&&this.type===a.Inheritable)return!1;if(!this.renderedDecorations.has(s)){const u=new n.DisposableCollection;return u.push(s.onDidAddCSSClassname(this.handleDecorationDidAddClassname)),u.push(s.onDidRemoveCSSClassname(this.handleDecorationDidRemoveClassname)),u.push(s.onDidDisableDecoration(this.handleDecorationDisable)),u.push(s.onDidEnableDecoration(this.mergeDecorationClasslist)),this.renderedDecorations.set(s,u),s.disabled?!1:(this.compositeCssClasslist.classlist.push(...s.cssClassList),!0)}}return!1}recursiveRefresh(_,s,g,l,h=!0){if(!this.selfOwned&&s&&(this.renderedDecorations=this.parent.renderedDecorations,this.compositeCssClasslist.classlist=this.parent.compositeCssClasslist.classlist),this.selfOwned&&s&&_!==this){for(const[u]of this.renderedDecorations)this.processCompositeAlteration(p.UnTargetDecoration,u);for(const[u]of this.parent.renderedDecorations)this.processCompositeAlteration(p.TargetDecoration,u);h&&this.notifyClasslistChange(!1)}else this.selfOwned&&g===p.UnTargetDecoration&&l&&this.renderedDecorations.has(l)?(this.processCompositeAlteration(g,l),h&&this.notifyClasslistChange(!1)):this.selfOwned&&g===p.TargetDecoration&&l&&this.processCompositeAlteration(g,l)&&h?this.notifyClasslistChange(!1):!this.selfOwned&&h&&this.notifyClasslistChange(!1);for(const u of this.linkedComposites)u.recursiveRefresh(_,s,g,l,h)}removeDecorationClasslist(_,s=!0){if(this.selfOwned){for(const g of _.cssClassList){const l=this.compositeCssClasslist.classlist.indexOf(g);l>-1&&this.compositeCssClasslist.classlist.splice(l,1)}s&&this.notifyClasslistChange()}}notifyClasslistChange(_=!0){for(const s of[...this.classlistChangeCallbacks])s();if(_)for(const s of this.linkedComposites)s.selfOwned||s.notifyClasslistChange()}}t.CompositeDecoration=v},96336:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Decoration=t.TargetMatchMode=void 0;const n=e(70392),r=e(26353);var o;(function(p){p[p.None=1]="None",p[p.Self=2]="Self",p[p.Children=3]="Children",p[p.SelfAndChildren=4]="SelfAndChildren"})(o||(t.TargetMatchMode=o={}));class a{constructor(...v){if(this._appliedTargets=new Map,this._negatedTargets=new Map,this._disabled=!1,this.appliedTargetsDisposables=new WeakMap,this.negatedTargetsDisposables=new WeakMap,this.onDidAddCSSClassnameEmitter=new n.Emitter,this.onDidRemoveCSSClassnameEmitter=new n.Emitter,this.onDidDisableDecorationEmitter=new n.Emitter,this.onDidEnableDecorationEmitter=new n.Emitter,this.onDidAddTargetEmitter=new n.Emitter,this.onDidRemoveTargetEmitter=new n.Emitter,this.onDidNegateTargetEmitter=new n.Emitter,this.onDidUnNegateTargetEmitter=new n.Emitter,Array.isArray(v))if(v.every(m=>typeof m=="string"))this._cssClassList=new Set(v);else throw new TypeError("classlist must be of type `Array<string>`");else this._cssClassList=new Set}get disabled(){return this._disabled}set disabled(v){this._disabled=v,v?this.onDidDisableDecorationEmitter.fire({decoration:this}):this.onDidEnableDecorationEmitter.fire({decoration:this})}get appliedTargets(){return this._appliedTargets}get negatedTargets(){return this._negatedTargets}get cssClassList(){return this._cssClassList}get onDidAddCSSClassname(){return this.onDidAddCSSClassnameEmitter.event}get onDidRemoveCSSClassname(){return this.onDidRemoveCSSClassnameEmitter.event}get onDidDisableDecoration(){return this.onDidDisableDecorationEmitter.event}get onDidEnableDecoration(){return this.onDidEnableDecorationEmitter.event}get onDidAddTarget(){return this.onDidAddTargetEmitter.event}get onDidRemoveTarget(){return this.onDidRemoveTargetEmitter.event}get onDidNegateTarget(){return this.onDidNegateTargetEmitter.event}get onDidUnNegateTarget(){return this.onDidUnNegateTargetEmitter.event}addCSSClass(v){this._cssClassList.has(v)||(this._cssClassList.add(v),this.onDidAddCSSClassnameEmitter.fire({decoration:this,classname:v}))}removeCSSClass(v){this._cssClassList.has(v)&&(this._cssClassList.delete(v),this.onDidRemoveCSSClassnameEmitter.fire({decoration:this,classname:v}))}hasTarget(v){return!!this._appliedTargets.get(v)}addTarget(v,m=o.Self){if(this._appliedTargets.get(v)===m||!r.TreeNode.is(v))return;this._appliedTargets.set(v,m);const s=n.Disposable.create(()=>{this.removeTarget(v)});return this.appliedTargetsDisposables.set(v,s),this.onDidAddTargetEmitter.fire({decoration:this,target:v}),s}removeTarget(v){if(this._appliedTargets.delete(v)){const m=this.appliedTargetsDisposables.get(v);m&&m.dispose(),this.onDidRemoveTargetEmitter.fire({decoration:this,target:v})}}clearAppliedTarget(){const v=Array.from(this._appliedTargets.keys());for(const m of v)this.removeTarget(m)}clearNegateTarget(){const v=Array.from(this._negatedTargets.keys());for(const m of v)this.unNegateTarget(m)}negateTarget(v,m=o.Self){if(this._negatedTargets.get(v)===m||!r.TreeNode.is(v))return;this._negatedTargets.set(v,m);const s=n.Disposable.create(()=>{this.unNegateTarget(v)});return this.negatedTargetsDisposables.set(v,s),this.onDidNegateTargetEmitter.fire({decoration:this,target:v}),s}unNegateTarget(v){if(this._negatedTargets.delete(v)){const m=this.negatedTargetsDisposables.get(v);m&&m.dispose(),this.onDidUnNegateTargetEmitter.fire({decoration:this,target:v})}}}t.Decoration=a},29701:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationsManager=void 0;const n=e(70392),r=e(34054),o=e(26353),a=e(58781);class p{constructor(m){this.root=m,this.decorations=new Map,this.decorationsMeta=new WeakMap,this.disposables=new n.DisposableCollection,this.disposed=!1,this.targetDecoration=_=>{const{decoration:s,target:g}=_,l=this.getDecorationData(g);if(l){const{applicable:h,inheritable:u}=l;h.add(s),u&&u.add(s)}},this.updateTarget=()=>{for(const[_]of this.decorations)for(const[s,g]of Array.from(_.appliedTargets)){_.removeTarget(s);const l=this.root.getTreeNodeByPath(s.path);l&&_.addTarget(l,g)}},this.unTargetDecoration=_=>{const{decoration:s,target:g}=_,l=this.getDecorationData(g);if(l){const{applicable:h,inheritable:u}=l;h.remove(s),u&&u.remove(s)}},this.negateDecoration=_=>{const{decoration:s,target:g}=_,l=this.getDecorationData(g);if(l){const{applicable:h,inheritable:u}=l;h.negate(s),u&&u.negate(s)}},this.unNegateDecoration=_=>{const{decoration:s,target:g}=_,l=this.getDecorationData(g);if(l){const{applicable:h,inheritable:u}=l;h.unNegate(s),u&&u.unNegate(s)}},this.switchParent=(_,s,g)=>{const l=this.decorationsMeta.get(_);if(!l)return;const h=this.getDecorationData(g);h&&(l.applicable.changeParent(h.inheritable),l.inheritable&&l.inheritable.changeParent(h.inheritable))},this.decorationsMeta.set(m,{applicable:new a.CompositeDecoration(m,a.CompositeDecorationType.Applicable),inheritable:new a.CompositeDecoration(m,a.CompositeDecorationType.Inheritable)}),this.disposables.push(m.watcher.on(r.TreeNodeEvent.DidChangeParent,this.switchParent)),this.disposables.push(m.watcher.on(r.TreeNodeEvent.DidDispose,_=>this.decorationsMeta.delete(_))),this.disposables.push(m.watcher.on(r.TreeNodeEvent.BranchDidUpdate,this.updateTarget))}dispose(){for(const[m]of this.decorations)this.removeDecoration(m);this.disposables.dispose(),this.disposed=!0}addDecoration(m){if(this.disposed)throw new Error("DecorationManager disposed");if(this.decorations.has(m))return;const _=new n.DisposableCollection;_.push(m.onDidAddTarget(this.targetDecoration)),_.push(m.onDidRemoveTarget(this.unTargetDecoration)),_.push(m.onDidNegateTarget(this.negateDecoration)),_.push(m.onDidUnNegateTarget(this.unNegateDecoration)),this.decorations.set(m,_);for(const[s]of m.appliedTargets)this.targetDecoration({decoration:m,target:s});for(const[s]of m.negatedTargets)this.negateDecoration({decoration:m,target:s})}removeDecoration(m){const _=this.decorations.get(m);if(_){for(const[s]of m.appliedTargets){const g=this.decorationsMeta.get(s);g&&(g.applicable.remove(m),g.inheritable&&g.inheritable.remove(m))}for(const[s]of m.negatedTargets){const g=this.decorationsMeta.get(s);g&&(g.applicable.unNegate(m),g.inheritable&&g.inheritable.unNegate(m))}_.dispose(),this.decorations.delete(m)}}getDecorations(m){if(!m||!o.TreeNode.is(m))return;const _=this.getDecorationData(m);if(_)return _.applicable.compositeCssClasslist}getDecorationData(m){if(this.disposed)return;const _=this.decorationsMeta.get(m);if(_)return _;if(!m||!m.parent)return;const s=this.getDecorationData(m.parent);if(s){const g={applicable:new a.CompositeDecoration(m,a.CompositeDecorationType.Applicable,s.inheritable),inheritable:o.CompositeTreeNode.is(m)?new a.CompositeDecoration(m,a.CompositeDecorationType.Inheritable,s.inheritable):void 0};return this.decorationsMeta.set(m,g),g}}}t.DecorationsManager=p},24936:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(96336),t),n.__exportStar(e(29701),t),n.__exportStar(e(58781),t)},43685:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(29805),t),n.__exportStar(e(26353),t),n.__exportStar(e(58615),t),n.__exportStar(e(24936),t)},13674:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeModel=void 0;const n=e(70392),r=e(34054),o=e(70609);class a{constructor(){this.onChangeEmitter=new n.Emitter,this.dispatchChange=()=>{this.onChangeEmitter.fire()}}get onChange(){return this.onChangeEmitter.event}get ensureReady(){return this._ensureReady}get root(){return this._root}set root(v){this._root=v,this.initState(v),this.root&&(this._ensureReady=this.root.ensureLoaded())}get state(){return this._state}set state(v){this._state=v}init(v){this.root=v,this.root.watcher.on(r.TreeNodeEvent.BranchDidUpdate,this.dispatchChange)}initState(v){this.state=new o.TreeStateManager(v)}loadTreeState(v){return typeof v=="string"&&(v=JSON.parse(v)),this.state.loadTreeState(v)}getTreeStateWatcher(v=!1){return new o.TreeStateWatcher(this.state,v)}resolveChildren(v){return Promise.resolve(Array.from(v.children))}}t.TreeModel=a},58615:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(13674),t)},12165:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateManager=t.Operation=void 0;const n=e(70392),r=e(34054),o=e(26353),{Path:a}=n.path;var p;(function(_){_[_.SetExpanded=1]="SetExpanded",_[_.SetCollapsed=2]="SetCollapsed",_[_.SetActive=3]="SetActive"})(p||(t.Operation=p={}));var v;(function(_){_[_.Expanded=1]="Expanded",_[_.Collapsed=2]="Collapsed",_[_.Disabled=4]="Disabled"})(v||(v={}));class m{constructor(s){this.expandedDirectories=new Map,this._scrollOffset=0,this.stashing=!1,this.stashLockingItems=new Set,this.onDidLoadStateEmitter=new n.Emitter,this.onChangeScrollOffsetEmitter=new n.Emitter,this.onDidChangeExpansionStateEmitter=new n.Emitter,this.onDidChangeRelativePathEmitter=new n.Emitter,this.handleExpansionChange=(g,l,h)=>{var u;if(this.stashing&&this.stashKeyframes&&this.stashKeyframes.set(g.id,l?v.Expanded:v.Collapsed),this.stashKeyframes&&!this.stashing){if(l){let E=g;for(;E;){if(this.stashKeyframes.has(E.id)){let f=this.stashKeyframes.get(E.id);f=f|v.Disabled,this.stashKeyframes.set(E.id,f)}E=E.parent}this.stashLockingItems.add(g)}if(this.stashLockingItems&&this.stashLockingItems.has(g)&&!l){let E=g;for(;E;){if(this.stashKeyframes.has(E.id)){let f=this.stashKeyframes.get(E.id);f&=~v.Disabled,this.stashKeyframes.set(E.id,f)}E=E.parent}this.stashLockingItems.delete(g)}}let d=this.expandedDirectories.get(g);l&&!d?(d=(u=new a(this.root.path).relative(new a(g.path)))===null||u===void 0?void 0:u.toString(),this.expandedDirectories.set(g,d),this.onDidChangeExpansionStateEmitter.fire({relativePath:d,isExpanded:l,isVisibleAtSurface:h})):!l&&d&&(this.expandedDirectories.delete(g),this.onDidChangeExpansionStateEmitter.fire({relativePath:d,isExpanded:l,isVisibleAtSurface:h}))},this.handleDidChangePath=g=>{var l;if(this.expandedDirectories.has(g)){const h=this.expandedDirectories.get(g),u=(l=new a(this.root.path).relative(new a(g.path)))===null||l===void 0?void 0:l.toString();this.expandedDirectories.set(g,u),this.onDidChangeRelativePathEmitter.fire({prevPath:h,newPath:u})}},this.root=s,this.root.watcher.on(r.TreeNodeEvent.DidChangeExpansionState,this.handleExpansionChange),this.root.watcher.on(r.TreeNodeEvent.DidChangePath,this.handleDidChangePath)}get scrollOffset(){return this._scrollOffset}saveScrollOffset(s){this._scrollOffset=s,this.onChangeScrollOffsetEmitter.fire(s)}get onDidLoadState(){return this.onDidLoadStateEmitter.event}get onChangeScrollOffset(){return this.onChangeScrollOffsetEmitter.event}get onDidChangeExpansionState(){return this.onDidChangeExpansionStateEmitter.event}get onDidChangeRelativePath(){return this.onDidChangeRelativePathEmitter.event}async loadTreeState(s){if(s){for(const g of s.expandedDirectories.buried)try{const l=await this.root.loadTreeNodeByPath(g);if(!l)break;l&&o.CompositeTreeNode.is(l)&&l.setCollapsed()}catch{}for(const g of s.expandedDirectories.atSurface)try{if(!await this.root.loadTreeNodeByPath(g,!0))break}catch{}this._scrollOffset=typeof s.scrollPosition=="number"&&s.scrollPosition>-1?s.scrollPosition:this._scrollOffset,this.root.watcher.notifyDidUpdateBranch(),this.onDidLoadStateEmitter.fire()}}excludeFromStash(s){this.stashKeyframes&&!this.stashing&&this.handleExpansionChange(o.CompositeTreeNode.is(s)?s:s.parent,!0,this.root.isItemVisibleAtSurface(s))}beginStashing(){this.stashing=!0,this.stashKeyframes=new Map}endStashing(){this.stashing=!1,this.stashLockingItems.clear()}async reverseStash(){if(!this.stashKeyframes)return;this.endStashing();const s=Array.from(this.stashKeyframes);this.stashKeyframes=null;for(const[g,l]of s){const h=(l&v.Disabled)===v.Disabled,u=o.TreeNode.getTreeNodeById(g);!u||h||((l&v.Expanded)===v.Expanded?u.setCollapsed():(l&v.Collapsed)===v.Collapsed&&await u.setExpanded())}}}t.TreeStateManager=m},72782:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcher=void 0;const n=e(70392),r=e(13440);class o{constructor(p,v=!1){this._disposed=!1,this.disposables=new n.DisposableCollection,this.onDidTreeStateChangeEmitter=new n.Emitter,this.currentState={specVersion:1,scrollPosition:0,expandedDirectories:{atSurface:[],buried:[]}},this.disposables.push(p.onChangeScrollOffset(m=>{this.currentState.scrollPosition=m,this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.ScrollOffset)})),this.disposables.push(p.onDidChangeRelativePath(({prevPath:m,newPath:_})=>{let s=!1;const g=new Set(this.currentState.expandedDirectories.atSurface);if(g.has(m)&&(g.delete(m),g.add(_),s=!0),this.currentState.expandedDirectories.atSurface=Array.from(g),v){const l=new Set(this.currentState.expandedDirectories.buried);l.has(m)&&(g.delete(m),g.add(_),s=!0),this.currentState.expandedDirectories.buried=Array.from(l)}s&&this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.PathsUpdated)})),this.disposables.push(p.onDidChangeExpansionState(({relativePath:m,isExpanded:_,isVisibleAtSurface:s})=>{let g=!1;const l=new Set(this.currentState.expandedDirectories.atSurface),h=new Set(this.currentState.expandedDirectories.buried);if(l.has(m)&&(!_||!s)){l.delete(m);const d=Array.from(l).filter(E=>E.indexOf(m)>=0);for(const E of d)l.delete(E),h.has(E)||h.add(E);g=!0}else _&&s&&(l.add(m),g=!0);this.currentState.expandedDirectories.atSurface=Array.from(l),v||(h.has(m)&&(!_||s)?(h.delete(m),g=!0):_&&!s&&(h.add(m),g=!0),this.currentState.expandedDirectories.buried=Array.from(h)),g&&this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.DirExpansionState)}))}get onDidChange(){return this.onDidTreeStateChangeEmitter.event}dispose(){this._disposed||(this._disposed=!0,this.disposables.dispose())}snapshot(){return{...this.currentState,expandedDirectories:{atSurface:this.currentState.expandedDirectories.atSurface.slice(),buried:this.currentState.expandedDirectories.buried.slice()}}}toString(){return JSON.stringify(this.currentState)}}t.TreeStateWatcher=o},70609:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcher=t.TreeStateManager=void 0;var n=e(12165);Object.defineProperty(t,"TreeStateManager",{enumerable:!0,get:function(){return n.TreeStateManager}});var r=e(72782);Object.defineProperty(t,"TreeStateWatcher",{enumerable:!0,get:function(){return r.TreeStateWatcher}})},13440:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcherChangeType=t.TreeStateEvent=void 0;var e;(function(r){r[r.DidChangeScrollOffset=1]="DidChangeScrollOffset",r[r.DidChangeDirExpansionState=2]="DidChangeDirExpansionState",r[r.DidChangeRelativePath=3]="DidChangeRelativePath",r[r.DidChange=4]="DidChange",r[r.DidLoadState=5]="DidLoadState"})(e||(t.TreeStateEvent=e={}));var n;(function(r){r[r.ScrollOffset=1]="ScrollOffset",r[r.DirExpansionState=2]="DirExpansionState",r[r.PathsUpdated=3]="PathsUpdated"})(n||(t.TreeStateWatcherChangeType=n={}))},34054:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(79632),t),n.__exportStar(e(32281),t),n.__exportStar(e(3754),t)},32281:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeNodeType=void 0;var e;(function(n){n[n.TreeNode=1]="TreeNode",n[n.CompositeTreeNode=2]="CompositeTreeNode",n[n.NewPrompt=3]="NewPrompt",n[n.RenamePrompt=4]="RenamePrompt"})(e||(t.TreeNodeType=e={}))},79632:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3754:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataChangeType=t.WatchEvent=t.TreeNodeEvent=void 0;var e;(function(o){o[o.WillChangeExpansionState=1]="WillChangeExpansionState",o[o.DidChangeExpansionState=2]="DidChangeExpansionState",o[o.WillChangeParent=3]="WillChangeParent",o[o.DidChangeParent=4]="DidChangeParent",o[o.DidDispose=5]="DidDispose",o[o.BranchDidUpdate=6]="BranchDidUpdate",o[o.DidChangePath=7]="DidChangePath",o[o.DidProcessWatchEvent=8]="DidProcessWatchEvent",o[o.WillProcessWatchEvent=9]="WillProcessWatchEvent",o[o.DidChangeMetadata=10]="DidChangeMetadata",o[o.DidResolveChildren=11]="DidResolveChildren",o[o.WillResolveChildren=12]="WillResolveChildren"})(e||(t.TreeNodeEvent=e={}));var n;(function(o){o[o.Added=1]="Added",o[o.Removed=2]="Removed",o[o.Changed=3]="Changed",o[o.Moved=4]="Moved"})(n||(t.WatchEvent=n={}));var r;(function(o){o[o.Added=1]="Added",o[o.Updated=2]="Updated",o[o.Removed=3]="Removed"})(r||(t.MetadataChangeType=r={}))},77011:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollbarsVirtualList=t.Scrollbars=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(97331)),a=n.__importStar(e(14041)),p=e(70392),v=e(56875);e(93324);const m=({onScroll:_,onUpdate:s,forwardedRef:g,style:l,children:h,className:u,onReachBottom:d,tabBarMode:E,thumbSize:f=5,hiddenVertical:c,hiddenHorizontal:y,universal:b=!1})=>{const A=(0,a.useRef)(new p.DisposableCollection),S=(0,a.useRef)(),D=(0,a.useCallback)(M=>{M?(S.current=M.view,g&&(typeof g=="function"?g(M.view):g.current=M.view)):g&&typeof g=="function"&&g(null)},[]),I=(0,a.useRef)(),w=(0,a.useRef)(),T=(0,a.useCallback)(M=>{if(!M)return;const{scrollTop:O,scrollHeight:x,clientHeight:k}=M;if(x===0&&k===0)return;(O+100)/(x-k)>1&&d&&d()},[d]),R=(0,a.useCallback)((0,o.default)(M=>{if(!M)return;const{scrollTop:O,scrollLeft:x}=M,k=1/20*Math.min(O,20),F=1/20*Math.min(x,20);I.current&&(I.current.style.opacity=String(k)),w.current&&(w.current.style.opacity=String(F)),T(M),s&&s(M)},100),[s,T,I.current,w.current]);return(0,a.useEffect)(()=>{const M=O=>{S.current&&(O.preventDefault(),O.stopPropagation(),S.current.clientHeight>=S.current.scrollHeight&&(O.deltaY!==0&&(S.current.scrollLeft+=O.deltaY),O.deltaX!==0&&(S.current.scrollLeft+=O.deltaX)))};return E&&S.current&&S.current.addEventListener("wheel",M,{passive:!0}),()=>{var O;(O=S.current)===null||O===void 0||O.removeEventListener("wheel",M)}},[S.current,E]),(0,a.useEffect)(()=>()=>A.current.dispose(),[]),a.default.createElement(v.Scrollbars,{ref:D,style:{...l,overflow:"hidden"},className:(0,r.default)(u,"kt-scrollbar"),onUpdate:R,onScroll:_,universal:b,renderTrackHorizontal:({style:M,...O})=>{const x={...M,height:f,left:0,right:0,bottom:1};return y&&(x.display="none"),a.default.createElement("div",{...O,style:x})},renderTrackVertical:({style:M,...O})=>{const x={...M,width:f,top:0,right:1,bottom:0};return c&&(x.display="none"),a.default.createElement("div",{...O,style:x})},renderThumbVertical:({style:M,className:O,...x})=>{const k={...M,width:f};return c&&(k.display="none"),a.default.createElement("div",{...x,style:k,className:(0,r.default)(O,"scrollbar-thumb-vertical")})},renderThumbHorizontal:({style:M,className:O,...x})=>{const k={...M,height:f,display:"none"};return y&&(k.display="none"),a.default.createElement("div",{...x,style:k,className:(0,r.default)(O,"scrollbar-thumb-horizontal")})}},a.default.createElement("div",{ref:M=>{I.current=M},className:"scrollbar-decoration-vertical"}),a.default.createElement("div",{ref:M=>{w.current=M},className:"scrollbar-decoration-horizontal"}),h)};t.Scrollbars=m,t.Scrollbars.displayName="CustomScrollbars",t.ScrollbarsVirtualList=a.default.forwardRef((_,s)=>a.default.createElement(t.Scrollbars,{..._,thumbSize:10,forwardedRef:s})),t.ScrollbarsVirtualList.displayName="ScrollbarsVirtualList"},14640:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectOptionsList=t.Option=void 0,t.isDataOptions=l,t.isDataOptionGroups=h,t.Select=A;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(54713),p=e(50708);e(11110);const v=({value:D,children:I,disabled:w,onClick:T,className:R,...M})=>o.default.createElement("span",{...M,className:(0,r.default)(R,{"kt-option-disabled":w}),onClick:()=>T&&!w&&T(D)},I);t.Option=v;function m(...D){}function _(D,I){return I?D.props[I]:D.props.value}function s(D,I){let w=[];return Array.isArray(D)?w=o.default.Children.toArray(D).map(I):w=[I(D)],w}function g(D,I,w=(T,R)=>T===R){const R=o.default.Children.toArray(I).filter(M=>o.default.isValidElement(M)).find(M=>{var O;return M.props&&w((O=M.props)===null||O===void 0?void 0:O.value,D)?M:null});return R?.props}function l(D){return D?D.length===0?!0:u(D[0]):!1}function h(D){return D?D.length===0?!0:d(D[0]):!1}function u(D){return D.value!==void 0}function d(D){return D.groupName!==void 0&&l(D.options)}function E(D){return o.default.createElement(o.default.Fragment,null,D.data.iconClass?o.default.createElement("div",{className:(0,r.default)(D.data.iconClass,"kt-select-option-icon")}):void 0,D.data.label)}function f({group:D,index:I}){return o.default.createElement("div",{key:"header_"+I,className:"kt-select-group-header"},D.iconClass?o.default.createElement("div",{className:(0,r.default)(D.iconClass,"kt-select-option-icon")}):void 0,o.default.createElement("div",null,D.groupName))}function c(D,I){let w=I.label;if(w===void 0)try{w=I.value.toString()}catch{w=void 0}return typeof w=="string"?w.indexOf(D)!==-1:!1}const y=o.default.memo(({selected:D,selectedRenderer:I})=>I?o.default.createElement(I,{data:D}):o.default.createElement(o.default.Fragment,null,D.iconClass&&o.default.createElement("div",{className:(0,r.default)(D.iconClass,"kt-select-option-icon")}),o.default.createElement("span",{className:"kt-select-option"},D.label))),b=o.default.memo(({value:D,onChange:I,placeholder:w,size:T="default"})=>o.default.createElement(p.Input,{className:"kt-select-search",value:D,size:T,onChange:R=>I(R.target.value),autoFocus:!0,placeholder:w||""}));function A({disabled:D,options:I,size:w="default",children:T,value:R,onChange:M,onMouseEnter:O,optionLabelProp:x,style:k,optionStyle:F,className:L,maxHeight:B,equals:U=(q,Ee)=>q===Ee,optionRenderer:W=E,groupTitleRenderer:j,footerComponent:Q,headerComponent:G,showSearch:Z=!1,filterOption:$=c,searchPlaceholder:V="",emptyComponent:H,selectedRenderer:K,onBeforeShowOptions:Y,allowOptionsOverflow:X,dropdownRenderType:oe="fixed",description:ie,notMatchWarning:he,onSearchChange:me}){const[q,Ee]=(0,o.useState)(!1),[ue,te]=(0,o.useState)(""),fe=o.default.useRef(null),Ie=o.default.useRef(null),Me=(0,o.useCallback)(Ae=>{Ae.preventDefault(),Ae.stopPropagation(),!(!q&&Y?.())&&Ee(!q)},[q,Y]),Pe=(0,o.useCallback)(()=>{var Ae,Ue,Ye,Ke,mt,_t,Mt,ct,wt;if(I&&l(I)){for(const st of I)if(U(R,st.value))return{iconClass:st.iconClass,label:st.label,value:st.value};return{iconClass:(Ae=I[0])===null||Ae===void 0?void 0:Ae.iconClass,label:(Ue=I[0])===null||Ue===void 0?void 0:Ue.label,value:(Ye=I[0])===null||Ye===void 0?void 0:Ye.value}}else if(I&&h(I)){for(const st of I)for(const rt of st.options)if(U(R,rt.value))return{iconClass:rt.iconClass,label:rt.label,value:rt.value};return{iconClass:(mt=(Ke=I[0])===null||Ke===void 0?void 0:Ke.options[0])===null||mt===void 0?void 0:mt.iconClass,label:(Mt=(_t=I[0])===null||_t===void 0?void 0:_t.options[0])===null||Mt===void 0?void 0:Mt.label,value:(wt=(ct=I[0])===null||ct===void 0?void 0:ct.options[0])===null||wt===void 0?void 0:wt.value}}else{const st=T&&g(R,T);if(st)return{label:st.label||st.value,value:st.value}}return{label:R,value:R,notMatch:!0}},[I,R,T])(),we=(0,r.default)("kt-select-options",{"kt-select-options-visible":q,[`kt-select-options-${w}`]:w}),_e=he&&Pe.notMatch,Ne=(0,r.default)("kt-select-value",{"kt-select-warning":_e,"kt-select-disabled":D,"kt-select-value-active":q,[`kt-select-value-${w}`]:w});function Te(Ae,Ue){var Ye;if(!Ae)return null;(typeof Ae=="string"||typeof Ae=="number")&&(Ae=o.default.createElement(t.Option,{value:Ae,label:String(Ae),key:`${Ae}_${Ue}`},Ae));const Ke=Ae,mt=((Ye=Ke.props)===null||Ye===void 0?void 0:Ye.disabled)||!1;return o.default.createElement("div",{key:`${Ke.props.value}_${Ue}`,className:(0,r.default)({"kt-select-option-select":R===Ke.props.value}),onMouseEnter:()=>O?.(Ke.props.value,Ue),onClick:mt?m:()=>{Ee(!1),M&&M(_(Ae,x))}},Ae)}(0,o.useEffect)(()=>{!q&&ue&&te("")},[]),(0,o.useEffect)(()=>{if(!q)return;const Ae=Ue=>{fe.current&&!fe.current.contains(Ue.target)&&Ee(!1)};return document.addEventListener("click",Ae),()=>document.removeEventListener("click",Ae)},[q]);const We=(0,o.useCallback)(()=>{if(!fe.current||!Ie.current)return;const Ae=fe.current.getBoundingClientRect(),Ue=Ie.current;X?(Ue.style.minWidth=`${Ae.width}px`,Ue.style.maxWidth=`${window.innerWidth-Ae.left-4}px`):Ue.style.width=`${Ae.width}px`;const Ye=window.innerHeight-Ae.bottom-50,Ke=Ue.clientHeight;Ye<Ke?Ue.style.bottom=`${Ae.height+4}px`:(Ue.style.maxHeight=`${Ye}px`,Ue.style.bottom="auto"),Ue.style.position=oe},[X,oe]);(0,o.useEffect)(()=>{if(q)return We(),window.addEventListener("resize",We),()=>window.removeEventListener("resize",We)},[q,We]);const pe=(0,o.useMemo)(()=>ue?l(I)?I.filter(Ae=>$(ue,Ae)):h(I)?I.reduce((Ae,Ue)=>{const Ye=Ue.options.filter(Ke=>$(ue,Ke,Ue));return Ye.length&&Ae.push({...Ue,options:Ye}),Ae},[]):I:I,[I,ue,$]),re=()=>o.default.createElement(o.default.Fragment,null,o.default.createElement(y,{selected:Pe,selectedRenderer:K}),o.default.createElement(a.Icon,{iconClass:(0,r.default)((0,a.getIcon)("down"),"kt-select-value-default-icon")})),ge=(0,o.useCallback)(Ae=>{te(Ae),me?.(Ae)},[ue,me]),De=()=>o.default.createElement(b,{value:ue,onChange:ge,placeholder:V});return o.default.createElement("div",{className:(0,r.default)("kt-select-container",L),ref:fe},o.default.createElement("div",{className:Ne,onClick:Me,style:k},Z&&q?De():re()),_e&&o.default.createElement("div",{className:"kt-select-warning-text"},he),q&&!ue&&(l(pe)||h(pe)?o.default.createElement(t.SelectOptionsList,{optionRenderer:W,options:pe,equals:U,optionStyle:F,currentValue:R,size:w,onSelect:Ae=>{M&&M(Ae),Ee(!1)},groupTitleRenderer:j,className:we,style:{maxHeight:`${B}px`},ref:Ie,footerComponent:Q,headerComponent:G,emptyComponent:H}):o.default.createElement("div",{className:we,style:{maxHeight:`${B}px`},ref:Ie},I&&I.map((Ae,Ue)=>Te(Ae,Ue)),T&&s(T,Te),ie&&o.default.createElement(S,{text:ie}),o.default.createElement("div",{className:"kt-select-overlay",onClick:Me}))))}function S({text:D}){return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-option-divider"}),o.default.createElement("div",{className:"kt-option-description"},D))}t.SelectOptionsList=o.default.forwardRef((D,I)=>{const{options:w,optionRenderer:T=E,equals:R=(H,K)=>H===K,onSelect:M,currentValue:O,optionStyle:x,size:k,className:F,style:L,groupTitleRenderer:B=f,renderCheck:U,headerComponent:W,footerComponent:j,emptyComponent:Q}=D,G=(0,r.default)("kt-select-options",{[`kt-select-options-${k}`]:!0},F);function Z(H){return H.map((K,Y)=>{const X=o.default.createElement(B,{group:K,index:Y});return o.default.createElement(o.default.Fragment,{key:"group_"+Y},X,$(K.options))})}function $(H){return H&&H.map((K,Y)=>{const X=R(O,K.value);return o.default.createElement(t.Option,{value:Y,key:Y,className:(0,r.default)({"kt-select-option-select":X,"kt-select-option-default":!0,"kt-option-with-check":U}),onClick:()=>M(K.value),style:x},U&&R(O,K.value)?o.default.createElement("div",{className:"kt-option-check"},o.default.createElement(a.Icon,{icon:"check"})):void 0,o.default.createElement(T,{data:K,isCurrent:X}))})}let V;return h(w)?V=w.filter(H=>H.options.length>0).length===0:V=w.length===0,o.default.createElement("div",{className:G,style:L,ref:I,onClick:H=>{H.stopPropagation()}},W?o.default.createElement(W,null):null,V&&Q?o.default.createElement(Q,null):(h(w)?Z(w):$(w))||Q&&o.default.createElement(Q,null),j?o.default.createElement(j,null):null)})},54076:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tabs=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041));e(1030);const a=p=>{const{tabs:v,className:m,value:_,onChange:s,mini:g,style:l,...h}=p,u=o.default.useCallback(d=>{typeof s=="function"&&s(d)},[]);return o.default.createElement("div",{...h,style:l,className:(0,r.default)("kt-tabs",m,{"kt-tabs-mini":g})},v.map((d,E)=>{const f=E===_?"kt-tab-selected":"";return typeof d=="string"?o.default.createElement("div",{key:E,className:(0,r.default)("kt-tab",f,{"kt-mini-tab":g}),onClick:u.bind(null,E)},d):o.default.createElement("div",{key:E,className:(0,r.default)("kt-custom-tab",f,{"kt-mini-tab":g}),onClick:u.bind(null,E)},d)}))};t.Tabs=a},72871:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tooltip=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041));e(24571);const a=({title:p,children:v,delay:m})=>{const[_,s]=(0,o.useState)(!1),g=(0,o.useRef)(null),l=(0,o.useRef)(null),h=(0,o.useRef)(null),u=(0,o.useRef)(null);(0,o.useEffect)(()=>()=>clearTimeout(u.current),[]);function d(){if(_){u.current&&clearTimeout(u.current);return}u.current=setTimeout(()=>{if(s(!0),l.current&&g.current&&h.current){const{x:f,y:c,width:y,height:b}=g.current.getBoundingClientRect(),A=l.current.getBoundingClientRect();c<A.height*1.5?(h.current.className+=" kt-tooltip-reverse-arrow",l.current.style.top=`${c+b+A.height/2}px`):l.current.style.top=`${c-A.height*1.5}px`,f+A.width/2>=document.body.offsetWidth?(h.current.style.right=`${y/2-7}px`,l.current.style.left=`${f+y-A.width}px`):f-A.width/2<=0?(h.current.style.left=`${y/2-7}px`,l.current.style.left=`${f}px`):(h.current.style.left=`${A.width/2-7}px`,l.current.style.left=`${f+y/2-A.width/2}px`)}clearTimeout(u.current)},m||500)}function E(){u.current&&clearTimeout(u.current),s(!1)}return o.default.createElement("p",{ref:g,className:"kt-tooltip-wrapper",onMouseEnter:d,onMouseLeave:E},v,_&&o.default.createElement("span",{ref:l,className:(0,r.default)("kt-tooltip-content")},p,o.default.createElement("span",{ref:h,className:"kt-tooltip-arrow-placeholder"})))};t.Tooltip=a},40604:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deprecated=a;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(65973));function a(p,v){return m=>(r.default.useEffect(()=>{(0,o.default)(!1,`${p.displayName||p.name} is deprecated: ${v}`)},[]),r.default.createElement(p,m))}},84605:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(40604),t),n.__exportStar(e(65973),t),n.__exportStar(e(43953),t),n.__exportStar(e(2835),t),n.__exportStar(e(47768),t),n.__exportStar(e(26809),t)},26809:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseWithoutEscape=t.toMarkdownHtml=t.parseMarkdown=t.createMarkedRenderer=t.marked=void 0;const n=e(33714);Object.defineProperty(t,"marked",{enumerable:!0,get:function(){return n.marked}});const r=()=>new n.Renderer;t.createMarkedRenderer=r;const o=(v,m)=>n.marked.parse(v,m);t.parseMarkdown=o;const a=(v,m)=>(0,n.marked)(v,m);t.toMarkdownHtml=a;const p=v=>{if(v.type==="escape"){const m=v;m.text=m.raw}return v};t.parseWithoutEscape=p},2835:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.collapseMotion=void 0;const e=()=>({height:0,opacity:0}),n=o=>({height:o.scrollHeight,opacity:1}),r=o=>({height:o.offsetHeight});t.collapseMotion={motionName:"kt-motion-collapse",onAppearStart:e,onEnterStart:e,onAppearActive:n,onEnterActive:n,onLeaveStart:r,onLeaveActive:e}},47768:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapperRaf=p;const r=e(85608).__importDefault(e(10719));let o=0;const a={};function p(v,m=1){const _=o++;let s=m;function g(){s-=1,s<=0?(v(),delete a[_]):a[_]=(0,r.default)(g)}return a[_]=(0,r.default)(g),_}p.cancel=function(m){m!==void 0&&(r.default.cancel(a[m]),delete a[m])},p.ids=a},43953:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tupleNum=t.tuple=void 0;const e=(...r)=>r;t.tuple=e;const n=(...r)=>r;t.tupleNum=n},65973:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warning=n,t.note=r,t.resetWarned=o,t.call=a,t.warningOnce=p,t.noteOnce=v;let e={};function n(m,_){}function r(m,_){}function o(){e={}}function a(m,_,s){!_&&!e[s]&&(m(!1,s),e[s]=!0)}function p(m,_){a(n,m,_)}function v(m,_){a(r,m,_)}t.default=p},91802:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualList=void 0;const r=e(85608).__importStar(e(14041)),o=e(24241),a=e(77011),p=({data:v,className:m,template:_,refSetter:s,onRangeChanged:g})=>{const l=(0,r.useRef)(null);return(0,r.useEffect)(()=>{s?.(l.current)},[l.current]),r.default.createElement(a.Scrollbars,{thumbSize:0},r.default.createElement(o.Virtuoso,{rangeChanged:h=>{g?.(h)},overscan:20,ref:l,style:{height:"100%"},className:m,data:v,itemContent:(h,u)=>r.default.createElement(_,{index:h,data:u})}))};t.VirtualList=p},18740:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(59019),t)},59019:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSChannelHandler=void 0;const n=e(40396),r=e(43718),o=e(54558),a=e(47561);class p{onChannelCreated(m,_){return this._onChannelCreatedEmitter.on(m,_)}constructor(m,_,s={}){this.connection=m,this._disposables=new r.DisposableStore,this._onChannelCreatedEmitter=this._disposables.add(new n.EventEmitter),this.channelMap=new Map,this.channelCloseEventMap=new r.MultiMap,this.logger=console,this.openingBarrier=new r.Barrier,this.logger=s.logger||this.logger,this.clientId=_,this.LOG_TAG=`[WSChannelHandler] [client-id:${this.clientId}]`;const g=s.serializer||o.furySerializer;this.wrappedConnection=(0,o.wrapSerializer)(this.connection,g)}replaceLogger(m){m&&(this.logger=m)}setReporter(m){this.reporterService=m}heartbeatMessage(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this.heartbeatMessageTimer=setTimeout(()=>{this.channelMap.forEach(m=>{m.ping()}),this.heartbeatMessage()},1e4)}async initHandler(){this.wrappedConnection.onMessage(_=>{switch(this.heartbeatMessage(),_.kind){case"pong":break;default:{const s=this.channelMap.get(_.id);s?s.dispatch(_):this.logger.warn(this.LOG_TAG,`channel ${_.id} not found`)}}});const m=()=>{this.channelMap.size>0&&this.channelMap.forEach(_=>{_.open(_.channelPath,this.clientId)})};this.connection.onClose((_,s)=>{this.channelMap.forEach(g=>{g.close(_,s)})}),this.connection.isOpen()&&(this.heartbeatMessage(),this.openingBarrier.open()),this.connection.onOpen(()=>{this.heartbeatMessage(),this.openingBarrier.isOpen()?m():this.openingBarrier.open()}),await this.openingBarrier.wait()}fillKey(m){return`${this.clientId}:${m}`}getChannel(m){return this.channelMap.get(this.fillKey(m))}async openChannel(m){const _=this.fillKey(m);this.channelMap.has(_)&&(this.channelMap.get(_).dispose(),this.logger.log(this.LOG_TAG,`channel ${_} already exists, dispose it`));const s=new a.WSChannel(this.wrappedConnection,{id:_,logger:this.logger,ensureServerReady:!0});this.channelMap.set(s.id,s),this._onChannelCreatedEmitter.emit(m,s);let g=0;s.onOpen(()=>{g++,g>1?(s.fireReopen(),this.logger.log(this.LOG_TAG,`channel reconnect ${this.clientId}:${s.channelPath}, count: ${g}`)):this.logger.log(this.LOG_TAG,`channel open ${this.clientId}:${s.channelPath}`);const u=this.channelCloseEventMap.get(s.id);u&&(u.forEach(d=>{this.reporterService&&this.reporterService.point(r.REPORT_NAME.CHANNEL_RECONNECT,r.REPORT_NAME.CHANNEL_RECONNECT,d)}),this.channelCloseEventMap.delete(s.id))}),s.onClose((u,d)=>{this.channelCloseEventMap.set(s.id,{channelPath:m,closeEvent:{code:u,reason:d},connectInfo:navigator.connection}),this.logger.log(this.LOG_TAG,`channel ${m} closed, code: ${u}, reason: ${d}`)});const l=new r.Deferred,h=s.onOpen(()=>{l.resolve(),h.dispose()});return s.open(m,this.clientId),await l.promise,s}dispose(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this._disposables.dispose()}awaitChannelReady(m){const _=this.getChannel(m),s=new r.Deferred;if(_)_.onServerReady(()=>{s.resolve()});else{const g=this.onChannelCreated(m,l=>{l.onServerReady(()=>{s.resolve()}),g.dispose()})}return s.promise}}t.WSChannelHandler=p},98710:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cursor=t.Buffers=t.emptyBuffer=void 0,t.copy=e,t.emptyBuffer=new Uint8Array(0);function e(o,a,p,v,m){a.set(o.subarray(v,m),p)}class n{constructor(){this.buffers=[],this.size=0}get byteLength(){return this.size}push(a){this.buffers.push(a),this.size+=a.length}unshift(a){this.buffers.unshift(a),this.size+=a.length}slice(a,p){const v=this.buffers;if(p===void 0&&(p=this.size),a===void 0&&(a=0),p>this.size&&(p=this.size),a>=p)return t.emptyBuffer;let m=0,_=0;for(;_<v.length&&m+v[_].length<=a;_++)m+=v[_].length;const s=new Uint8Array(p-a);let g=0;for(let l=_;g<p-a&&l<v.length;l++){const h=v[l].length,u=g===0?a-m:0,d=g+h>=p-a?Math.min(u+(p-a)-g,h):h;e(v[l],s,g,u,d),g+=d-u}return s}pos(a){if(a<0||a>=this.size)throw new Error(`out of range, ${a} not in [0, ${this.size})`);let p=a,v=0,m=null;for(;;){if(m=this.buffers[v],p<m.length)return{buf:v,offset:p};p-=m.length,v++}}copy(a,p=0,v=0,m=this.size){return e(this.slice(v,m),a,p,0,m-v)}splice(a,p,...v){const m=this.buffers,_=a>=0?a:this.size-a;p===void 0?p=this.size-_:p>this.size-_&&(p=this.size-_);for(const h of v)this.size+=h.length;const s=new n;let g=0,l=0;for(;l<m.length&&g+m[l].length<_;l++)g+=m[l].length;if(_-g>0){const h=_-g;if(h+p<m[l].length){s.push(m[l].slice(h,h+p));const u=m[l],d=new Uint8Array(h);for(let f=0;f<h;f++)d[f]=u[f];const E=new Uint8Array(u.length-h-p);for(let f=h+p;f<u.length;f++)E[f-p-h]=u[f];if(v.length>0){const f=v.slice();f.unshift(d),f.push(E),m.splice.apply(m,[l,1,...f]),l+=f.length,v=[]}else m.splice(l,1,d,E),l+=2}else s.push(m[l].slice(h)),m[l]=m[l].slice(0,h),l++}for(v.length>0&&(m.splice.apply(m,[l,0,...v]),l+=v.length);s.byteLength<p;){const h=m[l],u=h.length,d=Math.min(u,p-s.byteLength);d===u?(s.push(h),m.splice(l,1)):(s.push(h.slice(0,d)),m[l]=m[l].slice(d))}return this.size-=s.byteLength,s}get(a){const{buf:p,offset:v}=this.pos(a);return this.buffers[p][v]}set(a,p){const{buf:v,offset:m}=this.pos(a);this.buffers[v][m]=p}cursor(a=0){return new r(this,a)}dispose(){this.buffers=[],this.size=0}}t.Buffers=n;class r{constructor(a,p=0){this.buffers=a,this.offset=p,this.chunkIndex=0,this.chunkOffset=0,this.updatePosition()}updatePosition(){if(this.offset===0){this.chunkIndex=0,this.chunkOffset=0;return}const{buf:a,offset:p}=this.buffers.pos(this.offset);this.chunkIndex=a,this.chunkOffset=p}get line(){return this.chunkIndex}get lineWidth(){return this.buffers.buffers[this.chunkIndex].byteLength}get value(){return this.buffers.buffers[this.chunkIndex][this.chunkOffset]}get lineOffset(){return this.chunkOffset}*iterator(){for(;this.chunkIndex<this.buffers.buffers.length;){const a=this.buffers.buffers[this.chunkIndex],p=a.byteLength;for(;this.chunkOffset<p;){const v=a[this.chunkOffset];this.chunkOffset++,this.offset++,yield v}this.chunkOffset=0,this.chunkIndex++}}read(a){const p=this.offset+a,v=this.buffers.slice(this.offset,p);return this.skip(a),v}skip(a){let p=0;for(;this.chunkIndex<this.buffers.buffers.length;){const m=this.buffers.buffers[this.chunkIndex].byteLength;for(;this.chunkOffset<m;)if(this.chunkOffset++,this.offset++,++p===a)return;this.chunkOffset=0,this.chunkIndex++}}moveTo(a){this.offset=a,this.updatePosition()}dispose(){this.buffers=null,this.offset=0}reset(){this.offset=0,this.chunkIndex=0,this.chunkOffset=0}}t.Cursor=r},30613:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Capturer=t.ResponseStatus=t.MessageType=void 0,t.getCapturer=v;const n=e(43718),r=e(65265);var o;(function(_){_.SendNotification="sendNotification",_.SendRequest="sendRequest",_.RequestResult="requestResult",_.OnNotification="onNotification",_.OnRequest="onRequest",_.OnRequestResult="onRequestResult"})(o||(t.MessageType=o={}));var a;(function(_){_.Success="success",_.Fail="fail"})(a||(t.ResponseStatus=a={}));const p=typeof e.g>"u"?typeof window>"u"?{__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__:void 0}:window:e.g;function v(){const _=p.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__;if(_)return _.captureRPC}class m{constructor(s){this.source=s,this._disposables=new n.DisposableStore,this.capturer=null,this.setupListener=g=>{const{command:l}=g.detail;l===r.DevtoolsLantencyCommand.Start?this.capturer=v():l===r.DevtoolsLantencyCommand.Stop&&(this.capturer=null)},this.prefix=(0,n.randomString)(6),this.capturer=v(),typeof p.addEventListener=="function"&&(p.addEventListener(r.EDevtoolsEvent.Latency,this.setupListener),this._disposables.add({dispose:()=>{p.removeEventListener(r.EDevtoolsEvent.Latency,this.setupListener)}}))}capture(s){if(!this.capturer)return;const g={...s,source:this.source};g.data&&(0,n.isUint8Array)(g.data)&&(g.data="<Uint8Array>"),s.requestId&&(g.requestId=`${this.prefix}-${s.requestId}`),s.error&&(g.error=(0,n.transformErrorForSerialization)(s.error)),this.capturer(g)}captureOnRequest(s,g,l){this.capturer&&this.capture({type:o.OnRequest,requestId:`\u2193${s}`,serviceMethod:g,arguments:l})}captureOnRequestResult(s,g,l){this.capturer&&this.capture({type:o.OnRequestResult,status:a.Success,requestId:`\u2193${s}`,serviceMethod:g,data:l})}captureOnRequestFail(s,g,l){this.capturer&&this.capture({type:o.OnRequestResult,status:a.Fail,requestId:`\u2193${s}`,serviceMethod:g,error:l})}captureSendRequest(s,g,l){this.capturer&&this.capture({type:o.SendRequest,requestId:s,serviceMethod:g,arguments:l})}captureSendRequestResult(s,g,l){this.capturer&&this.capture({type:o.RequestResult,status:a.Success,requestId:s,serviceMethod:g,data:l})}captureSendRequestFail(s,g,l){this.capturer&&this.capture({type:o.RequestResult,status:a.Fail,requestId:s,serviceMethod:g,error:l})}captureSendNotification(s,g,l){this.capturer&&this.capture({type:o.SendNotification,serviceMethod:g,arguments:l,requestId:s})}captureOnNotification(s,g,l){this.capturer&&this.capture({type:o.OnNotification,serviceMethod:g,arguments:l,requestId:`\u2193${s}`})}dispose(){this._disposables.dispose()}}t.Capturer=m},29433:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(39048),t)},39048:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorMessageCode=void 0;var e;(function(n){n[n.ChannelNotFound=1]="ChannelNotFound"})(e||(t.ErrorMessageCode=e={}))},9811:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initRPCService=a,t.createRPCService=p,t.getRPCService=v;const n=e(85608),r=e(62199),o=e(8140);function a(m){return{createRPCService:(_,s)=>{const g=p(_,m);return s&&g.onRequestService(s),g},getRPCService:_=>v(_,m)}}function p(m,_){return new r.RPCServiceStub(m,_,o.ServiceType.Service).getProxy()}function v(m,_){return new r.RPCServiceStub(m,_,o.ServiceType.Stub).getProxy()}n.__exportStar(e(62199),t)},35821:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseConnection=void 0;class e{}t.BaseConnection=e},57358:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LengthFieldBasedFrameDecoder=t.indicator=void 0;const n=e(89212),r=e(43718),o=e(98710);t.indicator=new Uint8Array([13,10,13,10]);class a{constructor(){this.dataEmitter=new r.Emitter,this.onData=this.dataEmitter.event,this.buffers=new o.Buffers,this.cursor=this.buffers.cursor(),this.contentLength=-1,this.state=0,this.lengthFieldLength=4}reset(){this.contentLength=-1,this.state=0,this.cursor.reset()}push(v){this.buffers.push(v);let m=!1;for(;!m;)m=this.readFrame()}readFrame(){if(this.readLengthField()){const m=this.cursor.offset,_=m+this.contentLength,s=this.buffers.slice(m,_);if(this.dataEmitter.fire(s),this.buffers.byteLength>_)return this.contentLength=-1,this.state=0,this.cursor.moveTo(_),!1;this.buffers.splice(0,_),this.reset()}return!0}readLengthField(){const v=this.buffers.byteLength;if(this.state!==4){if(this.cursor.offset+t.indicator.length>v)return!1;this.readIndicator()}if(this.state!==4)return!1;if(this.contentLength===-1){if(this.cursor.offset+this.lengthFieldLength>v)return!1;const m=this.cursor.read(this.lengthFieldLength);this.contentLength=(0,r.readUInt32LE)(m,0)}return!(this.cursor.offset+this.contentLength>v)}readIndicator(){const v=this.cursor.iterator();let m=v.next();for(;!m.done;){switch(m.value){case 13:switch(this.state){case 0:this.state=1;break;case 2:this.state=3;break;default:this.state=0;break}break;case 10:switch(this.state){case 1:this.state=2;break;case 3:this.state=4,v.return();break;default:this.state=0;break}break;default:this.state=0;break}m=v.next()}}dispose(){this.dataEmitter.dispose(),this.buffers.dispose()}static construct(v){return a.writer.reset(),a.writer.buffer(t.indicator),a.writer.uint32(v.byteLength),a.writer.buffer(v),a.writer.dump()}}t.LengthFieldBasedFrameDecoder=a,a.writer=(0,n.BinaryWriter)({})},34982:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(35821),t),n.__exportStar(e(71056),t),n.__exportStar(e(57625),t),n.__exportStar(e(15272),t)},92917:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePortConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(a){super(),this.port=a,a.start()}send(a){this.port.postMessage(a)}onMessage(a){const p=v=>{a(v.data)};return this.port.addEventListener("message",p),{dispose:()=>{this.port.removeEventListener("message",p)}}}onceClose(a){return this.port.addEventListener("close",a),{dispose:()=>{this.port.addEventListener("close",a)}}}dispose(){}}t.MessagePortConnection=r},71056:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeMessagePortConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(a){super(),this.port=a}send(a){this.port.postMessage(a)}onMessage(a){return this.port.on("message",a),{dispose:()=>{this.port.off("message",a)}}}onceClose(a){return this.port.once("close",a),{dispose:()=>{this.port.off("close",a)}}}dispose(){this.port.removeAllListeners()}}t.NodeMessagePortConnection=r},91493:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReconnectingWebSocketConnection=void 0;const r=e(85608).__importDefault(e(31133)),o=e(35821);class a extends o.BaseConnection{constructor(v){super(),this.socket=v}send(v){this.socket.send(v)}isOpen(){return this.socket.readyState===this.socket.OPEN}onOpen(v){return this.socket.addEventListener("open",v),{dispose:()=>{this.socket.removeEventListener("open",v)}}}onMessage(v){const m=_=>{var s,g;let l;if(_.data instanceof Blob)l=_.data.arrayBuffer();else if(_.data instanceof ArrayBuffer)l=Promise.resolve(_.data);else if(((g=(s=_.data)===null||s===void 0?void 0:s.constructor)===null||g===void 0?void 0:g.name)==="Buffer")l=Promise.resolve(_.data);else throw new Error("unknown message type, expect Blob or ArrayBuffer, received: "+typeof _.data);l.then(h=>v(new Uint8Array(h,0,h.byteLength)))};return this.socket.addEventListener("message",m),{dispose:()=>{this.socket.removeEventListener("message",m)}}}onceClose(v){const m=this.onClose(_);return{dispose:()=>{m.dispose()}};function _(s,g){v(s,g),m.dispose()}}onClose(v){const m=_=>{v(_.code,_.reason)};return this.socket.addEventListener("close",m),{dispose:()=>{this.socket.removeEventListener("close",m)}}}onError(v){const m=_=>{v(_.error)};return this.socket.addEventListener("error",m),{dispose:()=>{this.socket.removeEventListener("error",m)}}}dispose(){}static forURL(v,m,_){const s=new r.default(v,m,_);return s.binaryType="arraybuffer",new a(s)}}t.ReconnectingWebSocketConnection=a},57625:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetSocketConnection=void 0;const n=e(36932);class r extends n.StreamConnection{constructor(a){super(a,a),this.socket=a}isOpen(){return this.socket.readyState==="open"}onOpen(a){return this.socket.on("connect",a),{dispose:()=>{this.socket.off("connect",a)}}}destroy(){this.socket.destroy()}}t.NetSocketConnection=r},36932:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamConnection=void 0;const n=e(35821),r=e(57358);class o extends n.BaseConnection{constructor(p,v){super(),this.readable=p,this.writable=v,this.decoder=new r.LengthFieldBasedFrameDecoder;const m=_=>{this.decoder.push(_)};this.readable.on("data",m),this.readable.once("close",()=>{this.decoder.dispose(),this.readable.off("data",m)})}send(p){const v=r.LengthFieldBasedFrameDecoder.construct(p);this.writable.write(v,()=>{})}onMessage(p){return this.decoder.onData(p)}onceClose(p){const v=this.onClose(m);return{dispose:()=>{v.dispose()}};function m(_,s){p(_,s),v.dispose()}}onClose(p){const v=m=>{p(m?1:0,m?"had error":"")};return this.readable.on("close",v),this.writable!==this.readable&&this.writable.on("close",v),{dispose:()=>{this.readable.off("close",v),this.writable!==this.readable&&this.writable.off("close",v)}}}onError(p){return this.readable.on("error",p),this.writable!==this.readable&&this.writable.on("error",p),{dispose:()=>{this.readable.off("error",p),this.writable!==this.readable&&this.writable.off("error",p)}}}dispose(){this.decoder.dispose()}}t.StreamConnection=o},15272:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSWebSocketConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(a){super(),this.socket=a}send(a){this.socket.send(a)}onMessage(a){return this.socket.on("message",a),{dispose:()=>{this.socket.off("message",a)}}}onceClose(a){return this.socket.once("close",a),{dispose:()=>{this.socket.off("close",a)}}}isOpen(){return this.socket.readyState===this.socket.OPEN}dispose(){this.socket.removeAllListeners()}}t.WSWebSocketConnection=r},90750:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(34982),t)},91676:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.METHOD_NOT_REGISTERED=void 0,t.METHOD_NOT_REGISTERED="$$METHOD_NOT_REGISTERED"},89104:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtObjectTransfer=t.AnySerializer=t.ProtocolType=void 0;const n=e(43718);var r;(function(v){v[v.String=0]="String",v[v.Buffer=1]="Buffer",v[v.Number=2]="Number",v[v.JSONObject=3]="JSONObject",v[v.BigInt=4]="BigInt",v[v.Array=5]="Array",v[v.Object=6]="Object",v[v.Undefined=7]="Undefined",v[v.Null=8]="Null",v[v.Boolean=9]="Boolean"})(r||(t.ProtocolType=r={}));class o{constructor(m,_,s){this.writer=m,this.reader=_,this.objectTransfer=s,this.deserialize=g=>(this.reader.reset(g),this.read()),this.serialize=g=>(this.writer.reset(),this.write(g),this.writer.dump())}write(m){var _;const{writer:s}=this,g=typeof m;switch(s.reserve(1),m){case null:s.uint8(r.Null);return;default:switch(g){case"undefined":s.uint8(r.Undefined);break;case"string":s.uint8(r.String),s.stringOfVarUInt32(m);break;case"boolean":s.reserve(1),s.uint8(r.Boolean),s.uint8(m?1:0);break;case"number":s.reserve(8),s.uint8(r.Number),s.double(m);break;case"bigint":s.reserve(8),s.uint8(r.BigInt),s.int64(m);break;case"object":if(Array.isArray(m)){s.reserve(4),s.uint8(r.Array),s.varUInt32(m.length);for(const l of m)this.write(l)}else(0,n.isUint8Array)(m)?(s.reserve(4),s.uint8(r.Buffer),s.varUInt32(m.byteLength),s.buffer(m)):(s.uint8(r.JSONObject),s.stringOfVarUInt32(JSON.stringify(m,(_=this.objectTransfer)===null||_===void 0?void 0:_.replacer)));break;default:throw new Error(`Unknown type ${g}`)}}}read(){var m;const{reader:_}=this,s=_.uint8();switch(s){case r.Undefined:return;case r.Null:return null;case r.String:return _.stringOfVarUInt32();case r.Buffer:{const g=_.varUInt32();return _.buffer(g)}case r.Number:return _.double();case r.JSONObject:{const g=_.stringOfVarUInt32();return JSON.parse(g,(m=this.objectTransfer)===null||m===void 0?void 0:m.reviver)}case r.BigInt:return _.int64();case r.Array:{const g=_.varUInt32(),l=[];for(let h=0;h<g;h++)l.push(this.read());return l}case r.Boolean:return _.uint8()===1;default:throw new Error(`Unknown type ${s}`)}}}t.AnySerializer=o;var a;(function(v){v.CODE_URI="CodeURI",v.BUFFER="Buffer"})(a||(a={}));class p{static replacer(m,_){if(_){switch(_.$mid){case 1:{const s=n.Uri.revive(_);return{$type:a.CODE_URI,data:s.toString()}}}if(_ instanceof Uint8Array||_ instanceof Uint32Array||_ instanceof Uint16Array)return{$type:"Buffer",data:Array.from(_)};if(_ instanceof ArrayBuffer)return{$type:"Buffer",data:Array.from(new Uint8Array(_))};if(_.type==="Buffer")return{$type:"Buffer",data:_.data}}return _}static reviver(m,_){if(_&&_.$type!==void 0&&_.data!==void 0)switch(_.$type){case a.CODE_URI:return n.Uri.parse(_.data);case a.BUFFER:return Uint8Array.from(_.data)}return _}}t.ExtObjectTransfer=p},94846:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oneOf=void 0;const n=e(26246),r=e(4405),o=8,a=(p,v)=>{v||(v=(0,r.furyFactory)());const{fury:m,reader:_,writer:s}=v,g=new Array(o),l=new Array(o),h={};return p.forEach((E,f)=>{const c=E.options.tag;g[f]=(0,n.generateSerializer)(m,E),l[f]=c,h[c]=f}),{deserialize:E=>{_.reset(E);const f=_.uint8();let c;switch(f){case 0:c=g[0].read();break;case 1:c=g[1].read();break;case 2:c=g[2].read();break;case 3:c=g[3].read();break;case 4:c=g[4].read();break;case 5:c=g[5].read();break;case 6:c=g[6].read();break;case 7:c=g[7].read();break}return c.kind=l[f],c},serialize:E=>{const f=h[E.kind];switch(s.reset(),s.uint8(f),f){case 0:g[0].write(E);break;case 1:g[1].write(E);break;case 2:g[2].write(E);break;case 3:g[3].write(E);break;case 4:g[4].write(E);break;case 5:g[5].write(E);break;case 6:g[6].write(E);break;case 7:g[7].write(E);break}return s.dump()}}};t.oneOf=a},4405:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.furyFactory=void 0;const r=e(85608).__importDefault(e(97419)),o=a=>{const p=new r.default(a),v=p.binaryReader,m=p.binaryWriter;return{fury:p,reader:v,writer:m}};t.furyFactory=o},25285:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(66748),t),n.__exportStar(e(62199),t),n.__exportStar(e(86058),t),n.__exportStar(e(15726),t),n.__exportStar(e(30613),t),n.__exportStar(e(47561),t),n.__exportStar(e(9811),t),n.__exportStar(e(8140),t),n.__exportStar(e(90750),t),n.__exportStar(e(54558),t),n.__exportStar(e(29433),t)},16908:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommonServerProtocol=void 0;const n=e(26387),r=e(43718);t.CommonServerProtocol={name:r.CommonServerPath,methods:[{method:"getBackendOS",request:[],response:{type:n.Type.uint16()}}]}},52890:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PositionProto=t.SelectionProto=t.RangeProto=t.UriComponentsProto=void 0;const n=e(26387);t.UriComponentsProto=n.Type.object("uri-components",{scheme:n.Type.string(),authority:n.Type.string(),path:n.Type.string(),query:n.Type.string(),fragment:n.Type.string()}),t.RangeProto=n.Type.object("range",{startLineNumber:n.Type.uint32(),startColumn:n.Type.uint32(),endLineNumber:n.Type.uint32(),endColumn:n.Type.uint32()}),t.SelectionProto=n.Type.object("selection",{selectionStartLineNumber:n.Type.uint32(),selectionStartColumn:n.Type.uint32(),positionLineNumber:n.Type.uint32(),positionColumn:n.Type.uint32()}),t.PositionProto=n.Type.object("position",{lineNumber:n.Type.uint32(),column:n.Type.uint32()})},11431:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDocumentProtocol=void 0;const n=e(26387),r=e(52890);t.ExtensionDocumentProtocol={name:"ExtHostDocuments",methods:[{method:"$fireModelChangedEvent",request:[{name:"event",type:n.Type.object("model-changed-event",{changes:n.Type.array(n.Type.object("model-changed-event-changes",{range:r.RangeProto,rangeLength:n.Type.uint32(),rangeOffset:n.Type.uint32(),text:n.Type.string()})),uri:n.Type.string(),versionId:n.Type.uint32(),eol:n.Type.string(),dirty:n.Type.bool(),isRedoing:n.Type.bool(),isUndoing:n.Type.bool()})}]},{method:"$fireModelOpenedEvent",request:[{name:"event",type:n.Type.object("model-open-event",{uri:n.Type.string(),lines:n.Type.array(n.Type.string()),eol:n.Type.string(),versionId:n.Type.uint32(),languageId:n.Type.string(),dirty:n.Type.bool()})}]},{method:"$provideTextDocumentContent",request:[{name:"path",type:n.Type.string()},{name:"encoding",type:n.Type.string()}],response:{type:n.Type.string()}}]}},26166:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceCenter=void 0,t.getNotificationName=s,t.getRequestName=g,t.getMethodName=l;const n=e(43718),r=e(96068),o=e(91676),a=e(8140),p=e(66748),v=e(92408),m=200;class _{constructor(u,d){this.bench=u,this._disposables=new n.DisposableStore,this.proxies=[],this.serviceRegistry=this._disposables.add(new v.ServiceRegistry),this.protocolRegistry=this._disposables.add(new v.ProtocolRegistry),this.deferred=new n.Deferred,this._reportThreshold=m,this.uid=(0,n.randomString)(6),this.logger=d||console}setReporter(u,d=m){this._reporterService=u,this._reportThreshold=d}registerService(u,d){d===a.ServiceType.Service&&this.bench&&this.bench.registerService(u)}ready(){return this.deferred.promise}loadProtocol(u){this.protocolRegistry.addProtocol(u,{nameConverter:d=>l(u.name,d)})}setSumiConnection(u){this.proxies.length===0&&this.deferred.resolve(),this.protocolRegistry.applyTo(u.io);const d=new p.ProxySumi(this.serviceRegistry,this.logger);d.listen(u);const E=(0,r.addElement)(this.proxies,d);return{dispose:()=>{E.dispose(),d.dispose()}}}setConnection(u){this.proxies.length===0&&this.deferred.resolve();const d=new p.ProxyJson(this.serviceRegistry,this.logger);d.listen(u);const E=(0,r.addElement)(this.proxies,d);return{dispose:()=>{E.dispose(),d.dispose()}}}onRequest(u,d,E){this.serviceRegistry.register(l(u,d),E)}onRequestService(u,d){this.serviceRegistry.registerService(d,{nameConverter:E=>l(u,E)})}async broadcast(u,d,...E){await this.ready();const f=l(u,d);let c;this._reporterService&&(c=this._reporterService.time(n.REPORT_NAME.RPC_TIMMING_MEASURE));const y=await Promise.all(this.proxies.map(S=>S.invoke(f,...E))),b=[],A=[];for(const S of y)S===o.METHOD_NOT_REGISTERED?b.push(S):A.push(S);if(b.length>0&&this.logger.warn(`broadcast rpc \`${f}\` getting doubtful responses: ${b.join(",")}`),A.length===0)throw c&&c.timeEnd(f,{success:!1},{minimumReportThresholdTime:this._reportThreshold}),new Error(`broadcast rpc \`${f}\` error: no remote service can handle this call`);return c&&c.timeEnd(f,{success:!0},{minimumReportThresholdTime:this._reportThreshold}),A.length===1?A[0]:A}dispose(){this._disposables.dispose(),this.proxies.forEach(u=>u.dispose()),this.proxies=[]}}t.RPCServiceCenter=_;function s(h,u){return`on:${h}:${u}`}function g(h,u){return`${h}:${u}`}function l(h,u){return u.startsWith("on")?s(h,u):g(h,u)}},62199:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCService=void 0;const n=e(85608);n.__exportStar(e(68855),t),n.__exportStar(e(26166),t),n.__exportStar(e(92408),t);class r{get client(){return this.rpcClient?this.rpcClient[0]:void 0}}t.RPCService=r},59875:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyBase=void 0;const n=e(43718),r=new Set(["then","finally"]);let o=0;class a{constructor(v,m){this.registry=v,this.connectionPromise=new n.Deferred,this._disposables=new n.DisposableStore,this.logger=m||console,this.registry.onServicesUpdate(_=>{this.connection&&this.bindMethods(_)})}nextRequestId(){return String(o++)}listen(v){this.connection=v,this._disposables.add(this.connection),this.bindMethods(this.registry.methods()),v.listen(),this.connectionPromise.resolve()}listenService(v){this.registry.registerService(v)}dispose(){this._disposables.dispose()}getInvokeProxy(){return new Proxy(Object.create(null),{get:(v,m)=>typeof m!="string"?null:r.has(m)?Promise.resolve():(v[m]||(v[m]=(..._)=>this.invoke(m,..._)),v[m])})}}t.ProxyBase=a},66748:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(33716),t),n.__exportStar(e(16420),t)},33716:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyJson=void 0;const n=e(30613),r=e(91676),o=e(59875);class a extends o.ProxyBase{constructor(){super(...arguments),this.engine="json",this.capturer=this._disposables.add(new n.Capturer(this.engine))}bindMethods(v){for(const m of v)m.startsWith("on")?this.connection.onNotification(m,async(..._)=>{this.capturer.captureOnNotification("_",m,_);try{await this.registry.invoke(m,...this.serializeArguments(_))}catch(s){this.logger.warn(`notification exec ${m} error`,s)}}):this.connection.onRequest(m,async(..._)=>{const s=this.nextRequestId();this.capturer.captureOnRequest(s,m,_);try{const g=await this.registry.invoke(m,...this.serializeArguments(_));return this.capturer.captureOnRequestResult(s,m,g),{error:!1,data:g}}catch(g){return this.capturer.captureOnRequestFail(s,m,g),{error:!0,data:{message:g.message,stack:g.stack}}}})}async invoke(v,...m){await this.connectionPromise.promise;let _=!1;if(m.length===1&&Array.isArray(m[0])&&(_=!0),v.startsWith("on"))this.capturer.captureSendNotification("_",v,m),_?this.connection.sendNotification(v,[...m]):this.connection.sendNotification(v,...m);else{const s=this.nextRequestId();let g;_?g=this.connection.sendRequest(v,[...m]):g=this.connection.sendRequest(v,...m),this.capturer.captureSendRequest(s,v,m);const l=await g;if(l.error){const h=new Error(l.data.message);throw l.data.stack&&(h.stack=l.data.stack),this.capturer.captureSendRequestFail(s,v,l.data),h}else return this.capturer.captureSendRequestResult(s,v,l.data),l.data}}serializeArguments(v){const m=v[v.length-1];return v.length===2&&Array.isArray(v[0])&&Object.prototype.hasOwnProperty.call(m,"_isCancelled")?[...v[0],m]:v}listen(v){super.listen(v),this._disposables.add(v.onRequest(m=>{if(!this.registry.has(m)){const _=this.nextRequestId();this.capturer.captureOnRequest(_,m,[]);const s={data:r.METHOD_NOT_REGISTERED};return this.capturer.captureOnRequestFail(_,m,s.data),s}}))}}t.ProxyJson=a},16420:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxySumi=void 0;const n=e(91676),r=e(59875);class o extends r.ProxyBase{constructor(){super(...arguments),this.engine="sumi"}bindMethods(p){for(const v of p)v.startsWith("on")?this.connection.onNotification(v,async(...m)=>{try{await this.registry.invoke(v,...m)}catch(_){this.logger.warn(`notification exec ${v} error`,_)}}):this.connection.onRequest(v,async(...m)=>await this.registry.invoke(v,...m))}async invoke(p,...v){if(await this.connectionPromise.promise,p.startsWith("on"))this.connection.sendNotification(p,...v);else return await this.connection.sendRequest(p,...v)}listen(p){super.listen(p),this._disposables.add(p.onRequestNotFound(()=>{throw n.METHOD_NOT_REGISTERED}))}}t.ProxySumi=o},92408:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolRegistry=t.ServiceRegistry=void 0,t.getServiceMethods=o;const n=e(43718),r=new Set(["constructor"]);function o(v){const m=new Set;let _=v;do{const g=Object.getOwnPropertyNames(_);for(const l of g)r.has(l)||typeof v[l]=="function"&&m.add(l)}while(_=Object.getPrototypeOf(_));const s=Array.from(m);return s.sort(),s}class a{constructor(){this._disposables=new n.DisposableStore,this.emitter=this._disposables.add(new n.Emitter),this.onServicesUpdate=this.emitter.event,this.serviceMethodMap=new Map}register(m,_){this.serviceMethodMap.set(m,_),this.emitter.fire([m])}registerService(m,_){const s=[],{nameConverter:g}=_||{},l=o(m);for(const h of l){let u=h;g&&(u=g(h)),this.serviceMethodMap.set(u,m[h].bind(m)),s.push(u)}this.emitter.fire(s)}has(m){return this.serviceMethodMap.has(m)}invoke(m,..._){return this.serviceMethodMap.get(m)(..._)}methods(){return Array.from(this.serviceMethodMap.keys())}dispose(){this._disposables.dispose()}}t.ServiceRegistry=a;class p{constructor(){this._disposables=new n.DisposableStore,this.emitter=this._disposables.add(new n.Emitter),this.onProtocolUpdate=this.emitter.event,this.protocolMap=new Map}addProtocol(m,_){const s=[],{nameConverter:g}=_||{},{methods:l}=m;for(const h of l){let u=h.method;g&&(u=g(u)),this.protocolMap.set(u,{...h,method:u}),s.push(u)}this.emitter.fire(s)}applyTo(m){if(m.loadProtocolMethod){for(const _ of this.protocolMap.values())m.loadProtocolMethod(_);this._disposables.add(this.onProtocolUpdate(_=>{if(m.loadProtocolMethod)for(const s of _){const g=this.protocolMap.get(s);g&&m.loadProtocolMethod(g)}}))}}dispose(){this._disposables.dispose()}}t.ProtocolRegistry=p},68855:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceStub=void 0;class e{constructor(r,o,a){this.serviceName=r,this.center=o,this.type=a,this.getProxy=()=>new Proxy(this,{get:(p,v)=>typeof v=="symbol"?Promise.resolve():(p[v]||(p[v]=(...m)=>this.broadcast(v,...m)),p[v])}),this.center.registerService(r,this.type)}on(r,o){this.onRequest(r,o)}onRequestService(r){this.center.onRequestService(this.serviceName,r)}onRequest(r,o){this.center.onRequest(this.serviceName,r,o)}broadcast(r,...o){return this.center.broadcast(this.serviceName,r,...o)}}t.RPCServiceStub=e},97349:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiConnection=void 0;const n=e(43718),r=e(70392),o=e(93062),a=e(30613),p=e(90750),v=e(91676),m=e(48218),_=e(76339),s={},g={chunked:!0};class l{constructor(u,d={}){this.socket=u,this.options=d,this.disposable=new r.DisposableStore,this._requestHandlers=new Map,this._notificationHandlers=new Map,this._requestId=0,this._callbacks=new Map,this._reqTimeoutHandles=new Map,this._cancellationTokenSources=new Map,this._knownCanceledRequests=new Set,this.activeRequestPool=new Map,d.logger?this.logger=d.logger:this.logger=(0,n.getDebugLogger)(),this.io=d.io||new _.MessageIO,this.capturer=new a.Capturer(d.name||"sumi"),this.disposable.add(this.capturer)}sendNotification(u,...d){const E=this._requestId++;this.capturer.captureSendNotification(E,u,d),this.socket.send(this.io.Notification(E,u,s,d))}sendRequest(u,...d){return new Promise((E,f)=>{const c=this._requestId++;if(this._callbacks.set(c,(b,A,S)=>{if(A){if(this.traceRequestError(c,u,d,A),A===v.METHOD_NOT_REGISTERED){E(A);return}f(A);return}this.capturer.captureSendRequestResult(c,u,S),E(S)}),this.options.timeout&&this.options.timeout!==-1){const b=setTimeout(()=>{this._handleTimeout(u,c)},this.options.timeout);this._reqTimeoutHandles.set(c,b)}const y=d.length&&r.CancellationToken.isCancellationToken(d[d.length-1])?d.pop():void 0;if(y&&y.isCancellationRequested)return Promise.reject((0,r.canceled)());y&&y.onCancellationRequested(()=>this.cancelRequest(c)),this.capturer.captureSendRequest(c,u,d),this.socket.send(this.io.Request(c,u,{cancelable:!!y||void 0},d))})}cancelRequest(u){this.socket.send(this.io.Cancel(u))}_handleTimeout(u,d){if(!this._callbacks.has(d)||!this._reqTimeoutHandles.has(d))return;const E=this._callbacks.get(d);this._callbacks.delete(d),this._reqTimeoutHandles.delete(d),E(s,new m.MethodTimeoutError(u))}onRequest(u,d){return this._requestHandlers.set(u,d),{dispose:()=>{this._requestHandlers.delete(u)}}}onRequestNotFound(u){return this._starRequestHandler=u,{dispose:()=>{this._starRequestHandler=void 0}}}onNotification(u,d){return this._notificationHandlers.set(u,d),{dispose:()=>{this._notificationHandlers.delete(u)}}}onNotificationNotFound(u){return this._starNotificationHandler=u,{dispose:()=>{this._starNotificationHandler=void 0}}}listen(){this.disposable.add(this.socket.onMessage(u=>{const d=this.io.parse(u),E=d.kind,f=d.requestId;switch(E===_.OperationType.Error&&this.logger.warn(`[${d.requestId}] Error received from server method ${d.method}: ${d.error}`),E){case _.OperationType.Error:case _.OperationType.Response:{const{headers:c,method:y}=d,b=d.error,A=d.result;this._reqTimeoutHandles.has(f)&&(clearTimeout(this._reqTimeoutHandles.get(f)),this._reqTimeoutHandles.delete(f));const S=(D,I,w)=>{const T=this._callbacks.get(f);if(!T){this.logger.error(`Cannot find callback for request ${f}: ${y}`);return}this._callbacks.delete(f),T(D,I,w)};if(c&&c.chunked){let D;if(this.activeRequestPool.has(f)?D=this.activeRequestPool.get(f):(D=new o.SumiReadableStream,this.activeRequestPool.set(f,D),S(c,void 0,D)),A===null){D.end(),this.activeRequestPool.delete(f);break}if(b){D.emitError(b);break}D.emitData(A);break}S(c,b,A);break}case _.OperationType.Notification:case _.OperationType.Request:{const{method:c,headers:y,args:b}=d;if(y.cancelable){const A=new r.CancellationTokenSource;this._cancellationTokenSources.set(f,A),b.push(A.token),this._knownCanceledRequests.has(f)&&(A.cancel(),this._knownCanceledRequests.delete(f))}switch(E){case _.OperationType.Request:{this.capturer.captureOnRequest(f,c,b);let A;try{let I;const w=this._requestHandlers.get(c);w?I=w(...b):this._starRequestHandler&&(I=this._starRequestHandler(c,b)),A=Promise.resolve(I)}catch(I){A=Promise.reject(I)}const S=I=>{this.capturer.captureOnRequestResult(f,c,I),(0,o.isReadableStream)(I)?(0,o.listenReadable)(I,{onData:w=>{this.socket.send(this.io.Response(f,c,g,w))},onEnd:()=>{this.socket.send(this.io.Response(f,c,g,null)),this._cancellationTokenSources.delete(f)},onError:w=>{this.socket.send(this.io.Error(f,c,g,w)),this._cancellationTokenSources.delete(f)}}):(this.socket.send(this.io.Response(f,c,s,I)),this._cancellationTokenSources.delete(f))},D=I=>{this.traceRequestError(f,c,b,I),this.socket.send(this.io.Error(f,c,s,I)),this._cancellationTokenSources.delete(f)};A.then(S).catch(D);break}case _.OperationType.Notification:{this.capturer.captureOnNotification(f,c,b);const A=this._notificationHandlers.get(c);A?A(...b):this._starNotificationHandler&&this._starNotificationHandler(c,b);break}}break}case _.OperationType.Cancel:{const c=this._cancellationTokenSources.get(f);c?c.cancel():this._knownCanceledRequests.add(f);break}default:break}}))}dispose(){this.disposable.dispose()}static forWSWebSocket(u,d={}){return new l(new p.WSWebSocketConnection(u),d)}static forNetSocket(u,d={}){return new l(new p.NetSocketConnection(u),d)}traceRequestError(u,d,E,f){this.capturer.captureSendRequestFail(u,d,f)}toJSON(){throw new Error(`You're trying to serialize a SumiConnection instance, which is not allowed.
31923
31923
  Please check your code, and remove the rpc proxy reference.`)}}t.SumiConnection=l},48218:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MethodTimeoutError=void 0;class e extends Error{constructor(r){super(`method ${r} timeout`)}}t.MethodTimeoutError=e},76339:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawMessageIO=t.MessageIO=t.IMessageIO=t.AnyProtocolSerializer=t.HeadersProto=t.OperationType=void 0;const n=e(26387),r=e(26246),o=e(86560),a=e(89104),p=e(4405),v=1;var m;(function(d){d[d.Request=0]="Request",d[d.Notification=1]="Notification",d[d.Response=2]="Response",d[d.Cancel=3]="Cancel",d[d.Error=4]="Error"})(m||(t.OperationType=m={})),t.HeadersProto={Request:n.Type.object("req-headers",{cancelable:n.Type.bool()}),Response:n.Type.object("resp-headers",{chunked:n.Type.bool()})};const _={Request:m.Request<<8|v,Notification:m.Notification<<8|v,Response:m.Response<<8|v,Cancel:m.Cancel<<8|v,Error:m.Error<<8|v};class s{constructor(E,f){this.fury=f;const c=[];for(const A of E.request)c.push(A.type);const y=n.Type.tuple(c);let b=n.Type.any();E.response&&E.response.type&&(b=E.response.type),this.request=this.fury.registerSerializer(y),this.result=this.fury.registerSerializer(b)}writeRequest(E){return this.request.serializer.write(E)}readRequest(){return this.request.serializer.read()}writeResponse(E){return this.result.serializer.write(E)}readResponse(){return this.result.serializer.read()}}class g{constructor(E,f,c){this.writer=E,this.reader=f,this.anySerializer=new a.AnySerializer(this.writer,this.reader,c)}writeRequest(E){this.anySerializer.write(E)}readRequest(){return this.anySerializer.read()}writeResponse(E){this.anySerializer.write(E)}readResponse(){return this.anySerializer.read()}}t.AnyProtocolSerializer=g;class l{}t.IMessageIO=l;class h extends l{constructor(){super(),this.serializerMap=new Map;const E=(0,p.furyFactory)();this.fury=E.fury,this.reader=E.reader,this.writer=E.writer,this.requestHeadersSerializer=(0,r.generateSerializer)(this.fury,t.HeadersProto.Request),this.responseHeadersSerializer=(0,r.generateSerializer)(this.fury,t.HeadersProto.Response),this.anySerializer=new g(this.writer,this.reader)}setAnySerializer(E){this.anySerializer=E}has(E){return this.serializerMap.has(E)}loadProtocol(E,f){const{methods:c}=E;for(const y of c)this.loadProtocolMethod(y,f)}loadProtocolMethod(E,f){let c=E.method;f?.nameConverter&&(c=f.nameConverter(c)),this.serializerMap.set(c,new s(E,this.fury))}getProcessor(E){const f=this.serializerMap.get(E);return f||this.anySerializer}Notification(E,f,c,y){const{writer:b}=this;return b.reset(),b.uint16(_.Notification),b.uint32(E),b.stringOfVarUInt32(f),this.requestHeadersSerializer.write(c),this.getProcessor(f).writeRequest(y),b.dump()}Request(E,f,c,y){const{writer:b}=this;return b.reset(),b.uint16(_.Request),b.uint32(E),b.stringOfVarUInt32(f),this.requestHeadersSerializer.write(c),this.getProcessor(f).writeRequest(y),b.dump()}Cancel(E){const{writer:f}=this;return f.reset(),f.uint16(_.Cancel),f.uint32(E),f.dump()}Response(E,f,c,y){const{writer:b}=this;return b.reset(),b.uint16(_.Response),b.uint32(E),b.stringOfVarUInt32(f),this.responseHeadersSerializer.write(c),this.getProcessor(f).writeResponse(y),b.dump()}Error(E,f,c,y){const{writer:b}=this;return b.reset(),b.uint16(_.Error),b.uint32(E),b.stringOfVarUInt32(f),this.responseHeadersSerializer.write(c),b.stringOfVarUInt32((0,o.stringifyError)(y)),b.dump()}parse(E){const{reader:f}=this;f.reset(E),f.skip(1);const c=f.uint8(),y=f.uint32();switch(c){case m.Request:case m.Notification:{const b=f.stringOfVarUInt32(),A=this.requestHeadersSerializer.read(),S=this.getProcessor(b).readRequest();return{kind:c,requestId:y,method:b,headers:A,args:S}}case m.Error:{const b=f.stringOfVarUInt32(),A=this.responseHeadersSerializer.read(),S=(0,o.parseError)(f.stringOfVarUInt32());return{kind:m.Error,requestId:y,method:b,headers:A,error:S}}case m.Response:{const b=f.stringOfVarUInt32(),A=this.responseHeadersSerializer.read(),S=this.getProcessor(b).readResponse();return{kind:m.Response,requestId:y,method:b,headers:A,result:S}}case m.Cancel:return{kind:m.Cancel,requestId:y};default:throw new Error(`Unknown message type: ${c}`)}}}t.MessageIO=h;class u{Request(E,f,c,y){return{kind:m.Request,requestId:E,method:f,headers:c,args:y}}Notification(E,f,c,y){return{kind:m.Notification,requestId:E,method:f,headers:c,args:y}}Cancel(E){return{kind:m.Cancel,requestId:E}}Response(E,f,c,y){return{kind:m.Response,requestId:E,headers:c,method:f,result:y}}Error(E,f,c,y){return{kind:m.Error,requestId:E,method:f,headers:c,error:y}}parse(E){return E}}t.RawMessageIO=u},86058:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiConnectionMultiplexer=t.IRPCProtocol=t.ProxyIdentifier=void 0,t.createExtMessageIO=p;const n=e(89104),r=e(97349),o=e(76339);class a{constructor(_){this.serviceId=_,this.countId=++a.count}static for(_){return new a(_)}}t.ProxyIdentifier=a,a.count=0,t.IRPCProtocol=Symbol("IRPCProtocol");function p(m){const _=new o.MessageIO;return _.setAnySerializer(new o.AnyProtocolSerializer(_.writer,_.reader,n.ExtObjectTransfer)),m?.forEach((s,g)=>{_.loadProtocol(s,{nameConverter:l=>v.getRPCName(g.serviceId,l)})}),_}class v extends r.SumiConnection{static getRPCName(_,s){return`${_}${v.SEP}${s}`}static extractServiceAndMethod(_){const s=_.indexOf(v.SEP);return[_.substring(0,s),_.substring(s+v.SEP_LENGTH)]}static normalizeServiceId(_){return _.replace(/\//g,"_")}constructor(_,s={}){super(_,{...s,io:s.io||p()}),this.socket=_,this.options=s,this._locals=new Map,this._proxies=new Map,this.onRequestNotFound((g,l)=>this.invoke(g,l)),this.listen()}set(_,s){const g=v.normalizeServiceId(_.serviceId);return this._locals.set(g,s),s}get(_){return this._locals.get(v.normalizeServiceId(_.serviceId))}getProxy(_){const s=v.normalizeServiceId(_.serviceId);return this._proxies.has(s)||this._proxies.set(s,this._createProxy(s)),this._proxies.get(s)}_createProxy(_){const s={get:(g,l)=>{if(typeof l=="symbol")return null;if(!g[l])if(l.charCodeAt(0)===36){const h=v.getRPCName(_,l);g[l]=(...u)=>this.sendRequest(h,...u)}else l==="toJSON"&&(g[l]=()=>{throw new Error("Cannot serialize a rpc protocol proxy object")});return g[l]}};return new Proxy(Object.create(null),s)}async invoke(_,s){const[g,l]=v.extractServiceAndMethod(_),h=this._locals.get(g);if(!h)throw new Error("Unknown actor "+g);const u=await h[l];if(typeof u!="function")throw new Error("Unknown method "+l+" on actor "+g);return u.apply(h,s)}getSocket(){return this.socket}}t.SumiConnectionMultiplexer=v,v.SEP="/",v.SEP_LENGTH=v.SEP.length},15726:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCProtocol=t.MessageIO=t.ObjectTransfer=t.ProxyIdentifier=t.IRPCProtocol=t.RPCProtocolEnv=void 0,t.createExtHostContextProxyIdentifier=a,t.createMainContextProxyIdentifier=p;const n=e(43718),r=e(86058);Object.defineProperty(t,"IRPCProtocol",{enumerable:!0,get:function(){return r.IRPCProtocol}}),Object.defineProperty(t,"ProxyIdentifier",{enumerable:!0,get:function(){return r.ProxyIdentifier}});var o;(function(g){g[g.MAIN=0]="MAIN",g[g.EXT=1]="EXT"})(o||(t.RPCProtocolEnv=o={}));function a(g){return new r.ProxyIdentifier(g)}function p(g){return new r.ProxyIdentifier(g)}var v;(function(g){function l(u,d){if(d){if(d.$mid===1)return{$type:"VSCODE_URI",data:n.Uri.revive(d).toString()};if(d instanceof Uint8Array||d instanceof Uint32Array||d instanceof Uint16Array)return{$type:"Buffer",data:Array.from(d)};if(d instanceof ArrayBuffer)return{$type:"Buffer",data:Array.from(new Uint8Array(d))};if(d.type==="Buffer")return{$type:"Buffer",data:d.data}}return d}g.replacer=l;function h(u,d){if(d&&d.$type!==void 0&&d.data!==void 0){if(d.$type==="VSCODE_URI")return n.Uri.parse(d.data);if(d.$type==="Buffer")return Uint8Array.from(d.data)}return d}g.reviver=h})(v||(t.ObjectTransfer=v={}));class m{static cancel(l,h){return`{"type":4,"id":"${l}"}`}static serializeRequest(l,h,u,d){return d=d.map(E=>{if(E instanceof Error){const f=Array.prototype.slice.call(arguments);return f[0]=E.stack,f.join(`
31924
31924
  `)}return E}),`{"type": 1, "id": "${l}", "proxyId": "${h}", "method": "${u}", "args": ${JSON.stringify(d,v.replacer)}}`}static serializeReplyOK(l,h,u){if(typeof h>"u")return`{"type": 2, "id": "${l}"}`;try{return`{"type": 2, "id": "${l}", "res": ${JSON.stringify(h,v.replacer)}}`}catch{return u&&u.warn("res",h),`{"type": 2, "id": "${l}", "res": {}}`}}static serializeReplyError(l,h,u){try{return`{"type": 3, "id": "${l}", "res": ${JSON.stringify((0,n.transformErrorForSerialization)(h),v.replacer)}}`}catch{return u&&u.error("error",h),`{"type": 3, "id": "${l}", "res": {}}`}}}t.MessageIO=m;function _(){const g=new Error("Canceled");return g.name=g.message,g}class s{constructor(l,h){this._protocol=l,this._locals=new Map,this._proxies=new Map,this._pendingRPCReplies=new Map,this._cancellationTokenSources=new Map,this._timeoutHandles=new Map,this._lastMessageId=0,this.logger=h||console,this.logger.error("You are using the deprecated class: 'RPCProtocol'. Please use the new one: 'SumiConnectionMultiplexer'"),this._protocol.onMessage(u=>this._receiveOneMessage(u))}set(l,h){return this._locals.set(l.serviceId,h),h}get(l){return this._locals.get(l.serviceId)}getProxy(l){return this._proxies.has(l.serviceId)||this._proxies.set(l.serviceId,this._createProxy(l.serviceId)),this._proxies.get(l.serviceId)}_createProxy(l){const h={get:(u,d)=>typeof d=="symbol"?null:(!u[d]&&d.charCodeAt(0)===36&&(u[d]=(...E)=>this._remoteCall(l,d,E)),u[d])};return new Proxy(Object.create(null),h)}_remoteCall(l,h,u){const d=u.length&&n.CancellationToken.isCancellationToken(u[u.length-1])?u.pop():void 0;if(d&&d.isCancellationRequested)return Promise.reject(_());const E=String(++this._lastMessageId),f=new n.Deferred;d&&(u.push("add.cancellation.token"),d.onCancellationRequested(()=>this._protocol.send(m.cancel(E)))),this._pendingRPCReplies.set(E,f);const c=m.serializeRequest(E,l,h,u);if(this._protocol.send(c),this._protocol.timeout&&this._protocol.timeout!==-1){const y=setTimeout(()=>{this._handleTimeout(E)},this._protocol.timeout);this._timeoutHandles.set(E,y)}return f.promise}_receiveOneMessage(l){const h=JSON.parse(l,v.reviver);switch(this._timeoutHandles.has(h.id)&&(typeof clearTimeout=="function"&&clearTimeout(this._timeoutHandles.get(h.id)),this._timeoutHandles.delete(h.id)),h.type){case 1:this._receiveRequest(h);break;case 2:this._receiveReply(h);break;case 4:this._receiveCancel(h);break;case 3:this._receiveError(h);break}}_receiveCancel(l){const h=this._cancellationTokenSources.get(l.id);h&&h.cancel()}_receiveError(l){const h=l.id;if(!this._pendingRPCReplies.has(h))return;const u=this._pendingRPCReplies.get(h);this._pendingRPCReplies.delete(h);let d;l.res&&(l.res.$isError?(d=new Error,d.name=l.res.name,d.message=l.res.message,d.stack=l.res.stack):d=l.res),u.reject(d)}_receiveRequest(l){const h=l.id,u=l.proxyId,d=l.method,E=l.args.map(y=>y===null?void 0:y);if(E.length&&E[E.length-1]==="add.cancellation.token"?E.pop():!1){const y=new n.CancellationTokenSource;this._cancellationTokenSources.set(h,y),E.push(y.token)}this._invokeHandler(u,d,E).then(y=>{this._protocol.send(m.serializeReplyOK(h,y)),this._cancellationTokenSources.delete(h)}).catch(y=>{this._protocol.send(m.serializeReplyError(h,y)),this._cancellationTokenSources.delete(h)})}_invokeHandler(l,h,u){try{return this._doInvokeHandler(l,h,u)}catch(d){return Promise.reject(d)}}async _doInvokeHandler(l,h,u){const d=this._locals.get(l);if(!d)throw new Error("Unknown actor "+l);const E=await d[h];if(typeof E!="function")throw new Error("Unknown method "+h+" on actor "+l);return E.apply(d,u)}_receiveReply(l){const h=l.id;if(!this._pendingRPCReplies.has(h))return;const u=this._pendingRPCReplies.get(h);this._pendingRPCReplies.delete(h),u.resolve(l.res)}_handleTimeout(l){if(!this._pendingRPCReplies.has(l)||!this._timeoutHandles.has(l))return;const h=this._pendingRPCReplies.get(l);this._pendingRPCReplies.delete(l),this._timeoutHandles.delete(l),h.reject(new Error("RPC Timeout: "+l))}}t.RPCProtocol=s},64592:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.furySerializer=t.CloseProtocol=t.BinaryProtocol=t.DataProtocol=t.ErrorProtocol=t.ServerReadyProtocol=t.OpenProtocol=t.PongProtocol=t.PingProtocol=void 0;const n=e(26387),r=e(94846);function o(){return{id:n.Type.string()}}t.PingProtocol=n.Type.object("ping",{...o()}),t.PongProtocol=n.Type.object("pong",{...o()}),t.OpenProtocol=n.Type.object("open",{...o(),clientId:n.Type.string(),path:n.Type.string(),traceId:n.Type.string()}),t.ServerReadyProtocol=n.Type.object("server-ready",{...o(),traceId:n.Type.string()}),t.ErrorProtocol=n.Type.object("error",{...o(),code:n.Type.uint16(),message:n.Type.string()}),t.DataProtocol=n.Type.object("data",{...o(),content:n.Type.string()}),t.BinaryProtocol=n.Type.object("binary",{...o(),binary:n.Type.binary()}),t.CloseProtocol=n.Type.object("close",{...o(),code:n.Type.uint32(),reason:n.Type.string()});const a=(0,r.oneOf)([t.PingProtocol,t.PongProtocol,t.OpenProtocol,t.ServerReadyProtocol,t.DataProtocol,t.BinaryProtocol,t.CloseProtocol,t.ErrorProtocol]);t.furySerializer=a},54558:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapSerializer=void 0;const n=e(85608);n.__exportStar(e(64592),t),n.__exportStar(e(43620),t),n.__exportStar(e(41619),t);const r=(o,a)=>({onceClose(p){return o.onceClose(p)},onMessage(p){return o.onMessage(v=>{p(a.deserialize(v))})},send(p){o.send(a.serialize(p))}});t.wrapSerializer=r},43620:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rawSerializer=void 0,t.rawSerializer={serialize:e=>e,deserialize:e=>e}},41619:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},76271:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceChannelPath=t.BaseCommonChannelHandler=t.CommonChannelPathHandler=void 0,t.injectConnectionProviders=m;const n=e(39048),r=e(54558),o=e(47561);class a{constructor(){this.handlerMap=new Map,this.paramsKey=new Map}register(s,g){const l=s.indexOf("/:"),h=l>=0;let u=s;h&&(u=s.slice(0,l),this.paramsKey.set(u,s.slice(l+2))),this.handlerMap.has(u)||this.handlerMap.set(u,[]);const d=this.handlerMap.get(u),E=g.handler.bind(g),f=(c,y,b)=>{g.connection=c,E(c,y,b)};g.handler=f,d.push(g),this.handlerMap.set(u,d)}getParams(s,g){const l={};if(this.paramsKey.has(s)){const h=this.paramsKey.get(s);h&&(l[h]=g)}return l}removeHandler(s,g){const l=s.indexOf(":"),h=l>=0;let u=s;h&&(u=s.slice(0,l));const d=this.handlerMap.get(u)||[],E=d.indexOf(g);E!==-1&&d.splice(E,1),this.handlerMap.set(s,d)}get(s){return this.handlerMap.get(s)}disposeConnectionClientId(s,g){this.handlerMap.forEach(l=>{l.forEach(h=>{h.dispose(s,g)})})}openChannel(s,g,l){let h=this.get(s),u;if(!h){const d=s.indexOf("/");d>=0&&(h=this.get(s.slice(0,d)),u=this.getParams(s.slice(0,d),s.slice(d+1)))}if(h)for(let d=0,E=h.length;d<E;d++)h[d].handler(g,l,u)}getAll(){return Array.from(this.handlerMap.values())}}t.CommonChannelPathHandler=a;var p;(function(_){_[_.ConnectionClosed=1]="ConnectionClosed",_[_.NewChannelOpened=2]="NewChannelOpened"})(p||(p={}));class v{constructor(s,g,l=console,h={}){this.handlerId=s,this.commonChannelPathHandler=g,this.logger=l,this.channelMap=new Map,this.heartbeatTimer=null,this.serializer=r.furySerializer,h.serializer&&(this.serializer=h.serializer)}heartbeat(s){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer),this.heartbeatTimer=setTimeout(()=>{this.doHeartbeat(s),this.heartbeat(s)},5e3)}receiveConnection(s){let g;this.heartbeat(s);const l=(0,r.wrapSerializer)(s,this.serializer);l.onMessage(h=>{try{switch(h.kind){case"open":{const{id:u,path:d,traceId:E}=h;g=h.clientId,this.logger.log(`open a new connection channel ${g} with path ${d}`);let f=this.channelMap.get(u);f&&(f.close(p.NewChannelOpened,"new channel opened for the same channel id"),f.dispose()),f=new o.WSServerChannel(l,{id:u,clientId:g,logger:this.logger}),this.channelMap.set(u,f),this.commonChannelPathHandler.openChannel(d,f,g),f.serverReady(E);break}default:{const{id:u}=h,d=this.channelMap.get(u);d?d.dispatch(h):(l.send({kind:"error",id:u,code:n.ErrorMessageCode.ChannelNotFound,message:`channel ${u} not found`}),this.logger.warn(`channel ${u} is not found`))}}}catch(u){this.logger.error("handle connection message error",u)}}),s.onceClose(()=>{this.logger.log(`connection ${g} is closed, dispose all channels`),this.commonChannelPathHandler.disposeConnectionClientId(s,g),Array.from(this.channelMap.values()).filter(h=>h.clientId===g).forEach(h=>{h.close(p.ConnectionClosed,"connection closed"),h.dispose(),this.channelMap.delete(h.id),this.logger.log(`Remove connection channel ${h.id}`)})})}dispose(){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer)}}t.BaseCommonChannelHandler=v,t.RPCServiceChannelPath="RPCService";function m(_){const s=new a;_.addProviders({token:a,useValue:s})}},8140:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceType=void 0;var e;(function(n){n[n.Service=0]="Service",n[n.Stub=1]="Stub"})(e||(t.ServiceType=e={}))},47561:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSServerChannel=t.WSChannel=void 0;const n=e(40396),r=e(43718),o=e(39048),a=e(97349);var p;(function(s){s[s.ReSend=0]="ReSend",s[s.Sended=1]="Sended",s[s.Success=2]="Success",s[s.Failed=3]="Failed"})(p||(p={}));class v{constructor(){this.map=new Map,this.deliveryTimeout=500,this.timerMap=new Map}setDeliveryTimeout(g){this.deliveryTimeout=g}set(g,l){this.map.set(g,l)}get(g){return this.map.get(g)}success(g){this.map.set(g,p.Success);const l=this.timerMap.get(g);l&&clearTimeout(l)}dispose(){this.timerMap.forEach(g=>{clearTimeout(g)})}stop(g){const l=this.timerMap.get(g);l&&clearTimeout(l)}send(g,l){this.set(g,p.Sended),this.guard(g,l)}guard(g,l){const h=this.timerMap.get(g);h&&clearTimeout(h);const u=setTimeout(()=>{this.set(g,p.ReSend),l.whenRetry()},this.deliveryTimeout);this.timerMap.set(g,u)}}class m{constructor(g,l){this.connection=g,this._disposables=new r.DisposableStore,this.emitter=this._disposables.add(new n.EventEmitter),this.onBinaryQueue=this._disposables.add(new r.EventQueue),this.sendQueue=[],this._isServerReady=!1,this.stateTracer=new v,this.LOG_TAG="[WSChannel]",this.logger=console;const{id:h,logger:u,ensureServerReady:d}=l;this.id=h,this.LOG_TAG=`[WSChannel id:${this.id}]`,u&&(this.logger=u),this._ensureServerReady=!!d,l.deliveryTimeout&&this.stateTracer.setDeliveryTimeout(l.deliveryTimeout),this._disposables.add(this.emitter.on("binary",E=>this.onBinaryQueue.push(E)))}inqueue(g){if(this._ensureServerReady&&!this._isServerReady){this.sendQueue||(this.sendQueue=[]),this.sendQueue.push(g);return}this.connection.send(g)}ensureMessageDeliveried(g,l=(0,r.randomString)(16)){const h=this.stateTracer.get(l);if(h&&h>=p.Sended){this.logger.error(`message already send already success or in progress, traceId: ${l}, state: ${h}`);return}g.traceId=l,this.connection.send(g),this.stateTracer.send(l,{whenRetry:()=>{if(this._isServerReady){this.stateTracer.stop(l);return}this.ensureMessageDeliveried(g,l)}})}onMessage(g){return this.emitter.on("message",g)}onBinary(g){return this.onBinaryQueue.on(g)}onOpen(g){return this.emitter.on("open",g)}onReopen(g){return this.emitter.on("reopen",g)}pause(){this._isServerReady=!1}onServerReady(g){if(this._isServerReady){g();return}return this.emitter.on("open",g)}resume(){if(this._isServerReady=!0,this.sendQueue){for(const g of this.sendQueue)this.connection.send(g);this.sendQueue=[]}}dispatch(g){switch(g.kind){case"server-ready":g.traceId&&this.stateTracer.success(g.traceId),this.resume(),this.emitter.emit("open",g.id);break;case"data":this.emitter.emit("message",g.content);break;case"binary":this.emitter.emit("binary",g.binary);break;case"error":switch(this.logger.error(this.LOG_TAG,`receive error: id: ${g.id}, code: ${g.code}, error: ${g.message}`),g.code){case o.ErrorMessageCode.ChannelNotFound:this.channelPath&&(this.pause(),this.open(this.channelPath,this.clientId));break}break}}open(g,l){this.channelPath=g,this.clientId=l,this.LOG_TAG=`[WSChannel id=${this.id} path=${g}]`;const h={kind:"open",id:this.id,path:g,clientId:l};this._ensureServerReady?this.ensureMessageDeliveried(h):this.connection.send(h)}send(g){this.inqueue({kind:"data",id:this.id,content:g})}sendBinary(g){this.inqueue({kind:"binary",id:this.id,binary:g})}onError(){}close(g,l){this.pause(),this.emitter.emit("close",g,l)}fireReopen(){this.emitter.emit("reopen")}onClose(g){return this.emitter.on("close",g)}onceClose(g){return this.emitter.once("close",g)}createConnection(){return{onceClose:g=>this.onceClose(g),onMessage:g=>this.onBinary(g),send:g=>{this.sendBinary(g)},dispose(){}}}createSumiConnection(g={}){return new a.SumiConnection(this.createConnection(),g)}dispose(){this.stateTracer.dispose(),this.sendQueue=[],this._disposables.dispose()}ping(){this.connection.send({kind:"ping",id:this.id})}}t.WSChannel=m;class _ extends m{constructor(g,l){super(g,l),this.connection=g,this.messageQueue=[],this.clientId=l.clientId}serverReady(g){this.connection.send({kind:"server-ready",id:this.id,traceId:g})}dispatch(g){switch(g.kind){case"data":this.emitter.emit("message",g.content);break;case"binary":this.emitter.emit("binary",g.binary);break;case"ping":this.connection.send({kind:"pong",id:this.id});break}}}t.WSServerChannel=_},8919:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(25285),t)},70650:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AINativeConfigService=void 0;const n=e(85608),r=e(76003),o=e(89195),a=e(1149),p=e(11050),v={supportsMarkers:!0,supportsChatAssistant:!0,supportsCodeAction:!0,supportsInlineChat:!0,supportsInlineCompletion:!0,supportsConflictResolve:!0,supportsRenameSuggestions:!0,supportsProblemFix:!0,supportsTerminalDetection:!0,supportsTerminalCommandSuggest:!0,supportsCustomLLMSettings:!0,supportsMCP:!0},m={};Object.keys(v).forEach(l=>{m[l]=!1});const _={inputWidth:320,inputKeybinding:"ctrlcmd+k",logo:o.AILogoAvatar},s={triggerKeybinding:"alt+\\"};let g=class{constructor(){this.aiModuleLoaded=!1,this.internalCapabilities=v,this.internalInlineChat=_,this.internalCodeEdits=s}get capabilities(){if(!this.aiModuleLoaded)return m;const{AINativeConfig:h}=this.appConfig;return h?.capabilities?{...this.internalCapabilities,...h.capabilities}:this.internalCapabilities}get inlineChat(){const{AINativeConfig:h}=this.appConfig;return h?.inlineChat?{...this.internalInlineChat,...h.inlineChat}:this.internalInlineChat}get codeEdits(){const{AINativeConfig:h}=this.appConfig;return h?.codeEdits?{...this.internalCodeEdits,...h.codeEdits}:this.internalCodeEdits}setAINativeModuleLoaded(h){this.aiModuleLoaded=h}};t.AINativeConfigService=g,n.__decorate([(0,r.Autowired)(p.AppConfig),n.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(a.LayoutViewSizeConfig),n.__metadata("design:type",a.LayoutViewSizeConfig)],g.prototype,"layoutViewSize",void 0),t.AINativeConfigService=g=n.__decorate([(0,r.Injectable)()],g)},41480:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIReporter=void 0;const n=e(85608),r=e(76003),o=e(43718),a=e(52664);let p=class{constructor(){this.reportInfoCache=new Map,this.reporterCancelHandler=new Map}getRelationId(){return(0,o.uuid)()}getCacheReportInfo(m){return this.reportInfoCache.get(m)}getCommonReportInfo(){return{}}start(m,_,s=60*1e3){const g=this.getRelationId();this.report(g,{..._,msgType:m,isStart:!0});const l=setTimeout(()=>{this.report(g,{..._,success:!1})},s);return this.reporterCancelHandler.set(g,l),g}end(m,_){const s=this.reporterCancelHandler.get(m);s&&clearTimeout(s),this.report(m,{success:!0,..._,isStart:!1})}send(m){this.reporter.point(a.AI_REPORTER_NAME,m.msgType,m)}record(m,_){_||(_=this.getRelationId());const s=this.reportInfoCache.get(_)||{},g={...this.getCommonReportInfo(),...s,...m,relationId:_};return this.reportInfoCache.set(_,g),g}report(m,_){const s=this.record(_,m);this.reporter.point(a.AI_REPORTER_NAME,_.msgType||s.msgType,s)}};t.AIReporter=p,n.__decorate([(0,r.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],p.prototype,"reporter",void 0),t.AIReporter=p=n.__decorate([(0,r.Injectable)()],p)},57925:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AI_CODE_EDITS_COMMANDS=t.AI_CODE_ACTION=t.AI_CHAT_VISIBLE=t.AI_INLINE_COMPLETION_REPORTER=t.AI_INLINE_DIFF_PARTIAL_EDIT=t.AI_INLINE_COMPLETION_VISIBLE=t.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL=t.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE=t.AI_INLINE_CHAT_VISIBLE=void 0,t.AI_INLINE_CHAT_VISIBLE={id:"ai.inlineChat.visible"},t.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE={id:"ai.inlineChat.interactiveInput.visible"},t.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL={id:"ai.inlineChat.interactiveInput.cancel"},t.AI_INLINE_COMPLETION_VISIBLE={id:"ai.inline.completion.visible"},t.AI_INLINE_DIFF_PARTIAL_EDIT={id:"ai.inline.diff.partial.edit"},t.AI_INLINE_COMPLETION_REPORTER={id:"ai.inline.completion.reporter"},t.AI_CHAT_VISIBLE={id:"ai.chat.visible"},t.AI_CODE_ACTION={id:"ai.code.action"};var e;(function(n){n.DISCARD={id:"ai.codeEdits.discard"},n.ACCEPT={id:"ai.codeEdits.accept"},n.TRIGGER={id:"ai.codeEdits.trigger"}})(e||(t.AI_CODE_EDITS_COMMANDS=e={}))},38070:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MergeConflictReportService=void 0;const n=e(85608),r=e(76003),o=e(43718),a=e(70650);let p=class extends o.Disposable{constructor(){super(...arguments),this.reportInfoMap=new Map,this.unique2RelationMap=new Map}record(m,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return _;let s="";return this.unique2RelationMap.has(m)?(s=this.unique2RelationMap.get(m),this.aiReporter.record(_,s)):(s=this.aiReporter.record({..._,msgType:o.AIServiceType.MergeConflict,message:o.AIServiceType.MergeConflict,editorMode:_.editorMode||o.MergeConflictEditorMode.traditional}).relationId,this.unique2RelationMap.set(m,s)),{..._,relationId:s}}report(m,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const s=this.record(m,_);this.aiReporter.end(s.relationId,s)}reportIncrementNum(m,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const s=this.unique2RelationMap.get(m);if(!s)return;const g=this.aiReporter.getCacheReportInfo(s)[_]||0;this.report(m,{[_]:g+1})}dispose(){super.dispose(),this.reportInfoMap.clear()}};t.MergeConflictReportService=p,n.__decorate([(0,r.Autowired)(a.AINativeConfigService),n.__metadata("design:type",a.AINativeConfigService)],p.prototype,"aiNativeConfigService",void 0),n.__decorate([(0,r.Autowired)(o.IAIReporter),n.__metadata("design:type",Object)],p.prototype,"aiReporter",void 0),t.MergeConflictReportService=p=n.__decorate([(0,r.Injectable)()],p)},95040:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IAIInlineChatService=void 0,e(85608).__exportStar(e(70650),t),t.IAIInlineChatService=Symbol("IAIInlineChatService")},12956:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppStateService=t.ClientAppStateEvent=void 0;const n=e(85608),r=e(76003),o=e(43718);class a extends o.BasicEvent{}t.ClientAppStateEvent=a;let p=class{constructor(){this._state="init",this.deferred={}}get state(){return this._state}set state(m){m!==this._state&&(this._state=m,this.deferred[m]===void 0&&(this.deferred[m]=new o.Deferred),this.deferred[m].resolve(),this.eventBus.fire(new a(m)))}reachedState(m){return this.deferred[m]===void 0&&(this.deferred[m]=new o.Deferred),this.deferred[m].promise}reachedAnyState(...m){return Promise.race(m.map(_=>this.reachedState(_)))}};t.ClientAppStateService=p,n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),t.ClientAppStateService=p=n.__decorate([(0,r.Injectable)()],p)},59555:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationService=void 0;const n=e(85608),r=e(76003),o=e(59019),a=e(43718),p=e(11050),v=e(42101);let m=class{constructor(){this._initialized=new a.Deferred}async initializeData(){this._backendOS=await this.commonServer.getBackendOS(),this._initialized.resolve()}get frontendOS(){return a.OS.type()}get backendOS(){if(this._backendOS)return this._backendOS;if(this.appConfig.isElectronRenderer)return this.frontendOS;throw new Error("Can't get backend os type before initialize, if you want wait to get backend os, please use async method: getBackendOS")}async getBackendOS(){return await this._initialized.promise,this.backendOS}get clientId(){return this.injector.get(o.WSChannelHandler).clientId}get windowId(){return this.appConfig.isElectronRenderer?v.electronEnv.currentWindowId:this.injector.get(o.WSChannelHandler).clientId}};t.ApplicationService=m,n.__decorate([(0,r.Autowired)(a.CommonServerPath),n.__metadata("design:type",Object)],m.prototype,"commonServer",void 0),n.__decorate([(0,r.Autowired)(p.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],m.prototype,"injector",void 0),t.ApplicationService=m=n.__decorate([(0,r.Injectable)()],m)},16884:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(12956),t),n.__exportStar(e(59555),t)},22914:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseConnectionHelper=void 0;const n=e(85608),r=e(76003),o=e(18740),a=e(43718),p=e(32796),v=e(38578),m=(0,a.getDebugLogger)();let _=class{async createRPCServiceChannel(g){var l;const h=this.createConnection(),u=(l=this.appConfig.clientId)!==null&&l!==void 0?l:this.getDefaultClientId(),d=new o.WSChannelHandler(h,u,{logger:m});return(0,p.createConnectionService)(this.injector,g,d)}};t.BaseConnectionHelper=_,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],_.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(a.IReporterService),n.__metadata("design:type",Object)],_.prototype,"reporterService",void 0),t.BaseConnectionHelper=_=n.__decorate([(0,r.Injectable)({multiple:!0})],_)},41320:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRuntime=void 0;const n=e(85608),r=e(76003),o=e(44142),a=e(6858),p=e(53206);let v=class extends a.RendererRuntime{constructor(){super(...arguments),this.runtimeName=o.ESupportRuntime.Web}registerRuntimeModuleProviders(_,s){s.webProviders&&_.addProviders(...s.webProviders)}registerRuntimeInnerProviders(_){(0,p.injectBrowserInnerProviders)(_)}};t.BrowserRuntime=v,t.BrowserRuntime=v=n.__decorate([(0,r.Injectable)()],v)},53206:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectBrowserInnerProviders=o;const n=e(93899),r=e(97222);function o(a){a.addProviders({token:n.ICtxMenuRenderer,useClass:r.BrowserCtxMenuRenderer})}},55267:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.WebConnectionHelper=void 0;const r=e(85608),o=e(76003),a=e(91493),p=e(43718),v=e(22914);let m=n=class extends v.BaseConnectionHelper{constructor(s){super(),this.options=s,this.clientId=n.clientIdFactory()}getDefaultClientId(){return this.clientId}createConnection(){return a.ReconnectingWebSocketConnection.forURL(this.options.connectionPath,this.options.connectionProtocols)}static clientIdFactory(){return`CLIENT_ID_${(0,p.uuid)()}`}};t.WebConnectionHelper=m,t.WebConnectionHelper=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__metadata("design:paramtypes",[Object])],m)},44142:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onigWasmCDNUri=t.ESupportRuntime=void 0;var e;(function(n){n.Electron="electron",n.Web="web"})(e||(t.ESupportRuntime=e={})),t.onigWasmCDNUri="https://g.alicdn.com/kaitian/vscode-oniguruma-wasm/1.5.1/onig.wasm"},59574:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElectronRendererRuntime=void 0;const n=e(85608),r=e(76003),o=e(38578),a=e(42101),p=e(44142),v=e(6858),m=e(38892);let _=class extends v.RendererRuntime{constructor(){super(...arguments),this.runtimeName=p.ESupportRuntime.Electron}registerRuntimeModuleProviders(l,h){h.electronProviders&&l.addProviders(...h.electronProviders)}registerRuntimeInnerProviders(l){(0,m.injectElectronInnerProviders)(l)}mergeAppConfig(l){return s(l)}async provideResourceUri(l){switch(l){case v.EKnownResources.OnigWasm:return a.electronEnv.onigWasmUri||this.appConfig.onigWasmUri||p.onigWasmCDNUri;case v.EKnownResources.TreeSitterWasmDirectory:return a.electronEnv.treeSitterWasmDirectoryUri||this.appConfig.treeSitterWasmDirectoryUri||(0,o.getTreeSitterWasmCDNUri)(this.appConfig.componentCDNType);default:throw new Error(`Unknown resource: ${l}`)}}};t.ElectronRendererRuntime=_,t.ElectronRendererRuntime=_=n.__decorate([(0,r.Injectable)()],_);function s(g){var l;const h=(l=a.electronEnv.metadata)!==null&&l!==void 0?l:{},u={...g,appRoot:g.appRoot||a.electronEnv.appPath,extensionDir:g.extensionDir||h.extensionDir};return h.extensionDevelopmentHost&&(g.extensionDevelopmentHost=h.extensionDevelopmentHost),h.extensionCandidate&&(g.extensionCandidate=(g.extensionCandidate||[]).concat(a.electronEnv.metadata.extensionCandidate||[])),u}},38892:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectElectronInnerProviders=m;const n=e(43718),r=e(37406),o=e(93899),a=e(27790),p=e(11050),v=e(42101);function m(_){const s=_.get(p.AppConfig);_.addProviders({token:n.IElectronMainMenuService,useValue:(0,v.createElectronMainApi)(n.IElectronMainMenuService,s.devtools)},{token:r.IElectronMainUIService,useValue:(0,v.createElectronMainApi)(r.IElectronMainUIService,s.devtools)},{token:r.IElectronMainLifeCycleService,useValue:(0,v.createElectronMainApi)(r.IElectronMainLifeCycleService,s.devtools)},{token:r.IElectronURLService,useValue:(0,v.createElectronMainApi)(r.IElectronURLService,s.devtools)},{token:a.IElectronMenuFactory,useClass:a.ElectronMenuFactory},{token:a.IElectronMenuBarService,useClass:a.ElectronMenuBarService},{token:o.ICtxMenuRenderer,useClass:a.ElectronCtxMenuRenderer})}},63977:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElectronConnectionHelper=void 0;const n=e(85608),r=e(76003),o=e(42101),a=e(22914);let p=class extends a.BaseConnectionHelper{getDefaultClientId(){return o.electronEnv.metadata.windowClientId}createConnection(){return(0,o.createNetSocketConnection)()}};t.ElectronConnectionHelper=p,t.ElectronConnectionHelper=p=n.__decorate([(0,r.Injectable)({multiple:!0})],p)},18379:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionHelperFactory=v;const n=e(85608),r=e(38578),o=e(55267),a=e(44142),p=e(63977);n.__exportStar(e(55267),t),n.__exportStar(e(63977),t),n.__exportStar(e(22914),t),n.__exportStar(e(44142),t);function v(m){return _=>{const s=m.get(r.AppConfig);let g;switch(_){case a.ESupportRuntime.Electron:g=m.get(p.ElectronConnectionHelper);break;case a.ESupportRuntime.Web:g=m.get(o.WebConnectionHelper,[{connectionPath:s.connectionPath,connectionProtocols:s.connectionProtocols}]);break;default:throw new Error(`Unknown backend type: ${_}`)}return g}}},6858:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RendererRuntime=t.EKnownResources=void 0;const n=e(85608),r=e(76003),o=e(11050),a=e(44142);var p;(function(m){m.OnigWasm="wasm:onig",m.TreeSitterWasmDirectory="wasm:tree-sitter"})(p||(t.EKnownResources=p={}));let v=class{mergeAppConfig(_){return _}async provideResourceUri(_){switch(_){case p.OnigWasm:return this.appConfig.onigWasmUri||a.onigWasmCDNUri;case p.TreeSitterWasmDirectory:return this.appConfig.treeSitterWasmDirectoryUri||(0,o.getTreeSitterWasmCDNUri)(this.appConfig.componentCDNType);default:throw new Error(`Unknown resource: ${_}`)}}};t.RendererRuntime=v,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],v.prototype,"appConfig",void 0),t.RendererRuntime=v=n.__decorate([(0,r.Injectable)()],v)},37638:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationContribution=void 0;const n=e(85608),r=e(76003),o=e(43718),a=e(66549);let p=class{onStart(){this.authenticationService.initialize()}registerCommands(m){m.registerCommand({id:o.noAccountsId,label:"%authentication.noAccounts%"},{execute:()=>{}})}};t.AuthenticationContribution=p,n.__decorate([(0,r.Autowired)(o.IAuthenticationService),n.__metadata("design:type",Object)],p.prototype,"authenticationService",void 0),t.AuthenticationContribution=p=n.__decorate([(0,o.Domain)(a.ClientAppContribution,o.CommandContribution)],p)},10605:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationService=void 0;const n=e(85608),r=e(76003),o=e(43718),a=e(93899);let p=class extends o.Disposable{constructor(){super(...arguments),this._onDidRegisterAuthenticationProvider=this.registerDispose(new o.Emitter),this.onDidRegisterAuthenticationProvider=this._onDidRegisterAuthenticationProvider.event,this._onDidUnregisterAuthenticationProvider=this.registerDispose(new o.Emitter),this.onDidUnregisterAuthenticationProvider=this._onDidUnregisterAuthenticationProvider.event,this._onDidChangeSessions=this.registerDispose(new o.Emitter),this.onDidChangeSessions=this._onDidChangeSessions.event,this._authenticationProviders=new Map,this._signInRequestItems=new Map}async initialize(){this._storage=await this.getStorage(new o.URI("authentication").withScheme(o.STORAGE_SCHEMA.GLOBAL));const m=new Map;this.onDidChangeSessions(async _=>{if(_.event.added.length>0){const s=await this.getSessions(_.providerId);s.forEach(g=>{if(s.find(b=>m.get(b.id)))return;const l=new o.DisposableCollection,h=`account-sign-out-${_.providerId}-${g.id}`,u=this.commands.registerCommand({id:h,label:(0,o.formatLocalize)("authentication.signOut",_.label)},{execute:async()=>{await this.signOutOfAccount(_.providerId,g.account.label)}}),d=`manage-trusted-${_.providerId}-${g.id}`,E=this.commands.registerCommand({id:d,label:"%authentication.manageTrustedExtensions%"},{execute:async()=>{await this.manageTrustedExtensionsForAccount(_.providerId,g.account.label)}}),f=`${_.providerId}${g.account.label}`,c=this.menus.registerMenuItem(a.MenuId.AccountsContext,{submenu:f,label:`${g.account.label} (${_.label})`}),y=this.menus.registerMenuItems(f,[{command:d},{command:h}]);l.push(c),l.push(y),l.push(u),l.push(E),m.set(g.id,l)})}_.event.removed.length>0&&_.event.removed.forEach(s=>{const g=m.get(s.id);g&&(g.dispose(),m.delete(s.id))})})}get storage(){return this._storage}registerAuthenticationProvider(m,_){this._authenticationProviders.set(m,_),this._onDidRegisterAuthenticationProvider.fire({id:m,label:_.label}),this.updateAccountsMenuItem()}async sessionsUpdate(m,_){const s=this._authenticationProviders.get(m);s&&(this._onDidChangeSessions.fire({providerId:m,label:s.label,event:_}),await s.updateSessionItems(_),this.updateAccountsMenuItem(),_.added&&await this.updateNewSessionRequests(s))}async updateNewSessionRequests(m){const _=this._signInRequestItems.get(m.id);if(!_)return;const s=await m.getSessions();Object.keys(_).forEach(g=>{if(s.some(l=>l.scopes.slice().sort().join("")===g)){const l=_[g];l&&l.disposables.forEach(h=>h.dispose()),delete _[g],Object.keys(_).length===0?this._signInRequestItems.delete(m.id):this._signInRequestItems.set(m.id,_)}})}getTrustedKey(m,_){return`trusted-${m}-${_}`}async getAllowedExtensions(m,_){const s=this.getTrustedKey(m,_);let g=[];try{const l=await this.storage.get(s);l&&(g=JSON.parse(l))}catch(l){this.logger.warn("read allow extensions error: "+l)}return g}async setAllowedExtensions(m,_,s){const g=this.getTrustedKey(m,_);await this.storage.set(g,JSON.stringify(s))}async removeAllowedExtensions(m,_){const s=this.getTrustedKey(m,_);await this.storage.delete(s)}async updatedAllowedExtension(m,_,s,g,l){const h=await this.getAllowedExtensions(m,_),u=h.findIndex(d=>d.id===s);u===-1?h.push({id:s,name:g,allowed:l}):h[u].allowed=l,await this.setAllowedExtensions(m,_,h)}async isAccessAllowed(m,_,s){const l=(await this.getAllowedExtensions(m,_)).find(h=>h.id===s);return l?l.allowed!==void 0?l.allowed:!0:!1}async tryActivateProvider(m){await this.eventBus.fireAndAwait(new o.ExtensionActivateEvent({topic:"onView",data:m}));let _=this._authenticationProviders.get(m);if(_)return _;const s=new Promise((l,h)=>{this.onDidRegisterAuthenticationProvider(u=>{if(u.id===m)if(_=this._authenticationProviders.get(m),_)l(_);else throw new Error(`No authentication provider '${m}' is currently registered.`)})}),g=new Promise((l,h)=>{setTimeout(()=>{h(new Error(`didRegister ${m} timeout`))},5e3)});return Promise.race([s,g])}async getSessions(m,_,s,g){try{return await(this._authenticationProviders.get(m)||await this.tryActivateProvider(m)).getSessions(_,g)}catch{throw new Error(`No authentication provider '${m}' is currently registered.`)}}isAuthenticationProviderRegistered(m){return this._authenticationProviders.has(m)}getProviderIds(){const m=[];return this._authenticationProviders.forEach(_=>{m.push(_.id)}),m}unregisterAuthenticationProvider(m){const _=this._authenticationProviders.get(m);_&&(_.dispose(),this._authenticationProviders.delete(m),this._onDidUnregisterAuthenticationProvider.fire({id:m,label:_.label}),this.updateAccountsMenuItem())}updateAccountsMenuItem(){let m=!1;this._authenticationProviders.forEach(_=>{m=m||_.hasSessions()}),m&&this._noAccountsMenuItem&&(this._noAccountsMenuItem.dispose(),this._noAccountsMenuItem=void 0),!m&&!this._noAccountsMenuItem&&(this._noAccountsMenuItem=this.menus.registerMenuItem(a.MenuId.AccountsContext,{group:"0_accounts",command:o.noAccountsId}))}async requestNewSession(m,_,s,g,l){let h=this._authenticationProviders.get(m);if(h||await new Promise((u,d)=>{this.onDidRegisterAuthenticationProvider(E=>{E.id===m&&(h=this._authenticationProviders.get(m),u())})}),h){const u=this._signInRequestItems.get(m),d=_.sort().join("");if(u&&u[d]&&u[d].requestingExtensionIds.includes(g))return;const f=this.commands.registerCommand({id:`${g}signIn`,label:(0,o.formatLocalize)("authentication.signInRequests",l)},{execute:async()=>{const y=await this.login(m,_,s),b=y.account.label,A=await this.getAllowedExtensions(m,b);A.find(S=>S.id===g)||(A.push({id:g,name:l}),await this.setAllowedExtensions(m,b,A)),await this.setExtensionSessionId(l,m,y.id)}}),c=this.menus.registerMenuItem(a.MenuId.AccountsContext,{group:"2_signInRequests",command:`${g}signIn`});if(u){const y=u[d]||{disposables:[],requestingExtensionIds:[]};u[d]={disposables:[...y.disposables,c,f],requestingExtensionIds:[...y.requestingExtensionIds,g]},this._signInRequestItems.set(m,u)}else this._signInRequestItems.set(m,{[d]:{disposables:[c,f],requestingExtensionIds:[g]}})}}getLabel(m){const _=this._authenticationProviders.get(m);if(_)return _.label;throw new Error(`No authentication provider '${m}' has been declared.`)}supportsMultipleAccounts(m){const _=this._authenticationProviders.get(m);if(_)return _.supportsMultipleAccounts;throw new Error(`No authentication provider '${m}' is currently registered.`)}async login(m,_,s){try{return await(this._authenticationProviders.get(m)||await this.tryActivateProvider(m)).login(_,s)}catch(g){throw new Error(`No authentication provider '${m}' is currently registered, error messge: ${g.message}`)}}logout(m,_){const s=this._authenticationProviders.get(m);if(s)return s.logout(_);throw new Error(`No authentication provider '${m}' is currently registered.`)}manageTrustedExtensionsForAccount(m,_){const s=this._authenticationProviders.get(m);if(s)return s.manageTrustedExtensions(_);throw new Error(`No authentication provider '${m}' is currently registered.`)}signOutOfAccount(m,_){const s=this._authenticationProviders.get(m);if(s)return s.signOut(_);throw new Error(`No authentication provider '${m}' is currently registered.`)}getUsagesKey(m,_){return`usages-${m}-${_}`}async getAccountUsages(m,_){const s=this.getUsagesKey(m,_),g=await this.storage.get(s);let l=[];if(g)try{l=JSON.parse(g)}catch(h){this.logger.warn("parse account usages error: "+h)}return l}async addAccountUsage(m,_,s,g){const l=this.getUsagesKey(m,_),h=await this.getAccountUsages(m,_),u=h.findIndex(d=>d.extensionId===s);u>-1?h.splice(u,1,{extensionId:s,extensionName:g,lastUsed:Date.now()}):h.push({extensionId:s,extensionName:g,lastUsed:Date.now()}),await this.storage.set(l,JSON.stringify(h))}async removeAccountUsage(m,_){const s=this.getUsagesKey(m,_);await this.storage.delete(s)}getExtensionSessionIdKey(m,_){return`session-${m}-${_}`}async getExtensionSessionId(m,_){const s=this.getExtensionSessionIdKey(m,_);return await this.storage.get(s)}async setExtensionSessionId(m,_,s){const g=this.getExtensionSessionIdKey(m,_);await this.storage.set(g,s)}async removeExtensionSessionId(m,_){const s=this.getExtensionSessionIdKey(m,_);await this.storage.delete(s)}};t.AuthenticationService=p,n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],p.prototype,"getStorage",void 0),n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(a.IMenuRegistry),n.__metadata("design:type",a.IMenuRegistry)],p.prototype,"menus",void 0),n.__decorate([(0,r.Autowired)(o.CommandRegistry),n.__metadata("design:type",Object)],p.prototype,"commands",void 0),t.AuthenticationService=p=n.__decorate([(0,r.Injectable)()],p)},72746:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},33916:(P,t,e)=>{"use strict";var n;n={value:!0},t.j=void 0,e(37533);const r=e(76003),o=e(43718),a=e(4588),p=e(37406),v=e(16884),m=e(18379),_=e(41320),s=e(59574),g=e(6858),l=e(36206),h=e(66963),u=e(18193),d=e(41118),E=e(1149),f=e(11949),c=e(64102),y=e(78132),b=e(11050),A=e(67304),S=e(79951),D=e(79248),I=e(96302),w=e(71843);e(99696);class T{constructor(M){var O,x,k;this.opts=M,this.appInitialized=new o.Deferred,this.browserModules=[],this._disposables=new o.DisposableCollection,this._inComposition=!1,this._handleBeforeUpload=K=>{if(this.config.isElectronRenderer){if(this.stateService.state==="electron_confirmed_close")return;K.returnValue="",K.preventDefault(),this.stateService.state!=="electron_asking_close"&&(this.stateService.state="electron_asking_close",this.preventStopElectron().then(Y=>{if(Y)this.stateService.state="ready";else return this.stopContributionsElectron().then(()=>{this.stateService.state="electron_confirmed_close";const X=this.injector.get(p.IElectronMainLifeCycleService);setTimeout(()=>{X.closeWindow(S.electronEnv.currentWindowId)},0)})}))}else if(this.preventStop())return(K||window.event).returnValue=!0,!0},this._handleUnload=()=>{this.stateService.state="closing_window",this.config.isElectronRenderer||(this.disposeSideEffect(),this.stopContributions())},this._handleResize=()=>{},this._handleKeydown=K=>{K&&K.target.name!==d.NO_KEYBINDING_NAME&&this.keybindingService.run(K)},this._handleKeyup=K=>{this.keybindingService.resolveModifierKey(K)},this._handleWheel=()=>{};const{modules:F,contributions:L,iconStyleSheets:B,useCdnIcon:U,editorBackgroundImage:W,defaultPreferences:j,allowSetDocumentTitleFollowWorkspaceDir:Q=!0,...G}=M;this.initEarlyPreference(M.workspaceDir||"");const Z=(0,y.getPreferenceLanguageId)(j);(0,o.setLanguageId)(Z),this.injector=M.injector||new r.Injector,this.modules=F,this.modules.forEach(K=>this.resolveModuleDeps(K)),this.browserModules=M.modulesInstances||[];const $=(O=M.isElectronRenderer)!==null&&O!==void 0?O:this.detectRuntime()===m.ESupportRuntime.Electron;this.config={appName:a.DEFAULT_APPLICATION_NAME,appHost:$?a.DEFAULT_APPLICATION_DESKTOP_HOST:a.DEFAULT_APPLICATION_WEB_HOST,appRoot:M.appRoot||"",uriScheme:a.DEFAULT_URI_SCHEME,...G,isElectronRenderer:$,workspaceDir:M.workspaceDir||"",extensionDir:M.extensionDir||"",injector:this.injector,wsPath:M.wsPath||`ws://${window.location.hostname}:8000`,layoutConfig:M.layoutConfig,editorBackgroundImage:M.editorBackgroundImage||W,allowSetDocumentTitleFollowWorkspaceDir:Q,devtools:(x=M.devtools)!==null&&x!==void 0?x:!1,rpcMessageTimeout:M.rpcMessageTimeout||-1},this.config.connectionPath=M.connectionPath||`${this.config.wsPath}/service`;const V=this.injector.get(E.LayoutViewSizeConfig);V.init(M.layoutViewSize),this.config.layoutViewSize=V,this.injector.get(E.DesignLayoutConfig).setLayout(M.designLayout,(k=M.AINativeConfig)===null||k===void 0?void 0:k.layout),this.injector.addProviders({token:l.IClientApp,useValue:this}),this.injector.addProviders({token:b.AppConfig,useValue:this.config}),this.runtime=$?this.injector.get(s.ElectronRendererRuntime):this.injector.get(_.BrowserRuntime),this.injector.addProviders({token:g.RendererRuntime,useValue:this.runtime}),this.config.devtools&&(window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__={}),M.extensionDevelopmentPath&&(this.config.extensionCandidate=(this.config.extensionCandidate||[]).concat(Array.isArray(M.extensionDevelopmentPath)?M.extensionDevelopmentPath.map(K=>(0,o.asExtensionCandidate)(K,!0)):[(0,o.asExtensionCandidate)(M.extensionDevelopmentPath,!0)]),this.config.extensionDevelopmentHost=!0),this.config=this.runtime.mergeAppConfig(this.config),L&&this.injector.addProviders(...L),this.initBaseProvider(),this.initFields(),this.appendIconStyleSheets(B,U),this.createBrowserModules(j)}resolveModuleDeps(M){const O=Reflect.getMetadata("dependencies",M);O&&O.forEach(x=>{this.modules.indexOf(x)===-1&&this.modules.push(x)})}get lifeCycleService(){return this.injector.get(o.AppLifeCycleServiceToken)}async start(M,O,x){const F=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE);this.lifeCycleService.phase=1,x?(console.error("You're using deprecated method 'start()' with connection parameter"),console.error("We introduced a new connection service to replace the old one"),(0,I.bindConnectionServiceDeprecated)(this.injector,this.modules,x)):O&&await this.createConnection(O),F.timeEnd("ClientApp.createConnection"),this.logger=this.injector.get(o.ILogger),this.stateService.state="client_connected",this.registerEventListeners(),await this.injector.get(o.IApplicationService).initializeData(),await this.measure("Contributions.start",()=>this.startContributions(M)),this.stateService.state="started_contributions",this.stateService.state="ready",this.lifeCycleService.phase=4,F.timeEnd("Framework.ready")}async createConnection(M){(await this.injector.get(m.ConnectionHelperFactory)(M).createRPCServiceChannel(this.modules)).onReopen(()=>{this.onReconnectContributions()})}onReconnectContributions(){const M=this.contributions;for(const O of M)O.onReconnect&&O.onReconnect(this)}initBaseProvider(){(0,w.injectInnerProviders)(this.injector),this.runtime.registerRuntimeInnerProviders(this.injector)}initFields(){this.contributionsProvider=this.injector.get(h.ClientAppContribution),this.commandRegistry=this.injector.get(o.CommandRegistry),this.keybindingRegistry=this.injector.get(d.KeybindingRegistry),this.keybindingService=this.injector.get(d.KeybindingService),this.stateService=this.injector.get(v.ClientAppStateService),this.nextMenuRegistry=this.injector.get(c.IMenuRegistry)}createBrowserModules(M){const O=this.injector;for(const x of this.modules){const k=O.get(x);this.browserModules.push(k),k.providers&&this.injector.addProviders(...k.providers),this.runtime.registerRuntimeModuleProviders(this.injector,k),k.preferences&&k.preferences(this.injector)}(0,u.injectCorePreferences)(this.injector),this.injectPreferenceService(this.injector,M),this.injectStorageProvider(this.injector);for(const x of this.browserModules)if(x.contributionProvider)if(Array.isArray(x.contributionProvider))for(const k of x.contributionProvider)(0,o.createContributionProvider)(this.injector,k);else(0,o.createContributionProvider)(this.injector,x.contributionProvider)}get contributions(){return this.contributionsProvider.getContributions()}async startContributions(M){await this.measure("RenderApp.render",()=>this.renderApp(M)),this.lifeCycleService.phase=2,await this.measure("Contributions.initialize",()=>this.initializeContributions()),await this.initializeCoreRegistry(),this.stateService.state="core_module_initialized",this.lifeCycleService.phase=3,await this.measure("Contributions.onStart",()=>this.onStartContributions()),await this.runContributionsPhase(this.contributions,"onDidStart")}async initializeCoreRegistry(){this.commandRegistry.initialize(),await this.keybindingRegistry.initialize(),this.nextMenuRegistry.initialize()}async initializeContributions(){await this.runContributionsPhase(this.contributions,"initialize"),this.appInitialized.resolve(),this.logger.verbose("contributions.initialize done")}async onStartContributions(){await this.runContributionsPhase(this.contributions,"onStart")}async runContributionsPhase(M,O){return await Promise.all(M.map(x=>this.contributionPhaseRunner(x,O)))}async contributionPhaseRunner(M,O){const x=M[O];if(typeof x=="function")try{const k=M.constructor.name+"."+O;return await this.measure(k,()=>x.call(M,this))}catch(k){this.logger.error(`Could not run contribution#${O}`,k)}}async renderApp(M){await(0,D.renderClientApp)(this,M),this.injector.get(o.IEventBus).fire(new f.RenderedEvent)}async measure(M,O){const k=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE),F=await O();return k.timeEnd(M),F}preventStop(){const O=this.injector.get(u.CorePreferences)["application.confirmExit"];if(O==="never")return!1;for(const x of this.contributions)if(x.onWillStop)try{if(x.onWillStop(this))return!0}catch(k){(0,o.getDebugLogger)().error(k)}return O==="always"}async preventStopElectron(){if(this.injector.get(u.CorePreferences)["application.confirmExit"]==="never")return!1;for(const x of this.contributions)if(x.onWillStop)try{if(await x.onWillStop(this))return!0}catch(k){(0,o.getDebugLogger)().error(k)}return!1}stopContributions(){for(const M of this.contributions)if(M.onStop)try{M.onStop(this)}catch(O){this.logger.error("Could not stop contribution",O)}}async stopContributionsElectron(){const M=[];for(const O of this.contributions)O.onStop&&M.push((async()=>{try{await O.onStop(this)}catch(x){this.logger.error("Could not stop contribution",x)}})());await Promise.all(M)}registerEventListeners(){var M,O;window.addEventListener("beforeunload",this._handleBeforeUpload),window.addEventListener("unload",this._handleUnload),window.addEventListener("resize",this._handleResize),window.addEventListener("compositionstart",(M=this.keybindingService)===null||M===void 0?void 0:M.handleCompositionStart),window.addEventListener("compositionend",(O=this.keybindingService)===null||O===void 0?void 0:O.handleCompositionEnd),window.addEventListener("keydown",this._handleKeydown,!0),window.addEventListener("keyup",this._handleKeyup,!0),o.isOSX&&document.body.addEventListener("wheel",this._handleWheel,{passive:!1})}injectPreferenceService(M,O){const x=()=>k=>{const F=M.get(y.PreferenceProvider,{tag:k});return F.asScope(k),F};if((0,y.injectPreferenceConfigurations)(M),(0,y.injectPreferenceSchemaProvider)(M),M.addProviders({token:y.PreferenceProviderProvider,useFactory:x},{token:y.PreferenceService,useClass:y.PreferenceServiceImpl}),O){const F=M.get(y.PreferenceProviderProvider)(y.PreferenceScope.Default);for(const L of Object.keys(O))F.setPreference(L,O[L])}}injectStorageProvider(M){M.addProviders({token:o.DefaultStorageProvider,useClass:o.DefaultStorageProvider}),M.addProviders({token:o.StorageProvider,useFactory:O=>x=>O.get(o.DefaultStorageProvider).get(x)}),(0,o.createContributionProvider)(M,o.StorageResolverContribution)}fireOnReload(M=!1){window.location.reload(M)}appendIconStyleSheets(M,O){const x=O?[A.DEFAULT_CDN_ICON,A.IDE_OCTICONS_CN_CSS,A.IDE_CODICONS_CN_CSS]:[];M&&M.length&&M.forEach(k=>{this.updateIconMap(k.prefix,k.iconMap),x.push(k.cssPath)});for(const k of x){const F=document.createElement("link");F.setAttribute("rel","stylesheet"),F.setAttribute("href",k),document.getElementsByTagName("head")[0].appendChild(F)}}updateIconMap(M,O){M==="kaitian-icon kticon-"&&this.logger.error(`The icon prefix '${M}' conflicts with the built-in icon, please check the icon configuration.`),(0,A.updateIconMap)(M,O)}initEarlyPreference(M){this._disposables.push((0,y.registerLocalStorageProvider)(o.GeneralSettingsId.Theme,M)),this._disposables.push((0,y.registerLocalStorageProvider)(o.GeneralSettingsId.Icon,M)),this._disposables.push((0,y.registerLocalStorageProvider)(o.GeneralSettingsId.Language,M))}async dispose(){var M,O;window.removeEventListener("beforeunload",this._handleBeforeUpload),window.removeEventListener("unload",this._handleUnload),window.removeEventListener("resize",this._handleResize),window.removeEventListener("compositionstart",(M=this.keybindingService)===null||M===void 0?void 0:M.handleCompositionStart),window.removeEventListener("compositionend",(O=this.keybindingService)===null||O===void 0?void 0:O.handleCompositionEnd),window.removeEventListener("keydown",this._handleKeydown,!0),o.isOSX&&document.body.removeEventListener("wheel",this._handleWheel),this._disposables.dispose(),this.disposeSideEffect()}disposeSideEffect(){for(const M of this.contributions)if(M.onDisposeSideEffects)try{M.onDisposeSideEffects(this)}catch(O){this.logger.error("Could not dispose contribution",O)}}detectRuntime(){return window.isElectronRenderer||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0?m.ESupportRuntime.Electron:m.ESupportRuntime.Web}}t.j=T},79248:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.App=u,t.renderClientApp=f;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(25873)),a=e(97267),p=e(43718),v=e(28003),m=e(68456),_=e(11050),s=e(52564),g=e(26542),l=e(67304),h=e(75206);function u(c){const y=c.app.injector,b=y.get(p.IEventBus),A=y.get(g.LabelService),S=r.default.useCallback((D,I)=>A.getIcon(p.URI.parse(D),I),[]);return r.default.useEffect(()=>{let D;const I=()=>{D&&window.cancelAnimationFrame(D),D=window.requestAnimationFrame(()=>{D=null,s.allSlot.forEach(w=>{b.fire(new m.ResizeEvent({slotLocation:w.slot})),b.fireDirective(m.ResizeEvent.createDirective(w.slot))})})};return window.addEventListener("resize",I),()=>{window.removeEventListener("resize",I)}},[]),r.default.createElement(a.ComponentContextProvider,{value:{getIcon:l.getIcon,localize:p.localize,getResourceIcon:S}},r.default.createElement(_.ConfigProvider,{value:c.app.config},r.default.createElement(c.main,{callback:c.callback}),c.overlays&&c.overlays.map((D,I)=>r.default.createElement(D,{key:I}))))}const d=c=>y=>{o.default.createRoot(c).render(r.default.createElement(y,null))},E=(0,p.getDebugLogger)();function f(c,y){let b=c.config.layoutComponent||v.DefaultLayout;const A=c.browserModules.filter(R=>R.isOverlay).map(R=>R.component?R.component:(E.warn("Overlay module does not have component",R),null)).filter(Boolean),S=c.injector;S.get(h.ClientAppContextContribution).getContributions().forEach(R=>b=R.registerClientAppContext(b,S));const w=R=>r.default.createElement(u,{...R,app:c,main:b,overlays:A});return(typeof y=="function"?y:d(y))(w)}},96302:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConnectionService=m,t.bindConnectionServiceDeprecated=_;const n=e(8919),r=e(18740),o=e(76271),a=e(43718),p=e(16884),v=e(11050);async function m(g,l,h,u={}){var d;const E=g.get(v.AppConfig),f=g.get(a.IReporterService);h.setReporter(f);const c=g.get(a.IEventBus),y=g.get(p.ClientAppStateService),b=()=>{y.reachedState("core_module_initialized").then(()=>{c.fire(new a.BrowserConnectionOpenEvent)})};h.connection.isOpen()&&b(),h.connection.onOpen(()=>{b()}),h.connection.onClose(()=>{y.reachedState("core_module_initialized").then(()=>{c.fire(new a.BrowserConnectionCloseEvent)})}),h.connection.onError(I=>{y.reachedState("core_module_initialized").then(()=>{c.fire(new a.BrowserConnectionErrorEvent(I))})}),await h.initHandler(),g.addProviders({token:r.WSChannelHandler,useValue:h});const A=await h.openChannel(o.RPCServiceChannelPath),S=new n.RPCServiceCenter;return S.setSumiConnection(A.createSumiConnection(u)),!((d=E?.measure)===null||d===void 0)&&d.connection&&S.setReporter(f,E.measure.connection.minimumReportThresholdTime),s(g,l,S),g.get(a.ILogger).reportToServer(),A}function _(g,l,h){const u=new n.RPCServiceCenter,d=u.setConnection(h),E=h.onClose(()=>{d.dispose(),E.dispose()});s(g,l,u)}function s(g,l,h){const{getRPCService:u}=(0,n.initRPCService)(h),d=[],E=[];for(const f of l){const c=g.get(f);if(c.backServices)for(const y of c.backServices)d.push(y),y.protocol&&h.loadProtocol(y.protocol)}for(const f of d){const{servicePath:c}=f,y=u(c),b={token:c,useValue:y};g.addProviders(b),f.clientToken&&E.push(f)}for(const f of E){const{servicePath:c}=f,y=u(c);if(f.clientToken){const b=g.get(f.clientToken);y.onRequestService(b)}}}},75206:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppContextContribution=void 0,t.ClientAppContextContribution=Symbol("ClientAppContextContribution")},32796:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(72746),t),n.__exportStar(e(79248),t),n.__exportStar(e(96302),t),n.__exportStar(e(75206),t)},71843:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectInnerProviders=$;const n=e(43718),r=e(96405),o=e(16872),a=e(41480),p=e(12956),v=e(59555),m=e(18379),_=e(10605),s=e(66963),g=e(71707),l=e(80832),h=e(23396),u=e(77273),d=e(41118),E=e(37015),f=e(68456),c=e(75694),y=e(93899),b=e(77666),A=e(90697),S=e(73967),D=e(78132),I=e(68969),w=e(11719),T=e(52564),R=e(26542),M=e(52993),O=e(10845),x=e(40827),k=e(32242),F=e(99e3),L=e(42637),B=e(62652),U=e(27957),W=e(45670),j=e(66894),Q=e(63921),G=e(75206),Z=e(82493);function $(V){(0,n.createContributionProvider)(V,s.ClientAppContribution),(0,n.createContributionProvider)(V,n.CommandContribution),(0,n.createContributionProvider)(V,u.FsProviderContribution),(0,n.createContributionProvider)(V,d.KeybindingContribution),(0,n.createContributionProvider)(V,y.MenuContribution),(0,n.createContributionProvider)(V,f.ComponentContribution),(0,n.createContributionProvider)(V,T.SlotRendererContribution),(0,n.createContributionProvider)(V,D.PreferenceContribution),(0,n.createContributionProvider)(V,W.VariableContribution),(0,n.createContributionProvider)(V,f.TabBarToolbarContribution),(0,n.createContributionProvider)(V,L.ToolBarActionContribution),(0,n.createContributionProvider)(V,k.StaticResourceContribution),(0,n.createContributionProvider)(V,G.ClientAppContextContribution);const H=[{token:n.IEventBus,useClass:n.EventBusImpl},{token:n.CommandService,useClass:n.CommandServiceImpl},{token:n.CommandRegistry,useClass:n.CommandRegistryImpl},{token:d.KeybindingRegistry,useClass:d.KeybindingRegistryImpl},{token:d.KeybindingService,useFactory:K=>K.get(d.KeybindingRegistry)},{token:o.KeyboardNativeLayoutService,useClass:E.BrowserKeyboardLayoutImpl},{token:o.KeyboardLayoutChangeNotifierService,useFactory:K=>K.get(o.KeyboardNativeLayoutService)},{token:E.KeyValidator,useFactory:K=>K.get(o.KeyboardNativeLayoutService)},p.ClientAppStateService,{token:c.ILogger,useClass:c.Logger},{token:c.Logger,useAlias:c.ILogger},{token:f.ComponentRegistry,useClass:f.ComponentRegistryImpl},{token:W.VariableRegistry,useClass:W.VariableRegistryImpl},{token:y.AbstractMenuService,useClass:y.MenuServiceImpl},{token:y.AbstractContextMenuService,useClass:y.ContextMenuServiceImpl},{token:y.IMenuRegistry,useClass:y.MenuRegistryImpl},{token:b.IToolbarActionService,useClass:b.ToolbarActionService},{token:y.AbstractMenubarService,useClass:y.MenubarServiceImpl},{token:n.IReporter,useClass:n.DefaultReporter},{token:n.IReporterService,useClass:n.ReporterService},{token:n.ReporterMetadata,useValue:{host:n.REPORT_HOST.BROWSER}},{token:I.IProgressService,useClass:w.ProgressService},{token:L.IToolbarRegistry,useClass:U.NextToolbarRegistryImpl},{token:L.IToolbarPopoverRegistry,useClass:B.ToolbarPopoverRegistry},U.ToolbarClientAppContribution,{token:n.IProblemPatternRegistry,useClass:n.ProblemPatternRegistryImpl},{token:n.IProblemMatcherRegistry,useClass:n.ProblemMatchersRegistryImpl},{token:n.ITaskDefinitionRegistry,useClass:n.TaskDefinitionRegistryImpl},{token:A.IOpenerService,useClass:S.OpenerService},{token:j.IWindowService,useClass:Q.WindowService},{token:n.IApplicationService,useClass:v.ApplicationService},{token:M.IClipboardService,useClass:M.BrowserClipboardService},{token:O.IExternalUriService,useClass:O.ExternalUriService},{token:n.IAuthenticationService,useClass:_.AuthenticationService},{token:R.ICryptoService,useClass:R.CryptoService},{token:R.ICredentialsService,useClass:R.CredentialsService},{token:r.IHashCalculateService,useClass:r.HashCalculateServiceImpl},{token:n.IExtensionsSchemaService,useClass:h.ExtensionsPointServiceImpl},{token:n.AppLifeCycleServiceToken,useClass:Z.AppLifeCycleService},{token:k.StaticResourceService,useClass:F.StaticResourceServiceImpl},x.StaticResourceClientAppContribution,{token:g.ISplitPanelService,useClass:g.SplitPanelService},{token:n.IAIReporter,useClass:a.AIReporter},{token:l.IDesignStyleService,useClass:l.DesignStyleService},{token:m.ConnectionHelperFactory,useFactory:m.ConnectionHelperFactory}];V.addProviders(...H)}},82493:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppLifeCycleService=void 0;const n=e(85608),r=e(76003),o=e(43718);let a=class{constructor(){this.onDidChangeLifecyclePhaseEmitter=new o.Emitter,this.onDidLifeCyclePhaseChange=this.onDidChangeLifecyclePhaseEmitter.event}set phase(v){this.lifeCyclePhase=v,this.onDidChangeLifecyclePhaseEmitter.fire(this.lifeCyclePhase)}get phase(){return this.lifeCyclePhase}};t.AppLifeCycleService=a,t.AppLifeCycleService=a=n.__decorate([(0,r.Injectable)()],a)},99696:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=e(85608).__importDefault(e(99126));typeof window.ResizeObserver>"u"&&(window.ResizeObserver=r.default)},36206:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserModule=t.IClientApp=void 0;const n=e(85608),r=e(76003),o=e(43718);t.IClientApp=Symbol("CLIENT_APP_TOKEN");class a extends o.BasicModule{}t.BrowserModule=a,n.__decorate([(0,r.Autowired)(t.IClientApp),n.__metadata("design:type",Object)],a.prototype,"app",void 0)},14109:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MERGE_CONFLICT_COMMANDS=t.SCM_COMMANDS=t.QUICK_OPEN_COMMANDS=t.MARKER_COMMANDS=t.LAYOUT_COMMANDS=t.TERMINAL_COMMANDS=t.DIALOG_COMMANDS=t.KEYBOARD_COMMANDS=t.WORKSPACE_COMMANDS=t.OUTLINE_COMMANDS=t.SEARCH_COMMANDS=t.MULTI_DIFF_EDITOR_COMMANDS=t.DIFF_EDITOR_COMMANDS=t.EDITOR_COMMANDS=t.COMMON_COMMANDS=t.OPEN_EDITORS_COMMANDS=t.FILE_COMMANDS=void 0;const n=e(67304);var r;(function(b){const A="file";b.NEW_FILE={id:"file.new",category:A,iconClass:(0,n.getIcon)("new-file")},b.RENAME_FILE={id:"file.rename",category:A},b.DELETE_FILE={id:"file.delete",category:A},b.NEW_FOLDER={id:"file.folder.new",category:A,iconClass:(0,n.getIcon)("new-folder")},b.COMPARE_SELECTED={id:"file.compare",category:A},b.OPEN_FILE={id:"file.open",category:A},b.SAVE_FILE={id:"file.save",category:A},b.COLLAPSE_ALL={id:"filetree.collapse.all",category:A,iconClass:(0,n.getIcon)("collapse-all")},b.REFRESH_ALL={id:"filetree.refresh.all",category:A,iconClass:(0,n.getIcon)("refresh")},b.OPEN_RESOURCES={id:"filetree.open.file",category:A},b.OPEN_TO_THE_SIDE={id:"filetree.open.side",category:A},b.OPEN_TYPE_WITH={id:"filetree.open.with",category:A},b.COPY_PATH={id:"filetree.copy.path",category:A,label:"%file.copy.path%"},b.COPY_RELATIVE_PATH={id:"filetree.copy.relativepath",category:A},b.COPY_FILE={id:"filetree.copy.file",category:A},b.CUT_FILE={id:"filetree.cut.file",category:A},b.PASTE_FILE={id:"filetree.paste.file",category:A},b.SELECT_CURRENT_NODE={id:"filetree.selectCurrentNode",category:A},b.LOCATION={id:"filetree.location",category:A},b.LOCATION_WITH_EDITOR={id:"filetree.location_with_editor",category:A,iconClass:(0,n.getIcon)("focus")},b.OPEN_FOLDER={id:"filetree.open.folder",category:A,label:"%file.open.folder%"},b.VSCODE_OPEN_FOLDER={id:"filetree.open.vscode_open_folder",category:A},b.OPEN_WORKSPACE={id:"filetree.open.workspace",category:A,label:"%file.open.workspace%"},b.SEARCH_ON_FOLDER={id:"filetree.search.folder",category:A},b.FOCUS_FILES={id:"filetree.focus.files",category:A,label:"%file.focus.files%"},b.FILTER_TOGGLE={id:"filetree.files.filter_toggle",category:A,iconClass:(0,n.getIcon)("retrieval")},b.FILTER_OPEN={id:"filetree.files.filter_open",category:A},b.OPEN_TERMINAL_WITH_PATH={id:"filetree.openTerminalWithPath",category:A},b.FILTER_CLOSE={id:"filetree.quitFilterMode",category:A},b.NEXT={id:"filetree.next",category:A},b.PREV={id:"filetree.prev",category:A},b.COLLAPSE={id:"filetree.collapse",category:A},b.EXPAND={id:"filetree.expand",category:A},b.REVEAL_IN_EXPLORER={id:"filetree.revealInExplorer",category:A},b.TOGGLE_OR_OPEN={id:"filetree.toggleOrOpen",category:A}})(r||(t.FILE_COMMANDS=r={}));var o;(function(b){const A="openeditors";b.SAVE_ALL={id:"opened.editors.save.all",category:A,iconClass:(0,n.getIcon)("save-all")},b.CLOSE_ALL={id:"opened.editors.close.all",category:A,iconClass:(0,n.getIcon)("close-all")},b.SAVE_BY_GROUP={id:"opened.editors.save.byGroup"},b.CLOSE_BY_GROUP={id:"opened.editors.close.byGroup"},b.OPEN={id:"opened.editors.open",category:A},b.CLOSE={id:"opened.editors.close",category:A},b.OPEN_TO_THE_SIDE={id:"opened.editors.openToTheSide",category:A},b.COMPARE_SELECTED={id:"opened.editors.compare",category:A},b.COPY_RELATIVE_PATH={id:"opened.editors.copyRelativePath",category:A},b.COPY_PATH={id:"opened.editors.copyPath",category:A},b.LOCATION={id:"opened.editors.location",category:A}})(o||(t.OPEN_EDITORS_COMMANDS=o={}));var a;(function(b){b.FIND={id:"core.find",label:"%common.find%"},b.REPLACE={id:"core.replace",label:"%common.replace%"},b.ABOUT_COMMAND={id:"core.about",label:"%common.about%"},b.OPEN_PREFERENCES={id:"core.openpreference",label:"%common.preference.open%"},b.LOCATE_PREFERENCES={id:"workbench.preferences.locate"},b.OPEN_KEYMAPS={id:"core.keymaps.open",label:"%common.keymaps.open%"},b.OPEN_LAUNCH_CONFIGURATION={id:"core.launchConfiguration.open",label:"%debug.action.open.configuration%"},b.ENVIRONMENT_VARIABLE={id:"core.environment.variable"}})(a||(t.COMMON_COMMANDS=a={}));var p;(function(b){const A="editor";b.API_OPEN_EDITOR_COMMAND_ID="_workbench.open",b.API_OPEN_DIFF_EDITOR_COMMAND_ID="_workbench.diff",b.API_OPEN_WITH_EDITOR_COMMAND_ID="_workbench.openWith",b.VSCODE_OPEN_MULTI_DIFF_EDITOR_COMMAND_ID="_workbench.openMultiDiffEditor",b.NEW_UNTITLED_FILE={id:"file.new.untitled",category:A,label:"%file.new%",iconClass:(0,n.getIcon)("new-file")},b.UNDO={id:"editor.undo",category:A,label:"%editor.undo%"},b.REDO={id:"editor.redo",category:A,label:"%editor.redo%"},b.SELECT_ALL={id:"editor.selectAll",category:A,label:"%selection.all%"},b.OPEN_RESOURCE={id:"editor.openUri",category:A},b.OPEN_RESOURCES={id:"editor.openUris",category:A},b.SAVE_URI={id:"editor.saveUri",category:A},b.SAVE_CURRENT={id:"editor.saveCurrent",category:A,label:"%editor.saveCurrent%"},b.FOCUS_IF_NOT_ACTIVATE_ELEMENT={id:"editor.focusIfNotActivateElement",category:A,label:"%editor.saveCurrent%"},b.COMPARE={id:"editor.compare",category:A},b.OPEN_MERGEEDITOR={id:"editor.open.mergeEditor",category:A},b.OPEN_MERGEEDITOR_DEV={id:"editor.open.mergeEditor.dev",category:"Merge Editor (Dev)",label:"Open Merge Editor State from Json"},b.MERGEEDITOR_RESET={id:"editor.mergeEditor.reset",category:A,label:"%mergeEditor.reset%"},b.CLOSE={id:"editor.close",category:A,label:"%editor.closeCurrent%"},b.CLOSE_ALL_IN_GROUP={id:"editor.closeAllInGroup",category:A,label:"%editor.closeAllInGroup%"},b.CLOSE_OTHER_IN_GROUP={id:"editor.closeOtherEditorsInGroup",category:A,label:"%editor.closeOtherEditors%"},b.CLOSE_ALL={id:"editor.closeAll",category:A,label:"%editor.close.all%"},b.CLOSE_SAVED={id:"editor.closeSaved",category:A,label:"%editor.closeSaved%"},b.SAVE_ALL={id:"editor.saveAll",category:A,label:"%editor.saveAll%"},b.CLOSE_TO_RIGHT={id:"editor.closeToRight",category:A,label:"%editor.closeToRight%"},b.GET_CURRENT={id:"editor.getCurrent",category:A},b.GET_CURRENT_RESOURCE={id:"editor.getCurrentResource",category:A},b.SPLIT_TO_LEFT={id:"editor.splitToLeft",category:A,label:"%editor.splitToLeft%"},b.SPLIT_TO_RIGHT={id:"editor.splitToRight",category:A,label:"%editor.splitToRight%"},b.SPLIT_TO_TOP={id:"editor.splitToTop",category:A,label:"%editor.splitToTop%"},b.SPLIT_TO_BOTTOM={id:"editor.splitToBottom",category:A,label:"%editor.splitToBottom%"},b.CHANGE_LANGUAGE={id:"editor.changeLanguage",category:A},b.CHANGE_ENCODING={id:"editor.changeEncoding",category:A},b.GET_ENCODING={id:"editor.getEncoding",category:A},b.CHANGE_EOL={id:"editor.changeEol",category:A},b.NAVIGATE_LEFT={id:"editor.navigateLeft",category:A},b.NAVIGATE_RIGHT={id:"editor.navigateRight",category:A},b.NAVIGATE_UP={id:"editor.navigateUp",category:A},b.NAVIGATE_DOWN={id:"editor.navigateDown",category:A},b.NAVIGATE_NEXT={id:"editor.navigateNext",category:A},b.NAVIGATE_PREVIOUS={id:"editor.navigatePrevious",category:A},b.PREVIOUS={id:"editor.previous",category:A},b.NEXT={id:"editor.next",category:A},b.PREVIOUS_IN_GROUP={id:"editor.previousInGroup",category:A},b.NEXT_IN_GROUP={id:"editor.nextInGroup",category:A},b.LAST_IN_GROUP={id:"editor.lastInGroup",category:A},b.CLOSE_OTHER_GROUPS={id:"editor.closeOtherGroup",category:A,label:"%editor.closeEditorsInOtherGroups%"},b.OPEN_EDITOR_AT_INDEX={id:"editor.openEditorAtIndex",category:A},b.EVEN_EDITOR_GROUPS={id:"editor.evenEditorGroups",category:A,label:"%editor.resetEditorGroups%"},b.REVERT_DOCUMENT={id:"editor.document.revert",category:A,label:"%editor.revert%"},b.REVERT_AND_CLOSE={id:"editor.revertAndClose",category:A},b.GO_FORWARD={id:"editor.goForward",category:A},b.GO_BACK={id:"editor.goBack",category:A},b.PIN_CURRENT={id:"editor.pinCurrent",category:A},b.COPY_CURRENT_PATH={id:"editor.copyCurrentPath",category:A},b.GO_TO_GROUP={id:"editor.goToGroup",category:A},b.MOVE_GROUP={id:"editor.moveGroup",category:A},b.REOPEN_CLOSED={id:"editor.reopenClosed",category:A},b.FOCUS={id:"editor.focus",category:A},b.TEST_TOKENIZE={id:"editor.tokenize.test",category:A,label:"%editor.tokenize.test%"},b.AUTO_SAVE={id:"editor.autoSave",category:A},b.FOCUS_ACTIVE_EDITOR_GROUP={id:"editor.focusActiveEditorGroup",category:A},b.COMPONENT_UNDO={id:"editor.componentUndo",category:A},b.COMPONENT_REDO={id:"editor.componentRedo"},b.SEARCH_WORKSPACE_SYMBOL={id:"editor.workspaceSymbol.quickopen",label:"%editor.workspaceSymbol.quickopen%",category:A},b.SEARCH_WORKSPACE_SYMBOL_CLASS={id:"editor.workspaceSymbolClass.quickopen",label:"%editor.workspaceSymbolClass.quickopen%",category:A},b.GO_TO_LINE={id:"editor.action.gotoLine",label:"%editor.goToLine%",category:A},b.QUICK_OPEN={id:"workbench.action.quickOpen",category:A,label:"%editor.quickOpen%"},b.TOGGLE_WORD_WRAP={id:"editor.toggleWordWrap",label:"%editor.toggleWordWrap%",category:A},b.TOGGLE_COLUMN_SELECTION={id:"editor.action.toggleColumnSelection",label:"%editor.action.toggleColumnSelection%",category:A},b.FORMAT_DOCUMENT={id:"editor.action.formatDocument",category:A},b.FORMAT_SELECTION={id:"editor.action.formatSelection",category:A},b.FORMAT_DOCUMENT_WITH={id:"editor.action.formatDocument.multiple",category:A,label:"%editor.formatDocument.label.multiple%"},b.FORMAT_SELECTION_WITH={id:"editor.action.formatSelection.multiple",category:A,label:"%editor.formatSelection.label.multiple%"},b.COPY_PATH={id:"editor.action.copyPath",category:A,label:"%editor.copyPath%"},b.COPY_RELATIVE_PATH={id:"editor.action.copyRelativePath",category:A,label:"%editor.copyRelativePath%"}})(p||(t.EDITOR_COMMANDS=p={}));var v;(function(b){const A="diff-editor";b.REVERT={id:"editor.diff.revert",category:A},b.ACCEPT={id:"editor.diff.accept",category:A},b.TOGGLE_COLLAPSE_UNCHANGED_REGIONS={id:"editor.diff.toggleCollapseUnchangedRegions",category:A}})(v||(t.DIFF_EDITOR_COMMANDS=v={}));var m;(function(b){const A="multi-diff-editor";b.COLLAPSE_FILES={id:"editor.diff.collapseFiles",category:A},b.EXPAND_FILES={id:"editor.diff.expandFiles",category:A}})(m||(t.MULTI_DIFF_EDITOR_COMMANDS=m={}));var _;(function(b){const A="search";b.OPEN_SEARCH={id:"content-search.openSearch",category:A,label:"Open search sidebar"},b.REFRESH={id:"file-search.refresh",label:"refresh search",iconClass:(0,n.getIcon)("refresh"),category:A},b.CLEAN={id:"file-search.clean",label:"clean search",iconClass:(0,n.getIcon)("clear"),category:A},b.GET_RECENT_SEARCH_WORD={id:"search.getRecentSearchWordCmd",category:A},b.GET_BACK_RECENT_SEARCH_WORD={id:"search.getBackRecentSearchWordCmd",category:A},b.MENU_REPLACE={id:"search.menu.replace",category:A,label:"%search.replace.title%"},b.MENU_REPLACE_ALL={id:"search.menu.replaceAll",category:A,label:"%search.replaceAll.label%"},b.MENU_HIDE={id:"search.menu.hide",category:A,label:"%search.result.hide%"},b.MENU_COPY={id:"search.menu.copy",category:A,label:"%file.copy.file%"},b.MENU_COPY_ALL={id:"search.menu.copyAll",category:A,label:"%search.menu.copyAll%"},b.MENU_COPY_PATH={id:"search.menu.copyPath",category:A,label:"%file.copy.path%"},b.REPLACE={id:"search.replace",category:A},b.CLOSE={id:"search.close",category:A}})(_||(t.SEARCH_COMMANDS=_={}));var s;(function(b){const A="outline";b.OUTLINE_COLLAPSE_ALL={id:"outline.collapse.all",category:A},b.OUTLINE_FOLLOW_CURSOR={id:"outline.follow.cursor",category:A},b.OUTLINE_SORT_KIND={id:"outline.sort.kind",category:A},b.OUTLINE_SORT_NAME={id:"outline.sort.name",category:A},b.OUTLINE_SORT_POSITION={id:"outline.sort.position",category:A}})(s||(t.OUTLINE_COMMANDS=s={}));var g;(function(b){const A="workspace";b.ADD_WORKSPACE_FOLDER={id:"workspace.addFolderToWorkspace",label:"%workspace.addFolderToWorkspace%",category:A},b.REMOVE_WORKSPACE_FOLDER={id:"workspace.removeFolderFromWorkspace",label:"%workspace.removeFolderFromWorkspace%",category:A},b.SAVE_WORKSPACE_AS_FILE={id:"workspace.saveWorkspaceAsFile",label:"%workspace.saveWorkspaceAsFile%",category:A}})(g||(t.WORKSPACE_COMMANDS=g={}));var l;(function(b){const A="keyboard";b.CHOOSE_KEYBOARD_LAYOUT={id:"keyboard.chooseKeyboardLayout",label:"%keyboard.chooseKeyboardLayout%",category:A}})(l||(t.KEYBOARD_COMMANDS=l={}));var h;(function(b){const A="dialog";b.ENSURE={id:"dialog.ensure",category:A}})(h||(t.DIALOG_COMMANDS=h={}));var u;(function(b){b.CATEGORY="%terminal.name%",b.FOCUS_NEXT_TERMINAL={id:"workbench.action.terminal.focusNextPane",label:"%terminal.focusNext.inTerminalGroup%",category:b.CATEGORY},b.FOCUS_PREVIOUS_TERMINAL={id:"workbench.action.terminal.focusPreviousPane",label:"%terminal.focusPrevious.inTerminalGroup%",category:b.CATEGORY},b.SPLIT={id:"terminal.split",label:"%terminal.split%",category:b.CATEGORY},b.ADD={id:"terminal.add",label:"%terminal.new%",category:b.CATEGORY},b.REMOVE={id:"terminal.remove",label:"%terminal.remove%",category:b.CATEGORY},b.CLEAR={id:"terminal.clear",label:"%terminal.clear%",category:b.CATEGORY},b.OPEN_SEARCH={id:"terminal.search",label:"%terminal.search%",category:b.CATEGORY},b.SEARCH_NEXT={id:"terminal.search.next",label:"%terminal.search.next%",category:b.CATEGORY},b.OPEN_WITH_PATH={id:"terminal.openWithPath",category:b.CATEGORY},b.CLEAR_CONTENT={id:"terminal.clearContent",label:"%terminal.menu.clearCurrentContent%",category:b.CATEGORY},b.CLEAR_ALL_CONTENT={id:"terminal.clearAllContent",label:"%terminal.menu.clearAllContents%",category:b.CATEGORY},b.TAB_RENAME={id:"terminal.tabRename",category:b.CATEGORY},b.SELECT_ALL_CONTENT={id:"terminal.selectAllContent",label:"%terminal.menu.selectAllContent%",category:b.CATEGORY},b.MORE_SETTINGS={id:"terminal.moreSettings",label:"%terminal.menu.moreSettings%",category:b.CATEGORY},b.SELECT_TYPE={id:"terminal.selectType",category:b.CATEGORY},b.SELECT_ZSH={id:"terminal.selectTypeZsh",label:"zsh",category:b.CATEGORY},b.SELECT_BASH={id:"terminal.selectTypeBash",label:"bash",category:b.CATEGORY},b.SELECT_SH={id:"terminal.selectTypeSh",label:"sh",category:b.CATEGORY},b.SELECT_CMD={id:"terminal.selectTypeCMD",label:"cmd",category:b.CATEGORY},b.SELECT_POWERSHELL={id:"terminal.selectTypePowerShell",label:"powershell",category:b.CATEGORY},b.COPY={id:"terminal.copy",label:"%edit.copy%",category:b.CATEGORY},b.PASTE={id:"terminal.paste",label:"%edit.paste%",category:b.CATEGORY},b.SELECT_ALL={id:"terminal.selectAll",label:"%terminal.menu.selectCurrentContent%",category:b.CATEGORY},b.RE_LAUNCH={id:"terminal.relaunch",category:b.CATEGORY},b.TOGGLE_TERMINAL={id:"terminal.toggleTerminal",label:"%terminal.toggleTerminal%",category:b.CATEGORY},b.KILL_PROCESS={id:"terminal.killProcess",label:"%terminal.killProcess%",category:b.CATEGORY}})(u||(t.TERMINAL_COMMANDS=u={}));var d;(function(b){const A="view";b.QUICK_OPEN_VIEW={id:"layout.action.quickOpenView",category:A},b.OPEN_VIEW={id:"layout.action.openView",label:"%layout.action.openView%",category:A},b.MAXIMIZE_EDITOR={id:"layout.action.Maximizeeditor",category:A},b.TOGGLE_SIDEBAR_VISIBILITY={id:"main-layout.left-panel.toggle",category:A}})(d||(t.LAYOUT_COMMANDS=d={}));var E;(function(b){const A="marker";b.SHOW_ERRORS_WARNINGS={id:"marker.action.showErrorsWarnings",category:A},b.TOGGLE_SHOW_ERRORS_WARNINGS={id:"marker.action.toggleShowErrorsWarnings",category:A}})(E||(t.MARKER_COMMANDS=E={}));var f;(function(b){b.OPEN={id:"editor.action.quickCommand"},b.OPEN_OUTLINE={id:"editor.action.quickOutline"},b.OPEN_VIEW={id:"editor.action.quickView"},b.OPEN_WITH_COMMAND={id:"editor.action.quickCommand.withCommand"}})(f||(t.QUICK_OPEN_COMMANDS=f={}));var c;(function(b){const A="SCM";b.GetSCMResource={id:"scm.getResource",category:A},b._GIT_OPEN_MERGE_EDITOR={id:"_git.openMergeEditor"},b.GIT_OPEN_MERGE_EDITOR={id:"git.openMergeEditor"}})(c||(t.SCM_COMMANDS=c={}));var y;(function(b){const A="MergeConflict";b.AI_ACCEPT={id:"merge-conflict.ai.accept",category:A},b.ALL_RESET={id:"merge-conflict.ai.all-reset",category:A},b.AI_ALL_ACCEPT={id:"merge-conflict.ai.all-accept",category:A},b.AI_ALL_ACCEPT_STOP={id:"merge-conflict.ai.all-accept-stop",category:A}})(y||(t.MERGE_CONFLICT_COMMANDS=y={}))},22780:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCommonContribution=t.locationProtocolContextKey=t.inputFocusedContextKey=void 0;const n=e(85608),r=e(76003),o=e(97267),a=e(43718),p=e(53736),v=e(18193),m=e(22366),_=e(41118),s=e(1149),g=e(64102),l=e(39496),h=e(78132),u=e(11050),d=e(14109),E=e(66549);t.inputFocusedContextKey="inputFocus",t.locationProtocolContextKey="locationProtocol";let f=class{constructor(){this.schema=v.corePreferenceSchema;const y={"application.supportsOpenFolder":!!this.appConfig.isElectronRenderer&&!this.appConfig.isRemote,"application.supportsOpenWorkspace":!!this.appConfig.isElectronRenderer&&!this.appConfig.isRemote,"debug.toolbar.top":this.appConfig.isElectronRenderer?0:this.layoutViewSize.menubarHeight},b=Object.keys(this.schema.properties);for(const A of b)this.schema.properties[A].default=y[A]||this.schema.properties[A].default}onStart(){this.contextKeyService.createKey(t.locationProtocolContextKey,window.location.protocol.split(":")[0]),this.inputFocusedContext=this.contextKeyService.createKey(t.inputFocusedContextKey,!1),window.addEventListener("focusin",this.updateInputContextKeys.bind(this))}onStop(){window.removeEventListener("focusin",this.updateInputContextKeys.bind(this))}activeElementIsInput(){return!!document.activeElement&&(document.activeElement.tagName==="INPUT"||document.activeElement.tagName==="TEXTAREA")}updateInputContextKeys(){const y=this.activeElementIsInput();if(this.inputFocusedContext.set(y),y){const b=(0,m.trackFocus)(document.activeElement);a.Event.once(b.onDidBlur)(()=>{this.inputFocusedContext.set(this.activeElementIsInput()),b.dispose()})}}registerCommands(y){y.registerCommand(d.EDITOR_COMMANDS.UNDO),y.registerCommand(d.EDITOR_COMMANDS.REDO),y.registerCommand(d.EDITOR_COMMANDS.SELECT_ALL),y.registerCommand(d.COMMON_COMMANDS.ABOUT_COMMAND,{execute:()=>{alert((0,a.replaceLocalizePlaceholder)(this.appConfig.appName))}})}registerMenus(y){y.registerMenubarItem(l.MenuId.MenubarFileMenu,{label:(0,a.localize)("menu-bar.title.file"),order:1,iconClass:(0,o.getIcon)("menubar-file")}),y.registerMenubarItem(l.MenuId.MenubarEditMenu,{label:(0,a.localize)("menu-bar.title.edit"),order:2,iconClass:(0,o.getIcon)("menubar-edit")}),y.registerMenubarItem(l.MenuId.MenubarSelectionMenu,{label:(0,a.localize)("menu-bar.title.selection"),order:3,iconClass:(0,o.getIcon)("menubar-selection")}),y.registerMenubarItem(l.MenuId.MenubarViewMenu,{label:(0,a.localize)("menu-bar.title.view"),order:4,iconClass:(0,o.getIcon)("menubar-view")}),y.registerMenubarItem(l.MenuId.MenubarGoMenu,{label:(0,a.localize)("menu-bar.title.go"),order:5,iconClass:(0,o.getIcon)("menubar-go")}),y.registerMenubarItem(l.MenuId.MenubarTerminalMenu,{label:(0,a.localize)("menu-bar.title.terminal"),order:5,iconClass:(0,o.getIcon)("terminal")}),y.registerMenubarItem(l.MenuId.MenubarHelpMenu,{label:(0,a.localize)("menu-bar.title.help"),order:999,iconClass:(0,o.getIcon)("question-circle")}),y.registerMenuItems(l.MenuId.MenubarFileMenu,[{command:d.FILE_COMMANDS.OPEN_FOLDER.id,group:"1_open",when:"config.application.supportsOpenFolder"},{command:d.FILE_COMMANDS.OPEN_WORKSPACE.id,group:"1_open",when:"config.application.supportsOpenWorkspace"},{command:d.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,group:"1_open",when:"config.workspace.supportMultiRootWorkspace"},{command:d.WORKSPACE_COMMANDS.SAVE_WORKSPACE_AS_FILE.id,group:"1_open",when:"config.workspace.supportMultiRootWorkspace"},{command:d.EDITOR_COMMANDS.NEW_UNTITLED_FILE.id,group:"2_new"},{command:{id:d.EDITOR_COMMANDS.SAVE_CURRENT.id,label:(0,a.localize)("file.save")},group:"3_save"},{command:{id:d.EDITOR_COMMANDS.SAVE_ALL.id,label:(0,a.localize)("file.saveAll")},group:"3_save"},{command:{id:d.EDITOR_COMMANDS.AUTO_SAVE.id,label:(0,a.localize)("file.autoSave")},toggledWhen:"config.editor.autoSave != off",group:"4_autosave"}]),y.registerMenuItems(l.MenuId.MenubarGoMenu,[{command:{id:d.EDITOR_COMMANDS.GO_BACK.id,label:(0,a.localize)("editor.goBack")},group:"1_go"},{command:{id:d.EDITOR_COMMANDS.GO_FORWARD.id,label:(0,a.localize)("editor.goForward")},group:"1_go"},{command:{id:d.EDITOR_COMMANDS.QUICK_OPEN.id,label:(0,a.localize)("editor.quickOpen")},group:"2_go_file"},{command:{id:d.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,label:(0,a.localize)("editor.workspaceSymbol.quickopen")},group:"2_go_file"},{command:{id:d.EDITOR_COMMANDS.GO_TO_LINE.id,label:(0,a.localize)("editor.goToLine")},group:"3_go_infile"},{command:{id:"editor.action.jumpToBracket",label:(0,a.localize)("menu-bar.go.jumpToBracket")},group:"3_go_infile"},{command:{id:"editor.action.marker.nextInFiles",label:(0,a.localize)("menu-bar.go.nextProblemInFiles")},group:"6_go_problem"},{command:{id:"editor.action.marker.prevInFiles",label:(0,a.localize)("menu-bar.go.prevProblemInFiles")},group:"6_go_problem"}]),y.registerMenuItems(l.MenuId.MenubarTerminalMenu,[{command:{id:d.TERMINAL_COMMANDS.ADD.id,label:d.TERMINAL_COMMANDS.ADD.label},group:"1_terminal"},{command:{id:d.TERMINAL_COMMANDS.SPLIT.id,label:d.TERMINAL_COMMANDS.SPLIT.label},group:"1_terminal"}])}registerKeybindings(y){y.registerKeybinding({command:d.EDITOR_COMMANDS.SELECT_ALL.id,keybinding:"ctrlcmd+a",when:"editorFocus"}),y.registerKeybinding({command:d.EDITOR_COMMANDS.UNDO.id,keybinding:"ctrlcmd+z",when:"editorFocus"}),y.registerKeybinding({command:d.EDITOR_COMMANDS.REDO.id,keybinding:"ctrlcmd+shift+z",when:"editorFocus"})}};t.ClientCommonContribution=f,n.__decorate([(0,r.Autowired)(a.CommandService),n.__metadata("design:type",Object)],f.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(p.IContextKeyService),n.__metadata("design:type",Object)],f.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(u.AppConfig),n.__metadata("design:type",Object)],f.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(s.LayoutViewSizeConfig),n.__metadata("design:type",s.LayoutViewSizeConfig)],f.prototype,"layoutViewSize",void 0),t.ClientCommonContribution=f=n.__decorate([(0,a.Domain)(a.CommandContribution,E.ClientAppContribution,h.PreferenceContribution,g.MenuContribution,_.KeybindingContribution),n.__metadata("design:paramtypes",[])],f)},66549:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppContribution=void 0,t.ClientAppContribution=Symbol("ClientAppContribution")},34505:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCommonModule=void 0;const n=e(85608),r=e(76003),o=e(16908),a=e(43718),p=e(37638),v=e(36206),m=e(136),_=e(90697),s=e(45829),g=e(44867),l=e(22780),h=e(10797),u=e(17821);let d=class extends v.BrowserModule{constructor(){super(...arguments),this.contributionProvider=[_.OpenerContribution],this.providers=[l.ClientCommonContribution,g.DefaultOpenerContribution,g.OpenerContributionClient,p.AuthenticationContribution,m.HashCalculateContribution],this.electronProviders=[h.ClientElectronCommonContribution,s.ElectronOpenerContributionClient],this.webProviders=[u.ClientWebCommonContribution],this.backServices=[{servicePath:a.CommonServerPath,protocol:o.CommonServerProtocol},{servicePath:a.KeytarServicePath},{servicePath:a.CryptoServicePath}]}};t.ClientCommonModule=d,t.ClientCommonModule=d=n.__decorate([(0,r.Injectable)()],d)},98881:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecentStorage=void 0;const n=e(85608),r=e(76003),o=e(43718);let a=class{async getScopeStorage(){return this.recentStorage=this.recentStorage||await this.getStorage(o.STORAGE_NAMESPACE.RECENT_DATA),this.recentStorage}async getGlobalStorage(){return this.recentGlobalStorage=this.recentGlobalStorage||await this.getStorage(o.STORAGE_NAMESPACE.GLOBAL_RECENT_DATA),this.recentGlobalStorage}};t.RecentStorage=a,n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],a.prototype,"getStorage",void 0),t.RecentStorage=a=n.__decorate([(0,r.Injectable)()],a)},30144:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENSION_CONTAINER_ID=t.SCM_CONTAINER_ID=t.SEARCH_CONTAINER_ID=t.EXPLORER_CONTAINER_ID=t.DEBUG_CONTAINER_ID=t.TEST_RESULT_CONTAINER_ID=t.DEBUG_CONSOLE_CONTAINER_ID=t.TERMINAL_CONTAINER_ID=t.OUTPUT_CONTAINER_ID=t.MARKER_CONTAINER_ID=void 0,t.MARKER_CONTAINER_ID="markers",t.OUTPUT_CONTAINER_ID="output",t.TERMINAL_CONTAINER_ID="terminal",t.DEBUG_CONSOLE_CONTAINER_ID="debug-console",t.TEST_RESULT_CONTAINER_ID="test-result",t.DEBUG_CONTAINER_ID="debug",t.EXPLORER_CONTAINER_ID="explorer",t.SEARCH_CONTAINER_ID="search",t.SCM_CONTAINER_ID="scm",t.EXTENSION_CONTAINER_ID="extension"},10797:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientElectronCommonContribution=void 0;const n=e(85608),r=e(76003),o=e(43718),a=e(64102),p=e(39496),v=e(11050);let m=class{registerMenus(s){s.registerMenubarItem(p.MenuId.MenubarAppMenu,{label:(0,o.localize)("app.name",this.appConfig.appName),order:0}),s.registerMenuItems(p.MenuId.MenubarEditMenu,[{command:{id:"electron.undo",label:(0,o.localize)("editor.undo")},nativeRole:"undo",group:"1_undo"},{command:{id:"electron.redo",label:(0,o.localize)("editor.redo")},group:"1_undo",nativeRole:"redo"},{command:{label:(0,o.localize)("edit.cut"),id:"electron.cut"},nativeRole:"cut",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.copy"),id:"electron.copy"},nativeRole:"copy",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.paste"),id:"electron.paste"},nativeRole:"paste",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.selectAll"),id:"electron.selectAll"},nativeRole:"selectAll",group:"2_clipboard"}]),s.registerMenuItems(p.MenuId.MenubarAppMenu,[{command:{id:"electron.quit",label:(0,o.localize)("app.quit")},nativeRole:"quit",group:"4_quit"}])}};t.ClientElectronCommonContribution=m,n.__decorate([(0,r.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),t.ClientElectronCommonContribution=m=n.__decorate([(0,o.Domain)(a.MenuContribution)],m)},66963:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(14109),t),n.__exportStar(e(34505),t),n.__exportStar(e(66549),t),n.__exportStar(e(98881),t)},17821:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientWebCommonContribution=void 0;const n=e(85608),r=e(43718),o=e(64102),a=e(39496),p=e(14109);let v=class{registerMenus(_){_.registerMenuItems(a.MenuId.MenubarEditMenu,[{command:p.EDITOR_COMMANDS.REDO.id,group:"1_undo"},{command:p.EDITOR_COMMANDS.UNDO.id,group:"1_undo"}]),_.registerMenuItem(a.MenuId.MenubarHelpMenu,{command:{id:p.COMMON_COMMANDS.ABOUT_COMMAND.id,label:p.COMMON_COMMANDS.ABOUT_COMMAND.label},nativeRole:"about",group:"0_about"})}};t.ClientWebCommonContribution=v,t.ClientWebCommonContribution=v=n.__decorate([(0,r.Domain)(o.MenuContribution)],v)},25918:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TitleActionList=t.InlineActionWidget=t.MenuActionList=void 0,t.InlineActionBar=c,t.InlineMenuBar=y;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(97267),p=e(45803),v=e(43718),m=e(93899),_=e(48560),s=e(79951),g=e(55693),l=n.__importDefault(e(17647)),h=n.__importDefault(e(54859)),u=({data:b,hasSubmenu:A,disabled:S,iconService:D,hasChecked:I})=>o.default.createElement("div",{className:(0,r.default)(h.default.menuAction,{[h.default.disabled]:S,[h.default.checked]:b.checked})},o.default.createElement("div",{className:(0,r.default)({[h.default.icon]:I})},b.checked?o.default.createElement(a.Icon,{icon:"check"}):null),o.default.createElement("div",{className:h.default.label},b.label?(0,s.transformLabelWithCodicon)(v.strings.mnemonicButtonLabel(b.label,!0),{margin:"0 3px"},D?.fromString.bind(D)):""),o.default.createElement("div",{className:h.default.tip},b.keybinding?o.default.createElement("div",{className:h.default.shortcut},b.keybinding):null,A?o.default.createElement("div",{className:h.default.submenuIcon},o.default.createElement(a.Icon,{icon:"right"})):null,!b.keybinding&&!A&&b.extraDesc&&o.default.createElement("div",{className:h.default.extraDesc},b.extraDesc))),d=({data:b=[],context:A=[],afterClick:S,style:D,iconService:I,renderSubMenuTitle:w,renderMenuItem:T})=>{if(!b.length)return null;const R=o.default.useCallback(k=>{const{key:F,item:L}=k;if([m.SeparatorMenuItemNode.ID,m.SubmenuItemNode.ID].includes(F))return;const U=(Array.isArray(L.props.children)?L.props.children[0]:L.props.children).props.data;U&&(typeof U.execute=="function"&&U.execute(A),typeof S=="function"&&S(U))},[b,A]),M=o.default.useCallback((k,F)=>{if(w){const L=w(k,{hasSubmenu:!0,disabled:!1});if(L)return L}return o.default.createElement(u,{hasChecked:F,hasSubmenu:!0,data:k,iconService:I})},[w]),O=o.default.useCallback((k,F)=>{if(T){const L=T(k,{hasSubmenu:!1,disabled:k.disabled});if(L)return L}return o.default.createElement(u,{hasChecked:F,data:k,disabled:k.disabled,iconService:I})},[T]),x=o.default.useCallback(k=>{const F=k.some(L=>L.checked);return k.map((L,B)=>{if(L.id===m.SeparatorMenuItemNode.ID)return null;const U=k[B+1]&&k[B+1].id===m.SeparatorMenuItemNode.ID;return L.id===m.SubmenuItemNode.ID?!Array.isArray(L.children)||!L.children.length?null:o.default.createElement(o.default.Fragment,{key:`${L.id}-${L.submenuId}-${B}`},o.default.createElement(p.Menu.SubMenu,{key:`${L.id}-${L.submenuId}-${B}`,className:h.default.submenuItem,popupClassName:"kt-menu",title:M(L,F)},x(L.children)),U?o.default.createElement(p.Menu.Divider,{key:`divider-${B}`,className:h.default.menuItemDivider}):null):o.default.createElement(o.default.Fragment,{key:`${L.id}-${B}`},o.default.createElement(p.Menu.Item,{id:`${L.id}-${B}`,key:`${L.id}-${B}`,className:h.default.menuItem,disabled:L.disabled},O(L,F)),U?o.default.createElement(p.Menu.Divider,{key:`divider-${B}`,className:h.default.menuItemDivider}):null)})},[]);return o.default.createElement(p.Menu,{className:"kt-menu",selectable:!1,motion:{motionLeave:!1,motionEnter:!1},builtinPlacements:l.default,onClick:R,style:D},x(b))};t.MenuActionList=d;const E=({type:b,icon:A,disabled:S,onClick:D,title:I})=>{const w=(0,g.useDesignStyles)(h.default.btnAction,"btnAction");if(b==="icon")return o.default.createElement(a.Button,{size:"small",type:b,className:w,onClick:D,title:I,icon:A||"ellipsis"});const T={};return(0,v.isBoolean)(S)&&(T.disabled=S),o.default.createElement(a.Button,{size:"small",type:"secondary",className:w,onClick:D,...T,title:I},o.default.createElement(a.Icon,{icon:A||"ellipsis"}))};E.displayName="EllipsisWidget",t.InlineActionWidget=o.default.memo(({iconService:b,type:A="icon",data:S,context:D=[],className:I,afterClick:w,...T})=>{const R=(0,g.useDesignStyles)(h.default.iconAction,"iconAction"),M=(0,g.useDesignStyles)(h.default.btnAction,"btnAction"),[O,x]=(0,o.useState)(!1),k=o.default.useCallback(async(U,...W)=>{if(U&&(U.preventDefault(),U.stopPropagation()),!O){if(x(!0),S.id===m.SubmenuItemNode.ID&&U){const j={x:U.clientX,y:U.clientY};await S.execute([j,...D])}else typeof S.execute=="function"&&await S.execute([...D,...W]);x(!1),typeof w=="function"&&w()}},[S,D]),[F,L]=o.default.useMemo(()=>{let U=S.tooltip||S.label;const W=S.label;return S.keybinding&&(U=`${U} (${S.keybinding})`),[U,W]},[S]),B=S.id===m.SubmenuItemNode.ID;return A==="icon"&&!S.type?o.default.createElement(a.Button,{type:S.icon?"icon":"link",className:(0,r.default)(R,I,{[h.default.disabled]:S.disabled,[h.default.submenuIconAction]:B}),title:F,iconClass:S.icon,onClick:k,...T},!S.icon&&L):S.type==="checkbox"?o.default.createElement(a.CheckBox,{className:(0,r.default)(I,M),disabled:S.disabled,label:S.label,title:F,checked:S.checked,onChange:U=>k(void 0,U.target.checked),...T}):o.default.createElement(a.Button,{loading:O,showLoadingIcon:!1,className:(0,r.default)(I,M),disabled:S.disabled,onClick:k,size:"small",type:S.type,title:F,...T},(0,s.transformLabelWithCodicon)(L,{margin:"0 3px"},b?.fromString.bind(b)),B&&o.default.createElement(a.Icon,{icon:"down",className:"kt-button-secondary-more"}))}),t.InlineActionWidget.displayName="InlineAction";const f=({data:b,context:A})=>{const S=o.default.useCallback(()=>b.getExecuteArgs(A),[b,A]);return o.default.createElement(b.component,{getExecuteArgs:S})};f.displayName="CustomAction",t.TitleActionList=o.default.memo(({type:b="icon",nav:A=[],more:S=[],moreIcon:D,moreTitle:I,context:w=[],extraNavActions:T=[],moreAtFirst:R=!1,className:M,afterClick:O,menuId:x,iconService:k,regroup:F=(...L)=>L})=>{const L=(0,_.useInjectable)(m.ICtxMenuRenderer),B=(0,_.useInjectable)(m.AbstractMenuService),U=(0,g.useDesignStyles)(h.default.titleActions,"titleActions"),[W,j]=F(A,S),Q=o.default.useCallback(Z=>{Z.preventDefault(),Z.stopPropagation(),j&&L.show({anchor:{x:Z.clientX,y:Z.clientY},menuNodes:j,args:w,onHide:O})},[j,w]);if(W.length===0&&j.length===0&&T.length===0)return null;const G=j.length>0?o.default.createElement(E,{disabled:j[0].disabled,icon:D,type:b,onClick:Q,title:I}):null;return o.default.createElement("div",{className:(0,r.default)([U,M]),"data-menu-id":x},R&&G,W.map(Z=>{if(Z.id===m.ComponentMenuItemNode.ID)return o.default.createElement(f,{context:w,data:Z,key:Z.nodeId});if(Z.id===m.SubmenuItemNode.ID){const V=B.createMenu(Z.submenuId);if(!((0,m.generateMergedCtxMenu)({menus:V}).length>0))return}if(Z.id===m.SeparatorMenuItemNode.ID)return o.default.createElement("span",{key:`vertical-divider-${Z.id}`,className:h.default.verticalDivider});const $=Z.id===m.SubmenuItemNode.ID?Z.submenuId:Z.id;return o.default.createElement(t.InlineActionWidget,{id:$,key:$,className:(0,r.default)({[h.default.selected]:Z.checked}),type:b,data:Z,afterClick:O,context:w,iconService:k})}),Array.isArray(T)&&T.length?o.default.createElement(o.default.Fragment,null,W.length&&o.default.createElement("span",{className:h.default.divider}),T):null,!R&&G)}),t.TitleActionList.displayName="TitleActionList";function c(b){const{menus:A,context:S,separator:D="navigation",debounce:I,isFlattenMenu:w=!1,...T}=b,[R,M]=(0,g.useMenus)(A,D,S,I),O=(0,o.useMemo)(()=>w?[...R,...M]:R,[R,M,w]);return o.default.createElement(t.TitleActionList,{menuId:A.menuId,nav:O,more:D==="inline"||w?[]:M,...T})}function y(b){const{iconService:A,menus:S,context:D,moreIcon:I,moreTitle:w,separator:T="navigation",...R}=b,[M,O]=(0,g.useContextMenus)(S);return o.default.createElement(t.TitleActionList,{menuId:S.menuId,nav:M,more:T==="inline"?[]:O,moreIcon:I,moreTitle:w,context:D,iconService:A,...R})}y.displayName="InlineMenuBar"},17647:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.placements=void 0;const e={adjustX:1,adjustY:1},n=[0,0];t.placements={topLeft:{points:["bl","tl"],overflow:e,offset:[0,-4],targetOffset:n},topCenter:{points:["bc","tc"],overflow:e,offset:[0,-4],targetOffset:n},topRight:{points:["br","tr"],overflow:e,offset:[0,-4],targetOffset:n},bottomLeft:{points:["tl","bl"],overflow:e,offset:[0,4],targetOffset:n},bottomCenter:{points:["tc","bc"],overflow:e,offset:[0,4],targetOffset:n},bottomRight:{points:["tr","br"],overflow:e,offset:[0,4],targetOffset:n}},t.default=t.placements},89847:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIAction=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(43718),p=e(70650),v=e(22689),m=e(48560),_=e(57995),s=e(24951),g=e(49716),l=e(52141),h=n.__importDefault(e(27410)),u=(0,v.createLayoutEventType)(a.AIInlineChatContentWidgetId),d=new CustomEvent(u,{bubbles:!0}),E=f=>{const{operationList:c,moreOperation:y,showClose:b=!0,onClickItem:A,onClose:S,customOperationRender:D,loading:I,loadingShowOperation:w=!1}=f,T=o.default.useRef(null),[R,M]=(0,m.useHover)(),O=(0,m.useInjectable)(p.AINativeConfigService),x=(0,o.useCallback)(()=>{S?.()},[S]);(0,m.useChange)(M,()=>{var B;(B=T.current)===null||B===void 0||B.dispatchEvent(d)});const k=(0,o.useMemo)(()=>{const B=O?.inlineChat.logo;return typeof B=="string"?o.default.createElement("img",{src:B,className:h.default.ai_action_icon}):o.default.isValidElement(B)?B:typeof B=="function"?o.default.createElement(B,null):null},[O?.inlineChat.logo]),F=(0,o.useCallback)(()=>I&&w?o.default.createElement("div",{className:h.default.loading_mask}):null,[I,w]),L=(0,o.useCallback)(()=>{if(I&&!w)return null;const B=o.default.createElement(o.default.Fragment,null,c?.map(({name:U,title:W,id:j},Q)=>W?o.default.createElement(l.EnhancePopover,{id:j,title:W,key:`popover_${Q}`},o.default.createElement(_.EnhanceIcon,{wrapperClassName:h.default.operate_item,onClick:()=>A?.(j)},o.default.createElement("span",{key:Q},U))):o.default.createElement(_.EnhanceIcon,{wrapperClassName:h.default.operate_item,onClick:()=>A?.(j),key:Q},o.default.createElement("span",null,U))),y?.length?o.default.createElement(_.EnhanceIconWithCtxMenu,{icon:"more",menuNodes:y,wrapperClassName:h.default.operate_btn,skew:{x:-83,y:5}}):null);return o.default.createElement("div",{ref:R,className:h.default.operate_container},F(),k&&o.default.createElement(s.LineVertical,{height:"100%",margin:"0 8px",maxHeight:14,minHeight:14}),D?o.default.createElement("div",{className:h.default.custom_operation_wrapper},D):o.default.createElement("div",{className:h.default.default_operation_wrapper},B))},[D,c,y,I,w,k]);return o.default.createElement("div",{ref:T,className:(0,r.default)(h.default.ai_action_wrapper,I&&h.default.loading,w&&h.default.loading_show_operation)},o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:h.default.stable_container},I?o.default.createElement(l.EnhancePopover,{id:"inline_chat_loading",title:(0,a.localize)("aiNative.inline.chat.operate.loading.cancel")},o.default.createElement(g.Loading,{className:h.default.loading_icon})):k?o.default.createElement("div",{className:h.default.logo_container},k):null),L(),b&&o.default.createElement("div",{className:h.default.close_container},o.default.createElement(s.LineVertical,{height:"100%",margin:"0px 8px",maxHeight:14,minHeight:14}),o.default.createElement(_.EnhanceIcon,{wrapperClassName:h.default.operate_btn,icon:"window-close",onClick:x}))))};t.AIAction=E},66205:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContentWidgetContainerPanel=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(41771)),a=p=>r.default.createElement("div",{className:o.default.inline_chat_container_panel,style:p.style},p.children);t.ContentWidgetContainerPanel=a},57995:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AILogoAvatar=t.EnhanceIconWithCtxMenu=t.EnhanceIcon=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(43718),p=e(81878),v=e(97222),m=e(48560),_=n.__importDefault(e(42798));t.EnhanceIcon=o.default.forwardRef((l,h)=>o.default.createElement("div",{className:(0,r.default)(l.wrapperClassName,_.default.ai_enhance_icon),style:l.wrapperStyle,onClick:l.onClick,ref:h,tabIndex:l.tabIndex,role:l.role,"aria-label":l.ariaLabel,"aria-pressed":l.ariaPressed},o.default.createElement(p.Icon,{className:(0,r.default)(l.className,_.default.icon),children:null,onClick:()=>null,style:(l.icon||l.iconClass)&&l.children?{marginRight:5}:{},icon:l.icon,iconClass:l.iconClass}),l.children&&o.default.createElement("span",{className:_.default.children_wrap},l.children)));const s=l=>{const{children:h,menuNodes:u,skew:d,id:E,...f}=l,c=(0,m.useInjectable)(a.CommandService),y=(0,m.useInjectable)(v.IBrowserCtxMenu),[b,A]=o.default.useState(void 0),S=o.default.useRef(null);o.default.useEffect(()=>{D()},[S.current,d]);const D=(0,o.useCallback)(w=>{requestAnimationFrame(()=>{if(S.current){const T=S.current.getBoundingClientRect(),{x:R,y:M,width:O,height:x}=T,k={x:R+O,y:M+x};d&&(k.x+=d.x,k.y+=d.y),A(k),w&&w(k)}})},[S.current,d]),I=o.default.useCallback(()=>{b&&(u?D(w=>{y.show({anchor:w,menuNodes:u})}):E&&c.executeCommand(E))},[S.current,u,b,E]);return o.default.createElement(t.EnhanceIcon,{ref:S,onClick:I,...f},h)};t.EnhanceIconWithCtxMenu=s;const g=l=>o.default.createElement("div",{className:(0,r.default)(_.default.ai_logo_avatar_container,l.className)},o.default.createElement(p.Icon,{icon:"magic-wand",className:(0,r.default)(l.iconClassName,_.default.avatar_icon)}));t.AILogoAvatar=g},89195:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(89847),t),n.__exportStar(e(57995),t),n.__exportStar(e(28229),t),n.__exportStar(e(24951),t),n.__exportStar(e(52141),t),n.__exportStar(e(75777),t),n.__exportStar(e(49716),t),n.__exportStar(e(83913),t)},28229:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIInlineResult=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(57995),p=e(24951),v=e(75777),m=n.__importDefault(e(5011)),_=s=>{const{iconItems:g,isRenderThumbs:l=!0,isRenderClose:h=!1,closeClick:u}=s;return o.default.createElement("div",{className:m.default.ai_inline_result_panel},o.default.createElement("div",{className:m.default.side},g.map(({icon:d,text:E,onClick:f,btnType:c},y)=>o.default.createElement(a.EnhanceIcon,{wrapperClassName:(0,r.default)(m.default.operate_btn,c==="default"?m.default.default:""),icon:d,onClick:f,key:y},o.default.createElement("span",null,E)))),l&&o.default.createElement(o.default.Fragment,null,o.default.createElement(p.LineVertical,{height:"60%",margin:"0px 6px 0 6px"}),o.default.createElement("div",{className:m.default.side},o.default.createElement(v.Thumbs,{wrapperClassName:m.default.operate_icon}))),h&&o.default.createElement(o.default.Fragment,null,o.default.createElement(a.EnhanceIcon,{wrapperClassName:m.default.operate_btn,icon:"close",onClick:u})))};t.AIInlineResult=_},83913:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InteractiveInput=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(97267),p=e(43718),v=e(37015),m=e(48560),_=e(7369),s=e(89195),g=n.__importDefault(e(42348)),l=160,h=32,u="ai-native-chat-input-history",d=10;t.InteractiveInput=o.default.forwardRef((E,f)=>{const{placeholder:c,onKeyDown:y,onBlur:b,onValueChange:A,onHeightChange:S,onFocus:D,onSend:I,onStop:w,disabled:T=!1,className:R,height:M,width:O,sendBtnClassName:x,popoverPosition:k,autoFocus:F,defaultValue:L}=E,B=(0,o.useRef)(null),U=(0,m.useInjectable)(_.GlobalBrowserStorageService),W=(0,o.useRef)(),j=(0,o.useRef)(0),[Q,G]=(0,o.useState)(L||E.value||""),[Z,$]=(0,o.useState)(M||h),[V,H]=(0,o.useState)(!1),K=o.default.useRef(!1);(0,o.useImperativeHandle)(f,()=>B.current),(0,o.useEffect)(()=>{const ue=U.getData(u);ue&&(W.current=ue)},[]),(0,o.useEffect)(()=>{B&&B.current&&F&&B.current.focus()},[B]),(0,o.useEffect)(()=>{var ue;const te=E.value;(0,p.isUndefined)(te)||te!==((ue=B.current)===null||ue===void 0?void 0:ue.value)&&G(te||"")},[E.value,Q,B]),(0,o.useEffect)(()=>{(0,p.isUndefined)(M)||M!==Z&&$(M)},[M,Z,S]),(0,o.useEffect)(()=>{if(!Q){$(h);return}if(B&&B.current&&Z<=l){B.current.style.height="0px";const ue=B.current.scrollHeight;B.current.style.height=Math.min(ue,l)+"px";const te=Math.min(ue+12,l);$(te)}},[B,Q,S,Z]),(0,o.useEffect)(()=>{S?.(Z)},[Z]);const Y=(0,o.useCallback)(ue=>{K.current=!0,G(ue),A?.(ue)},[A]),X=(0,o.useCallback)(ue=>{H(!0),D?.(ue)},[D]),oe=(0,o.useCallback)(ue=>{H(!1),b?.(ue)},[b]),ie=(0,o.useCallback)(()=>{w&&w()},[]),he=(0,o.useCallback)(()=>{T||Q.trim()&&(W.current=W.current||[],W.current.push(Q),j.current=0,U.setData(u,W.current.slice(-d)),K.current=!1,I?.(Q))},[I,Q,T]),me=(0,o.useCallback)(ue=>{var te,fe,Ie;if(ue.key===v.Key.ENTER.code&&!ue.nativeEvent.isComposing){if(ue.shiftKey)return;ue.preventDefault(),he();return}else if((ue.key===v.Key.ARROW_UP.code||ue.key===v.Key.ARROW_DOWN.code)&&(!Q||!K.current)){if(ue.preventDefault(),ue.key===v.Key.ARROW_UP.code){const Me=(te=W.current)===null||te===void 0?void 0:te[W.current.length-1-j.current];Me&&(G(Me),A?.(Me),j.current=Math.min(j.current+1,((fe=W.current)===null||fe===void 0?void 0:fe.length)||0))}else if(ue.key===v.Key.ARROW_DOWN.code){ue.preventDefault();const Me=(Ie=W.current)===null||Ie===void 0?void 0:Ie[W.current.length-1-j.current];Me&&(G(Me),A?.(Me),j.current=Math.max(j.current-1,0))}}y?.(ue)},[y,he,Q]),q=(0,o.useMemo)(()=>o.default.createElement("div",{className:g.default.input_icon_container},o.default.createElement("div",{className:(0,r.default)(g.default.send_chat_btn,V&&g.default.active,T&&g.default.disabled,x)},T?w?o.default.createElement(a.Popover,{id:`ai_chat_input_send_${(0,p.uuid)(4)}`,content:(0,p.localize)("aiNative.chat.enter.send"),delay:1500,position:k??a.PopoverPosition.top,disable:T},o.default.createElement(s.EnhanceIcon,{wrapperClassName:g.default.stop_icon,className:"codicon codicon-debug-stop",onClick:ie,tabIndex:0,role:"button",ariaLabel:(0,p.localize)("aiNative.chat.enter.send")})):o.default.createElement("div",{className:g.default.ai_loading},o.default.createElement("div",{className:g.default.loader}),o.default.createElement("div",{className:g.default.loader}),o.default.createElement("div",{className:g.default.loader})):o.default.createElement(a.Popover,{id:`ai_chat_input_send_${(0,p.uuid)(4)}`,content:(0,p.localize)("aiNative.chat.enter.send"),delay:1500,position:k??a.PopoverPosition.top,disable:T},o.default.createElement(s.EnhanceIcon,{wrapperClassName:g.default.send_icon,className:(0,a.getIcon)("send-solid"),onClick:he,tabIndex:0,role:"button",ariaLabel:(0,p.localize)("aiNative.chat.enter.send")})))),[V,T,x,Q,k]),Ee=(0,o.useMemo)(()=>(0,p.isUndefined)(O)?"100%":O+"px",[O]);return o.default.createElement(a.TextArea,{ref:B,placeholder:c,wrapperStyle:{height:Z+"px",width:Ee},style:{height:Z-10+"px"},value:Q,onKeyDown:me,onFocus:X,onBlur:oe,onValueChange:Y,disabled:T,className:(0,r.default)(g.default.interactive_input_container,V?g.default.active:null,R),addonAfter:q})}),t.InteractiveInput.displayName="interactiveInput"},24951:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HorizontalVertical=t.LineVertical=void 0;const r=e(85608).__importDefault(e(14041)),o={backgroundColor:"var(--editorGroup-border)",height:"100%",width:"1px",minWidth:"1px"},a={backgroundColor:"var(--editorGroup-border)",width:"100%",height:"1px",minHeight:"1px"},p=m=>r.default.createElement("span",{style:{...o,...m}});t.LineVertical=p;const v=m=>r.default.createElement("span",{style:{...a,...m}});t.HorizontalVertical=v},49716:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loading=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(97267),p=n.__importDefault(e(43135));t.Loading=o.default.memo(v=>o.default.createElement(a.Icon,{className:(0,r.default)(v.className,p.default.loading_indicator),iconClass:(0,a.getIcon)("loading")})),t.Loading.displayName="Loading"},52141:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnhancePopover=void 0;const r=e(85608).__importStar(e(14041)),o=e(97267),a=e(43718),p=v=>{const{children:m,id:_,title:s,onClick:g}=v,[l,h]=r.default.useState(!1),u=(0,r.useMemo)(()=>_+(0,a.uuid)(6),[_]),d=(0,r.useCallback)(f=>{h(!1),g&&g(f)},[g]),E=(0,r.useCallback)(f=>{h(f)},[]);return r.default.createElement(o.Popover,{id:u,title:s,onClick:d,display:l,onDisplayChange:E},m)};t.EnhancePopover=p},75777:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Thumbs=void 0;const r=e(85608).__importStar(e(14041)),o=e(43718),a=e(95040),p=e(81878),v=e(48560),m=e(67304),_=e(57995),s=g=>{const l=(0,v.useInjectable)(a.IAIInlineChatService),{relationId:h,onClick:u,wrapperClassName:d}=g,[E,f]=(0,r.useState)("thumbs"),[c,y]=(0,r.useState)("thumbsdown"),b=(0,r.useCallback)(D=>{u&&u(D),l&&l.fireThumbsEvent(D)},[h,l]),A=(0,r.useCallback)(D=>{D==="up"&&E==="thumbs"&&(f("thumbs-fill"),y(!1),b(!0)),D==="up"&&E==="thumbs-fill"&&(f("thumbs"),y("thumbsdown")),D==="down"&&c==="thumbsdown"&&(y("thumbsdown-fill"),f(!1),b(!1)),D==="down"&&c==="thumbsdown-fill"&&(y("thumbsdown"),f("thumbs"))},[E,c]),S=(0,v.useUUID)();return r.default.createElement(r.default.Fragment,null,typeof E=="string"&&r.default.createElement(p.Popover,{id:`ai-chat-thumbsup-${S}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title")},r.default.createElement(_.EnhanceIcon,{wrapperClassName:d,onClick:()=>A("up"),className:(0,m.getExternalIcon)(E,m.KTICON_OWNER),tabIndex:0,role:"button",ariaLabel:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title"),ariaPressed:E==="thumbs-fill"?"true":"false"})),typeof c=="string"&&r.default.createElement(p.Popover,{id:`ai-chat-thumbsdown-${S}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title")},r.default.createElement(_.EnhanceIcon,{wrapperClassName:d,onClick:()=>A("down"),className:(0,m.getExternalIcon)(c,m.KTICON_OWNER),tabIndex:0,role:"button",ariaLabel:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title"),ariaPressed:c==="thumbsdown-fill"?"true":"false"})))};t.Thumbs=s},81878:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scroll=t.Scrollbars=t.NativeSelect=void 0;const n=e(85608);n.__exportStar(e(97885),t),n.__exportStar(e(73215),t),n.__exportStar(e(32293),t);var r=e(77331);Object.defineProperty(t,"NativeSelect",{enumerable:!0,get:function(){return r.Select}}),n.__exportStar(e(48412),t),n.__exportStar(e(79383),t),n.__exportStar(e(50708),t),n.__exportStar(e(7273),t),n.__exportStar(e(14640),t),n.__exportStar(e(54076),t),n.__exportStar(e(79024),t),n.__exportStar(e(89832),t),n.__exportStar(e(54713),t),n.__exportStar(e(18875),t),n.__exportStar(e(91397),t),n.__exportStar(e(31059),t),n.__exportStar(e(72871),t),n.__exportStar(e(34128),t);var o=e(77011);Object.defineProperty(t,"Scrollbars",{enumerable:!0,get:function(){return o.Scrollbars}}),Object.defineProperty(t,"Scroll",{enumerable:!0,get:function(){return o.Scrollbars}})},57327:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BoxPanel=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(48560),p=e(38578),v=e(55693),m=e(25719),_=n.__importDefault(e(91290)),s=({className:g,children:l=[],direction:h="left-to-right",...u})=>{const d=o.default.Children.toArray(l),E=(0,a.useInjectable)(p.AppConfig),f=(0,v.useDesignStyles)(_.default["box-panel"],"box-panel");(0,o.useEffect)(()=>{E.didRendered&&E.didRendered()},[]);const c=m.Layout.getStyleProperties(h);return o.default.createElement("div",{...u,className:(0,r.default)(f,g),style:{flexDirection:c.direction,zIndex:u.zIndex||u["z-index"]}},d.map((y,b)=>{const A=y.props||{};return o.default.createElement("div",{key:b,id:A["data-wrapper-id"],className:(0,r.default)(_.default.wrapper,A["data-wrapper-class"]),style:{flex:A.flex,overflow:A.overflow,zIndex:A.zIndex||A["z-index"],[c.minSize]:A.defaultSize,backgroundColor:A.backgroundColor}},y)}))};t.BoxPanel=s},28003:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultLayout=t.getStorageValue=void 0,t.ToolbarActionBasedLayout=m,t.fixLayout=_;const r=e(85608).__importDefault(e(14041)),o=e(52564),a=e(57327),p=e(99333),v=()=>{let s={},g={};try{const l=localStorage.getItem("layout");l&&(s=JSON.parse(l));const h=localStorage.getItem("theme");h&&(g=JSON.parse(h))}catch{}return{layout:_(s),colors:g}};t.getStorageValue=v,t.DefaultLayout=m;function m(s={}){var g,l,h,u,d,E;const{layout:f}=(0,t.getStorageValue)();return r.default.createElement(a.BoxPanel,{direction:"top-to-bottom"},r.default.createElement(o.SlotRenderer,{id:"top",defaultSize:s.topSlotDefaultSize||0,slot:"top",zIndex:s.topSlotZIndex}),r.default.createElement(p.SplitPanel,{id:"main-horizontal",flex:1},r.default.createElement(o.SlotRenderer,{slot:"left",isTabbar:!0,defaultSize:!((g=f.left)===null||g===void 0)&&g.currentId?((l=f.left)===null||l===void 0?void 0:l.size)||310:49,minResize:280,maxResize:480,minSize:49}),r.default.createElement(p.SplitPanel,{id:"main-vertical",minResize:300,flexGrow:1,direction:"top-to-bottom"},r.default.createElement(o.SlotRenderer,{flex:2,flexGrow:1,minResize:200,slot:"main"}),r.default.createElement(o.SlotRenderer,{flex:1,defaultSize:!((h=f.bottom)===null||h===void 0)&&h.currentId?(u=f.bottom)===null||u===void 0?void 0:u.size:24,minResize:160,slot:"bottom",isTabbar:!0})),r.default.createElement(o.SlotRenderer,{slot:"right",isTabbar:!0,defaultSize:!((d=f.right)===null||d===void 0)&&d.currentId?((E=f.right)===null||E===void 0?void 0:E.size)||310:0,minResize:280,maxResize:480,minSize:0})),r.default.createElement(o.SlotRenderer,{id:"statusBar",defaultSize:24,slot:"statusBar"}))}function _(s){const g={...s};for(const l in s)s[l]&&(s[l].size||(g[l].currentId=""));return g}},32293:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(25719),t),n.__exportStar(e(99333),t),n.__exportStar(e(57327),t),n.__exportStar(e(28003),t)},25719:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Layout=void 0;const n=e(73215),r={"left-to-right":{direction:"row",size:"width",domSize:"clientHeight",minSize:"minWidth",maxSize:"maxWidth"},"right-to-left":{direction:"row-reverse",size:"width",domSize:"clientHeight",minSize:"minWidth",maxSize:"maxWidth"},"top-to-bottom":{direction:"column",size:"height",domSize:"clientWidth",minSize:"minHeight",maxSize:"maxHeight"},"bottom-to-top":{direction:"column-reverse",size:"height",domSize:"clientWidth",minSize:"minHeight",maxSize:"maxHeight"}};var o;(function(a){function p(u){return r[u]}a.getStyleProperties=p;function v(u){return r[u].direction}a.getFlexDirection=v;function m(u){return r[u].size}a.getSizeProperty=m;function _(u){return r[u].domSize}a.getDomSizeProperty=_;function s(u){return r[u].minSize}a.getMinSizeProperty=s;function g(u){return r[u].maxSize}a.getMaxSizeProperty=g;function l(u){return u==="bottom-to-top"||u==="top-to-bottom"?n.ResizeHandleVertical:n.ResizeHandleHorizontal}a.getResizeHandle=l;function h(u){return u==="bottom-to-top"||u==="top-to-bottom"?"row":"column"}a.getTabbarDirection=h})(o||(t.Layout=o={}))},99333:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitPanel=t.PanelContext=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(43718),p=e(68456),v=e(48560),m=e(73215),_=e(25719),s=e(71707),g=n.__importDefault(e(91290));t.PanelContext=o.default.createContext({setSize:(d,E)=>{},setRelativeSize:(d,E,f)=>{},getSize:d=>0,getRelativeSize:d=>[0,0],lockSize:(d,E)=>{},setMaxSize:(d,E)=>{},hidePanel:d=>{}});const l=(d,E,f)=>{var c,y;return(y=d&&d.props&&((c=d.props[E])!==null&&c!==void 0?c:d.props[`data-sp-${E}`]))!==null&&y!==void 0?y:f};function h(d,E){return l(d,"savedSize")?l(d,"savedSize")+"px":l(d,"defaultSize")!==void 0?l(d,"defaultSize")+"px":l(d,"flex")?l(d,"flex")/E*100+"%":1/E*100+"%"}const u=d=>{const E=(0,v.useInjectable)(s.SplitPanelManager).getService(d.id),{id:f,className:c,headerSize:y,resizeHandleClassName:b,style:A,children:S=[],direction:D="left-to-right",resizeKeep:I=!0,dynamicTarget:w}=o.default.useMemo(()=>E.interceptProps(d),[E,E.interceptProps,d]),T=_.Layout.getResizeHandle(D),R=_.Layout.getStyleProperties(D),M=o.default.useMemo(()=>o.default.Children.toArray(S),[S]),O=o.default.useMemo(()=>M.find(ue=>l(ue,"flexGrow")),[M]),x=o.default.useMemo(()=>M.reduce((ue,te)=>ue+l(te,"flex",1),0),[M]),k=o.default.useRef([]),F=(0,v.useInjectable)(a.IEventBus),L=o.default.useRef(),B=o.default.useRef(M.map(()=>!1)),U=o.default.useRef(M.map(()=>!1)),W=o.default.useRef(B.current.slice(0,M.length-1)),[j,Q]=o.default.useState(W.current),[G,Z]=o.default.useState(U.current),[$,V]=o.default.useState(B.current);E.panels=[];const H=o.default.useCallback(ue=>(te,fe)=>{const Ie=fe?ue-1:ue,Me=k.current[Ie];Me&&Me.setAbsoluteSize(te!==void 0?te:l(M[ue],"defaultSize"),fe,I)},[k.current]),K=o.default.useCallback(ue=>(te,fe,Ie)=>{const Me=Ie?ue-1:ue,Be=k.current[Me];Be&&Be.setRelativeSize(te,fe)},[k.current]),Y=o.default.useCallback(ue=>te=>{const fe=te?ue-1:ue,Ie=k.current[fe];return Ie?Ie.getAbsoluteSize(te):0},[k.current]),X=o.default.useCallback(ue=>te=>{const fe=te?ue-1:ue,Ie=k.current[fe];return Ie?Ie.getRelativeSize():[0,0]},[k.current]),oe=o.default.useCallback(ue=>(te,fe)=>{const Ie=fe?ue-1:ue,Me=W.current.map((Be,Pe)=>Pe===Ie?te!==void 0?te:!Be:Be);W.current=Me,Q(Me)},[k.current]),ie=o.default.useCallback(ue=>te=>{const fe=B.current.map((Ie,Me)=>Me===ue?te!==void 0?te:!Ie:Ie);B.current=fe,V(fe)},[k.current]),he=o.default.useCallback(ue=>te=>{const fe=U.current.map((Me,Be)=>Be===ue?te!==void 0?!te:!Me:Me);U.current=fe;const Ie=l(M[ue],"slot")||l(M[ue],"id");Ie&&me(Ie),Z(fe)},[M,U.current]),me=o.default.useCallback(ue=>{ue&&(F.fire(new p.ResizeEvent({slotLocation:ue})),F.fireDirective(p.ResizeEvent.createDirective(ue)))},[F]),q=o.default.useMemo(()=>M.map((ue,te)=>{const fe=[],Ie=l(ue,"minSize"),Me=l(ue,"maxSize"),Be=l(ue,"flexGrow");if(te!==0){const Pe=te===1?M[te-1]:M[te];let we;Be?we=m.ResizeFlexMode.Prev:l(M[te-1],"flexGrow")&&(we=m.ResizeFlexMode.Next),l(Pe,"noResize")||j[te-1]||fe.push(o.default.createElement(T,{className:b,onResize:()=>{const Ne=l(M[te-1],"slot")||l(M[te-1],"id"),Te=l(M[te],"slot")||l(M[te],"id");me(Ne),me(Te)},noColor:!0,findNextElement:w?Ne=>E.getFirstResizablePanel(te-1,Ne):void 0,findPrevElement:w?Ne=>E.getFirstResizablePanel(te-1,Ne,!0):void 0,key:`split-handle-${te}`,delegate:Ne=>{k.current.push(Ne)},flexMode:we}))}return fe.push(o.default.createElement(t.PanelContext.Provider,{key:te,value:{setSize:H(te),getSize:Y(te),setRelativeSize:K(te),getRelativeSize:X(te),lockSize:oe(te),setMaxSize:ie(te),hidePanel:he(te)}},o.default.createElement("div",{"data-min-resize":l(ue,"minResize"),"data-max-resize":l(ue,"maxResize"),ref:Pe=>{Pe&&E.panels.indexOf(Pe)===-1&&E.panels.push(Pe)},className:h(ue,x)===`${y}px`?m.RESIZE_LOCK:"",id:l(ue,"id"),style:{...l(ue,"flex")&&!l(ue,"savedSize")&&!O?{flex:l(ue,"flex")}:{[R.size]:h(ue,x)},[R.minSize]:Ie?Ie+"px":"-1px",[R.maxSize]:$[te]&&Me?Me+"px":"unset",...Be!==void 0?{flexGrow:Be}:{},display:G[te]?"none":"block"}},ue))),fe}).filter(Boolean),[S,M,b,w,k.current,G,j]);return o.default.useEffect(()=>{L.current&&E.setRootNode(L.current);const ue=F.onDirective(p.ResizeEvent.createDirective(f),()=>{M.forEach(te=>{me(l(te,"slot")||l(te,"id"))})});return()=>{ue.dispose()}},[]),o.default.useMemo(()=>{const{minResize:ue,flexGrow:te,minSize:fe,maxSize:Ie,savedSize:Me,defaultSize:Be,flex:Pe,noResize:we,slot:_e,headerSize:Ne,...Te}=d;return delete Te.resizeHandleClassName,delete Te.dynamicTarget,delete Te.resizeKeep,delete Te.direction,E.renderSplitPanel(o.default.createElement("div",{...Te,ref:We=>L.current=We,className:(0,r.default)(g.default["split-panel"],c),style:{flexDirection:R.direction,...A},"data-min-resize":ue,"data-max-resize":Ie,"data-min-size":fe,"data-max-size":Ie,"data-saved-size":Me,"data-default-size":Be,"data-header-size":Ne,"data-flex":Pe,"data-flex-grow":te,"data-no-resize":we,"data-slot":_e}),q,Te)},[E,E.renderSplitPanel,q,L,A,d])};t.SplitPanel=u},71707:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitPanelManager=t.SplitPanelService=t.ISplitPanelService=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(76003),a=e(43718),p=e(38578),v=e(73215);t.ISplitPanelService=Symbol("ISplitPanelService");let m=class extends a.Disposable{constructor(g){super(),this.panelId=g,this._whenReadyDeferred=new a.Deferred,this.panels=[]}get isVisible(){return this.rootNode&&this.rootNode.clientHeight>0||!1}get whenReady(){return this._whenReadyDeferred.promise}setRootNode(g){this.rootNode=g,this._whenReadyDeferred.resolve()}getFirstResizablePanel(g,l,h){if(h){if(l){for(let u=g;u>=0;u--)if(!this.panels[u].classList.contains(v.RESIZE_LOCK))return this.panels[u]}else for(let u=g;u>=0;u--)if(!this.panels[u].classList.contains(v.RESIZE_LOCK))return this.panels[u]}else if(l){for(let u=g+1;u<this.panels.length;u++)if(!this.panels[u].classList.contains(v.RESIZE_LOCK))return this.panels[u]}else for(let u=g+1;u<this.panels.length;u++)if(!this.panels[u].classList.contains(v.RESIZE_LOCK))return this.panels[u]}checkChildNoResize(g){var l,h;if(g&&g.type===p.SlotRenderer){const u=(h=this.appConfig.layoutConfig[(l=g.props)===null||l===void 0?void 0:l.slot])===null||h===void 0?void 0:h.modules;if(!u||u.length===0)return!0}return!1}renderSplitPanel(g,l,h){return r.default.cloneElement(g,{...h,...g.props},l)}interceptProps(g){return g}};t.SplitPanelService=m,n.__decorate([(0,o.Autowired)(p.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),t.SplitPanelService=m=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],m);let _=class{constructor(){this.services=new Map}getService(g){let l=this.services.get(g);return l||(l=this.injector.get(t.ISplitPanelService,[g]),this.services.set(g,l)),l}};t.SplitPanelManager=_,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],_.prototype,"injector",void 0),t.SplitPanelManager=_=n.__decorate([(0,o.Injectable)()],_)},89897:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(85266),t)},85266:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loading=void 0;const r=e(85608).__importDefault(e(14041));e(18182);const o=()=>r.default.createElement("div",{className:"loading_indicator "});t.Loading=o,t.Loading.displayName="Loading"},97885:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=e(85608).__importDefault(e(43144)),o=e(48560),a=({id:p,className:v,children:m})=>{const _=(0,o.usePortal)(p,v);return r.default.createPortal(m,_)};t.default=a},73215:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResizeHandleVertical=t.ResizeHandleHorizontal=t.ResizeFlexMode=t.RESIZE_LOCK=void 0,t.preventWebviewCatchMouseEvents=m,t.allowWebviewCatchMouseEvents=_;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(22366),p=n.__importDefault(e(57482));t.RESIZE_LOCK="resize-lock";var v;(function(l){l.Prev="prev",l.Next="next",l.Percentage="Percentage"})(v||(t.ResizeFlexMode=v={}));function m(){const l=document.getElementsByTagName("iframe"),h=document.getElementsByTagName("webview"),u=document.getElementsByClassName("shadow-root-host");for(const d of h)d.classList.add("none-pointer-event");for(const d of l)d.classList.add("none-pointer-event");for(const d of u)d?.classList.add("none-pointer-event")}function _(){const l=document.getElementsByTagName("iframe"),h=document.getElementsByTagName("webview"),u=document.getElementsByClassName("shadow-root-host");for(const d of h)d.classList.remove("none-pointer-event");for(const d of l)d.classList.remove("none-pointer-event");for(const d of u)d?.classList.remove("none-pointer-event")}const s=l=>{const h=o.default.useRef(),u=o.default.useRef(!1),d=o.default.useRef(0),E=o.default.useRef(0),f=o.default.useRef(0),c=o.default.useRef(),y=o.default.useRef(),b=o.default.useRef(),A=(L,B)=>{const U=l.findPrevElement?l.findPrevElement():c.current,W=l.findNextElement?l.findNextElement():y.current;if(U&&U.classList.contains(t.RESIZE_LOCK)||W&&W.classList.contains(t.RESIZE_LOCK))return;const j=h.current.parentElement.offsetWidth,Q=Number(U?.dataset.minResize||0),G=Number(W?.dataset.minResize||0),Z=Number(U?.dataset.maxResize||0),$=Number(W?.dataset.maxResize||0);(Q||G)&&(L*j<=Q||B*j<=G)||(Z||$)&&(L*j>=Z||B*j>=$)||(W&&(W.style.width=B*100+"%"),U&&(U.style.width=L*100+"%"),l.onResize&&W&&U&&l.onResize(U,W))},S=(L,B,U,W)=>{var j,Q;const G=l.findPrevElement?l.findPrevElement(W):c.current,Z=l.findNextElement?l.findNextElement(W):y.current,$=Number((j=G?.dataset.minResize)!==null&&j!==void 0?j:0),V=Number((Q=Z?.dataset.minResize)!==null&&Q!==void 0?Q:0),H=G?.dataset.maxResize?Number(G?.dataset.maxResize):null,K=Z?.dataset.maxResize?Number(Z?.dataset.maxResize):null,Y=l.flexMode===v.Prev,X=Y?G:Z,oe=Y?Z:G;let ie=Y?L:B;U||(($||V)&&(Y?$>L?ie=$:V>B&&(ie=L+B-V):V>B?ie=V:$>L&&(ie=L+B-$)),(H||K)&&(Y?H&&H<=L?ie=H:K&&K>B&&(ie=L+B-K):K&&K<=B?ie=K:H&&H>B&&(ie=L+B-H))),X.style.width=ie+"px",X.style.flexGrow="0",X.style.flexShrink="1",oe.style.width="0",oe.style.flexGrow="1",oe.style.flexShrink="0",l.onResize&&Z&&G&&l.onResize(G,Z)},D=(L,B)=>{const U=c.current,W=y.current;let j;l.flexMode?j=(U.offsetWidth+W.offsetWidth)/U.parentElement.offsetWidth*100:j=+y.current.style.width.replace("%","")+ +c.current.style.width.replace("%",""),W&&(W.style.width=B/(L+B)*j+"%"),U&&(U.style.width=L/(L+B)*j+"%"),I(L,B),l.onResize&&W&&U&&l.onResize(U,W)},I=(L,B)=>{const U=c.current,W=y.current;let j=!1;U&&(L===0?(U.classList.add("kt_display_none"),j=!0):U.classList.remove("kt_display_none")),W&&(B===0?(W.classList.add("kt_display_none"),j=!0):W.classList.remove("kt_display_none")),h.current&&(j?h.current.classList.add("none-pointer-event"):h.current.classList.remove("none-pointer-event"))},w=()=>{const L=c.current.clientWidth,B=y.current.clientWidth,U=L+B,W=[];return W.push(L/U),W.push(B/U),W},T=(L,B)=>{a.fastdom.measure(()=>{const U=c.current.clientWidth,W=y.current.clientWidth,j=U+W;if(l.flexMode){const Q=l.flexMode===v.Prev?L:j-L,G=l.flexMode===v.Next?L:j-L;S(Q,G,!0)}else{const Q=+y.current.style.width.replace("%",""),G=+c.current.style.width.replace("%",""),Z=Q+G;B?(y.current.style.width=Z*(L/j)+"%",c.current.style.width=Z*(1-L/j)+"%"):(c.current.style.width=Z*(L/j)+"%",y.current.style.width=Z*(1-L/j)+"%")}B?I(j-L,L):I(L,j-L),l.onResize&&l.onResize(c.current,y.current)})},R=L=>L?y.current.clientWidth:c.current.clientWidth,M=L=>{const B=L.classList,U=p.default["resize-overflow-hidden"];B?.contains(U)||B.add(U)},O=L=>{const B=L.classList,U=p.default["resize-overflow-hidden"];B?.contains(U)&&B.remove(U)},x=L=>{if(L.preventDefault(),h.current&&h.current.classList.contains("no-resize"))return;const B=E.current+L.pageX-d.current,U=f.current-(L.pageX-d.current);b.current&&b.current.dispose(),b.current=a.fastdom.mutate(()=>{if(l.flexMode)S(B,U);else{const W=h.current.parentElement.offsetWidth;A(B/W,U/W)}})},k=()=>{u.current=!1,document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",k),l.onFinished&&l.onFinished(),a.fastdom.mutate(()=>{var L;(L=h.current)===null||L===void 0||L.classList.remove(p.default.active),O(c.current),O(y.current),_()})},F=L=>{u.current=!0,document.addEventListener("mousemove",x),document.addEventListener("mouseup",k),d.current=L.pageX,a.fastdom.measure(()=>{E.current=c.current.offsetWidth,f.current=y.current.offsetWidth,a.fastdom.mutate(()=>{var B;(B=h.current)===null||B===void 0||B.classList.add(p.default.active),M(c.current),M(y.current),m()})})};return o.default.useEffect(()=>(h.current&&(h.current.addEventListener("mousedown",F),c.current=h.current.previousSibling,y.current=h.current.nextSibling),()=>{h.current&&(h.current.removeEventListener("mousedown",F),h.current.removeEventListener("mousemove",x),h.current.removeEventListener("mouseup",k))}),[]),l.delegate&&l.delegate({setSize:A,setAbsoluteSize:T,getAbsoluteSize:R,setRelativeSize:D,getRelativeSize:w}),o.default.createElement("div",{ref:L=>{h.current=L},className:(0,r.default)({[p.default["resize-handle-horizontal"]]:!0,[p.default["with-color"]]:!l.noColor,[l.className||""]:!0})})};t.ResizeHandleHorizontal=s;const g=l=>{const h=o.default.useRef(),u=o.default.useRef(!1),d=o.default.useRef(0),E=o.default.useRef(0),f=o.default.useRef(0),c=o.default.useRef(),y=o.default.useRef(),b=o.default.useRef(),A=o.default.useRef(),S=(L,B,U)=>{const W=l.findPrevElement?l.findPrevElement(U):c.current,j=l.findNextElement?l.findNextElement(U):y.current;!j||!W||W.classList.contains(t.RESIZE_LOCK)||j.classList.contains(t.RESIZE_LOCK)||(j.style.height=B*100+"%",W.style.height=L*100+"%",l.onResize&&l.onResize(W,j))},D=(L,B,U,W)=>{var j,Q;const G=l.findPrevElement?l.findPrevElement(W):c.current,Z=l.findNextElement?l.findNextElement(W):y.current;let $,V,H=0;const K=Number(((j=G?.dataset)===null||j===void 0?void 0:j.minResize)||0),Y=Number(((Q=Z?.dataset)===null||Q===void 0?void 0:Q.minResize)||0);l.flexMode===v.Prev?($=G,V=Z,H=L,U||(K>L?H=K:Y>B&&(H=L+B-Y))):($=Z,V=G,H=B,U||(Y>B?H=Y:K>L&&(H=L+B-K))),$.style.height=H+"px",$.style.flexGrow="0",$.style.flexShrink="1",V.style.height="0",V.style.flexGrow="1",V.style.flexShrink="0",l.onResize&&Z&&G&&l.onResize(G,Z)},I=(L,B)=>{const U=c.current,W=y.current;let j;l.flexMode?j=(U.offsetHeight+W.offsetHeight)/U.parentElement.offsetHeight*100:j=+W.style.height.replace("%","")+ +U.style.height.replace("%",""),W&&(W.style.height=B/(L+B)*j+"%"),U&&(U.style.height=L/(L+B)*j+"%"),w(L,B),l.onResize&&W&&U&&l.onResize(U,W)},w=(L,B)=>{const U=c.current,W=y.current;let j=!1;U&&(L===0?(U.classList.add("kt_display_none"),j=!0):U.classList.remove("kt_display_none")),W&&(B===0?(W.classList.add("kt_display_none"),j=!0):W.classList.remove("kt_display_none")),h.current&&(j?h.current.classList.add("none-pointer-event"):h.current.classList.remove("none-pointer-event"))},T=()=>{const L=c.current.clientHeight,B=y.current.clientHeight,U=L+B,W=[];return W.push(L/U),W.push(B/U),W},R=(L,B,U,W)=>{U.classList.contains(t.RESIZE_LOCK)||W.classList.contains(t.RESIZE_LOCK)||(W.style.height=B+"px",U.style.height=L+"px",W.style.flex="unset",U.style.flex="unset",l.onResize&&W&&U&&l.onResize(U,W))},M=(L,B,U)=>{if(!c.current||!y.current)return;const W=c.current.clientHeight,j=y.current.clientHeight,Q=W+j;if(l.flexMode){const G=l.flexMode===v.Prev?L:Q-L,Z=l.flexMode===v.Next?L:Q-L;D(G,Z,!0)}else{const G=+y.current.style.height.replace(/\%|px/,""),Z=+c.current.style.height.replace(/\%|px/,""),$=G+Z;if(B){U&&(c.current.style.height=$*(1-L/Q)+"%");const V=$*(L/Q);y.current.style.height=V===0?V+"px":V+"%"}else c.current.style.height=$*(L/Q)+"%",U&&(y.current.style.height=$*(1-L/Q)+"%")}B?w(Q-L,L):w(L,Q-L),l.onResize&&l.onResize(c.current,y.current)},O=L=>L?y.current.clientHeight:c.current.clientHeight,x=L=>{u.current=!0,document.addEventListener("mousemove",k),document.addEventListener("mouseup",F),d.current=L.pageY,A.current=y.current,b.current=c.current,a.fastdom.measure(()=>{E.current=c.current.offsetHeight,f.current=y.current.offsetHeight,a.fastdom.mutate(()=>{var B;(B=h.current)===null||B===void 0||B.classList.add(p.default.active),m()})})},k=L=>{L.preventDefault(),!(h.current&&h.current.classList.contains("no-resize"))&&a.fastdom.measure(()=>{const B=L.pageY>d.current,U=l.findNextElement?l.findNextElement(B):null,W=l.findPrevElement?l.findPrevElement(B):null;if(U!==null&&A.current!==U||W!==null&&b.current!==W){if(!U||!W)return;A.current=U,b.current=W,d.current=L.pageY,E.current=b.current.offsetHeight,f.current=A.current.offsetHeight}const j=E.current+L.pageY-d.current,Q=f.current-(L.pageY-d.current),G=Number(b.current.dataset.minResize||0),Z=Number(A.current.dataset.minResize||0);(G||Z)&&(j<=G||Q<=Z)||a.fastdom.mutate(()=>{if(l.flexMode===v.Prev||l.flexMode===v.Next)D(j,Q);else if(l.flexMode===v.Percentage){const $=h.current.parentElement.offsetHeight;S(j/$,Q/$)}else R(j,Q,b.current,A.current)})})},F=L=>{u.current=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",F),a.fastdom.mutate(()=>{var B;(B=h.current)===null||B===void 0||B.classList.remove(p.default.active),l.onFinished&&l.onFinished(),_()})};return o.default.useEffect(()=>(h.current.addEventListener("mousedown",x),c.current=h.current.previousSibling,y.current=h.current.nextSibling,()=>{h.current.removeEventListener("mousedown",x),document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",F)}),[]),l.delegate&&l.delegate({setSize:S,setAbsoluteSize:M,getAbsoluteSize:O,setRelativeSize:I,getRelativeSize:T}),o.default.createElement("div",{ref:L=>L&&(h.current=L),className:(0,r.default)({[p.default["resize-handle-vertical"]]:!0,[l.className||""]:!0,[p.default["with-color"]]:!l.noColor})})};t.ResizeHandleVertical=g},77331:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Select=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041));n.__exportStar(e(88706),t);const a=p=>(p={...p,className:(0,r.default)("kt_select",p.className)},o.default.createElement("select",{...p}));t.Select=a},53736:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextKeyChangeEvent=t.IContextKeyService=void 0;const n=e(43718);t.IContextKeyService=Symbol("IContextKeyService");class r extends n.BasicEvent{}t.ContextKeyChangeEvent=r},50394:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineInputWidgetIsStreaming=t.InlineInputWidgetIsVisible=t.CodeEditsIsVisible=t.InlineDiffPartialEditsIsVisible=t.InlineHintWidgetIsVisible=t.InlineCompletionIsTrigger=t.InlineChatIsVisible=void 0;const n=e(40191);t.InlineChatIsVisible=new n.RawContextKey("ai.native.inlineChatIsVisible",!1),t.InlineCompletionIsTrigger=new n.RawContextKey("ai.native.inlineCompletionIsTrigger",!1),t.InlineHintWidgetIsVisible=new n.RawContextKey("ai.native.inlineHintWidgetIsVisible",!1),t.InlineDiffPartialEditsIsVisible=new n.RawContextKey("ai.native.inlineDiffPartialEditsIsVisible",!1),t.CodeEditsIsVisible=new n.RawContextKey("ai.native.codeEditsIsVisible",!1),t.InlineInputWidgetIsVisible=new n.RawContextKey("ai.native.inlineInputWidgetIsVisible",!1),t.InlineInputWidgetIsStreaming=new n.RawContextKey("ai.native.inlineInputWidgetIsStreaming",!1)},20162:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDialogViewVisibleContext=t.DialogViewVisibleContext=void 0;const n=e(40191);t.DialogViewVisibleContext=new n.RawContextKey("dialogViewVisible",!1),t.FileDialogViewVisibleContext=new n.RawContextKey("fileDialogViewVisible",!1)},16413:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExplorerCompressedLastFocusContext=t.ExplorerCompressedFirstFocusContext=t.ExplorerCompressedFocusContext=t.FilesExplorerFilteredContext=t.FilesExplorerInputFocusedContext=t.FilesExplorerFocusedContext=t.ExplorerFilteredContext=t.ExplorerFocusedContext=t.ExplorerResourceCut=t.ExplorerViewletVisibleContext=t.ExplorerResourceIsFolderContext=void 0;const n=e(40191);t.ExplorerResourceIsFolderContext=new n.RawContextKey("explorerResourceIsFolder",!1),t.ExplorerViewletVisibleContext=new n.RawContextKey("explorerViewletVisible",!0),t.ExplorerResourceCut=new n.RawContextKey("explorerResourceCut",!1),t.ExplorerFocusedContext=new n.RawContextKey("explorerViewletFocus",!1),t.ExplorerFilteredContext=new n.RawContextKey("explorerViewletFilter",!1),t.FilesExplorerFocusedContext=new n.RawContextKey("filesExplorerFocus",!1),t.FilesExplorerInputFocusedContext=new n.RawContextKey("filesExplorerInputFocus",!1),t.FilesExplorerFilteredContext=new n.RawContextKey("filesExplorerFilteredContext",!1),t.ExplorerCompressedFocusContext=new n.RawContextKey("explorerViewletCompressedFocus",!1),t.ExplorerCompressedFirstFocusContext=new n.RawContextKey("explorerViewletCompressedFirstFocus",!1),t.ExplorerCompressedLastFocusContext=new n.RawContextKey("explorerViewletCompressedLastFocus",!1)},66e3:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(16413),t),n.__exportStar(e(91830),t),n.__exportStar(e(29906),t),n.__exportStar(e(96774),t),n.__exportStar(e(73537),t),n.__exportStar(e(20162),t)},379:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowExcludedFilesFilterContextKey=t.ShowActiveFileFilterContextKey=t.ShowInfoFilterContextKey=t.ShowWarningsFilterContextKey=t.ShowErrorsFilterContextKey=t.RelatedInformationFocusContextKey=t.MarkerViewFilterFocusContextKey=t.MarkerFocusContextKey=t.MarkersTreeVisibilityContextKey=void 0;const n=e(40191);t.MarkersTreeVisibilityContextKey=new n.RawContextKey("problemsVisibility",!1),t.MarkerFocusContextKey=new n.RawContextKey("problemFocus",!1),t.MarkerViewFilterFocusContextKey=new n.RawContextKey("problemsFilterFocus",!1),t.RelatedInformationFocusContextKey=new n.RawContextKey("relatedInformationFocus",!1),t.ShowErrorsFilterContextKey=new n.RawContextKey("problems.filter.errors",!0),t.ShowWarningsFilterContextKey=new n.RawContextKey("problems.filter.warnings",!0),t.ShowInfoFilterContextKey=new n.RawContextKey("problems.filter.info",!0),t.ShowActiveFileFilterContextKey=new n.RawContextKey("problems.filter.activeFile",!1),t.ShowExcludedFilesFilterContextKey=new n.RawContextKey("problems.filter.excludedFiles",!0)},96774:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutlineFollowCursorContext=t.OutlineSortTypeContext=void 0;const n=e(40191);t.OutlineSortTypeContext=new n.RawContextKey("outlineSortType",0),t.OutlineFollowCursorContext=new n.RawContextKey("outlineFollowCursor",!1)},91830:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceContextKey=void 0;const n=e(43718),r=e(63214);class o{constructor(p,v=r.getLanguageIdFromMonaco,m="resource"){if(this.contextKeyService=p,this.languageResolver=v,!m)throw new Error("resource key prefix cannot be empty!");this.resourceScheme=this.contextKeyService.createKey(m+"Scheme",""),this.resourceFilename=this.contextKeyService.createKey(m+"Filename",""),this.resourceExtname=this.contextKeyService.createKey(m+"Extname",""),this.resourceLangId=this.contextKeyService.createKey(m+"LangId",""),this.resourceKey=this.contextKeyService.createKey(m,""),this.isFileSystemResource=this.contextKeyService.createKey("isFileSystem"+m.substr(0,1).toUpperCase()+m.substr(1),!1)}set(p){if(!p){this.reset();return}const v=this.resourceKey.get();p.isEqual(new n.URI(v))||(this.resourceScheme.set(p.scheme),this.resourceFilename.set(p.path.name+p.path.ext),this.resourceExtname.set(p.path.ext),this.resourceLangId.set(this.languageResolver(p)),this.resourceKey.set(p.toString()),this.isFileSystemResource.set(p.scheme===n.Schemes.file))}reset(){this.resourceScheme.set(""),this.resourceFilename.set(""),this.resourceExtname.set(""),this.resourceLangId.set(""),this.resourceKey.set(""),this.isFileSystemResource.set(!1)}}t.ResourceContextKey=o},67386:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InTreeViewKey=t.ViewHasSomeCollapsibleKey=t.ViewHasFilePatternKey=t.ViewHasReplacePatternKey=t.ViewHasSearchPatternKey=t.MatchFocusKey=t.ResourceFolderFocusKey=t.FolderFocusKey=t.FileFocusKey=t.FileMatchOrFolderMatchWithResourceFocusKey=t.FileMatchOrFolderMatchFocusKey=t.FileMatchOrMatchFocusKey=t.FirstMatchFocusKey=t.ReplaceActiveKey=t.PatternExcludesFocusedKey=t.PatternIncludesFocusedKey=t.InputBoxFocusedKey=t.SearchViewVisibleKey=t.HasSearchResults=t.ReplaceInputBoxFocusedKey=t.SearchInputBoxFocusedKey=t.SearchViewFocusedKey=void 0;const n=e(40191);t.SearchViewFocusedKey=new n.RawContextKey("searchViewletFocus",!1),t.SearchInputBoxFocusedKey=new n.RawContextKey("searchInputBoxFocus",!1),t.ReplaceInputBoxFocusedKey=new n.RawContextKey("replaceInputBoxFocus",!1),t.HasSearchResults=new n.RawContextKey("hasSearchResult",!1),t.SearchViewVisibleKey=new n.RawContextKey("searchViewletVisible",!0),t.InputBoxFocusedKey=new n.RawContextKey("inputBoxFocus",!1),t.PatternIncludesFocusedKey=new n.RawContextKey("patternIncludesInputBoxFocus",!1),t.PatternExcludesFocusedKey=new n.RawContextKey("patternExcludesInputBoxFocus",!1),t.ReplaceActiveKey=new n.RawContextKey("replaceActive",!1),t.FirstMatchFocusKey=new n.RawContextKey("firstMatchFocus",!1),t.FileMatchOrMatchFocusKey=new n.RawContextKey("fileMatchOrMatchFocus",!1),t.FileMatchOrFolderMatchFocusKey=new n.RawContextKey("fileMatchOrFolderMatchFocus",!1),t.FileMatchOrFolderMatchWithResourceFocusKey=new n.RawContextKey("fileMatchOrFolderMatchWithResourceFocus",!1),t.FileFocusKey=new n.RawContextKey("fileMatchFocus",!1),t.FolderFocusKey=new n.RawContextKey("folderMatchFocus",!1),t.ResourceFolderFocusKey=new n.RawContextKey("folderMatchWithResourceFocus",!1),t.MatchFocusKey=new n.RawContextKey("matchFocus",!1),t.ViewHasSearchPatternKey=new n.RawContextKey("viewHasSearchPattern",!1),t.ViewHasReplacePatternKey=new n.RawContextKey("viewHasReplacePattern",!1),t.ViewHasFilePatternKey=new n.RawContextKey("viewHasFilePattern",!1),t.ViewHasSomeCollapsibleKey=new n.RawContextKey("viewHasSomeCollapsibleResult",!1),t.InTreeViewKey=new n.RawContextKey("inTreeView",!1)},29906:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShellExecutionSupported=t.IsTerminalFocused=t.IsTerminalViewInitialized=void 0;const n=e(40191);t.IsTerminalViewInitialized=new n.RawContextKey("isTerminalViewInitialized",!1),t.IsTerminalFocused=new n.RawContextKey("isTerminalFocused",!1),t.ShellExecutionSupported=new n.RawContextKey("shellExecutionSupported",!0)},12288:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestingCanRefreshTests=t.TestingIsPeekVisible=t.TestingIsInPeek=t.TestingIsRunning=t.TestingHasAnyResults=t.TestingServiceHasDebuggableContextKey=t.TestingServiceProviderCount=void 0;const n=e(40191);t.TestingServiceProviderCount=new n.RawContextKey("service.testing.providerCount",0),t.TestingServiceHasDebuggableContextKey=new n.RawContextKey("service.testing.hasDebuggableContext",!1),t.TestingHasAnyResults=new n.RawContextKey("testing.hasAnyResults",!1),t.TestingIsRunning=new n.RawContextKey("testing.isRunning",!1),t.TestingIsInPeek=new n.RawContextKey("testing.isInPeek",!0),t.TestingIsPeekVisible=new n.RawContextKey("testing.isPeekVisible",!1),t.TestingCanRefreshTests=new n.RawContextKey("testing.canRefresh",!1)},73537:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualWorkspace=t.WorkspaceTrusted=t.WorkspaceFolderCount=t.WorkbenchState=void 0;const n=e(40191);t.WorkbenchState=new n.RawContextKey("workbenchState","empty"),t.WorkspaceFolderCount=new n.RawContextKey("workspaceFolderCount",0),t.WorkspaceTrusted=new n.RawContextKey("isWorkspaceTrusted",!0),t.VirtualWorkspace=new n.RawContextKey("virtualWorkspace",!1)},18193:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorePreferences=t.corePreferenceSchema=t.FILE_TREE_DEFAULTS=t.FILES_DEFAULTS=void 0,t.injectCorePreferences=v;const n=e(43718),r=e(69734),o=e(87863),a=e(78132),p={confirmDelete:!0,confirmMove:!0};t.FILES_DEFAULTS={filesWatcherExclude:o.defaultFilesWatcherExcludes,filesExclude:{"**/.git":!0,"**/.svn":!0,"**/.hg":!0,"**/CVS":!0,"**/.DS_Store":!0}},t.FILE_TREE_DEFAULTS={baseIndent:10,indent:8},t.corePreferenceSchema={type:"object",properties:{[n.GeneralSettingsId.Language]:{type:"string",enum:(0,n.getAvailableLanguages)().map(m=>m.languageId),default:r.LOCALE_TYPES.EN_US},[n.GeneralSettingsId.Theme]:{type:"string",default:"vs-dark",enum:[]},"general.askReloadOnLanguageChange":{type:"boolean",default:!0,description:"%preference.description.general.askReloadOnLanguageChange%"},[n.GeneralSettingsId.Icon]:{type:"string",default:"vs-minimal",enum:[]},[n.GeneralSettingsId.ProductIconTheme]:{type:"string",default:"opensumi-icons",enum:["opensumi-icons"]},"workbench.colorCustomizations":{type:"object",description:"%preference.workbench.colorCustomizations%",default:{}},"application.supportsOpenFolder":{type:"boolean",default:!1,description:"Whether default open folder behavior is supported"},"application.supportsOpenWorkspace":{type:"boolean",default:!1,description:"Whether default open workspace behavior is supported"},"application.confirmExit":{type:"string",enum:["never","ifRequired","always"],default:"always",description:"When to confirm before closing the application window."},"application.preferMarkdownPreview":{type:"boolean",default:!1,description:"Use markdown preview first"},"application.invalidExthostReload":{type:"string",enum:["ifRequired","always"],default:"ifRequired",description:"Reload strategy when exthost process became invalid."},"workbench.list.openMode":{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:"%preference.workbench.list.openMode%"},"workbench.commandPalette.history":{type:"number",default:50,minimum:0,description:"Controls the number of recently used commands to keep in history for the command palette. Set to 0 to disable command history."},"workbench.refactoringChanges.showPreviewStrategy":{type:"string",default:"askMe",enum:["show","hide","askMe"],description:"%preference.workbench.refactoringChanges.showPreviewStrategy%"},"workbench.quickOpen.preserveInput":{type:"boolean",default:!0,description:"%workbench.quickOpen.preserveInput%"},"workbench.hideSlotTabBarWhenHidePanel":{type:"boolean",default:!1,description:"%workbench.hideSlotTabBarWhenHidePanel%"},"explorer.confirmMove":{type:"boolean",default:p.confirmDelete,description:"%preference.explorer.confirm.move%"},"explorer.confirmDelete":{type:"boolean",default:p.confirmMove,description:"%preference.explorer.confirm.delete%"},"explorer.fileTree.baseIndent":{type:"number",default:t.FILE_TREE_DEFAULTS.baseIndent},"explorer.fileTree.indent":{type:"number",default:t.FILE_TREE_DEFAULTS.indent},"explorer.compactFolders":{type:"boolean",description:"%preference.explorer.compactFolders%",default:!0},"explorer.autoReveal":{type:"boolean",default:!0},"debug.toolbar.float":{type:"boolean",default:!0},"debug.breakpoint.editorHint":{type:"boolean",default:!0,description:"%preference.debug.breakpoint.editorHint%"},"debug.breakpoint.showBreakpointsInOverviewRuler":{type:"boolean",default:!1,description:"%preference.debug.breakpoint.showBreakpointsInOverviewRuler%"},"debug.toolbar.top":{type:"number",default:0,description:"%preference.debug.toolbar.top%"},"debug.toolbar.height":{type:"number",default:30,description:"%preference.debug.toolbar.height%"},"debug.console.filter.mode":{type:"string",enum:["filter","matcher"],default:"filter"},"files.exclude":{type:"object",description:"%preference.files.exclude%",default:t.FILES_DEFAULTS.filesExclude,additionalProperties:{anyOf:[{type:"boolean",description:(0,n.localize)("files.exclude.boolean","The glob pattern to match file paths against. Set to true or false to enable or disable the pattern.")}]}},"files.watcherExclude":{type:"object",default:t.FILES_DEFAULTS.filesWatcherExclude,description:"%preference.files.watcherExclude%"},"files.associations":{type:"object",markdownDescription:"%preference.files.associations%"},"files.encoding":{type:"string",description:"%preference.files.encoding%",default:"utf8",enum:Object.keys(n.SUPPORTED_ENCODINGS)},"files.eol":{type:"string",enum:[`
31925
31925
  `,`\r
@@ -31949,7 +31949,7 @@ ${c}`)}return this.keybindingsChanged.fire({affectsCommands:[E.command]}),{dispo
31949
31949
  `)&&w.severity===D?(this.treeModel.root.unlinkItem(w),await this.insertItemWithAnsi(w.description+c.output,D,A,S)):await this.insertItemWithAnsi(c.output,D,A,S)}this.fireDidChange()}async clearConsole(){var u;const d=(u=this.treeModel.root.flattenedBranch)===null||u===void 0?void 0:u.map(E=>this.treeModel.root.getTreeNodeById(E));if(d)for(const E of d)this.treeModel.root.unlinkItem(E)}async insertItemWithAnsi(u,d,E,f){var c;const y=await(0,v.handleANSIOutput)(u,this.linkDetector,this.themeService,void 0);this.treeModel.root.insertItem(new s.AnsiConsoleNode(u,(c=this.treeModel)===null||c===void 0?void 0:c.root,this.linkDetector,y,d,E,f))}async execute(u){var d;this.treeModel.root.insertItem(new s.AnsiConsoleNode(u,this.treeModel.root,this.linkDetector,void 0,a.MessageType.Info));const E=new s.DebugConsoleNode({session:this.session},u,(d=this.treeModel)===null||d===void 0?void 0:d.root);await E.evaluate(),this.treeModel.root.insertItem(E),this.fireDidChange()}append(u){var d;if(!u)return;const E=this.resolveChildren().slice(-1)[0];E instanceof s.AnsiConsoleNode&&E.description===this.uncompletedItemContent?(this.resolveChildren().pop(),this.uncompletedItemContent+=u):this.uncompletedItemContent=u,this.treeModel.root.insertItem(new s.AnsiConsoleNode(this.uncompletedItemContent,(d=this.treeModel)===null||d===void 0?void 0:d.root,this.linkDetector,void 0,a.MessageType.Info)),this.fireDidChange()}appendLine(u){var d;this.treeModel.root.insertItem(new s.AnsiConsoleNode(u,(d=this.treeModel)===null||d===void 0?void 0:d.root,this.linkDetector,void 0,a.MessageType.Info)),this.fireDidChange()}};t.DebugConsoleSession=l,n.__decorate([(0,o.Autowired)(a.ILogger),n.__metadata("design:type",Object)],l.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(m.LinkDetector),n.__metadata("design:type",m.LinkDetector)],l.prototype,"linkDetector",void 0),n.__decorate([(0,o.Autowired)(p.IThemeService),n.__metadata("design:type",Object)],l.prototype,"themeService",void 0),t.DebugConsoleSession=l=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__param(0,(0,o.Optional)()),n.__param(1,(0,o.Optional)()),n.__metadata("design:paramtypes",[_.DebugSession,g.DebugConsoleTreeModel])],l)},15153:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleModelService=void 0;const r=e(85608),o=e(76003),a=e(97267),p=e(41869),v=e(93899),m=e(64582),_=e(58542),s=e(16170),g=e(98650),l=e(32756),h=e(17280),u=e(80390),d=e(75563),E=r.__importDefault(e(80315)),{Path:f}=p.path;let c=n=class{constructor(){this.debugSessionModelMap=new Map,this._changeEventDispatchQueue=[],this.selectedDecoration=new a.Decoration(E.default.mod_selected),this.contextMenuDecoration=new a.Decoration(E.default.mod_actived),this.loadingDecoration=new a.Decoration(E.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new p.Emitter,this.onDidUpdateTreeModelEmitter=new p.Emitter,this.treeModelDisposableCollection=new p.DisposableCollection,this.debugConsoleDisposableCollection=new p.DisposableCollection,this.activeNodeDecoration=(b,A=!0)=>{var S;if(this.contextMenuNode&&(this.contextMenuDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),b){if(this.selectedNodes.length>0)for(const D of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(D);this.focusedNode,this.selectedDecoration.addTarget(b),this._focusedNode=b,this._selectedNodes=[b],A&&((S=this.treeModel)===null||S===void 0||S.dispatchChange())}},this.activeNodeActivedDecoration=b=>{var A;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this._focusedNode=void 0),this.contextMenuDecoration.addTarget(b),this._contextMenuNode=b,(A=this.treeModel)===null||A===void 0||A.dispatchChange()},this.enactiveNodeDecoration=()=>{var b;this.focusedNode&&(this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(b=this.treeModel)===null||b===void 0||b.dispatchChange()},this.handleContextMenu=(b,A)=>{var S;b.stopPropagation(),b.preventDefault();const{x:D,y:I}=b.nativeEvent;this.debugContextKey.contextInDebugConsole.set(!0),A?this.activeNodeActivedDecoration(A):this.enactiveNodeDecoration();let w;A?w=A:w=(S=this.treeModel)===null||S===void 0?void 0:S.root;const T=this.contextMenuService.createMenu({id:v.MenuId.DebugConsoleContext,contextKeyService:this.debugContextKey.contextKeyScoped}),R=T.getMergedMenuNodes();T.dispose(),this.ctxMenuRenderer.show({anchor:{x:D,y:I},menuNodes:R,args:[w],onHide:()=>{window.requestAnimationFrame(()=>{this.debugContextKey.contextInDebugConsole.set(!1)})}})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=b=>{this.activeNodeDecoration(b)},this.handleTwistierClick=(b,A)=>{if(A===a.TreeNodeType.CompositeTreeNode){if(g.DebugConsoleNode.is(b)&&b.available){this.activeNodeDecoration(b,!1),this.toggleDirectory(b);return}else if(b.variablesReference){this.activeNodeDecoration(b,!1),this.toggleDirectory(b);return}}this.activeNodeDecoration(b)},this.toggleDirectory=async b=>{b.expanded?this.treeHandle.collapseNode(b):this.treeHandle.expandNode(b)},this.flushEventQueue=()=>{let b;if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.length===0)return;this._changeEventDispatchQueue.sort((S,D)=>{const I=f.pathDepth(S),w=f.pathDepth(D);return I-w});const A=[this._changeEventDispatchQueue[0]];for(const S of this._changeEventDispatchQueue)A.some(D=>S.indexOf(D)===0)||A.push(S);return b=(0,p.pSeries)(A.map(S=>async()=>{var D,I;const w=(I=(D=this.treeModel)===null||D===void 0?void 0:D.root)===null||I===void 0?void 0:I.getTreeNodeByPath(S);return w&&a.CompositeTreeNode.is(w)&&await w.refresh(),null})),this._changeEventDispatchQueue=[],b},this.init()}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get contextMenuContextKeyService(){return this._contextMenuContextKeyService||(this._contextMenuContextKeyService=this.contextKeyService.createScoped()),this._contextMenuContextKeyService}get treeHandle(){return this._debugWatchTreeHandle}get decorations(){return this._decorations}get treeModel(){var b;return(b=this._activeDebugSessionModel)===null||b===void 0?void 0:b.treeModel}get debugConsoleSession(){var b;return(b=this._activeDebugSessionModel)===null||b===void 0?void 0:b.debugConsoleSession}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}clear(){this.initTreeModel(this.manager.currentSession,!0)}collapseAll(){var b;(b=this.treeModel)===null||b===void 0||b.root.collapsedAll()}copyAll(){var b;let A="";if(!(!(!((b=this.treeModel)===null||b===void 0)&&b.root)||!this.treeModel.root.children)){for(const S of this.treeModel.root.children)A+=this.getValidText(S)+`
31950
31950
  `;this.clipboardService.writeText(A.slice(0,-1))}}copy(b){b&&this.clipboardService.writeText(this.getValidText(b))}getValidText(b){return b.description.endsWith(`
31951
31951
  `)?b.description.slice(0,-1):b.description}getConsoleModel(b){return this.debugSessionModelMap.get(b)}dispose(){this.disposeTreeModel(),this.disposeDebugConsole()}disposeTreeModel(){this.treeModelDisposableCollection.disposed||this.treeModelDisposableCollection.dispose()}disposeDebugConsole(){this.debugConsoleDisposableCollection.disposed||this.debugConsoleDisposableCollection.dispose()}async init(){this.debugConsoleDisposableCollection.push(this.manager.onDidDestroyDebugSession(b=>{this.debugSessionModelMap.delete(b.id),this.debugSessionModelMap.size>0&&this.initTreeModel(this.manager.currentSession)})),this.debugConsoleDisposableCollection.push(this.manager.onDidChangeActiveDebugSession(b=>{b.current&&this.initTreeModel(b.current)}))}listenTreeViewChange(){this.disposeTreeModel(),this.treeModel&&(this.treeModelDisposableCollection.push(this.treeModel.root.watcher.on(a.TreeNodeEvent.WillResolveChildren,b=>{this.loadingDecoration.addTarget(b)})),this.treeModelDisposableCollection.push(this.treeModel.root.watcher.on(a.TreeNodeEvent.DidResolveChildren,b=>{this.loadingDecoration.removeTarget(b)})))}async initTreeModel(b,A){if(!b){this._activeDebugSessionModel=void 0,this.onDidUpdateTreeModelEmitter.fire(this._activeDebugSessionModel);return}const S=b.hasSeparateRepl()?b.id:b.parentSession.id;if(this.debugSessionModelMap.has(S)&&!A){const D=this.debugSessionModelMap.get(S);D?.debugConsoleSession.addChildSession(b),this._activeDebugSessionModel=D}else{const D=new g.DebugConsoleRoot({});if(!D)return;const I=this.injector.get(u.DebugConsoleTreeModel,[D]),w=this.injector.get(d.DebugConsoleSession,[b,I]);this._activeDebugSessionModel={treeModel:I,debugConsoleSession:w},w.onDidChange(async()=>{if(!I)return;const T=I.root.branchSize,R=w.resolveChildren();I.root.updatePresetChildren(R),T!==R.length&&(this.refresh(),I.isScrollBottom&&await this.treeHandle.ensureVisible(R[R.length-1]),I?.dispatchChange())}),this.debugSessionModelMap.set(S,this._activeDebugSessionModel),this.initDecorations(D),this.listenTreeViewChange()}return this.onDidUpdateTreeModelEmitter.fire(this._activeDebugSessionModel),this._activeDebugSessionModel}initDecorations(b){this._decorations=new a.DecorationsManager(b),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.contextMenuDecoration),this.decorations.removeDecoration(this.loadingDecoration))}handleTreeHandler(b){this._debugWatchTreeHandle=b}dispatchWatchEvent(b,A,S){const D=b.watchEvents.get(A);D&&D.callback&&D.callback(S)}collapsedAll(){var b;(b=this.treeModel)===null||b===void 0||b.root.collapsedAll()}async refresh(b){if(!b)if(this.treeModel)b=this.treeModel.root;else return;!g.ExpressionContainer.is(b)&&b.parent&&(b=b.parent),this.queueChangeEvent(b.path,()=>{this.onDidRefreshedEmitter.fire()})}queueChangeEvent(b,A){this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new p.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout(async()=>{var S;await this.flushEventQueue(),(S=this.flushEventQueueDeferred)===null||S===void 0||S.resolve(),this.flushEventQueueDeferred=null,A()},n.DEFAULT_REFRESH_DELAY)),this._changeEventDispatchQueue.indexOf(b)===-1&&this._changeEventDispatchQueue.push(b)}async execute(b){if(!this.treeModel)return;const A=this.treeModel.root,S=new s.AnsiConsoleNode(b,A,this.linkDetector);this.dispatchWatchEvent(A,A.path,{type:a.WatchEvent.Added,node:S,id:A.id});const D=new g.DebugConsoleNode({session:this.manager.currentSession},b,A);await D.evaluate(),this.dispatchWatchEvent(A,A.path,{type:a.WatchEvent.Added,node:D,id:A.id}),this.treeHandle.ensureVisible(D,"end",!0)}};t.DebugConsoleModelService=c,c.DEFAULT_REFRESH_DELAY=200,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],c.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(v.ICtxMenuRenderer),r.__metadata("design:type",v.ICtxMenuRenderer)],c.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,o.Autowired)(v.AbstractContextMenuService),r.__metadata("design:type",v.AbstractContextMenuService)],c.prototype,"contextMenuService",void 0),r.__decorate([(0,o.Autowired)(l.DebugViewModel),r.__metadata("design:type",l.DebugViewModel)],c.prototype,"viewModel",void 0),r.__decorate([(0,o.Autowired)(p.IContextKeyService),r.__metadata("design:type",Object)],c.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(m.IDebugSessionManager),r.__metadata("design:type",Object)],c.prototype,"manager",void 0),r.__decorate([(0,o.Autowired)(p.IClipboardService),r.__metadata("design:type",Object)],c.prototype,"clipboardService",void 0),r.__decorate([(0,o.Autowired)(_.LinkDetector),r.__metadata("design:type",_.LinkDetector)],c.prototype,"linkDetector",void 0),r.__decorate([(0,o.Autowired)(h.DebugContextKey),r.__metadata("design:type",h.DebugContextKey)],c.prototype,"debugContextKey",void 0),t.DebugConsoleModelService=c=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],c)},11456:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleContribution=t.DEBUG_CONSOLE_VIEW_ID=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(93899),p=e(98295),v=e(64582),m=e(17280),_=e(4983),s=e(1276),g=e(4161),l=e(35199),h=e(5131);t.DEBUG_CONSOLE_VIEW_ID="debug-console-view";let u=class{registerComponent(E){E.register("debug-console",{id:t.DEBUG_CONSOLE_VIEW_ID,component:h.DebugConsoleView},{title:(0,o.localize)("debug.console.panel.title"),priority:8,containerId:v.DEBUG_CONSOLE_CONTAINER_ID,iconClass:(0,o.getIcon)("debug"),titleComponent:g.DebugConsoleFilterView})}registerToolbarItems(E){E.registerItem({id:v.DEBUG_COMMANDS.CLEAR_CONSOLE.id,command:v.DEBUG_COMMANDS.CLEAR_CONSOLE.id,iconClass:(0,o.getIcon)("clear"),viewId:v.DEBUG_CONSOLE_CONTAINER_ID,tooltip:v.DEBUG_COMMANDS.CLEAR_CONSOLE.label})}registerCommands(E){E.registerCommand(v.DEBUG_COMMANDS.CLEAR_CONSOLE,{execute:()=>{this.debugConsoleModelService.clear()}}),E.registerCommand(v.DEBUG_COMMANDS.COPY_CONSOLE_ITEM,{execute:f=>{this.debugConsoleModelService.copy(f)}}),E.registerCommand(v.DEBUG_COMMANDS.COPY_CONSOLE_ALL,{execute:()=>{this.debugConsoleModelService.copyAll()}}),E.registerCommand(v.DEBUG_COMMANDS.COLLAPSE_ALL_CONSOLE_ITEM,{execute:()=>{this.debugConsoleModelService.collapseAll()},isEnabled:()=>this.debugContextKey.contextInDebugConsole.get()===!0}),E.registerCommand(v.DEBUG_COMMANDS.CONSOLE_ENTER_EVALUATE,{execute:()=>{this.debugConsoleService.runExecute()}}),E.registerCommand(v.DEBUG_COMMANDS.CONSOLE_INPUT_DOWN_ARROW,{execute:()=>{this.debugConsoleService.showNextValue()}}),E.registerCommand(v.DEBUG_COMMANDS.CONSOLE_INPUT_UP_ARROW,{execute:()=>{this.debugConsoleService.showPreviousValue()}}),E.registerCommand(v.DEBUG_COMMANDS.CONSOLE_FILTER_FOCUS,{execute:()=>{this.debugConsoleFilterService.focusInput()}})}registerMenus(E){E.registerMenuItem(a.MenuId.DebugConsoleContext,{command:{id:v.DEBUG_COMMANDS.COPY_CONSOLE_ITEM.id,label:(0,o.localize)("debug.console.copy")},group:"copy"}),E.registerMenuItem(a.MenuId.DebugConsoleContext,{command:{id:v.DEBUG_COMMANDS.COPY_CONSOLE_ALL.id,label:(0,o.localize)("debug.console.copyAll")},group:"copy"}),E.registerMenuItem(a.MenuId.DebugConsoleContext,{command:{id:v.DEBUG_COMMANDS.CLEAR_CONSOLE.id,label:(0,o.localize)("debug.console.clear")},group:"other"}),E.registerMenuItem(a.MenuId.DebugConsoleContext,{command:{id:v.DEBUG_COMMANDS.COLLAPSE_ALL_CONSOLE_ITEM.id,label:(0,o.localize)("debug.console.collapseAll")},group:"other"})}registerKeybindings(E){E.registerKeybinding({command:v.DEBUG_COMMANDS.CONSOLE_ENTER_EVALUATE.id,keybinding:"enter",when:`${_.CONTEXT_IN_DEBUG_REPL.raw} && ${_.CONTEXT_IN_DEBUG_MODE.raw}`}),E.registerKeybinding({command:v.DEBUG_COMMANDS.CONSOLE_INPUT_DOWN_ARROW.id,keybinding:"down",when:`${_.CONTEXT_IN_DEBUG_REPL.raw} && ${_.CONTEXT_IN_DEBUG_MODE.raw}`}),E.registerKeybinding({command:v.DEBUG_COMMANDS.CONSOLE_INPUT_UP_ARROW.id,keybinding:"up",when:`${_.CONTEXT_IN_DEBUG_REPL.raw} && ${_.CONTEXT_IN_DEBUG_MODE.raw}`}),E.registerKeybinding({command:v.DEBUG_COMMANDS.CONSOLE_FILTER_FOCUS.id,keybinding:"ctrlcmd+f",when:`${_.CONTEXT_IN_DEBUG_REPL.raw}`})}};t.DebugConsoleContribution=u,n.__decorate([(0,r.Autowired)(v.IDebugConsoleModelService),n.__metadata("design:type",Object)],u.prototype,"debugConsoleModelService",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],u.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(l.DebugConsoleService),n.__metadata("design:type",l.DebugConsoleService)],u.prototype,"debugConsoleService",void 0),n.__decorate([(0,r.Autowired)(s.DebugConsoleFilterService),n.__metadata("design:type",s.DebugConsoleFilterService)],u.prototype,"debugConsoleFilterService",void 0),n.__decorate([(0,r.Autowired)(m.DebugContextKey),n.__metadata("design:type",m.DebugContextKey)],u.prototype,"debugContextKey",void 0),t.DebugConsoleContribution=u=n.__decorate([(0,p.Domain)(o.ComponentContribution,o.TabBarToolbarContribution,o.CommandContribution,a.MenuContribution,o.KeybindingContribution)],u)},35199:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleService=void 0;const r=e(85608),o=e(76003),a=e(41869),p=e(43718),v=e(54414),m=e(57517),_=e(63067),s=r.__importStar(e(20868)),g=e(52902),l=e(52416),h=e(54114),u=e(64582),d=e(38029),E=e(17280),f=e(15153),c="consoleinputdecoration",y="debug.console.history",b=18,A=I=>I.replace(/^\S/,w=>w.toUpperCase()),S={...(0,m.getSimpleEditorOptions)(),scrollbar:{horizontal:"visible",vertical:"hidden",handleMouseWheel:!0},acceptSuggestionOnEnter:"on"};let D=n=class{constructor(){this._consoleInputElement=null,this._updateDisposable=null,this._onConsoleInputValueChange=new p.Emitter,this.onConsoleInputValueChange=this._onConsoleInputValueChange.event,this._onInputHeightChange=new p.Emitter,this.onInputHeightChange=this._onInputHeightChange.event}get _isReadonly(){const w=this.manager.currentSession;return!(w&&w.state!==u.DebugState.Inactive)}get isVisible(){const w=this.mainLayoutService.getTabbarHandler(u.DEBUG_CONSOLE_CONTAINER_ID);return w&&w.isVisible}get consoleModel(){return this.debugConsoleModelService}activate(){const w=this.mainLayoutService.getTabbarHandler(u.DEBUG_CONSOLE_CONTAINER_ID);w&&!w.isVisible&&w.activate()}focusInput(){this.inputEditor&&this.inputEditor.monacoEditor.focus()}async init(w){var T;if(!w)return;const R=await this.storageProvider(p.STORAGE_NAMESPACE.DEBUG);if(this.history=new h.HistoryNavigator(new Set(R.get(y,[])),50),!((T=this.inputEditor)===null||T===void 0)&&T.monacoEditor)return;this._consoleInputElement=w,this.inputEditor=this.editorService.createCodeEditor(this._consoleInputElement,{...S,readOnly:!this.contextKeyService.getContextKeyValue(u.CONTEXT_IN_DEBUG_MODE_KEY)}),this.debugContextKey=this.injector.get(E.DebugContextKey,[this.inputEditor.monacoEditor.contextKeyService]),this.contextKeyService.match(u.CONTEXT_IN_DEBUG_MODE_KEY)?this.debugContextKey.contextInDebugMode.set(!0):this.debugContextKey.contextInDebugMode.set(!1),this.contextKeyService.onDidChangeContext(O=>{O.payload.affectsSome(n.keySet)&&(this.contextKeyService.match(u.CONTEXT_IN_DEBUG_MODE_KEY)?(this.updateReadOnly(!1),this.updateInputDecoration(),this.debugContextKey.contextInDebugMode.set(!0)):(this.updateReadOnly(!0),this.debugContextKey&&this.debugContextKey.contextInDebugMode.set(!1)))}),this.registerDecorationType(),await this.createConsoleInput(),this.setMode()}get contextInDebugRepl(){return this.debugContextKey.contextInDebugRepl}get consoleInputValue(){return this._consoleModel&&this._consoleModel.getValue()||""}showPreviousValue(){this._isReadonly||this.navigateHistory(!0)}showNextValue(){this._isReadonly||this.navigateHistory(!1)}async runExecute(){if(!this.inputEditor)return;const w=this.inputEditor.monacoEditor,T=w.getValue();await this.consoleModel.execute(T),this.history.add(T),w.setValue("")}navigateHistory(w){const T=w?this.history.previous():this.history.next();if(T&&this.inputEditor&&this.inputEditor.monacoEditor){const{monacoEditor:R}=this.inputEditor;R.setValue(T),R.setPosition({lineNumber:1,column:T.length+1})}}get consoleInputUri(){return new p.URI("debug/console/input").withScheme(p.Schemes.walkThroughSnippet)}async createConsoleInput(){var w;if(!(!((w=this.inputEditor)===null||w===void 0)&&w.monacoEditor))return;const{monacoEditor:T}=this.inputEditor,M=(await this.documentService.createModelReference(this.consoleInputUri)).instance.getMonacoModel();M.updateOptions({tabSize:2}),this._consoleModel=M,T.setModel(M),setTimeout(()=>{this.layoutBody()},0),T.onDidFocusEditorText(()=>{this.contextInDebugRepl.set(!0),this.updateInputDecoration()}),T.onDidBlurEditorText(()=>{this.contextInDebugRepl.set(!1),this.updateInputDecoration()}),T.onDidChangeModelContent(()=>{const O=T.getModel().getLineCount();this.layoutBody(O*18)}),this.manager.onDidChangeActiveDebugSession(()=>{this.registerCompletion(),this.setMode()}),await this.updateInputDecoration()}layoutBody(w,T){var R;if(!this.inputEditor)return;const{monacoEditor:M}=this.inputEditor,O=Math.max(w||b,M.getContentHeight());M.layout({width:T||((R=this._consoleInputElement)===null||R===void 0?void 0:R.offsetWidth),height:O}),this._onInputHeightChange.fire(O)}updateReadOnly(w){this.inputEditor&&this.inputEditor.monacoEditor.updateOptions({readOnly:w})}async updateInputDecoration(){if(!this.inputEditor)return;const w=[];if(this._isReadonly&&this.inputEditor.monacoEditor.hasTextFocus()&&!this.inputEditor.monacoEditor.getValue()){const T=(0,l.transparent)(l.editorForeground,.4)(await this.themeService.getCurrentTheme());w.push({range:{startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:1},renderOptions:{after:{contentText:(0,a.localize)("debug.console.input.placeholder"),color:T?T.toString():void 0}}})}this.inputEditor.monacoEditor.setDecorationsByType("debug-console-input",c,w)}setMode(){var w;if(!this.inputEditor)return;const T=this.manager.currentSession;if(!T)return;const R=T.currentEditor();R&&this.inputEditor.monacoEditor.getModel().setLanguage((w=R.getModel())===null||w===void 0?void 0:w.getLanguageId())}registerDecorationType(){this.overrideServicesRegistry.getRegisteredService(a.ServiceNames.CODE_EDITOR_SERVICE).registerDecorationType("console-input-decoration",c,{})}registerCompletion(){var w;this._updateDisposable&&(this._updateDisposable.dispose(),this._updateDisposable=null);const T=this.manager.currentSession;if(!T)return;const R=T.currentEditor();R&&(this._updateDisposable=g.monaco.languages.registerCompletionItemProvider((w=R.getModel())===null||w===void 0?void 0:w.getLanguageId(),{_debugDisplayName:"DebugConsoleCompletionProvider",triggerCharacters:["."],provideCompletionItems:async(M,O,x)=>{var k;if(!(!((k=this.manager.currentSession)===null||k===void 0)&&k.capabilities.supportsCompletionsRequest))return;if(M.uri.toString()!==this.consoleInputUri.toString())return null;const F=this.manager.currentSession,{triggerCharacter:L}=x;let B=M.getWordAtPosition(O);if(B&&F){const{word:U,startColumn:W,endColumn:j}=B;return{suggestions:(await F.sendRequest("completions",{text:U,column:j,frameId:F.currentFrame&&F.currentFrame.raw.id})).body.targets.map(G=>({label:G.label,insertText:G.text||G.label,sortText:G.sortText,kind:s.languages.CompletionItemKind[A(G.type||"property")],range:{startLineNumber:O.lineNumber,endLineNumber:O.lineNumber,startColumn:W,endColumn:j}}))}}if(B=M.getWordAtPosition({lineNumber:O.lineNumber,column:O.column-1}),B&&F&&L){const{word:U,endColumn:W}=B;return{suggestions:(await F.sendRequest("completions",{text:U+L,column:W+1,frameId:F.currentFrame&&F.currentFrame.raw.id})).body.targets.map(Q=>({label:Q.label,insertText:Q.text||Q.label,sortText:Q.sortText,kind:s.languages.CompletionItemKind[A(Q.type||"property")],range:{startLineNumber:O.lineNumber,endLineNumber:O.lineNumber,startColumn:W+1,endColumn:W+1}}))}}return null}}))}disable(){var w,T;this._updateDisposable&&(this._updateDisposable.dispose(),this._updateDisposable=null),(w=this.inputEditor)===null||w===void 0||w.monacoEditor.setValue(""),(T=this.inputEditor)===null||T===void 0||T.monacoEditor.setModel(null)}};t.DebugConsoleService=D,D.keySet=new Set([u.CONTEXT_IN_DEBUG_MODE_KEY]),r.__decorate([(0,o.Autowired)(u.IDebugConsoleModelService),r.__metadata("design:type",f.DebugConsoleModelService)],D.prototype,"debugConsoleModelService",void 0),r.__decorate([(0,o.Autowired)(_.IMainLayoutService),r.__metadata("design:type",Object)],D.prototype,"mainLayoutService",void 0),r.__decorate([(0,o.Autowired)(m.IEditorDocumentModelService),r.__metadata("design:type",Object)],D.prototype,"documentService",void 0),r.__decorate([(0,o.Autowired)(v.EditorCollectionService),r.__metadata("design:type",v.EditorCollectionService)],D.prototype,"editorService",void 0),r.__decorate([(0,o.Autowired)(p.CommandRegistry),r.__metadata("design:type",Object)],D.prototype,"commands",void 0),r.__decorate([(0,o.Autowired)(a.IContextKeyService),r.__metadata("design:type",Object)],D.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(u.IDebugSessionManager),r.__metadata("design:type",d.DebugSessionManager)],D.prototype,"manager",void 0),r.__decorate([(0,o.Autowired)(l.IThemeService),r.__metadata("design:type",Object)],D.prototype,"themeService",void 0),r.__decorate([(0,o.Autowired)(a.MonacoOverrideServiceRegistry),r.__metadata("design:type",a.MonacoOverrideServiceRegistry)],D.prototype,"overrideServicesRegistry",void 0),r.__decorate([(0,o.Autowired)(a.StorageProvider),r.__metadata("design:type",Function)],D.prototype,"storageProvider",void 0),r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],D.prototype,"injector",void 0),t.DebugConsoleService=D=n=r.__decorate([(0,o.Injectable)()],D)},5131:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_CONSOLE_TREE_FIELD_NAME=t.DEBUG_CONSOLE_TREE_NODE_HEIGHT=t.DebugConsoleRenderedNode=t.DebugConsoleView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(97267),p=e(41869),v=e(43718),m=e(72260),_=e(64582),s=e(58542),g=e(5905),l=e(16170),h=e(1276),u=n.__importDefault(e(80315)),d=e(35199),E=({viewState:c})=>{const y=(0,p.useInjectable)(d.DebugConsoleService),b=(0,p.useInjectable)(h.DebugConsoleFilterService),A=(0,p.useInjectable)(p.PreferenceService),{consoleModel:S}=y,{height:D,width:I}=c,[w,T]=o.default.useState(),[R,M]=o.default.useState(26),[O,x]=o.default.useState(""),[k,F]=o.default.useState(!0),L=o.default.useRef(null),B=o.default.useRef(null),U=(0,p.useInjectable)(m.IMainLayoutService),W=(0,p.useDesignStyles)(u.default.debug_console_output,"debug_console_output"),j=(0,p.useDesignStyles)(u.default.variable_repl_bar,"variable_repl_bar");o.default.useEffect(()=>{if(L&&L.current){const ie=U.getTabbarHandler(_.DEBUG_CONSOLE_CONTAINER_ID);if(ie?.isActivated())y.init(L.current);else{const he=ie?.onActivate(()=>{y.init(L.current),he?.dispose()})}}},[L.current]),o.default.useEffect(()=>{const ie=new v.Disposable;return ie.addDispose(S.onDidUpdateTreeModel(async he=>{he&&await he.treeModel.ensureReady,T(he)})),ie.addDispose(b.onDidValueChange(he=>{x(he)})),ie.addDispose(y.onInputHeightChange(he=>{M(he)})),ie.addDispose(A.onSpecificPreferenceChange("debug.console.wordWrap",he=>{const{newValue:me}=he;F(me)})),F(!!A.get("debug.console.wordWrap",k)),()=>{S.removeNodeDecoration(),ie.dispose()}},[]);const Q=ie=>{S.handleTreeHandler({...ie,getModel:()=>w?.treeModel,hasDirectFocus:()=>B.current===document.activeElement})},G=(ie,he,me)=>{const q=window.getSelection();q&&q.type==="Range"&&q.rangeCount>0&&ie.stopPropagation();const{handleTwistierClick:Ee}=S;he&&Ee(he,me)},Z=(ie,he)=>{const{handleContextMenu:me}=S;me(ie,he)},$=ie=>{const{handleContextMenu:he}=S;he(ie)},V=ie=>{const{enactiveNodeDecoration:he}=S;he(),y.focusInput()},H=ie=>{const{enactiveNodeDecoration:he}=S;he()},K=()=>"filter",Y=()=>({pre:"<match>",post:"</match>",extract:ie=>ie.description?ie.description:ie.name}),X=o.default.useCallback(ie=>{const he=S.decorations.getDecorations(ie.item);return o.default.createElement(t.DebugConsoleRenderedNode,{item:ie.item,itemType:ie.itemType,decorations:he,filterValue:O,filterMode:K(),onClick:G,onTwistierClick:G,onContextMenu:Z,defaultLeftPadding:14,isWordWrap:k,leftPadding:8})},[w,O,k]),oe=()=>w?o.default.createElement(a.RecycleTree,{height:Math.max(D-R,26),width:I,itemHeight:t.DEBUG_CONSOLE_TREE_NODE_HEIGHT,onReady:Q,overScanCount:10,filter:K()==="filter"?O:"",filterProvider:{fuzzyOptions:Y,filterAlways:!0},model:w.treeModel,overflow:"auto",supportDynamicHeights:k},X):null;return o.default.createElement("div",{className:u.default.debug_console,onContextMenu:$,onClick:V},o.default.createElement("div",{className:W,tabIndex:-1,onBlur:H,ref:B,"data-name":t.DEBUG_CONSOLE_TREE_FIELD_NAME},oe()),o.default.createElement("div",{className:j,style:{maxHeight:D-26+"px"}},o.default.createElement("div",{className:u.default.variable_repl_bar_icon},o.default.createElement("span",{className:(0,p.getIcon)("right")})),o.default.createElement("div",{className:u.default.variable_repl_editor,ref:L})))};t.DebugConsoleView=E;const f=({item:c,decorations:y,defaultLeftPadding:b,leftPadding:A,filterMode:S,filterValue:D,onClick:I,onTwistierClick:w,onContextMenu:T,isWordWrap:R,itemType:M})=>{const O=(0,p.useInjectable)(h.DebugConsoleFilterService),x=(0,p.useInjectable)(s.LinkDetector),[k,F]=o.default.useState(),L=(0,p.useDesignStyles)(u.default.expansion_toggle,"expansion_toggle");o.default.useEffect(()=>{const X=window.getComputedStyle(l.AnsiConsoleNode.is(c)?c.el:x.linkify(c.description),null),oe=`${X.fontStyle} ${X.fontWeight} ${X.fontSize}/${X.lineHeight} ${X.fontFamily}`;F(oe)},[c]);const B=X=>{I(X,c,a.CompositeTreeNode.is(c)?a.TreeNodeType.CompositeTreeNode:a.TreeNodeType.TreeNode)},U=X=>{X.nativeEvent.which!==0&&(M===a.TreeNodeType.TreeNode||M===a.TreeNodeType.CompositeTreeNode)&&T&&T(X,c,M)},W=()=>l.AnsiConsoleNode.is(c)?"":(l.DebugConsoleNode.is(c)?"":c.name)+(c.description&&!l.DebugConsoleNode.is(c)?": ":""),j=(X,oe)=>g.CharWidthReader.getInstance().getCharWidth(X,oe),Q=o.default.useCallback(()=>{if(!k)return;const X=W()+c.description,oe=O.findMatches(X||""),ie=ue=>Number(ue.toFixed(4)),he=(ue,te)=>Array.from({length:te},(fe,Ie)=>Ie).reduce((fe,Ie)=>fe+ie(j(X.charAt(ue+Ie),k)),0),me=new Map,q=(ue,te)=>{if(ue>0){const fe=(Me,Be,Pe)=>Array.from({length:Me-Be},(we,_e)=>Be+_e).reduce((we,_e)=>ie(we+j(X.charAt(_e),k)),Pe);let Ie;if(te!==0&&me.has(oe[te].startIndex)){const Me=me.get(oe[te].startIndex);Ie=fe(ue,Me.startIndex,Me.left)}else Ie=fe(ue,0,0);return me.set(ue,{startIndex:ue,left:Ie}),Ie}return 0};return oe.map((ue,te)=>({height:16,top:3,width:he(ue.startIndex,ue.count),left:q(ue.startIndex,Math.max(0,te-1))})).map(ue=>o.default.createElement("div",{key:ue.left,className:u.default.block,style:ue}))},[D,k]),G=X=>l.AnsiConsoleNode.is(X)||X instanceof l.DebugConsoleNode&&X.variablesReference===0?null:o.default.createElement("div",{className:(0,r.default)(u.default.debug_console_node_segment,!l.DebugConsoleNode.is(X)&&u.default.debug_console_node_displayname,u.default.debug_console_variable,c.description?u.default.name:u.default.info)},o.default.createElement(l.TreeWithLinkWrapper,{html:x.linkify(W())})),Z=X=>{const oe=/^true|false$/i,ie=/^(['"]).*\1$/,he=X.description||"",me=[u.default.debug_console_variable];return l.AnsiConsoleNode.is(X)?o.default.createElement("div",{className:(0,r.default)(u.default.debug_console_node_segment,u.default.debug_console_node_displayname)},X.template()):(c.variableType==="number"||c.variableType==="boolean"||c.variableType==="string"?me.push(u.default[c.variableType]):isNaN(+he)?oe.test(he)?me.push(u.default.boolean):ie.test(he)&&me.push(u.default.string):me.push(u.default.number),o.default.createElement("div",{className:(0,r.default)(u.default.debug_console_node_segment_grow,u.default.debug_console_node_description,...me)},o.default.createElement(l.TreeWithLinkWrapper,{html:x.linkify(he)})))},$=()=>o.default.createElement("div",{className:(0,r.default)(u.default.debug_console_node_segment,u.default.debug_console_node_tail)},V()),V=()=>{var X,oe,ie;return l.AnsiConsoleNode.is(c)?o.default.createElement("div",{className:u.default.debug_console_node_status,title:(X=c.source)===null||X===void 0?void 0:X.path},!((oe=c.source)===null||oe===void 0)&&oe.name?`${(ie=c.source)===null||ie===void 0?void 0:ie.name}:${c.line}`:""):o.default.createElement("div",{className:u.default.debug_console_node_status},c.badge)},H=()=>c.tooltip,K=(X,oe)=>{const ie=he=>{oe(he,X,M)};return y&&y?.classlist.indexOf(u.default.mod_loading)>-1?o.default.createElement("div",{className:(0,r.default)(u.default.debug_console_node_segment,L)},o.default.createElement(a.Loading,null)):X instanceof l.DebugConsoleNode&&X.variablesReference===0?null:o.default.createElement("div",{onClick:ie,className:(0,r.default)(u.default.debug_console_node_segment,L,(0,p.getIcon)("right"),{[`${u.default.mod_collapsed}`]:!X.expanded})})},Y=X=>{if(a.CompositeTreeNode.is(X))return K(X,w)};return o.default.createElement("div",{key:c.id,onClick:B,onContextMenu:U,title:H(),className:(0,r.default)(u.default.debug_console_node,y?y.classlist:null),style:{paddingLeft:`${(b||8)+(c.depth||0)*(A||0)}px`},"data-id":c.id},o.default.createElement("div",{className:(0,r.default)(u.default.debug_console_node_content)},Y(c),o.default.createElement("div",{className:u.default.debug_console_node_overflow_wrap,style:{whiteSpace:R?"pre-wrap":"nowrap",cursor:c instanceof l.DebugVariableContainer?"pointer":"initial"}},G(c),Z(c)),$()),o.default.createElement("div",{className:u.default.debug_console_selection},S==="matcher"&&Q()))};t.DebugConsoleRenderedNode=f,t.DEBUG_CONSOLE_TREE_NODE_HEIGHT=22,t.DEBUG_CONSOLE_TREE_FIELD_NAME="DEBUG_CONSOLE_TREE_FIELD"},32756:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugViewModel=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(26296),p=e(38029);let v=class{constructor(){this.onDidChangeEmitter=new o.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.onDidChangeBreakpointsEmitter=new o.Emitter,this.onDidChangeBreakpoints=this.onDidChangeBreakpointsEmitter.event,this.toDispose=new o.DisposableCollection(this.onDidChangeEmitter,this.onDidChangeBreakpointsEmitter),this._sessions=new Set}fireDidChange(){this.onDidChangeEmitter.fire(void 0)}fireDidChangeBreakpoints(_){this.onDidChangeBreakpointsEmitter.fire(_)}get sessions(){return this._sessions.values()}get sessionCount(){return this._sessions.size}push(_){this._sessions.has(_)||(this._sessions.add(_),this.fireDidChange())}delete(_){return this._sessions.delete(_)?(this.fireDidChange(),!0):!1}get session(){return this.sessions.next().value}get id(){return this.session&&this.session.id||"-1"}get label(){return this.session&&this.session.label||"Unknown Session"}has(_){return!!_&&this._sessions.has(_)}init(_){_&&this.push(_),this.toDispose.push(this.manager.onDidChangeActiveDebugSession(({previous:s,current:g})=>{this.has(s)&&!this.has(g)&&this.fireDidChange()})),this.toDispose.push(this.manager.onDidChange(s=>{this.has(s)&&this.fireDidChange()})),this.toDispose.push(this.manager.onDidDestroyDebugSession(s=>{this.has(s)&&this.fireDidChange()}))}dispose(){this.toDispose.dispose()}get threads(){if(this.manager.currentSession)return this.manager.currentSession.getThreads(()=>!0)}get currentSession(){const{currentSession:_}=this.manager;return this.has(_)&&_||this.session}set currentSession(_){this.manager.updateCurrentSession(_)}get state(){const{currentSession:_}=this;return _&&_.state||a.DebugState.Inactive}get currentThread(){const{currentSession:_}=this;return _&&_.currentThread}get currentFrame(){const{currentThread:_}=this;return _&&_.currentFrame}async start(){const{session:_}=this;if(!_)return;const s=await this.manager.start(_.options);s&&(this._sessions.delete(_),this._sessions.add(s),this.fireDidChange())}async restart(){const{currentSession:_}=this;if(!_)return;const s=await this.manager.restart(_);s!==_&&(this._sessions.delete(_),this._sessions.add(s)),this.fireDidChange()}report(_,s,g){return this.manager.report(_,s,g)}reportTime(_,s){return this.manager.reportTime(_,s)}reportAction(_,s,g){return this.manager.reportAction(_,s,g)}};t.DebugViewModel=v,n.__decorate([(0,r.Autowired)(a.IDebugSessionManager),n.__metadata("design:type",p.DebugSessionManager)],v.prototype,"manager",void 0),t.DebugViewModel=v=n.__decorate([(0,r.Injectable)()],v)},36120:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugStackFramesView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(97267),p=e(41869),v=e(64582),m=e(91797),_=e(50755),s=n.__importDefault(e(12920)),g=e(85294),l=h=>{const{viewState:u,frames:d,thread:E,indent:f=0,session:c,isBottom:y}=h,[b,A]=(0,o.useState)(),[S,D]=(0,o.useState)(!1),[I,w]=(0,o.useState)([]),[T,R]=(0,o.useState)(""),[M,O]=(0,o.useState)(!1),x=(0,p.useInjectable)(v.IDebugSessionManager),k=(0,o.useRef)([]),F=(0,p.useInjectable)(g.DebugCallStackService),L=(0,o.useCallback)(async()=>{var K,Y;if(!E)return;const X=typeof((K=E.stoppedDetails)===null||K===void 0?void 0:K.totalFrames)=="number"?((Y=E.stoppedDetails)===null||Y===void 0?void 0:Y.totalFrames)-E.frameCount:void 0,oe=await E.fetchFrames(X);j(oe)},[I]),B=K=>{K&&K.source&&K.source.open({},K)},U=(0,o.useCallback)(K=>{const Y=k.current.slice(0);let X=-1;K.nextFrame?X=Y.findIndex(oe=>{var ie;return _.DebugStackFrame.is(oe)&&oe.id===((ie=K.nextFrame)===null||ie===void 0?void 0:ie.id)}):X=Y.length,X>-1&&(Y.splice(X-1,1,...K.frames),k.current=Y,w(Y))},[k.current,I]),W=(0,o.useCallback)((K,Y)=>{var X,oe,ie,he;const me=Y.length;let q=-1,Ee=K.length>0?K[K.length+q]:void 0;for(;Ee&&!_.DebugStackFrame.is(Ee);)q-=1,Ee=K[K.length+q];const ue=K.slice(0,K.length+q+1),te=Ee?Y.findIndex(Be=>Be.id===Ee?.id)+1:0;let fe=[],Ie,Me=!1;for(let Be=te;Be<me;Be++)if(!((X=Y[Be].source)===null||X===void 0)&&X.raw.origin)if(Me)if(Ie===((oe=Y[Be].source)===null||oe===void 0?void 0:oe.raw.origin)){fe.push(Y[Be]);continue}else fe.length>1?(ue.push(new _.ShowMoreDebugStackFrame(Y[Be],fe,c,Ie,U)),q-=fe.length-1):ue.push(fe[0]),fe=[],Me=!1,Ie=(ie=Y[Be].source)===null||ie===void 0?void 0:ie.raw.origin,fe.push(Y[Be]);else Me=!0,fe.push(Y[Be]),Ie=(he=Y[Be].source)===null||he===void 0?void 0:he.raw.origin;else Me&&fe.length>0&&(fe.length>1?(ue.push(new _.ShowMoreDebugStackFrame(Y[Be],fe,c,Ie,U)),q-=fe.length-1):ue.push(fe[0]),fe=[],Me=!1),ue.push(Y[Be]);return Me&&fe.length>0&&(fe.length>1?ue.push(new _.ShowMoreDebugStackFrame(void 0,fe,c,Ie,U)):ue.push(fe[0])),ue},[]),j=(0,o.useCallback)(K=>{k.current=W(k.current,K),w(k.current)},[I,W]),Q=(0,o.useCallback)(K=>{A(K)},[b]);(0,o.useEffect)(()=>{j([...d]);const K=new p.DisposableCollection;return K.push(x.onDidChangeActiveDebugSession(({previous:Y})=>{Y&&Y!==E.session&&Q(void 0)})),()=>{K.dispose()}},[]),(0,o.useEffect)(()=>{if(E){const K=E.frames.find(Y=>!!Y.source);K&&(Q(K.raw.id),B(K))}},[E.frameCount]),(0,o.useEffect)(()=>{if(E)if(E.stoppedDetails){const{framesErrorMessage:K,totalFrames:Y}=E.stoppedDetails;R(K||""),Y&&Y>E.frameCount?O(!0):O(!1)}else O(!1);else O(!1)},[I]);const G=({data:K})=>{const Y=K,X=_.DebugStackFrame.is(Y)&&Y.raw.presentationHint==="label",oe=_.DebugStackFrame.is(Y)&&(0,m.isFrameDeemphasized)(Y.raw),ie=(0,o.useCallback)(()=>{if(!X){if(!_.DebugStackFrame.is(Y)){Y.open();return}x.updateCurrentSession(Y.session),Y.session.currentThread=Y.thread,Q(Y.raw.id),B(Y)}},[K]),he=Ee=>{Ee.preventDefault(),Ee.stopPropagation(),_.DebugStackFrame.is(Y)&&Y.canRestart&&Y.restart()},me={paddingLeft:`${f}px`};_.DebugStackFrame.is(Y)&&oe&&(me.color="var(--list-deemphasizedForeground)");const q=(0,o.useCallback)(Ee=>_.DebugStackFrame.is(Ee)?o.default.createElement(o.default.Fragment,null,o.default.createElement("span",{className:(0,r.default)(s.default.debug_stack_frames_item_label,X&&s.default.label,(!Ee.source||!Ee.source.available||oe)&&s.default.disabled,Ee.canRestart&&s.default.debug_stack_frames_can_restart)},Ee.raw&&Ee.raw.name),!X&&o.default.createElement("span",{className:s.default.debug_stack_frames_item_description},Ee.raw&&Ee.raw.source&&(Ee.raw.source.name||Ee.raw.source.path)||(0,p.localize)("debug.stack.frame.noSource")),o.default.createElement(o.default.Fragment,null,Ee.canRestart&&o.default.createElement("a",{title:"",onClick:ue=>he(ue),className:(0,r.default)(s.default.debug_restart_frame_icon,(0,p.getIcon)("debug-restart-frame"))}),!X&&!oe&&o.default.createElement("div",{className:(0,r.default)(!(0,p.isUndefined)(Ee.raw.line)&&s.default.debug_stack_frames_item_badge)},Ee.raw&&Ee.raw.line,!(0,p.isUndefined)(Ee.raw.line)&&":",Ee.raw&&Ee.raw.column))):o.default.createElement("span",{className:s.default.debug_stack_frames_load_more},Ee.name),[]);return o.default.createElement("div",{style:me,className:(0,r.default)(s.default.debug_stack_frames_item,X&&s.default.is_label,_.DebugStackFrame.is(Y)&&b===Y.raw.id&&s.default.selected,_.DebugStackFrame.is(Y)&&!(Y.raw&&Y.raw.source&&Y.raw.source.name)&&s.default.debug_stack_frames_item_hidden),onClick:ie,onContextMenu:Ee=>F.handleContextMenu(Ee,K)},q(Y))},Z=(0,o.useCallback)(()=>{const K=async()=>{D(!0),await L(),D(!1)};return o.default.createElement("div",{className:s.default.debug_stack_frames_item,onClick:K},o.default.createElement("span",{className:s.default.debug_stack_frames_load_more},(0,p.localize)("debug.stack.loadMore")))},[S,L]),$=(0,o.useCallback)(()=>o.default.createElement("div",{className:s.default.debug_stack_frames_item},o.default.createElement("span",{className:s.default.debug_stack_frames_load_more},(0,p.localize)("debug.stack.loading"))),[]),V=(0,o.useCallback)(K=>o.default.createElement("div",{className:s.default.debug_stack_frames_item},o.default.createElement("span",{className:s.default.debug_stack_frames_error_message,title:K},K)),[]);if(T)return o.default.createElement("div",{className:s.default.debug_stack_frames},V(T));const H=(0,o.useCallback)(()=>S?$():M?Z():null,[S,M]);return o.default.createElement(a.RecycleList,{data:I,template:G,itemHeight:22,width:u.width,height:(S||M?(I.length+1)*22:I.length*22)+(y?10:0),footer:S||M?H:void 0})};t.DebugStackFramesView=l},75651:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugStackSessionView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(41869),p=e(64582),v=e(8701),m=n.__importDefault(e(12920)),_=e(61520),s=e(85294),g=l=>{const{session:h,viewState:u}=l,d=(0,a.useInjectable)(p.IDebugSessionManager),E=(0,a.useInjectable)(s.DebugCallStackService),[f,c]=(0,o.useState)([]),[y,b]=(0,o.useState)([]),[A,S]=(0,o.useState)([]),[D,I]=(0,o.useState)([]),[w,T]=(0,o.useState)(!0),[R,M]=(0,o.useState)(!1),[O,x]=(0,o.useState)(!0),k=d.sessions.length>1,F=h.supportsThreadIdCorrespond,L=(0,o.useRef)(!1),B=()=>{var Z,$;const V=d.sessions.filter(K=>K.parentSession),H=[];for(;V[0];)(($=d.getSession((Z=V[0].parentSession)===null||Z===void 0?void 0:Z.id))===null||$===void 0?void 0:$.id)===h.id&&H.push(V[0]),V.shift();return H},U=async()=>{x(!0);const Z=await h.fetchThreads();x(!1),b(Z)};(0,o.useEffect)(()=>{const Z=new a.DisposableCollection;return Z.push(d.onDidCreateDebugSession(()=>{if(L.current)return;const $=B();I($)})),Z.push(d.onDidDestroyDebugSession(()=>{if(L.current)return;const $=B();I($)})),()=>{L.current=!0,Z.dispose()}},[]);const W=(0,o.useCallback)(Z=>{c(Z)},[f]),j=(0,o.useCallback)(Z=>{S(Z)},[A]);(0,o.useEffect)(()=>{W(Array.from(h.threads));const Z=new a.DisposableCollection;return Z.push(h.onDidChange(()=>{W([...h.threads])})),Z.push(h.onDidThread(async({body:{reason:$}})=>{h.supportsThreadIdCorrespond&&h.state===p.DebugState.Stopped&&$==="started"&&await U()})),Z.push(h.onDidStop(async()=>{if(!h.supportsThreadIdCorrespond)return;const $=Array.from(h.multipleThreadPaused.values());j($),await U()})),Z.push(h.onDidContinued(async()=>{if(!h.supportsThreadIdCorrespond)return;const $=Array.from(h.multipleThreadPaused.values());j($)})),()=>{Z.dispose()}},[]);const Q=()=>{if(h.state!==p.DebugState.Stopped)return null;if(F&&w)return O?o.default.createElement("div",{className:m.default.debug_stack_item_loading},o.default.createElement("span",null,(0,a.localize)("debug.stack.loading"))):y.map((Z,$)=>!h.hasInMultipleThreadPaused(Z.raw.id)&&o.default.createElement(v.DebugStackThreadView,{key:Z.id,indent:k?16:0,viewState:u,thread:Z,session:h,isBottom:$===y.length-1}))};if((Z=>{if(Z.threads.some(V=>V.frameCount>0))return!1;const $=B();return!($.length!==1||!$[0].compact)})(h)){const Z=B();return o.default.createElement("div",{className:m.default.debug_stack_item},Z.map($=>o.default.createElement(t.DebugStackSessionView,{key:$.id,viewState:u,session:$,indent:1})))}return o.default.createElement("div",{className:m.default.debug_stack_item,onContextMenu:Z=>E.handleContextMenu(Z,h)},k&&o.default.createElement("div",{className:m.default.debug_stack_item_label,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1)},F||f.length>0?o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:w?(0,a.getIcon)("arrow-down"):(0,a.getIcon)("arrow-right"),onClick:()=>T(!w)}),o.default.createElement("div",{className:(0,r.default)([(0,a.getIcon)("debug"),m.default.debug_session_icon])})):o.default.createElement("div",{style:{width:30}}),o.default.createElement("div",{className:m.default.debug_stack_item_label_title},h.label),R&&o.default.createElement(_.DebugStackOperationView,{session:h})),F&&w?A.map((Z,$)=>o.default.createElement(v.DebugStackThreadView,{key:Z.id,indent:k?16:0,viewState:u,thread:Z,session:h,isBottom:$===A.length-1})):null,!F&&(!k||w)&&f.map((Z,$)=>o.default.createElement(v.DebugStackThreadView,{key:Z.id,indent:k?16:0,viewState:u,thread:Z,session:h,isBottom:$===f.length-1})),D.length>0&&D.map(Z=>w&&o.default.createElement(t.DebugStackSessionView,{key:Z.id,viewState:u,session:Z,indent:1})),Q())};t.DebugStackSessionView=g},8701:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugStackThreadView=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),a=e(41869),p=e(64582),v=e(36120),m=n.__importDefault(e(12920)),_=e(61520),s=e(85294),g=l=>{var h;const{thread:u,viewState:d,indent:E,session:f,isBottom:c}=l,y=(0,a.useInjectable)(p.IDebugSessionManager),b=(0,a.useInjectable)(s.DebugCallStackService),[A,S]=(0,r.useState)(!0),[D,I]=(0,r.useState)(u.frames),w=y.sessions.length>1,T=!((h=y.currentSession)===null||h===void 0)&&h.supportsThreadIdCorrespond?!0:y.sessions.length>1||y.sessions[0]&&y.sessions[0].threadCount>1,R=(0,r.useCallback)(O=>{S(O)},[A]);(0,r.useEffect)(()=>{const O=new a.DisposableCollection;return O.push(f.onDidChangeCallStack(()=>{I(u.frames),u.stopped&&y.currentThread&&y.currentThread.id===u.id?R(!0):R(!1)})),()=>{O.dispose()}},[]);const M=u.stopped&&u.stoppedDetails?u.raw.id===u.stoppedDetails.threadId?`${(0,a.localize)("debug.stack.frame.because")} ${u.stoppedDetails.reason} ${(0,a.localize)("debug.stack.frame.stopped")}`:(0,a.localize)("debug.stack.frame.stopped"):(0,a.localize)("debug.stack.frame.running");return r.default.createElement("div",{className:m.default.debug_stack_item,onContextMenu:O=>b.handleContextMenu(O,u)},T&&r.default.createElement("div",{style:{paddingLeft:`${E}px`},className:m.default.debug_stack_item_label},u.frames.length>0?r.default.createElement("div",{className:A?(0,a.getIcon)("arrow-down"):(0,a.getIcon)("arrow-right"),onClick:()=>S(!A)}):r.default.createElement("div",{style:{width:14}}),r.default.createElement("div",{className:m.default.debug_threads_item},u.raw.name),r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:m.default.debug_threads_operation},r.default.createElement(_.DebugStackOperationView,{thread:u})),r.default.createElement("span",{className:m.default.debug_threads_description},r.default.createElement(o.Badge,null,M.toUpperCase())))),(!T||A)&&u.frames.length>0&&r.default.createElement(v.DebugStackFramesView,{indent:T?w?38:30:8,isBottom:c,viewState:d,thread:u,frames:D,session:f}))};t.DebugStackThreadView=g},37243:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugCallStackContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(93899),p=e(64582),v=e(4983),m=e(26296),_=e(38029);function s(h){return h&&typeof h.sessionId=="string"&&typeof h.threadId=="string"&&typeof h.frameId=="string"}function g(h,u){if(s(u)){const d=h.getSession(u.sessionId);if(d){const E=[d.currentThread,...d.threads].find(f=>f.id===u.threadId);if(E)return E.frames.find(f=>f.id===u.frameId)}}}let l=class{registerCommands(u){u.registerCommand(p.DEBUG_COMMANDS.RESTART_FRAME,{execute:async(d,E)=>{const f=g(this.debugSessionManager,E);f&&await f.restart()}}),u.registerCommand(p.DEBUG_COMMANDS.COPY_STACK_TRACE,{execute:async(d,E)=>{const f=g(this.debugSessionManager,E);if(f){const c=f.thread.frames.map(y=>`${y.raw&&y.raw.name} (${y.raw&&y.raw.source&&y.raw.source.path}:${y.raw&&y.raw.line})`);this.clipboardService.writeText(c.join(`
31952
- `))}}})}registerMenus(u){u.registerMenuItem(a.MenuId.DebugCallStackContext,{command:{id:p.DEBUG_COMMANDS.RESTART_FRAME.id,label:(0,o.localize)("debugger.menu.restartFrame")},when:`${v.CONTEXT_CALLSTACK_ITEM_TYPE.equalsTo("stackFrame")} && ${v.CONTEXT_RESTART_FRAME_SUPPORTED.raw}`,enabledWhen:v.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.raw,order:10}),u.registerMenuItem(a.MenuId.DebugCallStackContext,{command:{id:p.DEBUG_COMMANDS.COPY_STACK_TRACE.id,label:(0,o.localize)("debugger.menu.copyCallstack")},when:v.CONTEXT_CALLSTACK_ITEM_TYPE.equalsTo("stackFrame"),order:20})}};t.DebugCallStackContribution=l,n.__decorate([(0,r.Autowired)(m.IDebugSessionManager),n.__metadata("design:type",_.DebugSessionManager)],l.prototype,"debugSessionManager",void 0),n.__decorate([(0,r.Autowired)(o.IClipboardService),n.__metadata("design:type",Object)],l.prototype,"clipboardService",void 0),t.DebugCallStackContribution=l=n.__decorate([(0,o.Domain)(a.MenuContribution,o.CommandContribution)],l)},61520:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugStackOperationView=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),a=e(66498),p=e(96090),v=n.__importDefault(e(12920)),m=_=>{const{session:s,thread:g}=_,{doStop:l,doStepIn:h,doStepOut:u,doStepOver:d,doContinue:E,doRestart:f,doPause:c,updateCurrentSession:y}=(0,o.useInjectable)(p.DebugToolbarService);if(s&&!g){const b=A=>{y(s),A()};return r.default.createElement("div",{className:v.default.debug_stack_session_operations},r.default.createElement(a.DebugAction,{run:()=>b(f),icon:"reload",label:(0,o.localize)("debug.action.restart")}),r.default.createElement(a.DebugAction,{run:()=>b(l),icon:"stop",label:(0,o.localize)("debug.action.stop")}))}if(!s&&g){const{stopped:b}=g,A=D=>{g.session.currentThread=g,D()},S=D=>D?r.default.createElement(a.DebugAction,{run:()=>A(E),icon:"continue",label:(0,o.localize)("debug.action.continue")}):r.default.createElement(a.DebugAction,{run:()=>A(c),enabled:!0,icon:"pause",label:(0,o.localize)("debug.action.pause")});return r.default.createElement("div",{className:v.default.debug_stack_thread_operations},S(b),r.default.createElement(a.DebugAction,{run:()=>A(d),enabled:b,icon:"step",label:(0,o.localize)("debug.action.step-over")}),r.default.createElement(a.DebugAction,{run:()=>A(h),enabled:b,icon:"step-in",label:(0,o.localize)("debug.action.step-into")}),r.default.createElement(a.DebugAction,{run:()=>A(u),enabled:b,icon:"step-out",label:(0,o.localize)("debug.action.step-out")}))}return null};t.DebugStackOperationView=m},85294:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugCallStackService=void 0;const n=e(85608),r=e(76003),o=e(93899),a=e(50755),p=e(4983),v=e(17280),m=e(29539);let _=class{constructor(){this.handleContextMenu=(g,l)=>{this.stackFrameSupportsRestart.reset(),g.stopPropagation(),g.preventDefault(),l instanceof m.DebugSession?this.callStackItemType.set("session"):l instanceof a.DebugThread?this.callStackItemType.set("thread"):l instanceof a.DebugStackFrame?(this.callStackItemType.set("stackFrame"),this.stackFrameSupportsRestart.set(l.canRestart)):this.callStackItemType.reset();const{x:h,y:u}=g.nativeEvent,d=this.contextMenuService.createMenu({id:o.MenuId.DebugCallStackContext,contextKeyService:this.debugContextKey.contextKeyScoped}),E=d.getMergedMenuNodes();d.dispose();const f=()=>{var y;return l instanceof a.DebugStackFrame?!((y=l.source)===null||y===void 0)&&y.inMemory?l.source.raw.path||l.source.reference||l.source.name:l.source?l.source.uri.toString():"":l instanceof a.DebugThread||l instanceof m.DebugSession?l.id:""},c=()=>l instanceof a.DebugStackFrame?{sessionId:l.session.id,threadId:l.thread.id,frameId:l.id}:l instanceof a.DebugThread?{sessionId:l.session.id,threadId:l.id}:l instanceof m.DebugSession?{sessionId:l.id}:void 0;this.ctxMenuRenderer.show({anchor:{x:h,y:u},menuNodes:E,args:[f(),c()],contextKeyService:this.debugContextKey.contextKeyScoped})},this.stackFrameSupportsRestart||(this.stackFrameSupportsRestart=p.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.bind(this.debugContextKey.contextKeyScoped)),this.callStackItemType||(this.callStackItemType=p.CONTEXT_CALLSTACK_ITEM_TYPE.bind(this.debugContextKey.contextKeyScoped))}};t.DebugCallStackService=_,n.__decorate([(0,r.Autowired)(o.AbstractContextMenuService),n.__metadata("design:type",o.AbstractContextMenuService)],_.prototype,"contextMenuService",void 0),n.__decorate([(0,r.Autowired)(o.ICtxMenuRenderer),n.__metadata("design:type",o.ICtxMenuRenderer)],_.prototype,"ctxMenuRenderer",void 0),n.__decorate([(0,r.Autowired)(v.DebugContextKey),n.__metadata("design:type",v.DebugContextKey)],_.prototype,"debugContextKey",void 0),t.DebugCallStackService=_=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],_)},18028:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugCallStackView=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),a=e(64582),p=e(75651),v=n.__importDefault(e(12920)),m=({viewState:_})=>{const s=(0,o.useInjectable)(a.IDebugSessionManager),[g,l]=r.default.useState([]);return r.default.useEffect(()=>{const h=s.onDidStartDebugSession(d=>{g.push(d),l([...g])}),u=s.onDidDestroyDebugSession(d=>{const E=g.findIndex(f=>f.id===d.id);g.splice(E,1),l([...g])});return()=>{h.dispose(),u.dispose()}},[]),r.default.createElement("div",{className:v.default.call_stack_wrapper},g.filter(h=>!h.parentSession).map(h=>r.default.createElement(p.DebugStackSessionView,{key:h.id,viewState:_,session:h,indent:0})))};t.DebugCallStackView=m},59334:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugVariablesModel=void 0;const r=e(85608),o=e(76003),a=e(97267),p=e(41869),v=e(98650);let m=n=class extends a.TreeModel{constructor(s){super(),this.flushDispatchChangeDelayer=new p.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(s)}init(s){this.root=s,this.root.watcher.on(a.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};t.DebugVariablesModel=m,m.DEFAULT_FLUSH_DELAY=100,t.DebugVariablesModel=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[v.ExpressionContainer])],m)},30865:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugVariablesModelService=void 0;const r=e(85608),o=r.__importDefault(e(46343)),a=e(76003),p=e(97267),v=e(41869),m=e(93899),_=e(98650),s=e(32756),g=e(17280),l=e(59334),h=r.__importDefault(e(57259));class u{constructor(){this._keepExpandedScopesMap=new Map}getMirrorScope(f){return Array.from(this._keepExpandedScopesMap.keys()).find(c=>(0,o.default)(c,f.getRawScope()))}set(f){const c=f.getRawScope();if(c){const y=this.getMirrorScope(f);if(y){const b=this._keepExpandedScopesMap.get(y);let A;f.expanded?A=Array.from(new Set([...b,f.variablesReference])):A=b.filter(S=>S!==f.variablesReference),this._keepExpandedScopesMap.set(y,A)}else this._keepExpandedScopesMap.set(c,f.expanded?[f.variablesReference]:[])}}get(f){const c=this.getMirrorScope(f);return c?this._keepExpandedScopesMap.get(c)||[]:[]}clear(){this._keepExpandedScopesMap.clear()}}let d=n=class{constructor(){this.selectedDecoration=new p.Decoration(h.default.mod_selected),this.focusedDecoration=new p.Decoration(h.default.mod_focused),this.contextMenuDecoration=new p.Decoration(h.default.mod_actived),this.loadingDecoration=new p.Decoration(h.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new v.Emitter,this.onDidUpdateTreeModelEmitter=new v.Emitter,this.flushDispatchChangeDelayer=new v.ThrottledDelayer(n.DEFAULT_TRIGGER_DELAY),this.disposableCollection=new v.DisposableCollection,this.keepExpandedScopesModel=new u,this.activeNodeDecoration=(f,c=!0)=>{var y;if(this.contextMenuNode&&(this.contextMenuDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),f){if(this.selectedNodes.length>0)for(const b of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(b);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(f),this.focusedDecoration.addTarget(f),this._focusedNode=f,this._selectedNodes=[f],c&&((y=this.treeModel)===null||y===void 0||y.dispatchChange())}},this.activeNodeActivedDecoration=f=>{var c;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(f),this._contextMenuNode=f,(c=this.treeModel)===null||c===void 0||c.dispatchChange()},this.enactiveNodeDecoration=()=>{var f;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(f=this.treeModel)===null||f===void 0||f.dispatchChange()},this.handleContextMenu=(f,c)=>{var y;if(f.stopPropagation(),f.preventDefault(),!c||c instanceof _.DebugScope){this.enactiveNodeDecoration(),this.debugContextKey.contextVariableEvaluateNamePresent.set(!1);return}this._currentVariableInternalContext=c;const{x:b,y:A}=f.nativeEvent;c&&(this.activeNodeActivedDecoration(c),this.debugContextKey.contextDebugProtocolVariableMenu.set(c.variableMenuContext),this.debugContextKey.contextVariableEvaluateNamePresent.set(!!c.evaluateName)),!((y=c.session)===null||y===void 0)&&y.capabilities.supportsReadMemoryRequest&&c.memoryReference!==void 0?this.debugContextKey.contextCanViewMemory.set(!0):this.debugContextKey.contextCanViewMemory.set(!1);const S=this.contextMenuService.createMenu({id:m.MenuId.DebugVariablesContext,contextKeyService:this.debugContextKey.contextKeyScoped}),D=S.getMergedMenuNodes();S.dispose(),this.ctxMenuRenderer.show({anchor:{x:b,y:A},menuNodes:D,args:[c.toDebugProtocolObject()]})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=f=>{this.activeNodeDecoration(f)},this.handleTwistierClick=(f,c)=>{c===p.TreeNodeType.CompositeTreeNode?(this.activeNodeDecoration(f,!1),this.toggleDirectory(f)):this.activeNodeDecoration(f)},this.toggleDirectory=async f=>{f.expanded?f.setCollapsed():await f.setExpanded(!0),this.keepExpandedScopesModel.set(f)},this.listenViewModelChange()}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get treeHandle(){return this._debugVariablesTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._activeTreeModel}get currentVariableInternalContext(){return this._currentVariableInternalContext}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}listenViewModelChange(){this.viewModel.onDidChange(async()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{var f,c;if(this.viewModel&&this.viewModel.currentSession&&!this.viewModel.currentSession.terminated){const y=await this.initTreeModel(this.viewModel.currentSession);this._activeTreeModel=y,await((f=this._activeTreeModel)===null||f===void 0?void 0:f.ensureReady);const b=((c=this._activeTreeModel)===null||c===void 0?void 0:c.root.children)||[];if(b.length>0&&b.every(S=>!S.expanded))for(const S of b)S.getRawScope().expensive===!1&&!S.expanded&&await this.toggleDirectory(S);const A=async S=>{for(const D of S)this.keepExpandedScopesModel.get(D).includes(D.variablesReference)&&(await D.setExpanded(!0),Array.isArray(D.children)&&await A(D.children))};b.forEach(async S=>{Array.isArray(S.children)&&await A(S.children)})}else this._activeTreeModel=void 0,this.keepExpandedScopesModel.clear();this.onDidUpdateTreeModelEmitter.fire(this._activeTreeModel)})})}listenTreeViewChange(){this.dispose(),this.treeModel&&(this.disposableCollection.push(this.treeModel.root.watcher.on(p.TreeNodeEvent.WillResolveChildren,f=>{this.loadingDecoration.addTarget(f)})),this.disposableCollection.push(this.treeModel.root.watcher.on(p.TreeNodeEvent.DidResolveChildren,f=>{this.loadingDecoration.removeTarget(f)})))}async initTreeModel(f){const c=new _.DebugVariableRoot(f);if(c)return this._activeTreeModel=this.injector.get(l.DebugVariablesModel,[c]),this.initDecorations(c),this.listenTreeViewChange(),this._activeTreeModel}initDecorations(f){this._decorations=new p.DecorationsManager(f),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.loadingDecoration),this.decorations.removeDecoration(this.contextMenuDecoration))}handleTreeHandler(f){this._debugVariablesTreeHandle={...f,getModel:()=>this.treeModel}}async copyEvaluateName(f){f&&await this.clipboardService.writeText(f.evaluateName)}async copyValue(f){if(!f)return;const y=await(async()=>{if(f.session&&f.session.capabilities.supportsValueFormattingOptions)try{const{variable:{evaluateName:b}}=f;if(b){const A=await f.session.evaluate(b,"clipboard");if(A)return A.result}return""}catch{return""}else return f.value})();y&&await this.clipboardService.writeText(y)}};t.DebugVariablesModelService=d,d.DEFAULT_TRIGGER_DELAY=200,r.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),r.__metadata("design:type",a.Injector)],d.prototype,"injector",void 0),r.__decorate([(0,a.Autowired)(m.ICtxMenuRenderer),r.__metadata("design:type",m.ICtxMenuRenderer)],d.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,a.Autowired)(m.AbstractContextMenuService),r.__metadata("design:type",m.AbstractContextMenuService)],d.prototype,"contextMenuService",void 0),r.__decorate([(0,a.Autowired)(s.DebugViewModel),r.__metadata("design:type",s.DebugViewModel)],d.prototype,"viewModel",void 0),r.__decorate([(0,a.Autowired)(v.IClipboardService),r.__metadata("design:type",Object)],d.prototype,"clipboardService",void 0),r.__decorate([(0,a.Autowired)(g.DebugContextKey),r.__metadata("design:type",g.DebugContextKey)],d.prototype,"debugContextKey",void 0),t.DebugVariablesModelService=d=n=r.__decorate([(0,a.Injectable)(),r.__metadata("design:paramtypes",[])],d)},86752:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VariablesPanelContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(93899),p=e(43718),v=e(57517),m=e(14951),_=e(2156),s=e(72665),g=e(94170),l=e(23268),h=e(64582),u=e(61752),d=e(32756),E=e(4983),f=e(95033),c=e(30865);let y=class{registerCommands(A){A.registerCommand(h.DEBUG_COMMANDS.SET_VARIABLE_VALUE,{execute:async()=>{var I;this.reporterService.point(h.DEBUG_REPORT_NAME===null||h.DEBUG_REPORT_NAME===void 0?void 0:h.DEBUG_REPORT_NAME.DEBUG_VARIABLES,h.DEBUG_COMMANDS.SET_VARIABLE_VALUE.id);const{currentVariableInternalContext:w}=this.debugVariablesModelService;if(!w)return;const T=await this.quickInputService.open({placeHolder:(0,o.localize)("debugger.menu.setValue.param"),value:w.description.replace(/^\"(.*)\"$/,"$1")});if(T!=null){try{await w.setValue(T)}catch(R){this.messageService.error(R.message)}(I=this.debugVariablesModelService.treeModel)===null||I===void 0||I.dispatchChange()}}}),A.registerCommand(h.DEBUG_COMMANDS.COPY_VARIABLE_VALUE,{execute:async()=>{const{currentVariableInternalContext:I}=this.debugVariablesModelService;this.debugVariablesModelService.copyValue(I)}}),A.registerCommand(h.DEBUG_COMMANDS.COPY_EVALUATE_PATH,{execute:async()=>{const{currentVariableInternalContext:I}=this.debugVariablesModelService;this.debugVariablesModelService.copyEvaluateName(I)}}),A.registerCommand(h.DEBUG_COMMANDS.ADD_TO_WATCH_ID,{execute:async I=>{const{currentVariableInternalContext:w}=this.debugVariablesModelService;if(I instanceof p.URI){const T=this.workbenchEditorService.currentEditor;if(!T?.monacoEditor||!T?.monacoEditor.hasModel())return;const R=T.monacoEditor,M=R.getModel().getValueInRange(R.getSelection());this.debugWatchModelService.addWatchExpression(M);return}else w&&this.debugWatchModelService.addWatchExpression(w.evaluateName)}});const S="ms-vscode.hexeditor",D=`${p.CUSTOM_EDITOR_SCHEME}-hexEditor.hexedit`;A.registerCommand(h.DEBUG_COMMANDS.VIEW_MEMORY_ID,{execute:async I=>{var w;const T=await this.commandService.executeCommand("extension.getDescription",S);if(T&&T.enabled){const R=(w=this.viewModel.currentSession)===null||w===void 0?void 0:w.id,M=I.memoryReference;this.workbenchEditorService.open(p.URI.from({scheme:E.DEBUG_MEMORY_SCHEME,authority:R,path:"/"+encodeURIComponent(M||"")+"/memory.bin"}),{disableNavigate:!0,preview:!0,forceOpenType:{type:v.EditorOpenType.component,componentId:D}})}else this.messageService.warning((0,o.localize)("debug.variables.view.memory.prompt.hexEditor.notInstalled"))}})}async initialize(){this.fileSystem.registerProvider(E.DEBUG_MEMORY_SCHEME,this.debugMemoryFileSystemProvider)}registerResource(A){A.registerResourceProvider({scheme:E.DEBUG_MEMORY_SCHEME,provideResource:async S=>({uri:S,icon:(0,o.getIcon)("hex"),name:S.displayName})})}registerMenus(A){var S;A.registerMenuItem(a.MenuId.DebugVariablesContext,{command:{id:h.DEBUG_COMMANDS.SET_VARIABLE_VALUE.id,label:(0,o.localize)("debugger.menu.setValue")},order:10,when:E.CONTEXT_SET_VARIABLE_SUPPORTED.raw,group:"3_modification"}),A.registerMenuItem(a.MenuId.DebugVariablesContext,{command:{id:h.DEBUG_COMMANDS.COPY_VARIABLE_VALUE.id,label:(0,o.localize)("debugger.menu.copyValue")},order:10,group:"5_cutcopypaste"}),A.registerMenuItem(a.MenuId.DebugVariablesContext,{command:{id:h.DEBUG_COMMANDS.COPY_EVALUATE_PATH.id,label:(0,o.localize)("debugger.menu.copyEvaluatePath")},when:E.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.raw,order:20,group:"5_cutcopypaste"}),A.registerMenuItem(a.MenuId.DebugVariablesContext,{command:{id:h.DEBUG_COMMANDS.ADD_TO_WATCH_ID.id,label:(0,o.localize)("debugger.menu.addToWatchExpressions")},when:E.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.raw,order:100,group:"z_commands"}),A.registerMenuItem(a.MenuId.EditorContext,{command:{id:h.DEBUG_COMMANDS.ADD_TO_WATCH_ID.id,label:(0,o.localize)("debugger.menu.addToWatchExpressions")},when:(S=l.ContextKeyExpr.and(g.EditorContextKeys.hasNonEmptySelection,g.EditorContextKeys.editorTextFocus))===null||S===void 0?void 0:S.keys().reduce((D,I)=>D+" && "+I,E.CONTEXT_IN_DEBUG_MODE.raw),group:"debug",order:1}),A.registerMenuItem(a.MenuId.DebugVariablesContext,{command:{id:h.DEBUG_COMMANDS.VIEW_MEMORY_ID.id,label:(0,o.localize)("debug.variables.view.memory")},iconClass:"",when:`${E.CONTEXT_CAN_VIEW_MEMORY.equalsTo(!0)} && ${E.CONTEXT_IN_DEBUG_MODE.equalsTo(!0)}`,type:"icon"})}};t.VariablesPanelContribution=y,n.__decorate([(0,r.Autowired)(o.IQuickInputService),n.__metadata("design:type",Object)],y.prototype,"quickInputService",void 0),n.__decorate([(0,r.Autowired)(c.DebugVariablesModelService),n.__metadata("design:type",c.DebugVariablesModelService)],y.prototype,"debugVariablesModelService",void 0),n.__decorate([(0,r.Autowired)(f.DebugWatchModelService),n.__metadata("design:type",f.DebugWatchModelService)],y.prototype,"debugWatchModelService",void 0),n.__decorate([(0,r.Autowired)(v.WorkbenchEditorService),n.__metadata("design:type",v.WorkbenchEditorService)],y.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(s.IMessageService),n.__metadata("design:type",Object)],y.prototype,"messageService",void 0),n.__decorate([(0,r.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],y.prototype,"reporterService",void 0),n.__decorate([(0,r.Autowired)(p.CommandService),n.__metadata("design:type",Object)],y.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(d.DebugViewModel),n.__metadata("design:type",d.DebugViewModel)],y.prototype,"viewModel",void 0),n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",_.FileServiceClient)],y.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(u.DebugMemoryFileSystemProvider),n.__metadata("design:type",u.DebugMemoryFileSystemProvider)],y.prototype,"debugMemoryFileSystemProvider",void 0),t.VariablesPanelContribution=y=n.__decorate([(0,o.Domain)(o.ClientAppContribution,v.BrowserEditorContribution,a.MenuContribution,o.CommandContribution)],y)},28875:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_VARIABLE_TREE_NODE_HEIGHT=t.DebugVariableRenderedNode=t.DebugVariableView=t.DEBUG_VARIABLE_TREE_FIELD_NAME=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(97267),p=e(41869),v=e(98650),m=e(30865),_=n.__importDefault(e(57259));t.DEBUG_VARIABLE_TREE_FIELD_NAME="DEBUG_VARIABLE_TREE_FIELD";const s=({viewState:l})=>{const h=(0,p.useInjectable)(m.DebugVariablesModelService),u=o.default.useRef(null),[d,E]=o.default.useState(),f=22,{width:c,height:y}=l;o.default.useEffect(()=>{const M=h.onDidUpdateTreeModel(async O=>{E(O)});return()=>{M.dispose(),h.removeNodeDecoration(),E(void 0)}},[]);const b=M=>{h.handleTreeHandler({...M,hasDirectFocus:()=>u.current===document.activeElement})},A=(M,O,x)=>{M.stopPropagation();const{handleTwistierClick:k}=h;O&&k(O,x)},S=(M,O)=>{const{handleContextMenu:x}=h;x(M,O)},D=M=>{const{handleContextMenu:O}=h;O(M)},I=M=>{const{enactiveNodeDecoration:O}=h;O()},w=M=>{const{enactiveNodeDecoration:O}=h;O()},T=o.default.useCallback(M=>{const O=h.decorations.getDecorations(M.item);return o.default.createElement(t.DebugVariableRenderedNode,{item:M.item,itemType:M.itemType,decorations:O,onClick:A,onTwistierClick:A,onContextMenu:S,defaultLeftPadding:0,leftPadding:8})},[d]),R=()=>d?o.default.createElement(a.RecycleTree,{height:y,width:c,itemHeight:f,onReady:b,model:d,placeholder:()=>o.default.createElement("span",null),overflow:"auto"},T):o.default.createElement("span",null);return o.default.createElement("div",{className:_.default.debug_variables_container,tabIndex:-1,ref:u,onContextMenu:D,onClick:I,onBlur:w,"data-name":t.DEBUG_VARIABLE_TREE_FIELD_NAME},R())};t.DebugVariableView=s;const g=({item:l,decorations:h,defaultLeftPadding:u,leftPadding:d,onClick:E,onTwistierClick:f,onContextMenu:c,itemType:y})=>{const b=(0,p.useDesignStyles)(_.default.expansion_toggle,"expansion_toggle"),A=k=>{E(k,l,a.CompositeTreeNode.is(l)?a.TreeNodeType.CompositeTreeNode:a.TreeNodeType.TreeNode)},S=k=>{k.nativeEvent.which!==0&&(y===a.TreeNodeType.TreeNode||y===a.TreeNodeType.CompositeTreeNode)&&c&&c(k,l,y)},D=`${(u||8)+(l.depth||0)*(d||0)+(v.ExpressionContainer.is(l)?0:18)}px`,I={height:t.DEBUG_VARIABLE_TREE_NODE_HEIGHT,lineHeight:`${t.DEBUG_VARIABLE_TREE_NODE_HEIGHT}px`,paddingLeft:D},w=k=>o.default.createElement("div",{className:(0,r.default)(_.default.debug_variables_node_segment,_.default.debug_variables_node_displayname,_.default.debug_variables_variable,k.description?_.default.name:"")},k.displayName,k.value?":":""),T=k=>{const F=/^true|false$/i,L=/^(['"]).*\1$/,{description:B=""}=k,U=B!=="undefined"?B.replace("function","\u0192 "):"",W=[_.default.debug_variables_variable];return l.variableType==="number"||l.variableType==="boolean"||l.variableType==="string"?W.push(_.default[l.variableType]):isNaN(+U)?F.test(U)?W.push(_.default.boolean):L.test(U)&&W.push(_.default.string):W.push(_.default.number),o.default.createElement("div",{className:(0,r.default)(_.default.debug_variables_node_segment_grow,_.default.debug_variables_node_description,...W)},U)},R=()=>o.default.createElement("div",{className:(0,r.default)(_.default.debug_variables_node_segment,_.default.debug_variables_node_tail)},M()),M=()=>o.default.createElement("div",{className:_.default.debug_variables_node_status},l.badge),O=(k,F)=>{const L=B=>{F(B,k,y)};return h&&h?.classlist.indexOf(_.default.mod_loading)>-1?o.default.createElement("div",{className:(0,r.default)(_.default.debug_variables_node_segment,b)},o.default.createElement(a.Loading,null)):o.default.createElement("div",{onClick:L,className:(0,r.default)(_.default.debug_variables_node_segment,b,(0,p.getIcon)("right"),{[`${_.default.mod_collapsed}`]:!k.expanded})})},x=k=>{if(a.CompositeTreeNode.is(k))return O(k,f)};return o.default.createElement("div",{key:l.id,onClick:A,onContextMenu:S,title:l.description||"",className:(0,r.default)(_.default.debug_variables_node,h?h.classlist:null),style:I,"data-id":l.id},o.default.createElement("div",{className:(0,r.default)(_.default.debug_variables_node_content)},x(l),o.default.createElement("div",{className:_.default.debug_variables_node_overflow_wrap},w(l),T(l)),R()))};t.DebugVariableRenderedNode=g,t.DEBUG_VARIABLE_TREE_NODE_HEIGHT=22},85454:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugWatchModel=void 0;const r=e(85608),o=e(76003),a=e(97267),p=e(41869),v=e(98650);let m=n=class extends a.TreeModel{constructor(s){super(),this.flushDispatchChangeDelayer=new p.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(s)}init(s){this.root=s,this.root.watcher.on(a.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};t.DebugWatchModel=m,m.DEFAULT_FLUSH_DELAY=100,t.DebugWatchModel=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[v.ExpressionContainer])],m)},95033:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugWatchModelService=void 0;const r=e(85608),o=e(76003),a=e(97267),p=e(41869),v=e(93899),m=e(38029),_=e(50755),s=e(98650),g=e(32756),l=e(4983),h=e(26296),u=e(85454),d=r.__importDefault(e(21315)),{Path:E}=p.path;let f=n=class{constructor(){this._changeEventDispatchQueue=[],this.selectedDecoration=new a.Decoration(d.default.mod_selected),this.focusedDecoration=new a.Decoration(d.default.mod_focused),this.contextMenuDecoration=new a.Decoration(d.default.mod_actived),this.loadingDecoration=new a.Decoration(d.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new p.Emitter,this.onDidUpdateTreeModelEmitter=new p.Emitter,this.flushDispatchChangeDelayer=new p.ThrottledDelayer(n.DEFAULT_TRIGGER_DELAY),this.disposableCollection=new p.DisposableCollection,this.loadedDeferred=new p.Deferred,this.activeNodeDecoration=(y,b=!0)=>{var A;if(l.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bind(this.contextKeyService),this.contextMenuNode&&(this.focusedDecoration.removeTarget(this.contextMenuNode),this.selectedDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),y){if(this.selectedNodes.length>0)for(const S of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(S);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(y),this.focusedDecoration.addTarget(y),this._focusedNode=y,this._selectedNodes=[y],b&&((A=this.treeModel)===null||A===void 0||A.dispatchChange())}},this.activeNodeActivedDecoration=y=>{var b;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(y),this._contextMenuNode=y,(b=this.treeModel)===null||b===void 0||b.dispatchChange()},this.enactiveNodeDecoration=()=>{var y;l.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bind(this.contextKeyService).set(!1),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(y=this.treeModel)===null||y===void 0||y.dispatchChange()},this.handleContextMenu=(y,b)=>{var A;y.stopPropagation(),y.preventDefault();const{x:S,y:D}=y.nativeEvent;b?this.activeNodeActivedDecoration(b):this.enactiveNodeDecoration();let I;b?I=b:I=(A=this.treeModel)===null||A===void 0?void 0:A.root,this.watchItemType.set(I instanceof s.DebugWatchNode?"expression":I instanceof s.DebugVariable||I instanceof s.DebugVariableContainer?"variable":void 0);const w=this.contextMenuService.createMenu({id:v.MenuId.DebugWatchContext,contextKeyService:this.contextMenuContextKeyService}),T=w.getMergedMenuNodes();w.dispose(),this.ctxMenuRenderer.show({anchor:{x:S,y:D},menuNodes:T,args:[I]})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=y=>{this.activeNodeDecoration(y)},this.handleTwistierClick=(y,b)=>{if(b===a.TreeNodeType.CompositeTreeNode){if(s.DebugWatchNode.is(y)&&y.available){this.activeNodeDecoration(y,!1),this.toggleDirectory(y);return}else if(y.variablesReference){this.activeNodeDecoration(y,!1),this.toggleDirectory(y);return}}this.activeNodeDecoration(y)},this.toggleDirectory=async y=>{y.expanded?this.treeHandle.collapseNode(y):this.treeHandle.expandNode(y)},this.proxyPrompt=y=>{let b=!1;const A=async S=>{if(!b){if(b=!0,S){if(y instanceof a.NewPromptHandle){const D=y.parent;if(y.addAddonAfter("loading_indicator"),D.session)this.addWatchExpression(S);else{const I=new s.DebugWatchNode(D.session,S,D);this.dispatchWatchEvent(D.path,{type:a.WatchEvent.Added,node:I,id:D.id}),this.debugWatch.addWatchExpression(S)}}else if(y instanceof a.RenamePromptHandle){const D=y.target,I=D.parent;if(y.addAddonAfter("loading_indicator"),I.session)this.debugWatch.renameWatchExpression(D.name,S),this.initTreeModel();else{const w=new E(D.path).dir.join(S).toString();this.dispatchWatchEvent(I.path,{type:a.WatchEvent.Moved,oldPath:D.path,newPath:w}),this.debugWatch.renameWatchExpression(D.name,S)}}}return!0}};y.destroyed||(y.onCommit(A),y.onBlur(A))},this.flushEventQueue=()=>{let y;if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.length===0)return;this._changeEventDispatchQueue.sort((A,S)=>{const D=E.pathDepth(A),I=E.pathDepth(S);return D-I});const b=[this._changeEventDispatchQueue[0]];for(const A of this._changeEventDispatchQueue)b.some(S=>A.indexOf(S)===0)||b.push(A);return y=(0,p.pSeries)(b.map(A=>async()=>{var S,D;const I=(D=(S=this.treeModel)===null||S===void 0?void 0:S.root)===null||D===void 0?void 0:D.watchEvents.get(A);return I&&typeof I.callback=="function"&&await I.callback({type:a.WatchEvent.Changed,path:A}),null})),this._changeEventDispatchQueue=[],y},this.debugWatch=new _.DebugWatch(this.manager,this.reporterService),this.init(),this.watchItemType=l.CONTEXT_WATCH_ITEM_TYPE.bind(this.contextKeyService)}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get contextMenuContextKeyService(){return this._contextMenuContextKeyService||(this._contextMenuContextKeyService=this.contextKeyService.createScoped()),this._contextMenuContextKeyService}get treeHandle(){return this._debugWatchTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._activeTreeModel}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}async save(y=[]){await(await this.storageProvider(p.STORAGE_NAMESPACE.DEBUG)).set(n.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY,y)}async load(){const b=await(await this.storageProvider(p.STORAGE_NAMESPACE.DEBUG)).get(n.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY,[]);await this.debugWatch.updateWatchExpressions(b),this.loadedDeferred.resolve()}async init(){await this.loadedDeferred.promise,this.initTreeModel(),this.listenDebugWatchChange()}listenDebugWatchChange(){this.debugWatch.onDidChange(async()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.initTreeModel()})}),this.debugWatch.onDidVariableChange(async()=>{this.refresh()}),this.debugWatch.onDidExpressionChange(y=>{this.save(y)})}listenTreeViewChange(){this.dispose(),this.treeModel&&(this.disposableCollection.push(this.treeModel.root.watcher.on(a.TreeNodeEvent.WillResolveChildren,y=>{this.loadingDecoration.addTarget(y)})),this.disposableCollection.push(this.treeModel.root.watcher.on(a.TreeNodeEvent.DidResolveChildren,y=>{this.loadingDecoration.removeTarget(y)})))}async initTreeModel(){const y=await this.debugWatch.getRoot();if(y)return this._activeTreeModel=this.injector.get(u.DebugWatchModel,[y]),this.initDecorations(y),this.listenTreeViewChange(),this.onDidUpdateTreeModelEmitter.fire(this._activeTreeModel),this._activeTreeModel}initDecorations(y){this._decorations=new a.DecorationsManager(y),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.contextMenuDecoration),this.decorations.removeDecoration(this.loadingDecoration))}handleTreeHandler(y){this._debugWatchTreeHandle=y}async newDebugWatchNodePrompt(){this.treeModel&&this.proxyPrompt(await this.treeHandle.promptNewTreeNode(this.treeModel.root))}async renameDebugWatchNodePrompt(y){this.treeModel&&this.proxyPrompt(await this.treeHandle.promptRename(y))}removeDebugWatchNode(y){this.debugWatch.removeWatchExpression(y.name),y.session?this.initTreeModel():this.dispatchWatchEvent(y.parent.path,{type:a.WatchEvent.Removed,path:y.path})}async copyValue(y){const b=await y.getClipboardValue();b&&await this.clipboardService.writeText(b)}async clearAllExpression(){this.debugWatch.updateWatchExpressions([]),await this.initTreeModel(),this.save()}addWatchExpression(y){this.debugWatch.addWatchExpression(y),this.initTreeModel()}dispatchWatchEvent(y,b){var A;const S=(A=this.treeModel)===null||A===void 0?void 0:A.root.watchEvents.get(y);S&&S.callback&&S.callback(b)}collapsedAll(){var y;(y=this.treeModel)===null||y===void 0||y.root.collapsedAll()}async refresh(y){if(!y)if(this.treeModel)y=this.treeModel.root;else return;!s.ExpressionContainer.is(y)&&y.parent&&(y=y.parent),this.queueChangeEvent(y.path,()=>{this.onDidRefreshedEmitter.fire()})}queueChangeEvent(y,b){this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new p.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout(async()=>{var A;await this.flushEventQueue(),(A=this.flushEventQueueDeferred)===null||A===void 0||A.resolve(),this.flushEventQueueDeferred=null,b()},n.DEFAULT_REFRESH_DELAY)),this._changeEventDispatchQueue.indexOf(y)===-1&&this._changeEventDispatchQueue.push(y)}};t.DebugWatchModelService=f,f.DEFAULT_REFRESH_DELAY=100,f.DEFAULT_TRIGGER_DELAY=200,f.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY="watchers",r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],f.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(v.ICtxMenuRenderer),r.__metadata("design:type",v.ICtxMenuRenderer)],f.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,o.Autowired)(v.AbstractContextMenuService),r.__metadata("design:type",v.AbstractContextMenuService)],f.prototype,"contextMenuService",void 0),r.__decorate([(0,o.Autowired)(g.DebugViewModel),r.__metadata("design:type",g.DebugViewModel)],f.prototype,"viewModel",void 0),r.__decorate([(0,o.Autowired)(h.IDebugSessionManager),r.__metadata("design:type",m.DebugSessionManager)],f.prototype,"manager",void 0),r.__decorate([(0,o.Autowired)(p.IReporterService),r.__metadata("design:type",Object)],f.prototype,"reporterService",void 0),r.__decorate([(0,o.Autowired)(p.IContextKeyService),r.__metadata("design:type",Object)],f.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(p.StorageProvider),r.__metadata("design:type",Function)],f.prototype,"storageProvider",void 0),r.__decorate([(0,o.Autowired)(p.IClipboardService),r.__metadata("design:type",Object)],f.prototype,"clipboardService",void 0),t.DebugWatchModelService=f=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],f)},14600:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WatchPanelContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(93899),p=e(64582),v=e(98650),m=e(4983),_=e(95033);let s=class{registerCommands(l){l.registerCommand(p.DEBUG_COMMANDS.ADD_WATCHER,{execute:()=>{this.debugWatchModelService.newDebugWatchNodePrompt()}}),l.registerCommand(p.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER,{execute:()=>{this.debugWatchModelService.collapsedAll()}}),l.registerCommand(p.DEBUG_COMMANDS.REMOVE_ALL_WATCHER,{execute:()=>{this.debugWatchModelService.clearAllExpression()}}),l.registerCommand(p.DEBUG_COMMANDS.REMOVE_WATCHER,{execute:h=>{h instanceof v.DebugWatchNode&&this.debugWatchModelService.removeDebugWatchNode(h);const[u]=this.debugWatchModelService.selectedNodes;u instanceof v.DebugWatchNode&&this.debugWatchModelService.removeDebugWatchNode(u)}}),l.registerCommand(p.DEBUG_COMMANDS.EDIT_WATCHER,{execute:h=>{this.debugWatchModelService.renameDebugWatchNodePrompt(h)}}),l.registerCommand(p.DEBUG_COMMANDS.COPY_WATCHER_VALUE,{execute:h=>{this.debugWatchModelService.copyValue(h)}})}registerToolbarItems(l){l.registerItem({id:p.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,command:p.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,iconClass:(0,o.getIcon)("close-all"),viewId:p.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.removeAll")}),l.registerItem({id:p.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER.id,iconClass:(0,o.getIcon)("collapse-all"),command:p.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER.id,viewId:p.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.collapseAll"),when:m.CONTEXT_IN_DEBUG_MODE.raw}),l.registerItem({id:p.DEBUG_COMMANDS.ADD_WATCHER.id,iconClass:(0,o.getIcon)("plus"),command:p.DEBUG_COMMANDS.ADD_WATCHER.id,viewId:p.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.add"),when:m.CONTEXT_IN_DEBUG_MODE.raw})}registerMenus(l){l.registerMenuItem(a.MenuId.DebugWatchContext,{command:{id:p.DEBUG_COMMANDS.ADD_WATCHER.id,label:(0,o.localize)("debug.watch.add")},order:10,group:"3_modification"}),l.registerMenuItem(a.MenuId.DebugWatchContext,{command:{id:p.DEBUG_COMMANDS.EDIT_WATCHER.id,label:(0,o.localize)("debug.watch.edit")},when:m.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression"),order:20,group:"3_modification"}),l.registerMenuItem(a.MenuId.DebugWatchContext,{command:{id:p.DEBUG_COMMANDS.COPY_WATCHER_VALUE.id,label:(0,o.localize)("debug.watch.copyValue")},when:`${m.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression")} || ${m.CONTEXT_WATCH_ITEM_TYPE.equalsTo("variable")} && ${m.CONTEXT_IN_DEBUG_MODE.raw}`,order:30,enabledWhen:m.CONTEXT_IN_DEBUG_MODE.raw,group:"3_modification"}),l.registerMenuItem(a.MenuId.DebugWatchContext,{command:{id:p.DEBUG_COMMANDS.REMOVE_WATCHER.id,label:(0,o.localize)("debug.watch.remove")},when:m.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression"),order:10,group:"z_commands"}),l.registerMenuItem(a.MenuId.DebugWatchContext,{command:{id:p.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,label:(0,o.localize)("debug.watch.removeAll")},order:20,group:"z_commands"})}registerKeybindings(l){l.registerKeybinding({command:p.DEBUG_COMMANDS.REMOVE_WATCHER.id,keybinding:"ctrlcmd+backspace",when:m.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.raw})}onStart(){this.debugWatchModelService.load()}};t.WatchPanelContribution=s,n.__decorate([(0,r.Autowired)(_.DebugWatchModelService),n.__metadata("design:type",_.DebugWatchModelService)],s.prototype,"debugWatchModelService",void 0),t.WatchPanelContribution=s=n.__decorate([(0,o.Domain)(o.ClientAppContribution,a.MenuContribution,o.CommandContribution,o.TabBarToolbarContribution,o.KeybindingContribution)],s)},64611:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_WATCH_TREE_NODE_HEIGHT=t.DebugWatchRenderedNode=t.DebugWatchView=t.DEBUG_WATCH_TREE_FIELD_NAME=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(97267),p=e(41869),v=e(98650),m=e(95033),_=n.__importDefault(e(21315));t.DEBUG_WATCH_TREE_FIELD_NAME="DEBUG_WATCH_TREE_FIELD";const s=({viewState:l})=>{const h=(0,p.useInjectable)(m.DebugWatchModelService),u=22,d=o.default.useRef(null),[E,f]=o.default.useState(),{height:c}=l;o.default.useEffect(()=>y(),[]);const y=()=>{const M=h.treeModel;let O=!0;const x=new p.DisposableCollection;return x.push(p.Disposable.create(()=>{O=!1})),M&&M.ensureReady.then(()=>{O&&f(M)}),x.push(h.onDidUpdateTreeModel(async k=>{k&&await k.ensureReady,O&&f(k)})),()=>{h.removeNodeDecoration(),x.dispose()}},b=M=>{h.handleTreeHandler({...M,getModel:()=>E,hasDirectFocus:()=>d.current===document.activeElement})},A=(M,O,x)=>{M.stopPropagation();const{handleTwistierClick:k}=h;O&&k(O,x)},S=(M,O)=>{const{handleContextMenu:x}=h;x(M,O)},D=M=>{const{handleContextMenu:O}=h;O(M)},I=M=>{const{enactiveNodeDecoration:O}=h;O()},w=M=>{const{enactiveNodeDecoration:O}=h;O()},T=o.default.useCallback(M=>{const O=h.decorations.getDecorations(M.item);return o.default.createElement(t.DebugWatchRenderedNode,{item:M.item,itemType:M.itemType,decorations:O,onClick:A,onTwistierClick:A,onContextMenu:S,defaultLeftPadding:12,leftPadding:8})},[E]),R=()=>E?o.default.createElement(a.RecycleTree,{height:c,itemHeight:u,onReady:b,model:E,placeholder:()=>o.default.createElement("span",null)},T):o.default.createElement("span",null);return o.default.createElement("div",{className:_.default.debug_watch_container,tabIndex:-1,ref:d,onContextMenu:D,onClick:I,onBlur:w,"data-name":t.DEBUG_WATCH_TREE_FIELD_NAME},R())};t.DebugWatchView=s;const g=({item:l,decorations:h,defaultLeftPadding:u,leftPadding:d,onClick:E,onTwistierClick:f,onContextMenu:c,itemType:y})=>{const b=(0,p.useDesignStyles)(_.default.expansion_toggle,"expansion_toggle"),A=y===a.TreeNodeType.RenamePrompt,S=y===a.TreeNodeType.NewPrompt,D=A||S,I=B=>{const U=l.getRawWatch();U&&E(B,l,U.variablesReference>0?a.TreeNodeType.CompositeTreeNode:a.TreeNodeType.TreeNode)},w=B=>{B.nativeEvent.which!==0&&(y===a.TreeNodeType.TreeNode||y===a.TreeNodeType.CompositeTreeNode)&&c&&c(B,l,y)},T={height:t.DEBUG_WATCH_TREE_NODE_HEIGHT,lineHeight:`${t.DEBUG_WATCH_TREE_NODE_HEIGHT}px`,paddingLeft:`${(u||8)+(l.depth||0)*(d||0)}px`},R=B=>D&&B instanceof a.PromptHandle?o.default.createElement("div",{className:(0,r.default)(_.default.debug_watch_node_segment,_.default.debug_watch_node_inputbox)},o.default.createElement("div",{className:(0,r.default)("input-box",_.default.debug_watch_node_prompt_box)},o.default.createElement(B.ProxiedInput,{wrapperStyle:{height:t.DEBUG_WATCH_TREE_NODE_HEIGHT,padding:"0 5px"}}))):o.default.createElement("div",{className:(0,r.default)(_.default.debug_watch_node_segment,_.default.debug_watch_node_displayname,_.default.debug_watch_variable,B.description?_.default.name:"")},B.name,B.description?":":""),M=B=>{const U=/^true|false$/i,W=/^(['"]).*\1$/,j=B.description?B.description.replace("function","\u0192 "):"",Q=[_.default.debug_watch_variable];return D?null:(l.variableType==="number"||l.variableType==="boolean"||l.variableType==="string"?Q.push(_.default[l.variableType]):isNaN(+j)?U.test(j)?Q.push(_.default.boolean):W.test(j)&&Q.push(_.default.string):Q.push(_.default.number),o.default.createElement("div",{className:(0,r.default)(_.default.debug_watch_node_segment_grow,_.default.debug_watch_node_description,...Q)},j))},O=()=>o.default.createElement("div",{className:(0,r.default)(_.default.debug_watch_node_segment,_.default.debug_watch_node_tail)},x()),x=()=>o.default.createElement("div",{className:_.default.debug_watch_node_status},l.badge),k=()=>l.tooltip,F=(B,U)=>{const W=j=>{U(j,B,y)};return h&&h?.classlist.indexOf(_.default.mod_loading)>-1?o.default.createElement("div",{className:(0,r.default)(_.default.debug_watch_node_segment,b)},o.default.createElement(a.Loading,null)):o.default.createElement("div",{onClick:W,className:(0,r.default)(_.default.debug_watch_node_segment,b,(0,p.getIcon)("right"),{[`${_.default.mod_collapsed}`]:!B.expanded})})},L=B=>{if(v.DebugWatchNode.is(B)){if(B.available&&B.variablesReference)return F(B,f)}else if(v.ExpressionContainer.is(B)&&B.variablesReference)return F(B,f)};return o.default.createElement("div",{key:l.id,onClick:I,onContextMenu:w,title:k(),className:(0,r.default)(_.default.debug_watch_node,h?h.classlist:null),style:T,"data-id":l.id},o.default.createElement("div",{className:(0,r.default)(_.default.debug_watch_node_content)},L(l),o.default.createElement("div",{style:{height:t.DEBUG_WATCH_TREE_NODE_HEIGHT},className:D?_.default.debug_watch_node_prompt_wrap:_.default.debug_watch_node_overflow_wrap},R(l),M(l)),O()))};t.DebugWatchRenderedNode=g,t.DEBUG_WATCH_TREE_NODE_HEIGHT=22},46118:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_COMMANDS=void 0;var e;(function(n){n.ADD_WATCHER={id:"debug.watch.add"},n.COLLAPSE_ALL_WATCHER={id:"debug.watch.collapseAll"},n.REMOVE_ALL_WATCHER={id:"debug.watch.removeAll"},n.REMOVE_WATCHER={id:"debug.watch.remove"},n.EDIT_WATCHER={id:"debug.watch.edit"},n.COPY_WATCHER_VALUE={id:"debug.watch.copyValue"},n.REMOVE_ALL_BREAKPOINTS={id:"debug.breakpoints.remove.all"},n.TOGGLE_BREAKPOINTS={id:"debug.breakpoints.toggle"},n.ACTIVE_BREAKPOINTS={id:"debug.breakpoints.active"},n.DEACTIVE_BREAKPOINTS={id:"debug.breakpoints.deactive"},n.START={id:"debug.start"},n.NEXT={id:"debug.next"},n.PREV={id:"debug.prev"},n.OVER={id:"debug.over"},n.STOP={id:"debug.stop"},n.CONTINUE={id:"debug.continue"},n.RESTART={id:"debug.restart"},n.PAUSE={id:"debug.pause"},n.DELETE_BREAKPOINT={id:"debug.delete.breakpoint",label:"%debug.menu.delete.breakpoint%"},n.EDIT_BREAKPOINT={id:"debug.edit.breakpoint",label:"%debug.menu.edit.breakpoint%"},n.DISABLE_BREAKPOINT={id:"debug.disable.breakpoint",label:"%debug.menu.disable.breakpoint%"},n.ENABLE_BREAKPOINT={id:"debug.enable.breakpoint",label:"%debug.menu.enable.breakpoint%"},n.ENABLE_LOGPOINT={id:"debug.enable.logpoint",label:"%debug.menu.enable.logpoint"},n.ADD_BREAKPOINT={id:"debug.add.breakpoint",label:"%debug.menu.add.breakpoint%"},n.ADD_LOGPOINT={id:"debug.add.logpoint",label:"%debug.menu.add.logpoint%"},n.ADD_CONDITIONAL_BREAKPOINT={id:"debug.add.conditional",label:"%debug.menu.add.conditional%"},n.RESTART_FRAME={id:"debug.callstack.restart.frame"},n.COPY_STACK_TRACE={id:"debug.callstack.copy"},n.SET_VARIABLE_VALUE={id:"debug.variables.setValue"},n.COPY_VARIABLE_VALUE={id:"debug.variables.copy"},n.COPY_EVALUATE_PATH={id:"debug.evaluate.copy"},n.ADD_TO_WATCH_ID={id:"debug.addToWatchExpressions"},n.VIEW_MEMORY_ID={id:"debug.variables.view.memory"},n.CLEAR_CONSOLE={id:"debug.console.clear",label:"%debug.console.clear%"},n.COPY_CONSOLE_ITEM={id:"debug.console.copy"},n.COPY_CONSOLE_ALL={id:"debug.console.copyALl"},n.COLLAPSE_ALL_CONSOLE_ITEM={id:"debug.console.collapseAll",label:"%debug.console.collapseAll%"},n.CONSOLE_ENTER_EVALUATE={id:"debug.console.keybing.enter.evaluate"},n.CONSOLE_INPUT_DOWN_ARROW={id:"debug.console.input.down.arrow"},n.CONSOLE_INPUT_UP_ARROW={id:"debug.console.input.up.arrow"},n.CONSOLE_FILTER_FOCUS={id:"debug.console.filter.input.focus"},n.RUN_TO_CURSOR={id:"debug.action.runToCursor",label:"%debug.action.runToCursor%"},n.FORCE_RUN_TO_CURSOR={id:"debug.action.forceRunToCursor",label:"%debug.action.forceRunToCursor%"},n.EXCEPTION_WIDGET_CLOSE={id:"debug.action.closeExceptionWidget"},n.SHOW_ALL_AUTOMATIC_DEBUG_CONFIGURATIONS={id:"debug.showAllAutomaticDebugConfigurations"}})(e||(t.DEBUG_COMMANDS=e={}))},4983:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_DEBUGGERS_AVAILABLE=t.CONTEXT_BREAKPOINTS_EXIST=t.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=t.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=t.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=t.CONTEXT_RESTART_FRAME_SUPPORTED=t.CONTEXT_STEP_BACK_SUPPORTED=t.CONTEXT_FOCUSED_SESSION_IS_ATTACH=t.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=t.CONTEXT_LOADED_SCRIPTS_SUPPORTED=t.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=t.CONTEXT_BREAKPOINT_ACCESS_TYPE=t.CONTEXT_BREAKPOINT_ITEM_TYPE=t.CONTEXT_WATCH_ITEM_TYPE=t.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=t.CONTEXT_CALLSTACK_ITEM_STOPPED=t.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=t.CONTEXT_CALLSTACK_ITEM_TYPE=t.CONTEXT_BREAKPOINT_INPUT_FOCUSED=t.CONTEXT_EXPRESSION_SELECTED=t.CONTEXT_VARIABLES_FOCUSED=t.CONTEXT_WATCH_EXPRESSIONS_EXIST=t.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=t.CONTEXT_BREAKPOINTS_FOCUSED=t.CONTEXT_IN_BREAKPOINT_WIDGET=t.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=t.CONTEXT_IN_DEBUG_CONSOLE=t.CONTEXT_IN_DEBUG_REPL=t.CONTEXT_IN_DEBUG_MODE=t.CONTEXT_DEBUG_UX=t.CONTEXT_DEBUG_UX_KEY=t.CONTEXT_DEBUG_STATE=t.CONTEXT_DEBUG_CONFIGURATION_TYPE=t.CONTEXT_DEBUG_TYPE=t.CONTEXT_DEBUG_TYPE_KEY=t.CONTEXT_IN_DEBUG_MODE_KEY=t.CONTEXT_DEBUG_STOPPED_KEY=t.DEBUG_SCHEME=t.DEBUG_FLOATING_CLICK_WIDGET=t.DEBUG_STACK_ID=t.DEBUG_WELCOME_ID=t.DEBUG_BREAKPOINTS_ID=t.DEBUG_VARIABLES_ID=t.DEBUG_THREAD_ID=t.DEBUG_WATCH_ID=t.DEBUG_MEMORY_SCHEME=t.LAUNCH_VIEW_COMPONENT_ID=t.LAUNCH_VIEW_SCHEME=t.DEBUG_CONTAINER_ID=t.DEBUG_CONSOLE_CONTAINER_ID=void 0,t.CONTEXT_ACTIVE_BREAKPOINTS=t.CONTEXT_CAN_VIEW_MEMORY=t.CONTEXT_MULTI_SESSION_DEBUG=t.CONTEXT_MULTI_SESSION_REPL=t.CONTEXT_EXCEPTION_WIDGET_VISIBLE=t.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=t.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=t.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=t.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=t.CONTEXT_SET_VARIABLE_SUPPORTED=t.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=void 0;const n=e(30144);Object.defineProperty(t,"DEBUG_CONSOLE_CONTAINER_ID",{enumerable:!0,get:function(){return n.DEBUG_CONSOLE_CONTAINER_ID}}),Object.defineProperty(t,"DEBUG_CONTAINER_ID",{enumerable:!0,get:function(){return n.DEBUG_CONTAINER_ID}});const r=e(40191);t.LAUNCH_VIEW_SCHEME="launch_view_scheme",t.LAUNCH_VIEW_COMPONENT_ID="launch-view",t.DEBUG_MEMORY_SCHEME="vscode-debug-memory",t.DEBUG_WATCH_ID="debug-watch",t.DEBUG_THREAD_ID="debug-thread",t.DEBUG_VARIABLES_ID="debug-variable",t.DEBUG_BREAKPOINTS_ID="debug-breakpoints",t.DEBUG_WELCOME_ID="debug-welcome",t.DEBUG_STACK_ID="debug-stack",t.DEBUG_FLOATING_CLICK_WIDGET="debug.overlayWidget.floatingClickWidget",t.DEBUG_SCHEME="debug",t.CONTEXT_DEBUG_STOPPED_KEY="debugStopped",t.CONTEXT_IN_DEBUG_MODE_KEY="inDebugMode",t.CONTEXT_DEBUG_TYPE_KEY="debugType",t.CONTEXT_DEBUG_TYPE=new r.RawContextKey("debugType",void 0),t.CONTEXT_DEBUG_CONFIGURATION_TYPE=new r.RawContextKey("debugConfigurationType",void 0),t.CONTEXT_DEBUG_STATE=new r.RawContextKey("debugState","Inactive"),t.CONTEXT_DEBUG_UX_KEY="debugUx",t.CONTEXT_DEBUG_UX=new r.RawContextKey(t.CONTEXT_DEBUG_UX_KEY,"default"),t.CONTEXT_IN_DEBUG_MODE=new r.RawContextKey("inDebugMode",!1),t.CONTEXT_IN_DEBUG_REPL=new r.RawContextKey("inDebugRepl",!1),t.CONTEXT_IN_DEBUG_CONSOLE=new r.RawContextKey("inDebugConsole",!1),t.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=new r.RawContextKey("breakpointWidgetVisible",!1),t.CONTEXT_IN_BREAKPOINT_WIDGET=new r.RawContextKey("inBreakpointWidget",!1),t.CONTEXT_BREAKPOINTS_FOCUSED=new r.RawContextKey("breakpointsFocused",!0),t.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=new r.RawContextKey("watchExpressionsFocused",!0),t.CONTEXT_WATCH_EXPRESSIONS_EXIST=new r.RawContextKey("watchExpressionsExist",!1),t.CONTEXT_VARIABLES_FOCUSED=new r.RawContextKey("variablesFocused",!0),t.CONTEXT_EXPRESSION_SELECTED=new r.RawContextKey("expressionSelected",!1),t.CONTEXT_BREAKPOINT_INPUT_FOCUSED=new r.RawContextKey("breakpointInputFocused",!1),t.CONTEXT_CALLSTACK_ITEM_TYPE=new r.RawContextKey("callStackItemType",void 0),t.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=new r.RawContextKey("callStackSessionIsAttach",!1),t.CONTEXT_CALLSTACK_ITEM_STOPPED=new r.RawContextKey("callStackItemStopped",!1),t.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=new r.RawContextKey("callStackSessionHasOneThread",!1),t.CONTEXT_WATCH_ITEM_TYPE=new r.RawContextKey("watchItemType",void 0),t.CONTEXT_BREAKPOINT_ITEM_TYPE=new r.RawContextKey("breakpointItemType",void 0),t.CONTEXT_BREAKPOINT_ACCESS_TYPE=new r.RawContextKey("breakpointAccessType",void 0),t.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=new r.RawContextKey("breakpointSupportsCondition",!1),t.CONTEXT_LOADED_SCRIPTS_SUPPORTED=new r.RawContextKey("loadedScriptsSupported",!1),t.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=new r.RawContextKey("loadedScriptsItemType",void 0),t.CONTEXT_FOCUSED_SESSION_IS_ATTACH=new r.RawContextKey("focusedSessionIsAttach",!1),t.CONTEXT_STEP_BACK_SUPPORTED=new r.RawContextKey("stepBackSupported",!1),t.CONTEXT_RESTART_FRAME_SUPPORTED=new r.RawContextKey("restartFrameSupported",!1),t.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=new r.RawContextKey("stackFrameSupportsRestart",!1),t.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=new r.RawContextKey("jumpToCursorSupported",!1),t.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=new r.RawContextKey("stepIntoTargetsSupported",!1),t.CONTEXT_BREAKPOINTS_EXIST=new r.RawContextKey("breakpointsExist",!1),t.CONTEXT_DEBUGGERS_AVAILABLE=new r.RawContextKey("debuggersAvailable",!1),t.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=new r.RawContextKey("debugProtocolVariableMenuContext",void 0),t.CONTEXT_SET_VARIABLE_SUPPORTED=new r.RawContextKey("debugSetVariableSupported",!1),t.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=new r.RawContextKey("breakWhenValueChangesSupported",!1),t.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=new r.RawContextKey("breakWhenValueIsAccessedSupported",!1),t.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=new r.RawContextKey("breakWhenValueIsReadSupported",!1),t.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=new r.RawContextKey("variableEvaluateNamePresent",!1),t.CONTEXT_EXCEPTION_WIDGET_VISIBLE=new r.RawContextKey("exceptionWidgetVisible",!1),t.CONTEXT_MULTI_SESSION_REPL=new r.RawContextKey("multiSessionRepl",!1),t.CONTEXT_MULTI_SESSION_DEBUG=new r.RawContextKey("multiSessionDebug",!1),t.CONTEXT_CAN_VIEW_MEMORY=new r.RawContextKey("canViewMemory",void 0),t.CONTEXT_ACTIVE_BREAKPOINTS=new r.RawContextKey("activateBreakpoints",!0)},95581:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},53670:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MASSIVE_PROPERTY_FLAG=t.DEFAULT_CONFIGURATION_INDEX_SEPARATOR=t.DEFAULT_CONFIGURATION_NAME_SEPARATOR=t.DEFAULT_NO_CONFIGURATION_KEY=t.DEFAULT_DYNAMIC_CONFIGURATION_KEY=t.DEFAULT_EDIT_CONFIGURATION_KEY=t.DEFAULT_ADD_CONFIGURATION_KEY=t.DebugConfiguration=void 0;var e;(function(n){function r(o){return!!o&&typeof o=="object"&&"type"in o&&"name"in o&&"request"in o}n.is=r})(e||(t.DebugConfiguration=e={})),t.DEFAULT_ADD_CONFIGURATION_KEY="__ADD_CONF__",t.DEFAULT_EDIT_CONFIGURATION_KEY="__EDIT_CONF__",t.DEFAULT_DYNAMIC_CONFIGURATION_KEY="__DYNAMIC_CONF__",t.DEFAULT_NO_CONFIGURATION_KEY="__NO_CONF__",t.DEFAULT_CONFIGURATION_NAME_SEPARATOR="__CONF__",t.DEFAULT_CONFIGURATION_INDEX_SEPARATOR="__INDEX__",t.MASSIVE_PROPERTY_FLAG="massive_property_flag"},70049:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugConsoleModelService=void 0,t.IDebugConsoleModelService=Symbol("IDebugConsoleModelService")},24395:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugEditor=void 0,t.DebugEditor=Symbol("DebugEditor")},91797:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFrameDeemphasized=e;function e(n){var r,o;const a=(r=n.presentationHint)!==null&&r!==void 0?r:(o=n.source)===null||o===void 0?void 0:o.presentationHint;return a==="deemphasize"||a==="subtle"}},2242:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},32385:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugModelManager=t.DebugModelSupportedEventType=t.MemoryRegion=t.IDebugModel=t.DebugModelFactory=t.DebugAdapterContribution=t.DebugAdapterFactory=t.DebugAdapterSessionFactory=t.DebugAdapterSession=void 0;const n=e(43718);t.DebugAdapterSession=Symbol("DebugAdapterSession"),t.DebugAdapterSessionFactory=Symbol("DebugAdapterSessionFactory"),t.DebugAdapterFactory=Symbol("DebugAdapterFactory"),t.DebugAdapterContribution=Symbol("DebugAdapterContribution"),t.DebugModelFactory=Symbol("DebugModelFactory"),t.IDebugModel=Symbol("IDebugModel");class r extends n.Disposable{constructor(p,v){super(),this.memoryReference=p,this.session=v,this.invalidateEmitter=this.registerDispose(new n.Emitter),this.onDidInvalidate=this.invalidateEmitter.event,this.writable=!!this.session.capabilities.supportsWriteMemoryRequest,this.registerDispose(v.onDidInvalidateMemory(m=>{m.body.memoryReference===p&&this.invalidate(m.body.offset,m.body.count-m.body.offset)}))}async read(p,v){var m;const _=v-p,s=p,g=await this.session.readMemory(this.memoryReference,s,_);if(g===void 0||!(!((m=g.body)===null||m===void 0)&&m.data))return[{type:1,offset:s,length:_}];let l;try{l=(0,n.decodeBase64)(g.body.data)}catch(d){return[{type:2,offset:s,length:_,error:d.message}]}const h=g.body.unreadableBytes||0,u=_-h;if(l.byteLength<u){const d=n.BinaryBuffer.alloc(u-l.byteLength);d.buffer.fill(0),l=n.BinaryBuffer.concat([l,d],u)}else l.byteLength>u&&(l=l.slice(0,u));return h?[{type:0,offset:s,length:u,data:l},{type:1,offset:s+u,length:h}]:[{type:0,offset:s,length:_,data:l}]}async write(p,v){var m,_;const s=await this.session.writeMemory(this.memoryReference,p,(0,n.encodeBase64)(v),!0),g=(_=(m=s?.body)===null||m===void 0?void 0:m.bytesWritten)!==null&&_!==void 0?_:v.byteLength;return this.invalidate(p,p+g),g}dispose(){super.dispose()}invalidate(p,v){this.invalidateEmitter.fire({fromOffset:p,toOffset:v})}}t.MemoryRegion=r;var o;(function(a){a.down="Down",a.move="Move",a.leave="Leave",a.contextMenu="contextMenu"})(o||(t.DebugModelSupportedEventType=o={})),t.IDebugModelManager=Symbol("DebugModelManager")},79845:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugProgress=void 0,t.IDebugProgress=Symbol("DebugProgress")},60709:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSON_SCHEMA_TYPE=t.launchDefaultSchemaUri=t.launchExtensionSchemaUri=t.launchSchemaUri=void 0,t.launchSchemaUri="vscode://schemas/launch",t.launchExtensionSchemaUri="vscode://schemas/launch/extension",t.launchDefaultSchemaUri="vscode://schemas/launch/user";var e;(function(n){n.ARRAY="array",n.BOOLEAN="boolean",n.NULL="null",n.NUMBER="number",n.OBJECT="object",n.STRING="string"})(e||(t.JSON_SCHEMA_TYPE=e={}))},70159:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILaunchService=t.IDebugService=t.IDebugServer=t.DebugAdapterPath=t.DebugConfigurationProviderTriggerKind=void 0;var e;(function(n){n[n.Initial=1]="Initial",n[n.Dynamic=2]="Dynamic"})(e||(t.DebugConfigurationProviderTriggerKind=e={})),t.DebugAdapterPath="DebugAdaptor",t.IDebugServer=Symbol("DebugServer"),t.IDebugService=Symbol("DebugService"),t.ILaunchService=Symbol("ILaunchService")},50883:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugSessionDTO=void 0;var e;(function(n){function r(o){return"id"in o}n.is=r})(e||(t.IDebugSessionDTO=e={}))},26296:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugSessionManager=t.IDebugSession=t.DebugState=void 0,t.getSequenceId=r;var e;(function(o){o[o.Inactive=0]="Inactive",o[o.Initializing=1]="Initializing",o[o.Running=2]="Running",o[o.Stopped=3]="Stopped"})(e||(t.DebugState=e={})),t.IDebugSession=Symbol("DebugSession"),t.IDebugSessionManager=Symbol("DebugSessionManager");let n=1;function r(){return n++}},64582:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(53670),t),n.__exportStar(e(70159),t),n.__exportStar(e(2242),t),n.__exportStar(e(95581),t),n.__exportStar(e(32385),t),n.__exportStar(e(26296),t),n.__exportStar(e(70049),t),n.__exportStar(e(50883),t),n.__exportStar(e(24395),t),n.__exportStar(e(79845),t),n.__exportStar(e(60709),t),n.__exportStar(e(7428),t),n.__exportStar(e(37723),t),n.__exportStar(e(4983),t),n.__exportStar(e(71120),t),n.__exportStar(e(46118),t)},7428:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},71120:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWindowsDriveLetter=r,t.hasDriveLetter=o,t.getDriveLetter=a,t.prepareCommand=p;const n=e(43718);function r(v){return v>=65&&v<=90||v>=97&&v<=122}function o(v,m=n.isWindows){return m?r(v.charCodeAt(0))&&v.charCodeAt(1)===58:!1}function a(v){return o(v)?v[0]:void 0}function p(v,m,_,s,g){v=v.trim().toLowerCase();let l;v.indexOf("powershell")>=0||v.indexOf("pwsh")>=0?l=1:v.indexOf("cmd.exe")>=0?l=0:v.indexOf("bash")>=0?l=2:n.isWindows?l=0:l=2;let h,u=" ";switch(l){case 1:if(h=d=>(d=d.replace(/'/g,"''"),d.length>0&&d.charAt(d.length-1)==="\\"?`'${d}\\'`:`'${d}'`),s){const d=a(s);d&&(u+=`${d}:; `),u+=`cd ${h(s)}; `}if(g)for(const d in g){const E=g[d];E===null?u+=`Remove-Item env:${d}; `:u+=`\${env:${d}}='${E}'; `}if(m.length>0){const d=m.shift(),E=_?d:h(d);u+=E[0]==="'"?`& ${E} `:`${E} `;for(const f of m)u+=f==="<"||f===">"||_?f:h(f),u+=" "}break;case 0:if(h=d=>(d=d.replace(/"/g,'""'),d=d.replace(/([><!^&|])/g,"^$1"),' "'.split("").some(E=>d.includes(E))||d.length===0?`"${d}"`:d),s){const d=a(s);d&&(u+=`${d}: && `),u+=`cd ${h(s)} && `}if(g){u+='cmd /C "';for(const d in g){let E=g[d];E===null?u+=`set "${d}=" && `:(E=E.replace(/[&^|<>]/g,f=>`^${f}`),u+=`set "${d}=${E}" && `)}}for(const d of m)u+=d==="<"||d===">"||_?d:h(d),u+=" ";g&&(u+='"');break;case 2:{h=E=>(E=E.replace(/(["'\\$!><#()[\]*&^| ;{}`])/g,"\\$1"),E.length===0?'""':E);const d=E=>/[^\w@%/+=,.:^-]/.test(E)?`'${E.replace(/'/g,"'\\''")}'`:E;if(s&&(u+=`cd ${h(s)} ; `),g){u+="/usr/bin/env";for(const E in g){const f=g[E];f===null?u+=` -u ${d(E)}`:u+=` ${d(`${E}=${f}`)}`}u+=" "}for(const E of m)u+=E==="<"||E===">"||_?E:h(E),u+=" ";break}}return u}},37723:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConfigurationsReadyEvent=t.DEBUG_REPORT_NAME=void 0;const n=e(43718);var r;(function(a){a.DEBUG_SESSION_START_TIME="debugSessionStartTime",a.DEBUG_PRE_LAUNCH_TASK_TIME="debugPreLaunchTaskTime",a.DEBUG_TOOLBAR_OPERATION_TIME="debugToolBarOperationTime",a.DEBUG_TOOLBAR_OPERATION="debugToolBarOperation",a.DEBUG_PANEL_OPERATION_FOLDEXPR="debugPanelOperationFoldexpr",a.DEBUG_WATCH="debugWatch",a.DEBUG_VARIABLES="debugVariables",a.DEBUG_BREAKPOINT="debugBreakpoint",a.DEBUG_ADAPTER_PROTOCOL_TIME="debugAdapterProtocolTime",a.DEBUG_STOPPED="debugStopped",a.DEBUG_UI_FRONTEND_TIME="debugFrontEndTime"})(r||(t.DEBUG_REPORT_NAME=r={}));class o extends n.BasicEvent{}t.DebugConfigurationsReadyEvent=o},66482:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(64582),t)},83670:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDecorationsService=void 0;const n=e(85608),r=e(76003),o=e(43718),{isFalsyOrWhitespace:a}=o.strings,{asArray:p}=o.arrays;class v{constructor(){this._data=o.TernarySearchTree.forPaths()}affectsResource(u){return this._data.get(u.toString())||this._data.findSuperstr(u.toString())!==void 0}static debouncer(u,d){if(u||(u=new v),Array.isArray(d))for(const E of d)u._data.set(E.toString(),!0);else u._data.set(d.toString(),!0);return u}}class m{constructor(u,d){this.source=u,this.thenable=d}}class _{constructor(u,d,E){this._provider=u,this._uriEmitter=d,this._flushEmitter=E,this.data=o.TernarySearchTree.forPaths(),this._dispoable=this._provider.onDidChange(f=>{if(!f)this.data.clear(),this._flushEmitter.fire({affectsResource(){return!0}});else for(const c of f)this._fetchData(c)})}dispose(){this._dispoable.dispose(),this.data.clear()}knowsAbout(u){return!!this.data.get(u.toString())||!!this.data.findSuperstr(u.toString())}getOrRetrieve(u,d,E){const f=u.toString();let c=this.data.get(f);if(c===void 0&&(c=this._fetchData(u)),c&&!(c instanceof m)&&E(c,!1),d){const y=this.data.findSuperstr(f);if(y)for(let b=y.next();!b.done;b=y.next())b.value&&!(b.value instanceof m)&&E(b.value,!0)}}_fetchData(u){const d=this.data.get(u.toString());d instanceof m&&(d.source.cancel(),this.data.delete(u.toString()));const E=new o.CancellationTokenSource,f=this._provider.provideDecorations(u,E.token);if((0,o.isThenable)(f)){const c=new m(E,Promise.resolve(f).then(y=>{this.data.get(u.toString())===c&&this._keepItem(u,y)}).catch(y=>{!(0,o.isPromiseCanceledError)(y)&&this.data.get(u.toString())===c&&this.data.delete(u.toString())}));return this.data.set(u.toString(),c),null}else return this._keepItem(u,f)}_keepItem(u,d){const E=d||null,f=this.data.set(u.toString(),E);return(E||f)&&this._uriEmitter.fire(u),E}}function s(h){return p(h).map(({color:d,letter:E})=>`${d}/${E}`).join(",")}function g(h){const u=p(h);if(u.length)return{key:s(h),color:u[0].color,badge:u.filter(d=>!a(d.letter)).map(d=>d.letter).join(","),tooltip:u.filter(d=>!a(d.tooltip)).map(d=>d.tooltip).join(" \u2022 ")}}let l=class extends o.Disposable{constructor(){super(...arguments),this.logger=(0,o.getDebugLogger)(),this._data=new o.LinkedList,this._onDidChangeDecorationsDelayed=new o.Emitter,this._onDidChangeDecorations=new o.Emitter,this.onDidChangeDecorations=o.Event.any(this._onDidChangeDecorations.event,o.Event.debounce(this._onDidChangeDecorationsDelayed.event,v.debouncer,void 0,void 0,500))}dispose(){(0,o.dispose)(this._onDidChangeDecorations),(0,o.dispose)(this._onDidChangeDecorationsDelayed)}registerDecorationsProvider(u){this.logger.log("DecorationService#registerDecorationsProvider",u);const d=new _(u,this._onDidChangeDecorationsDelayed,this._onDidChangeDecorations),E=this._data.push(d);return this._onDidChangeDecorations.fire({affectsResource(){return!0}}),(0,o.toDisposable)(()=>{E(),this._onDidChangeDecorations.fire({affectsResource:f=>d.knowsAbout(f)}),d.dispose()})}getDecoration(u,d){const E=[];let f=!1;for(let c=this._data.iterator(),y=c.next();!y.done;y=c.next())y.value.getOrRetrieve(u,d,(b,A)=>{(!A||b.bubble)&&(E.push(b),f=A||f)});if(E.length!==0)return this.asDecoration(E,f)}asDecoration(u,d){u.sort((f,c)=>(c.weight||0)-(f.weight||0));const E=g(u);return E&&d&&(E.badge="\u2022",E.tooltip=(0,o.localize)("bubbleTitle","Contains emphasized items")),E}};t.FileDecorationsService=l,t.FileDecorationsService=l=n.__decorate([(0,r.Injectable)()],l)},4958:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationModule=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(93364),p=e(83670);let v=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:a.IDecorationsService,useClass:p.FileDecorationsService}]}};t.DecorationModule=v,t.DecorationModule=v=n.__decorate([(0,r.Injectable)()],v)},93364:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationsService=void 0;const n=e(43718);class r extends n.Disposable{}t.IDecorationsService=r},87323:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(93364),t)},41893:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(87323),t)},67988:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignCoreContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(1149),p=e(43718),v=e(14951),m=e(2156),_=e(11090),s=e(37517);let g=class{initialize(){this.fileSystem.registerProvider(p.Schemes.design,this.designThemeFileSystemProvider),this.layoutViewSize.setEditorTabsHeight(36,a.ConfigPriority.ModuleDefined),this.layoutViewSize.setStatusBarHeight(36,a.ConfigPriority.ModuleDefined),this.layoutViewSize.setAccordionHeaderSizeHeight(36,a.ConfigPriority.ModuleDefined)}registerRenderer(h){h.registerSlotRenderer(o.SlotLocation.left,_.DesignLeftTabRenderer),h.registerSlotRenderer(o.SlotLocation.bottom,_.DesignBottomTabRenderer),h.registerSlotRenderer(o.SlotLocation.right,_.DesignRightTabRenderer)}};t.DesignCoreContribution=g,n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",m.FileServiceClient)],g.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.DesignThemeFileSystemProvider)],g.prototype,"designThemeFileSystemProvider",void 0),n.__decorate([(0,r.Autowired)(a.LayoutViewSizeConfig),n.__metadata("design:type",a.LayoutViewSizeConfig)],g.prototype,"layoutViewSize",void 0),t.DesignCoreContribution=g=n.__decorate([(0,r.Injectable)(),(0,o.Domain)(o.ClientAppContribution,o.SlotRendererContribution)],g)},17242:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignModule=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(71707),p=e(80832),v=e(97222),m=e(43718),_=e(57517),s=e(52416),g=e(51706),l=e(9132),h=e(67988),u=e(3013),d=e(31385),E=e(72141),f=e(45365),c=n.__importDefault(e(49107)),y=n.__importDefault(e(13925)),b=n.__importDefault(e(63080)),A=e(98741);let S=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[u.DesignMenuBarContribution,h.DesignCoreContribution],this.preferences=I=>{e.e(454).then(e.bind(e,77454)),I.get(p.IDesignStyleService).setStyles(c.default),(0,A.overrideColorToken)(),(0,A.overrideMonacoColorToken)();const T=I.get(m.AppLifeCycleServiceToken);m.Event.once(m.Event.filter(T.onDidLifeCyclePhaseChange,R=>R===3))(()=>{const R=I.get(s.IThemeService);[y.default,b.default].forEach(M=>{R.registerThemes([{id:M.id,label:M.name,path:"",extensionId:M.id,uiTheme:M.base}],o.URI.parse(`${M.id}.json`).withQuery(M.id).withScheme(m.Schemes.design))})}),I.overrideProviders({token:s.IThemeStore,useClass:class extends g.ThemeStore{async getThemeData(R,M){const O=await super.getThemeData(R,M);return document.body.classList.remove(b.default.designThemeType),document.body.classList.remove(y.default.designThemeType),y.default.id===R?.id?document.body.classList.add(y.default.designThemeType):b.default.id===R?.id&&document.body.classList.add(b.default.designThemeType),O}},override:!0,isDefault:!0},{token:s.IThemeService,useClass:class extends l.WorkbenchThemeService{async ensureValidTheme(){return super.ensureValidTheme(y.default.id)}},override:!0,isDefault:!0},{token:_.IEditorTabService,useClass:d.DesignEditorTabService,override:!0,isDefault:!0},{token:a.ISplitPanelService,useClass:f.DesignSplitPanelService,override:!0,isDefault:!0},{token:v.IBrowserCtxMenu,useClass:E.DesignBrowserCtxMenuService})}}};t.DesignModule=S,t.DesignModule=S=n.__decorate([(0,r.Injectable)()],S)},11090:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignRightTabRenderer=t.DesignBottomTabRenderer=t.DesignLeftTabRenderer=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(19951),p=({className:_,components:s,tabbarView:g})=>o.default.createElement(a.LeftTabRenderer,{className:(0,r.default)(_,"design_left_slot"),components:s,tabbarView:g});t.DesignLeftTabRenderer=p;const v=({className:_,components:s})=>o.default.createElement(a.BottomTabRenderer,{className:(0,r.default)(_,"design_bottom_slot"),components:s});t.DesignBottomTabRenderer=v;const m=({className:_,components:s,tabbarView:g,tabpanelView:l})=>o.default.createElement(a.RightTabRenderer,{className:(0,r.default)("design_right_slot",_),components:s,tabbarView:g,tabpanelView:l});t.DesignRightTabRenderer=m},3013:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignMenuBarContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(93899),p=e(64267),v=e(38879),m=e(12458);let _=class extends o.Disposable{constructor(){super(),this.menubarStore.unregisterMenusBarByCompact(a.MenuId.DesignMenuBarTopExtra);let g;this.addDispose(this.menubarStore.onDidMenuBarChange(l=>{g&&g.dispose(),g=this.menuRegistry.registerMenuItems(a.MenuId.DesignMenuBarTopExtra,l.map(h=>{var u;return{label:h.label,submenu:h.id,iconClass:h.iconClass,group:h.group||"1_navigation",order:(u=h.order)!==null&&u!==void 0?u:100}}))}))}registerComponent(g){g.register(v.DESIGN_MENUBAR_CONTAINER_VIEW_ID,{component:m.DesignMenuBarView,id:v.DESIGN_MENUBAR_CONTAINER_VIEW_ID})}};t.DesignMenuBarContribution=_,n.__decorate([(0,r.Autowired)(p.MenubarStore),n.__metadata("design:type",p.MenubarStore)],_.prototype,"menubarStore",void 0),n.__decorate([(0,r.Autowired)(a.IMenuRegistry),n.__metadata("design:type",a.IMenuRegistry)],_.prototype,"menuRegistry",void 0),t.DesignMenuBarContribution=_=n.__decorate([(0,o.Domain)(o.ComponentContribution),n.__metadata("design:paramtypes",[])],_)},12458:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignMenuBarView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(41869),p=e(81878),v=e(89195),m=e(1149),_=e(63373),s=e(93899),g=e(43718),l=e(63067),h=e(55039),u=e(38879),d=n.__importDefault(e(52151)),E=n.__importDefault(e(90946)),f=()=>{const y=(0,a.useInjectable)(s.AbstractContextMenuService),b=(0,a.useInjectable)(m.DesignLayoutConfig),A=(0,a.useInjectable)(s.ICtxMenuRenderer),S=o.useRef(null),[D,I]=o.useState(void 0);o.useEffect(()=>{w()},[]);const w=o.useCallback(O=>{requestAnimationFrame(()=>{if(S.current){const x=S.current.getBoundingClientRect(),{x:k,y:F,width:L,height:B}=x,U={x:k,y:F+B};I(U),O&&O(U)}})},[S.current]),T=o.useMemo(()=>y.createMenu({id:s.MenuId.DesignMenuBarTopExtra}),[y]),R=o.useCallback(()=>{if(!D)return;const O=T.getMergedMenuNodes();T.dispose(),w(x=>{A.show({anchor:x,menuNodes:O})})},[D,T]),M=o.useMemo(()=>b.menubarLogo||d.default,[b.menubarLogo]);return o.createElement(o.Fragment,null,o.createElement(v.EnhanceIcon,{wrapperClassName:E.default.ai_enhance_menu,ref:S,onClick:R},o.createElement("div",{className:E.default.logo_container},o.createElement("img",{className:E.default.extra_top_icon,src:M,alt:""}),o.createElement(p.Icon,{className:(0,r.default)((0,a.getIcon)("down"),E.default.caret_icon)}))))},c=()=>{const y=(0,a.useInjectable)(g.CommandService),b=(0,a.useInjectable)(l.IMainLayoutService),A=(0,a.useInjectable)(a.AINativeConfigService),[S,D]=o.useState(!1);o.useEffect(()=>{requestAnimationFrame(()=>{D(w())});const R=b.getTabbarService(a.SlotLocation.left).onCurrentChange(({previousId:M,currentId:O})=>{M&&!O?D(!1):!M&&O&&D(!0)});return()=>{R.dispose()}},[]);const I=o.useCallback(()=>{y.executeCommand("main-layout.left-panel.toggle"),requestAnimationFrame(()=>{D(w())})},[]),w=o.useCallback(()=>!!b.getTabbarService(a.SlotLocation.left).currentContainerId.get(),[b]);return o.createElement("div",{id:_.VIEW_CONTAINERS.MENUBAR,className:E.default.menu_bar_view,style:{height:A.layoutViewSize.menubarHeight}},o.createElement("div",{className:E.default.container},o.createElement("div",{className:E.default.left},o.createElement(v.EnhanceIcon,{wrapperClassName:E.default.enhance_menu,icon:S?"left-nav-open":"left-nav-close",onClick:I}),o.createElement("span",{className:E.default.dividing}),o.createElement("div",{className:E.default.top_menus_bar},o.createElement(f,null)),o.createElement(a.SlotRenderer,{id:"design-menubar-left",slot:u.DESIGN_MENU_BAR_LEFT,flex:1})),o.createElement("div",{className:E.default.right},o.createElement(h.ToolBar,null),o.createElement(a.SlotRenderer,{id:"design-menubar-right",slot:u.DESIGN_MENU_BAR_RIGHT,flex:1}))))};t.DesignMenuBarView=c},31385:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignEditorTabService=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(76003),p=e(81878),v=e(1149),m=e(43718),_=e(30612),s=n.__importDefault(e(49107)),g=h=>{const{children:u}=h,[d,E]=o.default.useState(!1),f=(0,o.useMemo)(()=>"editor-tab-close-"+(0,m.uuid)(6),[]),c=(0,o.useCallback)(()=>{E(!1)},[]),y=(0,o.useMemo)(()=>(0,m.formatLocalize)("editor.closeTab.title",m.isMacintosh?"\u2318W":"Ctrl+W"),[]);return o.default.createElement(p.Popover,{delay:1e3,position:p.PopoverPosition.bottom,id:f,title:y,onClickAction:c,display:d},o.default.createElement("span",{title:""},u))};let l=class extends _.EditorTabService{renderEditorTab(u,d){return o.default.createElement("div",{className:(0,r.default)({[s.default["design-editor_tab_block_container"]]:!0,[s.default.active]:d}),style:{height:this.layoutViewSize.editorTabsHeight}},u)}renderTabCloseComponent(u){return o.default.createElement(g,null,u)}};t.DesignEditorTabService=l,n.__decorate([(0,a.Autowired)(v.LayoutViewSizeConfig),n.__metadata("design:type",v.LayoutViewSizeConfig)],l.prototype,"layoutViewSize",void 0),t.DesignEditorTabService=l=n.__decorate([(0,a.Injectable)()],l)},72141:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignBrowserCtxMenuService=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(76003),p=e(97267),v=e(41869),m=e(31388),_=e(52416),s=n.__importDefault(e(49107)),g=h=>{const u=(0,v.useInjectable)(_.IIconService),{data:d,disabled:E,hasSubmenu:f}=h,c=(0,o.useMemo)(()=>d.checked?o.default.createElement(p.Icon,{icon:"check"}):d.icon?o.default.createElement(p.Icon,{iconClass:d.icon}):null,[d]);return o.default.createElement("div",{className:(0,r.default)(s.default.menuAction__sub_menu_action_container,{[s.default.disabled]:E,[s.default.checked]:d.checked},d.className)},o.default.createElement("div",{className:s.default.icon},c),o.default.createElement("div",{className:s.default.label},d.label?(0,v.transformLabelWithCodicon)(v.strings.mnemonicButtonLabel(d.label,!0),{margin:"0 3px"},u?.fromString.bind(u)):""),o.default.createElement("div",{className:s.default.tip},d.keybinding?o.default.createElement("div",{className:s.default.shortcut},d.keybinding):null,f?o.default.createElement("div",{className:s.default.submenuIcon},o.default.createElement(p.Icon,{icon:"right-arrow"})):null,!d.keybinding&&!f&&d.extraDesc&&o.default.createElement("div",{className:s.default.extraDesc},d.extraDesc)))};let l=class extends m.BrowserCtxMenuService{renderSubMenuTitle(u,d){return o.default.createElement(g,{data:u,...d})}renderMenuItem(u,d){return o.default.createElement(g,{data:u,...d})}};t.DesignBrowserCtxMenuService=l,t.DesignBrowserCtxMenuService=l=n.__decorate([(0,a.Injectable)()],l)},45365:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignSplitPanelService=void 0;const n=e(71707);class r extends n.SplitPanelService{renderSplitPanel(a,p,v){return super.renderSplitPanel(a,p,v)}interceptProps(a){return a}}t.DesignSplitPanelService=r},13925:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={tokenColors:[{scope:["meta.embedded","source.groovy.embedded"],settings:{foreground:"#D4D4D4"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{scope:"header",settings:{foreground:"#000080"}},{scope:"comment",settings:{foreground:"#6A9955"}},{scope:"constant.language",settings:{foreground:"#569cd6"}},{scope:["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],settings:{foreground:"#b5cea8"}},{scope:"constant.regexp",settings:{foreground:"#646695"}},{scope:"entity.name.tag",settings:{foreground:"#569cd6"}},{scope:"entity.name.tag.css",settings:{foreground:"#d7ba7d"}},{scope:"entity.other.attribute-name",settings:{foreground:"#9cdcfe"}},{scope:["entity.other.attribute-name.class.css","entity.other.attribute-name.class.mixin.css","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.pseudo-class.css","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],settings:{foreground:"#d7ba7d"}},{scope:"invalid",settings:{foreground:"#f44747"}},{scope:"markup.underline",settings:{fontStyle:"underline"}},{scope:"markup.bold",settings:{fontStyle:"bold",foreground:"#569cd6"}},{scope:"markup.heading",settings:{fontStyle:"bold",foreground:"#569cd6"}},{scope:"markup.italic",settings:{fontStyle:"italic"}},{scope:"markup.inserted",settings:{foreground:"#b5cea8"}},{scope:"markup.deleted",settings:{foreground:"#ce9178"}},{scope:"markup.changed",settings:{foreground:"#569cd6"}},{scope:"punctuation.definition.quote.begin.markdown",settings:{foreground:"#6A9955"}},{scope:"punctuation.definition.list.begin.markdown",settings:{foreground:"#6796e6"}},{scope:"markup.inline.raw",settings:{foreground:"#ce9178"}},{name:"brackets of XML/HTML tags",scope:"punctuation.definition.tag",settings:{foreground:"#808080"}},{scope:["meta.preprocessor","entity.name.function.preprocessor"],settings:{foreground:"#569cd6"}},{scope:"meta.preprocessor.string",settings:{foreground:"#ce9178"}},{scope:"meta.preprocessor.numeric",settings:{foreground:"#b5cea8"}},{scope:"meta.structure.dictionary.key.python",settings:{foreground:"#9cdcfe"}},{scope:"meta.diff.header",settings:{foreground:"#569cd6"}},{scope:"storage",settings:{foreground:"#569cd6"}},{scope:"storage.type",settings:{foreground:"#569cd6"}},{scope:["storage.modifier","keyword.operator.noexcept"],settings:{foreground:"#569cd6"}},{scope:["string","meta.embedded.assembly"],settings:{foreground:"#ce9178"}},{scope:"string.tag",settings:{foreground:"#ce9178"}},{scope:"string.value",settings:{foreground:"#ce9178"}},{scope:"string.regexp",settings:{foreground:"#d16969"}},{name:"String interpolation",scope:["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],settings:{foreground:"#569cd6"}},{name:"Reset JavaScript string interpolation expression",scope:["meta.template.expression"],settings:{foreground:"#d4d4d4"}},{scope:["support.type.vendored.property-name","support.type.property-name","variable.css","variable.scss","variable.other.less","source.coffee.embedded"],settings:{foreground:"#9cdcfe"}},{scope:"keyword",settings:{foreground:"#569cd6"}},{scope:"keyword.control",settings:{foreground:"#569cd6"}},{scope:"keyword.operator",settings:{foreground:"#d4d4d4"}},{scope:["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],settings:{foreground:"#569cd6"}},{scope:"keyword.other.unit",settings:{foreground:"#b5cea8"}},{scope:["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],settings:{foreground:"#569cd6"}},{scope:"support.function.git-rebase",settings:{foreground:"#9cdcfe"}},{scope:"constant.sha.git-rebase",settings:{foreground:"#b5cea8"}},{name:"coloring of the Java import and package identifiers",scope:["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],settings:{foreground:"#d4d4d4"}},{name:"this.self",scope:"variable.language",settings:{foreground:"#569cd6"}},{name:"Function declarations",scope:["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],settings:{foreground:"#DCDCAA"}},{name:"Types declaration and references",scope:["meta.return-type","support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],settings:{foreground:"#4EC9B0"}},{name:"Types declaration and references, TS grammar specific",scope:["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class"],settings:{foreground:"#4EC9B0"}},{name:"Control flow / Special keywords",scope:["keyword.control","source.cpp keyword.operator.new","keyword.operator.delete","keyword.other.using","keyword.other.operator","entity.name.operator"],settings:{foreground:"#C586C0"}},{name:"Variable and parameter name",scope:["variable","meta.definition.variable.name","support.variable","entity.nam1e.variable","constant.other.placeholder"],settings:{foreground:"#9CDCFE"}},{name:"Constants and enums",scope:["variable.other.constant","variable.other.enummember"],settings:{foreground:"#4FC1FF"}},{name:"Object keys, TS grammar specific",scope:["meta.object-literal.key"],settings:{foreground:"#9CDCFE"}},{name:"CSS property value",scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#CE9178"}},{name:"Regular expression groups",scope:["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],settings:{foreground:"#CE9178"}},{scope:["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],settings:{foreground:"#d16969"}},{scope:["keyword.operator.or.regexp","keyword.control.anchor.regexp"],settings:{foreground:"#DCDCAA"}},{scope:"keyword.operator.quantifier.regexp",settings:{foreground:"#d7ba7d"}},{scope:"constant.character",settings:{foreground:"#569cd6"}},{scope:"constant.character.escape",settings:{foreground:"#d7ba7d"}},{scope:"entity.name.label",settings:{foreground:"#C8C8C8"}}],colors:{"activityBar.activeBorder":"#ffffff1f","activityBar.activeForeground":"#FFFFFF","activityBar.background":"#00000000","activityBar.border":"#252729","activityBar.disableForeground":"#5F656B","activityBar.dropBackground":"#43484D","activityBar.foreground":"#fff","activityBar.inactiveForeground":"#ffffff73","activityBarBadge.background":"#167CDB","activityBarBadge.foreground":"#FFFFFF","badge.background":"#FFFFFF40","badge.foreground":"#D7DBDE","breadcrumb.background":"#222830","breadcrumb.foreground":"#ffffff73","checkbox.background":"#ffffff14","checkbox.border":"#ffffff1f",descriptionForeground:"#868C91","diffEditor.insertedTextBackground":"#12A7A740","editorGroup.border":"#43484D","editorGroup.dropBackground":"#5F656B40","editorGroup.emptyBackground":"#00000000","editorGroupHeader.tabsBackground":"#222830","editorSuggestWidget.selectedBackground":"#1A66AC",errorForeground:"#D21F28",focusBorder:"#ffffff1f",foreground:"#D7DBDE","editorCommentsWidget.unresolvedBorder":"#ffffff","gitDecoration.addedResourceForeground":"#8FD460","gitDecoration.conflictingResourceForeground":"#7F9EF3","gitDecoration.deletedResourceForeground":"#F3956A","gitDecoration.ignoredResourceForeground":"#BBC0C4","gitDecoration.modifiedResourceForeground":"#F3CC62","gitDecoration.submoduleResourceForeground":"#67ABEB","gitDecoration.untrackedResourceForeground":"#58D1C9","icon.foreground":"#D7DBDE","input.background":"#ffffff14","input.foreground":"#d7dbde","input.placeholderForeground":"#ffffff59","inputDropdown.searchMatchForeground":"#3895EB","inputIcon.foreground":"#5F656B","inputValidation.errorBackground":"#321115","inputValidation.errorBorder":"#D21F28","inputValidation.errorForeground":"#D7DBDE","inputValidation.errorText":"#D21F28","inputValidation.warningBackground":"#332510","inputValidation.warningBorder":"#DBA936","inputValidation.warningText":"#DBA936","inputValidation.warningForeground":"#d7dbde","keybinding.background":"#5F656B33","kt.accentForeground":"#FFFFFF","kt.actionbar.disableForeground":"#5F656B","kt.actionbar.foreground":"#D7DBDE","kt.actionbar.selectionBorder":"#1A66AC","kt.actionbar.separatorBackground":"#5F656B40","kt.activityBar.dropUpBackground":"#1F507D","kt.button.disableBackground":"#5F656B40","kt.button.disableBorder":"#5F656B80","kt.button.disableForeground":"#5F656B","kt.checkbox.disableBackground":"#5F656B40","kt.checkbox.disableForeground":"#5F656B","kt.checkbox.hoverBorder":"#167CDB","kt.checkbox.selectionBackground":"#167CDB","kt.checkbox.selectionForeground":"#FFFFFF","kt.dangerButton.background":"#DB4345","kt.dangerButton.clickBackground":"#D21F28","kt.dangerButton.foreground":"#FFFFFF","kt.dangerButton.hoverBackground":"#F37370","kt.dangerGhostButton.border":"#DB4345","kt.dangerGhostButton.clickBorder":"#D21F28","kt.dangerGhostButton.clickForeground":"#D21F28","kt.dangerGhostButton.foreground":"#DB4345","kt.dangerGhostButton.hoverBorder":"#F37370","kt.dangerGhostButton.hoverForeground":"#F37370","kt.defaultButton.background":"#ffffff14","kt.defaultButton.border":"#00000000","kt.defaultButton.clickBackground":"#ffffff14","kt.defaultButton.clickBorder":"#00000000","kt.defaultButton.disableBackground":"#ffffff14","kt.defaultButton.disableBorder":"#00000000","kt.defaultButton.disableForeground":"#ffffff40","kt.defaultButton.foreground":"#D7DBDE","kt.defaultButton.hoverBackground":"#ffffff29","kt.defaultButton.hoverBorder":"#00000000","kt.defaultButton.selectionBackground":"#ffffff29","kt.defaultButton.selectionForeground":"#fff","kt.dirtyDot.foreground":"#868C91","kt.disableForeground":"#5F656B","kt.editorBreadcrumb.borderDown":"#e9e9e914","kt.errorBackground":"#D21F2840","kt.errorIconForeground":"#DB4345","kt.hintBackground":"#5F656B40","kt.hintIconForeground":"#868C91","kt.icon.clickForeground":"#D7DBDE","kt.icon.disableForeground":"#5F656B","kt.icon.foreground":"#ffffff73","kt.icon.hoverBackground":"#ffffff14","kt.icon.hoverForeground":"#D7DBDE","kt.icon.secondaryForeground":"#868C91","kt.infoBackground":"#167CDB40","kt.infoIconForeground":"#3895EB","kt.input.border":"#00000000","kt.input.disableBackground":"#5F656B40","kt.input.disableForeground":"#ffffff40","kt.input.selectionBackground":"#1A66AC","kt.linkButton.clickForeground":"#167CDB","kt.linkButton.disableForeground":"#5F656B","kt.linkButton.foreground":"#3895EB","kt.linkButton.hoverForeground":"#67ABEB","kt.menu.descriptionForeground":"#868C91","kt.menu.disableForeground":"#5F656B","kt.menubar.background":"#00000000","kt.menubar.border":"#252729","kt.menubar.foreground":"#D7DBDE","kt.menubar.separatorBackground":"#5F656B40","kt.modal.background":"#222830","kt.modal.foreground":"#D7DBDE","kt.modal.separatorBackground":"#2C3033","kt.modalErrorIcon.foreground":"#DB4345","kt.modalInfoIcon.foreground":"#3895EB","kt.modalSuccessIcon.foreground":"#64B436","kt.modalWarningIcon.foreground":"#DBA936","kt.panel.secondaryForeground":"#868C91","kt.panelTab.activeBackground":"#151b21","kt.panelTab.activeForeground":"#FFFFFF","kt.panelTab.border":"#ffffff1f","kt.panelTab.inactiveBackground":"#00000000","kt.panelTab.inactiveForeground":"#D7DBDE","kt.panelTitle.background":"#222830","kt.popover.background":"#2b333d","kt.popover.border":"#363940","kt.popover.foreground":"#fffffff2","kt.popover.prominentBackground":"#2C3033","kt.primaryButton.background":"#3c8dff","kt.primaryButton.clickBackground":"#3c8dffa6","kt.primaryButton.foreground":"#fff","kt.primaryButton.hoverBackground":"#3c8dffa6","kt.primaryButton.border":"#00000000","kt.primaryGhostButton.clickBorder":"#3c8dff","kt.primaryGhostButton.clickForeground":"#167CDB","kt.primaryGhostButton.clickBackground":"#00000000","kt.primaryGhostButton.foreground":"#3895EB","kt.primaryGhostButton.border":"#3c8dff","kt.primaryGhostButton.background":"#00000000","kt.secondaryButton.border":"#5F656B","kt.secondaryButton.clickBorder":"#167CDB","kt.secondaryButton.clickForeground":"#167CDB","kt.secondaryButton.foreground":"#D7DBDE","kt.secondaryButton.hoverBorder":"#3895EB","kt.secondaryButton.hoverForeground":"#3895EB","kt.secondaryButton.background":"#00000000","kt.select.background":"#ffffff14","kt.select.border":"#00000000","kt.select.disableBackground":"#5F656B40","kt.select.disableForeground":"#5F656B","kt.select.foreground":"#D7DBDE","kt.select.placeholderForeground":"#5F656B","kt.selectDropdown.background":"#222830","kt.selectDropdown.foreground":"#D7DBDE","kt.selectDropdown.hoverBackground":"#ffffff14","kt.selectDropdown.selectionBackground":"#ffffff14","kt.selectOption.activeBorder":"#167CDB","kt.statusbar.offline.background":"#DB4345","kt.successBackground":"#48A91840","kt.successIconForeground":"#64B436","kt.tab.activeBorder":"#167CDB","kt.tab.activeForeground":"#FFFFFF","kt.tab.borderDown":"#5F656B40","kt.tab.inactiveForeground":"#D7DBDE","kt.tree.activeSelectionBackground":"#1A66AC","kt.tree.activeSelectionForeground":"#FFFFFF","kt.tree.hoverBackground":"#5F656B40","kt.tree.hoverForeground":"#D7DBDE","kt.tree.inactiveSelectionBackground":"#ffffff1f","kt.tree.inactiveSelectionForeground":"#fff","kt.warningBackground":"#D7951340","kt.warningIconForeground":"#DBA936","kt.whiteGhostButton.border":"#FFFFFF","kt.whiteGhostButton.clickBorder":"#FFFFFFA6","kt.whiteGhostButton.clickForeground":"#FFFFFFA6","kt.whiteGhostButton.disableBackground":"#FFFFFF03","kt.whiteGhostButton.disableBorder":"#FFFFFF40","kt.whiteGhostButton.disableForeground":"#FFFFFF40","kt.whiteGhostButton.foreground":"#FFFFFF","list.activeSelectionBackground":"#1A66AC","list.activeSelectionForeground":"#e1e4e8","list.evenItemBackground":"#5F656B14","list.headerBackground":"#5F656B1F","list.hoverBackground":"#5F656B40","menu.background":"#222830d9","menu.foreground":"#D7DBDE","menu.selectionBackground":"#5F656B40","menu.selectionForeground":"#FFFFFF","menu.separatorBackground":"#43484D","menubar.selectionBackground":"#5f656b40","menubar.selectionForeground":"#FFFFFF","message.background":"#222830","message.foreground":"#D7DBDE","messageErrorIcon.foreground":"#DB4345","messageInfoIcon.foreground":"#3895EB","messageSuccessIcon.foreground":"#64B436","messageWarningIcon.foreground":"#DBA936","notifications.background":"#222830","notifications.foreground":"#D7DBDE","notificationsErrorIcon.foreground":"#DB4345","notificationsInfoIcon.foreground":"#3895EB","notificationsWarningIcon.foreground":"#DBA936","panel.background":"#151b21","panel.border":"#43484D","panel.foreground":"#D7DBDE","panel.selectionBackground":"#5F656B40","panel.separatorBackground":"#2C3033","panelMenuBadge.background":"#00000040","panelMenuBar.background":"#2C3033","panelMenuBarBadge.foreground":"#5F656B40","panelTabBarActionIcon.Background":"#868C91","panelTabBarError.foreground":"#DB4345","panelTitle.activeBorder":"#167CDB","panelTitle.activeForeground":"#FFFFFF","panelTitle.hoverForeground":"#FFFFFF","panelTitle.inactiveForeground":"#ffffff73","selectDropdown.descriptionForeground":"#868C91","selectDropdown.teamForeground":"#868C91","sideBar.background":"#00000000","sideBar.border":"#ffffff1f","sideBar.dropBackground":"#43484D","sideBar.dropUpBackground":"#1F507D","sideBarSectionHeader.background":"#00000000","sideBarSectionHeader.foreground":"#ffffffa6","sideBarTitle.foreground":"#FFFFFF","statusBar.background":"#00000000","statusBar.debuggingBackground":"#D77915","statusBar.foreground":"#ffffff73","statusBar.noFolderBackground":"#43484D","statusBarItem.activeBackground":"#FFFFFF40","statusBarItem.hoverBackground":"#FFFFFF03","statusBarItem.remoteBackground":"#3c8dff","statusBarItem.prominentForeground":"#d2d2d2a6","statusBarItem.prominentBackground":"#2a2a2a80","tab.activeBackground":"#151b21","tab.activeForeground":"#FFFFFF","tab.border":"#e9e9e914","tab.inactiveBackground":"#00000000","tab.inactiveForeground":"#ffffff73","tab.hoverBackground":"#00000000","tab.unfocusedActiveBackground":"#202224","tab.unfocusedActiveForeground":"#868C91","tab.unfocusedInactiveForeground":"#868C91","terminal.background":"#151b21","terminal.border":"#252729","terminal.foreground":"#D7DBDE","terminal.offlineBackground":"#D21F2840","terminal.offlineForeground":"#868C91","terminal.offlineLinkForeground":"#3895EB","terminal.selectionBackground":"#5F656B40","tooltip.background":"#35393D","tooltip.foreground":"#D7DBDE","widget.shadow":"#00000099","list.focusOutline":"#00000000","editorInlayHint.parameterBackground":"#00000000","button.background":"#ffffff14","scrollbarSlider.background":"#ffffff14","editor.background":"#181818","quickInput.background":"#222830","list.focusBackground":"#ffffff1f","textLink.foreground":"#3c8dff","editorStickyScroll.background":"#151b21"},semanticHighlighting:!0,semanticTokenColors:{newOperator:"#d4d4d4",stringLiteral:"#ce9178",customLiteral:"#D4D4D4",numberLiteral:"#b5cea8"},encodedTokensColors:[],rules:[],base:"vs-dark",designThemeType:"design-dark",inherit:!0,hasDefaultTokens:!1,id:"opensumi-design-dark-theme",name:"OpenSumi Design Dark+ (default dark)"}},37517:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignThemeFileSystemProvider=void 0;const n=e(85608),r=e(76003),o=e(43718),a=n.__importDefault(e(13925)),p=n.__importDefault(e(63080));let v=class{constructor(){this.capabilities=2048,this.onDidChangeCapabilities=o.Event.None,this.onDidChangeFile=o.Event.None}stat(_){return Promise.resolve({type:o.FileType.File,uri:_.toString(),lastModification:Date.now(),isDirectory:!1})}async readFile(_){const{query:s}=_;return a.default.id===s?this.toBuffer(JSON.stringify(a.default)):this.toBuffer(JSON.stringify(p.default))}toBuffer(_){return o.BinaryBuffer.fromString(_).buffer}readDirectory(){throw new Error("Not allowed")}createDirectory(){throw new Error("Not allowed")}rename(){throw new Error("Not allowed")}delete(){throw new Error("Not allowed")}watch(){throw new Error("Not allowed")}writeFile(){throw new Error("Not allowed")}};t.DesignThemeFileSystemProvider=v,t.DesignThemeFileSystemProvider=v=n.__decorate([(0,r.Injectable)()],v)},63080:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={tokenColors:[{scope:["meta.embedded","source.groovy.embedded"],settings:{foreground:"#000000ff"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{scope:"meta.diff.header",settings:{foreground:"#000080"}},{scope:"comment",settings:{foreground:"#008000"}},{scope:"constant.language",settings:{foreground:"#0000ff"}},{scope:["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],settings:{foreground:"#098658"}},{scope:"constant.regexp",settings:{foreground:"#811f3f"}},{name:"css tags in selectors, xml tags",scope:"entity.name.tag",settings:{foreground:"#800000"}},{scope:"entity.name.selector",settings:{foreground:"#800000"}},{scope:"entity.other.attribute-name",settings:{foreground:"#ff0000"}},{scope:["entity.other.attribute-name.class.css","entity.other.attribute-name.class.mixin.css","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.pseudo-class.css","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],settings:{foreground:"#800000"}},{scope:"invalid",settings:{foreground:"#cd3131"}},{scope:"markup.underline",settings:{fontStyle:"underline"}},{scope:"markup.bold",settings:{fontStyle:"bold",foreground:"#000080"}},{scope:"markup.heading",settings:{fontStyle:"bold",foreground:"#800000"}},{scope:"markup.italic",settings:{fontStyle:"italic"}},{scope:"markup.inserted",settings:{foreground:"#098658"}},{scope:"markup.deleted",settings:{foreground:"#a31515"}},{scope:"markup.changed",settings:{foreground:"#0451a5"}},{scope:["punctuation.definition.quote.begin.markdown","punctuation.definition.list.begin.markdown"],settings:{foreground:"#0451a5"}},{scope:"markup.inline.raw",settings:{foreground:"#800000"}},{name:"brackets of XML/HTML tags",scope:"punctuation.definition.tag",settings:{foreground:"#800000"}},{scope:["meta.preprocessor","entity.name.function.preprocessor"],settings:{foreground:"#0000ff"}},{scope:"meta.preprocessor.string",settings:{foreground:"#a31515"}},{scope:"meta.preprocessor.numeric",settings:{foreground:"#098658"}},{scope:"meta.structure.dictionary.key.python",settings:{foreground:"#0451a5"}},{scope:"storage",settings:{foreground:"#0000ff"}},{scope:"storage.type",settings:{foreground:"#0000ff"}},{scope:["storage.modifier","keyword.operator.noexcept"],settings:{foreground:"#0000ff"}},{scope:["string","meta.embedded.assembly"],settings:{foreground:"#a31515"}},{scope:["string.comment.buffered.block.pug","string.quoted.pug","string.interpolated.pug","string.unquoted.plain.in.yaml","string.unquoted.plain.out.yaml","string.unquoted.block.yaml","string.quoted.single.yaml","string.quoted.double.xml","string.quoted.single.xml","string.unquoted.cdata.xml","string.quoted.double.html","string.quoted.single.html","string.unquoted.html","string.quoted.single.handlebars","string.quoted.double.handlebars"],settings:{foreground:"#0000ff"}},{scope:"string.regexp",settings:{foreground:"#811f3f"}},{name:"String interpolation",scope:["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],settings:{foreground:"#0000ff"}},{name:"Reset JavaScript string interpolation expression",scope:["meta.template.expression"],settings:{foreground:"#000000"}},{scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#0451a5"}},{scope:["support.type.vendored.property-name","support.type.property-name","variable.css","variable.scss","variable.other.less","source.coffee.embedded"],settings:{foreground:"#ff0000"}},{scope:["support.type.property-name.json"],settings:{foreground:"#0451a5"}},{scope:"keyword",settings:{foreground:"#0000ff"}},{scope:"keyword.control",settings:{foreground:"#0000ff"}},{scope:"keyword.operator",settings:{foreground:"#000000"}},{scope:["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],settings:{foreground:"#0000ff"}},{scope:"keyword.other.unit",settings:{foreground:"#098658"}},{scope:["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],settings:{foreground:"#800000"}},{scope:"support.function.git-rebase",settings:{foreground:"#0451a5"}},{scope:"constant.sha.git-rebase",settings:{foreground:"#098658"}},{name:"coloring of the Java import and package identifiers",scope:["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],settings:{foreground:"#000000"}},{name:"this.self",scope:"variable.language",settings:{foreground:"#0000ff"}},{name:"Function declarations",scope:["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],settings:{foreground:"#795E26"}},{name:"Types declaration and references",scope:["meta.return-type","support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],settings:{foreground:"#267f99"}},{name:"Types declaration and references, TS grammar specific",scope:["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class"],settings:{foreground:"#267f99"}},{name:"Control flow / Special keywords",scope:["keyword.control","source.cpp keyword.operator.new","source.cpp keyword.operator.delete","keyword.other.using","keyword.other.operator","entity.name.operator"],settings:{foreground:"#AF00DB"}},{name:"Variable and parameter name",scope:["variable","meta.definition.variable.name","support.variable","entity.name.variable","constant.other.placeholder"],settings:{foreground:"#001080"}},{name:"Constants and enums",scope:["variable.other.constant","variable.other.enummember"],settings:{foreground:"#0070C1"}},{name:"Object keys, TS grammar specific",scope:["meta.object-literal.key"],settings:{foreground:"#001080"}},{name:"CSS property value",scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#0451a5"}},{name:"Regular expression groups",scope:["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],settings:{foreground:"#d16969"}},{scope:["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],settings:{foreground:"#811f3f"}},{scope:"keyword.operator.quantifier.regexp",settings:{foreground:"#000000"}},{scope:["keyword.operator.or.regexp","keyword.control.anchor.regexp"],settings:{foreground:"#EE0000"}},{scope:"constant.character",settings:{foreground:"#0000ff"}},{scope:"constant.character.escape",settings:{foreground:"#EE0000"}},{scope:"entity.name.label",settings:{foreground:"#000000"}}],colors:{"activityBar.activeBorder":"#151b2114","activityBar.activeForeground":"#FFFFFF","activityBar.background":"#00000000","activityBar.border":"#252729","activityBar.disableForeground":"#5F656B","activityBar.dropBackground":"#43484D","activityBar.foreground":"#151b21","activityBar.inactiveForeground":"#151b21a6","activityBarBadge.background":"#3C8DFF","activityBarBadge.foreground":"#FFFFFF","badge.background":"#151b5814","badge.foreground":"#151b21a6","breadcrumb.background":"#fff","breadcrumb.foreground":"#5d646c","checkbox.background":"#fff","checkbox.border":"#151b2129",descriptionForeground:"#151b21a6","diffEditor.insertedTextBackground":"#12A7A740","editorGroup.border":"#151b2133","editorGroup.dropBackground":"#5F656B40","editorGroup.emptyBackground":"#ffffff","editorGroupHeader.tabsBackground":"#DDE8F4","editorSuggestWidget.selectedBackground":"#6eb6fa40",errorForeground:"#D21F28",focusBorder:"#151b2129",foreground:"#151b21d9","editorCommentsWidget.unresolvedBorder":"#4d9ded","gitDecoration.addedResourceForeground":"#52c41a","gitDecoration.modifiedResourceForeground":"#faad14","gitDecoration.deletedResourceForeground":"#fa541c","gitDecoration.untrackedResourceForeground":"#13c2c2","gitDecoration.ignoredResourceForeground":"#666666","gitDecoration.conflictingResourceForeground":"#ff0000","gitDecoration.submoduleResourceForeground":"#1785eb","icon.foreground":"#151b21d9","input.background":"#fff","input.foreground":"#151b21","input.placeholderForeground":"#151b2173","inputDropdown.searchMatchForeground":"#3895EB","inputIcon.foreground":"#5F656B","inputValidation.errorBackground":"#321115","inputValidation.errorBorder":"#D21F28","inputValidation.errorForeground":"#D7DBDE","inputValidation.errorText":"#D21F28","inputValidation.warningBackground":"#fff","inputValidation.warningBorder":"#DBA936","inputValidation.warningText":"#DBA936","inputValidation.warningForeground":"#151b21","keybinding.background":"#5F656B33","kt.accentForeground":"#FFFFFF","kt.actionbar.disableForeground":"#5F656B","kt.actionbar.foreground":"#151b21a6","kt.actionbar.selectionBorder":"#1A66AC","kt.actionbar.separatorBackground":"#5F656B40","kt.activityBar.dropUpBackground":"#1F507D","kt.button.disableBackground":"#151b210a","kt.button.disableBorder":"#151b2114","kt.button.disableForeground":"#151b2159","kt.checkbox.disableBackground":"#5F656B40","kt.checkbox.disableForeground":"#5F656B","kt.checkbox.hoverBorder":"#167CDB","kt.checkbox.selectionBackground":"#167CDB","kt.checkbox.selectionForeground":"#FFFFFF","kt.dangerButton.background":"#DB4345","kt.dangerButton.clickBackground":"#D21F28","kt.dangerButton.foreground":"#FFFFFF","kt.dangerButton.hoverBackground":"#F37370","kt.dangerGhostButton.border":"#DB4345","kt.dangerGhostButton.clickBorder":"#D21F28","kt.dangerGhostButton.clickForeground":"#D21F28","kt.dangerGhostButton.foreground":"#DB4345","kt.dangerGhostButton.hoverBorder":"#F37370","kt.dangerGhostButton.hoverForeground":"#F37370","kt.dirtyDot.foreground":"#868C91","kt.disableForeground":"#5F656B","kt.editorBreadcrumb.borderDown":"#e9e9e914","kt.errorBackground":"#D21F2840","kt.errorIconForeground":"#DB4345","kt.hintBackground":"#5F656B40","kt.hintIconForeground":"#868C91","kt.icon.clickForeground":"#D7DBDE","kt.icon.disableForeground":"#5F656B","kt.icon.foreground":"#151b21a6","kt.icon.hoverBackground":"#151b2114","kt.icon.hoverForeground":"#151b21d9","kt.icon.secondaryForeground":"#868C91","kt.infoBackground":"#167CDB40","kt.infoIconForeground":"#3895EB","kt.input.border":"#151b2129","kt.input.disableBackground":"#151b210a","kt.input.disableForeground":"#151b2159","kt.input.selectionBackground":"#1A66AC","kt.linkButton.clickForeground":"#167CDB","kt.linkButton.disableForeground":"#5F656B","kt.linkButton.foreground":"#3895EB","kt.linkButton.hoverForeground":"#67ABEB","kt.menu.descriptionForeground":"#868C91","kt.menu.disableForeground":"#5F656B","kt.menubar.background":"#00000000","kt.menubar.border":"#252729","kt.menubar.foreground":"#D7DBDE","kt.menubar.separatorBackground":"#5F656B40","kt.modal.background":"#fff","kt.modal.foreground":"#151b21d9","kt.modal.separatorBackground":"#2C3033","kt.modalErrorIcon.foreground":"#DB4345","kt.modalInfoIcon.foreground":"#3895EB","kt.modalSuccessIcon.foreground":"#64B436","kt.modalWarningIcon.foreground":"#DBA936","kt.panel.secondaryForeground":"#151b21a6","kt.panelTab.activeBackground":"#fff","kt.panelTab.activeForeground":"#151b21","kt.panelTab.border":"#151b2114","kt.panelTab.inactiveBackground":"#00000000","kt.panelTab.inactiveForeground":"#151b21d9","kt.panelTitle.background":"#fff","kt.popover.background":"#000000e3","kt.popover.border":"#000000e3","kt.popover.foreground":"#fffffff2","kt.popover.prominentBackground":"#2C3033","kt.defaultButton.background":"#fafafb","kt.defaultButton.border":"#00000000","kt.defaultButton.clickBackground":"#fafafb","kt.defaultButton.clickBorder":"#00000000","kt.defaultButton.disableBackground":"#fff","kt.defaultButton.disableBorder":"#00000000","kt.defaultButton.disableForeground":"#151b2159","kt.defaultButton.foreground":"#000a1aff","kt.defaultButton.hoverBackground":"#F5F5F6","kt.defaultButton.hoverBorder":"#00000000","kt.defaultButton.selectionBackground":"#fff","kt.defaultButton.selectionForeground":"#151b21","kt.primaryButton.background":"#3c8dff","kt.primaryButton.clickBackground":"#3c8dff","kt.primaryButton.foreground":"#fff","kt.primaryButton.hoverBackground":"#5b9fff","kt.primaryButton.border":"#00000000","kt.primaryGhostButton.clickBorder":"#3c8dff","kt.primaryGhostButton.clickForeground":"#167CDB","kt.primaryGhostButton.clickBackground":"#fff","kt.primaryGhostButton.foreground":"#3895EB","kt.primaryGhostButton.border":"#3c8dff","kt.primaryGhostButton.background":"#fff","kt.secondaryButton.border":"#00000026","kt.secondaryButton.clickBorder":"#00000026","kt.secondaryButton.clickForeground":"#151b21","kt.secondaryButton.foreground":"#151b21d9","kt.secondaryButton.background":"#fff","kt.secondaryButton.hoverBorder":"#00000026","kt.secondaryButton.hoverForeground":"#151b21","kt.select.background":"#fff","kt.select.border":"#151b2129","kt.select.disableBackground":"#151b2114","kt.select.disableForeground":"#151b2159","kt.select.foreground":"#151b21","kt.select.placeholderForeground":"#151b2173","kt.selectDropdown.background":"#fff","kt.selectDropdown.foreground":"#151b21","kt.selectDropdown.hoverBackground":"#151b2114","kt.selectDropdown.selectionBackground":"#151b2114","kt.selectDropdown.selectionForeground":"#151b21","kt.selectOption.activeBorder":"#167CDB","kt.statusbar.offline.background":"#DB4345","kt.successBackground":"#48A91840","kt.successIconForeground":"#64B436","kt.tab.activeBorder":"#167CDB","kt.tab.activeForeground":"#151b21","kt.tab.borderDown":"#151b211f","kt.tab.inactiveForeground":"#151b21a6","kt.tree.activeSelectionBackground":"#1A66AC","kt.tree.activeSelectionForeground":"#FFFFFF","kt.tree.hoverBackground":"#151b5814","kt.tree.hoverForeground":"#151b21","kt.tree.inactiveSelectionBackground":"#151b5814","kt.tree.inactiveSelectionForeground":"#151b21","kt.warningBackground":"#D7951340","kt.warningIconForeground":"#DBA936","kt.whiteGhostButton.border":"#FFFFFF","kt.whiteGhostButton.clickBorder":"#FFFFFFA6","kt.whiteGhostButton.clickForeground":"#FFFFFFA6","kt.whiteGhostButton.disableBackground":"#FFFFFF03","kt.whiteGhostButton.disableBorder":"#FFFFFF40","kt.whiteGhostButton.disableForeground":"#FFFFFF40","kt.whiteGhostButton.foreground":"#FFFFFF","list.activeSelectionBackground":"#1A66AC","list.activeSelectionForeground":"#e1e4e8","list.evenItemBackground":"#5F656B14","list.headerBackground":"#5F656B1F","list.hoverBackground":"#151b5814","menu.background":"#FFFFFF","menu.foreground":"#151b21","menu.selectionBackground":"#151b2114","menu.selectionForeground":"#151b21","menu.separatorBackground":"#151b211f","menubar.selectionBackground":"#151b2114","menubar.selectionForeground":"#151b21","message.background":"#151b21d9","message.foreground":"#D7DBDE","messageErrorIcon.foreground":"#DB4345","messageInfoIcon.foreground":"#3895EB","messageSuccessIcon.foreground":"#64B436","messageWarningIcon.foreground":"#DBA936","notifications.background":"#fff","notifications.foreground":"#151b21d9","notificationsErrorIcon.foreground":"#DB4345","notificationsInfoIcon.foreground":"#3895EB","notificationsWarningIcon.foreground":"#DBA936","panel.background":"#fff","panel.border":"#43484D","panel.foreground":"#151b21","panel.selectionBackground":"#5F656B40","panel.separatorBackground":"#2C3033","panelMenuBadge.background":"#00000040","panelMenuBar.background":"#2C3033","panelMenuBarBadge.foreground":"#5F656B40","panelTabBarActionIcon.Background":"#868C91","panelTabBarError.foreground":"#DB4345","panelTitle.activeBorder":"#3c8dff","panelTitle.activeForeground":"#151b21","panelTitle.hoverForeground":"#FFFFFF","panelTitle.inactiveForeground":"#151b21a6","selectDropdown.descriptionForeground":"#868C91","selectDropdown.teamForeground":"#868C91","sideBar.background":"#00000000","sideBar.border":"#151b211f","sideBar.dropBackground":"#43484D","sideBar.dropUpBackground":"#1F507D","sideBarSectionHeader.background":"#00000000","sideBarSectionHeader.foreground":"#151b21d9","sideBarTitle.foreground":"#151b21d9","statusBar.background":"#00000000","statusBar.debuggingBackground":"#D77915","statusBar.foreground":"#151b21a6","statusBar.noFolderBackground":"#43484D","statusBarItem.activeBackground":"#FFFFFF40","statusBarItem.hoverBackground":"#FFFFFF03","statusBarItem.remoteBackground":"#3c8dff","statusBarItem.prominentForeground":"#151b21a6","statusBarItem.prominentBackground":"#f1f1f180","tab.activeBackground":"#ffffff","tab.activeForeground":"#151b21","tab.border":"#e9e9e914","tab.inactiveBackground":"#00000000","tab.inactiveForeground":"#151b21d9","tab.hoverBackground":"#00000000","tab.unfocusedActiveBackground":"#202224","tab.unfocusedActiveForeground":"#868C91","tab.unfocusedInactiveForeground":"#868C91","terminal.background":"#FFFFFF","terminal.border":"#252729","terminal.foreground":"#151b21","terminal.offlineBackground":"#D21F2840","terminal.offlineForeground":"#868C91","terminal.offlineLinkForeground":"#3895EB","terminal.selectionBackground":"#5F656B40","tooltip.background":"#35393D","tooltip.foreground":"#D7DBDE","widget.shadow":"#00000099","list.focusOutline":"#00000000","editorInlayHint.parameterBackground":"#00000000","button.background":"#ffffff14","scrollbarSlider.background":"#151b211f","editor.background":"#F1F2F3","quickInput.background":"#fff","list.focusBackground":"#151b5814","textLink.foreground":"#3c8dff","editorStickyScroll.background":"#fff","multiDiffEditor.background":"#fff","multiDiffEditor.border":"#151b211f","multiDiffEditor.headerBackground":"#fff"},semanticHighlighting:!0,semanticTokenColors:{newOperator:"#d4d4d4",stringLiteral:"#ce9178",customLiteral:"#D4D4D4",numberLiteral:"#b5cea8"},encodedTokensColors:[],rules:[],base:"vs",designThemeType:"design-light",inherit:!0,hasDefaultTokens:!1,id:"opensumi-design-light-theme",name:"OpenSumi Design Light+ (default light)"}},98741:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.overrideMonacoColorToken=t.overrideColorToken=void 0;const n=e(85608),r=e(52416),o=n.__importDefault(e(13925)),a=n.__importDefault(e(63080)),p=()=>{const m=(0,r.getColorRegistry)();m.getColors().forEach(({id:_})=>{if(o.default.colors[_]&&a.default.colors[_]){const s=m.getColor(_);(0,r.registerColor)(_,{dark:o.default.colors[_],light:a.default.colors[_],hcDark:s.defaults.hcDark||null,hcLight:s.defaults.hcLight||null},s.description)}})};t.overrideColorToken=p;const v=()=>{(0,r.registerColor)("vscode.quickInputList.focusBackground",{light:"#151b2114",dark:"#5F656B40",hcDark:null,hcLight:null},"Quick picker background color for the focused item."),(0,r.registerColor)("quickInputList.focusForeground",{dark:"#ffffff",light:"#151b21",hcDark:null,hcLight:null},"Quick picker foreground color for the focused item.")};t.overrideMonacoColorToken=v},66338:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DESIGN_MENU_BAR_LEFT=t.DESIGN_MENU_BAR_RIGHT=t.DESIGN_MENUBAR_CONTAINER_VIEW_ID=void 0,t.DESIGN_MENUBAR_CONTAINER_VIEW_ID="design_menubar",t.DESIGN_MENU_BAR_RIGHT="design_menu_bar_right",t.DESIGN_MENU_BAR_LEFT="design_menu_bar_left"},38879:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(66338),t)},82353:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(38879),t)},30526:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiffEditorPart=t.BaseMonacoEditorWrapper=void 0,t.insertSnippetWithMonacoEditor=g;const n=e(85608),r=e(76003),o=e(43718),a=n.__importStar(e(20868)),p=e(99721),v=e(23418),m=e(84677),_=e(6043),s=e(82196);function g(E,f,c,y){const b=E.getContribution("snippetController2"),A=c.map(S=>new a.Selection(S.startLineNumber,S.startColumn,S.endLineNumber,S.endColumn));E.setSelections(A),E.focus(),b.insert(f,0,0,y.undoStopBefore,y.undoStopAfter)}const{removeUndefined:l}=o.objects;function h(E,f,c){E.updateOptions(f),E.getModel()&&E.getModel().updateOptions(c)}let u=class extends o.WithEventBus{get currentUri(){return this.currentDocumentModel?this.currentDocumentModel.uri:null}getId(){return this.monacoEditor.getId()}getSelections(){return this.monacoEditor.getSelections()||[]}disableSelectionEmitter(){this._disableSelectionEmitter=!0}enableSelectionEmitter(){this._disableSelectionEmitter=!1}constructor(f,c){super(),this.monacoEditor=f,this.type=c,this.onFocus=this.monacoEditor.onDidFocusEditorWidget,this.onBlur=this.monacoEditor.onDidBlurEditorWidget,this._specialEditorOptions={},this._specialModelOptions={},this._editorOptionsFromContribution={},this._disableSelectionEmitter=!1,this.decorationApplier=this.injector.get(m.MonacoEditorDecorationApplier,[this.monacoEditor]),this.addDispose(this.monacoEditor.onDidChangeModel(this.onDidChangeModel.bind(this))),this.addDispose(this.monacoEditor.onDidChangeModelLanguage(()=>{this._doUpdateOptions()})),this.addDispose(this.configurationService.onDidChangeConfiguration(y=>{Array.from(y.affectedKeys.values()).filter(A=>(0,_.isEditorOption)(A)).length>0&&this._doUpdateOptions()}))}async onDidChangeModel(){this._editorOptionsFromContribution={};const f=this.currentUri;f&&Promise.resolve(this.editorFeatureRegistry.runProvideEditorOptionsForUri(f)).then(c=>{!this.currentUri||!f.isEqual(this.currentUri)||c&&Object.keys(c).length>0&&(this._editorOptionsFromContribution=c,(0,o.isEmptyObject)(this._editorOptionsFromContribution)||this._doUpdateOptions())})}getType(){return this.type}updateOptions(f={},c={}){this._specialEditorOptions=l({...this._specialEditorOptions,...f}),this._specialModelOptions=l({...this._specialModelOptions,...c}),this._doUpdateOptions()}_doUpdateOptions(){const{editorOptions:f,modelOptions:c}=this._calculateFinalOptions();h(this.monacoEditor,f,c)}_calculateFinalOptions(){var f;const c=this.currentUri?this.currentUri.toString():void 0,y=this.currentDocumentModel?this.currentDocumentModel.languageId:void 0,b=(0,_.getConvertedMonacoOptions)(this.configurationService,c,y,void 0);let S={...{readOnly:((f=this.currentDocumentModel)===null||f===void 0?void 0:f.readonly)||!1},...b.editorOptions,...this._editorOptionsFromContribution,...this._specialEditorOptions};return this.type!==v.EditorType.CODE&&(S={...S,...b.diffOptions}),{editorOptions:S,modelOptions:{...b.modelOptions,...this._specialModelOptions}}}insertSnippet(f,c,y){g(this.monacoEditor,f,c,y)}applyDecoration(f,c){this.decorationApplier.applyDecoration(f,c)}onSelectionsChanged(f){return this.monacoEditor.onDidChangeCursorSelection(c=>{this._disableSelectionEmitter||f({selections:this.getSelections(),source:c.source})})}onVisibleRangesChanged(f){const c=new o.Disposable,y=this.monacoEditor;return c.addDispose(y.onDidScrollChange(b=>{f(this.monacoEditor.getVisibleRanges())})),c.addDispose(y.onDidLayoutChange(b=>{f(this.monacoEditor.getVisibleRanges())})),c}setSelections(f){return this.monacoEditor.setSelections(f)}setSelection(f){return this.monacoEditor.setSelection(f)}async save(){this.currentDocumentModel&&await this.currentDocumentModel.save()}onConfigurationChanged(f){return this.monacoEditor.onDidChangeConfiguration(y=>{f()})}};t.BaseMonacoEditorWrapper=u,n.__decorate([(0,r.Autowired)(s.IEditorFeatureRegistry),n.__metadata("design:type",Object)],u.prototype,"editorFeatureRegistry",void 0),n.__decorate([(0,r.Autowired)(p.IConfigurationService),n.__metadata("design:type",Object)],u.prototype,"configurationService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],u.prototype,"injector",void 0),t.BaseMonacoEditorWrapper=u=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],u);let d=class extends u{get currentDocumentModel(){return this.getDocumentModel()}constructor(f,c,y){super(f,y),this.getDocumentModel=c}};t.DiffEditorPart=d,t.DiffEditorPart=d=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Function,Object])],d)},87802:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultBreadCrumbProvider=void 0,t.findCurrentDocumentSymbol=h;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),a=e(41869),p=e(26542),v=e(79929),m=e(97408),_=e(82196),s=e(17459),{Path:g}=a.path;let l=class extends a.WithEventBus{constructor(){super(...arguments),this._onDidUpdateBreadCrumb=new a.Emitter,this.onDidUpdateBreadCrumb=this._onDidUpdateBreadCrumb.event,this.debouncedFireUriEvent=new Map,this.cachedBreadCrumb=new a.LRUMap(200,100)}handlesUri(c){return this.fileServiceClient.handlesScheme(c.scheme)}provideBreadCrumbForUri(c,y){return this.getFileParts(c).concat(this.getDocumentSymbolParts(c,y))}getFileParts(c){const y=this.workspaceService.workspace?new a.URI(this.workspaceService.workspace.uri):void 0;let b,A;y&&y.isEqualOrParent(c)?(b=y,A=y.relative(c)):(b=a.URI.from({scheme:c.scheme,authority:c.authority}),A=c.path);let S=b.path;const D=[];for(const I of A.toString().split(g.separator).filter(w=>!!w)){S=S.join(I);const w=b.withPath(S);D.push(this.createFilePartBreadCrumbUri(w,!w.isEqual(c)))}return D}createFilePartBreadCrumbUri(c,y){const b=c.toString();if(this.cachedBreadCrumb.has(b))return this.cachedBreadCrumb.get(b);const A={name:c.path.base,uri:c,icon:this.labelService.getIcon(c,{isDirectory:y}),getSiblings:async()=>{const S=a.URI.from({scheme:c.scheme}).withPath(c.path.dir),D=await this.fileServiceClient.getFileStat(S.toString()),I=[];let w=-1;return D&&D.children&&D.children.length>0&&u(D.children).forEach((T,R)=>{I.push(this.createFilePartBreadCrumbUri(new a.URI(T.uri),T.isDirectory)),w===-1&&c.toString()===T.uri&&(w=R)}),{parts:I,currentIndex:w}}};return y?A.getChildren=async()=>{const S=await this.fileServiceClient.getFileStat(c.toString()),D=[];return S&&S.children&&S.children.length>0&&u(S.children).forEach((I,w)=>{D.push(this.createFilePartBreadCrumbUri(new a.URI(I.uri),I.isDirectory))}),D}:A.onClick=()=>{this.commandService.executeCommand(a.EDITOR_COMMANDS.OPEN_RESOURCE.id,c)},this.cachedBreadCrumb.set(b,A),A}getDocumentSymbolParts(c,y){if(!y)return[];const b=this.documentSymbolStore.getDocumentSymbol(c);if(b&&b.length>0){const A=h(b,y.monacoEditor.getPosition());return A.length>0?A.map(S=>this.createFromDocumentSymbol(S,y)):[{name:"...",getSiblings:()=>({parts:b.sort((S,D)=>E(S.range,D.range)).map(S=>this.createFromDocumentSymbol(S,y)),currentIndex:-1})}]}else return[]}createFromDocumentSymbol(c,y){const b={name:c.name,icon:(0,a.getSymbolIcon)(c.kind),isSymbol:!0,onClick:()=>{y.setSelection({startColumn:c.range.startColumn,endColumn:c.range.startColumn,startLineNumber:c.range.startLineNumber,endLineNumber:c.range.startLineNumber}),y.monacoEditor.revealRangeInCenter(c.range),y.monacoEditor.focus()}};return c.parent&&(b.getSiblings=()=>({parts:c.parent.children.sort((A,S)=>E(A.range,S.range)).map(A=>this.createFromDocumentSymbol(A,y)),currentIndex:c.parent.children.indexOf(c)})),c.children&&c.children.length>0&&(b.getChildren=()=>c.children.sort((A,S)=>E(A.range,S.range)).map(A=>this.createFromDocumentSymbol(A,y))),b}onDocumentSymbolChangedEvent(c){this.notifyUpdate(c.payload)}onEditorSelectionChangeEvent(c){this.notifyUpdate(c.payload.editorUri)}notifyUpdate(c){this.debouncedFireUriEvent.has(c.toString())||this.debouncedFireUriEvent.set(c.toString(),(0,r.default)(()=>{this._onDidUpdateBreadCrumb.fire(c)},100,{maxWait:1e3})),this.debouncedFireUriEvent.get(c.toString())()}};t.DefaultBreadCrumbProvider=l,n.__decorate([(0,o.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],l.prototype,"fileServiceClient",void 0),n.__decorate([(0,o.Autowired)(m.IWorkspaceService),n.__metadata("design:type",Object)],l.prototype,"workspaceService",void 0),n.__decorate([(0,o.Autowired)(p.LabelService),n.__metadata("design:type",p.LabelService)],l.prototype,"labelService",void 0),n.__decorate([(0,o.Autowired)(a.CommandService),n.__metadata("design:type",Object)],l.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",s.DocumentSymbolStore)],l.prototype,"documentSymbolStore",void 0),n.__decorate([(0,a.OnEvent)(s.DocumentSymbolChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.DocumentSymbolChangedEvent]),n.__metadata("design:returntype",void 0)],l.prototype,"onDocumentSymbolChangedEvent",null),n.__decorate([(0,a.OnEvent)(_.EditorSelectionChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.EditorSelectionChangeEvent]),n.__metadata("design:returntype",void 0)],l.prototype,"onEditorSelectionChangeEvent",null),t.DefaultBreadCrumbProvider=l=n.__decorate([(0,o.Injectable)()],l);function h(f,c){const y=[];if(!c)return y;let b=f;for(;b&&b.length>0;){let A=!1;for(const S of b)if(d(c,S.range)){y.push(S),b=S.children,A=!0;break}if(!A)break}return y}function u(f){return f.sort((c,y)=>{if(c.isDirectory&&y.isDirectory||!c.isDirectory&&!y.isDirectory){const b=new a.URI(c.uri).path.name,A=new a.URI(y.uri).path.name;return b.localeCompare(A,"kn",{numeric:!0})}else return c.isDirectory&&!y.isDirectory?-1:!c.isDirectory&&y.isDirectory?1:0})}function d(f,c){return f.lineNumber<c.startLineNumber?!1:f.lineNumber===c.startLineNumber?f.column>=c.startColumn:f.lineNumber<c.endLineNumber?!0:f.lineNumber===c.endLineNumber?f.column<=c.endColumn:!1}function E(f,c){return f.startLineNumber>c.startLineNumber?1:f.startLineNumber<c.startLineNumber?-1:f.startColumn===c.startColumn?0:f.startColumn>c.startColumn?1:-1}},17459:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SymbolTag=t.DocumentSymbolChangedEvent=t.DocumentSymbolStore=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),a=e(41869),p=e(79865),v=e(40540);Object.defineProperty(t,"SymbolTag",{enumerable:!0,get:function(){return v.SymbolTag}});const m=e(23418),_=e(96689);let s=class extends a.WithEventBus{constructor(){super(),this.documentSymbols=new Map,this.pendingUpdate=new Set,this.debounced=new Map,this.symbolDeferred=new Map,this.addDispose(p.languageFeaturesService.documentSymbolProvider.onDidChange(()=>{Array.from(this.documentSymbols.keys()).forEach(d=>{this.markNeedUpdate(new a.URI(d))})}))}getDocumentSymbol(d){return this.documentSymbols.has(d.toString())||(this.documentSymbols.set(d.toString(),void 0),this.createDocumentSymbolCache(d)),this.pendingUpdate.has(d.toString())&&this.updateDocumentSymbolCache(d),this.documentSymbols.get(d.toString())}async getDocumentSymbolAsync(d,E){var f;const c=d.toString();return E&&E.onCancellationRequested(()=>{var y;(y=this.symbolDeferred.get(c))===null||y===void 0||y.resolve(),this.symbolDeferred.delete(c)}),(!this.documentSymbols.has(c)||this.pendingUpdate.has(c))&&!this.symbolDeferred.has(c)&&(this.symbolDeferred.set(c,new a.Deferred),this.updateDocumentSymbolCache(d)),await((f=this.symbolDeferred.get(c))===null||f===void 0?void 0:f.promise),this.documentSymbols.get(c)}async createDocumentSymbolCache(d){this.updateDocumentSymbolCache(d)}async doUpdateDocumentSymbolCache(d){var E,f;this.pendingUpdate.delete(d.toString());const c=await this.editorDocumentModelRegistry.createModelReference(d);if(!c){(E=this.symbolDeferred.get(d.toString()))===null||E===void 0||E.resolve();return}try{const y=p.languageFeaturesService.documentSymbolProvider.all(c.instance.getMonacoModel());let b;for(const A of y)if(b=await A.provideDocumentSymbols(c.instance.getMonacoModel(),new a.CancellationTokenSource().token),b)break;b&&l(b,{children:b},d),this.documentSymbols.set(d.toString(),b),this.eventBus.fire(new g(d))}finally{c.dispose()}(f=this.symbolDeferred.get(d.toString()))===null||f===void 0||f.resolve()}updateDocumentSymbolCache(d){this.debounced.has(d.toString())||this.debounced.set(d.toString(),(0,r.default)(()=>this.doUpdateDocumentSymbolCache(d),100,{maxWait:1e3})),this.debounced.get(d.toString())()}onEditorDocumentModelContentChangedEvent(d){d.payload.changes&&d.payload.changes.length>0&&this.markNeedUpdate(d.payload.uri)}markNeedUpdate(d){this.pendingUpdate.add(d.toString()),this.isWatching(d)&&this.updateDocumentSymbolCache(d)}isWatching(d){for(const E of this.editorService.editorGroups)if(E.currentResource&&E.currentResource.uri.isEqual(d))return!0;return!1}};t.DocumentSymbolStore=s,n.__decorate([(0,o.Autowired)(_.IEditorDocumentModelService),n.__metadata("design:type",Object)],s.prototype,"editorDocumentModelRegistry",void 0),n.__decorate([(0,o.Autowired)(m.WorkbenchEditorService),n.__metadata("design:type",m.WorkbenchEditorService)],s.prototype,"editorService",void 0),n.__decorate([(0,a.OnEvent)(_.EditorDocumentModelContentChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.EditorDocumentModelContentChangedEvent]),n.__metadata("design:returntype",void 0)],s.prototype,"onEditorDocumentModelContentChangedEvent",null),t.DocumentSymbolStore=s=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],s);class g extends a.BasicEvent{}t.DocumentSymbolChangedEvent=g;function l(u,d,E){return u.forEach((f,c)=>{const y=f;y.parent=d,y.id=h(E,y,c),f.children&&f.children.length>0&&l(f.children,f,E)}),u}function h(u,d,E){const f=[d.name];for(;d.parent;){const c=d.parent;if(!c.name)break;f.unshift(c.name),d=c}return`${u.toString()}__${f.join("-")}__${E}`}},88895:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreadCrumbServiceImpl=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(87802),{addElement:p}=o.arrays;let v=class{constructor(){this.providers=[],this._onDidUpdateBreadCrumbResults=new o.Emitter,this.onDidUpdateBreadCrumbResults=this._onDidUpdateBreadCrumbResults.event,this.crumbResults=new Map,this.registerBreadCrumbProvider(this.defaultBreadCrumbProvider)}registerBreadCrumbProvider(g){const l=p(this.providers,g);return g.onDidUpdateBreadCrumb(h=>{this.crumbResults.forEach((u,d)=>{u.has(h.toString())&&this.getBreadCrumbs(h,d)})}),l}getBreadCrumbs(g,l){const h=this.getEditorCrumbResults(l);for(const u of this.providers)if(u.handlesUri(g)){const d=h.get(g.toString()),E=u.provideBreadCrumbForUri(g,l);m(d,E)||(h.set(g.toString(),E),this._onDidUpdateBreadCrumbResults.fire({editor:l,uri:g}));break}return h.get(g.toString())}getEditorCrumbResults(g){return this.crumbResults.has(g)||(this.crumbResults.set(g,new Map),g&&g.monacoEditor.onDidDispose(()=>{this.crumbResults.delete(g)})),this.crumbResults.get(g)}disposeCrumb(g){}};t.BreadCrumbServiceImpl=v,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",a.DefaultBreadCrumbProvider)],v.prototype,"defaultBreadCrumbProvider",void 0),t.BreadCrumbServiceImpl=v=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],v);function m(s,g){if(!s&&!g)return!0;if(!s||!g)return!1;if(s.length!==g.length)return!1;for(let l=0;l<s.length;l++)if(!_(s[l],g[l]))return!1;return!0}function _(s,g){return s.name===g.name}},11673:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorComponentRegistryImpl=void 0;const n=e(85608),r=n.__importDefault(e(46343)),o=n.__importDefault(e(19106)),a=n.__importDefault(e(43144)),p=e(76003),v=e(43718),m=e(82196);let _=class{constructor(){this.components=new Map,this.sideWidgets={bottom:new Set,top:new Set},this.initialPropsMap=new Map,this.resolvers=new Map,this.normalizedResolvers=[],this.perWorkbenchComponents={}}registerEditorComponent(g,l){const h=g.uid;return g.renderMode||(g.renderMode=m.EditorComponentRenderMode.ONE_PER_GROUP),this.components.set(h,g),this.initialPropsMap.set(h,l),this.eventBus.fire(new v.ExtensionActivateEvent({topic:"onRegisterEditorComponent",data:h})),this.eventBus.fire(new m.RegisterEditorComponentEvent(h)),{dispose:()=>{this.components.get(h)===g&&(this.components.delete(h),this.eventBus.fire(new m.EditorComponentDisposeEvent(g)))}}}registerEditorComponentResolver(g,l){let h;return typeof g=="function"?h={handleScheme:g,resolver:l}:h={handleScheme:u=>u===g?10:-1,resolver:l},this.normalizedResolvers.push(h),this.resolvers.clear(),{dispose:()=>{for(const d of this.resolvers.values()){const E=d.indexOf(l);E!==-1&&d.splice(E,1)}const u=this.normalizedResolvers.indexOf(h);u!==-1&&this.normalizedResolvers.splice(u,1)}}}async resolveEditorComponent(g){let l=[];const h=this.getResolvers(g.uri.scheme).slice();let u=!1;const d=E=>{l=E,u=!0};for(const E of h)if(await E(g,l,d),u)break;return l.sort((E,f)=>{const c=E.weight||0;return(f.weight||0)-c}),(0,o.default)(l,r.default)}calculateSchemeResolver(g){const l=this.normalizedResolvers.slice(),h=[];return l.forEach((u,d)=>{const E=u.handleScheme(g);E>=0&&h.push({weight:E,index:d,resolver:u.resolver})}),h.sort((u,d)=>u.weight>d.weight?-1:u.weight<d.weight?1:d.index-u.index).map(u=>u.resolver)}getResolvers(g){return this.resolvers.has(g)||this.resolvers.set(g,this.calculateSchemeResolver(g)),this.resolvers.get(g)}getEditorComponent(g){return this.components.get(g)||null}getEditorInitialProps(g){return this.initialPropsMap.get(g)||null}clearPerWorkbenchComponentCache(g){a.default.unmountComponentAtNode(this.perWorkbenchComponents[g]),delete this.perWorkbenchComponents[g]}getSideWidgets(g,l){const h=[];return this.sideWidgets[g].forEach(u=>{u.displaysOnResource(l)&&h.push(u)}),h.sort((u,d)=>{const E=u.weight===void 0?10:u.weight;return(d.weight===void 0?10:d.weight)-E})}registerEditorSideWidget(g){const l=g.side||"bottom";return this.sideWidgets[l].add(g),this.eventBus.fire(new m.RegisterEditorSideComponentEvent),{dispose:()=>{this.sideWidgets[l].delete(g)}}}};t.EditorComponentRegistryImpl=_,n.__decorate([(0,p.Autowired)(v.IEventBus),n.__metadata("design:type",Object)],_.prototype,"eventBus",void 0),t.EditorComponentRegistryImpl=_=n.__decorate([(0,p.Injectable)()],_)},84677:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoEditorDecorationApplier=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=e(76003),a=e(43718),p=e(52416),v=e(82196);let m=class extends a.Disposable{constructor(u){super(),this.editor=u,this.decorations=new Map,this.applyDecorationFromProvider(),this.editor.onDidChangeModel(()=>{this.clearDecorations(),this.applyDecorationFromProvider()}),this.editor.onDidDispose(()=>{this.dispose()}),this.addDispose(this.eventBus.on(v.EditorDecorationChangeEvent,d=>{const E=this.getEditorUri();E&&d.payload.uri.isEqual(E)&&this.applyDecorationFromProvider(d.payload.key)})),this.addDispose(this.eventBus.on(v.EditorDecorationTypeRemovedEvent,d=>{this.deltaDecoration(d.payload,[])}))}getEditorUri(){return this.editor.getModel()?new a.URI(this.editor.getModel().uri.toString()):null}async applyDecorationFromProvider(u){if(this.editor.getModel()){const d=new a.URI(this.editor.getModel().uri.toString()),E=await this.decorationService.getDecorationFromProvider(d,u);if(!this.editor.getModel()||this.editor.getModel().uri.toString()!==d.toString())return;for(const f of Object.keys(E))this.deltaDecoration(f,E[f]);this.eventBus.fire(new v.DidApplyEditorDecorationFromProvider({key:u,uri:d}))}}dispose(){super.dispose(),this.clearDecorations()}clearDecorations(){this.decorations.forEach(u=>{u.dispose(),this.editor.deltaDecorations(u.decorations,[])}),this.decorations.clear()}deltaDecoration(u,d){let E=[];if(this.decorations.has(u)&&(E=this.decorations.get(u).decorations,this.decorations.get(u).dispose(),this.decorations.delete(u)),E.length===0&&d.length===0)return;const f=this.editor.deltaDecorations(E,d);this.decorations.set(u,{decorations:f,dispose:()=>null})}applyDecoration(u,d){const E=this.decorations.get(u);E&&E.dispose();const f=E?E.decorations:[],c=[],y=new a.Disposable;if(f.length===0&&d.length===0)return;d.forEach(A=>{const S=this.resolveDecorationRenderer(u,A.renderOptions);c.push({range:A.range,options:{...S.options,hoverMessage:g(A.hoverMessage)}}),y.addDispose(S)});const b=this.editor.deltaDecorations(f,c);this.decorations.set(u,{decorations:b,dispose:()=>y.dispose()})}resolveDecorationRenderer(u,d){const E=this.decorationService.getTextEditorDecorationType(u),f={description:u},c=this.themeService.getCurrentThemeSync().type,y=new a.Disposable;if(E){const b=E.property;_(f,b,c)}if(d){const b=this.decorationService.createTextEditorDecorationType(d);_(f,b.property,c),y.addDispose(b)}return{options:f,dispose:()=>y.dispose()}}};t.MonacoEditorDecorationApplier=m,n.__decorate([(0,o.Autowired)(v.IEditorDecorationCollectionService),n.__metadata("design:type",Object)],m.prototype,"decorationService",void 0),n.__decorate([(0,o.Autowired)(p.IThemeService),n.__metadata("design:type",Object)],m.prototype,"themeService",void 0),n.__decorate([(0,o.Autowired)(a.IEventBus),n.__metadata("design:type",Object)],m.prototype,"eventBus",void 0),t.MonacoEditorDecorationApplier=m=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],m);function _(h,u,d){u.overviewRulerLane&&(h.overviewRuler?h.overviewRuler.position=u.overviewRulerLane:h.overviewRuler={color:null,position:u.overviewRulerLane}),u.default&&s(h,u.default),d==="dark"&&u.dark&&s(h,u.dark),d==="light"&&u.light&&s(h,u.light),u.isWholeLine!==void 0&&(h.isWholeLine=u.isWholeLine),u.rangeBehavior&&(h.stickiness=u.rangeBehavior),h.inlineClassNameAffectsLetterSpacing=!0}function s(h,u){u.className&&(h.className=(0,r.default)(h.className,u.className)),u.inlineClassName&&(h.inlineClassName=(0,r.default)(h.inlineClassName,u.inlineClassName)),u.afterContentClassName&&(h.afterContentClassName=(0,r.default)(h.afterContentClassName,u.afterContentClassName)),u.beforeContentClassName&&(h.beforeContentClassName=(0,r.default)(h.beforeContentClassName,u.beforeContentClassName)),u.glyphMarginClassName&&(h.glyphMarginClassName=(0,r.default)(h.glyphMarginClassName,u.glyphMarginClassName)),u.overviewRulerColor&&h.overviewRuler&&(h.overviewRuler.color=u.overviewRulerColor)}function g(h){if(h)return h instanceof Array?h.map(l):l(h)}function l(h){return typeof h=="string"?{value:h,isTrusted:!0}:h}},84158:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompareEditorContribution=t.CompareService=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(93899),p=e(82196);let v=class{constructor(){this.comparing=new Map}compare(s,g,l){const h=o.URI.from({scheme:p.DIFF_SCHEME,query:o.URI.stringifyQuery({name:l,original:s,modified:g,comparing:!0})});if(!this.comparing.has(h.toString())){const u=new o.Deferred;this.comparing.set(h.toString(),u),u.promise.then(()=>{this.comparing.delete(h.toString()),this.commandService.executeCommand(o.EDITOR_COMMANDS.CLOSE_ALL.id,h)})}return this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,h),this.comparing.get(h.toString()).promise}};t.CompareService=v,n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],v.prototype,"commandService",void 0),t.CompareService=v=n.__decorate([(0,r.Injectable)()],v);let m=class{registerMenus(s){s.registerMenuItems(a.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.ACCEPT.id,label:(0,o.localize)("editor.action.accept")},iconClass:(0,o.getIcon)("check"),group:"navigation",when:"isInDiffEditor && diffResource =~ /%26comparing%3Dtrue$/"}]),s.registerMenuItems(a.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.REVERT.id,label:(0,o.localize)("editor.action.revert")},iconClass:(0,o.getIcon)("rollback"),group:"navigation",when:"isInDiffEditor && diffResource =~ /%26comparing%3Dtrue$/"}]),s.registerMenuItems(a.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.TOGGLE_COLLAPSE_UNCHANGED_REGIONS.id,label:(0,o.localize)("diffEditor.action.toggleCollapseUnchangedRegions")},toggledWhen:"config.diffEditor.hideUnchangedRegions.enabled",iconClass:"codicon codicon-map",group:"navigation",when:"isInDiffEditor"}])}registerCommands(s){s.registerCommand(o.DIFF_EDITOR_COMMANDS.ACCEPT,{execute:g=>{g&&this.compareService.comparing.has(g.toString())&&this.compareService.comparing.get(g.toString()).resolve(p.CompareResult.accept)}}),s.registerCommand(o.DIFF_EDITOR_COMMANDS.REVERT,{execute:g=>{g&&this.compareService.comparing.has(g.toString())&&this.compareService.comparing.get(g.toString()).resolve(p.CompareResult.revert)}}),s.registerCommand(o.DIFF_EDITOR_COMMANDS.TOGGLE_COLLAPSE_UNCHANGED_REGIONS,{execute:()=>{const g=this.preferenceService.get("diffEditor.hideUnchangedRegions.enabled");this.preferenceService.set("diffEditor.hideUnchangedRegions.enabled",!g,o.PreferenceScope.User)}})}};t.CompareEditorContribution=m,n.__decorate([(0,r.Autowired)(p.ICompareService),n.__metadata("design:type",v)],m.prototype,"compareService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],m.prototype,"preferenceService",void 0),t.CompareEditorContribution=m=n.__decorate([(0,o.Domain)(a.MenuContribution,o.CommandContribution)],m)},57581:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultDiffEditorContribution=t.DiffResourceProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(26542),p=e(14951),v=e(23418),m=e(82196);let _=class extends o.WithEventBus{constructor(){super(...arguments),this.scheme=v.DIFF_SCHEME,this.modifiedToResource=new Map}onResourceDecorationChangeEvent(l){l.payload.uri&&this.modifiedToResource.has(l.payload.uri.toString())&&this.eventBus.fire(new v.ResourceDecorationNeedChangeEvent({uri:this.modifiedToResource.get(l.payload.uri.toString()),decoration:l.payload.decoration}))}async getCurrentUserHome(){if(!this.userhomePath)try{const l=await this.fileServiceClient.getCurrentUserHome();l&&(this.userhomePath=new o.URI(l.uri))}catch{}return this.userhomePath}async getReadableTooltip(l){const h=l.toString(),u=await this.getCurrentUserHome();if(!u)return decodeURIComponent(l.withScheme("").toString());if(u.isEqualOrParent(l)){const d=u&&u.toString();return decodeURIComponent(h.replace(d,"~"))}return decodeURIComponent(l.withScheme("").toString())}async provideResource(l){const{original:h,modified:u,name:d}=l.getParsedQuery(),E=new o.URI(h),f=new o.URI(u);return this.modifiedToResource.set(f.toString(),l),Promise.all([this.labelService.getIcon(E),this.getReadableTooltip(f)]).then(([c,y])=>{var b;return{name:d,icon:c,uri:l,supportsRevive:(b=this.appConfig.enableDiffRevive)!==null&&b!==void 0?b:!0,metadata:{original:E,modified:f},title:y}})}async shouldCloseResource(l,h){const{modified:u}=l.uri.getParsedQuery(),d=new o.URI(u),E=await this.resourceService.getResource(d);return E?await this.resourceService.shouldCloseResource(E,h):!0}};t.DiffResourceProvider=_,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",a.LabelService)],_.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(v.ResourceService),n.__metadata("design:type",v.ResourceService)],_.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],_.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),n.__decorate([(0,o.OnEvent)(v.ResourceDecorationChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[v.ResourceDecorationChangeEvent]),n.__metadata("design:returntype",void 0)],_.prototype,"onResourceDecorationChangeEvent",null),t.DiffResourceProvider=_=n.__decorate([(0,r.Injectable)()],_);let s=class{registerResource(l){l.registerResourceProvider(this.diffResourceProvider)}registerEditorComponent(l){l.registerEditorComponentResolver(v.DIFF_SCHEME,(h,u)=>{u.push({type:m.EditorOpenType.diff})})}};t.DefaultDiffEditorContribution=s,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",_)],s.prototype,"diffResourceProvider",void 0),t.DefaultDiffEditorContribution=s=n.__decorate([(0,o.Domain)(m.BrowserEditorContribution)],s)},21690:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyDocCacheImpl=void 0;const n=e(85608),r=e(76003);let o=class{hasCache(p){return!1}isFlushed(){return!0}getCache(p){return null}persistCache(p,v){}};t.EmptyDocCacheImpl=o,t.EmptyDocCacheImpl=o=n.__decorate([(0,r.Injectable)()],o)},80487:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(21690),t),n.__exportStar(e(7220),t)},7220:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStorageDocCacheImpl=void 0;const n=e(85608),r=e(76003),o=e(51500),a=e(93107);let p=class{hasCache(m){return!0}isFlushed(){return!0}async getCache(m){const _=this.parseKeyFrom(m);return await this.storageService.getData(_)||null}persistCache(m,_){const s=this.parseKeyFrom(m),g=this.parseCacheFrom(m,_);this.storageService.setData(s,g)}parseCacheFrom(m,_){if(!(!_.dirty||!_.changeMatrix.length))return{path:m.path.toString(),startMD5:_.startMD5,changeMatrix:_.changeMatrix.map(s=>s.map(g=>(0,a.parseCacheValueFrom)(g)))}}parseKeyFrom(m){return`LocalStorageDocCacheImpl_${m.toString()}`}};t.LocalStorageDocCacheImpl=p,n.__decorate([(0,r.Autowired)(o.IWorkspaceStorageService),n.__metadata("design:type",Object)],p.prototype,"storageService",void 0),t.LocalStorageDocCacheImpl=p=n.__decorate([(0,r.Injectable)()],p)},86942:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDocumentError=void 0;var e;(function(n){n.READ_CACHE_ERROR="EditorDocumentError:READ_CACHE_ERROR",n.APPLY_CACHE_TO_DIRTY_DOCUMENT="EditorDocumentError:APPLY_CACHE_TO_DIRTY_DOCUMENT",n.APPLY_CACHE_TO_DIFFERENT_DOCUMENT="EditorDocumentError:APPLY_CACHE_TO_DIFFERENT_DOCUMENT",n.FORMAT_ERROR="EditorDocumentError:FORMAT_ERROR"})(e||(t.EditorDocumentError=e={}))},9519:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDocumentModelServiceImpl=t.EDITOR_DOC_OPTIONS_PREF_KEY=t.EDITOR_DOCUMENT_MODEL_STORAGE=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(96405),p=e(14951),v=e(91249),m=e(96689);t.EDITOR_DOCUMENT_MODEL_STORAGE=new o.URI("editor-doc").withScheme(o.STORAGE_SCHEMA.SCOPE),t.EDITOR_DOC_OPTIONS_PREF_KEY="editor_doc_pref";let _=class extends o.WithEventBus{constructor(){super(),this.editorDocModels=new Map,this.creatingEditorModels=new Map,this._modelsToDispose=new Set,this.preferredModelOptions=new Map,this._ready=this.registerDispose(new o.ReadyEvent),this.modelCreationEventDispatcher=this.registerDispose(new o.Dispatcher),this._modelReferenceManager=new o.ReferenceManager(g=>(this._modelsToDispose.has(g)&&this._modelsToDispose.delete(g),this.getOrCreateModel(g))),this._modelReferenceManager.onReferenceAllDisposed(g=>{this._delete(g)}),this._modelReferenceManager.onInstanceCreated(g=>{this.modelCreationEventDispatcher.dispatch(g.uri.toString()),this.eventBus.fire(new m.EditorDocumentModelCreationEvent({uri:g.uri,languageId:g.languageId,eol:g.eol,encoding:g.encoding,content:g.getText(),readonly:g.readonly,versionId:g.getMonacoModel().getVersionId()}))}),this.addDispose(this.preferenceService.onPreferenceChanged(g=>{g.preferenceName==="editor.detectIndentation"&&this.editorDocModels.forEach(l=>{l.updateOptions({})})}))}onDocumentModelCreated(g,l){return this.modelCreationEventDispatcher.on(g)(l)}_delete(g){const l=this.preferenceService.get("editor.modelDisposeTime",3e3);this._modelsToDispose.add(g.toString());let h=null;const u=this.addDispose({dispose:()=>{h&&clearTimeout(h)}});h=window.setTimeout(()=>{u.dispose(),h=null,this._modelsToDispose.has(g.toString())&&this._doDelete(g.toString())},l)}_doDelete(g){const l=this.editorDocModels.get(g);if(l&&(!l.dirty||l.disposeEvenDirty))return l.dispose(),this.editorDocModels.delete(g),l;this._modelsToDispose.delete(g)}async changeModelOptions(g,l){return this.onceReady(()=>{this.preferredModelOptions.has(g.toString())&&(l={...this.preferredModelOptions.get(g.toString()),...l}),this.preferredModelOptions.set(g.toString(),l);const h=this.getModelReference(g);return h&&(l.encoding&&l.encoding!==h.instance.encoding&&h.instance.updateEncoding(l.encoding),l.languageId&&l.languageId!==h.instance.languageId&&(h.instance.languageId=l.languageId),l.eol&&l.eol!==h.instance.eol&&(h.instance.eol=l.eol),h.dispose()),this.persistOptionsPreference()})}persistOptionsPreference(){return this.storage.set(t.EDITOR_DOC_OPTIONS_PREF_KEY,JSON.stringify((0,o.mapToSerializable)(this.preferredModelOptions)))}async initialize(){if(this.storage=await this.getStorage(t.EDITOR_DOCUMENT_MODEL_STORAGE),this.storage.get(t.EDITOR_DOC_OPTIONS_PREF_KEY))try{this.preferredModelOptions=(0,o.serializableToMap)(JSON.parse(this.storage.get(t.EDITOR_DOC_OPTIONS_PREF_KEY)))}catch(g){this.logger.error(g)}this._ready.ready()}async acceptExternalChange(g){this.hashCalculateService.initialized||await this.hashCalculateService.initialize();const l=this.editorDocModels.get(g.payload.toString());if(l&&!l.dirty){const h=await this.contentRegistry.getProvider(l.uri);if(h)if(h.provideEditorDocumentModelContentMd5)await h.provideEditorDocumentModelContentMd5(l.uri,l.encoding)!==l.getBaseContentMd5()&&l.updateContent(await this.contentRegistry.getContentForUri(l.uri,l.encoding),void 0,!0);else{const u=await this.contentRegistry.getContentForUri(l.uri,l.encoding);this.hashCalculateService.calculate(u)!==l.getBaseContentMd5()&&l.updateContent(u,void 0,!0)}}}createModelReference(g,l){return this._modelReferenceManager.getReference(g.toString(),l)}getModelReference(g,l){return this._modelReferenceManager.getReferenceIfHasInstance(g.toString(),l)}getModelDescription(g,l){const h=this.getModelReference(g,l);if(!h)return null;const u=h.instance,d={alwaysDirty:u.alwaysDirty,closeAutoSave:u.closeAutoSave,disposeEvenDirty:u.disposeEvenDirty,eol:u.eol,encoding:u.encoding,dirty:u.dirty,languageId:u.languageId,readonly:u.readonly,uri:u.uri,id:u.id,savable:u.savable};return h.dispose(),d}getAllModels(){return Array.from(this.editorDocModels.values())}hasLanguage(g){return this.getAllModels().findIndex(l=>l.languageId===g)!==-1}async getOrCreateModel(g,l){return this.editorDocModels.has(g)?this.editorDocModels.get(g):this.createModel(g,l)}get onceReady(){return this.initialize(),this._ready.onceReady.bind(this._ready)}createModel(g,l){if(!this.creatingEditorModels.has(g)){const h=this.doCreateModel(g,l).then(u=>(this.creatingEditorModels.delete(g),u),u=>{throw this.creatingEditorModels.delete(g),u});this.creatingEditorModels.set(g,h)}return this.creatingEditorModels.get(g)}async doCreateModel(g,l){const h=new o.URI(g);let u=await this.contentRegistry.getProvider(h);if(u||await this.fileSystem.shouldWaitProvider(h.scheme)&&(u=await this.contentRegistry.getProvider(h)),!u)throw new Error(`No document provider found for ${h.toString()}`);const[d,E,f,c,y,b]=await Promise.all([u.provideEditorDocumentModelContent(h,l),u.isReadonly?u.isReadonly(h):void 0,u.preferLanguageForUri?u.preferLanguageForUri(h):void 0,u.isAlwaysDirty?u.isAlwaysDirty(h):!1,u.closeAutoSave?u.closeAutoSave(h):!1,u.disposeEvenDirty?u.disposeEvenDirty(h):!1]);!l&&u.provideEncoding&&(l=await u.provideEncoding(h));const A=u.provideEOL?await u.provideEOL(h):`
31952
+ `))}}})}registerMenus(u){u.registerMenuItem(a.MenuId.DebugCallStackContext,{command:{id:p.DEBUG_COMMANDS.RESTART_FRAME.id,label:(0,o.localize)("debugger.menu.restartFrame")},when:`${v.CONTEXT_CALLSTACK_ITEM_TYPE.equalsTo("stackFrame")} && ${v.CONTEXT_RESTART_FRAME_SUPPORTED.raw}`,enabledWhen:v.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.raw,order:10}),u.registerMenuItem(a.MenuId.DebugCallStackContext,{command:{id:p.DEBUG_COMMANDS.COPY_STACK_TRACE.id,label:(0,o.localize)("debugger.menu.copyCallstack")},when:v.CONTEXT_CALLSTACK_ITEM_TYPE.equalsTo("stackFrame"),order:20})}};t.DebugCallStackContribution=l,n.__decorate([(0,r.Autowired)(m.IDebugSessionManager),n.__metadata("design:type",_.DebugSessionManager)],l.prototype,"debugSessionManager",void 0),n.__decorate([(0,r.Autowired)(o.IClipboardService),n.__metadata("design:type",Object)],l.prototype,"clipboardService",void 0),t.DebugCallStackContribution=l=n.__decorate([(0,o.Domain)(a.MenuContribution,o.CommandContribution)],l)},61520:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugStackOperationView=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),a=e(66498),p=e(96090),v=n.__importDefault(e(12920)),m=_=>{const{session:s,thread:g}=_,{doStop:l,doStepIn:h,doStepOut:u,doStepOver:d,doContinue:E,doRestart:f,doPause:c,updateCurrentSession:y}=(0,o.useInjectable)(p.DebugToolbarService);if(s&&!g){const b=A=>{y(s),A()};return r.default.createElement("div",{className:v.default.debug_stack_session_operations},r.default.createElement(a.DebugAction,{run:()=>b(f),icon:"reload",label:(0,o.localize)("debug.action.restart")}),r.default.createElement(a.DebugAction,{run:()=>b(l),icon:"stop",label:(0,o.localize)("debug.action.stop")}))}if(!s&&g){const{stopped:b}=g,A=D=>{g.session.currentThread=g,D()},S=D=>D?r.default.createElement(a.DebugAction,{run:()=>A(E),icon:"continue",label:(0,o.localize)("debug.action.continue")}):r.default.createElement(a.DebugAction,{run:()=>A(c),enabled:!0,icon:"pause",label:(0,o.localize)("debug.action.pause")});return r.default.createElement("div",{className:v.default.debug_stack_thread_operations},S(b),r.default.createElement(a.DebugAction,{run:()=>A(d),enabled:b,icon:"step",label:(0,o.localize)("debug.action.step-over")}),r.default.createElement(a.DebugAction,{run:()=>A(h),enabled:b,icon:"step-in",label:(0,o.localize)("debug.action.step-into")}),r.default.createElement(a.DebugAction,{run:()=>A(u),enabled:b,icon:"step-out",label:(0,o.localize)("debug.action.step-out")}))}return null};t.DebugStackOperationView=m},85294:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugCallStackService=void 0;const n=e(85608),r=e(76003),o=e(93899),a=e(50755),p=e(4983),v=e(17280),m=e(29539);let _=class{constructor(){this.handleContextMenu=(g,l)=>{this.stackFrameSupportsRestart.reset(),g.stopPropagation(),g.preventDefault(),l instanceof m.DebugSession?this.callStackItemType.set("session"):l instanceof a.DebugThread?this.callStackItemType.set("thread"):l instanceof a.DebugStackFrame?(this.callStackItemType.set("stackFrame"),this.stackFrameSupportsRestart.set(l.canRestart)):this.callStackItemType.reset();const{x:h,y:u}=g.nativeEvent,d=this.contextMenuService.createMenu({id:o.MenuId.DebugCallStackContext,contextKeyService:this.debugContextKey.contextKeyScoped}),E=d.getMergedMenuNodes();d.dispose();const f=()=>{var y;return l instanceof a.DebugStackFrame?!((y=l.source)===null||y===void 0)&&y.inMemory?l.source.raw.path||l.source.reference||l.source.name:l.source?l.source.uri.toString():"":l instanceof a.DebugThread||l instanceof m.DebugSession?l.id:""},c=()=>l instanceof a.DebugStackFrame?{sessionId:l.session.id,threadId:l.thread.id,frameId:l.id}:l instanceof a.DebugThread?{sessionId:l.session.id,threadId:l.id}:l instanceof m.DebugSession?{sessionId:l.id}:void 0;this.ctxMenuRenderer.show({anchor:{x:h,y:u},menuNodes:E,args:[f(),c()],contextKeyService:this.debugContextKey.contextKeyScoped})},this.stackFrameSupportsRestart||(this.stackFrameSupportsRestart=p.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.bind(this.debugContextKey.contextKeyScoped)),this.callStackItemType||(this.callStackItemType=p.CONTEXT_CALLSTACK_ITEM_TYPE.bind(this.debugContextKey.contextKeyScoped))}};t.DebugCallStackService=_,n.__decorate([(0,r.Autowired)(o.AbstractContextMenuService),n.__metadata("design:type",o.AbstractContextMenuService)],_.prototype,"contextMenuService",void 0),n.__decorate([(0,r.Autowired)(o.ICtxMenuRenderer),n.__metadata("design:type",o.ICtxMenuRenderer)],_.prototype,"ctxMenuRenderer",void 0),n.__decorate([(0,r.Autowired)(v.DebugContextKey),n.__metadata("design:type",v.DebugContextKey)],_.prototype,"debugContextKey",void 0),t.DebugCallStackService=_=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],_)},18028:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugCallStackView=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),a=e(64582),p=e(75651),v=n.__importDefault(e(12920)),m=({viewState:_})=>{const s=(0,o.useInjectable)(a.IDebugSessionManager),[g,l]=r.default.useState([]);return r.default.useEffect(()=>{const h=s.onDidStartDebugSession(d=>{g.push(d),l([...g])}),u=s.onDidDestroyDebugSession(d=>{const E=g.findIndex(f=>f.id===d.id);g.splice(E,1),l([...g])});return()=>{h.dispose(),u.dispose()}},[]),r.default.createElement("div",{className:v.default.call_stack_wrapper},g.filter(h=>!h.parentSession).map(h=>r.default.createElement(p.DebugStackSessionView,{key:h.id,viewState:_,session:h,indent:0})))};t.DebugCallStackView=m},59334:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugVariablesModel=void 0;const r=e(85608),o=e(76003),a=e(97267),p=e(41869),v=e(98650);let m=n=class extends a.TreeModel{constructor(s){super(),this.flushDispatchChangeDelayer=new p.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(s)}init(s){this.root=s,this.root.watcher.on(a.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};t.DebugVariablesModel=m,m.DEFAULT_FLUSH_DELAY=100,t.DebugVariablesModel=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[v.ExpressionContainer])],m)},30865:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugVariablesModelService=void 0;const r=e(85608),o=r.__importDefault(e(46343)),a=e(76003),p=e(97267),v=e(41869),m=e(93899),_=e(98650),s=e(32756),g=e(17280),l=e(59334),h=r.__importDefault(e(57259));class u{constructor(){this._keepExpandedScopesMap=new Map}getMirrorScope(f){return Array.from(this._keepExpandedScopesMap.keys()).find(c=>(0,o.default)(c,f.getRawScope()))}set(f){const c=f.getRawScope();if(c){const y=this.getMirrorScope(f);if(y){const b=this._keepExpandedScopesMap.get(y);let A;f.expanded?A=Array.from(new Set([...b,f.variablesReference])):A=b.filter(S=>S!==f.variablesReference),this._keepExpandedScopesMap.set(y,A)}else this._keepExpandedScopesMap.set(c,f.expanded?[f.variablesReference]:[])}}get(f){const c=this.getMirrorScope(f);return c?this._keepExpandedScopesMap.get(c)||[]:[]}clear(){this._keepExpandedScopesMap.clear()}}let d=n=class{constructor(){this.selectedDecoration=new p.Decoration(h.default.mod_selected),this.focusedDecoration=new p.Decoration(h.default.mod_focused),this.contextMenuDecoration=new p.Decoration(h.default.mod_actived),this.loadingDecoration=new p.Decoration(h.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new v.Emitter,this.onDidUpdateTreeModelEmitter=new v.Emitter,this.flushDispatchChangeDelayer=new v.ThrottledDelayer(n.DEFAULT_TRIGGER_DELAY),this.disposableCollection=new v.DisposableCollection,this.keepExpandedScopesModel=new u,this.activeNodeDecoration=(f,c=!0)=>{var y;if(this.contextMenuNode&&(this.contextMenuDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),f){if(this.selectedNodes.length>0)for(const b of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(b);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(f),this.focusedDecoration.addTarget(f),this._focusedNode=f,this._selectedNodes=[f],c&&((y=this.treeModel)===null||y===void 0||y.dispatchChange())}},this.activeNodeActivedDecoration=f=>{var c;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(f),this._contextMenuNode=f,(c=this.treeModel)===null||c===void 0||c.dispatchChange()},this.enactiveNodeDecoration=()=>{var f;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(f=this.treeModel)===null||f===void 0||f.dispatchChange()},this.handleContextMenu=(f,c)=>{var y;if(f.stopPropagation(),f.preventDefault(),!c||c instanceof _.DebugScope){this.enactiveNodeDecoration(),this.debugContextKey.contextVariableEvaluateNamePresent.set(!1);return}this._currentVariableInternalContext=c;const{x:b,y:A}=f.nativeEvent;c&&(this.activeNodeActivedDecoration(c),this.debugContextKey.contextDebugProtocolVariableMenu.set(c.variableMenuContext),this.debugContextKey.contextVariableEvaluateNamePresent.set(!!c.evaluateName)),!((y=c.session)===null||y===void 0)&&y.capabilities.supportsReadMemoryRequest&&c.memoryReference!==void 0?this.debugContextKey.contextCanViewMemory.set(!0):this.debugContextKey.contextCanViewMemory.set(!1);const S=this.contextMenuService.createMenu({id:m.MenuId.DebugVariablesContext,contextKeyService:this.debugContextKey.contextKeyScoped}),D=S.getMergedMenuNodes();S.dispose(),this.ctxMenuRenderer.show({anchor:{x:b,y:A},menuNodes:D,args:[c.toDebugProtocolObject()]})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=f=>{this.activeNodeDecoration(f)},this.handleTwistierClick=(f,c)=>{c===p.TreeNodeType.CompositeTreeNode?(this.activeNodeDecoration(f,!1),this.toggleDirectory(f)):this.activeNodeDecoration(f)},this.toggleDirectory=async f=>{f.expanded?f.setCollapsed():await f.setExpanded(!0),this.keepExpandedScopesModel.set(f)},this.listenViewModelChange()}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get treeHandle(){return this._debugVariablesTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._activeTreeModel}get currentVariableInternalContext(){return this._currentVariableInternalContext}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}listenViewModelChange(){this.viewModel.onDidChange(async()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{var f,c;if(this.viewModel&&this.viewModel.currentSession&&!this.viewModel.currentSession.terminated){const y=await this.initTreeModel(this.viewModel.currentSession);this._activeTreeModel=y,await((f=this._activeTreeModel)===null||f===void 0?void 0:f.ensureReady);const b=((c=this._activeTreeModel)===null||c===void 0?void 0:c.root.children)||[];if(b.length>0&&b.every(S=>!S.expanded))for(const S of b)S.getRawScope().expensive===!1&&!S.expanded&&await this.toggleDirectory(S);const A=async S=>{for(const D of S)this.keepExpandedScopesModel.get(D).includes(D.variablesReference)&&(await D.setExpanded(!0),Array.isArray(D.children)&&await A(D.children))};b.forEach(async S=>{Array.isArray(S.children)&&await A(S.children)})}else this._activeTreeModel=void 0,this.keepExpandedScopesModel.clear();this.onDidUpdateTreeModelEmitter.fire(this._activeTreeModel)})})}listenTreeViewChange(){this.dispose(),this.treeModel&&(this.disposableCollection.push(this.treeModel.root.watcher.on(p.TreeNodeEvent.WillResolveChildren,f=>{this.loadingDecoration.addTarget(f)})),this.disposableCollection.push(this.treeModel.root.watcher.on(p.TreeNodeEvent.DidResolveChildren,f=>{this.loadingDecoration.removeTarget(f)})))}async initTreeModel(f){const c=new _.DebugVariableRoot(f);if(c)return this._activeTreeModel=this.injector.get(l.DebugVariablesModel,[c]),this.initDecorations(c),this.listenTreeViewChange(),this._activeTreeModel}initDecorations(f){this._decorations=new p.DecorationsManager(f),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.loadingDecoration),this.decorations.removeDecoration(this.contextMenuDecoration))}handleTreeHandler(f){this._debugVariablesTreeHandle={...f,getModel:()=>this.treeModel}}async copyEvaluateName(f){f&&await this.clipboardService.writeText(f.evaluateName)}async copyValue(f){if(!f)return;const y=await(async()=>{if(f.session&&f.session.capabilities.supportsValueFormattingOptions)try{const{variable:{evaluateName:b}}=f;if(b){const A=await f.session.evaluate(b,"clipboard");if(A)return A.result}return""}catch{return""}else return f.value})();y&&await this.clipboardService.writeText(y)}};t.DebugVariablesModelService=d,d.DEFAULT_TRIGGER_DELAY=200,r.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),r.__metadata("design:type",a.Injector)],d.prototype,"injector",void 0),r.__decorate([(0,a.Autowired)(m.ICtxMenuRenderer),r.__metadata("design:type",m.ICtxMenuRenderer)],d.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,a.Autowired)(m.AbstractContextMenuService),r.__metadata("design:type",m.AbstractContextMenuService)],d.prototype,"contextMenuService",void 0),r.__decorate([(0,a.Autowired)(s.DebugViewModel),r.__metadata("design:type",s.DebugViewModel)],d.prototype,"viewModel",void 0),r.__decorate([(0,a.Autowired)(v.IClipboardService),r.__metadata("design:type",Object)],d.prototype,"clipboardService",void 0),r.__decorate([(0,a.Autowired)(g.DebugContextKey),r.__metadata("design:type",g.DebugContextKey)],d.prototype,"debugContextKey",void 0),t.DebugVariablesModelService=d=n=r.__decorate([(0,a.Injectable)(),r.__metadata("design:paramtypes",[])],d)},86752:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VariablesPanelContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(93899),p=e(43718),v=e(57517),m=e(14951),_=e(2156),s=e(72665),g=e(94170),l=e(23268),h=e(64582),u=e(61752),d=e(32756),E=e(4983),f=e(95033),c=e(30865);let y=class{registerCommands(A){A.registerCommand(h.DEBUG_COMMANDS.SET_VARIABLE_VALUE,{execute:async()=>{var I;this.reporterService.point(h.DEBUG_REPORT_NAME===null||h.DEBUG_REPORT_NAME===void 0?void 0:h.DEBUG_REPORT_NAME.DEBUG_VARIABLES,h.DEBUG_COMMANDS.SET_VARIABLE_VALUE.id);const{currentVariableInternalContext:w}=this.debugVariablesModelService;if(!w)return;const T=await this.quickInputService.open({placeHolder:(0,o.localize)("debugger.menu.setValue.param"),value:w.description.replace(/^\"(.*)\"$/,"$1")});if(T!=null){try{await w.setValue(T)}catch(R){this.messageService.error(R.message)}(I=this.debugVariablesModelService.treeModel)===null||I===void 0||I.dispatchChange()}}}),A.registerCommand(h.DEBUG_COMMANDS.COPY_VARIABLE_VALUE,{execute:async()=>{const{currentVariableInternalContext:I}=this.debugVariablesModelService;this.debugVariablesModelService.copyValue(I)}}),A.registerCommand(h.DEBUG_COMMANDS.COPY_EVALUATE_PATH,{execute:async()=>{const{currentVariableInternalContext:I}=this.debugVariablesModelService;this.debugVariablesModelService.copyEvaluateName(I)}}),A.registerCommand(h.DEBUG_COMMANDS.ADD_TO_WATCH_ID,{execute:async I=>{const{currentVariableInternalContext:w}=this.debugVariablesModelService;if(I instanceof p.URI){const T=this.workbenchEditorService.currentEditor;if(!T?.monacoEditor||!T?.monacoEditor.hasModel())return;const R=T.monacoEditor,M=R.getModel().getValueInRange(R.getSelection());this.debugWatchModelService.addWatchExpression(M);return}else w&&this.debugWatchModelService.addWatchExpression(w.evaluateName)}});const S="ms-vscode.hexeditor",D=`${p.CUSTOM_EDITOR_SCHEME}-hexEditor.hexedit`;A.registerCommand(h.DEBUG_COMMANDS.VIEW_MEMORY_ID,{execute:async I=>{var w;const T=await this.commandService.executeCommand("extension.getDescription",S);if(T&&T.enabled){const R=(w=this.viewModel.currentSession)===null||w===void 0?void 0:w.id,M=I.memoryReference;this.workbenchEditorService.open(p.URI.from({scheme:E.DEBUG_MEMORY_SCHEME,authority:R,path:"/"+encodeURIComponent(M||"")+"/memory.bin"}),{disableNavigate:!0,preview:!0,forceOpenType:{type:v.EditorOpenType.component,componentId:D}})}else this.messageService.warning((0,o.localize)("debug.variables.view.memory.prompt.hexEditor.notInstalled"))}})}async initialize(){this.fileSystem.registerProvider(E.DEBUG_MEMORY_SCHEME,this.debugMemoryFileSystemProvider)}registerResource(A){A.registerResourceProvider({scheme:E.DEBUG_MEMORY_SCHEME,provideResource:async S=>({uri:S,icon:(0,o.getIcon)("hex"),name:S.displayName})})}registerMenus(A){var S;A.registerMenuItem(a.MenuId.DebugVariablesContext,{command:{id:h.DEBUG_COMMANDS.SET_VARIABLE_VALUE.id,label:(0,o.localize)("debugger.menu.setValue")},order:10,when:E.CONTEXT_SET_VARIABLE_SUPPORTED.raw,group:"3_modification"}),A.registerMenuItem(a.MenuId.DebugVariablesContext,{command:{id:h.DEBUG_COMMANDS.COPY_VARIABLE_VALUE.id,label:(0,o.localize)("debugger.menu.copyValue")},order:10,group:"5_cutcopypaste"}),A.registerMenuItem(a.MenuId.DebugVariablesContext,{command:{id:h.DEBUG_COMMANDS.COPY_EVALUATE_PATH.id,label:(0,o.localize)("debugger.menu.copyEvaluatePath")},when:E.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.raw,order:20,group:"5_cutcopypaste"}),A.registerMenuItem(a.MenuId.DebugVariablesContext,{command:{id:h.DEBUG_COMMANDS.ADD_TO_WATCH_ID.id,label:(0,o.localize)("debugger.menu.addToWatchExpressions")},when:E.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.raw,order:100,group:"z_commands"}),A.registerMenuItem(a.MenuId.EditorContext,{command:{id:h.DEBUG_COMMANDS.ADD_TO_WATCH_ID.id,label:(0,o.localize)("debugger.menu.addToWatchExpressions")},when:(S=l.ContextKeyExpr.and(g.EditorContextKeys.hasNonEmptySelection,g.EditorContextKeys.editorTextFocus))===null||S===void 0?void 0:S.keys().reduce((D,I)=>D+" && "+I,E.CONTEXT_IN_DEBUG_MODE.raw),group:"debug",order:1}),A.registerMenuItem(a.MenuId.DebugVariablesContext,{command:{id:h.DEBUG_COMMANDS.VIEW_MEMORY_ID.id,label:(0,o.localize)("debug.variables.view.memory")},iconClass:"",when:`${E.CONTEXT_CAN_VIEW_MEMORY.equalsTo(!0)} && ${E.CONTEXT_IN_DEBUG_MODE.equalsTo(!0)}`,type:"icon"})}};t.VariablesPanelContribution=y,n.__decorate([(0,r.Autowired)(o.IQuickInputService),n.__metadata("design:type",Object)],y.prototype,"quickInputService",void 0),n.__decorate([(0,r.Autowired)(c.DebugVariablesModelService),n.__metadata("design:type",c.DebugVariablesModelService)],y.prototype,"debugVariablesModelService",void 0),n.__decorate([(0,r.Autowired)(f.DebugWatchModelService),n.__metadata("design:type",f.DebugWatchModelService)],y.prototype,"debugWatchModelService",void 0),n.__decorate([(0,r.Autowired)(v.WorkbenchEditorService),n.__metadata("design:type",v.WorkbenchEditorService)],y.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(s.IMessageService),n.__metadata("design:type",Object)],y.prototype,"messageService",void 0),n.__decorate([(0,r.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],y.prototype,"reporterService",void 0),n.__decorate([(0,r.Autowired)(p.CommandService),n.__metadata("design:type",Object)],y.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(d.DebugViewModel),n.__metadata("design:type",d.DebugViewModel)],y.prototype,"viewModel",void 0),n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",_.FileServiceClient)],y.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(u.DebugMemoryFileSystemProvider),n.__metadata("design:type",u.DebugMemoryFileSystemProvider)],y.prototype,"debugMemoryFileSystemProvider",void 0),t.VariablesPanelContribution=y=n.__decorate([(0,o.Domain)(o.ClientAppContribution,v.BrowserEditorContribution,a.MenuContribution,o.CommandContribution)],y)},28875:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_VARIABLE_TREE_NODE_HEIGHT=t.DebugVariableRenderedNode=t.DebugVariableView=t.DEBUG_VARIABLE_TREE_FIELD_NAME=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(97267),p=e(41869),v=e(98650),m=e(30865),_=n.__importDefault(e(57259));t.DEBUG_VARIABLE_TREE_FIELD_NAME="DEBUG_VARIABLE_TREE_FIELD";const s=({viewState:l})=>{const h=(0,p.useInjectable)(m.DebugVariablesModelService),u=o.default.useRef(null),[d,E]=o.default.useState(),f=22,{width:c,height:y}=l;o.default.useEffect(()=>{const M=h.onDidUpdateTreeModel(async O=>{E(O)});return()=>{M.dispose(),h.removeNodeDecoration(),E(void 0)}},[]);const b=M=>{h.handleTreeHandler({...M,hasDirectFocus:()=>u.current===document.activeElement})},A=(M,O,x)=>{M.stopPropagation();const{handleTwistierClick:k}=h;O&&k(O,x)},S=(M,O)=>{const{handleContextMenu:x}=h;x(M,O)},D=M=>{const{handleContextMenu:O}=h;O(M)},I=M=>{const{enactiveNodeDecoration:O}=h;O()},w=M=>{const{enactiveNodeDecoration:O}=h;O()},T=o.default.useCallback(M=>{const O=h.decorations.getDecorations(M.item);return o.default.createElement(t.DebugVariableRenderedNode,{item:M.item,itemType:M.itemType,decorations:O,onClick:A,onTwistierClick:A,onContextMenu:S,defaultLeftPadding:0,leftPadding:8})},[d]),R=()=>d?o.default.createElement(a.RecycleTree,{height:y,width:c,itemHeight:f,onReady:b,model:d,placeholder:()=>o.default.createElement("span",null),overflow:"auto"},T):o.default.createElement("span",null);return o.default.createElement("div",{className:_.default.debug_variables_container,tabIndex:-1,ref:u,onContextMenu:D,onClick:I,onBlur:w,"data-name":t.DEBUG_VARIABLE_TREE_FIELD_NAME},R())};t.DebugVariableView=s;const g=({item:l,decorations:h,defaultLeftPadding:u,leftPadding:d,onClick:E,onTwistierClick:f,onContextMenu:c,itemType:y})=>{const b=(0,p.useDesignStyles)(_.default.expansion_toggle,"expansion_toggle"),A=k=>{E(k,l,a.CompositeTreeNode.is(l)?a.TreeNodeType.CompositeTreeNode:a.TreeNodeType.TreeNode)},S=k=>{k.nativeEvent.which!==0&&(y===a.TreeNodeType.TreeNode||y===a.TreeNodeType.CompositeTreeNode)&&c&&c(k,l,y)},D=`${(u||8)+(l.depth||0)*(d||0)+(v.ExpressionContainer.is(l)?0:18)}px`,I={height:t.DEBUG_VARIABLE_TREE_NODE_HEIGHT,lineHeight:`${t.DEBUG_VARIABLE_TREE_NODE_HEIGHT}px`,paddingLeft:D},w=k=>o.default.createElement("div",{className:(0,r.default)(_.default.debug_variables_node_segment,_.default.debug_variables_node_displayname,_.default.debug_variables_variable,k.description?_.default.name:"")},k.displayName,k.value?":":""),T=k=>{const F=/^true|false$/i,L=/^(['"]).*\1$/,{description:B=""}=k,U=B!=="undefined"?B.replace("function","\u0192 "):"",W=[_.default.debug_variables_variable];return l.variableType==="number"||l.variableType==="boolean"||l.variableType==="string"?W.push(_.default[l.variableType]):isNaN(+U)?F.test(U)?W.push(_.default.boolean):L.test(U)&&W.push(_.default.string):W.push(_.default.number),o.default.createElement("div",{className:(0,r.default)(_.default.debug_variables_node_segment_grow,_.default.debug_variables_node_description,...W)},U)},R=()=>o.default.createElement("div",{className:(0,r.default)(_.default.debug_variables_node_segment,_.default.debug_variables_node_tail)},M()),M=()=>o.default.createElement("div",{className:_.default.debug_variables_node_status},l.badge),O=(k,F)=>{const L=B=>{F(B,k,y)};return h&&h?.classlist.indexOf(_.default.mod_loading)>-1?o.default.createElement("div",{className:(0,r.default)(_.default.debug_variables_node_segment,b)},o.default.createElement(a.Loading,null)):o.default.createElement("div",{onClick:L,className:(0,r.default)(_.default.debug_variables_node_segment,b,(0,p.getIcon)("right"),{[`${_.default.mod_collapsed}`]:!k.expanded})})},x=k=>{if(a.CompositeTreeNode.is(k))return O(k,f)};return o.default.createElement("div",{key:l.id,onClick:A,onContextMenu:S,title:l.description||"",className:(0,r.default)(_.default.debug_variables_node,h?h.classlist:null),style:I,"data-id":l.id},o.default.createElement("div",{className:(0,r.default)(_.default.debug_variables_node_content)},x(l),o.default.createElement("div",{className:_.default.debug_variables_node_overflow_wrap},w(l),T(l)),R()))};t.DebugVariableRenderedNode=g,t.DEBUG_VARIABLE_TREE_NODE_HEIGHT=22},85454:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugWatchModel=void 0;const r=e(85608),o=e(76003),a=e(97267),p=e(41869),v=e(98650);let m=n=class extends a.TreeModel{constructor(s){super(),this.flushDispatchChangeDelayer=new p.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(s)}init(s){this.root=s,this.root.watcher.on(a.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};t.DebugWatchModel=m,m.DEFAULT_FLUSH_DELAY=100,t.DebugWatchModel=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[v.ExpressionContainer])],m)},95033:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugWatchModelService=void 0;const r=e(85608),o=e(76003),a=e(97267),p=e(41869),v=e(93899),m=e(38029),_=e(50755),s=e(98650),g=e(32756),l=e(4983),h=e(26296),u=e(85454),d=r.__importDefault(e(21315)),{Path:E}=p.path;let f=n=class{constructor(){this._changeEventDispatchQueue=[],this.selectedDecoration=new a.Decoration(d.default.mod_selected),this.focusedDecoration=new a.Decoration(d.default.mod_focused),this.contextMenuDecoration=new a.Decoration(d.default.mod_actived),this.loadingDecoration=new a.Decoration(d.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new p.Emitter,this.onDidUpdateTreeModelEmitter=new p.Emitter,this.flushDispatchChangeDelayer=new p.ThrottledDelayer(n.DEFAULT_TRIGGER_DELAY),this.disposableCollection=new p.DisposableCollection,this.loadedDeferred=new p.Deferred,this.activeNodeDecoration=(y,b=!0)=>{var A;if(l.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bind(this.contextKeyService),this.contextMenuNode&&(this.focusedDecoration.removeTarget(this.contextMenuNode),this.selectedDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),y){if(this.selectedNodes.length>0)for(const S of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(S);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(y),this.focusedDecoration.addTarget(y),this._focusedNode=y,this._selectedNodes=[y],b&&((A=this.treeModel)===null||A===void 0||A.dispatchChange())}},this.activeNodeActivedDecoration=y=>{var b;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(y),this._contextMenuNode=y,(b=this.treeModel)===null||b===void 0||b.dispatchChange()},this.enactiveNodeDecoration=()=>{var y;l.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bind(this.contextKeyService).set(!1),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(y=this.treeModel)===null||y===void 0||y.dispatchChange()},this.handleContextMenu=(y,b)=>{var A;y.stopPropagation(),y.preventDefault();const{x:S,y:D}=y.nativeEvent;b?this.activeNodeActivedDecoration(b):this.enactiveNodeDecoration();let I;b?I=b:I=(A=this.treeModel)===null||A===void 0?void 0:A.root,this.watchItemType.set(I instanceof s.DebugWatchNode?"expression":I instanceof s.DebugVariable||I instanceof s.DebugVariableContainer?"variable":void 0);const w=this.contextMenuService.createMenu({id:v.MenuId.DebugWatchContext,contextKeyService:this.contextMenuContextKeyService}),T=w.getMergedMenuNodes();w.dispose(),this.ctxMenuRenderer.show({anchor:{x:S,y:D},menuNodes:T,args:[I]})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=y=>{this.activeNodeDecoration(y)},this.handleTwistierClick=(y,b)=>{if(b===a.TreeNodeType.CompositeTreeNode){if(s.DebugWatchNode.is(y)&&y.available){this.activeNodeDecoration(y,!1),this.toggleDirectory(y);return}else if(y.variablesReference){this.activeNodeDecoration(y,!1),this.toggleDirectory(y);return}}this.activeNodeDecoration(y)},this.toggleDirectory=async y=>{y.expanded?this.treeHandle.collapseNode(y):this.treeHandle.expandNode(y)},this.proxyPrompt=y=>{let b=!1;const A=async S=>{if(!b){if(b=!0,S){if(y instanceof a.NewPromptHandle){const D=y.parent;if(y.addAddonAfter("loading_indicator"),D.session)this.addWatchExpression(S);else{const I=new s.DebugWatchNode(D.session,S,D);this.dispatchWatchEvent(D.path,{type:a.WatchEvent.Added,node:I,id:D.id}),this.debugWatch.addWatchExpression(S)}}else if(y instanceof a.RenamePromptHandle){const D=y.target,I=D.parent;if(y.addAddonAfter("loading_indicator"),I.session)this.debugWatch.renameWatchExpression(D.name,S),this.initTreeModel();else{const w=new E(D.path).dir.join(S).toString();this.dispatchWatchEvent(I.path,{type:a.WatchEvent.Moved,oldPath:D.path,newPath:w}),this.debugWatch.renameWatchExpression(D.name,S)}}}return!0}};y.destroyed||(y.onCommit(A),y.onBlur(A))},this.flushEventQueue=()=>{let y;if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.length===0)return;this._changeEventDispatchQueue.sort((A,S)=>{const D=E.pathDepth(A),I=E.pathDepth(S);return D-I});const b=[this._changeEventDispatchQueue[0]];for(const A of this._changeEventDispatchQueue)b.some(S=>A.indexOf(S)===0)||b.push(A);return y=(0,p.pSeries)(b.map(A=>async()=>{var S,D;const I=(D=(S=this.treeModel)===null||S===void 0?void 0:S.root)===null||D===void 0?void 0:D.watchEvents.get(A);return I&&typeof I.callback=="function"&&await I.callback({type:a.WatchEvent.Changed,path:A}),null})),this._changeEventDispatchQueue=[],y},this.debugWatch=new _.DebugWatch(this.manager,this.reporterService),this.init(),this.watchItemType=l.CONTEXT_WATCH_ITEM_TYPE.bind(this.contextKeyService)}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get contextMenuContextKeyService(){return this._contextMenuContextKeyService||(this._contextMenuContextKeyService=this.contextKeyService.createScoped()),this._contextMenuContextKeyService}get treeHandle(){return this._debugWatchTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._activeTreeModel}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}async save(y=[]){await(await this.storageProvider(p.STORAGE_NAMESPACE.DEBUG)).set(n.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY,y)}async load(){const b=await(await this.storageProvider(p.STORAGE_NAMESPACE.DEBUG)).get(n.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY,[]);await this.debugWatch.updateWatchExpressions(b),this.loadedDeferred.resolve()}async init(){await this.loadedDeferred.promise,this.initTreeModel(),this.listenDebugWatchChange()}listenDebugWatchChange(){this.debugWatch.onDidChange(async()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.initTreeModel()})}),this.debugWatch.onDidVariableChange(async()=>{this.refresh()}),this.debugWatch.onDidExpressionChange(y=>{this.save(y)})}listenTreeViewChange(){this.dispose(),this.treeModel&&(this.disposableCollection.push(this.treeModel.root.watcher.on(a.TreeNodeEvent.WillResolveChildren,y=>{this.loadingDecoration.addTarget(y)})),this.disposableCollection.push(this.treeModel.root.watcher.on(a.TreeNodeEvent.DidResolveChildren,y=>{this.loadingDecoration.removeTarget(y)})))}async initTreeModel(){const y=await this.debugWatch.getRoot();if(y)return this._activeTreeModel=this.injector.get(u.DebugWatchModel,[y]),this.initDecorations(y),this.listenTreeViewChange(),this.onDidUpdateTreeModelEmitter.fire(this._activeTreeModel),this._activeTreeModel}initDecorations(y){this._decorations=new a.DecorationsManager(y),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.contextMenuDecoration),this.decorations.removeDecoration(this.loadingDecoration))}handleTreeHandler(y){this._debugWatchTreeHandle=y}async newDebugWatchNodePrompt(){this.treeModel&&this.proxyPrompt(await this.treeHandle.promptNewTreeNode(this.treeModel.root))}async renameDebugWatchNodePrompt(y){this.treeModel&&this.proxyPrompt(await this.treeHandle.promptRename(y))}removeDebugWatchNode(y){this.debugWatch.removeWatchExpression(y.name),y.session?this.initTreeModel():this.dispatchWatchEvent(y.parent.path,{type:a.WatchEvent.Removed,path:y.path})}async copyValue(y){const b=await y.getClipboardValue();b&&await this.clipboardService.writeText(b)}async clearAllExpression(){this.debugWatch.updateWatchExpressions([]),await this.initTreeModel(),this.save()}addWatchExpression(y){this.debugWatch.addWatchExpression(y),this.initTreeModel()}dispatchWatchEvent(y,b){var A;const S=(A=this.treeModel)===null||A===void 0?void 0:A.root.watchEvents.get(y);S&&S.callback&&S.callback(b)}collapsedAll(){var y;(y=this.treeModel)===null||y===void 0||y.root.collapsedAll()}async refresh(y){if(!y)if(this.treeModel)y=this.treeModel.root;else return;!s.ExpressionContainer.is(y)&&y.parent&&(y=y.parent),this.queueChangeEvent(y.path,()=>{this.onDidRefreshedEmitter.fire()})}queueChangeEvent(y,b){this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new p.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout(async()=>{var A;await this.flushEventQueue(),(A=this.flushEventQueueDeferred)===null||A===void 0||A.resolve(),this.flushEventQueueDeferred=null,b()},n.DEFAULT_REFRESH_DELAY)),this._changeEventDispatchQueue.indexOf(y)===-1&&this._changeEventDispatchQueue.push(y)}};t.DebugWatchModelService=f,f.DEFAULT_REFRESH_DELAY=100,f.DEFAULT_TRIGGER_DELAY=200,f.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY="watchers",r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],f.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(v.ICtxMenuRenderer),r.__metadata("design:type",v.ICtxMenuRenderer)],f.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,o.Autowired)(v.AbstractContextMenuService),r.__metadata("design:type",v.AbstractContextMenuService)],f.prototype,"contextMenuService",void 0),r.__decorate([(0,o.Autowired)(g.DebugViewModel),r.__metadata("design:type",g.DebugViewModel)],f.prototype,"viewModel",void 0),r.__decorate([(0,o.Autowired)(h.IDebugSessionManager),r.__metadata("design:type",m.DebugSessionManager)],f.prototype,"manager",void 0),r.__decorate([(0,o.Autowired)(p.IReporterService),r.__metadata("design:type",Object)],f.prototype,"reporterService",void 0),r.__decorate([(0,o.Autowired)(p.IContextKeyService),r.__metadata("design:type",Object)],f.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(p.StorageProvider),r.__metadata("design:type",Function)],f.prototype,"storageProvider",void 0),r.__decorate([(0,o.Autowired)(p.IClipboardService),r.__metadata("design:type",Object)],f.prototype,"clipboardService",void 0),t.DebugWatchModelService=f=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],f)},14600:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WatchPanelContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(93899),p=e(64582),v=e(98650),m=e(4983),_=e(95033);let s=class{registerCommands(l){l.registerCommand(p.DEBUG_COMMANDS.ADD_WATCHER,{execute:()=>{this.debugWatchModelService.newDebugWatchNodePrompt()}}),l.registerCommand(p.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER,{execute:()=>{this.debugWatchModelService.collapsedAll()}}),l.registerCommand(p.DEBUG_COMMANDS.REMOVE_ALL_WATCHER,{execute:()=>{this.debugWatchModelService.clearAllExpression()}}),l.registerCommand(p.DEBUG_COMMANDS.REMOVE_WATCHER,{execute:h=>{h instanceof v.DebugWatchNode&&this.debugWatchModelService.removeDebugWatchNode(h);const[u]=this.debugWatchModelService.selectedNodes;u instanceof v.DebugWatchNode&&this.debugWatchModelService.removeDebugWatchNode(u)}}),l.registerCommand(p.DEBUG_COMMANDS.EDIT_WATCHER,{execute:h=>{this.debugWatchModelService.renameDebugWatchNodePrompt(h)}}),l.registerCommand(p.DEBUG_COMMANDS.COPY_WATCHER_VALUE,{execute:h=>{this.debugWatchModelService.copyValue(h)}})}registerToolbarItems(l){l.registerItem({id:p.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,command:p.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,iconClass:(0,o.getIcon)("close-all"),viewId:p.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.removeAll")}),l.registerItem({id:p.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER.id,iconClass:(0,o.getIcon)("collapse-all"),command:p.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER.id,viewId:p.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.collapseAll"),when:m.CONTEXT_IN_DEBUG_MODE.raw}),l.registerItem({id:p.DEBUG_COMMANDS.ADD_WATCHER.id,iconClass:(0,o.getIcon)("plus"),command:p.DEBUG_COMMANDS.ADD_WATCHER.id,viewId:p.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.add"),when:m.CONTEXT_IN_DEBUG_MODE.raw})}registerMenus(l){l.registerMenuItem(a.MenuId.DebugWatchContext,{command:{id:p.DEBUG_COMMANDS.ADD_WATCHER.id,label:(0,o.localize)("debug.watch.add")},order:10,group:"3_modification"}),l.registerMenuItem(a.MenuId.DebugWatchContext,{command:{id:p.DEBUG_COMMANDS.EDIT_WATCHER.id,label:(0,o.localize)("debug.watch.edit")},when:m.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression"),order:20,group:"3_modification"}),l.registerMenuItem(a.MenuId.DebugWatchContext,{command:{id:p.DEBUG_COMMANDS.COPY_WATCHER_VALUE.id,label:(0,o.localize)("debug.watch.copyValue")},when:`${m.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression")} || ${m.CONTEXT_WATCH_ITEM_TYPE.equalsTo("variable")} && ${m.CONTEXT_IN_DEBUG_MODE.raw}`,order:30,enabledWhen:m.CONTEXT_IN_DEBUG_MODE.raw,group:"3_modification"}),l.registerMenuItem(a.MenuId.DebugWatchContext,{command:{id:p.DEBUG_COMMANDS.REMOVE_WATCHER.id,label:(0,o.localize)("debug.watch.remove")},when:m.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression"),order:10,group:"z_commands"}),l.registerMenuItem(a.MenuId.DebugWatchContext,{command:{id:p.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,label:(0,o.localize)("debug.watch.removeAll")},order:20,group:"z_commands"})}registerKeybindings(l){l.registerKeybinding({command:p.DEBUG_COMMANDS.REMOVE_WATCHER.id,keybinding:"ctrlcmd+backspace",when:m.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.raw})}onStart(){this.debugWatchModelService.load()}};t.WatchPanelContribution=s,n.__decorate([(0,r.Autowired)(_.DebugWatchModelService),n.__metadata("design:type",_.DebugWatchModelService)],s.prototype,"debugWatchModelService",void 0),t.WatchPanelContribution=s=n.__decorate([(0,o.Domain)(o.ClientAppContribution,a.MenuContribution,o.CommandContribution,o.TabBarToolbarContribution,o.KeybindingContribution)],s)},64611:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_WATCH_TREE_NODE_HEIGHT=t.DebugWatchRenderedNode=t.DebugWatchView=t.DEBUG_WATCH_TREE_FIELD_NAME=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(97267),p=e(41869),v=e(98650),m=e(95033),_=n.__importDefault(e(21315));t.DEBUG_WATCH_TREE_FIELD_NAME="DEBUG_WATCH_TREE_FIELD";const s=({viewState:l})=>{const h=(0,p.useInjectable)(m.DebugWatchModelService),u=22,d=o.default.useRef(null),[E,f]=o.default.useState(),{height:c}=l;o.default.useEffect(()=>y(),[]);const y=()=>{const M=h.treeModel;let O=!0;const x=new p.DisposableCollection;return x.push(p.Disposable.create(()=>{O=!1})),M&&M.ensureReady.then(()=>{O&&f(M)}),x.push(h.onDidUpdateTreeModel(async k=>{k&&await k.ensureReady,O&&f(k)})),()=>{h.removeNodeDecoration(),x.dispose()}},b=M=>{h.handleTreeHandler({...M,getModel:()=>E,hasDirectFocus:()=>d.current===document.activeElement})},A=(M,O,x)=>{M.stopPropagation();const{handleTwistierClick:k}=h;O&&k(O,x)},S=(M,O)=>{const{handleContextMenu:x}=h;x(M,O)},D=M=>{const{handleContextMenu:O}=h;O(M)},I=M=>{const{enactiveNodeDecoration:O}=h;O()},w=M=>{const{enactiveNodeDecoration:O}=h;O()},T=o.default.useCallback(M=>{const O=h.decorations.getDecorations(M.item);return o.default.createElement(t.DebugWatchRenderedNode,{item:M.item,itemType:M.itemType,decorations:O,onClick:A,onTwistierClick:A,onContextMenu:S,defaultLeftPadding:12,leftPadding:8})},[E]),R=()=>E?o.default.createElement(a.RecycleTree,{height:c,itemHeight:u,onReady:b,model:E,placeholder:()=>o.default.createElement("span",null)},T):o.default.createElement("span",null);return o.default.createElement("div",{className:_.default.debug_watch_container,tabIndex:-1,ref:d,onContextMenu:D,onClick:I,onBlur:w,"data-name":t.DEBUG_WATCH_TREE_FIELD_NAME},R())};t.DebugWatchView=s;const g=({item:l,decorations:h,defaultLeftPadding:u,leftPadding:d,onClick:E,onTwistierClick:f,onContextMenu:c,itemType:y})=>{const b=(0,p.useDesignStyles)(_.default.expansion_toggle,"expansion_toggle"),A=y===a.TreeNodeType.RenamePrompt,S=y===a.TreeNodeType.NewPrompt,D=A||S,I=B=>{const U=l.getRawWatch();U&&E(B,l,U.variablesReference>0?a.TreeNodeType.CompositeTreeNode:a.TreeNodeType.TreeNode)},w=B=>{B.nativeEvent.which!==0&&(y===a.TreeNodeType.TreeNode||y===a.TreeNodeType.CompositeTreeNode)&&c&&c(B,l,y)},T={height:t.DEBUG_WATCH_TREE_NODE_HEIGHT,lineHeight:`${t.DEBUG_WATCH_TREE_NODE_HEIGHT}px`,paddingLeft:`${(u||8)+(l.depth||0)*(d||0)}px`},R=B=>D&&B instanceof a.PromptHandle?o.default.createElement("div",{className:(0,r.default)(_.default.debug_watch_node_segment,_.default.debug_watch_node_inputbox)},o.default.createElement("div",{className:(0,r.default)("input-box",_.default.debug_watch_node_prompt_box)},o.default.createElement(B.ProxiedInput,{wrapperStyle:{height:t.DEBUG_WATCH_TREE_NODE_HEIGHT,padding:"0 5px"}}))):o.default.createElement("div",{className:(0,r.default)(_.default.debug_watch_node_segment,_.default.debug_watch_node_displayname,_.default.debug_watch_variable,B.description?_.default.name:"")},B.name,B.description?":":""),M=B=>{const U=/^true|false$/i,W=/^(['"]).*\1$/,j=B.description?B.description.replace("function","\u0192 "):"",Q=[_.default.debug_watch_variable];return D?null:(l.variableType==="number"||l.variableType==="boolean"||l.variableType==="string"?Q.push(_.default[l.variableType]):isNaN(+j)?U.test(j)?Q.push(_.default.boolean):W.test(j)&&Q.push(_.default.string):Q.push(_.default.number),o.default.createElement("div",{className:(0,r.default)(_.default.debug_watch_node_segment_grow,_.default.debug_watch_node_description,...Q)},j))},O=()=>o.default.createElement("div",{className:(0,r.default)(_.default.debug_watch_node_segment,_.default.debug_watch_node_tail)},x()),x=()=>o.default.createElement("div",{className:_.default.debug_watch_node_status},l.badge),k=()=>l.tooltip,F=(B,U)=>{const W=j=>{U(j,B,y)};return h&&h?.classlist.indexOf(_.default.mod_loading)>-1?o.default.createElement("div",{className:(0,r.default)(_.default.debug_watch_node_segment,b)},o.default.createElement(a.Loading,null)):o.default.createElement("div",{onClick:W,className:(0,r.default)(_.default.debug_watch_node_segment,b,(0,p.getIcon)("right"),{[`${_.default.mod_collapsed}`]:!B.expanded})})},L=B=>{if(v.DebugWatchNode.is(B)){if(B.available&&B.variablesReference)return F(B,f)}else if(v.ExpressionContainer.is(B)&&B.variablesReference)return F(B,f)};return o.default.createElement("div",{key:l.id,onClick:I,onContextMenu:w,title:k(),className:(0,r.default)(_.default.debug_watch_node,h?h.classlist:null),style:T,"data-id":l.id},o.default.createElement("div",{className:(0,r.default)(_.default.debug_watch_node_content)},L(l),o.default.createElement("div",{style:{height:t.DEBUG_WATCH_TREE_NODE_HEIGHT},className:D?_.default.debug_watch_node_prompt_wrap:_.default.debug_watch_node_overflow_wrap},R(l),M(l)),O()))};t.DebugWatchRenderedNode=g,t.DEBUG_WATCH_TREE_NODE_HEIGHT=22},46118:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_COMMANDS=void 0;var e;(function(n){n.ADD_WATCHER={id:"debug.watch.add"},n.COLLAPSE_ALL_WATCHER={id:"debug.watch.collapseAll"},n.REMOVE_ALL_WATCHER={id:"debug.watch.removeAll"},n.REMOVE_WATCHER={id:"debug.watch.remove"},n.EDIT_WATCHER={id:"debug.watch.edit"},n.COPY_WATCHER_VALUE={id:"debug.watch.copyValue"},n.REMOVE_ALL_BREAKPOINTS={id:"debug.breakpoints.remove.all"},n.TOGGLE_BREAKPOINTS={id:"debug.breakpoints.toggle"},n.ACTIVE_BREAKPOINTS={id:"debug.breakpoints.active"},n.DEACTIVE_BREAKPOINTS={id:"debug.breakpoints.deactive"},n.START={id:"debug.start"},n.NEXT={id:"debug.next"},n.PREV={id:"debug.prev"},n.OVER={id:"debug.over"},n.STOP={id:"debug.stop"},n.CONTINUE={id:"debug.continue"},n.RESTART={id:"debug.restart"},n.PAUSE={id:"debug.pause"},n.DELETE_BREAKPOINT={id:"debug.delete.breakpoint",label:"%debug.menu.delete.breakpoint%"},n.EDIT_BREAKPOINT={id:"debug.edit.breakpoint",label:"%debug.menu.edit.breakpoint%"},n.DISABLE_BREAKPOINT={id:"debug.disable.breakpoint",label:"%debug.menu.disable.breakpoint%"},n.ENABLE_BREAKPOINT={id:"debug.enable.breakpoint",label:"%debug.menu.enable.breakpoint%"},n.ENABLE_LOGPOINT={id:"debug.enable.logpoint",label:"%debug.menu.enable.logpoint"},n.ADD_BREAKPOINT={id:"debug.add.breakpoint",label:"%debug.menu.add.breakpoint%"},n.ADD_LOGPOINT={id:"debug.add.logpoint",label:"%debug.menu.add.logpoint%"},n.ADD_CONDITIONAL_BREAKPOINT={id:"debug.add.conditional",label:"%debug.menu.add.conditional%"},n.RESTART_FRAME={id:"debug.callstack.restart.frame"},n.COPY_STACK_TRACE={id:"debug.callstack.copy"},n.SET_VARIABLE_VALUE={id:"debug.variables.setValue"},n.COPY_VARIABLE_VALUE={id:"debug.variables.copy"},n.COPY_EVALUATE_PATH={id:"debug.evaluate.copy"},n.ADD_TO_WATCH_ID={id:"debug.addToWatchExpressions"},n.VIEW_MEMORY_ID={id:"debug.variables.view.memory"},n.CLEAR_CONSOLE={id:"debug.console.clear",label:"%debug.console.clear%"},n.COPY_CONSOLE_ITEM={id:"debug.console.copy"},n.COPY_CONSOLE_ALL={id:"debug.console.copyALl"},n.COLLAPSE_ALL_CONSOLE_ITEM={id:"debug.console.collapseAll",label:"%debug.console.collapseAll%"},n.CONSOLE_ENTER_EVALUATE={id:"debug.console.keybing.enter.evaluate"},n.CONSOLE_INPUT_DOWN_ARROW={id:"debug.console.input.down.arrow"},n.CONSOLE_INPUT_UP_ARROW={id:"debug.console.input.up.arrow"},n.CONSOLE_FILTER_FOCUS={id:"debug.console.filter.input.focus"},n.RUN_TO_CURSOR={id:"debug.action.runToCursor",label:"%debug.action.runToCursor%"},n.FORCE_RUN_TO_CURSOR={id:"debug.action.forceRunToCursor",label:"%debug.action.forceRunToCursor%"},n.EXCEPTION_WIDGET_CLOSE={id:"debug.action.closeExceptionWidget"},n.SHOW_ALL_AUTOMATIC_DEBUG_CONFIGURATIONS={id:"debug.showAllAutomaticDebugConfigurations"}})(e||(t.DEBUG_COMMANDS=e={}))},4983:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_DEBUGGERS_AVAILABLE=t.CONTEXT_BREAKPOINTS_EXIST=t.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=t.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=t.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=t.CONTEXT_RESTART_FRAME_SUPPORTED=t.CONTEXT_STEP_BACK_SUPPORTED=t.CONTEXT_FOCUSED_SESSION_IS_ATTACH=t.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=t.CONTEXT_LOADED_SCRIPTS_SUPPORTED=t.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=t.CONTEXT_BREAKPOINT_ACCESS_TYPE=t.CONTEXT_BREAKPOINT_ITEM_TYPE=t.CONTEXT_WATCH_ITEM_TYPE=t.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=t.CONTEXT_CALLSTACK_ITEM_STOPPED=t.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=t.CONTEXT_CALLSTACK_ITEM_TYPE=t.CONTEXT_BREAKPOINT_INPUT_FOCUSED=t.CONTEXT_EXPRESSION_SELECTED=t.CONTEXT_VARIABLES_FOCUSED=t.CONTEXT_WATCH_EXPRESSIONS_EXIST=t.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=t.CONTEXT_BREAKPOINTS_FOCUSED=t.CONTEXT_IN_BREAKPOINT_WIDGET=t.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=t.CONTEXT_IN_DEBUG_CONSOLE=t.CONTEXT_IN_DEBUG_REPL=t.CONTEXT_IN_DEBUG_MODE=t.CONTEXT_DEBUG_UX=t.CONTEXT_DEBUG_UX_KEY=t.CONTEXT_DEBUG_STATE=t.CONTEXT_DEBUG_CONFIGURATION_TYPE=t.CONTEXT_DEBUG_TYPE=t.CONTEXT_DEBUG_TYPE_KEY=t.CONTEXT_IN_DEBUG_MODE_KEY=t.CONTEXT_DEBUG_STOPPED_KEY=t.DEBUG_SCHEME=t.DEBUG_FLOATING_CLICK_WIDGET=t.DEBUG_STACK_ID=t.DEBUG_WELCOME_ID=t.DEBUG_BREAKPOINTS_ID=t.DEBUG_VARIABLES_ID=t.DEBUG_THREAD_ID=t.DEBUG_WATCH_ID=t.DEBUG_MEMORY_SCHEME=t.LAUNCH_VIEW_COMPONENT_ID=t.LAUNCH_VIEW_SCHEME=t.DEBUG_CONTAINER_ID=t.DEBUG_CONSOLE_CONTAINER_ID=void 0,t.CONTEXT_ACTIVE_BREAKPOINTS=t.CONTEXT_CAN_VIEW_MEMORY=t.CONTEXT_MULTI_SESSION_DEBUG=t.CONTEXT_MULTI_SESSION_REPL=t.CONTEXT_EXCEPTION_WIDGET_VISIBLE=t.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=t.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=t.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=t.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=t.CONTEXT_SET_VARIABLE_SUPPORTED=t.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=void 0;const n=e(30144);Object.defineProperty(t,"DEBUG_CONSOLE_CONTAINER_ID",{enumerable:!0,get:function(){return n.DEBUG_CONSOLE_CONTAINER_ID}}),Object.defineProperty(t,"DEBUG_CONTAINER_ID",{enumerable:!0,get:function(){return n.DEBUG_CONTAINER_ID}});const r=e(40191);t.LAUNCH_VIEW_SCHEME="launch_view_scheme",t.LAUNCH_VIEW_COMPONENT_ID="launch-view",t.DEBUG_MEMORY_SCHEME="vscode-debug-memory",t.DEBUG_WATCH_ID="debug-watch",t.DEBUG_THREAD_ID="debug-thread",t.DEBUG_VARIABLES_ID="debug-variable",t.DEBUG_BREAKPOINTS_ID="debug-breakpoints",t.DEBUG_WELCOME_ID="debug-welcome",t.DEBUG_STACK_ID="debug-stack",t.DEBUG_FLOATING_CLICK_WIDGET="debug.overlayWidget.floatingClickWidget",t.DEBUG_SCHEME="debug",t.CONTEXT_DEBUG_STOPPED_KEY="debugStopped",t.CONTEXT_IN_DEBUG_MODE_KEY="inDebugMode",t.CONTEXT_DEBUG_TYPE_KEY="debugType",t.CONTEXT_DEBUG_TYPE=new r.RawContextKey("debugType",void 0),t.CONTEXT_DEBUG_CONFIGURATION_TYPE=new r.RawContextKey("debugConfigurationType",void 0),t.CONTEXT_DEBUG_STATE=new r.RawContextKey("debugState","Inactive"),t.CONTEXT_DEBUG_UX_KEY="debugUx",t.CONTEXT_DEBUG_UX=new r.RawContextKey(t.CONTEXT_DEBUG_UX_KEY,"default"),t.CONTEXT_IN_DEBUG_MODE=new r.RawContextKey("inDebugMode",!1),t.CONTEXT_IN_DEBUG_REPL=new r.RawContextKey("inDebugRepl",!1),t.CONTEXT_IN_DEBUG_CONSOLE=new r.RawContextKey("inDebugConsole",!1),t.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=new r.RawContextKey("breakpointWidgetVisible",!1),t.CONTEXT_IN_BREAKPOINT_WIDGET=new r.RawContextKey("inBreakpointWidget",!1),t.CONTEXT_BREAKPOINTS_FOCUSED=new r.RawContextKey("breakpointsFocused",!0),t.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=new r.RawContextKey("watchExpressionsFocused",!0),t.CONTEXT_WATCH_EXPRESSIONS_EXIST=new r.RawContextKey("watchExpressionsExist",!1),t.CONTEXT_VARIABLES_FOCUSED=new r.RawContextKey("variablesFocused",!0),t.CONTEXT_EXPRESSION_SELECTED=new r.RawContextKey("expressionSelected",!1),t.CONTEXT_BREAKPOINT_INPUT_FOCUSED=new r.RawContextKey("breakpointInputFocused",!1),t.CONTEXT_CALLSTACK_ITEM_TYPE=new r.RawContextKey("callStackItemType",void 0),t.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=new r.RawContextKey("callStackSessionIsAttach",!1),t.CONTEXT_CALLSTACK_ITEM_STOPPED=new r.RawContextKey("callStackItemStopped",!1),t.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=new r.RawContextKey("callStackSessionHasOneThread",!1),t.CONTEXT_WATCH_ITEM_TYPE=new r.RawContextKey("watchItemType",void 0),t.CONTEXT_BREAKPOINT_ITEM_TYPE=new r.RawContextKey("breakpointItemType",void 0),t.CONTEXT_BREAKPOINT_ACCESS_TYPE=new r.RawContextKey("breakpointAccessType",void 0),t.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=new r.RawContextKey("breakpointSupportsCondition",!1),t.CONTEXT_LOADED_SCRIPTS_SUPPORTED=new r.RawContextKey("loadedScriptsSupported",!1),t.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=new r.RawContextKey("loadedScriptsItemType",void 0),t.CONTEXT_FOCUSED_SESSION_IS_ATTACH=new r.RawContextKey("focusedSessionIsAttach",!1),t.CONTEXT_STEP_BACK_SUPPORTED=new r.RawContextKey("stepBackSupported",!1),t.CONTEXT_RESTART_FRAME_SUPPORTED=new r.RawContextKey("restartFrameSupported",!1),t.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=new r.RawContextKey("stackFrameSupportsRestart",!1),t.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=new r.RawContextKey("jumpToCursorSupported",!1),t.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=new r.RawContextKey("stepIntoTargetsSupported",!1),t.CONTEXT_BREAKPOINTS_EXIST=new r.RawContextKey("breakpointsExist",!1),t.CONTEXT_DEBUGGERS_AVAILABLE=new r.RawContextKey("debuggersAvailable",!1),t.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=new r.RawContextKey("debugProtocolVariableMenuContext",void 0),t.CONTEXT_SET_VARIABLE_SUPPORTED=new r.RawContextKey("debugSetVariableSupported",!1),t.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=new r.RawContextKey("breakWhenValueChangesSupported",!1),t.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=new r.RawContextKey("breakWhenValueIsAccessedSupported",!1),t.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=new r.RawContextKey("breakWhenValueIsReadSupported",!1),t.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=new r.RawContextKey("variableEvaluateNamePresent",!1),t.CONTEXT_EXCEPTION_WIDGET_VISIBLE=new r.RawContextKey("exceptionWidgetVisible",!1),t.CONTEXT_MULTI_SESSION_REPL=new r.RawContextKey("multiSessionRepl",!1),t.CONTEXT_MULTI_SESSION_DEBUG=new r.RawContextKey("multiSessionDebug",!1),t.CONTEXT_CAN_VIEW_MEMORY=new r.RawContextKey("canViewMemory",void 0),t.CONTEXT_ACTIVE_BREAKPOINTS=new r.RawContextKey("activateBreakpoints",!0)},95581:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},53670:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MASSIVE_PROPERTY_FLAG=t.DEFAULT_CONFIGURATION_INDEX_SEPARATOR=t.DEFAULT_CONFIGURATION_NAME_SEPARATOR=t.DEFAULT_NO_CONFIGURATION_KEY=t.DEFAULT_DYNAMIC_CONFIGURATION_KEY=t.DEFAULT_EDIT_CONFIGURATION_KEY=t.DEFAULT_ADD_CONFIGURATION_KEY=t.DebugConfiguration=void 0;var e;(function(n){function r(o){return!!o&&typeof o=="object"&&"type"in o&&"name"in o&&"request"in o}n.is=r})(e||(t.DebugConfiguration=e={})),t.DEFAULT_ADD_CONFIGURATION_KEY="__ADD_CONF__",t.DEFAULT_EDIT_CONFIGURATION_KEY="__EDIT_CONF__",t.DEFAULT_DYNAMIC_CONFIGURATION_KEY="__DYNAMIC_CONF__",t.DEFAULT_NO_CONFIGURATION_KEY="__NO_CONF__",t.DEFAULT_CONFIGURATION_NAME_SEPARATOR="__CONF__",t.DEFAULT_CONFIGURATION_INDEX_SEPARATOR="__INDEX__",t.MASSIVE_PROPERTY_FLAG="massive_property_flag"},70049:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugConsoleModelService=void 0,t.IDebugConsoleModelService=Symbol("IDebugConsoleModelService")},24395:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugEditor=void 0,t.DebugEditor=Symbol("DebugEditor")},91797:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFrameDeemphasized=e;function e(n){var r,o;const a=(r=n.presentationHint)!==null&&r!==void 0?r:(o=n.source)===null||o===void 0?void 0:o.presentationHint;return a==="deemphasize"||a==="subtle"}},2242:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},32385:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugModelManager=t.DebugModelSupportedEventType=t.MemoryRegion=t.IDebugModel=t.DebugModelFactory=t.DebugAdapterContribution=t.DebugAdapterFactory=t.DebugAdapterSessionFactory=t.DebugAdapterSession=void 0;const n=e(43718);t.DebugAdapterSession=Symbol("DebugAdapterSession"),t.DebugAdapterSessionFactory=Symbol("DebugAdapterSessionFactory"),t.DebugAdapterFactory=Symbol("DebugAdapterFactory"),t.DebugAdapterContribution=Symbol("DebugAdapterContribution"),t.DebugModelFactory=Symbol("DebugModelFactory"),t.IDebugModel=Symbol("IDebugModel");class r extends n.Disposable{constructor(p,v){super(),this.memoryReference=p,this.session=v,this.invalidateEmitter=this.registerDispose(new n.Emitter),this.onDidInvalidate=this.invalidateEmitter.event,this.writable=!!this.session.capabilities.supportsWriteMemoryRequest,this.registerDispose(v.onDidInvalidateMemory(m=>{m.body.memoryReference===p&&this.invalidate(m.body.offset,m.body.count-m.body.offset)}))}async read(p,v){var m;const _=v-p,s=p,g=await this.session.readMemory(this.memoryReference,s,_);if(g===void 0||!(!((m=g.body)===null||m===void 0)&&m.data))return[{type:1,offset:s,length:_}];let l;try{l=(0,n.decodeBase64)(g.body.data)}catch(d){return[{type:2,offset:s,length:_,error:d.message}]}const h=g.body.unreadableBytes||0,u=_-h;if(l.byteLength<u){const d=n.BinaryBuffer.alloc(u-l.byteLength);d.buffer.fill(0),l=n.BinaryBuffer.concat([l,d],u)}else l.byteLength>u&&(l=l.slice(0,u));return h?[{type:0,offset:s,length:u,data:l},{type:1,offset:s+u,length:h}]:[{type:0,offset:s,length:_,data:l}]}async write(p,v){var m,_;const s=await this.session.writeMemory(this.memoryReference,p,(0,n.encodeBase64)(v),!0),g=(_=(m=s?.body)===null||m===void 0?void 0:m.bytesWritten)!==null&&_!==void 0?_:v.byteLength;return this.invalidate(p,p+g),g}dispose(){super.dispose()}invalidate(p,v){this.invalidateEmitter.fire({fromOffset:p,toOffset:v})}}t.MemoryRegion=r;var o;(function(a){a.down="Down",a.move="Move",a.leave="Leave",a.contextMenu="contextMenu"})(o||(t.DebugModelSupportedEventType=o={})),t.IDebugModelManager=Symbol("DebugModelManager")},79845:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugProgress=void 0,t.IDebugProgress=Symbol("DebugProgress")},60709:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSON_SCHEMA_TYPE=t.launchDefaultSchemaUri=t.launchExtensionSchemaUri=t.launchSchemaUri=void 0,t.launchSchemaUri="vscode://schemas/launch",t.launchExtensionSchemaUri="vscode://schemas/launch/extension",t.launchDefaultSchemaUri="vscode://schemas/launch/user";var e;(function(n){n.ARRAY="array",n.BOOLEAN="boolean",n.NULL="null",n.NUMBER="number",n.OBJECT="object",n.STRING="string"})(e||(t.JSON_SCHEMA_TYPE=e={}))},70159:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILaunchService=t.IDebugService=t.IDebugServer=t.DebugAdapterPath=t.DebugConfigurationProviderTriggerKind=void 0;var e;(function(n){n[n.Initial=1]="Initial",n[n.Dynamic=2]="Dynamic"})(e||(t.DebugConfigurationProviderTriggerKind=e={})),t.DebugAdapterPath="DebugAdaptor",t.IDebugServer=Symbol("DebugServer"),t.IDebugService=Symbol("DebugService"),t.ILaunchService=Symbol("ILaunchService")},50883:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugSessionDTO=void 0;var e;(function(n){function r(o){return"id"in o}n.is=r})(e||(t.IDebugSessionDTO=e={}))},26296:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugSessionManager=t.IDebugSession=t.DebugState=void 0,t.getSequenceId=r;var e;(function(o){o[o.Inactive=0]="Inactive",o[o.Initializing=1]="Initializing",o[o.Running=2]="Running",o[o.Stopped=3]="Stopped"})(e||(t.DebugState=e={})),t.IDebugSession=Symbol("DebugSession"),t.IDebugSessionManager=Symbol("DebugSessionManager");let n=1;function r(){return n++}},64582:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(53670),t),n.__exportStar(e(70159),t),n.__exportStar(e(2242),t),n.__exportStar(e(95581),t),n.__exportStar(e(32385),t),n.__exportStar(e(26296),t),n.__exportStar(e(70049),t),n.__exportStar(e(50883),t),n.__exportStar(e(24395),t),n.__exportStar(e(79845),t),n.__exportStar(e(60709),t),n.__exportStar(e(7428),t),n.__exportStar(e(37723),t),n.__exportStar(e(4983),t),n.__exportStar(e(71120),t),n.__exportStar(e(46118),t)},7428:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},71120:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWindowsDriveLetter=r,t.hasDriveLetter=o,t.getDriveLetter=a,t.prepareCommand=p;const n=e(43718);function r(v){return v>=65&&v<=90||v>=97&&v<=122}function o(v,m=n.isWindows){return m?r(v.charCodeAt(0))&&v.charCodeAt(1)===58:!1}function a(v){return o(v)?v[0]:void 0}function p(v,m,_,s,g){v=v.trim().toLowerCase();let l;v.indexOf("powershell")>=0||v.indexOf("pwsh")>=0?l=1:v.indexOf("cmd.exe")>=0?l=0:v.indexOf("bash")>=0?l=2:n.isWindows?l=0:l=2;let h,u=" ";switch(l){case 1:if(h=d=>(d=d.replace(/'/g,"''"),d.length>0&&d.charAt(d.length-1)==="\\"?`'${d}\\'`:`'${d}'`),s){const d=a(s);d&&(u+=`${d}:; `),u+=`cd ${h(s)}; `}if(g)for(const d in g){const E=g[d];E===null?u+=`Remove-Item env:${d}; `:u+=`\${env:${d}}='${E}'; `}if(m.length>0){const d=m.shift(),E=_?d:h(d);u+=E[0]==="'"?`& ${E} `:`${E} `;for(const f of m)u+=f==="<"||f===">"||_?f:h(f),u+=" "}break;case 0:if(h=d=>(d=d.replace(/"/g,'""'),d=d.replace(/([><!^&|])/g,"^$1"),' "'.split("").some(E=>d.includes(E))||d.length===0?`"${d}"`:d),s){const d=a(s);d&&(u+=`${d}: && `),u+=`cd ${h(s)} && `}if(g){u+='cmd /C "';for(const d in g){let E=g[d];E===null?u+=`set "${d}=" && `:(E=E.replace(/[&^|<>]/g,f=>`^${f}`),u+=`set "${d}=${E}" && `)}}for(const d of m)u+=d==="<"||d===">"||_?d:h(d),u+=" ";g&&(u+='"');break;case 2:{h=E=>(E=E.replace(/(["'\\$!><#()[\]*&^| ;{}`])/g,"\\$1"),E.length===0?'""':E);const d=E=>/[^\w@%/+=,.:^-]/.test(E)?`'${E.replace(/'/g,"'\\''")}'`:E;if(s&&(u+=`cd ${h(s)} ; `),g){u+="/usr/bin/env";for(const E in g){const f=g[E];f===null?u+=` -u ${d(E)}`:u+=` ${d(`${E}=${f}`)}`}u+=" "}for(const E of m)u+=E==="<"||E===">"||_?E:h(E),u+=" ";break}}return u}},37723:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConfigurationsReadyEvent=t.DEBUG_REPORT_NAME=void 0;const n=e(43718);var r;(function(a){a.DEBUG_SESSION_START_TIME="debugSessionStartTime",a.DEBUG_PRE_LAUNCH_TASK_TIME="debugPreLaunchTaskTime",a.DEBUG_TOOLBAR_OPERATION_TIME="debugToolBarOperationTime",a.DEBUG_TOOLBAR_OPERATION="debugToolBarOperation",a.DEBUG_PANEL_OPERATION_FOLDEXPR="debugPanelOperationFoldexpr",a.DEBUG_WATCH="debugWatch",a.DEBUG_VARIABLES="debugVariables",a.DEBUG_BREAKPOINT="debugBreakpoint",a.DEBUG_ADAPTER_PROTOCOL_TIME="debugAdapterProtocolTime",a.DEBUG_STOPPED="debugStopped",a.DEBUG_UI_FRONTEND_TIME="debugFrontEndTime"})(r||(t.DEBUG_REPORT_NAME=r={}));class o extends n.BasicEvent{}t.DebugConfigurationsReadyEvent=o},66482:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(64582),t)},83670:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDecorationsService=void 0;const n=e(85608),r=e(76003),o=e(43718),{isFalsyOrWhitespace:a}=o.strings,{asArray:p}=o.arrays;class v{constructor(){this._data=o.TernarySearchTree.forPaths()}affectsResource(u){return this._data.get(u.toString())||this._data.findSuperstr(u.toString())!==void 0}static debouncer(u,d){if(u||(u=new v),Array.isArray(d))for(const E of d)u._data.set(E.toString(),!0);else u._data.set(d.toString(),!0);return u}}class m{constructor(u,d){this.source=u,this.thenable=d}}class _{constructor(u,d,E){this._provider=u,this._uriEmitter=d,this._flushEmitter=E,this.data=o.TernarySearchTree.forPaths(),this._dispoable=this._provider.onDidChange(f=>{if(!f)this.data.clear(),this._flushEmitter.fire({affectsResource(){return!0}});else for(const c of f)this._fetchData(c)})}dispose(){this._dispoable.dispose(),this.data.clear()}knowsAbout(u){return!!this.data.get(u.toString())||!!this.data.findSuperstr(u.toString())}getOrRetrieve(u,d,E){const f=u.toString();let c=this.data.get(f);if(c===void 0&&(c=this._fetchData(u)),c&&!(c instanceof m)&&E(c,!1),d){const y=this.data.findSuperstr(f);if(y)for(let b=y.next();!b.done;b=y.next())b.value&&!(b.value instanceof m)&&E(b.value,!0)}}_fetchData(u){const d=this.data.get(u.toString());d instanceof m&&(d.source.cancel(),this.data.delete(u.toString()));const E=new o.CancellationTokenSource,f=this._provider.provideDecorations(u,E.token);if((0,o.isThenable)(f)){const c=new m(E,Promise.resolve(f).then(y=>{this.data.get(u.toString())===c&&this._keepItem(u,y)}).catch(y=>{!(0,o.isPromiseCanceledError)(y)&&this.data.get(u.toString())===c&&this.data.delete(u.toString())}));return this.data.set(u.toString(),c),null}else return this._keepItem(u,f)}_keepItem(u,d){const E=d||null,f=this.data.set(u.toString(),E);return(E||f)&&this._uriEmitter.fire(u),E}}function s(h){return p(h).map(({color:d,letter:E})=>`${d}/${E}`).join(",")}function g(h){const u=p(h);if(u.length)return{key:s(h),color:u[0].color,badge:u.filter(d=>!a(d.letter)).map(d=>d.letter).join(","),tooltip:u.filter(d=>!a(d.tooltip)).map(d=>d.tooltip).join(" \u2022 ")}}let l=class extends o.Disposable{constructor(){super(...arguments),this.logger=(0,o.getDebugLogger)(),this._data=new o.LinkedList,this._onDidChangeDecorationsDelayed=new o.Emitter,this._onDidChangeDecorations=new o.Emitter,this.onDidChangeDecorations=o.Event.any(this._onDidChangeDecorations.event,o.Event.debounce(this._onDidChangeDecorationsDelayed.event,v.debouncer,void 0,void 0,500))}dispose(){(0,o.dispose)(this._onDidChangeDecorations),(0,o.dispose)(this._onDidChangeDecorationsDelayed)}registerDecorationsProvider(u){this.logger.log("DecorationService#registerDecorationsProvider",u);const d=new _(u,this._onDidChangeDecorationsDelayed,this._onDidChangeDecorations),E=this._data.push(d);return this._onDidChangeDecorations.fire({affectsResource(){return!0}}),(0,o.toDisposable)(()=>{E(),this._onDidChangeDecorations.fire({affectsResource:f=>d.knowsAbout(f)}),d.dispose()})}getDecoration(u,d){const E=[];let f=!1;for(let c=this._data.iterator(),y=c.next();!y.done;y=c.next())y.value.getOrRetrieve(u,d,(b,A)=>{(!A||b.bubble)&&(E.push(b),f=A||f)});if(E.length!==0)return this.asDecoration(E,f)}asDecoration(u,d){u.sort((f,c)=>(c.weight||0)-(f.weight||0));const E=g(u);return E&&d&&(E.badge="\u2022",E.tooltip=(0,o.localize)("bubbleTitle","Contains emphasized items")),E}};t.FileDecorationsService=l,t.FileDecorationsService=l=n.__decorate([(0,r.Injectable)()],l)},4958:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationModule=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(93364),p=e(83670);let v=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:a.IDecorationsService,useClass:p.FileDecorationsService}]}};t.DecorationModule=v,t.DecorationModule=v=n.__decorate([(0,r.Injectable)()],v)},93364:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationsService=void 0;const n=e(43718);class r extends n.Disposable{}t.IDecorationsService=r},87323:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(93364),t)},41893:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(87323),t)},67988:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignCoreContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(1149),p=e(43718),v=e(14951),m=e(2156),_=e(11090),s=e(37517);let g=class{initialize(){this.fileSystem.registerProvider(p.Schemes.design,this.designThemeFileSystemProvider),this.layoutViewSize.setEditorTabsHeight(36,a.ConfigPriority.ModuleDefined),this.layoutViewSize.setStatusBarHeight(36,a.ConfigPriority.ModuleDefined),this.layoutViewSize.setAccordionHeaderSizeHeight(36,a.ConfigPriority.ModuleDefined)}registerRenderer(h){h.registerSlotRenderer(o.SlotLocation.left,_.DesignLeftTabRenderer),h.registerSlotRenderer(o.SlotLocation.bottom,_.DesignBottomTabRenderer),h.registerSlotRenderer(o.SlotLocation.right,_.DesignRightTabRenderer)}};t.DesignCoreContribution=g,n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",m.FileServiceClient)],g.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.DesignThemeFileSystemProvider)],g.prototype,"designThemeFileSystemProvider",void 0),n.__decorate([(0,r.Autowired)(a.LayoutViewSizeConfig),n.__metadata("design:type",a.LayoutViewSizeConfig)],g.prototype,"layoutViewSize",void 0),t.DesignCoreContribution=g=n.__decorate([(0,r.Injectable)(),(0,o.Domain)(o.ClientAppContribution,o.SlotRendererContribution)],g)},17242:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignModule=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(71707),p=e(80832),v=e(97222),m=e(43718),_=e(57517),s=e(52416),g=e(51706),l=e(9132),h=e(67988),u=e(3013),d=e(31385),E=e(72141),f=e(45365),c=n.__importDefault(e(49107)),y=n.__importDefault(e(13925)),b=n.__importDefault(e(63080)),A=e(98741);let S=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[u.DesignMenuBarContribution,h.DesignCoreContribution],this.preferences=I=>{e.e(454).then(e.bind(e,77454)),I.get(p.IDesignStyleService).setStyles(c.default),(0,A.overrideColorToken)(),(0,A.overrideMonacoColorToken)();const T=I.get(m.AppLifeCycleServiceToken);m.Event.once(m.Event.filter(T.onDidLifeCyclePhaseChange,R=>R===3))(()=>{const R=I.get(s.IThemeService);[y.default,b.default].forEach(M=>{R.registerThemes([{id:M.id,label:M.name,path:"",extensionId:M.id,uiTheme:M.base}],o.URI.parse(`${M.id}.json`).withQuery(M.id).withScheme(m.Schemes.design))})}),I.overrideProviders({token:s.IThemeStore,useClass:class extends g.ThemeStore{async getThemeData(R,M){const O=await super.getThemeData(R,M);return document.body.classList.remove(b.default.designThemeType),document.body.classList.remove(y.default.designThemeType),y.default.id===R?.id?document.body.classList.add(y.default.designThemeType):b.default.id===R?.id&&document.body.classList.add(b.default.designThemeType),O}},override:!0,isDefault:!0},{token:s.IThemeService,useClass:class extends l.WorkbenchThemeService{async ensureValidTheme(){return super.ensureValidTheme(y.default.id)}},override:!0,isDefault:!0},{token:_.IEditorTabService,useClass:d.DesignEditorTabService,override:!0,isDefault:!0},{token:a.ISplitPanelService,useClass:f.DesignSplitPanelService,override:!0,isDefault:!0},{token:v.IBrowserCtxMenu,useClass:E.DesignBrowserCtxMenuService})}}};t.DesignModule=S,t.DesignModule=S=n.__decorate([(0,r.Injectable)()],S)},11090:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignRightTabRenderer=t.DesignBottomTabRenderer=t.DesignLeftTabRenderer=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),a=e(19951),p=({className:_,components:s,tabbarView:g})=>o.default.createElement(a.LeftTabRenderer,{className:(0,r.default)(_,"design_left_slot"),components:s,tabbarView:g});t.DesignLeftTabRenderer=p;const v=({className:_,components:s})=>o.default.createElement(a.BottomTabRenderer,{className:(0,r.default)(_,"design_bottom_slot"),components:s});t.DesignBottomTabRenderer=v;const m=({className:_,components:s,tabbarView:g,tabpanelView:l})=>o.default.createElement(a.RightTabRenderer,{className:(0,r.default)("design_right_slot",_),components:s,tabbarView:g,tabpanelView:l});t.DesignRightTabRenderer=m},3013:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignMenuBarContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(93899),p=e(64267),v=e(38879),m=e(12458);let _=class extends o.Disposable{constructor(){super(),this.menubarStore.unregisterMenusBarByCompact(a.MenuId.DesignMenuBarTopExtra);let g;this.addDispose(this.menubarStore.onDidMenuBarChange(l=>{g&&g.dispose(),g=this.menuRegistry.registerMenuItems(a.MenuId.DesignMenuBarTopExtra,l.map(h=>{var u;return{label:h.label,submenu:h.id,iconClass:h.iconClass,group:h.group||"1_navigation",order:(u=h.order)!==null&&u!==void 0?u:100}}))}))}registerComponent(g){g.register(v.DESIGN_MENUBAR_CONTAINER_VIEW_ID,{component:m.DesignMenuBarView,id:v.DESIGN_MENUBAR_CONTAINER_VIEW_ID})}};t.DesignMenuBarContribution=_,n.__decorate([(0,r.Autowired)(p.MenubarStore),n.__metadata("design:type",p.MenubarStore)],_.prototype,"menubarStore",void 0),n.__decorate([(0,r.Autowired)(a.IMenuRegistry),n.__metadata("design:type",a.IMenuRegistry)],_.prototype,"menuRegistry",void 0),t.DesignMenuBarContribution=_=n.__decorate([(0,o.Domain)(o.ComponentContribution),n.__metadata("design:paramtypes",[])],_)},12458:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignMenuBarView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(41869),p=e(81878),v=e(89195),m=e(1149),_=e(63373),s=e(93899),g=e(43718),l=e(63067),h=e(55039),u=e(38879),d=n.__importDefault(e(52151)),E=n.__importDefault(e(90946)),f=()=>{const y=(0,a.useInjectable)(s.AbstractContextMenuService),b=(0,a.useInjectable)(m.DesignLayoutConfig),A=(0,a.useInjectable)(s.ICtxMenuRenderer),S=o.useRef(null),[D,I]=o.useState(void 0);o.useEffect(()=>{w()},[]);const w=o.useCallback(O=>{requestAnimationFrame(()=>{if(S.current){const x=S.current.getBoundingClientRect(),{x:k,y:F,width:L,height:B}=x,U={x:k,y:F+B};I(U),O&&O(U)}})},[S.current]),T=o.useMemo(()=>y.createMenu({id:s.MenuId.DesignMenuBarTopExtra}),[y]),R=o.useCallback(()=>{if(!D)return;const O=T.getMergedMenuNodes();T.dispose(),w(x=>{A.show({anchor:x,menuNodes:O})})},[D,T]),M=o.useMemo(()=>b.menubarLogo||d.default,[b.menubarLogo]);return o.createElement(o.Fragment,null,o.createElement(v.EnhanceIcon,{wrapperClassName:E.default.ai_enhance_menu,ref:S,onClick:R},o.createElement("div",{className:E.default.logo_container},o.createElement("img",{className:E.default.extra_top_icon,src:M,alt:""}),o.createElement(p.Icon,{className:(0,r.default)((0,a.getIcon)("down"),E.default.caret_icon)}))))},c=()=>{const y=(0,a.useInjectable)(g.CommandService),b=(0,a.useInjectable)(l.IMainLayoutService),A=(0,a.useInjectable)(a.AINativeConfigService),[S,D]=o.useState(!1);o.useEffect(()=>{requestAnimationFrame(()=>{D(w())});const R=b.getTabbarService(a.SlotLocation.left).onCurrentChange(({previousId:M,currentId:O})=>{M&&!O?D(!1):!M&&O&&D(!0)});return()=>{R.dispose()}},[]);const I=o.useCallback(()=>{y.executeCommand("main-layout.left-panel.toggle"),requestAnimationFrame(()=>{D(w())})},[]),w=o.useCallback(()=>!!b.getTabbarService(a.SlotLocation.left).currentContainerId.get(),[b]);return o.createElement("div",{id:_.VIEW_CONTAINERS.MENUBAR,className:E.default.menu_bar_view,style:{height:A.layoutViewSize.menubarHeight}},o.createElement("div",{className:E.default.container},o.createElement("div",{className:E.default.left},o.createElement(v.EnhanceIcon,{wrapperClassName:E.default.enhance_menu,icon:S?"left-nav-open":"left-nav-close",onClick:I}),o.createElement("span",{className:E.default.dividing}),o.createElement("div",{className:E.default.top_menus_bar},o.createElement(f,null)),o.createElement(a.SlotRenderer,{id:"design-menubar-left",slot:u.DESIGN_MENU_BAR_LEFT,flex:1})),o.createElement("div",{className:E.default.right},o.createElement(h.ToolBar,null),o.createElement(a.SlotRenderer,{id:"design-menubar-right",slot:u.DESIGN_MENU_BAR_RIGHT,flex:1}))))};t.DesignMenuBarView=c},31385:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignEditorTabService=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(76003),p=e(81878),v=e(1149),m=e(43718),_=e(30612),s=n.__importDefault(e(49107)),g=h=>{const{children:u}=h,[d,E]=o.default.useState(!1),f=(0,o.useMemo)(()=>"editor-tab-close-"+(0,m.uuid)(6),[]),c=(0,o.useCallback)(()=>{E(!1)},[]),y=(0,o.useMemo)(()=>(0,m.formatLocalize)("editor.closeTab.title",m.isMacintosh?"\u2318W":"Ctrl+W"),[]);return o.default.createElement(p.Popover,{delay:1e3,position:p.PopoverPosition.bottom,id:f,title:y,onClickAction:c,display:d},o.default.createElement("span",{title:""},u))};let l=class extends _.EditorTabService{renderEditorTab(u,d){return o.default.createElement("div",{className:(0,r.default)({[s.default["design-editor_tab_block_container"]]:!0,[s.default.active]:d}),style:{height:this.layoutViewSize.editorTabsHeight}},u)}renderTabCloseComponent(u){return o.default.createElement(g,null,u)}};t.DesignEditorTabService=l,n.__decorate([(0,a.Autowired)(v.LayoutViewSizeConfig),n.__metadata("design:type",v.LayoutViewSizeConfig)],l.prototype,"layoutViewSize",void 0),t.DesignEditorTabService=l=n.__decorate([(0,a.Injectable)()],l)},72141:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignBrowserCtxMenuService=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),a=e(76003),p=e(97267),v=e(41869),m=e(31388),_=e(52416),s=n.__importDefault(e(49107)),g=h=>{const u=(0,v.useInjectable)(_.IIconService),{data:d,disabled:E,hasSubmenu:f}=h,c=(0,o.useMemo)(()=>d.checked?o.default.createElement(p.Icon,{icon:"check"}):d.icon?o.default.createElement(p.Icon,{iconClass:d.icon}):null,[d]);return o.default.createElement("div",{className:(0,r.default)(s.default.menuAction__sub_menu_action_container,{[s.default.disabled]:E,[s.default.checked]:d.checked},d.className)},o.default.createElement("div",{className:s.default.icon},c),o.default.createElement("div",{className:s.default.label},d.label?(0,v.transformLabelWithCodicon)(v.strings.mnemonicButtonLabel(d.label,!0),{margin:"0 3px"},u?.fromString.bind(u)):""),o.default.createElement("div",{className:s.default.tip},d.keybinding?o.default.createElement("div",{className:s.default.shortcut},d.keybinding):null,f?o.default.createElement("div",{className:s.default.submenuIcon},o.default.createElement(p.Icon,{icon:"right-arrow"})):null,!d.keybinding&&!f&&d.extraDesc&&o.default.createElement("div",{className:s.default.extraDesc},d.extraDesc)))};let l=class extends m.BrowserCtxMenuService{renderSubMenuTitle(u,d){return o.default.createElement(g,{data:u,...d})}renderMenuItem(u,d){return o.default.createElement(g,{data:u,...d})}};t.DesignBrowserCtxMenuService=l,t.DesignBrowserCtxMenuService=l=n.__decorate([(0,a.Injectable)()],l)},45365:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignSplitPanelService=void 0;const n=e(71707);class r extends n.SplitPanelService{renderSplitPanel(a,p,v){return super.renderSplitPanel(a,p,v)}interceptProps(a){return a}}t.DesignSplitPanelService=r},13925:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={tokenColors:[{scope:["meta.embedded","source.groovy.embedded"],settings:{foreground:"#D4D4D4"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{scope:"header",settings:{foreground:"#000080"}},{scope:"comment",settings:{foreground:"#6A9955"}},{scope:"constant.language",settings:{foreground:"#569cd6"}},{scope:["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],settings:{foreground:"#b5cea8"}},{scope:"constant.regexp",settings:{foreground:"#646695"}},{scope:"entity.name.tag",settings:{foreground:"#569cd6"}},{scope:"entity.name.tag.css",settings:{foreground:"#d7ba7d"}},{scope:"entity.other.attribute-name",settings:{foreground:"#9cdcfe"}},{scope:["entity.other.attribute-name.class.css","entity.other.attribute-name.class.mixin.css","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.pseudo-class.css","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],settings:{foreground:"#d7ba7d"}},{scope:"invalid",settings:{foreground:"#f44747"}},{scope:"markup.underline",settings:{fontStyle:"underline"}},{scope:"markup.bold",settings:{fontStyle:"bold",foreground:"#569cd6"}},{scope:"markup.heading",settings:{fontStyle:"bold",foreground:"#569cd6"}},{scope:"markup.italic",settings:{fontStyle:"italic"}},{scope:"markup.inserted",settings:{foreground:"#b5cea8"}},{scope:"markup.deleted",settings:{foreground:"#ce9178"}},{scope:"markup.changed",settings:{foreground:"#569cd6"}},{scope:"punctuation.definition.quote.begin.markdown",settings:{foreground:"#6A9955"}},{scope:"punctuation.definition.list.begin.markdown",settings:{foreground:"#6796e6"}},{scope:"markup.inline.raw",settings:{foreground:"#ce9178"}},{name:"brackets of XML/HTML tags",scope:"punctuation.definition.tag",settings:{foreground:"#808080"}},{scope:["meta.preprocessor","entity.name.function.preprocessor"],settings:{foreground:"#569cd6"}},{scope:"meta.preprocessor.string",settings:{foreground:"#ce9178"}},{scope:"meta.preprocessor.numeric",settings:{foreground:"#b5cea8"}},{scope:"meta.structure.dictionary.key.python",settings:{foreground:"#9cdcfe"}},{scope:"meta.diff.header",settings:{foreground:"#569cd6"}},{scope:"storage",settings:{foreground:"#569cd6"}},{scope:"storage.type",settings:{foreground:"#569cd6"}},{scope:["storage.modifier","keyword.operator.noexcept"],settings:{foreground:"#569cd6"}},{scope:["string","meta.embedded.assembly"],settings:{foreground:"#ce9178"}},{scope:"string.tag",settings:{foreground:"#ce9178"}},{scope:"string.value",settings:{foreground:"#ce9178"}},{scope:"string.regexp",settings:{foreground:"#d16969"}},{name:"String interpolation",scope:["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],settings:{foreground:"#569cd6"}},{name:"Reset JavaScript string interpolation expression",scope:["meta.template.expression"],settings:{foreground:"#d4d4d4"}},{scope:["support.type.vendored.property-name","support.type.property-name","variable.css","variable.scss","variable.other.less","source.coffee.embedded"],settings:{foreground:"#9cdcfe"}},{scope:"keyword",settings:{foreground:"#569cd6"}},{scope:"keyword.control",settings:{foreground:"#569cd6"}},{scope:"keyword.operator",settings:{foreground:"#d4d4d4"}},{scope:["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],settings:{foreground:"#569cd6"}},{scope:"keyword.other.unit",settings:{foreground:"#b5cea8"}},{scope:["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],settings:{foreground:"#569cd6"}},{scope:"support.function.git-rebase",settings:{foreground:"#9cdcfe"}},{scope:"constant.sha.git-rebase",settings:{foreground:"#b5cea8"}},{name:"coloring of the Java import and package identifiers",scope:["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],settings:{foreground:"#d4d4d4"}},{name:"this.self",scope:"variable.language",settings:{foreground:"#569cd6"}},{name:"Function declarations",scope:["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],settings:{foreground:"#DCDCAA"}},{name:"Types declaration and references",scope:["meta.return-type","support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],settings:{foreground:"#4EC9B0"}},{name:"Types declaration and references, TS grammar specific",scope:["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class"],settings:{foreground:"#4EC9B0"}},{name:"Control flow / Special keywords",scope:["keyword.control","source.cpp keyword.operator.new","keyword.operator.delete","keyword.other.using","keyword.other.operator","entity.name.operator"],settings:{foreground:"#C586C0"}},{name:"Variable and parameter name",scope:["variable","meta.definition.variable.name","support.variable","entity.nam1e.variable","constant.other.placeholder"],settings:{foreground:"#9CDCFE"}},{name:"Constants and enums",scope:["variable.other.constant","variable.other.enummember"],settings:{foreground:"#4FC1FF"}},{name:"Object keys, TS grammar specific",scope:["meta.object-literal.key"],settings:{foreground:"#9CDCFE"}},{name:"CSS property value",scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#CE9178"}},{name:"Regular expression groups",scope:["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],settings:{foreground:"#CE9178"}},{scope:["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],settings:{foreground:"#d16969"}},{scope:["keyword.operator.or.regexp","keyword.control.anchor.regexp"],settings:{foreground:"#DCDCAA"}},{scope:"keyword.operator.quantifier.regexp",settings:{foreground:"#d7ba7d"}},{scope:"constant.character",settings:{foreground:"#569cd6"}},{scope:"constant.character.escape",settings:{foreground:"#d7ba7d"}},{scope:"entity.name.label",settings:{foreground:"#C8C8C8"}}],colors:{"activityBar.activeBorder":"#ffffff1f","activityBar.activeForeground":"#FFFFFF","activityBar.background":"#00000000","activityBar.border":"#252729","activityBar.disableForeground":"#5F656B","activityBar.dropBackground":"#43484D","activityBar.foreground":"#fff","activityBar.inactiveForeground":"#ffffff73","activityBarBadge.background":"#167CDB","activityBarBadge.foreground":"#FFFFFF","badge.background":"#FFFFFF40","badge.foreground":"#D7DBDE","breadcrumb.background":"#222830","breadcrumb.foreground":"#ffffff73","checkbox.background":"#ffffff14","checkbox.border":"#ffffff1f",descriptionForeground:"#868C91","diffEditor.insertedTextBackground":"#12A7A740","editorGroup.border":"#43484D","editorGroup.dropBackground":"#5F656B40","editorGroup.emptyBackground":"#00000000","editorGroupHeader.tabsBackground":"#222830","editorSuggestWidget.selectedBackground":"#1A66AC",errorForeground:"#D21F28",focusBorder:"#ffffff1f",foreground:"#D7DBDE","editorCommentsWidget.unresolvedBorder":"#ffffff","gitDecoration.addedResourceForeground":"#8FD460","gitDecoration.conflictingResourceForeground":"#7F9EF3","gitDecoration.deletedResourceForeground":"#F3956A","gitDecoration.ignoredResourceForeground":"#BBC0C4","gitDecoration.modifiedResourceForeground":"#F3CC62","gitDecoration.submoduleResourceForeground":"#67ABEB","gitDecoration.untrackedResourceForeground":"#58D1C9","icon.foreground":"#D7DBDE","input.background":"#ffffff14","input.foreground":"#d7dbde","input.placeholderForeground":"#ffffff59","inputDropdown.searchMatchForeground":"#3895EB","inputIcon.foreground":"#5F656B","inputValidation.errorBackground":"#321115","inputValidation.errorBorder":"#D21F28","inputValidation.errorForeground":"#D7DBDE","inputValidation.errorText":"#D21F28","inputValidation.warningBackground":"#332510","inputValidation.warningBorder":"#DBA936","inputValidation.warningText":"#DBA936","inputValidation.warningForeground":"#d7dbde","keybinding.background":"#5F656B33","kt.accentForeground":"#FFFFFF","kt.actionbar.disableForeground":"#5F656B","kt.actionbar.foreground":"#D7DBDE","kt.actionbar.selectionBorder":"#1A66AC","kt.actionbar.separatorBackground":"#5F656B40","kt.activityBar.dropUpBackground":"#1F507D","kt.button.disableBackground":"#5F656B40","kt.button.disableBorder":"#5F656B80","kt.button.disableForeground":"#5F656B","kt.checkbox.disableBackground":"#5F656B40","kt.checkbox.disableForeground":"#5F656B","kt.checkbox.hoverBorder":"#167CDB","kt.checkbox.selectionBackground":"#167CDB","kt.checkbox.selectionForeground":"#FFFFFF","kt.dangerButton.background":"#DB4345","kt.dangerButton.clickBackground":"#D21F28","kt.dangerButton.foreground":"#FFFFFF","kt.dangerButton.hoverBackground":"#F37370","kt.dangerGhostButton.border":"#DB4345","kt.dangerGhostButton.clickBorder":"#D21F28","kt.dangerGhostButton.clickForeground":"#D21F28","kt.dangerGhostButton.foreground":"#DB4345","kt.dangerGhostButton.hoverBorder":"#F37370","kt.dangerGhostButton.hoverForeground":"#F37370","kt.defaultButton.background":"#ffffff14","kt.defaultButton.border":"#00000000","kt.defaultButton.clickBackground":"#ffffff14","kt.defaultButton.clickBorder":"#00000000","kt.defaultButton.disableBackground":"#ffffff14","kt.defaultButton.disableBorder":"#00000000","kt.defaultButton.disableForeground":"#ffffff40","kt.defaultButton.foreground":"#D7DBDE","kt.defaultButton.hoverBackground":"#ffffff29","kt.defaultButton.hoverBorder":"#00000000","kt.defaultButton.selectionBackground":"#ffffff29","kt.defaultButton.selectionForeground":"#fff","kt.dirtyDot.foreground":"#868C91","kt.disableForeground":"#5F656B","kt.editorBreadcrumb.borderDown":"#e9e9e914","kt.errorBackground":"#D21F2840","kt.errorIconForeground":"#DB4345","kt.hintBackground":"#5F656B40","kt.hintIconForeground":"#868C91","kt.icon.clickForeground":"#D7DBDE","kt.icon.disableForeground":"#5F656B","kt.icon.foreground":"#ffffff73","kt.icon.hoverBackground":"#ffffff14","kt.icon.hoverForeground":"#D7DBDE","kt.icon.secondaryForeground":"#868C91","kt.infoBackground":"#167CDB40","kt.infoIconForeground":"#3895EB","kt.input.border":"#00000000","kt.input.disableBackground":"#5F656B40","kt.input.disableForeground":"#ffffff40","kt.input.selectionBackground":"#1A66AC","kt.linkButton.clickForeground":"#167CDB","kt.linkButton.disableForeground":"#5F656B","kt.linkButton.foreground":"#3895EB","kt.linkButton.hoverForeground":"#67ABEB","kt.menu.descriptionForeground":"#868C91","kt.menu.disableForeground":"#5F656B","kt.menubar.background":"#00000000","kt.menubar.border":"#252729","kt.menubar.foreground":"#D7DBDE","kt.menubar.separatorBackground":"#5F656B40","kt.modal.background":"#222830","kt.modal.foreground":"#D7DBDE","kt.modal.separatorBackground":"#2C3033","kt.modalErrorIcon.foreground":"#DB4345","kt.modalInfoIcon.foreground":"#3895EB","kt.modalSuccessIcon.foreground":"#64B436","kt.modalWarningIcon.foreground":"#DBA936","kt.panel.secondaryForeground":"#868C91","kt.panelTab.activeBackground":"#151b21","kt.panelTab.activeForeground":"#FFFFFF","kt.panelTab.border":"#ffffff1f","kt.panelTab.inactiveBackground":"#00000000","kt.panelTab.inactiveForeground":"#D7DBDE","kt.panelTitle.background":"#222830","kt.popover.background":"#2b333d","kt.popover.border":"#363940","kt.popover.foreground":"#fffffff2","kt.popover.prominentBackground":"#2C3033","kt.primaryButton.background":"#3c8dff","kt.primaryButton.clickBackground":"#3c8dffa6","kt.primaryButton.foreground":"#fff","kt.primaryButton.hoverBackground":"#3c8dffa6","kt.primaryButton.border":"#00000000","kt.primaryGhostButton.clickBorder":"#3c8dff","kt.primaryGhostButton.clickForeground":"#167CDB","kt.primaryGhostButton.clickBackground":"#00000000","kt.primaryGhostButton.foreground":"#3895EB","kt.primaryGhostButton.border":"#3c8dff","kt.primaryGhostButton.background":"#00000000","kt.secondaryButton.border":"#5F656B","kt.secondaryButton.clickBorder":"#167CDB","kt.secondaryButton.clickForeground":"#167CDB","kt.secondaryButton.foreground":"#D7DBDE","kt.secondaryButton.hoverBorder":"#3895EB","kt.secondaryButton.hoverForeground":"#3895EB","kt.secondaryButton.background":"#00000000","kt.select.background":"#ffffff14","kt.select.border":"#00000000","kt.select.disableBackground":"#5F656B40","kt.select.disableForeground":"#5F656B","kt.select.foreground":"#D7DBDE","kt.select.placeholderForeground":"#5F656B","kt.selectDropdown.background":"#222830","kt.selectDropdown.foreground":"#D7DBDE","kt.selectDropdown.hoverBackground":"#ffffff14","kt.selectDropdown.selectionBackground":"#ffffff14","kt.selectOption.activeBorder":"#167CDB","kt.statusbar.offline.background":"#DB4345","kt.successBackground":"#48A91840","kt.successIconForeground":"#64B436","kt.tab.activeBorder":"#167CDB","kt.tab.activeForeground":"#FFFFFF","kt.tab.borderDown":"#5F656B40","kt.tab.inactiveForeground":"#D7DBDE","kt.tree.activeSelectionBackground":"#1A66AC","kt.tree.activeSelectionForeground":"#FFFFFF","kt.tree.hoverBackground":"#5F656B40","kt.tree.hoverForeground":"#D7DBDE","kt.tree.inactiveSelectionBackground":"#ffffff1f","kt.tree.inactiveSelectionForeground":"#fff","kt.warningBackground":"#D7951340","kt.warningIconForeground":"#DBA936","kt.whiteGhostButton.border":"#FFFFFF","kt.whiteGhostButton.clickBorder":"#FFFFFFA6","kt.whiteGhostButton.clickForeground":"#FFFFFFA6","kt.whiteGhostButton.disableBackground":"#FFFFFF03","kt.whiteGhostButton.disableBorder":"#FFFFFF40","kt.whiteGhostButton.disableForeground":"#FFFFFF40","kt.whiteGhostButton.foreground":"#FFFFFF","list.activeSelectionBackground":"#1A66AC","list.activeSelectionForeground":"#e1e4e8","list.evenItemBackground":"#5F656B14","list.headerBackground":"#5F656B1F","list.hoverBackground":"#5F656B40","menu.background":"#222830d9","menu.foreground":"#D7DBDE","menu.selectionBackground":"#5F656B40","menu.selectionForeground":"#FFFFFF","menu.separatorBackground":"#43484D","menubar.selectionBackground":"#5f656b40","menubar.selectionForeground":"#FFFFFF","message.background":"#222830","message.foreground":"#D7DBDE","messageErrorIcon.foreground":"#DB4345","messageInfoIcon.foreground":"#3895EB","messageSuccessIcon.foreground":"#64B436","messageWarningIcon.foreground":"#DBA936","notifications.background":"#222830","notifications.foreground":"#D7DBDE","notificationsErrorIcon.foreground":"#DB4345","notificationsInfoIcon.foreground":"#3895EB","notificationsWarningIcon.foreground":"#DBA936","panel.background":"#151b21","panel.border":"#43484D","panel.foreground":"#D7DBDE","panel.selectionBackground":"#5F656B40","panel.separatorBackground":"#2C3033","panelMenuBadge.background":"#00000040","panelMenuBar.background":"#2C3033","panelMenuBarBadge.foreground":"#5F656B40","panelTabBarActionIcon.Background":"#868C91","panelTabBarError.foreground":"#DB4345","panelTitle.activeBorder":"#167CDB","panelTitle.activeForeground":"#FFFFFF","panelTitle.hoverForeground":"#FFFFFF","panelTitle.inactiveForeground":"#ffffff73","selectDropdown.descriptionForeground":"#868C91","selectDropdown.teamForeground":"#868C91","sideBar.background":"#00000000","sideBar.border":"#ffffff1f","sideBar.dropBackground":"#43484D","sideBar.dropUpBackground":"#1F507D","sideBarSectionHeader.background":"#00000000","sideBarSectionHeader.foreground":"#ffffffa6","sideBarTitle.foreground":"#FFFFFF","statusBar.background":"#00000000","statusBar.debuggingBackground":"#D77915","statusBar.foreground":"#ffffff73","statusBar.noFolderBackground":"#43484D","statusBarItem.activeBackground":"#FFFFFF40","statusBarItem.hoverBackground":"#FFFFFF03","statusBarItem.remoteBackground":"#3c8dff","statusBarItem.prominentForeground":"#d2d2d2a6","statusBarItem.prominentBackground":"#2a2a2a80","tab.activeBackground":"#151b21","tab.activeForeground":"#FFFFFF","tab.border":"#e9e9e914","tab.inactiveBackground":"#00000000","tab.inactiveForeground":"#ffffff73","tab.hoverBackground":"#00000000","tab.unfocusedActiveBackground":"#202224","tab.unfocusedActiveForeground":"#868C91","tab.unfocusedInactiveForeground":"#868C91","terminal.background":"#151b21","terminal.border":"#252729","terminal.foreground":"#D7DBDE","terminal.offlineBackground":"#D21F2840","terminal.offlineForeground":"#868C91","terminal.offlineLinkForeground":"#3895EB","terminal.selectionBackground":"#5F656B40","tooltip.background":"#35393D","tooltip.foreground":"#D7DBDE","widget.shadow":"#00000099","list.focusOutline":"#00000000","editorInlayHint.parameterBackground":"#00000000","button.background":"#ffffff14","scrollbarSlider.background":"#ffffff14","editor.background":"#181818","quickInput.background":"#222830","list.focusBackground":"#ffffff1f","textLink.foreground":"#3c8dff","editorStickyScroll.background":"#151b21"},semanticHighlighting:!0,semanticTokenColors:{newOperator:"#d4d4d4",stringLiteral:"#ce9178",customLiteral:"#D4D4D4",numberLiteral:"#b5cea8"},encodedTokensColors:[],rules:[],base:"vs-dark",designThemeType:"design-dark",inherit:!0,hasDefaultTokens:!1,id:"opensumi-design-dark-theme",name:"OpenSumi Design Dark+ (default dark)"}},37517:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignThemeFileSystemProvider=void 0;const n=e(85608),r=e(76003),o=e(43718),a=n.__importDefault(e(13925)),p=n.__importDefault(e(63080));let v=class{constructor(){this.capabilities=2048,this.onDidChangeCapabilities=o.Event.None,this.onDidChangeFile=o.Event.None}stat(_){return Promise.resolve({type:o.FileType.File,uri:_.toString(),lastModification:Date.now(),isDirectory:!1})}async readFile(_){const{query:s}=_;return a.default.id===s?this.toBuffer(JSON.stringify(a.default)):this.toBuffer(JSON.stringify(p.default))}toBuffer(_){return o.BinaryBuffer.fromString(_).buffer}readDirectory(){throw new Error("Not allowed")}createDirectory(){throw new Error("Not allowed")}rename(){throw new Error("Not allowed")}delete(){throw new Error("Not allowed")}watch(){throw new Error("Not allowed")}writeFile(){throw new Error("Not allowed")}};t.DesignThemeFileSystemProvider=v,t.DesignThemeFileSystemProvider=v=n.__decorate([(0,r.Injectable)()],v)},63080:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={tokenColors:[{scope:["meta.embedded","source.groovy.embedded"],settings:{foreground:"#000000ff"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{scope:"meta.diff.header",settings:{foreground:"#000080"}},{scope:"comment",settings:{foreground:"#008000"}},{scope:"constant.language",settings:{foreground:"#0000ff"}},{scope:["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],settings:{foreground:"#098658"}},{scope:"constant.regexp",settings:{foreground:"#811f3f"}},{name:"css tags in selectors, xml tags",scope:"entity.name.tag",settings:{foreground:"#800000"}},{scope:"entity.name.selector",settings:{foreground:"#800000"}},{scope:"entity.other.attribute-name",settings:{foreground:"#ff0000"}},{scope:["entity.other.attribute-name.class.css","entity.other.attribute-name.class.mixin.css","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.pseudo-class.css","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],settings:{foreground:"#800000"}},{scope:"invalid",settings:{foreground:"#cd3131"}},{scope:"markup.underline",settings:{fontStyle:"underline"}},{scope:"markup.bold",settings:{fontStyle:"bold",foreground:"#000080"}},{scope:"markup.heading",settings:{fontStyle:"bold",foreground:"#800000"}},{scope:"markup.italic",settings:{fontStyle:"italic"}},{scope:"markup.inserted",settings:{foreground:"#098658"}},{scope:"markup.deleted",settings:{foreground:"#a31515"}},{scope:"markup.changed",settings:{foreground:"#0451a5"}},{scope:["punctuation.definition.quote.begin.markdown","punctuation.definition.list.begin.markdown"],settings:{foreground:"#0451a5"}},{scope:"markup.inline.raw",settings:{foreground:"#800000"}},{name:"brackets of XML/HTML tags",scope:"punctuation.definition.tag",settings:{foreground:"#800000"}},{scope:["meta.preprocessor","entity.name.function.preprocessor"],settings:{foreground:"#0000ff"}},{scope:"meta.preprocessor.string",settings:{foreground:"#a31515"}},{scope:"meta.preprocessor.numeric",settings:{foreground:"#098658"}},{scope:"meta.structure.dictionary.key.python",settings:{foreground:"#0451a5"}},{scope:"storage",settings:{foreground:"#0000ff"}},{scope:"storage.type",settings:{foreground:"#0000ff"}},{scope:["storage.modifier","keyword.operator.noexcept"],settings:{foreground:"#0000ff"}},{scope:["string","meta.embedded.assembly"],settings:{foreground:"#a31515"}},{scope:["string.comment.buffered.block.pug","string.quoted.pug","string.interpolated.pug","string.unquoted.plain.in.yaml","string.unquoted.plain.out.yaml","string.unquoted.block.yaml","string.quoted.single.yaml","string.quoted.double.xml","string.quoted.single.xml","string.unquoted.cdata.xml","string.quoted.double.html","string.quoted.single.html","string.unquoted.html","string.quoted.single.handlebars","string.quoted.double.handlebars"],settings:{foreground:"#0000ff"}},{scope:"string.regexp",settings:{foreground:"#811f3f"}},{name:"String interpolation",scope:["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],settings:{foreground:"#0000ff"}},{name:"Reset JavaScript string interpolation expression",scope:["meta.template.expression"],settings:{foreground:"#000000"}},{scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#0451a5"}},{scope:["support.type.vendored.property-name","support.type.property-name","variable.css","variable.scss","variable.other.less","source.coffee.embedded"],settings:{foreground:"#ff0000"}},{scope:["support.type.property-name.json"],settings:{foreground:"#0451a5"}},{scope:"keyword",settings:{foreground:"#0000ff"}},{scope:"keyword.control",settings:{foreground:"#0000ff"}},{scope:"keyword.operator",settings:{foreground:"#000000"}},{scope:["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],settings:{foreground:"#0000ff"}},{scope:"keyword.other.unit",settings:{foreground:"#098658"}},{scope:["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],settings:{foreground:"#800000"}},{scope:"support.function.git-rebase",settings:{foreground:"#0451a5"}},{scope:"constant.sha.git-rebase",settings:{foreground:"#098658"}},{name:"coloring of the Java import and package identifiers",scope:["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],settings:{foreground:"#000000"}},{name:"this.self",scope:"variable.language",settings:{foreground:"#0000ff"}},{name:"Function declarations",scope:["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],settings:{foreground:"#795E26"}},{name:"Types declaration and references",scope:["meta.return-type","support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],settings:{foreground:"#267f99"}},{name:"Types declaration and references, TS grammar specific",scope:["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class"],settings:{foreground:"#267f99"}},{name:"Control flow / Special keywords",scope:["keyword.control","source.cpp keyword.operator.new","source.cpp keyword.operator.delete","keyword.other.using","keyword.other.operator","entity.name.operator"],settings:{foreground:"#AF00DB"}},{name:"Variable and parameter name",scope:["variable","meta.definition.variable.name","support.variable","entity.name.variable","constant.other.placeholder"],settings:{foreground:"#001080"}},{name:"Constants and enums",scope:["variable.other.constant","variable.other.enummember"],settings:{foreground:"#0070C1"}},{name:"Object keys, TS grammar specific",scope:["meta.object-literal.key"],settings:{foreground:"#001080"}},{name:"CSS property value",scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#0451a5"}},{name:"Regular expression groups",scope:["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],settings:{foreground:"#d16969"}},{scope:["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],settings:{foreground:"#811f3f"}},{scope:"keyword.operator.quantifier.regexp",settings:{foreground:"#000000"}},{scope:["keyword.operator.or.regexp","keyword.control.anchor.regexp"],settings:{foreground:"#EE0000"}},{scope:"constant.character",settings:{foreground:"#0000ff"}},{scope:"constant.character.escape",settings:{foreground:"#EE0000"}},{scope:"entity.name.label",settings:{foreground:"#000000"}}],colors:{"activityBar.activeBorder":"#151b2114","activityBar.activeForeground":"#FFFFFF","activityBar.background":"#00000000","activityBar.border":"#252729","activityBar.disableForeground":"#5F656B","activityBar.dropBackground":"#43484D","activityBar.foreground":"#151b21","activityBar.inactiveForeground":"#151b21a6","activityBarBadge.background":"#3C8DFF","activityBarBadge.foreground":"#FFFFFF","badge.background":"#151b5814","badge.foreground":"#151b21a6","breadcrumb.background":"#fff","breadcrumb.foreground":"#5d646c","checkbox.background":"#fff","checkbox.border":"#151b2129",descriptionForeground:"#151b21a6","diffEditor.insertedTextBackground":"#12A7A740","editorGroup.border":"#151b2133","editorGroup.dropBackground":"#5F656B40","editorGroup.emptyBackground":"#ffffff","editorGroupHeader.tabsBackground":"#DDE8F4","editorSuggestWidget.selectedBackground":"#6eb6fa40",errorForeground:"#D21F28",focusBorder:"#151b2129",foreground:"#151b21d9","editorCommentsWidget.unresolvedBorder":"#4d9ded","gitDecoration.addedResourceForeground":"#52c41a","gitDecoration.modifiedResourceForeground":"#faad14","gitDecoration.deletedResourceForeground":"#fa541c","gitDecoration.untrackedResourceForeground":"#13c2c2","gitDecoration.ignoredResourceForeground":"#666666","gitDecoration.conflictingResourceForeground":"#ff0000","gitDecoration.submoduleResourceForeground":"#1785eb","icon.foreground":"#151b21d9","input.background":"#fff","input.foreground":"#151b21","input.placeholderForeground":"#151b2173","inputDropdown.searchMatchForeground":"#3895EB","inputIcon.foreground":"#5F656B","inputValidation.errorBackground":"#321115","inputValidation.errorBorder":"#D21F28","inputValidation.errorForeground":"#D7DBDE","inputValidation.errorText":"#D21F28","inputValidation.warningBackground":"#fff","inputValidation.warningBorder":"#DBA936","inputValidation.warningText":"#DBA936","inputValidation.warningForeground":"#151b21","keybinding.background":"#5F656B33","kt.accentForeground":"#FFFFFF","kt.actionbar.disableForeground":"#5F656B","kt.actionbar.foreground":"#151b21a6","kt.actionbar.selectionBorder":"#1A66AC","kt.actionbar.separatorBackground":"#5F656B40","kt.activityBar.dropUpBackground":"#1F507D","kt.button.disableBackground":"#151b210a","kt.button.disableBorder":"#151b2114","kt.button.disableForeground":"#151b2159","kt.checkbox.disableBackground":"#5F656B40","kt.checkbox.disableForeground":"#5F656B","kt.checkbox.hoverBorder":"#167CDB","kt.checkbox.selectionBackground":"#167CDB","kt.checkbox.selectionForeground":"#FFFFFF","kt.dangerButton.background":"#DB4345","kt.dangerButton.clickBackground":"#D21F28","kt.dangerButton.foreground":"#FFFFFF","kt.dangerButton.hoverBackground":"#F37370","kt.dangerGhostButton.border":"#DB4345","kt.dangerGhostButton.clickBorder":"#D21F28","kt.dangerGhostButton.clickForeground":"#D21F28","kt.dangerGhostButton.foreground":"#DB4345","kt.dangerGhostButton.hoverBorder":"#F37370","kt.dangerGhostButton.hoverForeground":"#F37370","kt.dirtyDot.foreground":"#868C91","kt.disableForeground":"#5F656B","kt.editorBreadcrumb.borderDown":"#e9e9e914","kt.errorBackground":"#D21F2840","kt.errorIconForeground":"#DB4345","kt.hintBackground":"#5F656B40","kt.hintIconForeground":"#868C91","kt.icon.clickForeground":"#D7DBDE","kt.icon.disableForeground":"#5F656B","kt.icon.foreground":"#151b21a6","kt.icon.hoverBackground":"#151b2114","kt.icon.hoverForeground":"#151b21d9","kt.icon.secondaryForeground":"#868C91","kt.infoBackground":"#167CDB40","kt.infoIconForeground":"#3895EB","kt.input.border":"#151b2129","kt.input.disableBackground":"#151b210a","kt.input.disableForeground":"#151b2159","kt.input.selectionBackground":"#1A66AC","kt.linkButton.clickForeground":"#167CDB","kt.linkButton.disableForeground":"#5F656B","kt.linkButton.foreground":"#3895EB","kt.linkButton.hoverForeground":"#67ABEB","kt.menu.descriptionForeground":"#868C91","kt.menu.disableForeground":"#5F656B","kt.menubar.background":"#00000000","kt.menubar.border":"#252729","kt.menubar.foreground":"#D7DBDE","kt.menubar.separatorBackground":"#5F656B40","kt.modal.background":"#fff","kt.modal.foreground":"#151b21d9","kt.modal.separatorBackground":"#2C3033","kt.modalErrorIcon.foreground":"#DB4345","kt.modalInfoIcon.foreground":"#3895EB","kt.modalSuccessIcon.foreground":"#64B436","kt.modalWarningIcon.foreground":"#DBA936","kt.panel.secondaryForeground":"#151b21a6","kt.panelTab.activeBackground":"#fff","kt.panelTab.activeForeground":"#151b21","kt.panelTab.border":"#151b2114","kt.panelTab.inactiveBackground":"#00000000","kt.panelTab.inactiveForeground":"#151b21d9","kt.panelTitle.background":"#fff","kt.popover.background":"#000000e3","kt.popover.border":"#000000e3","kt.popover.foreground":"#fffffff2","kt.popover.prominentBackground":"#2C3033","kt.defaultButton.background":"#fafafb","kt.defaultButton.border":"#00000000","kt.defaultButton.clickBackground":"#fafafb","kt.defaultButton.clickBorder":"#00000000","kt.defaultButton.disableBackground":"#fff","kt.defaultButton.disableBorder":"#00000000","kt.defaultButton.disableForeground":"#151b2159","kt.defaultButton.foreground":"#000a1aff","kt.defaultButton.hoverBackground":"#F5F5F6","kt.defaultButton.hoverBorder":"#00000000","kt.defaultButton.selectionBackground":"#fff","kt.defaultButton.selectionForeground":"#151b21","kt.primaryButton.background":"#3c8dff","kt.primaryButton.clickBackground":"#3c8dff","kt.primaryButton.foreground":"#fff","kt.primaryButton.hoverBackground":"#5b9fff","kt.primaryButton.border":"#00000000","kt.primaryGhostButton.clickBorder":"#3c8dff","kt.primaryGhostButton.clickForeground":"#167CDB","kt.primaryGhostButton.clickBackground":"#fff","kt.primaryGhostButton.foreground":"#3895EB","kt.primaryGhostButton.border":"#3c8dff","kt.primaryGhostButton.background":"#fff","kt.secondaryButton.border":"#00000026","kt.secondaryButton.clickBorder":"#00000026","kt.secondaryButton.clickForeground":"#151b21","kt.secondaryButton.foreground":"#151b21d9","kt.secondaryButton.background":"#fff","kt.secondaryButton.hoverBorder":"#00000026","kt.secondaryButton.hoverForeground":"#151b21","kt.select.background":"#fff","kt.select.border":"#151b2129","kt.select.disableBackground":"#151b2114","kt.select.disableForeground":"#151b2159","kt.select.foreground":"#151b21","kt.select.placeholderForeground":"#151b2173","kt.selectDropdown.background":"#fff","kt.selectDropdown.foreground":"#151b21","kt.selectDropdown.hoverBackground":"#151b2114","kt.selectDropdown.selectionBackground":"#151b2114","kt.selectDropdown.selectionForeground":"#151b21","kt.selectOption.activeBorder":"#167CDB","kt.statusbar.offline.background":"#DB4345","kt.successBackground":"#48A91840","kt.successIconForeground":"#64B436","kt.tab.activeBorder":"#167CDB","kt.tab.activeForeground":"#151b21","kt.tab.borderDown":"#151b211f","kt.tab.inactiveForeground":"#151b21a6","kt.tree.activeSelectionBackground":"#1A66AC","kt.tree.activeSelectionForeground":"#FFFFFF","kt.tree.hoverBackground":"#151b5814","kt.tree.hoverForeground":"#151b21","kt.tree.inactiveSelectionBackground":"#151b5814","kt.tree.inactiveSelectionForeground":"#151b21","kt.warningBackground":"#D7951340","kt.warningIconForeground":"#DBA936","kt.whiteGhostButton.border":"#FFFFFF","kt.whiteGhostButton.clickBorder":"#FFFFFFA6","kt.whiteGhostButton.clickForeground":"#FFFFFFA6","kt.whiteGhostButton.disableBackground":"#FFFFFF03","kt.whiteGhostButton.disableBorder":"#FFFFFF40","kt.whiteGhostButton.disableForeground":"#FFFFFF40","kt.whiteGhostButton.foreground":"#FFFFFF","list.activeSelectionBackground":"#1A66AC","list.activeSelectionForeground":"#e1e4e8","list.evenItemBackground":"#5F656B14","list.headerBackground":"#5F656B1F","list.hoverBackground":"#151b5814","menu.background":"#FFFFFF","menu.foreground":"#151b21","menu.selectionBackground":"#151b2114","menu.selectionForeground":"#151b21","menu.separatorBackground":"#151b211f","menubar.selectionBackground":"#151b2114","menubar.selectionForeground":"#151b21","message.background":"#151b21d9","message.foreground":"#D7DBDE","messageErrorIcon.foreground":"#DB4345","messageInfoIcon.foreground":"#3895EB","messageSuccessIcon.foreground":"#64B436","messageWarningIcon.foreground":"#DBA936","notifications.background":"#fff","notifications.foreground":"#151b21d9","notificationsErrorIcon.foreground":"#DB4345","notificationsInfoIcon.foreground":"#3895EB","notificationsWarningIcon.foreground":"#DBA936","panel.background":"#fff","panel.border":"#43484D","panel.foreground":"#151b21","panel.selectionBackground":"#5F656B40","panel.separatorBackground":"#2C3033","panelMenuBadge.background":"#00000040","panelMenuBar.background":"#2C3033","panelMenuBarBadge.foreground":"#5F656B40","panelTabBarActionIcon.Background":"#868C91","panelTabBarError.foreground":"#DB4345","panelTitle.activeBorder":"#3c8dff","panelTitle.activeForeground":"#151b21","panelTitle.hoverForeground":"#FFFFFF","panelTitle.inactiveForeground":"#151b21a6","selectDropdown.descriptionForeground":"#868C91","selectDropdown.teamForeground":"#868C91","sideBar.background":"#00000000","sideBar.border":"#151b211f","sideBar.dropBackground":"#43484D","sideBar.dropUpBackground":"#1F507D","sideBarSectionHeader.background":"#00000000","sideBarSectionHeader.foreground":"#151b21d9","sideBarTitle.foreground":"#151b21d9","statusBar.background":"#00000000","statusBar.debuggingBackground":"#D77915","statusBar.foreground":"#151b21a6","statusBar.noFolderBackground":"#43484D","statusBarItem.activeBackground":"#FFFFFF40","statusBarItem.hoverBackground":"#FFFFFF03","statusBarItem.remoteBackground":"#3c8dff","statusBarItem.prominentForeground":"#151b21a6","statusBarItem.prominentBackground":"#f1f1f180","tab.activeBackground":"#ffffff","tab.activeForeground":"#151b21","tab.border":"#e9e9e914","tab.inactiveBackground":"#00000000","tab.inactiveForeground":"#151b21d9","tab.hoverBackground":"#00000000","tab.unfocusedActiveBackground":"#202224","tab.unfocusedActiveForeground":"#868C91","tab.unfocusedInactiveForeground":"#868C91","terminal.background":"#FFFFFF","terminal.border":"#252729","terminal.foreground":"#151b21","terminal.offlineBackground":"#D21F2840","terminal.offlineForeground":"#868C91","terminal.offlineLinkForeground":"#3895EB","terminal.selectionBackground":"#5F656B40","tooltip.background":"#35393D","tooltip.foreground":"#D7DBDE","widget.shadow":"#00000099","list.focusOutline":"#00000000","editorInlayHint.parameterBackground":"#00000000","button.background":"#ffffff14","scrollbarSlider.background":"#151b211f","editor.background":"#F1F2F3","quickInput.background":"#fff","list.focusBackground":"#151b5814","textLink.foreground":"#3c8dff","editorStickyScroll.background":"#fff","multiDiffEditor.background":"#fff","multiDiffEditor.border":"#151b211f","multiDiffEditor.headerBackground":"#fff"},semanticHighlighting:!0,semanticTokenColors:{newOperator:"#d4d4d4",stringLiteral:"#ce9178",customLiteral:"#D4D4D4",numberLiteral:"#b5cea8"},encodedTokensColors:[],rules:[],base:"vs",designThemeType:"design-light",inherit:!0,hasDefaultTokens:!1,id:"opensumi-design-light-theme",name:"OpenSumi Design Light+ (default light)"}},98741:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.overrideMonacoColorToken=t.overrideColorToken=void 0;const n=e(85608),r=e(52416),o=n.__importDefault(e(13925)),a=n.__importDefault(e(63080)),p=()=>{const m=(0,r.getColorRegistry)();m.getColors().forEach(({id:_})=>{if(o.default.colors[_]&&a.default.colors[_]){const s=m.getColor(_);(0,r.registerColor)(_,{dark:o.default.colors[_],light:a.default.colors[_],hcDark:s.defaults.hcDark||null,hcLight:s.defaults.hcLight||null},s.description)}})};t.overrideColorToken=p;const v=()=>{(0,r.registerColor)("vscode.quickInputList.focusBackground",{light:"#151b2114",dark:"#5F656B40",hcDark:null,hcLight:null},"Quick picker background color for the focused item."),(0,r.registerColor)("quickInputList.focusForeground",{dark:"#ffffff",light:"#151b21",hcDark:null,hcLight:null},"Quick picker foreground color for the focused item.")};t.overrideMonacoColorToken=v},66338:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DESIGN_MENU_BAR_LEFT=t.DESIGN_MENU_BAR_RIGHT=t.DESIGN_MENUBAR_CONTAINER_VIEW_ID=void 0,t.DESIGN_MENUBAR_CONTAINER_VIEW_ID="design_menubar",t.DESIGN_MENU_BAR_RIGHT="design_menu_bar_right",t.DESIGN_MENU_BAR_LEFT="design_menu_bar_left"},38879:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(66338),t)},82353:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(38879),t)},30526:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiffEditorPart=t.BaseMonacoEditorWrapper=void 0,t.insertSnippetWithMonacoEditor=g;const n=e(85608),r=e(76003),o=e(43718),a=n.__importStar(e(20868)),p=e(99721),v=e(23418),m=e(84677),_=e(6043),s=e(82196);function g(E,f,c,y){const b=E.getContribution("snippetController2"),A=c.map(S=>new a.Selection(S.startLineNumber,S.startColumn,S.endLineNumber,S.endColumn));E.setSelections(A),E.focus(),b.insert(f,0,0,y.undoStopBefore,y.undoStopAfter)}const{removeUndefined:l}=o.objects;function h(E,f,c){E.updateOptions(f),E.getModel()&&E.getModel().updateOptions(c)}let u=class extends o.WithEventBus{get currentUri(){return this.currentDocumentModel?this.currentDocumentModel.uri:null}getId(){return this.monacoEditor.getId()}getSelections(){return this.monacoEditor.getSelections()||[]}disableSelectionEmitter(){this._disableSelectionEmitter=!0}enableSelectionEmitter(){this._disableSelectionEmitter=!1}constructor(f,c){super(),this.monacoEditor=f,this.type=c,this.onFocus=this.monacoEditor.onDidFocusEditorWidget,this.onBlur=this.monacoEditor.onDidBlurEditorWidget,this._specialEditorOptions={},this._specialModelOptions={},this._editorOptionsFromContribution={},this._disableSelectionEmitter=!1,this.decorationApplier=this.injector.get(m.MonacoEditorDecorationApplier,[this.monacoEditor]),this.addDispose(this.monacoEditor.onDidChangeModel(this.onDidChangeModel.bind(this))),this.addDispose(this.monacoEditor.onDidChangeModelLanguage(()=>{this._doUpdateOptions()})),this.addDispose(this.configurationService.onDidChangeConfiguration(y=>{Array.from(y.affectedKeys.values()).filter(A=>(0,_.isEditorOption)(A)).length>0&&this._doUpdateOptions()}))}async onDidChangeModel(){this._editorOptionsFromContribution={};const f=this.currentUri;f&&Promise.resolve(this.editorFeatureRegistry.runProvideEditorOptionsForUri(f)).then(c=>{!this.currentUri||!f.isEqual(this.currentUri)||c&&Object.keys(c).length>0&&(this._editorOptionsFromContribution=c,(0,o.isEmptyObject)(this._editorOptionsFromContribution)||this._doUpdateOptions())})}getType(){return this.type}updateOptions(f={},c={}){this._specialEditorOptions=l({...this._specialEditorOptions,...f}),this._specialModelOptions=l({...this._specialModelOptions,...c}),this._doUpdateOptions()}_doUpdateOptions(){const{editorOptions:f,modelOptions:c}=this._calculateFinalOptions();h(this.monacoEditor,f,c)}_calculateFinalOptions(){var f;const c=this.currentUri?this.currentUri.toString():void 0,y=this.currentDocumentModel?this.currentDocumentModel.languageId:void 0,b=(0,_.getConvertedMonacoOptions)(this.configurationService,c,y,void 0);let S={...{readOnly:((f=this.currentDocumentModel)===null||f===void 0?void 0:f.readonly)||!1},...b.editorOptions,...this._editorOptionsFromContribution,...this._specialEditorOptions};return this.type!==v.EditorType.CODE&&(S={...S,...b.diffOptions}),{editorOptions:S,modelOptions:{...b.modelOptions,...this._specialModelOptions}}}insertSnippet(f,c,y){g(this.monacoEditor,f,c,y)}applyDecoration(f,c){this.decorationApplier.applyDecoration(f,c)}onSelectionsChanged(f){return this.monacoEditor.onDidChangeCursorSelection(c=>{this._disableSelectionEmitter||f({selections:this.getSelections(),source:c.source})})}onVisibleRangesChanged(f){const c=new o.Disposable,y=this.monacoEditor;return c.addDispose(y.onDidScrollChange(b=>{f(this.monacoEditor.getVisibleRanges())})),c.addDispose(y.onDidLayoutChange(b=>{f(this.monacoEditor.getVisibleRanges())})),c}setSelections(f){return this.monacoEditor.setSelections(f)}setSelection(f){return this.monacoEditor.setSelection(f)}async save(){this.currentDocumentModel&&await this.currentDocumentModel.save()}onConfigurationChanged(f){return this.monacoEditor.onDidChangeConfiguration(y=>{f()})}};t.BaseMonacoEditorWrapper=u,n.__decorate([(0,r.Autowired)(s.IEditorFeatureRegistry),n.__metadata("design:type",Object)],u.prototype,"editorFeatureRegistry",void 0),n.__decorate([(0,r.Autowired)(p.IConfigurationService),n.__metadata("design:type",Object)],u.prototype,"configurationService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],u.prototype,"injector",void 0),t.BaseMonacoEditorWrapper=u=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],u);let d=class extends u{get currentDocumentModel(){return this._getDocumentModel()}updateDocumentModel(f){const c=this.documents.get();if(c!=="loading")for(const y of c)y.object.modified&&o.URI.from(y.object.modified.uri).isEqual(f)&&(this._getDocumentModel=()=>y.object.modifiedInstance),y.object.original&&o.URI.from(y.object.original.uri).isEqual(f)&&(this._getDocumentModel=()=>y.object.originalInstance)}constructor(f,c,y,b){super(f,y),this._getDocumentModel=c,this.documents=b}};t.DiffEditorPart=d,t.DiffEditorPart=d=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Function,Object,Object])],d)},87802:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultBreadCrumbProvider=void 0,t.findCurrentDocumentSymbol=h;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),a=e(41869),p=e(26542),v=e(79929),m=e(97408),_=e(82196),s=e(17459),{Path:g}=a.path;let l=class extends a.WithEventBus{constructor(){super(...arguments),this._onDidUpdateBreadCrumb=new a.Emitter,this.onDidUpdateBreadCrumb=this._onDidUpdateBreadCrumb.event,this.debouncedFireUriEvent=new Map,this.cachedBreadCrumb=new a.LRUMap(200,100)}handlesUri(c){return this.fileServiceClient.handlesScheme(c.scheme)}provideBreadCrumbForUri(c,y){return this.getFileParts(c).concat(this.getDocumentSymbolParts(c,y))}getFileParts(c){const y=this.workspaceService.workspace?new a.URI(this.workspaceService.workspace.uri):void 0;let b,A;y&&y.isEqualOrParent(c)?(b=y,A=y.relative(c)):(b=a.URI.from({scheme:c.scheme,authority:c.authority}),A=c.path);let S=b.path;const D=[];for(const I of A.toString().split(g.separator).filter(w=>!!w)){S=S.join(I);const w=b.withPath(S);D.push(this.createFilePartBreadCrumbUri(w,!w.isEqual(c)))}return D}createFilePartBreadCrumbUri(c,y){const b=c.toString();if(this.cachedBreadCrumb.has(b))return this.cachedBreadCrumb.get(b);const A={name:c.path.base,uri:c,icon:this.labelService.getIcon(c,{isDirectory:y}),getSiblings:async()=>{const S=a.URI.from({scheme:c.scheme}).withPath(c.path.dir),D=await this.fileServiceClient.getFileStat(S.toString()),I=[];let w=-1;return D&&D.children&&D.children.length>0&&u(D.children).forEach((T,R)=>{I.push(this.createFilePartBreadCrumbUri(new a.URI(T.uri),T.isDirectory)),w===-1&&c.toString()===T.uri&&(w=R)}),{parts:I,currentIndex:w}}};return y?A.getChildren=async()=>{const S=await this.fileServiceClient.getFileStat(c.toString()),D=[];return S&&S.children&&S.children.length>0&&u(S.children).forEach((I,w)=>{D.push(this.createFilePartBreadCrumbUri(new a.URI(I.uri),I.isDirectory))}),D}:A.onClick=()=>{this.commandService.executeCommand(a.EDITOR_COMMANDS.OPEN_RESOURCE.id,c)},this.cachedBreadCrumb.set(b,A),A}getDocumentSymbolParts(c,y){if(!y)return[];const b=this.documentSymbolStore.getDocumentSymbol(c);if(b&&b.length>0){const A=h(b,y.monacoEditor.getPosition());return A.length>0?A.map(S=>this.createFromDocumentSymbol(S,y)):[{name:"...",getSiblings:()=>({parts:b.sort((S,D)=>E(S.range,D.range)).map(S=>this.createFromDocumentSymbol(S,y)),currentIndex:-1})}]}else return[]}createFromDocumentSymbol(c,y){const b={name:c.name,icon:(0,a.getSymbolIcon)(c.kind),isSymbol:!0,onClick:()=>{y.setSelection({startColumn:c.range.startColumn,endColumn:c.range.startColumn,startLineNumber:c.range.startLineNumber,endLineNumber:c.range.startLineNumber}),y.monacoEditor.revealRangeInCenter(c.range),y.monacoEditor.focus()}};return c.parent&&(b.getSiblings=()=>({parts:c.parent.children.sort((A,S)=>E(A.range,S.range)).map(A=>this.createFromDocumentSymbol(A,y)),currentIndex:c.parent.children.indexOf(c)})),c.children&&c.children.length>0&&(b.getChildren=()=>c.children.sort((A,S)=>E(A.range,S.range)).map(A=>this.createFromDocumentSymbol(A,y))),b}onDocumentSymbolChangedEvent(c){this.notifyUpdate(c.payload)}onEditorSelectionChangeEvent(c){this.notifyUpdate(c.payload.editorUri)}notifyUpdate(c){this.debouncedFireUriEvent.has(c.toString())||this.debouncedFireUriEvent.set(c.toString(),(0,r.default)(()=>{this._onDidUpdateBreadCrumb.fire(c)},100,{maxWait:1e3})),this.debouncedFireUriEvent.get(c.toString())()}};t.DefaultBreadCrumbProvider=l,n.__decorate([(0,o.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],l.prototype,"fileServiceClient",void 0),n.__decorate([(0,o.Autowired)(m.IWorkspaceService),n.__metadata("design:type",Object)],l.prototype,"workspaceService",void 0),n.__decorate([(0,o.Autowired)(p.LabelService),n.__metadata("design:type",p.LabelService)],l.prototype,"labelService",void 0),n.__decorate([(0,o.Autowired)(a.CommandService),n.__metadata("design:type",Object)],l.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",s.DocumentSymbolStore)],l.prototype,"documentSymbolStore",void 0),n.__decorate([(0,a.OnEvent)(s.DocumentSymbolChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.DocumentSymbolChangedEvent]),n.__metadata("design:returntype",void 0)],l.prototype,"onDocumentSymbolChangedEvent",null),n.__decorate([(0,a.OnEvent)(_.EditorSelectionChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.EditorSelectionChangeEvent]),n.__metadata("design:returntype",void 0)],l.prototype,"onEditorSelectionChangeEvent",null),t.DefaultBreadCrumbProvider=l=n.__decorate([(0,o.Injectable)()],l);function h(f,c){const y=[];if(!c)return y;let b=f;for(;b&&b.length>0;){let A=!1;for(const S of b)if(d(c,S.range)){y.push(S),b=S.children,A=!0;break}if(!A)break}return y}function u(f){return f.sort((c,y)=>{if(c.isDirectory&&y.isDirectory||!c.isDirectory&&!y.isDirectory){const b=new a.URI(c.uri).path.name,A=new a.URI(y.uri).path.name;return b.localeCompare(A,"kn",{numeric:!0})}else return c.isDirectory&&!y.isDirectory?-1:!c.isDirectory&&y.isDirectory?1:0})}function d(f,c){return f.lineNumber<c.startLineNumber?!1:f.lineNumber===c.startLineNumber?f.column>=c.startColumn:f.lineNumber<c.endLineNumber?!0:f.lineNumber===c.endLineNumber?f.column<=c.endColumn:!1}function E(f,c){return f.startLineNumber>c.startLineNumber?1:f.startLineNumber<c.startLineNumber?-1:f.startColumn===c.startColumn?0:f.startColumn>c.startColumn?1:-1}},17459:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SymbolTag=t.DocumentSymbolChangedEvent=t.DocumentSymbolStore=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),a=e(41869),p=e(79865),v=e(40540);Object.defineProperty(t,"SymbolTag",{enumerable:!0,get:function(){return v.SymbolTag}});const m=e(23418),_=e(96689);let s=class extends a.WithEventBus{constructor(){super(),this.documentSymbols=new Map,this.pendingUpdate=new Set,this.debounced=new Map,this.symbolDeferred=new Map,this.addDispose(p.languageFeaturesService.documentSymbolProvider.onDidChange(()=>{Array.from(this.documentSymbols.keys()).forEach(d=>{this.markNeedUpdate(new a.URI(d))})}))}getDocumentSymbol(d){return this.documentSymbols.has(d.toString())||(this.documentSymbols.set(d.toString(),void 0),this.createDocumentSymbolCache(d)),this.pendingUpdate.has(d.toString())&&this.updateDocumentSymbolCache(d),this.documentSymbols.get(d.toString())}async getDocumentSymbolAsync(d,E){var f;const c=d.toString();return E&&E.onCancellationRequested(()=>{var y;(y=this.symbolDeferred.get(c))===null||y===void 0||y.resolve(),this.symbolDeferred.delete(c)}),(!this.documentSymbols.has(c)||this.pendingUpdate.has(c))&&!this.symbolDeferred.has(c)&&(this.symbolDeferred.set(c,new a.Deferred),this.updateDocumentSymbolCache(d)),await((f=this.symbolDeferred.get(c))===null||f===void 0?void 0:f.promise),this.documentSymbols.get(c)}async createDocumentSymbolCache(d){this.updateDocumentSymbolCache(d)}async doUpdateDocumentSymbolCache(d){var E,f;this.pendingUpdate.delete(d.toString());const c=await this.editorDocumentModelRegistry.createModelReference(d);if(!c){(E=this.symbolDeferred.get(d.toString()))===null||E===void 0||E.resolve();return}try{const y=p.languageFeaturesService.documentSymbolProvider.all(c.instance.getMonacoModel());let b;for(const A of y)if(b=await A.provideDocumentSymbols(c.instance.getMonacoModel(),new a.CancellationTokenSource().token),b)break;b&&l(b,{children:b},d),this.documentSymbols.set(d.toString(),b),this.eventBus.fire(new g(d))}finally{c.dispose()}(f=this.symbolDeferred.get(d.toString()))===null||f===void 0||f.resolve()}updateDocumentSymbolCache(d){this.debounced.has(d.toString())||this.debounced.set(d.toString(),(0,r.default)(()=>this.doUpdateDocumentSymbolCache(d),100,{maxWait:1e3})),this.debounced.get(d.toString())()}onEditorDocumentModelContentChangedEvent(d){d.payload.changes&&d.payload.changes.length>0&&this.markNeedUpdate(d.payload.uri)}markNeedUpdate(d){this.pendingUpdate.add(d.toString()),this.isWatching(d)&&this.updateDocumentSymbolCache(d)}isWatching(d){for(const E of this.editorService.editorGroups)if(E.currentResource&&E.currentResource.uri.isEqual(d))return!0;return!1}};t.DocumentSymbolStore=s,n.__decorate([(0,o.Autowired)(_.IEditorDocumentModelService),n.__metadata("design:type",Object)],s.prototype,"editorDocumentModelRegistry",void 0),n.__decorate([(0,o.Autowired)(m.WorkbenchEditorService),n.__metadata("design:type",m.WorkbenchEditorService)],s.prototype,"editorService",void 0),n.__decorate([(0,a.OnEvent)(_.EditorDocumentModelContentChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.EditorDocumentModelContentChangedEvent]),n.__metadata("design:returntype",void 0)],s.prototype,"onEditorDocumentModelContentChangedEvent",null),t.DocumentSymbolStore=s=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],s);class g extends a.BasicEvent{}t.DocumentSymbolChangedEvent=g;function l(u,d,E){return u.forEach((f,c)=>{const y=f;y.parent=d,y.id=h(E,y,c),f.children&&f.children.length>0&&l(f.children,f,E)}),u}function h(u,d,E){const f=[d.name];for(;d.parent;){const c=d.parent;if(!c.name)break;f.unshift(c.name),d=c}return`${u.toString()}__${f.join("-")}__${E}`}},88895:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreadCrumbServiceImpl=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(87802),{addElement:p}=o.arrays;let v=class{constructor(){this.providers=[],this._onDidUpdateBreadCrumbResults=new o.Emitter,this.onDidUpdateBreadCrumbResults=this._onDidUpdateBreadCrumbResults.event,this.crumbResults=new Map,this.registerBreadCrumbProvider(this.defaultBreadCrumbProvider)}registerBreadCrumbProvider(g){const l=p(this.providers,g);return g.onDidUpdateBreadCrumb(h=>{this.crumbResults.forEach((u,d)=>{u.has(h.toString())&&this.getBreadCrumbs(h,d)})}),l}getBreadCrumbs(g,l){const h=this.getEditorCrumbResults(l);for(const u of this.providers)if(u.handlesUri(g)){const d=h.get(g.toString()),E=u.provideBreadCrumbForUri(g,l);m(d,E)||(h.set(g.toString(),E),this._onDidUpdateBreadCrumbResults.fire({editor:l,uri:g}));break}return h.get(g.toString())}getEditorCrumbResults(g){return this.crumbResults.has(g)||(this.crumbResults.set(g,new Map),g&&g.monacoEditor.onDidDispose(()=>{this.crumbResults.delete(g)})),this.crumbResults.get(g)}disposeCrumb(g){}};t.BreadCrumbServiceImpl=v,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",a.DefaultBreadCrumbProvider)],v.prototype,"defaultBreadCrumbProvider",void 0),t.BreadCrumbServiceImpl=v=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],v);function m(s,g){if(!s&&!g)return!0;if(!s||!g)return!1;if(s.length!==g.length)return!1;for(let l=0;l<s.length;l++)if(!_(s[l],g[l]))return!1;return!0}function _(s,g){return s.name===g.name}},11673:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorComponentRegistryImpl=void 0;const n=e(85608),r=n.__importDefault(e(46343)),o=n.__importDefault(e(19106)),a=n.__importDefault(e(43144)),p=e(76003),v=e(43718),m=e(82196);let _=class{constructor(){this.components=new Map,this.sideWidgets={bottom:new Set,top:new Set},this.initialPropsMap=new Map,this.resolvers=new Map,this.normalizedResolvers=[],this.perWorkbenchComponents={}}registerEditorComponent(g,l){const h=g.uid;return g.renderMode||(g.renderMode=m.EditorComponentRenderMode.ONE_PER_GROUP),this.components.set(h,g),this.initialPropsMap.set(h,l),this.eventBus.fire(new v.ExtensionActivateEvent({topic:"onRegisterEditorComponent",data:h})),this.eventBus.fire(new m.RegisterEditorComponentEvent(h)),{dispose:()=>{this.components.get(h)===g&&(this.components.delete(h),this.eventBus.fire(new m.EditorComponentDisposeEvent(g)))}}}registerEditorComponentResolver(g,l){let h;return typeof g=="function"?h={handleScheme:g,resolver:l}:h={handleScheme:u=>u===g?10:-1,resolver:l},this.normalizedResolvers.push(h),this.resolvers.clear(),{dispose:()=>{for(const d of this.resolvers.values()){const E=d.indexOf(l);E!==-1&&d.splice(E,1)}const u=this.normalizedResolvers.indexOf(h);u!==-1&&this.normalizedResolvers.splice(u,1)}}}async resolveEditorComponent(g){let l=[];const h=this.getResolvers(g.uri.scheme).slice();let u=!1;const d=E=>{l=E,u=!0};for(const E of h)if(await E(g,l,d),u)break;return l.sort((E,f)=>{const c=E.weight||0;return(f.weight||0)-c}),(0,o.default)(l,r.default)}calculateSchemeResolver(g){const l=this.normalizedResolvers.slice(),h=[];return l.forEach((u,d)=>{const E=u.handleScheme(g);E>=0&&h.push({weight:E,index:d,resolver:u.resolver})}),h.sort((u,d)=>u.weight>d.weight?-1:u.weight<d.weight?1:d.index-u.index).map(u=>u.resolver)}getResolvers(g){return this.resolvers.has(g)||this.resolvers.set(g,this.calculateSchemeResolver(g)),this.resolvers.get(g)}getEditorComponent(g){return this.components.get(g)||null}getEditorInitialProps(g){return this.initialPropsMap.get(g)||null}clearPerWorkbenchComponentCache(g){a.default.unmountComponentAtNode(this.perWorkbenchComponents[g]),delete this.perWorkbenchComponents[g]}getSideWidgets(g,l){const h=[];return this.sideWidgets[g].forEach(u=>{u.displaysOnResource(l)&&h.push(u)}),h.sort((u,d)=>{const E=u.weight===void 0?10:u.weight;return(d.weight===void 0?10:d.weight)-E})}registerEditorSideWidget(g){const l=g.side||"bottom";return this.sideWidgets[l].add(g),this.eventBus.fire(new m.RegisterEditorSideComponentEvent),{dispose:()=>{this.sideWidgets[l].delete(g)}}}};t.EditorComponentRegistryImpl=_,n.__decorate([(0,p.Autowired)(v.IEventBus),n.__metadata("design:type",Object)],_.prototype,"eventBus",void 0),t.EditorComponentRegistryImpl=_=n.__decorate([(0,p.Injectable)()],_)},84677:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoEditorDecorationApplier=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=e(76003),a=e(43718),p=e(52416),v=e(82196);let m=class extends a.Disposable{constructor(u){super(),this.editor=u,this.decorations=new Map,this.applyDecorationFromProvider(),this.editor.onDidChangeModel(()=>{this.clearDecorations(),this.applyDecorationFromProvider()}),this.editor.onDidDispose(()=>{this.dispose()}),this.addDispose(this.eventBus.on(v.EditorDecorationChangeEvent,d=>{const E=this.getEditorUri();E&&d.payload.uri.isEqual(E)&&this.applyDecorationFromProvider(d.payload.key)})),this.addDispose(this.eventBus.on(v.EditorDecorationTypeRemovedEvent,d=>{this.deltaDecoration(d.payload,[])}))}getEditorUri(){return this.editor.getModel()?new a.URI(this.editor.getModel().uri.toString()):null}async applyDecorationFromProvider(u){if(this.editor.getModel()){const d=new a.URI(this.editor.getModel().uri.toString()),E=await this.decorationService.getDecorationFromProvider(d,u);if(!this.editor.getModel()||this.editor.getModel().uri.toString()!==d.toString())return;for(const f of Object.keys(E))this.deltaDecoration(f,E[f]);this.eventBus.fire(new v.DidApplyEditorDecorationFromProvider({key:u,uri:d}))}}dispose(){super.dispose(),this.clearDecorations()}clearDecorations(){this.decorations.forEach(u=>{u.dispose(),this.editor.deltaDecorations(u.decorations,[])}),this.decorations.clear()}deltaDecoration(u,d){let E=[];if(this.decorations.has(u)&&(E=this.decorations.get(u).decorations,this.decorations.get(u).dispose(),this.decorations.delete(u)),E.length===0&&d.length===0)return;const f=this.editor.deltaDecorations(E,d);this.decorations.set(u,{decorations:f,dispose:()=>null})}applyDecoration(u,d){const E=this.decorations.get(u);E&&E.dispose();const f=E?E.decorations:[],c=[],y=new a.Disposable;if(f.length===0&&d.length===0)return;d.forEach(A=>{const S=this.resolveDecorationRenderer(u,A.renderOptions);c.push({range:A.range,options:{...S.options,hoverMessage:g(A.hoverMessage)}}),y.addDispose(S)});const b=this.editor.deltaDecorations(f,c);this.decorations.set(u,{decorations:b,dispose:()=>y.dispose()})}resolveDecorationRenderer(u,d){const E=this.decorationService.getTextEditorDecorationType(u),f={description:u},c=this.themeService.getCurrentThemeSync().type,y=new a.Disposable;if(E){const b=E.property;_(f,b,c)}if(d){const b=this.decorationService.createTextEditorDecorationType(d);_(f,b.property,c),y.addDispose(b)}return{options:f,dispose:()=>y.dispose()}}};t.MonacoEditorDecorationApplier=m,n.__decorate([(0,o.Autowired)(v.IEditorDecorationCollectionService),n.__metadata("design:type",Object)],m.prototype,"decorationService",void 0),n.__decorate([(0,o.Autowired)(p.IThemeService),n.__metadata("design:type",Object)],m.prototype,"themeService",void 0),n.__decorate([(0,o.Autowired)(a.IEventBus),n.__metadata("design:type",Object)],m.prototype,"eventBus",void 0),t.MonacoEditorDecorationApplier=m=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],m);function _(h,u,d){u.overviewRulerLane&&(h.overviewRuler?h.overviewRuler.position=u.overviewRulerLane:h.overviewRuler={color:null,position:u.overviewRulerLane}),u.default&&s(h,u.default),d==="dark"&&u.dark&&s(h,u.dark),d==="light"&&u.light&&s(h,u.light),u.isWholeLine!==void 0&&(h.isWholeLine=u.isWholeLine),u.rangeBehavior&&(h.stickiness=u.rangeBehavior),h.inlineClassNameAffectsLetterSpacing=!0}function s(h,u){u.className&&(h.className=(0,r.default)(h.className,u.className)),u.inlineClassName&&(h.inlineClassName=(0,r.default)(h.inlineClassName,u.inlineClassName)),u.afterContentClassName&&(h.afterContentClassName=(0,r.default)(h.afterContentClassName,u.afterContentClassName)),u.beforeContentClassName&&(h.beforeContentClassName=(0,r.default)(h.beforeContentClassName,u.beforeContentClassName)),u.glyphMarginClassName&&(h.glyphMarginClassName=(0,r.default)(h.glyphMarginClassName,u.glyphMarginClassName)),u.overviewRulerColor&&h.overviewRuler&&(h.overviewRuler.color=u.overviewRulerColor)}function g(h){if(h)return h instanceof Array?h.map(l):l(h)}function l(h){return typeof h=="string"?{value:h,isTrusted:!0}:h}},84158:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompareEditorContribution=t.CompareService=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(93899),p=e(82196);let v=class{constructor(){this.comparing=new Map}compare(s,g,l){const h=o.URI.from({scheme:p.DIFF_SCHEME,query:o.URI.stringifyQuery({name:l,original:s,modified:g,comparing:!0})});if(!this.comparing.has(h.toString())){const u=new o.Deferred;this.comparing.set(h.toString(),u),u.promise.then(()=>{this.comparing.delete(h.toString()),this.commandService.executeCommand(o.EDITOR_COMMANDS.CLOSE_ALL.id,h)})}return this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,h),this.comparing.get(h.toString()).promise}};t.CompareService=v,n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],v.prototype,"commandService",void 0),t.CompareService=v=n.__decorate([(0,r.Injectable)()],v);let m=class{registerMenus(s){s.registerMenuItems(a.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.ACCEPT.id,label:(0,o.localize)("editor.action.accept")},iconClass:(0,o.getIcon)("check"),group:"navigation",when:"isInDiffEditor && diffResource =~ /%26comparing%3Dtrue$/"}]),s.registerMenuItems(a.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.REVERT.id,label:(0,o.localize)("editor.action.revert")},iconClass:(0,o.getIcon)("rollback"),group:"navigation",when:"isInDiffEditor && diffResource =~ /%26comparing%3Dtrue$/"}]),s.registerMenuItems(a.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.TOGGLE_COLLAPSE_UNCHANGED_REGIONS.id,label:(0,o.localize)("diffEditor.action.toggleCollapseUnchangedRegions")},toggledWhen:"config.diffEditor.hideUnchangedRegions.enabled",iconClass:"codicon codicon-map",group:"navigation",when:"isInDiffEditor"}])}registerCommands(s){s.registerCommand(o.DIFF_EDITOR_COMMANDS.ACCEPT,{execute:g=>{g&&this.compareService.comparing.has(g.toString())&&this.compareService.comparing.get(g.toString()).resolve(p.CompareResult.accept)}}),s.registerCommand(o.DIFF_EDITOR_COMMANDS.REVERT,{execute:g=>{g&&this.compareService.comparing.has(g.toString())&&this.compareService.comparing.get(g.toString()).resolve(p.CompareResult.revert)}}),s.registerCommand(o.DIFF_EDITOR_COMMANDS.TOGGLE_COLLAPSE_UNCHANGED_REGIONS,{execute:()=>{const g=this.preferenceService.get("diffEditor.hideUnchangedRegions.enabled");this.preferenceService.set("diffEditor.hideUnchangedRegions.enabled",!g,o.PreferenceScope.User)}})}};t.CompareEditorContribution=m,n.__decorate([(0,r.Autowired)(p.ICompareService),n.__metadata("design:type",v)],m.prototype,"compareService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],m.prototype,"preferenceService",void 0),t.CompareEditorContribution=m=n.__decorate([(0,o.Domain)(a.MenuContribution,o.CommandContribution)],m)},57581:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultDiffEditorContribution=t.DiffResourceProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(26542),p=e(14951),v=e(23418),m=e(82196);let _=class extends o.WithEventBus{constructor(){super(...arguments),this.scheme=v.DIFF_SCHEME,this.modifiedToResource=new Map}onResourceDecorationChangeEvent(l){l.payload.uri&&this.modifiedToResource.has(l.payload.uri.toString())&&this.eventBus.fire(new v.ResourceDecorationNeedChangeEvent({uri:this.modifiedToResource.get(l.payload.uri.toString()),decoration:l.payload.decoration}))}async getCurrentUserHome(){if(!this.userhomePath)try{const l=await this.fileServiceClient.getCurrentUserHome();l&&(this.userhomePath=new o.URI(l.uri))}catch{}return this.userhomePath}async getReadableTooltip(l){const h=l.toString(),u=await this.getCurrentUserHome();if(!u)return decodeURIComponent(l.withScheme("").toString());if(u.isEqualOrParent(l)){const d=u&&u.toString();return decodeURIComponent(h.replace(d,"~"))}return decodeURIComponent(l.withScheme("").toString())}async provideResource(l){const{original:h,modified:u,name:d}=l.getParsedQuery(),E=new o.URI(h),f=new o.URI(u);return this.modifiedToResource.set(f.toString(),l),Promise.all([this.labelService.getIcon(E),this.getReadableTooltip(f)]).then(([c,y])=>{var b;return{name:d,icon:c,uri:l,supportsRevive:(b=this.appConfig.enableDiffRevive)!==null&&b!==void 0?b:!0,metadata:{original:E,modified:f},title:y}})}async shouldCloseResource(l,h){const{modified:u}=l.uri.getParsedQuery(),d=new o.URI(u),E=await this.resourceService.getResource(d);return E?await this.resourceService.shouldCloseResource(E,h):!0}};t.DiffResourceProvider=_,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",a.LabelService)],_.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(v.ResourceService),n.__metadata("design:type",v.ResourceService)],_.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],_.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),n.__decorate([(0,o.OnEvent)(v.ResourceDecorationChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[v.ResourceDecorationChangeEvent]),n.__metadata("design:returntype",void 0)],_.prototype,"onResourceDecorationChangeEvent",null),t.DiffResourceProvider=_=n.__decorate([(0,r.Injectable)()],_);let s=class{registerResource(l){l.registerResourceProvider(this.diffResourceProvider)}registerEditorComponent(l){l.registerEditorComponentResolver(v.DIFF_SCHEME,(h,u)=>{u.push({type:m.EditorOpenType.diff})})}};t.DefaultDiffEditorContribution=s,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",_)],s.prototype,"diffResourceProvider",void 0),t.DefaultDiffEditorContribution=s=n.__decorate([(0,o.Domain)(m.BrowserEditorContribution)],s)},21690:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyDocCacheImpl=void 0;const n=e(85608),r=e(76003);let o=class{hasCache(p){return!1}isFlushed(){return!0}getCache(p){return null}persistCache(p,v){}};t.EmptyDocCacheImpl=o,t.EmptyDocCacheImpl=o=n.__decorate([(0,r.Injectable)()],o)},80487:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(21690),t),n.__exportStar(e(7220),t)},7220:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStorageDocCacheImpl=void 0;const n=e(85608),r=e(76003),o=e(51500),a=e(93107);let p=class{hasCache(m){return!0}isFlushed(){return!0}async getCache(m){const _=this.parseKeyFrom(m);return await this.storageService.getData(_)||null}persistCache(m,_){const s=this.parseKeyFrom(m),g=this.parseCacheFrom(m,_);this.storageService.setData(s,g)}parseCacheFrom(m,_){if(!(!_.dirty||!_.changeMatrix.length))return{path:m.path.toString(),startMD5:_.startMD5,changeMatrix:_.changeMatrix.map(s=>s.map(g=>(0,a.parseCacheValueFrom)(g)))}}parseKeyFrom(m){return`LocalStorageDocCacheImpl_${m.toString()}`}};t.LocalStorageDocCacheImpl=p,n.__decorate([(0,r.Autowired)(o.IWorkspaceStorageService),n.__metadata("design:type",Object)],p.prototype,"storageService",void 0),t.LocalStorageDocCacheImpl=p=n.__decorate([(0,r.Injectable)()],p)},86942:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDocumentError=void 0;var e;(function(n){n.READ_CACHE_ERROR="EditorDocumentError:READ_CACHE_ERROR",n.APPLY_CACHE_TO_DIRTY_DOCUMENT="EditorDocumentError:APPLY_CACHE_TO_DIRTY_DOCUMENT",n.APPLY_CACHE_TO_DIFFERENT_DOCUMENT="EditorDocumentError:APPLY_CACHE_TO_DIFFERENT_DOCUMENT",n.FORMAT_ERROR="EditorDocumentError:FORMAT_ERROR"})(e||(t.EditorDocumentError=e={}))},9519:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDocumentModelServiceImpl=t.EDITOR_DOC_OPTIONS_PREF_KEY=t.EDITOR_DOCUMENT_MODEL_STORAGE=void 0;const n=e(85608),r=e(76003),o=e(41869),a=e(96405),p=e(14951),v=e(91249),m=e(96689);t.EDITOR_DOCUMENT_MODEL_STORAGE=new o.URI("editor-doc").withScheme(o.STORAGE_SCHEMA.SCOPE),t.EDITOR_DOC_OPTIONS_PREF_KEY="editor_doc_pref";let _=class extends o.WithEventBus{constructor(){super(),this.editorDocModels=new Map,this.creatingEditorModels=new Map,this._modelsToDispose=new Set,this.preferredModelOptions=new Map,this._ready=this.registerDispose(new o.ReadyEvent),this.modelCreationEventDispatcher=this.registerDispose(new o.Dispatcher),this._modelReferenceManager=new o.ReferenceManager(g=>(this._modelsToDispose.has(g)&&this._modelsToDispose.delete(g),this.getOrCreateModel(g))),this._modelReferenceManager.onReferenceAllDisposed(g=>{this._delete(g)}),this._modelReferenceManager.onInstanceCreated(g=>{this.modelCreationEventDispatcher.dispatch(g.uri.toString()),this.eventBus.fire(new m.EditorDocumentModelCreationEvent({uri:g.uri,languageId:g.languageId,eol:g.eol,encoding:g.encoding,content:g.getText(),readonly:g.readonly,versionId:g.getMonacoModel().getVersionId()}))}),this.addDispose(this.preferenceService.onPreferenceChanged(g=>{g.preferenceName==="editor.detectIndentation"&&this.editorDocModels.forEach(l=>{l.updateOptions({})})}))}onDocumentModelCreated(g,l){return this.modelCreationEventDispatcher.on(g)(l)}_delete(g){const l=this.preferenceService.get("editor.modelDisposeTime",3e3);this._modelsToDispose.add(g.toString());let h=null;const u=this.addDispose({dispose:()=>{h&&clearTimeout(h)}});h=window.setTimeout(()=>{u.dispose(),h=null,this._modelsToDispose.has(g.toString())&&this._doDelete(g.toString())},l)}_doDelete(g){const l=this.editorDocModels.get(g);if(l&&(!l.dirty||l.disposeEvenDirty))return l.dispose(),this.editorDocModels.delete(g),l;this._modelsToDispose.delete(g)}async changeModelOptions(g,l){return this.onceReady(()=>{this.preferredModelOptions.has(g.toString())&&(l={...this.preferredModelOptions.get(g.toString()),...l}),this.preferredModelOptions.set(g.toString(),l);const h=this.getModelReference(g);return h&&(l.encoding&&l.encoding!==h.instance.encoding&&h.instance.updateEncoding(l.encoding),l.languageId&&l.languageId!==h.instance.languageId&&(h.instance.languageId=l.languageId),l.eol&&l.eol!==h.instance.eol&&(h.instance.eol=l.eol),h.dispose()),this.persistOptionsPreference()})}persistOptionsPreference(){return this.storage.set(t.EDITOR_DOC_OPTIONS_PREF_KEY,JSON.stringify((0,o.mapToSerializable)(this.preferredModelOptions)))}async initialize(){if(this.storage=await this.getStorage(t.EDITOR_DOCUMENT_MODEL_STORAGE),this.storage.get(t.EDITOR_DOC_OPTIONS_PREF_KEY))try{this.preferredModelOptions=(0,o.serializableToMap)(JSON.parse(this.storage.get(t.EDITOR_DOC_OPTIONS_PREF_KEY)))}catch(g){this.logger.error(g)}this._ready.ready()}async acceptExternalChange(g){this.hashCalculateService.initialized||await this.hashCalculateService.initialize();const l=this.editorDocModels.get(g.payload.toString());if(l&&!l.dirty){const h=await this.contentRegistry.getProvider(l.uri);if(h)if(h.provideEditorDocumentModelContentMd5)await h.provideEditorDocumentModelContentMd5(l.uri,l.encoding)!==l.getBaseContentMd5()&&l.updateContent(await this.contentRegistry.getContentForUri(l.uri,l.encoding),void 0,!0);else{const u=await this.contentRegistry.getContentForUri(l.uri,l.encoding);this.hashCalculateService.calculate(u)!==l.getBaseContentMd5()&&l.updateContent(u,void 0,!0)}}}createModelReference(g,l){return this._modelReferenceManager.getReference(g.toString(),l)}getModelReference(g,l){return this._modelReferenceManager.getReferenceIfHasInstance(g.toString(),l)}getModelDescription(g,l){const h=this.getModelReference(g,l);if(!h)return null;const u=h.instance,d={alwaysDirty:u.alwaysDirty,closeAutoSave:u.closeAutoSave,disposeEvenDirty:u.disposeEvenDirty,eol:u.eol,encoding:u.encoding,dirty:u.dirty,languageId:u.languageId,readonly:u.readonly,uri:u.uri,id:u.id,savable:u.savable};return h.dispose(),d}getAllModels(){return Array.from(this.editorDocModels.values())}hasLanguage(g){return this.getAllModels().findIndex(l=>l.languageId===g)!==-1}async getOrCreateModel(g,l){return this.editorDocModels.has(g)?this.editorDocModels.get(g):this.createModel(g,l)}get onceReady(){return this.initialize(),this._ready.onceReady.bind(this._ready)}createModel(g,l){if(!this.creatingEditorModels.has(g)){const h=this.doCreateModel(g,l).then(u=>(this.creatingEditorModels.delete(g),u),u=>{throw this.creatingEditorModels.delete(g),u});this.creatingEditorModels.set(g,h)}return this.creatingEditorModels.get(g)}async doCreateModel(g,l){const h=new o.URI(g);let u=await this.contentRegistry.getProvider(h);if(u||await this.fileSystem.shouldWaitProvider(h.scheme)&&(u=await this.contentRegistry.getProvider(h)),!u)throw new Error(`No document provider found for ${h.toString()}`);const[d,E,f,c,y,b]=await Promise.all([u.provideEditorDocumentModelContent(h,l),u.isReadonly?u.isReadonly(h):void 0,u.preferLanguageForUri?u.preferLanguageForUri(h):void 0,u.isAlwaysDirty?u.isAlwaysDirty(h):!1,u.closeAutoSave?u.closeAutoSave(h):!1,u.disposeEvenDirty?u.disposeEvenDirty(h):!1]);!l&&u.provideEncoding&&(l=await u.provideEncoding(h));const A=u.provideEOL?await u.provideEOL(h):`
31953
31953
  `,S=!!u.saveDocumentModel,D=this.injector.get(v.EditorDocumentModel,[h,d,{readonly:E,languageId:f,savable:S,eol:A,encoding:l,alwaysDirty:c,closeAutoSave:y,disposeEvenDirty:b}]);return this.onceReady(()=>{if(this.preferredModelOptions.has(h.toString())){const I=this.preferredModelOptions.get(h.toString());I?.encoding&&D.updateEncoding(I.encoding),I?.eol&&(D.eol=I.eol),I?.languageId&&(D.languageId=I.languageId)}}),this.editorDocModels.set(h.toString(),D),D}async saveEditorDocumentModel(g,l,h,u,d,E,f){const c=await this.contentRegistry.getProvider(g);if(!c)throw new Error(`No document provider found for ${g.toString()}`);if(!c.saveDocumentModel)throw new Error(`The document provider of ${g.toString()} does not have a save method`);return await c.saveDocumentModel(g,l,h,u,d,E,f)}dispose(){super.dispose(),this.getAllModels().forEach(g=>{g.getMonacoModel().dispose()})}};t.EditorDocumentModelServiceImpl=_,n.__decorate([(0,r.Autowired)(m.IEditorDocumentModelContentRegistry),n.__metadata("design:type",Object)],_.prototype,"contentRegistry",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],_.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],_.prototype,"getStorage",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],_.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(a.IHashCalculateService),n.__metadata("design:type",Object)],_.prototype,"hashCalculateService",void 0),n.__decorate([(0,r.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],_.prototype,"fileSystem",void 0),n.__decorate([o.memoize,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Promise)],_.prototype,"initialize",null),n.__decorate([(0,o.OnEvent)(m.EditorDocumentModelOptionExternalUpdatedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[m.EditorDocumentModelOptionExternalUpdatedEvent]),n.__metadata("design:returntype",Promise)],_.prototype,"acceptExternalChange",null),t.EditorDocumentModelServiceImpl=_=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],_)},91249:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDocumentModel=void 0;const r=e(85608),o=r.__importDefault(e(12784)),a=e(76003),p=e(41869),v=e(96405),m=e(52902),_=e(68475),s=e(72665),g=e(2261),l=e(44781),h=e(43255),u=e(24347),d=e(23418),E=e(55113),f=e(90915),c=e(82196),y=e(86942),b=e(98469),A=e(96689);let S=n=class extends p.Disposable{constructor(I,w,T={}){super(),this.uri=I,this.saveQueue=new p.Throttler,this._encoding="utf8",this.readonly=!1,this.savable=!1,this.alwaysDirty=!1,this.closeAutoSave=!1,this.disposeEvenDirty=!1,this._originalEncoding=this._encoding,this._persistVersionId=0,this._baseContent="",this.savingTasks=[],this.dirtyChanges=[],this._isInitOption=!0,this._onDidChangeEncoding=new p.Emitter,this.onDidChangeEncoding=this._onDidChangeEncoding.event,this.onDispose(()=>{this.eventBus.fire(new A.EditorDocumentModelRemovalEvent(this.uri))}),T.encoding&&(this._encoding=T.encoding),this.readonly=!!T.readonly,this.savable=!!T.savable,this.alwaysDirty=!!T.alwaysDirty,this.disposeEvenDirty=!!T.disposeEvenDirty,this.closeAutoSave=!!T.closeAutoSave,this.monacoModel=m.monaco.editor.createModel(w,T.languageId,m.URI.parse(I.toString())),this.editorPreferences=(0,f.createEditorPreferenceProxy)(this.preferences,this.uri.toString(),this.languageId),this.updateOptions({}),T.eol&&(this.eol=T.eol),this._originalEncoding=this._encoding,this._previousVersionId=this.monacoModel.getVersionId(),this._persistVersionId=this.monacoModel.getAlternativeVersionId(),this.baseContent=w,this._isInitOption=!1,this.listenTo(this.monacoModel),this.readCacheToApply(),this.addDispose(this._onDidChangeEncoding),this.addDispose(this.monacoModel.onDidChangeLanguage(R=>{this.eventBus.fire(new A.EditorDocumentModelOptionChangedEvent({uri:this.uri,languageId:R.newLanguage}))}))}updateOptions(I){const w={tabSize:this.editorPreferences["editor.tabSize"]||1,insertSpaces:this.editorPreferences["editor.insertSpaces"],detectIndentation:this.editorPreferences["editor.detectIndentation"],...I};w.detectIndentation?this.monacoModel.detectIndentation(w.insertSpaces,w.tabSize):this.monacoModel.updateOptions(w)}listenTo(I){this.addDispose(I.onDidChangeContent(w=>{w.changes&&w.changes.length>0&&this.dirtyChanges.push({fromVersionId:this._previousVersionId,toVersionId:w.versionId,changes:w.changes}),this._previousVersionId=w.versionId,this.notifyChangeEvent(w.changes,w.isRedoing,w.isUndoing)})),this.addDispose(I)}readCacheToApply(){if(!this.cacheProvider.hasCache(this.uri))return;const I=this.cacheProvider.getCache(this.uri,this.encoding);I&&((0,p.isThenable)(I)?I.then(w=>{w&&this.applyCache(w)}).catch(w=>{this.logger.error(`${y.EditorDocumentError.READ_CACHE_ERROR} ${w&&w.message}`)}):this.applyCache(I))}applyCache(I){if(this.dirty){this.logger.error(y.EditorDocumentError.APPLY_CACHE_TO_DIRTY_DOCUMENT);return}if(this.baseContentMd5!==I.startMD5){this.logger.error(y.EditorDocumentError.APPLY_CACHE_TO_DIFFERENT_DOCUMENT);return}const w=T=>{const[R,M,O,x,k]=T;return l.Range.lift({startLineNumber:M,startColumn:O,endLineNumber:x,endColumn:k})};if((0,d.isDocContentCache)(I))this.monacoModel.setValue(I.content);else for(const T of I.changeMatrix){const R=T.map(M=>({range:w(M),text:M[0]}));this.monacoModel.applyEdits(R)}}cleanAndUpdateContent(I){this.monacoModel.setValue(I),this.monacoModel._commandManager.clear(),this._persistVersionId=this.monacoModel.getAlternativeVersionId(),this.savingTasks=[],this.notifyChangeEvent([],!1,!1),this.baseContent=I}async updateEncoding(I){let w=!1;this._encoding!==I&&(w=!0),this._encoding=I,await this.reload(),w&&(this.eventBus.fire(new A.EditorDocumentModelOptionChangedEvent({uri:this.uri,encoding:this._encoding})),this._onDidChangeEncoding.fire())}get encoding(){return this._encoding}set eol(I){this.monacoModel.setEOL(I===`
31954
31954
  `?_.EndOfLineSequence.LF:_.EndOfLineSequence.CRLF),this._isInitOption||this.eventBus.fire(new A.EditorDocumentModelOptionChangedEvent({uri:this.uri,eol:I}))}get eol(){return this.monacoModel.getEOL()}get dirty(){return this.alwaysDirty?!0:!this.savable||this.monacoModel.isDisposed()||this.readonly?!1:this._persistVersionId!==this.monacoModel.getAlternativeVersionId()}set languageId(I){m.monaco.editor.setModelLanguage(this.monacoModel,I),this.eventBus.fire(new A.EditorDocumentModelOptionChangedEvent({uri:this.uri,languageId:I}))}get languageId(){return this.monacoModel.getLanguageId()}get id(){return this.monacoModel.id}getMonacoModel(){return this.monacoModel}async syncDocumentModelToExtThread(){await this.eventBus.fireAndAwait(new A.EditorDocumentModelOptionChangedEvent({uri:this.uri,languageId:this.languageId,encoding:this.encoding,eol:this.eol,dirty:this.dirty}))}async save(I=!1,w=d.SaveReason.Manual){if(!this.dirty)return await this.syncDocumentModelToExtThread(),!1;const T=await this.contentRegistry.getProvider(this.uri);if(await T?.isReadonly(this.uri))return!1;const M=async(O=!1,x=d.SaveReason.Manual)=>{if(await this.formatOnSave(x),await this.eventBus.fireAndAwait(new A.EditorDocumentModelWillSaveEvent({uri:this.uri,reason:x,language:this.languageId,dirty:this.dirty})),this.editorPreferences["editor.askIfDiff"]||(O=!0),!this.dirty)return!1;const k=this.monacoModel.getVersionId(),F=this.savingTasks[this.savingTasks.length-1];if(F&&F.versionId===k){F.cancel();const U=this.savingTasks.pop();U?.dispose()}const L=new b.SaveTask(this.uri,k,this.monacoModel.getAlternativeVersionId(),this.getText(),O);this.savingTasks.push(L),this.savingTasks.length>0&&this.initSave();const B=await L.finished;if(B.state===p.SaveTaskResponseState.SUCCESS)return this.monacoModel.pushStackElement(),!0;if(B.state===p.SaveTaskResponseState.ERROR)return B.errorMessage!=="cancel"&&(this.logger.error(B.errorMessage),this.messageService.error((0,p.localize)("doc.saveError.failed")+`
31955
31955
  `+B.errorMessage)),!1;if(B.state===p.SaveTaskResponseState.DIFF){const U=(0,p.localize)("doc.saveError.diffAndSave"),W=(0,p.localize)("doc.saveError.overwrite");return this.messageService.error((0,p.formatLocalize)("doc.saveError.diff",this.uri.toString()),[U,W]).then(j=>{j===U?this.compareAndSave():j===W&&M(!0,x)}),this.logger.error("The file cannot be saved, the version is inconsistent with the disk"),!1}return!1};return this.saveQueue.queue(M.bind(this,I,w))}async compareAndSave(){const I=p.URI.from({scheme:A.ORIGINAL_DOC_SCHEME,query:p.URI.stringifyQuery({target:this.uri.toString()})}),w=this.uri.path.base,T=await this.compareService.compare(I,this.uri,(0,p.formatLocalize)("editor.compareAndSave.title",w,w));T===c.CompareResult.revert?this.revert():T===c.CompareResult.accept&&this.save(!0)}async initSave(){for(;this.savingTasks.length>0;){const I=this.dirtyChanges;this.dirtyChanges=[],(await this.savingTasks[0].run(this.service,this.baseContent,I,this.encoding,this.eol)).state==="success"&&this.savingTasks[0]?(this.baseContent=this.savingTasks[0].content,this.eventBus.fire(new A.EditorDocumentModelSavedEvent(this.uri)),this.setPersist(this.savingTasks[0].alternativeVersionId)):this.dirtyChanges.unshift(...I),this.savingTasks.shift()}}setPersist(I){this._persistVersionId=I,this.notifyChangeEvent([],!1,!1)}async reload(){try{const I=await this.contentRegistry.getContentForUri(this.uri,this._encoding);(0,p.isUndefinedOrNull)(I)||this.cleanAndUpdateContent(I)}catch{this._persistVersionId=this.monacoModel.getAlternativeVersionId()}}async revert(I){I?this._persistVersionId=this.monacoModel.getAlternativeVersionId():await this.updateEncoding(this._originalEncoding)}getText(I){return I?this.monacoModel.getValueInRange(I):this.monacoModel.getValue()}updateContent(I,w,T=!1){w&&(this.eol=w);const R=this.eol===`\r
@@ -31965,7 +31965,7 @@ ${c}`)}return this.keybindingsChanged.fire({affectsCommands:[E.command]}),{dispo
31965
31965
  `:`
31966
31966
  `}async provideEditorDocumentModelContent(_,s){return(await this.read(_,{encoding:s})).content}async isReadonly(_){const s=this.editorPreferences["editor.readonlyFiles"];if(s&&s.length){for(const g of s)if(_.isEqual(o.URI.file(g))||_.matchGlobPattern(g)||_.toString().endsWith(g.replace("./","")))return!0}return this.fileServiceClient.isReadonly(_.toString())}async saveDocumentModel(_,s,g,l,h,u=!1){try{const d=await this.fileServiceClient.getFileStat(_.toString());return d?await this.fileServiceClient.setContent(d,s,{encoding:h}):await this.fileServiceClient.createFile(_.toString(),{content:s,overwrite:!0,encoding:h}),{state:o.SaveTaskResponseState.SUCCESS}}catch(d){return{state:o.SaveTaskResponseState.ERROR,errorMessage:d.message}}}onDidDisposeModel(_){this._fileContentMd5OnBrowserFs.delete(_.toString())}async guessEncoding(_){return(await this.read(_,{autoGuessEncoding:!0})).encoding}getReadEncoding(_,s,g){let l;return s?.encoding?g===o.UTF8_with_bom&&s.encoding===o.UTF8?l=o.UTF8_with_bom:l=s.encoding:g&&(l=g),this.getEncodingForResource(_,l)}async getEncodingForResource(_,s){return this.encodingRegistry.getEncodingForResource(_,s)}};t.BaseFileSystemEditorDocumentProvider=v,n.__decorate([(0,r.Autowired)(a.IFileServiceClient),n.__metadata("design:type",Object)],v.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(p.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),a=e(41869),p=e(26542),v=e(43718),m=e(42933),_=e(72665),s=e(23418),g=e(96689),l=e(5580),{Path:h}=v.path;let u=n=class extends a.WithEventBus{constructor(){super(),this.cachedFileStat=new a.LRUMap(200,100),this.ready=this.init(),this.listen()}async init(){const f=await this.applicationService.getBackendOS();this.involvedFiles=new l.FileTreeSet(f===a.OperatingSystem.Windows)}handlesUri(f){const c=f.scheme;return this.fileServiceClient.handlesScheme(c)?10:-1}listen(){this.fileServiceClient.onFilesChanged(f=>{f.forEach(c=>{var y;c.type===v.FileChangeType.ADDED||c.type===v.FileChangeType.DELETED?((y=this.involvedFiles)===null||y===void 0?void 0:y.effects(new a.URI(c.uri).codeUri.fsPath)).forEach(A=>{const S=a.URI.file(A);this.cachedFileStat.delete(S.toString()),this.eventBus.fire(new s.ResourceNeedUpdateEvent(S))}):this.cachedFileStat.has(c.uri)&&this.cachedFileStat.get(c.uri)===void 0&&(this.cachedFileStat.delete(c.uri),this.eventBus.fire(new s.ResourceNeedUpdateEvent(new a.URI(c.uri))))})}),this.labelService.onDidChange(f=>{var c;f.codeUri.fsPath&&(!((c=this.involvedFiles)===null||c===void 0)&&c.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 a.URI(f.uri))}catch{}return this.userhomePath}async getReadableTooltip(f){const c=f.toString(),y=await this.getCurrentUserHome();if(!y)return decodeURIComponent(f.withScheme("").toString());if(y.isEqualOrParent(f)){const b=y&&y.toString();return decodeURIComponent(c.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(([c,y,b,A])=>({name:c?y:y+(0,a.localize)("file.resource-deleted","(\u5DF2\u5220\u9664)"),icon:b,uri:f,metadata:null,deleted:!c,supportsRevive:!0,title:A}))}provideResourceSubname(f,c){const y=[];for(const b of c)this.fileServiceClient.handlesScheme(b.uri.scheme)&&b.uri.displayName===f.uri.displayName&&b!==f&&y.push(b.uri);if(y.length>0){const b=d(f.uri,y);return b.startsWith(h.separator)?b.length>n.SUBNAME_LIMIT?"..."+b.slice(b.length-n.SUBNAME_LIMIT):b:"..."+h.separator+d(f.uri,y)}else return null}onDisposeResource(f){var c;(c=this.involvedFiles)===null||c===void 0||c.delete(f.uri.codeUri.fsPath),this.cachedFileStat.delete(f.uri.toString())}async shouldCloseResourceWithoutConfirm(f){const c=this.documentModelService.getModelDescription(f.uri,"close-resource-check");return!!(c&&c.dirty)}async close(f,c){const y=this.documentModelService.getModelReference(f.uri,"close-resource-check");if(!y)return!1;if(c===s.AskSaveResult.SAVE){const b=await y.instance.save();return y.dispose(),b}else return c===s.AskSaveResult.REVERT?(await y.instance.revert(),y.dispose(),!0):!c||c===s.AskSaveResult.CANCEL?(y.dispose(),!1):(y.dispose(),!0)}async shouldCloseResource(f,c){let y=0;for(const I of c)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,a.localize)("file.prompt.dontSave","Don't Save")]:s.AskSaveResult.REVERT,[(0,a.localize)("file.prompt.save","Save")]:s.AskSaveResult.SAVE,[(0,a.localize)("file.prompt.cancel","Cancel")]:s.AskSaveResult.CANCEL},S=await this.dialogService.open({message:(0,a.formatLocalize)("saveChangesMessage",f.name),type:a.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",p.LabelService)],u.prototype,"labelService",void 0),r.__decorate([(0,o.Autowired)(m.IFileServiceClient),r.__metadata("design:type",Object)],u.prototype,"fileServiceClient",void 0),r.__decorate([(0,o.Autowired)(_.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)(a.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 d(E,f){const c=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<c.length;b++){let A=!1;for(const S of y)if(S[b]===c[b]){A=!0;break}if(!A)return c.slice(0,b+1).reverse().join(h.separator)}return c.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),a=e(82196),p=e(68692),v=e(10);let m=class{registerResource(s){s.registerResourceProvider(this.fsResourceProvider)}registerEditorDocumentModelContentProvider(s){s.registerEditorDocumentModelContentProvider(this.fsDocProvider)}};t.FileSystemResourceContribution=m,n.__decorate([(0,r.Autowired)(v.FileSystemResourceProvider),n.__metadata("design:type",v.FileSystemResourceProvider)],m.prototype,"fsResourceProvider",void 0),n.__decorate([(0,r.Autowired)(p.BaseFileSystemEditorDocumentProvider),n.__metadata("design:type",p.BaseFileSystemEditorDocumentProvider)],m.prototype,"fsDocProvider",void 0),t.FileSystemResourceContribution=m=n.__decorate([(0,o.Domain)(a.BrowserEditorContribution)],m)},47049:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitDirection=t.EditorGrid=t.editorGridUid=void 0,t.splitDirectionMatches=m;const n=e(41869),r=e(43718),o=e(23418),a=e(82196);t.editorGridUid=new Set;class p{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 l;this._onDidGridAndDesendantStateChange.fire(),(l=this.parent)===null||l===void 0||l._onDidGridAndDesendantStateChange.fire()}))}setEditorGroup(s){this.editorGroup=s,s.grid=this,this.splitDirection=void 0}generateSplitParent(s,g,l){this.splitDirection=s;const h=new p(this);h.setEditorGroup(this.editorGroup),this.editorGroup=null;const u=new p(this);u.setEditorGroup(g),l?this.children=[u,h]:this.children=[h,u],this._onDidGridStateChange.fire()}generateSplitSibling(s,g){if(this.parent){const l=this.parent.children.indexOf(this),h=new p(this.parent);h.setEditorGroup(s),g?this.parent.children.splice(l,0,h):this.parent.children.splice(l+1,0,h),this.parent._onDidGridStateChange.fire()}}split(s,g,l){this.splitDirection||(this.parent?this.parent.splitDirection===s?this.generateSplitSibling(g,l):this.parent.splitDirection!==s&&this.generateSplitParent(s,g,l):this.generateSplitParent(s,g,l))}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 a.GridResizeEvent({gridId:this.uid})),s.fireDirective(a.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,l){const h=[];return s.editorGroup?(this.setEditorGroup(g()),l.push(this.editorGroup.restoreState(s.editorGroup))):(this.splitDirection=s.splitDirection,this.children=(s.children||[]).map(u=>{const d=new p(this);return h.push(d.deserialize(u,g,l)),d})),Promise.all(h)}findGird(s,g=0){if(this.splitDirection&&m(this.splitDirection,s)){const l=g+(s===o.Direction.LEFT||s===o.Direction.UP?-1:1);if(this.children[l])return this.children[l].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=p;var v;(function(_){_[_.Horizontal=1]="Horizontal",_[_.Vertical=2]="Vertical"})(v||(t.SplitDirection=v={}));function m(_,s){return s===o.Direction.UP||s===o.Direction.DOWN?_===v.Vertical:s===o.Direction.LEFT||s===o.Direction.RIGHT?_===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),a=e(41869),p=e(23418),v=e(82196),m=7,_=200,s=100;let g=n=class extends a.WithEventBus{constructor(){super(...arguments),this.currentIndex=-1,this.stack=[],this.closedStack=[]}init(){this.registerMouseNavigationListener()}registerMouseNavigationListener(){const u=new a.DisposableCollection,d=()=>{u.dispose(),this.preferenceService.get(n.MOUSE_NAVIGATION_SETTING)&&u.push((0,a.addDisposableListener)(window.document,a.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)&&d()})),d()}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 l(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 d=u.payload.group.currentEditor.getSelections();d&&d.length>0&&this.onNewState(new l(u.payload.newResource.uri,{lineNumber:d[0].selectionStartLineNumber,column:d[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 d=this.currentState&&this.currentState.isRelevant(u);this.doPushState(u,d)}get currentState(){return this.stack[this.currentIndex]}doPushState(u,d){this.stack.splice(this.currentIndex+(d?0:1)),this.stack.push(u),this.stack.length>_&&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>_&&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(d=>!u.isEqual(d)))}};t.EditorHistoryService=g,g.MOUSE_NAVIGATION_SETTING="editor.mouseBackForwardToNavigate",r.__decorate([(0,o.Autowired)(a.PreferenceService),r.__metadata("design:type",Object)],g.prototype,"preferenceService",void 0),r.__decorate([(0,o.Autowired)(p.WorkbenchEditorService),r.__metadata("design:type",p.WorkbenchEditorService)],g.prototype,"editorService",void 0),r.__decorate([(0,a.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,a.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,a.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 l{constructor(u,d,E,f){this.uri=u,this.position=d,this.groupIndex=E,this.isTabChange=f}isRelevant(u){return!!(this.uri.isEqual(u.uri)&&(u.position.lineNumber<this.position.lineNumber+m&&u.position.lineNumber>this.position.lineNumber-m||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=l},64544:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useEditorDocumentModel=a;const n=e(14041),r=e(41869),o=e(96689);function a(p){const v=(0,r.useInjectable)(o.IEditorDocumentModelService),[m,_]=(0,n.useState)(null);return(0,n.useEffect)(()=>{const s=new r.DisposableStore,g=()=>{const l=v.getModelReference(p);l&&(_(l.instance),l.dispose())};return s.add(v.onDocumentModelCreated(p.toString(),()=>{g()})),g(),()=>{s.dispose()}},[p]),m}},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),a=e(55218),p=e(21880),v=e(62660),m=e(28694),_=e(23418),s=e(93107),g=e(64335),l=e(88895),h=e(11673),u=e(57581),d=e(84158),E=e(80487),f=e(37275),c=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:_.EditorCollectionService,useClass:b.EditorCollectionServiceImpl},{token:H.UntitledDocumentIdCounter,useClass:H.UntitledDocumentIdCounter},{token:_.WorkbenchEditorService,useClass:K.WorkbenchEditorServiceImpl},{token:_.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:_.ILanguageService,useClass:O.LanguageService},{token:V.IEditorActionRegistry,useClass:x.EditorActionRegistryImpl},{token:s.IDocPersistentCacheProvider,useClass:E.EmptyDocCacheImpl},{token:V.ICompareService,useClass:d.CompareService},{token:V.IBreadCrumbService,useClass:l.BreadCrumbServiceImpl},{token:V.IEditorFeatureRegistry,useClass:w.EditorFeatureRegistryImpl},{token:Z.EditorPreferences,useFactory:ie=>{const he=ie.get(o.PreferenceService);return(0,o.createPreferenceProxy)(he,Z.editorPreferenceSchema)}},{token:a.ICallHierarchyService,useClass:L.CallHierarchyService},{token:m.ITypeHierarchyService,useClass:L.TypeHierarchyService},{token:p.ICommandServiceToken,useClass:B.MonacoCommandService},{token:p.IMonacoCommandsRegistry,useClass:B.MonacoCommandRegistry},{token:p.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,d.CompareEditorContribution,S.EditorAutoSaveEditorContribution,c.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 ie of this.contributions.getContributions())ie.registerResource&&ie.registerResource(this.resourceService),ie.registerEditorComponent&&ie.registerEditorComponent(this.editorComponentRegistry),ie.registerEditorDocumentModelContentProvider&&ie.registerEditorDocumentModelContentProvider(this.modelContentRegistry),ie.registerEditorActions&&ie.registerEditorActions(this.editorActionRegistry),ie.registerEditorFeature&&ie.registerEditorFeature(this.editorFeatureRegistry);for(const ie of this.multiDiffSourceContribution.getContributions())ie.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",_.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)(_.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)),a=e(52902),p=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 l=this.diagnostics.get(s);if(l)l.diagnostics=g;else{const h=new m(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 m{constructor(s,g,l){this.owner=l,this._markers=[],this._diagnostics=[],this.uri=o.Uri.parse(s),this.diagnostics=g,a.monacoApi.editor.onDidCreateModel(h=>this.doUpdateModelMarkers(h))}set diagnostics(s){this._diagnostics=s,this._markers=(0,p.asMonacoDiagnostics)(s)||[],this.updateModelMarkers()}get diagnostics(){return this._diagnostics}get markers(){return this._markers}dispose(){this._markers=[],this.updateModelMarkers()}updateModelMarkers(){const s=a.monacoApi.editor.getModel(this.uri);this.doUpdateModelMarkers(s)}doUpdateModelMarkers(s){s&&this.uri.toString()===s.uri.toString()&&a.monacoApi.editor.setModelMarkers(s,this.owner,this._markers)}}t.MonacoModelDiagnostics=m},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),a=e(23418),p=e(96689);let v=class extends o.WithEventBus{initialize(){this.workbenchEditorService.onActiveResourceChange(()=>{this.updateLanguageStatus(this.workbenchEditorService.currentEditor)}),this.eventBus.on(p.EditorDocumentModelOptionChangedEvent,_=>{const s=this.workbenchEditorService.currentEditor;s&&s.currentUri&&s.currentUri.isEqual(_.payload.uri)&&this.updateLanguageStatus(this.workbenchEditorService.currentEditor)})}updateLanguageStatus(_){if(!_){this.statusBar.removeElement("editor-status-language-status");return}const s=_.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(l=>({title:l.label,name:l.name,command:l.command})),onClick:()=>{}})}}getLanguageStatusText(_){if(_.length===0)return;const[s]=_;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",a.WorkbenchEditorService)],v.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(a.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),a=e(40497),{compare:p}=o.strings;let v=class{constructor(){this._provider=new a.LanguageFeatureRegistry,this.onDidChange=this._provider.onDidChange}addStatus(_){return this._provider.register(_.selector,_)}getLanguageStatus(_){return this._provider.ordered(_).sort((s,g)=>{let l=g.severity-s.severity;return l===0&&(l=p(s.source,g.source)),l===0&&(l=p(s.id,g.id)),l})}};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),a=e(62660),p=e(23418),v=e(37906);function m(h){switch(h){case o.MarkerSeverity.Error:return p.DiagnosticSeverity.Error;case o.MarkerSeverity.Warning:return p.DiagnosticSeverity.Warning;case o.MarkerSeverity.Info:return p.DiagnosticSeverity.Information;case o.MarkerSeverity.Hint:return p.DiagnosticSeverity.Hint}}function _(h,u,d,E){return{start:{line:h-1,character:u-1},end:{line:d-1,character:E-1}}}function s(h){return{message:h.message,location:{uri:h.resource,range:_(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:m(h.severity),range:_(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 l=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(d=>this.updateMarkers(new o.URI(d)))})}get languages(){return[...this.mergeLanguages(this.textmateService.getLanguages()).values()]}getLanguage(u){return this.mergeLanguages(this.textmateService.getLanguages().filter(d=>d.id===u)).get(u)}mergeLanguages(u){const d=new Map;for(const{id:E,aliases:f,extensions:c,filenames:y}of u){const b=d.get(E)||{id:E,name:"",extensions:new Set,filenames:new Set};if(!b.name&&f&&f.length&&(b.name=f[0]),c&&c.length)for(const A of c)b.extensions.add(A);if(y&&y.length)for(const A of y)b.filenames.add(A);d.set(E,b)}for(const[E,f]of d)f.name||(f.name=E);return d}registerWorkspaceSymbolProvider(u){return this.workspaceSymbolProviders.push(u),o.Disposable.create(()=>{const d=this.workspaceSymbolProviders.indexOf(u);d!==-1&&this.workspaceSymbolProviders.splice(d,1)})}updateMarkers(u){const d=u.toString(),E=new Map;for(const c of this.markerManager.getMarkers({resource:u.toString()})){const y=E.get(c.type)||[];y.push(g(c)),E.set(c.type,y)}const f=new Set(this.markers.keys());for(const[c,y]of E){f.delete(c);const b=this.markers.get(c)||new v.MonacoDiagnosticCollection(c);b.set(d,y),this.markers.set(c,b)}for(const c of f){const y=this.markers.get(c);y&&y.set(d,[])}}};t.LanguageService=l,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",o.MarkerManager)],l.prototype,"markerManager",void 0),n.__decorate([(0,r.Autowired)(a.ITextmateTokenizer),n.__metadata("design:type",Object)],l.prototype,"textmateService",void 0),t.LanguageService=l=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],l)},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 a=class{show(v,m,_,s){const g=_.contextKeyService,h=this.ctxMenuService.createMenu({id:o.MenuId.BreadcrumbsTitleContext,contextKeyService:g}).getMergedMenuNodes();this.ctxMenuRenderer.show({anchor:{x:v,y:m},menuNodes:h,args:[{uri:s,group:_}]})}};t.BreadCrumbsMenuService=a,n.__decorate([(0,r.Autowired)(o.AbstractContextMenuService),n.__metadata("design:type",o.AbstractContextMenuService)],a.prototype,"ctxMenuService",void 0),n.__decorate([(0,r.Autowired)(o.ICtxMenuRenderer),n.__metadata("design:type",o.ICtxMenuRenderer)],a.prototype,"ctxMenuRenderer",void 0),t.BreadCrumbsMenuService=a=n.__decorate([(0,r.Injectable)()],a)},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),a=n.__importStar(e(20868)),p=n.__importStar(e(50189)),v=e(85139),m=e(19582),_=e(31324),s=e(27416);class g extends r.Disposable{static get(h){return h.getContribution(s.ContextMenuController.ID)}constructor(h,u,d,E){super(),this.contextMenuService=h,this.globalContextKeyService=u,this.contextMenuRenderer=d,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(_.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(_.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===m.MouseTargetType.OVERLAY_WIDGET||h.target.type===m.MouseTargetType.CONTENT_TEXT&&h.target.detail.injectedText||(h.event.preventDefault(),h.event.stopPropagation(),h.target.type!==m.MouseTargetType.CONTENT_TEXT&&h.target.type!==m.MouseTargetType.CONTENT_EMPTY&&h.target.type!==m.MouseTargetType.TEXTAREA))return;if(this.codeEditor.focus(),h.target.position){let d=!1;for(const E of this.codeEditor.getSelections())if(E.containsPosition(h.target.position)){d=!0;break}d||this.codeEditor.setPosition(h.target.position)}let u=null;h.target.type!==m.MouseTargetType.TEXTAREA&&(u={x:h.event.posx-1,width:2,y:h.event.posy-1,height:2}),this.showContextMenu(u)}_doShowContextMenu(h,u){const d=this.codeEditor;if(!d.hasModel())return;const E=d.getOption(a.editor.EditorOption.hover);if(d.updateOptions({hover:{enabled:!1}}),!u){d.revealPosition(d.getPosition(),a.editor.ScrollType.Immediate),d.render();const f=d.getScrolledVisiblePosition(d.getPosition()),c=p.getDomNodePagePosition(d.getDomNode()),y=c.left+f.left,b=c.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:[d.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),a=e(93899);let p=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(m){const _=m.currentFocusedEditor?"editor-menu-"+m.currentFocusedEditor.getId():"editor-group-menu-"+m.name;if(!this._cachedMenus.has(_)){const s=m.currentFocusedEditor?this.contextKeyService.createScoped(m.currentFocusedEditor.monacoEditor._contextKeyService):m.contextKeyService,g=this.registerDispose(this.menuService.createMenu({id:a.MenuId.EditorTitle,contextKeyService:s}));this._cachedMenus.set(_,g)}return this._cachedMenus.get(_)}};t.EditorActionRegistryImpl=p,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],p.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(a.AbstractContextMenuService),n.__metadata("design:type",a.AbstractContextMenuService)],p.prototype,"menuService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),t.EditorActionRegistryImpl=p=n.__decorate([(0,r.Injectable)()],p)},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),a=e(93899),p=e(43718),v=e(98295),m=e(82196),_=e(51553);var s;(function(l){l.EDITOR_OPEN_TYPE={id:"editor.opentype"}})(s||(s={}));let g=class extends p.Disposable{registerCommands(h){h.registerCommand(s.EDITOR_OPEN_TYPE,{execute:(...u)=>{const d=u[u.length-1];d&&typeof d=="string"&&this.workbenchEditorService.currentEditorGroup.changeOpenType(d)}})}constructor(){super(),this.registerEditorOpenTypes(),this.disposables.push(this.workbenchEditorService.onActiveResourceChange(h=>{this.registerEditorOpenTypes()}))}registerEditorOpenTypes(){const h=this.workbenchEditorService.currentEditorGroup.availableOpenTypes;this.menuRegistry.getMenuItems(a.MenuId.OpenTypeSubmenuContext).map(d=>d.command).forEach(d=>{this.menuRegistry.unregisterMenuItem(a.MenuId.OpenTypeSubmenuContext,d.id)}),this.menuRegistry.unregisterMenuItem(a.MenuId.EditorTitle,a.MenuId.OpenTypeSubmenuContext),h.length>=2&&this.registerMenuItem(h)}registerMenus(h){}registerMenuItem(h){const u={submenu:a.MenuId.OpenTypeSubmenuContext,label:(0,p.localize)("editor.openType"),group:"navigation",order:Number.MIN_SAFE_INTEGER,iconClass:(0,o.getIcon)("setting"),type:"default"};this.menuRegistry.registerMenuItem(a.MenuId.EditorTitle,u),h.forEach(d=>{var E;this.menuRegistry.registerMenuItem(a.MenuId.OpenTypeSubmenuContext,{command:{id:s.EDITOR_OPEN_TYPE.id,label:d.title||d.componentId||d.type},extraTailArgs:[(E=d.componentId)!==null&&E!==void 0?E:d.type],group:"navigation"})})}};t.OpenTypeMenuContribution=g,n.__decorate([(0,r.Autowired)(m.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorServiceImpl)],g.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(a.IMenuRegistry),n.__metadata("design:type",a.IMenuRegistry)],g.prototype,"menuRegistry",void 0),t.OpenTypeMenuContribution=g=n.__decorate([(0,v.Domain)(p.CommandContribution,a.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),a=e(91830),p=e(93899);let v=class{get editorTitleContextKey(){return this._editorTitleContextKey||(this._editorTitleContextKey=this.contextKeyService.createKey("editorTitleContext",!1)),this._editorTitleContextKey}show(_,s,g,l){const h=l.contextKeyService.createScoped();new a.ResourceContextKey(h).set(g),this.editorTitleContextKey.set(!0);const d=this.ctxMenuService.createMenu({id:p.MenuId.EditorTitleContext,contextKeyService:h}),E=d.getMergedMenuNodes();d.dispose(),h.dispose(),this.ctxMenuRenderer.show({anchor:{x:_,y:s},menuNodes:E,args:[{uri:g,group:l}],onHide:()=>{this.editorTitleContextKey.set(!1)}})}};t.TabTitleMenuService=v,n.__decorate([(0,r.Autowired)(p.AbstractContextMenuService),n.__metadata("design:type",p.AbstractContextMenuService)],v.prototype,"ctxMenuService",void 0),n.__decorate([(0,r.Autowired)(p.ICtxMenuRenderer),n.__metadata("design:type",p.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),a=e(43718),p=r.__importStar(e(20868)),v="<<<<<<<",m="|||||||",_="=======",s=">>>>>>>";class g{constructor(f,c){if(typeof c!="number"||c<=0||c>f.getLineCount())throw new Error("Illegal value for `line`");this.text=f.getLineContent(c),this.firstNonWhitespaceCharacterIndex=/^(\s*)/.exec(this.text)[1].length,this.range=new p.Range(c,1,c,this.text.length+1),this.rangeIncludingLineBreak=c<=f.getLineCount()?new p.Range(c,1,c+1,1):this.range,this.lineNumber=c,this.isEmptyOrWhitespace=this.firstNonWhitespaceCharacterIndex===this.text.length}}t.TextLine=g;let l=n=class extends a.Disposable{constructor(){super(...arguments),this.cache=new a.LRUCache(100),this._conflictTextCaches=new Map,this._conflictRangeCaches=new Map}static createCacheKey(f){return`${f.uri.toString()}-${f.getVersionId()}`}scanDocument(f){const c=n.createCacheKey(f);if(this.cache.has(c))return this.cache.get(c);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(m))y.commonAncestors.push(I);else if(y&&!y.splitter&&I.text===_)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,a.uuid)(),range:w,text:f.getValueInRange(w),isResolved:!1})}),this._conflictRangeCaches.set(f.uri.toString(),D)}const S=b?.filter(Boolean).map(D=>new d(D));return this.cache.set(c,S),S}getConflictText(f){return this._conflictTextCaches.get(f)}getAllConflictsByUri(f){return this._conflictRangeCaches.get(f)}getAllConflicts(){return this._conflictRangeCaches}setConflictResolved(f,c){const y=this._conflictRangeCaches.get(f);if(y){const b=y.find(A=>A.id===c);b&&(b.isResolved=!0)}}deleteConflictText(f){this._conflictTextCaches.delete(f)}dispose(){this._conflictTextCaches.clear(),this._conflictRangeCaches.clear()}};t.MergeConflictParser=l,t.MergeConflictParser=l=n=r.__decorate([(0,o.Injectable)()],l);function h(E,f){if(!f.startHeader||!f.splitter||!f.endFooter)return null;const c=f.commonAncestors[0]||f.splitter;return{current:{header:f.startHeader.range,decoratorContent:new p.Range(f.startHeader.rangeIncludingLineBreak.endLineNumber,f.startHeader.rangeIncludingLineBreak.endColumn,u(E,c.range.getStartPosition(),f.startHeader.rangeIncludingLineBreak.getEndPosition()).lineNumber,u(E,c.range.getStartPosition(),f.startHeader.rangeIncludingLineBreak.getEndPosition()).column),content:new p.Range(f.startHeader.rangeIncludingLineBreak.endLineNumber,f.startHeader.rangeIncludingLineBreak.endColumn,c.range.startLineNumber,c.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 p.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 p.Range(y.rangeIncludingLineBreak.endLineNumber,y.rangeIncludingLineBreak.endColumn,S.range.startLineNumber,S.range.startColumn),name:y.text.substring(m.length+1)}}),splitter:f.splitter.range,incoming:{header:f.endFooter.range,decoratorContent:new p.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 p.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 p.Range(f.startHeader.range.startLineNumber,f.startHeader.range.startColumn,f.endFooter.range.endLineNumber,f.endFooter.range.endColumn)}}function u(E,f,c){if(f.equals(c))return f;let y=f.lineNumber,b=f.column-1;return b<0&&(y--,b=new g(E,y).range.endColumn),new p.Position(y,b)}class d{constructor(f){this.range=f.range,this.current=f.current,this.incoming=f.incoming,this.commonAncestors=f.commonAncestors,this.splitter=f.splitter}}t.DocumentMergeConflict=d},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=_;const r=e(85608).__importDefault(e(12784)),o=e(14041),a=e(41869),p=e(70392),v=e(64544),m=e(90775);function _(s){const g=(0,v.useEditorDocumentModel)(s),[l,h]=(0,o.useState)(!1),[u,d]=(0,o.useState)(0),E=(0,a.useInjectable)(m.MergeConflictService),f=(0,o.useMemo)(()=>(0,a.formatLocalize)("merge-conflicts.merge.conflict.remain",u),[u]);return(0,o.useEffect)(()=>{const c=new p.DisposableStore;if(g){const y=()=>{const A=E.scanDocument(g.getMonacoModel());d(A),A>0&&h(!0)},b=(0,r.default)(y,150);return c.add(g.getMonacoModel().onDidChangeContent(()=>{b()})),y(),()=>{c.dispose(),E.clear(),h(!1),d(0)}}},[g]),{isVisiable:l,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),a=e(72665),p=e(82196),v=e(86273);let m=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 l=this.conflicts.map(d=>d.range),h=(0,o.findRangeForNavigation)(g,l,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=m,n.__decorate([(0,r.Autowired)(v.MergeConflictParser),n.__metadata("design:type",v.MergeConflictParser)],m.prototype,"parser",void 0),n.__decorate([(0,r.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],m.prototype,"editorService",void 0),n.__decorate([(0,r.Autowired)(a.IMessageService),n.__metadata("design:type",Object)],m.prototype,"messageService",void 0),t.MergeConflictService=m=n.__decorate([(0,r.Injectable)()],m)},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),a=e(61468),p=e(71433),v=e(90775),m=({resource:_})=>{const{uri:s}=_,g=(0,o.useInjectable)(v.MergeConflictService),l=(0,o.useInjectable)(o.CommandService),h=(0,o.useInjectable)(o.CommandRegistry),{canNavigate:u,isVisiable:d,summary:E}=(0,p.useMergeConflictModel)(s),[f,c]=(0,r.useState)(!1),y=(0,r.useCallback)(()=>{g.navigatePrevious()},[]),b=(0,r.useCallback)(()=>{g.navigateNext()},[]),A=(0,r.useCallback)(async()=>{c(!0),f?await l.executeCommand(o.MERGE_CONFLICT_COMMANDS.AI_ALL_ACCEPT_STOP.id,s):await l.executeCommand(o.MERGE_CONFLICT_COMMANDS.AI_ALL_ACCEPT.id,s),c(!1)},[s,f]);return d?r.default.createElement(a.MergeActions,{uri:s,editorType:"text",summary:E,canNavigate:u,handleNext:b,handlePrev:y,isAIResolving:f,onAIResolve:A,onReset:()=>{l.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)&&l.executeCommand(S,s)})}}):null};t.MergeEditorFloatComponents=m},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),a=e(82196),p=e(14769),v=e(69647),m="merge.editor.floating.widget";let _=class extends o.Disposable{registerResource(g){g.registerResourceProvider(this.mergeEditorResourceProvider)}registerEditorComponent(g){g.registerEditorComponentResolver(a.EditorOpenType.mergeEditor,(l,h)=>{h.push({type:a.EditorOpenType.mergeEditor})}),g.registerEditorSideWidget({id:m,component:v.MergeEditorFloatComponents,displaysOnResource:l=>{const{uri:h}=l;return h.scheme===o.Schemes.file}})}};t.MergeEditorContribution=_,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",p.MergeEditorResourceProvider)],_.prototype,"mergeEditorResourceProvider",void 0),t.MergeEditorContribution=_=n.__decorate([(0,o.Domain)(a.BrowserEditorContribution)],_)},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),a=e(96177);let p=class extends o.WithEventBus{constructor(){super(...arguments),this.scheme="mergeEditor"}provideResource(m){const{openMetadata:_,name:s}=m.getParsedQuery();try{const g=JSON.parse(_),{ancestor:l,input1:h,input2:u,output:d}=g,E=new o.URI(d),f=this.labelService.getIcon(E);return{supportsRevive:!0,name:s,icon:f,uri:m,metadata:{ancestor:l,input1:h,input2:u,output:d}}}catch{throw Error("invalid merge editor resource parse")}}shouldCloseResource(m,_){const{openMetadata:s}=m.uri.getParsedQuery();try{const g=JSON.parse(s),{output:l}=g,h=new o.URI(l);return this.mergeEditorService.fireRestoreState(h),!0}catch{throw Error("invalid merge editor resource parse")}}};t.MergeEditorResourceProvider=p,n.__decorate([(0,r.Autowired)(o.LabelService),n.__metadata("design:type",o.LabelService)],p.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(a.MergeEditorService),n.__metadata("design:type",a.MergeEditorService)],p.prototype,"mergeEditorService",void 0),t.MergeEditorResourceProvider=p=n.__decorate([(0,r.Injectable)()],p)},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),a=e(40191),p=e(55218),v=e(82196);t.executePrepareCallHierarchyCommand={id:"_executePrepareCallHierarchy"},t.executeProvideIncomingCallsCommand={id:"_executeProvideIncomingCalls"},t.executeProvideOutgoingCallsCommand={id:"_executeProvideOutgoingCalls"};const m=new a.RawContextKey("editorHasCallHierarchyProvider",!1);let _=class{registerCommands(g){g.registerCommand(t.executePrepareCallHierarchyCommand,{execute:(l,h)=>this.callHierarchyService.prepareCallHierarchyProvider(l,h)}),g.registerCommand(t.executeProvideIncomingCallsCommand,{execute:l=>this.callHierarchyService.provideIncomingCalls(l)}),g.registerCommand(t.executeProvideOutgoingCallsCommand,{execute:l=>this.callHierarchyService.provideOutgoingCalls(l)})}registerEditorFeature(g){this.ctxHasProvider=m.bind(this.contextKeyService),g.registerEditorFeatureContribution({contribute:l=>{const h=l.monacoEditor;return o.Event.any(h.onDidChangeModel,h.onDidChangeModelLanguage,p.CallHierarchyProviderRegistry.onDidChange)(()=>{h.hasModel()&&this.ctxHasProvider.set(p.CallHierarchyProviderRegistry.has(h.getModel()))})}})}};t.CallHierarchyContribution=_,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],_.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(p.ICallHierarchyService),n.__metadata("design:type",Object)],_.prototype,"callHierarchyService",void 0),t.CallHierarchyContribution=_=n.__decorate([(0,o.Domain)(o.CommandContribution,v.BrowserEditorContribution)],_)},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),a=e(55218),p=e(96689),{isNonEmptyArray:v}=o.arrays;class m{static async create(g,l,h){const[u]=a.CallHierarchyProviderRegistry.ordered(g);if(!u)return;const d=await u.prepareCallHierarchy(g,l,h);if(d)return new m(d.roots.reduce((E,f)=>E+f._sessionId,""),u,d.roots,new o.RefCountedDisposable(d))}constructor(g,l,h,u){this.id=g,this.provider=l,this.roots=h,this.ref=u,this.root=h[0]}dispose(){this.ref.release()}fork(g){const l=this;return new class extends m{constructor(){super(l.id,l.provider,[g],l.ref.acquire())}}}async resolveIncomingCalls(g,l){try{const h=await this.provider.provideIncomingCalls(g,l);if(v(h))return h}catch(h){(0,o.onUnexpectedExternalError)(h)}return[]}async resolveOutgoingCalls(g,l){try{const h=await this.provider.provideOutgoingCalls(g,l);if(v(h))return h}catch(h){(0,o.onUnexpectedExternalError)(h)}return[]}}t.CallHierarchyModel=m;let _=class{constructor(){this.models=new Map}registerCallHierarchyProvider(g,l){a.CallHierarchyProviderRegistry.register(g,l)}async prepareCallHierarchyProvider(g,l){let h=this.modelService.getModelReference(o.URI.parse(g.toString())),u=h?.instance.getMonacoModel();if(h?.dispose(),!u){const d=await this.modelService.createModelReference(o.URI.parse(g.toString()));u=d.instance.getMonacoModel(),h=d}try{const d=await m.create(u,l,o.CancellationToken.None);return d?(this.models.set(d.id,d),this.models.forEach((E,f,c)=>{c.size>10&&(E.dispose(),this.models.delete(f))}),[d.root]):[]}finally{h?.dispose()}}provideIncomingCalls(g){const l=this.models.get(g._sessionId);if(l)return l.resolveIncomingCalls(g,o.CancellationToken.None)}provideOutgoingCalls(g){const l=this.models.get(g._sessionId);if(l)return l.resolveOutgoingCalls(g,o.CancellationToken.None)}};t.CallHierarchyService=_,n.__decorate([(0,r.Autowired)(p.IEditorDocumentModelService),n.__metadata("design:type",Object)],_.prototype,"modelService",void 0),t.CallHierarchyService=_=n.__decorate([(0,r.Injectable)()],_)},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),a=e(41869),p=e(20868),v=e(21880),m=e(52902),_=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 l;(function(E){E[E.ACTION=0]="ACTION",E[E.COMMAND=1]="COMMAND"})(l||(t.MonacoCommandType=l={}));let h=class{constructor(){this._onDidExecuteCommand=new a.Emitter,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._onWillExecuteCommand=new a.Emitter}setDelegate(f){this.delegate=f}get onWillExecuteCommand(){return this._onWillExecuteCommand.event}async executeCommand(f,...c){this.logger.debug("command: "+f),this._onWillExecuteCommand.fire({commandId:f,args:c});try{const y=await this.commandService.executeCommand(f,...c);return this._onDidExecuteCommand.fire({commandId:f,args:c}),y}catch(y){if(y?.name!==`${a.HANDLER_NOT_FOUND}:${f}`)throw y}if(this.delegate){const y=this.delegate.executeCommand(g[f]?g[f]:f,...c);return this._onDidExecuteCommand.fire({commandId:f,args:c}),y}return this.reporterService.point(a.REPORT_NAME.NOT_FOUND_COMMAND,f),Promise.reject(new Error(`command '${f}' not found`))}};t.MonacoCommandService=h,r.__decorate([(0,o.Autowired)(a.ILogger),r.__metadata("design:type",Object)],h.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(a.CommandRegistry),r.__metadata("design:type",Object)],h.prototype,"commandRegistry",void 0),r.__decorate([(0,o.Autowired)(a.CommandService),r.__metadata("design:type",Object)],h.prototype,"commandService",void 0),r.__decorate([(0,o.Autowired)(a.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 c;return(c=this.commands.getRawCommand(f))===null||c===void 0?void 0:c.id}registerCommand(f,c){this.commands.registerCommand(f,this.newHandler(c))}registerHandler(f,c){this.commands.registerHandler(f,this.newHandler(c))}newHandler(f){return{execute:(...c)=>this.execute(f,...c)}}execute(f,...c){const y=this.getActiveCodeEditor();return y?Promise.resolve(f.execute(y,...c)):Promise.resolve()}get codeEditorService(){return this.overrideServiceRegistry.getRegisteredService(a.ServiceNames.CODE_EDITOR_SERVICE)}getActiveCodeEditor(){var f;const c=(f=this.codeEditorService)===null||f===void 0?void 0:f.getFocusedCodeEditor();if(c)return c;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)(a.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)(a.MonacoOverrideServiceRegistry),r.__metadata("design:type",a.MonacoOverrideServiceRegistry)],u.prototype,"overrideServiceRegistry",void 0),t.MonacoCommandRegistry=u=r.__decorate([(0,o.Injectable)()],u);let d=n=class{get globalInstantiationService(){const f=this.overrideServiceRegistry.getRegisteredService(a.ServiceNames.CODE_EDITOR_SERVICE),c=this.overrideServiceRegistry.getRegisteredService(a.ServiceNames.TEXT_MODEL_SERVICE),y=this.overrideServiceRegistry.getRegisteredService(a.ServiceNames.CONTEXT_KEY_SERVICE);return _.StandaloneServices.initialize({codeEditorService:f,textModelService:c,contextKeyService:y})}get monacoEditorRegistry(){return v.EditorExtensionsRegistry}get monacoCommands(){return v.CommandsRegistry.getCommands()}registerMonacoActions(){var f;const c=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=c.get(y))!==null&&f!==void 0?f:{},A=this.actAndComHandler(c,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,c){if(n.CONVERT_MONACO_ACTIONS_TO_CONTRIBUTION_ID.has(c)){const y=n.CONVERT_MONACO_ACTIONS_TO_CONTRIBUTION_ID.get(c);if(this.monacoEditorRegistry.getSomeEditorContributions([y]).length>0)return this.newCommandHandler(c)}return f.has(c)?this.newActionHandler(c):this.newCommandHandler(c)}isInternalExecuteCommand(f){return f.startsWith("_execute")}processInternalCommandArgument(f,c=[]){return this.isInternalExecuteCommand(f)?c.map(y=>y instanceof a.Uri?m.URI.revive(y):y):n.CONVERT_MONACO_COMMAND_ARGS.has(f)?n.CONVERT_MONACO_COMMAND_ARGS.get(f)(...c):c}newCommandHandler(f){return{execute:(c,...y)=>{var b;if(!c)return;const S=!!this.monacoEditorRegistry.getEditorCommand(f)||!(this.isInternalExecuteCommand(f)||f==="setContext"||n.COMMON_ACTIONS.has(f))?c&&c._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:(c,...y)=>{const b=c.getAction(f);if(b&&b.isSupported())return this.runAction(f,c,...y)}}}runAction(f,c,...y){if(c){const b=c.getAction(f);if(b)return b.run(...y)}return Promise.resolve()}newKeyboardHandler(f){return{execute:(c,...y)=>c.trigger("keyboard",f,y)}}};t.MonacoActionRegistry=d,d.COMMON_ACTIONS=new Map([[p.DELEGATE_COMMANDS.UNDO,a.EDITOR_COMMANDS.UNDO.id],[p.DELEGATE_COMMANDS.REDO,a.EDITOR_COMMANDS.REDO.id],[p.DELEGATE_COMMANDS.SELECT_ALL,a.EDITOR_COMMANDS.SELECT_ALL.id]]),d.CONVERT_MONACO_COMMAND_ARGS=new Map([["editor.action.showReferences",(E,...f)=>[m.URI.parse(E),...f]],["editor.action.goToLocations",(E,...f)=>[m.URI.parse(E),...f]]]),d.CONVERT_MONACO_ACTIONS_TO_CONTRIBUTION_ID=new Map([["editor.action.rename","editor.contrib.renameController"]]),d.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)],d.prototype,"monacoCommandRegistry",void 0),r.__decorate([(0,o.Autowired)(a.MonacoOverrideServiceRegistry),r.__metadata("design:type",a.MonacoOverrideServiceRegistry)],d.prototype,"overrideServiceRegistry",void 0),r.__decorate([a.memoize,r.__metadata("design:type",Object),r.__metadata("design:paramtypes",[])],d.prototype,"globalInstantiationService",null),r.__decorate([a.memoize,r.__metadata("design:type",Object),r.__metadata("design:paramtypes",[])],d.prototype,"monacoEditorRegistry",null),r.__decorate([a.memoize,r.__metadata("design:type",Object),r.__metadata("design:paramtypes",[])],d.prototype,"monacoCommands",null),t.MonacoActionRegistry=d=n=r.__decorate([(0,o.Injectable)()],d)},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 a=class{constructor(){this.scopeToProvider=new Map,this.languageToConfig=new Map,this.languageIdToScope=new Map}registerTextmateGrammarScope(v,m){return this.scopeToProvider.has(v)&&(0,o.getDebugLogger)().warn(new Error(`a registered grammar provider for '${v}' scope is overridden`)),this.scopeToProvider.set(v,m),()=>{this.scopeToProvider.delete(v)}}getProvider(v){return this.scopeToProvider.get(v)}mapLanguageIdToTextmateGrammar(v,m){const _=this.getScope(v);return typeof _=="string"&&(0,o.getDebugLogger)().warn(new Error(`'${v}' language is remapped from '${_}' to '${m}' scope`)),this.languageIdToScope.set(v,m),()=>{this.languageIdToScope.delete(v)}}getScope(v){return this.languageIdToScope.get(v)}getLanguageId(v){for(const m of this.languageIdToScope.keys())if(this.languageIdToScope.get(m)===v)return m}registerGrammarConfiguration(v,m){return this.languageToConfig.has(v),this.languageToConfig.set(v,m),()=>{this.languageToConfig.delete(v)}}getGrammarConfiguration(v){return this.languageToConfig.get(v)||(()=>({}))}};t.TextmateRegistry=a,t.TextmateRegistry=a=n.__decorate([(0,r.Injectable)()],a)},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 a{constructor(m){this.ruleStack=m}clone(){return new a(this.ruleStack)}equals(m){return m instanceof a&&(m===this||m.ruleStack===this.ruleStack)}}t.TokenizerState=a;class p extends r.Disposable{constructor(m,_,s){super(),this.grammar=m,this.options=_,this.conatinsEmbeddedLanguages=s,this.onDidEncounterLanguageEmitter=new r.Emitter,this.onDidEncounterLanguage=this.onDidEncounterLanguageEmitter.event,this.seenLanguages=[]}getInitialState(){return new a(n.INITIAL)}tokenizeEncoded(m,_){if(this.options.lineLimit!==void 0&&m.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 a(n.INITIAL),tokens:g}}const s=this.grammar.tokenizeLine2(m,_.ruleStack,500);if(this.conatinsEmbeddedLanguages){const g=this.seenLanguages,l=s.tokens;for(let h=0,u=l.length>>>1;h<u;h++){const d=l[(h<<1)+1],E=o.TokenMetadata.getLanguageId(d);g[E]||(g[E]=!0,this.onDidEncounterLanguageEmitter.fire(E))}}return{endState:new a(s.ruleStack),tokens:s.tokens}}tokenize(m,_){const s=this.grammar.tokenizeLine(m,_.ruleStack);return{endState:new a(s.ruleStack),tokens:s.tokens.map(g=>({...g,scopes:g.scopes.join(`\r
31967
31967
  `)}))}}}t.TextMateTokenizer=p},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),a=e(76003),p=e(41869),v=e(6858),m=e(43718),_=e(42933),s=e(52902),g=e(33096),l=e(89944),h=e(96068),u=e(14162),d=e(16781),E=e(96689),f=e(41977),c=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 p.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(l.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 d.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(m.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 m.Disposable;if(R.injectTo)for(const O of R.injectTo){let x=this.injections.get(O);x||(x=[],M.addDispose(m.Disposable.create(()=>{this.injections.delete(O)})),this.injections.set(O,x)),x.push(R.scopeName)}M.addDispose(m.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(m.Disposable.create(this.textmateRegistry.mapLanguageIdToTextmateGrammar(R.language,R.scopeName))),M.addDispose(m.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 p.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 c.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,m.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,p.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,m.isObject)(L)){this.logger.warn(`[${R}]: language configuration: expected \`onEnterRules[${k}]\` to be an object.`);continue}if(!(0,m.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,p.getDebugLogger)("tokenize");U.log(`
31968
- 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,a.Autowired)(),n.__metadata("design:type",f.TextmateRegistry)],w.prototype,"textmateRegistry",void 0),n.__decorate([(0,a.Autowired)(_.IFileServiceClient),n.__metadata("design:type",Object)],w.prototype,"fileServiceClient",void 0),n.__decorate([(0,a.Autowired)(p.PreferenceService),n.__metadata("design:type",Object)],w.prototype,"preferenceService",void 0),n.__decorate([(0,a.Autowired)(p.ILogger),n.__metadata("design:type",Object)],w.prototype,"logger",void 0),n.__decorate([(0,a.Autowired)(E.IEditorDocumentModelService),n.__metadata("design:type",Object)],w.prototype,"editorDocumentModelService",void 0),n.__decorate([(0,a.Autowired)(v.RendererRuntime),n.__metadata("design:type",v.RendererRuntime)],w.prototype,"rendererRuntime",void 0),t.TextmateService=w=n.__decorate([(0,a.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),a=e(40191),p=e(28694),v=e(82196);t.executePrepareTypeHierarchyCommand={id:"_executePrepareTypeHierarchy"},t.executeProvideSupertypesCommand={id:"_executeProvideSupertypes"},t.executeProvideSubtypesCommand={id:"_executeProvideSubtypes"};const m=new a.RawContextKey("editorHasCallHierarchyProvider",!1);let _=class{registerCommands(g){g.registerCommand(t.executePrepareTypeHierarchyCommand,{execute:(l,h)=>this.typeHierarchyService.prepareTypeHierarchyProvider(l,h)}),g.registerCommand(t.executeProvideSupertypesCommand,{execute:l=>this.typeHierarchyService.provideSupertypes(l)}),g.registerCommand(t.executeProvideSubtypesCommand,{execute:l=>this.typeHierarchyService.provideSubtypes(l)})}registerEditorFeature(g){this.ctxHasProvider=m.bind(this.contextKeyService),g.registerEditorFeatureContribution({contribute:l=>{const h=l.monacoEditor;return o.Event.any(h.onDidChangeModel,h.onDidChangeModelLanguage,p.TypeHierarchyProviderRegistry.onDidChange)(()=>{h.hasModel()&&this.ctxHasProvider.set(p.TypeHierarchyProviderRegistry.has(h.getModel()))})}})}};t.TypeHierarchyContribution=_,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],_.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(p.ITypeHierarchyService),n.__metadata("design:type",Object)],_.prototype,"typeHierarchyService",void 0),t.TypeHierarchyContribution=_=n.__decorate([(0,o.Domain)(o.CommandContribution,v.BrowserEditorContribution)],_)},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),a=e(28694),p=e(96689),{isNonEmptyArray:v}=o.arrays;class m{static async create(g,l,h){const[u]=a.TypeHierarchyProviderRegistry.ordered(g);if(!u)return;const d=await u.prepareTypeHierarchy(g,l,h);if(d)return new m(d.roots.reduce((E,f)=>E+f._sessionId,""),u,d.roots,new o.RefCountedDisposable(d))}constructor(g,l,h,u){this.id=g,this.provider=l,this.roots=h,this.ref=u,this.root=h[0]}dispose(){this.ref.release()}fork(g){const l=this;return new class extends m{constructor(){super(l.id,l.provider,[g],l.ref.acquire())}}}async provideSupertypes(g,l){try{const h=await this.provider.provideSupertypes(g,l);if(v(h))return h}catch(h){(0,o.onUnexpectedExternalError)(h)}return[]}async provideSubtypes(g,l){try{const h=await this.provider.provideSubtypes(g,l);if(v(h))return h}catch(h){(0,o.onUnexpectedExternalError)(h)}return[]}}t.TypeHierarchyModel=m;let _=class{constructor(){this.models=new Map}registerTypeHierarchyProvider(g,l){a.TypeHierarchyProviderRegistry.register(g,l)}async prepareTypeHierarchyProvider(g,l){let h=this.modelService.getModelReference(o.URI.parse(g.toString())),u=h?.instance.getMonacoModel();if(h?.dispose(),!u){const d=await this.modelService.createModelReference(o.URI.parse(g.toString()));u=d.instance.getMonacoModel(),h=d}try{const d=await m.create(u,l,o.CancellationToken.None);return d?(this.models.set(d.id,d),this.models.forEach((E,f,c)=>{c.size>10&&(E.dispose(),this.models.delete(f))}),[d.root]):[]}finally{h?.dispose()}}async provideSupertypes(g){const l=this.models.get(g._sessionId);if(l)return l.provideSupertypes(g,o.CancellationToken.None)}async provideSubtypes(g){const l=this.models.get(g._sessionId);if(l)return l.provideSubtypes(g,o.CancellationToken.None)}};t.TypeHierarchyService=_,n.__decorate([(0,r.Autowired)(p.IEditorDocumentModelService),n.__metadata("design:type",Object)],_.prototype,"modelService",void 0),t.TypeHierarchyService=_=n.__decorate([(0,r.Injectable)()],_)},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),a=e(43718),p=e(28423),v=e(72665),m=e(65034),_=e(104),s=e(19087),g=e(55113),l=e(64335),h=e(30526),u=e(96689),d=e(82196);let E=class extends a.WithEventBus{constructor(c,y,b){super(),this.multiDiffWidget=c,this.convertedOptions=y,this.editorCollectionService=b,this.multiDiffModelChangeEmitter=new a.Emitter,this.onMultiDiffModelChange=this.multiDiffModelChangeEmitter.event,this.viewStateMap=new Map,this.editorCollectionService.addMultiDiffEditors([this])}onDocModelContentChangedEvent(c){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())===c.payload.uri.codeUri.toString()})||this.eventBus.fire(new d.ResourceDecorationNeedChangeEvent({uri:this.currentUri,decoration:{dirty:!!c.payload.dirty,readOnly:!!c.payload.readonly}})))}saveViewState(c){if(!c)return;const y=c.toString(),b=this.multiDiffWidget.getViewState();b&&this.viewStateMap.set(y,b)}restoreViewState(c){if(!c)return;const y=c.toString(),b=this.viewStateMap.get(y);b&&this.multiDiffWidget.setViewState(b)}createAndRegisterEditorParts(c,y,b,A){const S=[];if(c){const D=this.injector.get(h.DiffEditorPart,[c.editor,()=>b,g.EditorType.MODIFIED_DIFF]);S.push(D)}if(y){const D=this.injector.get(h.DiffEditorPart,[y.editor,()=>A,g.EditorType.ORIGINAL_DIFF]);S.push(D)}this.editorCollectionService.addEditors(S)}async compareMultiple(c,y,b){var A,S;this.currentUri&&this.saveViewState(this.currentUri);const D=!((A=y.metadata.sources)===null||A===void 0)&&A.length?{resources:m.ValueWithChangeEvent.const(y.metadata.sources)}:await this.multiDiffSourceResolverService.resolve(y.uri),I=D?(0,p.observableFromValueWithChangeEvent)(this,D.resources):(0,p.constObservable)([]),w=(0,p.mapObservableArrayCached)(this,I,async(k,F)=>{var L,B;let U,W;const j=new a.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(_.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,p.observableValue)("documents","loading"),R=(0,p.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,p.recomputeInitiallyAndOnChange)(R);await R.get(),(S=this.multiDiffModel)===null||S===void 0||S.dispose(),this.multiDiffModel={dispose:()=>M.dispose(),documents:new p.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,a.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;a.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)},0)});continue}this.createAndRegisterEditorParts(B,U,k.object.modifiedInstance,k.object.originalInstance)}this.multiDiffModelChangeEmitter.fire(this.multiDiffModel)}getDiffEntry(c){return this.multiDiffWidget.findDocumentDiffItem(c.codeUri)}getCurrentDiffEntry(){var c;const y=this.multiDiffWidget.getActiveControl();if(!y)return;const b=(c=y.getOriginalEditor().getModel())===null||c===void 0?void 0:c.uri;if(b)return this.multiDiffWidget.findDocumentDiffItem(b)}reveal(c,y){this.multiDiffWidget.reveal(c,y)}collapseAll(){const c=this.multiDiffWidget.getViewState(),y={...c,docStates:Object.keys(c.docStates||{}).reduce((b,A)=>(b[A]={...c.docStates[A],collapsed:!0},b),{})};this.multiDiffWidget.setViewState(y)}expandAll(){const c=this.multiDiffWidget.getViewState(),y={...c,docStates:Object.keys(c.docStates||{}).reduce((b,A)=>(b[A]={...c.docStates[A],collapsed:!1},b),{})};this.multiDiffWidget.setViewState(y)}layout(c){this.multiDiffWidget.layout(c)}focus(){const c=this.multiDiffWidget.getActiveControl();c&&c.focus()}tryGetCodeEditor(c){return this.multiDiffWidget.tryGetCodeEditor(c.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)(l.IMultiDiffSourceResolverService),n.__metadata("design:type",Object)],E.prototype,"multiDiffSourceResolverService",void 0),n.__decorate([(0,r.Autowired)(a.ILogger),n.__metadata("design:type",Object)],E.prototype,"logger",void 0),n.__decorate([(0,a.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),a=e(64335);let p=class{constructor(){this.sourceValues=new Map}registerSources(m,_){const s=m.toString(),g=this.sourceValues.get(s);g?g.value=_:this.sourceValues.set(s,new o.ValueWithChangeEvent(_))}canHandleUri(m){return m.scheme===a.MULTI_DIFF_SCHEME}async resolveDiffSource(m){const _=this.sourceValues.get(m.toString());if(_)return{resources:_}}dispose(){this.sourceValues.clear()}};t.MultiDiffResolver=p,t.MultiDiffResolver=p=n.__decorate([(0,r.Injectable)()],p)},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),a=e(26542),p=e(14951),v=e(23418),m=e(64335);let _=class extends o.WithEventBus{handlesUri(g){const l=this.multiDiffSourceResolverService.getResolvers();for(const h of l)if(h.canHandleUri(g))return 10;return-1}async provideResource(g){var l;const{name:h,sources:u}=g.getParsedQuery(),d=u?JSON.parse(u):[],E=d.length>0?new o.URI(d[0].modifiedUri):void 0,f=E?this.labelService.getIcon(E):void 0;return{name:`Multi-Diff: ${h||d.length+" files"}`,icon:f||(0,o.getIcon)("diff"),uri:g,supportsRevive:(l=this.appConfig.enableDiffRevive)!==null&&l!==void 0?l:!1,metadata:{sources:d}}}async shouldCloseResource(g,l){return!0}};t.MultiDiffResourceProvider=_,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",a.LabelService)],_.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(v.ResourceService),n.__metadata("design:type",v.ResourceService)],_.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],_.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(m.IMultiDiffSourceResolverService),n.__metadata("design:type",Object)],_.prototype,"multiDiffSourceResolverService",void 0),t.MultiDiffResourceProvider=_=n.__decorate([(0,r.Injectable)()],_)},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),a=e(93899),p=e(23418),v=e(64335),m=e(82196),_=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 d=this.multiDiffSourceResolverService.getResolvers();for(const E of d)if(E.canHandleUri(o.URI.from({scheme:u,path:"empty"})))return 10;return-1},(u,d)=>{d.push({type:m.EditorOpenType.multiDiff})})}registerCommands(h){h.registerCommand(o.MULTI_DIFF_EDITOR_COMMANDS.COLLAPSE_FILES,{execute:()=>{var u;const d=this.workbenchEditorService.currentEditorGroup;((u=d.currentOpenType)===null||u===void 0?void 0:u.type)===m.EditorOpenType.multiDiff&&d.multiDiffEditor.collapseAll()}}),h.registerCommand(o.MULTI_DIFF_EDITOR_COMMANDS.EXPAND_FILES,{execute:()=>{var u;const d=this.workbenchEditorService.currentEditorGroup;((u=d.currentOpenType)===null||u===void 0?void 0:u.type)===m.EditorOpenType.multiDiff&&d.multiDiffEditor.expandAll()}})}registerMenus(h){h.registerMenuItems(a.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(a.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)(_.MultiDiffResolver),n.__metadata("design:type",_.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)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],g.prototype,"workbenchEditorService",void 0),t.MultiDiffEditorContribution=g=n.__decorate([(0,o.Domain)(m.BrowserEditorContribution,m.MultiDiffSourceContribution,a.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 a=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 m of this._resolvers)if(m.canHandleUri(v))return m.resolveDiffSource(v);return Promise.resolve(void 0)}getResolvers(){return Array.from(this._resolvers)}};t.MultiDiffSourceResolverService=a,t.MultiDiffSourceResolverService=a=n.__decorate([(0,r.Injectable)()],a)},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)),a=e(76003),p=e(97267),v=e(41869),m=e(28423),_=e(26209),s=n.__importDefault(e(69418)),g=e(82196),l=e(50674),h=({editorGroup:c})=>{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,l.useUpdateOnGroupTabChange)(c),(0,v.useUpdateOnEvent)(y.onDidUpdateBreadCrumbResults,[],D=>{var I;const w=c.currentEditor&&c.currentEditor.currentDocumentModel?c.currentEditor:null,T=c.currentEditor&&c.currentEditor.currentDocumentModel?c.currentEditor.currentDocumentModel.uri:(I=c.currentResource)===null||I===void 0?void 0:I.uri;return!!T&&D.editor===w&&D.uri.isEqual(T)}),c.resources.length===0||!c.currentResource)return null;let S;return c.currentEditor&&c.currentEditor.currentDocumentModel?S=y.getBreadCrumbs(c.currentEditor.currentDocumentModel.uri,c.currentEditor):S=y.getBreadCrumbs(c.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(p.Icon,{icon:"right",size:"small",className:A}),o.default.createElement(t.NavigationItem,{part:D,editorGroup:c})))):null};t.NavigationBar=h,t.NavigationItem=(0,o.memo)(({part:c,editorGroup:y})=>{const b=(0,v.useInjectable)(E),A=(0,v.useInjectable)(_.BreadCrumbsMenuService),S=(0,o.useRef)(),D=(0,v.useDesignStyles)(s.default["navigation-part"],"navigation-part"),I=(0,o.useCallback)(async()=>{if(c.getSiblings&&S.current){const{left:w,top:T,height:R}=S.current.getBoundingClientRect(),M=await c.getSiblings();let O=w;window.innerWidth-O<210&&(O=window.innerWidth-200-5),b.showMenu(M.parts,O,T+R+5,M.currentIndex,c.uri,y)}},[S.current,c]);return o.default.createElement("span",{onClick:I,onContextMenu:w=>{!c.isSymbol&&c.uri&&A.show(w.nativeEvent.x,w.nativeEvent.y,y,c.uri),w.preventDefault()},className:D,ref:S},c.icon&&o.default.createElement("span",{className:c.icon}),o.default.createElement("span",null,c.name))});const u=({model:c})=>{let y=window.innerHeight-c.y-20,b=c.y;const A=c.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)(c.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:c.x+"px",top:b+"px",maxHeight:y+"px",height:A+"px"}},o.default.createElement(p.Scrollbars,{className:s.default.navigation_menu_items,universal:!0,forwardedRef:M=>{S.current=M,R()}},c.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();c.showSubMenu(j,W,B,c)}}: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===c.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(p.Icon,{icon:"right",size:"small"})))})),T&&o.default.createElement(t.NavigationMenu,{model:T}))};t.NavigationMenu=u;const d=()=>{const c=(0,o.useRef)(),y=(0,v.useInjectable)(E),b=(0,v.useAutorun)(y.current);return(0,o.useEffect)(()=>{if(c.current){const A=new v.Disposable;return A.addDispose(new v.DomListener(window,"mouseup",()=>{y.dispose()})),A.addDispose(new v.DomListener(c.current,"mouseup",S=>{S.stopPropagation()})),A.dispose.bind(A)}}),b?o.default.createElement("div",{tabIndex:1,ref:c},o.default.createElement(t.NavigationMenu,{model:b})):null};t.NavigationMenuContainer=d;let E=class{constructor(){this.current=(0,m.observableValue)(this,null)}showMenu(y,b,A,S,D,I){(0,m.transaction)(w=>{this.current.set(new f(y,b,A,S,D),w)})}dispose(){(0,m.transaction)(y=>{const b=this.current.get();b?.dispose(),this.current.set(null,y)})}};t.NavigationBarViewService=E,t.NavigationBarViewService=E=n.__decorate([(0,a.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,m.observableValue)(this,null)}showSubMenu(y,b,A,S){(0,m.transaction)(D=>{this.subMenu.set(new f(y,b,A,-1,S),D)})}dispose(){(0,m.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 a=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=a,t.NotebookService=a=n.__decorate([(0,r.Injectable)()],a)},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 a=class{constructor(){this.schema=o.editorPreferenceSchema}};t.EditorPreferenceContribution=a,t.EditorPreferenceContribution=a=n.__decorate([(0,r.Domain)(r.PreferenceContribution)],a)},6043:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.diffEditorOptionsConverters=t.textModelUpdateOptionsConverters=t.editorOptionsConverters=void 0,t.isEditorOption=a,t.isDiffEditorOption=p,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,l){if(l.has(g))return!0;{const h=l.keys();for(const u of h)if(g.startsWith(u))return!0}return!1}function a(g){return o(g,t.editorOptionsConverters)||o(g,t.textModelUpdateOptionsConverters)||o(g,t.diffEditorOptionsConverters)}function p(g){return o(g,t.diffEditorOptionsConverters)}const v=[...t.editorOptionsConverters.keys()],m=[...t.textModelUpdateOptionsConverters.keys()],_=[...t.diffEditorOptionsConverters.keys()];function s(g,l,h,u){const d=l?n.Uri.parse(l):void 0,E=(D,I)=>D.reduce((w,T)=>{const R=g.getValue(T,{resource:d,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],c=u?u.filter(D=>t.textModelUpdateOptionsConverters.has(D)):[...m],y=u?u.filter(D=>t.diffEditorOptionsConverters.has(D)):[..._],b=r(E(f,t.editorOptionsConverters)),A=r(E(c,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",a="Menlo, Monaco, 'Courier New', monospace",p="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'";t.EDITOR_FONT_DEFAULTS={fontFamily:n.isOSX?a:n.isLinux?p: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}},m={"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,...m}},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(a,p,v){return(0,n.createPreferenceProxy)(a,r.editorPreferenceSchema,{resourceUri:p,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),a=e(74404),p=n.__importStar(e(20868)),v=e(55979),m=e(82196);class _ extends v.AbstractGotoLineQuickAccessProvider{clearDecorations(l){super.clearDecorations(l)}preview(l,h){l.revealRangeInCenter(h,p.editor.ScrollType.Smooth),this.addDecorations(l,h)}goTo(l,h,u=!0){this.gotoLocation({editor:l},{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 _}getFirstSelection(){const l=this.workbenchEditorService.currentEditor,h=l?.getSelections();return h?.[0]}getRange(l=1,h=1){return{startLineNumber:l,endLineNumber:l,startColumn:h,endColumn:h}}init(){var l;this.savedViewState=(0,o.withNullAsUndefined)((l=this.workbenchEditorService.currentEditor)===null||l===void 0?void 0:l.monacoEditor.saveViewState())}getModel(){var l,h,u,d,E;const f=this.workbenchEditorService.currentEditor,c=this.getFirstSelection();if(!c||!f)return{onType:(S,D)=>{D([new a.QuickOpenItem({label:(0,o.localize)("quickopen.goToLine.notValid"),run:()=>!1})])}};const y=(l=c.positionLineNumber)!==null&&l!==void 0?l:1,b=(h=c.positionColumn)!==null&&h!==void 0?h:1,A=(E=(d=(u=f.currentDocumentModel)===null||u===void 0?void 0:u.getMonacoModel())===null||d===void 0?void 0:d.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 a.QuickOpenItem({label:R,run:O=>O===a.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 a.QuickOpenItem({label:(0,o.formatLocalize)("quickopen.goToLine.defaultMessage",y,b,A),run:()=>!1})])}}}getOptions(){return{}}onClose(l){const h=this.workbenchEditorService.currentEditor;h&&(h.monacoEditor.focus(),this.quickAccess.clearDecorations(h.monacoEditor),l&&this.savedViewState&&h.monacoEditor.restoreViewState(this.savedViewState))}};t.GoToLineQuickOpenHandler=s,n.__decorate([(0,r.Autowired)(a.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)(m.WorkbenchEditorService),n.__metadata("design:type",m.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),a=e(43718),p=e(97821),v=e(51500),m=e(40540),_=e(23418);let s=class extends p.QuickOpenBaseAction{constructor(){super({id:"workspace-symbol:splitToRight",tooltip:(0,a.localize)("quickOpen.openOnTheRightSide"),class:(0,o.getIcon)("embed")})}async run(d){await d.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 l=class{constructor(){this.prefix="#",this.cancellationSource=new o.CancellationTokenSource}get description(){return(0,a.localize)("editor.workspaceSymbol.description")}getModel(){return{onType:(d,E)=>{if(d===""){E([new o.QuickOpenItem({label:(0,a.localize)("editor.workspaceSymbol.search"),run:()=>!1})]);return}if(d==="#")return void E([new o.QuickOpenItem({label:(0,a.localize)("editor.workspaceSymbolClass.search"),run:()=>!1})]);if(this.languageService.workspaceSymbolProviders.length===0){E([new o.QuickOpenItem({label:(0,a.localize)("editor.workspaceSymbol.notfound"),run:()=>!1})]);return}const f=d[0]==="#",c=[];this.cancellationSource.cancel();const y=new o.CancellationTokenSource;this.cancellationSource=y;const b={query:f?d.slice(1):d},A=this.reporterService.time(a.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===m.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||"")}));c.push(...I),E(c,this.workspaceSymbolActionProvider)}return D})).catch(S=>{this.logger.log(S)}).finally(()=>{y.token.isCancellationRequested||(c.length||E([]),A.timeEnd(f?"class":"symbol",{lookFor:d,stat:{symbol:c.length}}))})}}}getOptions(){return{fuzzyMatchLabel:{enableSeparateSubstringMatching:!0},showItemsWithoutHighlight:!0,fuzzyMatchDescription:!1,getPlaceholderItem:(d,E)=>new o.QuickOpenItem({label:(0,a.localize)(E.startsWith("##")?"editor.workspaceSymbolClass.notfound":"editor.workspaceSymbol.notfound"),run:()=>!1})}}onClose(){this.cancellationSource.cancel()}onToggle(){this.cancellationSource.cancel()}};t.WorkspaceSymbolQuickOpenHandler=l,n.__decorate([(0,r.Autowired)(_.ILanguageService),n.__metadata("design:type",Object)],l.prototype,"languageService",void 0),n.__decorate([(0,r.Autowired)(v.IWorkspaceService),n.__metadata("design:type",Object)],l.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(a.ILogger),n.__metadata("design:type",Object)],l.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],l.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",g)],l.prototype,"workspaceSymbolActionProvider",void 0),n.__decorate([(0,r.Autowired)(a.IReporterService),n.__metadata("design:type",Object)],l.prototype,"reporterService",void 0),t.WorkspaceSymbolQuickOpenHandler=l=n.__decorate([(0,r.Injectable)()],l);class h extends o.QuickOpenItem{constructor(d,E,f,c,y){super({}),this.symbol=d,this.provider=E,this.workbenchEditorService=f,this.token=c,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 d=this.symbol.containerName;return`${d?`${d} \xB7 `:""}${decodeURIComponent(this.relativePath)}`}fromRange(d){if(!d)return;const{start:E,end:f}=d;return{startLineNumber:E.line+1,startColumn:E.character+1,endLineNumber:f.line+1,endColumn:f.character+1}}open(d,E){this.workbenchEditorService.open(d,{range:this.fromRange(E)})}run(d){const E=this.getUri();return d===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 d=this.getUri();return this.provider.resolveWorkspaceSymbol(this.symbol,this.token).then(E=>{this.workbenchEditorService.open(d,{preview:!1,split:_.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),a=e(43718),p=e(23418),{addElement:v}=a.arrays;let m=class extends o.WithEventBus{constructor(){super(),this.providers=[],this.resources=new Map,this.gettingResources=new Map,this.resourceDecoration=new Map,this.cachedProvider=new a.LRUMap(500,200),this.onRegisterResourceProviderEmitter=new a.Emitter,this.onRegisterResourceProvider=this.onRegisterResourceProviderEmitter.event,this.onUnregisterResourceProviderEmitter=new a.Emitter,this.onUnregisterResourceProvider=this.onUnregisterResourceProviderEmitter.event}onResourceNeedUpdateEvent(l){const h=l.payload;if(this.resources.has(h.toString())){const u=this.resources.get(h.toString());this.doGetResource(h).then(d=>{u&&(Object.assign(u?.resource,d?.resource),u.provider=d?.provider),this.eventBus.fire(new p.ResourceDidUpdateEvent(h))})}}onResourceDecorationNeedChangeEvent(l){this.getResourceDecoration(l.payload.uri);let h=!1;const u=this.resourceDecoration.get(l.payload.uri.toString())||{};new Set([...Object.keys(u),...Object.keys(l.payload.decoration)]).forEach(d=>{u[d]!==l.payload.decoration[d]&&(h=!0)}),h&&(Object.assign(this.resourceDecoration.get(l.payload.uri.toString()),l.payload.decoration),this.eventBus.fire(new p.ResourceDecorationChangeEvent(l.payload)))}getSupportedSchemes(){return Array.from(this.providers.values()).map(l=>l.scheme).filter(Boolean)}async getResource(l){if(!this.resources.has(l.toString())){const h=await this.doGetResource(l);if(!h)return null;const u={resource:h.resource,provider:h.provider};this.resources.set(l.toString(),u)}return this.resources.get(l.toString()).resource}handlesUri(l){return!!this.calculateProvider(l)}async doGetResource(l){if(!this.gettingResources.has(l.toString())){const h=(async()=>{const u=this.calculateProvider(l);if(u){const d=await u.provideResource(l);return d.uri=l,{resource:d,provider:u}}else return this.logger.error("URI has no resource provider: "+l),null})();this.gettingResources.set(l.toString(),h),h.finally(()=>{this.gettingResources.delete(l.toString())})}return this.gettingResources.get(l.toString())}registerResourceProvider(l){this.onRegisterResourceProviderEmitter.fire(l);const h=new a.Disposable;return h.addDispose(v(this.providers,l)),h.addDispose({dispose:()=>{for(const u of this.resources.values())u.provider===l&&(u.provider=s,this.onUnregisterResourceProviderEmitter.fire(l));this.cachedProvider.clear()}}),this.cachedProvider.clear(),h}async shouldCloseResource(l,h){const u=this.getProvider(l.uri);return!u||!u.shouldCloseResource?!0:await u.shouldCloseResource(l,h)}async shouldCloseResourceWithoutConfirm(l){const h=this.getProvider(l.uri);return h&&h.shouldCloseResourceWithoutConfirm?await h.shouldCloseResourceWithoutConfirm(l):!1}async close(l,h){const u=this.getProvider(l.uri);return!u||!u.close?!0:await u.close(l,h)}calculateProvider(l){if(this.cachedProvider.has(l.toString()))return this.cachedProvider.get(l.toString());let h,u={weight:-1,index:-1};function d(E,f,c){u={weight:f,index:c},h=E}return this.providers.forEach((E,f)=>{let c=-1;E.handlesUri?c=E.handlesUri(l):E.scheme&&(c=E.scheme===l.scheme?10:-1),c>=0&&(c>u.weight||c===u.weight&&f>u.index)&&d(E,c,f)}),this.cachedProvider.set(l.toString(),h),h}getProvider(l){const h=this.resources.get(l.toString());if(h)return h.provider}getResourceDecoration(l){return this.resourceDecoration.has(l.toString())||this.resourceDecoration.set(l.toString(),{..._}),this.resourceDecoration.get(l.toString())}getResourceSubname(l,h){const u=this.getProvider(l.uri);return u&&u.provideResourceSubname?u.provideResourceSubname(l,h):null}disposeResource(l){const h=this.getProvider(l.uri);if(this.resources.delete(l.uri.toString()),this.resourceDecoration.delete(l.uri.toString()),!(!h||!h.onDisposeResource))return h.onDisposeResource(l)}};t.ResourceServiceImpl=m,n.__decorate([(0,r.Autowired)(a.ILogger),n.__metadata("design:type",Object)],m.prototype,"logger",void 0),n.__decorate([(0,o.OnEvent)(p.ResourceNeedUpdateEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.ResourceNeedUpdateEvent]),n.__metadata("design:returntype",void 0)],m.prototype,"onResourceNeedUpdateEvent",null),n.__decorate([(0,o.OnEvent)(p.ResourceDecorationNeedChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.ResourceDecorationNeedChangeEvent]),n.__metadata("design:returntype",void 0)],m.prototype,"onResourceDecorationNeedChangeEvent",null),t.ResourceServiceImpl=m=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],m);const _={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)),a=e(41869),p=e(25918),v=e(1149),m=e(63373),_=e(93899),s=e(48560),g=e(43718),l=e(23418),h=e(19352),u=n.__importDefault(e(62711)),d=e(78680),E=e(82196),f=e(50674),c=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)(l.ResourceService),M=(0,s.useInjectable)(a.IEventBus),O=(0,o.useContext)(a.ConfigContext),x=(0,s.useInjectable)(l.WorkbenchEditorService),k=(0,s.useInjectable)(d.TabTitleMenuService),F=(0,s.useInjectable)(a.PreferenceService),L=(0,s.useInjectable)(_.IMenuRegistry),B=(0,s.useInjectable)(E.IEditorTabService),U=(0,s.useInjectable)(v.LayoutViewSizeConfig),W=(0,s.useInjectable)(a.ComponentRegistry),j=(0,a.useDesignStyles)(u.default.tab_right,"tab_right"),Q=(0,a.useDesignStyles)(u.default.close_tab,"close_tab"),G=(0,a.useDesignStyles)(u.default.kt_editor_close_icon,"kt_editor_close_icon"),Z=(0,a.useDesignStyles)(u.default.kt_editor_tabs_content,"kt_editor_tabs_content"),$=(0,a.useDesignStyles)(u.default.kt_editor_tabs_current_last,"kt_editor_tabs_current_last"),V=(0,a.useDesignStyles)(u.default.kt_editor_tab,"kt_editor_tab"),H=(0,a.useDesignStyles)(u.default.kt_editor_tab_current_prev,"kt_editor_tab_current_prev"),K=(0,a.useDesignStyles)(u.default.kt_editor_tab_current_next,"kt_editor_tab_current_next"),Y=(0,a.useDesignStyles)(u.default.kt_editor_tab_current,"kt_editor_tab_current"),X=(0,a.useDesignStyles)(u.default.kt_editor_tab_dirty,"kt_editor_tab_dirty"),oe=(0,a.useDesignStyles)(u.default.kt_editor_tabs,"kt_editor_tabs"),ie=(0,a.useDesignStyles)(u.default.kt_editor_tabs_scroll_wrapper,"kt_editor_tabs_scroll_wrapper"),[he,me]=(0,o.useState)({}),[q,Ee]=(0,o.useState)(!!F.get("editor.wrapTab")),[ue,te]=(0,o.useState)(new Map),[fe,Ie]=(0,o.useState)(),Me=(0,o.useMemo)(()=>(0,a.getSlotLocation)(c,O.layoutConfig),[]),Be=o.default.useMemo(()=>{var Ae,Ue;const Ye=(Ue=(Ae=W.getComponentRegistryInfo(l.TabbarRightExtraContentId))===null||Ae===void 0?void 0:Ae.views)===null||Ue===void 0?void 0:Ue[0];if(Ye)return Ye},[]);(0,f.useUpdateOnGroupTabChange)(A),(0,s.useUpdateOnEventBusEvent)(l.ResourceDidUpdateEvent,[A.resources],Ae=>!!I&&A.resources.findIndex(Ue=>Ue.uri.isEqual(Ae))!==-1),(0,o.useEffect)(()=>{const Ae=new a.Disposable;return Ae.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}))})),Ae.addDispose(A.onDidEditorGroupTabChanged(()=>{q||we()})),()=>{Ae.dispose()}},[A]);const Pe=(0,o.useCallback)((Ae,Ue,Ye)=>{if(Ae.dataTransfer.getData("uri")){const Ke=new a.URI(Ae.dataTransfer.getData("uri"));let mt;Ae.dataTransfer.getData("uri-source-group")&&(mt=x.getEditorGroup(Ae.dataTransfer.getData("uri-source-group"))),A.dropUri(Ke,E.DragOverPosition.CENTER,mt,Ye)}Ae.dataTransfer.files.length>0&&M.fire(new E.EditorGroupFileDropEvent({group:A,tabIndex:Ue,files:Ae.dataTransfer.files}))},[A]),we=(0,o.useCallback)(()=>{a.fastdom.measure(()=>{try{if(S.current&&A.currentResource){const Ae=S.current.querySelector("."+u.default.kt_editor_tab+"[data-uri='"+A.currentResource.uri.toString()+"']");Ae&&Ae.scrollIntoView({block:"nearest",inline:"nearest"})}}catch{}})},[A,S.current]),_e=(0,o.useCallback)(()=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{a.fastdom.measure(()=>{var Ae;const Ue=(Ae=T.current)===null||Ae===void 0?void 0:Ae.offsetWidth;Ue!==fe&&Ie(Ue)})},200)},[T.current,w.current,fe]);(0,o.useEffect)(()=>{q||queueMicrotask(()=>{we()})},[q,S.current]),(0,o.useEffect)(()=>{if(!q){const Ae=new a.Disposable;return S.current&&Ae.addDispose(new a.DomListener(S.current,"mousewheel",b)),Ae.addDispose(M.onDirective(a.ResizeEvent.createDirective(Me),()=>{we()})),Ae.addDispose(M.onDirective(E.GridResizeEvent.createDirective(A.grid.uid),()=>{we()})),()=>{Ae.dispose()}}},[q]);const Ne=(0,o.useCallback)(()=>{a.fastdom.measureAtNextFrame(()=>{if(I.current&&q){const Ae=new Map;let Ue,Ye;const Ke=Array.from(I.current.children);Ke.pop(),Ke.forEach(mt=>{mt.offsetTop!==Ue&&(Ue=mt.offsetTop,Ye&&Ae.set(Ke.indexOf(Ye),!0)),Ye=mt,Ae.set(Ke.indexOf(mt),!1)}),te(Ae)}})},[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 Ae=new a.DisposableCollection;return Ae.push(M.onDirective(a.ResizeEvent.createDirective(Me),()=>{Ne()})),Ae.push(F.onPreferenceChanged(Ue=>{Ue.preferenceName==="editor.wrapTab"&&Ee(!!Ue.newValue)})),Ae.push(x.onDidCurrentEditorGroupChanged(()=>{_e()})),Ae.push(a.Event.debounce(a.Event.filter(L.onDidChangeMenu,Ue=>Ue===_.MenuId.EditorTitle),()=>{},200)(()=>{_e()})),()=>{Ae.dispose()}},[]),(0,o.useEffect)(()=>{const Ae=new a.DisposableCollection;return Ae.push(A.onDidEditorFocusChange(()=>{_e()})),()=>{Ae.dispose()}},[A]);const Te=(0,o.useCallback)(Ae=>{Ae.preventDefault(),Ae.stopPropagation(),D.current&&D.current.classList.add(u.default.kt_on_drag_over)},[D.current]),We=(0,o.useCallback)(Ae=>{D.current&&D.current.classList.remove(u.default.kt_on_drag_over)},[D.current]),pe=(0,o.useCallback)(Ae=>{D.current&&D.current.classList.remove(u.default.kt_on_drag_over),Pe&&Pe(Ae,-1)},[Pe,D.current]),re=(0,o.useCallback)(Ae=>{Ae.target===Ae.currentTarget&&x.createUntitledResource()},[x]),ge=o.default.useCallback((Ae,Ue)=>{const Ye=R.getResourceDecoration(Ae.uri),Ke=R.getResourceSubname(Ae,A.resources);return B.renderEditorTab(o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:he[Ae.uri.toString()]?"loading_indicator":(0,r.default)(Ae.icon)}," "),o.default.createElement("div",{tabIndex:0,role:"tab","aria-selected":Ue?"true":"false"},Ae.name),Ke?o.default.createElement("div",{className:u.default.subname},Ke):null,Ye.readOnly?o.default.createElement("span",{className:(0,r.default)((0,a.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:mt=>{mt.stopPropagation(),A.close(Ae.uri)}},B.renderTabCloseComponent(o.default.createElement("div",{className:(0,r.default)((0,a.getIcon)("close"),G),tabIndex:0,role:"button","aria-label":(0,g.formatLocalize)("editor.closeTab.title",Ae.name)}))))),Ue)},[B]),De=()=>{const Ae=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]:Ae,[$]:Ue===A.resources.length-1}),ref:I,role:"tablist"},A.resources.map((Ye,Ke)=>{let mt;const _t=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]:ue.get(Ke),[H]:Ue-1===Ke,[K]:Ue+1===Ke,[Y]:A.currentResource===Ye,[u.default.kt_editor_tab_preview]:A.previewURI&&A.previewURI.isEqual(Ye.uri),[X]:_t.dirty}),style:q&&Ke===A.resources.length-1?{marginRight:fe,height:U.editorTabsHeight}:{height:U.editorTabsHeight},onContextMenu:Mt=>{k.show(Mt.nativeEvent.x,Mt.nativeEvent.y,Ye&&Ye.uri,A),Mt.preventDefault()},key:Ye.uri.toString(),onMouseUp:Mt=>{Mt.nativeEvent.button===a.MouseEventButton.Middle&&(Mt.preventDefault(),Mt.stopPropagation(),A.close(Ye.uri))},onMouseDown:Mt=>{Mt.nativeEvent.button===a.MouseEventButton.Left&&A.open(Ye.uri,{focus:!0})},"data-uri":Ye.uri.toString(),onDragOver:Mt=>{Mt.preventDefault(),Mt.stopPropagation(),mt&&mt.classList.add(u.default.kt_on_drag_over)},onDragLeave:Mt=>{mt&&mt.classList.remove(u.default.kt_on_drag_over)},onDrop:Mt=>{mt&&mt.classList.remove(u.default.kt_on_drag_over),Pe&&Pe(Mt,Ke,Ye)},onDoubleClick:Mt=>{A.pinPreviewed(Ye.uri)},ref:Mt=>mt=Mt,onDragStart:Mt=>{Mt.dataTransfer.setData("uri",Ye.uri.toString()),Mt.dataTransfer.setData("uri-source-group",A.name)}},ge(Ye,A.currentResource===Ye))}))};return o.default.createElement("div",{id:m.VIEW_CONTAINERS.EDITOR_TABS,className:oe},o.default.createElement("div",{className:ie,ref:D,onDragOver:Te,onDragLeave:We,onDrop:pe,onDoubleClick:re},q?o.default.createElement("div",{className:u.default.kt_editor_wrap_container},De()):o.default.createElement(h.Scroll,{forwardedRef:Ae=>Ae?S.current=Ae:null,className:u.default.kt_editor_tabs_scroll},De())),o.default.createElement(t.EditorActions,{className:(0,r.default)({[u.default.kt_editor_wrap_mode_action]:q}),ref:T,group:A}),(0,a.renderView)(Be))};t.Tabs=y,t.EditorActions=(0,o.forwardRef)((A,S)=>{const D=(0,a.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)(l.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 a.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(p.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 a extends r.BasicEvent{}t.RegisterEditorComponentResolverEvent=a;class p extends r.BasicEvent{}t.RegisterEditorComponentEvent=p;class v{}t.EditorComponentRegistry=v,t.BrowserEditorContribution=Symbol("BrowserEditorContribution"),t.MultiDiffSourceContribution=Symbol("MultiDiffSourceContribution");class m extends r.BasicEvent{static createDirective(x){return`grid-resize-${x}`}}t.GridResizeEvent=m;class _ extends r.BasicEvent{}t.EditorGroupOpenEvent=_;class s extends r.BasicEvent{}t.EditorGroupCloseEvent=s;class g extends r.BasicEvent{}t.EditorGroupDisposeEvent=g;class l extends r.BasicEvent{}t.EditorGroupChangeEvent=l;class h extends r.BasicEvent{}t.EditorActiveResourceStateChangedEvent=h;class u extends r.BasicEvent{}t.EditorGroupFileDropEvent=u,t.IEditorDecorationCollectionService=Symbol("IEditorDecorationCollectionService");class d extends r.BasicEvent{}t.EditorSelectionChangeEvent=d;class E extends r.BasicEvent{}t.EditorVisibleChangeEvent=E;class f extends r.BasicEvent{}t.EditorConfigurationChangedEvent=f;class c extends r.BasicEvent{}t.EditorGroupIndexChangedEvent=c;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),a=e(41869),p=e(72665),v=e(51500),m=e(23418),_=e(96689);let s=n=class{constructor(){this._id=1}async update(){this._id=await this.getLatestUnitiedIndex()}async getLatestUnitiedIndex(u){var d;await this.workspaceService.whenReady;const c=(u||((d=this.workspaceService.workspace)===null||d===void 0?void 0:d.children)||[]).filter(y=>a.URI.file(y.uri).displayName.startsWith(n.UNTITLED_FILE_NAME_PREFIX)).map(y=>{const b=a.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 c.length>0?Math.max(...c)+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 a.Emitter,this.onDidChangeContent=this._onDidChangeContent.event}handlesScheme(u){return u===a.Schemes.untitled}async provideEncoding(u){return this.preferenceService.get("files.encoding",void 0,u.toString(),(0,a.getLanguageIdFromMonaco)(u))||"utf8"}async provideEOL(u){const d=await this.applicationService.getBackendOS(),E=this.preferenceService.get("files.eol","auto",u.toString(),(0,a.getLanguageIdFromMonaco)(u));return E!=="auto"?E:d===a.OperatingSystem.Windows?`\r
31968
+ 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,a.Autowired)(),n.__metadata("design:type",f.TextmateRegistry)],w.prototype,"textmateRegistry",void 0),n.__decorate([(0,a.Autowired)(_.IFileServiceClient),n.__metadata("design:type",Object)],w.prototype,"fileServiceClient",void 0),n.__decorate([(0,a.Autowired)(p.PreferenceService),n.__metadata("design:type",Object)],w.prototype,"preferenceService",void 0),n.__decorate([(0,a.Autowired)(p.ILogger),n.__metadata("design:type",Object)],w.prototype,"logger",void 0),n.__decorate([(0,a.Autowired)(E.IEditorDocumentModelService),n.__metadata("design:type",Object)],w.prototype,"editorDocumentModelService",void 0),n.__decorate([(0,a.Autowired)(v.RendererRuntime),n.__metadata("design:type",v.RendererRuntime)],w.prototype,"rendererRuntime",void 0),t.TextmateService=w=n.__decorate([(0,a.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),a=e(40191),p=e(28694),v=e(82196);t.executePrepareTypeHierarchyCommand={id:"_executePrepareTypeHierarchy"},t.executeProvideSupertypesCommand={id:"_executeProvideSupertypes"},t.executeProvideSubtypesCommand={id:"_executeProvideSubtypes"};const m=new a.RawContextKey("editorHasCallHierarchyProvider",!1);let _=class{registerCommands(g){g.registerCommand(t.executePrepareTypeHierarchyCommand,{execute:(l,h)=>this.typeHierarchyService.prepareTypeHierarchyProvider(l,h)}),g.registerCommand(t.executeProvideSupertypesCommand,{execute:l=>this.typeHierarchyService.provideSupertypes(l)}),g.registerCommand(t.executeProvideSubtypesCommand,{execute:l=>this.typeHierarchyService.provideSubtypes(l)})}registerEditorFeature(g){this.ctxHasProvider=m.bind(this.contextKeyService),g.registerEditorFeatureContribution({contribute:l=>{const h=l.monacoEditor;return o.Event.any(h.onDidChangeModel,h.onDidChangeModelLanguage,p.TypeHierarchyProviderRegistry.onDidChange)(()=>{h.hasModel()&&this.ctxHasProvider.set(p.TypeHierarchyProviderRegistry.has(h.getModel()))})}})}};t.TypeHierarchyContribution=_,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],_.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(p.ITypeHierarchyService),n.__metadata("design:type",Object)],_.prototype,"typeHierarchyService",void 0),t.TypeHierarchyContribution=_=n.__decorate([(0,o.Domain)(o.CommandContribution,v.BrowserEditorContribution)],_)},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),a=e(28694),p=e(96689),{isNonEmptyArray:v}=o.arrays;class m{static async create(g,l,h){const[u]=a.TypeHierarchyProviderRegistry.ordered(g);if(!u)return;const d=await u.prepareTypeHierarchy(g,l,h);if(d)return new m(d.roots.reduce((E,f)=>E+f._sessionId,""),u,d.roots,new o.RefCountedDisposable(d))}constructor(g,l,h,u){this.id=g,this.provider=l,this.roots=h,this.ref=u,this.root=h[0]}dispose(){this.ref.release()}fork(g){const l=this;return new class extends m{constructor(){super(l.id,l.provider,[g],l.ref.acquire())}}}async provideSupertypes(g,l){try{const h=await this.provider.provideSupertypes(g,l);if(v(h))return h}catch(h){(0,o.onUnexpectedExternalError)(h)}return[]}async provideSubtypes(g,l){try{const h=await this.provider.provideSubtypes(g,l);if(v(h))return h}catch(h){(0,o.onUnexpectedExternalError)(h)}return[]}}t.TypeHierarchyModel=m;let _=class{constructor(){this.models=new Map}registerTypeHierarchyProvider(g,l){a.TypeHierarchyProviderRegistry.register(g,l)}async prepareTypeHierarchyProvider(g,l){let h=this.modelService.getModelReference(o.URI.parse(g.toString())),u=h?.instance.getMonacoModel();if(h?.dispose(),!u){const d=await this.modelService.createModelReference(o.URI.parse(g.toString()));u=d.instance.getMonacoModel(),h=d}try{const d=await m.create(u,l,o.CancellationToken.None);return d?(this.models.set(d.id,d),this.models.forEach((E,f,c)=>{c.size>10&&(E.dispose(),this.models.delete(f))}),[d.root]):[]}finally{h?.dispose()}}async provideSupertypes(g){const l=this.models.get(g._sessionId);if(l)return l.provideSupertypes(g,o.CancellationToken.None)}async provideSubtypes(g){const l=this.models.get(g._sessionId);if(l)return l.provideSubtypes(g,o.CancellationToken.None)}};t.TypeHierarchyService=_,n.__decorate([(0,r.Autowired)(p.IEditorDocumentModelService),n.__metadata("design:type",Object)],_.prototype,"modelService",void 0),t.TypeHierarchyService=_=n.__decorate([(0,r.Injectable)()],_)},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),a=e(43718),p=e(28423),v=e(72665),m=e(65034),_=e(104),s=e(19087),g=e(55113),l=e(64335),h=e(30526),u=e(96689),d=e(82196);let E=class extends a.WithEventBus{constructor(c,y,b){super(),this.multiDiffWidget=c,this.convertedOptions=y,this.editorCollectionService=b,this.multiDiffModelChangeEmitter=new a.Emitter,this.onMultiDiffModelChange=this.multiDiffModelChangeEmitter.event,this.viewStateMap=new Map,this.editorCollectionService.addMultiDiffEditors([this])}onDocModelContentChangedEvent(c){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())===c.payload.uri.codeUri.toString()})||this.eventBus.fire(new d.ResourceDecorationNeedChangeEvent({uri:this.currentUri,decoration:{dirty:!!c.payload.dirty,readOnly:!!c.payload.readonly}})))}saveViewState(c){if(!c)return;const y=c.toString(),b=this.multiDiffWidget.getViewState();b&&this.viewStateMap.set(y,b)}restoreViewState(c){if(!c)return;const y=c.toString(),b=this.viewStateMap.get(y);b&&this.multiDiffWidget.setViewState(b)}createAndRegisterEditorParts(c,y,b,A,S){const D=[];if(c){const I=this.injector.get(h.DiffEditorPart,[c.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(c,y,b){var A,S;this.currentUri&&this.saveViewState(this.currentUri);const D=!((A=y.metadata.sources)===null||A===void 0)&&A.length?{resources:m.ValueWithChangeEvent.const(y.metadata.sources)}:await this.multiDiffSourceResolverService.resolve(y.uri),I=D?(0,p.observableFromValueWithChangeEvent)(this,D.resources):(0,p.constObservable)([]),w=(0,p.mapObservableArrayCached)(this,I,async(k,F)=>{var L,B;let U,W;const j=new a.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(_.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,p.observableValue)("documents","loading"),R=(0,p.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,p.recomputeInitiallyAndOnChange)(R);await R.get(),(S=this.multiDiffModel)===null||S===void 0||S.dispose(),this.multiDiffModel={dispose:()=>M.dispose(),documents:new p.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,a.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;a.Event.once(W.onDidChangeDecorations)(()=>{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(c){return this.multiDiffWidget.findDocumentDiffItem(c.codeUri)}getCurrentDiffEntry(){var c;const y=this.multiDiffWidget.getActiveControl();if(!y)return;const b=(c=y.getOriginalEditor().getModel())===null||c===void 0?void 0:c.uri;if(b)return this.multiDiffWidget.findDocumentDiffItem(b)}reveal(c,y){this.multiDiffWidget.reveal(c,y)}collapseAll(){const c=this.multiDiffWidget.getViewState(),y={...c,docStates:Object.keys(c.docStates||{}).reduce((b,A)=>(b[A]={...c.docStates[A],collapsed:!0},b),{})};this.multiDiffWidget.setViewState(y)}expandAll(){const c=this.multiDiffWidget.getViewState(),y={...c,docStates:Object.keys(c.docStates||{}).reduce((b,A)=>(b[A]={...c.docStates[A],collapsed:!1},b),{})};this.multiDiffWidget.setViewState(y)}layout(c){this.multiDiffWidget.layout(c)}focus(){const c=this.multiDiffWidget.getActiveControl();c&&c.focus()}tryGetCodeEditor(c){return this.multiDiffWidget.tryGetCodeEditor(c.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)(l.IMultiDiffSourceResolverService),n.__metadata("design:type",Object)],E.prototype,"multiDiffSourceResolverService",void 0),n.__decorate([(0,r.Autowired)(a.ILogger),n.__metadata("design:type",Object)],E.prototype,"logger",void 0),n.__decorate([(0,a.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),a=e(64335);let p=class{constructor(){this.sourceValues=new Map}registerSources(m,_){const s=m.toString(),g=this.sourceValues.get(s);g?g.value=_:this.sourceValues.set(s,new o.ValueWithChangeEvent(_))}canHandleUri(m){return m.scheme===a.MULTI_DIFF_SCHEME}async resolveDiffSource(m){const _=this.sourceValues.get(m.toString());if(_)return{resources:_}}dispose(){this.sourceValues.clear()}};t.MultiDiffResolver=p,t.MultiDiffResolver=p=n.__decorate([(0,r.Injectable)()],p)},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),a=e(26542),p=e(14951),v=e(23418),m=e(64335);let _=class extends o.WithEventBus{handlesUri(g){const l=this.multiDiffSourceResolverService.getResolvers();for(const h of l)if(h.canHandleUri(g))return 10;return-1}async provideResource(g){var l;const{name:h,sources:u}=g.getParsedQuery(),d=u?JSON.parse(u):[],E=d.length>0?new o.URI(d[0].modifiedUri):void 0,f=E?this.labelService.getIcon(E):void 0;return{name:`Multi-Diff: ${h||d.length+" files"}`,icon:f||(0,o.getIcon)("diff"),uri:g,supportsRevive:(l=this.appConfig.enableDiffRevive)!==null&&l!==void 0?l:!1,metadata:{sources:d}}}async shouldCloseResource(g,l){return!0}};t.MultiDiffResourceProvider=_,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",a.LabelService)],_.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(v.ResourceService),n.__metadata("design:type",v.ResourceService)],_.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],_.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(m.IMultiDiffSourceResolverService),n.__metadata("design:type",Object)],_.prototype,"multiDiffSourceResolverService",void 0),t.MultiDiffResourceProvider=_=n.__decorate([(0,r.Injectable)()],_)},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),a=e(93899),p=e(23418),v=e(64335),m=e(82196),_=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 d=this.multiDiffSourceResolverService.getResolvers();for(const E of d)if(E.canHandleUri(o.URI.from({scheme:u,path:"empty"})))return 10;return-1},(u,d)=>{d.push({type:m.EditorOpenType.multiDiff})})}registerCommands(h){h.registerCommand(o.MULTI_DIFF_EDITOR_COMMANDS.COLLAPSE_FILES,{execute:()=>{var u;const d=this.workbenchEditorService.currentEditorGroup;((u=d.currentOpenType)===null||u===void 0?void 0:u.type)===m.EditorOpenType.multiDiff&&d.multiDiffEditor.collapseAll()}}),h.registerCommand(o.MULTI_DIFF_EDITOR_COMMANDS.EXPAND_FILES,{execute:()=>{var u;const d=this.workbenchEditorService.currentEditorGroup;((u=d.currentOpenType)===null||u===void 0?void 0:u.type)===m.EditorOpenType.multiDiff&&d.multiDiffEditor.expandAll()}})}registerMenus(h){h.registerMenuItems(a.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(a.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)(_.MultiDiffResolver),n.__metadata("design:type",_.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)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],g.prototype,"workbenchEditorService",void 0),t.MultiDiffEditorContribution=g=n.__decorate([(0,o.Domain)(m.BrowserEditorContribution,m.MultiDiffSourceContribution,a.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 a=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 m of this._resolvers)if(m.canHandleUri(v))return m.resolveDiffSource(v);return Promise.resolve(void 0)}getResolvers(){return Array.from(this._resolvers)}};t.MultiDiffSourceResolverService=a,t.MultiDiffSourceResolverService=a=n.__decorate([(0,r.Injectable)()],a)},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)),a=e(76003),p=e(97267),v=e(41869),m=e(28423),_=e(26209),s=n.__importDefault(e(69418)),g=e(82196),l=e(50674),h=({editorGroup:c})=>{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,l.useUpdateOnGroupTabChange)(c),(0,v.useUpdateOnEvent)(y.onDidUpdateBreadCrumbResults,[],D=>{var I;const w=c.currentEditor&&c.currentEditor.currentDocumentModel?c.currentEditor:null,T=c.currentEditor&&c.currentEditor.currentDocumentModel?c.currentEditor.currentDocumentModel.uri:(I=c.currentResource)===null||I===void 0?void 0:I.uri;return!!T&&D.editor===w&&D.uri.isEqual(T)}),c.resources.length===0||!c.currentResource)return null;let S;return c.currentEditor&&c.currentEditor.currentDocumentModel?S=y.getBreadCrumbs(c.currentEditor.currentDocumentModel.uri,c.currentEditor):S=y.getBreadCrumbs(c.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(p.Icon,{icon:"right",size:"small",className:A}),o.default.createElement(t.NavigationItem,{part:D,editorGroup:c})))):null};t.NavigationBar=h,t.NavigationItem=(0,o.memo)(({part:c,editorGroup:y})=>{const b=(0,v.useInjectable)(E),A=(0,v.useInjectable)(_.BreadCrumbsMenuService),S=(0,o.useRef)(),D=(0,v.useDesignStyles)(s.default["navigation-part"],"navigation-part"),I=(0,o.useCallback)(async()=>{if(c.getSiblings&&S.current){const{left:w,top:T,height:R}=S.current.getBoundingClientRect(),M=await c.getSiblings();let O=w;window.innerWidth-O<210&&(O=window.innerWidth-200-5),b.showMenu(M.parts,O,T+R+5,M.currentIndex,c.uri,y)}},[S.current,c]);return o.default.createElement("span",{onClick:I,onContextMenu:w=>{!c.isSymbol&&c.uri&&A.show(w.nativeEvent.x,w.nativeEvent.y,y,c.uri),w.preventDefault()},className:D,ref:S},c.icon&&o.default.createElement("span",{className:c.icon}),o.default.createElement("span",null,c.name))});const u=({model:c})=>{let y=window.innerHeight-c.y-20,b=c.y;const A=c.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)(c.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:c.x+"px",top:b+"px",maxHeight:y+"px",height:A+"px"}},o.default.createElement(p.Scrollbars,{className:s.default.navigation_menu_items,universal:!0,forwardedRef:M=>{S.current=M,R()}},c.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();c.showSubMenu(j,W,B,c)}}: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===c.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(p.Icon,{icon:"right",size:"small"})))})),T&&o.default.createElement(t.NavigationMenu,{model:T}))};t.NavigationMenu=u;const d=()=>{const c=(0,o.useRef)(),y=(0,v.useInjectable)(E),b=(0,v.useAutorun)(y.current);return(0,o.useEffect)(()=>{if(c.current){const A=new v.Disposable;return A.addDispose(new v.DomListener(window,"mouseup",()=>{y.dispose()})),A.addDispose(new v.DomListener(c.current,"mouseup",S=>{S.stopPropagation()})),A.dispose.bind(A)}}),b?o.default.createElement("div",{tabIndex:1,ref:c},o.default.createElement(t.NavigationMenu,{model:b})):null};t.NavigationMenuContainer=d;let E=class{constructor(){this.current=(0,m.observableValue)(this,null)}showMenu(y,b,A,S,D,I){(0,m.transaction)(w=>{this.current.set(new f(y,b,A,S,D),w)})}dispose(){(0,m.transaction)(y=>{const b=this.current.get();b?.dispose(),this.current.set(null,y)})}};t.NavigationBarViewService=E,t.NavigationBarViewService=E=n.__decorate([(0,a.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,m.observableValue)(this,null)}showSubMenu(y,b,A,S){(0,m.transaction)(D=>{this.subMenu.set(new f(y,b,A,-1,S),D)})}dispose(){(0,m.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 a=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=a,t.NotebookService=a=n.__decorate([(0,r.Injectable)()],a)},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 a=class{constructor(){this.schema=o.editorPreferenceSchema}};t.EditorPreferenceContribution=a,t.EditorPreferenceContribution=a=n.__decorate([(0,r.Domain)(r.PreferenceContribution)],a)},6043:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.diffEditorOptionsConverters=t.textModelUpdateOptionsConverters=t.editorOptionsConverters=void 0,t.isEditorOption=a,t.isDiffEditorOption=p,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,l){if(l.has(g))return!0;{const h=l.keys();for(const u of h)if(g.startsWith(u))return!0}return!1}function a(g){return o(g,t.editorOptionsConverters)||o(g,t.textModelUpdateOptionsConverters)||o(g,t.diffEditorOptionsConverters)}function p(g){return o(g,t.diffEditorOptionsConverters)}const v=[...t.editorOptionsConverters.keys()],m=[...t.textModelUpdateOptionsConverters.keys()],_=[...t.diffEditorOptionsConverters.keys()];function s(g,l,h,u){const d=l?n.Uri.parse(l):void 0,E=(D,I)=>D.reduce((w,T)=>{const R=g.getValue(T,{resource:d,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],c=u?u.filter(D=>t.textModelUpdateOptionsConverters.has(D)):[...m],y=u?u.filter(D=>t.diffEditorOptionsConverters.has(D)):[..._],b=r(E(f,t.editorOptionsConverters)),A=r(E(c,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",a="Menlo, Monaco, 'Courier New', monospace",p="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'";t.EDITOR_FONT_DEFAULTS={fontFamily:n.isOSX?a:n.isLinux?p: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}},m={"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,...m}},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(a,p,v){return(0,n.createPreferenceProxy)(a,r.editorPreferenceSchema,{resourceUri:p,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),a=e(74404),p=n.__importStar(e(20868)),v=e(55979),m=e(82196);class _ extends v.AbstractGotoLineQuickAccessProvider{clearDecorations(l){super.clearDecorations(l)}preview(l,h){l.revealRangeInCenter(h,p.editor.ScrollType.Smooth),this.addDecorations(l,h)}goTo(l,h,u=!0){this.gotoLocation({editor:l},{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 _}getFirstSelection(){const l=this.workbenchEditorService.currentEditor,h=l?.getSelections();return h?.[0]}getRange(l=1,h=1){return{startLineNumber:l,endLineNumber:l,startColumn:h,endColumn:h}}init(){var l;this.savedViewState=(0,o.withNullAsUndefined)((l=this.workbenchEditorService.currentEditor)===null||l===void 0?void 0:l.monacoEditor.saveViewState())}getModel(){var l,h,u,d,E;const f=this.workbenchEditorService.currentEditor,c=this.getFirstSelection();if(!c||!f)return{onType:(S,D)=>{D([new a.QuickOpenItem({label:(0,o.localize)("quickopen.goToLine.notValid"),run:()=>!1})])}};const y=(l=c.positionLineNumber)!==null&&l!==void 0?l:1,b=(h=c.positionColumn)!==null&&h!==void 0?h:1,A=(E=(d=(u=f.currentDocumentModel)===null||u===void 0?void 0:u.getMonacoModel())===null||d===void 0?void 0:d.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 a.QuickOpenItem({label:R,run:O=>O===a.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 a.QuickOpenItem({label:(0,o.formatLocalize)("quickopen.goToLine.defaultMessage",y,b,A),run:()=>!1})])}}}getOptions(){return{}}onClose(l){const h=this.workbenchEditorService.currentEditor;h&&(h.monacoEditor.focus(),this.quickAccess.clearDecorations(h.monacoEditor),l&&this.savedViewState&&h.monacoEditor.restoreViewState(this.savedViewState))}};t.GoToLineQuickOpenHandler=s,n.__decorate([(0,r.Autowired)(a.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)(m.WorkbenchEditorService),n.__metadata("design:type",m.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),a=e(43718),p=e(97821),v=e(51500),m=e(40540),_=e(23418);let s=class extends p.QuickOpenBaseAction{constructor(){super({id:"workspace-symbol:splitToRight",tooltip:(0,a.localize)("quickOpen.openOnTheRightSide"),class:(0,o.getIcon)("embed")})}async run(d){await d.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 l=class{constructor(){this.prefix="#",this.cancellationSource=new o.CancellationTokenSource}get description(){return(0,a.localize)("editor.workspaceSymbol.description")}getModel(){return{onType:(d,E)=>{if(d===""){E([new o.QuickOpenItem({label:(0,a.localize)("editor.workspaceSymbol.search"),run:()=>!1})]);return}if(d==="#")return void E([new o.QuickOpenItem({label:(0,a.localize)("editor.workspaceSymbolClass.search"),run:()=>!1})]);if(this.languageService.workspaceSymbolProviders.length===0){E([new o.QuickOpenItem({label:(0,a.localize)("editor.workspaceSymbol.notfound"),run:()=>!1})]);return}const f=d[0]==="#",c=[];this.cancellationSource.cancel();const y=new o.CancellationTokenSource;this.cancellationSource=y;const b={query:f?d.slice(1):d},A=this.reporterService.time(a.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===m.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||"")}));c.push(...I),E(c,this.workspaceSymbolActionProvider)}return D})).catch(S=>{this.logger.log(S)}).finally(()=>{y.token.isCancellationRequested||(c.length||E([]),A.timeEnd(f?"class":"symbol",{lookFor:d,stat:{symbol:c.length}}))})}}}getOptions(){return{fuzzyMatchLabel:{enableSeparateSubstringMatching:!0},showItemsWithoutHighlight:!0,fuzzyMatchDescription:!1,getPlaceholderItem:(d,E)=>new o.QuickOpenItem({label:(0,a.localize)(E.startsWith("##")?"editor.workspaceSymbolClass.notfound":"editor.workspaceSymbol.notfound"),run:()=>!1})}}onClose(){this.cancellationSource.cancel()}onToggle(){this.cancellationSource.cancel()}};t.WorkspaceSymbolQuickOpenHandler=l,n.__decorate([(0,r.Autowired)(_.ILanguageService),n.__metadata("design:type",Object)],l.prototype,"languageService",void 0),n.__decorate([(0,r.Autowired)(v.IWorkspaceService),n.__metadata("design:type",Object)],l.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(a.ILogger),n.__metadata("design:type",Object)],l.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],l.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",g)],l.prototype,"workspaceSymbolActionProvider",void 0),n.__decorate([(0,r.Autowired)(a.IReporterService),n.__metadata("design:type",Object)],l.prototype,"reporterService",void 0),t.WorkspaceSymbolQuickOpenHandler=l=n.__decorate([(0,r.Injectable)()],l);class h extends o.QuickOpenItem{constructor(d,E,f,c,y){super({}),this.symbol=d,this.provider=E,this.workbenchEditorService=f,this.token=c,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 d=this.symbol.containerName;return`${d?`${d} \xB7 `:""}${decodeURIComponent(this.relativePath)}`}fromRange(d){if(!d)return;const{start:E,end:f}=d;return{startLineNumber:E.line+1,startColumn:E.character+1,endLineNumber:f.line+1,endColumn:f.character+1}}open(d,E){this.workbenchEditorService.open(d,{range:this.fromRange(E)})}run(d){const E=this.getUri();return d===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 d=this.getUri();return this.provider.resolveWorkspaceSymbol(this.symbol,this.token).then(E=>{this.workbenchEditorService.open(d,{preview:!1,split:_.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),a=e(43718),p=e(23418),{addElement:v}=a.arrays;let m=class extends o.WithEventBus{constructor(){super(),this.providers=[],this.resources=new Map,this.gettingResources=new Map,this.resourceDecoration=new Map,this.cachedProvider=new a.LRUMap(500,200),this.onRegisterResourceProviderEmitter=new a.Emitter,this.onRegisterResourceProvider=this.onRegisterResourceProviderEmitter.event,this.onUnregisterResourceProviderEmitter=new a.Emitter,this.onUnregisterResourceProvider=this.onUnregisterResourceProviderEmitter.event}onResourceNeedUpdateEvent(l){const h=l.payload;if(this.resources.has(h.toString())){const u=this.resources.get(h.toString());this.doGetResource(h).then(d=>{u&&(Object.assign(u?.resource,d?.resource),u.provider=d?.provider),this.eventBus.fire(new p.ResourceDidUpdateEvent(h))})}}onResourceDecorationNeedChangeEvent(l){this.getResourceDecoration(l.payload.uri);let h=!1;const u=this.resourceDecoration.get(l.payload.uri.toString())||{};new Set([...Object.keys(u),...Object.keys(l.payload.decoration)]).forEach(d=>{u[d]!==l.payload.decoration[d]&&(h=!0)}),h&&(Object.assign(this.resourceDecoration.get(l.payload.uri.toString()),l.payload.decoration),this.eventBus.fire(new p.ResourceDecorationChangeEvent(l.payload)))}getSupportedSchemes(){return Array.from(this.providers.values()).map(l=>l.scheme).filter(Boolean)}async getResource(l){if(!this.resources.has(l.toString())){const h=await this.doGetResource(l);if(!h)return null;const u={resource:h.resource,provider:h.provider};this.resources.set(l.toString(),u)}return this.resources.get(l.toString()).resource}handlesUri(l){return!!this.calculateProvider(l)}async doGetResource(l){if(!this.gettingResources.has(l.toString())){const h=(async()=>{const u=this.calculateProvider(l);if(u){const d=await u.provideResource(l);return d.uri=l,{resource:d,provider:u}}else return this.logger.error("URI has no resource provider: "+l),null})();this.gettingResources.set(l.toString(),h),h.finally(()=>{this.gettingResources.delete(l.toString())})}return this.gettingResources.get(l.toString())}registerResourceProvider(l){this.onRegisterResourceProviderEmitter.fire(l);const h=new a.Disposable;return h.addDispose(v(this.providers,l)),h.addDispose({dispose:()=>{for(const u of this.resources.values())u.provider===l&&(u.provider=s,this.onUnregisterResourceProviderEmitter.fire(l));this.cachedProvider.clear()}}),this.cachedProvider.clear(),h}async shouldCloseResource(l,h){const u=this.getProvider(l.uri);return!u||!u.shouldCloseResource?!0:await u.shouldCloseResource(l,h)}async shouldCloseResourceWithoutConfirm(l){const h=this.getProvider(l.uri);return h&&h.shouldCloseResourceWithoutConfirm?await h.shouldCloseResourceWithoutConfirm(l):!1}async close(l,h){const u=this.getProvider(l.uri);return!u||!u.close?!0:await u.close(l,h)}calculateProvider(l){if(this.cachedProvider.has(l.toString()))return this.cachedProvider.get(l.toString());let h,u={weight:-1,index:-1};function d(E,f,c){u={weight:f,index:c},h=E}return this.providers.forEach((E,f)=>{let c=-1;E.handlesUri?c=E.handlesUri(l):E.scheme&&(c=E.scheme===l.scheme?10:-1),c>=0&&(c>u.weight||c===u.weight&&f>u.index)&&d(E,c,f)}),this.cachedProvider.set(l.toString(),h),h}getProvider(l){const h=this.resources.get(l.toString());if(h)return h.provider}getResourceDecoration(l){return this.resourceDecoration.has(l.toString())||this.resourceDecoration.set(l.toString(),{..._}),this.resourceDecoration.get(l.toString())}getResourceSubname(l,h){const u=this.getProvider(l.uri);return u&&u.provideResourceSubname?u.provideResourceSubname(l,h):null}disposeResource(l){const h=this.getProvider(l.uri);if(this.resources.delete(l.uri.toString()),this.resourceDecoration.delete(l.uri.toString()),!(!h||!h.onDisposeResource))return h.onDisposeResource(l)}};t.ResourceServiceImpl=m,n.__decorate([(0,r.Autowired)(a.ILogger),n.__metadata("design:type",Object)],m.prototype,"logger",void 0),n.__decorate([(0,o.OnEvent)(p.ResourceNeedUpdateEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.ResourceNeedUpdateEvent]),n.__metadata("design:returntype",void 0)],m.prototype,"onResourceNeedUpdateEvent",null),n.__decorate([(0,o.OnEvent)(p.ResourceDecorationNeedChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.ResourceDecorationNeedChangeEvent]),n.__metadata("design:returntype",void 0)],m.prototype,"onResourceDecorationNeedChangeEvent",null),t.ResourceServiceImpl=m=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],m);const _={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)),a=e(41869),p=e(25918),v=e(1149),m=e(63373),_=e(93899),s=e(48560),g=e(43718),l=e(23418),h=e(19352),u=n.__importDefault(e(62711)),d=e(78680),E=e(82196),f=e(50674),c=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)(l.ResourceService),M=(0,s.useInjectable)(a.IEventBus),O=(0,o.useContext)(a.ConfigContext),x=(0,s.useInjectable)(l.WorkbenchEditorService),k=(0,s.useInjectable)(d.TabTitleMenuService),F=(0,s.useInjectable)(a.PreferenceService),L=(0,s.useInjectable)(_.IMenuRegistry),B=(0,s.useInjectable)(E.IEditorTabService),U=(0,s.useInjectable)(v.LayoutViewSizeConfig),W=(0,s.useInjectable)(a.ComponentRegistry),j=(0,a.useDesignStyles)(u.default.tab_right,"tab_right"),Q=(0,a.useDesignStyles)(u.default.close_tab,"close_tab"),G=(0,a.useDesignStyles)(u.default.kt_editor_close_icon,"kt_editor_close_icon"),Z=(0,a.useDesignStyles)(u.default.kt_editor_tabs_content,"kt_editor_tabs_content"),$=(0,a.useDesignStyles)(u.default.kt_editor_tabs_current_last,"kt_editor_tabs_current_last"),V=(0,a.useDesignStyles)(u.default.kt_editor_tab,"kt_editor_tab"),H=(0,a.useDesignStyles)(u.default.kt_editor_tab_current_prev,"kt_editor_tab_current_prev"),K=(0,a.useDesignStyles)(u.default.kt_editor_tab_current_next,"kt_editor_tab_current_next"),Y=(0,a.useDesignStyles)(u.default.kt_editor_tab_current,"kt_editor_tab_current"),X=(0,a.useDesignStyles)(u.default.kt_editor_tab_dirty,"kt_editor_tab_dirty"),oe=(0,a.useDesignStyles)(u.default.kt_editor_tabs,"kt_editor_tabs"),ie=(0,a.useDesignStyles)(u.default.kt_editor_tabs_scroll_wrapper,"kt_editor_tabs_scroll_wrapper"),[he,me]=(0,o.useState)({}),[q,Ee]=(0,o.useState)(!!F.get("editor.wrapTab")),[ue,te]=(0,o.useState)(new Map),[fe,Ie]=(0,o.useState)(),Me=(0,o.useMemo)(()=>(0,a.getSlotLocation)(c,O.layoutConfig),[]),Be=o.default.useMemo(()=>{var Ae,Ue;const Ye=(Ue=(Ae=W.getComponentRegistryInfo(l.TabbarRightExtraContentId))===null||Ae===void 0?void 0:Ae.views)===null||Ue===void 0?void 0:Ue[0];if(Ye)return Ye},[]);(0,f.useUpdateOnGroupTabChange)(A),(0,s.useUpdateOnEventBusEvent)(l.ResourceDidUpdateEvent,[A.resources],Ae=>!!I&&A.resources.findIndex(Ue=>Ue.uri.isEqual(Ae))!==-1),(0,o.useEffect)(()=>{const Ae=new a.Disposable;return Ae.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}))})),Ae.addDispose(A.onDidEditorGroupTabChanged(()=>{q||we()})),()=>{Ae.dispose()}},[A]);const Pe=(0,o.useCallback)((Ae,Ue,Ye)=>{if(Ae.dataTransfer.getData("uri")){const Ke=new a.URI(Ae.dataTransfer.getData("uri"));let mt;Ae.dataTransfer.getData("uri-source-group")&&(mt=x.getEditorGroup(Ae.dataTransfer.getData("uri-source-group"))),A.dropUri(Ke,E.DragOverPosition.CENTER,mt,Ye)}Ae.dataTransfer.files.length>0&&M.fire(new E.EditorGroupFileDropEvent({group:A,tabIndex:Ue,files:Ae.dataTransfer.files}))},[A]),we=(0,o.useCallback)(()=>{a.fastdom.measure(()=>{try{if(S.current&&A.currentResource){const Ae=S.current.querySelector("."+u.default.kt_editor_tab+"[data-uri='"+A.currentResource.uri.toString()+"']");Ae&&Ae.scrollIntoView({block:"nearest",inline:"nearest"})}}catch{}})},[A,S.current]),_e=(0,o.useCallback)(()=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{a.fastdom.measure(()=>{var Ae;const Ue=(Ae=T.current)===null||Ae===void 0?void 0:Ae.offsetWidth;Ue!==fe&&Ie(Ue)})},200)},[T.current,w.current,fe]);(0,o.useEffect)(()=>{q||queueMicrotask(()=>{we()})},[q,S.current]),(0,o.useEffect)(()=>{if(!q){const Ae=new a.Disposable;return S.current&&Ae.addDispose(new a.DomListener(S.current,"mousewheel",b)),Ae.addDispose(M.onDirective(a.ResizeEvent.createDirective(Me),()=>{we()})),Ae.addDispose(M.onDirective(E.GridResizeEvent.createDirective(A.grid.uid),()=>{we()})),()=>{Ae.dispose()}}},[q]);const Ne=(0,o.useCallback)(()=>{a.fastdom.measureAtNextFrame(()=>{if(I.current&&q){const Ae=new Map;let Ue,Ye;const Ke=Array.from(I.current.children);Ke.pop(),Ke.forEach(mt=>{mt.offsetTop!==Ue&&(Ue=mt.offsetTop,Ye&&Ae.set(Ke.indexOf(Ye),!0)),Ye=mt,Ae.set(Ke.indexOf(mt),!1)}),te(Ae)}})},[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 Ae=new a.DisposableCollection;return Ae.push(M.onDirective(a.ResizeEvent.createDirective(Me),()=>{Ne()})),Ae.push(F.onPreferenceChanged(Ue=>{Ue.preferenceName==="editor.wrapTab"&&Ee(!!Ue.newValue)})),Ae.push(x.onDidCurrentEditorGroupChanged(()=>{_e()})),Ae.push(a.Event.debounce(a.Event.filter(L.onDidChangeMenu,Ue=>Ue===_.MenuId.EditorTitle),()=>{},200)(()=>{_e()})),()=>{Ae.dispose()}},[]),(0,o.useEffect)(()=>{const Ae=new a.DisposableCollection;return Ae.push(A.onDidEditorFocusChange(()=>{_e()})),()=>{Ae.dispose()}},[A]);const Te=(0,o.useCallback)(Ae=>{Ae.preventDefault(),Ae.stopPropagation(),D.current&&D.current.classList.add(u.default.kt_on_drag_over)},[D.current]),We=(0,o.useCallback)(Ae=>{D.current&&D.current.classList.remove(u.default.kt_on_drag_over)},[D.current]),pe=(0,o.useCallback)(Ae=>{D.current&&D.current.classList.remove(u.default.kt_on_drag_over),Pe&&Pe(Ae,-1)},[Pe,D.current]),re=(0,o.useCallback)(Ae=>{Ae.target===Ae.currentTarget&&x.createUntitledResource()},[x]),ge=o.default.useCallback((Ae,Ue)=>{const Ye=R.getResourceDecoration(Ae.uri),Ke=R.getResourceSubname(Ae,A.resources);return B.renderEditorTab(o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:he[Ae.uri.toString()]?"loading_indicator":(0,r.default)(Ae.icon)}," "),o.default.createElement("div",{tabIndex:0,role:"tab","aria-selected":Ue?"true":"false"},Ae.name),Ke?o.default.createElement("div",{className:u.default.subname},Ke):null,Ye.readOnly?o.default.createElement("span",{className:(0,r.default)((0,a.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:mt=>{mt.stopPropagation(),A.close(Ae.uri)}},B.renderTabCloseComponent(o.default.createElement("div",{className:(0,r.default)((0,a.getIcon)("close"),G),tabIndex:0,role:"button","aria-label":(0,g.formatLocalize)("editor.closeTab.title",Ae.name)}))))),Ue)},[B]),De=()=>{const Ae=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]:Ae,[$]:Ue===A.resources.length-1}),ref:I,role:"tablist"},A.resources.map((Ye,Ke)=>{let mt;const _t=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]:ue.get(Ke),[H]:Ue-1===Ke,[K]:Ue+1===Ke,[Y]:A.currentResource===Ye,[u.default.kt_editor_tab_preview]:A.previewURI&&A.previewURI.isEqual(Ye.uri),[X]:_t.dirty}),style:q&&Ke===A.resources.length-1?{marginRight:fe,height:U.editorTabsHeight}:{height:U.editorTabsHeight},onContextMenu:Mt=>{k.show(Mt.nativeEvent.x,Mt.nativeEvent.y,Ye&&Ye.uri,A),Mt.preventDefault()},key:Ye.uri.toString(),onMouseUp:Mt=>{Mt.nativeEvent.button===a.MouseEventButton.Middle&&(Mt.preventDefault(),Mt.stopPropagation(),A.close(Ye.uri))},onMouseDown:Mt=>{Mt.nativeEvent.button===a.MouseEventButton.Left&&A.open(Ye.uri,{focus:!0})},"data-uri":Ye.uri.toString(),onDragOver:Mt=>{Mt.preventDefault(),Mt.stopPropagation(),mt&&mt.classList.add(u.default.kt_on_drag_over)},onDragLeave:Mt=>{mt&&mt.classList.remove(u.default.kt_on_drag_over)},onDrop:Mt=>{mt&&mt.classList.remove(u.default.kt_on_drag_over),Pe&&Pe(Mt,Ke,Ye)},onDoubleClick:Mt=>{A.pinPreviewed(Ye.uri)},ref:Mt=>mt=Mt,onDragStart:Mt=>{Mt.dataTransfer.setData("uri",Ye.uri.toString()),Mt.dataTransfer.setData("uri-source-group",A.name)}},ge(Ye,A.currentResource===Ye))}))};return o.default.createElement("div",{id:m.VIEW_CONTAINERS.EDITOR_TABS,className:oe},o.default.createElement("div",{className:ie,ref:D,onDragOver:Te,onDragLeave:We,onDrop:pe,onDoubleClick:re},q?o.default.createElement("div",{className:u.default.kt_editor_wrap_container},De()):o.default.createElement(h.Scroll,{forwardedRef:Ae=>Ae?S.current=Ae:null,className:u.default.kt_editor_tabs_scroll},De())),o.default.createElement(t.EditorActions,{className:(0,r.default)({[u.default.kt_editor_wrap_mode_action]:q}),ref:T,group:A}),(0,a.renderView)(Be))};t.Tabs=y,t.EditorActions=(0,o.forwardRef)((A,S)=>{const D=(0,a.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)(l.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 a.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(p.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 a extends r.BasicEvent{}t.RegisterEditorComponentResolverEvent=a;class p extends r.BasicEvent{}t.RegisterEditorComponentEvent=p;class v{}t.EditorComponentRegistry=v,t.BrowserEditorContribution=Symbol("BrowserEditorContribution"),t.MultiDiffSourceContribution=Symbol("MultiDiffSourceContribution");class m extends r.BasicEvent{static createDirective(x){return`grid-resize-${x}`}}t.GridResizeEvent=m;class _ extends r.BasicEvent{}t.EditorGroupOpenEvent=_;class s extends r.BasicEvent{}t.EditorGroupCloseEvent=s;class g extends r.BasicEvent{}t.EditorGroupDisposeEvent=g;class l extends r.BasicEvent{}t.EditorGroupChangeEvent=l;class h extends r.BasicEvent{}t.EditorActiveResourceStateChangedEvent=h;class u extends r.BasicEvent{}t.EditorGroupFileDropEvent=u,t.IEditorDecorationCollectionService=Symbol("IEditorDecorationCollectionService");class d extends r.BasicEvent{}t.EditorSelectionChangeEvent=d;class E extends r.BasicEvent{}t.EditorVisibleChangeEvent=E;class f extends r.BasicEvent{}t.EditorConfigurationChangedEvent=f;class c extends r.BasicEvent{}t.EditorGroupIndexChangedEvent=c;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),a=e(41869),p=e(72665),v=e(51500),m=e(23418),_=e(96689);let s=n=class{constructor(){this._id=1}async update(){this._id=await this.getLatestUnitiedIndex()}async getLatestUnitiedIndex(u){var d;await this.workspaceService.whenReady;const c=(u||((d=this.workspaceService.workspace)===null||d===void 0?void 0:d.children)||[]).filter(y=>a.URI.file(y.uri).displayName.startsWith(n.UNTITLED_FILE_NAME_PREFIX)).map(y=>{const b=a.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 c.length>0?Math.max(...c)+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 a.Emitter,this.onDidChangeContent=this._onDidChangeContent.event}handlesScheme(u){return u===a.Schemes.untitled}async provideEncoding(u){return this.preferenceService.get("files.encoding",void 0,u.toString(),(0,a.getLanguageIdFromMonaco)(u))||"utf8"}async provideEOL(u){const d=await this.applicationService.getBackendOS(),E=this.preferenceService.get("files.eol","auto",u.toString(),(0,a.getLanguageIdFromMonaco)(u));return E!=="auto"?E:d===a.OperatingSystem.Windows?`\r
31969
31969
  `:`
31970
31970
  `}async provideEditorDocumentModelContent(u,d){return""}isReadonly(u){return!1}isAlwaysDirty(u){return!0}disposeEvenDirty(u){return!0}closeAutoSave(u){return!0}async saveDocumentModel(u,d,E,f,c,y=!1){const{name:b}=u.getParsedQuery(),A=u.path.toString()!=="/"?a.path.dirname(u.path.toString()):this.appConfig.workspaceDir,S=await this.commandService.tryExecuteCommand("file.save",{showNameInput:!0,defaultFileName:b||u.displayName,defaultUri:a.URI.file(a.isWindows?A.replaceAll("\\","/"):A)});return S&&(await this.editorDocumentModelService.saveEditorDocumentModel(S,d,E,f,c,y),await this.workbenchEditorService.open(S,{preview:!1,focus:!0,replace:!0,forceClose:!0})),{state:a.SaveTaskResponseState.SUCCESS}}onDidDisposeModel(){}};t.UntitledSchemeDocumentProvider=g,r.__decorate([(0,o.Autowired)(_.IEditorDocumentModelService),r.__metadata("design:type",Object)],g.prototype,"editorDocumentModelService",void 0),r.__decorate([(0,o.Autowired)(m.WorkbenchEditorService),r.__metadata("design:type",m.WorkbenchEditorService)],g.prototype,"workbenchEditorService",void 0),r.__decorate([(0,o.Autowired)(a.CommandService),r.__metadata("design:type",Object)],g.prototype,"commandService",void 0),r.__decorate([(0,o.Autowired)(a.AppConfig),r.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),r.__decorate([(0,o.Autowired)(a.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)(a.PreferenceService),r.__metadata("design:type",Object)],g.prototype,"preferenceService",void 0),t.UntitledSchemeDocumentProvider=g=r.__decorate([(0,o.Injectable)()],g);let l=class extends a.WithEventBus{constructor(){super(...arguments),this.scheme=a.Schemes.untitled}provideResource(u){const{name:d}=u.getParsedQuery();return{name:d||u.displayName,uri:u,icon:"",metadata:null}}async shouldCloseResourceWithoutConfirm(u){const d=this.documentModelService.getModelDescription(u.uri,"close-resource-check");return!!(d&&d.dirty)}async close(u,d){const E=this.documentModelService.getModelReference(u.uri,"close-resource-check");if(!E)return!1;if(d===m.AskSaveResult.SAVE){const f=await E.instance.save();return E.dispose(),f}else return d===m.AskSaveResult.REVERT?(await E.instance.revert(),E.dispose(),!0):!d||d===m.AskSaveResult.CANCEL?(E.dispose(),!1):(E.dispose(),!0)}async shouldCloseResource(u){const d=this.documentModelService.getModelDescription(u.uri,"close-resource-check");if(!d||!d.dirty)return!0;const E={[(0,a.localize)("file.prompt.dontSave","Don't Save")]:m.AskSaveResult.REVERT,[(0,a.localize)("file.prompt.save","Save")]:m.AskSaveResult.SAVE,[(0,a.localize)("file.prompt.cancel","Cancel")]:m.AskSaveResult.CANCEL},f=await this.dialogService.open({message:(0,a.formatLocalize)("saveChangesMessage",u.name),type:a.MessageType.Info,buttons:Object.keys(E)});return await this.close(u,E[f])}};t.UntitledSchemeResourceProvider=l,r.__decorate([(0,o.Autowired)(p.IDialogService),r.__metadata("design:type",Object)],l.prototype,"dialogService",void 0),r.__decorate([(0,o.Autowired)(_.IEditorDocumentModelService),r.__metadata("design:type",Object)],l.prototype,"documentModelService",void 0),t.UntitledSchemeResourceProvider=l=r.__decorate([(0,o.Injectable)()],l)},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),a=e(23418),p=e(96689),v=m=>{const _=r.default.useRef(),s=(0,o.useInjectable)(a.EditorCollectionService),g=(0,o.useInjectable)(p.IEditorDocumentModelService),[l,h]=r.default.useState(void 0),[u,d]=r.default.useState(void 0),[E,f]=r.default.useState(void 0),[c,y]=r.default.useState(void 0);let b=!1;return r.default.useEffect(()=>{if(_.current){l&&l.dispose();const A=s.createCodeEditor(_.current,{automaticLayout:!0,...m.options});h(A),u&&A.open(u)}return()=>{b=!0,l&&l.dispose(),u&&u.dispose()}},[_.current]),m&&l&&m.editorRef&&m.editorRef(l),E&&c!==E&&(y(E),g.createModelReference(new o.URI(E),"editor-react-component").then(A=>{u&&u.dispose(),!b&&A.instance.uri.toString()===E?d(A):A.dispose()})),u&&l&&l.currentDocumentModel!==u.instance&&l.open(u),m.uri&&m.uri.toString()!==E&&f(m.uri.toString()),r.default.createElement("div",{ref:A=>A&&(_.current=A),...m})};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),a=e(43718),p=e(76835);let v=class{contribute(_){const s=new o.DisposableCollection,g=_.monacoEditor.getContribution(p.SuggestController.ID);if(g&&g.widget&&g.widget.value){const l=g.widget.value;s.push(l.onDidSelect(h=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidSelect",data:h}))})),s.push(l.onDidHide(h=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidHide",data:h}))})),s.push(l.onDidShow(h=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidShow",data:h}))})),s.push(l.onDidFocus(h=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidFocus",data:h}))})),l&&l._setDetailsVisible&&l._setDetailsVisible(this.preferenceService.get("editor.suggest.details.visible",!0))}return s}};t.EditorSuggestWidgetContribution=v,n.__decorate([(0,r.Autowired)(a.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),a=e(91830),p=e(75524),v=e(43718),m=e(14951),_=n.__importStar(e(20868)),s=e(72665),g=e(50189),l=e(23418),h=e(96689),u=e(76759),d=e(47049),E=e(82196),f=e(17878),c=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:l.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 a.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 d.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,c).map(L=>L.resource.name).join("\u3001");R.length>c&&(R.length-c===1?x+=(0,v.localize)("file.prompt.more.one"):x+=(0,v.formatLocalize)("file.prompt.more.number",R.length-c));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)(l.ResourceService),n.__metadata("design:type",l.ResourceService)],b.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(m.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 a.ResourceContextKey(this.contextKeyService,R=>T(R)),this._diffResourceContextKey=new a.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===l.EditorGroupSplitAction.Left||w===l.EditorGroupSplitAction.Right?d.SplitDirection.Horizontal:d.SplitDirection.Vertical,L=w===l.EditorGroupSplitAction.Left||w===l.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 _.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 _.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=p.MergeEditorInputData.from(M),F=p.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,l.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=l.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=l.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",l.EditorCollectionService)],A.prototype,"collectionService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",l.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)(l.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)(l.ResourceDecorationChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[l.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 a=o.text,p=o.range.startLineNumber,v=o.range.startColumn,m=o.range.endLineNumber,_=o.range.endColumn;return[a,p,v,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 a=e(20868);Object.defineProperty(t,"ShowLightbulbIconMode",{enumerable:!0,get:function(){return a.ShowLightbulbIconMode}});var p;(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"})(p||(t.EditorType=p={}));let v=class{};t.EditorCollectionService=v,t.EditorCollectionService=v=n.__decorate([(0,r.Injectable)()],v);class m extends o.BasicEvent{}t.CollectionEditorsUpdateEvent=m;class _ extends o.BasicEvent{}t.DidChangeEditorGroupUriEvent=_;class s extends o.BasicEvent{}t.DidApplyEditorDecorationFromProvider=s;class g{}t.WorkbenchEditorService=g;var l;(function(S){S[S.Left=1]="Left",S[S.Center=2]="Center",S[S.Right=4]="Right",S[S.Full=7]="Full"})(l||(t.OverviewRulerLane=l={}));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 d;(function(S){S.LEFT="left",S.RIGHT="right",S.TOP="top",S.BOTTOM="bottom",S.CENTER="center"})(d||(t.DragOverPosition=d={}));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 c;(function(S){S[S.Manual=1]="Manual",S[S.AfterDelay=2]="AfterDelay",S[S.FocusOut=3]="FocusOut"})(c||(t.SaveReason=c={}));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=a,t.asRelatedInformations=p,t.asRelatedInformation=v,t.asMonacoDiagnostics=m,t.asMonacoDiagnostic=_;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 a(s){return s===1?n.MarkerSeverity.Error:s===2?n.MarkerSeverity.Warning:s===3?n.MarkerSeverity.Info:n.MarkerSeverity.Hint}function p(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 m(s){if(s)return s.map(g=>_(g))}function _(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:a(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:p(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,a,p){if(this.originalUri=r,this.modifiedUri=o,this.goToFileUri=a,this.contextKeys=p,!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=_;const n=e(43718);class r{}t.ResourceService=r;class o extends n.BasicEvent{}t.ResourceNeedUpdateEvent=o;class a extends n.BasicEvent{}t.ResourceDidUpdateEvent=a;class p extends n.BasicEvent{}t.ResourceRemoveEvent=p;class v extends n.BasicEvent{}t.ResourceDecorationChangeEvent=v;class m extends n.BasicEvent{}t.ResourceDecorationNeedChangeEvent=m,t.DIFF_SCHEME="diff";function _(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),a=e(30144);Object.defineProperty(t,"EXPLORER_CONTAINER_ID",{enumerable:!0,get:function(){return a.EXPLORER_CONTAINER_ID}});const p=e(21634),v=e(68456),m=e(43718);let _=class{registerComponent(g){g.register("@opensumi/ide-explorer",[],{iconClass:(0,o.getIcon)("explorer"),title:(0,o.localize)("explorer.title"),priority:10,containerId:a.EXPLORER_CONTAINER_ID,activateKeyBinding:"ctrlcmd+shift+e"})}onStart(){this.extensionsSchemaService.appendExtensionPoint(["browserViews","properties"],{extensionPoint:a.EXPLORER_CONTAINER_ID,frameworkKind:["opensumi"],jsonSchema:{...p.browserViews.properties,description:(0,o.formatLocalize)("sumiContributes.browserViews.location.custom",(0,o.localize)("explorer.title"))}})}};t.ExplorerContribution=_,n.__decorate([(0,r.Autowired)(m.IExtensionsSchemaService),n.__metadata("design:type",Object)],_.prototype,"extensionsSchemaService",void 0),t.ExplorerContribution=_=n.__decorate([(0,o.Domain)(o.ClientAppContribution,v.ComponentContribution)],_)},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),a=e(32595);let p=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[a.ExplorerContribution]}};t.ExplorerModule=p,t.ExplorerModule=p=n.__decorate([(0,r.Injectable)()],p)},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),a=e(32242),p=e(90242);let v=class{registerStaticResolver(_){_.registerStaticResourceProvider({scheme:o.Schemes.file,resolveStaticResource:s=>{const g=new o.URI(this.appConfig.staticServicePath||p.EXPRESS_SERVER_PATH),[l,h]=s.codeUri.path.split("?");return g.resolve(`assets${decodeURIComponent(l)}`).withQuery(h)},roots:[this.appConfig.staticServicePath||p.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)(a.StaticResourceContribution)],v)},98885:(P,t,e)=>{"use strict";var n;n={value:!0},t.Q=void 0;const r=e(85608),o=e(76003),a=e(41869),p=e(18531);let v=class extends a.BrowserModule{constructor(){super(...arguments),this.providers=[p.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),a=e(68974),p=e(95422),v=e(43718),m=e(93374),_=e(29150),s=n.__importDefault(e(40769));var g;(function(u){u.details="Details",u.changelog="ChangeLog",u.deps="Dependencies"})(g||(g={}));const l=[g.details,g.changelog,g.deps],h=({resource:u})=>{var d,E,f,c,y,b,A,S,D,I,w,T,R,M,O,x,k,F,L,B,U,W,j,Q,G;const Z=(0,p.useInjectable)(_.VSXExtensionServiceToken),[$,V]=(0,r.useState)(!0),[H,K]=(0,r.useState)(((d=u.metadata)===null||d===void 0?void 0:d.state)===_.InstallState.INSTALLED?4:0),[Y,X]=(0,r.useState)(g.details),[oe,ie]=(0,r.useState)({}),he=(0,r.useCallback)(te=>{const fe=l[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 Ie=["readme","changelog"].map(Pe=>{var we,_e;const Ne=(we=fe.files)===null||we===void 0?void 0:we[Pe];return Ne?fetch(Ne).then(Te=>Te.text()):(_e=fe[Pe])!==null&&_e!==void 0?_e:""}),[Me,Be]=await Promise.all(Ie);ie({readme:Me,changelog:Be,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]),Ee=(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 ue=(0,r.useMemo)(()=>{var te,fe,Ie;const Me=[];if(((te=u.metadata)===null||te===void 0?void 0:te.state)!==_.InstallState.NOT_INSTALLED)if(H!==3)Me.push(r.default.createElement(o.Button,{size:"small",key:"uninstall",onClick:Ee,disabled:H===2},(0,v.localize)(H===2?"marketplace.extension.uninstalling":"marketplace.extension.uninstall")));else return Me.push(r.default.createElement(o.Button,{size:"small",key:"uninstalled",disabled:!0},(0,v.localize)("marketplace.extension.uninstalled"))),Me;return((fe=u.metadata)===null||fe===void 0?void 0:fe.state)===_.InstallState.NOT_INSTALLED?H===4?Me.push(r.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,v.localize)("marketplace.extension.installed"))):Me.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"))):((Ie=u.metadata)===null||Ie===void 0?void 0:Ie.state)===_.InstallState.SHOULD_UPDATE?H===4?Me.push(r.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,v.localize)("marketplace.extension.installed"))):Me.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"))):Me.push(r.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,v.localize)("marketplace.extension.installed"))),Me},[u,H]);return r.default.createElement("div",{className:s.default.extension_overview_container},r.default.createElement(a.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)((c=u.metadata)===null||c===void 0?void 0:c.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)||oe.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},ue))),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&&oe.readme&&r.default.createElement(m.Markdown,{content:oe.readme}),Y===g.changelog&&oe.changelog&&r.default.createElement(m.Markdown,{content:oe.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),a=e(41869),p=e(43718),v=e(29150),m=n.__importDefault(e(90425));var _;(function(s){s[s.MARKETPLACE=0]="MARKETPLACE",s[s.INSTALLED=1]="INSTALLED"})(_||(t.ExtensionViewType=_={})),t.Extension=r.default.memo(({extension:s,onInstall:g,onClick:l,type:h,installedExtensions:u,openVSXRegistry:d})=>{const E=(0,a.useDesignStyles)(m.default.extension_item,"extension_item"),[f,c]=(0,r.useState)(),y=u?.find(T=>T.namespace===s.namespace&&T.name===s.name),b=!!(h===_.INSTALLED||y),A=b&&h===_.MARKETPLACE&&y?.version!==s.version,[S,D]=(0,r.useState)(b),I=(0,r.useCallback)(T=>{T.stopPropagation(),c(!0),g(s).then(()=>{c(!1),D(!0)})},[s]),w=(0,r.useCallback)(()=>{l(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:m.default.icon,src:s.iconUrl,alt:(0,p.replaceLocalizePlaceholder)(s.displayName,`${s.publisher}.${s.name}`)}):r.default.createElement("div",{className:m.default.default_icon},r.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("extension")})),r.default.createElement("div",{className:m.default.extension_detail},r.default.createElement("div",{className:m.default.base_info},r.default.createElement("span",{className:m.default.display_name},(0,p.replaceLocalizePlaceholder)(s.displayName,`${s.publisher}.${s.name}`)||s.name),r.default.createElement("span",{className:m.default.version},s.version),!S&&r.default.createElement("span",{className:m.default.download_count},r.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("download")}),s.downloadCount)),r.default.createElement("span",{className:m.default.description},(0,p.replaceLocalizePlaceholder)(s.description,`${s.publisher}.${s.name}`)),r.default.createElement("div",{className:m.default.footer},r.default.createElement("span",{className:m.default.namespace},s.namespace),h===_.MARKETPLACE&&(b?A?r.default.createElement(o.Button,{type:"primary",size:"small",onClick:I,disabled:f},(0,p.localize)(f?"marketplace.extension.updating":"marketplace.extension.update")):r.default.createElement("span",{className:m.default.state_text},(0,p.localize)("marketplace.extension.installed")):r.default.createElement(o.Button,{type:"primary",size:"small",onClick:I,disabled:f},(0,p.localize)(f?"marketplace.extension.installing":"marketplace.extension.install"))),h===_.INSTALLED&&r.default.createElement(o.Button,{type:"primary",size:"small",onClick:I,disabled:!0},(0,p.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),a=e(29150),p=e(70274),v=e(67761);let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[p.VSXExtensionContribution,{token:a.VSXExtensionServiceToken,useClass:v.VSXExtensionService}],this.backServices=[{servicePath:a.VSXExtensionServicePath}]}};t.OpenVsxExtensionManagerModule=m,t.OpenVsxExtensionManagerModule=m=n.__decorate([(0,r.Injectable)()],m)},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),a=e(43718),p=e(57517),v=e(63067),m=e(52416),_=e(29150),s=e(21082),g=e(6449),l=e(73689);let h=class{initialize(){}onDidRender(){const d=this.mainLayoutService.getTabbarHandler(s.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID);d&&(d.isActivated()?this.vsxExtensionService.getOpenVSXRegistry().then(()=>{this.vsxExtensionService.search("")}):d.onActivate(async()=>{!this.vsxExtensionService.openVSXRegistry&&await this.vsxExtensionService.getOpenVSXRegistry(),this.vsxExtensionService.search("")}))}registerResource(d){d.registerResourceProvider({scheme:s.EXTENSION_SCHEME,provideResource:async E=>{const{extensionId:f,state:c}=E.getParsedQuery(),y=await this.vsxExtensionService.getLocalExtension(f),b=this.iconService.fromIcon("",y?.iconUrl,m.IconType.Background);return{uri:E,metadata:{...y,extensionId:f,state:c,openVSXRegistry:this.vsxExtensionService.openVSXRegistry},icon:b||(0,o.getIcon)("extension"),name:(0,a.replaceLocalizePlaceholder)(y?.displayName,f)||""}}})}registerEditorComponent(d){const E=`${s.EXTENSION_SCHEME}_detail`;d.registerEditorComponent({component:g.ExtensionOverview,uid:E,scheme:s.EXTENSION_SCHEME}),d.registerEditorComponentResolver(s.EXTENSION_SCHEME,(f,c,y)=>{y?.([{type:p.EditorOpenType.component,componentId:E}])})}registerComponent(d){d.register("@opensumi/ide-extension-manager",[],{iconClass:(0,o.getIcon)("extension"),title:(0,a.localize)("marketplace.extension.container"),priority:5,containerId:s.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID,component:l.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)(_.VSXExtensionServiceToken),n.__metadata("design:type",Object)],h.prototype,"vsxExtensionService",void 0),n.__decorate([(0,r.Autowired)(m.IIconService),n.__metadata("design:type",Object)],h.prototype,"iconService",void 0),t.VSXExtensionContribution=h=n.__decorate([(0,a.Domain)(o.ClientAppContribution,v.MainLayoutContribution,o.ComponentContribution,p.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),a=e(57517),p=e(98453),v=e(71354),m=e(28423),_=e(52416),s=e(12456),g=e(29150);let l=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,m.observableValue)(this,[]),this.installedExtensionsObservable=(0,m.observableValue)(this,[]),this.openVSXRegistryObservable=(0,m.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 d=(0,o.localize)("marketplace.extension.installing"),E={text:d,alignment:o.StatusBarAlignment.RIGHT,tooltip:d,iconClass:"kaitian-icon kticon-cloud-server"};this.installStatus=this.statusBarService.addElement(u,E)}}async install(u){var d,E;const f=this.getExtensionId(u);if(this.tasks.has(f)||!u.downloadUrl)return;const c=this.backService.install({id:f,name:(d=u.name)!==null&&d!==void 0?d:"-",url:u.downloadUrl,version:(E=u.version)!==null&&E!==void 0?E:"-"});return this.tasks.set(f,c),this.updateStatusBar(),c.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 d,E,f;return(d=u?.extensionId)!==null&&d!==void 0?d:((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 d={extensionId:u},E=await this.backService.getExtension(d);if(E&&E.extensions&&E.extensions.length>=1)return Object.assign({},E.extensions[0])}async getOpenVSXRegistry(){const u=await this.backService.getOpenVSXRegistry();(0,m.transaction)(d=>{this.openVSXRegistryObservable.set(u,d)})}async openExtensionEditor(u,d){this.workbenchEditorService.open(new o.URI(`extension://?extensionId=${u}&state=${d}`),{preview:!0})}async search(u){const d={query:u,size:50,sortBy:"downloadCount"};this.searchValue=u;const E=await this.backService.search(d);E.extensions&&(0,m.transaction)(f=>{this.extensionsObservable.set(E.extensions.filter(c=>!this.installedExtensions.find(y=>this.getExtensionId(y)===this.getExtensionId(c))).map(c=>({...c,publisher:c.namespace,iconUrl:c.files.icon,downloadUrl:c.files.download,readme:c.files.readme})),f)})}async searchInstalledExtensions(u){(0,m.transaction)(d=>{const E=this.installedExtensions;this.installedExtensionsObservable.set(E.sort((f,c)=>{const y=(0,o.fuzzyScore)(u,u.toLowerCase(),0,f.name,f.name.toLowerCase(),0,!0),b=(0,o.fuzzyScore)(u,u.toLowerCase(),0,c.name,c.name.toLowerCase(),0,!0);return y?b?b[0]-y[0]:-1:1}),d)})}getInstalledExtensions(){const u=this.extensionInstanceService.getExtensionInstances().map(d=>{const E=d.extensionId;return{namespace:E&&E.includes(".")?E.split(".")[0]:d.packageJSON.publisher,name:d.packageJSON.name,id:d.extensionId,version:d.packageJSON.version,displayName:d.packageJSON.displayName,description:d.packageJSON.description,publisher:d.packageJSON.publisher,iconUrl:d.packageJSON.icon&&d.extensionLocation.toString()+`/${d.packageJSON.icon}`,path:d.path,realpath:d.realPath}});(0,m.transaction)(d=>{this.installedExtensionsObservable.set(u,d)})}};t.VSXExtensionService=l,n.__decorate([(0,r.Autowired)(g.VSXExtensionServicePath),n.__metadata("design:type",Object)],l.prototype,"backService",void 0),n.__decorate([(0,r.Autowired)(a.WorkbenchEditorService),n.__metadata("design:type",a.WorkbenchEditorService)],l.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(v.AbstractExtInstanceManagementService),n.__metadata("design:type",v.AbstractExtInstanceManagementService)],l.prototype,"extensionInstanceService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",p.ExtensionManagementService)],l.prototype,"extensionManagementService",void 0),n.__decorate([(0,r.Autowired)(_.IThemeService),n.__metadata("design:type",Object)],l.prototype,"themeService",void 0),n.__decorate([(0,r.Autowired)(_.IIconService),n.__metadata("design:type",Object)],l.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(_.IProductIconService),n.__metadata("design:type",Object)],l.prototype,"productIconService",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],l.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.IStatusBarService),n.__metadata("design:type",Object)],l.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)],l.prototype,"search",null),t.VSXExtensionService=l=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],l)},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)),a=e(14041),p=e(97267),v=e(41869),m=e(68974),_=e(43718),s=e(5567),g=e(29150),l=e(21082),h=e(87791),u=n.__importDefault(e(68143)),d=[g.TabActiveKey.MARKETPLACE,g.TabActiveKey.INSTALLED],E=()=>{const[f,c]=(0,a.useState)(g.TabActiveKey.MARKETPLACE),[y,b]=(0,a.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,a.useCallback)(O=>A.install(O),[]),R=(0,a.useCallback)((O,x)=>{const k=A.getExtensionId(O);A.openExtensionEditor(k,x)},[]),M=(0,a.useCallback)(O=>{const x=d[O];x&&c(x)},[]);return o.createElement("div",{className:u.default.panel},o.createElement(p.Tabs,{mini:!0,className:u.default.tabs,value:d.indexOf(f),onChange:M,tabs:[(0,_.localize)("marketplace.panel.tab.marketplace"),(0,_.localize)("marketplace.tab.installed")]}),o.createElement("div",{style:{padding:"8px"}},o.createElement(s.AutoFocusedInput,{containerId:l.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID,placeholder:(0,_.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(m.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(a){a.GLOBAL="GLOBAL",a.WORKSPACE="WORKSPACE"})(e||(t.EnableScope=e={}));var n;(function(a){a.MARKETPLACE="marketplace",a.INSTALLED="installed"})(n||(t.TabActiveKey=n={}));var r;(function(a){a.INSTALLED="INSTALLED",a.NOT_INSTALLED="NOT_INSTALLED",a.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),a=e(93584),p=e(7446),v=e(16132),m=e(10207),_=e(19227);let s=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:a.IExtensionStorageService,useClass:m.ExtensionStorageService},{token:a.IExtensionStoragePathServer,useClass:v.ExtensionStoragePathServer},{token:a.IExtensionStorageServer,useClass:p.ExtensionStorageServer},g]}};t.ExtensionStorageModule=s,t.ExtensionStorageModule=s=n.__decorate([(0,o.Domain)(_.name)],s);let g=class{onReconnect(){this.extensionStorageService.reConnectInit()}};t.ExtensionStorageContribution=g,n.__decorate([(0,r.Autowired)(a.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),a=e(43718),p=e(96405),v=e(14951),m=e(73344),_=e(51500),{Path:s}=a.path;let g=class{constructor(){this.windowsDataFolders=[a.StoragePaths.WINDOWS_APP_DATA_DIR,a.StoragePaths.WINDOWS_ROAMING_DIR],this.deferredWorkspaceStoragePath=new a.Deferred,this.deferredStoragePath=new a.Deferred,this.storagePathInitialized=!1}get workspaceSuffixName(){return this.appConfig.workspaceSuffixName||_.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,d=a.URI.file(u).toString();return await this.fileSystem.access(d)||await this.fileSystem.createFolder(d),new a.URI(h)}async provideHostStoragePath(h,u,d){const E=await this.getWorkspaceStorageDirPath(d);if(!E)throw new Error("Unable to get parent storage directory");await this.fileSystem.access(a.URI.file(E).toString())||await this.fileSystem.createFolder(a.URI.file(E).toString());const f=await this.buildWorkspaceId(h,u,d),c=new s(E).join(f).toString();await this.fileSystem.access(a.URI.file(c).toString())||await this.fileSystem.createFolder(a.URI.file(c).toString());const y=new a.URI(c);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,d){const E=await this.getUserHomeDir(),f=b=>b.resolve(d||_.WORKSPACE_USER_STORAGE_FOLDER_NAME).resolve(`${_.UNTITLED_WORKSPACE}.${this.workspaceSuffixName}`).withScheme(a.Schemes.file),c=b=>b.resolve(d||_.WORKSPACE_USER_STORAGE_FOLDER_NAME).resolve(`${_.UNTITLED_WORKSPACE}`).withScheme(a.Schemes.file);if(!h){const b=c(new a.URI(E));return this.doHash(b.toString())}if(f(new a.URI(E)).toString()===h.uri){const b=u.map(A=>A.uri).sort().join(",");return this.doHash(b)}else{const b=new a.URI(h.uri);return this.doHash(b.toString())}}async getLogsDirPath(){const h=await this.loggerManager.getLogFolder();return new s(h).join(a.StoragePaths.EXTENSIONS_LOGS_DIR).toString()}async getWorkspaceStorageDirPath(h){const u=await this.getWorkspaceDataDirPath(h);return new s(u).join(a.StoragePaths.EXTENSIONS_WORKSPACE_STORAGE_DIR).toString()}async getWorkspaceDataDirPath(h){const u=await this.getUserHomeDir(),d=h;return new s(u).join(...a.isWindows?this.windowsDataFolders:[""],d).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)(m.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)(p.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),a=e(43718),p=e(14951),v=e(93584),{Path:m}=a.path;let _=n=class{constructor(){this.deferredWorkspaceDataDirPath=new a.Deferred,this.storageThrottler=new a.Throttler,this.storageTasks={},this.storageExistPromises=new Map}async init(g,l,h){return this.storageDelayer=new a.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),await this.setupDirectories(g,l,h||v.DEFAULT_EXTENSION_STORAGE_DIR_NAME)}async asAccess(g,l){if(l)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,l,h){const u=await this.extensionStoragePathsServer.getWorkspaceDataDirPath(h),d=a.URI.file(u).toString();await this.fileSystem.access(d)||await this.fileSystem.createFolder(d),this.workspaceDataDirPath=u,this.globalDataPath=new m(this.workspaceDataDirPath).join(a.StoragePaths.EXTENSIONS_GLOBAL_STORAGE_DIR).toString();const E=a.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(),c=await this.extensionStoragePathsServer.provideHostStoragePath(g,l,h);return{logUri:f.codeUri,storageUri:c.codeUri,globalStorageUri:a.Uri.file(this.globalDataPath)}}async resolveStorageTask(g){const l=Object.keys(g);for(const h of l){const u=await this.readFromFile(h);for(const{key:d,value:E}of g[h])E===void 0||(0,a.isEmptyObject)(E)?delete u[d]:u[d]=E;await this.writeToFile(h,u)}}doSet(){const g={...this.storageTasks};return this.storageTasks={},this.resolveStorageTask(g)}async set(g,l,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:l}),this.storageDelayer.trigger(()=>this.storageThrottler.queue(this.doSet.bind(this)))}async get(g,l){const h=await this.getDataPath(l);return h?(await this.readFromFile(h))[g]:{}}async getAll(g){const l=await this.getDataPath(g);return l?await this.readFromFile(l):{}}async getDataPath(g){if(this.workspaceDataDirPath===void 0&&await this.deferredWorkspaceDataDirPath.promise,g)return new m(this.globalDataPath).join("global-state.json").toString();{const l=await this.extensionStoragePathsServer.getLastWorkspaceStoragePath();return l?new m(l).join("workspace-state.json").toString():void 0}}async readFromFile(g){const l=a.URI.file(g);if(!await this.asAccess(l.toString(),!0))return{};try{const{content:u}=await this.fileSystem.readFile(l.toString());return JSON.parse(u.toString())}catch(u){return this.logger.error('Failed to parse data from "',l.toString(),'". Reason:',u),{}}}async writeToFile(g,l){const h=a.URI.file(g);await this.asAccess(h.parent.toString())||await this.fileSystem.createFolder(h.parent.toString());const d=JSON.stringify(l);let E=await this.fileSystem.getFileStat(h.toString());E||(E=await this.fileSystem.createFile(h.toString())),await this.fileSystem.setContent(E,d)}};t.ExtensionStorageServer=_,_.DEFAULT_FLUSH_DELAY=100,r.__decorate([(0,o.Autowired)(v.IExtensionStoragePathServer),r.__metadata("design:type",Object)],_.prototype,"extensionStoragePathsServer",void 0),r.__decorate([(0,o.Autowired)(p.IFileServiceClient),r.__metadata("design:type",Object)],_.prototype,"fileSystem",void 0),r.__decorate([(0,o.Autowired)(a.ILogger),r.__metadata("design:type",Object)],_.prototype,"logger",void 0),t.ExtensionStorageServer=_=n=r.__decorate([(0,o.Injectable)()],_)},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),a=e(43718),p=e(51500),v=e(93584);let m=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,l=this.appConfig.extensionStorageDirName||v.DEFAULT_EXTENSION_STORAGE_DIR_NAME;return this._extensionStoragePath=await this.extensionStorageServer.init(g,s,l),this._extensionStoragePath}async updateEnvState(){await this.get(a.firstSessionDateStorageKey,!0)===void 0&&await this.set(a.firstSessionDateStorageKey,{date:new Date().toUTCString()},!0)}set(s,g,l){return this.extensionStorageServer.set(s,g,l)}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,l=this.appConfig.extensionStorageDirName||v.DEFAULT_EXTENSION_STORAGE_DIR_NAME;return this._extensionStoragePath=await this.extensionStorageServer.init(g,s,l),this._extensionStoragePath}};t.ExtensionStorageService=m,n.__decorate([(0,r.Autowired)(v.IExtensionStorageServer),n.__metadata("design:type",Object)],m.prototype,"extensionStorageServer",void 0),n.__decorate([(0,r.Autowired)(p.IWorkspaceService),n.__metadata("design:type",Object)],m.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),t.ExtensionStorageService=m=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],m)},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),a=e(43718);let p=class{constructor(){this.eventListeners=new Map,this.collectTopicData=new a.MultiMap,this.wildCardTopics=new Set,this.activatedEventSet=new Set,this.wildCardTopics.add("workspaceContains")}getTopicsData(m){return this.collectTopicData.get(m)||[]}async fireEvent(m,_=""){this.activatedEventSet.add(JSON.stringify({topic:m,data:_}));let s;if(this.wildCardTopics.has(m)?s=this.eventListeners.get(m):this.eventListeners.has(m)?s=this.eventListeners.get(m):s=this.eventListeners.get(m+":"+_),s){const g=await Promise.allSettled(s.map(l=>this.tryRun(m,_,l)));for(const l of g)l.status==="rejected"&&this.logger.error(`fire event ${m}:${_} error: ${l.reason}`)}}addWildCardTopic(m){return this.wildCardTopics.add(m),{dispose:()=>{this.wildCardTopics.delete(m)}}}onEvent(m,_){const s=m.indexOf(":");let g,l;return s===-1?(g=m,l=""):(g=m.substr(0,s),l=m.substr(s+1)),this.addListener(g,{topic:g,data:l,execute:_})}addListener(m,_){if(this.collectTopicData.set(_.topic,_.data),this.wildCardTopics.has(m))return this.eventListeners.has(m)||this.eventListeners.set(m,[]),this.eventListeners.get(m).push(_),{dispose:()=>{const s=this.eventListeners.get(m).indexOf(_);s!==-1&&this.eventListeners.get(m).splice(s,1)}};{const s=m+":"+_.data;return this.eventListeners.has(s)||this.eventListeners.set(s,[]),this.eventListeners.get(s).push(_),{dispose:()=>{const g=this.eventListeners.get(s).indexOf(_);g!==-1&&this.eventListeners.get(s).splice(g,1)}}}}async tryRun(m,_,s){this.wildCardTopics.has(m)?(0,r.default)(s.data)(_)&&await s.execute():await s.execute()}};t.ActivationEventServiceImpl=p,n.__decorate([(0,o.Autowired)(a.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),t.ActivationEventServiceImpl=p=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],p)},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),a=e(68974),p=n.__importDefault(e(17267)),v=({style:_})=>r.default.createElement("div",{style:_||{},className:p.default.kt_extension_view},r.default.createElement(a.Progress,{loading:!0}));t.ExtensionLoadingView=v;const m=(_,s)=>r.default.createElement("div",{className:p.default.kt_extension_no_exports_view},(0,o.formatLocalize)("extension.no.view.found",_,s));t.ExtensionNoExportsView=m},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)),a=e(41869),p=e(87420),v=e(25600),m=_=>{var s;const[g,l]=o.default.useState(null),h=(0,a.useInjectable)(v.AbstractViewExtProcessService),u=(0,a.useInjectable)(p.IThemeService);o.default.useEffect(()=>{const E=new a.DisposableCollection;return u.getCurrentTheme().then(f=>l(f.type)),E.push(u.onThemeChange(f=>{f.type&&f.type!==g&&l(f.type)})),E.dispose.bind(E)},[]);const d=_.original;return o.default.createElement(d,{..._.otherProps,className:(0,r.default)((s=_.otherProps)===null||s===void 0?void 0:s.className,(0,p.getThemeTypeSelector)(g)),getContainer:()=>h.getPortalShadowRoot(_.extensionId)})};t.PortalRoot=m},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)),a=e(97267),p=e(41869),v=e(25918),m=e(93899),_=e(95422),s=e(69589),g=e(42912),l=n.__importDefault(e(50790)),h=({item:u,onClick:d,onChange:E,onContextMenu:f,itemType:c,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,_.useInjectable)(g.IIconService),F=(0,p.useDesignStyles)(l.default.expansion_toggle,"expansion_toggle"),L=(0,p.useDesignStyles)(l.default.tree_view_node,"tree_view_node"),[B,U]=(0,o.useState)(u.uri&&I.getDecoration(u.uri,!1));(0,o.useEffect)(()=>{const Pe=I.onDidChangeDecorations(we=>{u.uri&&we.affectsResource(u.uri)&&U(I.getDecoration(u.uri,!1))});return()=>{Pe.dispose()}},[]);const W=(0,_.useInjectable)(g.IThemeService),j=(0,o.useCallback)(Pe=>{(c===a.TreeNodeType.TreeNode||c===a.TreeNodeType.CompositeTreeNode)&&d(Pe,u,c)},[u,c,d]),Q=(0,o.useCallback)(Pe=>{(c===a.TreeNodeType.TreeNode||c===a.TreeNodeType.CompositeTreeNode)&&(b?b(Pe,u,c):d(Pe,u,c))},[u,c,b,d]),G=(0,o.useCallback)(Pe=>{Pe.nativeEvent.which===0||!f||(c===a.TreeNodeType.TreeNode||c===a.TreeNodeType.CompositeTreeNode)&&f(Pe,u,c)},[u,c,f]),Z=(0,o.useCallback)(Pe=>{T&&T(Pe,u)},[u,T]),$=(0,o.useCallback)(Pe=>{R&&R(Pe,u)},[u,R]),V=(0,o.useCallback)(Pe=>{M&&M(Pe,u)},[u,M]),H=(0,o.useCallback)(Pe=>{O&&O(Pe,u)},[u,O]),K=(0,o.useCallback)(Pe=>{x&&x(Pe,u)},[u,x]),Y=(0,o.useCallback)(Pe=>{E(u),Pe.stopPropagation()},[u,E]),X=c===a.TreeNodeType.CompositeTreeNode,oe=X?`${S+(u.depth||0)*(y||0)}px`:`${S+(u.depth||0)*(y||0)+8}px`,ie={height:t.TREE_VIEW_NODE_HEIGHT,lineHeight:`${t.TREE_VIEW_NODE_HEIGHT}px`,paddingLeft:oe},he=(Pe,we)=>A&&A?.classlist.indexOf(l.default.mod_loading)>-1?o.default.createElement(a.Loading,null):o.default.createElement("div",{onClick:we,className:(0,r.default)(l.default.tree_view_node_segment,F,(0,p.getIcon)("arrow-right"),{[`${l.default.mod_collapsed}`]:!Pe.expanded})}),me=Pe=>o.default.createElement("div",{className:(0,r.default)(l.default.file_icon,Pe.icon),style:{maxHeight:t.TREE_VIEW_NODE_HEIGHT}}),q=Pe=>{var we;return Pe.checkboxInfo===void 0?null:o.default.createElement(a.CheckBox,{"data-node-id":Pe.treeItemId,readOnly:!0,onChange:_e=>Y(_e),checked:!!Pe.checkboxInfo.checked,id:Pe.treeItemId,role:(we=Pe.checkboxInfo.accessibilityInformation)===null||we===void 0?void 0:we.role,title:Pe.checkboxInfo.tooltip})},Ee=Pe=>{const we=()=>{if(Pe.highlights){let _e=[],Ne=0;const Te=Pe.highlights.sort((We,pe)=>We[0]-pe[0]);return _e=Te.map((We,pe)=>{const[re,ge]=We,De=Pe.displayName.slice(Ne,re);Ne=ge;const Ae=Pe.displayName.slice(re,ge),Ue=[o.default.createElement("span",{key:`line_begin_${pe}_${De}`},De),o.default.createElement("span",{className:l.default.highlight,key:`line_hightlight_${pe}_${Ae}`},Ae)];if(pe===Te.length-1){const Ye=Pe.displayName.slice(ge);Ue.push(o.default.createElement("span",{key:`line_end_${pe}_${Ye}`},Ye))}return Ue}),_e}else return Pe.displayName};return o.default.createElement("div",{className:(0,r.default)(l.default.tree_view_node_segment,l.default.tree_view_node_displayname,Pe.strikethrough&&l.default.strikethrough)},we())},ue=()=>o.default.createElement("div",{className:(0,r.default)(l.default.tree_view_node_segment,l.default.tree_view_node_tail)},te()),te=()=>{if(u.actions.length>0)return o.default.createElement("div",{className:l.default.tree_view_actions},o.default.createElement(v.TitleActionList,{className:l.default.inlineMenu,context:[{treeViewId:D,treeItemId:u.treeItemId}],nav:u.actions,menuId:m.MenuId.ViewItemContext}))},fe=Pe=>{if(X)return he(Pe,Q)},Ie=()=>u.tooltip||u.name,Me=Pe=>o.default.createElement("div",{className:(0,r.default)(l.default.tree_view_node_segment_grow,l.default.tree_view_node_description)},!Pe.name&&!Pe.description?"\u2014\u2014":Pe.description),Be=()=>{if(!B)return null;const Pe=B.badge||"",we=B.color,_e=we&&W.getColor({id:we});return o.default.createElement("div",{className:l.default.tree_view_node_tail,style:{color:_e}},(0,s.transformLabelWithCodicon)(Pe.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:Ie(),className:(0,r.default)(L,A?A.classlist:null),"data-id":u.id,style:ie,draggable:w},o.default.createElement("div",{className:(0,r.default)(l.default.tree_view_node_content)},fe(u),q(u),me(u),o.default.createElement("div",{className:l.default.tree_view_node_overflow_wrap},Ee(u),Me(u)),ue(),Be()))};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),a=e(41869),p=e(68974),v=e(41893),m=e(24429),_=e(72260),s=e(82443),g=n.__importDefault(e(17267)),l=({viewState:d,model:E,dataProvider:f,treeViewId:c})=>{const y=(0,a.useInjectable)(_.IMainLayoutService),b=(0,a.useInjectable)(v.IDecorationsService),A=(0,r.useMemo)(()=>y.getViewAccordionService(c),[]),S=(0,r.useMemo)(()=>{const Z=A?.getViewState(c);return Z?!Z.collapsed&&!Z.hidden:!1},[A]),{height:D}=d,{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 a.isOSX&&$||V},[]),x=(0,r.useCallback)((Z,$,V)=>{Z.stopPropagation();const{handleItemClick:H,handleItemToggleClick:K,handleItemRangeClick:Y}=E;if(!$)return;const X=M(event),oe=O(event);I?X?Y($,V):oe?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":c},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:c,model:E,dataProvider:f,decorationService:b}))};t.ExtensionTabBarTreeView=l;function h(d,E){return d.isVisible===E.isVisible&&d.model===E.model&&d.treeViewId===E.treeViewId&&d.height===E.height}const u=(0,r.memo)(({model:d,treeViewId:E,height:f,isVisible:c,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 d.whenReady,d.treeModel&&c&&await d.treeModel.ensureReady,j||L(!0)))(),()=>{j=!0,d&&d.removeNodeDecoration()}},[d,c]),(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:d.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}),[d.treeModel]);if(F){if(B)return r.default.createElement(m.WelcomeView,{viewId:E});if(d.treeModel)return r.default.createElement(o.RecycleTree,{height:f,itemHeight:s.TREE_VIEW_NODE_HEIGHT,onReady:b,model:d.treeModel},W)}else return r.default.createElement(p.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),a=e(99220);class p extends o.BasicEvent{}t.WebviewViewShouldShowEvent=p;const v=({viewId:m})=>{const _=r.default.useRef(null),s=(0,o.useInjectable)(o.IEventBus),g=(0,o.useInjectable)(a.ExtensionService);return r.default.useEffect(()=>{const l=new o.CancellationTokenSource,h=new o.Disposable({dispose:()=>l.cancel()});return g.eagerExtensionsActivated.promise.then(()=>{l.token.isCancellationRequested||_.current&&s.fire(new p({viewType:m,container:_.current,title:"",cancellationToken:l.token,disposer:h}))}),()=>{h.dispose()}},[]),r.default.createElement("div",{style:{height:"100%",width:"100%",position:"relative"},className:"webview-view-component",ref:_})};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)),a=e(97267),p=e(41869),v=e(93374),m=e(52416),_=e(99220),s=e(17441),g=n.__importDefault(e(42076)),l=({resource:{uri:E}})=>{const f=(0,p.useInjectable)(s.WalkthroughsService),c=(0,p.useInjectable)(p.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=>c.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=l;const h=({step:E,isExpanded:f,onSelected:c})=>{const y=(0,p.useInjectable)(p.IOpenerService),b=(0,p.useInjectable)(s.WalkthroughsService),A=(0,p.useInjectable)(m.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(_.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(_.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(a.Button,{onClick:()=>T(F)},(0,p.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,p.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:()=>c(E.id)},o.default.createElement("div",{className:g.default.checkbox},o.default.createElement(a.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:c})=>{const y=(0,p.useInjectable)(m.IThemeService),b=(0,p.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(c);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,c]),!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(d,{content:D,media:E})):null},d=({content:E,media:f})=>{const c=(0,p.useInjectable)(p.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=>c.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 a=class extends o.Disposable{constructor(){super(...arguments),this.commandEnvRegistry=new Map,this.proxyCommandExecutorRegistry=new Map}dispose(){this.commandEnvRegistry.clear(),this.proxyCommandExecutorRegistry.clear()}registerProxyCommandExecutor(v,m){this.proxyCommandExecutorRegistry.set(v,m)}async executeExtensionCommand(v,m,_){const s=this.proxyCommandExecutorRegistry.get(v);if(!s)throw new Error('Proxy command executor "'+v+'" is not existed');return s.$executeExtensionCommand(m,..._)}registerExtensionCommandEnv(v,m="node"){return this.commandEnvRegistry.set(v,m),{dispose:()=>{this.commandEnvRegistry.delete(v)}}}getExtensionCommandEnv(v){return this.commandEnvRegistry.get(v)}};t.ExtCommandManagementImpl=a,t.ExtCommandManagementImpl=a=n.__decorate([(0,r.Injectable)()],a)},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),a=e(43718),p=e(99220),v=e(42734);let m=class extends o.Disposable{constructor(){super(),this.onDidChangeEmitter=new a.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 l;(l=this.extensionMap.get(g))===null||l===void 0||l.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,p.EXTENSION_ENABLE.ENABLE);return this.workspaceStorage.get(s.extensionId,g)===p.EXTENSION_ENABLE.ENABLE}async createExtensionInstance(s,g,l){const h=typeof s=="string"?await this.extensionNodeClient.getExtension(s,(0,a.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),!!l])}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=m,n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],m.prototype,"storageProvider",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],m.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(p.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],m.prototype,"extensionNodeClient",void 0),t.ExtInstanceManagementService=m=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],m)},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),a=e(14951),p=e(99220),v=e(82389),m=e(71354),_=e(35321);let s=class extends o.WithEventBus{async getExtensionProps(l,h){const u=await this.extensionNodeClient.getExtension(l,(0,o.getLanguageId)(),h);if(u){const d=this.getExtensionByPath(l);if(d)return{...d.toJSON(),extraMetadata:u.extraMetadata}}}getExtensionByPath(l){return this.extInstanceManagementService.getExtensionInstances().find(h=>l===h.path)}getExtensionByExtId(l){return this.extInstanceManagementService.getExtensionInstances().find(h=>l===h.id)}async postChangedExtension(l,h,u){const{upgrade:d,extensionPath:E,oldExtensionPath:f,isBuiltin:c}=typeof l=="boolean"?{upgrade:l,extensionPath:h,oldExtensionPath:u,isBuiltin:!1}:l,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,!!c);if(b)return d&&this.disableExtension(f),await this.enableExtension(b)}async postEnableExtension(l){const h=await this.extInstanceManagementService.getExtensionInstanceByPath(l);if(h)return await this.enableExtension(h)}async postDisableExtension(l){return this.disableExtension(l)}async postUninstallExtension(l){return this.uninstallExtension(l)}getAllExtensionJson(){return this.extInstanceManagementService.getExtensionInstances().map(l=>l.toJSON())}disableExtension(l){const h=this.extInstanceManagementService.getExtensionInstanceByPath(l);h&&(h.disable(),this.extInstanceManagementService.deleteExtensionInstanceByPath(l))}async enableExtension(l){this.extInstanceManagementService.addExtensionInstance(l),l.enable(),await l.initialize(),this.eventBus.fire(new m.ExtensionDidEnabledEvent(l.toJSON())),this.sumiContributesService.register(l.id,l.packageJSON.sumiContributes||{}),this.contributesService.register(l.id,l.contributes),this.sumiContributesService.initialize(),this.contributesService.initialize()}async removeExtension(l){try{return await this.fileService.delete(o.URI.file(l).toString()),!0}catch(h){return this.logger.error(h),!1}}async uninstallExtension(l){const h=this.extInstanceManagementService.getExtensionInstanceByPath(l);h&&(h.dispose(),this.extInstanceManagementService.deleteExtensionInstanceByPath(l)),await this.removeExtension(l),this.eventBus.fire(new m.ExtensionDidUninstalledEvent)}};t.ExtensionManagementService=s,n.__decorate([(0,r.Autowired)(m.AbstractExtInstanceManagementService),n.__metadata("design:type",m.AbstractExtInstanceManagementService)],s.prototype,"extInstanceManagementService",void 0),n.__decorate([(0,r.Autowired)(p.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],s.prototype,"extensionNodeClient",void 0),n.__decorate([(0,r.Autowired)(_.VSCodeContributesServiceToken),n.__metadata("design:type",_.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)(a.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),a=e(18740),p=e(41869),v=e(99220),m=e(72464),_=e(46147),s=e(37846),g=e(28949),l=e(51072),h=e(17802);let u=class{constructor(){this._apiFactoryDisposables=new p.DisposableStore,this.ready=new p.Deferred,this._extHostUpdated=new p.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(c=>c.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(_.ExtHostAPIIdentifier.ExtHostExtensionService)}async createBrowserMainThreadAPI(){const E=(0,h.initSharedAPIProxy)(this.protocol,this.injector);this._apiFactoryDisposables.add(E),this._apiFactoryDisposables.add((0,p.toDisposable)((0,l.initNodeThreadAPIProxy)(this.protocol,this.injector,this))),this._apiFactoryDisposables.add((0,p.toDisposable)((0,g.createSumiAPIFactory)(this.protocol,this.injector))),this._apiFactoryDisposables.add(this.createExternalSumiAPIFactory()),await E.setup()}getSpawnOptions(){return{}}createExternalSumiAPIFactory(){const E=new p.Disposable,f=this.mainThreadExtenderContributionProvider.getContributions();for(const y of f)y.registerMainThreadExtender(this.mainThreadExtenderService);const c=this.mainThreadExtenderService.getMainThreadExtenders();for(const y of c){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)(p.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)(p.IApplicationService),n.__metadata("design:type",Object)],u.prototype,"applicationService",void 0),n.__decorate([(0,r.Autowired)(a.WSChannelHandler),n.__metadata("design:type",a.WSChannelHandler)],u.prototype,"channelHandler",void 0),n.__decorate([(0,r.Autowired)(m.IMainThreadExtenderService),n.__metadata("design:type",Object)],u.prototype,"mainThreadExtenderService",void 0),n.__decorate([(0,r.Autowired)(m.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),a=e(65973),p=e(8919),v=e(41869),m=e(40827),_=e(43718),s=e(61656),g=e(99220),l=e(25600),h=e(17428),u=e(54107),d=e(9438),E=e(8403),f=e(31738),{Path:c,posix:y}=v.path,b="load";let A=n=class extends _.Disposable{constructor(){super(...arguments),this.debugLogger=(0,_.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+=`
31971
31971
  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=`