@opensumi/cli-engine 3.7.1-next-1736303003.0 → 3.7.1-next-1736320460.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.
- package/lib/browser/browser.js +1 -1
- package/package.json +10 -10
package/lib/browser/browser.js
CHANGED
|
@@ -28319,7 +28319,7 @@ img {
|
|
|
28319
28319
|
a {
|
|
28320
28320
|
color: var(--textLink-foreground);
|
|
28321
28321
|
}
|
|
28322
|
-
`},73136:(L,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:(L,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)),l=e(41869),m=e(53711),E=n.__importDefault(e(65887)),p=({item:_,defaultLeftPadding:s=8,leftPadding:g=8,decorations:c,onClick:h,onTwistierClick:u})=>{const d=(0,l.useDesignStyles)(E.default.expansion_toggle,"expansion_toggle"),v=(0,o.useCallback)(I=>{_.onSelect?_.onSelect(_):h(I,_)},[h]),f=(0,o.useCallback)(I=>{u(I,_)},[u]),a=`${s+(_.depth||0)*(g||0)+(m.CommentContentNode.is(_)?16:m.CommentFileNode.is(_)?0:28)}px`,b={height:t.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${t.COMMENT_TREE_NODE_HEIGHT}px`,paddingLeft:a},y=(0,o.useCallback)(I=>{if(m.CommentContentNode.is(I)||m.CommentFileNode.is(I))return o.default.createElement("div",{className:(0,r.default)(E.default.icon,I.icon),style:{height:t.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${t.COMMENT_TREE_NODE_HEIGHT}px`}})},[]),S=(0,o.useCallback)(I=>m.CommentContentNode.is(I)?o.default.createElement("div",{className:(0,r.default)(E.default.segment,E.default.displayname)},I.renderedLabel?I.renderedLabel:o.default.createElement(o.default.Fragment,null,I.comment,o.default.createElement("span",{className:E.default.separator},"\xB7"),I.author.name)):o.default.createElement("div",{className:(0,r.default)(E.default.segment,E.default.displayname)},I.renderedLabel),[]),A=(0,o.useCallback)(I=>o.default.createElement("div",{className:(0,r.default)(E.default.segment_grow,E.default.description)},I.renderedDescription),[]),T=(0,o.useCallback)(I=>o.default.createElement("div",{onClick:f,className:(0,r.default)(E.default.segment,d,(0,l.getIcon)("arrow-right"),{[`${E.default.mod_collapsed}`]:!I.expanded})}),[f]),w=(0,o.useCallback)(I=>{if(m.CommentFileNode.is(I)||I?.isAllowToggle)return T(I)},[]),D=(0,o.useCallback)(()=>_.tooltip,[_]);return o.default.createElement("div",{key:_.id,onClick:v,title:D(),className:(0,r.default)(E.default.comment_node,c?c.classlist:null),style:b,"data-id":_.id},o.default.createElement("div",{className:E.default.content},w(_),y(_),o.default.createElement("div",{className:E.default.overflow_wrap},S(_),A(_))))};t.CommentNodeRendered=p,t.COMMENT_TREE_NODE_HEIGHT=22},47842:(L,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),l=e(41869),m=e(23418),E=e(69635),p=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",[p.CommentRoot])],s);let g=class extends l.Disposable{constructor(){super(),this.selectedDecoration=new o.Decoration(_.default.mod_selected),this.focusedDecoration=new o.Decoration(_.default.mod_focused),this._selectedNodes=[],this.onDidUpdateTreeModelEmitter=new l.Emitter,this.disposableCollection=new l.DisposableCollection,this.applyFocusedDecoration=(h,u=!0)=>{var d;if(h){for(const v of this._selectedNodes)this.selectedDecoration.removeTarget(v);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)=>{(p.CommentFileNode.is(u)||u?.isAllowToggle)&&this.toggleDirectory(u)},this.handleItemClick=async(h,u)=>{this.applyFocusedDecoration(u),(p.CommentFileNode.is(u)||u?.isAllowToggle)&&this.toggleDirectory(u);let d,v;u instanceof p.CommentReplyNode||u instanceof p.CommentContentNode?(d=u.thread.uri,v=u.thread.range):d=u.resource,this.editorService.open(d,{range:v}).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(l.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,l.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)(E.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)(m.WorkbenchEditorService),n.__metadata("design:type",m.WorkbenchEditorService)],g.prototype,"editorService",void 0),t.CommentModelService=g=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],g)},53711:(L,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(p){return!!p&&!p.parent}constructor(p){super(p,void 0)}get expanded(){return!0}}t.CommentRoot=r;class o extends n.CompositeTreeNode{static is(p){return n.CompositeTreeNode.is(p)&&"threads"in p}constructor(p,_,s="",g,c,h,u){super(p,u),this.threads=_,this.tooltip=g,this.icon=c,this.resource=h,this.isExpanded=!0,this._renderedLabel=this.resource.displayName,this._renderedDescription=s}set label(p){this._renderedLabel=p}set description(p){this._renderedDescription=p}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(p){this._onSelectHandler=p}get onSelect(){return this._onSelectHandler}}t.CommentFileNode=o;class l extends n.CompositeTreeNode{static is(p){return n.CompositeTreeNode.is(p)&&"author"in p}constructor(p,_,s,g="",c,h,u,d){super(p,d),this.thread=_,this.comment=s,this.icon=c,this.author=h,this.resource=u,this._renderedDescription=g,this.isExpanded=!0,this._isAllowToggle=!1}get isAllowToggle(){return this._isAllowToggle}setIsAllowToggle(p){this._isAllowToggle=p}set label(p){this._renderedLabel=p}set description(p){this._renderedDescription=p}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(p){this._onSelectHandler=p}get onSelect(){return this._onSelectHandler}}t.CommentContentNode=l;class m extends n.TreeNode{constructor(p,_,s,g="",c,h,u){super(p,u),this.thread=_,this.icon=c,this.resource=h,this._renderedLabel=s,this._renderedDescription=g}set label(p){this._renderedLabel=p}set description(p){this._renderedDescription=p}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(p){this._onSelectHandler=p}get onSelect(){return this._onSelectHandler}}t.CommentReplyNode=m},69635:(L,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(p){p[p.Editor=0]="Editor",p[p.Preview=1]="Preview"})(r||(t.CommentMode=r={}));var o;(function(p){p[p.Collapsed=0]="Collapsed",p[p.Expanded=1]="Expanded"})(o||(t.CommentThreadCollapsibleState=o={}));var l;(function(p){p.Thread="thread",p.Empty="empty"})(l||(t.CommentGutterType=l={})),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 m extends n.BasicEvent{}t.CommentPanelCollapse=m;class E extends n.BasicEvent{}t.CommentReactionClick=E},86077:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(69635),t)},79383:(L,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 l=({className:m,children:E,...p})=>o.default.createElement("span",{className:(0,r.default)("kt-badge",m),...p},E);t.Badge=l},48412:(L,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)),l=e(99613),m=e(54713);e(71682);const E=()=>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 p(){}t.Button=o.default.memo(({children:_,loading:s,className:g,type:c="primary",htmlType:h,size:u,ghost:d=!1,onClick:v,disabled:f,block:a,iconClass:b,icon:y,more:S,moreIconClass:A,menu:T,moreVisible:w,placement:D,title:I,onVisibleChange:O,...P})=>{const R=(0,r.default)("kt-button",g,{[`kt-${c}-button-loading`]:s,[`ghost-${c}-button`]:d&&!s&&c!=="link",[`${c}-button`]:c,[`${u}-button-size`]:u,"ghost-button":d&&c!=="link","block-button":a}),M=(0,r.default)(g,{"kt-clickable-icon":!!v});if(c==="icon")return o.default.createElement(m.Icon,{tooltip:I,disabled:f,icon:y,onClick:s||f?p:v,className:M,iconClass:b,...P});const k=b?o.default.createElement(m.Icon,{iconClass:b,disabled:f}):null;return T?o.default.createElement(l.Dropdown,{visible:w,className:"kt-menu",overlay:T,trigger:["click"],onVisibleChange:O,placement:D},o.default.createElement("button",{...P,disabled:f,className:R,type:h,onClick:s||f?p:v},s&&c!=="link"&&o.default.createElement(E,null),k&&k,_,S&&o.default.createElement(m.Icon,{iconClass:A||(0,m.getIcon)("down"),className:"kt-button-secondary-more"}))):o.default.createElement("button",{...P,disabled:f,className:R,type:h,onClick:s||f?p:v},s&&c!=="link"&&o.default.createElement(E,null),k&&k,_)})},7273:(L,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)),l=e(65973);e(6099);const m=()=>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"})),E=({insertClass:p,className:_,label:s,size:g="default",disabled:c,checked:h,wrapTabIndex:u,...d})=>{(0,l.warning)(!p,"`insertClass` was deprecated, please use `className` instead");const v=d;return v.checked=h??!1,o.default.createElement("label",{className:(0,r.default)("kt-checkbox",p,_,{"kt-checkbox-large":g==="large","kt-checkbox-disabled":c}),tabIndex:u},o.default.createElement("span",{className:"kt-checkbox-lump"},o.default.createElement("input",{type:"checkbox",disabled:c,...v}),o.default.createElement("span",{className:"kt-checkbox-icon"},o.default.createElement(m,null))),s||" ")};t.CheckBox=E,t.CheckBox.displayName="OpenSumiCheckBox"},58998:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClickOutside=void 0;const r=e(85608).__importDefault(e(14041)),o=({mouseEvents:l=["click"],onOutsideClick:m,children:E,...p})=>{const _=r.default.useRef(null),s=r.default.useCallback(g=>{_.current&&g.target&&!_.current.contains(g.target)&&m(g)},[m]);return r.default.useEffect(()=>(l.forEach(g=>{window.addEventListener(g,s,!0)}),()=>{l.forEach(g=>{window.removeEventListener(g,s,!0)})}),[l]),r.default.createElement("div",{...p,ref:_},E)};t.ClickOutside=o},50570:(L,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:(L,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)),l=e(43718),m=e(48412),E=e(50570),p=e(54713),_=e(79024);e(65773);const s=({onCancel:h,onOk:u,cancelText:d,okText:v})=>o.default.createElement(o.default.Fragment,null,o.default.createElement(m.Button,{onClick:h,type:"secondary"},d||(0,l.localize)("ButtonCancel")),o.default.createElement(m.Button,{onClick:u},v||(0,l.localize)("ButtonOK"))),g=({onClose:h,closable:u,type:d="confirm",messageType:v=E.MessageType.Info,icon:f,message:a,buttons:b,title:y,onOk:S,onCancel:A,okText:T,cancelText:w})=>{const{getIcon:D}=o.default.useContext(p.IconContext);return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-dialog-content"},f&&o.default.createElement("div",{style:{color:f.color},className:(0,r.default)("kt-dialog-icon",(0,p.getIcon)(f.className)||D(f.className))}),o.default.createElement("div",{className:"kt-dialog-content_area"},o.default.createElement("div",{className:"kt-dialog-content_title"},y),a&&o.default.createElement("span",{className:"kt-dialog-message"},a)),u&&d!=="basic"&&o.default.createElement("button",{className:(0,r.default)("kt-dialog-closex",(0,p.getIcon)("close")),onClick:h})),v!==E.MessageType.Empty&&d!=="basic"&&o.default.createElement("div",{className:"kt-dialog-buttonWrap"},d==="confirm"?b||o.default.createElement(s,{onCancel:A,onOk:S,okText:T,cancelText:w}):o.default.createElement(m.Button,{onClick:h},"OK")))};t.DialogContent=g;const c=({visible:h,onClose:u,closable:d,afterClose:v,messageType:f,icon:a,message:b,detail:y,buttons:S,type:A="confirm",title:T,onOk:w,onCancel:D,okText:I,cancelText:O,getContainer:P,keyboard:R,...M})=>o.default.createElement(_.Overlay,{visible:h,onClose:u,title:A==="basic"?T:null,closable:A==="basic",getContainer:P,keyboard:R,footer:A==="basic"?S||o.default.createElement(s,{onCancel:D,onOk:w,okText:I,cancelText:O}):void 0,afterClose:v,...M},o.default.createElement(t.DialogContent,{title:b,message:y,buttons:S,visible:h,icon:a,...M}));t.Dialog=c},99665:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(62596)),o=n.__importDefault(e(53373)),l=n.__importStar(e(14041)),m=e(48412),E=n.__importDefault(e(35060)),p=_=>{var s;const{prefixCls:g,type:c="primary",size:h="default",danger:u,disabled:d,loading:v,onClick:f,htmlType:a,children:b,className:y,overlay:S,trigger:A,align:T,visible:w,onVisibleChange:D,placement:I,getPopupContainer:O,href:P,icon:R=l.createElement(r.default,null),title:M,buttonsRender:k=$=>$,mouseEnterDelay:B,mouseLeaveDelay:x,overlayClassName:N,overlayStyle:j,...K}=_,U=g||"kt-dropdown-button",Q={align:T,overlay:S,disabled:d,trigger:d?[]:A,getPopupContainer:O,mouseEnterDelay:B,mouseLeaveDelay:x,overlayClassName:N,overlayStyle:j};Q.placement=(s=_?.placement)!==null&&s!==void 0?s:"bottomRight";const z=l.createElement(m.Button,{size:h,type:c,disabled:d,loading:v,onClick:f,htmlType:a,title:M},b),G=l.createElement(m.Button,{size:h,type:c},R??l.createElement(r.default,null)),[Y,Z]=k([z,G]);return l.createElement("div",{...K,className:(0,o.default)(U,y)},Y,l.createElement(E.default,{...Q},Z))};t.default=p},35060:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(64797)),o=n.__importDefault(e(53373)),l=n.__importDefault(e(5147)),m=n.__importDefault(e(14041)),E=e(43953),p=e(65973),_=(0,E.tuple)("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight");class s extends m.default.Component{constructor(){super(...arguments),this.renderOverlay=c=>{const{overlay:h}=this.props;let u;typeof h=="function"?u=h():u=h,u=m.default.Children.only(u);const d=u.props;(0,p.warning)(!d.mode||d.mode==="vertical",`[Dropdown] mode="${d.mode}" is not supported for Dropdown's Menu.`);const{selectable:v=!1,focusable:f=!0}=d,a=m.default.createElement("span",{className:`${c}-menu-submenu-arrow`},m.default.createElement(r.default,{className:`${c}-menu-submenu-arrow-icon`}));return typeof u.type=="string"?h:m.default.cloneElement(u,{mode:"vertical",selectable:v,focusable:f,expandIcon:a})},this.renderDropDown=()=>{const{prefixCls:c,children:h,trigger:u,disabled:d,getPopupContainer:v}=this.props,f=c||"kt-dropdown",a=m.default.Children.only(h),b=m.default.cloneElement(a,{className:(0,o.default)(a.props.className,`${f}-trigger`),disabled:d}),y=d?[]:u;let S;return y&&y.indexOf("contextMenu")!==-1&&(S=!0),m.default.createElement(l.default,{alignPoint:S,...this.props,prefixCls:f,getPopupContainer:v,transitionName:this.getTransitionName(),trigger:y,overlay:()=>this.renderOverlay(f)},b)}}getTransitionName(){const{placement:c="",transitionName:h}=this.props;return h!==void 0?h:c.indexOf("top")>=0?"slide-down":"slide-up"}render(){return this.renderDropDown()}}s.defaultProps={mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft"},t.default=s},99613:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=t._InternalIcon=t.IconContext=void 0,t.IconContextProvider=E;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(12122),m=e(76577);e(1914),t.IconContext=o.default.createContext({getIcon:(_,s)=>_});function E(_){return o.default.createElement(t.IconContext.Provider,{value:_.value},o.default.createElement(t.IconContext.Consumer,null,s=>_.value===s?_.children:null))}const p=function(_,s){const{size:g="small",loading:c,icon:h,iconClass:u,className:d,tooltip:v,rotate:f,anim:a,fill:b,disabled:y,onClick:S,children:A,resourceOptions:T,animate:w,style:D={},...I}=_,O={rotate:f,anim:a,fill:b};let P;if(h)if(l.defaultIconMap[h])P=(0,m.getIcon)(h,O);else{const{getIcon:R,getResourceIcon:M}=o.default.useContext(t.IconContext);T&&M?P=M(h,T):P=R(h,O)}else P=u;return w&&w==="spin"&&(D.animation="kt-icon-spin 1.5s steps(30) infinite"),o.default.createElement("span",{...I,title:v,onClick:S,ref:s,className:(0,r.default)("kt-icon",P,d,{"kt-icon-loading":c,"kt-icon-disabled":!!y,[`kt-icon-${g}`]:!!g,"kt-icon-clickable":!!S,"kt-icon-resource":!!T,expanded:!!T&&T.isOpenedDirectory}),style:D},A)};t._InternalIcon=o.default.memo(o.default.forwardRef(p)),t.Icon=o.default.memo(o.default.forwardRef(p))},10391:(L,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)),l=e(80564),m=e(76577),E=new Set;function p(c){return!!(typeof c=="string"&&c.length&&!E.has(c))}function _(c,h=0){const u=c[h];if(p(u)){const d=document.createElement("script");d.setAttribute("src",u),d.setAttribute("data-namespace",u),c.length>h+1&&(d.onload=()=>{_(c,h+1)},d.onerror=()=>{_(c,h+1)}),E.add(u),document.body.appendChild(d)}}const s={width:"1em",height:"1em",fill:"currentColor"};function g(c={}){const{scriptUrl:h,extraCommonProps:u={}}=c;h&&typeof document<"u"&&typeof window<"u"&&typeof document.createElement=="function"&&(Array.isArray(h)?_(h.reverse()):_([h]));const d=o.default.forwardRef((v,f)=>{const{icon:a,children:b,rotate:y,anim:S,fill:A,className:T="",...w}=v,D={rotate:y,anim:S,fill:A};let I=null;a&&(I=o.default.createElement("svg",{...s,focusable:"false"},o.default.createElement("use",{xlinkHref:`#${a}`}))),b&&(I=b);const O=(0,m.getIconShapeClxList)(D);return o.default.createElement(l._InternalIcon,{...u,...w,className:(0,r.default)(T,O),ref:f},I)});return d.displayName="Iconfont",d}},12122:(L,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 l={"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"},m=Object.assign({},o.defaultIconfont,l);t.defaultIconMap=new Proxy(m,{get(_,s){const g=l[s];return(0,r.default)(!g,`Icon '${s}' was a typo, please use '${g}' instead`),_[s]}});class E{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 c=this._iconMap[this._ktIconPrefixes[g]][s];return c?[`${this._ktIconPrefixes[g]}${c}`]:((0,r.default)(!1,"No icon found for "+s),[])}}t.iconManager=new E,t.iconManager.update("kaitian-icon kticon-",t.defaultIconMap)},81139:(L,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","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-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","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","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-hollow":"send-hollow","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"}},54713:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateKaitianIconMap=t.getKaitianIcon=t.ANIM_TYPE=t.ROTATE_TYPE=void 0,t.updateIconMap=E,t.getIconShapeClxList=p,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 l=["rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","flip-both"],m=["spin","pulse"];function E(s,g){n.iconManager.update(s,g)}function p(s){const{rotate:g,anim:c,fill:h}=s||{},u=[];return g!==void 0&&u.push(`iconfont-${l[g]}`),c!==void 0&&u.push(`iconfont-anim-${m[c]}`),h&&u.push("toggled"),u}function _(s,g){const c=n.iconManager.getIconClx(s),h=p(g);return c.push(...h),c.join(" ")}t.getKaitianIcon=_,t.updateKaitianIconMap=E},97267:(L,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(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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryInputBox=void 0;const r=e(85608).__importDefault(e(14041)),o=e(54114),l=e(63924);class m extends r.default.Component{constructor(){super(...arguments),this.inputRef=r.default.createRef(),this.addToHistory=p=>{this.history&&p&&p!==this.getCurrentValue()&&this.history.add(p)},this.getHistory=()=>this.history&&this.history.getHistory()||[],this.showNextValue=()=>{const p=this.getCurrentValue()||"";this.history&&!this.history.has(p)&&this.addToHistory(p);let _=this.getNextValue();_&&(_=_===p?this.getNextValue():_),_&&this.onValueChange(_)},this.showPreviousValue=()=>{const p=this.getCurrentValue()||"";this.history&&!this.history.has(p)&&this.addToHistory(p);let _=this.getPreviousValue();_&&(_=_===p?this.getPreviousValue():_),_&&this.onValueChange(_)},this.clearHistory=()=>{this.history&&this.history.clear()},this.getCurrentValue=()=>{if(!this.history)return null;let p=this.history.current();return p||(p=this.history.last(),this.history.next()),p},this.getPreviousValue=()=>this.history&&(this.history.previous()||this.history.first())||null,this.getNextValue=()=>this.history&&(this.history.next()||this.history.last())||null,this.onValueChange=p=>{const{onValueChange:_}=this.props;this.setState({inputValue:p}),_&&_(p)},this.onKeyDown=p=>{const{onKeyDown:_}=this.props;_&&_(p)},this.focus=()=>{this.inputRef&&this.inputRef.current&&this.inputRef.current.focus()}}componentDidMount(){var p;const{history:_,onReady:s}=this.props;this.history=new o.HistoryNavigator(_||[],100),this.inputProps={...this.props},delete this.inputProps.onReady,this.setState({inputValue:((p=this.props.value)!==null&&p!==void 0?p: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 p=this.state&&this.state.inputValue;return r.default.createElement(l.Input,{ref:this.inputRef,...this.inputProps,onValueChange:this.onValueChange,onKeyDown:this.onKeyDown,value:p})}}t.HistoryInputBox=m},63924:(L,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)),l=e(54713),m=n.__importDefault(e(65973));e(41065);function E(_){return typeof _>"u"}function p(_,s,g){if(typeof g=="function"){let c=s;if(s.type==="click"){c=Object.create(s),c.target=_,c.currentTarget=_;const h=_.value;_.value="",g(c),_.value=h;return}g(c)}}t.Input=o.default.forwardRef((_,s)=>{const{defaultValue:g,className:c,wrapperStyle:h,size:u="default",controls:d,onChange:v,selection:f,addonBefore:a,addonAfter:b,persistFocus:y=!0,hasClear:S,afterClear:A,value:T,onValueChange:w,onPressEnter:D,onKeyDown:I,as:O="input",...P}=_;(0,m.default)(!d,"[@opensumi/ide-components Input]: `controls` was deprecated, please use `addonAfter` instead");const R=o.default.useRef(null),[M,k]=o.default.useState(!1),[B,x]=o.default.useState(()=>(T??g)||""),[N,j]=o.default.useState(()=>(T??g)||"");o.default.useImperativeHandle(s,()=>R.current),o.default.useEffect(()=>{f&&!E(f.start)&&!M&&R.current.setSelectionRange(f.start,f.end)},[f,M]),o.default.useEffect(()=>{T===null||typeof T>"u"||(T!==N&&T!==B&&x(T),T!==N&&j(T))},[T]);const K=H=>{Q(H.target.value),p(R.current,H,v)},U=H=>{H.preventDefault(),Q(""),p(R.current,H,v),typeof A=="function"&&A()},Q=H=>{x(H),typeof w=="function"&&w(H),M||k(!0)},z=H=>{H.keyCode===13&&typeof D=="function"&&D(H),typeof I=="function"&&I(H)},G=b||d,Y=y?{onMouseDown:H=>{H.preventDefault()}}:{},Z=(H,X)=>H?o.default.createElement("div",{className:(0,r.default)("kt-input-addon",X),...Y},o.default.Children.map(H,J=>o.default.isValidElement(J)?o.default.cloneElement(J,Y):null)):null,$=(0,r.default)("kt-input",c,{[`kt-input-${u}`]:u,"kt-input-disabled":_.disabled});return o.default.createElement("div",{className:$,style:h},Z(a,"kt-input-addon-before"),o.default.createElement("div",{className:"kt-input-box"},o.default.createElement(O,{ref:R,type:"text",autoCapitalize:"off",autoCorrect:"off",autoComplete:"off",spellCheck:!1,...P,value:B,onChange:K,onKeyDown:z}),S&&B&&o.default.createElement(l.Icon,{className:"kt-input-clear",icon:"close-circle-fill",onClick:U,...Y})),Z(G,"kt-input-addon-after"))}),t.Input.displayName="OpenSumiInput"},64545:(L,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)),l=n.__importDefault(e(14041));e(41065),e(17107);const m="kt-input-number",E=p=>{const{value:_,size:s="default",wrapperStyle:g,className:c,disabled:h,min:u,max:d,onChange:v,...f}=p,a=y=>{v&&v(y)},b=(0,r.default)("kt-input","kt-input-number",c,{[`kt-input-${s}`]:s,"kt-input-disabled":h});return l.default.createElement("div",{className:b,style:g},l.default.createElement("div",{className:"kt-input-box"},l.default.createElement(o.default,{prefixCls:m,min:u,max:d,value:_,type:"number",onChange:a,controls:!0,...f})))};t.InputNumber=E,t.InputNumber.displayName="OpenSumiInputNumber"},10413:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindInputElement=E;const r=e(85608).__importDefault(e(14041)),o=e(63924);class l 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:c,style:h}=_;if(typeof s=="string"&&(c.className=s),typeof g=="string"&&(c.id=g),h!==null&&typeof h=="object")for(const u in h)typeof h[u]=="string"&&c[u]&&(c[u]=h[u])}}const m=r.default.forwardRef((p,_)=>r.default.createElement(l,{...p,innerRef:_}));function E(p){return _=>r.default.createElement(m,{..._,inputElement:p})}},61172:(L,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((l,m)=>r.default.createElement(o.Input,{...l,as:"textarea",ref:m})),t.TextArea.displayName="OpenSumiTextArea"},34390:(L,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)),l=e(63924);e(13254);var m;(function(E){E[E.INFO=1]="INFO",E[E.ERROR=2]="ERROR",E[E.WARNING=3]="WARNING",E[E.IGNORE=4]="IGNORE"})(m||(t.VALIDATE_TYPE=m={})),t.ValidateInput=o.default.forwardRef(({type:E,className:p,validate:_,onChange:s,onValueChange:g,validateMessage:c,popup:h=!0,...u},d)=>{const[v,f]=o.default.useState();o.default.useEffect(()=>{f(c)},[c]);const a=(0,r.default)({"validate-error":v&&v.type===m.ERROR,"validate-warning":v&&v.type===m.WARNING,"validate-info":v&&v.type===m.INFO}),b=()=>{if(v&&v.message)return o.default.createElement("div",{className:(0,r.default)("validate-message",a,{popup:h})},v.message)},y=S=>{const A=S.target;let T;if(A.type==="number"?T=S.target.valueAsNumber:T=S.target.value,typeof _=="function"){let w;E==="number"?/^[0-9]+$/.test(T)?w=_(Number(T)):w=_(String(T)):w=_(T),f(w)}typeof s=="function"&&s(S),typeof g=="function"&&g(T)};return o.default.createElement("div",{className:(0,r.default)("input-box",{popup:h})},o.default.createElement(l.Input,{type:E,ref:d,className:(0,r.default)(p,v,a),onChange:y,...u}),b())}),t.ValidateInput.displayName="ValidateInput"},50708:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(3205),t)},3205:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalizeContext=void 0,t.LocalizeContextProvider=E,t.ComponentContextProvider=p;const r=e(85608).__importDefault(e(14041)),o=e(54713),l=e(65973),m=_=>((0,l.warning)(!1,"Using the default localize fn"),"");t.LocalizeContext=r.default.createContext({localize:m}),t.LocalizeContext.displayName="LocalizeContext";function E(_){return r.default.createElement(t.LocalizeContext.Provider,{value:_.value},r.default.createElement(t.LocalizeContext.Consumer,null,s=>_.value===s?_.children:null))}function p(_){return r.default.createElement(o.IconContextProvider,{value:_.value},r.default.createElement(E,{value:{localize:_.value.localize}},_.children))}},13719:(L,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:(L,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 l extends r.marked.Renderer{constructor(E){super(),this.unescapeInfo=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),this.renderer=E.renderer}parse(E){return E.map((p,_)=>{const s=(()=>{switch(p.type){case"html":return this.renderer.html(p.text);case"space":return null;case"heading":{const g=p.depth;return this.renderer.heading(this.parseInline(p.tokens),g)}case"paragraph":return this.renderer.paragraph(this.parseInline(p.tokens));case"text":{const g=p;return g.tokens?this.parseInline(g.tokens):p.text}case"blockquote":{const g=p,c=this.parse(g.tokens);return this.renderer.blockquote(c)}case"list":{const c=p.items.map((h,u)=>{var d;const v=[];return h.task&&v.push(this.renderer.checkbox((d=h.checked)!==null&&d!==void 0?d:!1)),v.push(this.parse(h.tokens)),o.default.cloneElement(this.renderer.listItem(v),{key:`list-item-${u}`})});return this.renderer.list(c,p.ordered)}case"code":return this.renderer.code(p.text,p.lang);case"table":{const g=p,c=g.header.map((f,a)=>o.default.cloneElement(this.renderer.tableCell(this.parseInline(f.tokens),{header:!0,align:p.align[a]}),{key:`header-cell-${a}`})),h=o.default.cloneElement(this.renderer.tableRow(c),{key:"header-row"}),u=this.renderer.tableHeader(h),d=g.rows.map((f,a)=>{const b=f.map((y,S)=>o.default.cloneElement(this.renderer.tableCell(this.parseInline(y.tokens),{header:!1,align:p.align[S]}),{key:`body-cell-${a}-${S}`}));return o.default.cloneElement(this.renderer.tableRow(b),{key:`body-row-${a}`})}),v=this.renderer.tableBody(d);return this.renderer.table([u,v])}case"hr":return this.renderer.hr();default:return console.warn(`Token with "${p.type}" type was not found`),null}})();return o.default.isValidElement(s)?o.default.cloneElement(s,{key:`token-${_}`}):s})}parseInline(E=[]){return E.map(p=>{switch(p.type){case"text":{const _=p.text.replace(/&(#\d+|[a-zA-Z]+);/g,s=>{var g;return(g=this.unescapeInfo.get(s))!==null&&g!==void 0?g:s});return this.renderer.text(_)}case"strong":return this.renderer.strong(this.parseInline(p.tokens));case"em":return this.renderer.em(this.parseInline(p.tokens));case"del":return this.renderer.del(this.parseInline(p.tokens));case"codespan":return this.renderer.codespan(unescape(p.text));case"link":return this.renderer.link(p.href,this.parseInline(p.tokens));case"image":return this.renderer.image(p.href,p.text,p.title);case"html":return this.renderer.html(p.text);case"br":return this.renderer.br();case"escape":return this.renderer.text(p.text);default:return console.warn(`Token with "${p.type}" type was not found`),null}})}}t.MarkdownReactParser=l},44547:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownReactRenderer=void 0;const r=e(85608).__importStar(e(14041));class o{constructor(m={}){this.uid=0,this.options=m}node(m,E=null,p={}){const _={key:`marked-react-${this.uid}`};return this.incrementUID(),(0,r.createElement)(m,{...p,..._},E)}incrementUID(){this.uid+=1}heading(m,E){return this.node(`h${E}`,m)}paragraph(m){return this.node("p",m)}joinBase(m,E){if(!E)return m;try{return new URL(m,E).href}catch{return m}}link(m,E){const p=this.joinBase(m,this.options.baseURL);return this.node("a",E,{href:p,target:"_blank",rel:"noopener noreferrer"})}image(m,E,p=null){const _=this.joinBase(m,this.options.baseURL);return this.node("img",null,{src:_,alt:E,title:p})}codespan(m,E=null){const p=E?`${this.options.langPrefix}${E}`:null;return this.node("code",m,{className:p})}code(m,E){return this.node("pre",this.codespan(m,E))}blockquote(m){return this.node("blockquote",m)}list(m,E){return this.node(E?"ol":"ul",m)}listItem(m){return this.node("li",m)}checkbox(m){return this.node("input",null,{type:"checkbox",disabled:!0,checked:m})}table(m){return this.node("table",m)}tableHeader(m){return this.node("thead",m)}tableBody(m){return this.node("tbody",m)}tableRow(m){return this.node("tr",m)}tableCell(m,E){const p=E.header?"th":"td";return this.node(p,m,{align:E.align})}strong(m){return this.node("strong",m)}em(m){return this.node("em",m)}del(m){return this.node("del",m)}text(m){return m}html(m){return r.default.createElement("div",{dangerouslySetInnerHTML:{__html:m}})}hr(){return this.node("hr")}br(){return this.node("br")}}t.MarkdownReactRenderer=o},56849:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultMarkedRenderer=t.linkify=void 0,t.Markdown=p;const n=e(85608),r=e(33714),o=n.__importDefault(e(14041)),l=e(39777),m=(_,s,g)=>`<a rel="noopener" ${l.DATA_SET_COMMAND}="${_}" title="${s??_}">${g}</a>`;t.linkify=m;class E extends r.Renderer{link(s,g,c){return(0,t.linkify)(s,g,c)}}t.DefaultMarkedRenderer=E;function p(_){const s=(h,u)=>r.marked.parse(h,{renderer:u}),[g,c]=o.default.useState(s(_.value||"",_.renderer));return o.default.useEffect(()=>{c(s(_.value||"",_.renderer))},[_.renderer,_.value]),o.default.createElement(l.RenderWrapper,{opener:_.opener,html:g})}},39777:(L,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=l=>{const m=(0,r.useRef)(),{html:E,opener:p}=l;(0,r.useEffect)(()=>(m&&m.current&&m.current.addEventListener("click",_),()=>{m&&m.current&&m.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 c=g.getAttribute(t.DATA_SET_COMMAND);c&&p&&p.open(c)}};return r.default.createElement("div",{className:"kt-md-renderer-wrap",dangerouslySetInnerHTML:{__html:E},ref:m})};t.RenderWrapper=o},98113:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=(0,e(14041).createContext)({inlineCollapsed:!1});t.default=r},64063:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=e(31363),o=n.__importDefault(e(14041)),l=n.__importDefault(e(98113));class m extends o.default.Component{constructor(){super(...arguments),this.renderItem=()=>{const{title:p,..._}=this.props;return o.default.createElement(l.default.Consumer,null,({inlineCollapsed:s})=>s?o.default.createElement(r.Item,{..._,title:p}):o.default.createElement(r.Item,{..._,title:p}))}}render(){return this.renderItem()}}m.isMenuItem=!0,t.default=m},91886:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(39067)),o=e(31363),l=n.__importDefault(e(14041));class m extends l.default.Component{render(){const{popupClassName:p}=this.props;return l.default.createElement(o.SubMenu,{...this.props,popupClassName:p})}}m.contextTypes={antdMenuTheme:r.default.string},m.isSubMenu=1,t.default=m},45803:(L,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)),l=n.__importDefault(e(14041)),m=e(90146),E=e(2835),p=e(47768),_=e(65973),s=n.__importDefault(e(98113)),g=n.__importDefault(e(64063)),c=n.__importDefault(e(91886));e(42985);class h extends l.default.Component{static getDerivedStateFromProps(v,f){const{prevProps:a}=f,b={prevProps:v};return a.mode==="inline"&&v.mode!=="inline"&&(b.switchingModeFromInline=!0),"openKeys"in v?b.openKeys=v.openKeys:(v.inlineCollapsed&&!a.inlineCollapsed&&(b.switchingModeFromInline=!0,b.inlineOpenKeys=f.openKeys,b.openKeys=[]),!v.inlineCollapsed&&a.inlineCollapsed&&(b.openKeys=f.inlineOpenKeys,b.inlineOpenKeys=[])),b}constructor(v){super(v),this.handleMouseEnter=a=>{this.restoreModeVerticalFromInline();const{onMouseEnter:b}=this.props;b&&b(a)},this.handleTransitionEnd=a=>{const b=a.propertyName==="width"&&a.target===a.currentTarget,{className:y}=a.target,S=Object.prototype.toString.call(y)==="[object SVGAnimatedString]"?y.animVal:y,A=a.propertyName==="font-size"&&S.indexOf("anticon")>=0;(b||A)&&this.restoreModeVerticalFromInline()},this.handleClick=a=>{this.handleOpenChange([]);const{onClick:b}=this.props;b&&b(a)},this.handleOpenChange=a=>{this.setOpenKeys(a);const{onOpenChange:b}=this.props;b&&b(a)},this.renderMenu=()=>{const{prefixCls:a,className:b}=this.props,y=this.getRealMenuMode(),S=this.getOpenMotionProps(y),A=a||"kt-inner-menu",T=(0,r.default)(b,{[`${A}-inline-collapsed`]:this.getInlineCollapsed()}),w={openKeys:this.state.openKeys,onOpenChange:this.handleOpenChange,className:T,mode:y,...S};return y!=="inline"&&(w.onClick=this.handleClick),this.getInlineCollapsed()&&(w.openKeys=[]),l.default.createElement(o.default,{...this.props,...w,prefixCls:A,onTransitionEnd:this.handleTransitionEnd,onMouseEnter:this.handleMouseEnter})},(0,_.warning)(!("onOpen"in v||"onClose"in v),"[Menu] `onOpen` and `onClose` are removed, please use `onOpenChange` instead, see: https://u.ant.design/menu-on-open-change."),(0,_.warning)(!("inlineCollapsed"in v&&v.mode!=="inline"),"[Menu] `inlineCollapsed` should only be used when `mode` is inline.");let f;"openKeys"in v?f=v.openKeys:"defaultOpenKeys"in v&&(f=v.defaultOpenKeys),this.state={openKeys:f||[],switchingModeFromInline:!1,inlineOpenKeys:[],prevProps:v}}componentWillUnmount(){p.wrapperRaf.cancel(this.mountRafId)}setOpenKeys(v){"openKeys"in this.props||this.setState({openKeys:v})}getRealMenuMode(){const v=this.getInlineCollapsed();if(this.state.switchingModeFromInline&&v)return"inline";const{mode:f}=this.props;return v?"vertical":f}getInlineCollapsed(){const{inlineCollapsed:v}=this.props;return v}getOpenMotionProps(v){const{openTransitionName:f,openAnimation:a,motion:b}=this.props;return b?{motion:b}:a?((0,_.warning)(typeof a=="string","[Menu] `openAnimation` do not support object. Please use `motion` instead."),{openAnimation:a}):f?{openTransitionName:f}:v==="horizontal"?{motion:{motionName:"slide-up"}}:v==="inline"?{motion:E.collapseMotion}:{motion:{motionName:""}}}restoreModeVerticalFromInline(){const{switchingModeFromInline:v}=this.state;v&&this.setState({switchingModeFromInline:!1})}render(){return l.default.createElement(s.default.Provider,{value:{inlineCollapsed:this.getInlineCollapsed()||!1}},this.renderMenu())}}h.defaultProps={className:"",focusable:!1},(0,m.polyfill)(h);class u extends l.default.Component{render(){return l.default.createElement(h,{...this.props})}}t.Menu=u,u.Divider=o.Divider,u.Item=g.default,u.SubMenu=c.default,u.ItemGroup=o.ItemGroup},31059:(L,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(l){return(m,E)=>new Promise(p=>{r.default[l](m,E,p)})}t.message={success:o("success"),error:o("error"),info:o("info"),warning:o("warning"),loading:o("loading")}},71036:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(29517)),o=n.__importDefault(e(96041)),l=n.__importDefault(e(63492)),m=n.__importDefault(e(36117)),E=n.__importDefault(e(59303)),p=n.__importDefault(e(10435)),_=n.__importDefault(e(14041));let s=3,g,c,h=1,u="kt-message",d="move-up",v,f;function a(T){if(c){T(c);return}p.default.newInstance({prefixCls:u,transitionName:d,style:{top:g},getContainer:v,maxCount:f},w=>{if(c){T(c);return}c=w,T(w)})}const b={info:m.default,success:r.default,error:o.default,warning:l.default,loading:E.default};function y(T){const w=T.duration!==void 0?T.duration:s,D=T.key||h++,I=new Promise(P=>{const R=()=>(typeof T.onClose=="function"&&T.onClose(),P(!0));a(M=>{const k=b[T.type];M.notice({key:D,duration:w,style:{},content:_.default.createElement("div",{className:`${u}-custom-content${T.type?` ${u}-${T.type}`:""}`},T.icon||k&&_.default.createElement(k,null),_.default.createElement("span",null,T.content)),onClose:R})})}),O=()=>{c&&c.removeNotice(D)};return O.then=(P,R)=>I.then(P,R),O.promise=I,O}function S(T){return Object.prototype.toString.call(T)==="[object Object]"&&!!T.content}const A={open:y,config(T){T.top!==void 0&&(g=T.top,c=null),T.duration!==void 0&&(s=T.duration),T.prefixCls!==void 0&&(u=T.prefixCls),T.getContainer!==void 0&&(v=T.getContainer),T.transitionName!==void 0&&(d=T.transitionName,c=null),T.maxCount!==void 0&&(f=T.maxCount,c=null)},destroy(){c&&(c.destroy(),c=null)}};["success","info","warning","error","loading"].forEach(T=>{A[T]=(w,D,I)=>S(w)?A.open({...w,type:T}):(typeof D=="function"&&(I=D,D=void 0),A.open({content:w,duration:D,type:T,onClose:I}))}),A.warn=A.warning,t.default=A},6656:(L,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)),l=n.__importDefault(e(39067)),m=n.__importDefault(e(51982)),E=n.__importDefault(e(25946)),p=n.__importDefault(e(14041)),_=e(48412),s=e(69587);let g;t.destroyFns=[];const c=u=>{g={x:u.pageX,y:u.pageY},setTimeout(()=>g=null,100)};typeof window<"u"&&window.document&&window.document.documentElement&&(0,E.default)(document.documentElement,"click",c);class h extends p.default.Component{constructor(){super(...arguments),this.handleCancel=d=>{const{onCancel:v}=this.props;v&&v(d)},this.handleOk=d=>{const{onOk:v}=this.props;v&&v(d)},this.renderFooter=d=>{const{okText:v,okType:f,cancelText:a,confirmLoading:b}=this.props;return p.default.createElement("div",null,p.default.createElement(_.Button,{onClick:this.handleCancel,...this.props.cancelButtonProps},a||d.cancelText),p.default.createElement(_.Button,{type:f,loading:b,onClick:this.handleOk,...this.props.okButtonProps},v||d.okText))},this.renderModal=()=>{const{prefixCls:d,footer:v,visible:f,wrapClassName:a,centered:b,getContainer:y,closeIcon:S,closable:A=!0,...T}=this.props,w=d||"kt-modal",D=this.renderFooter((0,s.getConfirmLocale)()),I=p.default.createElement("span",{className:`${w}-close-x`},S||p.default.createElement(r.default,{className:`${w}-close-icon`}));return p.default.createElement(m.default,{...T,animation:this.props.animation,getContainer:y,prefixCls:w,className:(0,o.default)({[`${w}-centered`]:!!b},a),footer:v===void 0?D:v,visible:f,mousePosition:g,onClose:this.handleCancel,closeIcon:I})}}render(){return this.renderModal()}}h.defaultProps={width:520,confirmLoading:!1,visible:!1,okType:"primary"},h.propTypes={prefixCls:l.default.string,onOk:l.default.func,onCancel:l.default.func,okText:l.default.node,cancelText:l.default.node,centered:l.default.bool,width:l.default.oneOfType([l.default.number,l.default.string]),confirmLoading:l.default.bool,visible:l.default.bool,footer:l.default.node,title:l.default.node,closable:l.default.bool,closeIcon:l.default.node},t.default=h},53017:(L,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:(L,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(l){l?n={...n,...l}:n={...e}}function o(){return n}},18875:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notification=void 0,t.open=g,t.close=c,t.update=h;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(70392),m=e(48412),E=e(50570),p=n.__importDefault(e(70748));e(1477);const _={[E.MessageType.Info]:15,[E.MessageType.Warning]:18,[E.MessageType.Error]:20};p.default.config({placement:"bottomRight"}),t.notification=p.default;const s=new Map;function g(d,v,f=!0,a,b,y,S,A){return(0,l.createCancelablePromise)(T=>(T.onCancellationRequested(()=>{c(a)}),new Promise(w=>{const D={key:a,className:(0,r.default)("kt-notification-wrapper",{"kt-notification-info":v===E.MessageType.Info,"kt-notification-error":v===E.MessageType.Error,"kt-notification-warn":v===E.MessageType.Warning}),duration:(0,l.isUndefined)(S)?_[v]:S,onClose:()=>{A&&A(),s.delete(a),w(void 0)},btn:b?b.map((I,O)=>{const P=typeof I=="string",R={className:`${(0,r.default)("kt-notification-button")}${P?"":I.class}`,ghost:P?O===0:!I.primary,key:P?I:I.id,onClick:()=>{w(I),p.default.close(a),P||I.run()}},M=P?I:I.label;return o.default.createElement(m.Button,{size:"small",...R},M)}):null,message:d,description:y};s.set(a,[v,D]),f||(D.closeIcon=o.default.createElement("span",null)),u(v,D)})))}function c(d){t.notification.close(d)}function h(d,v){const f=s.get(d);u(f[0],{...f[1],key:d,message:v})}function u(d,v){switch(d){case E.MessageType.Info:t.notification.info(v);break;case E.MessageType.Warning:t.notification.warning(v);break;case E.MessageType.Error:t.notification.error(v);break;default:t.notification.open(v);break}}},70748:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(55435)),o=n.__importDefault(e(31079)),l=n.__importDefault(e(22143)),m=n.__importDefault(e(5550)),E=n.__importDefault(e(74339)),p=n.__importDefault(e(10435)),_=n.__importDefault(e(14041)),s=e(70392),g={};let c=4.5,h=24,u=24,d="topRight",v,f;function a(w){const{duration:D,placement:I,bottom:O,top:P,getContainer:R,closeIcon:M}=w;D!==void 0&&(c=D),I!==void 0&&(d=I),O!==void 0&&(u=O),P!==void 0&&(h=P),R!==void 0&&(v=R),M!==void 0&&(f=M)}function b(w,D=h,I=u){let O;switch(w){case"topLeft":O={left:0,top:D,bottom:"auto"};break;case"topRight":O={right:0,top:D,bottom:"auto"};break;case"bottomLeft":O={left:0,top:"auto",bottom:I};break;default:O={right:0,top:"auto",bottom:I};break}return O}function y({prefixCls:w,placement:D=d,getContainer:I=v,top:O,bottom:P,closeIcon:R=f},M){const k=`${w}-${D}`;if(g[k]){M(g[k]);return}const B=_.default.createElement("span",{className:`${w}-close-x`},R||_.default.createElement(l.default,{className:`${w}-close-icon`}));p.default.newInstance({prefixCls:w,className:`${w}-${D}`,style:b(D,O,P),getContainer:I,closeIcon:B},x=>{g[k]=x,M(x)})}const S={success:r.default,info:E.default,error:o.default,warning:m.default};function A(w){const D=w.prefixCls||"kt-notification",I=`${D}-notice`,O=(0,s.isUndefined)(w.duration)?c:w.duration;let P=null;w.icon?P=_.default.createElement("span",{className:`${I}-icon`},w.icon):w.type&&(P=_.default.createElement(S[w.type]||null,{className:`${I}-icon ${I}-icon-${w.type}`}));const{placement:R,top:M,bottom:k,getContainer:B,closeIcon:x}=w;y({prefixCls:D,placement:R,top:M,bottom:k,getContainer:B,closeIcon:x},N=>{N.notice({content:_.default.createElement("div",{className:P?`${I}-with-icon`:""},P,_.default.createElement("div",{className:`${I}-message`},w.message),_.default.createElement("div",{className:`${I}-description`},w.description),w.btn?_.default.createElement("span",{className:`${I}-btn`},w.btn):null),duration:O,closable:!0,onClose:w.onClose,onClick:w.onClick,key:w.key,style:w.style||{},className:w.className})})}const T={open:A,close(w){Object.keys(g).forEach(D=>g[D].removeNotice(w))},config:a,destroy(){Object.keys(g).forEach(w=>{g[w].destroy(),delete g[w]})}};["success","info","warning","error"].forEach(w=>{T[w]=D=>T.open({...D,type:w})}),T.warn=T.warning,t.default=T},79024:(L,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)),l=e(53017);e(45531);const m=({maskClosable:E=!1,closable:p=!0,className:_,onClose:s,children:g,footer:c,title:h,getContainer:u,keyboard:d,...v})=>o.default.createElement(l.Modal,{footer:c||null,maskClosable:E,closable:p,onCancel:s,title:h,getContainer:u,className:(0,r.default)("kt-overlay",_),keyboard:d,...v},g);t.Overlay=m},91397:(L,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)),l=n.__importStar(e(14041));e(14856);const m=e(48412);var E;(function(s){s.hover="hover",s.click="click",s.focus="focus"})(E||(t.PopoverTriggerType=E={}));var p;(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"})(p||(t.PopoverPosition=p={}));const _=({children:s,trigger:g=E.hover,visible:c,content:h,position:u=p.top,showArrow:d=!0,title:v,titleClassName:f,overlay:a,overlayClassName:b,overlayStyle:y,action:S,delay:A,zIndex:T=1e3,onClickAction:w,onVisibleChange:D,getTooltipContainer:I,...O})=>{const P=(0,l.useCallback)(M=>{w&&w(M)},[w]),R=(0,l.useMemo)(()=>a||(!v&&!h?null:l.default.createElement(l.default.Fragment,null,v&&l.default.createElement("p",{className:(0,r.default)("kt-popover-title",f)},v,S&&l.default.createElement(m.Button,{size:"small",type:"link",onClick:P},S)),h||"")),[a,h,S,P]);return R?l.default.createElement(o.default,{...O,visible:c,placement:u,mouseEnterDelay:A?A/1e3:void 0,trigger:g,showArrow:d,onVisibleChange:D,overlayClassName:b,prefixCls:"kt-popover",overlayStyle:y,getTooltipContainer:I,overlay:R,zIndex:T},l.default.createElement("div",{className:"kt-popover-trigger"},s)):s};t.Popover=_},8573:(L,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)),l=n.__importDefault(e(19686)),m=e(58723),E=e(77011);t.RECYCLE_LIST_STABILIZATION_TIME=500,t.RECYCLE_LIST_OVER_SCAN_COUNT=50;const p=({width:_,height:s,maxHeight:g,minHeight:c,className:h,style:u,data:d,onReady:v,onScroll:f,itemHeight:a,header:b,footer:y,template:S,paddingBottomSize:A,getSize:T,hiddenVerticalScrollbar:w,hiddenHorizontalScrollbar:D})=>{const I=(0,o.useRef)(),O=(0,o.useRef)(),P=(0,o.useRef)({}),R=(0,o.useRef)(0),M=(0,o.useRef)();(0,o.useEffect)(()=>{typeof v=="function"&&v({scrollTo:H=>{var X;(X=I.current)===null||X===void 0||X.scrollTo(H)},scrollToIndex:(H,X="start")=>{var J,re;let ce=H;if(b&&ce++,typeof a=="number")(J=I.current)===null||J===void 0||J.scrollToItem(ce,X);else{M.current&&clearTimeout(M.current);const Ae=(P.current?Object.keys(P.current):[]).slice(0,ce).reduce((te,Le)=>te+B(Le),0);(re=I.current)===null||re===void 0||re.scrollToItem(H,X),M.current=setTimeout(()=>{var te;(P.current?Object.keys(P.current):[]).slice(0,ce).reduce((oe,le)=>oe+B(le),0)!==Ae&&((te=I.current)===null||te===void 0||te.scrollToItem(H,X)),M.current=null},t.RECYCLE_LIST_STABILIZATION_TIME)}}})},[]);const k=($,H)=>{var X;P.current[$]!==H&&(P.current={...P.current,[$]:H},I.current&&((X=I.current)===null||X===void 0||X.resetAfterIndex(0)))},B=(0,o.useCallback)($=>T?T(Number($)):(P?.current||[])[$]||a||100,[a,T]),x=(0,o.useCallback)(()=>{if(g){let $=0;for(let H=0;H<d.length;H++)$+=B(H);return $>g?g:$}},[g,d]),N=(0,o.useCallback)(()=>{if(c)return c},[c,d]),j=(0,o.useMemo)(()=>{let $=d.length;return b&&$++,y&&$++,$},[d,y,b]),K=({index:$,style:H})=>{let X;if($===0&&b)return o.default.createElement("div",{style:H},o.default.createElement(b,null));if($+1===j&&y)return o.default.createElement("div",{style:H},o.default.createElement(y,null));if(b?X=d[$-1]:X=d[$],!X)return o.default.createElement("div",{style:H});const J={"aria-setsize":j,"aria-posinset":$};return o.default.createElement("div",{tabIndex:0,style:H,role:"listitem",...J},o.default.createElement(S,{data:X,index:$}))},U=({index:$,style:H})=>{const X=(0,o.useRef)(null),J=(0,o.useRef)(),re=()=>{if(X.current){let fe=0;for(let Ae=0;Ae<X.current.children.length;Ae++)fe+=X.current.children[Ae].getBoundingClientRect().height;k($,fe)}};(0,o.useEffect)(()=>{if(X.current&&I.current){J.current=new MutationObserver(()=>{re()});const fe={childList:!0,attributes:!0,characterData:!0,attributeFilter:["class","style"],attributeOldValue:!0,characterDataOldValue:!0};J.current.observe(X.current,fe),re()}return()=>{J.current.disconnect()}},[X.current]);let ce;return $===0&&b?o.default.createElement("div",{style:H},o.default.createElement(b,null)):$+1===j&&y?o.default.createElement("div",{style:H},o.default.createElement(y,null)):(b?ce=d[$-1]:ce=d[$],ce?o.default.createElement("div",{style:H,ref:X},o.default.createElement(S,{data:ce,index:$})):o.default.createElement("div",{style:H}))},Q=(0,o.useMemo)(()=>d.reduce((H,X)=>H+B(X),0)/d.length,[d]),z=(0,o.useCallback)($=>{R.current=$.scrollOffset,f&&f($)},[f]),G=(0,o.useMemo)(()=>(0,o.forwardRef)(($,H)=>{const{style:X,...J}=$;return o.default.createElement("div",{ref:H,style:{...X,height:`${parseFloat(X.height)+(A||0)}px`},...J})}),[A]),Y=(0,o.useMemo)(()=>(0,o.forwardRef)(($,H)=>o.default.createElement(E.Scrollbars,{hiddenVertical:w,hiddenHorizontal:D,...$,thumbSize:10,forwardedRef:H})),[w,D]);return(()=>{const $=typeof a!="number",H=!_||!s;return(()=>{const J=({width:re,height:ce})=>{O.current&&(O.current.scrollTop=R.current);const fe=x(),Ae=N();let te=ce;return Ae?te=Math.min(ce,Ae):fe&&(te=fe),$?o.default.createElement(m.VariableSizeList,{onScroll:z,width:re,height:te,itemData:[],itemSize:B,itemCount:j,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:I,style:{transform:"translate3d(0px, 0px, 0px)",...u},className:(0,r.default)(h,"kt-recycle-list"),innerElementType:G,outerElementType:Y,estimatedItemSize:Q},U):o.default.createElement(m.FixedSizeList,{onScroll:z,width:re,height:te,itemData:[],itemSize:a,itemCount:j,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:I,outerRef:O,style:{transform:"translate3d(0px, 0px, 0px)",...u},className:(0,r.default)(h,"recycle-list"),innerElementType:G,outerElementType:Y},K)};return H?o.default.createElement(l.default,null,J):J({width:_,height:s})})()})()};t.RecycleList=p},34128:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(8573),t)},57621:(L,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)),l=e(58723),m=e(70392),E=e(77011),p=e(48103),_=e(65601),s=e(43685),g=e(13429),c=e(34054);var h;(function(v){v[v.RENDER_ITEM=0]="RENDER_ITEM",v[v.GET_RENDED_KEY=1]="GET_RENDED_KEY",v[v.RENDER_ERROR=2]="RENDER_ERROR"})(h||(t.RenderErrorType=h={}));const u=o.default.forwardRef((v,f)=>{const{style:a,...b}=v;return o.default.createElement("div",{ref:f,style:{...a,height:`${parseFloat(a.height)+d.PADDING_BOTTOM_SIZE}px`},...b})});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 m.DisposableCollection,this.onErrorEmitter=new m.Emitter,this.onDidUpdateEmitter=new m.Emitter,this.onDidModelChangeEmitter=new m.Emitter,this.newPromptInsertionIndex=-1,this.idToFilterRendererPropsCache=new Map,this.filterFlattenBranchChildrenCache=new Map,this.filterWatcherDisposeCollection=new m.DisposableCollection,this.queueUpdatePromise=null,this.updateCancelToken=new m.CancellationTokenSource,this.expandNodeCancelToken=new m.CancellationTokenSource,this.willUpdateTasks=0,this.queueUpdateThrottler=new m.Throttler,this.doBatchUpdate=(()=>{const f=(a,b)=>{if(this.disposables.disposed)return;const{root:y}=this.props.model;let S=-1;if(this.promptTargetID>-1&&this.promptHandle instanceof _.NewPromptHandle&&this.promptHandle.parent&&this.promptHandle.parent.expanded&&y.isItemVisibleAtSurface(this.promptHandle.parent)&&!this.promptHandle.destroyed){const A=y.getIndexAtTreeNodeId(this.promptTargetID);if(A>-1||this.promptHandle.parent===y)if(this.promptHandle.type===c.TreeNodeType.TreeNode){const T=this.promptHandle.parent;T?S=this.getNewPromptInsertIndex(A,T):S=A+1}else S=A+1;else this.promptTargetID=-1}if(S===-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed&&this.promptHandle.destroy(),this.newPromptInsertionIndex=S,this.idxToRendererPropsCache.clear(),b.isCancellationRequested){a();return}this.forceUpdate(()=>{a(),this.props.filter&&this.props.filterProvider&&this.props.filterProvider.filterAlways&&this.filterItems(this.props.filter)})};return()=>{const a=(S,A)=>{const T=!!this.willUpdateTasks;if(this.willUpdateTasks=0,!T)A.resolve();else{this.updateCancelToken.cancel(),this.updateCancelToken=new m.CancellationTokenSource;const w=this.updateCancelToken.token;requestAnimationFrame(()=>{if(w.isCancellationRequested){A();return}f(A,w)})}return S};let b;const y=new Promise(S=>b=S);return y.then(()=>{this.onDidUpdateEmitter.fire()}),a(y,b),y}})(),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,c.TreeNodeType.CompositeTreeNode),this.promptRename=async(f,a)=>{var b,y;const{root:S}=this.props.model,A=typeof f=="string"?await S.getTreeNodeByPath(f):f;if(!s.TreeNode.is(A)||s.CompositeTreeNode.isRoot(A))throw new TypeError(`Cannot rename object of type ${typeof A}`);const T=new p.RenamePromptHandle(a||A.name,A);return this.promptHandle=T,this.promptTargetID=A.id,S.isItemVisibleAtSurface(A)?await this.batchUpdate():await A.parent.setExpanded(!0),(y=(b=this.listRef)===null||b===void 0?void 0:b.current)===null||y===void 0||y.scrollToItem(S.getIndexAtTreeNodeId(this.promptTargetID)),this.promptHandle},this.expandNode=async f=>{const{root:a}=this.props.model,b=typeof f=="string"?a.getTreeNodeByPath(f):f;if(this.expandNodeCancelToken.token.isCancellationRequested&&(this.expandNodeCancelToken=new m.CancellationTokenSource),b&&s.CompositeTreeNode.is(b)&&!b.disposed)return b.setExpanded(!1,!1,!0,this.expandNodeCancelToken.token)},this.collapseNode=async f=>{const{root:a}=this.props.model,b=typeof f=="string"?a.getTreeNodeByPath(f):f;if(b&&s.CompositeTreeNode.is(b)&&!b.disposed)return this.expandNodeCancelToken.cancel(),b.setCollapsed()},this._isEnsuring=!1,this.ensureVisible=async(f,a="smart",b=!1)=>{if(this._isEnsuring)return;this._isEnsuring=!0;const{root:y}=this.props.model,S=typeof f=="string"?y.getTreeNodeByPath(f)||await y.loadTreeNodeByPath(f):f;if(S&&!y.isItemVisibleAtSurface(S)&&await y.loadTreeNodeByPath(S.path),!s.TreeNode.is(S)||s.CompositeTreeNode.isRoot(S)){this._isEnsuring=!1;return}return b?this.tryScrollIntoViewWhileStable(S,a):this.tryScrollIntoView(S,a),this._isEnsuring=!1,S},this.getItemAtIndex=f=>{const{filter:a}=this.props;if(a&&this.filterFlattenBranch.length>0)return this.idToFilterRendererPropsCache.get(this.filterFlattenBranch[f]);let b=this.idxToRendererPropsCache.get(f);if(!b){const y=this.newPromptInsertionIndex,{root:S}=this.props.model;if(y>-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed)if(f===y)b={itemType:c.TreeNodeType.NewPrompt,item:this.promptHandle};else{const A=S.getTreeNodeAtIndex(f-(f>=y?1:0));b={itemType:s.CompositeTreeNode.is(A)?c.TreeNodeType.CompositeTreeNode:c.TreeNodeType.TreeNode,item:A}}else{const A=S.getTreeNodeAtIndex(f);A&&A.id===this.promptTargetID&&this.promptHandle&&this.promptHandle.constructor===p.RenamePromptHandle&&!this.promptHandle.destroyed?b={itemType:c.TreeNodeType.RenamePrompt,item:this.promptHandle}:b={itemType:s.CompositeTreeNode.is(A)?c.TreeNodeType.CompositeTreeNode:c.TreeNodeType.TreeNode,item:A}}this.idxToRendererPropsCache.set(f,b)}return b},this.handleListScroll=({scrollOffset:f})=>{const{model:a,height:b,itemHeight:y}=this.props;if(a.state.saveScrollOffset(f),!this.promptHandle||!y)return;let S;this.promptHandle instanceof _.NewPromptHandle&&this.newPromptInsertionIndex>-1?S=this.newPromptInsertionIndex:S=a.root.getIndexAtTreeNodeId(this.promptHandle.id),(f+b<S*y||S*y<f)&&this.promptHandle.destroy()},this.getItemKey=f=>{const a=this.getItemAtIndex(f),{getItemKey:b}=this.props,y=b?b(a):void 0;return y??f},this.filterItems=f=>{const{model:{root:a},filterProvider:b}=this.props;if(this.filterWatcherDisposeCollection.dispose(),this.idToFilterRendererPropsCache.clear(),!f)return;const y=/\//.test(f),S=new Set,A=new Map,T=[];for(let w=0,D=a.branchSize;w<D;w++){const I=a.getTreeNodeAtIndex(w);T.push(I)}if(y)T.forEach(w=>{if(w&&w.path.indexOf(f)>-1){S.add(w.id);let D=w.parent;for(;D&&!s.CompositeTreeNode.isRoot(D);)S.add(D.id),D=D.parent}});else{let w=[];b?w=r.default.filter(f,T,b.fuzzyOptions()):w=r.default.filter(f,T,d.FILTER_FUZZY_OPTIONS);const D=I=>{const O=I.children||[];if(O.length>0)for(const P of O)S.add(P.id),s.CompositeTreeNode.is(P)&&P.expanded&&D(P)};w.forEach(I=>{const O=I.original;S.add(O.id);let P=O.parent;for(A.set(O.id,()=>o.default.createElement("div",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},dangerouslySetInnerHTML:{__html:I.string||""}})),s.CompositeTreeNode.is(O)&&D(O);P&&!s.CompositeTreeNode.isRoot(P);)S.add(P.id),P=P.parent})}this.filterFlattenBranch=new Array(S.size);for(let w=0,D=0,I=a.branchSize;D<I;D++){const O=a.getTreeNodeAtIndex(D);O&&S.has(O.id)&&(this.filterFlattenBranch[w]=O.id,s.CompositeTreeNode.is(O)?this.idToFilterRendererPropsCache.set(O.id,{item:O,itemType:c.TreeNodeType.CompositeTreeNode,template:A.has(O.id)?A.get(O.id):void 0}):this.idToFilterRendererPropsCache.set(O.id,{item:O,itemType:c.TreeNodeType.TreeNode,template:A.has(O.id)?A.get(O.id):void 0}),w++)}this.filterWatcherDisposeCollection.push(a.watcher.on(c.TreeNodeEvent.DidChangeExpansionState,(w,D)=>{const I=this.filterFlattenBranch.indexOf(w.id);if(D){const O=this.filterFlattenBranchChildrenCache.get(w.id);O&&O.length>0&&(this.filterFlattenBranch=(0,s.spliceArray)(this.filterFlattenBranch,I+1,0,O),this.filterFlattenBranchChildrenCache.delete(w.id))}else{const O=[];for(let P=I+1;P<this.filterFlattenBranch.length;P++){const R=a.getTreeNodeById(this.filterFlattenBranch[P]);if(R&&R.depth>w.depth)O.push(R.id);else break}this.filterFlattenBranchChildrenCache.set(w.id,O),this.filterFlattenBranch=(0,s.spliceArray)(this.filterFlattenBranch,I+1,O.length)}})),this.filterWatcherDisposeCollection.push(m.Disposable.create(()=>{this.filterFlattenBranchChildrenCache.clear()}))},this.renderItem=({index:f,style:a})=>{var b,y,S,A,T,w,D;const{children:I,overflow:O="ellipsis",supportDynamicHeights:P}=this.props,R=this.getItemAtIndex(f),M=(0,o.useRef)(null),k=(0,o.useMemo)(()=>P?()=>{let U=0;if(M.current){const Q=M.current;U=Array.from(Q.children).reduce((z,G)=>z+G.getBoundingClientRect().height,0)}return U&&(this.dynamicSizeMap.set(f,U),this.layoutItem()),Math.max(U,d.DEFAULT_ITEM_HEIGHT)}:()=>{},[P]);if((0,o.useEffect)(()=>{M.current&&k()},[]),!R)return o.default.createElement(o.default.Fragment,null);const{item:B,itemType:x,template:N}=R;if(!B)return o.default.createElement("div",{style:a});let j;s.CompositeTreeNode.is(B)?j={"aria-label":(b=B.accessibilityInformation)===null||b===void 0?void 0:b.label,"aria-expanded":B.expanded,"aria-level":B.depth,"aria-setsize":(S=(y=B.parent)===null||y===void 0?void 0:y.children)===null||S===void 0?void 0:S.length,"aria-posinset":f}:s.TreeNode.is(B)&&(j={"aria-label":(A=B.accessibilityInformation)===null||A===void 0?void 0:A.label,"aria-level":B.depth,"aria-setsize":(w=(T=B.parent)===null||T===void 0?void 0:T.children)===null||w===void 0?void 0:w.length,"aria-posinset":f});const K=O==="ellipsis"?a:{...a,width:"auto",minWidth:"100%"};return o.default.createElement("div",{ref:M,style:K,role:((D=B.accessibilityInformation)===null||D===void 0?void 0:D.role)||"treeiem",...j},o.default.createElement(g.NodeRendererWrap,{item:B,depth:B.depth,itemType:x,template:N,hasPrompt:!!this.promptHandle&&!this.promptHandle.destroyed,expanded:s.CompositeTreeNode.is(B)?B.expanded:void 0},I))},this.layoutItem=()=>{var f,a,b,y;if(this.props.supportDynamicHeights&&this.listRef&&!((f=this.listRef)===null||f===void 0)&&f.current&&"_getRangeToRender"in((a=this.listRef)===null||a===void 0?void 0:a.current)){const S=(b=this.listRef)===null||b===void 0?void 0:b.current._getRangeToRender();if(S){const A=S[0];((y=this.listRef)===null||y===void 0?void 0:y.current).resetAfterIndex(A)}}}}getNewPromptInsertIndex(f,a){const{root:b}=this.props.model;let y=f+1;for(;y-f<=a.branchSize;y++){const S=b.getTreeNodeAtIndex(y);if(!S)return y;if(!s.CompositeTreeNode.is(S)){if(S?.depth>a.depth+1)continue;return y}}return y}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 a,b;if(this.props.model!==f.model){this.disposables.dispose();const{model:y}=this.props;(b=(a=this.listRef)===null||a===void 0?void 0:a.current)===null||b===void 0||b.scrollTo(y.state.scrollOffset),this.disposables.push(y.onChange(this.batchUpdate.bind(this))),this.disposables.push(y.state.onDidLoadState(()=>{var S,A;(A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollTo(y.state.scrollOffset)})),this.onDidModelChangeEmitter.fire({preModel:f.model,nextModel:y})}}async promptNew(f,a=c.TreeNodeType.TreeNode){var b,y;const{root:S}=this.props.model;let A=typeof f=="string"?await S.getTreeNodeByPath(f):f;if(a!==c.TreeNodeType.TreeNode&&a!==c.TreeNodeType.CompositeTreeNode)throw new TypeError(`Invalid type supplied. Expected 'TreeNodeType.TreeNode' or 'TreeNodeType.CompositeTreeNode', got ${a}`);if(A&&!s.CompositeTreeNode.is(A)&&(A=A.parent,!s.CompositeTreeNode.is(A)))throw new TypeError(`Cannot create new prompt at object of type ${typeof A}`);if(!A)throw new Error(`Cannot find node at ${f}`);const T=new _.NewPromptHandle(a,A);return this.promptHandle=T,this.promptTargetID=A.id,A!==S&&(!A.expanded||!S.isItemVisibleAtSurface(A))?await A.setExpanded(!0):await this.batchUpdate(),this.newPromptInsertionIndex>=0?(y=(b=this.listRef)===null||b===void 0?void 0:b.current)===null||y===void 0||y.scrollToItem(this.newPromptInsertionIndex):this.tryScrollIntoViewWhileStable(this.promptHandle),this.promptHandle}tryScrollIntoView(f,a="auto"){var b,y,S,A;const{root:T}=this.props.model;f.constructor===_.NewPromptHandle&&!f.destroyed?(y=(b=this.listRef)===null||b===void 0?void 0:b.current)===null||y===void 0||y.scrollToItem(this.newPromptInsertionIndex):T.isItemVisibleAtSurface(f)&&((A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollToItem(T.getIndexAtTreeNode(f),a))}tryScrollIntoViewWhileStable(f,a="smart"){const{root:b}=this.props.model;if(this.tryEnsureVisibleTimes>d.TRY_ENSURE_VISIBLE_MAX_TIMES){this.tryEnsureVisibleTimes=0;return}m.Event.once(this.props.model.onChange)(async()=>{var y,S,A,T;await this.queueUpdatePromise,f.constructor===_.NewPromptHandle&&!f.destroyed?(S=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||S===void 0||S.scrollToItem(this.newPromptInsertionIndex):b.isItemVisibleAtSurface(f)?((T=(A=this.listRef)===null||A===void 0?void 0:A.current)===null||T===void 0||T.scrollToItem(b.getIndexAtTreeNode(f),a),this.tryEnsureVisibleTimes=0):(this.tryEnsureVisibleTimes++,this.tryScrollIntoViewWhileStable(f,a))})}componentDidMount(){var f,a;const{model:b,onReady:y}=this.props;if((a=(f=this.listRef)===null||f===void 0?void 0:f.current)===null||a===void 0||a.scrollTo(b.state.scrollOffset),this.disposables.push(b.onChange(this.batchUpdate.bind(this))),this.disposables.push(b.state.onDidLoadState(()=>{var S,A;(A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollTo(b.state.scrollOffset)})),typeof y=="function"){const S={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:m.Event.once(this.onDidUpdateEmitter.event),onError:this.onErrorEmitter.event};y(S)}}componentWillUnmount(){this.disposables.dispose()}set promptHandle(f){this._promptHandle!==f&&(this._promptHandle instanceof p.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:a}=this.props;return a?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:a,width:b="100%",height:y,style:S,className:A,placeholder:T,overScanCount:w,leaveBottomBlank:D,supportDynamicHeights:I}=this.props;if(T&&this.adjustedRowCount===0){const P=T;return o.default.createElement(P,null)}const O={children:f,height:y,width:b,itemData:[],itemCount:this.adjustedRowCount,itemKey:this.getItemKey,overscanCount:w||d.DEFAULT_OVER_SCAN_COUNT,onScroll:this.handleListScroll,style:{transform:"translate3d(0px, 0px, 0px)",...S},className:A,outerElementType:E.ScrollbarsVirtualList};return D&&(O.innerElementType=u),I?o.default.createElement(l.VariableSizeList,{ref:this.listRef,itemSize:this.getItemSize.bind(this),...O},this.renderItem):o.default.createElement(l.FixedSizeList,{ref:this.listRef,itemSize:a,...O},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:v=>v?.name||""},d.DEFAULT_OVER_SCAN_COUNT=50},13429:(L,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:m,itemType:E,children:p,template:_,hasPrompt:s}=this.props;return r.default.createElement(p,{item:m,itemType:E,template:_,hasPrompt:s,key:m.id})}shouldComponentUpdate(m){return!0}}t.NodeRendererWrap=o},75821:(L,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)),l=e(58998),m=e(57621),E=e(64013),p=e(84225),_=e(17462),s=e(78569),g=e(45203);e(12794),e(34728),n.__exportStar(e(92532),t);const c=({width:h,height:u,itemHeight:d=22,itemClassname:v,indent:f,baseIndent:a,containerClassname:b,onClick:y,onContextMenu:S,onTwistierClick:A,onIconClick:T,onDbClick:w,resolveChildren:D,sortComparator:I,treeData:O,inlineMenus:P,inlineMenuActuator:R,onReady:M,contextMenus:k,contextMenuActuator:B,treeName:x,leaveBottomBlank:N=!0})=>{const[j,K]=(0,r.useState)({show:!1}),[U,Q]=(0,r.useState)([]),[z,G]=(0,r.useState)(),Y=(0,r.useRef)(!1),Z=(0,r.useRef)(),$=(0,r.useRef)(),H=(0,r.useRef)(null),X=(0,r.useCallback)(be=>{var Ce;return r.default.createElement(_.BasicTreeNodeRenderer,{item:be.item,itemType:be.itemType,itemHeight:d,indent:f,baseIndent:a,className:v,inlineMenus:P,inlineMenuActuator:R,onClick:fe,onDbClick:te,onContextMenu:Le,onTwistierClick:oe,onIconClick:Ae,decorations:(Ce=Z.current)===null||Ce===void 0?void 0:Ce.decorations.getDecorations(be.item)})},[z]);(0,r.useEffect)(()=>{var be,Ce;Z.current=new g.BasicTreeService(O,D,I,{treeName:x});const Ne=(be=Z.current)===null||be===void 0?void 0:be.onDidUpdateTreeModel(Fe=>{J(Fe)}),tt=()=>{var Fe;(Fe=Z.current)===null||Fe===void 0||Fe.enactiveFocusedDecoration()};return(Ce=H.current)===null||Ce===void 0||Ce.addEventListener("blur",tt,!0),()=>{var Fe,$e;Y.current=!0,(Fe=H.current)===null||Fe===void 0||Fe.removeEventListener("blur",tt,!0),Ne.dispose(),($e=Z.current)===null||$e===void 0||$e.dispose()}},[]),(0,r.useEffect)(()=>{var be;(be=Z.current)===null||be===void 0||be.updateTreeData(O)},[O]);const J=async be=>{be&&await be.ensureReady,Y.current||G(be)},re=async be=>{var Ce;(Ce=Z.current)===null||Ce===void 0||Ce.activeFocusedDecoration(be),s.BasicCompositeTreeNode.is(be)&&Te(be)},ce=(0,r.useCallback)(be=>{M&&M({...be,selectItem:re,focusItem:async Ce=>{var Ne;const tt=`/${x}/${Ce}`;await z?.ensureReady;const Fe=await be.ensureVisible(tt,"auto",!0);Fe&&((Ne=Z.current)===null||Ne===void 0||Ne.activeFocusedDecoration(Fe))}}),$.current=be},[Z.current]),fe=(0,r.useCallback)((be,Ce)=>{re(Ce),y&&y(be,Ce)},[y]),Ae=(0,r.useCallback)((be,Ce)=>{T&&T(be,Ce)},[T]),te=(0,r.useCallback)((be,Ce)=>{w&&w(be,Ce)},[w]),Le=(0,r.useCallback)((be,Ce)=>{var Ne,tt;if(Ce?(Ne=Z.current)===null||Ne===void 0||Ne.activeContextMenuDecoration(Ce):(tt=Z.current)===null||tt===void 0||tt.enactiveFocusedDecoration(),S)S(be,Ce);else{let Fe=[];Array.isArray(k)?Fe=k:typeof k=="function"&&(Fe=k(Ce));const $e=new Set,Se={};for(const ze of Fe)$e.add(ze.group||"-1"),Se[ze.group||"-1"]||(Se[ze.group||"-1"]=[]),Se[ze.group||"-1"].push(ze);const ae=Array.from($e).sort((ze,Qe)=>ze.localeCompare(Qe,"kn",{numeric:!0}));let ye=[];for(const ze of ae)ye=ye.concat(Se[ze].map(Qe=>({id:Qe.id,label:Qe.title,group:Qe.group}))),ye=ye.concat([{id:`${ze}_divider`,label:"",type:"divider"}]);ye.pop(),JSON.stringify(ye)!==JSON.stringify(U)&&Q(ye);const{x:Re,y:Be}=be.nativeEvent;K({show:!0,point:{pageX:Re,pageY:Be},activeNode:Ce})}},[w]),Te=(0,r.useCallback)(be=>{var Ce,Ne;be.expanded?(Ce=$.current)===null||Ce===void 0||Ce.collapseNode(be):(Ne=$.current)===null||Ne===void 0||Ne.expandNode(be)},[]),oe=(0,r.useCallback)((be,Ce)=>{s.BasicCompositeTreeNode.is(Ce)&&Te(Ce),A&&A(be,Ce)},[A]),le=(0,r.useCallback)(()=>{var be;(be=Z.current)===null||be===void 0||be.enactiveFocusedDecoration()},[]),Ee=(0,r.useCallback)((be,Ce)=>{S&&S(be,Ce)},[]),we=(0,r.useCallback)(()=>{K({...j,show:!1})},[j]),ve=(0,r.useCallback)(()=>k?r.default.createElement(o.default,{popupPlacement:"bottomLeft",popupVisible:j.show,action:["contextMenu"],popupAlign:{overflow:{adjustX:1,adjustY:1},offset:[window.scrollX,window.scrollY]},point:j.point||{},builtinPlacements:p.placements,popup:r.default.createElement(l.ClickOutside,{className:"basic_tree_menubars",mouseEvents:["click","contextmenu"],onOutsideClick:we},U.map(({id:be,label:Ce,type:Ne})=>r.default.createElement(E.BasicMenuItem,{key:be,id:be,label:Ce,type:Ne,focusMode:j.show,onClick:tt=>{B&&B(j.activeNode,tt),K({show:!1})}}))),alignPoint:!0}):null,[U,B,j]);return r.default.createElement("div",{className:"basic_tree",tabIndex:-1,ref:H,onClick:le,onContextMenu:Ee},ve(),z?r.default.createElement(m.RecycleTree,{height:u,width:h,itemHeight:d,model:z,onReady:ce,className:b,leaveBottomBlank:N},X):null)};t.BasicRecycleTree=c},64013:(L,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)),l=({id:m,label:E,type:p,focusMode:_,onClick:s})=>{const[g,c]=o.default.useState(!1),h=o.default.useCallback(()=>{c(_?!0:d=>!d),s(m)},[m]),u=o.default.useCallback(()=>{},[m,_]);return p==="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},E)};t.BasicMenuItem=l},84225:(L,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:(L,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(E,p,_,s={}){super(E,p,void 0,{treeName:s.treeName}),this._raw=_}get name(){var E;return(E=this.getMetadata("treeName"))!==null&&E!==void 0?E:`BasicTreeRoot_${this.id}`}get raw(){return this._raw}get expanded(){return!0}}t.BasicTreeRoot=r;class o extends n.CompositeTreeNode{constructor(E,p,_,s){super(E,p,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 l extends n.TreeNode{constructor(E,p,_,s){super(E,p,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=l},17462:(L,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)),l=e(48412),m=e(54713),E=e(3660),p=e(78569),_=e(92532);e(12794);const s=({item:g,className:c,itemHeight:h=22,indent:u=8,baseIndent:d=8,onClick:v,onDbClick:f,onTwistierClick:a,onIconClick:b,onContextMenu:y,decorations:S,inlineMenus:A=[],inlineMenuActuator:T=()=>{}})=>{const w=(0,o.useCallback)(Y=>{v&&(Y.stopPropagation(),v(Y,g))},[v]),D=(0,o.useCallback)(Y=>{f&&(Y.stopPropagation(),f(Y,g))},[f]),I=(0,o.useCallback)(Y=>{y&&(Y.stopPropagation(),Y.preventDefault(),y(Y,g))},[y]),O=(0,o.useCallback)(Y=>{Y.stopPropagation(),a?a(Y,g):v&&v(Y,g)},[v,a]),P=(0,o.useCallback)(Y=>{Y.stopPropagation(),b?b(Y,g):v&&v(Y,g)},[v,b]);let M=(g.depth>0?g.depth-1:0)*u;d&&(M+=d),g.indentOffset&&(M+=g.indentOffset);const k={height:h,lineHeight:`${h}px`,paddingLeft:`${M}px`},B=(0,o.useCallback)(Y=>o.default.createElement(m.Icon,{onClick:P,icon:Y.icon,className:(0,r.default)("icon",Y.iconClassName)}),[]),x=(0,o.useCallback)(Y=>Y.displayName.replace(/\n/g,"\u21B5"),[]),N=(0,o.useCallback)(Y=>Y.displayName&&o.default.createElement("div",{className:(0,r.default)("segment","display_name")},x(Y)),[]),j=(0,o.useCallback)(Y=>Y.renderLabel,[]),K=(0,o.useCallback)(Y=>Y.description?typeof Y.description=="string"?o.default.createElement("div",{className:(0,r.default)("segment_grow","description")},Y.description):Y.description:null,[]),U=(0,o.useCallback)(Y=>{if(Array.isArray(A))return A;if(typeof A=="function")return A(Y)},[A]),Q=()=>{var Y;const Z=p.BasicCompositeTreeNode.is(g),$=(Y=U(g))===null||Y===void 0?void 0:Y.filter(X=>Z?X.position===_.IBasicInlineMenuPosition.TREE_CONTAINER:X.position===_.IBasicInlineMenuPosition.TREE_NODE);if(!$?.length)return null;const H=(0,o.useCallback)((X,J)=>{X.stopPropagation(),T(g,J)},[]);return o.default.createElement("div",{className:(0,r.default)("segment","tail")},$.map(X=>o.default.createElement(l.Button,{style:{marginRight:"5px"},type:"icon",key:`${g.id}-${X.icon}`,icon:X.icon,title:X.title,onClick:J=>H(J,X)})))},z=(Y,Z)=>S&&S?.classlist.indexOf(_.DECORATIONS.LOADING)>-1?o.default.createElement(E.Loading,null):o.default.createElement(m.Icon,{className:(0,r.default)("segment","expansion_toggle",Y.twisterClassName,{mod_collapsed:!Y.expanded}),onClick:Z,icon:"arrow-right"}),G=Y=>{if(!Y.expandable)return o.default.createElement("div",{className:(0,r.default)("segment","expansion_toggle",Y.twisterPlaceholderClassName)});if(p.BasicCompositeTreeNode.is(Y))return z(Y,O)};return o.default.createElement("div",{key:g.id,onClick:w,onDoubleClick:D,onContextMenu:I,className:(0,r.default)("tree_node",c,S?S.classlist:null,g.className),style:k,"data-id":g.id},o.default.createElement("div",{className:"content"},G(g),B(g),o.default.createElement("div",{className:"overflow_wrap"},j(g)||N(g),K(g)),Q()))};t.BasicTreeNodeRenderer=s},45203:(L,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),l=e(78569),m=e(92532);class E extends r.Tree{constructor(s,g,c,h={}){super(),this._treeData=s,this._resolveChildren=g,this._sortComparator=c,this.treeOptions=h,this.selectedDecoration=new r.Decoration(m.DECORATIONS.SELECTED),this.focusedDecoration=new r.Decoration(m.DECORATIONS.FOCUSED),this.contextMenuDecoration=new r.Decoration(m.DECORATIONS.ACTIVED),this.loadingDecoration=new r.Decoration(m.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 v=this._sortComparator(u.raw,d.raw);if(typeof v<"u")return v}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 l.BasicTreeRoot(this,void 0,{children:this._treeData,label:"",command:"",icon:""},{treeName:this.treeOptions.treeName}),this._model=new p,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 c=[];for(const h of g)h.children?c.push(new l.BasicCompositeTreeNode(this,s,h)):c.push(new l.BasicTreeNode(this,s,h));return c}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=E;class p extends r.TreeModel{}t.BasicTreeModel=p},92532:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTreeAdaptiveDecorator=void 0;const r=e(85608).__importDefault(e(14041)),o=e(34054),l=m=>E=>{const{model:p,itemHeight:_,onReady:s}=E,g=r.default.useRef(),c=r.default.useRef(!1),[h,u]=r.default.useState(0),d=()=>{u(p.root.branchSize*_)},v=f=>{s&&s({...f,promptNewTreeNode:async a=>{var b;const y=await f.promptNewTreeNode(a);return!((b=g.current)===null||b===void 0)&&b.root.branchSize?u(g.current.root.branchSize*_+_):u(_),c.current=!1,y.onDestroy(()=>{var S;!((S=g.current)===null||S===void 0)&&S.root.branchSize&&u(g.current.root.branchSize*_)}),y.onCancel(()=>{g.current&&u(g.current.root.branchSize*_)}),y.onBlur(()=>c.current),y},promptNewCompositeTreeNode:async a=>{var b;const y=await f.promptNewCompositeTreeNode(a);return!((b=g.current)===null||b===void 0)&&b.root.branchSize?u(g.current.root.branchSize*_+_):u(_),y.onDestroy(()=>{var S;!((S=g.current)===null||S===void 0)&&S.root.branchSize&&u(g.current.root.branchSize*_)}),y.onCancel(()=>{var S;!((S=g.current)===null||S===void 0)&&S.root.branchSize&&u(g.current.root.branchSize*_)}),y.onBlur(()=>c.current),y}})};return r.default.useEffect(()=>{g.current=p,g.current.root&&(u(g.current.root.branchSize*_),g.current.root.watcher.on(o.TreeNodeEvent.DidChangeExpansionState,d))},[p]),r.default.useEffect(()=>{setTimeout(()=>{c.current=!0},100)},[h]),r.default.createElement(r.default.Fragment,null,r.default.createElement(m,{...E,height:h,onReady:v}))};t.RecycleTreeAdaptiveDecorator=l},326:(L,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)),l=e(54713),m=e(50708),E=e(4981);e(69715);const p=30,_=500,s=c=>{const{localize:h}=o.default.useContext(E.LocalizeContext);return o.default.createElement("div",{className:"kt-recycle-tree-filter-wrapper"},o.default.createElement(m.Input,{hasClear:!0,autoFocus:!0,className:"kt-recycle-tree-filter-input",size:"small",...c,placeholder:c.placeholder||h("tree.filter.placeholder"),addonBefore:o.default.createElement(l.Icon,{className:"kt-recycle-tree-filter-icon",icon:"retrieval"})}))},g=c=>h=>{const[u,d]=o.default.useState(""),[v,f]=o.default.useState(""),{beforeFilterValueChange:a,filterEnabled:b,height:y,filterPlaceholder:S,filterAfterClear:A,onReady:T,onFilterBlur:w,filterAutoFocus:D,...I}=h,O=(0,r.default)(async M=>{a&&await a(M),f(M)},_),P=(0,o.useCallback)(M=>{d(M),O(M)},[u]),R=(0,o.useCallback)(M=>{T&&T({...M,clearFilter:()=>{f(""),d("")}})},[T]);return o.default.createElement(o.default.Fragment,null,b&&o.default.createElement(s,{afterClear:A,placeholder:S,value:u,autoFocus:D,onBlur:w,onValueChange:P}),o.default.createElement(c,{...I,height:y-(b?p:0),onReady:R,filter:v}))};t.RecycleTreeFilterDecorator=g},72731:(L,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:(L,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:(L,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(m,E){super(),this.type=m,this.parent=E,this._id=n.TreeNode.nextId()}get id(){return this._id}get depth(){return this.parent.depth+1}}t.NewPromptHandle=o},65747:(L,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),l=_=>new Promise(s=>setTimeout(s,_));var m;(function(_){_[_.INFO=1]="INFO",_[_.ERROR=2]="ERROR",_[_.WARNING=3]="WARNING"})(m||(t.PROMPT_VALIDATE_TYPE=m={}));var E;(function(_){_.INFO="validate-info",_.ERROR="validate-error",_.WARNING="validate-warning"})(E||(t.VALIDATE_CLASS_NAME=E={}));class p{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(c=>c.result===!1||!!c.err))return;this.destroy()}if(s.key==="Enter"){if(this.isInPendingCommitState=!0,this.$.disabled=!0,(await this.onCommitEmitter.fireAndAwait(this.$.value)).some(c=>c.result===!1||!!c.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 l(0),!(!this.$.isConnected&&!this.destroyed||(await this.onBlurEmitter.fireAndAwait(this.$.value)).some(c=>c.result===!1||!!c.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,c;!this._hasAddonAfter&&!this._destroyed&&((c=(g=this.$.parentElement)===null||g===void 0?void 0:g.parentElement)===null||c===void 0||c.appendChild(this.$addonAfter),this._hasAddonAfter=!0);const h=document.createElement("div");h.setAttribute("class",s),this.$addonAfter.appendChild(h)}removeAddonAfter(){var s,g,c;this._hasAddonAfter&&((s=this.$addonAfter.firstChild)===null||s===void 0||s.remove(),(c=(g=this.$.parentElement)===null||g===void 0?void 0:g.parentElement)===null||c===void 0||c.removeChild(this.$addonAfter),this._hasAddonAfter=!1)}addValidateMessage(s){var g,c,h,u,d,v,f;!this._hasValidateElement&&!this._destroyed&&((h=(c=(g=this.$.parentElement)===null||g===void 0?void 0:g.parentElement)===null||c===void 0?void 0:c.parentElement)===null||h===void 0||h.appendChild(this.$validate),this._hasValidateElement=!0);let a="validate-message popup ";s&&s.type===m.ERROR?this._validateClassName=E.ERROR:s&&s.type===m.WARNING?this._validateClassName=E.WARNING:this._validateClassName=E.INFO,a+=this._validateClassName,this.$validate.classList.value=a,this.$validate.innerHTML=(0,o.toMarkdownHtml)(s.message||"",{renderer:this.markdownRenderer}),(d=(u=this.$.parentElement)===null||u===void 0?void 0:u.parentElement)===null||d===void 0||d.classList.remove(E.INFO,E.ERROR,E.WARNING),(f=(v=this.$.parentElement)===null||v===void 0?void 0:v.parentElement)===null||f===void 0||f.classList.add(this._validateClassName)}removeValidateMessage(){var s,g,c,h,u;this._hasValidateElement&&((c=(g=(s=this.$.parentElement)===null||s===void 0?void 0:s.parentElement)===null||g===void 0?void 0:g.parentElement)===null||c===void 0||c.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=p},58357:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenamePromptHandle=void 0;const n=e(65747);class r extends n.PromptHandle{constructor(l,m){super(),this.originalFileName=l,this.target=m,this.$.value=l,this.setSelectionRange(0,l.lastIndexOf("."))}get id(){return this.target.id}get depth(){return this.target.depth}}t.RenamePromptHandle=r},48103:(L,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:(L,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 m;this.toDispose.dispose(),(m=this._root)===null||m===void 0||m.dispose()}get root(){return this._root}set root(m){var E;m!==this._root&&((E=this._root)===null||E===void 0||E.dispose(),this._root=m)}fireChanged(){this.onChangedEmitter.fire(void 0)}sortComparator(m,E){return m.constructor===E.constructor?m.name>E.name?1:m.name<E.name?-1:0:r.CompositeTreeNode.is(m)?-1:r.CompositeTreeNode.is(E)?1:0}}t.Tree=o},26353:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeTreeNode=t.TreeNode=t.BranchOperatorStatus=void 0,t.spliceArray=l;const n=e(70392),r=e(34054),{Path:o}=n.path;function l(_,s,g=0,c){const h=_.slice(0);return h.splice(s,g,...c||[]),h}var m;(function(_){_[_.EXPANDED=1]="EXPANDED",_[_.SHRINKED=2]="SHRINKED"})(m||(t.BranchOperatorStatus=m={}));class E{static is(s){return!!s&&"depth"in s&&"name"in s&&"path"in s&&"id"in s}static getTreeNodeById(s){return E.idToTreeNode.get(s)}static getTreeNodeByPath(s){return E.pathToTreeNode.get(s)}static setTreeNode(s,g,c){E.idToTreeNode.set(s,c),E.pathToTreeNode.set(g,c)}static removeTreeNode(s,g){E.idToTreeNode.delete(s),E.pathToTreeNode.delete(g)}static getIdByPath(s){return E.pathToId.get(s)}static setIdByPath(s,g){return E.pathToId.set(s,g)}static getGlobalTreeState(s){let g=E.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 c=E.pathToGlobalTreeState.get(s);return c||(c={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),c={...c,...g},E.pathToGlobalTreeState.set(s,c),c}constructor(s,g,c,h){this._uid=E.nextId(),this._parent=g,this._tree=s,this._disposed=!1,this._visible=!0,this._metadata={...h||{}},this._depth=g?g.depth+1:0,c?this._watcher=c: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=new o(this.parent.path).join(this.name).toString():this._path=new o(`${o.separator}${this.name}`).toString()),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(E.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 c=this._metadata[s];this._metadata[s]=g,this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Updated,key:s,prevValue:c,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 c=this._parent;if(s===null||!p.is(s)){this.parent=void 0,this.dispose();return}const h=c!==s,u=this.path;this._depth=s.depth+1,(h||g!==this.name)&&(this.name=g,h&&this._watcher.notifyWillChangeParent(this,c,s),this.parent&&(this.parent.unlinkItem(this,!0),this.parent=s,this.parent.insertItem(this)),h&&this._watcher.notifyDidChangeParent(this,c,s)),this.path!==u&&this._watcher.notifyDidChangePath(this)}get visible(){return this._visible}setVisible(s){return this._visible=s,this}dispose(){this._disposed||(E.removeTreeNode(this.id,this.path),this._disposed=!0,this._watcher.notifyDidDispose(this))}}t.TreeNode=E,E.nextId=(()=>{let _=0;return()=>_++})(),E.idToTreeNode=new Map,E.pathToTreeNode=new Map,E.pathToId=new Map,E.pathToGlobalTreeState=new Map;class p extends E{static defaultSortComparator(s,g){return s.constructor===g.constructor?s.name>g.name?1:s.name<g.name?-1:0:p.is(s)?-1:p.is(g)?1:0}static is(s){return!!s&&"children"in s}static isRoot(s){return p.is(s)&&!s.parent}generatorWatcher(){const s=new n.Emitter,g=s.event,c=new n.DisposableCollection,h=d=>{this.watchEvents.delete(d)};return{notifyWillProcessWatchEvent:(d,v)=>{s.fire({type:r.TreeNodeEvent.WillProcessWatchEvent,args:[d,v]})},notifyWillChangeParent:(d,v,f)=>{s.fire({type:r.TreeNodeEvent.WillChangeParent,args:[d,v,f]})},notifyDidChangeParent:(d,v,f)=>{s.fire({type:r.TreeNodeEvent.DidChangeParent,args:[d,v,f]})},notifyDidDispose:d=>{s.fire({type:r.TreeNodeEvent.DidDispose,args:[d]})},notifyDidProcessWatchEvent:(d,v)=>{s.fire({type:r.TreeNodeEvent.DidProcessWatchEvent,args:[d,v]})},notifyDidChangePath:d=>{s.fire({type:r.TreeNodeEvent.DidChangePath,args:[d]})},notifyWillChangeExpansionState:(d,v)=>{const f=this.isItemVisibleAtSurface(d);s.fire({type:r.TreeNodeEvent.WillChangeExpansionState,args:[d,v,f]})},notifyDidChangeExpansionState:(d,v)=>{const f=this.isItemVisibleAtSurface(d);s.fire({type:r.TreeNodeEvent.DidChangeExpansionState,args:[d,v,f]})},notifyDidChangeMetadata:(d,v)=>{s.fire({type:r.TreeNodeEvent.DidChangeMetadata,args:[d,v]})},notifyDidUpdateBranch:()=>{s.fire({type:r.TreeNodeEvent.BranchDidUpdate,args:[]})},notifyWillResolveChildren:(d,v)=>{s.fire({type:r.TreeNodeEvent.WillResolveChildren,args:[d,v]})},notifyDidResolveChildren:(d,v)=>{s.fire({type:r.TreeNodeEvent.DidResolveChildren,args:[d,v]})},on:(d,v)=>{const f=g(a=>{a.type===d&&v(...a.args)});return c.push(f),f},onWatchEvent:(d,v)=>{const f=h;return this.watchEvents.set(d,{terminator:f,callback:v}),f},dispose:c}}constructor(s,g,c,h){super(s,g,c,h),this._children=null,this._lock=!1,this.refreshThrottler=new n.ThrottledDelayer(p.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:v}=u;if(typeof d!="string")throw new TypeError("Expected oldPath to be a string");if(typeof v!="string")throw new TypeError("Expected newPath to be a string");if(o.isRelative(d))throw new TypeError("oldPath must be absolute");if(o.isRelative(v))throw new TypeError("newPath must be absolute");this.transferItem(d,v);break}case r.WatchEvent.Added:{const{node:d}=u;if(!E.is(d))throw new TypeError("Expected node to be a TreeNode");this.insertItem(d);break}case r.WatchEvent.Removed:{const{path:d}=u,v=new o(d),f=v.dir.toString(),a=v.base.toString();if(f===this.path&&this.children){const b=this.children.find(y=>y.name===a);b&&this.unlinkItem(b)}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,E.setTreeNode(this.id,this.path,this))}set name(s){const g=this.path;!p.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,c=!0,h){if(!this.disposed&&!p.isRoot(this)&&!this.isExpanded){if(c){const u=E.getGlobalTreeState(this.path);u.loadPathCancelToken.cancel(),u.refreshCancelToken.cancel(),E.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)){c&&E.setGlobalTreeState(this.path,{isExpanding:!1});return}if(s&&this.parent&&p.is(this.parent)&&await this.parent.setExpanded(!0,!g,!1,h),h?.isCancellationRequested){c&&E.setGlobalTreeState(this.path,{isExpanding:!1});return}this.isExpanded&&(this._watcher.notifyWillChangeExpansionState(this,!0),this.expandBranch(this,g),this._watcher.notifyDidChangeExpansionState(this,!0)),c&&(E.setGlobalTreeState(this.path,{isExpanding:!1}),E.setTreeNode(this.id,this.path,this))}}getAllExpandedNodePath(){var s,g;const c=[];let h=0;p.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 v=(g=this.root)===null||g===void 0?void 0:g.getTreeNodeAtIndex(d);p.is(v)&&v.expanded&&c.push(v.path)}return c}getAllCollapsedNodePath(){let s=[];if(this.children){for(let g=0;g<this.children.length;g++){const c=this.children[g];p.is(c)&&(c.isExpanded?s=s.concat(c.getAllCollapsedNodePath()):s.push(c.path))}return s}else return s}async resolveChildrens(s){var g,c,h;let u=this.children,d=[];try{u=await this._tree.resolveChildren(this)||[]}catch{u=[]}if(s?.isCancellationRequested)return!1;const v=new Array(u.length);this._children=Array(u.length);for(let a=0;a<u.length;a++){const b=u[a];b.id=E.getIdByPath(b.path)||b.id,this._children[a]=b,E.setIdByPath(b.path,b.id)}(g=this._children)===null||g===void 0||g.sort(this._tree.sortComparator||p.defaultSortComparator);for(let a=0;a<u.length;a++)v[a]=this._children[a].id;const f=[];for(let a=0,b=((c=this.children)===null||c===void 0?void 0:c.length)||0;a<b;a++){const y=(h=this.children)===null||h===void 0?void 0:h[a];if(p.is(y)&&y.expanded){const S=await y.resolveChildrens(s);if(S&&(d=d.concat(S)),s?.isCancellationRequested)return;f.push(y)}}this._branchSize=v.length,this.setFlattenedBranch(v);for(let a=0;a<f.length;a++){const b=f[a];b.expandBranch(b,!0)}return d.concat(f.map(a=>a.path.toString()))}updateTreeNodeCache(s){var g;if(E.setTreeNode(s.id,s.path,s),p.is(s)&&s.expanded&&(!((g=s.children)===null||g===void 0)&&g.length))for(let c=0;c<s.children.length;c++){const h=s.children[c];this.updateTreeNodeCache(h)}}async refreshTreeNodeByPaths(s=this.getAllExpandedNodePath(),g,c){if(!p.is(this))return;let h;const u=this.children;let d=this.children||[];if(this.expanded){if(this===c){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 v=0;v<this.children.length;v++)this.children[v].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(a=>a.path===h);if(f){if(p.is(f)&&!f.expanded){f.isExpanded=!0;const a=await f.resolveChildrens(g);if(g?.isCancellationRequested||(a&&(s=s.filter(b=>!a.find(y=>y.includes(b)))),s.length>0&&!g?.isCancellationRequested&&(s=await f.refreshTreeNodeByPaths([...s],g,c)||[],g?.isCancellationRequested)))return}}else{if(!d||d.length===0)break;for(let a=0;a<d.length;a++){const b=d[a];if(h.indexOf(`${b.path}${o.separator}`)===0&&p.is(b)){if(!p.is(b))continue;b.isExpanded=!0;const S=await b.resolveChildrens(g);if(g?.isCancellationRequested||(S&&(s=s.filter(A=>!S.find(T=>T===A))),b.path!==h&&!s.includes(b.path)&&s.unshift(h),s.length>0&&(s=await b.refreshTreeNodeByPaths([...s],g,c)||[],g?.isCancellationRequested)))return;break}}}}if(h){if(s.unshift(h),this===c){if(u){this.shrinkBranch(this,!0);for(let a=0;a<u.length;a++){const b=u[a];b?.dispose()}}const v=[],f=new Array(d.length);this._children=Array(d.length);for(let a=0;a<d.length;a++){const b=d[a];b.id=E.getIdByPath(b.path)||b.id,this._children[a]=b,E.setIdByPath(b.path,b.id),p.is(b)&&b.expanded&&v.push(b)}this._children.sort(this._tree.sortComparator||p.defaultSortComparator);for(let a=0;a<d.length;a++)f[a]=this._children[a].id;this._branchSize=f.length,this.setFlattenedBranch(f,!0),this.watcher.notifyDidUpdateBranch()}return this.parent!==c&&this.expandBranch(this,!0),s}else if(p.isRoot(this)){if(this.children){this.shrinkBranch(this,!0);for(let b=0;b<this.children.length;b++){const y=this.children[b];y?.dispose()}}const v=[],f=[],a=new Array(d.length);this._children=Array(d.length);for(let b=0;b<d.length;b++){const y=d[b];if(y.id=E.getIdByPath(y.path)||y.id,this._children[b]=y,E.setIdByPath(y.path,y.id),p.is(y)&&y.expanded){if(!y.children&&(await y.resolveChildrens(g),g?.isCancellationRequested))return;v.push(y)}else f.push(y)}this._children.sort(this._tree.sortComparator||p.defaultSortComparator);for(let b=0;b<d.length;b++)a[b]=this._children[b].id;this._branchSize=a.length,this.setFlattenedBranch(a,!0);for(let b=0;b<v.length;b++){const y=v[b];y.expandBranch(y,!0),this.updateTreeNodeCache(y)}for(let b=0;b<f.length;b++){const y=f[b];this.updateTreeNodeCache(y)}typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),this.watcher.notifyDidUpdateBranch()}else{const v=[];if(this===c){if(this.children&&this.shrinkBranch(this,!0),this.children)for(let a=0,b=this.children.length;a<b;a++)this.children[a].dispose();const f=new Array(d.length);this._children=Array(d.length);for(let a=0,b=d.length;a<b;a++){const y=d[a];y.id=E.getIdByPath(y.path)||y.id,this._children[a]=y,E.setIdByPath(y.path,y.id),p.is(y)&&y.expanded&&v.push(y),this.updateTreeNodeCache(y)}this._children.sort(this._tree.sortComparator||p.defaultSortComparator);for(let a=0;a<d.length;a++)f[a]=this._children[a].id;this._branchSize=f.length,this.setFlattenedBranch(f);for(let a=0;a<v.length;a++){const b=v[a];b.expandBranch(b,!0)}}else for(let f=0;f<d.length;f++){const a=d[f];a.expanded&&v.push(a)}for(let f=0;f<v.length;f++){const a=v[f];a.expandBranch(a,!0)}typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),this===c&&this.expandBranch(this)}}else{if(this.children&&this.children&&this.parent){for(let v=0,f=this.children.length;v<f;v++)this.children[v].dispose();this._children=null}return}}async expandedAll(s=this.getAllCollapsedNodePath()){if(!p.isRoot(this))return;s=s.sort((c,h)=>o.pathDepth(c)-o.pathDepth(h));let g;for(;s.length>0;){g=s.pop();const c=E.getTreeNodeByPath(g);p.is(c)&&await c.setExpanded(!1,!0)}this.watcher.notifyDidUpdateBranch()}async collapsedAll(s=this.getAllExpandedNodePath()){if(!p.isRoot(this))return;s=s.sort((c,h)=>o.pathDepth(c)-o.pathDepth(h));let g;for(;s.length>0;){g=s.pop();const c=E.getTreeNodeByPath(g);p.is(c)&&c.setCollapsed(!0)}this.watcher.notifyDidUpdateBranch()}setCollapsed(s=!1){if(p.isRoot(this)||this.disposed||!this.isExpanded)return;const g=E.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,E.setTreeNode(this.id,this.path,this),this._watcher.notifyDidChangeExpansionState(this,!1))}mv(s,g=this.name){const c=this.path;if(super.mv(s,g),typeof this.watchTerminator=="function"&&(this.watchTerminator(c),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 p&&s.expanded?s._branchSize:0);this._children&&(this._children.push(s),this._children.sort(this._tree.sortComparator||p.defaultSortComparator)),this._branchSize+=g;let c=this;for(;!c._flattenedBranch;)c.parent&&(c=c.parent,c._branchSize+=g);if(!this._children)return;let h=this._children.indexOf(s),u;const d=this._children[h-1];d?h=c._flattenedBranch.indexOf(d.id)+(d instanceof p&&d.expanded?d._branchSize:0):h=c._flattenedBranch.indexOf(this.id),h===-1&&this._branchSize===1&&(h=0),u=h+1,c._flattenedBranch.length===0&&(u=0);let v=[s.id];return s instanceof p&&s.expanded&&s._flattenedBranch&&(v=v.concat(s._flattenedBranch),s.setFlattenedBranch(null)),c.setFlattenedBranch(l(c._flattenedBranch,u,0,v)),E.setTreeNode(s.id,s.path,s),s}unlinkItem(s,g){var c;if(!this._children)return;const h=this._children.indexOf(s);if(h===-1||!this.isItemVisibleAtRootSurface(this))return;(c=this._children)===null||c===void 0||c.splice(h,1);const u=1+(s instanceof p&&s.expanded?s._branchSize:0);this._branchSize-=u;let d=this;for(;!d._flattenedBranch;)d.parent&&(d=d.parent,d._branchSize-=u);const v=d._flattenedBranch.indexOf(s.id);v!==-1&&(s instanceof p&&s.expanded&&s.setFlattenedBranch(d._flattenedBranch.slice(v+1,v+u)),d.setFlattenedBranch(l(d._flattenedBranch,v,u)),!g&&s.parent===this&&s.mv(null))}transferItem(s,g){var c;const h=new o(s),u=h.dir.toString();if(u!==this.path)return;const d=h.base.toString(),v=(c=this._children)===null||c===void 0?void 0:c.find(y=>y.name===d);if(!v)return;const f=new o(g),a=f.dir.toString(),b=a===u?this:E.getTreeNodeByPath(a);if(!p.is(b)){this.unlinkItem(v);return}return v.mv(b,f.base.toString()),v}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,p.isRoot(this)&&!g&&this.watcher.notifyDidUpdateBranch()}expandBranch(s,g){if(this!==s&&s._flattenedBranch&&(this._branchSize+=s._branchSize),this!==s&&this._flattenedBranch){const c=this._flattenedBranch.indexOf(s.id)+1;if(c===0)return;this.setFlattenedBranch(l(this._flattenedBranch,c,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 c=this._flattenedBranch.indexOf(s.id)+1;if(c===0)return;s.setFlattenedBranch(this._flattenedBranch.slice(c,c+s._branchSize),g),this.setFlattenedBranch(l(this._flattenedBranch,c,s._flattenedBranch?s._flattenedBranch.length:0),g)}else this.parent&&this.parent.shrinkBranch(s,g)}async hardReloadChildren(s){let g;const c=this.path;try{g=await this._tree.resolveChildren(this)||[]}catch{g=[]}if(!this.expanded||s?.isCancellationRequested)return!1;this.path!==c&&E.setGlobalTreeState(c,{isExpanding:!1,isLoadingPath:!1,isRefreshing:!1});const h=[],u=new Array(g.length),d=new Array(g.length);for(let v=0;v<g.length;v++){const f=g[v];if(f.id=E.getIdByPath(f.path)||f.id,d[v]=f,E.setIdByPath(f.path,f.id),p.is(f)&&f.expanded){if(f.children||await f.resolveChildrens(s),s?.isCancellationRequested)return!1;h.push(f)}}d.sort(this._tree.sortComparator||p.defaultSortComparator);for(let v=0;v<g.length;v++)u[v]=d[v].id;if(this.children&&this.shrinkBranch(this),this.children)for(let v=0;v<this.children.length;v++){const f=this.children[v];f?.dispose()}for(let v=0;v<d.length;v++)this.updateTreeNodeCache(d[v]);this._children=d,this._branchSize=u.length,this.setFlattenedBranch(u);for(let v=0;v<h.length;v++){const f=h[v];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(!E.is(s))throw new TypeError("Expected node to be a TreeNode");return this.insertItem(s)}removeNode(s){const g=new o(s),c=g.dir.toString(),h=g.base.toString();if(c===this.path&&this.children){const u=this.children.find(d=>d.name===h);u&&this.unlinkItem(u)}}async refresh(s,g){if(!p.isRoot(this))return await this.root.refresh(s,this);const c=E.getGlobalTreeState(this.path);if(c.isLoadingPath||c.isExpanding)return;let h;if(s&&!s.token.isCancellationRequested)E.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:s}),h=s.token;else if(c.refreshCancelToken.token.isCancellationRequested){const u=new n.CancellationTokenSource;E.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:u}),h=u.token}else h=c.refreshCancelToken.token;this.toRefreshPathQueue.add((g||this).path),await this.refreshThrottler.trigger(()=>this.doRefresh(h)),E.setGlobalTreeState(this.path,{isRefreshing:!1})}async doRefresh(s){const g=this.getRefreshNode()||this;if(!p.is(g))return;const c=g.getAllExpandedNodePath();await g.refreshTreeNodeByPaths(c,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),v=o.pathDepth(u);return d-v}),s.length===1||o.pathDepth(s[0])===1)return E.getTreeNodeByPath(s[0]);const g=s.map(h=>new o(h));let c=g[0];for(let h=1,u=g.length;h<u;h++)if(!c.isEqualOrParent(g[h]))for(;!c.isRoot&&(c=c.dir,!(!c||c.isEqualOrParent(g[h]))););return c?E.getTreeNodeByPath(c.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,c=g(s);return c.shift(),c}async loadTreeNodeByPath(s,g=!1){if(!p.isRoot(this))return;const c=E.getGlobalTreeState(this.path);if(c.isExpanding)return;c.refreshCancelToken.cancel(),c.loadPathCancelToken.cancel();const h=new n.CancellationTokenSource;E.setGlobalTreeState(this.path,{isLoadingPath:!0,loadPathCancelToken:h});const u=h.token,d=[],{splitPath:v,isRelative:f}=o,a=f(s)?v(s):this.transformToRelativePath(s);if(a.length===0)return E.setGlobalTreeState(this.path,{isLoadingPath:!1}),this;if(this.children||await this.ensureLoaded(u),u.isCancellationRequested){E.setGlobalTreeState(this.path,{isLoadingPath:!1});return}let b=this._children,y,S="",A;for(;b&&(A=a.shift());){let T=b.find(w=>w.name.indexOf(A)===0);if(T){if(p.is(T)){if(T._watcher.notifyWillChangeExpansionState(T,!0),T.isExpanded=!0,!T.children&&(await T.resolveChildrens(u),u.isCancellationRequested)){E.setGlobalTreeState(this.path,{isLoadingPath:!1});return}d.push(T),T._watcher.notifyDidChangeExpansionState(T,!0)}if(a.length===0){y=T;break}}if(!T&&y){const w=v(y.name).slice(1);if(w[0]===A){for(w.shift();w.length>0&&w[0]===a[0];)w.shift(),a.shift();A=a.shift(),T=b.find(D=>D.name.indexOf(A)===0)}}if(!T||!p.is(T)&&a.length>0)break;if(p.is(T)){if(T.name.indexOf(o.separator)>0){const D=v(T.name).slice(1);for(;D.length>0&&D[0]===a[0];)D.shift(),a.shift()}if(!T._children&&(S=T.path,p.is(T))){if(T.isExpanded=!0,!T.children&&(await T.resolveChildrens(u),u.isCancellationRequested)){E.setGlobalTreeState(this.path,{isLoadingPath:!1});return}d.push(T)}if(T&&a.length===0){y=T;break}else{if(S&&S!==T.path){const D=v(S),I=v(T.path);I.length>D.length&&a.splice(0,I.length-D.length)}b=T._children,y=T}}}if(y){let T;if(y.disposed){E.setGlobalTreeState(this.path,{isLoadingPath:!1});return}for(;T=d.pop();)T.expandBranch(T,!0),d.length===0&&this.updateTreeNodeCache(T);return g||this.watcher.notifyDidUpdateBranch(),E.setGlobalTreeState(this.path,{isLoadingPath:!1}),y}E.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 c=(g=this._flattenedBranch)===null||g===void 0?void 0:g[s];if(c)return E.getTreeNodeById(c)}getTreeNodeById(s){return E.getTreeNodeById(s)}getTreeNodeByPath(s){return E.getTreeNodeByPath(s)}}t.CompositeTreeNode=p,p.REFRESH_DELAY=200},58781:(L,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 l;(function(p){p[p.Applicable=1]="Applicable",p[p.Inheritable=2]="Inheritable"})(l||(t.CompositeDecorationType=l={}));var m;(function(p){p[p.UnTargetDecoration=1]="UnTargetDecoration",p[p.TargetDecoration=2]="TargetDecoration"})(m||(t.ChangeReason=m={}));class E{constructor(_,s,g){this.handleDecorationDidAddClassname=c=>{const{classname:h}=c;!this.selfOwned||!h||(this.compositeCssClasslist.classlist.push(h),this.notifyClasslistChange())},this.handleDecorationDidRemoveClassname=c=>{const{classname:h}=c;if(!this.selfOwned||!h)return;const u=this.compositeCssClasslist.classlist.indexOf(h);u>-1&&(this.compositeCssClasslist.classlist.splice(u,1),this.notifyClasslistChange())},this.mergeDecorationClasslist=c=>{const{decoration:h}=c;this.selfOwned&&(this.compositeCssClasslist.classlist.push(...h.cssClassList),this.notifyClasslistChange())},this.handleDecorationDisable=c=>{const{decoration:h}=c;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,m.UnTargetDecoration,s,!1);this.parent!==_&&(this.parent.linkedComposites.delete(this),this.parent=_,_.linkedComposites.add(this));for(const[s]of _.renderedDecorations)this.recursiveRefresh(this,!1,m.TargetDecoration,s,!1)}}add(_){const s=_.appliedTargets.get(this.target),g=s&&(s===r.TargetMatchMode.Self||s===r.TargetMatchMode.SelfAndChildren),c=s&&(s===r.TargetMatchMode.Children||s===r.TargetMatchMode.SelfAndChildren);if(!(this.type===l.Applicable&&!g)&&!(this.type===l.Inheritable&&!c)){if(!this.selfOwned){this.selfOwn(m.TargetDecoration,_),this.targetedDecorations.add(_);return}this.targetedDecorations.has(_)||(this.targetedDecorations.add(_),this.recursiveRefresh(this,!1,m.TargetDecoration,_))}}remove(_){if(this.selfOwned&&this.targetedDecorations.delete(_)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn(void 0,m.UnTargetDecoration,_);this.recursiveRefresh(this,!1,m.UnTargetDecoration,_)}}negate(_){const s=_.negatedTargets.get(this.target),g=s&&(s===r.TargetMatchMode.Self||s===r.TargetMatchMode.SelfAndChildren),c=s&&(s===r.TargetMatchMode.Children||s===r.TargetMatchMode.SelfAndChildren);if(!(this.type===l.Applicable&&!g)&&!(this.type===l.Inheritable&&!c)){if(!this.selfOwned){this.selfOwn(m.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,m.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[c]of g.renderedDecorations)c!==s&&this.processCompositeAlteration(m.TargetDecoration,c);_===m.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(_===m.UnTargetDecoration){const g=this.renderedDecorations.get(s);if(g){const c=s.appliedTargets.get(this.target),h=c&&(c===r.TargetMatchMode.Self||c===r.TargetMatchMode.SelfAndChildren),u=c&&(c===r.TargetMatchMode.Children||c===r.TargetMatchMode.SelfAndChildren);return h&&this.type===l.Applicable||u&&this.type===l.Inheritable?!1:(this.removeDecorationClasslist(s,!1),g&&g.dispose(),this.renderedDecorations.delete(s))}return!1}if(_===m.TargetDecoration){const g=s.negatedTargets.get(this.target),c=g&&(g===r.TargetMatchMode.Self||g===r.TargetMatchMode.SelfAndChildren),h=g&&(g===r.TargetMatchMode.Children||g===r.TargetMatchMode.SelfAndChildren);if(c&&this.type===l.Applicable||h&&this.type===l.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,c,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(m.UnTargetDecoration,u);for(const[u]of this.parent.renderedDecorations)this.processCompositeAlteration(m.TargetDecoration,u);h&&this.notifyClasslistChange(!1)}else this.selfOwned&&g===m.UnTargetDecoration&&c&&this.renderedDecorations.has(c)?(this.processCompositeAlteration(g,c),h&&this.notifyClasslistChange(!1)):this.selfOwned&&g===m.TargetDecoration&&c&&this.processCompositeAlteration(g,c)&&h?this.notifyClasslistChange(!1):!this.selfOwned&&h&&this.notifyClasslistChange(!1);for(const u of this.linkedComposites)u.recursiveRefresh(_,s,g,c,h)}removeDecorationClasslist(_,s=!0){if(this.selfOwned){for(const g of _.cssClassList){const c=this.compositeCssClasslist.classlist.indexOf(g);c>-1&&this.compositeCssClasslist.classlist.splice(c,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=E},96336:(L,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(m){m[m.None=1]="None",m[m.Self=2]="Self",m[m.Children=3]="Children",m[m.SelfAndChildren=4]="SelfAndChildren"})(o||(t.TargetMatchMode=o={}));class l{constructor(...E){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(E))if(E.every(p=>typeof p=="string"))this._cssClassList=new Set(E);else throw new TypeError("classlist must be of type `Array<string>`");else this._cssClassList=new Set}get disabled(){return this._disabled}set disabled(E){this._disabled=E,E?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(E){this._cssClassList.has(E)||(this._cssClassList.add(E),this.onDidAddCSSClassnameEmitter.fire({decoration:this,classname:E}))}removeCSSClass(E){this._cssClassList.has(E)&&(this._cssClassList.delete(E),this.onDidRemoveCSSClassnameEmitter.fire({decoration:this,classname:E}))}hasTarget(E){return!!this._appliedTargets.get(E)}addTarget(E,p=o.Self){if(this._appliedTargets.get(E)===p||!r.TreeNode.is(E))return;this._appliedTargets.set(E,p);const s=n.Disposable.create(()=>{this.removeTarget(E)});return this.appliedTargetsDisposables.set(E,s),this.onDidAddTargetEmitter.fire({decoration:this,target:E}),s}removeTarget(E){if(this._appliedTargets.delete(E)){const p=this.appliedTargetsDisposables.get(E);p&&p.dispose(),this.onDidRemoveTargetEmitter.fire({decoration:this,target:E})}}clearAppliedTarget(){const E=Array.from(this._appliedTargets.keys());for(const p of E)this.removeTarget(p)}clearNegateTarget(){const E=Array.from(this._negatedTargets.keys());for(const p of E)this.unNegateTarget(p)}negateTarget(E,p=o.Self){if(this._negatedTargets.get(E)===p||!r.TreeNode.is(E))return;this._negatedTargets.set(E,p);const s=n.Disposable.create(()=>{this.unNegateTarget(E)});return this.negatedTargetsDisposables.set(E,s),this.onDidNegateTargetEmitter.fire({decoration:this,target:E}),s}unNegateTarget(E){if(this._negatedTargets.delete(E)){const p=this.negatedTargetsDisposables.get(E);p&&p.dispose(),this.onDidUnNegateTargetEmitter.fire({decoration:this,target:E})}}}t.Decoration=l},29701:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationsManager=void 0;const n=e(70392),r=e(34054),o=e(26353),l=e(58781);class m{constructor(p){this.root=p,this.decorations=new Map,this.decorationsMeta=new WeakMap,this.disposables=new n.DisposableCollection,this.disposed=!1,this.targetDecoration=_=>{const{decoration:s,target:g}=_,c=this.getDecorationData(g);if(c){const{applicable:h,inheritable:u}=c;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 c=this.root.getTreeNodeByPath(s.path);c&&_.addTarget(c,g)}},this.unTargetDecoration=_=>{const{decoration:s,target:g}=_,c=this.getDecorationData(g);if(c){const{applicable:h,inheritable:u}=c;h.remove(s),u&&u.remove(s)}},this.negateDecoration=_=>{const{decoration:s,target:g}=_,c=this.getDecorationData(g);if(c){const{applicable:h,inheritable:u}=c;h.negate(s),u&&u.negate(s)}},this.unNegateDecoration=_=>{const{decoration:s,target:g}=_,c=this.getDecorationData(g);if(c){const{applicable:h,inheritable:u}=c;h.unNegate(s),u&&u.unNegate(s)}},this.switchParent=(_,s,g)=>{const c=this.decorationsMeta.get(_);if(!c)return;const h=this.getDecorationData(g);h&&(c.applicable.changeParent(h.inheritable),c.inheritable&&c.inheritable.changeParent(h.inheritable))},this.decorationsMeta.set(p,{applicable:new l.CompositeDecoration(p,l.CompositeDecorationType.Applicable),inheritable:new l.CompositeDecoration(p,l.CompositeDecorationType.Inheritable)}),this.disposables.push(p.watcher.on(r.TreeNodeEvent.DidChangeParent,this.switchParent)),this.disposables.push(p.watcher.on(r.TreeNodeEvent.DidDispose,_=>this.decorationsMeta.delete(_))),this.disposables.push(p.watcher.on(r.TreeNodeEvent.BranchDidUpdate,this.updateTarget))}dispose(){for(const[p]of this.decorations)this.removeDecoration(p);this.disposables.dispose(),this.disposed=!0}addDecoration(p){if(this.disposed)throw new Error("DecorationManager disposed");if(this.decorations.has(p))return;const _=new n.DisposableCollection;_.push(p.onDidAddTarget(this.targetDecoration)),_.push(p.onDidRemoveTarget(this.unTargetDecoration)),_.push(p.onDidNegateTarget(this.negateDecoration)),_.push(p.onDidUnNegateTarget(this.unNegateDecoration)),this.decorations.set(p,_);for(const[s]of p.appliedTargets)this.targetDecoration({decoration:p,target:s});for(const[s]of p.negatedTargets)this.negateDecoration({decoration:p,target:s})}removeDecoration(p){const _=this.decorations.get(p);if(_){for(const[s]of p.appliedTargets){const g=this.decorationsMeta.get(s);g&&(g.applicable.remove(p),g.inheritable&&g.inheritable.remove(p))}for(const[s]of p.negatedTargets){const g=this.decorationsMeta.get(s);g&&(g.applicable.unNegate(p),g.inheritable&&g.inheritable.unNegate(p))}_.dispose(),this.decorations.delete(p)}}getDecorations(p){if(!p||!o.TreeNode.is(p))return;const _=this.getDecorationData(p);if(_)return _.applicable.compositeCssClasslist}getDecorationData(p){if(this.disposed)return;const _=this.decorationsMeta.get(p);if(_)return _;if(!p||!p.parent)return;const s=this.getDecorationData(p.parent);if(s){const g={applicable:new l.CompositeDecoration(p,l.CompositeDecorationType.Applicable,s.inheritable),inheritable:o.CompositeTreeNode.is(p)?new l.CompositeDecoration(p,l.CompositeDecorationType.Inheritable,s.inheritable):void 0};return this.decorationsMeta.set(p,g),g}}}t.DecorationsManager=m},24936:(L,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:(L,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:(L,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 l{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(E){this._root=E,this.initState(E),this.root&&(this._ensureReady=this.root.ensureLoaded())}get state(){return this._state}set state(E){this._state=E}init(E){this.root=E,this.root.watcher.on(r.TreeNodeEvent.BranchDidUpdate,this.dispatchChange)}initState(E){this.state=new o.TreeStateManager(E)}loadTreeState(E){return typeof E=="string"&&(E=JSON.parse(E)),this.state.loadTreeState(E)}getTreeStateWatcher(E=!1){return new o.TreeStateWatcher(this.state,E)}resolveChildren(E){return Promise.resolve(Array.from(E.children))}}t.TreeModel=l},58615:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(13674),t)},12165:(L,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:l}=n.path;var m;(function(_){_[_.SetExpanded=1]="SetExpanded",_[_.SetCollapsed=2]="SetCollapsed",_[_.SetActive=3]="SetActive"})(m||(t.Operation=m={}));var E;(function(_){_[_.Expanded=1]="Expanded",_[_.Collapsed=2]="Collapsed",_[_.Disabled=4]="Disabled"})(E||(E={}));class p{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,c,h)=>{var u;if(this.stashing&&this.stashKeyframes&&this.stashKeyframes.set(g.id,c?E.Expanded:E.Collapsed),this.stashKeyframes&&!this.stashing){if(c){let v=g;for(;v;){if(this.stashKeyframes.has(v.id)){let f=this.stashKeyframes.get(v.id);f=f|E.Disabled,this.stashKeyframes.set(v.id,f)}v=v.parent}this.stashLockingItems.add(g)}if(this.stashLockingItems&&this.stashLockingItems.has(g)&&!c){let v=g;for(;v;){if(this.stashKeyframes.has(v.id)){let f=this.stashKeyframes.get(v.id);f&=~E.Disabled,this.stashKeyframes.set(v.id,f)}v=v.parent}this.stashLockingItems.delete(g)}}let d=this.expandedDirectories.get(g);c&&!d?(d=(u=new l(this.root.path).relative(new l(g.path)))===null||u===void 0?void 0:u.toString(),this.expandedDirectories.set(g,d),this.onDidChangeExpansionStateEmitter.fire({relativePath:d,isExpanded:c,isVisibleAtSurface:h})):!c&&d&&(this.expandedDirectories.delete(g),this.onDidChangeExpansionStateEmitter.fire({relativePath:d,isExpanded:c,isVisibleAtSurface:h}))},this.handleDidChangePath=g=>{var c;if(this.expandedDirectories.has(g)){const h=this.expandedDirectories.get(g),u=(c=new l(this.root.path).relative(new l(g.path)))===null||c===void 0?void 0:c.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 c=await this.root.loadTreeNodeByPath(g);if(!c)break;c&&o.CompositeTreeNode.is(c)&&c.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,c]of s){const h=(c&E.Disabled)===E.Disabled,u=o.TreeNode.getTreeNodeById(g);!u||h||((c&E.Expanded)===E.Expanded?u.setCollapsed():(c&E.Collapsed)===E.Collapsed&&await u.setExpanded())}}}t.TreeStateManager=p},72782:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcher=void 0;const n=e(70392),r=e(13440);class o{constructor(m,E=!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(m.onChangeScrollOffset(p=>{this.currentState.scrollPosition=p,this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.ScrollOffset)})),this.disposables.push(m.onDidChangeRelativePath(({prevPath:p,newPath:_})=>{let s=!1;const g=new Set(this.currentState.expandedDirectories.atSurface);if(g.has(p)&&(g.delete(p),g.add(_),s=!0),this.currentState.expandedDirectories.atSurface=Array.from(g),E){const c=new Set(this.currentState.expandedDirectories.buried);c.has(p)&&(g.delete(p),g.add(_),s=!0),this.currentState.expandedDirectories.buried=Array.from(c)}s&&this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.PathsUpdated)})),this.disposables.push(m.onDidChangeExpansionState(({relativePath:p,isExpanded:_,isVisibleAtSurface:s})=>{let g=!1;const c=new Set(this.currentState.expandedDirectories.atSurface),h=new Set(this.currentState.expandedDirectories.buried);if(c.has(p)&&(!_||!s)){c.delete(p);const d=Array.from(c).filter(v=>v.indexOf(p)>=0);for(const v of d)c.delete(v),h.has(v)||h.add(v);g=!0}else _&&s&&(c.add(p),g=!0);this.currentState.expandedDirectories.atSurface=Array.from(c),E||(h.has(p)&&(!_||s)?(h.delete(p),g=!0):_&&!s&&(h.add(p),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:(L,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:(L,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:(L,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:(L,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:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3754:(L,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:(L,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)),l=n.__importStar(e(14041)),m=e(70392),E=e(56875);e(93324);const p=({onScroll:_,onUpdate:s,forwardedRef:g,style:c,children:h,className:u,onReachBottom:d,tabBarMode:v,thumbSize:f=5,hiddenVertical:a,hiddenHorizontal:b,universal:y=!1})=>{const S=(0,l.useRef)(new m.DisposableCollection),A=(0,l.useRef)(),T=(0,l.useCallback)(P=>{P?(A.current=P.view,g&&(typeof g=="function"?g(P.view):g.current=P.view)):g&&typeof g=="function"&&g(null)},[]),w=(0,l.useRef)(),D=(0,l.useRef)(),I=(0,l.useCallback)(P=>{if(!P)return;const{scrollTop:R,scrollHeight:M,clientHeight:k}=P;if(M===0&&k===0)return;(R+100)/(M-k)>1&&d&&d()},[d]),O=(0,l.useCallback)((0,o.default)(P=>{if(!P)return;const{scrollTop:R,scrollLeft:M}=P,k=1/20*Math.min(R,20),B=1/20*Math.min(M,20);w.current&&(w.current.style.opacity=String(k)),D.current&&(D.current.style.opacity=String(B)),I(P),s&&s(P)},100),[s,I,w.current,D.current]);return(0,l.useEffect)(()=>{const P=R=>{A.current&&(R.preventDefault(),R.stopPropagation(),A.current.clientHeight>=A.current.scrollHeight&&(R.deltaY!==0&&(A.current.scrollLeft+=R.deltaY),R.deltaX!==0&&(A.current.scrollLeft+=R.deltaX)))};return v&&A.current&&A.current.addEventListener("wheel",P),()=>{var R;(R=A.current)===null||R===void 0||R.removeEventListener("wheel",P)}},[A.current,v]),(0,l.useEffect)(()=>()=>S.current.dispose(),[]),l.default.createElement(E.Scrollbars,{ref:T,style:{...c,overflow:"hidden"},className:(0,r.default)(u,"kt-scrollbar"),onUpdate:O,onScroll:_,universal:y,renderTrackHorizontal:({style:P,...R})=>{const M={...P,height:f,left:0,right:0,bottom:1};return b&&(M.display="none"),l.default.createElement("div",{...R,style:M})},renderTrackVertical:({style:P,...R})=>{const M={...P,width:f,top:0,right:1,bottom:0};return a&&(M.display="none"),l.default.createElement("div",{...R,style:M})},renderThumbVertical:({style:P,className:R,...M})=>{const k={...P,width:f};return a&&(k.display="none"),l.default.createElement("div",{...M,style:k,className:(0,r.default)(R,"scrollbar-thumb-vertical")})},renderThumbHorizontal:({style:P,className:R,...M})=>{const k={...P,height:f,display:"none"};return b&&(k.display="none"),l.default.createElement("div",{...M,style:k,className:(0,r.default)(R,"scrollbar-thumb-horizontal")})}},l.default.createElement("div",{ref:P=>{w.current=P},className:"scrollbar-decoration-vertical"}),l.default.createElement("div",{ref:P=>{D.current=P},className:"scrollbar-decoration-horizontal"}),h)};t.Scrollbars=p,t.Scrollbars.displayName="CustomScrollbars",t.ScrollbarsVirtualList=l.default.forwardRef((_,s)=>l.default.createElement(t.Scrollbars,{..._,thumbSize:10,forwardedRef:s})),t.ScrollbarsVirtualList.displayName="ScrollbarsVirtualList"},14640:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectOptionsList=t.Option=void 0,t.isDataOptions=c,t.isDataOptionGroups=h,t.Select=S;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(54713),m=e(50708);e(11110);const E=({value:T,children:w,disabled:D,onClick:I,className:O,...P})=>o.default.createElement("span",{...P,className:(0,r.default)(O,{"kt-option-disabled":D}),onClick:()=>I&&!D&&I(T)},w);t.Option=E;function p(...T){}function _(T,w){return w?T.props[w]:T.props.value}function s(T,w){let D=[];return Array.isArray(T)?D=o.default.Children.toArray(T).map(w):D=[w(T)],D}function g(T,w,D=(I,O)=>I===O){const O=o.default.Children.toArray(w).filter(P=>o.default.isValidElement(P)).find(P=>{var R;return P.props&&D((R=P.props)===null||R===void 0?void 0:R.value,T)?P:null});return O?.props}function c(T){return T?T.length===0?!0:u(T[0]):!1}function h(T){return T?T.length===0?!0:d(T[0]):!1}function u(T){return T.value!==void 0}function d(T){return T.groupName!==void 0&&c(T.options)}function v(T){return o.default.createElement(o.default.Fragment,null,T.data.iconClass?o.default.createElement("div",{className:(0,r.default)(T.data.iconClass,"kt-select-option-icon")}):void 0,T.data.label)}function f({group:T,index:w}){return o.default.createElement("div",{key:"header_"+w,className:"kt-select-group-header"},T.iconClass?o.default.createElement("div",{className:(0,r.default)(T.iconClass,"kt-select-option-icon")}):void 0,o.default.createElement("div",null,T.groupName))}function a(T,w){let D=w.label;if(D===void 0)try{D=w.value.toString()}catch{D=void 0}return typeof D=="string"?D.indexOf(T)!==-1:!1}const b=o.default.memo(({selected:T,selectedRenderer:w})=>w?o.default.createElement(w,{data:T}):o.default.createElement(o.default.Fragment,null,T.iconClass&&o.default.createElement("div",{className:(0,r.default)(T.iconClass,"kt-select-option-icon")}),o.default.createElement("span",{className:"kt-select-option"},T.label))),y=o.default.memo(({value:T,onChange:w,placeholder:D,size:I="default"})=>o.default.createElement(m.Input,{className:"kt-select-search",value:T,size:I,onChange:O=>w(O.target.value),autoFocus:!0,placeholder:D||""}));function S({disabled:T,options:w,size:D="default",children:I,value:O,onChange:P,onMouseEnter:R,optionLabelProp:M,style:k,optionStyle:B,className:x,maxHeight:N,equals:j=(te,Le)=>te===Le,optionRenderer:K=v,groupTitleRenderer:U,footerComponent:Q,headerComponent:z,showSearch:G=!1,filterOption:Y=a,searchPlaceholder:Z="",emptyComponent:$,selectedRenderer:H,onBeforeShowOptions:X,allowOptionsOverflow:J,dropdownRenderType:re="fixed",description:ce,notMatchWarning:fe,onSearchChange:Ae}){const[te,Le]=(0,o.useState)(!1),[Te,oe]=(0,o.useState)(""),le=o.default.useRef(null),Ee=o.default.useRef(null),we=(0,o.useCallback)(Be=>{Be.preventDefault(),Be.stopPropagation(),!(!te&&X?.())&&Le(!te)},[te,X]),be=(0,o.useCallback)(()=>{var Be,ze,Qe,He,vt,at,It,_t,bt;if(w&&c(w)){for(const ct of w)if(j(O,ct.value))return{iconClass:ct.iconClass,label:ct.label,value:ct.value};return{iconClass:(Be=w[0])===null||Be===void 0?void 0:Be.iconClass,label:(ze=w[0])===null||ze===void 0?void 0:ze.label,value:(Qe=w[0])===null||Qe===void 0?void 0:Qe.value}}else if(w&&h(w)){for(const ct of w)for(const gt of ct.options)if(j(O,gt.value))return{iconClass:gt.iconClass,label:gt.label,value:gt.value};return{iconClass:(vt=(He=w[0])===null||He===void 0?void 0:He.options[0])===null||vt===void 0?void 0:vt.iconClass,label:(It=(at=w[0])===null||at===void 0?void 0:at.options[0])===null||It===void 0?void 0:It.label,value:(bt=(_t=w[0])===null||_t===void 0?void 0:_t.options[0])===null||bt===void 0?void 0:bt.value}}else{const ct=I&&g(O,I);if(ct)return{label:ct.label||ct.value,value:ct.value}}return{label:O,value:O,notMatch:!0}},[w,O,I])(),Ce=(0,r.default)("kt-select-options",{"kt-select-options-visible":te,[`kt-select-options-${D}`]:D}),Ne=fe&&be.notMatch,tt=(0,r.default)("kt-select-value",{"kt-select-warning":Ne,"kt-select-disabled":T,"kt-select-value-active":te,[`kt-select-value-${D}`]:D});function Fe(Be,ze){var Qe;if(!Be)return null;(typeof Be=="string"||typeof Be=="number")&&(Be=o.default.createElement(t.Option,{value:Be,label:String(Be),key:`${Be}_${ze}`},Be));const He=Be,vt=((Qe=He.props)===null||Qe===void 0?void 0:Qe.disabled)||!1;return o.default.createElement("div",{key:`${He.props.value}_${ze}`,className:(0,r.default)({"kt-select-option-select":O===He.props.value}),onMouseEnter:()=>R?.(He.props.value,ze),onClick:vt?p:()=>{Le(!1),P&&P(_(Be,M))}},Be)}(0,o.useEffect)(()=>{!te&&Te&&oe("")},[]),(0,o.useEffect)(()=>{if(!te)return;const Be=ze=>{le.current&&!le.current.contains(ze.target)&&Le(!1)};return document.addEventListener("click",Be),()=>document.removeEventListener("click",Be)},[te]);const $e=(0,o.useCallback)(()=>{if(!le.current||!Ee.current)return;const Be=le.current.getBoundingClientRect(),ze=Ee.current;J?(ze.style.minWidth=`${Be.width}px`,ze.style.maxWidth=`${window.innerWidth-Be.left-4}px`):ze.style.width=`${Be.width}px`;const Qe=window.innerHeight-Be.bottom-50,He=ze.clientHeight;Qe<He?ze.style.bottom=`${Be.height+4}px`:(ze.style.maxHeight=`${Qe}px`,ze.style.bottom="auto"),ze.style.position=re},[J,re]);(0,o.useEffect)(()=>{if(te)return $e(),window.addEventListener("resize",$e),()=>window.removeEventListener("resize",$e)},[te,$e]);const Se=(0,o.useMemo)(()=>Te?c(w)?w.filter(Be=>Y(Te,Be)):h(w)?w.reduce((Be,ze)=>{const Qe=ze.options.filter(He=>Y(Te,He,ze));return Qe.length&&Be.push({...ze,options:Qe}),Be},[]):w:w,[w,Te,Y]),ae=()=>o.default.createElement(o.default.Fragment,null,o.default.createElement(b,{selected:be,selectedRenderer:H}),o.default.createElement(l.Icon,{iconClass:(0,r.default)((0,l.getIcon)("down"),"kt-select-value-default-icon")})),ye=(0,o.useCallback)(Be=>{oe(Be),Ae?.(Be)},[Te,Ae]),Re=()=>o.default.createElement(y,{value:Te,onChange:ye,placeholder:Z});return o.default.createElement("div",{className:(0,r.default)("kt-select-container",x),ref:le},o.default.createElement("div",{className:tt,onClick:we,style:k},G&&te?Re():ae()),Ne&&o.default.createElement("div",{className:"kt-select-warning-text"},fe),te&&!Te&&(c(Se)||h(Se)?o.default.createElement(t.SelectOptionsList,{optionRenderer:K,options:Se,equals:j,optionStyle:B,currentValue:O,size:D,onSelect:Be=>{P&&P(Be),Le(!1)},groupTitleRenderer:U,className:Ce,style:{maxHeight:`${N}px`},ref:Ee,footerComponent:Q,headerComponent:z,emptyComponent:$}):o.default.createElement("div",{className:Ce,style:{maxHeight:`${N}px`},ref:Ee},w&&w.map((Be,ze)=>Fe(Be,ze)),I&&s(I,Fe),ce&&o.default.createElement(A,{text:ce}),o.default.createElement("div",{className:"kt-select-overlay",onClick:we}))))}function A({text:T}){return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-option-divider"}),o.default.createElement("div",{className:"kt-option-description"},T))}t.SelectOptionsList=o.default.forwardRef((T,w)=>{const{options:D,optionRenderer:I=v,equals:O=($,H)=>$===H,onSelect:P,currentValue:R,optionStyle:M,size:k,className:B,style:x,groupTitleRenderer:N=f,renderCheck:j,headerComponent:K,footerComponent:U,emptyComponent:Q}=T,z=(0,r.default)("kt-select-options",{[`kt-select-options-${k}`]:!0},B);function G($){return $.map((H,X)=>{const J=o.default.createElement(N,{group:H,index:X});return o.default.createElement(o.default.Fragment,{key:"group_"+X},J,Y(H.options))})}function Y($){return $&&$.map((H,X)=>{const J=O(R,H.value);return o.default.createElement(t.Option,{value:X,key:X,className:(0,r.default)({"kt-select-option-select":J,"kt-select-option-default":!0,"kt-option-with-check":j}),onClick:()=>P(H.value),style:M},j&&O(R,H.value)?o.default.createElement("div",{className:"kt-option-check"},o.default.createElement(l.Icon,{icon:"check"})):void 0,o.default.createElement(I,{data:H,isCurrent:J}))})}let Z;return h(D)?Z=D.filter($=>$.options.length>0).length===0:Z=D.length===0,o.default.createElement("div",{className:z,style:x,ref:w,onClick:$=>{$.stopPropagation()}},K?o.default.createElement(K,null):null,Z&&Q?o.default.createElement(Q,null):(h(D)?G(D):Y(D))||Q&&o.default.createElement(Q,null),U?o.default.createElement(U,null):null)})},54076:(L,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 l=m=>{const{tabs:E,className:p,value:_,onChange:s,mini:g,style:c,...h}=m,u=o.default.useCallback(d=>{typeof s=="function"&&s(d)},[]);return o.default.createElement("div",{...h,style:c,className:(0,r.default)("kt-tabs",p,{"kt-tabs-mini":g})},E.map((d,v)=>{const f=v===_?"kt-tab-selected":"";return typeof d=="string"?o.default.createElement("div",{key:v,className:(0,r.default)("kt-tab",f,{"kt-mini-tab":g}),onClick:u.bind(null,v)},d):o.default.createElement("div",{key:v,className:(0,r.default)("kt-custom-tab",f,{"kt-mini-tab":g}),onClick:u.bind(null,v)},d)}))};t.Tabs=l},72871:(L,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 l=({title:m,children:E,delay:p})=>{const[_,s]=(0,o.useState)(!1),g=(0,o.useRef)(null),c=(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),c.current&&g.current&&h.current){const{x:f,y:a,width:b,height:y}=g.current.getBoundingClientRect(),S=c.current.getBoundingClientRect();a<S.height*1.5?(h.current.className+=" kt-tooltip-reverse-arrow",c.current.style.top=`${a+y+S.height/2}px`):c.current.style.top=`${a-S.height*1.5}px`,f+S.width/2>=document.body.offsetWidth?(h.current.style.right=`${b/2-7}px`,c.current.style.left=`${f+b-S.width}px`):f-S.width/2<=0?(h.current.style.left=`${b/2-7}px`,c.current.style.left=`${f}px`):(h.current.style.left=`${S.width/2-7}px`,c.current.style.left=`${f+b/2-S.width/2}px`)}clearTimeout(u.current)},p||500)}function v(){u.current&&clearTimeout(u.current),s(!1)}return o.default.createElement("p",{ref:g,className:"kt-tooltip-wrapper",onMouseEnter:d,onMouseLeave:v},E,_&&o.default.createElement("span",{ref:c,className:(0,r.default)("kt-tooltip-content")},m,o.default.createElement("span",{ref:h,className:"kt-tooltip-arrow-placeholder"})))};t.Tooltip=l},40604:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deprecated=l;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(65973));function l(m,E){return p=>(r.default.useEffect(()=>{(0,o.default)(!1,`${m.displayName||m.name} is deprecated: ${E}`)},[]),r.default.createElement(m,p))}},84605:(L,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:(L,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=(E,p,_)=>{if(!_)return n.marked.parse(E,p);p?n.marked.parse(E,p,_):n.marked.parse(E,_)};t.parseMarkdown=o;const l=(E,p)=>(0,n.marked)(E,p);t.toMarkdownHtml=l;const m=E=>(E.type==="escape"&&(E.text=E.raw),E);t.parseWithoutEscape=m},2835:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapperRaf=m;const r=e(85608).__importDefault(e(10719));let o=0;const l={};function m(E,p=1){const _=o++;let s=p;function g(){s-=1,s<=0?(E(),delete l[_]):l[_]=(0,r.default)(g)}return l[_]=(0,r.default)(g),_}m.cancel=function(p){p!==void 0&&(r.default.cancel(l[p]),delete l[p])},m.ids=l},43953:(L,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:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warning=n,t.note=r,t.resetWarned=o,t.call=l,t.warningOnce=m,t.noteOnce=E;let e={};function n(p,_){}function r(p,_){}function o(){e={}}function l(p,_,s){!_&&!e[s]&&(p(!1,s),e[s]=!0)}function m(p,_){l(n,p,_)}function E(p,_){l(r,p,_)}t.default=m},91802:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualList=void 0;const r=e(85608).__importStar(e(14041)),o=e(24241),l=e(77011),m=({data:E,className:p,template:_,refSetter:s,onRangeChanged:g})=>{const c=(0,r.useRef)(null);return(0,r.useEffect)(()=>{s?.(c.current)},[c.current]),r.default.createElement(l.Scrollbars,{thumbSize:0},r.default.createElement(o.Virtuoso,{rangeChanged:h=>{g?.(h)},overscan:20,ref:c,style:{height:"100%"},className:p,data:E,itemContent:(h,u)=>r.default.createElement(_,{index:h,data:u})}))};t.VirtualList=m},18740:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(59019),t)},59019:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSChannelHandler=void 0;const n=e(40396),r=e(43718),o=e(54558),l=e(47561);class m{onChannelCreated(p,_){return this._onChannelCreatedEmitter.on(p,_)}constructor(p,_,s={}){this.connection=p,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(p){p&&(this.logger=p)}setReporter(p){this.reporterService=p}heartbeatMessage(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this.heartbeatMessageTimer=setTimeout(()=>{this.channelMap.forEach(p=>{p.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 p=()=>{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()?p():this.openingBarrier.open()}),await this.openingBarrier.wait()}fillKey(p){return`${this.clientId}:${p}`}getChannel(p){return this.channelMap.get(this.fillKey(p))}async openChannel(p){const _=this.fillKey(p);this.channelMap.has(_)&&(this.channelMap.get(_).dispose(),this.logger.log(this.LOG_TAG,`channel ${_} already exists, dispose it`));const s=new l.WSChannel(this.wrappedConnection,{id:_,logger:this.logger,ensureServerReady:!0});this.channelMap.set(s.id,s),this._onChannelCreatedEmitter.emit(p,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:p,closeEvent:{code:u,reason:d},connectInfo:navigator.connection}),this.logger.log(this.LOG_TAG,`channel ${p} closed, code: ${u}, reason: ${d}`)});const c=new r.Deferred,h=s.onOpen(()=>{c.resolve(),h.dispose()});return s.open(p,this.clientId),await c.promise,s}dispose(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this._disposables.dispose()}awaitChannelReady(p){const _=this.getChannel(p),s=new r.Deferred;if(_)_.onServerReady(()=>{s.resolve()});else{const g=this.onChannelCreated(p,c=>{c.onServerReady(()=>{s.resolve()}),g.dispose()})}return s.promise}}t.WSChannelHandler=m},98710:(L,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,l,m,E,p){l.set(o.subarray(E,p),m)}class n{constructor(){this.buffers=[],this.size=0}get byteLength(){return this.size}push(l){this.buffers.push(l),this.size+=l.length}unshift(l){this.buffers.unshift(l),this.size+=l.length}slice(l,m){const E=this.buffers;if(m===void 0&&(m=this.size),l===void 0&&(l=0),m>this.size&&(m=this.size),l>=m)return t.emptyBuffer;let p=0,_=0;for(;_<E.length&&p+E[_].length<=l;_++)p+=E[_].length;const s=new Uint8Array(m-l);let g=0;for(let c=_;g<m-l&&c<E.length;c++){const h=E[c].length,u=g===0?l-p:0,d=g+h>=m-l?Math.min(u+(m-l)-g,h):h;e(E[c],s,g,u,d),g+=d-u}return s}pos(l){if(l<0||l>=this.size)throw new Error(`out of range, ${l} not in [0, ${this.size})`);let m=l,E=0,p=null;for(;;){if(p=this.buffers[E],m<p.length)return{buf:E,offset:m};m-=p.length,E++}}copy(l,m=0,E=0,p=this.size){return e(this.slice(E,p),l,m,0,p-E)}splice(l,m,...E){const p=this.buffers,_=l>=0?l:this.size-l;m===void 0?m=this.size-_:m>this.size-_&&(m=this.size-_);for(const h of E)this.size+=h.length;const s=new n;let g=0,c=0;for(;c<p.length&&g+p[c].length<_;c++)g+=p[c].length;if(_-g>0){const h=_-g;if(h+m<p[c].length){s.push(p[c].slice(h,h+m));const u=p[c],d=new Uint8Array(h);for(let f=0;f<h;f++)d[f]=u[f];const v=new Uint8Array(u.length-h-m);for(let f=h+m;f<u.length;f++)v[f-m-h]=u[f];if(E.length>0){const f=E.slice();f.unshift(d),f.push(v),p.splice.apply(p,[c,1,...f]),c+=f.length,E=[]}else p.splice(c,1,d,v),c+=2}else s.push(p[c].slice(h)),p[c]=p[c].slice(0,h),c++}for(E.length>0&&(p.splice.apply(p,[c,0,...E]),c+=E.length);s.byteLength<m;){const h=p[c],u=h.length,d=Math.min(u,m-s.byteLength);d===u?(s.push(h),p.splice(c,1)):(s.push(h.slice(0,d)),p[c]=p[c].slice(d))}return this.size-=s.byteLength,s}get(l){const{buf:m,offset:E}=this.pos(l);return this.buffers[m][E]}set(l,m){const{buf:E,offset:p}=this.pos(l);this.buffers[E][p]=m}cursor(l=0){return new r(this,l)}dispose(){this.buffers=[],this.size=0}}t.Buffers=n;class r{constructor(l,m=0){this.buffers=l,this.offset=m,this.chunkIndex=0,this.chunkOffset=0,this.updatePosition()}updatePosition(){if(this.offset===0){this.chunkIndex=0,this.chunkOffset=0;return}const{buf:l,offset:m}=this.buffers.pos(this.offset);this.chunkIndex=l,this.chunkOffset=m}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 l=this.buffers.buffers[this.chunkIndex],m=l.byteLength;for(;this.chunkOffset<m;){const E=l[this.chunkOffset];this.chunkOffset++,this.offset++,yield E}this.chunkOffset=0,this.chunkIndex++}}read(l){const m=this.offset+l,E=this.buffers.slice(this.offset,m);return this.skip(l),E}skip(l){let m=0;for(;this.chunkIndex<this.buffers.buffers.length;){const p=this.buffers.buffers[this.chunkIndex].byteLength;for(;this.chunkOffset<p;)if(this.chunkOffset++,this.offset++,++m===l)return;this.chunkOffset=0,this.chunkIndex++}}moveTo(l){this.offset=l,this.updatePosition()}dispose(){this.buffers=null,this.offset=0}reset(){this.offset=0,this.chunkIndex=0,this.chunkOffset=0}}t.Cursor=r},30613:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Capturer=t.ResponseStatus=t.MessageType=void 0,t.getCapturer=E;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 l;(function(_){_.Success="success",_.Fail="fail"})(l||(t.ResponseStatus=l={}));const m=typeof e.g>"u"?typeof window>"u"?{__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__:void 0}:window:e.g;function E(){const _=m.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__;if(_)return _.captureRPC}class p{constructor(s){this.source=s,this._disposables=new n.DisposableStore,this.capturer=null,this.setupListener=g=>{const{command:c}=g.detail;c===r.DevtoolsLantencyCommand.Start?this.capturer=E():c===r.DevtoolsLantencyCommand.Stop&&(this.capturer=null)},this.prefix=(0,n.randomString)(6),this.capturer=E(),typeof m.addEventListener=="function"&&(m.addEventListener(r.EDevtoolsEvent.Latency,this.setupListener),this._disposables.add({dispose:()=>{m.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,c){this.capturer&&this.capture({type:o.OnRequest,requestId:`\u2193${s}`,serviceMethod:g,arguments:c})}captureOnRequestResult(s,g,c){this.capturer&&this.capture({type:o.OnRequestResult,status:l.Success,requestId:`\u2193${s}`,serviceMethod:g,data:c})}captureOnRequestFail(s,g,c){this.capturer&&this.capture({type:o.OnRequestResult,status:l.Fail,requestId:`\u2193${s}`,serviceMethod:g,error:c})}captureSendRequest(s,g,c){this.capturer&&this.capture({type:o.SendRequest,requestId:s,serviceMethod:g,arguments:c})}captureSendRequestResult(s,g,c){this.capturer&&this.capture({type:o.RequestResult,status:l.Success,requestId:s,serviceMethod:g,data:c})}captureSendRequestFail(s,g,c){this.capturer&&this.capture({type:o.RequestResult,status:l.Fail,requestId:s,serviceMethod:g,error:c})}captureSendNotification(s,g,c){this.capturer&&this.capture({type:o.SendNotification,serviceMethod:g,arguments:c,requestId:s})}captureOnNotification(s,g,c){this.capturer&&this.capture({type:o.OnNotification,serviceMethod:g,arguments:c,requestId:`\u2193${s}`})}dispose(){this._disposables.dispose()}}t.Capturer=p},29433:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(39048),t)},39048:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initRPCService=l,t.createRPCService=m,t.getRPCService=E;const n=e(85608),r=e(62199),o=e(8140);function l(p){return{createRPCService:(_,s)=>{const g=m(_,p);return s&&g.onRequestService(s),g},getRPCService:_=>E(_,p)}}function m(p,_){return new r.RPCServiceStub(p,_,o.ServiceType.Service).getProxy()}function E(p,_){return new r.RPCServiceStub(p,_,o.ServiceType.Stub).getProxy()}n.__exportStar(e(62199),t)},35821:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseConnection=void 0;class e{}t.BaseConnection=e},57358:(L,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 l{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(E){this.buffers.push(E);let p=!1;for(;!p;)p=this.readFrame()}readFrame(){if(this.readLengthField()){const p=this.cursor.offset,_=p+this.contentLength,s=this.buffers.slice(p,_);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 E=this.buffers.byteLength;if(this.state!==4){if(this.cursor.offset+t.indicator.length>E)return!1;this.readIndicator()}if(this.state!==4)return!1;if(this.contentLength===-1){if(this.cursor.offset+this.lengthFieldLength>E)return!1;const p=this.cursor.read(this.lengthFieldLength);this.contentLength=(0,r.readUInt32LE)(p,0)}return!(this.cursor.offset+this.contentLength>E)}readIndicator(){const E=this.cursor.iterator();let p=E.next();for(;!p.done;){switch(p.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,E.return();break;default:this.state=0;break}break;default:this.state=0;break}p=E.next()}}dispose(){this.dataEmitter.dispose(),this.buffers.dispose()}static construct(E){return l.writer.reset(),l.writer.buffer(t.indicator),l.writer.uint32(E.byteLength),l.writer.buffer(E),l.writer.dump()}}t.LengthFieldBasedFrameDecoder=l,l.writer=(0,n.BinaryWriter)({})},34982:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePortConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(l){super(),this.port=l,l.start()}send(l){this.port.postMessage(l)}onMessage(l){const m=E=>{l(E.data)};return this.port.addEventListener("message",m),{dispose:()=>{this.port.removeEventListener("message",m)}}}onceClose(l){return this.port.addEventListener("close",l),{dispose:()=>{this.port.addEventListener("close",l)}}}dispose(){}}t.MessagePortConnection=r},71056:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeMessagePortConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(l){super(),this.port=l}send(l){this.port.postMessage(l)}onMessage(l){return this.port.on("message",l),{dispose:()=>{this.port.off("message",l)}}}onceClose(l){return this.port.once("close",l),{dispose:()=>{this.port.off("close",l)}}}dispose(){this.port.removeAllListeners()}}t.NodeMessagePortConnection=r},91493:(L,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 l extends o.BaseConnection{constructor(E){super(),this.socket=E}send(E){this.socket.send(E)}isOpen(){return this.socket.readyState===this.socket.OPEN}onOpen(E){return this.socket.addEventListener("open",E),{dispose:()=>{this.socket.removeEventListener("open",E)}}}onMessage(E){const p=_=>{var s,g;let c;if(_.data instanceof Blob)c=_.data.arrayBuffer();else if(_.data instanceof ArrayBuffer)c=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")c=Promise.resolve(_.data);else throw new Error("unknown message type, expect Blob or ArrayBuffer, received: "+typeof _.data);c.then(h=>E(new Uint8Array(h,0,h.byteLength)))};return this.socket.addEventListener("message",p),{dispose:()=>{this.socket.removeEventListener("message",p)}}}onceClose(E){const p=this.onClose(_);return{dispose:()=>{p.dispose()}};function _(s,g){E(s,g),p.dispose()}}onClose(E){const p=_=>{E(_.code,_.reason)};return this.socket.addEventListener("close",p),{dispose:()=>{this.socket.removeEventListener("close",p)}}}onError(E){const p=_=>{E(_.error)};return this.socket.addEventListener("error",p),{dispose:()=>{this.socket.removeEventListener("error",p)}}}dispose(){}static forURL(E,p,_){const s=new r.default(E,p,_);return s.binaryType="arraybuffer",new l(s)}}t.ReconnectingWebSocketConnection=l},57625:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetSocketConnection=void 0;const n=e(36932);class r extends n.StreamConnection{constructor(l){super(l,l),this.socket=l}isOpen(){return this.socket.readyState==="open"}onOpen(l){return this.socket.on("connect",l),{dispose:()=>{this.socket.off("connect",l)}}}destroy(){this.socket.destroy()}}t.NetSocketConnection=r},36932:(L,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(m,E){super(),this.readable=m,this.writable=E,this.decoder=new r.LengthFieldBasedFrameDecoder;const p=_=>{this.decoder.push(_)};this.readable.on("data",p),this.readable.once("close",()=>{this.decoder.dispose(),this.readable.off("data",p)})}send(m){const E=r.LengthFieldBasedFrameDecoder.construct(m);this.writable.write(E,()=>{})}onMessage(m){return this.decoder.onData(m)}onceClose(m){const E=this.onClose(p);return{dispose:()=>{E.dispose()}};function p(_,s){m(_,s),E.dispose()}}onClose(m){const E=p=>{m(p?1:0,p?"had error":"")};return this.readable.on("close",E),this.writable!==this.readable&&this.writable.on("close",E),{dispose:()=>{this.readable.off("close",E),this.writable!==this.readable&&this.writable.off("close",E)}}}onError(m){return this.readable.on("error",m),this.writable!==this.readable&&this.writable.on("error",m),{dispose:()=>{this.readable.off("error",m),this.writable!==this.readable&&this.writable.off("error",m)}}}dispose(){this.decoder.dispose()}}t.StreamConnection=o},15272:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSWebSocketConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(l){super(),this.socket=l}send(l){this.socket.send(l)}onMessage(l){return this.socket.on("message",l),{dispose:()=>{this.socket.off("message",l)}}}onceClose(l){return this.socket.once("close",l),{dispose:()=>{this.socket.off("close",l)}}}isOpen(){return this.socket.readyState===this.socket.OPEN}dispose(){this.socket.removeAllListeners()}}t.WSWebSocketConnection=r},90750:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(34982),t)},91676:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.METHOD_NOT_REGISTERED=void 0,t.METHOD_NOT_REGISTERED="$$METHOD_NOT_REGISTERED"},89104:(L,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(E){E[E.String=0]="String",E[E.Buffer=1]="Buffer",E[E.Number=2]="Number",E[E.JSONObject=3]="JSONObject",E[E.BigInt=4]="BigInt",E[E.Array=5]="Array",E[E.Object=6]="Object",E[E.Undefined=7]="Undefined",E[E.Null=8]="Null",E[E.Boolean=9]="Boolean"})(r||(t.ProtocolType=r={}));class o{constructor(p,_,s){this.writer=p,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(p){var _;const{writer:s}=this,g=typeof p;switch(s.reserve(1),p){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(p);break;case"boolean":s.reserve(1),s.uint8(r.Boolean),s.uint8(p?1:0);break;case"number":s.reserve(8),s.uint8(r.Number),s.double(p);break;case"bigint":s.reserve(8),s.uint8(r.BigInt),s.int64(p);break;case"object":if(Array.isArray(p)){s.reserve(4),s.uint8(r.Array),s.varUInt32(p.length);for(const c of p)this.write(c)}else(0,n.isUint8Array)(p)?(s.reserve(4),s.uint8(r.Buffer),s.varUInt32(p.byteLength),s.buffer(p)):(s.uint8(r.JSONObject),s.stringOfVarUInt32(JSON.stringify(p,(_=this.objectTransfer)===null||_===void 0?void 0:_.replacer)));break;default:throw new Error(`Unknown type ${g}`)}}}read(){var p;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,(p=this.objectTransfer)===null||p===void 0?void 0:p.reviver)}case r.BigInt:return _.int64();case r.Array:{const g=_.varUInt32(),c=[];for(let h=0;h<g;h++)c.push(this.read());return c}case r.Boolean:return _.uint8()===1;default:throw new Error(`Unknown type ${s}`)}}}t.AnySerializer=o;var l;(function(E){E.CODE_URI="CodeURI",E.BUFFER="Buffer"})(l||(l={}));class m{static replacer(p,_){if(_){switch(_.$mid){case 1:{const s=n.Uri.revive(_);return{$type:l.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(p,_){if(_&&_.$type!==void 0&&_.data!==void 0)switch(_.$type){case l.CODE_URI:return n.Uri.parse(_.data);case l.BUFFER:return Uint8Array.from(_.data)}return _}}t.ExtObjectTransfer=m},94846:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oneOf=void 0;const n=e(26246),r=e(4405),o=8,l=(m,E)=>{E||(E=(0,r.furyFactory)());const{fury:p,reader:_,writer:s}=E,g=new Array(o),c=new Array(o),h={};return m.forEach((v,f)=>{const a=v.options.tag;g[f]=(0,n.generateSerializer)(p,v),c[f]=a,h[a]=f}),{deserialize:v=>{_.reset(v);const f=_.uint8();let a;switch(f){case 0:a=g[0].read();break;case 1:a=g[1].read();break;case 2:a=g[2].read();break;case 3:a=g[3].read();break;case 4:a=g[4].read();break;case 5:a=g[5].read();break;case 6:a=g[6].read();break;case 7:a=g[7].read();break}return a.kind=c[f],a},serialize:v=>{const f=h[v.kind];switch(s.reset(),s.uint8(f),f){case 0:g[0].write(v);break;case 1:g[1].write(v);break;case 2:g[2].write(v);break;case 3:g[3].write(v);break;case 4:g[4].write(v);break;case 5:g[5].write(v);break;case 6:g[6].write(v);break;case 7:g[7].write(v);break}return s.dump()}}};t.oneOf=l},4405:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.furyFactory=void 0;const r=e(85608).__importDefault(e(97419)),o=l=>{const m=new r.default(l),E=m.binaryReader,p=m.binaryWriter;return{fury:m,reader:E,writer:p}};t.furyFactory=o},25285:(L,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:(L,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:(L,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:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceCenter=void 0,t.getNotificationName=s,t.getRequestName=g,t.getMethodName=c;const n=e(43718),r=e(96068),o=e(91676),l=e(8140),m=e(66748),E=e(92408),p=200;class _{constructor(u,d){this.bench=u,this._disposables=new n.DisposableStore,this.proxies=[],this.serviceRegistry=this._disposables.add(new E.ServiceRegistry),this.protocolRegistry=this._disposables.add(new E.ProtocolRegistry),this.deferred=new n.Deferred,this._reportThreshold=p,this.uid=(0,n.randomString)(6),this.logger=d||console}setReporter(u,d=p){this._reporterService=u,this._reportThreshold=d}registerService(u,d){d===l.ServiceType.Service&&this.bench&&this.bench.registerService(u)}ready(){return this.deferred.promise}loadProtocol(u){this.protocolRegistry.addProtocol(u,{nameConverter:d=>c(u.name,d)})}setSumiConnection(u){this.proxies.length===0&&this.deferred.resolve(),this.protocolRegistry.applyTo(u.io);const d=new m.ProxySumi(this.serviceRegistry,this.logger);d.listen(u);const v=(0,r.addElement)(this.proxies,d);return{dispose:()=>{v.dispose(),d.dispose()}}}setConnection(u){this.proxies.length===0&&this.deferred.resolve();const d=new m.ProxyJson(this.serviceRegistry,this.logger);d.listen(u);const v=(0,r.addElement)(this.proxies,d);return{dispose:()=>{v.dispose(),d.dispose()}}}onRequest(u,d,v){this.serviceRegistry.register(c(u,d),v)}onRequestService(u,d){this.serviceRegistry.registerService(d,{nameConverter:v=>c(u,v)})}async broadcast(u,d,...v){await this.ready();const f=c(u,d);let a;this._reporterService&&(a=this._reporterService.time(n.REPORT_NAME.RPC_TIMMING_MEASURE));const b=await Promise.all(this.proxies.map(A=>A.invoke(f,...v))),y=[],S=[];for(const A of b)A===o.METHOD_NOT_REGISTERED?y.push(A):S.push(A);if(y.length>0&&this.logger.warn(`broadcast rpc \`${f}\` getting doubtful responses: ${y.join(",")}`),S.length===0)throw a&&a.timeEnd(f,{success:!1},{minimumReportThresholdTime:this._reportThreshold}),new Error(`broadcast rpc \`${f}\` error: no remote service can handle this call`);return a&&a.timeEnd(f,{success:!0},{minimumReportThresholdTime:this._reportThreshold}),S.length===1?S[0]:S}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 c(h,u){return u.startsWith("on")?s(h,u):g(h,u)}},62199:(L,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:(L,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 l{constructor(E,p){this.registry=E,this.connectionPromise=new n.Deferred,this._disposables=new n.DisposableStore,this.logger=p||console,this.registry.onServicesUpdate(_=>{this.connection&&this.bindMethods(_)})}nextRequestId(){return String(o++)}listen(E){this.connection=E,this._disposables.add(this.connection),this.bindMethods(this.registry.methods()),E.listen(),this.connectionPromise.resolve()}listenService(E){this.registry.registerService(E)}dispose(){this._disposables.dispose()}getInvokeProxy(){return new Proxy(Object.create(null),{get:(E,p)=>typeof p!="string"?null:r.has(p)?Promise.resolve():(E[p]||(E[p]=(..._)=>this.invoke(p,..._)),E[p])})}}t.ProxyBase=l},66748:(L,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:(L,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 l extends o.ProxyBase{constructor(){super(...arguments),this.engine="json",this.capturer=this._disposables.add(new n.Capturer(this.engine))}bindMethods(E){for(const p of E)p.startsWith("on")?this.connection.onNotification(p,async(..._)=>{this.capturer.captureOnNotification("_",p,_);try{await this.registry.invoke(p,...this.serializeArguments(_))}catch(s){this.logger.warn(`notification exec ${p} error`,s)}}):this.connection.onRequest(p,async(..._)=>{const s=this.nextRequestId();this.capturer.captureOnRequest(s,p,_);try{const g=await this.registry.invoke(p,...this.serializeArguments(_));return this.capturer.captureOnRequestResult(s,p,g),{error:!1,data:g}}catch(g){return this.capturer.captureOnRequestFail(s,p,g),{error:!0,data:{message:g.message,stack:g.stack}}}})}async invoke(E,...p){await this.connectionPromise.promise;let _=!1;if(p.length===1&&Array.isArray(p[0])&&(_=!0),E.startsWith("on"))this.capturer.captureSendNotification("_",E,p),_?this.connection.sendNotification(E,[...p]):this.connection.sendNotification(E,...p);else{const s=this.nextRequestId();let g;_?g=this.connection.sendRequest(E,[...p]):g=this.connection.sendRequest(E,...p),this.capturer.captureSendRequest(s,E,p);const c=await g;if(c.error){const h=new Error(c.data.message);throw c.data.stack&&(h.stack=c.data.stack),this.capturer.captureSendRequestFail(s,E,c.data),h}else return this.capturer.captureSendRequestResult(s,E,c.data),c.data}}serializeArguments(E){const p=E[E.length-1];return E.length===2&&Array.isArray(E[0])&&Object.prototype.hasOwnProperty.call(p,"_isCancelled")?[...E[0],p]:E}listen(E){super.listen(E),this._disposables.add(E.onRequest(p=>{if(!this.registry.has(p)){const _=this.nextRequestId();this.capturer.captureOnRequest(_,p,[]);const s={data:r.METHOD_NOT_REGISTERED};return this.capturer.captureOnRequestFail(_,p,s.data),s}}))}}t.ProxyJson=l},16420:(L,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(m){for(const E of m)E.startsWith("on")?this.connection.onNotification(E,async(...p)=>{try{await this.registry.invoke(E,...p)}catch(_){this.logger.warn(`notification exec ${E} error`,_)}}):this.connection.onRequest(E,async(...p)=>await this.registry.invoke(E,...p))}async invoke(m,...E){if(await this.connectionPromise.promise,m.startsWith("on"))this.connection.sendNotification(m,...E);else return await this.connection.sendRequest(m,...E)}listen(m){super.listen(m),this._disposables.add(m.onRequestNotFound(()=>{throw n.METHOD_NOT_REGISTERED}))}}t.ProxySumi=o},92408:(L,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(E){const p=new Set;let _=E;do{const g=Object.getOwnPropertyNames(_);for(const c of g)r.has(c)||typeof E[c]=="function"&&p.add(c)}while(_=Object.getPrototypeOf(_));const s=Array.from(p);return s.sort(),s}class l{constructor(){this._disposables=new n.DisposableStore,this.emitter=this._disposables.add(new n.Emitter),this.onServicesUpdate=this.emitter.event,this.serviceMethodMap=new Map}register(p,_){this.serviceMethodMap.set(p,_),this.emitter.fire([p])}registerService(p,_){const s=[],{nameConverter:g}=_||{},c=o(p);for(const h of c){let u=h;g&&(u=g(h)),this.serviceMethodMap.set(u,p[h].bind(p)),s.push(u)}this.emitter.fire(s)}has(p){return this.serviceMethodMap.has(p)}invoke(p,..._){return this.serviceMethodMap.get(p)(..._)}methods(){return Array.from(this.serviceMethodMap.keys())}dispose(){this._disposables.dispose()}}t.ServiceRegistry=l;class m{constructor(){this._disposables=new n.DisposableStore,this.emitter=this._disposables.add(new n.Emitter),this.onProtocolUpdate=this.emitter.event,this.protocolMap=new Map}addProtocol(p,_){const s=[],{nameConverter:g}=_||{},{methods:c}=p;for(const h of c){let u=h.method;g&&(u=g(u)),this.protocolMap.set(u,{...h,method:u}),s.push(u)}this.emitter.fire(s)}applyTo(p){if(p.loadProtocolMethod){for(const _ of this.protocolMap.values())p.loadProtocolMethod(_);this._disposables.add(this.onProtocolUpdate(_=>{if(p.loadProtocolMethod)for(const s of _){const g=this.protocolMap.get(s);g&&p.loadProtocolMethod(g)}}))}}dispose(){this._disposables.dispose()}}t.ProtocolRegistry=m},68855:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceStub=void 0;class e{constructor(r,o,l){this.serviceName=r,this.center=o,this.type=l,this.getProxy=()=>new Proxy(this,{get:(m,E)=>typeof E=="symbol"?Promise.resolve():(m[E]||(m[E]=(...p)=>this.broadcast(E,...p)),m[E])}),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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiConnection=void 0;const n=e(43718),r=e(70392),o=e(93062),l=e(30613),m=e(90750),E=e(91676),p=e(48218),_=e(76339),s={},g={chunked:!0};class c{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 l.Capturer(d.name||"sumi"),this.disposable.add(this.capturer)}sendNotification(u,...d){const v=this._requestId++;this.capturer.captureSendNotification(v,u,d),this.socket.send(this.io.Notification(v,u,s,d))}sendRequest(u,...d){return new Promise((v,f)=>{const a=this._requestId++;if(this._callbacks.set(a,(y,S,A)=>{if(S){if(this.traceRequestError(a,u,d,S),S===E.METHOD_NOT_REGISTERED){v(S);return}f(S);return}this.capturer.captureSendRequestResult(a,u,A),v(A)}),this.options.timeout&&this.options.timeout!==-1){const y=setTimeout(()=>{this._handleTimeout(u,a)},this.options.timeout);this._reqTimeoutHandles.set(a,y)}const b=d.length&&r.CancellationToken.isCancellationToken(d[d.length-1])?d.pop():void 0;if(b&&b.isCancellationRequested)return Promise.reject((0,r.canceled)());b&&b.onCancellationRequested(()=>this.cancelRequest(a)),this.capturer.captureSendRequest(a,u,d),this.socket.send(this.io.Request(a,u,{cancelable:!!b||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 v=this._callbacks.get(d);this._callbacks.delete(d),this._reqTimeoutHandles.delete(d),v(s,new p.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),v=d.kind,f=d.requestId;switch(v===_.OperationType.Error&&this.logger.warn(`[${d.requestId}] Error received from server method ${d.method}: ${d.error}`),v){case _.OperationType.Error:case _.OperationType.Response:{const{headers:a,method:b}=d,y=d.error,S=d.result;this._reqTimeoutHandles.has(f)&&(clearTimeout(this._reqTimeoutHandles.get(f)),this._reqTimeoutHandles.delete(f));const A=(T,w,D)=>{const I=this._callbacks.get(f);if(!I){this.logger.error(`Cannot find callback for request ${f}: ${b}`);return}this._callbacks.delete(f),I(T,w,D)};if(a&&a.chunked){let T;if(this.activeRequestPool.has(f)?T=this.activeRequestPool.get(f):(T=new o.SumiReadableStream,this.activeRequestPool.set(f,T),A(a,void 0,T)),S===null){T.end(),this.activeRequestPool.delete(f);break}if(y){T.emitError(y);break}T.emitData(S);break}A(a,y,S);break}case _.OperationType.Notification:case _.OperationType.Request:{const{method:a,headers:b,args:y}=d;if(b.cancelable){const S=new r.CancellationTokenSource;this._cancellationTokenSources.set(f,S),y.push(S.token),this._knownCanceledRequests.has(f)&&(S.cancel(),this._knownCanceledRequests.delete(f))}switch(v){case _.OperationType.Request:{this.capturer.captureOnRequest(f,a,y);let S;try{let w;const D=this._requestHandlers.get(a);D?w=D(...y):this._starRequestHandler&&(w=this._starRequestHandler(a,y)),S=Promise.resolve(w)}catch(w){S=Promise.reject(w)}const A=w=>{this.capturer.captureOnRequestResult(f,a,w),(0,o.isReadableStream)(w)?(0,o.listenReadable)(w,{onData:D=>{this.socket.send(this.io.Response(f,a,g,D))},onEnd:()=>{this.socket.send(this.io.Response(f,a,g,null)),this._cancellationTokenSources.delete(f)},onError:D=>{this.socket.send(this.io.Error(f,a,g,D)),this._cancellationTokenSources.delete(f)}}):(this.socket.send(this.io.Response(f,a,s,w)),this._cancellationTokenSources.delete(f))},T=w=>{this.traceRequestError(f,a,y,w),this.socket.send(this.io.Error(f,a,s,w)),this._cancellationTokenSources.delete(f)};S.then(A).catch(T);break}case _.OperationType.Notification:{this.capturer.captureOnNotification(f,a,y);const S=this._notificationHandlers.get(a);S?S(...y):this._starNotificationHandler&&this._starNotificationHandler(a,y);break}}break}case _.OperationType.Cancel:{const a=this._cancellationTokenSources.get(f);a?a.cancel():this._knownCanceledRequests.add(f);break}default:break}}))}dispose(){this.disposable.dispose()}static forWSWebSocket(u,d={}){return new c(new m.WSWebSocketConnection(u),d)}static forNetSocket(u,d={}){return new c(new m.NetSocketConnection(u),d)}traceRequestError(u,d,v,f){this.capturer.captureSendRequestFail(u,d,f)}toJSON(){throw new Error(`You're trying to serialize a SumiConnection instance, which is not allowed.
|
|
28322
|
+
`},73136:(L,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:(L,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)),l=e(41869),m=e(53711),E=n.__importDefault(e(65887)),p=({item:_,defaultLeftPadding:s=8,leftPadding:g=8,decorations:c,onClick:h,onTwistierClick:u})=>{const d=(0,l.useDesignStyles)(E.default.expansion_toggle,"expansion_toggle"),v=(0,o.useCallback)(I=>{_.onSelect?_.onSelect(_):h(I,_)},[h]),f=(0,o.useCallback)(I=>{u(I,_)},[u]),a=`${s+(_.depth||0)*(g||0)+(m.CommentContentNode.is(_)?16:m.CommentFileNode.is(_)?0:28)}px`,b={height:t.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${t.COMMENT_TREE_NODE_HEIGHT}px`,paddingLeft:a},y=(0,o.useCallback)(I=>{if(m.CommentContentNode.is(I)||m.CommentFileNode.is(I))return o.default.createElement("div",{className:(0,r.default)(E.default.icon,I.icon),style:{height:t.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${t.COMMENT_TREE_NODE_HEIGHT}px`}})},[]),S=(0,o.useCallback)(I=>m.CommentContentNode.is(I)?o.default.createElement("div",{className:(0,r.default)(E.default.segment,E.default.displayname)},I.renderedLabel?I.renderedLabel:o.default.createElement(o.default.Fragment,null,I.comment,o.default.createElement("span",{className:E.default.separator},"\xB7"),I.author.name)):o.default.createElement("div",{className:(0,r.default)(E.default.segment,E.default.displayname)},I.renderedLabel),[]),A=(0,o.useCallback)(I=>o.default.createElement("div",{className:(0,r.default)(E.default.segment_grow,E.default.description)},I.renderedDescription),[]),T=(0,o.useCallback)(I=>o.default.createElement("div",{onClick:f,className:(0,r.default)(E.default.segment,d,(0,l.getIcon)("arrow-right"),{[`${E.default.mod_collapsed}`]:!I.expanded})}),[f]),w=(0,o.useCallback)(I=>{if(m.CommentFileNode.is(I)||I?.isAllowToggle)return T(I)},[]),D=(0,o.useCallback)(()=>_.tooltip,[_]);return o.default.createElement("div",{key:_.id,onClick:v,title:D(),className:(0,r.default)(E.default.comment_node,c?c.classlist:null),style:b,"data-id":_.id},o.default.createElement("div",{className:E.default.content},w(_),y(_),o.default.createElement("div",{className:E.default.overflow_wrap},S(_),A(_))))};t.CommentNodeRendered=p,t.COMMENT_TREE_NODE_HEIGHT=22},47842:(L,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),l=e(41869),m=e(23418),E=e(69635),p=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",[p.CommentRoot])],s);let g=class extends l.Disposable{constructor(){super(),this.selectedDecoration=new o.Decoration(_.default.mod_selected),this.focusedDecoration=new o.Decoration(_.default.mod_focused),this._selectedNodes=[],this.onDidUpdateTreeModelEmitter=new l.Emitter,this.disposableCollection=new l.DisposableCollection,this.applyFocusedDecoration=(h,u=!0)=>{var d;if(h){for(const v of this._selectedNodes)this.selectedDecoration.removeTarget(v);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)=>{(p.CommentFileNode.is(u)||u?.isAllowToggle)&&this.toggleDirectory(u)},this.handleItemClick=async(h,u)=>{this.applyFocusedDecoration(u),(p.CommentFileNode.is(u)||u?.isAllowToggle)&&this.toggleDirectory(u);let d,v;u instanceof p.CommentReplyNode||u instanceof p.CommentContentNode?(d=u.thread.uri,v=u.thread.range):d=u.resource,this.editorService.open(d,{range:v}).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(l.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,l.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)(E.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)(m.WorkbenchEditorService),n.__metadata("design:type",m.WorkbenchEditorService)],g.prototype,"editorService",void 0),t.CommentModelService=g=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],g)},53711:(L,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(p){return!!p&&!p.parent}constructor(p){super(p,void 0)}get expanded(){return!0}}t.CommentRoot=r;class o extends n.CompositeTreeNode{static is(p){return n.CompositeTreeNode.is(p)&&"threads"in p}constructor(p,_,s="",g,c,h,u){super(p,u),this.threads=_,this.tooltip=g,this.icon=c,this.resource=h,this.isExpanded=!0,this._renderedLabel=this.resource.displayName,this._renderedDescription=s}set label(p){this._renderedLabel=p}set description(p){this._renderedDescription=p}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(p){this._onSelectHandler=p}get onSelect(){return this._onSelectHandler}}t.CommentFileNode=o;class l extends n.CompositeTreeNode{static is(p){return n.CompositeTreeNode.is(p)&&"author"in p}constructor(p,_,s,g="",c,h,u,d){super(p,d),this.thread=_,this.comment=s,this.icon=c,this.author=h,this.resource=u,this._renderedDescription=g,this.isExpanded=!0,this._isAllowToggle=!1}get isAllowToggle(){return this._isAllowToggle}setIsAllowToggle(p){this._isAllowToggle=p}set label(p){this._renderedLabel=p}set description(p){this._renderedDescription=p}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(p){this._onSelectHandler=p}get onSelect(){return this._onSelectHandler}}t.CommentContentNode=l;class m extends n.TreeNode{constructor(p,_,s,g="",c,h,u){super(p,u),this.thread=_,this.icon=c,this.resource=h,this._renderedLabel=s,this._renderedDescription=g}set label(p){this._renderedLabel=p}set description(p){this._renderedDescription=p}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(p){this._onSelectHandler=p}get onSelect(){return this._onSelectHandler}}t.CommentReplyNode=m},69635:(L,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(p){p[p.Editor=0]="Editor",p[p.Preview=1]="Preview"})(r||(t.CommentMode=r={}));var o;(function(p){p[p.Collapsed=0]="Collapsed",p[p.Expanded=1]="Expanded"})(o||(t.CommentThreadCollapsibleState=o={}));var l;(function(p){p.Thread="thread",p.Empty="empty"})(l||(t.CommentGutterType=l={})),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 m extends n.BasicEvent{}t.CommentPanelCollapse=m;class E extends n.BasicEvent{}t.CommentReactionClick=E},86077:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(69635),t)},79383:(L,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 l=({className:m,children:E,...p})=>o.default.createElement("span",{className:(0,r.default)("kt-badge",m),...p},E);t.Badge=l},48412:(L,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)),l=e(99613),m=e(54713);e(71682);const E=()=>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 p(){}t.Button=o.default.memo(({children:_,loading:s,className:g,type:c="primary",htmlType:h,size:u,ghost:d=!1,onClick:v,disabled:f,block:a,iconClass:b,icon:y,more:S,moreIconClass:A,menu:T,moreVisible:w,placement:D,title:I,onVisibleChange:O,...P})=>{const R=(0,r.default)("kt-button",g,{[`kt-${c}-button-loading`]:s,[`ghost-${c}-button`]:d&&!s&&c!=="link",[`${c}-button`]:c,[`${u}-button-size`]:u,"ghost-button":d&&c!=="link","block-button":a}),M=(0,r.default)(g,{"kt-clickable-icon":!!v});if(c==="icon")return o.default.createElement(m.Icon,{tooltip:I,disabled:f,icon:y,onClick:s||f?p:v,className:M,iconClass:b,...P});const k=b?o.default.createElement(m.Icon,{iconClass:b,disabled:f}):null;return T?o.default.createElement(l.Dropdown,{visible:w,className:"kt-menu",overlay:T,trigger:["click"],onVisibleChange:O,placement:D},o.default.createElement("button",{...P,disabled:f,className:R,type:h,onClick:s||f?p:v},s&&c!=="link"&&o.default.createElement(E,null),k&&k,_,S&&o.default.createElement(m.Icon,{iconClass:A||(0,m.getIcon)("down"),className:"kt-button-secondary-more"}))):o.default.createElement("button",{...P,disabled:f,className:R,type:h,onClick:s||f?p:v},s&&c!=="link"&&o.default.createElement(E,null),k&&k,_)})},7273:(L,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)),l=e(65973);e(6099);const m=()=>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"})),E=({insertClass:p,className:_,label:s,size:g="default",disabled:c,checked:h,wrapTabIndex:u,...d})=>{(0,l.warning)(!p,"`insertClass` was deprecated, please use `className` instead");const v=d;return v.checked=h??!1,o.default.createElement("label",{className:(0,r.default)("kt-checkbox",p,_,{"kt-checkbox-large":g==="large","kt-checkbox-disabled":c}),tabIndex:u},o.default.createElement("span",{className:"kt-checkbox-lump"},o.default.createElement("input",{type:"checkbox",disabled:c,...v}),o.default.createElement("span",{className:"kt-checkbox-icon"},o.default.createElement(m,null))),s||" ")};t.CheckBox=E,t.CheckBox.displayName="OpenSumiCheckBox"},58998:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClickOutside=void 0;const r=e(85608).__importDefault(e(14041)),o=({mouseEvents:l=["click"],onOutsideClick:m,children:E,...p})=>{const _=r.default.useRef(null),s=r.default.useCallback(g=>{_.current&&g.target&&!_.current.contains(g.target)&&m(g)},[m]);return r.default.useEffect(()=>(l.forEach(g=>{window.addEventListener(g,s,!0)}),()=>{l.forEach(g=>{window.removeEventListener(g,s,!0)})}),[l]),r.default.createElement("div",{...p,ref:_},E)};t.ClickOutside=o},50570:(L,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:(L,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)),l=e(43718),m=e(48412),E=e(50570),p=e(54713),_=e(79024);e(65773);const s=({onCancel:h,onOk:u,cancelText:d,okText:v})=>o.default.createElement(o.default.Fragment,null,o.default.createElement(m.Button,{onClick:h,type:"secondary"},d||(0,l.localize)("ButtonCancel")),o.default.createElement(m.Button,{onClick:u},v||(0,l.localize)("ButtonOK"))),g=({onClose:h,closable:u,type:d="confirm",messageType:v=E.MessageType.Info,icon:f,message:a,buttons:b,title:y,onOk:S,onCancel:A,okText:T,cancelText:w})=>{const{getIcon:D}=o.default.useContext(p.IconContext);return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-dialog-content"},f&&o.default.createElement("div",{style:{color:f.color},className:(0,r.default)("kt-dialog-icon",(0,p.getIcon)(f.className)||D(f.className))}),o.default.createElement("div",{className:"kt-dialog-content_area"},o.default.createElement("div",{className:"kt-dialog-content_title"},y),a&&o.default.createElement("span",{className:"kt-dialog-message"},a)),u&&d!=="basic"&&o.default.createElement("button",{className:(0,r.default)("kt-dialog-closex",(0,p.getIcon)("close")),onClick:h})),v!==E.MessageType.Empty&&d!=="basic"&&o.default.createElement("div",{className:"kt-dialog-buttonWrap"},d==="confirm"?b||o.default.createElement(s,{onCancel:A,onOk:S,okText:T,cancelText:w}):o.default.createElement(m.Button,{onClick:h},"OK")))};t.DialogContent=g;const c=({visible:h,onClose:u,closable:d,afterClose:v,messageType:f,icon:a,message:b,detail:y,buttons:S,type:A="confirm",title:T,onOk:w,onCancel:D,okText:I,cancelText:O,getContainer:P,keyboard:R,...M})=>o.default.createElement(_.Overlay,{visible:h,onClose:u,title:A==="basic"?T:null,closable:A==="basic",getContainer:P,keyboard:R,footer:A==="basic"?S||o.default.createElement(s,{onCancel:D,onOk:w,okText:I,cancelText:O}):void 0,afterClose:v,...M},o.default.createElement(t.DialogContent,{title:b,message:y,buttons:S,visible:h,icon:a,...M}));t.Dialog=c},99665:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(62596)),o=n.__importDefault(e(53373)),l=n.__importStar(e(14041)),m=e(48412),E=n.__importDefault(e(35060)),p=_=>{var s;const{prefixCls:g,type:c="primary",size:h="default",danger:u,disabled:d,loading:v,onClick:f,htmlType:a,children:b,className:y,overlay:S,trigger:A,align:T,visible:w,onVisibleChange:D,placement:I,getPopupContainer:O,href:P,icon:R=l.createElement(r.default,null),title:M,buttonsRender:k=$=>$,mouseEnterDelay:B,mouseLeaveDelay:x,overlayClassName:N,overlayStyle:j,...K}=_,U=g||"kt-dropdown-button",Q={align:T,overlay:S,disabled:d,trigger:d?[]:A,getPopupContainer:O,mouseEnterDelay:B,mouseLeaveDelay:x,overlayClassName:N,overlayStyle:j};Q.placement=(s=_?.placement)!==null&&s!==void 0?s:"bottomRight";const z=l.createElement(m.Button,{size:h,type:c,disabled:d,loading:v,onClick:f,htmlType:a,title:M},b),G=l.createElement(m.Button,{size:h,type:c},R??l.createElement(r.default,null)),[Y,Z]=k([z,G]);return l.createElement("div",{...K,className:(0,o.default)(U,y)},Y,l.createElement(E.default,{...Q},Z))};t.default=p},35060:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(64797)),o=n.__importDefault(e(53373)),l=n.__importDefault(e(5147)),m=n.__importDefault(e(14041)),E=e(43953),p=e(65973),_=(0,E.tuple)("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight");class s extends m.default.Component{constructor(){super(...arguments),this.renderOverlay=c=>{const{overlay:h}=this.props;let u;typeof h=="function"?u=h():u=h,u=m.default.Children.only(u);const d=u.props;(0,p.warning)(!d.mode||d.mode==="vertical",`[Dropdown] mode="${d.mode}" is not supported for Dropdown's Menu.`);const{selectable:v=!1,focusable:f=!0}=d,a=m.default.createElement("span",{className:`${c}-menu-submenu-arrow`},m.default.createElement(r.default,{className:`${c}-menu-submenu-arrow-icon`}));return typeof u.type=="string"?h:m.default.cloneElement(u,{mode:"vertical",selectable:v,focusable:f,expandIcon:a})},this.renderDropDown=()=>{const{prefixCls:c,children:h,trigger:u,disabled:d,getPopupContainer:v}=this.props,f=c||"kt-dropdown",a=m.default.Children.only(h),b=m.default.cloneElement(a,{className:(0,o.default)(a.props.className,`${f}-trigger`),disabled:d}),y=d?[]:u;let S;return y&&y.indexOf("contextMenu")!==-1&&(S=!0),m.default.createElement(l.default,{alignPoint:S,...this.props,prefixCls:f,getPopupContainer:v,transitionName:this.getTransitionName(),trigger:y,overlay:()=>this.renderOverlay(f)},b)}}getTransitionName(){const{placement:c="",transitionName:h}=this.props;return h!==void 0?h:c.indexOf("top")>=0?"slide-down":"slide-up"}render(){return this.renderDropDown()}}s.defaultProps={mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft"},t.default=s},99613:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=t._InternalIcon=t.IconContext=void 0,t.IconContextProvider=E;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(12122),m=e(76577);e(1914),t.IconContext=o.default.createContext({getIcon:(_,s)=>_});function E(_){return o.default.createElement(t.IconContext.Provider,{value:_.value},o.default.createElement(t.IconContext.Consumer,null,s=>_.value===s?_.children:null))}const p=function(_,s){const{size:g="small",loading:c,icon:h,iconClass:u,className:d,tooltip:v,rotate:f,anim:a,fill:b,disabled:y,onClick:S,children:A,resourceOptions:T,animate:w,style:D={},...I}=_,O={rotate:f,anim:a,fill:b};let P;if(h)if(l.defaultIconMap[h])P=(0,m.getIcon)(h,O);else{const{getIcon:R,getResourceIcon:M}=o.default.useContext(t.IconContext);T&&M?P=M(h,T):P=R(h,O)}else P=u;return w&&w==="spin"&&(D.animation="kt-icon-spin 1.5s steps(30) infinite"),o.default.createElement("span",{...I,title:v,onClick:S,ref:s,className:(0,r.default)("kt-icon",P,d,{"kt-icon-loading":c,"kt-icon-disabled":!!y,[`kt-icon-${g}`]:!!g,"kt-icon-clickable":!!S,"kt-icon-resource":!!T,expanded:!!T&&T.isOpenedDirectory}),style:D},A)};t._InternalIcon=o.default.memo(o.default.forwardRef(p)),t.Icon=o.default.memo(o.default.forwardRef(p))},10391:(L,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)),l=e(80564),m=e(76577),E=new Set;function p(c){return!!(typeof c=="string"&&c.length&&!E.has(c))}function _(c,h=0){const u=c[h];if(p(u)){const d=document.createElement("script");d.setAttribute("src",u),d.setAttribute("data-namespace",u),c.length>h+1&&(d.onload=()=>{_(c,h+1)},d.onerror=()=>{_(c,h+1)}),E.add(u),document.body.appendChild(d)}}const s={width:"1em",height:"1em",fill:"currentColor"};function g(c={}){const{scriptUrl:h,extraCommonProps:u={}}=c;h&&typeof document<"u"&&typeof window<"u"&&typeof document.createElement=="function"&&(Array.isArray(h)?_(h.reverse()):_([h]));const d=o.default.forwardRef((v,f)=>{const{icon:a,children:b,rotate:y,anim:S,fill:A,className:T="",...w}=v,D={rotate:y,anim:S,fill:A};let I=null;a&&(I=o.default.createElement("svg",{...s,focusable:"false"},o.default.createElement("use",{xlinkHref:`#${a}`}))),b&&(I=b);const O=(0,m.getIconShapeClxList)(D);return o.default.createElement(l._InternalIcon,{...u,...w,className:(0,r.default)(T,O),ref:f},I)});return d.displayName="Iconfont",d}},12122:(L,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 l={"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"},m=Object.assign({},o.defaultIconfont,l);t.defaultIconMap=new Proxy(m,{get(_,s){const g=l[s];return(0,r.default)(!g,`Icon '${s}' was a typo, please use '${g}' instead`),_[s]}});class E{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 c=this._iconMap[this._ktIconPrefixes[g]][s];return c?[`${this._ktIconPrefixes[g]}${c}`]:((0,r.default)(!1,"No icon found for "+s),[])}}t.iconManager=new E,t.iconManager.update("kaitian-icon kticon-",t.defaultIconMap)},81139:(L,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","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-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","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","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-hollow":"send-hollow","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"}},54713:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateKaitianIconMap=t.getKaitianIcon=t.ANIM_TYPE=t.ROTATE_TYPE=void 0,t.updateIconMap=E,t.getIconShapeClxList=p,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 l=["rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","flip-both"],m=["spin","pulse"];function E(s,g){n.iconManager.update(s,g)}function p(s){const{rotate:g,anim:c,fill:h}=s||{},u=[];return g!==void 0&&u.push(`iconfont-${l[g]}`),c!==void 0&&u.push(`iconfont-anim-${m[c]}`),h&&u.push("toggled"),u}function _(s,g){const c=n.iconManager.getIconClx(s),h=p(g);return c.push(...h),c.join(" ")}t.getKaitianIcon=_,t.updateKaitianIconMap=E},97267:(L,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(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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryInputBox=void 0;const r=e(85608).__importDefault(e(14041)),o=e(54114),l=e(63924);class m extends r.default.Component{constructor(){super(...arguments),this.inputRef=r.default.createRef(),this.addToHistory=p=>{this.history&&p&&p!==this.getCurrentValue()&&this.history.add(p)},this.getHistory=()=>this.history&&this.history.getHistory()||[],this.showNextValue=()=>{const p=this.getCurrentValue()||"";this.history&&!this.history.has(p)&&this.addToHistory(p);let _=this.getNextValue();_&&(_=_===p?this.getNextValue():_),_&&this.onValueChange(_)},this.showPreviousValue=()=>{const p=this.getCurrentValue()||"";this.history&&!this.history.has(p)&&this.addToHistory(p);let _=this.getPreviousValue();_&&(_=_===p?this.getPreviousValue():_),_&&this.onValueChange(_)},this.clearHistory=()=>{this.history&&this.history.clear()},this.getCurrentValue=()=>{if(!this.history)return null;let p=this.history.current();return p||(p=this.history.last(),this.history.next()),p},this.getPreviousValue=()=>this.history&&(this.history.previous()||this.history.first())||null,this.getNextValue=()=>this.history&&(this.history.next()||this.history.last())||null,this.onValueChange=p=>{const{onValueChange:_}=this.props;this.setState({inputValue:p}),_&&_(p)},this.onKeyDown=p=>{const{onKeyDown:_}=this.props;_&&_(p)},this.focus=()=>{this.inputRef&&this.inputRef.current&&this.inputRef.current.focus()}}componentDidMount(){var p;const{history:_,onReady:s}=this.props;this.history=new o.HistoryNavigator(_||[],100),this.inputProps={...this.props},delete this.inputProps.onReady,this.setState({inputValue:((p=this.props.value)!==null&&p!==void 0?p: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 p=this.state&&this.state.inputValue;return r.default.createElement(l.Input,{ref:this.inputRef,...this.inputProps,onValueChange:this.onValueChange,onKeyDown:this.onKeyDown,value:p})}}t.HistoryInputBox=m},63924:(L,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)),l=e(54713),m=n.__importDefault(e(65973));e(41065);function E(_){return typeof _>"u"}function p(_,s,g){if(typeof g=="function"){let c=s;if(s.type==="click"){c=Object.create(s),c.target=_,c.currentTarget=_;const h=_.value;_.value="",g(c),_.value=h;return}g(c)}}t.Input=o.default.forwardRef((_,s)=>{const{defaultValue:g,className:c,wrapperStyle:h,size:u="default",controls:d,onChange:v,selection:f,addonBefore:a,addonAfter:b,persistFocus:y=!0,hasClear:S,afterClear:A,value:T,onValueChange:w,onPressEnter:D,onKeyDown:I,as:O="input",...P}=_;(0,m.default)(!d,"[@opensumi/ide-components Input]: `controls` was deprecated, please use `addonAfter` instead");const R=o.default.useRef(null),[M,k]=o.default.useState(!1),[B,x]=o.default.useState(()=>(T??g)||""),[N,j]=o.default.useState(()=>(T??g)||"");o.default.useImperativeHandle(s,()=>R.current),o.default.useEffect(()=>{f&&!E(f.start)&&!M&&R.current.setSelectionRange(f.start,f.end)},[f,M]),o.default.useEffect(()=>{T===null||typeof T>"u"||(T!==N&&T!==B&&x(T),T!==N&&j(T))},[T]);const K=H=>{Q(H.target.value),p(R.current,H,v)},U=H=>{H.preventDefault(),Q(""),p(R.current,H,v),typeof A=="function"&&A()},Q=H=>{x(H),typeof w=="function"&&w(H),M||k(!0)},z=H=>{H.keyCode===13&&typeof D=="function"&&D(H),typeof I=="function"&&I(H)},G=b||d,Y=y?{onMouseDown:H=>{H.preventDefault()}}:{},Z=(H,X)=>H?o.default.createElement("div",{className:(0,r.default)("kt-input-addon",X),...Y},o.default.Children.map(H,J=>o.default.isValidElement(J)?o.default.cloneElement(J,Y):null)):null,$=(0,r.default)("kt-input",c,{[`kt-input-${u}`]:u,"kt-input-disabled":_.disabled});return o.default.createElement("div",{className:$,style:h},Z(a,"kt-input-addon-before"),o.default.createElement("div",{className:"kt-input-box"},o.default.createElement(O,{ref:R,type:"text",autoCapitalize:"off",autoCorrect:"off",autoComplete:"off",spellCheck:!1,...P,value:B,onChange:K,onKeyDown:z}),S&&B&&o.default.createElement(l.Icon,{className:"kt-input-clear",icon:"close-circle-fill",onClick:U,...Y})),Z(G,"kt-input-addon-after"))}),t.Input.displayName="OpenSumiInput"},64545:(L,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)),l=n.__importDefault(e(14041));e(41065),e(17107);const m="kt-input-number",E=p=>{const{value:_,size:s="default",wrapperStyle:g,className:c,disabled:h,min:u,max:d,onChange:v,...f}=p,a=y=>{v&&v(y)},b=(0,r.default)("kt-input","kt-input-number",c,{[`kt-input-${s}`]:s,"kt-input-disabled":h});return l.default.createElement("div",{className:b,style:g},l.default.createElement("div",{className:"kt-input-box"},l.default.createElement(o.default,{prefixCls:m,min:u,max:d,value:_,type:"number",onChange:a,controls:!0,...f})))};t.InputNumber=E,t.InputNumber.displayName="OpenSumiInputNumber"},10413:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindInputElement=E;const r=e(85608).__importDefault(e(14041)),o=e(63924);class l 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:c,style:h}=_;if(typeof s=="string"&&(c.className=s),typeof g=="string"&&(c.id=g),h!==null&&typeof h=="object")for(const u in h)typeof h[u]=="string"&&c[u]&&(c[u]=h[u])}}const m=r.default.forwardRef((p,_)=>r.default.createElement(l,{...p,innerRef:_}));function E(p){return _=>r.default.createElement(m,{..._,inputElement:p})}},61172:(L,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((l,m)=>r.default.createElement(o.Input,{...l,as:"textarea",ref:m})),t.TextArea.displayName="OpenSumiTextArea"},34390:(L,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)),l=e(63924);e(13254);var m;(function(E){E[E.INFO=1]="INFO",E[E.ERROR=2]="ERROR",E[E.WARNING=3]="WARNING",E[E.IGNORE=4]="IGNORE"})(m||(t.VALIDATE_TYPE=m={})),t.ValidateInput=o.default.forwardRef(({type:E,className:p,validate:_,onChange:s,onValueChange:g,validateMessage:c,popup:h=!0,...u},d)=>{const[v,f]=o.default.useState();o.default.useEffect(()=>{f(c)},[c]);const a=(0,r.default)({"validate-error":v&&v.type===m.ERROR,"validate-warning":v&&v.type===m.WARNING,"validate-info":v&&v.type===m.INFO}),b=()=>{if(v&&v.message)return o.default.createElement("div",{className:(0,r.default)("validate-message",a,{popup:h})},v.message)},y=S=>{const A=S.target;let T;if(A.type==="number"?T=S.target.valueAsNumber:T=S.target.value,typeof _=="function"){let w;E==="number"?/^[0-9]+$/.test(T)?w=_(Number(T)):w=_(String(T)):w=_(T),f(w)}typeof s=="function"&&s(S),typeof g=="function"&&g(T)};return o.default.createElement("div",{className:(0,r.default)("input-box",{popup:h})},o.default.createElement(l.Input,{type:E,ref:d,className:(0,r.default)(p,v,a),onChange:y,...u}),b())}),t.ValidateInput.displayName="ValidateInput"},50708:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(3205),t)},3205:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalizeContext=void 0,t.LocalizeContextProvider=E,t.ComponentContextProvider=p;const r=e(85608).__importDefault(e(14041)),o=e(54713),l=e(65973),m=_=>((0,l.warning)(!1,"Using the default localize fn"),"");t.LocalizeContext=r.default.createContext({localize:m}),t.LocalizeContext.displayName="LocalizeContext";function E(_){return r.default.createElement(t.LocalizeContext.Provider,{value:_.value},r.default.createElement(t.LocalizeContext.Consumer,null,s=>_.value===s?_.children:null))}function p(_){return r.default.createElement(o.IconContextProvider,{value:_.value},r.default.createElement(E,{value:{localize:_.value.localize}},_.children))}},13719:(L,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:(L,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 l extends r.marked.Renderer{constructor(E){super(),this.unescapeInfo=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),this.renderer=E.renderer}parse(E){return E.map((p,_)=>{const s=(()=>{switch(p.type){case"html":return this.renderer.html(p.text);case"space":return null;case"heading":{const g=p.depth;return this.renderer.heading(this.parseInline(p.tokens),g)}case"paragraph":return this.renderer.paragraph(this.parseInline(p.tokens));case"text":{const g=p;return g.tokens?this.parseInline(g.tokens):p.text}case"blockquote":{const g=p,c=this.parse(g.tokens);return this.renderer.blockquote(c)}case"list":{const c=p.items.map((h,u)=>{var d;const v=[];return h.task&&v.push(this.renderer.checkbox((d=h.checked)!==null&&d!==void 0?d:!1)),v.push(this.parse(h.tokens)),o.default.cloneElement(this.renderer.listItem(v),{key:`list-item-${u}`})});return this.renderer.list(c,p.ordered)}case"code":return this.renderer.code(p.text,p.lang);case"table":{const g=p,c=g.header.map((f,a)=>o.default.cloneElement(this.renderer.tableCell(this.parseInline(f.tokens),{header:!0,align:p.align[a]}),{key:`header-cell-${a}`})),h=o.default.cloneElement(this.renderer.tableRow(c),{key:"header-row"}),u=this.renderer.tableHeader(h),d=g.rows.map((f,a)=>{const b=f.map((y,S)=>o.default.cloneElement(this.renderer.tableCell(this.parseInline(y.tokens),{header:!1,align:p.align[S]}),{key:`body-cell-${a}-${S}`}));return o.default.cloneElement(this.renderer.tableRow(b),{key:`body-row-${a}`})}),v=this.renderer.tableBody(d);return this.renderer.table([u,v])}case"hr":return this.renderer.hr();default:return console.warn(`Token with "${p.type}" type was not found`),null}})();return o.default.isValidElement(s)?o.default.cloneElement(s,{key:`token-${_}`}):s})}parseInline(E=[]){return E.map(p=>{switch(p.type){case"text":{const _=p.text.replace(/&(#\d+|[a-zA-Z]+);/g,s=>{var g;return(g=this.unescapeInfo.get(s))!==null&&g!==void 0?g:s});return this.renderer.text(_)}case"strong":return this.renderer.strong(this.parseInline(p.tokens));case"em":return this.renderer.em(this.parseInline(p.tokens));case"del":return this.renderer.del(this.parseInline(p.tokens));case"codespan":return this.renderer.codespan(unescape(p.text));case"link":return this.renderer.link(p.href,this.parseInline(p.tokens));case"image":return this.renderer.image(p.href,p.text,p.title);case"html":return this.renderer.html(p.text);case"br":return this.renderer.br();case"escape":return this.renderer.text(p.text);default:return console.warn(`Token with "${p.type}" type was not found`),null}})}}t.MarkdownReactParser=l},44547:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownReactRenderer=void 0;const r=e(85608).__importStar(e(14041));class o{constructor(m={}){this.uid=0,this.options=m}node(m,E=null,p={}){const _={key:`marked-react-${this.uid}`};return this.incrementUID(),(0,r.createElement)(m,{...p,..._},E)}incrementUID(){this.uid+=1}heading(m,E){return this.node(`h${E}`,m)}paragraph(m){return this.node("p",m)}joinBase(m,E){if(!E)return m;try{return new URL(m,E).href}catch{return m}}link(m,E){const p=this.joinBase(m,this.options.baseURL);return this.node("a",E,{href:p,target:"_blank",rel:"noopener noreferrer"})}image(m,E,p=null){const _=this.joinBase(m,this.options.baseURL);return this.node("img",null,{src:_,alt:E,title:p})}codespan(m,E=null){const p=E?`${this.options.langPrefix}${E}`:null;return this.node("code",m,{className:p})}code(m,E){return this.node("pre",this.codespan(m,E))}blockquote(m){return this.node("blockquote",m)}list(m,E){return this.node(E?"ol":"ul",m)}listItem(m){return this.node("li",m)}checkbox(m){return this.node("input",null,{type:"checkbox",disabled:!0,checked:m})}table(m){return this.node("table",m)}tableHeader(m){return this.node("thead",m)}tableBody(m){return this.node("tbody",m)}tableRow(m){return this.node("tr",m)}tableCell(m,E){const p=E.header?"th":"td";return this.node(p,m,{align:E.align})}strong(m){return this.node("strong",m)}em(m){return this.node("em",m)}del(m){return this.node("del",m)}text(m){return m}html(m){return r.default.createElement("div",{dangerouslySetInnerHTML:{__html:m}})}hr(){return this.node("hr")}br(){return this.node("br")}}t.MarkdownReactRenderer=o},56849:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultMarkedRenderer=t.linkify=void 0,t.Markdown=p;const n=e(85608),r=e(33714),o=n.__importDefault(e(14041)),l=e(39777),m=(_,s,g)=>`<a rel="noopener" ${l.DATA_SET_COMMAND}="${_}" title="${s??_}">${g}</a>`;t.linkify=m;class E extends r.Renderer{link(s,g,c){return(0,t.linkify)(s,g,c)}}t.DefaultMarkedRenderer=E;function p(_){const s=(h,u)=>r.marked.parse(h,{renderer:u}),[g,c]=o.default.useState(s(_.value||"",_.renderer));return o.default.useEffect(()=>{c(s(_.value||"",_.renderer))},[_.renderer,_.value]),o.default.createElement(l.RenderWrapper,{opener:_.opener,html:g})}},39777:(L,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=l=>{const m=(0,r.useRef)(),{html:E,opener:p}=l;(0,r.useEffect)(()=>(m&&m.current&&m.current.addEventListener("click",_),()=>{m&&m.current&&m.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 c=g.getAttribute(t.DATA_SET_COMMAND);c&&p&&p.open(c)}};return r.default.createElement("div",{className:"kt-md-renderer-wrap",dangerouslySetInnerHTML:{__html:E},ref:m})};t.RenderWrapper=o},98113:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=(0,e(14041).createContext)({inlineCollapsed:!1});t.default=r},64063:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=e(31363),o=n.__importDefault(e(14041)),l=n.__importDefault(e(98113));class m extends o.default.Component{constructor(){super(...arguments),this.renderItem=()=>{const{title:p,..._}=this.props;return o.default.createElement(l.default.Consumer,null,({inlineCollapsed:s})=>s?o.default.createElement(r.Item,{..._,title:p}):o.default.createElement(r.Item,{..._,title:p}))}}render(){return this.renderItem()}}m.isMenuItem=!0,t.default=m},91886:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(39067)),o=e(31363),l=n.__importDefault(e(14041));class m extends l.default.Component{render(){const{popupClassName:p}=this.props;return l.default.createElement(o.SubMenu,{...this.props,popupClassName:p})}}m.contextTypes={antdMenuTheme:r.default.string},m.isSubMenu=1,t.default=m},45803:(L,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)),l=n.__importDefault(e(14041)),m=e(90146),E=e(2835),p=e(47768),_=e(65973),s=n.__importDefault(e(98113)),g=n.__importDefault(e(64063)),c=n.__importDefault(e(91886));e(42985);class h extends l.default.Component{static getDerivedStateFromProps(v,f){const{prevProps:a}=f,b={prevProps:v};return a.mode==="inline"&&v.mode!=="inline"&&(b.switchingModeFromInline=!0),"openKeys"in v?b.openKeys=v.openKeys:(v.inlineCollapsed&&!a.inlineCollapsed&&(b.switchingModeFromInline=!0,b.inlineOpenKeys=f.openKeys,b.openKeys=[]),!v.inlineCollapsed&&a.inlineCollapsed&&(b.openKeys=f.inlineOpenKeys,b.inlineOpenKeys=[])),b}constructor(v){super(v),this.handleMouseEnter=a=>{this.restoreModeVerticalFromInline();const{onMouseEnter:b}=this.props;b&&b(a)},this.handleTransitionEnd=a=>{const b=a.propertyName==="width"&&a.target===a.currentTarget,{className:y}=a.target,S=Object.prototype.toString.call(y)==="[object SVGAnimatedString]"?y.animVal:y,A=a.propertyName==="font-size"&&S.indexOf("anticon")>=0;(b||A)&&this.restoreModeVerticalFromInline()},this.handleClick=a=>{this.handleOpenChange([]);const{onClick:b}=this.props;b&&b(a)},this.handleOpenChange=a=>{this.setOpenKeys(a);const{onOpenChange:b}=this.props;b&&b(a)},this.renderMenu=()=>{const{prefixCls:a,className:b}=this.props,y=this.getRealMenuMode(),S=this.getOpenMotionProps(y),A=a||"kt-inner-menu",T=(0,r.default)(b,{[`${A}-inline-collapsed`]:this.getInlineCollapsed()}),w={openKeys:this.state.openKeys,onOpenChange:this.handleOpenChange,className:T,mode:y,...S};return y!=="inline"&&(w.onClick=this.handleClick),this.getInlineCollapsed()&&(w.openKeys=[]),l.default.createElement(o.default,{...this.props,...w,prefixCls:A,onTransitionEnd:this.handleTransitionEnd,onMouseEnter:this.handleMouseEnter})},(0,_.warning)(!("onOpen"in v||"onClose"in v),"[Menu] `onOpen` and `onClose` are removed, please use `onOpenChange` instead, see: https://u.ant.design/menu-on-open-change."),(0,_.warning)(!("inlineCollapsed"in v&&v.mode!=="inline"),"[Menu] `inlineCollapsed` should only be used when `mode` is inline.");let f;"openKeys"in v?f=v.openKeys:"defaultOpenKeys"in v&&(f=v.defaultOpenKeys),this.state={openKeys:f||[],switchingModeFromInline:!1,inlineOpenKeys:[],prevProps:v}}componentWillUnmount(){p.wrapperRaf.cancel(this.mountRafId)}setOpenKeys(v){"openKeys"in this.props||this.setState({openKeys:v})}getRealMenuMode(){const v=this.getInlineCollapsed();if(this.state.switchingModeFromInline&&v)return"inline";const{mode:f}=this.props;return v?"vertical":f}getInlineCollapsed(){const{inlineCollapsed:v}=this.props;return v}getOpenMotionProps(v){const{openTransitionName:f,openAnimation:a,motion:b}=this.props;return b?{motion:b}:a?((0,_.warning)(typeof a=="string","[Menu] `openAnimation` do not support object. Please use `motion` instead."),{openAnimation:a}):f?{openTransitionName:f}:v==="horizontal"?{motion:{motionName:"slide-up"}}:v==="inline"?{motion:E.collapseMotion}:{motion:{motionName:""}}}restoreModeVerticalFromInline(){const{switchingModeFromInline:v}=this.state;v&&this.setState({switchingModeFromInline:!1})}render(){return l.default.createElement(s.default.Provider,{value:{inlineCollapsed:this.getInlineCollapsed()||!1}},this.renderMenu())}}h.defaultProps={className:"",focusable:!1},(0,m.polyfill)(h);class u extends l.default.Component{render(){return l.default.createElement(h,{...this.props})}}t.Menu=u,u.Divider=o.Divider,u.Item=g.default,u.SubMenu=c.default,u.ItemGroup=o.ItemGroup},31059:(L,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(l){return(m,E)=>new Promise(p=>{r.default[l](m,E,p)})}t.message={success:o("success"),error:o("error"),info:o("info"),warning:o("warning"),loading:o("loading")}},71036:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(29517)),o=n.__importDefault(e(96041)),l=n.__importDefault(e(63492)),m=n.__importDefault(e(36117)),E=n.__importDefault(e(59303)),p=n.__importDefault(e(10435)),_=n.__importDefault(e(14041));let s=3,g,c,h=1,u="kt-message",d="move-up",v,f;function a(T){if(c){T(c);return}p.default.newInstance({prefixCls:u,transitionName:d,style:{top:g},getContainer:v,maxCount:f},w=>{if(c){T(c);return}c=w,T(w)})}const b={info:m.default,success:r.default,error:o.default,warning:l.default,loading:E.default};function y(T){const w=T.duration!==void 0?T.duration:s,D=T.key||h++,I=new Promise(P=>{const R=()=>(typeof T.onClose=="function"&&T.onClose(),P(!0));a(M=>{const k=b[T.type];M.notice({key:D,duration:w,style:{},content:_.default.createElement("div",{className:`${u}-custom-content${T.type?` ${u}-${T.type}`:""}`},T.icon||k&&_.default.createElement(k,null),_.default.createElement("span",null,T.content)),onClose:R})})}),O=()=>{c&&c.removeNotice(D)};return O.then=(P,R)=>I.then(P,R),O.promise=I,O}function S(T){return Object.prototype.toString.call(T)==="[object Object]"&&!!T.content}const A={open:y,config(T){T.top!==void 0&&(g=T.top,c=null),T.duration!==void 0&&(s=T.duration),T.prefixCls!==void 0&&(u=T.prefixCls),T.getContainer!==void 0&&(v=T.getContainer),T.transitionName!==void 0&&(d=T.transitionName,c=null),T.maxCount!==void 0&&(f=T.maxCount,c=null)},destroy(){c&&(c.destroy(),c=null)}};["success","info","warning","error","loading"].forEach(T=>{A[T]=(w,D,I)=>S(w)?A.open({...w,type:T}):(typeof D=="function"&&(I=D,D=void 0),A.open({content:w,duration:D,type:T,onClose:I}))}),A.warn=A.warning,t.default=A},6656:(L,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)),l=n.__importDefault(e(39067)),m=n.__importDefault(e(51982)),E=n.__importDefault(e(25946)),p=n.__importDefault(e(14041)),_=e(48412),s=e(69587);let g;t.destroyFns=[];const c=u=>{g={x:u.pageX,y:u.pageY},setTimeout(()=>g=null,100)};typeof window<"u"&&window.document&&window.document.documentElement&&(0,E.default)(document.documentElement,"click",c);class h extends p.default.Component{constructor(){super(...arguments),this.handleCancel=d=>{const{onCancel:v}=this.props;v&&v(d)},this.handleOk=d=>{const{onOk:v}=this.props;v&&v(d)},this.renderFooter=d=>{const{okText:v,okType:f,cancelText:a,confirmLoading:b}=this.props;return p.default.createElement("div",null,p.default.createElement(_.Button,{onClick:this.handleCancel,...this.props.cancelButtonProps},a||d.cancelText),p.default.createElement(_.Button,{type:f,loading:b,onClick:this.handleOk,...this.props.okButtonProps},v||d.okText))},this.renderModal=()=>{const{prefixCls:d,footer:v,visible:f,wrapClassName:a,centered:b,getContainer:y,closeIcon:S,closable:A=!0,...T}=this.props,w=d||"kt-modal",D=this.renderFooter((0,s.getConfirmLocale)()),I=p.default.createElement("span",{className:`${w}-close-x`},S||p.default.createElement(r.default,{className:`${w}-close-icon`}));return p.default.createElement(m.default,{...T,animation:this.props.animation,getContainer:y,prefixCls:w,wrapClassName:(0,o.default)({[`${w}-centered`]:!!b},a),footer:v===void 0?D:v,visible:f,mousePosition:g,onClose:this.handleCancel,closeIcon:I})}}render(){return this.renderModal()}}h.defaultProps={width:520,confirmLoading:!1,visible:!1,okType:"primary"},h.propTypes={prefixCls:l.default.string,onOk:l.default.func,onCancel:l.default.func,okText:l.default.node,cancelText:l.default.node,centered:l.default.bool,width:l.default.oneOfType([l.default.number,l.default.string]),confirmLoading:l.default.bool,visible:l.default.bool,footer:l.default.node,title:l.default.node,closable:l.default.bool,closeIcon:l.default.node},t.default=h},53017:(L,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:(L,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(l){l?n={...n,...l}:n={...e}}function o(){return n}},18875:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notification=void 0,t.open=g,t.close=c,t.update=h;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(70392),m=e(48412),E=e(50570),p=n.__importDefault(e(70748));e(1477);const _={[E.MessageType.Info]:15,[E.MessageType.Warning]:18,[E.MessageType.Error]:20};p.default.config({placement:"bottomRight"}),t.notification=p.default;const s=new Map;function g(d,v,f=!0,a,b,y,S,A){return(0,l.createCancelablePromise)(T=>(T.onCancellationRequested(()=>{c(a)}),new Promise(w=>{const D={key:a,className:(0,r.default)("kt-notification-wrapper",{"kt-notification-info":v===E.MessageType.Info,"kt-notification-error":v===E.MessageType.Error,"kt-notification-warn":v===E.MessageType.Warning}),duration:(0,l.isUndefined)(S)?_[v]:S,onClose:()=>{A&&A(),s.delete(a),w(void 0)},btn:b?b.map((I,O)=>{const P=typeof I=="string",R={className:`${(0,r.default)("kt-notification-button")}${P?"":I.class}`,ghost:P?O===0:!I.primary,key:P?I:I.id,onClick:()=>{w(I),p.default.close(a),P||I.run()}},M=P?I:I.label;return o.default.createElement(m.Button,{size:"small",...R},M)}):null,message:d,description:y};s.set(a,[v,D]),f||(D.closeIcon=o.default.createElement("span",null)),u(v,D)})))}function c(d){t.notification.close(d)}function h(d,v){const f=s.get(d);u(f[0],{...f[1],key:d,message:v})}function u(d,v){switch(d){case E.MessageType.Info:t.notification.info(v);break;case E.MessageType.Warning:t.notification.warning(v);break;case E.MessageType.Error:t.notification.error(v);break;default:t.notification.open(v);break}}},70748:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(55435)),o=n.__importDefault(e(31079)),l=n.__importDefault(e(22143)),m=n.__importDefault(e(5550)),E=n.__importDefault(e(74339)),p=n.__importDefault(e(10435)),_=n.__importDefault(e(14041)),s=e(70392),g={};let c=4.5,h=24,u=24,d="topRight",v,f;function a(w){const{duration:D,placement:I,bottom:O,top:P,getContainer:R,closeIcon:M}=w;D!==void 0&&(c=D),I!==void 0&&(d=I),O!==void 0&&(u=O),P!==void 0&&(h=P),R!==void 0&&(v=R),M!==void 0&&(f=M)}function b(w,D=h,I=u){let O;switch(w){case"topLeft":O={left:0,top:D,bottom:"auto"};break;case"topRight":O={right:0,top:D,bottom:"auto"};break;case"bottomLeft":O={left:0,top:"auto",bottom:I};break;default:O={right:0,top:"auto",bottom:I};break}return O}function y({prefixCls:w,placement:D=d,getContainer:I=v,top:O,bottom:P,closeIcon:R=f},M){const k=`${w}-${D}`;if(g[k]){M(g[k]);return}const B=_.default.createElement("span",{className:`${w}-close-x`},R||_.default.createElement(l.default,{className:`${w}-close-icon`}));p.default.newInstance({prefixCls:w,className:`${w}-${D}`,style:b(D,O,P),getContainer:I,closeIcon:B},x=>{g[k]=x,M(x)})}const S={success:r.default,info:E.default,error:o.default,warning:m.default};function A(w){const D=w.prefixCls||"kt-notification",I=`${D}-notice`,O=(0,s.isUndefined)(w.duration)?c:w.duration;let P=null;w.icon?P=_.default.createElement("span",{className:`${I}-icon`},w.icon):w.type&&(P=_.default.createElement(S[w.type]||null,{className:`${I}-icon ${I}-icon-${w.type}`}));const{placement:R,top:M,bottom:k,getContainer:B,closeIcon:x}=w;y({prefixCls:D,placement:R,top:M,bottom:k,getContainer:B,closeIcon:x},N=>{N.notice({content:_.default.createElement("div",{className:P?`${I}-with-icon`:""},P,_.default.createElement("div",{className:`${I}-message`},w.message),_.default.createElement("div",{className:`${I}-description`},w.description),w.btn?_.default.createElement("span",{className:`${I}-btn`},w.btn):null),duration:O,closable:!0,onClose:w.onClose,onClick:w.onClick,key:w.key,style:w.style||{},className:w.className})})}const T={open:A,close(w){Object.keys(g).forEach(D=>g[D].removeNotice(w))},config:a,destroy(){Object.keys(g).forEach(w=>{g[w].destroy(),delete g[w]})}};["success","info","warning","error"].forEach(w=>{T[w]=D=>T.open({...D,type:w})}),T.warn=T.warning,t.default=T},79024:(L,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)),l=e(53017);e(45531);const m=({maskClosable:E=!1,closable:p=!0,className:_,onClose:s,children:g,footer:c,title:h,getContainer:u,keyboard:d,...v})=>o.default.createElement(l.Modal,{footer:c||null,maskClosable:E,closable:p,onCancel:s,title:h,getContainer:u,className:(0,r.default)("kt-overlay",_),keyboard:d,...v},g);t.Overlay=m},91397:(L,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)),l=n.__importStar(e(14041));e(14856);const m=e(48412);var E;(function(s){s.hover="hover",s.click="click",s.focus="focus"})(E||(t.PopoverTriggerType=E={}));var p;(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"})(p||(t.PopoverPosition=p={}));const _=({children:s,trigger:g=E.hover,visible:c,content:h,position:u=p.top,showArrow:d=!0,title:v,titleClassName:f,overlay:a,overlayClassName:b,overlayStyle:y,action:S,delay:A,zIndex:T=1e3,onClickAction:w,onVisibleChange:D,getTooltipContainer:I,...O})=>{const P=(0,l.useCallback)(M=>{w&&w(M)},[w]),R=(0,l.useMemo)(()=>a||(!v&&!h?null:l.default.createElement(l.default.Fragment,null,v&&l.default.createElement("p",{className:(0,r.default)("kt-popover-title",f)},v,S&&l.default.createElement(m.Button,{size:"small",type:"link",onClick:P},S)),h||"")),[a,h,S,P]);return R?l.default.createElement(o.default,{...O,visible:c,placement:u,mouseEnterDelay:A?A/1e3:void 0,trigger:g,showArrow:d,onVisibleChange:D,overlayClassName:b,prefixCls:"kt-popover",overlayStyle:y,getTooltipContainer:I,overlay:R,zIndex:T},l.default.createElement("div",{className:"kt-popover-trigger"},s)):s};t.Popover=_},8573:(L,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)),l=n.__importDefault(e(19686)),m=e(58723),E=e(77011);t.RECYCLE_LIST_STABILIZATION_TIME=500,t.RECYCLE_LIST_OVER_SCAN_COUNT=50;const p=({width:_,height:s,maxHeight:g,minHeight:c,className:h,style:u,data:d,onReady:v,onScroll:f,itemHeight:a,header:b,footer:y,template:S,paddingBottomSize:A,getSize:T,hiddenVerticalScrollbar:w,hiddenHorizontalScrollbar:D})=>{const I=(0,o.useRef)(),O=(0,o.useRef)(),P=(0,o.useRef)({}),R=(0,o.useRef)(0),M=(0,o.useRef)();(0,o.useEffect)(()=>{typeof v=="function"&&v({scrollTo:H=>{var X;(X=I.current)===null||X===void 0||X.scrollTo(H)},scrollToIndex:(H,X="start")=>{var J,re;let ce=H;if(b&&ce++,typeof a=="number")(J=I.current)===null||J===void 0||J.scrollToItem(ce,X);else{M.current&&clearTimeout(M.current);const Ae=(P.current?Object.keys(P.current):[]).slice(0,ce).reduce((te,Le)=>te+B(Le),0);(re=I.current)===null||re===void 0||re.scrollToItem(H,X),M.current=setTimeout(()=>{var te;(P.current?Object.keys(P.current):[]).slice(0,ce).reduce((oe,le)=>oe+B(le),0)!==Ae&&((te=I.current)===null||te===void 0||te.scrollToItem(H,X)),M.current=null},t.RECYCLE_LIST_STABILIZATION_TIME)}}})},[]);const k=($,H)=>{var X;P.current[$]!==H&&(P.current={...P.current,[$]:H},I.current&&((X=I.current)===null||X===void 0||X.resetAfterIndex(0)))},B=(0,o.useCallback)($=>T?T(Number($)):(P?.current||[])[$]||a||100,[a,T]),x=(0,o.useCallback)(()=>{if(g){let $=0;for(let H=0;H<d.length;H++)$+=B(H);return $>g?g:$}},[g,d]),N=(0,o.useCallback)(()=>{if(c)return c},[c,d]),j=(0,o.useMemo)(()=>{let $=d.length;return b&&$++,y&&$++,$},[d,y,b]),K=({index:$,style:H})=>{let X;if($===0&&b)return o.default.createElement("div",{style:H},o.default.createElement(b,null));if($+1===j&&y)return o.default.createElement("div",{style:H},o.default.createElement(y,null));if(b?X=d[$-1]:X=d[$],!X)return o.default.createElement("div",{style:H});const J={"aria-setsize":j,"aria-posinset":$};return o.default.createElement("div",{tabIndex:0,style:H,role:"listitem",...J},o.default.createElement(S,{data:X,index:$}))},U=({index:$,style:H})=>{const X=(0,o.useRef)(null),J=(0,o.useRef)(),re=()=>{if(X.current){let fe=0;for(let Ae=0;Ae<X.current.children.length;Ae++)fe+=X.current.children[Ae].getBoundingClientRect().height;k($,fe)}};(0,o.useEffect)(()=>{if(X.current&&I.current){J.current=new MutationObserver(()=>{re()});const fe={childList:!0,attributes:!0,characterData:!0,attributeFilter:["class","style"],attributeOldValue:!0,characterDataOldValue:!0};J.current.observe(X.current,fe),re()}return()=>{J.current.disconnect()}},[X.current]);let ce;return $===0&&b?o.default.createElement("div",{style:H},o.default.createElement(b,null)):$+1===j&&y?o.default.createElement("div",{style:H},o.default.createElement(y,null)):(b?ce=d[$-1]:ce=d[$],ce?o.default.createElement("div",{style:H,ref:X},o.default.createElement(S,{data:ce,index:$})):o.default.createElement("div",{style:H}))},Q=(0,o.useMemo)(()=>d.reduce((H,X)=>H+B(X),0)/d.length,[d]),z=(0,o.useCallback)($=>{R.current=$.scrollOffset,f&&f($)},[f]),G=(0,o.useMemo)(()=>(0,o.forwardRef)(($,H)=>{const{style:X,...J}=$;return o.default.createElement("div",{ref:H,style:{...X,height:`${parseFloat(X.height)+(A||0)}px`},...J})}),[A]),Y=(0,o.useMemo)(()=>(0,o.forwardRef)(($,H)=>o.default.createElement(E.Scrollbars,{hiddenVertical:w,hiddenHorizontal:D,...$,thumbSize:10,forwardedRef:H})),[w,D]);return(()=>{const $=typeof a!="number",H=!_||!s;return(()=>{const J=({width:re,height:ce})=>{O.current&&(O.current.scrollTop=R.current);const fe=x(),Ae=N();let te=ce;return Ae?te=Math.min(ce,Ae):fe&&(te=fe),$?o.default.createElement(m.VariableSizeList,{onScroll:z,width:re,height:te,itemData:[],itemSize:B,itemCount:j,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:I,style:{transform:"translate3d(0px, 0px, 0px)",...u},className:(0,r.default)(h,"kt-recycle-list"),innerElementType:G,outerElementType:Y,estimatedItemSize:Q},U):o.default.createElement(m.FixedSizeList,{onScroll:z,width:re,height:te,itemData:[],itemSize:a,itemCount:j,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:I,outerRef:O,style:{transform:"translate3d(0px, 0px, 0px)",...u},className:(0,r.default)(h,"recycle-list"),innerElementType:G,outerElementType:Y},K)};return H?o.default.createElement(l.default,null,J):J({width:_,height:s})})()})()};t.RecycleList=p},34128:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(8573),t)},57621:(L,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)),l=e(58723),m=e(70392),E=e(77011),p=e(48103),_=e(65601),s=e(43685),g=e(13429),c=e(34054);var h;(function(v){v[v.RENDER_ITEM=0]="RENDER_ITEM",v[v.GET_RENDED_KEY=1]="GET_RENDED_KEY",v[v.RENDER_ERROR=2]="RENDER_ERROR"})(h||(t.RenderErrorType=h={}));const u=o.default.forwardRef((v,f)=>{const{style:a,...b}=v;return o.default.createElement("div",{ref:f,style:{...a,height:`${parseFloat(a.height)+d.PADDING_BOTTOM_SIZE}px`},...b})});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 m.DisposableCollection,this.onErrorEmitter=new m.Emitter,this.onDidUpdateEmitter=new m.Emitter,this.onDidModelChangeEmitter=new m.Emitter,this.newPromptInsertionIndex=-1,this.idToFilterRendererPropsCache=new Map,this.filterFlattenBranchChildrenCache=new Map,this.filterWatcherDisposeCollection=new m.DisposableCollection,this.queueUpdatePromise=null,this.updateCancelToken=new m.CancellationTokenSource,this.expandNodeCancelToken=new m.CancellationTokenSource,this.willUpdateTasks=0,this.queueUpdateThrottler=new m.Throttler,this.doBatchUpdate=(()=>{const f=(a,b)=>{if(this.disposables.disposed)return;const{root:y}=this.props.model;let S=-1;if(this.promptTargetID>-1&&this.promptHandle instanceof _.NewPromptHandle&&this.promptHandle.parent&&this.promptHandle.parent.expanded&&y.isItemVisibleAtSurface(this.promptHandle.parent)&&!this.promptHandle.destroyed){const A=y.getIndexAtTreeNodeId(this.promptTargetID);if(A>-1||this.promptHandle.parent===y)if(this.promptHandle.type===c.TreeNodeType.TreeNode){const T=this.promptHandle.parent;T?S=this.getNewPromptInsertIndex(A,T):S=A+1}else S=A+1;else this.promptTargetID=-1}if(S===-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed&&this.promptHandle.destroy(),this.newPromptInsertionIndex=S,this.idxToRendererPropsCache.clear(),b.isCancellationRequested){a();return}this.forceUpdate(()=>{a(),this.props.filter&&this.props.filterProvider&&this.props.filterProvider.filterAlways&&this.filterItems(this.props.filter)})};return()=>{const a=(S,A)=>{const T=!!this.willUpdateTasks;if(this.willUpdateTasks=0,!T)A.resolve();else{this.updateCancelToken.cancel(),this.updateCancelToken=new m.CancellationTokenSource;const w=this.updateCancelToken.token;requestAnimationFrame(()=>{if(w.isCancellationRequested){A();return}f(A,w)})}return S};let b;const y=new Promise(S=>b=S);return y.then(()=>{this.onDidUpdateEmitter.fire()}),a(y,b),y}})(),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,c.TreeNodeType.CompositeTreeNode),this.promptRename=async(f,a)=>{var b,y;const{root:S}=this.props.model,A=typeof f=="string"?await S.getTreeNodeByPath(f):f;if(!s.TreeNode.is(A)||s.CompositeTreeNode.isRoot(A))throw new TypeError(`Cannot rename object of type ${typeof A}`);const T=new p.RenamePromptHandle(a||A.name,A);return this.promptHandle=T,this.promptTargetID=A.id,S.isItemVisibleAtSurface(A)?await this.batchUpdate():await A.parent.setExpanded(!0),(y=(b=this.listRef)===null||b===void 0?void 0:b.current)===null||y===void 0||y.scrollToItem(S.getIndexAtTreeNodeId(this.promptTargetID)),this.promptHandle},this.expandNode=async f=>{const{root:a}=this.props.model,b=typeof f=="string"?a.getTreeNodeByPath(f):f;if(this.expandNodeCancelToken.token.isCancellationRequested&&(this.expandNodeCancelToken=new m.CancellationTokenSource),b&&s.CompositeTreeNode.is(b)&&!b.disposed)return b.setExpanded(!1,!1,!0,this.expandNodeCancelToken.token)},this.collapseNode=async f=>{const{root:a}=this.props.model,b=typeof f=="string"?a.getTreeNodeByPath(f):f;if(b&&s.CompositeTreeNode.is(b)&&!b.disposed)return this.expandNodeCancelToken.cancel(),b.setCollapsed()},this._isEnsuring=!1,this.ensureVisible=async(f,a="smart",b=!1)=>{if(this._isEnsuring)return;this._isEnsuring=!0;const{root:y}=this.props.model,S=typeof f=="string"?y.getTreeNodeByPath(f)||await y.loadTreeNodeByPath(f):f;if(S&&!y.isItemVisibleAtSurface(S)&&await y.loadTreeNodeByPath(S.path),!s.TreeNode.is(S)||s.CompositeTreeNode.isRoot(S)){this._isEnsuring=!1;return}return b?this.tryScrollIntoViewWhileStable(S,a):this.tryScrollIntoView(S,a),this._isEnsuring=!1,S},this.getItemAtIndex=f=>{const{filter:a}=this.props;if(a&&this.filterFlattenBranch.length>0)return this.idToFilterRendererPropsCache.get(this.filterFlattenBranch[f]);let b=this.idxToRendererPropsCache.get(f);if(!b){const y=this.newPromptInsertionIndex,{root:S}=this.props.model;if(y>-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed)if(f===y)b={itemType:c.TreeNodeType.NewPrompt,item:this.promptHandle};else{const A=S.getTreeNodeAtIndex(f-(f>=y?1:0));b={itemType:s.CompositeTreeNode.is(A)?c.TreeNodeType.CompositeTreeNode:c.TreeNodeType.TreeNode,item:A}}else{const A=S.getTreeNodeAtIndex(f);A&&A.id===this.promptTargetID&&this.promptHandle&&this.promptHandle.constructor===p.RenamePromptHandle&&!this.promptHandle.destroyed?b={itemType:c.TreeNodeType.RenamePrompt,item:this.promptHandle}:b={itemType:s.CompositeTreeNode.is(A)?c.TreeNodeType.CompositeTreeNode:c.TreeNodeType.TreeNode,item:A}}this.idxToRendererPropsCache.set(f,b)}return b},this.handleListScroll=({scrollOffset:f})=>{const{model:a,height:b,itemHeight:y}=this.props;if(a.state.saveScrollOffset(f),!this.promptHandle||!y)return;let S;this.promptHandle instanceof _.NewPromptHandle&&this.newPromptInsertionIndex>-1?S=this.newPromptInsertionIndex:S=a.root.getIndexAtTreeNodeId(this.promptHandle.id),(f+b<S*y||S*y<f)&&this.promptHandle.destroy()},this.getItemKey=f=>{const a=this.getItemAtIndex(f),{getItemKey:b}=this.props,y=b?b(a):void 0;return y??f},this.filterItems=f=>{const{model:{root:a},filterProvider:b}=this.props;if(this.filterWatcherDisposeCollection.dispose(),this.idToFilterRendererPropsCache.clear(),!f)return;const y=/\//.test(f),S=new Set,A=new Map,T=[];for(let w=0,D=a.branchSize;w<D;w++){const I=a.getTreeNodeAtIndex(w);T.push(I)}if(y)T.forEach(w=>{if(w&&w.path.indexOf(f)>-1){S.add(w.id);let D=w.parent;for(;D&&!s.CompositeTreeNode.isRoot(D);)S.add(D.id),D=D.parent}});else{let w=[];b?w=r.default.filter(f,T,b.fuzzyOptions()):w=r.default.filter(f,T,d.FILTER_FUZZY_OPTIONS);const D=I=>{const O=I.children||[];if(O.length>0)for(const P of O)S.add(P.id),s.CompositeTreeNode.is(P)&&P.expanded&&D(P)};w.forEach(I=>{const O=I.original;S.add(O.id);let P=O.parent;for(A.set(O.id,()=>o.default.createElement("div",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},dangerouslySetInnerHTML:{__html:I.string||""}})),s.CompositeTreeNode.is(O)&&D(O);P&&!s.CompositeTreeNode.isRoot(P);)S.add(P.id),P=P.parent})}this.filterFlattenBranch=new Array(S.size);for(let w=0,D=0,I=a.branchSize;D<I;D++){const O=a.getTreeNodeAtIndex(D);O&&S.has(O.id)&&(this.filterFlattenBranch[w]=O.id,s.CompositeTreeNode.is(O)?this.idToFilterRendererPropsCache.set(O.id,{item:O,itemType:c.TreeNodeType.CompositeTreeNode,template:A.has(O.id)?A.get(O.id):void 0}):this.idToFilterRendererPropsCache.set(O.id,{item:O,itemType:c.TreeNodeType.TreeNode,template:A.has(O.id)?A.get(O.id):void 0}),w++)}this.filterWatcherDisposeCollection.push(a.watcher.on(c.TreeNodeEvent.DidChangeExpansionState,(w,D)=>{const I=this.filterFlattenBranch.indexOf(w.id);if(D){const O=this.filterFlattenBranchChildrenCache.get(w.id);O&&O.length>0&&(this.filterFlattenBranch=(0,s.spliceArray)(this.filterFlattenBranch,I+1,0,O),this.filterFlattenBranchChildrenCache.delete(w.id))}else{const O=[];for(let P=I+1;P<this.filterFlattenBranch.length;P++){const R=a.getTreeNodeById(this.filterFlattenBranch[P]);if(R&&R.depth>w.depth)O.push(R.id);else break}this.filterFlattenBranchChildrenCache.set(w.id,O),this.filterFlattenBranch=(0,s.spliceArray)(this.filterFlattenBranch,I+1,O.length)}})),this.filterWatcherDisposeCollection.push(m.Disposable.create(()=>{this.filterFlattenBranchChildrenCache.clear()}))},this.renderItem=({index:f,style:a})=>{var b,y,S,A,T,w,D;const{children:I,overflow:O="ellipsis",supportDynamicHeights:P}=this.props,R=this.getItemAtIndex(f),M=(0,o.useRef)(null),k=(0,o.useMemo)(()=>P?()=>{let U=0;if(M.current){const Q=M.current;U=Array.from(Q.children).reduce((z,G)=>z+G.getBoundingClientRect().height,0)}return U&&(this.dynamicSizeMap.set(f,U),this.layoutItem()),Math.max(U,d.DEFAULT_ITEM_HEIGHT)}:()=>{},[P]);if((0,o.useEffect)(()=>{M.current&&k()},[]),!R)return o.default.createElement(o.default.Fragment,null);const{item:B,itemType:x,template:N}=R;if(!B)return o.default.createElement("div",{style:a});let j;s.CompositeTreeNode.is(B)?j={"aria-label":(b=B.accessibilityInformation)===null||b===void 0?void 0:b.label,"aria-expanded":B.expanded,"aria-level":B.depth,"aria-setsize":(S=(y=B.parent)===null||y===void 0?void 0:y.children)===null||S===void 0?void 0:S.length,"aria-posinset":f}:s.TreeNode.is(B)&&(j={"aria-label":(A=B.accessibilityInformation)===null||A===void 0?void 0:A.label,"aria-level":B.depth,"aria-setsize":(w=(T=B.parent)===null||T===void 0?void 0:T.children)===null||w===void 0?void 0:w.length,"aria-posinset":f});const K=O==="ellipsis"?a:{...a,width:"auto",minWidth:"100%"};return o.default.createElement("div",{ref:M,style:K,role:((D=B.accessibilityInformation)===null||D===void 0?void 0:D.role)||"treeiem",...j},o.default.createElement(g.NodeRendererWrap,{item:B,depth:B.depth,itemType:x,template:N,hasPrompt:!!this.promptHandle&&!this.promptHandle.destroyed,expanded:s.CompositeTreeNode.is(B)?B.expanded:void 0},I))},this.layoutItem=()=>{var f,a,b,y;if(this.props.supportDynamicHeights&&this.listRef&&!((f=this.listRef)===null||f===void 0)&&f.current&&"_getRangeToRender"in((a=this.listRef)===null||a===void 0?void 0:a.current)){const S=(b=this.listRef)===null||b===void 0?void 0:b.current._getRangeToRender();if(S){const A=S[0];((y=this.listRef)===null||y===void 0?void 0:y.current).resetAfterIndex(A)}}}}getNewPromptInsertIndex(f,a){const{root:b}=this.props.model;let y=f+1;for(;y-f<=a.branchSize;y++){const S=b.getTreeNodeAtIndex(y);if(!S)return y;if(!s.CompositeTreeNode.is(S)){if(S?.depth>a.depth+1)continue;return y}}return y}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 a,b;if(this.props.model!==f.model){this.disposables.dispose();const{model:y}=this.props;(b=(a=this.listRef)===null||a===void 0?void 0:a.current)===null||b===void 0||b.scrollTo(y.state.scrollOffset),this.disposables.push(y.onChange(this.batchUpdate.bind(this))),this.disposables.push(y.state.onDidLoadState(()=>{var S,A;(A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollTo(y.state.scrollOffset)})),this.onDidModelChangeEmitter.fire({preModel:f.model,nextModel:y})}}async promptNew(f,a=c.TreeNodeType.TreeNode){var b,y;const{root:S}=this.props.model;let A=typeof f=="string"?await S.getTreeNodeByPath(f):f;if(a!==c.TreeNodeType.TreeNode&&a!==c.TreeNodeType.CompositeTreeNode)throw new TypeError(`Invalid type supplied. Expected 'TreeNodeType.TreeNode' or 'TreeNodeType.CompositeTreeNode', got ${a}`);if(A&&!s.CompositeTreeNode.is(A)&&(A=A.parent,!s.CompositeTreeNode.is(A)))throw new TypeError(`Cannot create new prompt at object of type ${typeof A}`);if(!A)throw new Error(`Cannot find node at ${f}`);const T=new _.NewPromptHandle(a,A);return this.promptHandle=T,this.promptTargetID=A.id,A!==S&&(!A.expanded||!S.isItemVisibleAtSurface(A))?await A.setExpanded(!0):await this.batchUpdate(),this.newPromptInsertionIndex>=0?(y=(b=this.listRef)===null||b===void 0?void 0:b.current)===null||y===void 0||y.scrollToItem(this.newPromptInsertionIndex):this.tryScrollIntoViewWhileStable(this.promptHandle),this.promptHandle}tryScrollIntoView(f,a="auto"){var b,y,S,A;const{root:T}=this.props.model;f.constructor===_.NewPromptHandle&&!f.destroyed?(y=(b=this.listRef)===null||b===void 0?void 0:b.current)===null||y===void 0||y.scrollToItem(this.newPromptInsertionIndex):T.isItemVisibleAtSurface(f)&&((A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollToItem(T.getIndexAtTreeNode(f),a))}tryScrollIntoViewWhileStable(f,a="smart"){const{root:b}=this.props.model;if(this.tryEnsureVisibleTimes>d.TRY_ENSURE_VISIBLE_MAX_TIMES){this.tryEnsureVisibleTimes=0;return}m.Event.once(this.props.model.onChange)(async()=>{var y,S,A,T;await this.queueUpdatePromise,f.constructor===_.NewPromptHandle&&!f.destroyed?(S=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||S===void 0||S.scrollToItem(this.newPromptInsertionIndex):b.isItemVisibleAtSurface(f)?((T=(A=this.listRef)===null||A===void 0?void 0:A.current)===null||T===void 0||T.scrollToItem(b.getIndexAtTreeNode(f),a),this.tryEnsureVisibleTimes=0):(this.tryEnsureVisibleTimes++,this.tryScrollIntoViewWhileStable(f,a))})}componentDidMount(){var f,a;const{model:b,onReady:y}=this.props;if((a=(f=this.listRef)===null||f===void 0?void 0:f.current)===null||a===void 0||a.scrollTo(b.state.scrollOffset),this.disposables.push(b.onChange(this.batchUpdate.bind(this))),this.disposables.push(b.state.onDidLoadState(()=>{var S,A;(A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollTo(b.state.scrollOffset)})),typeof y=="function"){const S={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:m.Event.once(this.onDidUpdateEmitter.event),onError:this.onErrorEmitter.event};y(S)}}componentWillUnmount(){this.disposables.dispose()}set promptHandle(f){this._promptHandle!==f&&(this._promptHandle instanceof p.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:a}=this.props;return a?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:a,width:b="100%",height:y,style:S,className:A,placeholder:T,overScanCount:w,leaveBottomBlank:D,supportDynamicHeights:I}=this.props;if(T&&this.adjustedRowCount===0){const P=T;return o.default.createElement(P,null)}const O={children:f,height:y,width:b,itemData:[],itemCount:this.adjustedRowCount,itemKey:this.getItemKey,overscanCount:w||d.DEFAULT_OVER_SCAN_COUNT,onScroll:this.handleListScroll,style:{transform:"translate3d(0px, 0px, 0px)",...S},className:A,outerElementType:E.ScrollbarsVirtualList};return D&&(O.innerElementType=u),I?o.default.createElement(l.VariableSizeList,{ref:this.listRef,itemSize:this.getItemSize.bind(this),...O},this.renderItem):o.default.createElement(l.FixedSizeList,{ref:this.listRef,itemSize:a,...O},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:v=>v?.name||""},d.DEFAULT_OVER_SCAN_COUNT=50},13429:(L,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:m,itemType:E,children:p,template:_,hasPrompt:s}=this.props;return r.default.createElement(p,{item:m,itemType:E,template:_,hasPrompt:s,key:m.id})}shouldComponentUpdate(m){return!0}}t.NodeRendererWrap=o},75821:(L,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)),l=e(58998),m=e(57621),E=e(64013),p=e(84225),_=e(17462),s=e(78569),g=e(45203);e(12794),e(34728),n.__exportStar(e(92532),t);const c=({width:h,height:u,itemHeight:d=22,itemClassname:v,indent:f,baseIndent:a,containerClassname:b,onClick:y,onContextMenu:S,onTwistierClick:A,onIconClick:T,onDbClick:w,resolveChildren:D,sortComparator:I,treeData:O,inlineMenus:P,inlineMenuActuator:R,onReady:M,contextMenus:k,contextMenuActuator:B,treeName:x,leaveBottomBlank:N=!0})=>{const[j,K]=(0,r.useState)({show:!1}),[U,Q]=(0,r.useState)([]),[z,G]=(0,r.useState)(),Y=(0,r.useRef)(!1),Z=(0,r.useRef)(),$=(0,r.useRef)(),H=(0,r.useRef)(null),X=(0,r.useCallback)(be=>{var Ce;return r.default.createElement(_.BasicTreeNodeRenderer,{item:be.item,itemType:be.itemType,itemHeight:d,indent:f,baseIndent:a,className:v,inlineMenus:P,inlineMenuActuator:R,onClick:fe,onDbClick:te,onContextMenu:Le,onTwistierClick:oe,onIconClick:Ae,decorations:(Ce=Z.current)===null||Ce===void 0?void 0:Ce.decorations.getDecorations(be.item)})},[z]);(0,r.useEffect)(()=>{var be,Ce;Z.current=new g.BasicTreeService(O,D,I,{treeName:x});const Ne=(be=Z.current)===null||be===void 0?void 0:be.onDidUpdateTreeModel(Fe=>{J(Fe)}),tt=()=>{var Fe;(Fe=Z.current)===null||Fe===void 0||Fe.enactiveFocusedDecoration()};return(Ce=H.current)===null||Ce===void 0||Ce.addEventListener("blur",tt,!0),()=>{var Fe,$e;Y.current=!0,(Fe=H.current)===null||Fe===void 0||Fe.removeEventListener("blur",tt,!0),Ne.dispose(),($e=Z.current)===null||$e===void 0||$e.dispose()}},[]),(0,r.useEffect)(()=>{var be;(be=Z.current)===null||be===void 0||be.updateTreeData(O)},[O]);const J=async be=>{be&&await be.ensureReady,Y.current||G(be)},re=async be=>{var Ce;(Ce=Z.current)===null||Ce===void 0||Ce.activeFocusedDecoration(be),s.BasicCompositeTreeNode.is(be)&&Te(be)},ce=(0,r.useCallback)(be=>{M&&M({...be,selectItem:re,focusItem:async Ce=>{var Ne;const tt=`/${x}/${Ce}`;await z?.ensureReady;const Fe=await be.ensureVisible(tt,"auto",!0);Fe&&((Ne=Z.current)===null||Ne===void 0||Ne.activeFocusedDecoration(Fe))}}),$.current=be},[Z.current]),fe=(0,r.useCallback)((be,Ce)=>{re(Ce),y&&y(be,Ce)},[y]),Ae=(0,r.useCallback)((be,Ce)=>{T&&T(be,Ce)},[T]),te=(0,r.useCallback)((be,Ce)=>{w&&w(be,Ce)},[w]),Le=(0,r.useCallback)((be,Ce)=>{var Ne,tt;if(Ce?(Ne=Z.current)===null||Ne===void 0||Ne.activeContextMenuDecoration(Ce):(tt=Z.current)===null||tt===void 0||tt.enactiveFocusedDecoration(),S)S(be,Ce);else{let Fe=[];Array.isArray(k)?Fe=k:typeof k=="function"&&(Fe=k(Ce));const $e=new Set,Se={};for(const ze of Fe)$e.add(ze.group||"-1"),Se[ze.group||"-1"]||(Se[ze.group||"-1"]=[]),Se[ze.group||"-1"].push(ze);const ae=Array.from($e).sort((ze,Qe)=>ze.localeCompare(Qe,"kn",{numeric:!0}));let ye=[];for(const ze of ae)ye=ye.concat(Se[ze].map(Qe=>({id:Qe.id,label:Qe.title,group:Qe.group}))),ye=ye.concat([{id:`${ze}_divider`,label:"",type:"divider"}]);ye.pop(),JSON.stringify(ye)!==JSON.stringify(U)&&Q(ye);const{x:Re,y:Be}=be.nativeEvent;K({show:!0,point:{pageX:Re,pageY:Be},activeNode:Ce})}},[w]),Te=(0,r.useCallback)(be=>{var Ce,Ne;be.expanded?(Ce=$.current)===null||Ce===void 0||Ce.collapseNode(be):(Ne=$.current)===null||Ne===void 0||Ne.expandNode(be)},[]),oe=(0,r.useCallback)((be,Ce)=>{s.BasicCompositeTreeNode.is(Ce)&&Te(Ce),A&&A(be,Ce)},[A]),le=(0,r.useCallback)(()=>{var be;(be=Z.current)===null||be===void 0||be.enactiveFocusedDecoration()},[]),Ee=(0,r.useCallback)((be,Ce)=>{S&&S(be,Ce)},[]),we=(0,r.useCallback)(()=>{K({...j,show:!1})},[j]),ve=(0,r.useCallback)(()=>k?r.default.createElement(o.default,{popupPlacement:"bottomLeft",popupVisible:j.show,action:["contextMenu"],popupAlign:{overflow:{adjustX:1,adjustY:1},offset:[window.scrollX,window.scrollY]},point:j.point||{},builtinPlacements:p.placements,popup:r.default.createElement(l.ClickOutside,{className:"basic_tree_menubars",mouseEvents:["click","contextmenu"],onOutsideClick:we},U.map(({id:be,label:Ce,type:Ne})=>r.default.createElement(E.BasicMenuItem,{key:be,id:be,label:Ce,type:Ne,focusMode:j.show,onClick:tt=>{B&&B(j.activeNode,tt),K({show:!1})}}))),alignPoint:!0}):null,[U,B,j]);return r.default.createElement("div",{className:"basic_tree",tabIndex:-1,ref:H,onClick:le,onContextMenu:Ee},ve(),z?r.default.createElement(m.RecycleTree,{height:u,width:h,itemHeight:d,model:z,onReady:ce,className:b,leaveBottomBlank:N},X):null)};t.BasicRecycleTree=c},64013:(L,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)),l=({id:m,label:E,type:p,focusMode:_,onClick:s})=>{const[g,c]=o.default.useState(!1),h=o.default.useCallback(()=>{c(_?!0:d=>!d),s(m)},[m]),u=o.default.useCallback(()=>{},[m,_]);return p==="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},E)};t.BasicMenuItem=l},84225:(L,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:(L,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(E,p,_,s={}){super(E,p,void 0,{treeName:s.treeName}),this._raw=_}get name(){var E;return(E=this.getMetadata("treeName"))!==null&&E!==void 0?E:`BasicTreeRoot_${this.id}`}get raw(){return this._raw}get expanded(){return!0}}t.BasicTreeRoot=r;class o extends n.CompositeTreeNode{constructor(E,p,_,s){super(E,p,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 l extends n.TreeNode{constructor(E,p,_,s){super(E,p,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=l},17462:(L,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)),l=e(48412),m=e(54713),E=e(3660),p=e(78569),_=e(92532);e(12794);const s=({item:g,className:c,itemHeight:h=22,indent:u=8,baseIndent:d=8,onClick:v,onDbClick:f,onTwistierClick:a,onIconClick:b,onContextMenu:y,decorations:S,inlineMenus:A=[],inlineMenuActuator:T=()=>{}})=>{const w=(0,o.useCallback)(Y=>{v&&(Y.stopPropagation(),v(Y,g))},[v]),D=(0,o.useCallback)(Y=>{f&&(Y.stopPropagation(),f(Y,g))},[f]),I=(0,o.useCallback)(Y=>{y&&(Y.stopPropagation(),Y.preventDefault(),y(Y,g))},[y]),O=(0,o.useCallback)(Y=>{Y.stopPropagation(),a?a(Y,g):v&&v(Y,g)},[v,a]),P=(0,o.useCallback)(Y=>{Y.stopPropagation(),b?b(Y,g):v&&v(Y,g)},[v,b]);let M=(g.depth>0?g.depth-1:0)*u;d&&(M+=d),g.indentOffset&&(M+=g.indentOffset);const k={height:h,lineHeight:`${h}px`,paddingLeft:`${M}px`},B=(0,o.useCallback)(Y=>o.default.createElement(m.Icon,{onClick:P,icon:Y.icon,className:(0,r.default)("icon",Y.iconClassName)}),[]),x=(0,o.useCallback)(Y=>Y.displayName.replace(/\n/g,"\u21B5"),[]),N=(0,o.useCallback)(Y=>Y.displayName&&o.default.createElement("div",{className:(0,r.default)("segment","display_name")},x(Y)),[]),j=(0,o.useCallback)(Y=>Y.renderLabel,[]),K=(0,o.useCallback)(Y=>Y.description?typeof Y.description=="string"?o.default.createElement("div",{className:(0,r.default)("segment_grow","description")},Y.description):Y.description:null,[]),U=(0,o.useCallback)(Y=>{if(Array.isArray(A))return A;if(typeof A=="function")return A(Y)},[A]),Q=()=>{var Y;const Z=p.BasicCompositeTreeNode.is(g),$=(Y=U(g))===null||Y===void 0?void 0:Y.filter(X=>Z?X.position===_.IBasicInlineMenuPosition.TREE_CONTAINER:X.position===_.IBasicInlineMenuPosition.TREE_NODE);if(!$?.length)return null;const H=(0,o.useCallback)((X,J)=>{X.stopPropagation(),T(g,J)},[]);return o.default.createElement("div",{className:(0,r.default)("segment","tail")},$.map(X=>o.default.createElement(l.Button,{style:{marginRight:"5px"},type:"icon",key:`${g.id}-${X.icon}`,icon:X.icon,title:X.title,onClick:J=>H(J,X)})))},z=(Y,Z)=>S&&S?.classlist.indexOf(_.DECORATIONS.LOADING)>-1?o.default.createElement(E.Loading,null):o.default.createElement(m.Icon,{className:(0,r.default)("segment","expansion_toggle",Y.twisterClassName,{mod_collapsed:!Y.expanded}),onClick:Z,icon:"arrow-right"}),G=Y=>{if(!Y.expandable)return o.default.createElement("div",{className:(0,r.default)("segment","expansion_toggle",Y.twisterPlaceholderClassName)});if(p.BasicCompositeTreeNode.is(Y))return z(Y,O)};return o.default.createElement("div",{key:g.id,onClick:w,onDoubleClick:D,onContextMenu:I,className:(0,r.default)("tree_node",c,S?S.classlist:null,g.className),style:k,"data-id":g.id},o.default.createElement("div",{className:"content"},G(g),B(g),o.default.createElement("div",{className:"overflow_wrap"},j(g)||N(g),K(g)),Q()))};t.BasicTreeNodeRenderer=s},45203:(L,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),l=e(78569),m=e(92532);class E extends r.Tree{constructor(s,g,c,h={}){super(),this._treeData=s,this._resolveChildren=g,this._sortComparator=c,this.treeOptions=h,this.selectedDecoration=new r.Decoration(m.DECORATIONS.SELECTED),this.focusedDecoration=new r.Decoration(m.DECORATIONS.FOCUSED),this.contextMenuDecoration=new r.Decoration(m.DECORATIONS.ACTIVED),this.loadingDecoration=new r.Decoration(m.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 v=this._sortComparator(u.raw,d.raw);if(typeof v<"u")return v}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 l.BasicTreeRoot(this,void 0,{children:this._treeData,label:"",command:"",icon:""},{treeName:this.treeOptions.treeName}),this._model=new p,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 c=[];for(const h of g)h.children?c.push(new l.BasicCompositeTreeNode(this,s,h)):c.push(new l.BasicTreeNode(this,s,h));return c}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=E;class p extends r.TreeModel{}t.BasicTreeModel=p},92532:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTreeAdaptiveDecorator=void 0;const r=e(85608).__importDefault(e(14041)),o=e(34054),l=m=>E=>{const{model:p,itemHeight:_,onReady:s}=E,g=r.default.useRef(),c=r.default.useRef(!1),[h,u]=r.default.useState(0),d=()=>{u(p.root.branchSize*_)},v=f=>{s&&s({...f,promptNewTreeNode:async a=>{var b;const y=await f.promptNewTreeNode(a);return!((b=g.current)===null||b===void 0)&&b.root.branchSize?u(g.current.root.branchSize*_+_):u(_),c.current=!1,y.onDestroy(()=>{var S;!((S=g.current)===null||S===void 0)&&S.root.branchSize&&u(g.current.root.branchSize*_)}),y.onCancel(()=>{g.current&&u(g.current.root.branchSize*_)}),y.onBlur(()=>c.current),y},promptNewCompositeTreeNode:async a=>{var b;const y=await f.promptNewCompositeTreeNode(a);return!((b=g.current)===null||b===void 0)&&b.root.branchSize?u(g.current.root.branchSize*_+_):u(_),y.onDestroy(()=>{var S;!((S=g.current)===null||S===void 0)&&S.root.branchSize&&u(g.current.root.branchSize*_)}),y.onCancel(()=>{var S;!((S=g.current)===null||S===void 0)&&S.root.branchSize&&u(g.current.root.branchSize*_)}),y.onBlur(()=>c.current),y}})};return r.default.useEffect(()=>{g.current=p,g.current.root&&(u(g.current.root.branchSize*_),g.current.root.watcher.on(o.TreeNodeEvent.DidChangeExpansionState,d))},[p]),r.default.useEffect(()=>{setTimeout(()=>{c.current=!0},100)},[h]),r.default.createElement(r.default.Fragment,null,r.default.createElement(m,{...E,height:h,onReady:v}))};t.RecycleTreeAdaptiveDecorator=l},326:(L,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)),l=e(54713),m=e(50708),E=e(4981);e(69715);const p=30,_=500,s=c=>{const{localize:h}=o.default.useContext(E.LocalizeContext);return o.default.createElement("div",{className:"kt-recycle-tree-filter-wrapper"},o.default.createElement(m.Input,{hasClear:!0,autoFocus:!0,className:"kt-recycle-tree-filter-input",size:"small",...c,placeholder:c.placeholder||h("tree.filter.placeholder"),addonBefore:o.default.createElement(l.Icon,{className:"kt-recycle-tree-filter-icon",icon:"retrieval"})}))},g=c=>h=>{const[u,d]=o.default.useState(""),[v,f]=o.default.useState(""),{beforeFilterValueChange:a,filterEnabled:b,height:y,filterPlaceholder:S,filterAfterClear:A,onReady:T,onFilterBlur:w,filterAutoFocus:D,...I}=h,O=(0,r.default)(async M=>{a&&await a(M),f(M)},_),P=(0,o.useCallback)(M=>{d(M),O(M)},[u]),R=(0,o.useCallback)(M=>{T&&T({...M,clearFilter:()=>{f(""),d("")}})},[T]);return o.default.createElement(o.default.Fragment,null,b&&o.default.createElement(s,{afterClear:A,placeholder:S,value:u,autoFocus:D,onBlur:w,onValueChange:P}),o.default.createElement(c,{...I,height:y-(b?p:0),onReady:R,filter:v}))};t.RecycleTreeFilterDecorator=g},72731:(L,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:(L,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:(L,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(m,E){super(),this.type=m,this.parent=E,this._id=n.TreeNode.nextId()}get id(){return this._id}get depth(){return this.parent.depth+1}}t.NewPromptHandle=o},65747:(L,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),l=_=>new Promise(s=>setTimeout(s,_));var m;(function(_){_[_.INFO=1]="INFO",_[_.ERROR=2]="ERROR",_[_.WARNING=3]="WARNING"})(m||(t.PROMPT_VALIDATE_TYPE=m={}));var E;(function(_){_.INFO="validate-info",_.ERROR="validate-error",_.WARNING="validate-warning"})(E||(t.VALIDATE_CLASS_NAME=E={}));class p{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(c=>c.result===!1||!!c.err))return;this.destroy()}if(s.key==="Enter"){if(this.isInPendingCommitState=!0,this.$.disabled=!0,(await this.onCommitEmitter.fireAndAwait(this.$.value)).some(c=>c.result===!1||!!c.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 l(0),!(!this.$.isConnected&&!this.destroyed||(await this.onBlurEmitter.fireAndAwait(this.$.value)).some(c=>c.result===!1||!!c.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,c;!this._hasAddonAfter&&!this._destroyed&&((c=(g=this.$.parentElement)===null||g===void 0?void 0:g.parentElement)===null||c===void 0||c.appendChild(this.$addonAfter),this._hasAddonAfter=!0);const h=document.createElement("div");h.setAttribute("class",s),this.$addonAfter.appendChild(h)}removeAddonAfter(){var s,g,c;this._hasAddonAfter&&((s=this.$addonAfter.firstChild)===null||s===void 0||s.remove(),(c=(g=this.$.parentElement)===null||g===void 0?void 0:g.parentElement)===null||c===void 0||c.removeChild(this.$addonAfter),this._hasAddonAfter=!1)}addValidateMessage(s){var g,c,h,u,d,v,f;!this._hasValidateElement&&!this._destroyed&&((h=(c=(g=this.$.parentElement)===null||g===void 0?void 0:g.parentElement)===null||c===void 0?void 0:c.parentElement)===null||h===void 0||h.appendChild(this.$validate),this._hasValidateElement=!0);let a="validate-message popup ";s&&s.type===m.ERROR?this._validateClassName=E.ERROR:s&&s.type===m.WARNING?this._validateClassName=E.WARNING:this._validateClassName=E.INFO,a+=this._validateClassName,this.$validate.classList.value=a,this.$validate.innerHTML=(0,o.toMarkdownHtml)(s.message||"",{renderer:this.markdownRenderer}),(d=(u=this.$.parentElement)===null||u===void 0?void 0:u.parentElement)===null||d===void 0||d.classList.remove(E.INFO,E.ERROR,E.WARNING),(f=(v=this.$.parentElement)===null||v===void 0?void 0:v.parentElement)===null||f===void 0||f.classList.add(this._validateClassName)}removeValidateMessage(){var s,g,c,h,u;this._hasValidateElement&&((c=(g=(s=this.$.parentElement)===null||s===void 0?void 0:s.parentElement)===null||g===void 0?void 0:g.parentElement)===null||c===void 0||c.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=p},58357:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenamePromptHandle=void 0;const n=e(65747);class r extends n.PromptHandle{constructor(l,m){super(),this.originalFileName=l,this.target=m,this.$.value=l,this.setSelectionRange(0,l.lastIndexOf("."))}get id(){return this.target.id}get depth(){return this.target.depth}}t.RenamePromptHandle=r},48103:(L,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:(L,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 m;this.toDispose.dispose(),(m=this._root)===null||m===void 0||m.dispose()}get root(){return this._root}set root(m){var E;m!==this._root&&((E=this._root)===null||E===void 0||E.dispose(),this._root=m)}fireChanged(){this.onChangedEmitter.fire(void 0)}sortComparator(m,E){return m.constructor===E.constructor?m.name>E.name?1:m.name<E.name?-1:0:r.CompositeTreeNode.is(m)?-1:r.CompositeTreeNode.is(E)?1:0}}t.Tree=o},26353:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeTreeNode=t.TreeNode=t.BranchOperatorStatus=void 0,t.spliceArray=l;const n=e(70392),r=e(34054),{Path:o}=n.path;function l(_,s,g=0,c){const h=_.slice(0);return h.splice(s,g,...c||[]),h}var m;(function(_){_[_.EXPANDED=1]="EXPANDED",_[_.SHRINKED=2]="SHRINKED"})(m||(t.BranchOperatorStatus=m={}));class E{static is(s){return!!s&&"depth"in s&&"name"in s&&"path"in s&&"id"in s}static getTreeNodeById(s){return E.idToTreeNode.get(s)}static getTreeNodeByPath(s){return E.pathToTreeNode.get(s)}static setTreeNode(s,g,c){E.idToTreeNode.set(s,c),E.pathToTreeNode.set(g,c)}static removeTreeNode(s,g){E.idToTreeNode.delete(s),E.pathToTreeNode.delete(g)}static getIdByPath(s){return E.pathToId.get(s)}static setIdByPath(s,g){return E.pathToId.set(s,g)}static getGlobalTreeState(s){let g=E.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 c=E.pathToGlobalTreeState.get(s);return c||(c={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),c={...c,...g},E.pathToGlobalTreeState.set(s,c),c}constructor(s,g,c,h){this._uid=E.nextId(),this._parent=g,this._tree=s,this._disposed=!1,this._visible=!0,this._metadata={...h||{}},this._depth=g?g.depth+1:0,c?this._watcher=c: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=new o(this.parent.path).join(this.name).toString():this._path=new o(`${o.separator}${this.name}`).toString()),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(E.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 c=this._metadata[s];this._metadata[s]=g,this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Updated,key:s,prevValue:c,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 c=this._parent;if(s===null||!p.is(s)){this.parent=void 0,this.dispose();return}const h=c!==s,u=this.path;this._depth=s.depth+1,(h||g!==this.name)&&(this.name=g,h&&this._watcher.notifyWillChangeParent(this,c,s),this.parent&&(this.parent.unlinkItem(this,!0),this.parent=s,this.parent.insertItem(this)),h&&this._watcher.notifyDidChangeParent(this,c,s)),this.path!==u&&this._watcher.notifyDidChangePath(this)}get visible(){return this._visible}setVisible(s){return this._visible=s,this}dispose(){this._disposed||(E.removeTreeNode(this.id,this.path),this._disposed=!0,this._watcher.notifyDidDispose(this))}}t.TreeNode=E,E.nextId=(()=>{let _=0;return()=>_++})(),E.idToTreeNode=new Map,E.pathToTreeNode=new Map,E.pathToId=new Map,E.pathToGlobalTreeState=new Map;class p extends E{static defaultSortComparator(s,g){return s.constructor===g.constructor?s.name>g.name?1:s.name<g.name?-1:0:p.is(s)?-1:p.is(g)?1:0}static is(s){return!!s&&"children"in s}static isRoot(s){return p.is(s)&&!s.parent}generatorWatcher(){const s=new n.Emitter,g=s.event,c=new n.DisposableCollection,h=d=>{this.watchEvents.delete(d)};return{notifyWillProcessWatchEvent:(d,v)=>{s.fire({type:r.TreeNodeEvent.WillProcessWatchEvent,args:[d,v]})},notifyWillChangeParent:(d,v,f)=>{s.fire({type:r.TreeNodeEvent.WillChangeParent,args:[d,v,f]})},notifyDidChangeParent:(d,v,f)=>{s.fire({type:r.TreeNodeEvent.DidChangeParent,args:[d,v,f]})},notifyDidDispose:d=>{s.fire({type:r.TreeNodeEvent.DidDispose,args:[d]})},notifyDidProcessWatchEvent:(d,v)=>{s.fire({type:r.TreeNodeEvent.DidProcessWatchEvent,args:[d,v]})},notifyDidChangePath:d=>{s.fire({type:r.TreeNodeEvent.DidChangePath,args:[d]})},notifyWillChangeExpansionState:(d,v)=>{const f=this.isItemVisibleAtSurface(d);s.fire({type:r.TreeNodeEvent.WillChangeExpansionState,args:[d,v,f]})},notifyDidChangeExpansionState:(d,v)=>{const f=this.isItemVisibleAtSurface(d);s.fire({type:r.TreeNodeEvent.DidChangeExpansionState,args:[d,v,f]})},notifyDidChangeMetadata:(d,v)=>{s.fire({type:r.TreeNodeEvent.DidChangeMetadata,args:[d,v]})},notifyDidUpdateBranch:()=>{s.fire({type:r.TreeNodeEvent.BranchDidUpdate,args:[]})},notifyWillResolveChildren:(d,v)=>{s.fire({type:r.TreeNodeEvent.WillResolveChildren,args:[d,v]})},notifyDidResolveChildren:(d,v)=>{s.fire({type:r.TreeNodeEvent.DidResolveChildren,args:[d,v]})},on:(d,v)=>{const f=g(a=>{a.type===d&&v(...a.args)});return c.push(f),f},onWatchEvent:(d,v)=>{const f=h;return this.watchEvents.set(d,{terminator:f,callback:v}),f},dispose:c}}constructor(s,g,c,h){super(s,g,c,h),this._children=null,this._lock=!1,this.refreshThrottler=new n.ThrottledDelayer(p.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:v}=u;if(typeof d!="string")throw new TypeError("Expected oldPath to be a string");if(typeof v!="string")throw new TypeError("Expected newPath to be a string");if(o.isRelative(d))throw new TypeError("oldPath must be absolute");if(o.isRelative(v))throw new TypeError("newPath must be absolute");this.transferItem(d,v);break}case r.WatchEvent.Added:{const{node:d}=u;if(!E.is(d))throw new TypeError("Expected node to be a TreeNode");this.insertItem(d);break}case r.WatchEvent.Removed:{const{path:d}=u,v=new o(d),f=v.dir.toString(),a=v.base.toString();if(f===this.path&&this.children){const b=this.children.find(y=>y.name===a);b&&this.unlinkItem(b)}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,E.setTreeNode(this.id,this.path,this))}set name(s){const g=this.path;!p.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,c=!0,h){if(!this.disposed&&!p.isRoot(this)&&!this.isExpanded){if(c){const u=E.getGlobalTreeState(this.path);u.loadPathCancelToken.cancel(),u.refreshCancelToken.cancel(),E.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)){c&&E.setGlobalTreeState(this.path,{isExpanding:!1});return}if(s&&this.parent&&p.is(this.parent)&&await this.parent.setExpanded(!0,!g,!1,h),h?.isCancellationRequested){c&&E.setGlobalTreeState(this.path,{isExpanding:!1});return}this.isExpanded&&(this._watcher.notifyWillChangeExpansionState(this,!0),this.expandBranch(this,g),this._watcher.notifyDidChangeExpansionState(this,!0)),c&&(E.setGlobalTreeState(this.path,{isExpanding:!1}),E.setTreeNode(this.id,this.path,this))}}getAllExpandedNodePath(){var s,g;const c=[];let h=0;p.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 v=(g=this.root)===null||g===void 0?void 0:g.getTreeNodeAtIndex(d);p.is(v)&&v.expanded&&c.push(v.path)}return c}getAllCollapsedNodePath(){let s=[];if(this.children){for(let g=0;g<this.children.length;g++){const c=this.children[g];p.is(c)&&(c.isExpanded?s=s.concat(c.getAllCollapsedNodePath()):s.push(c.path))}return s}else return s}async resolveChildrens(s){var g,c,h;let u=this.children,d=[];try{u=await this._tree.resolveChildren(this)||[]}catch{u=[]}if(s?.isCancellationRequested)return!1;const v=new Array(u.length);this._children=Array(u.length);for(let a=0;a<u.length;a++){const b=u[a];b.id=E.getIdByPath(b.path)||b.id,this._children[a]=b,E.setIdByPath(b.path,b.id)}(g=this._children)===null||g===void 0||g.sort(this._tree.sortComparator||p.defaultSortComparator);for(let a=0;a<u.length;a++)v[a]=this._children[a].id;const f=[];for(let a=0,b=((c=this.children)===null||c===void 0?void 0:c.length)||0;a<b;a++){const y=(h=this.children)===null||h===void 0?void 0:h[a];if(p.is(y)&&y.expanded){const S=await y.resolveChildrens(s);if(S&&(d=d.concat(S)),s?.isCancellationRequested)return;f.push(y)}}this._branchSize=v.length,this.setFlattenedBranch(v);for(let a=0;a<f.length;a++){const b=f[a];b.expandBranch(b,!0)}return d.concat(f.map(a=>a.path.toString()))}updateTreeNodeCache(s){var g;if(E.setTreeNode(s.id,s.path,s),p.is(s)&&s.expanded&&(!((g=s.children)===null||g===void 0)&&g.length))for(let c=0;c<s.children.length;c++){const h=s.children[c];this.updateTreeNodeCache(h)}}async refreshTreeNodeByPaths(s=this.getAllExpandedNodePath(),g,c){if(!p.is(this))return;let h;const u=this.children;let d=this.children||[];if(this.expanded){if(this===c){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 v=0;v<this.children.length;v++)this.children[v].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(a=>a.path===h);if(f){if(p.is(f)&&!f.expanded){f.isExpanded=!0;const a=await f.resolveChildrens(g);if(g?.isCancellationRequested||(a&&(s=s.filter(b=>!a.find(y=>y.includes(b)))),s.length>0&&!g?.isCancellationRequested&&(s=await f.refreshTreeNodeByPaths([...s],g,c)||[],g?.isCancellationRequested)))return}}else{if(!d||d.length===0)break;for(let a=0;a<d.length;a++){const b=d[a];if(h.indexOf(`${b.path}${o.separator}`)===0&&p.is(b)){if(!p.is(b))continue;b.isExpanded=!0;const S=await b.resolveChildrens(g);if(g?.isCancellationRequested||(S&&(s=s.filter(A=>!S.find(T=>T===A))),b.path!==h&&!s.includes(b.path)&&s.unshift(h),s.length>0&&(s=await b.refreshTreeNodeByPaths([...s],g,c)||[],g?.isCancellationRequested)))return;break}}}}if(h){if(s.unshift(h),this===c){if(u){this.shrinkBranch(this,!0);for(let a=0;a<u.length;a++){const b=u[a];b?.dispose()}}const v=[],f=new Array(d.length);this._children=Array(d.length);for(let a=0;a<d.length;a++){const b=d[a];b.id=E.getIdByPath(b.path)||b.id,this._children[a]=b,E.setIdByPath(b.path,b.id),p.is(b)&&b.expanded&&v.push(b)}this._children.sort(this._tree.sortComparator||p.defaultSortComparator);for(let a=0;a<d.length;a++)f[a]=this._children[a].id;this._branchSize=f.length,this.setFlattenedBranch(f,!0),this.watcher.notifyDidUpdateBranch()}return this.parent!==c&&this.expandBranch(this,!0),s}else if(p.isRoot(this)){if(this.children){this.shrinkBranch(this,!0);for(let b=0;b<this.children.length;b++){const y=this.children[b];y?.dispose()}}const v=[],f=[],a=new Array(d.length);this._children=Array(d.length);for(let b=0;b<d.length;b++){const y=d[b];if(y.id=E.getIdByPath(y.path)||y.id,this._children[b]=y,E.setIdByPath(y.path,y.id),p.is(y)&&y.expanded){if(!y.children&&(await y.resolveChildrens(g),g?.isCancellationRequested))return;v.push(y)}else f.push(y)}this._children.sort(this._tree.sortComparator||p.defaultSortComparator);for(let b=0;b<d.length;b++)a[b]=this._children[b].id;this._branchSize=a.length,this.setFlattenedBranch(a,!0);for(let b=0;b<v.length;b++){const y=v[b];y.expandBranch(y,!0),this.updateTreeNodeCache(y)}for(let b=0;b<f.length;b++){const y=f[b];this.updateTreeNodeCache(y)}typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),this.watcher.notifyDidUpdateBranch()}else{const v=[];if(this===c){if(this.children&&this.shrinkBranch(this,!0),this.children)for(let a=0,b=this.children.length;a<b;a++)this.children[a].dispose();const f=new Array(d.length);this._children=Array(d.length);for(let a=0,b=d.length;a<b;a++){const y=d[a];y.id=E.getIdByPath(y.path)||y.id,this._children[a]=y,E.setIdByPath(y.path,y.id),p.is(y)&&y.expanded&&v.push(y),this.updateTreeNodeCache(y)}this._children.sort(this._tree.sortComparator||p.defaultSortComparator);for(let a=0;a<d.length;a++)f[a]=this._children[a].id;this._branchSize=f.length,this.setFlattenedBranch(f);for(let a=0;a<v.length;a++){const b=v[a];b.expandBranch(b,!0)}}else for(let f=0;f<d.length;f++){const a=d[f];a.expanded&&v.push(a)}for(let f=0;f<v.length;f++){const a=v[f];a.expandBranch(a,!0)}typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),this===c&&this.expandBranch(this)}}else{if(this.children&&this.children&&this.parent){for(let v=0,f=this.children.length;v<f;v++)this.children[v].dispose();this._children=null}return}}async expandedAll(s=this.getAllCollapsedNodePath()){if(!p.isRoot(this))return;s=s.sort((c,h)=>o.pathDepth(c)-o.pathDepth(h));let g;for(;s.length>0;){g=s.pop();const c=E.getTreeNodeByPath(g);p.is(c)&&await c.setExpanded(!1,!0)}this.watcher.notifyDidUpdateBranch()}async collapsedAll(s=this.getAllExpandedNodePath()){if(!p.isRoot(this))return;s=s.sort((c,h)=>o.pathDepth(c)-o.pathDepth(h));let g;for(;s.length>0;){g=s.pop();const c=E.getTreeNodeByPath(g);p.is(c)&&c.setCollapsed(!0)}this.watcher.notifyDidUpdateBranch()}setCollapsed(s=!1){if(p.isRoot(this)||this.disposed||!this.isExpanded)return;const g=E.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,E.setTreeNode(this.id,this.path,this),this._watcher.notifyDidChangeExpansionState(this,!1))}mv(s,g=this.name){const c=this.path;if(super.mv(s,g),typeof this.watchTerminator=="function"&&(this.watchTerminator(c),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 p&&s.expanded?s._branchSize:0);this._children&&(this._children.push(s),this._children.sort(this._tree.sortComparator||p.defaultSortComparator)),this._branchSize+=g;let c=this;for(;!c._flattenedBranch;)c.parent&&(c=c.parent,c._branchSize+=g);if(!this._children)return;let h=this._children.indexOf(s),u;const d=this._children[h-1];d?h=c._flattenedBranch.indexOf(d.id)+(d instanceof p&&d.expanded?d._branchSize:0):h=c._flattenedBranch.indexOf(this.id),h===-1&&this._branchSize===1&&(h=0),u=h+1,c._flattenedBranch.length===0&&(u=0);let v=[s.id];return s instanceof p&&s.expanded&&s._flattenedBranch&&(v=v.concat(s._flattenedBranch),s.setFlattenedBranch(null)),c.setFlattenedBranch(l(c._flattenedBranch,u,0,v)),E.setTreeNode(s.id,s.path,s),s}unlinkItem(s,g){var c;if(!this._children)return;const h=this._children.indexOf(s);if(h===-1||!this.isItemVisibleAtRootSurface(this))return;(c=this._children)===null||c===void 0||c.splice(h,1);const u=1+(s instanceof p&&s.expanded?s._branchSize:0);this._branchSize-=u;let d=this;for(;!d._flattenedBranch;)d.parent&&(d=d.parent,d._branchSize-=u);const v=d._flattenedBranch.indexOf(s.id);v!==-1&&(s instanceof p&&s.expanded&&s.setFlattenedBranch(d._flattenedBranch.slice(v+1,v+u)),d.setFlattenedBranch(l(d._flattenedBranch,v,u)),!g&&s.parent===this&&s.mv(null))}transferItem(s,g){var c;const h=new o(s),u=h.dir.toString();if(u!==this.path)return;const d=h.base.toString(),v=(c=this._children)===null||c===void 0?void 0:c.find(y=>y.name===d);if(!v)return;const f=new o(g),a=f.dir.toString(),b=a===u?this:E.getTreeNodeByPath(a);if(!p.is(b)){this.unlinkItem(v);return}return v.mv(b,f.base.toString()),v}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,p.isRoot(this)&&!g&&this.watcher.notifyDidUpdateBranch()}expandBranch(s,g){if(this!==s&&s._flattenedBranch&&(this._branchSize+=s._branchSize),this!==s&&this._flattenedBranch){const c=this._flattenedBranch.indexOf(s.id)+1;if(c===0)return;this.setFlattenedBranch(l(this._flattenedBranch,c,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 c=this._flattenedBranch.indexOf(s.id)+1;if(c===0)return;s.setFlattenedBranch(this._flattenedBranch.slice(c,c+s._branchSize),g),this.setFlattenedBranch(l(this._flattenedBranch,c,s._flattenedBranch?s._flattenedBranch.length:0),g)}else this.parent&&this.parent.shrinkBranch(s,g)}async hardReloadChildren(s){let g;const c=this.path;try{g=await this._tree.resolveChildren(this)||[]}catch{g=[]}if(!this.expanded||s?.isCancellationRequested)return!1;this.path!==c&&E.setGlobalTreeState(c,{isExpanding:!1,isLoadingPath:!1,isRefreshing:!1});const h=[],u=new Array(g.length),d=new Array(g.length);for(let v=0;v<g.length;v++){const f=g[v];if(f.id=E.getIdByPath(f.path)||f.id,d[v]=f,E.setIdByPath(f.path,f.id),p.is(f)&&f.expanded){if(f.children||await f.resolveChildrens(s),s?.isCancellationRequested)return!1;h.push(f)}}d.sort(this._tree.sortComparator||p.defaultSortComparator);for(let v=0;v<g.length;v++)u[v]=d[v].id;if(this.children&&this.shrinkBranch(this),this.children)for(let v=0;v<this.children.length;v++){const f=this.children[v];f?.dispose()}for(let v=0;v<d.length;v++)this.updateTreeNodeCache(d[v]);this._children=d,this._branchSize=u.length,this.setFlattenedBranch(u);for(let v=0;v<h.length;v++){const f=h[v];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(!E.is(s))throw new TypeError("Expected node to be a TreeNode");return this.insertItem(s)}removeNode(s){const g=new o(s),c=g.dir.toString(),h=g.base.toString();if(c===this.path&&this.children){const u=this.children.find(d=>d.name===h);u&&this.unlinkItem(u)}}async refresh(s,g){if(!p.isRoot(this))return await this.root.refresh(s,this);const c=E.getGlobalTreeState(this.path);if(c.isLoadingPath||c.isExpanding)return;let h;if(s&&!s.token.isCancellationRequested)E.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:s}),h=s.token;else if(c.refreshCancelToken.token.isCancellationRequested){const u=new n.CancellationTokenSource;E.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:u}),h=u.token}else h=c.refreshCancelToken.token;this.toRefreshPathQueue.add((g||this).path),await this.refreshThrottler.trigger(()=>this.doRefresh(h)),E.setGlobalTreeState(this.path,{isRefreshing:!1})}async doRefresh(s){const g=this.getRefreshNode()||this;if(!p.is(g))return;const c=g.getAllExpandedNodePath();await g.refreshTreeNodeByPaths(c,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),v=o.pathDepth(u);return d-v}),s.length===1||o.pathDepth(s[0])===1)return E.getTreeNodeByPath(s[0]);const g=s.map(h=>new o(h));let c=g[0];for(let h=1,u=g.length;h<u;h++)if(!c.isEqualOrParent(g[h]))for(;!c.isRoot&&(c=c.dir,!(!c||c.isEqualOrParent(g[h]))););return c?E.getTreeNodeByPath(c.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,c=g(s);return c.shift(),c}async loadTreeNodeByPath(s,g=!1){if(!p.isRoot(this))return;const c=E.getGlobalTreeState(this.path);if(c.isExpanding)return;c.refreshCancelToken.cancel(),c.loadPathCancelToken.cancel();const h=new n.CancellationTokenSource;E.setGlobalTreeState(this.path,{isLoadingPath:!0,loadPathCancelToken:h});const u=h.token,d=[],{splitPath:v,isRelative:f}=o,a=f(s)?v(s):this.transformToRelativePath(s);if(a.length===0)return E.setGlobalTreeState(this.path,{isLoadingPath:!1}),this;if(this.children||await this.ensureLoaded(u),u.isCancellationRequested){E.setGlobalTreeState(this.path,{isLoadingPath:!1});return}let b=this._children,y,S="",A;for(;b&&(A=a.shift());){let T=b.find(w=>w.name.indexOf(A)===0);if(T){if(p.is(T)){if(T._watcher.notifyWillChangeExpansionState(T,!0),T.isExpanded=!0,!T.children&&(await T.resolveChildrens(u),u.isCancellationRequested)){E.setGlobalTreeState(this.path,{isLoadingPath:!1});return}d.push(T),T._watcher.notifyDidChangeExpansionState(T,!0)}if(a.length===0){y=T;break}}if(!T&&y){const w=v(y.name).slice(1);if(w[0]===A){for(w.shift();w.length>0&&w[0]===a[0];)w.shift(),a.shift();A=a.shift(),T=b.find(D=>D.name.indexOf(A)===0)}}if(!T||!p.is(T)&&a.length>0)break;if(p.is(T)){if(T.name.indexOf(o.separator)>0){const D=v(T.name).slice(1);for(;D.length>0&&D[0]===a[0];)D.shift(),a.shift()}if(!T._children&&(S=T.path,p.is(T))){if(T.isExpanded=!0,!T.children&&(await T.resolveChildrens(u),u.isCancellationRequested)){E.setGlobalTreeState(this.path,{isLoadingPath:!1});return}d.push(T)}if(T&&a.length===0){y=T;break}else{if(S&&S!==T.path){const D=v(S),I=v(T.path);I.length>D.length&&a.splice(0,I.length-D.length)}b=T._children,y=T}}}if(y){let T;if(y.disposed){E.setGlobalTreeState(this.path,{isLoadingPath:!1});return}for(;T=d.pop();)T.expandBranch(T,!0),d.length===0&&this.updateTreeNodeCache(T);return g||this.watcher.notifyDidUpdateBranch(),E.setGlobalTreeState(this.path,{isLoadingPath:!1}),y}E.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 c=(g=this._flattenedBranch)===null||g===void 0?void 0:g[s];if(c)return E.getTreeNodeById(c)}getTreeNodeById(s){return E.getTreeNodeById(s)}getTreeNodeByPath(s){return E.getTreeNodeByPath(s)}}t.CompositeTreeNode=p,p.REFRESH_DELAY=200},58781:(L,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 l;(function(p){p[p.Applicable=1]="Applicable",p[p.Inheritable=2]="Inheritable"})(l||(t.CompositeDecorationType=l={}));var m;(function(p){p[p.UnTargetDecoration=1]="UnTargetDecoration",p[p.TargetDecoration=2]="TargetDecoration"})(m||(t.ChangeReason=m={}));class E{constructor(_,s,g){this.handleDecorationDidAddClassname=c=>{const{classname:h}=c;!this.selfOwned||!h||(this.compositeCssClasslist.classlist.push(h),this.notifyClasslistChange())},this.handleDecorationDidRemoveClassname=c=>{const{classname:h}=c;if(!this.selfOwned||!h)return;const u=this.compositeCssClasslist.classlist.indexOf(h);u>-1&&(this.compositeCssClasslist.classlist.splice(u,1),this.notifyClasslistChange())},this.mergeDecorationClasslist=c=>{const{decoration:h}=c;this.selfOwned&&(this.compositeCssClasslist.classlist.push(...h.cssClassList),this.notifyClasslistChange())},this.handleDecorationDisable=c=>{const{decoration:h}=c;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,m.UnTargetDecoration,s,!1);this.parent!==_&&(this.parent.linkedComposites.delete(this),this.parent=_,_.linkedComposites.add(this));for(const[s]of _.renderedDecorations)this.recursiveRefresh(this,!1,m.TargetDecoration,s,!1)}}add(_){const s=_.appliedTargets.get(this.target),g=s&&(s===r.TargetMatchMode.Self||s===r.TargetMatchMode.SelfAndChildren),c=s&&(s===r.TargetMatchMode.Children||s===r.TargetMatchMode.SelfAndChildren);if(!(this.type===l.Applicable&&!g)&&!(this.type===l.Inheritable&&!c)){if(!this.selfOwned){this.selfOwn(m.TargetDecoration,_),this.targetedDecorations.add(_);return}this.targetedDecorations.has(_)||(this.targetedDecorations.add(_),this.recursiveRefresh(this,!1,m.TargetDecoration,_))}}remove(_){if(this.selfOwned&&this.targetedDecorations.delete(_)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn(void 0,m.UnTargetDecoration,_);this.recursiveRefresh(this,!1,m.UnTargetDecoration,_)}}negate(_){const s=_.negatedTargets.get(this.target),g=s&&(s===r.TargetMatchMode.Self||s===r.TargetMatchMode.SelfAndChildren),c=s&&(s===r.TargetMatchMode.Children||s===r.TargetMatchMode.SelfAndChildren);if(!(this.type===l.Applicable&&!g)&&!(this.type===l.Inheritable&&!c)){if(!this.selfOwned){this.selfOwn(m.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,m.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[c]of g.renderedDecorations)c!==s&&this.processCompositeAlteration(m.TargetDecoration,c);_===m.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(_===m.UnTargetDecoration){const g=this.renderedDecorations.get(s);if(g){const c=s.appliedTargets.get(this.target),h=c&&(c===r.TargetMatchMode.Self||c===r.TargetMatchMode.SelfAndChildren),u=c&&(c===r.TargetMatchMode.Children||c===r.TargetMatchMode.SelfAndChildren);return h&&this.type===l.Applicable||u&&this.type===l.Inheritable?!1:(this.removeDecorationClasslist(s,!1),g&&g.dispose(),this.renderedDecorations.delete(s))}return!1}if(_===m.TargetDecoration){const g=s.negatedTargets.get(this.target),c=g&&(g===r.TargetMatchMode.Self||g===r.TargetMatchMode.SelfAndChildren),h=g&&(g===r.TargetMatchMode.Children||g===r.TargetMatchMode.SelfAndChildren);if(c&&this.type===l.Applicable||h&&this.type===l.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,c,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(m.UnTargetDecoration,u);for(const[u]of this.parent.renderedDecorations)this.processCompositeAlteration(m.TargetDecoration,u);h&&this.notifyClasslistChange(!1)}else this.selfOwned&&g===m.UnTargetDecoration&&c&&this.renderedDecorations.has(c)?(this.processCompositeAlteration(g,c),h&&this.notifyClasslistChange(!1)):this.selfOwned&&g===m.TargetDecoration&&c&&this.processCompositeAlteration(g,c)&&h?this.notifyClasslistChange(!1):!this.selfOwned&&h&&this.notifyClasslistChange(!1);for(const u of this.linkedComposites)u.recursiveRefresh(_,s,g,c,h)}removeDecorationClasslist(_,s=!0){if(this.selfOwned){for(const g of _.cssClassList){const c=this.compositeCssClasslist.classlist.indexOf(g);c>-1&&this.compositeCssClasslist.classlist.splice(c,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=E},96336:(L,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(m){m[m.None=1]="None",m[m.Self=2]="Self",m[m.Children=3]="Children",m[m.SelfAndChildren=4]="SelfAndChildren"})(o||(t.TargetMatchMode=o={}));class l{constructor(...E){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(E))if(E.every(p=>typeof p=="string"))this._cssClassList=new Set(E);else throw new TypeError("classlist must be of type `Array<string>`");else this._cssClassList=new Set}get disabled(){return this._disabled}set disabled(E){this._disabled=E,E?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(E){this._cssClassList.has(E)||(this._cssClassList.add(E),this.onDidAddCSSClassnameEmitter.fire({decoration:this,classname:E}))}removeCSSClass(E){this._cssClassList.has(E)&&(this._cssClassList.delete(E),this.onDidRemoveCSSClassnameEmitter.fire({decoration:this,classname:E}))}hasTarget(E){return!!this._appliedTargets.get(E)}addTarget(E,p=o.Self){if(this._appliedTargets.get(E)===p||!r.TreeNode.is(E))return;this._appliedTargets.set(E,p);const s=n.Disposable.create(()=>{this.removeTarget(E)});return this.appliedTargetsDisposables.set(E,s),this.onDidAddTargetEmitter.fire({decoration:this,target:E}),s}removeTarget(E){if(this._appliedTargets.delete(E)){const p=this.appliedTargetsDisposables.get(E);p&&p.dispose(),this.onDidRemoveTargetEmitter.fire({decoration:this,target:E})}}clearAppliedTarget(){const E=Array.from(this._appliedTargets.keys());for(const p of E)this.removeTarget(p)}clearNegateTarget(){const E=Array.from(this._negatedTargets.keys());for(const p of E)this.unNegateTarget(p)}negateTarget(E,p=o.Self){if(this._negatedTargets.get(E)===p||!r.TreeNode.is(E))return;this._negatedTargets.set(E,p);const s=n.Disposable.create(()=>{this.unNegateTarget(E)});return this.negatedTargetsDisposables.set(E,s),this.onDidNegateTargetEmitter.fire({decoration:this,target:E}),s}unNegateTarget(E){if(this._negatedTargets.delete(E)){const p=this.negatedTargetsDisposables.get(E);p&&p.dispose(),this.onDidUnNegateTargetEmitter.fire({decoration:this,target:E})}}}t.Decoration=l},29701:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationsManager=void 0;const n=e(70392),r=e(34054),o=e(26353),l=e(58781);class m{constructor(p){this.root=p,this.decorations=new Map,this.decorationsMeta=new WeakMap,this.disposables=new n.DisposableCollection,this.disposed=!1,this.targetDecoration=_=>{const{decoration:s,target:g}=_,c=this.getDecorationData(g);if(c){const{applicable:h,inheritable:u}=c;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 c=this.root.getTreeNodeByPath(s.path);c&&_.addTarget(c,g)}},this.unTargetDecoration=_=>{const{decoration:s,target:g}=_,c=this.getDecorationData(g);if(c){const{applicable:h,inheritable:u}=c;h.remove(s),u&&u.remove(s)}},this.negateDecoration=_=>{const{decoration:s,target:g}=_,c=this.getDecorationData(g);if(c){const{applicable:h,inheritable:u}=c;h.negate(s),u&&u.negate(s)}},this.unNegateDecoration=_=>{const{decoration:s,target:g}=_,c=this.getDecorationData(g);if(c){const{applicable:h,inheritable:u}=c;h.unNegate(s),u&&u.unNegate(s)}},this.switchParent=(_,s,g)=>{const c=this.decorationsMeta.get(_);if(!c)return;const h=this.getDecorationData(g);h&&(c.applicable.changeParent(h.inheritable),c.inheritable&&c.inheritable.changeParent(h.inheritable))},this.decorationsMeta.set(p,{applicable:new l.CompositeDecoration(p,l.CompositeDecorationType.Applicable),inheritable:new l.CompositeDecoration(p,l.CompositeDecorationType.Inheritable)}),this.disposables.push(p.watcher.on(r.TreeNodeEvent.DidChangeParent,this.switchParent)),this.disposables.push(p.watcher.on(r.TreeNodeEvent.DidDispose,_=>this.decorationsMeta.delete(_))),this.disposables.push(p.watcher.on(r.TreeNodeEvent.BranchDidUpdate,this.updateTarget))}dispose(){for(const[p]of this.decorations)this.removeDecoration(p);this.disposables.dispose(),this.disposed=!0}addDecoration(p){if(this.disposed)throw new Error("DecorationManager disposed");if(this.decorations.has(p))return;const _=new n.DisposableCollection;_.push(p.onDidAddTarget(this.targetDecoration)),_.push(p.onDidRemoveTarget(this.unTargetDecoration)),_.push(p.onDidNegateTarget(this.negateDecoration)),_.push(p.onDidUnNegateTarget(this.unNegateDecoration)),this.decorations.set(p,_);for(const[s]of p.appliedTargets)this.targetDecoration({decoration:p,target:s});for(const[s]of p.negatedTargets)this.negateDecoration({decoration:p,target:s})}removeDecoration(p){const _=this.decorations.get(p);if(_){for(const[s]of p.appliedTargets){const g=this.decorationsMeta.get(s);g&&(g.applicable.remove(p),g.inheritable&&g.inheritable.remove(p))}for(const[s]of p.negatedTargets){const g=this.decorationsMeta.get(s);g&&(g.applicable.unNegate(p),g.inheritable&&g.inheritable.unNegate(p))}_.dispose(),this.decorations.delete(p)}}getDecorations(p){if(!p||!o.TreeNode.is(p))return;const _=this.getDecorationData(p);if(_)return _.applicable.compositeCssClasslist}getDecorationData(p){if(this.disposed)return;const _=this.decorationsMeta.get(p);if(_)return _;if(!p||!p.parent)return;const s=this.getDecorationData(p.parent);if(s){const g={applicable:new l.CompositeDecoration(p,l.CompositeDecorationType.Applicable,s.inheritable),inheritable:o.CompositeTreeNode.is(p)?new l.CompositeDecoration(p,l.CompositeDecorationType.Inheritable,s.inheritable):void 0};return this.decorationsMeta.set(p,g),g}}}t.DecorationsManager=m},24936:(L,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:(L,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:(L,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 l{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(E){this._root=E,this.initState(E),this.root&&(this._ensureReady=this.root.ensureLoaded())}get state(){return this._state}set state(E){this._state=E}init(E){this.root=E,this.root.watcher.on(r.TreeNodeEvent.BranchDidUpdate,this.dispatchChange)}initState(E){this.state=new o.TreeStateManager(E)}loadTreeState(E){return typeof E=="string"&&(E=JSON.parse(E)),this.state.loadTreeState(E)}getTreeStateWatcher(E=!1){return new o.TreeStateWatcher(this.state,E)}resolveChildren(E){return Promise.resolve(Array.from(E.children))}}t.TreeModel=l},58615:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(13674),t)},12165:(L,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:l}=n.path;var m;(function(_){_[_.SetExpanded=1]="SetExpanded",_[_.SetCollapsed=2]="SetCollapsed",_[_.SetActive=3]="SetActive"})(m||(t.Operation=m={}));var E;(function(_){_[_.Expanded=1]="Expanded",_[_.Collapsed=2]="Collapsed",_[_.Disabled=4]="Disabled"})(E||(E={}));class p{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,c,h)=>{var u;if(this.stashing&&this.stashKeyframes&&this.stashKeyframes.set(g.id,c?E.Expanded:E.Collapsed),this.stashKeyframes&&!this.stashing){if(c){let v=g;for(;v;){if(this.stashKeyframes.has(v.id)){let f=this.stashKeyframes.get(v.id);f=f|E.Disabled,this.stashKeyframes.set(v.id,f)}v=v.parent}this.stashLockingItems.add(g)}if(this.stashLockingItems&&this.stashLockingItems.has(g)&&!c){let v=g;for(;v;){if(this.stashKeyframes.has(v.id)){let f=this.stashKeyframes.get(v.id);f&=~E.Disabled,this.stashKeyframes.set(v.id,f)}v=v.parent}this.stashLockingItems.delete(g)}}let d=this.expandedDirectories.get(g);c&&!d?(d=(u=new l(this.root.path).relative(new l(g.path)))===null||u===void 0?void 0:u.toString(),this.expandedDirectories.set(g,d),this.onDidChangeExpansionStateEmitter.fire({relativePath:d,isExpanded:c,isVisibleAtSurface:h})):!c&&d&&(this.expandedDirectories.delete(g),this.onDidChangeExpansionStateEmitter.fire({relativePath:d,isExpanded:c,isVisibleAtSurface:h}))},this.handleDidChangePath=g=>{var c;if(this.expandedDirectories.has(g)){const h=this.expandedDirectories.get(g),u=(c=new l(this.root.path).relative(new l(g.path)))===null||c===void 0?void 0:c.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 c=await this.root.loadTreeNodeByPath(g);if(!c)break;c&&o.CompositeTreeNode.is(c)&&c.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,c]of s){const h=(c&E.Disabled)===E.Disabled,u=o.TreeNode.getTreeNodeById(g);!u||h||((c&E.Expanded)===E.Expanded?u.setCollapsed():(c&E.Collapsed)===E.Collapsed&&await u.setExpanded())}}}t.TreeStateManager=p},72782:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcher=void 0;const n=e(70392),r=e(13440);class o{constructor(m,E=!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(m.onChangeScrollOffset(p=>{this.currentState.scrollPosition=p,this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.ScrollOffset)})),this.disposables.push(m.onDidChangeRelativePath(({prevPath:p,newPath:_})=>{let s=!1;const g=new Set(this.currentState.expandedDirectories.atSurface);if(g.has(p)&&(g.delete(p),g.add(_),s=!0),this.currentState.expandedDirectories.atSurface=Array.from(g),E){const c=new Set(this.currentState.expandedDirectories.buried);c.has(p)&&(g.delete(p),g.add(_),s=!0),this.currentState.expandedDirectories.buried=Array.from(c)}s&&this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.PathsUpdated)})),this.disposables.push(m.onDidChangeExpansionState(({relativePath:p,isExpanded:_,isVisibleAtSurface:s})=>{let g=!1;const c=new Set(this.currentState.expandedDirectories.atSurface),h=new Set(this.currentState.expandedDirectories.buried);if(c.has(p)&&(!_||!s)){c.delete(p);const d=Array.from(c).filter(v=>v.indexOf(p)>=0);for(const v of d)c.delete(v),h.has(v)||h.add(v);g=!0}else _&&s&&(c.add(p),g=!0);this.currentState.expandedDirectories.atSurface=Array.from(c),E||(h.has(p)&&(!_||s)?(h.delete(p),g=!0):_&&!s&&(h.add(p),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:(L,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:(L,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:(L,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:(L,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:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3754:(L,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:(L,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)),l=n.__importStar(e(14041)),m=e(70392),E=e(56875);e(93324);const p=({onScroll:_,onUpdate:s,forwardedRef:g,style:c,children:h,className:u,onReachBottom:d,tabBarMode:v,thumbSize:f=5,hiddenVertical:a,hiddenHorizontal:b,universal:y=!1})=>{const S=(0,l.useRef)(new m.DisposableCollection),A=(0,l.useRef)(),T=(0,l.useCallback)(P=>{P?(A.current=P.view,g&&(typeof g=="function"?g(P.view):g.current=P.view)):g&&typeof g=="function"&&g(null)},[]),w=(0,l.useRef)(),D=(0,l.useRef)(),I=(0,l.useCallback)(P=>{if(!P)return;const{scrollTop:R,scrollHeight:M,clientHeight:k}=P;if(M===0&&k===0)return;(R+100)/(M-k)>1&&d&&d()},[d]),O=(0,l.useCallback)((0,o.default)(P=>{if(!P)return;const{scrollTop:R,scrollLeft:M}=P,k=1/20*Math.min(R,20),B=1/20*Math.min(M,20);w.current&&(w.current.style.opacity=String(k)),D.current&&(D.current.style.opacity=String(B)),I(P),s&&s(P)},100),[s,I,w.current,D.current]);return(0,l.useEffect)(()=>{const P=R=>{A.current&&(R.preventDefault(),R.stopPropagation(),A.current.clientHeight>=A.current.scrollHeight&&(R.deltaY!==0&&(A.current.scrollLeft+=R.deltaY),R.deltaX!==0&&(A.current.scrollLeft+=R.deltaX)))};return v&&A.current&&A.current.addEventListener("wheel",P),()=>{var R;(R=A.current)===null||R===void 0||R.removeEventListener("wheel",P)}},[A.current,v]),(0,l.useEffect)(()=>()=>S.current.dispose(),[]),l.default.createElement(E.Scrollbars,{ref:T,style:{...c,overflow:"hidden"},className:(0,r.default)(u,"kt-scrollbar"),onUpdate:O,onScroll:_,universal:y,renderTrackHorizontal:({style:P,...R})=>{const M={...P,height:f,left:0,right:0,bottom:1};return b&&(M.display="none"),l.default.createElement("div",{...R,style:M})},renderTrackVertical:({style:P,...R})=>{const M={...P,width:f,top:0,right:1,bottom:0};return a&&(M.display="none"),l.default.createElement("div",{...R,style:M})},renderThumbVertical:({style:P,className:R,...M})=>{const k={...P,width:f};return a&&(k.display="none"),l.default.createElement("div",{...M,style:k,className:(0,r.default)(R,"scrollbar-thumb-vertical")})},renderThumbHorizontal:({style:P,className:R,...M})=>{const k={...P,height:f,display:"none"};return b&&(k.display="none"),l.default.createElement("div",{...M,style:k,className:(0,r.default)(R,"scrollbar-thumb-horizontal")})}},l.default.createElement("div",{ref:P=>{w.current=P},className:"scrollbar-decoration-vertical"}),l.default.createElement("div",{ref:P=>{D.current=P},className:"scrollbar-decoration-horizontal"}),h)};t.Scrollbars=p,t.Scrollbars.displayName="CustomScrollbars",t.ScrollbarsVirtualList=l.default.forwardRef((_,s)=>l.default.createElement(t.Scrollbars,{..._,thumbSize:10,forwardedRef:s})),t.ScrollbarsVirtualList.displayName="ScrollbarsVirtualList"},14640:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectOptionsList=t.Option=void 0,t.isDataOptions=c,t.isDataOptionGroups=h,t.Select=S;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(54713),m=e(50708);e(11110);const E=({value:T,children:w,disabled:D,onClick:I,className:O,...P})=>o.default.createElement("span",{...P,className:(0,r.default)(O,{"kt-option-disabled":D}),onClick:()=>I&&!D&&I(T)},w);t.Option=E;function p(...T){}function _(T,w){return w?T.props[w]:T.props.value}function s(T,w){let D=[];return Array.isArray(T)?D=o.default.Children.toArray(T).map(w):D=[w(T)],D}function g(T,w,D=(I,O)=>I===O){const O=o.default.Children.toArray(w).filter(P=>o.default.isValidElement(P)).find(P=>{var R;return P.props&&D((R=P.props)===null||R===void 0?void 0:R.value,T)?P:null});return O?.props}function c(T){return T?T.length===0?!0:u(T[0]):!1}function h(T){return T?T.length===0?!0:d(T[0]):!1}function u(T){return T.value!==void 0}function d(T){return T.groupName!==void 0&&c(T.options)}function v(T){return o.default.createElement(o.default.Fragment,null,T.data.iconClass?o.default.createElement("div",{className:(0,r.default)(T.data.iconClass,"kt-select-option-icon")}):void 0,T.data.label)}function f({group:T,index:w}){return o.default.createElement("div",{key:"header_"+w,className:"kt-select-group-header"},T.iconClass?o.default.createElement("div",{className:(0,r.default)(T.iconClass,"kt-select-option-icon")}):void 0,o.default.createElement("div",null,T.groupName))}function a(T,w){let D=w.label;if(D===void 0)try{D=w.value.toString()}catch{D=void 0}return typeof D=="string"?D.indexOf(T)!==-1:!1}const b=o.default.memo(({selected:T,selectedRenderer:w})=>w?o.default.createElement(w,{data:T}):o.default.createElement(o.default.Fragment,null,T.iconClass&&o.default.createElement("div",{className:(0,r.default)(T.iconClass,"kt-select-option-icon")}),o.default.createElement("span",{className:"kt-select-option"},T.label))),y=o.default.memo(({value:T,onChange:w,placeholder:D,size:I="default"})=>o.default.createElement(m.Input,{className:"kt-select-search",value:T,size:I,onChange:O=>w(O.target.value),autoFocus:!0,placeholder:D||""}));function S({disabled:T,options:w,size:D="default",children:I,value:O,onChange:P,onMouseEnter:R,optionLabelProp:M,style:k,optionStyle:B,className:x,maxHeight:N,equals:j=(te,Le)=>te===Le,optionRenderer:K=v,groupTitleRenderer:U,footerComponent:Q,headerComponent:z,showSearch:G=!1,filterOption:Y=a,searchPlaceholder:Z="",emptyComponent:$,selectedRenderer:H,onBeforeShowOptions:X,allowOptionsOverflow:J,dropdownRenderType:re="fixed",description:ce,notMatchWarning:fe,onSearchChange:Ae}){const[te,Le]=(0,o.useState)(!1),[Te,oe]=(0,o.useState)(""),le=o.default.useRef(null),Ee=o.default.useRef(null),we=(0,o.useCallback)(Be=>{Be.preventDefault(),Be.stopPropagation(),!(!te&&X?.())&&Le(!te)},[te,X]),be=(0,o.useCallback)(()=>{var Be,ze,Qe,He,vt,at,It,_t,bt;if(w&&c(w)){for(const ct of w)if(j(O,ct.value))return{iconClass:ct.iconClass,label:ct.label,value:ct.value};return{iconClass:(Be=w[0])===null||Be===void 0?void 0:Be.iconClass,label:(ze=w[0])===null||ze===void 0?void 0:ze.label,value:(Qe=w[0])===null||Qe===void 0?void 0:Qe.value}}else if(w&&h(w)){for(const ct of w)for(const gt of ct.options)if(j(O,gt.value))return{iconClass:gt.iconClass,label:gt.label,value:gt.value};return{iconClass:(vt=(He=w[0])===null||He===void 0?void 0:He.options[0])===null||vt===void 0?void 0:vt.iconClass,label:(It=(at=w[0])===null||at===void 0?void 0:at.options[0])===null||It===void 0?void 0:It.label,value:(bt=(_t=w[0])===null||_t===void 0?void 0:_t.options[0])===null||bt===void 0?void 0:bt.value}}else{const ct=I&&g(O,I);if(ct)return{label:ct.label||ct.value,value:ct.value}}return{label:O,value:O,notMatch:!0}},[w,O,I])(),Ce=(0,r.default)("kt-select-options",{"kt-select-options-visible":te,[`kt-select-options-${D}`]:D}),Ne=fe&&be.notMatch,tt=(0,r.default)("kt-select-value",{"kt-select-warning":Ne,"kt-select-disabled":T,"kt-select-value-active":te,[`kt-select-value-${D}`]:D});function Fe(Be,ze){var Qe;if(!Be)return null;(typeof Be=="string"||typeof Be=="number")&&(Be=o.default.createElement(t.Option,{value:Be,label:String(Be),key:`${Be}_${ze}`},Be));const He=Be,vt=((Qe=He.props)===null||Qe===void 0?void 0:Qe.disabled)||!1;return o.default.createElement("div",{key:`${He.props.value}_${ze}`,className:(0,r.default)({"kt-select-option-select":O===He.props.value}),onMouseEnter:()=>R?.(He.props.value,ze),onClick:vt?p:()=>{Le(!1),P&&P(_(Be,M))}},Be)}(0,o.useEffect)(()=>{!te&&Te&&oe("")},[]),(0,o.useEffect)(()=>{if(!te)return;const Be=ze=>{le.current&&!le.current.contains(ze.target)&&Le(!1)};return document.addEventListener("click",Be),()=>document.removeEventListener("click",Be)},[te]);const $e=(0,o.useCallback)(()=>{if(!le.current||!Ee.current)return;const Be=le.current.getBoundingClientRect(),ze=Ee.current;J?(ze.style.minWidth=`${Be.width}px`,ze.style.maxWidth=`${window.innerWidth-Be.left-4}px`):ze.style.width=`${Be.width}px`;const Qe=window.innerHeight-Be.bottom-50,He=ze.clientHeight;Qe<He?ze.style.bottom=`${Be.height+4}px`:(ze.style.maxHeight=`${Qe}px`,ze.style.bottom="auto"),ze.style.position=re},[J,re]);(0,o.useEffect)(()=>{if(te)return $e(),window.addEventListener("resize",$e),()=>window.removeEventListener("resize",$e)},[te,$e]);const Se=(0,o.useMemo)(()=>Te?c(w)?w.filter(Be=>Y(Te,Be)):h(w)?w.reduce((Be,ze)=>{const Qe=ze.options.filter(He=>Y(Te,He,ze));return Qe.length&&Be.push({...ze,options:Qe}),Be},[]):w:w,[w,Te,Y]),ae=()=>o.default.createElement(o.default.Fragment,null,o.default.createElement(b,{selected:be,selectedRenderer:H}),o.default.createElement(l.Icon,{iconClass:(0,r.default)((0,l.getIcon)("down"),"kt-select-value-default-icon")})),ye=(0,o.useCallback)(Be=>{oe(Be),Ae?.(Be)},[Te,Ae]),Re=()=>o.default.createElement(y,{value:Te,onChange:ye,placeholder:Z});return o.default.createElement("div",{className:(0,r.default)("kt-select-container",x),ref:le},o.default.createElement("div",{className:tt,onClick:we,style:k},G&&te?Re():ae()),Ne&&o.default.createElement("div",{className:"kt-select-warning-text"},fe),te&&!Te&&(c(Se)||h(Se)?o.default.createElement(t.SelectOptionsList,{optionRenderer:K,options:Se,equals:j,optionStyle:B,currentValue:O,size:D,onSelect:Be=>{P&&P(Be),Le(!1)},groupTitleRenderer:U,className:Ce,style:{maxHeight:`${N}px`},ref:Ee,footerComponent:Q,headerComponent:z,emptyComponent:$}):o.default.createElement("div",{className:Ce,style:{maxHeight:`${N}px`},ref:Ee},w&&w.map((Be,ze)=>Fe(Be,ze)),I&&s(I,Fe),ce&&o.default.createElement(A,{text:ce}),o.default.createElement("div",{className:"kt-select-overlay",onClick:we}))))}function A({text:T}){return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-option-divider"}),o.default.createElement("div",{className:"kt-option-description"},T))}t.SelectOptionsList=o.default.forwardRef((T,w)=>{const{options:D,optionRenderer:I=v,equals:O=($,H)=>$===H,onSelect:P,currentValue:R,optionStyle:M,size:k,className:B,style:x,groupTitleRenderer:N=f,renderCheck:j,headerComponent:K,footerComponent:U,emptyComponent:Q}=T,z=(0,r.default)("kt-select-options",{[`kt-select-options-${k}`]:!0},B);function G($){return $.map((H,X)=>{const J=o.default.createElement(N,{group:H,index:X});return o.default.createElement(o.default.Fragment,{key:"group_"+X},J,Y(H.options))})}function Y($){return $&&$.map((H,X)=>{const J=O(R,H.value);return o.default.createElement(t.Option,{value:X,key:X,className:(0,r.default)({"kt-select-option-select":J,"kt-select-option-default":!0,"kt-option-with-check":j}),onClick:()=>P(H.value),style:M},j&&O(R,H.value)?o.default.createElement("div",{className:"kt-option-check"},o.default.createElement(l.Icon,{icon:"check"})):void 0,o.default.createElement(I,{data:H,isCurrent:J}))})}let Z;return h(D)?Z=D.filter($=>$.options.length>0).length===0:Z=D.length===0,o.default.createElement("div",{className:z,style:x,ref:w,onClick:$=>{$.stopPropagation()}},K?o.default.createElement(K,null):null,Z&&Q?o.default.createElement(Q,null):(h(D)?G(D):Y(D))||Q&&o.default.createElement(Q,null),U?o.default.createElement(U,null):null)})},54076:(L,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 l=m=>{const{tabs:E,className:p,value:_,onChange:s,mini:g,style:c,...h}=m,u=o.default.useCallback(d=>{typeof s=="function"&&s(d)},[]);return o.default.createElement("div",{...h,style:c,className:(0,r.default)("kt-tabs",p,{"kt-tabs-mini":g})},E.map((d,v)=>{const f=v===_?"kt-tab-selected":"";return typeof d=="string"?o.default.createElement("div",{key:v,className:(0,r.default)("kt-tab",f,{"kt-mini-tab":g}),onClick:u.bind(null,v)},d):o.default.createElement("div",{key:v,className:(0,r.default)("kt-custom-tab",f,{"kt-mini-tab":g}),onClick:u.bind(null,v)},d)}))};t.Tabs=l},72871:(L,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 l=({title:m,children:E,delay:p})=>{const[_,s]=(0,o.useState)(!1),g=(0,o.useRef)(null),c=(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),c.current&&g.current&&h.current){const{x:f,y:a,width:b,height:y}=g.current.getBoundingClientRect(),S=c.current.getBoundingClientRect();a<S.height*1.5?(h.current.className+=" kt-tooltip-reverse-arrow",c.current.style.top=`${a+y+S.height/2}px`):c.current.style.top=`${a-S.height*1.5}px`,f+S.width/2>=document.body.offsetWidth?(h.current.style.right=`${b/2-7}px`,c.current.style.left=`${f+b-S.width}px`):f-S.width/2<=0?(h.current.style.left=`${b/2-7}px`,c.current.style.left=`${f}px`):(h.current.style.left=`${S.width/2-7}px`,c.current.style.left=`${f+b/2-S.width/2}px`)}clearTimeout(u.current)},p||500)}function v(){u.current&&clearTimeout(u.current),s(!1)}return o.default.createElement("p",{ref:g,className:"kt-tooltip-wrapper",onMouseEnter:d,onMouseLeave:v},E,_&&o.default.createElement("span",{ref:c,className:(0,r.default)("kt-tooltip-content")},m,o.default.createElement("span",{ref:h,className:"kt-tooltip-arrow-placeholder"})))};t.Tooltip=l},40604:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deprecated=l;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(65973));function l(m,E){return p=>(r.default.useEffect(()=>{(0,o.default)(!1,`${m.displayName||m.name} is deprecated: ${E}`)},[]),r.default.createElement(m,p))}},84605:(L,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:(L,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=(E,p,_)=>{if(!_)return n.marked.parse(E,p);p?n.marked.parse(E,p,_):n.marked.parse(E,_)};t.parseMarkdown=o;const l=(E,p)=>(0,n.marked)(E,p);t.toMarkdownHtml=l;const m=E=>(E.type==="escape"&&(E.text=E.raw),E);t.parseWithoutEscape=m},2835:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapperRaf=m;const r=e(85608).__importDefault(e(10719));let o=0;const l={};function m(E,p=1){const _=o++;let s=p;function g(){s-=1,s<=0?(E(),delete l[_]):l[_]=(0,r.default)(g)}return l[_]=(0,r.default)(g),_}m.cancel=function(p){p!==void 0&&(r.default.cancel(l[p]),delete l[p])},m.ids=l},43953:(L,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:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warning=n,t.note=r,t.resetWarned=o,t.call=l,t.warningOnce=m,t.noteOnce=E;let e={};function n(p,_){}function r(p,_){}function o(){e={}}function l(p,_,s){!_&&!e[s]&&(p(!1,s),e[s]=!0)}function m(p,_){l(n,p,_)}function E(p,_){l(r,p,_)}t.default=m},91802:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualList=void 0;const r=e(85608).__importStar(e(14041)),o=e(24241),l=e(77011),m=({data:E,className:p,template:_,refSetter:s,onRangeChanged:g})=>{const c=(0,r.useRef)(null);return(0,r.useEffect)(()=>{s?.(c.current)},[c.current]),r.default.createElement(l.Scrollbars,{thumbSize:0},r.default.createElement(o.Virtuoso,{rangeChanged:h=>{g?.(h)},overscan:20,ref:c,style:{height:"100%"},className:p,data:E,itemContent:(h,u)=>r.default.createElement(_,{index:h,data:u})}))};t.VirtualList=m},18740:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(59019),t)},59019:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSChannelHandler=void 0;const n=e(40396),r=e(43718),o=e(54558),l=e(47561);class m{onChannelCreated(p,_){return this._onChannelCreatedEmitter.on(p,_)}constructor(p,_,s={}){this.connection=p,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(p){p&&(this.logger=p)}setReporter(p){this.reporterService=p}heartbeatMessage(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this.heartbeatMessageTimer=setTimeout(()=>{this.channelMap.forEach(p=>{p.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 p=()=>{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()?p():this.openingBarrier.open()}),await this.openingBarrier.wait()}fillKey(p){return`${this.clientId}:${p}`}getChannel(p){return this.channelMap.get(this.fillKey(p))}async openChannel(p){const _=this.fillKey(p);this.channelMap.has(_)&&(this.channelMap.get(_).dispose(),this.logger.log(this.LOG_TAG,`channel ${_} already exists, dispose it`));const s=new l.WSChannel(this.wrappedConnection,{id:_,logger:this.logger,ensureServerReady:!0});this.channelMap.set(s.id,s),this._onChannelCreatedEmitter.emit(p,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:p,closeEvent:{code:u,reason:d},connectInfo:navigator.connection}),this.logger.log(this.LOG_TAG,`channel ${p} closed, code: ${u}, reason: ${d}`)});const c=new r.Deferred,h=s.onOpen(()=>{c.resolve(),h.dispose()});return s.open(p,this.clientId),await c.promise,s}dispose(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this._disposables.dispose()}awaitChannelReady(p){const _=this.getChannel(p),s=new r.Deferred;if(_)_.onServerReady(()=>{s.resolve()});else{const g=this.onChannelCreated(p,c=>{c.onServerReady(()=>{s.resolve()}),g.dispose()})}return s.promise}}t.WSChannelHandler=m},98710:(L,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,l,m,E,p){l.set(o.subarray(E,p),m)}class n{constructor(){this.buffers=[],this.size=0}get byteLength(){return this.size}push(l){this.buffers.push(l),this.size+=l.length}unshift(l){this.buffers.unshift(l),this.size+=l.length}slice(l,m){const E=this.buffers;if(m===void 0&&(m=this.size),l===void 0&&(l=0),m>this.size&&(m=this.size),l>=m)return t.emptyBuffer;let p=0,_=0;for(;_<E.length&&p+E[_].length<=l;_++)p+=E[_].length;const s=new Uint8Array(m-l);let g=0;for(let c=_;g<m-l&&c<E.length;c++){const h=E[c].length,u=g===0?l-p:0,d=g+h>=m-l?Math.min(u+(m-l)-g,h):h;e(E[c],s,g,u,d),g+=d-u}return s}pos(l){if(l<0||l>=this.size)throw new Error(`out of range, ${l} not in [0, ${this.size})`);let m=l,E=0,p=null;for(;;){if(p=this.buffers[E],m<p.length)return{buf:E,offset:m};m-=p.length,E++}}copy(l,m=0,E=0,p=this.size){return e(this.slice(E,p),l,m,0,p-E)}splice(l,m,...E){const p=this.buffers,_=l>=0?l:this.size-l;m===void 0?m=this.size-_:m>this.size-_&&(m=this.size-_);for(const h of E)this.size+=h.length;const s=new n;let g=0,c=0;for(;c<p.length&&g+p[c].length<_;c++)g+=p[c].length;if(_-g>0){const h=_-g;if(h+m<p[c].length){s.push(p[c].slice(h,h+m));const u=p[c],d=new Uint8Array(h);for(let f=0;f<h;f++)d[f]=u[f];const v=new Uint8Array(u.length-h-m);for(let f=h+m;f<u.length;f++)v[f-m-h]=u[f];if(E.length>0){const f=E.slice();f.unshift(d),f.push(v),p.splice.apply(p,[c,1,...f]),c+=f.length,E=[]}else p.splice(c,1,d,v),c+=2}else s.push(p[c].slice(h)),p[c]=p[c].slice(0,h),c++}for(E.length>0&&(p.splice.apply(p,[c,0,...E]),c+=E.length);s.byteLength<m;){const h=p[c],u=h.length,d=Math.min(u,m-s.byteLength);d===u?(s.push(h),p.splice(c,1)):(s.push(h.slice(0,d)),p[c]=p[c].slice(d))}return this.size-=s.byteLength,s}get(l){const{buf:m,offset:E}=this.pos(l);return this.buffers[m][E]}set(l,m){const{buf:E,offset:p}=this.pos(l);this.buffers[E][p]=m}cursor(l=0){return new r(this,l)}dispose(){this.buffers=[],this.size=0}}t.Buffers=n;class r{constructor(l,m=0){this.buffers=l,this.offset=m,this.chunkIndex=0,this.chunkOffset=0,this.updatePosition()}updatePosition(){if(this.offset===0){this.chunkIndex=0,this.chunkOffset=0;return}const{buf:l,offset:m}=this.buffers.pos(this.offset);this.chunkIndex=l,this.chunkOffset=m}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 l=this.buffers.buffers[this.chunkIndex],m=l.byteLength;for(;this.chunkOffset<m;){const E=l[this.chunkOffset];this.chunkOffset++,this.offset++,yield E}this.chunkOffset=0,this.chunkIndex++}}read(l){const m=this.offset+l,E=this.buffers.slice(this.offset,m);return this.skip(l),E}skip(l){let m=0;for(;this.chunkIndex<this.buffers.buffers.length;){const p=this.buffers.buffers[this.chunkIndex].byteLength;for(;this.chunkOffset<p;)if(this.chunkOffset++,this.offset++,++m===l)return;this.chunkOffset=0,this.chunkIndex++}}moveTo(l){this.offset=l,this.updatePosition()}dispose(){this.buffers=null,this.offset=0}reset(){this.offset=0,this.chunkIndex=0,this.chunkOffset=0}}t.Cursor=r},30613:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Capturer=t.ResponseStatus=t.MessageType=void 0,t.getCapturer=E;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 l;(function(_){_.Success="success",_.Fail="fail"})(l||(t.ResponseStatus=l={}));const m=typeof e.g>"u"?typeof window>"u"?{__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__:void 0}:window:e.g;function E(){const _=m.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__;if(_)return _.captureRPC}class p{constructor(s){this.source=s,this._disposables=new n.DisposableStore,this.capturer=null,this.setupListener=g=>{const{command:c}=g.detail;c===r.DevtoolsLantencyCommand.Start?this.capturer=E():c===r.DevtoolsLantencyCommand.Stop&&(this.capturer=null)},this.prefix=(0,n.randomString)(6),this.capturer=E(),typeof m.addEventListener=="function"&&(m.addEventListener(r.EDevtoolsEvent.Latency,this.setupListener),this._disposables.add({dispose:()=>{m.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,c){this.capturer&&this.capture({type:o.OnRequest,requestId:`\u2193${s}`,serviceMethod:g,arguments:c})}captureOnRequestResult(s,g,c){this.capturer&&this.capture({type:o.OnRequestResult,status:l.Success,requestId:`\u2193${s}`,serviceMethod:g,data:c})}captureOnRequestFail(s,g,c){this.capturer&&this.capture({type:o.OnRequestResult,status:l.Fail,requestId:`\u2193${s}`,serviceMethod:g,error:c})}captureSendRequest(s,g,c){this.capturer&&this.capture({type:o.SendRequest,requestId:s,serviceMethod:g,arguments:c})}captureSendRequestResult(s,g,c){this.capturer&&this.capture({type:o.RequestResult,status:l.Success,requestId:s,serviceMethod:g,data:c})}captureSendRequestFail(s,g,c){this.capturer&&this.capture({type:o.RequestResult,status:l.Fail,requestId:s,serviceMethod:g,error:c})}captureSendNotification(s,g,c){this.capturer&&this.capture({type:o.SendNotification,serviceMethod:g,arguments:c,requestId:s})}captureOnNotification(s,g,c){this.capturer&&this.capture({type:o.OnNotification,serviceMethod:g,arguments:c,requestId:`\u2193${s}`})}dispose(){this._disposables.dispose()}}t.Capturer=p},29433:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(39048),t)},39048:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initRPCService=l,t.createRPCService=m,t.getRPCService=E;const n=e(85608),r=e(62199),o=e(8140);function l(p){return{createRPCService:(_,s)=>{const g=m(_,p);return s&&g.onRequestService(s),g},getRPCService:_=>E(_,p)}}function m(p,_){return new r.RPCServiceStub(p,_,o.ServiceType.Service).getProxy()}function E(p,_){return new r.RPCServiceStub(p,_,o.ServiceType.Stub).getProxy()}n.__exportStar(e(62199),t)},35821:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseConnection=void 0;class e{}t.BaseConnection=e},57358:(L,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 l{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(E){this.buffers.push(E);let p=!1;for(;!p;)p=this.readFrame()}readFrame(){if(this.readLengthField()){const p=this.cursor.offset,_=p+this.contentLength,s=this.buffers.slice(p,_);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 E=this.buffers.byteLength;if(this.state!==4){if(this.cursor.offset+t.indicator.length>E)return!1;this.readIndicator()}if(this.state!==4)return!1;if(this.contentLength===-1){if(this.cursor.offset+this.lengthFieldLength>E)return!1;const p=this.cursor.read(this.lengthFieldLength);this.contentLength=(0,r.readUInt32LE)(p,0)}return!(this.cursor.offset+this.contentLength>E)}readIndicator(){const E=this.cursor.iterator();let p=E.next();for(;!p.done;){switch(p.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,E.return();break;default:this.state=0;break}break;default:this.state=0;break}p=E.next()}}dispose(){this.dataEmitter.dispose(),this.buffers.dispose()}static construct(E){return l.writer.reset(),l.writer.buffer(t.indicator),l.writer.uint32(E.byteLength),l.writer.buffer(E),l.writer.dump()}}t.LengthFieldBasedFrameDecoder=l,l.writer=(0,n.BinaryWriter)({})},34982:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePortConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(l){super(),this.port=l,l.start()}send(l){this.port.postMessage(l)}onMessage(l){const m=E=>{l(E.data)};return this.port.addEventListener("message",m),{dispose:()=>{this.port.removeEventListener("message",m)}}}onceClose(l){return this.port.addEventListener("close",l),{dispose:()=>{this.port.addEventListener("close",l)}}}dispose(){}}t.MessagePortConnection=r},71056:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeMessagePortConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(l){super(),this.port=l}send(l){this.port.postMessage(l)}onMessage(l){return this.port.on("message",l),{dispose:()=>{this.port.off("message",l)}}}onceClose(l){return this.port.once("close",l),{dispose:()=>{this.port.off("close",l)}}}dispose(){this.port.removeAllListeners()}}t.NodeMessagePortConnection=r},91493:(L,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 l extends o.BaseConnection{constructor(E){super(),this.socket=E}send(E){this.socket.send(E)}isOpen(){return this.socket.readyState===this.socket.OPEN}onOpen(E){return this.socket.addEventListener("open",E),{dispose:()=>{this.socket.removeEventListener("open",E)}}}onMessage(E){const p=_=>{var s,g;let c;if(_.data instanceof Blob)c=_.data.arrayBuffer();else if(_.data instanceof ArrayBuffer)c=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")c=Promise.resolve(_.data);else throw new Error("unknown message type, expect Blob or ArrayBuffer, received: "+typeof _.data);c.then(h=>E(new Uint8Array(h,0,h.byteLength)))};return this.socket.addEventListener("message",p),{dispose:()=>{this.socket.removeEventListener("message",p)}}}onceClose(E){const p=this.onClose(_);return{dispose:()=>{p.dispose()}};function _(s,g){E(s,g),p.dispose()}}onClose(E){const p=_=>{E(_.code,_.reason)};return this.socket.addEventListener("close",p),{dispose:()=>{this.socket.removeEventListener("close",p)}}}onError(E){const p=_=>{E(_.error)};return this.socket.addEventListener("error",p),{dispose:()=>{this.socket.removeEventListener("error",p)}}}dispose(){}static forURL(E,p,_){const s=new r.default(E,p,_);return s.binaryType="arraybuffer",new l(s)}}t.ReconnectingWebSocketConnection=l},57625:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetSocketConnection=void 0;const n=e(36932);class r extends n.StreamConnection{constructor(l){super(l,l),this.socket=l}isOpen(){return this.socket.readyState==="open"}onOpen(l){return this.socket.on("connect",l),{dispose:()=>{this.socket.off("connect",l)}}}destroy(){this.socket.destroy()}}t.NetSocketConnection=r},36932:(L,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(m,E){super(),this.readable=m,this.writable=E,this.decoder=new r.LengthFieldBasedFrameDecoder;const p=_=>{this.decoder.push(_)};this.readable.on("data",p),this.readable.once("close",()=>{this.decoder.dispose(),this.readable.off("data",p)})}send(m){const E=r.LengthFieldBasedFrameDecoder.construct(m);this.writable.write(E,()=>{})}onMessage(m){return this.decoder.onData(m)}onceClose(m){const E=this.onClose(p);return{dispose:()=>{E.dispose()}};function p(_,s){m(_,s),E.dispose()}}onClose(m){const E=p=>{m(p?1:0,p?"had error":"")};return this.readable.on("close",E),this.writable!==this.readable&&this.writable.on("close",E),{dispose:()=>{this.readable.off("close",E),this.writable!==this.readable&&this.writable.off("close",E)}}}onError(m){return this.readable.on("error",m),this.writable!==this.readable&&this.writable.on("error",m),{dispose:()=>{this.readable.off("error",m),this.writable!==this.readable&&this.writable.off("error",m)}}}dispose(){this.decoder.dispose()}}t.StreamConnection=o},15272:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSWebSocketConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(l){super(),this.socket=l}send(l){this.socket.send(l)}onMessage(l){return this.socket.on("message",l),{dispose:()=>{this.socket.off("message",l)}}}onceClose(l){return this.socket.once("close",l),{dispose:()=>{this.socket.off("close",l)}}}isOpen(){return this.socket.readyState===this.socket.OPEN}dispose(){this.socket.removeAllListeners()}}t.WSWebSocketConnection=r},90750:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(34982),t)},91676:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.METHOD_NOT_REGISTERED=void 0,t.METHOD_NOT_REGISTERED="$$METHOD_NOT_REGISTERED"},89104:(L,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(E){E[E.String=0]="String",E[E.Buffer=1]="Buffer",E[E.Number=2]="Number",E[E.JSONObject=3]="JSONObject",E[E.BigInt=4]="BigInt",E[E.Array=5]="Array",E[E.Object=6]="Object",E[E.Undefined=7]="Undefined",E[E.Null=8]="Null",E[E.Boolean=9]="Boolean"})(r||(t.ProtocolType=r={}));class o{constructor(p,_,s){this.writer=p,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(p){var _;const{writer:s}=this,g=typeof p;switch(s.reserve(1),p){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(p);break;case"boolean":s.reserve(1),s.uint8(r.Boolean),s.uint8(p?1:0);break;case"number":s.reserve(8),s.uint8(r.Number),s.double(p);break;case"bigint":s.reserve(8),s.uint8(r.BigInt),s.int64(p);break;case"object":if(Array.isArray(p)){s.reserve(4),s.uint8(r.Array),s.varUInt32(p.length);for(const c of p)this.write(c)}else(0,n.isUint8Array)(p)?(s.reserve(4),s.uint8(r.Buffer),s.varUInt32(p.byteLength),s.buffer(p)):(s.uint8(r.JSONObject),s.stringOfVarUInt32(JSON.stringify(p,(_=this.objectTransfer)===null||_===void 0?void 0:_.replacer)));break;default:throw new Error(`Unknown type ${g}`)}}}read(){var p;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,(p=this.objectTransfer)===null||p===void 0?void 0:p.reviver)}case r.BigInt:return _.int64();case r.Array:{const g=_.varUInt32(),c=[];for(let h=0;h<g;h++)c.push(this.read());return c}case r.Boolean:return _.uint8()===1;default:throw new Error(`Unknown type ${s}`)}}}t.AnySerializer=o;var l;(function(E){E.CODE_URI="CodeURI",E.BUFFER="Buffer"})(l||(l={}));class m{static replacer(p,_){if(_){switch(_.$mid){case 1:{const s=n.Uri.revive(_);return{$type:l.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(p,_){if(_&&_.$type!==void 0&&_.data!==void 0)switch(_.$type){case l.CODE_URI:return n.Uri.parse(_.data);case l.BUFFER:return Uint8Array.from(_.data)}return _}}t.ExtObjectTransfer=m},94846:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oneOf=void 0;const n=e(26246),r=e(4405),o=8,l=(m,E)=>{E||(E=(0,r.furyFactory)());const{fury:p,reader:_,writer:s}=E,g=new Array(o),c=new Array(o),h={};return m.forEach((v,f)=>{const a=v.options.tag;g[f]=(0,n.generateSerializer)(p,v),c[f]=a,h[a]=f}),{deserialize:v=>{_.reset(v);const f=_.uint8();let a;switch(f){case 0:a=g[0].read();break;case 1:a=g[1].read();break;case 2:a=g[2].read();break;case 3:a=g[3].read();break;case 4:a=g[4].read();break;case 5:a=g[5].read();break;case 6:a=g[6].read();break;case 7:a=g[7].read();break}return a.kind=c[f],a},serialize:v=>{const f=h[v.kind];switch(s.reset(),s.uint8(f),f){case 0:g[0].write(v);break;case 1:g[1].write(v);break;case 2:g[2].write(v);break;case 3:g[3].write(v);break;case 4:g[4].write(v);break;case 5:g[5].write(v);break;case 6:g[6].write(v);break;case 7:g[7].write(v);break}return s.dump()}}};t.oneOf=l},4405:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.furyFactory=void 0;const r=e(85608).__importDefault(e(97419)),o=l=>{const m=new r.default(l),E=m.binaryReader,p=m.binaryWriter;return{fury:m,reader:E,writer:p}};t.furyFactory=o},25285:(L,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:(L,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:(L,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:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceCenter=void 0,t.getNotificationName=s,t.getRequestName=g,t.getMethodName=c;const n=e(43718),r=e(96068),o=e(91676),l=e(8140),m=e(66748),E=e(92408),p=200;class _{constructor(u,d){this.bench=u,this._disposables=new n.DisposableStore,this.proxies=[],this.serviceRegistry=this._disposables.add(new E.ServiceRegistry),this.protocolRegistry=this._disposables.add(new E.ProtocolRegistry),this.deferred=new n.Deferred,this._reportThreshold=p,this.uid=(0,n.randomString)(6),this.logger=d||console}setReporter(u,d=p){this._reporterService=u,this._reportThreshold=d}registerService(u,d){d===l.ServiceType.Service&&this.bench&&this.bench.registerService(u)}ready(){return this.deferred.promise}loadProtocol(u){this.protocolRegistry.addProtocol(u,{nameConverter:d=>c(u.name,d)})}setSumiConnection(u){this.proxies.length===0&&this.deferred.resolve(),this.protocolRegistry.applyTo(u.io);const d=new m.ProxySumi(this.serviceRegistry,this.logger);d.listen(u);const v=(0,r.addElement)(this.proxies,d);return{dispose:()=>{v.dispose(),d.dispose()}}}setConnection(u){this.proxies.length===0&&this.deferred.resolve();const d=new m.ProxyJson(this.serviceRegistry,this.logger);d.listen(u);const v=(0,r.addElement)(this.proxies,d);return{dispose:()=>{v.dispose(),d.dispose()}}}onRequest(u,d,v){this.serviceRegistry.register(c(u,d),v)}onRequestService(u,d){this.serviceRegistry.registerService(d,{nameConverter:v=>c(u,v)})}async broadcast(u,d,...v){await this.ready();const f=c(u,d);let a;this._reporterService&&(a=this._reporterService.time(n.REPORT_NAME.RPC_TIMMING_MEASURE));const b=await Promise.all(this.proxies.map(A=>A.invoke(f,...v))),y=[],S=[];for(const A of b)A===o.METHOD_NOT_REGISTERED?y.push(A):S.push(A);if(y.length>0&&this.logger.warn(`broadcast rpc \`${f}\` getting doubtful responses: ${y.join(",")}`),S.length===0)throw a&&a.timeEnd(f,{success:!1},{minimumReportThresholdTime:this._reportThreshold}),new Error(`broadcast rpc \`${f}\` error: no remote service can handle this call`);return a&&a.timeEnd(f,{success:!0},{minimumReportThresholdTime:this._reportThreshold}),S.length===1?S[0]:S}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 c(h,u){return u.startsWith("on")?s(h,u):g(h,u)}},62199:(L,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:(L,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 l{constructor(E,p){this.registry=E,this.connectionPromise=new n.Deferred,this._disposables=new n.DisposableStore,this.logger=p||console,this.registry.onServicesUpdate(_=>{this.connection&&this.bindMethods(_)})}nextRequestId(){return String(o++)}listen(E){this.connection=E,this._disposables.add(this.connection),this.bindMethods(this.registry.methods()),E.listen(),this.connectionPromise.resolve()}listenService(E){this.registry.registerService(E)}dispose(){this._disposables.dispose()}getInvokeProxy(){return new Proxy(Object.create(null),{get:(E,p)=>typeof p!="string"?null:r.has(p)?Promise.resolve():(E[p]||(E[p]=(..._)=>this.invoke(p,..._)),E[p])})}}t.ProxyBase=l},66748:(L,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:(L,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 l extends o.ProxyBase{constructor(){super(...arguments),this.engine="json",this.capturer=this._disposables.add(new n.Capturer(this.engine))}bindMethods(E){for(const p of E)p.startsWith("on")?this.connection.onNotification(p,async(..._)=>{this.capturer.captureOnNotification("_",p,_);try{await this.registry.invoke(p,...this.serializeArguments(_))}catch(s){this.logger.warn(`notification exec ${p} error`,s)}}):this.connection.onRequest(p,async(..._)=>{const s=this.nextRequestId();this.capturer.captureOnRequest(s,p,_);try{const g=await this.registry.invoke(p,...this.serializeArguments(_));return this.capturer.captureOnRequestResult(s,p,g),{error:!1,data:g}}catch(g){return this.capturer.captureOnRequestFail(s,p,g),{error:!0,data:{message:g.message,stack:g.stack}}}})}async invoke(E,...p){await this.connectionPromise.promise;let _=!1;if(p.length===1&&Array.isArray(p[0])&&(_=!0),E.startsWith("on"))this.capturer.captureSendNotification("_",E,p),_?this.connection.sendNotification(E,[...p]):this.connection.sendNotification(E,...p);else{const s=this.nextRequestId();let g;_?g=this.connection.sendRequest(E,[...p]):g=this.connection.sendRequest(E,...p),this.capturer.captureSendRequest(s,E,p);const c=await g;if(c.error){const h=new Error(c.data.message);throw c.data.stack&&(h.stack=c.data.stack),this.capturer.captureSendRequestFail(s,E,c.data),h}else return this.capturer.captureSendRequestResult(s,E,c.data),c.data}}serializeArguments(E){const p=E[E.length-1];return E.length===2&&Array.isArray(E[0])&&Object.prototype.hasOwnProperty.call(p,"_isCancelled")?[...E[0],p]:E}listen(E){super.listen(E),this._disposables.add(E.onRequest(p=>{if(!this.registry.has(p)){const _=this.nextRequestId();this.capturer.captureOnRequest(_,p,[]);const s={data:r.METHOD_NOT_REGISTERED};return this.capturer.captureOnRequestFail(_,p,s.data),s}}))}}t.ProxyJson=l},16420:(L,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(m){for(const E of m)E.startsWith("on")?this.connection.onNotification(E,async(...p)=>{try{await this.registry.invoke(E,...p)}catch(_){this.logger.warn(`notification exec ${E} error`,_)}}):this.connection.onRequest(E,async(...p)=>await this.registry.invoke(E,...p))}async invoke(m,...E){if(await this.connectionPromise.promise,m.startsWith("on"))this.connection.sendNotification(m,...E);else return await this.connection.sendRequest(m,...E)}listen(m){super.listen(m),this._disposables.add(m.onRequestNotFound(()=>{throw n.METHOD_NOT_REGISTERED}))}}t.ProxySumi=o},92408:(L,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(E){const p=new Set;let _=E;do{const g=Object.getOwnPropertyNames(_);for(const c of g)r.has(c)||typeof E[c]=="function"&&p.add(c)}while(_=Object.getPrototypeOf(_));const s=Array.from(p);return s.sort(),s}class l{constructor(){this._disposables=new n.DisposableStore,this.emitter=this._disposables.add(new n.Emitter),this.onServicesUpdate=this.emitter.event,this.serviceMethodMap=new Map}register(p,_){this.serviceMethodMap.set(p,_),this.emitter.fire([p])}registerService(p,_){const s=[],{nameConverter:g}=_||{},c=o(p);for(const h of c){let u=h;g&&(u=g(h)),this.serviceMethodMap.set(u,p[h].bind(p)),s.push(u)}this.emitter.fire(s)}has(p){return this.serviceMethodMap.has(p)}invoke(p,..._){return this.serviceMethodMap.get(p)(..._)}methods(){return Array.from(this.serviceMethodMap.keys())}dispose(){this._disposables.dispose()}}t.ServiceRegistry=l;class m{constructor(){this._disposables=new n.DisposableStore,this.emitter=this._disposables.add(new n.Emitter),this.onProtocolUpdate=this.emitter.event,this.protocolMap=new Map}addProtocol(p,_){const s=[],{nameConverter:g}=_||{},{methods:c}=p;for(const h of c){let u=h.method;g&&(u=g(u)),this.protocolMap.set(u,{...h,method:u}),s.push(u)}this.emitter.fire(s)}applyTo(p){if(p.loadProtocolMethod){for(const _ of this.protocolMap.values())p.loadProtocolMethod(_);this._disposables.add(this.onProtocolUpdate(_=>{if(p.loadProtocolMethod)for(const s of _){const g=this.protocolMap.get(s);g&&p.loadProtocolMethod(g)}}))}}dispose(){this._disposables.dispose()}}t.ProtocolRegistry=m},68855:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceStub=void 0;class e{constructor(r,o,l){this.serviceName=r,this.center=o,this.type=l,this.getProxy=()=>new Proxy(this,{get:(m,E)=>typeof E=="symbol"?Promise.resolve():(m[E]||(m[E]=(...p)=>this.broadcast(E,...p)),m[E])}),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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiConnection=void 0;const n=e(43718),r=e(70392),o=e(93062),l=e(30613),m=e(90750),E=e(91676),p=e(48218),_=e(76339),s={},g={chunked:!0};class c{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 l.Capturer(d.name||"sumi"),this.disposable.add(this.capturer)}sendNotification(u,...d){const v=this._requestId++;this.capturer.captureSendNotification(v,u,d),this.socket.send(this.io.Notification(v,u,s,d))}sendRequest(u,...d){return new Promise((v,f)=>{const a=this._requestId++;if(this._callbacks.set(a,(y,S,A)=>{if(S){if(this.traceRequestError(a,u,d,S),S===E.METHOD_NOT_REGISTERED){v(S);return}f(S);return}this.capturer.captureSendRequestResult(a,u,A),v(A)}),this.options.timeout&&this.options.timeout!==-1){const y=setTimeout(()=>{this._handleTimeout(u,a)},this.options.timeout);this._reqTimeoutHandles.set(a,y)}const b=d.length&&r.CancellationToken.isCancellationToken(d[d.length-1])?d.pop():void 0;if(b&&b.isCancellationRequested)return Promise.reject((0,r.canceled)());b&&b.onCancellationRequested(()=>this.cancelRequest(a)),this.capturer.captureSendRequest(a,u,d),this.socket.send(this.io.Request(a,u,{cancelable:!!b||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 v=this._callbacks.get(d);this._callbacks.delete(d),this._reqTimeoutHandles.delete(d),v(s,new p.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),v=d.kind,f=d.requestId;switch(v===_.OperationType.Error&&this.logger.warn(`[${d.requestId}] Error received from server method ${d.method}: ${d.error}`),v){case _.OperationType.Error:case _.OperationType.Response:{const{headers:a,method:b}=d,y=d.error,S=d.result;this._reqTimeoutHandles.has(f)&&(clearTimeout(this._reqTimeoutHandles.get(f)),this._reqTimeoutHandles.delete(f));const A=(T,w,D)=>{const I=this._callbacks.get(f);if(!I){this.logger.error(`Cannot find callback for request ${f}: ${b}`);return}this._callbacks.delete(f),I(T,w,D)};if(a&&a.chunked){let T;if(this.activeRequestPool.has(f)?T=this.activeRequestPool.get(f):(T=new o.SumiReadableStream,this.activeRequestPool.set(f,T),A(a,void 0,T)),S===null){T.end(),this.activeRequestPool.delete(f);break}if(y){T.emitError(y);break}T.emitData(S);break}A(a,y,S);break}case _.OperationType.Notification:case _.OperationType.Request:{const{method:a,headers:b,args:y}=d;if(b.cancelable){const S=new r.CancellationTokenSource;this._cancellationTokenSources.set(f,S),y.push(S.token),this._knownCanceledRequests.has(f)&&(S.cancel(),this._knownCanceledRequests.delete(f))}switch(v){case _.OperationType.Request:{this.capturer.captureOnRequest(f,a,y);let S;try{let w;const D=this._requestHandlers.get(a);D?w=D(...y):this._starRequestHandler&&(w=this._starRequestHandler(a,y)),S=Promise.resolve(w)}catch(w){S=Promise.reject(w)}const A=w=>{this.capturer.captureOnRequestResult(f,a,w),(0,o.isReadableStream)(w)?(0,o.listenReadable)(w,{onData:D=>{this.socket.send(this.io.Response(f,a,g,D))},onEnd:()=>{this.socket.send(this.io.Response(f,a,g,null)),this._cancellationTokenSources.delete(f)},onError:D=>{this.socket.send(this.io.Error(f,a,g,D)),this._cancellationTokenSources.delete(f)}}):(this.socket.send(this.io.Response(f,a,s,w)),this._cancellationTokenSources.delete(f))},T=w=>{this.traceRequestError(f,a,y,w),this.socket.send(this.io.Error(f,a,s,w)),this._cancellationTokenSources.delete(f)};S.then(A).catch(T);break}case _.OperationType.Notification:{this.capturer.captureOnNotification(f,a,y);const S=this._notificationHandlers.get(a);S?S(...y):this._starNotificationHandler&&this._starNotificationHandler(a,y);break}}break}case _.OperationType.Cancel:{const a=this._cancellationTokenSources.get(f);a?a.cancel():this._knownCanceledRequests.add(f);break}default:break}}))}dispose(){this.disposable.dispose()}static forWSWebSocket(u,d={}){return new c(new m.WSWebSocketConnection(u),d)}static forNetSocket(u,d={}){return new c(new m.NetSocketConnection(u),d)}traceRequestError(u,d,v,f){this.capturer.captureSendRequestFail(u,d,f)}toJSON(){throw new Error(`You're trying to serialize a SumiConnection instance, which is not allowed.
|
|
28323
28323
|
Please check your code, and remove the rpc proxy reference.`)}}t.SumiConnection=c},48218:(L,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:(L,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),l=e(89104),m=e(4405),E=1;var p;(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"})(p||(t.OperationType=p={})),t.HeadersProto={Request:n.Type.object("req-headers",{cancelable:n.Type.bool()}),Response:n.Type.object("resp-headers",{chunked:n.Type.bool()})};const _={Request:p.Request<<8|E,Notification:p.Notification<<8|E,Response:p.Response<<8|E,Cancel:p.Cancel<<8|E,Error:p.Error<<8|E};class s{constructor(v,f){this.fury=f;const a=[];for(const S of v.request)a.push(S.type);const b=n.Type.tuple(a);let y=n.Type.any();v.response&&v.response.type&&(y=v.response.type),this.request=this.fury.registerSerializer(b),this.result=this.fury.registerSerializer(y)}writeRequest(v){return this.request.serializer.write(v)}readRequest(){return this.request.serializer.read()}writeResponse(v){return this.result.serializer.write(v)}readResponse(){return this.result.serializer.read()}}class g{constructor(v,f,a){this.writer=v,this.reader=f,this.anySerializer=new l.AnySerializer(this.writer,this.reader,a)}writeRequest(v){this.anySerializer.write(v)}readRequest(){return this.anySerializer.read()}writeResponse(v){this.anySerializer.write(v)}readResponse(){return this.anySerializer.read()}}t.AnyProtocolSerializer=g;class c{}t.IMessageIO=c;class h extends c{constructor(){super(),this.serializerMap=new Map;const v=(0,m.furyFactory)();this.fury=v.fury,this.reader=v.reader,this.writer=v.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(v){this.anySerializer=v}has(v){return this.serializerMap.has(v)}loadProtocol(v,f){const{methods:a}=v;for(const b of a)this.loadProtocolMethod(b,f)}loadProtocolMethod(v,f){let a=v.method;f?.nameConverter&&(a=f.nameConverter(a)),this.serializerMap.set(a,new s(v,this.fury))}getProcessor(v){const f=this.serializerMap.get(v);return f||this.anySerializer}Notification(v,f,a,b){const{writer:y}=this;return y.reset(),y.uint16(_.Notification),y.uint32(v),y.stringOfVarUInt32(f),this.requestHeadersSerializer.write(a),this.getProcessor(f).writeRequest(b),y.dump()}Request(v,f,a,b){const{writer:y}=this;return y.reset(),y.uint16(_.Request),y.uint32(v),y.stringOfVarUInt32(f),this.requestHeadersSerializer.write(a),this.getProcessor(f).writeRequest(b),y.dump()}Cancel(v){const{writer:f}=this;return f.reset(),f.uint16(_.Cancel),f.uint32(v),f.dump()}Response(v,f,a,b){const{writer:y}=this;return y.reset(),y.uint16(_.Response),y.uint32(v),y.stringOfVarUInt32(f),this.responseHeadersSerializer.write(a),this.getProcessor(f).writeResponse(b),y.dump()}Error(v,f,a,b){const{writer:y}=this;return y.reset(),y.uint16(_.Error),y.uint32(v),y.stringOfVarUInt32(f),this.responseHeadersSerializer.write(a),y.stringOfVarUInt32((0,o.stringifyError)(b)),y.dump()}parse(v){const{reader:f}=this;f.reset(v),f.skip(1);const a=f.uint8(),b=f.uint32();switch(a){case p.Request:case p.Notification:{const y=f.stringOfVarUInt32(),S=this.requestHeadersSerializer.read(),A=this.getProcessor(y).readRequest();return{kind:a,requestId:b,method:y,headers:S,args:A}}case p.Error:{const y=f.stringOfVarUInt32(),S=this.responseHeadersSerializer.read(),A=(0,o.parseError)(f.stringOfVarUInt32());return{kind:p.Error,requestId:b,method:y,headers:S,error:A}}case p.Response:{const y=f.stringOfVarUInt32(),S=this.responseHeadersSerializer.read(),A=this.getProcessor(y).readResponse();return{kind:p.Response,requestId:b,method:y,headers:S,result:A}}case p.Cancel:return{kind:p.Cancel,requestId:b};default:throw new Error(`Unknown message type: ${a}`)}}}t.MessageIO=h;class u{Request(v,f,a,b){return{kind:p.Request,requestId:v,method:f,headers:a,args:b}}Notification(v,f,a,b){return{kind:p.Notification,requestId:v,method:f,headers:a,args:b}}Cancel(v){return{kind:p.Cancel,requestId:v}}Response(v,f,a,b){return{kind:p.Response,requestId:v,headers:a,method:f,result:b}}Error(v,f,a,b){return{kind:p.Error,requestId:v,method:f,headers:a,error:b}}parse(v){return v}}t.RawMessageIO=u},86058:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiConnectionMultiplexer=t.IRPCProtocol=t.ProxyIdentifier=void 0,t.createExtMessageIO=m;const n=e(89104),r=e(97349),o=e(76339);class l{constructor(_){this.serviceId=_,this.countId=++l.count}static for(_){return new l(_)}}t.ProxyIdentifier=l,l.count=0,t.IRPCProtocol=Symbol("IRPCProtocol");function m(p){const _=new o.MessageIO;return _.setAnySerializer(new o.AnyProtocolSerializer(_.writer,_.reader,n.ExtObjectTransfer)),p?.forEach((s,g)=>{_.loadProtocol(s,{nameConverter:c=>E.getRPCName(g.serviceId,c)})}),_}class E extends r.SumiConnection{static getRPCName(_,s){return`${_}${E.SEP}${s}`}static extractServiceAndMethod(_){const s=_.indexOf(E.SEP);return[_.substring(0,s),_.substring(s+E.SEP_LENGTH)]}static normalizeServiceId(_){return _.replace(/\//g,"_")}constructor(_,s={}){super(_,{...s,io:s.io||m()}),this.socket=_,this.options=s,this._locals=new Map,this._proxies=new Map,this.onRequestNotFound((g,c)=>this.invoke(g,c)),this.listen()}set(_,s){const g=E.normalizeServiceId(_.serviceId);return this._locals.set(g,s),s}get(_){return this._locals.get(E.normalizeServiceId(_.serviceId))}getProxy(_){const s=E.normalizeServiceId(_.serviceId);return this._proxies.has(s)||this._proxies.set(s,this._createProxy(s)),this._proxies.get(s)}_createProxy(_){const s={get:(g,c)=>{if(typeof c=="symbol")return null;if(!g[c])if(c.charCodeAt(0)===36){const h=E.getRPCName(_,c);g[c]=(...u)=>this.sendRequest(h,...u)}else c==="toJSON"&&(g[c]=()=>{throw new Error("Cannot serialize a rpc protocol proxy object")});return g[c]}};return new Proxy(Object.create(null),s)}async invoke(_,s){const[g,c]=E.extractServiceAndMethod(_),h=this._locals.get(g);if(!h)throw new Error("Unknown actor "+g);const u=await h[c];if(typeof u!="function")throw new Error("Unknown method "+c+" on actor "+g);return u.apply(h,s)}getSocket(){return this.socket}}t.SumiConnectionMultiplexer=E,E.SEP="/",E.SEP_LENGTH=E.SEP.length},15726:(L,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=l,t.createMainContextProxyIdentifier=m;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 l(g){return new r.ProxyIdentifier(g)}function m(g){return new r.ProxyIdentifier(g)}var E;(function(g){function c(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=c;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})(E||(t.ObjectTransfer=E={}));class p{static cancel(c,h){return`{"type":4,"id":"${c}"}`}static serializeRequest(c,h,u,d){return d=d.map(v=>{if(v instanceof Error){const f=Array.prototype.slice.call(arguments);return f[0]=v.stack,f.join(`
|
|
28324
28324
|
`)}return v}),`{"type": 1, "id": "${c}", "proxyId": "${h}", "method": "${u}", "args": ${JSON.stringify(d,E.replacer)}}`}static serializeReplyOK(c,h,u){if(typeof h>"u")return`{"type": 2, "id": "${c}"}`;try{return`{"type": 2, "id": "${c}", "res": ${JSON.stringify(h,E.replacer)}}`}catch{return u&&u.warn("res",h),`{"type": 2, "id": "${c}", "res": {}}`}}static serializeReplyError(c,h,u){try{return`{"type": 3, "id": "${c}", "res": ${JSON.stringify((0,n.transformErrorForSerialization)(h),E.replacer)}}`}catch{return u&&u.error("error",h),`{"type": 3, "id": "${c}", "res": {}}`}}}t.MessageIO=p;function _(){const g=new Error("Canceled");return g.name=g.message,g}class s{constructor(c,h){this._protocol=c,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(c,h){return this._locals.set(c.serviceId,h),h}get(c){return this._locals.get(c.serviceId)}getProxy(c){return this._proxies.has(c.serviceId)||this._proxies.set(c.serviceId,this._createProxy(c.serviceId)),this._proxies.get(c.serviceId)}_createProxy(c){const h={get:(u,d)=>typeof d=="symbol"?null:(!u[d]&&d.charCodeAt(0)===36&&(u[d]=(...v)=>this._remoteCall(c,d,v)),u[d])};return new Proxy(Object.create(null),h)}_remoteCall(c,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 v=String(++this._lastMessageId),f=new n.Deferred;d&&(u.push("add.cancellation.token"),d.onCancellationRequested(()=>this._protocol.send(p.cancel(v)))),this._pendingRPCReplies.set(v,f);const a=p.serializeRequest(v,c,h,u);if(this._protocol.send(a),this._protocol.timeout&&this._protocol.timeout!==-1){const b=setTimeout(()=>{this._handleTimeout(v)},this._protocol.timeout);this._timeoutHandles.set(v,b)}return f.promise}_receiveOneMessage(c){const h=JSON.parse(c,E.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(c){const h=this._cancellationTokenSources.get(c.id);h&&h.cancel()}_receiveError(c){const h=c.id;if(!this._pendingRPCReplies.has(h))return;const u=this._pendingRPCReplies.get(h);this._pendingRPCReplies.delete(h);let d;c.res&&(c.res.$isError?(d=new Error,d.name=c.res.name,d.message=c.res.message,d.stack=c.res.stack):d=c.res),u.reject(d)}_receiveRequest(c){const h=c.id,u=c.proxyId,d=c.method,v=c.args.map(b=>b===null?void 0:b);if(v.length&&v[v.length-1]==="add.cancellation.token"?v.pop():!1){const b=new n.CancellationTokenSource;this._cancellationTokenSources.set(h,b),v.push(b.token)}this._invokeHandler(u,d,v).then(b=>{this._protocol.send(p.serializeReplyOK(h,b)),this._cancellationTokenSources.delete(h)}).catch(b=>{this._protocol.send(p.serializeReplyError(h,b)),this._cancellationTokenSources.delete(h)})}_invokeHandler(c,h,u){try{return this._doInvokeHandler(c,h,u)}catch(d){return Promise.reject(d)}}async _doInvokeHandler(c,h,u){const d=this._locals.get(c);if(!d)throw new Error("Unknown actor "+c);const v=await d[h];if(typeof v!="function")throw new Error("Unknown method "+h+" on actor "+c);return v.apply(d,u)}_receiveReply(c){const h=c.id;if(!this._pendingRPCReplies.has(h))return;const u=this._pendingRPCReplies.get(h);this._pendingRPCReplies.delete(h),u.resolve(c.res)}_handleTimeout(c){if(!this._pendingRPCReplies.has(c)||!this._timeoutHandles.has(c))return;const h=this._pendingRPCReplies.get(c);this._pendingRPCReplies.delete(c),this._timeoutHandles.delete(c),h.reject(new Error("RPC Timeout: "+c))}}t.RPCProtocol=s},64592:(L,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 l=(0,r.oneOf)([t.PingProtocol,t.PongProtocol,t.OpenProtocol,t.ServerReadyProtocol,t.DataProtocol,t.BinaryProtocol,t.CloseProtocol,t.ErrorProtocol]);t.furySerializer=l},54558:(L,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,l)=>({onceClose(m){return o.onceClose(m)},onMessage(m){return o.onMessage(E=>{m(l.deserialize(E))})},send(m){o.send(l.serialize(m))}});t.wrapSerializer=r},43620:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rawSerializer=void 0,t.rawSerializer={serialize:e=>e,deserialize:e=>e}},41619:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},76271:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceChannelPath=t.BaseCommonChannelHandler=t.CommonChannelPathHandler=void 0,t.injectConnectionProviders=p;const n=e(39048),r=e(54558),o=e(47561);class l{constructor(){this.handlerMap=new Map,this.paramsKey=new Map}register(s,g){const c=s.indexOf("/:"),h=c>=0;let u=s;h&&(u=s.slice(0,c),this.paramsKey.set(u,s.slice(c+2))),this.handlerMap.has(u)||this.handlerMap.set(u,[]);const d=this.handlerMap.get(u),v=g.handler.bind(g),f=(a,b,y)=>{g.connection=a,v(a,b,y)};g.handler=f,d.push(g),this.handlerMap.set(u,d)}getParams(s,g){const c={};if(this.paramsKey.has(s)){const h=this.paramsKey.get(s);h&&(c[h]=g)}return c}removeHandler(s,g){const c=s.indexOf(":"),h=c>=0;let u=s;h&&(u=s.slice(0,c));const d=this.handlerMap.get(u)||[],v=d.indexOf(g);v!==-1&&d.splice(v,1),this.handlerMap.set(s,d)}get(s){return this.handlerMap.get(s)}disposeConnectionClientId(s,g){this.handlerMap.forEach(c=>{c.forEach(h=>{h.dispose(s,g)})})}openChannel(s,g,c){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,v=h.length;d<v;d++)h[d].handler(g,c,u)}getAll(){return Array.from(this.handlerMap.values())}}t.CommonChannelPathHandler=l;var m;(function(_){_[_.ConnectionClosed=1]="ConnectionClosed",_[_.NewChannelOpened=2]="NewChannelOpened"})(m||(m={}));class E{constructor(s,g,c=console,h={}){this.handlerId=s,this.commonChannelPathHandler=g,this.logger=c,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 c=(0,r.wrapSerializer)(s,this.serializer);c.onMessage(h=>{try{switch(h.kind){case"open":{const{id:u,path:d,traceId:v}=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(m.NewChannelOpened,"new channel opened for the same channel id"),f.dispose()),f=new o.WSServerChannel(c,{id:u,clientId:g,logger:this.logger}),this.channelMap.set(u,f),this.commonChannelPathHandler.openChannel(d,f,g),f.serverReady(v);break}default:{const{id:u}=h,d=this.channelMap.get(u);d?d.dispatch(h):(c.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(m.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=E,t.RPCServiceChannelPath="RPCService";function p(_){const s=new l;_.addProviders({token:l,useValue:s})}},8140:(L,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:(L,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),l=e(97349);var m;(function(s){s[s.ReSend=0]="ReSend",s[s.Sended=1]="Sended",s[s.Success=2]="Success",s[s.Failed=3]="Failed"})(m||(m={}));class E{constructor(){this.map=new Map,this.deliveryTimeout=500,this.timerMap=new Map}setDeliveryTimeout(g){this.deliveryTimeout=g}set(g,c){this.map.set(g,c)}get(g){return this.map.get(g)}success(g){this.map.set(g,m.Success);const c=this.timerMap.get(g);c&&clearTimeout(c)}dispose(){this.timerMap.forEach(g=>{clearTimeout(g)})}stop(g){const c=this.timerMap.get(g);c&&clearTimeout(c)}send(g,c){this.set(g,m.Sended),this.guard(g,c)}guard(g,c){const h=this.timerMap.get(g);h&&clearTimeout(h);const u=setTimeout(()=>{this.set(g,m.ReSend),c.whenRetry()},this.deliveryTimeout);this.timerMap.set(g,u)}}class p{constructor(g,c){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 E,this.LOG_TAG="[WSChannel]",this.logger=console;const{id:h,logger:u,ensureServerReady:d}=c;this.id=h,this.LOG_TAG=`[WSChannel id:${this.id}]`,u&&(this.logger=u),this._ensureServerReady=!!d,c.deliveryTimeout&&this.stateTracer.setDeliveryTimeout(c.deliveryTimeout),this._disposables.add(this.emitter.on("binary",v=>this.onBinaryQueue.push(v)))}inqueue(g){if(this._ensureServerReady&&!this._isServerReady){this.sendQueue||(this.sendQueue=[]),this.sendQueue.push(g);return}this.connection.send(g)}ensureMessageDeliveried(g,c=(0,r.randomString)(16)){const h=this.stateTracer.get(c);if(h&&h>=m.Sended){this.logger.error(`message already send already success or in progress, traceId: ${c}, state: ${h}`);return}g.traceId=c,this.connection.send(g),this.stateTracer.send(c,{whenRetry:()=>{if(this._isServerReady){this.stateTracer.stop(c);return}this.ensureMessageDeliveried(g,c)}})}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,c){this.channelPath=g,this.clientId=c,this.LOG_TAG=`[WSChannel id=${this.id} path=${g}]`;const h={kind:"open",id:this.id,path:g,clientId:c};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,c){this.pause(),this.emitter.emit("close",g,c)}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 l.SumiConnection(this.createConnection(),g)}dispose(){this.stateTracer.dispose(),this.sendQueue=[],this._disposables.dispose()}ping(){this.connection.send({kind:"ping",id:this.id})}}t.WSChannel=p;class _ extends p{constructor(g,c){super(g,c),this.connection=g,this.messageQueue=[],this.clientId=c.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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(25285),t)},70650:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AINativeConfigService=t.DEFAULT_CAPABILITIES=void 0;const n=e(85608),r=e(76003),o=e(1149),l=e(11050);t.DEFAULT_CAPABILITIES={supportsMarkers:!0,supportsChatAssistant:!0,supportsInlineChat:!0,supportsInlineCompletion:!0,supportsConflictResolve:!0,supportsRenameSuggestions:!0,supportsProblemFix:!0,supportsTerminalDetection:!0,supportsTerminalCommandSuggest:!0};const m={};Object.keys(t.DEFAULT_CAPABILITIES).forEach(p=>{m[p]=!1});let E=class{constructor(){this.aiModuleLoaded=!1,this.internalCapabilities=t.DEFAULT_CAPABILITIES}setDefaultCapabilities(_){for(const s in this.internalCapabilities)Object.prototype.hasOwnProperty.call(this.internalCapabilities,s)&&(this.internalCapabilities[s]=_)}enableCapabilities(){this.setDefaultCapabilities(!0)}disableCapabilities(){this.setDefaultCapabilities(!1)}get capabilities(){if(!this.aiModuleLoaded)return m;const{AINativeConfig:_}=this.appConfig;return _?.capabilities?{...this.internalCapabilities,..._.capabilities}:this.internalCapabilities}setAINativeModuleLoaded(_){this.aiModuleLoaded=_}};t.AINativeConfigService=E,n.__decorate([(0,r.Autowired)(l.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(o.LayoutViewSizeConfig),n.__metadata("design:type",o.LayoutViewSizeConfig)],E.prototype,"layoutViewSize",void 0),t.AINativeConfigService=E=n.__decorate([(0,r.Injectable)()],E)},41480:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIReporter=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(52664);let m=class{constructor(){this.reportInfoCache=new Map,this.reporterCancelHandler=new Map}getRelationId(){return(0,o.uuid)()}getCacheReportInfo(p){return this.reportInfoCache.get(p)}getCommonReportInfo(){return{}}start(p,_){const s=this.getRelationId();this.report(s,{..._,msgType:p,isStart:!0});const g=setTimeout(()=>{this.report(s,{..._,success:!1})},60*1e3);return this.reporterCancelHandler.set(s,g),s}end(p,_){const s=this.reporterCancelHandler.get(p);s&&clearTimeout(s),this.report(p,{success:!0,..._,isStart:!1})}record(p,_){_||(_=this.getRelationId());const s=this.reportInfoCache.get(_)||{},g={...this.getCommonReportInfo(),...s,...p,relationId:_};return this.reportInfoCache.set(_,g),g}report(p,_){const s=this.record(_,p);this.reporter.point(l.AI_REPORTER_NAME,_.msgType||s.msgType,s)}};t.AIReporter=m,n.__decorate([(0,r.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],m.prototype,"reporter",void 0),t.AIReporter=m=n.__decorate([(0,r.Injectable)()],m)},57925:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AI_MULTI_LINE_COMPLETION_ACCEPT=t.AI_MULTI_LINE_COMPLETION_DISCARD=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_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_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"},t.AI_MULTI_LINE_COMPLETION_DISCARD={id:"ai.multiLine.completion.discard"},t.AI_MULTI_LINE_COMPLETION_ACCEPT={id:"ai.multiLine.completion.accept"}},38070:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MergeConflictReportService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(70650);let m=class extends o.Disposable{constructor(){super(...arguments),this.reportInfoMap=new Map,this.unique2RelationMap=new Map}record(p,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return _;let s="";return this.unique2RelationMap.has(p)?(s=this.unique2RelationMap.get(p),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(p,s)),{..._,relationId:s}}report(p,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const s=this.record(p,_);this.aiReporter.end(s.relationId,s)}reportIncrementNum(p,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const s=this.unique2RelationMap.get(p);if(!s)return;const g=this.aiReporter.getCacheReportInfo(s)[_]||0;this.report(p,{[_]:g+1})}dispose(){super.dispose(),this.reportInfoMap.clear()}};t.MergeConflictReportService=m,n.__decorate([(0,r.Autowired)(l.AINativeConfigService),n.__metadata("design:type",l.AINativeConfigService)],m.prototype,"aiNativeConfigService",void 0),n.__decorate([(0,r.Autowired)(o.IAIReporter),n.__metadata("design:type",Object)],m.prototype,"aiReporter",void 0),t.MergeConflictReportService=m=n.__decorate([(0,r.Injectable)()],m)},95040:(L,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:(L,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 l extends o.BasicEvent{}t.ClientAppStateEvent=l;let m=class{constructor(){this._state="init",this.deferred={}}get state(){return this._state}set state(p){p!==this._state&&(this._state=p,this.deferred[p]===void 0&&(this.deferred[p]=new o.Deferred),this.deferred[p].resolve(),this.eventBus.fire(new l(p)))}reachedState(p){return this.deferred[p]===void 0&&(this.deferred[p]=new o.Deferred),this.deferred[p].promise}reachedAnyState(...p){return Promise.race(p.map(_=>this.reachedState(_)))}};t.ClientAppStateService=m,n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],m.prototype,"eventBus",void 0),t.ClientAppStateService=m=n.__decorate([(0,r.Injectable)()],m)},59555:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationService=void 0;const n=e(85608),r=e(76003),o=e(59019),l=e(43718),m=e(11050),E=e(42101);let p=class{constructor(){this._initialized=new l.Deferred}async initializeData(){this._backendOS=await this.commonServer.getBackendOS(),this._initialized.resolve()}get frontendOS(){return l.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?E.electronEnv.currentWindowId:this.injector.get(o.WSChannelHandler).clientId}};t.ApplicationService=p,n.__decorate([(0,r.Autowired)(l.CommonServerPath),n.__metadata("design:type",Object)],p.prototype,"commonServer",void 0),n.__decorate([(0,r.Autowired)(m.AppConfig),n.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],p.prototype,"injector",void 0),t.ApplicationService=p=n.__decorate([(0,r.Injectable)()],p)},16884:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseConnectionHelper=void 0;const n=e(85608),r=e(76003),o=e(18740),l=e(43718),m=e(32796),E=e(38578),p=(0,l.getDebugLogger)();let _=class{async createRPCServiceChannel(g){var c;const h=this.createConnection(),u=(c=this.appConfig.clientId)!==null&&c!==void 0?c:this.getDefaultClientId(),d=new o.WSChannelHandler(h,u,{logger:p});return(0,m.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)(E.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(l.IReporterService),n.__metadata("design:type",Object)],_.prototype,"reporterService",void 0),t.BaseConnectionHelper=_=n.__decorate([(0,r.Injectable)({multiple:!0})],_)},41320:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRuntime=void 0;const n=e(85608),r=e(76003),o=e(44142),l=e(6858),m=e(53206);let E=class extends l.RendererRuntime{constructor(){super(...arguments),this.runtimeName=o.ESupportRuntime.Web}registerRuntimeModuleProviders(_,s){s.webProviders&&_.addProviders(...s.webProviders)}registerRuntimeInnerProviders(_){(0,m.injectBrowserInnerProviders)(_)}};t.BrowserRuntime=E,t.BrowserRuntime=E=n.__decorate([(0,r.Injectable)()],E)},53206:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectBrowserInnerProviders=o;const n=e(93899),r=e(97222);function o(l){l.addProviders({token:n.ICtxMenuRenderer,useClass:r.BrowserCtxMenuRenderer})}},55267:(L,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.WebConnectionHelper=void 0;const r=e(85608),o=e(76003),l=e(91493),m=e(43718),E=e(22914);let p=n=class extends E.BaseConnectionHelper{constructor(s){super(),this.options=s,this.clientId=n.clientIdFactory()}getDefaultClientId(){return this.clientId}createConnection(){return l.ReconnectingWebSocketConnection.forURL(this.options.connectionPath,this.options.connectionProtocols)}static clientIdFactory(){return`CLIENT_ID_${(0,m.uuid)()}`}};t.WebConnectionHelper=p,t.WebConnectionHelper=p=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__metadata("design:paramtypes",[Object])],p)},44142:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElectronRendererRuntime=void 0;const n=e(85608),r=e(76003),o=e(38578),l=e(42101),m=e(44142),E=e(6858),p=e(38892);let _=class extends E.RendererRuntime{constructor(){super(...arguments),this.runtimeName=m.ESupportRuntime.Electron}registerRuntimeModuleProviders(c,h){h.electronProviders&&c.addProviders(...h.electronProviders)}registerRuntimeInnerProviders(c){(0,p.injectElectronInnerProviders)(c)}mergeAppConfig(c){return s(c)}async provideResourceUri(c){switch(c){case E.EKnownResources.OnigWasm:return l.electronEnv.onigWasmUri||this.appConfig.onigWasmUri||m.onigWasmCDNUri;case E.EKnownResources.TreeSitterWasmDirectory:return l.electronEnv.treeSitterWasmDirectoryUri||this.appConfig.treeSitterWasmDirectoryUri||(0,o.getTreeSitterWasmCDNUri)(this.appConfig.componentCDNType);default:throw new Error(`Unknown resource: ${c}`)}}};t.ElectronRendererRuntime=_,t.ElectronRendererRuntime=_=n.__decorate([(0,r.Injectable)()],_);function s(g){var c;const h=(c=l.electronEnv.metadata)!==null&&c!==void 0?c:{},u={...g,appRoot:g.appRoot||l.electronEnv.appPath,extensionDir:g.extensionDir||h.extensionDir};return h.extensionDevelopmentHost&&(g.extensionDevelopmentHost=h.extensionDevelopmentHost),h.extensionCandidate&&(g.extensionCandidate=(g.extensionCandidate||[]).concat(l.electronEnv.metadata.extensionCandidate||[])),u}},38892:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectElectronInnerProviders=p;const n=e(43718),r=e(37406),o=e(93899),l=e(27790),m=e(11050),E=e(42101);function p(_){const s=_.get(m.AppConfig);_.addProviders({token:n.IElectronMainMenuService,useValue:(0,E.createElectronMainApi)(n.IElectronMainMenuService,s.devtools)},{token:r.IElectronMainUIService,useValue:(0,E.createElectronMainApi)(r.IElectronMainUIService,s.devtools)},{token:r.IElectronMainLifeCycleService,useValue:(0,E.createElectronMainApi)(r.IElectronMainLifeCycleService,s.devtools)},{token:r.IElectronURLService,useValue:(0,E.createElectronMainApi)(r.IElectronURLService,s.devtools)},{token:l.IElectronMenuFactory,useClass:l.ElectronMenuFactory},{token:l.IElectronMenuBarService,useClass:l.ElectronMenuBarService},{token:o.ICtxMenuRenderer,useClass:l.ElectronCtxMenuRenderer})}},63977:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElectronConnectionHelper=void 0;const n=e(85608),r=e(76003),o=e(42101),l=e(22914);let m=class extends l.BaseConnectionHelper{getDefaultClientId(){return o.electronEnv.metadata.windowClientId}createConnection(){return(0,o.createNetSocketConnection)()}};t.ElectronConnectionHelper=m,t.ElectronConnectionHelper=m=n.__decorate([(0,r.Injectable)({multiple:!0})],m)},18379:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionHelperFactory=E;const n=e(85608),r=e(38578),o=e(55267),l=e(44142),m=e(63977);n.__exportStar(e(55267),t),n.__exportStar(e(63977),t),n.__exportStar(e(22914),t),n.__exportStar(e(44142),t);function E(p){return _=>{const s=p.get(r.AppConfig);let g;switch(_){case l.ESupportRuntime.Electron:g=p.get(m.ElectronConnectionHelper);break;case l.ESupportRuntime.Web:g=p.get(o.WebConnectionHelper,[{connectionPath:s.connectionPath,connectionProtocols:s.connectionProtocols}]);break;default:throw new Error(`Unknown backend type: ${_}`)}return g}}},6858:(L,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),l=e(44142);var m;(function(p){p.OnigWasm="wasm:onig",p.TreeSitterWasmDirectory="wasm:tree-sitter"})(m||(t.EKnownResources=m={}));let E=class{mergeAppConfig(_){return _}async provideResourceUri(_){switch(_){case m.OnigWasm:return this.appConfig.onigWasmUri||l.onigWasmCDNUri;case m.TreeSitterWasmDirectory:return this.appConfig.treeSitterWasmDirectoryUri||(0,o.getTreeSitterWasmCDNUri)(this.appConfig.componentCDNType);default:throw new Error(`Unknown resource: ${_}`)}}};t.RendererRuntime=E,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),t.RendererRuntime=E=n.__decorate([(0,r.Injectable)()],E)},37638:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationContribution=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(66549);let m=class{onStart(){this.authenticationService.initialize()}registerCommands(p){p.registerCommand({id:o.noAccountsId,label:"%authentication.noAccounts%"},{execute:()=>{}})}};t.AuthenticationContribution=m,n.__decorate([(0,r.Autowired)(o.IAuthenticationService),n.__metadata("design:type",Object)],m.prototype,"authenticationService",void 0),t.AuthenticationContribution=m=n.__decorate([(0,o.Domain)(l.ClientAppContribution,o.CommandContribution)],m)},10605:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(93899);let m=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 p=new Map;this.onDidChangeSessions(async _=>{if(_.event.added.length>0){const s=await this.getSessions(_.providerId);s.forEach(g=>{if(s.find(y=>p.get(y.id)))return;const c=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}`,v=this.commands.registerCommand({id:d,label:"%authentication.manageTrustedExtensions%"},{execute:async()=>{await this.manageTrustedExtensionsForAccount(_.providerId,g.account.label)}}),f=`${_.providerId}${g.account.label}`,a=this.menus.registerMenuItem(l.MenuId.AccountsContext,{submenu:f,label:`${g.account.label} (${_.label})`}),b=this.menus.registerMenuItems(f,[{command:d},{command:h}]);c.push(a),c.push(b),c.push(u),c.push(v),p.set(g.id,c)})}_.event.removed.length>0&&_.event.removed.forEach(s=>{const g=p.get(s.id);g&&(g.dispose(),p.delete(s.id))})})}get storage(){return this._storage}registerAuthenticationProvider(p,_){this._authenticationProviders.set(p,_),this._onDidRegisterAuthenticationProvider.fire({id:p,label:_.label}),this.updateAccountsMenuItem()}async sessionsUpdate(p,_){const s=this._authenticationProviders.get(p);s&&(this._onDidChangeSessions.fire({providerId:p,label:s.label,event:_}),await s.updateSessionItems(_),this.updateAccountsMenuItem(),_.added&&await this.updateNewSessionRequests(s))}async updateNewSessionRequests(p){const _=this._signInRequestItems.get(p.id);if(!_)return;const s=await p.getSessions();Object.keys(_).forEach(g=>{if(s.some(c=>c.scopes.slice().sort().join("")===g)){const c=_[g];c&&c.disposables.forEach(h=>h.dispose()),delete _[g],Object.keys(_).length===0?this._signInRequestItems.delete(p.id):this._signInRequestItems.set(p.id,_)}})}getTrustedKey(p,_){return`trusted-${p}-${_}`}async getAllowedExtensions(p,_){const s=this.getTrustedKey(p,_);let g=[];try{const c=await this.storage.get(s);c&&(g=JSON.parse(c))}catch(c){this.logger.warn("read allow extensions error: "+c)}return g}async setAllowedExtensions(p,_,s){const g=this.getTrustedKey(p,_);await this.storage.set(g,JSON.stringify(s))}async removeAllowedExtensions(p,_){const s=this.getTrustedKey(p,_);await this.storage.delete(s)}async updatedAllowedExtension(p,_,s,g,c){const h=await this.getAllowedExtensions(p,_),u=h.findIndex(d=>d.id===s);u===-1?h.push({id:s,name:g,allowed:c}):h[u].allowed=c,await this.setAllowedExtensions(p,_,h)}async isAccessAllowed(p,_,s){const c=(await this.getAllowedExtensions(p,_)).find(h=>h.id===s);return c?c.allowed!==void 0?c.allowed:!0:!1}async tryActivateProvider(p){await this.eventBus.fireAndAwait(new o.ExtensionActivateEvent({topic:"onView",data:p}));let _=this._authenticationProviders.get(p);if(_)return _;const s=new Promise((c,h)=>{this.onDidRegisterAuthenticationProvider(u=>{if(u.id===p)if(_=this._authenticationProviders.get(p),_)c(_);else throw new Error(`No authentication provider '${p}' is currently registered.`)})}),g=new Promise((c,h)=>{setTimeout(()=>{h(new Error(`didRegister ${p} timeout`))},5e3)});return Promise.race([s,g])}async getSessions(p,_,s,g){try{return await(this._authenticationProviders.get(p)||await this.tryActivateProvider(p)).getSessions(_,g)}catch{throw new Error(`No authentication provider '${p}' is currently registered.`)}}isAuthenticationProviderRegistered(p){return this._authenticationProviders.has(p)}getProviderIds(){const p=[];return this._authenticationProviders.forEach(_=>{p.push(_.id)}),p}unregisterAuthenticationProvider(p){const _=this._authenticationProviders.get(p);_&&(_.dispose(),this._authenticationProviders.delete(p),this._onDidUnregisterAuthenticationProvider.fire({id:p,label:_.label}),this.updateAccountsMenuItem())}updateAccountsMenuItem(){let p=!1;this._authenticationProviders.forEach(_=>{p=p||_.hasSessions()}),p&&this._noAccountsMenuItem&&(this._noAccountsMenuItem.dispose(),this._noAccountsMenuItem=void 0),!p&&!this._noAccountsMenuItem&&(this._noAccountsMenuItem=this.menus.registerMenuItem(l.MenuId.AccountsContext,{group:"0_accounts",command:o.noAccountsId}))}async requestNewSession(p,_,s,g,c){let h=this._authenticationProviders.get(p);if(h||await new Promise((u,d)=>{this.onDidRegisterAuthenticationProvider(v=>{v.id===p&&(h=this._authenticationProviders.get(p),u())})}),h){const u=this._signInRequestItems.get(p),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",c)},{execute:async()=>{const b=await this.login(p,_,s),y=b.account.label,S=await this.getAllowedExtensions(p,y);S.find(A=>A.id===g)||(S.push({id:g,name:c}),await this.setAllowedExtensions(p,y,S)),await this.setExtensionSessionId(c,p,b.id)}}),a=this.menus.registerMenuItem(l.MenuId.AccountsContext,{group:"2_signInRequests",command:`${g}signIn`});if(u){const b=u[d]||{disposables:[],requestingExtensionIds:[]};u[d]={disposables:[...b.disposables,a,f],requestingExtensionIds:[...b.requestingExtensionIds,g]},this._signInRequestItems.set(p,u)}else this._signInRequestItems.set(p,{[d]:{disposables:[a,f],requestingExtensionIds:[g]}})}}getLabel(p){const _=this._authenticationProviders.get(p);if(_)return _.label;throw new Error(`No authentication provider '${p}' has been declared.`)}supportsMultipleAccounts(p){const _=this._authenticationProviders.get(p);if(_)return _.supportsMultipleAccounts;throw new Error(`No authentication provider '${p}' is currently registered.`)}async login(p,_,s){try{return await(this._authenticationProviders.get(p)||await this.tryActivateProvider(p)).login(_,s)}catch(g){throw new Error(`No authentication provider '${p}' is currently registered, error messge: ${g.message}`)}}logout(p,_){const s=this._authenticationProviders.get(p);if(s)return s.logout(_);throw new Error(`No authentication provider '${p}' is currently registered.`)}manageTrustedExtensionsForAccount(p,_){const s=this._authenticationProviders.get(p);if(s)return s.manageTrustedExtensions(_);throw new Error(`No authentication provider '${p}' is currently registered.`)}signOutOfAccount(p,_){const s=this._authenticationProviders.get(p);if(s)return s.signOut(_);throw new Error(`No authentication provider '${p}' is currently registered.`)}getUsagesKey(p,_){return`usages-${p}-${_}`}async getAccountUsages(p,_){const s=this.getUsagesKey(p,_),g=await this.storage.get(s);let c=[];if(g)try{c=JSON.parse(g)}catch(h){this.logger.warn("parse account usages error: "+h)}return c}async addAccountUsage(p,_,s,g){const c=this.getUsagesKey(p,_),h=await this.getAccountUsages(p,_),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(c,JSON.stringify(h))}async removeAccountUsage(p,_){const s=this.getUsagesKey(p,_);await this.storage.delete(s)}getExtensionSessionIdKey(p,_){return`session-${p}-${_}`}async getExtensionSessionId(p,_){const s=this.getExtensionSessionIdKey(p,_);return await this.storage.get(s)}async setExtensionSessionId(p,_,s){const g=this.getExtensionSessionIdKey(p,_);await this.storage.set(g,s)}async removeExtensionSessionId(p,_){const s=this.getExtensionSessionIdKey(p,_);await this.storage.delete(s)}};t.AuthenticationService=m,n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],m.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],m.prototype,"getStorage",void 0),n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],m.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(l.IMenuRegistry),n.__metadata("design:type",l.IMenuRegistry)],m.prototype,"menus",void 0),n.__decorate([(0,r.Autowired)(o.CommandRegistry),n.__metadata("design:type",Object)],m.prototype,"commands",void 0),t.AuthenticationService=m=n.__decorate([(0,r.Injectable)()],m)},72746:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},33916:(L,t,e)=>{"use strict";var n;n={value:!0},t.j=void 0,e(37585);const r=e(76003),o=e(43718),l=e(4588),m=e(37406),E=e(16884),p=e(18379),_=e(41320),s=e(59574),g=e(6858),c=e(36206),h=e(66963),u=e(18193),d=e(41118),v=e(1149),f=e(11949),a=e(64102),b=e(78132),y=e(11050),S=e(67304),A=e(79951),T=e(79248),w=e(96302),D=e(71843);e(99696);class I{constructor(P){var R,M,k;this.opts=P,this.appInitialized=new o.Deferred,this.browserModules=[],this._disposables=new o.DisposableCollection,this._inComposition=!1,this._handleBeforeUpload=H=>{if(this.config.isElectronRenderer){if(this.stateService.state==="electron_confirmed_close")return;H.returnValue="",H.preventDefault(),this.stateService.state!=="electron_asking_close"&&(this.stateService.state="electron_asking_close",this.preventStopElectron().then(X=>{if(X)this.stateService.state="ready";else return this.stopContributionsElectron().then(()=>{this.stateService.state="electron_confirmed_close";const J=this.injector.get(m.IElectronMainLifeCycleService);setTimeout(()=>{J.closeWindow(A.electronEnv.currentWindowId)},0)})}))}else if(this.preventStop())return(H||window.event).returnValue=!0,!0},this._handleUnload=()=>{this.stateService.state="closing_window",this.config.isElectronRenderer||(this.disposeSideEffect(),this.stopContributions())},this._handleResize=()=>{},this._handleKeydown=H=>{H&&H.target.name!==d.NO_KEYBINDING_NAME&&!this._inComposition&&this.keybindingService.run(H)},this._handleKeyup=H=>{this.keybindingService.resolveModifierKey(H)},this._handleCompositionstart=()=>{this._inComposition=!0},this._handleCompositionend=()=>{this._inComposition=!1},this._handleWheel=()=>{};const{modules:B,contributions:x,iconStyleSheets:N,useCdnIcon:j,editorBackgroundImage:K,defaultPreferences:U,allowSetDocumentTitleFollowWorkspaceDir:Q=!0,...z}=P;this.initEarlyPreference(P.workspaceDir||"");const G=(0,b.getPreferenceLanguageId)(U);(0,o.setLanguageId)(G),this.injector=P.injector||new r.Injector,this.modules=B,this.modules.forEach(H=>this.resolveModuleDeps(H)),this.browserModules=P.modulesInstances||[];const Y=(R=P.isElectronRenderer)!==null&&R!==void 0?R:this.detectRuntime()===p.ESupportRuntime.Electron;this.config={appName:l.DEFAULT_APPLICATION_NAME,appHost:Y?l.DEFAULT_APPLICATION_DESKTOP_HOST:l.DEFAULT_APPLICATION_WEB_HOST,appRoot:P.appRoot||"",uriScheme:l.DEFAULT_URI_SCHEME,...z,isElectronRenderer:Y,workspaceDir:P.workspaceDir||"",extensionDir:P.extensionDir||"",injector:this.injector,wsPath:P.wsPath||`ws://${window.location.hostname}:8000`,layoutConfig:P.layoutConfig,editorBackgroundImage:P.editorBackgroundImage||K,allowSetDocumentTitleFollowWorkspaceDir:Q,devtools:(M=P.devtools)!==null&&M!==void 0?M:!1,rpcMessageTimeout:P.rpcMessageTimeout||-1},this.config.connectionPath=P.connectionPath||`${this.config.wsPath}/service`;const Z=this.injector.get(v.LayoutViewSizeConfig);Z.init(P.layoutViewSize),this.config.layoutViewSize=Z,this.injector.get(v.DesignLayoutConfig).setLayout(P.designLayout,(k=P.AINativeConfig)===null||k===void 0?void 0:k.layout),this.injector.addProviders({token:c.IClientApp,useValue:this}),this.injector.addProviders({token:y.AppConfig,useValue:this.config}),this.runtime=Y?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__={}),P.extensionDevelopmentPath&&(this.config.extensionCandidate=(this.config.extensionCandidate||[]).concat(Array.isArray(P.extensionDevelopmentPath)?P.extensionDevelopmentPath.map(H=>(0,o.asExtensionCandidate)(H,!0)):[(0,o.asExtensionCandidate)(P.extensionDevelopmentPath,!0)]),this.config.extensionDevelopmentHost=!0),this.config=this.runtime.mergeAppConfig(this.config),x&&this.injector.addProviders(...x),this.initBaseProvider(),this.initFields(),this.appendIconStyleSheets(N,j),this.createBrowserModules(U)}resolveModuleDeps(P){const R=Reflect.getMetadata("dependencies",P);R&&R.forEach(M=>{this.modules.indexOf(M)===-1&&this.modules.push(M)})}get lifeCycleService(){return this.injector.get(o.AppLifeCycleServiceToken)}async start(P,R,M){const B=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE);this.lifeCycleService.phase=1,M?(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,w.bindConnectionServiceDeprecated)(this.injector,this.modules,M)):R&&await this.createConnection(R),B.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(P)),this.stateService.state="started_contributions",this.stateService.state="ready",this.lifeCycleService.phase=4,B.timeEnd("Framework.ready")}async createConnection(P){(await this.injector.get(p.ConnectionHelperFactory)(P).createRPCServiceChannel(this.modules)).onReopen(()=>{this.onReconnectContributions()})}onReconnectContributions(){const P=this.contributions;for(const R of P)R.onReconnect&&R.onReconnect(this)}initBaseProvider(){(0,D.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(E.ClientAppStateService),this.nextMenuRegistry=this.injector.get(a.IMenuRegistry)}createBrowserModules(P){const R=this.injector;for(const M of this.modules){const k=R.get(M);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,P),this.injectStorageProvider(this.injector);for(const M of this.browserModules)if(M.contributionProvider)if(Array.isArray(M.contributionProvider))for(const k of M.contributionProvider)(0,o.createContributionProvider)(this.injector,k);else(0,o.createContributionProvider)(this.injector,M.contributionProvider)}get contributions(){return this.contributionsProvider.getContributions()}async startContributions(P){await this.measure("RenderApp.render",()=>this.renderApp(P)),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(P,R){return await Promise.all(P.map(M=>this.contributionPhaseRunner(M,R)))}async contributionPhaseRunner(P,R){const M=P[R];if(typeof M=="function")try{const k=P.constructor.name+"."+R;return await this.measure(k,()=>M.call(P,this))}catch(k){this.logger.error(`Could not run contribution#${R}`,k)}}async renderApp(P){await(0,T.renderClientApp)(this,P),this.injector.get(o.IEventBus).fire(new f.RenderedEvent)}async measure(P,R){const k=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE),B=await R();return k.timeEnd(P),B}preventStop(){const R=this.injector.get(u.CorePreferences)["application.confirmExit"];if(R==="never")return!1;for(const M of this.contributions)if(M.onWillStop)try{if(M.onWillStop(this))return!0}catch(k){(0,o.getDebugLogger)().error(k)}return R==="always"}async preventStopElectron(){if(this.injector.get(u.CorePreferences)["application.confirmExit"]==="never")return!1;for(const M of this.contributions)if(M.onWillStop)try{if(await M.onWillStop(this))return!0}catch(k){(0,o.getDebugLogger)().error(k)}return!1}stopContributions(){for(const P of this.contributions)if(P.onStop)try{P.onStop(this)}catch(R){this.logger.error("Could not stop contribution",R)}}async stopContributionsElectron(){const P=[];for(const R of this.contributions)R.onStop&&P.push((async()=>{try{await R.onStop(this)}catch(M){this.logger.error("Could not stop contribution",M)}})());await Promise.all(P)}registerEventListeners(){window.addEventListener("beforeunload",this._handleBeforeUpload),window.addEventListener("unload",this._handleUnload),window.addEventListener("resize",this._handleResize),window.addEventListener("compositionstart",this._handleCompositionstart),window.addEventListener("compositionend",this._handleCompositionend),window.addEventListener("keydown",this._handleKeydown,!0),window.addEventListener("keyup",this._handleKeyup,!0),o.isOSX&&document.body.addEventListener("wheel",this._handleWheel,{passive:!1})}injectPreferenceService(P,R){const M=()=>k=>{const B=P.get(b.PreferenceProvider,{tag:k});return B.asScope(k),B};if((0,b.injectPreferenceConfigurations)(P),(0,b.injectPreferenceSchemaProvider)(P),P.addProviders({token:b.PreferenceProviderProvider,useFactory:M},{token:b.PreferenceService,useClass:b.PreferenceServiceImpl}),R){const B=P.get(b.PreferenceProviderProvider)(b.PreferenceScope.Default);for(const x of Object.keys(R))B.setPreference(x,R[x])}}injectStorageProvider(P){P.addProviders({token:o.DefaultStorageProvider,useClass:o.DefaultStorageProvider}),P.addProviders({token:o.StorageProvider,useFactory:R=>M=>R.get(o.DefaultStorageProvider).get(M)}),(0,o.createContributionProvider)(P,o.StorageResolverContribution)}fireOnReload(P=!1){window.location.reload(P)}appendIconStyleSheets(P,R){const M=R?[S.DEFAULT_CDN_ICON,S.IDE_OCTICONS_CN_CSS,S.IDE_CODICONS_CN_CSS]:[];P&&P.length&&P.forEach(k=>{this.updateIconMap(k.prefix,k.iconMap),M.push(k.cssPath)});for(const k of M){const B=document.createElement("link");B.setAttribute("rel","stylesheet"),B.setAttribute("href",k),document.getElementsByTagName("head")[0].appendChild(B)}}updateIconMap(P,R){P==="kaitian-icon kticon-"&&this.logger.error(`The icon prefix '${P}' conflicts with the built-in icon, please check the icon configuration.`),(0,S.updateIconMap)(P,R)}initEarlyPreference(P){this._disposables.push((0,b.registerLocalStorageProvider)(o.GeneralSettingsId.Theme,P)),this._disposables.push((0,b.registerLocalStorageProvider)(o.GeneralSettingsId.Icon,P)),this._disposables.push((0,b.registerLocalStorageProvider)(o.GeneralSettingsId.Language,P))}async dispose(){window.removeEventListener("beforeunload",this._handleBeforeUpload),window.removeEventListener("unload",this._handleUnload),window.removeEventListener("resize",this._handleResize),window.removeEventListener("compositionstart",this._handleCompositionstart),window.removeEventListener("compositionend",this._handleCompositionend),window.removeEventListener("keydown",this._handleKeydown,!0),o.isOSX&&document.body.removeEventListener("wheel",this._handleWheel),this._disposables.dispose(),this.disposeSideEffect()}disposeSideEffect(){for(const P of this.contributions)if(P.onDisposeSideEffects)try{P.onDisposeSideEffects(this)}catch(R){this.logger.error("Could not dispose contribution",R)}}detectRuntime(){return window.isElectronRenderer||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0?p.ESupportRuntime.Electron:p.ESupportRuntime.Web}}t.j=I},79248:(L,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)),l=e(97267),m=e(43718),E=e(28003),p=e(68456),_=e(11050),s=e(52564),g=e(26542),c=e(67304),h=e(75206);function u(a){const b=a.app.injector,y=b.get(m.IEventBus),S=b.get(g.LabelService),A=r.default.useCallback((T,w)=>S.getIcon(m.URI.parse(T),w),[]);return r.default.useEffect(()=>{let T;const w=()=>{T&&window.cancelAnimationFrame(T),T=window.requestAnimationFrame(()=>{T=null,s.allSlot.forEach(D=>{y.fire(new p.ResizeEvent({slotLocation:D.slot})),y.fireDirective(p.ResizeEvent.createDirective(D.slot))})})};return window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w)}},[]),r.default.createElement(l.ComponentContextProvider,{value:{getIcon:c.getIcon,localize:m.localize,getResourceIcon:A}},r.default.createElement(_.ConfigProvider,{value:a.app.config},r.default.createElement(a.main,{callback:a.callback}),a.overlays&&a.overlays.map((T,w)=>r.default.createElement(T,{key:w}))))}const d=a=>b=>{o.default.createRoot(a).render(r.default.createElement(b,null))},v=(0,m.getDebugLogger)();function f(a,b){let y=a.config.layoutComponent||E.DefaultLayout;const S=a.browserModules.filter(O=>O.isOverlay).map(O=>O.component?O.component:(v.warn("Overlay module does not have component",O),null)).filter(Boolean),A=a.injector;A.get(h.ClientAppContextContribution).getContributions().forEach(O=>y=O.registerClientAppContext(y,A));const D=O=>r.default.createElement(u,{...O,app:a,main:y,overlays:S});return(typeof b=="function"?b:d(b))(D)}},96302:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConnectionService=p,t.bindConnectionServiceDeprecated=_;const n=e(8919),r=e(18740),o=e(76271),l=e(43718),m=e(16884),E=e(11050);async function p(g,c,h,u={}){var d;const v=g.get(E.AppConfig),f=g.get(l.IReporterService);h.setReporter(f);const a=g.get(l.IEventBus),b=g.get(m.ClientAppStateService),y=()=>{b.reachedState("core_module_initialized").then(()=>{a.fire(new l.BrowserConnectionOpenEvent)})};h.connection.isOpen()&&y(),h.connection.onOpen(()=>{y()}),h.connection.onClose(()=>{b.reachedState("core_module_initialized").then(()=>{a.fire(new l.BrowserConnectionCloseEvent)})}),h.connection.onError(w=>{b.reachedState("core_module_initialized").then(()=>{a.fire(new l.BrowserConnectionErrorEvent(w))})}),await h.initHandler(),g.addProviders({token:r.WSChannelHandler,useValue:h});const S=await h.openChannel(o.RPCServiceChannelPath),A=new n.RPCServiceCenter;return A.setSumiConnection(S.createSumiConnection(u)),!((d=v?.measure)===null||d===void 0)&&d.connection&&A.setReporter(f,v.measure.connection.minimumReportThresholdTime),s(g,c,A),g.get(l.ILogger).reportToServer(),S}function _(g,c,h){const u=new n.RPCServiceCenter,d=u.setConnection(h),v=h.onClose(()=>{d.dispose(),v.dispose()});s(g,c,u)}function s(g,c,h){const{getRPCService:u}=(0,n.initRPCService)(h),d=[],v=[];for(const f of c){const a=g.get(f);if(a.backServices)for(const b of a.backServices)d.push(b),b.protocol&&h.loadProtocol(b.protocol)}for(const f of d){const{servicePath:a}=f,b=u(a),y={token:a,useValue:b};g.addProviders(y),f.clientToken&&v.push(f)}for(const f of v){const{servicePath:a}=f,b=u(a);if(f.clientToken){const y=g.get(f.clientToken);b.onRequestService(y)}}}},75206:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppContextContribution=void 0,t.ClientAppContextContribution=Symbol("ClientAppContextContribution")},32796:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectInnerProviders=Y;const n=e(43718),r=e(96405),o=e(16872),l=e(41480),m=e(12956),E=e(59555),p=e(18379),_=e(10605),s=e(66963),g=e(71707),c=e(80832),h=e(23396),u=e(77273),d=e(41118),v=e(37015),f=e(68456),a=e(75694),b=e(93899),y=e(77666),S=e(90697),A=e(73967),T=e(78132),w=e(68969),D=e(11719),I=e(52564),O=e(26542),P=e(52993),R=e(10845),M=e(40827),k=e(32242),B=e(99e3),x=e(42637),N=e(62652),j=e(27957),K=e(45670),U=e(66894),Q=e(63921),z=e(75206),G=e(82493);function Y(Z){(0,n.createContributionProvider)(Z,s.ClientAppContribution),(0,n.createContributionProvider)(Z,n.CommandContribution),(0,n.createContributionProvider)(Z,u.FsProviderContribution),(0,n.createContributionProvider)(Z,d.KeybindingContribution),(0,n.createContributionProvider)(Z,b.MenuContribution),(0,n.createContributionProvider)(Z,f.ComponentContribution),(0,n.createContributionProvider)(Z,I.SlotRendererContribution),(0,n.createContributionProvider)(Z,T.PreferenceContribution),(0,n.createContributionProvider)(Z,K.VariableContribution),(0,n.createContributionProvider)(Z,f.TabBarToolbarContribution),(0,n.createContributionProvider)(Z,x.ToolBarActionContribution),(0,n.createContributionProvider)(Z,k.StaticResourceContribution),(0,n.createContributionProvider)(Z,z.ClientAppContextContribution);const $=[{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:H=>H.get(d.KeybindingRegistry)},{token:o.KeyboardNativeLayoutService,useClass:v.BrowserKeyboardLayoutImpl},{token:o.KeyboardLayoutChangeNotifierService,useFactory:H=>H.get(o.KeyboardNativeLayoutService)},{token:v.KeyValidator,useFactory:H=>H.get(o.KeyboardNativeLayoutService)},m.ClientAppStateService,{token:a.ILogger,useClass:a.Logger},{token:a.Logger,useAlias:a.ILogger},{token:f.ComponentRegistry,useClass:f.ComponentRegistryImpl},{token:K.VariableRegistry,useClass:K.VariableRegistryImpl},{token:b.AbstractMenuService,useClass:b.MenuServiceImpl},{token:b.AbstractContextMenuService,useClass:b.ContextMenuServiceImpl},{token:b.IMenuRegistry,useClass:b.MenuRegistryImpl},{token:y.IToolbarActionService,useClass:y.ToolbarActionService},{token:b.AbstractMenubarService,useClass:b.MenubarServiceImpl},{token:n.IReporter,useClass:n.DefaultReporter},{token:n.IReporterService,useClass:n.ReporterService},{token:n.ReporterMetadata,useValue:{host:n.REPORT_HOST.BROWSER}},{token:w.IProgressService,useClass:D.ProgressService},{token:x.IToolbarRegistry,useClass:j.NextToolbarRegistryImpl},{token:x.IToolbarPopoverRegistry,useClass:N.ToolbarPopoverRegistry},j.ToolbarClientAppContribution,{token:n.IProblemPatternRegistry,useClass:n.ProblemPatternRegistryImpl},{token:n.IProblemMatcherRegistry,useClass:n.ProblemMatchersRegistryImpl},{token:n.ITaskDefinitionRegistry,useClass:n.TaskDefinitionRegistryImpl},{token:S.IOpenerService,useClass:A.OpenerService},{token:U.IWindowService,useClass:Q.WindowService},{token:n.IApplicationService,useClass:E.ApplicationService},{token:P.IClipboardService,useClass:P.BrowserClipboardService},{token:R.IExternalUriService,useClass:R.ExternalUriService},{token:n.IAuthenticationService,useClass:_.AuthenticationService},{token:O.ICryptoService,useClass:O.CryptoService},{token:O.ICredentialsService,useClass:O.CredentialsService},{token:r.IHashCalculateService,useClass:r.HashCalculateServiceImpl},{token:n.IExtensionsSchemaService,useClass:h.ExtensionsPointServiceImpl},{token:n.AppLifeCycleServiceToken,useClass:G.AppLifeCycleService},{token:k.StaticResourceService,useClass:B.StaticResourceServiceImpl},M.StaticResourceClientAppContribution,{token:g.ISplitPanelService,useClass:g.SplitPanelService},{token:n.IAIReporter,useClass:l.AIReporter},{token:c.IDesignStyleService,useClass:c.DesignStyleService},{token:p.ConnectionHelperFactory,useFactory:p.ConnectionHelperFactory}];Z.addProviders(...$)}},82493:(L,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 l=class{constructor(){this.onDidChangeLifecyclePhaseEmitter=new o.Emitter,this.onDidLifeCyclePhaseChange=this.onDidChangeLifecyclePhaseEmitter.event}set phase(E){this.lifeCyclePhase=E,this.onDidChangeLifecyclePhaseEmitter.fire(this.lifeCyclePhase)}get phase(){return this.lifeCyclePhase}};t.AppLifeCycleService=l,t.AppLifeCycleService=l=n.__decorate([(0,r.Injectable)()],l)},99696:(L,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:(L,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 l extends o.BasicModule{}t.BrowserModule=l,n.__decorate([(0,r.Autowired)(t.IClientApp),n.__metadata("design:type",Object)],l.prototype,"app",void 0)},14109:(L,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.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 y="file";b.NEW_FILE={id:"file.new",category:y,iconClass:(0,n.getIcon)("new-file")},b.RENAME_FILE={id:"file.rename",category:y},b.DELETE_FILE={id:"file.delete",category:y},b.NEW_FOLDER={id:"file.folder.new",category:y,iconClass:(0,n.getIcon)("new-folder")},b.COMPARE_SELECTED={id:"file.compare",category:y},b.OPEN_FILE={id:"file.open",category:y},b.SAVE_FILE={id:"file.save",category:y},b.COLLAPSE_ALL={id:"filetree.collapse.all",category:y,iconClass:(0,n.getIcon)("collapse-all")},b.REFRESH_ALL={id:"filetree.refresh.all",category:y,iconClass:(0,n.getIcon)("refresh")},b.OPEN_RESOURCES={id:"filetree.open.file",category:y},b.OPEN_TO_THE_SIDE={id:"filetree.open.side",category:y},b.OPEN_TYPE_WITH={id:"filetree.open.with",category:y},b.COPY_PATH={id:"filetree.copy.path",category:y,label:"%file.copy.path%"},b.COPY_RELATIVE_PATH={id:"filetree.copy.relativepath",category:y},b.COPY_FILE={id:"filetree.copy.file",category:y},b.CUT_FILE={id:"filetree.cut.file",category:y},b.PASTE_FILE={id:"filetree.paste.file",category:y},b.SELECT_CURRENT_NODE={id:"filetree.selectCurrentNode",category:y},b.LOCATION={id:"filetree.location",category:y},b.LOCATION_WITH_EDITOR={id:"filetree.location_with_editor",category:y,iconClass:(0,n.getIcon)("focus")},b.OPEN_FOLDER={id:"filetree.open.folder",category:y,label:"%file.open.folder%"},b.VSCODE_OPEN_FOLDER={id:"filetree.open.vscode_open_folder",category:y},b.OPEN_WORKSPACE={id:"filetree.open.workspace",category:y,label:"%file.open.workspace%"},b.SEARCH_ON_FOLDER={id:"filetree.search.folder",category:y},b.FOCUS_FILES={id:"filetree.focus.files",category:y,label:"%file.focus.files%"},b.FILTER_TOGGLE={id:"filetree.files.filter_toggle",category:y,iconClass:(0,n.getIcon)("retrieval")},b.FILTER_OPEN={id:"filetree.files.filter_open",category:y},b.OPEN_TERMINAL_WITH_PATH={id:"filetree.openTerminalWithPath",category:y},b.FILTER_CLOSE={id:"filetree.quitFilterMode",category:y},b.NEXT={id:"filetree.next",category:y},b.PREV={id:"filetree.prev",category:y},b.COLLAPSE={id:"filetree.collapse",category:y},b.EXPAND={id:"filetree.expand",category:y},b.REVEAL_IN_EXPLORER={id:"filetree.revealInExplorer",category:y},b.TOGGLE_OR_OPEN={id:"filetree.toggleOrOpen",category:y}})(r||(t.FILE_COMMANDS=r={}));var o;(function(b){const y="openeditors";b.SAVE_ALL={id:"opened.editors.save.all",category:y,iconClass:(0,n.getIcon)("save-all")},b.CLOSE_ALL={id:"opened.editors.close.all",category:y,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:y},b.CLOSE={id:"opened.editors.close",category:y},b.OPEN_TO_THE_SIDE={id:"opened.editors.openToTheSide",category:y},b.COMPARE_SELECTED={id:"opened.editors.compare",category:y},b.COPY_RELATIVE_PATH={id:"opened.editors.copyRelativePath",category:y},b.COPY_PATH={id:"opened.editors.copyPath",category:y},b.LOCATION={id:"opened.editors.location",category:y}})(o||(t.OPEN_EDITORS_COMMANDS=o={}));var l;(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"}})(l||(t.COMMON_COMMANDS=l={}));var m;(function(b){const y="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.NEW_UNTITLED_FILE={id:"file.new.untitled",category:y,label:"%file.new%",iconClass:(0,n.getIcon)("new-file")},b.UNDO={id:"editor.undo",category:y,label:"%editor.undo%"},b.REDO={id:"editor.redo",category:y,label:"%editor.redo%"},b.SELECT_ALL={id:"editor.selectAll",category:y,label:"%selection.all%"},b.OPEN_RESOURCE={id:"editor.openUri",category:y},b.OPEN_RESOURCES={id:"editor.openUris",category:y},b.SAVE_URI={id:"editor.saveUri",category:y},b.SAVE_CURRENT={id:"editor.saveCurrent",category:y,label:"%editor.saveCurrent%"},b.FOCUS_IF_NOT_ACTIVATE_ELEMENT={id:"editor.focusIfNotActivateElement",category:y,label:"%editor.saveCurrent%"},b.COMPARE={id:"editor.compare",category:y},b.OPEN_MERGEEDITOR={id:"editor.open.mergeEditor",category:y},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:y,label:"%mergeEditor.reset%"},b.CLOSE={id:"editor.close",category:y,label:"%editor.closeCurrent%"},b.CLOSE_ALL_IN_GROUP={id:"editor.closeAllInGroup",category:y,label:"%editor.closeAllInGroup%"},b.CLOSE_OTHER_IN_GROUP={id:"editor.closeOtherEditorsInGroup",category:y,label:"%editor.closeOtherEditors%"},b.CLOSE_ALL={id:"editor.closeAll",category:y,label:"%editor.close.all%"},b.CLOSE_SAVED={id:"editor.closeSaved",category:y,label:"%editor.closeSaved%"},b.SAVE_ALL={id:"editor.saveAll",category:y,label:"%editor.saveAll%"},b.CLOSE_TO_RIGHT={id:"editor.closeToRight",category:y,label:"%editor.closeToRight%"},b.GET_CURRENT={id:"editor.getCurrent",category:y},b.GET_CURRENT_RESOURCE={id:"editor.getCurrentResource",category:y},b.SPLIT_TO_LEFT={id:"editor.splitToLeft",category:y,label:"%editor.splitToLeft%"},b.SPLIT_TO_RIGHT={id:"editor.splitToRight",category:y,label:"%editor.splitToRight%"},b.SPLIT_TO_TOP={id:"editor.splitToTop",category:y,label:"%editor.splitToTop%"},b.SPLIT_TO_BOTTOM={id:"editor.splitToBottom",category:y,label:"%editor.splitToBottom%"},b.CHANGE_LANGUAGE={id:"editor.changeLanguage",category:y},b.CHANGE_ENCODING={id:"editor.changeEncoding",category:y},b.GET_ENCODING={id:"editor.getEncoding",category:y},b.CHANGE_EOL={id:"editor.changeEol",category:y},b.NAVIGATE_LEFT={id:"editor.navigateLeft",category:y},b.NAVIGATE_RIGHT={id:"editor.navigateRight",category:y},b.NAVIGATE_UP={id:"editor.navigateUp",category:y},b.NAVIGATE_DOWN={id:"editor.navigateDown",category:y},b.NAVIGATE_NEXT={id:"editor.navigateNext",category:y},b.NAVIGATE_PREVIOUS={id:"editor.navigatePrevious",category:y},b.PREVIOUS={id:"editor.previous",category:y},b.NEXT={id:"editor.next",category:y},b.PREVIOUS_IN_GROUP={id:"editor.previousInGroup",category:y},b.NEXT_IN_GROUP={id:"editor.nextInGroup",category:y},b.LAST_IN_GROUP={id:"editor.lastInGroup",category:y},b.CLOSE_OTHER_GROUPS={id:"editor.closeOtherGroup",category:y,label:"%editor.closeEditorsInOtherGroups%"},b.OPEN_EDITOR_AT_INDEX={id:"editor.openEditorAtIndex",category:y},b.EVEN_EDITOR_GROUPS={id:"editor.evenEditorGroups",category:y,label:"%editor.resetEditorGroups%"},b.REVERT_DOCUMENT={id:"editor.document.revert",category:y,label:"%editor.revert%"},b.REVERT_AND_CLOSE={id:"editor.revertAndClose",category:y},b.GO_FORWARD={id:"editor.goForward",category:y},b.GO_BACK={id:"editor.goBack",category:y},b.PIN_CURRENT={id:"editor.pinCurrent",category:y},b.COPY_CURRENT_PATH={id:"editor.copyCurrentPath",category:y},b.GO_TO_GROUP={id:"editor.goToGroup",category:y},b.MOVE_GROUP={id:"editor.moveGroup",category:y},b.REOPEN_CLOSED={id:"editor.reopenClosed",category:y},b.FOCUS={id:"editor.focus",category:y},b.TEST_TOKENIZE={id:"editor.tokenize.test",category:y,label:"%editor.tokenize.test%"},b.AUTO_SAVE={id:"editor.autoSave",category:y},b.FOCUS_ACTIVE_EDITOR_GROUP={id:"editor.focusActiveEditorGroup",category:y},b.COMPONENT_UNDO={id:"editor.componentUndo",category:y},b.COMPONENT_REDO={id:"editor.componentRedo"},b.SEARCH_WORKSPACE_SYMBOL={id:"editor.workspaceSymbol.quickopen",label:"%editor.workspaceSymbol.quickopen%",category:y},b.SEARCH_WORKSPACE_SYMBOL_CLASS={id:"editor.workspaceSymbolClass.quickopen",label:"%editor.workspaceSymbolClass.quickopen%",category:y},b.GO_TO_LINE={id:"editor.action.gotoLine",label:"%editor.goToLine%",category:y},b.QUICK_OPEN={id:"workbench.action.quickOpen",category:y,label:"%editor.quickOpen%"},b.TOGGLE_WORD_WRAP={id:"editor.toggleWordWrap",label:"%editor.toggleWordWrap%",category:y},b.TOGGLE_COLUMN_SELECTION={id:"editor.action.toggleColumnSelection",label:"%editor.action.toggleColumnSelection%",category:y},b.FORMAT_DOCUMENT={id:"editor.action.formatDocument",category:y},b.FORMAT_SELECTION={id:"editor.action.formatSelection",category:y},b.FORMAT_DOCUMENT_WITH={id:"editor.action.formatDocument.multiple",category:y,label:"%editor.formatDocument.label.multiple%"},b.FORMAT_SELECTION_WITH={id:"editor.action.formatSelection.multiple",category:y,label:"%editor.formatSelection.label.multiple%"},b.COPY_PATH={id:"editor.action.copyPath",category:y,label:"%editor.copyPath%"},b.COPY_RELATIVE_PATH={id:"editor.action.copyRelativePath",category:y,label:"%editor.copyRelativePath%"}})(m||(t.EDITOR_COMMANDS=m={}));var E;(function(b){const y="diff-editor";b.REVERT={id:"editor.diff.revert",category:y},b.ACCEPT={id:"editor.diff.accept",category:y},b.TOGGLE_COLLAPSE_UNCHANGED_REGIONS={id:"editor.diff.toggleCollapseUnchangedRegions",category:y}})(E||(t.DIFF_EDITOR_COMMANDS=E={}));var p;(function(b){const y="search";b.OPEN_SEARCH={id:"content-search.openSearch",category:y,label:"Open search sidebar"},b.REFRESH={id:"file-search.refresh",label:"refresh search",iconClass:(0,n.getIcon)("refresh"),category:y},b.CLEAN={id:"file-search.clean",label:"clean search",iconClass:(0,n.getIcon)("clear"),category:y},b.GET_RECENT_SEARCH_WORD={id:"search.getRecentSearchWordCmd",category:y},b.GET_BACK_RECENT_SEARCH_WORD={id:"search.getBackRecentSearchWordCmd",category:y},b.MENU_REPLACE={id:"search.menu.replace",category:y,label:"%search.replace.title%"},b.MENU_REPLACE_ALL={id:"search.menu.replaceAll",category:y,label:"%search.replaceAll.label%"},b.MENU_HIDE={id:"search.menu.hide",category:y,label:"%search.result.hide%"},b.MENU_COPY={id:"search.menu.copy",category:y,label:"%file.copy.file%"},b.MENU_COPY_ALL={id:"search.menu.copyAll",category:y,label:"%search.menu.copyAll%"},b.MENU_COPY_PATH={id:"search.menu.copyPath",category:y,label:"%file.copy.path%"},b.REPLACE={id:"search.replace",category:y},b.CLOSE={id:"search.close",category:y}})(p||(t.SEARCH_COMMANDS=p={}));var _;(function(b){const y="outline";b.OUTLINE_COLLAPSE_ALL={id:"outline.collapse.all",category:y},b.OUTLINE_FOLLOW_CURSOR={id:"outline.follow.cursor",category:y},b.OUTLINE_SORT_KIND={id:"outline.sort.kind",category:y},b.OUTLINE_SORT_NAME={id:"outline.sort.name",category:y},b.OUTLINE_SORT_POSITION={id:"outline.sort.position",category:y}})(_||(t.OUTLINE_COMMANDS=_={}));var s;(function(b){const y="workspace";b.ADD_WORKSPACE_FOLDER={id:"workspace.addFolderToWorkspace",label:"%workspace.addFolderToWorkspace%",category:y},b.REMOVE_WORKSPACE_FOLDER={id:"workspace.removeFolderFromWorkspace",label:"%workspace.removeFolderFromWorkspace%",category:y},b.SAVE_WORKSPACE_AS_FILE={id:"workspace.saveWorkspaceAsFile",label:"%workspace.saveWorkspaceAsFile%",category:y}})(s||(t.WORKSPACE_COMMANDS=s={}));var g;(function(b){const y="keyboard";b.CHOOSE_KEYBOARD_LAYOUT={id:"keyboard.chooseKeyboardLayout",label:"%keyboard.chooseKeyboardLayout%",category:y}})(g||(t.KEYBOARD_COMMANDS=g={}));var c;(function(b){const y="dialog";b.ENSURE={id:"dialog.ensure",category:y}})(c||(t.DIALOG_COMMANDS=c={}));var h;(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}})(h||(t.TERMINAL_COMMANDS=h={}));var u;(function(b){const y="view";b.QUICK_OPEN_VIEW={id:"layout.action.quickOpenView",category:y},b.OPEN_VIEW={id:"layout.action.openView",label:"%layout.action.openView%",category:y},b.MAXIMIZE_EDITOR={id:"layout.action.Maximizeeditor",category:y},b.TOGGLE_SIDEBAR_VISIBILITY={id:"main-layout.left-panel.toggle",category:y}})(u||(t.LAYOUT_COMMANDS=u={}));var d;(function(b){const y="marker";b.SHOW_ERRORS_WARNINGS={id:"marker.action.showErrorsWarnings",category:y},b.TOGGLE_SHOW_ERRORS_WARNINGS={id:"marker.action.toggleShowErrorsWarnings",category:y}})(d||(t.MARKER_COMMANDS=d={}));var v;(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"}})(v||(t.QUICK_OPEN_COMMANDS=v={}));var f;(function(b){const y="SCM";b.GetSCMResource={id:"scm.getResource",category:y},b._GIT_OPEN_MERGE_EDITOR={id:"_git.openMergeEditor"},b.GIT_OPEN_MERGE_EDITOR={id:"git.openMergeEditor"}})(f||(t.SCM_COMMANDS=f={}));var a;(function(b){const y="MergeConflict";b.AI_ACCEPT={id:"merge-conflict.ai.accept",category:y},b.ALL_RESET={id:"merge-conflict.ai.all-reset",category:y},b.AI_ALL_ACCEPT={id:"merge-conflict.ai.all-accept",category:y},b.AI_ALL_ACCEPT_STOP={id:"merge-conflict.ai.all-accept-stop",category:y}})(a||(t.MERGE_CONFLICT_COMMANDS=a={}))},22780:(L,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),l=e(43718),m=e(53736),E=e(18193),p=e(22366),_=e(41118),s=e(1149),g=e(64102),c=e(39496),h=e(78132),u=e(11050),d=e(14109),v=e(66549);t.inputFocusedContextKey="inputFocus",t.locationProtocolContextKey="locationProtocol";let f=class{constructor(){this.schema=E.corePreferenceSchema;const b={"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},y=Object.keys(this.schema.properties);for(const S of y)this.schema.properties[S].default=b[S]||this.schema.properties[S].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 b=this.activeElementIsInput();if(this.inputFocusedContext.set(b),b){const y=(0,p.trackFocus)(document.activeElement);l.Event.once(y.onDidBlur)(()=>{this.inputFocusedContext.set(this.activeElementIsInput()),y.dispose()})}}registerCommands(b){b.registerCommand(d.EDITOR_COMMANDS.UNDO),b.registerCommand(d.EDITOR_COMMANDS.REDO),b.registerCommand(d.EDITOR_COMMANDS.SELECT_ALL),b.registerCommand(d.COMMON_COMMANDS.ABOUT_COMMAND,{execute:()=>{alert((0,l.replaceLocalizePlaceholder)(this.appConfig.appName))}})}registerMenus(b){b.registerMenubarItem(c.MenuId.MenubarFileMenu,{label:(0,l.localize)("menu-bar.title.file"),order:1,iconClass:(0,o.getIcon)("menubar-file")}),b.registerMenubarItem(c.MenuId.MenubarEditMenu,{label:(0,l.localize)("menu-bar.title.edit"),order:2,iconClass:(0,o.getIcon)("menubar-edit")}),b.registerMenubarItem(c.MenuId.MenubarSelectionMenu,{label:(0,l.localize)("menu-bar.title.selection"),order:3,iconClass:(0,o.getIcon)("menubar-selection")}),b.registerMenubarItem(c.MenuId.MenubarViewMenu,{label:(0,l.localize)("menu-bar.title.view"),order:4,iconClass:(0,o.getIcon)("menubar-view")}),b.registerMenubarItem(c.MenuId.MenubarGoMenu,{label:(0,l.localize)("menu-bar.title.go"),order:5,iconClass:(0,o.getIcon)("menubar-go")}),b.registerMenubarItem(c.MenuId.MenubarTerminalMenu,{label:(0,l.localize)("menu-bar.title.terminal"),order:5,iconClass:(0,o.getIcon)("terminal")}),b.registerMenubarItem(c.MenuId.MenubarHelpMenu,{label:(0,l.localize)("menu-bar.title.help"),order:999,iconClass:(0,o.getIcon)("question-circle")}),b.registerMenuItems(c.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,l.localize)("file.save")},group:"3_save"},{command:{id:d.EDITOR_COMMANDS.SAVE_ALL.id,label:(0,l.localize)("file.saveAll")},group:"3_save"},{command:{id:d.EDITOR_COMMANDS.AUTO_SAVE.id,label:(0,l.localize)("file.autoSave")},toggledWhen:"config.editor.autoSave != off",group:"4_autosave"}]),b.registerMenuItems(c.MenuId.MenubarGoMenu,[{command:{id:d.EDITOR_COMMANDS.GO_BACK.id,label:(0,l.localize)("editor.goBack")},group:"1_go"},{command:{id:d.EDITOR_COMMANDS.GO_FORWARD.id,label:(0,l.localize)("editor.goForward")},group:"1_go"},{command:{id:d.EDITOR_COMMANDS.QUICK_OPEN.id,label:(0,l.localize)("editor.quickOpen")},group:"2_go_file"},{command:{id:d.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,label:(0,l.localize)("editor.workspaceSymbol.quickopen")},group:"2_go_file"},{command:{id:d.EDITOR_COMMANDS.GO_TO_LINE.id,label:(0,l.localize)("editor.goToLine")},group:"3_go_infile"},{command:{id:"editor.action.jumpToBracket",label:(0,l.localize)("menu-bar.go.jumpToBracket")},group:"3_go_infile"},{command:{id:"editor.action.marker.nextInFiles",label:(0,l.localize)("menu-bar.go.nextProblemInFiles")},group:"6_go_problem"},{command:{id:"editor.action.marker.prevInFiles",label:(0,l.localize)("menu-bar.go.prevProblemInFiles")},group:"6_go_problem"}]),b.registerMenuItems(c.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(b){b.registerKeybinding({command:d.EDITOR_COMMANDS.SELECT_ALL.id,keybinding:"ctrlcmd+a",when:"editorFocus"}),b.registerKeybinding({command:d.EDITOR_COMMANDS.UNDO.id,keybinding:"ctrlcmd+z",when:"editorFocus"}),b.registerKeybinding({command:d.EDITOR_COMMANDS.REDO.id,keybinding:"ctrlcmd+shift+z",when:"editorFocus"})}};t.ClientCommonContribution=f,n.__decorate([(0,r.Autowired)(l.CommandService),n.__metadata("design:type",Object)],f.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(m.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,l.Domain)(l.CommandContribution,v.ClientAppContribution,h.PreferenceContribution,g.MenuContribution,_.KeybindingContribution),n.__metadata("design:paramtypes",[])],f)},66549:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppContribution=void 0,t.ClientAppContribution=Symbol("ClientAppContribution")},34505:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCommonModule=void 0;const n=e(85608),r=e(76003),o=e(16908),l=e(43718),m=e(37638),E=e(36206),p=e(136),_=e(90697),s=e(45829),g=e(44867),c=e(22780),h=e(10797),u=e(17821);let d=class extends E.BrowserModule{constructor(){super(...arguments),this.contributionProvider=[_.OpenerContribution],this.providers=[c.ClientCommonContribution,g.DefaultOpenerContribution,g.OpenerContributionClient,m.AuthenticationContribution,p.HashCalculateContribution],this.electronProviders=[h.ClientElectronCommonContribution,s.ElectronOpenerContributionClient],this.webProviders=[u.ClientWebCommonContribution],this.backServices=[{servicePath:l.CommonServerPath,protocol:o.CommonServerProtocol},{servicePath:l.KeytarServicePath},{servicePath:l.CryptoServicePath}]}};t.ClientCommonModule=d,t.ClientCommonModule=d=n.__decorate([(0,r.Injectable)()],d)},98881:(L,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 l=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=l,n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],l.prototype,"getStorage",void 0),t.RecentStorage=l=n.__decorate([(0,r.Injectable)()],l)},30144:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientElectronCommonContribution=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(64102),m=e(39496),E=e(11050);let p=class{registerMenus(s){s.registerMenubarItem(m.MenuId.MenubarAppMenu,{label:(0,o.localize)("app.name",this.appConfig.appName),order:0}),s.registerMenuItems(m.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(m.MenuId.MenubarAppMenu,[{command:{id:"electron.quit",label:(0,o.localize)("app.quit")},nativeRole:"quit",group:"4_quit"}])}};t.ClientElectronCommonContribution=p,n.__decorate([(0,r.Autowired)(E.AppConfig),n.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),t.ClientElectronCommonContribution=p=n.__decorate([(0,o.Domain)(l.MenuContribution)],p)},66963:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientWebCommonContribution=void 0;const n=e(85608),r=e(43718),o=e(64102),l=e(39496),m=e(14109);let E=class{registerMenus(_){_.registerMenuItems(l.MenuId.MenubarEditMenu,[{command:m.EDITOR_COMMANDS.REDO.id,group:"1_undo"},{command:m.EDITOR_COMMANDS.UNDO.id,group:"1_undo"}]),_.registerMenuItem(l.MenuId.MenubarHelpMenu,{command:{id:m.COMMON_COMMANDS.ABOUT_COMMAND.id,label:m.COMMON_COMMANDS.ABOUT_COMMAND.label},nativeRole:"about",group:"0_about"})}};t.ClientWebCommonContribution=E,t.ClientWebCommonContribution=E=n.__decorate([(0,r.Domain)(o.MenuContribution)],E)},25918:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TitleActionList=t.InlineActionWidget=t.MenuActionList=void 0,t.InlineActionBar=a,t.InlineMenuBar=b;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),m=e(45803),E=e(43718),p=e(93899),_=e(48560),s=e(79951),g=e(55693),c=n.__importDefault(e(17647)),h=n.__importDefault(e(54859)),u=({data:y,hasSubmenu:S,disabled:A,iconService:T,hasChecked:w})=>o.default.createElement("div",{className:(0,r.default)(h.default.menuAction,{[h.default.disabled]:A,[h.default.checked]:y.checked})},o.default.createElement("div",{className:(0,r.default)({[h.default.icon]:w})},y.checked?o.default.createElement(l.Icon,{icon:"check"}):null),o.default.createElement("div",{className:h.default.label},y.label?(0,s.transformLabelWithCodicon)(E.strings.mnemonicButtonLabel(y.label,!0),{margin:"0 3px"},T?.fromString.bind(T)):""),o.default.createElement("div",{className:h.default.tip},y.keybinding?o.default.createElement("div",{className:h.default.shortcut},y.keybinding):null,S?o.default.createElement("div",{className:h.default.submenuIcon},o.default.createElement(l.Icon,{icon:"right"})):null,!y.keybinding&&!S&&y.extraDesc&&o.default.createElement("div",{className:h.default.extraDesc},y.extraDesc))),d=({data:y=[],context:S=[],afterClick:A,style:T,iconService:w,renderSubMenuTitle:D,renderMenuItem:I})=>{if(!y.length)return null;const O=o.default.useCallback(k=>{const{key:B,item:x}=k;if([p.SeparatorMenuItemNode.ID,p.SubmenuItemNode.ID].includes(B))return;const j=(Array.isArray(x.props.children)?x.props.children[0]:x.props.children).props.data;j&&(typeof j.execute=="function"&&j.execute(S),typeof A=="function"&&A(j))},[y,S]),P=o.default.useCallback((k,B)=>{if(D){const x=D(k,{hasSubmenu:!0,disabled:!1});if(x)return x}return o.default.createElement(u,{hasChecked:B,hasSubmenu:!0,data:k,iconService:w})},[D]),R=o.default.useCallback((k,B)=>{if(I){const x=I(k,{hasSubmenu:!1,disabled:k.disabled});if(x)return x}return o.default.createElement(u,{hasChecked:B,data:k,disabled:k.disabled,iconService:w})},[I]),M=o.default.useCallback(k=>{const B=k.some(x=>x.checked);return k.map((x,N)=>{if(x.id===p.SeparatorMenuItemNode.ID)return null;const j=k[N+1]&&k[N+1].id===p.SeparatorMenuItemNode.ID;return x.id===p.SubmenuItemNode.ID?!Array.isArray(x.children)||!x.children.length?null:o.default.createElement(o.default.Fragment,{key:`${x.id}-${x.submenuId}-${N}`},o.default.createElement(m.Menu.SubMenu,{key:`${x.id}-${x.submenuId}-${N}`,className:h.default.submenuItem,popupClassName:"kt-menu",title:P(x,B)},M(x.children)),j?o.default.createElement(m.Menu.Divider,{key:`divider-${N}`,className:h.default.menuItemDivider}):null):o.default.createElement(o.default.Fragment,{key:`${x.id}-${N}`},o.default.createElement(m.Menu.Item,{id:`${x.id}-${N}`,key:`${x.id}-${N}`,className:h.default.menuItem,disabled:x.disabled},R(x,B)),j?o.default.createElement(m.Menu.Divider,{key:`divider-${N}`,className:h.default.menuItemDivider}):null)})},[]);return o.default.createElement(m.Menu,{className:"kt-menu",selectable:!1,motion:{motionLeave:!1,motionEnter:!1},builtinPlacements:c.default,onClick:O,style:T},M(y))};t.MenuActionList=d;const v=({type:y,icon:S,disabled:A,onClick:T,title:w})=>{const D=(0,g.useDesignStyles)(h.default.btnAction,"btnAction");if(y==="icon")return o.default.createElement(l.Button,{size:"small",type:y,className:D,onClick:T,title:w,icon:S||"ellipsis"});const I={};return(0,E.isBoolean)(A)&&(I.disabled=A),o.default.createElement(l.Button,{size:"small",type:"secondary",className:D,onClick:T,...I,title:w},o.default.createElement(l.Icon,{icon:S||"ellipsis"}))};v.displayName="EllipsisWidget",t.InlineActionWidget=o.default.memo(({iconService:y,type:S="icon",data:A,context:T=[],className:w,afterClick:D,...I})=>{const O=(0,g.useDesignStyles)(h.default.iconAction,"iconAction"),P=(0,g.useDesignStyles)(h.default.btnAction,"btnAction"),[R,M]=(0,o.useState)(!1),k=o.default.useCallback(async(j,...K)=>{if(j&&(j.preventDefault(),j.stopPropagation()),!R){if(M(!0),A.id===p.SubmenuItemNode.ID&&j){const U={x:j.clientX,y:j.clientY};await A.execute([U,...T])}else typeof A.execute=="function"&&await A.execute([...T,...K]);M(!1),typeof D=="function"&&D()}},[A,T]),[B,x]=o.default.useMemo(()=>{let j=A.tooltip||A.label;const K=A.label;return A.keybinding&&(j=`${j} (${A.keybinding})`),[j,K]},[A]),N=A.id===p.SubmenuItemNode.ID;return S==="icon"&&!A.type?o.default.createElement(l.Button,{type:A.icon?"icon":"link",className:(0,r.default)(O,w,{[h.default.disabled]:A.disabled,[h.default.submenuIconAction]:N}),title:B,iconClass:A.icon,onClick:k,...I},!A.icon&&x):A.type==="checkbox"?o.default.createElement(l.CheckBox,{className:(0,r.default)(w,P),disabled:A.disabled,label:A.label,title:B,checked:A.checked,onChange:j=>k(void 0,j.target.checked),...I}):o.default.createElement(l.Button,{loading:R,className:(0,r.default)(w,P),disabled:A.disabled,onClick:k,size:"small",type:A.type,title:B,...I},(0,s.transformLabelWithCodicon)(x,{margin:"0 3px"},y?.fromString.bind(y)),N&&o.default.createElement(l.Icon,{icon:"down",className:"kt-button-secondary-more"}))}),t.InlineActionWidget.displayName="InlineAction";const f=({data:y,context:S})=>{const A=o.default.useCallback(()=>y.getExecuteArgs(S),[y,S]);return o.default.createElement(y.component,{getExecuteArgs:A})};f.displayName="CustomAction",t.TitleActionList=o.default.memo(({type:y="icon",nav:S=[],more:A=[],moreIcon:T,moreTitle:w,context:D=[],extraNavActions:I=[],moreAtFirst:O=!1,className:P,afterClick:R,menuId:M,iconService:k,regroup:B=(...x)=>x})=>{const x=(0,_.useInjectable)(p.ICtxMenuRenderer),N=(0,_.useInjectable)(p.AbstractMenuService),j=(0,g.useDesignStyles)(h.default.titleActions,"titleActions"),[K,U]=B(S,A),Q=o.default.useCallback(G=>{G.preventDefault(),G.stopPropagation(),U&&x.show({anchor:{x:G.clientX,y:G.clientY},menuNodes:U,args:D,onHide:R})},[U,D]);if(K.length===0&&U.length===0&&I.length===0)return null;const z=U.length>0?o.default.createElement(v,{disabled:U[0].disabled,icon:T,type:y,onClick:Q,title:w}):null;return o.default.createElement("div",{className:(0,r.default)([j,P]),"data-menu-id":M},O&&z,K.map(G=>{if(G.id===p.ComponentMenuItemNode.ID)return o.default.createElement(f,{context:D,data:G,key:G.nodeId});if(G.id===p.SubmenuItemNode.ID){const Z=N.createMenu(G.submenuId);if(!((0,p.generateMergedCtxMenu)({menus:Z}).length>0))return}if(G.id===p.SeparatorMenuItemNode.ID)return o.default.createElement("span",{key:`vertical-divider-${G.id}`,className:h.default.verticalDivider});const Y=G.id===p.SubmenuItemNode.ID?G.submenuId:G.id;return o.default.createElement(t.InlineActionWidget,{id:Y,key:Y,className:(0,r.default)({[h.default.selected]:G.checked}),type:y,data:G,afterClick:R,context:D,iconService:k})}),Array.isArray(I)&&I.length?o.default.createElement(o.default.Fragment,null,K.length&&o.default.createElement("span",{className:h.default.divider}),I):null,!O&&z)}),t.TitleActionList.displayName="TitleActionList";function a(y){const{menus:S,context:A,separator:T="navigation",debounce:w,isFlattenMenu:D=!1,...I}=y,[O,P]=(0,g.useMenus)(S,T,A,w),R=(0,o.useMemo)(()=>D?[...O,...P]:O,[O,P,D]);return o.default.createElement(t.TitleActionList,{menuId:S.menuId,nav:R,more:T==="inline"||D?[]:P,...I})}function b(y){const{iconService:S,menus:A,context:T,moreIcon:w,moreTitle:D,separator:I="navigation",...O}=y,[P,R]=(0,g.useContextMenus)(A);return o.default.createElement(t.TitleActionList,{menuId:A.menuId,nav:P,more:I==="inline"?[]:R,moreIcon:w,moreTitle:D,context:T,iconService:S,...O})}b.displayName="InlineMenuBar"},17647:(L,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:(L,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)),l=e(43718),m=e(22689),E=e(48560),p=e(57995),_=e(24951),s=e(49716),g=e(52141),c=n.__importDefault(e(27410)),h=(0,m.createLayoutEventType)(l.AIInlineChatContentWidgetId),u=new CustomEvent(h,{bubbles:!0}),d=v=>{const{operationList:f,moreOperation:a,showClose:b=!0,onClickItem:y,onClose:S,customOperationRender:A,loading:T,loadingShowOperation:w=!1}=v,D=o.default.useRef(null),[I,O]=(0,E.useHover)(),P=(0,o.useCallback)(()=>{S?.()},[S]);(0,E.useChange)(O,()=>{var k;(k=D.current)===null||k===void 0||k.dispatchEvent(u)});const R=(0,o.useCallback)(()=>T&&w?o.default.createElement("div",{className:c.default.loading_mask}):null,[T,w]),M=(0,o.useCallback)(()=>{if(T&&!w)return null;const k=o.default.createElement(o.default.Fragment,null,f?.map(({name:B,title:x,id:N},j)=>x?o.default.createElement(g.EnhancePopover,{id:N,title:x,key:`popover_${j}`},o.default.createElement(p.EnhanceIcon,{wrapperClassName:c.default.operate_item,onClick:()=>y?.(N)},o.default.createElement("span",{key:j},B))):o.default.createElement(p.EnhanceIcon,{wrapperClassName:c.default.operate_item,onClick:()=>y?.(N),key:j},o.default.createElement("span",null,B))),a?.length?o.default.createElement(p.EnhanceIconWithCtxMenu,{icon:"more",menuNodes:a,wrapperClassName:c.default.operate_btn,skew:{x:-83,y:5}}):null);return o.default.createElement("div",{ref:I,className:c.default.operate_container},R(),o.default.createElement(_.LineVertical,{height:"100%",margin:"0 8px",maxHeight:14,minHeight:14}),A?o.default.createElement("div",{className:c.default.custom_operation_wrapper},A):o.default.createElement("div",{className:c.default.default_operation_wrapper},k))},[A,f,a,T,w]);return o.default.createElement("div",{ref:D,className:(0,r.default)(c.default.ai_action_wrapper,T&&c.default.loading,w&&c.default.loading_show_operation)},o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:c.default.stable_container},T?o.default.createElement(g.EnhancePopover,{id:"inline_chat_loading",title:(0,l.localize)("aiNative.inline.chat.operate.loading.cancel")},o.default.createElement(s.Loading,{className:c.default.loading_icon})):o.default.createElement(p.AILogoAvatar,{className:c.default.ai_action_icon})),M(),b&&o.default.createElement("div",{className:c.default.close_container},o.default.createElement(_.LineVertical,{height:"100%",margin:"0px 8px",maxHeight:14,minHeight:14}),o.default.createElement(p.EnhanceIcon,{wrapperClassName:c.default.operate_btn,icon:"window-close",onClick:P}))))};t.AIAction=d},66205:(L,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)),l=m=>r.default.createElement("div",{className:o.default.inline_chat_container_panel,style:m.style},m.children);t.ContentWidgetContainerPanel=l},57995:(L,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)),l=e(43718),m=e(81878),E=e(97222),p=e(48560),_=n.__importDefault(e(42798));t.EnhanceIcon=o.default.forwardRef((c,h)=>o.default.createElement("div",{className:(0,r.default)(c.wrapperClassName,_.default.ai_enhance_icon),style:c.wrapperStyle,onClick:c.onClick,ref:h,tabIndex:c.tabIndex,role:c.role,"aria-label":c.ariaLabel,"aria-pressed":c.ariaPressed},o.default.createElement(m.Icon,{className:(0,r.default)(c.className,_.default.icon),children:null,onClick:()=>null,style:(c.icon||c.iconClass)&&c.children?{marginRight:5}:{},icon:c.icon,iconClass:c.iconClass}),c.children&&o.default.createElement("span",{className:_.default.children_wrap},c.children)));const s=c=>{const{children:h,menuNodes:u,skew:d,id:v,...f}=c,a=(0,p.useInjectable)(l.CommandService),b=(0,p.useInjectable)(E.IBrowserCtxMenu),[y,S]=o.default.useState(void 0),A=o.default.useRef(null);o.default.useEffect(()=>{T()},[A.current,d]);const T=(0,o.useCallback)(D=>{requestAnimationFrame(()=>{if(A.current){const I=A.current.getBoundingClientRect(),{x:O,y:P,width:R,height:M}=I,k={x:O+R,y:P+M};d&&(k.x+=d.x,k.y+=d.y),S(k),D&&D(k)}})},[A.current,d]),w=o.default.useCallback(()=>{y&&(u?T(D=>{b.show({anchor:D,menuNodes:u})}):v&&a.executeCommand(v))},[A.current,u,y,v]);return o.default.createElement(t.EnhanceIcon,{ref:A,onClick:w,...f},h)};t.EnhanceIconWithCtxMenu=s;const g=c=>o.default.createElement("div",{className:(0,r.default)(_.default.ai_logo_avatar_container,c.className)},o.default.createElement(m.Icon,{icon:"magic-wand",className:(0,r.default)(c.iconClassName,_.default.avatar_icon)}));t.AILogoAvatar=g},89195:(L,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(50610),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)},50610:(L,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)),l=e(57995),m=e(24951),E=e(75777),p=n.__importDefault(e(5011)),_=s=>{const{iconItems:g,isRenderThumbs:c=!0,isRenderClose:h=!1,closeClick:u}=s;return o.default.createElement("div",{className:p.default.ai_inline_result_panel},o.default.createElement("div",{className:p.default.side},g.map(({icon:d,text:v,onClick:f,btnType:a},b)=>o.default.createElement(l.EnhanceIcon,{wrapperClassName:(0,r.default)(p.default.operate_btn,a==="default"?p.default.default:""),icon:d,onClick:f,key:b},o.default.createElement("span",null,v)))),c&&o.default.createElement(o.default.Fragment,null,o.default.createElement(m.LineVertical,{height:"60%",margin:"0px 6px 0 6px"}),o.default.createElement("div",{className:p.default.side},o.default.createElement(E.Thumbs,{wrapperClassName:p.default.operate_icon}))),h&&o.default.createElement(o.default.Fragment,null,o.default.createElement(l.EnhanceIcon,{wrapperClassName:p.default.operate_btn,icon:"close",onClick:u})))};t.AIInlineResult=_},83913:(L,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)),l=e(97267),m=e(43718),E=e(37015),p=e(48560),_=e(7369),s=e(89195),g=n.__importDefault(e(42348)),c=160,h=32,u="ai-native-chat-input-history",d=10;t.InteractiveInput=o.default.forwardRef((v,f)=>{const{placeholder:a,onKeyDown:b,onBlur:y,onValueChange:S,onHeightChange:A,onFocus:T,onSend:w,disabled:D=!1,className:I,height:O,width:P,sendBtnClassName:R,popoverPosition:M,autoFocus:k}=v,B=(0,o.useRef)(null),x=(0,p.useInjectable)(_.GlobalBrowserStorageService),N=(0,o.useRef)(),j=(0,o.useRef)(0),[K,U]=(0,o.useState)(v.value||""),[Q,z]=(0,o.useState)(O||h),[G,Y]=(0,o.useState)(!1),Z=o.default.useRef(!1);(0,o.useImperativeHandle)(f,()=>B.current),(0,o.useEffect)(()=>{const Ae=x.getData(u);Ae&&(N.current=Ae)},[]),(0,o.useEffect)(()=>{B&&B.current&&k&&B.current.focus()},[B]),(0,o.useEffect)(()=>{var Ae;const te=v.value;(0,m.isUndefined)(te)||te!==((Ae=B.current)===null||Ae===void 0?void 0:Ae.value)&&U(te||"")},[v.value,K,B]),(0,o.useEffect)(()=>{(0,m.isUndefined)(O)||O!==Q&&z(O)},[O,Q,A]),(0,o.useEffect)(()=>{if(!K){z(h);return}if(B&&B.current&&Q<=c){B.current.style.height="0px";const Ae=B.current.scrollHeight;B.current.style.height=Math.min(Ae,c)+"px";const te=Math.min(Ae+12,c);z(te)}},[B,K,A,Q]),(0,o.useEffect)(()=>{A?.(Q)},[Q]);const $=(0,o.useCallback)(Ae=>{Z.current=!0,U(Ae),S?.(Ae)},[S]),H=(0,o.useCallback)(Ae=>{Y(!0),T?.(Ae)},[T]),X=(0,o.useCallback)(Ae=>{Y(!1),y?.(Ae)},[y]),J=(0,o.useCallback)(()=>{D||K.trim()&&(N.current=N.current||[],N.current.push(K),j.current=0,x.setData(u,N.current.slice(-d)),Z.current=!1,w?.(K))},[w,K,D]),re=(0,o.useCallback)(Ae=>{var te,Le,Te;if(Ae.key===E.Key.ENTER.code&&!Ae.nativeEvent.isComposing){if(Ae.shiftKey)return;Ae.preventDefault(),J();return}else if((Ae.key===E.Key.ARROW_UP.code||Ae.key===E.Key.ARROW_DOWN.code)&&(!K||!Z.current)){if(Ae.preventDefault(),Ae.key===E.Key.ARROW_UP.code){const oe=(te=N.current)===null||te===void 0?void 0:te[N.current.length-1-j.current];oe&&(U(oe),j.current=Math.min(j.current+1,((Le=N.current)===null||Le===void 0?void 0:Le.length)||0))}else if(Ae.key===E.Key.ARROW_DOWN.code){Ae.preventDefault();const oe=(Te=N.current)===null||Te===void 0?void 0:Te[N.current.length-1-j.current];oe&&(U(oe),j.current=Math.max(j.current-1,0))}}b?.(Ae)},[b,J,K]),ce=(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,G&&g.default.active,D&&g.default.disabled,R)},D?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(l.Popover,{id:`ai_chat_input_send_${(0,m.uuid)(4)}`,content:(0,m.localize)("aiNative.chat.enter.send"),delay:1500,position:M??l.PopoverPosition.top,disable:D},o.default.createElement(s.EnhanceIcon,{wrapperClassName:g.default.send_icon,className:(0,l.getIcon)("send-solid"),onClick:J,tabIndex:0,role:"button",ariaLabel:(0,m.localize)("aiNative.chat.enter.send")})))),[G,D,R,K,M]),fe=(0,o.useMemo)(()=>(0,m.isUndefined)(P)?"100%":P+"px",[P]);return o.default.createElement(l.TextArea,{ref:B,placeholder:a,wrapperStyle:{height:Q+"px",width:fe},style:{height:Q-10+"px"},value:K,onKeyDown:re,onFocus:H,onBlur:X,onValueChange:$,disabled:D,className:(0,r.default)(g.default.interactive_input_container,G?g.default.active:null,I),addonAfter:ce})}),t.InteractiveInput.displayName="interactiveInput"},24951:(L,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"},l={backgroundColor:"var(--editorGroup-border)",width:"100%",height:"1px",minHeight:"1px"},m=p=>r.default.createElement("span",{style:{...o,...p}});t.LineVertical=m;const E=p=>r.default.createElement("span",{style:{...l,...p}});t.HorizontalVertical=E},49716:(L,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)),l=e(97267),m=n.__importDefault(e(43135));t.Loading=o.default.memo(E=>o.default.createElement(l.Icon,{className:(0,r.default)(E.className,m.default.loading_indicator),iconClass:(0,l.getIcon)("loading")})),t.Loading.displayName="Loading"},52141:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnhancePopover=void 0;const r=e(85608).__importStar(e(14041)),o=e(97267),l=e(43718),m=E=>{const{children:p,id:_,title:s,onClick:g}=E,[c,h]=r.default.useState(!1),u=(0,r.useMemo)(()=>_+(0,l.uuid)(6),[_]),d=(0,r.useCallback)(f=>{h(!1),g&&g(f)},[g]),v=(0,r.useCallback)(f=>{h(f)},[]);return r.default.createElement(o.Popover,{id:u,title:s,onClick:d,display:c,onDisplayChange:v},p)};t.EnhancePopover=m},75777:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Thumbs=void 0;const r=e(85608).__importStar(e(14041)),o=e(43718),l=e(95040),m=e(81878),E=e(48560),p=e(67304),_=e(57995),s=g=>{const c=(0,E.useInjectable)(l.IAIInlineChatService),{relationId:h,onClick:u,wrapperClassName:d}=g,[v,f]=(0,r.useState)("thumbs"),[a,b]=(0,r.useState)("thumbsdown"),y=(0,r.useCallback)(T=>{u&&u(T),c&&c.fireThumbsEvent(T)},[h,c]),S=(0,r.useCallback)(T=>{T==="up"&&v==="thumbs"&&(f("thumbs-fill"),b(!1),y(!0)),T==="up"&&v==="thumbs-fill"&&(f("thumbs"),b("thumbsdown")),T==="down"&&a==="thumbsdown"&&(b("thumbsdown-fill"),f(!1),y(!1)),T==="down"&&a==="thumbsdown-fill"&&(b("thumbsdown"),f("thumbs"))},[v,a]),A=(0,E.useUUID)();return r.default.createElement(r.default.Fragment,null,typeof v=="string"&&r.default.createElement(m.Popover,{id:`ai-chat-thumbsup-${A}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title")},r.default.createElement(_.EnhanceIcon,{wrapperClassName:d,onClick:()=>S("up"),className:(0,p.getExternalIcon)(v,p.KTICON_OWNER),tabIndex:0,role:"button",ariaLabel:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title"),ariaPressed:v==="thumbs-fill"?"true":"false"})),typeof a=="string"&&r.default.createElement(m.Popover,{id:`ai-chat-thumbsdown-${A}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title")},r.default.createElement(_.EnhanceIcon,{wrapperClassName:d,onClick:()=>S("down"),className:(0,p.getExternalIcon)(a,p.KTICON_OWNER),tabIndex:0,role:"button",ariaLabel:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title"),ariaPressed:a==="thumbsdown-fill"?"true":"false"})))};t.Thumbs=s},81878:(L,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:(L,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)),l=e(48560),m=e(38578),E=e(55693),p=e(25719),_=n.__importDefault(e(91290)),s=({className:g,children:c=[],direction:h="left-to-right",...u})=>{const d=o.default.Children.toArray(c),v=(0,l.useInjectable)(m.AppConfig),f=(0,E.useDesignStyles)(_.default["box-panel"],"box-panel");(0,o.useEffect)(()=>{v.didRendered&&v.didRendered()},[]);const a=p.Layout.getStyleProperties(h);return o.default.createElement("div",{...u,className:(0,r.default)(f,g),style:{flexDirection:a.direction,zIndex:u.zIndex||u["z-index"]}},d.map((b,y)=>{const S=b.props||{};return o.default.createElement("div",{key:y,id:S["data-wrapper-id"],className:(0,r.default)(_.default.wrapper,S["data-wrapper-class"]),style:{flex:S.flex,overflow:S.overflow,zIndex:S.zIndex||S["z-index"],[a.minSize]:S.defaultSize,backgroundColor:S.backgroundColor}},b)}))};t.BoxPanel=s},28003:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultLayout=t.getStorageValue=void 0,t.ToolbarActionBasedLayout=p,t.fixLayout=_;const r=e(85608).__importDefault(e(14041)),o=e(52564),l=e(57327),m=e(99333),E=()=>{let s={},g={};try{const c=localStorage.getItem("layout");c&&(s=JSON.parse(c));const h=localStorage.getItem("theme");h&&(g=JSON.parse(h))}catch{}return{layout:_(s),colors:g}};t.getStorageValue=E,t.DefaultLayout=p;function p(s={}){var g,c,h,u,d,v;const{layout:f}=(0,t.getStorageValue)();return r.default.createElement(l.BoxPanel,{direction:"top-to-bottom"},r.default.createElement(o.SlotRenderer,{id:"top",defaultSize:s.topSlotDefaultSize||0,slot:"top",zIndex:s.topSlotZIndex}),r.default.createElement(m.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?((c=f.left)===null||c===void 0?void 0:c.size)||310:49,minResize:280,maxResize:480,minSize:49}),r.default.createElement(m.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?((v=f.right)===null||v===void 0?void 0:v.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 c in s)s[c]&&(s[c].size||(g[c].currentId=""));return g}},32293:(L,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:(L,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(l){function m(u){return r[u]}l.getStyleProperties=m;function E(u){return r[u].direction}l.getFlexDirection=E;function p(u){return r[u].size}l.getSizeProperty=p;function _(u){return r[u].domSize}l.getDomSizeProperty=_;function s(u){return r[u].minSize}l.getMinSizeProperty=s;function g(u){return r[u].maxSize}l.getMaxSizeProperty=g;function c(u){return u==="bottom-to-top"||u==="top-to-bottom"?n.ResizeHandleVertical:n.ResizeHandleHorizontal}l.getResizeHandle=c;function h(u){return u==="bottom-to-top"||u==="top-to-bottom"?"row":"column"}l.getTabbarDirection=h})(o||(t.Layout=o={}))},99333:(L,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)),l=e(43718),m=e(68456),E=e(48560),p=e(73215),_=e(25719),s=e(71707),g=n.__importDefault(e(91290));t.PanelContext=o.default.createContext({setSize:(d,v)=>{},setRelativeSize:(d,v,f)=>{},getSize:d=>0,getRelativeSize:d=>[0,0],lockSize:(d,v)=>{},setMaxSize:(d,v)=>{},hidePanel:d=>{}});const c=(d,v,f)=>{var a,b;return(b=d&&d.props&&((a=d.props[v])!==null&&a!==void 0?a:d.props[`data-sp-${v}`]))!==null&&b!==void 0?b:f};function h(d,v){return c(d,"savedSize")?c(d,"savedSize")+"px":c(d,"defaultSize")!==void 0?c(d,"defaultSize")+"px":c(d,"flex")?c(d,"flex")/v*100+"%":1/v*100+"%"}const u=d=>{const v=(0,E.useInjectable)(s.SplitPanelManager).getService(d.id),{id:f,className:a,headerSize:b,resizeHandleClassName:y,style:S,children:A=[],direction:T="left-to-right",resizeKeep:w=!0,dynamicTarget:D}=o.default.useMemo(()=>v.interceptProps(d),[v,v.interceptProps,d]),I=_.Layout.getResizeHandle(T),O=_.Layout.getStyleProperties(T),P=o.default.useMemo(()=>o.default.Children.toArray(A),[A]),R=o.default.useMemo(()=>P.find(Te=>c(Te,"flexGrow")),[P]),M=o.default.useMemo(()=>P.reduce((Te,oe)=>Te+c(oe,"flex",1),0),[P]),k=o.default.useRef([]),B=(0,E.useInjectable)(l.IEventBus),x=o.default.useRef(),N=o.default.useRef(P.map(()=>!1)),j=o.default.useRef(P.map(()=>!1)),K=o.default.useRef(N.current.slice(0,P.length-1)),[U,Q]=o.default.useState(K.current),[z,G]=o.default.useState(j.current),[Y,Z]=o.default.useState(N.current);v.panels=[];const $=o.default.useCallback(Te=>(oe,le)=>{const Ee=le?Te-1:Te,we=k.current[Ee];we&&we.setAbsoluteSize(oe!==void 0?oe:c(P[Te],"defaultSize"),le,w)},[k.current]),H=o.default.useCallback(Te=>(oe,le,Ee)=>{const we=Ee?Te-1:Te,ve=k.current[we];ve&&ve.setRelativeSize(oe,le)},[k.current]),X=o.default.useCallback(Te=>oe=>{const le=oe?Te-1:Te,Ee=k.current[le];return Ee?Ee.getAbsoluteSize(oe):0},[k.current]),J=o.default.useCallback(Te=>oe=>{const le=oe?Te-1:Te,Ee=k.current[le];return Ee?Ee.getRelativeSize():[0,0]},[k.current]),re=o.default.useCallback(Te=>(oe,le)=>{const Ee=le?Te-1:Te,we=K.current.map((ve,be)=>be===Ee?oe!==void 0?oe:!ve:ve);K.current=we,Q(we)},[k.current]),ce=o.default.useCallback(Te=>oe=>{const le=N.current.map((Ee,we)=>we===Te?oe!==void 0?oe:!Ee:Ee);N.current=le,Z(le)},[k.current]),fe=o.default.useCallback(Te=>oe=>{const le=j.current.map((we,ve)=>ve===Te?oe!==void 0?!oe:!we:we);j.current=le;const Ee=c(P[Te],"slot")||c(P[Te],"id");Ee&&Ae(Ee),G(le)},[P,j.current]),Ae=o.default.useCallback(Te=>{Te&&(B.fire(new m.ResizeEvent({slotLocation:Te})),B.fireDirective(m.ResizeEvent.createDirective(Te)))},[B]),te=o.default.useMemo(()=>P.map((Te,oe)=>{const le=[],Ee=c(Te,"minSize"),we=c(Te,"maxSize"),ve=c(Te,"flexGrow");if(oe!==0){const be=oe===1?P[oe-1]:P[oe];let Ce;ve?Ce=p.ResizeFlexMode.Prev:c(P[oe-1],"flexGrow")&&(Ce=p.ResizeFlexMode.Next),c(be,"noResize")||U[oe-1]||le.push(o.default.createElement(I,{className:y,onResize:()=>{const tt=c(P[oe-1],"slot")||c(P[oe-1],"id"),Fe=c(P[oe],"slot")||c(P[oe],"id");Ae(tt),Ae(Fe)},noColor:!0,findNextElement:D?tt=>v.getFirstResizablePanel(oe-1,tt):void 0,findPrevElement:D?tt=>v.getFirstResizablePanel(oe-1,tt,!0):void 0,key:`split-handle-${oe}`,delegate:tt=>{k.current.push(tt)},flexMode:Ce}))}return le.push(o.default.createElement(t.PanelContext.Provider,{key:oe,value:{setSize:$(oe),getSize:X(oe),setRelativeSize:H(oe),getRelativeSize:J(oe),lockSize:re(oe),setMaxSize:ce(oe),hidePanel:fe(oe)}},o.default.createElement("div",{"data-min-resize":c(Te,"minResize"),"data-max-resize":c(Te,"maxResize"),ref:be=>{be&&v.panels.indexOf(be)===-1&&v.panels.push(be)},className:h(Te,M)===`${b}px`?p.RESIZE_LOCK:"",id:c(Te,"id"),style:{...c(Te,"flex")&&!c(Te,"savedSize")&&!R?{flex:c(Te,"flex")}:{[O.size]:h(Te,M)},[O.minSize]:Ee?Ee+"px":"-1px",[O.maxSize]:Y[oe]&&we?we+"px":"unset",...ve!==void 0?{flexGrow:ve}:{},display:z[oe]?"none":"block"}},Te))),le}).filter(Boolean),[A,P,y,D,k.current,z,U]);return o.default.useEffect(()=>{x.current&&v.setRootNode(x.current);const Te=B.onDirective(m.ResizeEvent.createDirective(f),()=>{P.forEach(oe=>{Ae(c(oe,"slot")||c(oe,"id"))})});return()=>{Te.dispose()}},[]),o.default.useMemo(()=>{const{minResize:Te,flexGrow:oe,minSize:le,maxSize:Ee,savedSize:we,defaultSize:ve,flex:be,noResize:Ce,slot:Ne,headerSize:tt,...Fe}=d;return delete Fe.resizeHandleClassName,delete Fe.dynamicTarget,delete Fe.resizeKeep,delete Fe.direction,v.renderSplitPanel(o.default.createElement("div",{...Fe,ref:$e=>x.current=$e,className:(0,r.default)(g.default["split-panel"],a),style:{flexDirection:O.direction,...S},"data-min-resize":Te,"data-max-resize":Ee,"data-min-size":le,"data-max-size":Ee,"data-saved-size":we,"data-default-size":ve,"data-header-size":tt,"data-flex":be,"data-flex-grow":oe,"data-no-resize":Ce,"data-slot":Ne}),te,Fe)},[v,v.renderSplitPanel,te,x,S,d])};t.SplitPanel=u},71707:(L,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),l=e(43718),m=e(38578),E=e(73215);t.ISplitPanelService=Symbol("ISplitPanelService");let p=class extends l.Disposable{constructor(g){super(),this.panelId=g,this._whenReadyDeferred=new l.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,c,h){if(h){if(c){for(let u=g;u>=0;u--)if(!this.panels[u].classList.contains(E.RESIZE_LOCK))return this.panels[u]}else for(let u=g;u>=0;u--)if(!this.panels[u].classList.contains(E.RESIZE_LOCK))return this.panels[u]}else if(c){for(let u=g+1;u<this.panels.length;u++)if(!this.panels[u].classList.contains(E.RESIZE_LOCK))return this.panels[u]}else for(let u=g+1;u<this.panels.length;u++)if(!this.panels[u].classList.contains(E.RESIZE_LOCK))return this.panels[u]}checkChildNoResize(g){var c,h;if(g&&g.type===m.SlotRenderer){const u=(h=this.appConfig.layoutConfig[(c=g.props)===null||c===void 0?void 0:c.slot])===null||h===void 0?void 0:h.modules;if(!u||u.length===0)return!0}return!1}renderSplitPanel(g,c,h){return r.default.cloneElement(g,{...h,...g.props},c)}interceptProps(g){return g}};t.SplitPanelService=p,n.__decorate([(0,o.Autowired)(m.AppConfig),n.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),t.SplitPanelService=p=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],p);let _=class{constructor(){this.services=new Map}getService(g){let c=this.services.get(g);return c||(c=this.injector.get(t.ISplitPanelService,[g]),this.services.set(g,c)),c}};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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(85266),t)},85266:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=e(85608).__importDefault(e(43144)),o=e(48560),l=({id:m,className:E,children:p})=>{const _=(0,o.usePortal)(m,E);return r.default.createPortal(p,_)};t.default=l},73215:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResizeHandleVertical=t.ResizeHandleHorizontal=t.ResizeFlexMode=t.RESIZE_LOCK=void 0,t.preventWebviewCatchMouseEvents=p,t.allowWebviewCatchMouseEvents=_;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(22366),m=n.__importDefault(e(57482));t.RESIZE_LOCK="resize-lock";var E;(function(c){c.Prev="prev",c.Next="next",c.Percentage="Percentage"})(E||(t.ResizeFlexMode=E={}));function p(){const c=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 c)d.classList.add("none-pointer-event");for(const d of u)d?.classList.add("none-pointer-event")}function _(){const c=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 c)d.classList.remove("none-pointer-event");for(const d of u)d?.classList.remove("none-pointer-event")}const s=c=>{const h=o.default.useRef(),u=o.default.useRef(!1),d=o.default.useRef(0),v=o.default.useRef(0),f=o.default.useRef(0),a=o.default.useRef(),b=o.default.useRef(),y=o.default.useRef(),S=(x,N)=>{const j=c.findPrevElement?c.findPrevElement():a.current,K=c.findNextElement?c.findNextElement():b.current;if(j&&j.classList.contains(t.RESIZE_LOCK)||K&&K.classList.contains(t.RESIZE_LOCK))return;const U=h.current.parentElement.offsetWidth,Q=Number(j?.dataset.minResize||0),z=Number(K?.dataset.minResize||0),G=Number(j?.dataset.maxResize||0),Y=Number(K?.dataset.maxResize||0);(Q||z)&&(x*U<=Q||N*U<=z)||(G||Y)&&(x*U>=G||N*U>=Y)||(K&&(K.style.width=N*100+"%"),j&&(j.style.width=x*100+"%"),c.onResize&&K&&j&&c.onResize(j,K))},A=(x,N,j,K)=>{var U,Q;const z=c.findPrevElement?c.findPrevElement(K):a.current,G=c.findNextElement?c.findNextElement(K):b.current,Y=Number((U=z?.dataset.minResize)!==null&&U!==void 0?U:0),Z=Number((Q=G?.dataset.minResize)!==null&&Q!==void 0?Q:0),$=z?.dataset.maxResize?Number(z?.dataset.maxResize):null,H=G?.dataset.maxResize?Number(G?.dataset.maxResize):null,X=c.flexMode===E.Prev,J=X?z:G,re=X?G:z;let ce=X?x:N;j||((Y||Z)&&(X?Y>x?ce=Y:Z>N&&(ce=x+N-Z):Z>N?ce=Z:Y>x&&(ce=x+N-Y)),($||H)&&(X?$&&$<=x?ce=$:H&&H>N&&(ce=x+N-H):H&&H<=N?ce=H:$&&$>N&&(ce=x+N-$))),J.style.width=ce+"px",J.style.flexGrow="0",J.style.flexShrink="1",re.style.width="0",re.style.flexGrow="1",re.style.flexShrink="0",c.onResize&&G&&z&&c.onResize(z,G)},T=(x,N)=>{const j=a.current,K=b.current;let U;c.flexMode?U=(j.offsetWidth+K.offsetWidth)/j.parentElement.offsetWidth*100:U=+b.current.style.width.replace("%","")+ +a.current.style.width.replace("%",""),K&&(K.style.width=N/(x+N)*U+"%"),j&&(j.style.width=x/(x+N)*U+"%"),w(x,N),c.onResize&&K&&j&&c.onResize(j,K)},w=(x,N)=>{const j=a.current,K=b.current;let U=!1;j&&(x===0?(j.classList.add("kt_display_none"),U=!0):j.classList.remove("kt_display_none")),K&&(N===0?(K.classList.add("kt_display_none"),U=!0):K.classList.remove("kt_display_none")),h.current&&(U?h.current.classList.add("none-pointer-event"):h.current.classList.remove("none-pointer-event"))},D=()=>{const x=a.current.clientWidth,N=b.current.clientWidth,j=x+N,K=[];return K.push(x/j),K.push(N/j),K},I=(x,N)=>{l.fastdom.measure(()=>{const j=a.current.clientWidth,K=b.current.clientWidth,U=j+K;if(c.flexMode){const Q=c.flexMode===E.Prev?x:U-x,z=c.flexMode===E.Next?x:U-x;A(Q,z,!0)}else{const Q=+b.current.style.width.replace("%",""),z=+a.current.style.width.replace("%",""),G=Q+z;N?(b.current.style.width=G*(x/U)+"%",a.current.style.width=G*(1-x/U)+"%"):(a.current.style.width=G*(x/U)+"%",b.current.style.width=G*(1-x/U)+"%")}N?w(U-x,x):w(x,U-x),c.onResize&&c.onResize(a.current,b.current)})},O=x=>x?b.current.clientWidth:a.current.clientWidth,P=x=>{const N=x.classList,j=m.default["resize-overflow-hidden"];N?.contains(j)||N.add(j)},R=x=>{const N=x.classList,j=m.default["resize-overflow-hidden"];N?.contains(j)&&N.remove(j)},M=x=>{if(x.preventDefault(),h.current&&h.current.classList.contains("no-resize"))return;const N=v.current+x.pageX-d.current,j=f.current-(x.pageX-d.current);y.current&&y.current.dispose(),y.current=l.fastdom.mutate(()=>{if(c.flexMode)A(N,j);else{const K=h.current.parentElement.offsetWidth;S(N/K,j/K)}})},k=()=>{u.current=!1,document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",k),c.onFinished&&c.onFinished(),l.fastdom.mutate(()=>{var x;(x=h.current)===null||x===void 0||x.classList.remove(m.default.active),R(a.current),R(b.current),_()})},B=x=>{u.current=!0,document.addEventListener("mousemove",M),document.addEventListener("mouseup",k),d.current=x.pageX,l.fastdom.measure(()=>{v.current=a.current.offsetWidth,f.current=b.current.offsetWidth,l.fastdom.mutate(()=>{var N;(N=h.current)===null||N===void 0||N.classList.add(m.default.active),P(a.current),P(b.current),p()})})};return o.default.useEffect(()=>(h.current&&(h.current.addEventListener("mousedown",B),a.current=h.current.previousSibling,b.current=h.current.nextSibling),()=>{h.current&&(h.current.removeEventListener("mousedown",B),h.current.removeEventListener("mousemove",M),h.current.removeEventListener("mouseup",k))}),[]),c.delegate&&c.delegate({setSize:S,setAbsoluteSize:I,getAbsoluteSize:O,setRelativeSize:T,getRelativeSize:D}),o.default.createElement("div",{ref:x=>{h.current=x},className:(0,r.default)({[m.default["resize-handle-horizontal"]]:!0,[m.default["with-color"]]:!c.noColor,[c.className||""]:!0})})};t.ResizeHandleHorizontal=s;const g=c=>{const h=o.default.useRef(),u=o.default.useRef(!1),d=o.default.useRef(0),v=o.default.useRef(0),f=o.default.useRef(0),a=o.default.useRef(),b=o.default.useRef(),y=o.default.useRef(),S=o.default.useRef(),A=(x,N,j)=>{const K=c.findPrevElement?c.findPrevElement(j):a.current,U=c.findNextElement?c.findNextElement(j):b.current;!U||!K||K.classList.contains(t.RESIZE_LOCK)||U.classList.contains(t.RESIZE_LOCK)||(U.style.height=N*100+"%",K.style.height=x*100+"%",c.onResize&&c.onResize(K,U))},T=(x,N,j,K)=>{var U,Q;const z=c.findPrevElement?c.findPrevElement(K):a.current,G=c.findNextElement?c.findNextElement(K):b.current;let Y,Z,$=0;const H=Number(((U=z?.dataset)===null||U===void 0?void 0:U.minResize)||0),X=Number(((Q=G?.dataset)===null||Q===void 0?void 0:Q.minResize)||0);c.flexMode===E.Prev?(Y=z,Z=G,$=x,j||(H>x?$=H:X>N&&($=x+N-X))):(Y=G,Z=z,$=N,j||(X>N?$=X:H>x&&($=x+N-H))),Y.style.height=$+"px",Y.style.flexGrow="0",Y.style.flexShrink="1",Z.style.height="0",Z.style.flexGrow="1",Z.style.flexShrink="0",c.onResize&&G&&z&&c.onResize(z,G)},w=(x,N)=>{const j=a.current,K=b.current;let U;c.flexMode?U=(j.offsetHeight+K.offsetHeight)/j.parentElement.offsetHeight*100:U=+K.style.height.replace("%","")+ +j.style.height.replace("%",""),K&&(K.style.height=N/(x+N)*U+"%"),j&&(j.style.height=x/(x+N)*U+"%"),D(x,N),c.onResize&&K&&j&&c.onResize(j,K)},D=(x,N)=>{const j=a.current,K=b.current;let U=!1;j&&(x===0?(j.classList.add("kt_display_none"),U=!0):j.classList.remove("kt_display_none")),K&&(N===0?(K.classList.add("kt_display_none"),U=!0):K.classList.remove("kt_display_none")),h.current&&(U?h.current.classList.add("none-pointer-event"):h.current.classList.remove("none-pointer-event"))},I=()=>{const x=a.current.clientHeight,N=b.current.clientHeight,j=x+N,K=[];return K.push(x/j),K.push(N/j),K},O=(x,N,j,K)=>{j.classList.contains(t.RESIZE_LOCK)||K.classList.contains(t.RESIZE_LOCK)||(K.style.height=N+"px",j.style.height=x+"px",K.style.flex="unset",j.style.flex="unset",c.onResize&&K&&j&&c.onResize(j,K))},P=(x,N,j)=>{if(!a.current||!b.current)return;const K=a.current.clientHeight,U=b.current.clientHeight,Q=K+U;if(c.flexMode){const z=c.flexMode===E.Prev?x:Q-x,G=c.flexMode===E.Next?x:Q-x;T(z,G,!0)}else{const z=+b.current.style.height.replace(/\%|px/,""),G=+a.current.style.height.replace(/\%|px/,""),Y=z+G;if(N){j&&(a.current.style.height=Y*(1-x/Q)+"%");const Z=Y*(x/Q);b.current.style.height=Z===0?Z+"px":Z+"%"}else a.current.style.height=Y*(x/Q)+"%",j&&(b.current.style.height=Y*(1-x/Q)+"%")}N?D(Q-x,x):D(x,Q-x),c.onResize&&c.onResize(a.current,b.current)},R=x=>x?b.current.clientHeight:a.current.clientHeight,M=x=>{u.current=!0,document.addEventListener("mousemove",k),document.addEventListener("mouseup",B),d.current=x.pageY,S.current=b.current,y.current=a.current,l.fastdom.measure(()=>{v.current=a.current.offsetHeight,f.current=b.current.offsetHeight,l.fastdom.mutate(()=>{var N;(N=h.current)===null||N===void 0||N.classList.add(m.default.active),p()})})},k=x=>{x.preventDefault(),!(h.current&&h.current.classList.contains("no-resize"))&&l.fastdom.measure(()=>{const N=x.pageY>d.current,j=c.findNextElement?c.findNextElement(N):null,K=c.findPrevElement?c.findPrevElement(N):null;if(j!==null&&S.current!==j||K!==null&&y.current!==K){if(!j||!K)return;S.current=j,y.current=K,d.current=x.pageY,v.current=y.current.offsetHeight,f.current=S.current.offsetHeight}const U=v.current+x.pageY-d.current,Q=f.current-(x.pageY-d.current),z=Number(y.current.dataset.minResize||0),G=Number(S.current.dataset.minResize||0);(z||G)&&(U<=z||Q<=G)||l.fastdom.mutate(()=>{if(c.flexMode===E.Prev||c.flexMode===E.Next)T(U,Q);else if(c.flexMode===E.Percentage){const Y=h.current.parentElement.offsetHeight;A(U/Y,Q/Y)}else O(U,Q,y.current,S.current)})})},B=x=>{u.current=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",B),l.fastdom.mutate(()=>{var N;(N=h.current)===null||N===void 0||N.classList.remove(m.default.active),c.onFinished&&c.onFinished(),_()})};return o.default.useEffect(()=>(h.current.addEventListener("mousedown",M),a.current=h.current.previousSibling,b.current=h.current.nextSibling,()=>{h.current.removeEventListener("mousedown",M),document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",B)}),[]),c.delegate&&c.delegate({setSize:A,setAbsoluteSize:P,getAbsoluteSize:R,setRelativeSize:w,getRelativeSize:I}),o.default.createElement("div",{ref:x=>x&&(h.current=x),className:(0,r.default)({[m.default["resize-handle-vertical"]]:!0,[c.className||""]:!0,[m.default["with-color"]]:!c.noColor})})};t.ResizeHandleVertical=g},77331:(L,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 l=m=>(m={...m,className:(0,r.default)("kt_select",m.className)},o.default.createElement("select",{...m}));t.Select=l},53736:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiLineEditsIsVisible=t.InlineDiffPartialEditsIsVisible=t.InlineInputWidgetIsVisible=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.InlineInputWidgetIsVisible=new n.RawContextKey("ai.native.inlineInputWidgetIsVisible",!1),t.InlineDiffPartialEditsIsVisible=new n.RawContextKey("ai.native.inlineDiffPartialEditsIsVisible",!1),t.MultiLineEditsIsVisible=new n.RawContextKey("ai.native.multiLineEditsIsVisible",!1)},20162:(L,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:(L,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:(L,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:(L,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:(L,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:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceContextKey=void 0;const n=e(43718),r=e(63214);class o{constructor(m,E=r.getLanguageIdFromMonaco,p="resource"){if(this.contextKeyService=m,this.languageResolver=E,!p)throw new Error("resource key prefix cannot be empty!");this.resourceScheme=this.contextKeyService.createKey(p+"Scheme",""),this.resourceFilename=this.contextKeyService.createKey(p+"Filename",""),this.resourceExtname=this.contextKeyService.createKey(p+"Extname",""),this.resourceLangId=this.contextKeyService.createKey(p+"LangId",""),this.resourceKey=this.contextKeyService.createKey(p,""),this.isFileSystemResource=this.contextKeyService.createKey("isFileSystem"+p.substr(0,1).toUpperCase()+p.substr(1),!1)}set(m){if(!m){this.reset();return}const E=this.resourceKey.get();m.isEqual(new n.URI(E))||(this.resourceScheme.set(m.scheme),this.resourceFilename.set(m.path.name+m.path.ext),this.resourceExtname.set(m.path.ext),this.resourceLangId.set(this.languageResolver(m)),this.resourceKey.set(m.toString()),this.isFileSystemResource.set(m.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:(L,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:(L,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:(L,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:(L,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:(L,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=E;const n=e(43718),r=e(69734),o=e(87863),l=e(78132),m={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(p=>p.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:m.confirmDelete,description:"%preference.explorer.confirm.move%"},"explorer.confirmDelete":{type:"boolean",default:m.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:[`
|
|
28325
28325
|
`,`\r
|