@neuralnomads/codenomad-dev 0.16.0-dev-20260515-1dbb4a91 → 0.16.0-dev-20260517-00bfe52f

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.
Files changed (32) hide show
  1. package/package.json +1 -1
  2. package/public/assets/{ChangesTab-BfLiFDRR.js → ChangesTab-h7N4cxR7.js} +1 -1
  3. package/public/assets/{DiffToolbar-DJokckqI.js → DiffToolbar-h4_ij7Yi.js} +1 -1
  4. package/public/assets/{FilesTab-DAfAen0j.js → FilesTab-BQTLjPSW.js} +1 -1
  5. package/public/assets/{GitChangesTab-sYmIM8mA.js → GitChangesTab-BuFOMn0g.js} +1 -1
  6. package/public/assets/{SplitFilePanel-CiZrHI3o.js → SplitFilePanel-CO765UL-.js} +1 -1
  7. package/public/assets/StatusTab-DgvgVtyk.js +1 -0
  8. package/public/assets/{align-justify-wTXyHHYC.js → align-justify-BZaelTNi.js} +1 -1
  9. package/public/assets/{bundle-full-B_MbXXHv.js → bundle-full-DWpCCZ0v.js} +1 -1
  10. package/public/assets/{diff-viewer-CfNy86Qe.js → diff-viewer-Dh0sYi_l.js} +1 -1
  11. package/public/assets/{index-UCZ7MxNK.js → index--LOOdxst.js} +1 -1
  12. package/public/assets/{index-BvfQjuig.js → index-BuQbzboH.js} +1 -1
  13. package/public/assets/{index-BTenW4sL.js → index-CFlARfUN.js} +1 -1
  14. package/public/assets/{index-DskBWxXS.js → index-CXCTlmS7.js} +2 -2
  15. package/public/assets/{index-DYa3o0_M.js → index-CiDcxYm_.js} +1 -1
  16. package/public/assets/index-CujuM9VX.css +1 -0
  17. package/public/assets/{index-DslkXxdb.js → index-DDMCnuGe.js} +1 -1
  18. package/public/assets/{index-Chghci_R.js → index-JzIbSKO3.js} +1 -1
  19. package/public/assets/{index-BsYORY4z.js → index-No6qqRt1.js} +1 -1
  20. package/public/assets/{index-CK51N0B7.js → index-zb6R8lkB.js} +1 -1
  21. package/public/assets/{loading-hkCubi3k.js → loading-DfOpdGmE.js} +1 -1
  22. package/public/assets/main-CuzUuQRM.js +63 -0
  23. package/public/assets/{markdown-Ju_GSx87.js → markdown-DYqTDTpr.js} +3 -3
  24. package/public/assets/{tool-call-DQzqJ4WU.js → tool-call--Y05fupX.js} +3 -3
  25. package/public/assets/{unified-picker-C47f5lFi.js → unified-picker-BtSq6eO9.js} +1 -1
  26. package/public/assets/{wrap-text-xhHluRd3.js → wrap-text-DvzNO1HR.js} +1 -1
  27. package/public/index.html +3 -3
  28. package/public/loading.html +3 -3
  29. package/public/sw.js +1 -1
  30. package/public/assets/StatusTab-B0_DbaX9.js +0 -1
  31. package/public/assets/index-i5UooSrU.css +0 -1
  32. package/public/assets/main-CXoIBcJC.js +0 -62
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuralnomads/codenomad-dev",
3
- "version": "0.16.0-dev-20260515-1dbb4a91",
3
+ "version": "0.16.0-dev-20260517-00bfe52f",
4
4
  "description": "CodeNomad Server",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-B3iAKbO0.js","assets/git-diff-vendor-CSgooKT_.js","assets/fast-diff-vendor-DgdwVvTQ.js","assets/highlight-vendor-8FKMu9os.js","assets/git-diff-vendor-HAZkIolJ.css"])))=>i.map(i=>d[i]);
2
- import{_ as K}from"./index-DskBWxXS.js";import{m as B,t as g,i as a,d as w,a as z,f as N}from"./monaco-viewer-B3iAKbO0.js";import{c as f,n as c,a as L,F,S as W,z as j,A as q}from"./git-diff-vendor-CSgooKT_.js";import{D as G}from"./DiffToolbar-DJokckqI.js";import{S as H}from"./SplitFilePanel-CiZrHI3o.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./main-CXoIBcJC.js";import"./align-justify-wTXyHHYC.js";import"./wrap-text-xhHluRd3.js";var J=g('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),T=g("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),Q=g('<div class="p-3 text-xs text-secondary">'),E=g("<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class=file-list-item-stats><span class=file-list-item-additions>+</span><span class=file-list-item-deletions>-"),U=g("<span class=files-tab-selected-path><span class=file-path-text>"),X=g('<div class=files-tab-stats style="flex:0 0 auto"><span class="files-tab-stat files-tab-stat-additions"><span class=files-tab-stat-value>+</span></span><span class="files-tab-stat files-tab-stat-deletions"><span class=files-tab-stat-value>-'),Y=g("<div style=margin-left:auto>");const Z=q(()=>K(()=>import("./monaco-viewer-B3iAKbO0.js").then(e=>e.ad),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoDiffViewer}))),ce=e=>{const M=f(()=>e.activeSessionId()),S=f(()=>!!(M()&&M()!=="info")),D=f(()=>S()?e.activeSessionDiffs():null),m=f(()=>{const n=D();return Array.isArray(n)?[...n].sort((i,l)=>String(i.file||"").localeCompare(String(l.file||""))):[]}),R=f(()=>m().reduce((n,i)=>(n.additions+=typeof i.additions=="number"?i.additions:0,n.deletions+=typeof i.deletions=="number"?i.deletions:0,n),{additions:0,deletions:0})),I=f(()=>{const n=m();return n.length===0?null:n.reduce((i,l)=>{const v=typeof(i==null?void 0:i.additions)=="number"?i.additions:0,y=typeof(i==null?void 0:i.deletions)=="number"?i.deletions:0,x=v+y,k=typeof(l==null?void 0:l.additions)=="number"?l.additions:0,t=typeof(l==null?void 0:l.deletions)=="number"?l.deletions:0,r=k+t;return r>x?l:r<x?i:String(l.file||"").localeCompare(String((i==null?void 0:i.file)||""))<0?l:i},n[0])}),P=f(()=>{const n=e.selectedFile(),i=m();if(n){const l=i.find(v=>v.file===n);if(l)return l}return I()}),O=f(()=>`${e.instanceId}:${S()?M():"no-session"}`),V=f(()=>{if(!S())return e.t("instanceShell.sessionChanges.noSessionSelected");const n=D();return n===void 0?e.t("instanceShell.sessionChanges.loading"):!Array.isArray(n)||n.length===0?e.t("instanceShell.sessionChanges.empty"):e.t("instanceShell.filesShell.viewerEmpty")}),A=f(()=>{const n=P();return n!=null&&n.file?String(n.file):e.t("instanceShell.rightPanel.tabs.changes")});return B(()=>{const n=m(),i=R(),l=P(),v=()=>(()=>{var t=J(),r=t.firstChild;return a(r,c(W,{get when(){return l&&S()&&n.length>0?l:null},get fallback(){return(()=>{var d=T(),s=d.firstChild;return a(s,V),d})()},children:d=>c(j,{get fallback(){return(()=>{var s=T(),u=s.firstChild;return a(u,()=>e.t("instanceInfo.loading")),s})()},get children(){return c(Z,{get scopeKey(){return O()},get path(){return String(d().file||"")},get patch(){return String(d().patch||"")},get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrap(){return e.diffWordWrapMode()}})}})})),t})(),y=()=>(()=>{var t=Q();return a(t,V),t})();return c(H,{get header(){return[(()=>{var t=U(),r=t.firstChild;return a(r,A),L(()=>w(t,"title",A())),t})(),(()=>{var t=X(),r=t.firstChild,d=r.firstChild;d.firstChild;var s=r.nextSibling,u=s.firstChild;return u.firstChild,a(d,()=>i.additions,null),a(u,()=>i.deletions,null),t})(),(()=>{var t=Y();return a(t,c(G,{get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrapMode(){return e.diffWordWrapMode()},get onViewModeChange(){return e.onViewModeChange},get onContextModeChange(){return e.onContextModeChange},get onWordWrapModeChange(){return e.onWordWrapModeChange}})),t})()]},list:{panel:()=>c(W,{get when(){return n.length>0},get fallback(){return y()},get children(){return c(F,{each:n,children:t=>(()=>{var r=E(),d=r.firstChild,s=d.firstChild,u=s.firstChild,b=s.nextSibling,h=b.firstChild;h.firstChild;var C=h.nextSibling;return C.firstChild,r.$$click=()=>{e.onSelectFile(t.file,e.isPhoneLayout())},a(u,()=>t.file),a(h,()=>t.additions,null),a(C,()=>t.deletions,null),L(o=>{var _=`file-list-item ${(l==null?void 0:l.file)===t.file?"file-list-item-active":""}`,$=t.file;return _!==o.e&&z(r,o.e=_),$!==o.t&&w(s,"title",o.t=$),o},{e:void 0,t:void 0}),r})()})}}),overlay:()=>c(W,{get when(){return n.length>0},get fallback(){return y()},get children(){return c(F,{each:n,children:t=>(()=>{var r=E(),d=r.firstChild,s=d.firstChild,u=s.firstChild,b=s.nextSibling,h=b.firstChild;h.firstChild;var C=h.nextSibling;return C.firstChild,r.$$click=()=>{e.onSelectFile(t.file,!0)},a(u,()=>t.file),a(h,()=>t.additions,null),a(C,()=>t.deletions,null),L(o=>{var _=`file-list-item ${(l==null?void 0:l.file)===t.file?"file-list-item-active":""}`,$=t.file,p=t.file;return _!==o.e&&z(r,o.e=_),$!==o.t&&w(r,"title",o.t=$),p!==o.a&&w(s,"title",o.a=p),o},{e:void 0,t:void 0,a:void 0}),r})()})}})},get viewer(){return v()},get listOpen(){return e.listOpen()},get onToggleList(){return e.onToggleList},get splitWidth(){return e.splitWidth()},get onResizeMouseDown(){return e.onResizeMouseDown},get onResizeTouchStart(){return e.onResizeTouchStart},get isPhoneLayout(){return e.isPhoneLayout()},get overlayAriaLabel(){return e.t("instanceShell.rightPanel.tabs.changes")}})})};N(["click"]);export{ce as default};
2
+ import{_ as K}from"./index-CXCTlmS7.js";import{m as B,t as g,i as a,d as w,a as z,f as N}from"./monaco-viewer-B3iAKbO0.js";import{c as f,n as c,a as L,F,S as W,z as j,A as q}from"./git-diff-vendor-CSgooKT_.js";import{D as G}from"./DiffToolbar-h4_ij7Yi.js";import{S as H}from"./SplitFilePanel-CO765UL-.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./main-CuzUuQRM.js";import"./align-justify-BZaelTNi.js";import"./wrap-text-DvzNO1HR.js";var J=g('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),T=g("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),Q=g('<div class="p-3 text-xs text-secondary">'),E=g("<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class=file-list-item-stats><span class=file-list-item-additions>+</span><span class=file-list-item-deletions>-"),U=g("<span class=files-tab-selected-path><span class=file-path-text>"),X=g('<div class=files-tab-stats style="flex:0 0 auto"><span class="files-tab-stat files-tab-stat-additions"><span class=files-tab-stat-value>+</span></span><span class="files-tab-stat files-tab-stat-deletions"><span class=files-tab-stat-value>-'),Y=g("<div style=margin-left:auto>");const Z=q(()=>K(()=>import("./monaco-viewer-B3iAKbO0.js").then(e=>e.ad),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoDiffViewer}))),ce=e=>{const M=f(()=>e.activeSessionId()),S=f(()=>!!(M()&&M()!=="info")),D=f(()=>S()?e.activeSessionDiffs():null),m=f(()=>{const n=D();return Array.isArray(n)?[...n].sort((i,l)=>String(i.file||"").localeCompare(String(l.file||""))):[]}),R=f(()=>m().reduce((n,i)=>(n.additions+=typeof i.additions=="number"?i.additions:0,n.deletions+=typeof i.deletions=="number"?i.deletions:0,n),{additions:0,deletions:0})),I=f(()=>{const n=m();return n.length===0?null:n.reduce((i,l)=>{const v=typeof(i==null?void 0:i.additions)=="number"?i.additions:0,y=typeof(i==null?void 0:i.deletions)=="number"?i.deletions:0,x=v+y,k=typeof(l==null?void 0:l.additions)=="number"?l.additions:0,t=typeof(l==null?void 0:l.deletions)=="number"?l.deletions:0,r=k+t;return r>x?l:r<x?i:String(l.file||"").localeCompare(String((i==null?void 0:i.file)||""))<0?l:i},n[0])}),P=f(()=>{const n=e.selectedFile(),i=m();if(n){const l=i.find(v=>v.file===n);if(l)return l}return I()}),O=f(()=>`${e.instanceId}:${S()?M():"no-session"}`),V=f(()=>{if(!S())return e.t("instanceShell.sessionChanges.noSessionSelected");const n=D();return n===void 0?e.t("instanceShell.sessionChanges.loading"):!Array.isArray(n)||n.length===0?e.t("instanceShell.sessionChanges.empty"):e.t("instanceShell.filesShell.viewerEmpty")}),A=f(()=>{const n=P();return n!=null&&n.file?String(n.file):e.t("instanceShell.rightPanel.tabs.changes")});return B(()=>{const n=m(),i=R(),l=P(),v=()=>(()=>{var t=J(),r=t.firstChild;return a(r,c(W,{get when(){return l&&S()&&n.length>0?l:null},get fallback(){return(()=>{var d=T(),s=d.firstChild;return a(s,V),d})()},children:d=>c(j,{get fallback(){return(()=>{var s=T(),u=s.firstChild;return a(u,()=>e.t("instanceInfo.loading")),s})()},get children(){return c(Z,{get scopeKey(){return O()},get path(){return String(d().file||"")},get patch(){return String(d().patch||"")},get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrap(){return e.diffWordWrapMode()}})}})})),t})(),y=()=>(()=>{var t=Q();return a(t,V),t})();return c(H,{get header(){return[(()=>{var t=U(),r=t.firstChild;return a(r,A),L(()=>w(t,"title",A())),t})(),(()=>{var t=X(),r=t.firstChild,d=r.firstChild;d.firstChild;var s=r.nextSibling,u=s.firstChild;return u.firstChild,a(d,()=>i.additions,null),a(u,()=>i.deletions,null),t})(),(()=>{var t=Y();return a(t,c(G,{get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrapMode(){return e.diffWordWrapMode()},get onViewModeChange(){return e.onViewModeChange},get onContextModeChange(){return e.onContextModeChange},get onWordWrapModeChange(){return e.onWordWrapModeChange}})),t})()]},list:{panel:()=>c(W,{get when(){return n.length>0},get fallback(){return y()},get children(){return c(F,{each:n,children:t=>(()=>{var r=E(),d=r.firstChild,s=d.firstChild,u=s.firstChild,b=s.nextSibling,h=b.firstChild;h.firstChild;var C=h.nextSibling;return C.firstChild,r.$$click=()=>{e.onSelectFile(t.file,e.isPhoneLayout())},a(u,()=>t.file),a(h,()=>t.additions,null),a(C,()=>t.deletions,null),L(o=>{var _=`file-list-item ${(l==null?void 0:l.file)===t.file?"file-list-item-active":""}`,$=t.file;return _!==o.e&&z(r,o.e=_),$!==o.t&&w(s,"title",o.t=$),o},{e:void 0,t:void 0}),r})()})}}),overlay:()=>c(W,{get when(){return n.length>0},get fallback(){return y()},get children(){return c(F,{each:n,children:t=>(()=>{var r=E(),d=r.firstChild,s=d.firstChild,u=s.firstChild,b=s.nextSibling,h=b.firstChild;h.firstChild;var C=h.nextSibling;return C.firstChild,r.$$click=()=>{e.onSelectFile(t.file,!0)},a(u,()=>t.file),a(h,()=>t.additions,null),a(C,()=>t.deletions,null),L(o=>{var _=`file-list-item ${(l==null?void 0:l.file)===t.file?"file-list-item-active":""}`,$=t.file,p=t.file;return _!==o.e&&z(r,o.e=_),$!==o.t&&w(r,"title",o.t=$),p!==o.a&&w(s,"title",o.a=p),o},{e:void 0,t:void 0,a:void 0}),r})()})}})},get viewer(){return v()},get listOpen(){return e.listOpen()},get onToggleList(){return e.onToggleList},get splitWidth(){return e.splitWidth()},get onResizeMouseDown(){return e.onResizeMouseDown},get onResizeTouchStart(){return e.onResizeTouchStart},get isPhoneLayout(){return e.isPhoneLayout()},get overlayAriaLabel(){return e.t("instanceShell.rightPanel.tabs.changes")}})})};N(["click"]);export{ce as default};
@@ -1 +1 @@
1
- import{t as g,i as c,m as W,d as i,a as S,f as C}from"./monaco-viewer-B3iAKbO0.js";import{u as T}from"./index-DskBWxXS.js";import{n as o,m as $,a as V}from"./git-diff-vendor-CSgooKT_.js";import{I as U,S as A,O as I}from"./main-CXoIBcJC.js";import{A as D}from"./align-justify-wTXyHHYC.js";import{W as E}from"./wrap-text-xhHluRd3.js";const F=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m15 5-3-3-3 3",key:"itvq4r"}]],H=t=>o(U,$(t,{name:"UnfoldVertical",iconNode:F}));var N=g("<div class=file-viewer-toolbar><button type=button class=file-viewer-toolbar-icon-button></button><button type=button class=file-viewer-toolbar-icon-button></button><button type=button>");const z=t=>{const{t:a}=T(),d=()=>t.viewMode==="split"?"unified":"split",s=()=>t.contextMode==="collapsed"?"expanded":"collapsed",f=()=>t.wordWrapMode==="on"?"off":"on",h=()=>d()==="split"?a("instanceShell.diff.switchToSplit"):a("instanceShell.diff.switchToUnified"),v=()=>s()==="collapsed"?a("instanceShell.diff.hideUnchanged"):a("instanceShell.diff.showFull"),u=()=>f()==="on"?a("instanceShell.diff.enableWordWrap"):a("instanceShell.diff.disableWordWrap");return(()=>{var b=N(),n=b.firstChild,l=n.nextSibling,r=l.nextSibling;return n.$$click=()=>t.onViewModeChange(d()),c(n,(()=>{var e=W(()=>d()==="split");return()=>e()?o(A,{class:"h-4 w-4","aria-hidden":"true"}):o(D,{class:"h-4 w-4","aria-hidden":"true"})})()),l.$$click=()=>t.onContextModeChange(s()),c(l,(()=>{var e=W(()=>s()==="collapsed");return()=>e()?o(I,{class:"h-4 w-4","aria-hidden":"true"}):o(H,{class:"h-4 w-4","aria-hidden":"true"})})()),r.$$click=()=>t.onWordWrapModeChange(f()),c(r,o(E,{class:"h-4 w-4","aria-hidden":"true"})),V(e=>{var m=h(),w=h(),M=v(),p=v(),x=`file-viewer-toolbar-icon-button${t.wordWrapMode==="on"?" active":""}`,k=u(),y=u();return m!==e.e&&i(n,"aria-label",e.e=m),w!==e.t&&i(n,"title",e.t=w),M!==e.a&&i(l,"aria-label",e.a=M),p!==e.o&&i(l,"title",e.o=p),x!==e.i&&S(r,e.i=x),k!==e.n&&i(r,"aria-label",e.n=k),y!==e.s&&i(r,"title",e.s=y),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),b})()};C(["click"]);export{z as D};
1
+ import{t as g,i as c,m as W,d as i,a as S,f as C}from"./monaco-viewer-B3iAKbO0.js";import{u as T}from"./index-CXCTlmS7.js";import{n as o,m as $,a as V}from"./git-diff-vendor-CSgooKT_.js";import{I as U,S as A,O as I}from"./main-CuzUuQRM.js";import{A as D}from"./align-justify-BZaelTNi.js";import{W as E}from"./wrap-text-DvzNO1HR.js";const F=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m15 5-3-3-3 3",key:"itvq4r"}]],H=t=>o(U,$(t,{name:"UnfoldVertical",iconNode:F}));var N=g("<div class=file-viewer-toolbar><button type=button class=file-viewer-toolbar-icon-button></button><button type=button class=file-viewer-toolbar-icon-button></button><button type=button>");const z=t=>{const{t:a}=T(),d=()=>t.viewMode==="split"?"unified":"split",s=()=>t.contextMode==="collapsed"?"expanded":"collapsed",f=()=>t.wordWrapMode==="on"?"off":"on",h=()=>d()==="split"?a("instanceShell.diff.switchToSplit"):a("instanceShell.diff.switchToUnified"),v=()=>s()==="collapsed"?a("instanceShell.diff.hideUnchanged"):a("instanceShell.diff.showFull"),u=()=>f()==="on"?a("instanceShell.diff.enableWordWrap"):a("instanceShell.diff.disableWordWrap");return(()=>{var b=N(),n=b.firstChild,l=n.nextSibling,r=l.nextSibling;return n.$$click=()=>t.onViewModeChange(d()),c(n,(()=>{var e=W(()=>d()==="split");return()=>e()?o(A,{class:"h-4 w-4","aria-hidden":"true"}):o(D,{class:"h-4 w-4","aria-hidden":"true"})})()),l.$$click=()=>t.onContextModeChange(s()),c(l,(()=>{var e=W(()=>s()==="collapsed");return()=>e()?o(I,{class:"h-4 w-4","aria-hidden":"true"}):o(H,{class:"h-4 w-4","aria-hidden":"true"})})()),r.$$click=()=>t.onWordWrapModeChange(f()),c(r,o(E,{class:"h-4 w-4","aria-hidden":"true"})),V(e=>{var m=h(),w=h(),M=v(),p=v(),x=`file-viewer-toolbar-icon-button${t.wordWrapMode==="on"?" active":""}`,k=u(),y=u();return m!==e.e&&i(n,"aria-label",e.e=m),w!==e.t&&i(n,"title",e.t=w),M!==e.a&&i(l,"aria-label",e.a=M),p!==e.o&&i(l,"title",e.o=p),x!==e.i&&S(r,e.i=x),k!==e.n&&i(r,"aria-label",e.n=k),y!==e.s&&i(r,"title",e.s=y),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),b})()};C(["click"]);export{z as D};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-B3iAKbO0.js","assets/git-diff-vendor-CSgooKT_.js","assets/fast-diff-vendor-DgdwVvTQ.js","assets/highlight-vendor-8FKMu9os.js","assets/git-diff-vendor-HAZkIolJ.css"])))=>i.map(i=>d[i]);
2
- import{_ as G}from"./index-DskBWxXS.js";import{Z as J,m,t as h,i as s,d as u,a as C,u as U,f as X}from"./monaco-viewer-B3iAKbO0.js";import{n as o,m as Y,d as A,b as P,c as $,S as g,a as w,z as p,A as ee,F as te}from"./git-diff-vendor-CSgooKT_.js";import{S as le}from"./SplitFilePanel-CiZrHI3o.js";import{I as ne,R as K,M as re,P as ae,C as ie,e as se,Q as oe}from"./main-CXoIBcJC.js";import{W as ce}from"./wrap-text-xhHluRd3.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";const de=[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]],he=e=>o(ne,Y(e,{name:"Save",iconNode:de}));var ue=h('<div class="px-2 py-2 border-b border-base"><div class=selector-input-group><div class="flex items-center gap-2 px-3 text-muted"></div><input type=text class=selector-input>'),ve=h("<div class=file-list-header><span class=file-list-title></span><span class=file-list-count>"),q=h('<div class="p-3 text-xs text-secondary">'),fe=h("<div class=file-list-item><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text>.."),ge=h('<div class="p-3 text-xs text-error">'),we=h('<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class="flex items-center gap-2 shrink-0"><div class=file-list-item-stats><span class="text-[10px] text-secondary"></span></div><button type=button class=git-change-row-action>'),k=h("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),Se=h('<div class="file-viewer-panel flex-1"><div>'),be=h('<div class="h-full outline-none"tabindex=0>'),me=h("<span>"),$e=h("<div class=files-tab-stats><span class=files-tab-stat><span class=files-tab-selected-path><span class=file-path-text>"),ye=h("<button type=button style=margin-inline-start:auto>"),_e=h("<button type=button>"),O=h("<button type=button class=files-header-icon-button>"),Ce=h("<span class=text-error>");const ke=ee(()=>G(()=>import("./monaco-viewer-B3iAKbO0.js").then(e=>e.ae),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoFileViewer})));function xe(e){return e?/\.(md|markdown|mdown|mkdn)$/i.test(e):!1}const Ie=e=>{const[E,L]=A(""),{isDark:Q}=J(),[N,M]=A(!1);let S;P(()=>{e.browserPath(),L("")});const H=$(()=>[...e.browserEntries()||[]].sort((i,d)=>{const l=i.type==="directory"?0:1,t=d.type==="directory"?0:1;return l!==t?l-t:String(i.name||"").localeCompare(String(d.name||""))})),W=$(()=>E().trim().toLowerCase()),x=$(()=>{const n=W(),i=H();return n?i.filter(d=>String(d.name||"").toLowerCase().includes(n)):i}),y=()=>e.browserLoading()&&e.browserEntries()===null,Z=()=>W()?e.t("instanceShell.filesShell.search.empty"):e.t("instanceShell.filesShell.listEmpty"),_=$(()=>xe(e.browserSelectedPath())),b=$(()=>_()&&N());P(()=>{_()||M(!1)});const D=()=>{const n=e.browserSelectedContent();n!=null&&e.onSave(n)},j=async(n,i)=>{i==null||i.stopPropagation();const d=await se(n);oe({message:d?e.t("instanceShell.filesShell.toast.copyPathSuccess"):e.t("instanceShell.filesShell.toast.copyPathError"),variant:d?"success":"error"})};P(()=>{b()&&requestAnimationFrame(()=>S==null?void 0:S.focus())});const T=()=>[(()=>{var n=ue(),i=n.firstChild,d=i.firstChild,l=d.nextSibling;return s(d,o(ae,{class:"w-4 h-4"})),l.$$input=t=>L(t.currentTarget.value),w(t=>{var a=e.t("instanceShell.filesShell.search.placeholder"),r=e.t("instanceShell.filesShell.search.ariaLabel");return a!==t.e&&u(l,"placeholder",t.e=a),r!==t.t&&u(l,"aria-label",t.t=r),t},{e:void 0,t:void 0}),w(()=>l.value=E()),n})(),(()=>{var n=ve(),i=n.firstChild,d=i.nextSibling;return s(i,()=>e.t("instanceShell.filesShell.fileListTitle")),s(d,()=>x().length),n})(),o(g,{get when(){return e.parentPath()},children:n=>(()=>{var i=fe(),d=i.firstChild,l=d.firstChild;return i.$$click=()=>e.onLoadEntries(n()),w(()=>u(l,"title",n())),i})()}),o(g,{get when(){return y()},get children(){var n=q();return s(n,()=>e.t("instanceInfo.loading")),n}}),o(g,{get when(){return m(()=>!e.browserError()&&!y())()&&x().length>0},get fallback(){return m(()=>!y())()?m(()=>!!e.browserError())()?(()=>{var n=ge();return s(n,()=>e.browserError()),n})():(()=>{var n=q();return s(n,Z),n})():void 0},get children(){return o(te,{get each(){return x()},children:n=>(()=>{var i=we(),d=i.firstChild,l=d.firstChild,t=l.firstChild,a=l.nextSibling,r=a.firstChild,c=r.firstChild,f=r.nextSibling;return i.$$click=()=>{if(n.type==="directory"){e.onLoadEntries(n.path);return}e.onRequestOpenFile(n.path)},s(t,()=>n.name),s(c,()=>n.type),f.$$click=v=>void j(n.path,v),s(f,o(ie,{class:"w-3 h-3"})),w(v=>{var F=`file-list-item ${e.browserSelectedPath()===n.path?"file-list-item-active":""}`,z=n.path,I=n.path,R=e.t("instanceShell.filesShell.actions.copyPath"),V=e.t("instanceShell.filesShell.actions.copyPath");return F!==v.e&&C(i,v.e=F),z!==v.t&&u(i,"title",v.t=z),I!==v.a&&u(l,"title",v.a=I),R!==v.o&&u(f,"title",v.o=R),V!==v.i&&u(f,"aria-label",v.i=V),v},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),i})()})}})],B=n=>{!(n.ctrlKey||n.metaKey)||n.key.toLowerCase()!=="s"||e.browserSelectedSaving()||!e.browserSelectedDirty()||(n.preventDefault(),D())};return m(()=>{const n=()=>e.browserSelectedPath()||e.browserPath(),i=()=>y()?e.t("instanceInfo.loading"):e.t("instanceShell.filesShell.viewerEmpty"),d=()=>(()=>{var l=Se(),t=l.firstChild;return s(t,o(g,{get when(){return e.browserSelectedLoading()},get fallback(){return o(g,{get when(){return e.browserSelectedError()},get fallback(){return o(g,{get when(){return m(()=>!!(e.browserSelectedPath()&&e.browserSelectedContent()!==null))()?{path:e.browserSelectedPath(),content:e.browserSelectedContent()}:null},get fallback(){return(()=>{var a=k(),r=a.firstChild;return s(r,i),a})()},children:a=>o(g,{get when(){return b()},get fallback(){return o(p,{get fallback(){return(()=>{var r=k(),c=r.firstChild;return s(c,()=>e.t("instanceInfo.loading")),r})()},get children(){return o(ke,{get scopeKey(){return e.scopeKey()},get path(){return a().path},get content(){return a().content},get wordWrap(){return e.wordWrapMode()},get onSave(){return e.onSave},get onContentChange(){return e.onContentChange}})}})},get children(){var r=be();r.$$mousedown=()=>S==null?void 0:S.focus(),r.$$keydown=B;var c=S;return typeof c=="function"?U(c,r):S=r,s(r,o(re,{get part(){return{type:"text",text:a().content}},get isDark(){return Q()},escapeRawHtml:!0})),r}})})},children:a=>(()=>{var r=k(),c=r.firstChild;return s(c,a),r})()})},get children(){var a=k(),r=a.firstChild;return s(r,()=>e.t("instanceInfo.loading")),a}})),w(()=>C(t,b()?"file-viewer-content":"file-viewer-content file-viewer-content--monaco")),l})();return o(le,{get header(){return[(()=>{var l=$e(),t=l.firstChild,a=t.firstChild,r=a.firstChild;return s(r,n),s(l,o(g,{get when(){return e.browserLoading()},get children(){var c=me();return s(c,()=>e.t("instanceInfo.loading")),c}}),null),s(l,o(g,{get when(){return e.browserError()},children:c=>(()=>{var f=Ce();return s(f,c),f})()}),null),w(()=>u(a,"title",n())),l})(),(()=>{var l=ye();return l.$$click=()=>_()&&M(t=>!t),s(l,(()=>{var t=m(()=>!!b());return()=>t()?e.t("instanceShell.filesShell.showSource"):e.t("instanceShell.filesShell.previewMarkdown")})()),w(t=>{var a=`file-viewer-toolbar-button${b()?" active":""}`,r=!_();return a!==t.e&&C(l,t.e=a),r!==t.t&&(l.disabled=t.t=r),t},{e:void 0,t:void 0}),l})(),(()=>{var l=_e();return l.$$click=()=>e.onWordWrapModeChange(e.wordWrapMode()==="on"?"off":"on"),s(l,o(ce,{class:"h-4 w-4"})),w(t=>{var a=`file-viewer-toolbar-icon-button${e.wordWrapMode()==="on"?" active":""}`,r=e.wordWrapMode()==="on"?e.t("instanceShell.filesShell.disableWordWrap"):e.t("instanceShell.filesShell.enableWordWrap"),c=e.wordWrapMode()==="on"?e.t("instanceShell.filesShell.disableWordWrap"):e.t("instanceShell.filesShell.enableWordWrap"),f=b();return a!==t.e&&C(l,t.e=a),r!==t.t&&u(l,"title",t.t=r),c!==t.a&&u(l,"aria-label",t.a=c),f!==t.o&&(l.disabled=t.o=f),t},{e:void 0,t:void 0,a:void 0,o:void 0}),l})(),(()=>{var l=O();return l.$$click=D,s(l,o(g,{get when(){return e.browserSelectedSaving()},get fallback(){return o(he,{class:"h-4 w-4"})},get children(){return o(K,{class:"h-4 w-4 animate-spin"})}})),w(t=>{var a=e.t("instanceShell.rightPanel.actions.save")||"Save (Ctrl+S)",r=e.t("instanceShell.rightPanel.actions.save")||"Save",c=e.browserSelectedSaving()||!e.browserSelectedDirty();return a!==t.e&&u(l,"title",t.e=a),r!==t.t&&u(l,"aria-label",t.t=r),c!==t.a&&(l.disabled=t.a=c),t},{e:void 0,t:void 0,a:void 0}),l})(),(()=>{var l=O();return l.$$click=()=>e.onRefresh(),s(l,o(K,{get class(){return`h-4 w-4${e.browserLoading()?" animate-spin":""}`}})),w(t=>{var a=e.t("instanceShell.rightPanel.actions.refresh"),r=e.t("instanceShell.rightPanel.actions.refresh"),c=e.browserLoading();return a!==t.e&&u(l,"title",t.e=a),r!==t.t&&u(l,"aria-label",t.t=r),c!==t.a&&(l.disabled=t.a=c),t},{e:void 0,t:void 0,a:void 0}),l})()]},list:{panel:()=>o(T,{}),overlay:()=>o(T,{})},get viewer(){return d()},get listOpen(){return e.listOpen()},get onToggleList(){return e.onToggleList},get splitWidth(){return e.splitWidth()},get onResizeMouseDown(){return e.onResizeMouseDown},get onResizeTouchStart(){return e.onResizeTouchStart},get isPhoneLayout(){return e.isPhoneLayout()},get overlayAriaLabel(){return e.t("instanceShell.rightPanel.tabs.files")}})})};X(["input","click","keydown","mousedown"]);export{Ie as default};
2
+ import{_ as G}from"./index-CXCTlmS7.js";import{Z as J,m,t as h,i as s,d as u,a as C,u as U,f as X}from"./monaco-viewer-B3iAKbO0.js";import{n as o,m as Y,d as A,b as P,c as $,S as g,a as w,z as p,A as ee,F as te}from"./git-diff-vendor-CSgooKT_.js";import{S as le}from"./SplitFilePanel-CO765UL-.js";import{I as ne,R as K,M as re,P as ae,C as ie,e as se,Q as oe}from"./main-CuzUuQRM.js";import{W as ce}from"./wrap-text-DvzNO1HR.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";const de=[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]],he=e=>o(ne,Y(e,{name:"Save",iconNode:de}));var ue=h('<div class="px-2 py-2 border-b border-base"><div class=selector-input-group><div class="flex items-center gap-2 px-3 text-muted"></div><input type=text class=selector-input>'),ve=h("<div class=file-list-header><span class=file-list-title></span><span class=file-list-count>"),q=h('<div class="p-3 text-xs text-secondary">'),fe=h("<div class=file-list-item><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text>.."),ge=h('<div class="p-3 text-xs text-error">'),we=h('<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class="flex items-center gap-2 shrink-0"><div class=file-list-item-stats><span class="text-[10px] text-secondary"></span></div><button type=button class=git-change-row-action>'),k=h("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),Se=h('<div class="file-viewer-panel flex-1"><div>'),be=h('<div class="h-full outline-none"tabindex=0>'),me=h("<span>"),$e=h("<div class=files-tab-stats><span class=files-tab-stat><span class=files-tab-selected-path><span class=file-path-text>"),ye=h("<button type=button style=margin-inline-start:auto>"),_e=h("<button type=button>"),O=h("<button type=button class=files-header-icon-button>"),Ce=h("<span class=text-error>");const ke=ee(()=>G(()=>import("./monaco-viewer-B3iAKbO0.js").then(e=>e.ae),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoFileViewer})));function xe(e){return e?/\.(md|markdown|mdown|mkdn)$/i.test(e):!1}const Ie=e=>{const[E,L]=A(""),{isDark:Q}=J(),[N,M]=A(!1);let S;P(()=>{e.browserPath(),L("")});const H=$(()=>[...e.browserEntries()||[]].sort((i,d)=>{const l=i.type==="directory"?0:1,t=d.type==="directory"?0:1;return l!==t?l-t:String(i.name||"").localeCompare(String(d.name||""))})),W=$(()=>E().trim().toLowerCase()),x=$(()=>{const n=W(),i=H();return n?i.filter(d=>String(d.name||"").toLowerCase().includes(n)):i}),y=()=>e.browserLoading()&&e.browserEntries()===null,Z=()=>W()?e.t("instanceShell.filesShell.search.empty"):e.t("instanceShell.filesShell.listEmpty"),_=$(()=>xe(e.browserSelectedPath())),b=$(()=>_()&&N());P(()=>{_()||M(!1)});const D=()=>{const n=e.browserSelectedContent();n!=null&&e.onSave(n)},j=async(n,i)=>{i==null||i.stopPropagation();const d=await se(n);oe({message:d?e.t("instanceShell.filesShell.toast.copyPathSuccess"):e.t("instanceShell.filesShell.toast.copyPathError"),variant:d?"success":"error"})};P(()=>{b()&&requestAnimationFrame(()=>S==null?void 0:S.focus())});const T=()=>[(()=>{var n=ue(),i=n.firstChild,d=i.firstChild,l=d.nextSibling;return s(d,o(ae,{class:"w-4 h-4"})),l.$$input=t=>L(t.currentTarget.value),w(t=>{var a=e.t("instanceShell.filesShell.search.placeholder"),r=e.t("instanceShell.filesShell.search.ariaLabel");return a!==t.e&&u(l,"placeholder",t.e=a),r!==t.t&&u(l,"aria-label",t.t=r),t},{e:void 0,t:void 0}),w(()=>l.value=E()),n})(),(()=>{var n=ve(),i=n.firstChild,d=i.nextSibling;return s(i,()=>e.t("instanceShell.filesShell.fileListTitle")),s(d,()=>x().length),n})(),o(g,{get when(){return e.parentPath()},children:n=>(()=>{var i=fe(),d=i.firstChild,l=d.firstChild;return i.$$click=()=>e.onLoadEntries(n()),w(()=>u(l,"title",n())),i})()}),o(g,{get when(){return y()},get children(){var n=q();return s(n,()=>e.t("instanceInfo.loading")),n}}),o(g,{get when(){return m(()=>!e.browserError()&&!y())()&&x().length>0},get fallback(){return m(()=>!y())()?m(()=>!!e.browserError())()?(()=>{var n=ge();return s(n,()=>e.browserError()),n})():(()=>{var n=q();return s(n,Z),n})():void 0},get children(){return o(te,{get each(){return x()},children:n=>(()=>{var i=we(),d=i.firstChild,l=d.firstChild,t=l.firstChild,a=l.nextSibling,r=a.firstChild,c=r.firstChild,f=r.nextSibling;return i.$$click=()=>{if(n.type==="directory"){e.onLoadEntries(n.path);return}e.onRequestOpenFile(n.path)},s(t,()=>n.name),s(c,()=>n.type),f.$$click=v=>void j(n.path,v),s(f,o(ie,{class:"w-3 h-3"})),w(v=>{var F=`file-list-item ${e.browserSelectedPath()===n.path?"file-list-item-active":""}`,z=n.path,I=n.path,R=e.t("instanceShell.filesShell.actions.copyPath"),V=e.t("instanceShell.filesShell.actions.copyPath");return F!==v.e&&C(i,v.e=F),z!==v.t&&u(i,"title",v.t=z),I!==v.a&&u(l,"title",v.a=I),R!==v.o&&u(f,"title",v.o=R),V!==v.i&&u(f,"aria-label",v.i=V),v},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),i})()})}})],B=n=>{!(n.ctrlKey||n.metaKey)||n.key.toLowerCase()!=="s"||e.browserSelectedSaving()||!e.browserSelectedDirty()||(n.preventDefault(),D())};return m(()=>{const n=()=>e.browserSelectedPath()||e.browserPath(),i=()=>y()?e.t("instanceInfo.loading"):e.t("instanceShell.filesShell.viewerEmpty"),d=()=>(()=>{var l=Se(),t=l.firstChild;return s(t,o(g,{get when(){return e.browserSelectedLoading()},get fallback(){return o(g,{get when(){return e.browserSelectedError()},get fallback(){return o(g,{get when(){return m(()=>!!(e.browserSelectedPath()&&e.browserSelectedContent()!==null))()?{path:e.browserSelectedPath(),content:e.browserSelectedContent()}:null},get fallback(){return(()=>{var a=k(),r=a.firstChild;return s(r,i),a})()},children:a=>o(g,{get when(){return b()},get fallback(){return o(p,{get fallback(){return(()=>{var r=k(),c=r.firstChild;return s(c,()=>e.t("instanceInfo.loading")),r})()},get children(){return o(ke,{get scopeKey(){return e.scopeKey()},get path(){return a().path},get content(){return a().content},get wordWrap(){return e.wordWrapMode()},get onSave(){return e.onSave},get onContentChange(){return e.onContentChange}})}})},get children(){var r=be();r.$$mousedown=()=>S==null?void 0:S.focus(),r.$$keydown=B;var c=S;return typeof c=="function"?U(c,r):S=r,s(r,o(re,{get part(){return{type:"text",text:a().content}},get isDark(){return Q()},escapeRawHtml:!0})),r}})})},children:a=>(()=>{var r=k(),c=r.firstChild;return s(c,a),r})()})},get children(){var a=k(),r=a.firstChild;return s(r,()=>e.t("instanceInfo.loading")),a}})),w(()=>C(t,b()?"file-viewer-content":"file-viewer-content file-viewer-content--monaco")),l})();return o(le,{get header(){return[(()=>{var l=$e(),t=l.firstChild,a=t.firstChild,r=a.firstChild;return s(r,n),s(l,o(g,{get when(){return e.browserLoading()},get children(){var c=me();return s(c,()=>e.t("instanceInfo.loading")),c}}),null),s(l,o(g,{get when(){return e.browserError()},children:c=>(()=>{var f=Ce();return s(f,c),f})()}),null),w(()=>u(a,"title",n())),l})(),(()=>{var l=ye();return l.$$click=()=>_()&&M(t=>!t),s(l,(()=>{var t=m(()=>!!b());return()=>t()?e.t("instanceShell.filesShell.showSource"):e.t("instanceShell.filesShell.previewMarkdown")})()),w(t=>{var a=`file-viewer-toolbar-button${b()?" active":""}`,r=!_();return a!==t.e&&C(l,t.e=a),r!==t.t&&(l.disabled=t.t=r),t},{e:void 0,t:void 0}),l})(),(()=>{var l=_e();return l.$$click=()=>e.onWordWrapModeChange(e.wordWrapMode()==="on"?"off":"on"),s(l,o(ce,{class:"h-4 w-4"})),w(t=>{var a=`file-viewer-toolbar-icon-button${e.wordWrapMode()==="on"?" active":""}`,r=e.wordWrapMode()==="on"?e.t("instanceShell.filesShell.disableWordWrap"):e.t("instanceShell.filesShell.enableWordWrap"),c=e.wordWrapMode()==="on"?e.t("instanceShell.filesShell.disableWordWrap"):e.t("instanceShell.filesShell.enableWordWrap"),f=b();return a!==t.e&&C(l,t.e=a),r!==t.t&&u(l,"title",t.t=r),c!==t.a&&u(l,"aria-label",t.a=c),f!==t.o&&(l.disabled=t.o=f),t},{e:void 0,t:void 0,a:void 0,o:void 0}),l})(),(()=>{var l=O();return l.$$click=D,s(l,o(g,{get when(){return e.browserSelectedSaving()},get fallback(){return o(he,{class:"h-4 w-4"})},get children(){return o(K,{class:"h-4 w-4 animate-spin"})}})),w(t=>{var a=e.t("instanceShell.rightPanel.actions.save")||"Save (Ctrl+S)",r=e.t("instanceShell.rightPanel.actions.save")||"Save",c=e.browserSelectedSaving()||!e.browserSelectedDirty();return a!==t.e&&u(l,"title",t.e=a),r!==t.t&&u(l,"aria-label",t.t=r),c!==t.a&&(l.disabled=t.a=c),t},{e:void 0,t:void 0,a:void 0}),l})(),(()=>{var l=O();return l.$$click=()=>e.onRefresh(),s(l,o(K,{get class(){return`h-4 w-4${e.browserLoading()?" animate-spin":""}`}})),w(t=>{var a=e.t("instanceShell.rightPanel.actions.refresh"),r=e.t("instanceShell.rightPanel.actions.refresh"),c=e.browserLoading();return a!==t.e&&u(l,"title",t.e=a),r!==t.t&&u(l,"aria-label",t.t=r),c!==t.a&&(l.disabled=t.a=c),t},{e:void 0,t:void 0,a:void 0}),l})()]},list:{panel:()=>o(T,{}),overlay:()=>o(T,{})},get viewer(){return d()},get listOpen(){return e.listOpen()},get onToggleList(){return e.onToggleList},get splitWidth(){return e.splitWidth()},get onResizeMouseDown(){return e.onResizeMouseDown},get onResizeTouchStart(){return e.onResizeTouchStart},get isPhoneLayout(){return e.isPhoneLayout()},get overlayAriaLabel(){return e.t("instanceShell.rightPanel.tabs.files")}})})};X(["input","click","keydown","mousedown"]);export{Ie as default};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-B3iAKbO0.js","assets/git-diff-vendor-CSgooKT_.js","assets/fast-diff-vendor-DgdwVvTQ.js","assets/highlight-vendor-8FKMu9os.js","assets/git-diff-vendor-HAZkIolJ.css"])))=>i.map(i=>d[i]);
2
- import{_ as se}from"./index-DskBWxXS.js";import{m as V,t as h,i as n,d as b,h as q,a as H,f as le}from"./monaco-viewer-B3iAKbO0.js";import{c as m,n as r,a as k,S as w,F as J,z as re,A as ce}from"./git-diff-vendor-CSgooKT_.js";import{D as oe}from"./DiffToolbar-DJokckqI.js";import{S as de}from"./SplitFilePanel-CiZrHI3o.js";import{H as ge,R as he,J as j,K as Q,N as ue}from"./main-CXoIBcJC.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./align-justify-wTXyHHYC.js";import"./wrap-text-xhHluRd3.js";var W=h("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),fe=h('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),me=h('<div class="p-3 text-xs text-secondary">'),ve=h('<span class="git-change-row-action-bar git-change-row-action-bar-vertical">'),Ce=h('<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class=git-change-list-item-right><div class=file-list-item-stats><span class=file-list-item-additions>+</span><span class=file-list-item-deletions>-</span></div></div></div><div class=git-change-list-item-actions-zone><div class=git-change-list-item-actions><button type=button class=git-change-row-action><span aria-hidden=true><span class="git-change-row-action-bar git-change-row-action-bar-horizontal">'),$e=h("<div class=git-change-section-items>"),be=h("<div class=git-change-section><button type=button class=git-change-section-header><span class=git-change-section-header-main><span class=git-change-section-chevron></span><span class=git-change-section-title></span></span><span class=git-change-section-count>"),_e=h('<div class=git-change-section-items><div class=git-change-commit-box><div class=git-change-commit-input-wrap><textarea class=git-change-commit-input rows=1></textarea><button type=button class="git-change-commit-button git-change-commit-button-overlay">'),we=h("<div class=git-change-sections><div class=git-change-section><button type=button class=git-change-section-header><span class=git-change-section-header-main><span class=git-change-section-chevron></span><span class=git-change-section-title-row><span class=git-change-section-title></span></span></span><span class=git-change-section-count>"),Se=h('<span class="status-indicator session-status-list worktree-indicator git-change-section-badge"><span class=worktree-indicator-label>'),ye=h("<span class=files-tab-selected-path><span class=file-path-text>"),xe=h('<div class=files-tab-stats style="flex:0 0 auto"><span class="files-tab-stat files-tab-stat-additions"><span class=files-tab-stat-value>+</span></span><span class="files-tab-stat files-tab-stat-deletions"><span class=files-tab-stat-value>-'),Ie=h("<button type=button class=files-header-icon-button style=margin-left:auto>"),Me=h("<span class=text-error>");const Le=ce(()=>se(()=>import("./monaco-viewer-B3iAKbO0.js").then(e=>e.ad),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoDiffViewer}))),Oe=e=>{const T=m(()=>e.activeSessionId()),P=m(()=>!!(T()&&T()!=="info")),A=m(()=>P()?e.entries():null),X=m(()=>{const o=A();return Array.isArray(o)?[...o].sort((d,x)=>String(d.path||"").localeCompare(String(x.path||""))):[]}),S=m(()=>ge(X())),Y=m(()=>S().reduce((o,d)=>(o.additions+=typeof d.additions=="number"?d.additions:0,o.deletions+=typeof d.deletions=="number"?d.deletions:0,o),{additions:0,deletions:0})),z=m(()=>S().filter(o=>o.section==="staged")),Z=m(()=>S().filter(o=>o.section==="unstaged")),p=m(()=>z().length>0&&e.commitMessage().trim().length>0&&!e.commitSubmitting()),ee=m(()=>{const o=S(),d=e.selectedItemId(),x=e.mostChangedItemId(),I=o.find(E=>E.id===d)||(x?o.find(E=>E.id===x):void 0);return(I==null?void 0:I.entry)??null}),D=m(()=>P()?A()===null?e.t("instanceShell.gitChanges.loading"):S().length===0?e.t("instanceShell.gitChanges.empty"):e.t("instanceShell.filesShell.viewerEmpty"):e.t("instanceShell.gitChanges.noSessionSelected")),te=m(()=>e.selectedError()===e.t("instanceShell.gitChanges.binaryViewer"));return V(()=>{const o=Y(),d=ee(),x=S(),I=z(),E=Z(),ne=()=>(()=>{var t=fe(),l=t.firstChild;return n(l,r(w,{get when(){return e.selectedLoading()},get fallback(){return r(w,{get when(){return e.selectedError()},get fallback(){return r(w,{get when(){return V(()=>!!(d&&e.selectedBefore()!==null&&e.selectedAfter()!==null))()?{path:d.path,before:e.selectedBefore(),after:e.selectedAfter()}:null},get fallback(){return(()=>{var i=W(),s=i.firstChild;return n(s,D),i})()},children:i=>r(re,{get fallback(){return(()=>{var s=W(),a=s.firstChild;return n(a,()=>e.t("instanceInfo.loading")),s})()},get children(){return r(Le,{get scopeKey(){return e.scopeKey()},get path(){return String(i().path||"")},get before(){return String(i().before||"")},get after(){return String(i().after||"")},get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrap(){return e.diffWordWrapMode()},get insertContextLabel(){return e.t("instanceShell.gitChanges.actions.insertContext")},get onRequestInsertContext(){return te()?void 0:s=>{const a=e.selectedItemId();if(!a)return;const g=S().find(u=>u.id===a);g&&e.onInsertContext(g,s)}}})}})})},children:i=>(()=>{var s=W(),a=s.firstChild;return n(a,i),s})()})},get children(){var i=W(),s=i.firstChild;return n(s,()=>e.t("instanceInfo.loading")),i}})),t})(),ie=()=>(()=>{var t=me();return n(t,D),t})(),B=t=>{const l=m(()=>e.selectedBulkItemIds().has(t.id)),i=t.section==="staged"?e.t("instanceShell.gitChanges.actions.unstage"):e.t("instanceShell.gitChanges.actions.stage"),s=()=>{t.section==="staged"?e.onUnstageFile(t):e.onStageFile(t)};return(()=>{var a=Ce(),g=a.firstChild,u=g.firstChild,M=u.firstChild,v=u.nextSibling,$=v.firstChild,C=$.firstChild;C.firstChild;var _=C.nextSibling;_.firstChild;var R=g.nextSibling,f=R.firstChild,y=f.firstChild,L=y.firstChild;return L.firstChild,a.$$click=c=>e.onRowClick(t,c),a.$$mousedown=c=>{(c.shiftKey||c.ctrlKey||c.metaKey)&&c.preventDefault()},n(M,()=>t.path),n(C,()=>t.additions,null),n(_,()=>t.deletions,null),y.$$click=c=>{c.stopPropagation(),s()},b(y,"title",i),b(y,"aria-label",i),n(L,r(w,{get when(){return t.section!=="staged"},get children(){return ve()}}),null),k(c=>{var K=`file-list-item git-change-list-item ${e.selectedItemId()===t.id?"file-list-item-active":""} ${l()?"git-change-list-item-bulk-selected":""}`,F=t.path,G=t.path,N=t.path,U=`git-change-row-action-glyph ${t.section==="staged"?"git-change-row-action-glyph-minus":"git-change-row-action-glyph-plus"}`;return K!==c.e&&H(a,c.e=K),F!==c.t&&b(a,"title",c.t=F),G!==c.a&&b(g,"title",c.a=G),N!==c.o&&b(u,"title",c.o=N),U!==c.i&&H(L,c.i=U),c},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),a})()},ae=(t,l,i,s)=>(()=>{var a=be(),g=a.firstChild,u=g.firstChild,M=u.firstChild,v=M.nextSibling,$=u.nextSibling;return q(g,"click",s,!0),n(M,i?r(j,{class:"h-3.5 w-3.5"}):r(Q,{class:"h-3.5 w-3.5"})),n(v,t),n($,()=>l.length),n(a,r(w,{when:i,get children(){var C=$e();return n(C,r(J,{each:l,children:_=>B(_)})),C}}),null),a})(),O=()=>r(w,{get when(){return x.length>0},get fallback(){return ie()},get children(){var t=we(),l=t.firstChild,i=l.firstChild,s=i.firstChild,a=s.firstChild,g=a.nextSibling,u=g.firstChild,M=s.nextSibling;return q(i,"click",e.onToggleStagedOpen,!0),n(a,(()=>{var v=V(()=>!!e.stagedOpen());return()=>v()?r(j,{class:"h-3.5 w-3.5"}):r(Q,{class:"h-3.5 w-3.5"})})()),n(u,()=>e.t("instanceShell.gitChanges.sections.staged")),n(g,r(w,{get when(){return e.branchLabel()},children:v=>(()=>{var $=Se(),C=$.firstChild;return n($,r(ue,{class:"w-3.5 h-3.5","aria-hidden":"true"}),C),n(C,v),k(()=>b($,"title",`Branch: ${v()}`)),$})()}),null),n(M,()=>I.length),n(l,r(w,{get when(){return e.stagedOpen()},get children(){var v=_e(),$=v.firstChild,C=$.firstChild,_=C.firstChild,R=_.nextSibling;return _.$$input=f=>e.onCommitMessageInput(f.currentTarget.value),R.$$click=()=>e.onSubmitCommit(),n(R,(()=>{var f=V(()=>!!e.commitSubmitting());return()=>f()?e.t("instanceShell.gitChanges.commit.submitting"):e.t("instanceShell.gitChanges.commit.submit")})()),n(v,r(J,{each:I,children:f=>B(f)}),null),k(f=>{var y=e.t("instanceShell.gitChanges.commit.placeholder"),L=!p();return y!==f.e&&b(_,"placeholder",f.e=y),L!==f.t&&(R.disabled=f.t=L),f},{e:void 0,t:void 0}),k(()=>_.value=e.commitMessage()),v}}),null),n(t,()=>ae(e.t("instanceShell.gitChanges.sections.unstaged"),E,e.unstagedOpen(),e.onToggleUnstagedOpen),null),t}});return r(de,{get header(){return[(()=>{var t=ye(),l=t.firstChild;return n(l,()=>(d==null?void 0:d.path)||e.t("instanceShell.rightPanel.tabs.gitChanges")),k(()=>b(t,"title",(d==null?void 0:d.path)||e.t("instanceShell.rightPanel.tabs.gitChanges"))),t})(),(()=>{var t=xe(),l=t.firstChild,i=l.firstChild;i.firstChild;var s=l.nextSibling,a=s.firstChild;return a.firstChild,n(i,()=>o.additions,null),n(a,()=>o.deletions,null),n(t,r(w,{get when(){return e.statusError()},children:g=>(()=>{var u=Me();return n(u,g),u})()}),null),t})(),(()=>{var t=Ie();return t.$$click=()=>e.onRefresh(),n(t,r(he,{get class(){return`h-4 w-4${e.statusLoading()?" animate-spin":""}`}})),k(l=>{var i=e.t("instanceShell.rightPanel.actions.refresh"),s=e.t("instanceShell.rightPanel.actions.refresh"),a=!P()||e.statusLoading()||A()===null;return i!==l.e&&b(t,"title",l.e=i),s!==l.t&&b(t,"aria-label",l.t=s),a!==l.a&&(t.disabled=l.a=a),l},{e:void 0,t:void 0,a:void 0}),t})(),r(oe,{get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrapMode(){return e.diffWordWrapMode()},get onViewModeChange(){return e.onViewModeChange},get onContextModeChange(){return e.onContextModeChange},get onWordWrapModeChange(){return e.onWordWrapModeChange}})]},list:{panel:O,overlay:O},get viewer(){return ne()},get listOpen(){return e.listOpen()},get onToggleList(){return e.onToggleList},get splitWidth(){return e.splitWidth()},get onResizeMouseDown(){return e.onResizeMouseDown},get onResizeTouchStart(){return e.onResizeTouchStart},get isPhoneLayout(){return e.isPhoneLayout()},get overlayAriaLabel(){return e.t("instanceShell.rightPanel.tabs.gitChanges")}})})};le(["mousedown","click","input"]);export{Oe as default};
2
+ import{_ as se}from"./index-CXCTlmS7.js";import{m as V,t as h,i as n,d as b,h as q,a as H,f as le}from"./monaco-viewer-B3iAKbO0.js";import{c as m,n as r,a as k,S as w,F as J,z as re,A as ce}from"./git-diff-vendor-CSgooKT_.js";import{D as oe}from"./DiffToolbar-h4_ij7Yi.js";import{S as de}from"./SplitFilePanel-CO765UL-.js";import{H as ge,R as he,J as j,K as Q,N as ue}from"./main-CuzUuQRM.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./align-justify-BZaelTNi.js";import"./wrap-text-DvzNO1HR.js";var W=h("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),fe=h('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),me=h('<div class="p-3 text-xs text-secondary">'),ve=h('<span class="git-change-row-action-bar git-change-row-action-bar-vertical">'),Ce=h('<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class=git-change-list-item-right><div class=file-list-item-stats><span class=file-list-item-additions>+</span><span class=file-list-item-deletions>-</span></div></div></div><div class=git-change-list-item-actions-zone><div class=git-change-list-item-actions><button type=button class=git-change-row-action><span aria-hidden=true><span class="git-change-row-action-bar git-change-row-action-bar-horizontal">'),$e=h("<div class=git-change-section-items>"),be=h("<div class=git-change-section><button type=button class=git-change-section-header><span class=git-change-section-header-main><span class=git-change-section-chevron></span><span class=git-change-section-title></span></span><span class=git-change-section-count>"),_e=h('<div class=git-change-section-items><div class=git-change-commit-box><div class=git-change-commit-input-wrap><textarea class=git-change-commit-input rows=1></textarea><button type=button class="git-change-commit-button git-change-commit-button-overlay">'),we=h("<div class=git-change-sections><div class=git-change-section><button type=button class=git-change-section-header><span class=git-change-section-header-main><span class=git-change-section-chevron></span><span class=git-change-section-title-row><span class=git-change-section-title></span></span></span><span class=git-change-section-count>"),Se=h('<span class="status-indicator session-status-list worktree-indicator git-change-section-badge"><span class=worktree-indicator-label>'),ye=h("<span class=files-tab-selected-path><span class=file-path-text>"),xe=h('<div class=files-tab-stats style="flex:0 0 auto"><span class="files-tab-stat files-tab-stat-additions"><span class=files-tab-stat-value>+</span></span><span class="files-tab-stat files-tab-stat-deletions"><span class=files-tab-stat-value>-'),Ie=h("<button type=button class=files-header-icon-button style=margin-left:auto>"),Me=h("<span class=text-error>");const Le=ce(()=>se(()=>import("./monaco-viewer-B3iAKbO0.js").then(e=>e.ad),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoDiffViewer}))),Oe=e=>{const T=m(()=>e.activeSessionId()),P=m(()=>!!(T()&&T()!=="info")),A=m(()=>P()?e.entries():null),X=m(()=>{const o=A();return Array.isArray(o)?[...o].sort((d,x)=>String(d.path||"").localeCompare(String(x.path||""))):[]}),S=m(()=>ge(X())),Y=m(()=>S().reduce((o,d)=>(o.additions+=typeof d.additions=="number"?d.additions:0,o.deletions+=typeof d.deletions=="number"?d.deletions:0,o),{additions:0,deletions:0})),z=m(()=>S().filter(o=>o.section==="staged")),Z=m(()=>S().filter(o=>o.section==="unstaged")),p=m(()=>z().length>0&&e.commitMessage().trim().length>0&&!e.commitSubmitting()),ee=m(()=>{const o=S(),d=e.selectedItemId(),x=e.mostChangedItemId(),I=o.find(E=>E.id===d)||(x?o.find(E=>E.id===x):void 0);return(I==null?void 0:I.entry)??null}),D=m(()=>P()?A()===null?e.t("instanceShell.gitChanges.loading"):S().length===0?e.t("instanceShell.gitChanges.empty"):e.t("instanceShell.filesShell.viewerEmpty"):e.t("instanceShell.gitChanges.noSessionSelected")),te=m(()=>e.selectedError()===e.t("instanceShell.gitChanges.binaryViewer"));return V(()=>{const o=Y(),d=ee(),x=S(),I=z(),E=Z(),ne=()=>(()=>{var t=fe(),l=t.firstChild;return n(l,r(w,{get when(){return e.selectedLoading()},get fallback(){return r(w,{get when(){return e.selectedError()},get fallback(){return r(w,{get when(){return V(()=>!!(d&&e.selectedBefore()!==null&&e.selectedAfter()!==null))()?{path:d.path,before:e.selectedBefore(),after:e.selectedAfter()}:null},get fallback(){return(()=>{var i=W(),s=i.firstChild;return n(s,D),i})()},children:i=>r(re,{get fallback(){return(()=>{var s=W(),a=s.firstChild;return n(a,()=>e.t("instanceInfo.loading")),s})()},get children(){return r(Le,{get scopeKey(){return e.scopeKey()},get path(){return String(i().path||"")},get before(){return String(i().before||"")},get after(){return String(i().after||"")},get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrap(){return e.diffWordWrapMode()},get insertContextLabel(){return e.t("instanceShell.gitChanges.actions.insertContext")},get onRequestInsertContext(){return te()?void 0:s=>{const a=e.selectedItemId();if(!a)return;const g=S().find(u=>u.id===a);g&&e.onInsertContext(g,s)}}})}})})},children:i=>(()=>{var s=W(),a=s.firstChild;return n(a,i),s})()})},get children(){var i=W(),s=i.firstChild;return n(s,()=>e.t("instanceInfo.loading")),i}})),t})(),ie=()=>(()=>{var t=me();return n(t,D),t})(),B=t=>{const l=m(()=>e.selectedBulkItemIds().has(t.id)),i=t.section==="staged"?e.t("instanceShell.gitChanges.actions.unstage"):e.t("instanceShell.gitChanges.actions.stage"),s=()=>{t.section==="staged"?e.onUnstageFile(t):e.onStageFile(t)};return(()=>{var a=Ce(),g=a.firstChild,u=g.firstChild,M=u.firstChild,v=u.nextSibling,$=v.firstChild,C=$.firstChild;C.firstChild;var _=C.nextSibling;_.firstChild;var R=g.nextSibling,f=R.firstChild,y=f.firstChild,L=y.firstChild;return L.firstChild,a.$$click=c=>e.onRowClick(t,c),a.$$mousedown=c=>{(c.shiftKey||c.ctrlKey||c.metaKey)&&c.preventDefault()},n(M,()=>t.path),n(C,()=>t.additions,null),n(_,()=>t.deletions,null),y.$$click=c=>{c.stopPropagation(),s()},b(y,"title",i),b(y,"aria-label",i),n(L,r(w,{get when(){return t.section!=="staged"},get children(){return ve()}}),null),k(c=>{var K=`file-list-item git-change-list-item ${e.selectedItemId()===t.id?"file-list-item-active":""} ${l()?"git-change-list-item-bulk-selected":""}`,F=t.path,G=t.path,N=t.path,U=`git-change-row-action-glyph ${t.section==="staged"?"git-change-row-action-glyph-minus":"git-change-row-action-glyph-plus"}`;return K!==c.e&&H(a,c.e=K),F!==c.t&&b(a,"title",c.t=F),G!==c.a&&b(g,"title",c.a=G),N!==c.o&&b(u,"title",c.o=N),U!==c.i&&H(L,c.i=U),c},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),a})()},ae=(t,l,i,s)=>(()=>{var a=be(),g=a.firstChild,u=g.firstChild,M=u.firstChild,v=M.nextSibling,$=u.nextSibling;return q(g,"click",s,!0),n(M,i?r(j,{class:"h-3.5 w-3.5"}):r(Q,{class:"h-3.5 w-3.5"})),n(v,t),n($,()=>l.length),n(a,r(w,{when:i,get children(){var C=$e();return n(C,r(J,{each:l,children:_=>B(_)})),C}}),null),a})(),O=()=>r(w,{get when(){return x.length>0},get fallback(){return ie()},get children(){var t=we(),l=t.firstChild,i=l.firstChild,s=i.firstChild,a=s.firstChild,g=a.nextSibling,u=g.firstChild,M=s.nextSibling;return q(i,"click",e.onToggleStagedOpen,!0),n(a,(()=>{var v=V(()=>!!e.stagedOpen());return()=>v()?r(j,{class:"h-3.5 w-3.5"}):r(Q,{class:"h-3.5 w-3.5"})})()),n(u,()=>e.t("instanceShell.gitChanges.sections.staged")),n(g,r(w,{get when(){return e.branchLabel()},children:v=>(()=>{var $=Se(),C=$.firstChild;return n($,r(ue,{class:"w-3.5 h-3.5","aria-hidden":"true"}),C),n(C,v),k(()=>b($,"title",`Branch: ${v()}`)),$})()}),null),n(M,()=>I.length),n(l,r(w,{get when(){return e.stagedOpen()},get children(){var v=_e(),$=v.firstChild,C=$.firstChild,_=C.firstChild,R=_.nextSibling;return _.$$input=f=>e.onCommitMessageInput(f.currentTarget.value),R.$$click=()=>e.onSubmitCommit(),n(R,(()=>{var f=V(()=>!!e.commitSubmitting());return()=>f()?e.t("instanceShell.gitChanges.commit.submitting"):e.t("instanceShell.gitChanges.commit.submit")})()),n(v,r(J,{each:I,children:f=>B(f)}),null),k(f=>{var y=e.t("instanceShell.gitChanges.commit.placeholder"),L=!p();return y!==f.e&&b(_,"placeholder",f.e=y),L!==f.t&&(R.disabled=f.t=L),f},{e:void 0,t:void 0}),k(()=>_.value=e.commitMessage()),v}}),null),n(t,()=>ae(e.t("instanceShell.gitChanges.sections.unstaged"),E,e.unstagedOpen(),e.onToggleUnstagedOpen),null),t}});return r(de,{get header(){return[(()=>{var t=ye(),l=t.firstChild;return n(l,()=>(d==null?void 0:d.path)||e.t("instanceShell.rightPanel.tabs.gitChanges")),k(()=>b(t,"title",(d==null?void 0:d.path)||e.t("instanceShell.rightPanel.tabs.gitChanges"))),t})(),(()=>{var t=xe(),l=t.firstChild,i=l.firstChild;i.firstChild;var s=l.nextSibling,a=s.firstChild;return a.firstChild,n(i,()=>o.additions,null),n(a,()=>o.deletions,null),n(t,r(w,{get when(){return e.statusError()},children:g=>(()=>{var u=Me();return n(u,g),u})()}),null),t})(),(()=>{var t=Ie();return t.$$click=()=>e.onRefresh(),n(t,r(he,{get class(){return`h-4 w-4${e.statusLoading()?" animate-spin":""}`}})),k(l=>{var i=e.t("instanceShell.rightPanel.actions.refresh"),s=e.t("instanceShell.rightPanel.actions.refresh"),a=!P()||e.statusLoading()||A()===null;return i!==l.e&&b(t,"title",l.e=i),s!==l.t&&b(t,"aria-label",l.t=s),a!==l.a&&(t.disabled=l.a=a),l},{e:void 0,t:void 0,a:void 0}),t})(),r(oe,{get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrapMode(){return e.diffWordWrapMode()},get onViewModeChange(){return e.onViewModeChange},get onContextModeChange(){return e.onContextModeChange},get onWordWrapModeChange(){return e.onWordWrapModeChange}})]},list:{panel:O,overlay:O},get viewer(){return ne()},get listOpen(){return e.listOpen()},get onToggleList(){return e.onToggleList},get splitWidth(){return e.splitWidth()},get onResizeMouseDown(){return e.onResizeMouseDown},get onResizeTouchStart(){return e.onResizeTouchStart},get isPhoneLayout(){return e.isPhoneLayout()},get overlayAriaLabel(){return e.t("instanceShell.rightPanel.tabs.gitChanges")}})})};le(["mousedown","click","input"]);export{Oe as default};
@@ -1 +1 @@
1
- import{t as d,i as l,d as m,h as s,m as b,g as _,f as w}from"./monaco-viewer-B3iAKbO0.js";import{a as g,n as r,S as n}from"./git-diff-vendor-CSgooKT_.js";import{u as S}from"./index-DskBWxXS.js";var y=d("<div class=file-list-overlay role=dialog><div class=file-list-scroll>");const L=e=>(()=>{var t=y(),a=t.firstChild;return l(a,()=>e.children),g(()=>m(t,"aria-label",e.ariaLabel)),t})();var C=d('<div class=files-split><div class=file-list-panel><div class=file-list-scroll></div></div><div class=file-split-handle role=separator aria-orientation=vertical aria-label="Resize file list">'),x=d("<div class=files-tab-container><div class=files-tab-header><div class=files-tab-header-row><button type=button class=files-toggle-button></button></div></div><div class=files-tab-body>");const z=e=>{const{t}=S();return(()=>{var a=x(),c=a.firstChild,o=c.firstChild,u=o.firstChild,h=c.nextSibling;return s(u,"click",e.onToggleList,!0),l(u,(()=>{var i=b(()=>!!e.listOpen);return()=>i()?t("instanceShell.filesShell.hideFiles"):t("instanceShell.filesShell.showFiles")})()),l(o,()=>e.header,null),l(h,r(n,{get when(){return b(()=>!e.isPhoneLayout)()&&e.listOpen},get fallback(){return e.viewer},get children(){var i=C(),v=i.firstChild,$=v.firstChild,f=v.nextSibling;return l($,()=>e.list.panel()),s(f,"touchstart",e.onResizeTouchStart,!0),s(f,"mousedown",e.onResizeMouseDown,!0),l(i,()=>e.viewer,null),g(O=>_(i,"--files-pane-width",`${e.splitWidth}px`)),i}}),null),l(h,r(n,{get when(){return e.isPhoneLayout},get children(){return r(n,{get when(){return e.listOpen},get children(){return r(L,{get ariaLabel(){return e.overlayAriaLabel},get children(){return e.list.overlay()}})}})}}),null),a})()};w(["click","mousedown","touchstart"]);export{z as S};
1
+ import{t as d,i as l,d as m,h as s,m as b,g as _,f as w}from"./monaco-viewer-B3iAKbO0.js";import{a as g,n as r,S as n}from"./git-diff-vendor-CSgooKT_.js";import{u as S}from"./index-CXCTlmS7.js";var y=d("<div class=file-list-overlay role=dialog><div class=file-list-scroll>");const L=e=>(()=>{var t=y(),a=t.firstChild;return l(a,()=>e.children),g(()=>m(t,"aria-label",e.ariaLabel)),t})();var C=d('<div class=files-split><div class=file-list-panel><div class=file-list-scroll></div></div><div class=file-split-handle role=separator aria-orientation=vertical aria-label="Resize file list">'),x=d("<div class=files-tab-container><div class=files-tab-header><div class=files-tab-header-row><button type=button class=files-toggle-button></button></div></div><div class=files-tab-body>");const z=e=>{const{t}=S();return(()=>{var a=x(),c=a.firstChild,o=c.firstChild,u=o.firstChild,h=c.nextSibling;return s(u,"click",e.onToggleList,!0),l(u,(()=>{var i=b(()=>!!e.listOpen);return()=>i()?t("instanceShell.filesShell.hideFiles"):t("instanceShell.filesShell.showFiles")})()),l(o,()=>e.header,null),l(h,r(n,{get when(){return b(()=>!e.isPhoneLayout)()&&e.listOpen},get fallback(){return e.viewer},get children(){var i=C(),v=i.firstChild,$=v.firstChild,f=v.nextSibling;return l($,()=>e.list.panel()),s(f,"touchstart",e.onResizeTouchStart,!0),s(f,"mousedown",e.onResizeMouseDown,!0),l(i,()=>e.viewer,null),g(O=>_(i,"--files-pane-width",`${e.splitWidth}px`)),i}}),null),l(h,r(n,{get when(){return e.isPhoneLayout},get children(){return r(n,{get when(){return e.listOpen},get children(){return r(L,{get ariaLabel(){return e.overlayAriaLabel},get children(){return e.list.overlay()}})}})}}),null),a})()};w(["click","mousedown","touchstart"]);export{z as S};
@@ -0,0 +1 @@
1
+ import{m as me,P as ze,E as Ve,t as A,i as u,a as Xe,d as K,f as Ye}from"./monaco-viewer-B3iAKbO0.js";import{n as a,m as T,q as re,s as R,d as M,b as q,o as j,c as k,k as ae,S as Z,l as ce,t as Ge,w as ke,a as fe,F as ge}from"./git-diff-vendor-CSgooKT_.js";import{I as ve,T as $e,U as z,W as Te,X as Ie,Y as be,Z as Je,_ as pe,$ as le,a0 as de,a1 as _e,a2 as ne,a3 as oe,a4 as Ze,a5 as ye,a6 as Qe,a7 as et,a8 as B,a9 as xe,aa as tt,ab as nt,ac as ot,ad as st,ae as H,af as it,ag as lt,ah as rt,ai as at,aj as ct,ak as Q,J as dt,al as ut,am as he,an as gt,ao as pt,ap as ht,aq as ft,ar as bt}from"./main-CuzUuQRM.js";import{u as mt}from"./index-CXCTlmS7.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";const vt=[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]],yt=e=>a(ve,T(e,{name:"BellRing",iconNode:vt})),xt=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],Ct=e=>a(ve,T(e,{name:"TerminalSquare",iconNode:xt})),wt=[["polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2",key:"h1p8hx"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],St=e=>a(ve,T(e,{name:"XOctagon",iconNode:wt}));var Pt={};xe(Pt,{Arrow:()=>$e,Content:()=>Oe,Portal:()=>Me,Root:()=>Ae,Tooltip:()=>te,Trigger:()=>Ee,useTooltipContext:()=>ue});var De=ae();function ue(){const e=ce(De);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function Oe(e){const s=ue(),g=z({id:s.generateId("content")},e),[d,t]=R(g,["ref","style"]);return q(()=>j(s.registerContentId(t.id))),a(Z,{get when(){return s.contentPresent()},get children(){return a(_e.Positioner,{get children(){return a(Ze,T({ref(n){var o=ne(i=>{s.setContentRef(i)},d.ref);typeof o=="function"&&o(n)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return ye({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},d.style)},onFocusOutside:n=>n.preventDefault(),onDismiss:()=>s.hideTooltip(!0)},()=>s.dataset(),t))}})}})}function Me(e){const s=ue();return a(Z,{get when(){return s.contentPresent()},get children(){return a(ze,e)}})}function kt(e,s,g){const d=e.split("-")[0],t=s.getBoundingClientRect(),n=g.getBoundingClientRect(),o=[],i=t.left+t.width/2,r=t.top+t.height/2;switch(d){case"top":o.push([t.left,r]),o.push([n.left,n.bottom]),o.push([n.left,n.top]),o.push([n.right,n.top]),o.push([n.right,n.bottom]),o.push([t.right,r]);break;case"right":o.push([i,t.top]),o.push([n.left,n.top]),o.push([n.right,n.top]),o.push([n.right,n.bottom]),o.push([n.left,n.bottom]),o.push([i,t.bottom]);break;case"bottom":o.push([t.left,r]),o.push([n.left,n.top]),o.push([n.left,n.bottom]),o.push([n.right,n.bottom]),o.push([n.right,n.top]),o.push([t.right,r]);break;case"left":o.push([i,t.top]),o.push([n.right,n.top]),o.push([n.left,n.top]),o.push([n.left,n.bottom]),o.push([n.right,n.bottom]),o.push([i,t.bottom]);break}return o}var V={},$t=0,Y=!1,L,ee,G;function Ae(e){const s=`tooltip-${re()}`,g=`${++$t}`,d=z({id:s,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[t,n]=R(d,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount"]);let o;const[i,r]=M(),[l,f]=M(),[c,h]=M(),[x,v]=M(n.placement),y=Te({open:()=>t.open,defaultOpen:()=>t.defaultOpen,onOpenChange:m=>{var I;return(I=t.onOpenChange)==null?void 0:I.call(t,m)}}),{present:$}=Ie({show:()=>t.forceMount||y.isOpen(),element:()=>c()??null}),b=()=>{V[g]=C},S=()=>{for(const m in V)m!==g&&(V[m](!0),delete V[m])},C=(m=!1)=>{m||t.closeDelay&&t.closeDelay<=0?(window.clearTimeout(o),o=void 0,y.close()):o||(o=window.setTimeout(()=>{o=void 0,y.close()},t.closeDelay)),window.clearTimeout(L),L=void 0,t.skipDelayDuration&&t.skipDelayDuration>=0&&(G=window.setTimeout(()=>{window.clearTimeout(G),G=void 0},t.skipDelayDuration)),Y&&(window.clearTimeout(ee),ee=window.setTimeout(()=>{delete V[g],ee=void 0,Y=!1},t.closeDelay))},p=()=>{clearTimeout(o),o=void 0,S(),b(),Y=!0,y.open(),window.clearTimeout(L),L=void 0,window.clearTimeout(ee),ee=void 0,window.clearTimeout(G),G=void 0},U=()=>{S(),b(),!y.isOpen()&&!L&&!Y?L=window.setTimeout(()=>{L=void 0,Y=!0,p()},t.openDelay):y.isOpen()||p()},O=(m=!1)=>{!m&&t.openDelay&&t.openDelay>0&&!o&&!G?U():p()},N=()=>{window.clearTimeout(L),L=void 0,Y=!1},E=()=>{window.clearTimeout(o),o=void 0},F=m=>pe(l(),m)||pe(c(),m),_=m=>{const I=l(),W=c();if(!(!I||!W))return kt(m,I,W)},w=m=>{const I=m.target;if(F(I)){E();return}if(!t.ignoreSafeArea){const W=_(x());if(W&&Qe(et(m),W)){E();return}}o||C()};q(()=>{if(!y.isOpen())return;const m=be();m.addEventListener("pointermove",w,!0),j(()=>{m.removeEventListener("pointermove",w,!0)})}),q(()=>{const m=l();if(!m||!y.isOpen())return;const I=We=>{const qe=We.target;pe(qe,m)&&C(!0)},W=Je();W.addEventListener("scroll",I,{capture:!0}),j(()=>{W.removeEventListener("scroll",I,{capture:!0})})}),j(()=>{clearTimeout(o),V[g]&&delete V[g]});const D={dataset:k(()=>({"data-expanded":y.isOpen()?"":void 0,"data-closed":y.isOpen()?void 0:""})),isOpen:y.isOpen,isDisabled:()=>t.disabled??!1,triggerOnFocusOnly:()=>t.triggerOnFocusOnly??!1,contentId:i,contentPresent:$,openTooltip:O,hideTooltip:C,cancelOpening:N,generateId:de(()=>d.id),registerContentId:le(r),isTargetOnTooltip:F,setTriggerRef:f,setContentRef:h};return a(De.Provider,{value:D,get children(){return a(_e,T({anchorRef:l,contentRef:c,onCurrentPlacementChange:v},n))}})}function Ee(e){let s;const g=ue(),[d,t]=R(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let n=!1,o=!1,i=!1;const r=()=>{n=!1},l=()=>{!g.isOpen()&&(o||i)&&g.openTooltip(i)},f=b=>{g.isOpen()&&!o&&!i&&g.hideTooltip(b)},c=b=>{B(b,d.onPointerEnter),!(b.pointerType==="touch"||g.triggerOnFocusOnly()||g.isDisabled()||b.defaultPrevented)&&(o=!0,l())},h=b=>{B(b,d.onPointerLeave),b.pointerType!=="touch"&&(o=!1,i=!1,g.isOpen()?f():g.cancelOpening())},x=b=>{B(b,d.onPointerDown),n=!0,be(s).addEventListener("pointerup",r,{once:!0})},v=b=>{B(b,d.onClick),o=!1,i=!1,f(!0)},y=b=>{B(b,d.onFocus),!(g.isDisabled()||b.defaultPrevented||n)&&(i=!0,l())},$=b=>{B(b,d.onBlur);const S=b.relatedTarget;g.isTargetOnTooltip(S)||(o=!1,i=!1,f(!0))};return j(()=>{be(s).removeEventListener("pointerup",r)}),a(oe,T({as:"button",ref(b){var S=ne(C=>{g.setTriggerRef(C),s=C},d.ref);typeof S=="function"&&S(b)},get"aria-describedby"(){return me(()=>!!g.isOpen())()?g.contentId():void 0},onPointerEnter:c,onPointerLeave:h,onPointerDown:x,onClick:v,onFocus:y,onBlur:$},()=>g.dataset(),t))}var te=Object.assign(Ae,{Arrow:$e,Content:Oe,Portal:Me,Trigger:Ee}),Tt={};xe(Tt,{Collapsible:()=>It,Content:()=>Ce,Root:()=>we,Trigger:()=>Se,useCollapsibleContext:()=>se});var Fe=ae();function se(){const e=ce(Fe);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function Ce(e){const[s,g]=M(),d=se(),t=z({id:d.generateId("content")},e),[n,o]=R(t,["ref","id","style"]),{present:i}=Ie({show:d.shouldMount,element:()=>s()??null}),[r,l]=M(0),[f,c]=M(0);let x=d.isOpen()||i();return Ge(()=>{const v=requestAnimationFrame(()=>{x=!1});j(()=>{cancelAnimationFrame(v)})}),q(ke(i,()=>{if(!s())return;s().style.transitionDuration="0s",s().style.animationName="none";const v=s().getBoundingClientRect();l(v.height),c(v.width),x||(s().style.transitionDuration="",s().style.animationName="")})),q(ke(d.isOpen,v=>{!v&&s()&&(s().style.transitionDuration="",s().style.animationName="")},{defer:!0})),q(()=>j(d.registerContentId(n.id))),a(Z,{get when(){return i()},get children(){return a(oe,T({as:"div",ref(v){var y=ne(g,n.ref);typeof y=="function"&&y(v)},get id(){return n.id},get style(){return ye({"--kb-collapsible-content-height":r()?`${r()}px`:void 0,"--kb-collapsible-content-width":f()?`${f()}px`:void 0},n.style)}},()=>d.dataset(),o))}})}function we(e){const s=`collapsible-${re()}`,g=z({id:s},e),[d,t]=R(g,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[n,o]=M(),i=Te({open:()=>d.open,defaultOpen:()=>d.defaultOpen,onOpenChange:f=>{var c;return(c=d.onOpenChange)==null?void 0:c.call(d,f)}}),r=k(()=>({"data-expanded":i.isOpen()?"":void 0,"data-closed":i.isOpen()?void 0:"","data-disabled":d.disabled?"":void 0})),l={dataset:r,isOpen:i.isOpen,disabled:()=>d.disabled??!1,shouldMount:()=>d.forceMount||i.isOpen(),contentId:n,toggle:i.toggle,generateId:de(()=>t.id),registerContentId:le(o)};return a(Fe.Provider,{value:l,get children(){return a(oe,T({as:"div"},r,t))}})}function Se(e){const s=se(),[g,d]=R(e,["onClick"]);return a(tt,T({get"aria-expanded"(){return s.isOpen()},get"aria-controls"(){return me(()=>!!s.isOpen())()?s.contentId():void 0},get disabled(){return s.disabled()},onClick:n=>{B(n,g.onClick),s.toggle()}},()=>s.dataset(),d))}var It=Object.assign(we,{Content:Ce,Trigger:Se}),J={};xe(J,{Accordion:()=>_t,Content:()=>Ue,Header:()=>Le,Item:()=>He,Root:()=>je,Trigger:()=>Ne,useAccordionContext:()=>Pe});var Ke=ae();function Re(){const e=ce(Ke);if(e===void 0)throw new Error("[kobalte]: `useAccordionItemContext` must be used within a `Accordion.Item` component");return e}function Ue(e){const s=Re(),g=s.generateId("content"),d=z({id:g},e),[t,n]=R(d,["id","style"]);return q(()=>j(s.registerContentId(t.id))),a(Ce,T({role:"region",get"aria-labelledby"(){return s.triggerId()},get style(){return ye({"--kb-accordion-content-height":"var(--kb-collapsible-content-height)","--kb-accordion-content-width":"var(--kb-collapsible-content-width)"},t.style)}},n))}function Le(e){const s=se();return a(oe,T({as:"h3"},()=>s.dataset(),e))}var Be=ae();function Pe(){const e=ce(Be);if(e===void 0)throw new Error("[kobalte]: `useAccordionContext` must be used within a `Accordion.Root` component");return e}function He(e){const s=Pe(),g=`${s.generateId("item")}-${re()}`,d=z({id:g},e),[t,n]=R(d,["value","disabled"]),[o,i]=M(),[r,l]=M(),f=()=>s.listState().selectionManager(),c=()=>f().isSelected(t.value),h={value:()=>t.value,triggerId:o,contentId:r,generateId:de(()=>n.id),registerTriggerId:le(i),registerContentId:le(l)};return a(Ke.Provider,{value:h,get children(){return a(we,T({get open(){return c()},get disabled(){return t.disabled}},n))}})}function je(e){let s;const g=`accordion-${re()}`,d=z({id:g,multiple:!1,collapsible:!1,shouldFocusWrap:!0},e),[t,n]=R(d,["id","ref","value","defaultValue","onChange","multiple","collapsible","shouldFocusWrap","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),[o,i]=M([]),{DomCollectionProvider:r}=nt({items:o,onItemsChange:i}),l=ot({selectedKeys:()=>t.value,defaultSelectedKeys:()=>t.defaultValue,onSelectionChange:h=>{var x;return(x=t.onChange)==null?void 0:x.call(t,Array.from(h))},disallowEmptySelection:()=>!t.multiple&&!t.collapsible,selectionMode:()=>t.multiple?"multiple":"single",dataSource:o});l.selectionManager().setFocusedKey("item-1");const f=st({selectionManager:()=>l.selectionManager(),collection:()=>l.collection(),disallowEmptySelection:()=>l.selectionManager().disallowEmptySelection(),shouldFocusWrap:()=>t.shouldFocusWrap,disallowTypeAhead:!0,allowsTabNavigation:!0},()=>s),c={listState:()=>l,generateId:de(()=>t.id)};return a(r,{get children(){return a(Be.Provider,{value:c,get children(){return a(oe,T({as:"div",get id(){return t.id},ref(h){var x=ne(v=>s=v,t.ref);typeof x=="function"&&x(h)},get onKeyDown(){return H([t.onKeyDown,f.onKeyDown])},get onMouseDown(){return H([t.onMouseDown,f.onMouseDown])},get onFocusIn(){return H([t.onFocusIn])},get onFocusOut(){return H([t.onFocusOut,f.onFocusOut])}},n))}})}})}function Ne(e){let s;const g=Pe(),d=Re(),t=se(),n=d.generateId("trigger"),o=z({id:n},e),[i,r]=R(o,["ref","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);it({getItem:()=>({ref:()=>s,type:"item",key:d.value(),textValue:"",disabled:t.disabled()})});const l=lt({key:()=>d.value(),selectionManager:()=>g.listState().selectionManager(),disabled:()=>t.disabled(),shouldSelectOnPressUp:!0},()=>s),f=c=>{["Enter"," "].includes(c.key)&&c.preventDefault(),B(c,i.onKeyDown),B(c,l.onKeyDown)};return q(()=>j(d.registerTriggerId(r.id))),a(Se,T({ref(c){var h=ne(x=>s=x,i.ref);typeof h=="function"&&h(c)},get"data-key"(){return l.dataKey()},get onPointerDown(){return H([i.onPointerDown,l.onPointerDown])},get onPointerUp(){return H([i.onPointerUp,l.onPointerUp])},get onClick(){return H([i.onClick,l.onClick])},onKeyDown:f,get onMouseDown(){return H([i.onMouseDown,l.onMouseDown])},get onFocus(){return H([i.onFocus,l.onFocus])}},r))}var _t=Object.assign(je,{Content:Ue,Header:Le,Item:He,Trigger:Ne}),ie=A('<div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary">'),Dt=A('<div><div class="flex flex-wrap items-center gap-2 text-xs text-primary"><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary"></span></div><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary"></span></div><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary">');const Ot=e=>{const{t:s}=mt(),{preferences:g}=Ve(),d=k(()=>g().showUsageMetrics??!0),t=k(()=>rt(e.instanceId,e.sessionId)??{cost:0,contextWindow:0,isSubscriptionModel:!1,inputTokens:0,outputTokens:0,reasoningTokens:0,actualUsageTokens:0,modelOutputLimit:0,contextAvailableTokens:null}),n=k(()=>at(e.instanceId,e.sessionId)),o=k(()=>n().length>0),i=k(()=>o()?ct(e.instanceId,e.sessionId)??{cost:0,inputTokens:0,outputTokens:0,reasoningTokens:0}:{cost:0,inputTokens:0,outputTokens:0,reasoningTokens:0}),r=k(()=>`$${i().cost.toFixed(2)}`),l=k(()=>i().inputTokens),f=k(()=>i().outputTokens),c=k(()=>i().reasoningTokens),h=k(()=>t().inputTokens??0),x=k(()=>t().outputTokens??0),v=k(()=>{const $=t().isSubscriptionModel?0:t().cost;return $>0?$:0}),y=k(()=>`$${v().toFixed(2)}`);return(()=>{var $=Dt(),b=$.firstChild,S=b.firstChild,C=S.firstChild,p=C.nextSibling,U=S.nextSibling,O=U.firstChild,N=O.nextSibling,E=U.nextSibling,F=E.firstChild,_=F.nextSibling;return u(C,()=>s("contextUsagePanel.labels.input")),u(p,()=>Q(h())),u(O,()=>s("contextUsagePanel.labels.output")),u(N,()=>Q(x())),u(F,()=>s("contextUsagePanel.labels.cost")),u(_,y),u(b,a(Z,{get when(){return me(()=>!!o())()&&d()},get children(){return[(()=>{var w=ie(),P=w.firstChild,D=P.nextSibling;return u(P,()=>s("contextUsagePanel.labels.totalInput")),u(D,()=>Q(l())),w})(),(()=>{var w=ie(),P=w.firstChild,D=P.nextSibling;return u(P,()=>s("contextUsagePanel.labels.totalOutput")),u(D,()=>Q(f())),w})(),(()=>{var w=ie(),P=w.firstChild,D=P.nextSibling;return u(P,()=>s("contextUsagePanel.labels.totalCost")),u(D,r),w})(),(()=>{var w=ie(),P=w.firstChild,D=P.nextSibling;return u(P,()=>s("contextUsagePanel.labels.totalReasoning")),u(D,()=>Q(c())),w})()]}}),null),fe(()=>Xe($,`session-context-panel px-4 py-2 ${e.class??""}`)),$})()};var X=A('<div class="right-panel-empty right-panel-empty--left"><span class=text-xs>'),Mt=A('<div class="rounded-md border border-base bg-surface-secondary px-3 py-2"><div class="flex items-start justify-between gap-3"><div class=min-w-0><div class="text-sm font-medium text-primary"></div><p class="mt-1 text-xs text-secondary">'),At=A('<div class="flex flex-col gap-3 min-h-0"><div class="flex items-center justify-between gap-2 text-[11px] text-secondary"><span></span><span class="flex items-center gap-2"><span style=color:var(--session-status-idle-fg)></span><span style=color:var(--session-status-working-fg)></span></span></div><div class="rounded-md border border-base bg-surface-secondary p-2 max-h-[40vh] overflow-y-auto"><div class="flex flex-col">'),Et=A('<button type=button class="border-b border-base last:border-b-0 text-left hover:bg-surface-muted rounded-sm"><div class="flex items-center justify-between gap-3"><div class="text-xs font-mono text-primary min-w-0 flex-1 overflow-hidden whitespace-nowrap"style=text-overflow:ellipsis;direction:rtl;text-align:left;unicode-bidi:plaintext></div><div class="flex items-center gap-2 text-[11px] flex-shrink-0"><span style=color:var(--session-status-idle-fg)></span><span style=color:var(--session-status-working-fg)>'),Ft=A('<div class="flex flex-col gap-2">'),Kt=A("<span>"),Rt=A('<div class=status-process-card><div class=status-process-header><span class=status-process-title></span><div class=status-process-meta><span></span><span></span></div></div><div class=status-process-actions><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center"></button><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center"></button><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center">'),Ut=A("<div class=status-tab-container>"),Lt=A("<span class=section-left><span class=section-label>");const zt=e=>{const s=i=>e.expandedItems().includes(i),o=[{id:"yolo-mode",labelKey:"instanceShell.rightPanel.sections.yoloMode",tooltipKey:"instanceShell.rightPanel.sections.yoloMode.tooltip",render:()=>{const i=e.activeSession();return i?(()=>{var r=Mt(),l=r.firstChild,f=l.firstChild,c=f.firstChild,h=c.nextSibling;return u(c,()=>e.t("instanceShell.yoloMode.title")),u(h,()=>e.t("instanceShell.yoloMode.description")),u(l,a(ht,{get checked(){return pt(e.instanceId,i.id)},color:"warning",size:"small",get inputProps(){return{"aria-label":e.t("instanceShell.yoloMode.title")}},onChange:()=>gt(e.instanceId,i.id)}),null),r})():(()=>{var r=X(),l=r.firstChild;return u(l,()=>e.t("instanceShell.yoloMode.noSessionSelected")),r})()}},{id:"session-changes",labelKey:"instanceShell.rightPanel.sections.sessionChanges",tooltipKey:"instanceShell.rightPanel.sections.sessionChanges.tooltip",render:()=>{const i=e.activeSessionId();if(!i||i==="info")return(()=>{var c=X(),h=c.firstChild;return u(h,()=>e.t("instanceShell.sessionChanges.noSessionSelected")),c})();const r=e.activeSessionDiffs();if(r===void 0)return(()=>{var c=X(),h=c.firstChild;return u(h,()=>e.t("instanceShell.sessionChanges.loading")),c})();if(!Array.isArray(r)||r.length===0)return(()=>{var c=X(),h=c.firstChild;return u(h,()=>e.t("instanceShell.sessionChanges.empty")),c})();const l=[...r].sort((c,h)=>String(c.file||"").localeCompare(String(h.file||""))),f=l.reduce((c,h)=>(c.additions+=typeof h.additions=="number"?h.additions:0,c.deletions+=typeof h.deletions=="number"?h.deletions:0,c),{additions:0,deletions:0});return(()=>{var c=At(),h=c.firstChild,x=h.firstChild,v=x.nextSibling,y=v.firstChild,$=y.nextSibling,b=h.nextSibling,S=b.firstChild;return u(x,()=>e.t("instanceShell.sessionChanges.filesChanged",{count:l.length})),u(y,()=>`+${f.additions}`),u($,()=>`-${f.deletions}`),u(S,a(ge,{each:l,children:C=>(()=>{var p=Et(),U=p.firstChild,O=U.firstChild,N=O.nextSibling,E=N.firstChild,F=E.nextSibling;return p.$$click=()=>e.onOpenChangesTab(C.file),u(O,()=>C.file),u(E,()=>`+${C.additions}`),u(F,()=>`-${C.deletions}`),fe(_=>{var w=e.t("instanceShell.sessionChanges.actions.show"),P=C.file;return w!==_.e&&K(p,"title",_.e=w),P!==_.t&&K(O,"title",_.t=P),_},{e:void 0,t:void 0}),p})()})),c})()}},{id:"plan",labelKey:"instanceShell.rightPanel.sections.plan",tooltipKey:"instanceShell.rightPanel.sections.plan.tooltip",render:()=>{const i=e.activeSessionId();if(!i||i==="info")return(()=>{var l=X(),f=l.firstChild;return u(f,()=>e.t("instanceShell.plan.noSessionSelected")),l})();const r=e.latestTodoState();return r?a(ft,{state:r,get emptyLabel(){return e.t("instanceShell.plan.empty")},showStatusLabel:!1}):(()=>{var l=X(),f=l.firstChild;return u(f,()=>e.t("instanceShell.plan.empty")),l})()}},{id:"background-processes",labelKey:"instanceShell.rightPanel.sections.backgroundProcesses",tooltipKey:"instanceShell.rightPanel.sections.backgroundProcesses.tooltip",render:()=>{const i=e.backgroundProcessList();return i.length===0?(()=>{var r=X(),l=r.firstChild;return u(l,()=>e.t("instanceShell.backgroundProcesses.empty")),r})():(()=>{var r=Ft();return u(r,a(ge,{each:i,children:l=>(()=>{var f=Rt(),c=f.firstChild,h=c.firstChild,x=h.nextSibling,v=x.firstChild,y=v.nextSibling,$=c.nextSibling,b=$.firstChild,S=b.nextSibling,C=S.nextSibling;return u(h,()=>l.title),u(v,a(yt,{class:"h-3.5 w-3.5"})),u(y,()=>e.t("instanceShell.backgroundProcesses.status",{status:l.status})),u(x,a(Z,{get when(){return typeof l.outputSizeBytes=="number"},get children(){var p=Kt();return u(p,()=>e.t("instanceShell.backgroundProcesses.output",{sizeKb:Math.round((l.outputSizeBytes??0)/1024)})),p}}),null),b.$$click=()=>e.onOpenBackgroundOutput(l),u(b,a(Ct,{class:"h-4 w-4"})),S.$$click=()=>e.onStopBackgroundProcess(l.id),u(S,a(St,{class:"h-4 w-4"})),C.$$click=()=>e.onTerminateBackgroundProcess(l.id),u(C,a(bt,{class:"h-4 w-4"})),fe(p=>{var U=!!l.notifyEnabled,O=!l.notifyEnabled,N=e.t(l.notifyEnabled?"instanceShell.backgroundProcesses.notify.enabled":"instanceShell.backgroundProcesses.notify.disabled"),E=e.t(l.notifyEnabled?"instanceShell.backgroundProcesses.notify.enabled":"instanceShell.backgroundProcesses.notify.disabled"),F=e.t("instanceShell.backgroundProcesses.actions.output"),_=e.t("instanceShell.backgroundProcesses.actions.output"),w=l.status!=="running",P=e.t("instanceShell.backgroundProcesses.actions.stop"),D=e.t("instanceShell.backgroundProcesses.actions.stop"),m=e.t("instanceShell.backgroundProcesses.actions.terminate"),I=e.t("instanceShell.backgroundProcesses.actions.terminate");return U!==p.e&&v.classList.toggle("text-success",p.e=U),O!==p.t&&v.classList.toggle("text-tertiary",p.t=O),N!==p.a&&K(v,"aria-label",p.a=N),E!==p.o&&K(v,"title",p.o=E),F!==p.i&&K(b,"aria-label",p.i=F),_!==p.n&&K(b,"title",p.n=_),w!==p.s&&(S.disabled=p.s=w),P!==p.h&&K(S,"aria-label",p.h=P),D!==p.r&&K(S,"title",p.r=D),m!==p.d&&K(C,"aria-label",p.d=m),I!==p.l&&K(C,"title",p.l=I),p},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0}),f})()})),r})()}},{id:"mcp",labelKey:"instanceShell.rightPanel.sections.mcp",tooltipKey:"instanceShell.rightPanel.sections.mcp.tooltip",render:()=>a(he,{get initialInstance(){return e.instance},sections:["mcp"],showSectionHeadings:!1,class:"space-y-2"})},{id:"lsp",labelKey:"instanceShell.rightPanel.sections.lsp",tooltipKey:"instanceShell.rightPanel.sections.lsp.tooltip",render:()=>a(he,{get initialInstance(){return e.instance},sections:["lsp"],showSectionHeadings:!1,class:"space-y-2"})},{id:"plugins",labelKey:"instanceShell.rightPanel.sections.plugins",tooltipKey:"instanceShell.rightPanel.sections.plugins.tooltip",render:()=>a(he,{get initialInstance(){return e.instance},sections:["plugins"],showSectionHeadings:!1,class:"space-y-2"})}];return(()=>{var i=Ut();return u(i,a(Z,{get when(){return e.activeSession()},children:r=>a(Ot,{get instanceId(){return e.instanceId},get sessionId(){return r().id},class:"status-tab-context-panel"})}),null),u(i,a(J.Root,{class:"right-panel-accordion",collapsible:!0,multiple:!0,get value(){return e.expandedItems()},get onChange(){return e.onExpandedItemsChange},get children(){return a(ge,{each:o,children:r=>a(J.Item,{get value(){return r.id},class:"right-panel-accordion-item",get children(){return[a(J.Header,{class:"right-panel-accordion-header-row",get children(){return[a(J.Trigger,{class:"right-panel-accordion-trigger",get children(){return[(()=>{var l=Lt(),f=l.firstChild;return u(f,()=>e.t(r.labelKey)),l})(),a(dt,{get class(){return`right-panel-accordion-chevron ${s(r.id)?"right-panel-accordion-chevron-expanded":""}`}})]}}),a(te,{openDelay:200,gutter:4,placement:"top",get children(){return[a(te.Trigger,{as:"button",type:"button",class:"section-info-trigger",get"aria-label"(){return e.t(r.tooltipKey)},get children(){return a(ut,{class:"section-info-icon"})}}),a(te.Portal,{get children(){return a(te.Content,{class:"section-info-tooltip",get children(){return e.t(r.tooltipKey)}})}})]}})]}}),a(J.Content,{class:"right-panel-accordion-content",get children(){return r.render()}})]}})})}}),null),i})()};Ye(["click"]);export{zt as default};
@@ -1 +1 @@
1
- import{I as n}from"./main-CXoIBcJC.js";import{n as o,m as y}from"./git-diff-vendor-CSgooKT_.js";const i=[["line",{x1:"3",x2:"21",y1:"6",y2:"6",key:"4m8b97"}],["line",{x1:"3",x2:"21",y1:"12",y2:"12",key:"10d38w"}],["line",{x1:"3",x2:"21",y1:"18",y2:"18",key:"kwyyxn"}]],t=e=>o(n,y(e,{name:"AlignJustify",iconNode:i}));export{t as A};
1
+ import{I as n}from"./main-CuzUuQRM.js";import{n as o,m as y}from"./git-diff-vendor-CSgooKT_.js";const i=[["line",{x1:"3",x2:"21",y1:"6",y2:"6",key:"4m8b97"}],["line",{x1:"3",x2:"21",y1:"12",y2:"12",key:"10d38w"}],["line",{x1:"3",x2:"21",y1:"18",y2:"18",key:"kwyyxn"}]],t=e=>o(n,y(e,{name:"AlignJustify",iconNode:i}));export{t as A};
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-DVc8C-J4.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-BOJIQeun.js","assets/ruby-BvKwtOVI.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-BZjJHVRy.js","assets/fortran-free-form-D22FLkUw.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-B7Tvp0Sc.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DTMYz4Jt.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-C8NyazO9.js","assets/r-DiinP2Uv.js","assets/latex-BUKiar2Z.js","assets/tex-Cppo0RY3.js","assets/liquid-DYVedYrR.js","assets/marko-CPi9NSCl.js","assets/less-B1dDrJ26.js","assets/mdc-DUICxH0z.js","assets/nginx-DknmC5AR.js","assets/nim-CVrawwO9.js","assets/perl-C0TMdlhV.js","assets/php-CDn_0X-4.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-WgofotgN.js","assets/csharp-CX12Zw3r.js","assets/rst-B0xPkSld.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/svelte-3Dk4HxPD.js","assets/templ-W15q3VgB.js","assets/go-Dn2_MT6a.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-CO9l9SDP.js","assets/vue-CCoi5OLL.js","assets/vue-html-DAAvJJDi.js","assets/vue-vine-_Ih-lPRR.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
2
- var Ln=Object.defineProperty;var Pn=(r,e,t)=>e in r?Ln(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var f=(r,e,t)=>Pn(r,typeof e!="symbol"?e+"":e,t);import{_ as l}from"./index-DskBWxXS.js";import"./git-diff-vendor-CSgooKT_.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./monaco-viewer-B3iAKbO0.js";let k=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function kn(r){return nt(r)}function nt(r){return Array.isArray(r)?In(r):r instanceof RegExp?r:typeof r=="object"?wn(r):r}function In(r){let e=[];for(let t=0,n=r.length;t<n;t++)e[t]=nt(r[t]);return e}function wn(r){let e={};for(let t in r)e[t]=nt(r[t]);return e}function Vt(r,...e){return e.forEach(t=>{for(let n in t)r[n]=t[n]}),r}function Mt(r){const e=~r.lastIndexOf("/")||~r.lastIndexOf("\\");return e===0?r:~e===r.length-1?Mt(r.substring(0,r.length-1)):r.substr(~e+1)}var Me=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,pe=class{static hasCaptures(r){return r===null?!1:(Me.lastIndex=0,Me.test(r))}static replaceCaptures(r,e,t){return r.replace(Me,(n,i,o,s)=>{let c=t[parseInt(i||o,10)];if(c){let a=e.substring(c.start,c.end);for(;a[0]===".";)a=a.substring(1);switch(s){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return n})}};function Bt(r,e){return r<e?-1:r>e?1:0}function Gt(r,e){if(r===null&&e===null)return 0;if(!r)return-1;if(!e)return 1;let t=r.length,n=e.length;if(t===n){for(let i=0;i<t;i++){let o=Bt(r[i],e[i]);if(o!==0)return o}return 0}return t-n}function pt(r){return!!(/^#[0-9a-f]{6}$/i.test(r)||/^#[0-9a-f]{8}$/i.test(r)||/^#[0-9a-f]{3}$/i.test(r)||/^#[0-9a-f]{4}$/i.test(r))}function jt(r){return r.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $t=class{constructor(r){f(this,"cache",new Map);this.fn=r}get(r){if(this.cache.has(r))return this.cache.get(r);const e=this.fn(r);return this.cache.set(r,e),e}},be=class{constructor(r,e,t){f(this,"_cachedMatchRoot",new $t(r=>this._root.match(r)));this._colorMap=r,this._defaults=e,this._root=t}static createFromRawTheme(r,e){return this.createFromParsedTheme(Dn(r),e)}static createFromParsedTheme(r,e){return xn(r,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(r){if(r===null)return this._defaults;const e=r.scopeName,n=this._cachedMatchRoot.get(e).find(i=>On(r.parent,i.parentScopes));return n?new Ut(n.fontStyle,n.foreground,n.background):null}},Be=class ye{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const n of t)e=new ye(e,n);return e}static from(...e){let t=null;for(let n=0;n<e.length;n++)t=new ye(t,e[n]);return t}push(e){return new ye(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function On(r,e){if(e.length===0)return!0;for(let t=0;t<e.length;t++){let n=e[t],i=!1;if(n===">"){if(t===e.length-1)return!1;n=e[++t],i=!0}for(;r&&!Cn(r.scopeName,n);){if(i)return!1;r=r.parent}if(!r)return!1;r=r.parent}return!0}function Cn(r,e){return e===r||r.startsWith(e)&&r[e.length]==="."}var Ut=class{constructor(r,e,t){this.fontStyle=r,this.foregroundId=e,this.backgroundId=t}};function Dn(r){if(!r)return[];if(!r.settings||!Array.isArray(r.settings))return[];let e=r.settings,t=[],n=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];if(!s.settings)continue;let c;if(typeof s.scope=="string"){let d=s.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),c=d.split(",")}else Array.isArray(s.scope)?c=s.scope:c=[""];let a=-1;if(typeof s.settings.fontStyle=="string"){a=0;let d=s.settings.fontStyle.split(" ");for(let h=0,p=d.length;h<p;h++)switch(d[h]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let u=null;typeof s.settings.foreground=="string"&&pt(s.settings.foreground)&&(u=s.settings.foreground);let m=null;typeof s.settings.background=="string"&&pt(s.settings.background)&&(m=s.settings.background);for(let d=0,h=c.length;d<h;d++){let _=c[d].trim().split(" "),b=_[_.length-1],v=null;_.length>1&&(v=_.slice(0,_.length-1),v.reverse()),t[n++]=new Nn(b,v,i,a,u,m)}}return t}var Nn=class{constructor(r,e,t,n,i,o){this.scope=r,this.parentScopes=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=o}},N=(r=>(r[r.NotSet=-1]="NotSet",r[r.None=0]="None",r[r.Italic=1]="Italic",r[r.Bold=2]="Bold",r[r.Underline=4]="Underline",r[r.Strikethrough=8]="Strikethrough",r))(N||{});function xn(r,e){r.sort((a,u)=>{let m=Bt(a.scope,u.scope);return m!==0||(m=Gt(a.parentScopes,u.parentScopes),m!==0)?m:a.index-u.index});let t=0,n="#000000",i="#ffffff";for(;r.length>=1&&r[0].scope==="";){let a=r.shift();a.fontStyle!==-1&&(t=a.fontStyle),a.foreground!==null&&(n=a.foreground),a.background!==null&&(i=a.background)}let o=new Vn(e),s=new Ut(t,o.getId(n),o.getId(i)),c=new Bn(new Fe(0,null,-1,0,0),[]);for(let a=0,u=r.length;a<u;a++){let m=r[a];c.insert(0,m.scope,m.parentScopes,m.fontStyle,o.getId(m.foreground),o.getId(m.background))}return new be(o,s,c)}var Vn=class{constructor(r){f(this,"_isFrozen");f(this,"_lastColorId");f(this,"_id2color");f(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(r)){this._isFrozen=!0;for(let e=0,t=r.length;e<t;e++)this._color2id[r[e]]=e,this._id2color[e]=r[e]}else this._isFrozen=!1}getId(r){if(r===null)return 0;r=r.toUpperCase();let e=this._color2id[r];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${r}`);return e=++this._lastColorId,this._color2id[r]=e,this._id2color[e]=r,e}getColorMap(){return this._id2color.slice(0)}},Mn=Object.freeze([]),Fe=class Ht{constructor(e,t,n,i,o){f(this,"scopeDepth");f(this,"parentScopes");f(this,"fontStyle");f(this,"foreground");f(this,"background");this.scopeDepth=e,this.parentScopes=t||Mn,this.fontStyle=n,this.foreground=i,this.background=o}clone(){return new Ht(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},Bn=class ze{constructor(e,t=[],n={}){f(this,"_rulesWithParentScopes");this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,i=0;for(;e.parentScopes[n]===">"&&n++,t.parentScopes[i]===">"&&i++,!(n>=e.parentScopes.length||i>=t.parentScopes.length);){const o=t.parentScopes[i].length-e.parentScopes[n].length;if(o!==0)return o;n++,i++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let n=e.indexOf("."),i,o;if(n===-1?(i=e,o=""):(i=e.substring(0,n),o=e.substring(n+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(ze._cmpBySpecificity),t}insert(e,t,n,i,o,s){if(t===""){this._doInsertHere(e,n,i,o,s);return}let c=t.indexOf("."),a,u;c===-1?(a=t,u=""):(a=t.substring(0,c),u=t.substring(c+1));let m;this._children.hasOwnProperty(a)?m=this._children[a]:(m=new ze(this._mainRule.clone(),Fe.cloneArr(this._rulesWithParentScopes)),this._children[a]=m),m.insert(e+1,u,n,i,o,s)}_doInsertHere(e,t,n,i,o){if(t===null){this._mainRule.acceptOverwrite(e,n,i,o);return}for(let s=0,c=this._rulesWithParentScopes.length;s<c;s++){let a=this._rulesWithParentScopes[s];if(Gt(a.parentScopes,t)===0){a.acceptOverwrite(e,n,i,o);return}}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Fe(e,t,n,i,o))}},Q=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=B.getLanguageId(e),n=B.getTokenType(e),i=B.getFontStyle(e),o=B.getForeground(e),s=B.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:i,foreground:o,background:s})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,t,n,i,o,s,c){let a=B.getLanguageId(e),u=B.getTokenType(e),m=B.containsBalancedBrackets(e)?1:0,d=B.getFontStyle(e),h=B.getForeground(e),p=B.getBackground(e);return t!==0&&(a=t),n!==8&&(u=n),i!==null&&(m=i?1:0),o!==-1&&(d=o),s!==0&&(h=s),c!==0&&(p=c),(a<<0|u<<8|m<<10|d<<11|h<<15|p<<24)>>>0}};function Re(r,e){const t=[],n=Gn(r);let i=n.next();for(;i!==null;){let a=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let u=s();if(t.push({matcher:u,priority:a}),i!==",")break;i=n.next()}return t;function o(){if(i==="-"){i=n.next();const a=o();return u=>!!a&&!a(u)}if(i==="("){i=n.next();const a=c();return i===")"&&(i=n.next()),a}if(ft(i)){const a=[];do a.push(i),i=n.next();while(ft(i));return u=>e(a,u)}return null}function s(){const a=[];let u=o();for(;u;)a.push(u),u=o();return m=>a.every(d=>d(m))}function c(){const a=[];let u=s();for(;u&&(a.push(u),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");u=s()}return m=>a.some(d=>d(m))}}function ft(r){return!!r&&!!r.match(/[\w\.:]+/)}function Gn(r){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(r);return{next:()=>{if(!t)return null;const n=t[0];return t=e.exec(r),n}}}function Wt(r){typeof r.dispose=="function"&&r.dispose()}var oe=class{constructor(r){this.scopeName=r}toKey(){return this.scopeName}},jn=class{constructor(r,e){this.scopeName=r,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},$n=class{constructor(){f(this,"_references",[]);f(this,"_seenReferenceKeys",new Set);f(this,"visitedRule",new Set)}get references(){return this._references}add(r){const e=r.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(r))}},Un=class{constructor(r,e){f(this,"seenFullScopeRequests",new Set);f(this,"seenPartialScopeRequests",new Set);f(this,"Q");this.repo=r,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new oe(this.initialScopeName)]}processQueue(){const r=this.Q;this.Q=[];const e=new $n;for(const t of r)Hn(t,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof oe){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName)||this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function Hn(r,e,t,n){const i=t.lookup(r.scopeName);if(!i){if(r.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=t.lookup(e);r instanceof oe?Ee({baseGrammar:o,selfGrammar:i},n):qe(r.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},n);const s=t.injections(r.scopeName);if(s)for(const c of s)n.add(new oe(c))}function qe(r,e,t){if(e.repository&&e.repository[r]){const n=e.repository[r];Te([n],e,t)}}function Ee(r,e){r.selfGrammar.patterns&&Array.isArray(r.selfGrammar.patterns)&&Te(r.selfGrammar.patterns,{...r,repository:r.selfGrammar.repository},e),r.selfGrammar.injections&&Te(Object.values(r.selfGrammar.injections),{...r,repository:r.selfGrammar.repository},e)}function Te(r,e,t){for(const n of r){if(t.visitedRule.has(n))continue;t.visitedRule.add(n);const i=n.repository?Vt({},e.repository,n.repository):e.repository;Array.isArray(n.patterns)&&Te(n.patterns,{...e,repository:i},t);const o=n.include;if(!o)continue;const s=Ft(o);switch(s.kind){case 0:Ee({...e,selfGrammar:e.baseGrammar},t);break;case 1:Ee(e,t);break;case 2:qe(s.ruleName,{...e,repository:i},t);break;case 3:case 4:const c=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(c){const a={baseGrammar:e.baseGrammar,selfGrammar:c,repository:i};s.kind===4?qe(s.ruleName,a,t):Ee(a,t)}else s.kind===4?t.add(new jn(s.scopeName,s.ruleName)):t.add(new oe(s.scopeName));break}}}var Wn=class{constructor(){f(this,"kind",0)}},Fn=class{constructor(){f(this,"kind",1)}},zn=class{constructor(r){f(this,"kind",2);this.ruleName=r}},qn=class{constructor(r){f(this,"kind",3);this.scopeName=r}},Kn=class{constructor(r,e){f(this,"kind",4);this.scopeName=r,this.ruleName=e}};function Ft(r){if(r==="$base")return new Wn;if(r==="$self")return new Fn;const e=r.indexOf("#");if(e===-1)return new qn(r);if(e===0)return new zn(r.substring(1));{const t=r.substring(0,e),n=r.substring(e+1);return new Kn(t,n)}}var Yn=/\\(\d+)/,_t=/\\(\d+)/g,Jn=-1,zt=-2;var de=class{constructor(r,e,t,n){f(this,"$location");f(this,"id");f(this,"_nameIsCapturing");f(this,"_name");f(this,"_contentNameIsCapturing");f(this,"_contentName");this.$location=r,this.id=e,this._name=t||null,this._nameIsCapturing=pe.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=pe.hasCaptures(this._contentName)}get debugName(){const r=this.$location?`${Mt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${r}`}getName(r,e){return!this._nameIsCapturing||this._name===null||r===null||e===null?this._name:pe.replaceCaptures(this._name,r,e)}getContentName(r,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:pe.replaceCaptures(this._contentName,r,e)}},Xn=class extends de{constructor(e,t,n,i,o){super(e,t,n,i);f(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,i){throw new Error("Not supported!")}},Qn=class extends de{constructor(e,t,n,i,o){super(e,t,n,null);f(this,"_match");f(this,"captures");f(this,"_cachedCompiledPatterns");this._match=new se(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ae,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gt=class extends de{constructor(e,t,n,i,o){super(e,t,n,i);f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ae,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ke=class extends de{constructor(e,t,n,i,o,s,c,a,u,m){super(e,t,n,i);f(this,"_begin");f(this,"beginCaptures");f(this,"_end");f(this,"endHasBackReferences");f(this,"endCaptures");f(this,"applyEndPatternLast");f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");this._begin=new se(o,this.id),this.beginCaptures=s,this._end=new se(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=u||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ae;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Ae=class extends de{constructor(e,t,n,i,o,s,c,a,u){super(e,t,n,i);f(this,"_begin");f(this,"beginCaptures");f(this,"whileCaptures");f(this,"_while");f(this,"whileHasBackReferences");f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");f(this,"_cachedCompiledWhilePatterns");this._begin=new se(o,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new se(c,zt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ae;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ae,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},qt=class D{static createCaptureRule(e,t,n,i,o){return e.registerRule(s=>new Xn(t,s,n,i,o))}static getCompiledRuleId(e,t,n){return e.id||t.registerRule(i=>{if(e.id=i,e.match)return new Qn(e.$vscodeTextmateLocation,e.id,e.name,e.match,D._compileCaptures(e.captures,t,n));if(typeof e.begin>"u"){e.repository&&(n=Vt({},n,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new gt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,D._compilePatterns(o,t,n))}return e.while?new Ae(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,t,n),e.while,D._compileCaptures(e.whileCaptures||e.captures,t,n),D._compilePatterns(e.patterns,t,n)):new Ke(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,t,n),e.end,D._compileCaptures(e.endCaptures||e.captures,t,n),e.applyEndPatternLast,D._compilePatterns(e.patterns,t,n))}),e.id}static _compileCaptures(e,t,n){let i=[];if(e){let o=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const c=parseInt(s,10);c>o&&(o=c)}for(let s=0;s<=o;s++)i[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const c=parseInt(s,10);let a=0;e[s].patterns&&(a=D.getCompiledRuleId(e[s],t,n)),i[c]=D.createCaptureRule(t,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,a)}}return i}static _compilePatterns(e,t,n){let i=[];if(e)for(let o=0,s=e.length;o<s;o++){const c=e[o];let a=-1;if(c.include){const u=Ft(c.include);switch(u.kind){case 0:case 1:a=D.getCompiledRuleId(n[c.include],t,n);break;case 2:let m=n[u.ruleName];m&&(a=D.getCompiledRuleId(m,t,n));break;case 3:case 4:const d=u.scopeName,h=u.kind===4?u.ruleName:null,p=t.getExternalGrammar(d,n);if(p)if(h){let _=p.repository[h];_&&(a=D.getCompiledRuleId(_,t,p.repository))}else a=D.getCompiledRuleId(p.repository.$self,t,p.repository);break}}else a=D.getCompiledRuleId(c,t,n);if(a!==-1){const u=t.getRule(a);let m=!1;if((u instanceof gt||u instanceof Ke||u instanceof Ae)&&u.hasMissingPatterns&&u.patterns.length===0&&(m=!0),m)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},se=class Kt{constructor(e,t){f(this,"source");f(this,"ruleId");f(this,"hasAnchor");f(this,"hasBackReferences");f(this,"_anchorCache");if(e&&typeof e=="string"){const n=e.length;let i=0,o=[],s=!1;for(let c=0;c<n;c++)if(e.charAt(c)==="\\"&&c+1<n){const u=e.charAt(c+1);u==="z"?(o.push(e.substring(i,c)),o.push("$(?!\\n)(?<!\\n)"),i=c+2):(u==="A"||u==="G")&&(s=!0),c++}this.hasAnchor=s,i===0?this.source=e:(o.push(e.substring(i,n)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source=="string"?this.hasBackReferences=Yn.test(this.source):this.hasBackReferences=!1}clone(){return new Kt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=t.map(i=>e.substring(i.start,i.end));return _t.lastIndex=0,this.source.replace(_t,(i,o)=>jt(n[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],t=[],n=[],i=[],o,s,c,a;for(o=0,s=this.source.length;o<s;o++)c=this.source.charAt(o),e[o]=c,t[o]=c,n[o]=c,i[o]=c,c==="\\"&&o+1<s&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="￿",t[o+1]="￿",n[o+1]="A",i[o+1]="A"):a==="G"?(e[o+1]="￿",t[o+1]="G",n[o+1]="￿",i[o+1]="G"):(e[o+1]=a,t[o+1]=a,n[o+1]=a,i[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:t.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ae=class{constructor(){f(this,"_items");f(this,"_hasAnchors");f(this,"_cached");f(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(r){this._items.push(r),this._hasAnchors=this._hasAnchors||r.hasAnchor}unshift(r){this._items.unshift(r),this._hasAnchors=this._hasAnchors||r.hasAnchor}length(){return this._items.length}setSource(r,e){this._items[r].source!==e&&(this._disposeCaches(),this._items[r].setSource(e))}compile(r){if(!this._cached){let e=this._items.map(t=>t.source);this._cached=new yt(r,e,this._items.map(t=>t.ruleId))}return this._cached}compileAG(r,e,t){return this._hasAnchors?e?t?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(r,e,t)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(r,e,t)),this._anchorCache.A1_G0):t?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(r,e,t)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(r,e,t)),this._anchorCache.A0_G0):this.compile(r)}_resolveAnchors(r,e,t){let n=this._items.map(i=>i.resolveAnchors(e,t));return new yt(r,n,this._items.map(i=>i.ruleId))}},yt=class{constructor(r,e,t){f(this,"scanner");this.regExps=e,this.rules=t,this.scanner=r.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const r=[];for(let e=0,t=this.rules.length;e<t;e++)r.push(" - "+this.rules[e]+": "+this.regExps[e]);return r.join(`
2
+ var Ln=Object.defineProperty;var Pn=(r,e,t)=>e in r?Ln(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var f=(r,e,t)=>Pn(r,typeof e!="symbol"?e+"":e,t);import{_ as l}from"./index-CXCTlmS7.js";import"./git-diff-vendor-CSgooKT_.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./monaco-viewer-B3iAKbO0.js";let k=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function kn(r){return nt(r)}function nt(r){return Array.isArray(r)?In(r):r instanceof RegExp?r:typeof r=="object"?wn(r):r}function In(r){let e=[];for(let t=0,n=r.length;t<n;t++)e[t]=nt(r[t]);return e}function wn(r){let e={};for(let t in r)e[t]=nt(r[t]);return e}function Vt(r,...e){return e.forEach(t=>{for(let n in t)r[n]=t[n]}),r}function Mt(r){const e=~r.lastIndexOf("/")||~r.lastIndexOf("\\");return e===0?r:~e===r.length-1?Mt(r.substring(0,r.length-1)):r.substr(~e+1)}var Me=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,pe=class{static hasCaptures(r){return r===null?!1:(Me.lastIndex=0,Me.test(r))}static replaceCaptures(r,e,t){return r.replace(Me,(n,i,o,s)=>{let c=t[parseInt(i||o,10)];if(c){let a=e.substring(c.start,c.end);for(;a[0]===".";)a=a.substring(1);switch(s){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return n})}};function Bt(r,e){return r<e?-1:r>e?1:0}function Gt(r,e){if(r===null&&e===null)return 0;if(!r)return-1;if(!e)return 1;let t=r.length,n=e.length;if(t===n){for(let i=0;i<t;i++){let o=Bt(r[i],e[i]);if(o!==0)return o}return 0}return t-n}function pt(r){return!!(/^#[0-9a-f]{6}$/i.test(r)||/^#[0-9a-f]{8}$/i.test(r)||/^#[0-9a-f]{3}$/i.test(r)||/^#[0-9a-f]{4}$/i.test(r))}function jt(r){return r.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $t=class{constructor(r){f(this,"cache",new Map);this.fn=r}get(r){if(this.cache.has(r))return this.cache.get(r);const e=this.fn(r);return this.cache.set(r,e),e}},be=class{constructor(r,e,t){f(this,"_cachedMatchRoot",new $t(r=>this._root.match(r)));this._colorMap=r,this._defaults=e,this._root=t}static createFromRawTheme(r,e){return this.createFromParsedTheme(Dn(r),e)}static createFromParsedTheme(r,e){return xn(r,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(r){if(r===null)return this._defaults;const e=r.scopeName,n=this._cachedMatchRoot.get(e).find(i=>On(r.parent,i.parentScopes));return n?new Ut(n.fontStyle,n.foreground,n.background):null}},Be=class ye{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const n of t)e=new ye(e,n);return e}static from(...e){let t=null;for(let n=0;n<e.length;n++)t=new ye(t,e[n]);return t}push(e){return new ye(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function On(r,e){if(e.length===0)return!0;for(let t=0;t<e.length;t++){let n=e[t],i=!1;if(n===">"){if(t===e.length-1)return!1;n=e[++t],i=!0}for(;r&&!Cn(r.scopeName,n);){if(i)return!1;r=r.parent}if(!r)return!1;r=r.parent}return!0}function Cn(r,e){return e===r||r.startsWith(e)&&r[e.length]==="."}var Ut=class{constructor(r,e,t){this.fontStyle=r,this.foregroundId=e,this.backgroundId=t}};function Dn(r){if(!r)return[];if(!r.settings||!Array.isArray(r.settings))return[];let e=r.settings,t=[],n=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];if(!s.settings)continue;let c;if(typeof s.scope=="string"){let d=s.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),c=d.split(",")}else Array.isArray(s.scope)?c=s.scope:c=[""];let a=-1;if(typeof s.settings.fontStyle=="string"){a=0;let d=s.settings.fontStyle.split(" ");for(let h=0,p=d.length;h<p;h++)switch(d[h]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let u=null;typeof s.settings.foreground=="string"&&pt(s.settings.foreground)&&(u=s.settings.foreground);let m=null;typeof s.settings.background=="string"&&pt(s.settings.background)&&(m=s.settings.background);for(let d=0,h=c.length;d<h;d++){let _=c[d].trim().split(" "),b=_[_.length-1],v=null;_.length>1&&(v=_.slice(0,_.length-1),v.reverse()),t[n++]=new Nn(b,v,i,a,u,m)}}return t}var Nn=class{constructor(r,e,t,n,i,o){this.scope=r,this.parentScopes=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=o}},N=(r=>(r[r.NotSet=-1]="NotSet",r[r.None=0]="None",r[r.Italic=1]="Italic",r[r.Bold=2]="Bold",r[r.Underline=4]="Underline",r[r.Strikethrough=8]="Strikethrough",r))(N||{});function xn(r,e){r.sort((a,u)=>{let m=Bt(a.scope,u.scope);return m!==0||(m=Gt(a.parentScopes,u.parentScopes),m!==0)?m:a.index-u.index});let t=0,n="#000000",i="#ffffff";for(;r.length>=1&&r[0].scope==="";){let a=r.shift();a.fontStyle!==-1&&(t=a.fontStyle),a.foreground!==null&&(n=a.foreground),a.background!==null&&(i=a.background)}let o=new Vn(e),s=new Ut(t,o.getId(n),o.getId(i)),c=new Bn(new Fe(0,null,-1,0,0),[]);for(let a=0,u=r.length;a<u;a++){let m=r[a];c.insert(0,m.scope,m.parentScopes,m.fontStyle,o.getId(m.foreground),o.getId(m.background))}return new be(o,s,c)}var Vn=class{constructor(r){f(this,"_isFrozen");f(this,"_lastColorId");f(this,"_id2color");f(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(r)){this._isFrozen=!0;for(let e=0,t=r.length;e<t;e++)this._color2id[r[e]]=e,this._id2color[e]=r[e]}else this._isFrozen=!1}getId(r){if(r===null)return 0;r=r.toUpperCase();let e=this._color2id[r];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${r}`);return e=++this._lastColorId,this._color2id[r]=e,this._id2color[e]=r,e}getColorMap(){return this._id2color.slice(0)}},Mn=Object.freeze([]),Fe=class Ht{constructor(e,t,n,i,o){f(this,"scopeDepth");f(this,"parentScopes");f(this,"fontStyle");f(this,"foreground");f(this,"background");this.scopeDepth=e,this.parentScopes=t||Mn,this.fontStyle=n,this.foreground=i,this.background=o}clone(){return new Ht(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},Bn=class ze{constructor(e,t=[],n={}){f(this,"_rulesWithParentScopes");this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,i=0;for(;e.parentScopes[n]===">"&&n++,t.parentScopes[i]===">"&&i++,!(n>=e.parentScopes.length||i>=t.parentScopes.length);){const o=t.parentScopes[i].length-e.parentScopes[n].length;if(o!==0)return o;n++,i++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let n=e.indexOf("."),i,o;if(n===-1?(i=e,o=""):(i=e.substring(0,n),o=e.substring(n+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(ze._cmpBySpecificity),t}insert(e,t,n,i,o,s){if(t===""){this._doInsertHere(e,n,i,o,s);return}let c=t.indexOf("."),a,u;c===-1?(a=t,u=""):(a=t.substring(0,c),u=t.substring(c+1));let m;this._children.hasOwnProperty(a)?m=this._children[a]:(m=new ze(this._mainRule.clone(),Fe.cloneArr(this._rulesWithParentScopes)),this._children[a]=m),m.insert(e+1,u,n,i,o,s)}_doInsertHere(e,t,n,i,o){if(t===null){this._mainRule.acceptOverwrite(e,n,i,o);return}for(let s=0,c=this._rulesWithParentScopes.length;s<c;s++){let a=this._rulesWithParentScopes[s];if(Gt(a.parentScopes,t)===0){a.acceptOverwrite(e,n,i,o);return}}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Fe(e,t,n,i,o))}},Q=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=B.getLanguageId(e),n=B.getTokenType(e),i=B.getFontStyle(e),o=B.getForeground(e),s=B.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:i,foreground:o,background:s})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,t,n,i,o,s,c){let a=B.getLanguageId(e),u=B.getTokenType(e),m=B.containsBalancedBrackets(e)?1:0,d=B.getFontStyle(e),h=B.getForeground(e),p=B.getBackground(e);return t!==0&&(a=t),n!==8&&(u=n),i!==null&&(m=i?1:0),o!==-1&&(d=o),s!==0&&(h=s),c!==0&&(p=c),(a<<0|u<<8|m<<10|d<<11|h<<15|p<<24)>>>0}};function Re(r,e){const t=[],n=Gn(r);let i=n.next();for(;i!==null;){let a=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let u=s();if(t.push({matcher:u,priority:a}),i!==",")break;i=n.next()}return t;function o(){if(i==="-"){i=n.next();const a=o();return u=>!!a&&!a(u)}if(i==="("){i=n.next();const a=c();return i===")"&&(i=n.next()),a}if(ft(i)){const a=[];do a.push(i),i=n.next();while(ft(i));return u=>e(a,u)}return null}function s(){const a=[];let u=o();for(;u;)a.push(u),u=o();return m=>a.every(d=>d(m))}function c(){const a=[];let u=s();for(;u&&(a.push(u),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");u=s()}return m=>a.some(d=>d(m))}}function ft(r){return!!r&&!!r.match(/[\w\.:]+/)}function Gn(r){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(r);return{next:()=>{if(!t)return null;const n=t[0];return t=e.exec(r),n}}}function Wt(r){typeof r.dispose=="function"&&r.dispose()}var oe=class{constructor(r){this.scopeName=r}toKey(){return this.scopeName}},jn=class{constructor(r,e){this.scopeName=r,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},$n=class{constructor(){f(this,"_references",[]);f(this,"_seenReferenceKeys",new Set);f(this,"visitedRule",new Set)}get references(){return this._references}add(r){const e=r.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(r))}},Un=class{constructor(r,e){f(this,"seenFullScopeRequests",new Set);f(this,"seenPartialScopeRequests",new Set);f(this,"Q");this.repo=r,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new oe(this.initialScopeName)]}processQueue(){const r=this.Q;this.Q=[];const e=new $n;for(const t of r)Hn(t,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof oe){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName)||this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function Hn(r,e,t,n){const i=t.lookup(r.scopeName);if(!i){if(r.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=t.lookup(e);r instanceof oe?Ee({baseGrammar:o,selfGrammar:i},n):qe(r.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},n);const s=t.injections(r.scopeName);if(s)for(const c of s)n.add(new oe(c))}function qe(r,e,t){if(e.repository&&e.repository[r]){const n=e.repository[r];Te([n],e,t)}}function Ee(r,e){r.selfGrammar.patterns&&Array.isArray(r.selfGrammar.patterns)&&Te(r.selfGrammar.patterns,{...r,repository:r.selfGrammar.repository},e),r.selfGrammar.injections&&Te(Object.values(r.selfGrammar.injections),{...r,repository:r.selfGrammar.repository},e)}function Te(r,e,t){for(const n of r){if(t.visitedRule.has(n))continue;t.visitedRule.add(n);const i=n.repository?Vt({},e.repository,n.repository):e.repository;Array.isArray(n.patterns)&&Te(n.patterns,{...e,repository:i},t);const o=n.include;if(!o)continue;const s=Ft(o);switch(s.kind){case 0:Ee({...e,selfGrammar:e.baseGrammar},t);break;case 1:Ee(e,t);break;case 2:qe(s.ruleName,{...e,repository:i},t);break;case 3:case 4:const c=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(c){const a={baseGrammar:e.baseGrammar,selfGrammar:c,repository:i};s.kind===4?qe(s.ruleName,a,t):Ee(a,t)}else s.kind===4?t.add(new jn(s.scopeName,s.ruleName)):t.add(new oe(s.scopeName));break}}}var Wn=class{constructor(){f(this,"kind",0)}},Fn=class{constructor(){f(this,"kind",1)}},zn=class{constructor(r){f(this,"kind",2);this.ruleName=r}},qn=class{constructor(r){f(this,"kind",3);this.scopeName=r}},Kn=class{constructor(r,e){f(this,"kind",4);this.scopeName=r,this.ruleName=e}};function Ft(r){if(r==="$base")return new Wn;if(r==="$self")return new Fn;const e=r.indexOf("#");if(e===-1)return new qn(r);if(e===0)return new zn(r.substring(1));{const t=r.substring(0,e),n=r.substring(e+1);return new Kn(t,n)}}var Yn=/\\(\d+)/,_t=/\\(\d+)/g,Jn=-1,zt=-2;var de=class{constructor(r,e,t,n){f(this,"$location");f(this,"id");f(this,"_nameIsCapturing");f(this,"_name");f(this,"_contentNameIsCapturing");f(this,"_contentName");this.$location=r,this.id=e,this._name=t||null,this._nameIsCapturing=pe.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=pe.hasCaptures(this._contentName)}get debugName(){const r=this.$location?`${Mt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${r}`}getName(r,e){return!this._nameIsCapturing||this._name===null||r===null||e===null?this._name:pe.replaceCaptures(this._name,r,e)}getContentName(r,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:pe.replaceCaptures(this._contentName,r,e)}},Xn=class extends de{constructor(e,t,n,i,o){super(e,t,n,i);f(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,i){throw new Error("Not supported!")}},Qn=class extends de{constructor(e,t,n,i,o){super(e,t,n,null);f(this,"_match");f(this,"captures");f(this,"_cachedCompiledPatterns");this._match=new se(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ae,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gt=class extends de{constructor(e,t,n,i,o){super(e,t,n,i);f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ae,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ke=class extends de{constructor(e,t,n,i,o,s,c,a,u,m){super(e,t,n,i);f(this,"_begin");f(this,"beginCaptures");f(this,"_end");f(this,"endHasBackReferences");f(this,"endCaptures");f(this,"applyEndPatternLast");f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");this._begin=new se(o,this.id),this.beginCaptures=s,this._end=new se(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=u||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ae;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Ae=class extends de{constructor(e,t,n,i,o,s,c,a,u){super(e,t,n,i);f(this,"_begin");f(this,"beginCaptures");f(this,"whileCaptures");f(this,"_while");f(this,"whileHasBackReferences");f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");f(this,"_cachedCompiledWhilePatterns");this._begin=new se(o,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new se(c,zt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ae;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ae,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},qt=class D{static createCaptureRule(e,t,n,i,o){return e.registerRule(s=>new Xn(t,s,n,i,o))}static getCompiledRuleId(e,t,n){return e.id||t.registerRule(i=>{if(e.id=i,e.match)return new Qn(e.$vscodeTextmateLocation,e.id,e.name,e.match,D._compileCaptures(e.captures,t,n));if(typeof e.begin>"u"){e.repository&&(n=Vt({},n,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new gt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,D._compilePatterns(o,t,n))}return e.while?new Ae(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,t,n),e.while,D._compileCaptures(e.whileCaptures||e.captures,t,n),D._compilePatterns(e.patterns,t,n)):new Ke(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,t,n),e.end,D._compileCaptures(e.endCaptures||e.captures,t,n),e.applyEndPatternLast,D._compilePatterns(e.patterns,t,n))}),e.id}static _compileCaptures(e,t,n){let i=[];if(e){let o=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const c=parseInt(s,10);c>o&&(o=c)}for(let s=0;s<=o;s++)i[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const c=parseInt(s,10);let a=0;e[s].patterns&&(a=D.getCompiledRuleId(e[s],t,n)),i[c]=D.createCaptureRule(t,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,a)}}return i}static _compilePatterns(e,t,n){let i=[];if(e)for(let o=0,s=e.length;o<s;o++){const c=e[o];let a=-1;if(c.include){const u=Ft(c.include);switch(u.kind){case 0:case 1:a=D.getCompiledRuleId(n[c.include],t,n);break;case 2:let m=n[u.ruleName];m&&(a=D.getCompiledRuleId(m,t,n));break;case 3:case 4:const d=u.scopeName,h=u.kind===4?u.ruleName:null,p=t.getExternalGrammar(d,n);if(p)if(h){let _=p.repository[h];_&&(a=D.getCompiledRuleId(_,t,p.repository))}else a=D.getCompiledRuleId(p.repository.$self,t,p.repository);break}}else a=D.getCompiledRuleId(c,t,n);if(a!==-1){const u=t.getRule(a);let m=!1;if((u instanceof gt||u instanceof Ke||u instanceof Ae)&&u.hasMissingPatterns&&u.patterns.length===0&&(m=!0),m)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},se=class Kt{constructor(e,t){f(this,"source");f(this,"ruleId");f(this,"hasAnchor");f(this,"hasBackReferences");f(this,"_anchorCache");if(e&&typeof e=="string"){const n=e.length;let i=0,o=[],s=!1;for(let c=0;c<n;c++)if(e.charAt(c)==="\\"&&c+1<n){const u=e.charAt(c+1);u==="z"?(o.push(e.substring(i,c)),o.push("$(?!\\n)(?<!\\n)"),i=c+2):(u==="A"||u==="G")&&(s=!0),c++}this.hasAnchor=s,i===0?this.source=e:(o.push(e.substring(i,n)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source=="string"?this.hasBackReferences=Yn.test(this.source):this.hasBackReferences=!1}clone(){return new Kt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=t.map(i=>e.substring(i.start,i.end));return _t.lastIndex=0,this.source.replace(_t,(i,o)=>jt(n[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],t=[],n=[],i=[],o,s,c,a;for(o=0,s=this.source.length;o<s;o++)c=this.source.charAt(o),e[o]=c,t[o]=c,n[o]=c,i[o]=c,c==="\\"&&o+1<s&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="￿",t[o+1]="￿",n[o+1]="A",i[o+1]="A"):a==="G"?(e[o+1]="￿",t[o+1]="G",n[o+1]="￿",i[o+1]="G"):(e[o+1]=a,t[o+1]=a,n[o+1]=a,i[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:t.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ae=class{constructor(){f(this,"_items");f(this,"_hasAnchors");f(this,"_cached");f(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(r){this._items.push(r),this._hasAnchors=this._hasAnchors||r.hasAnchor}unshift(r){this._items.unshift(r),this._hasAnchors=this._hasAnchors||r.hasAnchor}length(){return this._items.length}setSource(r,e){this._items[r].source!==e&&(this._disposeCaches(),this._items[r].setSource(e))}compile(r){if(!this._cached){let e=this._items.map(t=>t.source);this._cached=new yt(r,e,this._items.map(t=>t.ruleId))}return this._cached}compileAG(r,e,t){return this._hasAnchors?e?t?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(r,e,t)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(r,e,t)),this._anchorCache.A1_G0):t?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(r,e,t)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(r,e,t)),this._anchorCache.A0_G0):this.compile(r)}_resolveAnchors(r,e,t){let n=this._items.map(i=>i.resolveAnchors(e,t));return new yt(r,n,this._items.map(i=>i.ruleId))}},yt=class{constructor(r,e,t){f(this,"scanner");this.regExps=e,this.rules=t,this.scanner=r.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const r=[];for(let e=0,t=this.rules.length;e<t;e++)r.push(" - "+this.rules[e]+": "+this.regExps[e]);return r.join(`
3
3
  `)}findNextMatchSync(r,e,t){const n=this.scanner.findNextMatchSync(r,e,t);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},Ge=class{constructor(r,e){this.languageId=r,this.tokenType=e}},W,Zn=(W=class{constructor(e,t){f(this,"_defaultAttributes");f(this,"_embeddedLanguagesMatcher");f(this,"_getBasicScopeAttributes",new $t(e=>{const t=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new Ge(t,n)}));this._defaultAttributes=new Ge(e,8),this._embeddedLanguagesMatcher=new er(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?W._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(W.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},f(W,"_NULL_SCOPE_METADATA",new Ge(0,0)),f(W,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),W),er=class{constructor(r){f(this,"values");f(this,"scopesRegExp");if(r.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(r);const e=r.map(([t,n])=>jt(t));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(r){if(!this.scopesRegExp)return;const e=r.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},Et=class{constructor(r,e){this.stack=r,this.stoppedEarly=e}};function Yt(r,e,t,n,i,o,s,c){const a=e.content.length;let u=!1,m=-1;if(s){const p=tr(r,e,t,n,i,o);i=p.stack,n=p.linePos,t=p.isFirstLine,m=p.anchorPosition}const d=Date.now();for(;!u;){if(c!==0&&Date.now()-d>c)return new Et(i,!0);h()}return new Et(i,!1);function h(){const p=nr(r,e,t,n,i,m);if(!p){o.produce(i,a),u=!0;return}const _=p.captureIndices,b=p.matchedRuleId,v=_&&_.length>0?_[0].end>n:!1;if(b===Jn){const y=i.getRule(r);o.produce(i,_[0].start),i=i.withContentNameScopesList(i.nameScopesList),re(r,e,t,i,o,y.endCaptures,_),o.produce(i,_[0].end);const E=i;if(i=i.parent,m=E.getAnchorPos(),!v&&E.getEnterPos()===n){i=E,o.produce(i,a),u=!0;return}}else{const y=r.getRule(b);o.produce(i,_[0].start);const E=i,R=y.getName(e.content,_),A=i.contentNameScopesList.pushAttributed(R,r);if(i=i.push(b,n,m,_[0].end===a,null,A,A),y instanceof Ke){const L=y;re(r,e,t,i,o,L.beginCaptures,_),o.produce(i,_[0].end),m=_[0].end;const x=L.getContentName(e.content,_),O=A.pushAttributed(x,r);if(i=i.withContentNameScopesList(O),L.endHasBackReferences&&(i=i.withEndRule(L.getEndWithResolvedBackReferences(e.content,_))),!v&&E.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),u=!0;return}}else if(y instanceof Ae){const L=y;re(r,e,t,i,o,L.beginCaptures,_),o.produce(i,_[0].end),m=_[0].end;const x=L.getContentName(e.content,_),O=A.pushAttributed(x,r);if(i=i.withContentNameScopesList(O),L.whileHasBackReferences&&(i=i.withEndRule(L.getWhileWithResolvedBackReferences(e.content,_))),!v&&E.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),u=!0;return}}else if(re(r,e,t,i,o,y.captures,_),o.produce(i,_[0].end),i=i.pop(),!v){i=i.safePop(),o.produce(i,a),u=!0;return}}_[0].end>n&&(n=_[0].end,t=!1)}}function tr(r,e,t,n,i,o){let s=i.beginRuleCapturedEOL?0:-1;const c=[];for(let a=i;a;a=a.pop()){const u=a.getRule(r);u instanceof Ae&&c.push({rule:u,stack:a})}for(let a=c.pop();a;a=c.pop()){const{ruleScanner:u,findOptions:m}=or(a.rule,r,a.stack.endRule,t,n===s),d=u.findNextMatchSync(e,n,m);if(d){if(d.ruleId!==zt){i=a.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(o.produce(a.stack,d.captureIndices[0].start),re(r,e,t,a.stack,o,a.rule.whileCaptures,d.captureIndices),o.produce(a.stack,d.captureIndices[0].end),s=d.captureIndices[0].end,d.captureIndices[0].end>n&&(n=d.captureIndices[0].end,t=!1))}else{i=a.stack.pop();break}}return{stack:i,linePos:n,anchorPosition:s,isFirstLine:t}}function nr(r,e,t,n,i,o){const s=rr(r,e,t,n,i,o),c=r.getInjections();if(c.length===0)return s;const a=ir(c,r,e,t,n,i,o);if(!a)return s;if(!s)return a;const u=s.captureIndices[0].start,m=a.captureIndices[0].start;return m<u||a.priorityMatch&&m===u?a:s}function rr(r,e,t,n,i,o){const s=i.getRule(r),{ruleScanner:c,findOptions:a}=Jt(s,r,i.endRule,t,n===o),u=c.findNextMatchSync(e,n,a);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function ir(r,e,t,n,i,o,s){let c=Number.MAX_VALUE,a=null,u,m=0;const d=o.contentNameScopesList.getScopeNames();for(let h=0,p=r.length;h<p;h++){const _=r[h];if(!_.matcher(d))continue;const b=e.getRule(_.ruleId),{ruleScanner:v,findOptions:y}=Jt(b,e,null,n,i===s),E=v.findNextMatchSync(t,i,y);if(!E)continue;const R=E.captureIndices[0].start;if(!(R>=c)&&(c=R,a=E.captureIndices,u=E.ruleId,m=_.priority,c===i))break}return a?{priorityMatch:m===-1,captureIndices:a,matchedRuleId:u}:null}function Jt(r,e,t,n,i){return{ruleScanner:r.compileAG(e,t,n,i),findOptions:0}}function or(r,e,t,n,i){return{ruleScanner:r.compileWhileAG(e,t,n,i),findOptions:0}}function re(r,e,t,n,i,o,s){if(o.length===0)return;const c=e.content,a=Math.min(o.length,s.length),u=[],m=s[0].end;for(let d=0;d<a;d++){const h=o[d];if(h===null)continue;const p=s[d];if(p.length===0)continue;if(p.start>m)break;for(;u.length>0&&u[u.length-1].endPos<=p.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,p.start):i.produce(n,p.start),h.retokenizeCapturedWithRuleId){const b=h.getName(c,s),v=n.contentNameScopesList.pushAttributed(b,r),y=h.getContentName(c,s),E=v.pushAttributed(y,r),R=n.push(h.retokenizeCapturedWithRuleId,p.start,-1,!1,null,v,E),A=r.createOnigString(c.substring(0,p.end));Yt(r,A,t&&p.start===0,p.start,R,i,!1,0),Wt(A);continue}const _=h.getName(c,s);if(_!==null){const v=(u.length>0?u[u.length-1].scopes:n.contentNameScopesList).pushAttributed(_,r);u.push(new sr(v,p.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var sr=class{constructor(r,e){f(this,"scopes");f(this,"endPos");this.scopes=r,this.endPos=e}};function ar(r,e,t,n,i,o,s,c){return new cr(r,e,t,n,i,o,s,c)}function vt(r,e,t,n,i){const o=Re(e,Se),s=qt.getCompiledRuleId(t,n,i.repository);for(const c of o)r.push({debugSelector:e,matcher:c.matcher,ruleId:s,grammar:i,priority:c.priority})}function Se(r,e){if(e.length<r.length)return!1;let t=0;return r.every(n=>{for(let i=t;i<e.length;i++)if(lr(e[i],n))return t=i+1,!0;return!1})}function lr(r,e){if(!r)return!1;if(r===e)return!0;const t=e.length;return r.length>t&&r.substr(0,t)===e&&r[t]==="."}var cr=class{constructor(r,e,t,n,i,o,s,c){f(this,"_rootId");f(this,"_lastRuleId");f(this,"_ruleId2desc");f(this,"_includedGrammars");f(this,"_grammarRepository");f(this,"_grammar");f(this,"_injections");f(this,"_basicScopeAttributesProvider");f(this,"_tokenTypeMatchers");if(this._rootScopeName=r,this.balancedBracketSelectors=o,this._onigLib=c,this._basicScopeAttributesProvider=new Zn(t,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=bt(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const a of Object.keys(i)){const u=Re(a,Se);for(const m of u)this._tokenTypeMatchers.push({matcher:m.matcher,type:i[a]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const r of this._ruleId2desc)r&&r.dispose()}createOnigScanner(r){return this._onigLib.createOnigScanner(r)}createOnigString(r){return this._onigLib.createOnigString(r)}getMetadataForScope(r){return this._basicScopeAttributesProvider.getBasicScopeAttributes(r)}_collectInjections(){const r={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],t=this._rootScopeName,n=r.lookup(t);if(n){const i=n.injections;if(i)for(let s in i)vt(e,s,i[s],this,n);const o=this._grammarRepository.injections(t);o&&o.forEach(s=>{const c=this.getExternalGrammar(s);if(c){const a=c.injectionSelector;a&&vt(e,a,c,this,c)}})}return e.sort((i,o)=>i.priority-o.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(r){const e=++this._lastRuleId,t=r(e);return this._ruleId2desc[e]=t,t}getRule(r){return this._ruleId2desc[r]}getExternalGrammar(r,e){if(this._includedGrammars[r])return this._includedGrammars[r];if(this._grammarRepository){const t=this._grammarRepository.lookup(r);if(t)return this._includedGrammars[r]=bt(t,e&&e.$base),this._includedGrammars[r]}}tokenizeLine(r,e,t=0){const n=this._tokenize(r,e,!1,t);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(r,e,t=0){const n=this._tokenize(r,e,!0,t);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(r,e,t,n){this._rootId===-1&&(this._rootId=qt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===Ye.NULL){i=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),m=this.themeProvider.getDefaults(),d=Q.set(0,u.languageId,u.tokenType,null,m.fontStyle,m.foregroundId,m.backgroundId),h=this.getRule(this._rootId).getName(null,null);let p;h?p=ie.createRootAndLookUpScopeName(h,d,this):p=ie.createRoot("unknown",d),e=new Ye(null,this._rootId,-1,-1,!1,null,p,p)}else i=!1,e.reset();r=r+`
4
4
  `;const o=this.createOnigString(r),s=o.content.length,c=new dr(t,r,this._tokenTypeMatchers,this.balancedBracketSelectors),a=Yt(this,o,i,0,e,c,!0,n);return Wt(o),{lineLength:s,lineTokens:c,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function bt(r,e){return r=kn(r),r.repository=r.repository||{},r.repository.$self={$vscodeTextmateLocation:r.$vscodeTextmateLocation,patterns:r.patterns,name:r.scopeName},r.repository.$base=e||r.repository.$self,r}var ie=class j{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(e,t){let n=e,i=(e==null?void 0:e.scopePath)??null;for(const o of t)i=Be.push(i,o.scopeNames),n=new j(n,i,o.encodedTokenAttributes);return n}static createRoot(e,t){return new j(null,new Be(null,e),t)}static createRootAndLookUpScopeName(e,t,n){const i=n.getMetadataForScope(e),o=new Be(null,e),s=n.themeProvider.themeMatch(o),c=j.mergeAttributes(t,i,s);return new j(null,o,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return j.equals(this,e)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let i=-1,o=0,s=0;return n!==null&&(i=n.fontStyle,o=n.foregroundId,s=n.backgroundId),Q.set(e,t.languageId,t.tokenType,null,i,o,s)}pushAttributed(e,t){if(e===null)return this;if(e.indexOf(" ")===-1)return j._pushAttributed(this,e,t);const n=e.split(/ /g);let i=this;for(const o of n)i=j._pushAttributed(i,o,t);return i}static _pushAttributed(e,t,n){const i=n.getMetadataForScope(t),o=e.scopePath.push(t),s=n.themeProvider.themeMatch(o),c=j.mergeAttributes(e.tokenAttributes,i,s);return new j(e,o,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var i;const t=[];let n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(((i=n.parent)==null?void 0:i.scopePath)??null)}),n=n.parent;return n===e?t.reverse():void 0}},G,Ye=(G=class{constructor(e,t,n,i,o,s,c,a){f(this,"_stackElementBrand");f(this,"_enterPos");f(this,"_anchorPos");f(this,"depth");this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=c,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}equals(e){return e===null?!1:G._equals(this,e)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?ie.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){G._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,n,i,o,s,c){return new G(this,e,t,n,i,o,s,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){var n,i;return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${(n=this.nameScopesList)==null?void 0:n.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new G(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){var e,t,n;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((t=this.nameScopesList)==null?void 0:t.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((n=this.contentNameScopesList)==null?void 0:n.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,t){const n=ie.fromExtension((e==null?void 0:e.nameScopesList)??null,t.nameScopesList);return new G(e,t.ruleId,t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,n,ie.fromExtension(n,t.contentNameScopesList))}},f(G,"NULL",new G(null,0,0,0,!1,null,null,null)),G),ur=class{constructor(r,e){f(this,"balancedBracketScopes");f(this,"unbalancedBracketScopes");f(this,"allowAny",!1);this.balancedBracketScopes=r.flatMap(t=>t==="*"?(this.allowAny=!0,[]):Re(t,Se).map(n=>n.matcher)),this.unbalancedBracketScopes=e.flatMap(t=>Re(t,Se).map(n=>n.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(r){for(const e of this.unbalancedBracketScopes)if(e(r))return!1;for(const e of this.balancedBracketScopes)if(e(r))return!0;return this.allowAny}},dr=class{constructor(r,e,t,n){f(this,"_emitBinaryTokens");f(this,"_lineText");f(this,"_tokens");f(this,"_binaryTokens");f(this,"_lastTokenEndIndex");f(this,"_tokenTypeOverrides");this.balancedBracketSelectors=n,this._emitBinaryTokens=r,this._tokenTypeOverrides=t,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(r,e){this.produceFromScopes(r.contentNameScopesList,e)}produceFromScopes(r,e){var n;if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let i=(r==null?void 0:r.tokenAttributes)??0,o=!1;if((n=this.balancedBracketSelectors)!=null&&n.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=(r==null?void 0:r.getScopeNames())??[];for(const c of this._tokenTypeOverrides)c.matcher(s)&&(i=Q.set(i,0,c.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(i=Q.set(i,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=e;return}const t=(r==null?void 0:r.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:t}),this._lastTokenEndIndex=e}getResult(r,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(r,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(r,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(r,e),this._binaryTokens[this._binaryTokens.length-2]=0);const t=new Uint32Array(this._binaryTokens.length);for(let n=0,i=this._binaryTokens.length;n<i;n++)t[n]=this._binaryTokens[n];return t}},mr=class{constructor(r,e){f(this,"_grammars",new Map);f(this,"_rawGrammars",new Map);f(this,"_injectionGrammars",new Map);f(this,"_theme");this._onigLib=e,this._theme=r}dispose(){for(const r of this._grammars.values())r.dispose()}setTheme(r){this._theme=r}getColorMap(){return this._theme.getColorMap()}addGrammar(r,e){this._rawGrammars.set(r.scopeName,r),e&&this._injectionGrammars.set(r.scopeName,e)}lookup(r){return this._rawGrammars.get(r)}injections(r){return this._injectionGrammars.get(r)}getDefaults(){return this._theme.getDefaults()}themeMatch(r){return this._theme.match(r)}grammarForScopeName(r,e,t,n,i){if(!this._grammars.has(r)){let o=this._rawGrammars.get(r);if(!o)return null;this._grammars.set(r,ar(r,o,e,t,n,i,this,this._onigLib))}return this._grammars.get(r)}},hr=class{constructor(e){f(this,"_options");f(this,"_syncRegistry");f(this,"_ensureGrammarCache");this._options=e,this._syncRegistry=new mr(be.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(be.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new ur(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,i,o){const s=new Un(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(c=>this._loadSingleGrammar(c.scopeName)),s.processQueue();return this._grammarForScopeName(e,t,n,i,o)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const t=this._options.loadGrammar(e);if(t){const n=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,i=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,i)}_grammarForScopeName(e,t=0,n=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,n,i,o)}},Je=Ye.NULL;const pr=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class me{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}me.prototype.normal={};me.prototype.property={};me.prototype.space=void 0;function Xt(r,e){const t={},n={};for(const i of r)Object.assign(t,i.property),Object.assign(n,i.normal);return new me(t,n,e)}function Xe(r){return r.toLowerCase()}class V{constructor(e,t){this.attribute=t,this.property=e}}V.prototype.attribute="";V.prototype.booleanish=!1;V.prototype.boolean=!1;V.prototype.commaOrSpaceSeparated=!1;V.prototype.commaSeparated=!1;V.prototype.defined=!1;V.prototype.mustUseProperty=!1;V.prototype.number=!1;V.prototype.overloadedBoolean=!1;V.prototype.property="";V.prototype.spaceSeparated=!1;V.prototype.space=void 0;let fr=0;const T=q(),P=q(),Qe=q(),g=q(),S=q(),J=q(),M=q();function q(){return 2**++fr}const Ze=Object.freeze(Object.defineProperty({__proto__:null,boolean:T,booleanish:P,commaOrSpaceSeparated:M,commaSeparated:J,number:g,overloadedBoolean:Qe,spaceSeparated:S},Symbol.toStringTag,{value:"Module"})),je=Object.keys(Ze);class rt extends V{constructor(e,t,n,i){let o=-1;if(super(e,t),Rt(this,"space",i),typeof n=="number")for(;++o<je.length;){const s=je[o];Rt(this,je[o],(n&Ze[s])===Ze[s])}}}rt.prototype.defined=!0;function Rt(r,e,t){t&&(r[e]=t)}function Z(r){const e={},t={};for(const[n,i]of Object.entries(r.properties)){const o=new rt(n,r.transform(r.attributes||{},n),i,r.space);r.mustUseProperty&&r.mustUseProperty.includes(n)&&(o.mustUseProperty=!0),e[n]=o,t[Xe(n)]=n,t[Xe(o.attribute)]=n}return new me(e,t,r.space)}const Qt=Z({properties:{ariaActiveDescendant:null,ariaAtomic:P,ariaAutoComplete:null,ariaBusy:P,ariaChecked:P,ariaColCount:g,ariaColIndex:g,ariaColSpan:g,ariaControls:S,ariaCurrent:null,ariaDescribedBy:S,ariaDetails:null,ariaDisabled:P,ariaDropEffect:S,ariaErrorMessage:null,ariaExpanded:P,ariaFlowTo:S,ariaGrabbed:P,ariaHasPopup:null,ariaHidden:P,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:S,ariaLevel:g,ariaLive:null,ariaModal:P,ariaMultiLine:P,ariaMultiSelectable:P,ariaOrientation:null,ariaOwns:S,ariaPlaceholder:null,ariaPosInSet:g,ariaPressed:P,ariaReadOnly:P,ariaRelevant:null,ariaRequired:P,ariaRoleDescription:S,ariaRowCount:g,ariaRowIndex:g,ariaRowSpan:g,ariaSelected:P,ariaSetSize:g,ariaSort:null,ariaValueMax:g,ariaValueMin:g,ariaValueNow:g,ariaValueText:null,role:null},transform(r,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function Zt(r,e){return e in r?r[e]:e}function en(r,e){return Zt(r,e.toLowerCase())}const _r=Z({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:J,acceptCharset:S,accessKey:S,action:null,allow:null,allowFullScreen:T,allowPaymentRequest:T,allowUserMedia:T,alt:null,as:null,async:T,autoCapitalize:null,autoComplete:S,autoFocus:T,autoPlay:T,blocking:S,capture:null,charSet:null,checked:T,cite:null,className:S,cols:g,colSpan:null,content:null,contentEditable:P,controls:T,controlsList:S,coords:g|J,crossOrigin:null,data:null,dateTime:null,decoding:null,default:T,defer:T,dir:null,dirName:null,disabled:T,download:Qe,draggable:P,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:T,formTarget:null,headers:S,height:g,hidden:Qe,high:g,href:null,hrefLang:null,htmlFor:S,httpEquiv:S,id:null,imageSizes:null,imageSrcSet:null,inert:T,inputMode:null,integrity:null,is:null,isMap:T,itemId:null,itemProp:S,itemRef:S,itemScope:T,itemType:S,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:T,low:g,manifest:null,max:null,maxLength:g,media:null,method:null,min:null,minLength:g,multiple:T,muted:T,name:null,nonce:null,noModule:T,noValidate:T,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:T,optimum:g,pattern:null,ping:S,placeholder:null,playsInline:T,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:T,referrerPolicy:null,rel:S,required:T,reversed:T,rows:g,rowSpan:g,sandbox:S,scope:null,scoped:T,seamless:T,selected:T,shadowRootClonable:T,shadowRootDelegatesFocus:T,shadowRootMode:null,shape:null,size:g,sizes:null,slot:null,span:g,spellCheck:P,src:null,srcDoc:null,srcLang:null,srcSet:null,start:g,step:null,style:null,tabIndex:g,target:null,title:null,translate:null,type:null,typeMustMatch:T,useMap:null,value:P,width:g,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:S,axis:null,background:null,bgColor:null,border:g,borderColor:null,bottomMargin:g,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:T,declare:T,event:null,face:null,frame:null,frameBorder:null,hSpace:g,leftMargin:g,link:null,longDesc:null,lowSrc:null,marginHeight:g,marginWidth:g,noResize:T,noHref:T,noShade:T,noWrap:T,object:null,profile:null,prompt:null,rev:null,rightMargin:g,rules:null,scheme:null,scrolling:P,standby:null,summary:null,text:null,topMargin:g,valueType:null,version:null,vAlign:null,vLink:null,vSpace:g,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:T,disableRemotePlayback:T,prefix:null,property:null,results:g,security:null,unselectable:null},space:"html",transform:en}),gr=Z({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:M,accentHeight:g,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:g,amplitude:g,arabicForm:null,ascent:g,attributeName:null,attributeType:null,azimuth:g,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:g,by:null,calcMode:null,capHeight:g,className:S,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:g,diffuseConstant:g,direction:null,display:null,dur:null,divisor:g,dominantBaseline:null,download:T,dx:null,dy:null,edgeMode:null,editable:null,elevation:g,enableBackground:null,end:null,event:null,exponent:g,externalResourcesRequired:null,fill:null,fillOpacity:g,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:J,g2:J,glyphName:J,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:g,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:g,horizOriginX:g,horizOriginY:g,id:null,ideographic:g,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:g,k:g,k1:g,k2:g,k3:g,k4:g,kernelMatrix:M,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:g,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:g,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:g,overlineThickness:g,paintOrder:null,panose1:null,path:null,pathLength:g,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:S,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:g,pointsAtY:g,pointsAtZ:g,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:M,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:M,rev:M,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:M,requiredFeatures:M,requiredFonts:M,requiredFormats:M,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:g,specularExponent:g,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:g,strikethroughThickness:g,string:null,stroke:null,strokeDashArray:M,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:g,strokeOpacity:g,strokeWidth:null,style:null,surfaceScale:g,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:M,tabIndex:g,tableValues:null,target:null,targetX:g,targetY:g,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:M,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:g,underlineThickness:g,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:g,values:null,vAlphabetic:g,vMathematical:g,vectorEffect:null,vHanging:g,vIdeographic:g,version:null,vertAdvY:g,vertOriginX:g,vertOriginY:g,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:g,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Zt}),tn=Z({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(r,e){return"xlink:"+e.slice(5).toLowerCase()}}),nn=Z({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:en}),rn=Z({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(r,e){return"xml:"+e.slice(3).toLowerCase()}}),yr=/[A-Z]/g,Tt=/-[a-z]/g,Er=/^data[-\w.:]+$/i;function vr(r,e){const t=Xe(e);let n=e,i=V;if(t in r.normal)return r.property[r.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Er.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(Tt,Rr);n="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!Tt.test(o)){let s=o.replace(yr,br);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}i=rt}return new i(n,e)}function br(r){return"-"+r.toLowerCase()}function Rr(r){return r.charAt(1).toUpperCase()}const Tr=Xt([Qt,_r,tn,nn,rn],"html"),on=Xt([Qt,gr,tn,nn,rn],"svg"),At={}.hasOwnProperty;function Ar(r,e){const t=e||{};function n(i,...o){let s=n.invalid;const c=n.handlers;if(i&&At.call(i,r)){const a=String(i[r]);s=At.call(c,a)?c[a]:n.unknown}if(s)return s.call(this,i,...o)}return n.handlers=t.handlers||{},n.invalid=t.invalid,n.unknown=t.unknown,n}const Sr=/["&'<>`]/g,Lr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Pr=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,kr=/[|\\{}()[\]^$+*?.]/g,St=new WeakMap;function Ir(r,e){if(r=r.replace(e.subset?wr(e.subset):Sr,n),e.subset||e.escapeOnly)return r;return r.replace(Lr,t).replace(Pr,n);function t(i,o,s){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),e)}function n(i,o,s){return e.format(i.charCodeAt(0),s.charCodeAt(o+1),e)}}function wr(r){let e=St.get(r);return e||(e=Or(r),St.set(r,e)),e}function Or(r){const e=[];let t=-1;for(;++t<r.length;)e.push(r[t].replace(kr,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Cr=/[\dA-Fa-f]/;function Dr(r,e,t){const n="&#x"+r.toString(16).toUpperCase();return t&&e&&!Cr.test(String.fromCharCode(e))?n:n+";"}const Nr=/\d/;function xr(r,e,t){const n="&#"+String(r);return t&&e&&!Nr.test(String.fromCharCode(e))?n:n+";"}const Vr=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],$e={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Mr=["cent","copy","divide","gt","lt","not","para","times"],sn={}.hasOwnProperty,et={};let fe;for(fe in $e)sn.call($e,fe)&&(et[$e[fe]]=fe);const Br=/[^\dA-Za-z]/;function Gr(r,e,t,n){const i=String.fromCharCode(r);if(sn.call(et,i)){const o=et[i],s="&"+o;return t&&Vr.includes(o)&&!Mr.includes(o)&&(!n||e&&e!==61&&Br.test(String.fromCharCode(e)))?s:s+";"}return""}function jr(r,e,t){let n=Dr(r,e,t.omitOptionalSemicolons),i;if((t.useNamedReferences||t.useShortestReferences)&&(i=Gr(r,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!i)&&t.useShortestReferences){const o=xr(r,e,t.omitOptionalSemicolons);o.length<n.length&&(n=o)}return i&&(!t.useShortestReferences||i.length<n.length)?i:n}function X(r,e){return Ir(r,Object.assign({format:jr},e))}const $r=/^>|^->|<!--|-->|--!>|<!-$/g,Ur=[">"],Hr=["<",">"];function Wr(r,e,t,n){return n.settings.bogusComments?"<?"+X(r.value,Object.assign({},n.settings.characterReferences,{subset:Ur}))+">":"<!--"+r.value.replace($r,i)+"-->";function i(o){return X(o,Object.assign({},n.settings.characterReferences,{subset:Hr}))}}function Fr(r,e,t,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}function Lt(r,e){const t=String(r);if(typeof e!="string")throw new TypeError("Expected character");let n=0,i=t.indexOf(e);for(;i!==-1;)n++,i=t.indexOf(e,i+e.length);return n}function zr(r,e){const t=e||{};return(r[r.length-1]===""?[...r,""]:r).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}function qr(r){return r.join(" ").trim()}const Kr=/[ \t\n\f\r]/g;function it(r){return typeof r=="object"?r.type==="text"?Pt(r.value):!1:Pt(r)}function Pt(r){return r.replace(Kr,"")===""}const w=ln(1),an=ln(-1),Yr=[];function ln(r){return e;function e(t,n,i){const o=t?t.children:Yr;let s=(n||0)+r,c=o[s];if(!i)for(;c&&it(c);)s+=r,c=o[s];return c}}const Jr={}.hasOwnProperty;function cn(r){return e;function e(t,n,i){return Jr.call(r,t.tagName)&&r[t.tagName](t,n,i)}}const ot=cn({body:Qr,caption:Ue,colgroup:Ue,dd:ni,dt:ti,head:Ue,html:Xr,li:ei,optgroup:ri,option:ii,p:Zr,rp:kt,rt:kt,tbody:si,td:It,tfoot:ai,th:It,thead:oi,tr:li});function Ue(r,e,t){const n=w(t,e,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&it(n.value.charAt(0)))}function Xr(r,e,t){const n=w(t,e);return!n||n.type!=="comment"}function Qr(r,e,t){const n=w(t,e);return!n||n.type!=="comment"}function Zr(r,e,t){const n=w(t,e);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!t||!(t.type==="element"&&(t.tagName==="a"||t.tagName==="audio"||t.tagName==="del"||t.tagName==="ins"||t.tagName==="map"||t.tagName==="noscript"||t.tagName==="video"))}function ei(r,e,t){const n=w(t,e);return!n||n.type==="element"&&n.tagName==="li"}function ti(r,e,t){const n=w(t,e);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}function ni(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}function kt(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}function ri(r,e,t){const n=w(t,e);return!n||n.type==="element"&&n.tagName==="optgroup"}function ii(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}function oi(r,e,t){const n=w(t,e);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}function si(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}function ai(r,e,t){return!w(t,e)}function li(r,e,t){const n=w(t,e);return!n||n.type==="element"&&n.tagName==="tr"}function It(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}const ci=cn({body:mi,colgroup:hi,head:di,html:ui,tbody:pi});function ui(r){const e=w(r,-1);return!e||e.type!=="comment"}function di(r){const e=new Set;for(const n of r.children)if(n.type==="element"&&(n.tagName==="base"||n.tagName==="title")){if(e.has(n.tagName))return!1;e.add(n.tagName)}const t=r.children[0];return!t||t.type==="element"}function mi(r){const e=w(r,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&it(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function hi(r,e,t){const n=an(t,e),i=w(r,-1,!0);return t&&n&&n.type==="element"&&n.tagName==="colgroup"&&ot(n,t.children.indexOf(n),t)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function pi(r,e,t){const n=an(t,e),i=w(r,-1);return t&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&ot(n,t.children.indexOf(n),t)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const _e={name:[[`
5
5
  \f\r &/=>`.split(""),`
@@ -1 +1 @@
1
- import{ac as _,t as b,i as x,u as E,m as V,k as B}from"./monaco-viewer-B3iAKbO0.js";import{c as L,b as F,n as p,a as D,S as T,E as z,D as G,C as $,G as U}from"./git-diff-vendor-CSgooKT_.js";import{at as N,au as K}from"./main-CXoIBcJC.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./index-DskBWxXS.js";var q=b("<div>"),O=b("<div class=tool-call-diff-viewer>"),P=b("<pre class=tool-call-diff-fallback>");const j=B("session");U();function I(e,s,o){const a=window.getComputedStyle(o),i=document.createElement("span");i.textContent=s||"",i.style.position="absolute",i.style.visibility="hidden",i.style.pointerEvents="none",i.style.display="inline-block",i.style.width="auto",i.style.maxWidth="none",i.style.whiteSpace="nowrap",i.style.fontFamily=a.fontFamily,i.style.fontSize=a.fontSize,i.style.fontWeight=a.fontWeight,i.style.fontStyle=a.fontStyle,i.style.letterSpacing=a.letterSpacing,i.style.fontVariant=a.fontVariant,i.style.textTransform=a.textTransform,i.style.lineHeight=a.lineHeight,e.appendChild(i);const f=Math.ceil(i.getBoundingClientRect().width);return i.remove(),f}function M(e,s,o=40){const a=s.reduce((l,n)=>Math.max(l,I(e,n.text,n.source)),0),i=s.reduce((l,n)=>Math.max(l,n.text.length),1),f=Math.round(i*7+4);return Math.max(2,Math.min(o,a>0?a+2:f))}function J(e,s){const o=e.querySelector(".unified-diff-table-wrapper"),a=e.querySelector(".unified-diff-table"),i=e.querySelector(".unified-diff-table-num-col"),f=e.querySelectorAll(".diff-line-num"),l=e.querySelectorAll(".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper"),n=[];a&&(s?(a.classList.add("table-fixed"),a.style.tableLayout="fixed",a.style.width="100%",a.style.minWidth="100%"):(a.classList.remove("table-fixed"),a.style.tableLayout="auto",a.style.width="max-content",a.style.minWidth="100%")),f.forEach(r=>{var v,k;const c=r.querySelector("[data-line-old-num]"),m=r.querySelector("[data-line-new-num]"),W=r.querySelector(".shrink-0"),S=r.querySelector(":scope > .flex"),C=r.querySelector(":scope > .tool-call-diff-compact-line-number"),y=((v=c==null?void 0:c.textContent)==null?void 0:v.trim())??"",w=((k=m==null?void 0:m.textContent)==null?void 0:k.trim())??"",H=w.length>0&&w!=="0",R=y.length>0&&y!=="0",g=H?w:R?y:w||y;S&&(S.style.display="none"),W&&(W.style.display="none"),c&&(c.style.display="none",c.style.width="auto"),m&&(m.style.display="none",m.style.width="auto"),r.style.paddingLeft="1px",r.style.paddingRight="1px",r.style.textAlign="left";const h=C??document.createElement("span");h.className="tool-call-diff-compact-line-number",h.textContent=g,h.setAttribute("aria-hidden",g?"false":"true"),C||r.appendChild(h),n.push({gutter:r,label:h,text:g})});const t=M(e,n.map(r=>({text:r.text,source:r.label}))),d=`${t}px`,u=`${Math.max(8,t-10)}px`;o&&(o.style.setProperty("--diff-aside-width",u),o.style.setProperty("--diff-aside-width--",u)),i&&(i.style.width=d),n.forEach(({gutter:r,label:c})=>{r.style.width=d,r.style.minWidth=d,r.style.maxWidth=d,c.style.width="auto",c.style.maxWidth="none"}),l.forEach(r=>{r.style.width=d,r.style.minWidth=d,r.style.maxWidth=d,r.style.paddingLeft="0",r.style.paddingRight="0"})}function Q(e){const s=e.querySelector(".old-diff-table-wrapper"),o=e.querySelector(".new-diff-table-wrapper"),a=Array.from(e.querySelectorAll(".diff-line-old-num, .diff-line-new-num")),i=Array.from(e.querySelectorAll(".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper")),f=a.map(t=>({cell:t,span:t.querySelector("[data-line-num]")})).filter(t=>!!t.span),n=`${M(e,f.map(({span:t})=>{var d;return{text:((d=t.textContent)==null?void 0:d.trim())??"",source:t}}),64)}px`;[s,o].forEach(t=>{t&&t.style.setProperty("--diff-aside-width",n)}),a.forEach(t=>{t.style.width=n,t.style.minWidth=n,t.style.maxWidth=n,t.style.paddingLeft="2px",t.style.paddingRight="2px",t.style.textAlign="left",t.style.whiteSpace="nowrap",t.style.overflowWrap="normal",t.style.wordBreak="normal"}),f.forEach(({span:t})=>{t.style.whiteSpace="nowrap",t.style.overflowWrap="normal",t.style.wordBreak="normal"}),i.forEach(t=>{t.style.width=n,t.style.minWidth=n,t.style.maxWidth=n,t.style.paddingLeft="0",t.style.paddingRight="0"})}function A(e,s,o=!1){if(s==="unified"){J(e,o);return}s==="split"&&Q(e)}function ne(e){const s=L(()=>{const f=_(e.diffText);if(!f)return null;const l=N(e.filePath)||"text",n=e.filePath||"diff";return{oldFile:{fileName:n,fileLang:l},newFile:{fileName:n,fileLang:l},hunks:[f]}});let o,a;const i=L(()=>s()?`${e.theme}|${e.mode}|${e.wrap?"wrap":"nowrap"}|${e.diffText}`:"");return F(()=>{var n;if(e.cachedHtml){o&&A(o,e.mode,!!e.wrap),(n=e.onRendered)==null||n.call(e);return}const l=i();l&&o&&a!==l&&requestAnimationFrame(()=>{var d;if(!o)return;A(o,e.mode,!!e.wrap);const t=o.innerHTML;t&&(a=l,e.cacheEntryParams&&K(e.cacheEntryParams,{text:e.diffText,html:t,theme:e.theme,mode:e.mode,wrap:e.wrap}),(d=e.onRendered)==null||d.call(e))})}),(()=>{var f=O();return x(f,p(T,{get when(){return e.cachedHtml},get fallback(){return(()=>{var l=q(),n=o;return typeof n=="function"?E(n,l):o=l,x(l,p(T,{get when(){return s()},get fallback(){return(()=>{var t=P();return x(t,()=>e.diffText),t})()},children:t=>p(z,{fallback:d=>(j.warn("Failed to render diff view",d),(()=>{var u=P();return x(u,()=>e.diffText),u})()),get children(){return p(G,{get data(){return t()},get diffViewMode(){return V(()=>e.mode==="split")()?$.Split:$.Unified},get diffViewTheme(){return e.theme},diffViewHighlight:!0,get diffViewWrap(){return!!e.wrap},diffViewFontSize:13})}})})),l})()},get children(){var l=q(),n=o;return typeof n=="function"?E(n,l):o=l,D(()=>l.innerHTML=e.cachedHtml),l}})),f})()}export{ne as ToolCallDiffViewer};
1
+ import{ac as _,t as b,i as x,u as E,m as V,k as B}from"./monaco-viewer-B3iAKbO0.js";import{c as L,b as F,n as p,a as D,S as T,E as z,D as G,C as $,G as U}from"./git-diff-vendor-CSgooKT_.js";import{au as N,av as K}from"./main-CuzUuQRM.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./index-CXCTlmS7.js";var q=b("<div>"),O=b("<div class=tool-call-diff-viewer>"),P=b("<pre class=tool-call-diff-fallback>");const j=B("session");U();function I(e,s,o){const a=window.getComputedStyle(o),i=document.createElement("span");i.textContent=s||"",i.style.position="absolute",i.style.visibility="hidden",i.style.pointerEvents="none",i.style.display="inline-block",i.style.width="auto",i.style.maxWidth="none",i.style.whiteSpace="nowrap",i.style.fontFamily=a.fontFamily,i.style.fontSize=a.fontSize,i.style.fontWeight=a.fontWeight,i.style.fontStyle=a.fontStyle,i.style.letterSpacing=a.letterSpacing,i.style.fontVariant=a.fontVariant,i.style.textTransform=a.textTransform,i.style.lineHeight=a.lineHeight,e.appendChild(i);const f=Math.ceil(i.getBoundingClientRect().width);return i.remove(),f}function M(e,s,o=40){const a=s.reduce((l,n)=>Math.max(l,I(e,n.text,n.source)),0),i=s.reduce((l,n)=>Math.max(l,n.text.length),1),f=Math.round(i*7+4);return Math.max(2,Math.min(o,a>0?a+2:f))}function J(e,s){const o=e.querySelector(".unified-diff-table-wrapper"),a=e.querySelector(".unified-diff-table"),i=e.querySelector(".unified-diff-table-num-col"),f=e.querySelectorAll(".diff-line-num"),l=e.querySelectorAll(".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper"),n=[];a&&(s?(a.classList.add("table-fixed"),a.style.tableLayout="fixed",a.style.width="100%",a.style.minWidth="100%"):(a.classList.remove("table-fixed"),a.style.tableLayout="auto",a.style.width="max-content",a.style.minWidth="100%")),f.forEach(r=>{var v,k;const c=r.querySelector("[data-line-old-num]"),m=r.querySelector("[data-line-new-num]"),W=r.querySelector(".shrink-0"),S=r.querySelector(":scope > .flex"),C=r.querySelector(":scope > .tool-call-diff-compact-line-number"),y=((v=c==null?void 0:c.textContent)==null?void 0:v.trim())??"",w=((k=m==null?void 0:m.textContent)==null?void 0:k.trim())??"",H=w.length>0&&w!=="0",R=y.length>0&&y!=="0",g=H?w:R?y:w||y;S&&(S.style.display="none"),W&&(W.style.display="none"),c&&(c.style.display="none",c.style.width="auto"),m&&(m.style.display="none",m.style.width="auto"),r.style.paddingLeft="1px",r.style.paddingRight="1px",r.style.textAlign="left";const h=C??document.createElement("span");h.className="tool-call-diff-compact-line-number",h.textContent=g,h.setAttribute("aria-hidden",g?"false":"true"),C||r.appendChild(h),n.push({gutter:r,label:h,text:g})});const t=M(e,n.map(r=>({text:r.text,source:r.label}))),d=`${t}px`,u=`${Math.max(8,t-10)}px`;o&&(o.style.setProperty("--diff-aside-width",u),o.style.setProperty("--diff-aside-width--",u)),i&&(i.style.width=d),n.forEach(({gutter:r,label:c})=>{r.style.width=d,r.style.minWidth=d,r.style.maxWidth=d,c.style.width="auto",c.style.maxWidth="none"}),l.forEach(r=>{r.style.width=d,r.style.minWidth=d,r.style.maxWidth=d,r.style.paddingLeft="0",r.style.paddingRight="0"})}function Q(e){const s=e.querySelector(".old-diff-table-wrapper"),o=e.querySelector(".new-diff-table-wrapper"),a=Array.from(e.querySelectorAll(".diff-line-old-num, .diff-line-new-num")),i=Array.from(e.querySelectorAll(".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper")),f=a.map(t=>({cell:t,span:t.querySelector("[data-line-num]")})).filter(t=>!!t.span),n=`${M(e,f.map(({span:t})=>{var d;return{text:((d=t.textContent)==null?void 0:d.trim())??"",source:t}}),64)}px`;[s,o].forEach(t=>{t&&t.style.setProperty("--diff-aside-width",n)}),a.forEach(t=>{t.style.width=n,t.style.minWidth=n,t.style.maxWidth=n,t.style.paddingLeft="2px",t.style.paddingRight="2px",t.style.textAlign="left",t.style.whiteSpace="nowrap",t.style.overflowWrap="normal",t.style.wordBreak="normal"}),f.forEach(({span:t})=>{t.style.whiteSpace="nowrap",t.style.overflowWrap="normal",t.style.wordBreak="normal"}),i.forEach(t=>{t.style.width=n,t.style.minWidth=n,t.style.maxWidth=n,t.style.paddingLeft="0",t.style.paddingRight="0"})}function A(e,s,o=!1){if(s==="unified"){J(e,o);return}s==="split"&&Q(e)}function ne(e){const s=L(()=>{const f=_(e.diffText);if(!f)return null;const l=N(e.filePath)||"text",n=e.filePath||"diff";return{oldFile:{fileName:n,fileLang:l},newFile:{fileName:n,fileLang:l},hunks:[f]}});let o,a;const i=L(()=>s()?`${e.theme}|${e.mode}|${e.wrap?"wrap":"nowrap"}|${e.diffText}`:"");return F(()=>{var n;if(e.cachedHtml){o&&A(o,e.mode,!!e.wrap),(n=e.onRendered)==null||n.call(e);return}const l=i();l&&o&&a!==l&&requestAnimationFrame(()=>{var d;if(!o)return;A(o,e.mode,!!e.wrap);const t=o.innerHTML;t&&(a=l,e.cacheEntryParams&&K(e.cacheEntryParams,{text:e.diffText,html:t,theme:e.theme,mode:e.mode,wrap:e.wrap}),(d=e.onRendered)==null||d.call(e))})}),(()=>{var f=O();return x(f,p(T,{get when(){return e.cachedHtml},get fallback(){return(()=>{var l=q(),n=o;return typeof n=="function"?E(n,l):o=l,x(l,p(T,{get when(){return s()},get fallback(){return(()=>{var t=P();return x(t,()=>e.diffText),t})()},children:t=>p(z,{fallback:d=>(j.warn("Failed to render diff view",d),(()=>{var u=P();return x(u,()=>e.diffText),u})()),get children(){return p(G,{get data(){return t()},get diffViewMode(){return V(()=>e.mode==="split")()?$.Split:$.Unified},get diffViewTheme(){return e.theme},diffViewHighlight:!0,get diffViewWrap(){return!!e.wrap},diffViewFontSize:13})}})})),l})()},get children(){var l=q(),n=o;return typeof n=="function"?E(n,l):o=l,D(()=>l.innerHTML=e.cachedHtml),l}})),f})()}export{ne as ToolCallDiffViewer};