@inkeep/open-knowledge 0.24.0-beta.9 → 0.24.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/assets/skills/discovery/SKILL.md +1 -1
  2. package/dist/assets/skills/project/SKILL.md +1 -1
  3. package/dist/assets/skills/write-skill/SKILL.md +1 -1
  4. package/dist/cli.mjs +6 -6
  5. package/dist/constants-BkaHQwBf.mjs +2 -0
  6. package/dist/{dist-DntDG79T.mjs → dist-BE7wFbsP.mjs} +7 -1
  7. package/dist/{dist-DcBjg7v1.mjs → dist-BGSaL7p3.mjs} +1 -1
  8. package/dist/index.mjs +1 -1
  9. package/dist/{init-BpxupkU8.mjs → init-7SvJD3sH.mjs} +4 -4
  10. package/dist/init-bDHOds_X.mjs +1 -0
  11. package/dist/loader-4szyJ339.mjs +1 -0
  12. package/dist/{loader-N_QdF1u_.mjs → loader-Cf_M1W4X.mjs} +2 -2
  13. package/dist/{preview-s3Havjbx.mjs → preview-C62hPPvu.mjs} +2 -2
  14. package/dist/preview-CqBMvaQ8.mjs +1 -0
  15. package/dist/public/assets/{ActivityModeContent-BI4Df5Ot.js → ActivityModeContent-C_0T78hM.js} +1 -1
  16. package/dist/public/assets/DocumentContext-OFvo7PrR.js +34 -0
  17. package/dist/public/assets/{GraphPanel-Bk09bPYa.js → GraphPanel-Dtitc1eX.js} +2 -2
  18. package/dist/public/assets/{ManagedArtifactProperties-CUbnVbWn.js → ManagedArtifactProperties-58nLtwFY.js} +1 -1
  19. package/dist/public/assets/{PropertyPanel-CzQwMOCB.js → PropertyPanel-AUD0qp8s.js} +1 -1
  20. package/dist/public/assets/{SettingsDialogBody-g1i36Giw.js → SettingsDialogBody-Ao5l1wfw.js} +2 -2
  21. package/dist/public/assets/{SkillEditorActions-CRoMHxRu.js → SkillEditorActions-6BIs3QJ2.js} +1 -1
  22. package/dist/public/assets/{SourceEditor-ZeVUeNQS.js → SourceEditor-Dpd0XQHx.js} +2 -2
  23. package/dist/public/assets/{TerminalPanel-Dw0Y6Ae0.js → TerminalPanel-BZfQlHIU.js} +1 -1
  24. package/dist/public/assets/{config-validation-events-BnMuBpKG.js → config-validation-events-BZXhH87O.js} +4 -4
  25. package/dist/public/assets/{dist-B6LhaNhH.js → dist-Di2l3Ssa.js} +33 -33
  26. package/dist/public/assets/{documents-events-CjxhW8Ss.js → documents-events-BYd41PCA.js} +1 -1
  27. package/dist/public/assets/{file-tree-adapter-CD7o_Lt8.js → file-tree-adapter-D5GTz2ID.js} +1 -1
  28. package/dist/public/assets/index-D1MvaGNd.css +1 -0
  29. package/dist/public/assets/index-DwzuUOtG.js +2004 -0
  30. package/dist/public/assets/{keyboard-shortcuts--l1hu9rj.js → keyboard-shortcuts-BsTuVge8.js} +1 -1
  31. package/dist/public/assets/{navigation-targets-Do18hOxW.js → navigation-targets-JmelDbnG.js} +1 -1
  32. package/dist/public/assets/{open-managed-artifact-tab-BrsRguCG.js → open-managed-artifact-tab-C1P5ckzv.js} +1 -1
  33. package/dist/public/assets/{prop-types-BWbCzvKf.js → prop-types-BI50tqle.js} +1 -1
  34. package/dist/public/assets/{selection-context-EICQHKu7.js → selection-context-B_OTMTyK.js} +1 -1
  35. package/dist/public/assets/{skill-actions-C3JccuCW.js → skill-actions-DGnNQ-ww.js} +1 -1
  36. package/dist/public/assets/{skills-api-QMFjP3Vr.js → skills-api-DlAIvvy9.js} +1 -1
  37. package/dist/public/assets/{target-navigation-intent-DEhNMIwE.js → target-navigation-intent-DgYVkH6P.js} +1 -1
  38. package/dist/public/assets/{telemetry-impl-DBczuMUj.js → telemetry-impl-Djdmeyn9.js} +1 -1
  39. package/dist/public/assets/{telemetry-startup-Cg7C20ZM.js → telemetry-startup-BChv7055.js} +1 -1
  40. package/dist/public/assets/{typing-burst-detector-BK-6m16z.js → typing-burst-detector-C_tNq_hq.js} +1 -1
  41. package/dist/public/index.html +17 -17
  42. package/dist/{repair-launch-json-D_10Sd3K.mjs → repair-launch-json-BGpfxfq5.mjs} +2 -2
  43. package/dist/{repair-mcp-configs-r9wvcYAO.mjs → repair-mcp-configs-C1EywDXJ.mjs} +2 -2
  44. package/dist/repair-skills-9djvOEM4.mjs +1 -0
  45. package/dist/{repair-skills-BKmGWSNm.mjs → repair-skills-BTS6TSPc.mjs} +2 -2
  46. package/dist/{src-CiHl8WvC.mjs → src-BVUMmI6e.mjs} +2 -2
  47. package/dist/start-BixsRc9C.mjs +1 -0
  48. package/dist/{start-B7-EsP1r.mjs → start-gTSB5dNC.mjs} +2 -2
  49. package/dist/{write-project-skill-9bkdbAY0.mjs → write-project-skill-0Z8n-AaN.mjs} +2 -2
  50. package/package.json +1 -1
  51. package/dist/constants-BmAr3rdG.mjs +0 -2
  52. package/dist/init-BpOaZynV.mjs +0 -1
  53. package/dist/loader-Lwtb31w6.mjs +0 -1
  54. package/dist/preview-B-WYIlyC.mjs +0 -1
  55. package/dist/public/assets/DocumentContext-Cg27VRjw.js +0 -34
  56. package/dist/public/assets/index-Ba09jc7G.css +0 -1
  57. package/dist/public/assets/index-DZpWsI_D.js +0 -2004
  58. package/dist/repair-skills-C_iNRKzb.mjs +0 -1
  59. package/dist/start-CruqSCXm.mjs +0 -1
@@ -1,2 +1,2 @@
1
- import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{$ as i,An as a,Dn as o,Fn as s,G as c,In as l,Ln as u,M as d,Mn as f,Mt as p,N as m,Nn as h,On as g,P as _,Pn as v,Tn as y,Z as ee,jn as b,jt as te,kn as x}from"./DocumentContext-Cg27VRjw.js";import{$r as ne,Gi as re,j as S,on as C}from"./dist-B6LhaNhH.js";import{n as ie}from"./config-context-tA-88vUT.js";import{l as ae}from"./keyboard-shortcuts--l1hu9rj.js";import{$ as w,Dt as oe,Et as T,Ft as E,J as D,Ot as O,P as k,Q as A,Tt as j,X as M,jt as N,pt as P,ut as se,xt as F}from"./dist-DWaLpHcz.js";import{a as ce,d as le,f as I,h as ue,i as L,m as de,t as fe,u as pe}from"./typing-burst-detector-BK-6m16z.js";import{o as R,r as z}from"./selection-context-EICQHKu7.js";var B=e(t(),1),me=r(),V=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:f(this.yanchor),yhead:f(this.yhead)}}static fromJSON(t){return new e(a(t.yanchor),a(t.yhead))}},H=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new o(e)}toYPos(e,t=0){return b(this.ytext,e,t)}fromYPos(e){let t=x(a(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:t.index,assoc:t.assoc}}toYRange(e){let t=e.assoc;return new V(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?T.cursor(n.pos,n.assoc):T.range(t.pos,n.pos)}},U=O.define({combine(e){return e[e.length-1]}}),W=F.define(),G=class{constructor(e){this.view=e,this.conf=e.state.facet(U),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[W.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(W)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
2
- `);e!==r&&t.delete(e+n,r-e),s.length>0&&t.insert(e+n,s),n+=s.length-(r-e)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}},he=A.fromClass(G),ge=M.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:`0px 2px 0px 4px`},".cm-ySelectionCaret":{position:`relative`,borderLeft:`1px solid black`,borderRight:`1px solid black`,marginLeft:`-1px`,marginRight:`-1px`,boxSizing:`border-box`,display:`inline`},".cm-ySelectionCaretDot":{borderRadius:`50%`,position:`absolute`,width:`.4em`,height:`.4em`,top:`-.2em`,left:`-.2em`,backgroundColor:`inherit`,transition:`transform .3s ease-in-out`,boxSizing:`border-box`},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:`bottom center`,transform:`scale(0)`},".cm-ySelectionInfo":{position:`absolute`,top:`-1.05em`,left:`-1px`,fontSize:`.75em`,fontFamily:`serif`,fontStyle:`normal`,fontWeight:`normal`,lineHeight:`normal`,userSelect:`none`,color:`white`,paddingLeft:`2px`,paddingRight:`2px`,zIndex:101,transition:`opacity .3s ease-in-out`,backgroundColor:`inherit`,opacity:0,transitionDelay:`0s`,whiteSpace:`nowrap`},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:`0s`}}),_e=F.define(),ve=class extends w{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return h(`span`,[s(`class`,`cm-ySelectionCaret`),s(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[v(`⁠`),h(`div`,[s(`class`,`cm-ySelectionCaretDot`)]),v(`⁠`),h(`div`,[s(`class`,`cm-ySelectionInfo`)],[v(this.name)]),v(`⁠`)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},ye=class{constructor(e){this.conf=e.state.facet(U),this._listener=({added:t,updated:n,removed:r},i,a)=>{t.concat(n).concat(r).findIndex(e=>e!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[_e.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=N.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let t=this.conf.ytext,n=t.doc,r=this.conf.awareness,i=[],o=this.conf.awareness.getLocalState();if(o!=null){let n=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),i=n?e.state.selection.main:null,s=o.cursor==null?null:a(o.cursor.anchor),c=o.cursor==null?null:a(o.cursor.head);if(i!=null){let e=b(t,i.anchor),n=b(t,i.head);(o.cursor==null||!g(s,e)||!g(c,n))&&r.setLocalStateField(`cursor`,{anchor:e,head:n})}else o.cursor!=null&&n&&r.setLocalStateField(`cursor`,null)}r.getStates().forEach((a,o)=>{if(o===r.doc.clientID)return;let s=a.cursor;if(s==null||s.anchor==null||s.head==null)return;let c=x(s.anchor,n),d=x(s.head,n);if(c==null||d==null||c.type!==t||d.type!==t)return;let{color:f=`#30bced`,name:p=`Anonymous`}=a.user||{},m=a.user&&a.user.colorLight||f+`33`,h=u(c.index,d.index),g=l(c.index,d.index),_=e.view.state.doc.lineAt(h),v=e.view.state.doc.lineAt(g);if(_.number===v.number)i.push({from:h,to:g,value:D.mark({attributes:{style:`background-color: ${m}`},class:`cm-ySelection`})});else{i.push({from:h,to:_.from+_.length,value:D.mark({attributes:{style:`background-color: ${m}`},class:`cm-ySelection`})}),i.push({from:v.from,to:g,value:D.mark({attributes:{style:`background-color: ${m}`},class:`cm-ySelection`})});for(let t=_.number+1;t<v.number;t++){let n=e.view.state.doc.line(t).from;i.push({from:n,to:n,value:D.line({attributes:{style:`background-color: ${m}`,class:`cm-yLineSelection`}})})}}i.push({from:d.index,to:d.index,value:D.widget({side:d.index-c.index>0?-1:1,block:!1,widget:new ve(f,p)})})}),this.decorations=D.set(i,!0)}},be=A.fromClass(ye,{decorations:e=>e.decorations}),xe=class{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}},K=O.define({combine(e){return e[e.length-1]}});F.define();var Se=class{constructor(e){this.view=e,this.conf=e.state.facet(K),this._undoManager=this.conf.undoManager,this.syncConf=e.state.facet(U),this._beforeChangeSelection=null,this._mux=y(),this._onStackItemAdded=({stackItem:e,changedParentTypes:t})=>{t.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!e.meta.has(this)&&e.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:t})=>{let n=t.meta.get(this);if(n){let t=this.syncConf.fromYRange(n);e.dispatch(e.state.update({selection:t,effects:[M.scrollIntoView(t)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on(`stack-item-added`,this._onStackItemAdded),this._undoManager.on(`stack-item-popped`,this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(W)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off(`stack-item-added`,this._onStackItemAdded),this._undoManager.off(`stack-item-popped`,this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}},Ce=A.fromClass(Se),we=({state:e,dispatch:t})=>e.facet(K).undo()||!0,Te=({state:e,dispatch:t})=>e.facet(K).redo()||!0,Ee=(e,t,{undoManager:n=new o(e)}={})=>{let r=new H(e,t),i=[U.of(r),he];return t&&i.push(ge,be),n!==!1&&i.push(K.of(new xe(n)),Ce,M.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?we(t):e.inputType===`historyRedo`?Te(t):!1}})),i},De=D.mark({class:`cm-link-ref-broken`}),q=/^\s{0,3}\[([^\]]+)\]:\s/,J=/\[([^\]]*)\]\[([^\]]*)\]/g,Oe=new Set([`FencedCode`,`CodeBlock`,`InlineCode`]);function Y(e,t){let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>1,a=t[i];if(e<a.from)r=i-1;else if(e>=a.to)n=i+1;else return!0}return!1}function ke(e){let t=[];return k(e).iterate({enter(e){if(Oe.has(e.name))return t.push({from:e.from,to:e.to}),!1}}),t.sort((e,t)=>e.from-t.from),t}function X(e){let t=new Set,n=[],r=e.doc,i=ke(e);for(let e=1;e<=r.lines;e++){let n=r.line(e);if(Y(n.from,i))continue;let a=q.exec(n.text);a&&t.add(a[1].toLowerCase())}for(let e=1;e<=r.lines;e++){let t=r.line(e);if(!Y(t.from,i)&&!q.test(t.text))for(J.lastIndex=0;;){let e=J.exec(t.text);if(!e)break;let r=t.from+e.index;if(Y(r,i))continue;let a=e[2]||e[1];n.push({from:r,to:r+e[0].length,label:a.toLowerCase()})}}let a=[];for(let e of n)t.has(e.label)||a.push(De.range(e.from,e.to));return a.sort((e,t)=>e.from-t.from),D.set(a)}var Ae=E.define({create(e){return X(e)},update(e,t){return t.docChanged?X(t.state):e},provide:e=>M.decorations.from(e)}),je=/^(\s*(?:[-*+]|\d+[.)]) (?:\[[ x]\] )?)/,Me=D.mark({class:`cm-del`}),Ne=D.line({class:`cm-table-header`,attributes:{style:`--list-hang: 2ch`}}),Z=D.line({class:`cm-table-row`,attributes:{style:`--list-hang: 2ch`}});function Pe(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=4;else break;return t}function Fe(e){if(e.doc.lines<2)return null;let t=e.doc.line(1);if(!S.test(t.text))return null;for(let n=2;n<=e.doc.lines;n++){let r=e.doc.line(n);if(S.test(r.text))return{from:t.from,to:r.to}}return null}function Q(e,t){let n=[],r=k(e),i=Fe(e),a=e=>i!==null&&e>=i.from&&e<=i.to;for(let{from:i,to:o}of t)r.iterate({from:i,to:o,enter(t){if(!a(t.from)){if(t.name===`Strikethrough`){let e=t.from,r=t.to,i=t.node.cursor();if(i.firstChild())do i.name===`StrikethroughMark`&&(i.from===t.from?e=i.to:r=i.from);while(i.nextSibling());return e<r&&n.push(Me.range(e,r)),!1}if(t.name===`ListItem`){let r=e.doc.lineAt(t.from),i=je.exec(r.text),a=i?i[1].length:2,o=D.line({class:`cm-list-item`,attributes:{style:`--list-hang: ${a}ch`}});n.push(o.range(r.from));return}if(t.name===`FencedCode`){let r=e.doc.lineAt(t.from),i=e.doc.lineAt(t.to);for(let t=r.number+1;t<i.number;t++){let r=e.doc.line(t),i=Pe(r.text),a=D.line({class:`cm-fenced-code-line`,attributes:{style:`--line-indent: ${i}`}});n.push(a.range(r.from))}return!1}if(t.name===`TableHeader`){let r=e.doc.lineAt(t.from);return n.push(Ne.range(r.from)),!1}if(t.name===`TableRow`){let r=e.doc.lineAt(t.from);return n.push(Z.range(r.from)),!1}if(t.name===`TableDelimiter`&&t.node.parent?.name===`Table`){let r=e.doc.lineAt(t.from);return n.push(Z.range(r.from)),!1}}}});return n.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),D.set(n)}var Ie=class{decorations;constructor(e){this.decorations=Q(e.state,e.visibleRanges)}update(e){(e.docChanged||e.viewportChanged||k(e.startState)!==k(e.state))&&(this.decorations=Q(e.view.state,e.view.visibleRanges))}},Le=A.fromClass(Ie,{decorations:e=>e.decorations});function Re(){return[Le,Ae]}var ze=n(),Be=56;function $(e,t){let n=e.state.doc,r=1;if(n.lines>=1&&S.test(n.line(1).text)){for(let e=2;e<=n.lines;e++)if(S.test(n.line(e).text)){r=e+1;break}}let i=C(),a=0;for(let o=r;o<=n.lines;o++){let r=n.line(o);if(!i(r.text)&&/^#{1,6}\s/.test(r.text)){if(a===t.index){e.dispatch({selection:T.cursor(r.from),effects:M.scrollIntoView(r.from,{y:`start`})}),e.focus();return}a++}}}function Ve(e,t){requestAnimationFrame(()=>{let n=e.state.doc,r=Math.min(t.offset,n.length);e.dispatch({selection:T.cursor(r),effects:M.scrollIntoView(r,{y:`center`})}),e.focus()})}function He(e){let t=(0,me.c)(33),{docName:n,ytext:r,provider:a,placeholder:o,isSourceModeActive:s}=e,c=(0,B.useRef)(null),l=(0,B.useRef)(null),[u,f]=(0,B.useState)(null);if(u)throw u;let{resolvedTheme:h}=re(),{merged:g}=ie(),v=(0,B.useRef)(s),y=g?.editor?.wordWrap??!0,b,x;t[0]===s?(b=t[1],x=t[2]):(b=()=>{v.current=s},x=[s],t[0]=s,t[1]=b,t[2]=x),(0,B.useEffect)(b,x);let S=(0,B.useRef)(null),C;t[3]!==o||t[4]!==a||t[5]!==h||t[6]!==y||t[7]!==r?(C=()=>{let e=c.current;if(!e)return;let t=a.configuration.name??``,n,s=Ge;try{n=te({docName:t,container:e,sizeStats:{viewCount:0,bytes:r.length},factory:e=>{let n=null,c=i({ydoc:a.document,ytext:r}),l=new j,u=new j,f=new j,p=new M({state:oe.create({doc:r.toString(),extensions:[pe,le({scrollToMatch:We}),se.of([ee]),Ee(r,a.awareness),...d({themeCompartment:l,resolvedTheme:h,ydoc:a.document,wordWrapCompartment:u,wordWrap:y,currentDocName:t}),Re(),c,M.updateListener.of(e=>{!e.selectionSet&&!e.docChanged||(n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null,L(t,`source`,ce(e.view)),z(t,`source`,R(e.view,t))},120))}),M.domEventHandlers({keydown:(e,t)=>!v.current||!ne()||!ae(e,`edit-with-ai`)?!1:(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),fe(),!0)}),f.of(P(o??``)),M.theme({"&":{height:`100%`}}),M.scrollMargins.of(Ue)]}),parent:e});L(t,`source`,ce(p)),z(t,`source`,R(p,t));let m=p.contentDOM;return m.addEventListener(`keydown`,s),m.addEventListener(`paste`,s),m.addEventListener(`drop`,s),m.addEventListener(`cut`,s),{view:p,ydoc:a.document,ytext:r,provider:a,themeCompartment:l,wordWrapCompartment:u,placeholderCompartment:f}}}),S.current=n,l.current=n.view}catch(e){let t=e;console.error(`[SourceEditor] mountCmEditor failed`,t),S.current=null,l.current=null,f(t instanceof Error?t:Error(String(t)))}return()=>{let e=S.current;e&&p(e),S.current=null,l.current=null}},t[3]=o,t[4]=a,t[5]=h,t[6]=y,t[7]=r,t[8]=C):C=t[8];let w;t[9]!==a||t[10]!==r?(w=[r,a],t[9]=a,t[10]=r,t[11]=w):w=t[11],(0,B.useEffect)(C,w);let T,E;t[12]===n?(T=t[13],E=t[14]):(T=()=>{},E=[n],t[12]=n,t[13]=T,t[14]=E),(0,B.useEffect)(T,E);let D,O;t[15]===h?(D=t[16],O=t[17]):(D=()=>{let e=S.current;e&&e.view.dispatch({effects:e.themeCompartment.reconfigure(h===`dark`?m:_)})},O=[h],t[15]=h,t[16]=D,t[17]=O),(0,B.useEffect)(D,O);let k,A;t[18]===y?(k=t[19],A=t[20]):(A=()=>{let e=S.current;e&&e.view.dispatch({effects:e.wordWrapCompartment.reconfigure(y?M.lineWrapping:[])})},k=[y],t[18]=y,t[19]=k,t[20]=A),(0,B.useEffect)(A,k);let N,F;t[21]===o?(N=t[22],F=t[23]):(N=()=>{let e=S.current;e&&e.view.dispatch({effects:e.placeholderCompartment.reconfigure(P(o??``))})},F=[o],t[21]=o,t[22]=N,t[23]=F),(0,B.useEffect)(N,F);let V,H;t[24]!==n||t[25]!==s?(V=()=>{let e=function(e){let t=e.detail;if(!t||t.mode!==`source`||!s)return;let r=l.current;r&&($(r,t),de(n))};return window.addEventListener(I,e),()=>window.removeEventListener(I,e)},H=[n,s],t[24]=n,t[25]=s,t[26]=V,t[27]=H):(V=t[26],H=t[27]),(0,B.useEffect)(V,H);let U,W;t[28]!==n||t[29]!==s?(U=()=>{if(!s)return;let e=l.current;if(!e)return;let t=ue(n);if(t){if(t.kind===`outline`){$(e,t.detail);return}Ve(e,t.detail)}},W=[n,s],t[28]=n,t[29]=s,t[30]=U,t[31]=W):(U=t[30],W=t[31]),(0,B.useEffect)(U,W);let G;return t[32]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,ze.jsx)(`div`,{ref:c,className:`source-editor h-full pb-3`}),t[32]=G):G=t[32],G}function Ue(){return{top:Be}}function We(e){return M.scrollIntoView(e,{y:`start`})}function Ge(){return c()}export{He as SourceEditor};
1
+ import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{$ as i,An as a,Dn as o,Fn as s,G as c,In as l,Ln as u,M as d,Mn as f,Mt as p,N as m,Nn as h,On as g,P as _,Pn as v,Tn as y,Z as ee,jn as b,jt as te,kn as x}from"./DocumentContext-OFvo7PrR.js";import{Ki as ne,ei as re,j as S,on as C}from"./dist-Di2l3Ssa.js";import{n as ie}from"./config-context-tA-88vUT.js";import{l as ae}from"./keyboard-shortcuts-BsTuVge8.js";import{$ as w,Dt as oe,Et as T,Ft as E,J as D,Ot as O,P as k,Q as A,Tt as j,X as M,jt as N,pt as P,ut as se,xt as F}from"./dist-DWaLpHcz.js";import{a as ce,d as le,f as I,h as ue,i as L,m as de,t as fe,u as pe}from"./typing-burst-detector-C_tNq_hq.js";import{o as R,r as z}from"./selection-context-B_OTMTyK.js";var B=e(t(),1),me=r(),V=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:f(this.yanchor),yhead:f(this.yhead)}}static fromJSON(t){return new e(a(t.yanchor),a(t.yhead))}},H=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new o(e)}toYPos(e,t=0){return b(this.ytext,e,t)}fromYPos(e){let t=x(a(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:t.index,assoc:t.assoc}}toYRange(e){let t=e.assoc;return new V(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?T.cursor(n.pos,n.assoc):T.range(t.pos,n.pos)}},U=O.define({combine(e){return e[e.length-1]}}),W=F.define(),G=class{constructor(e){this.view=e,this.conf=e.state.facet(U),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[W.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(W)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
2
+ `);e!==r&&t.delete(e+n,r-e),s.length>0&&t.insert(e+n,s),n+=s.length-(r-e)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}},he=A.fromClass(G),ge=M.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:`0px 2px 0px 4px`},".cm-ySelectionCaret":{position:`relative`,borderLeft:`1px solid black`,borderRight:`1px solid black`,marginLeft:`-1px`,marginRight:`-1px`,boxSizing:`border-box`,display:`inline`},".cm-ySelectionCaretDot":{borderRadius:`50%`,position:`absolute`,width:`.4em`,height:`.4em`,top:`-.2em`,left:`-.2em`,backgroundColor:`inherit`,transition:`transform .3s ease-in-out`,boxSizing:`border-box`},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:`bottom center`,transform:`scale(0)`},".cm-ySelectionInfo":{position:`absolute`,top:`-1.05em`,left:`-1px`,fontSize:`.75em`,fontFamily:`serif`,fontStyle:`normal`,fontWeight:`normal`,lineHeight:`normal`,userSelect:`none`,color:`white`,paddingLeft:`2px`,paddingRight:`2px`,zIndex:101,transition:`opacity .3s ease-in-out`,backgroundColor:`inherit`,opacity:0,transitionDelay:`0s`,whiteSpace:`nowrap`},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:`0s`}}),_e=F.define(),ve=class extends w{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return h(`span`,[s(`class`,`cm-ySelectionCaret`),s(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[v(`⁠`),h(`div`,[s(`class`,`cm-ySelectionCaretDot`)]),v(`⁠`),h(`div`,[s(`class`,`cm-ySelectionInfo`)],[v(this.name)]),v(`⁠`)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},ye=class{constructor(e){this.conf=e.state.facet(U),this._listener=({added:t,updated:n,removed:r},i,a)=>{t.concat(n).concat(r).findIndex(e=>e!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[_e.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=N.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let t=this.conf.ytext,n=t.doc,r=this.conf.awareness,i=[],o=this.conf.awareness.getLocalState();if(o!=null){let n=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),i=n?e.state.selection.main:null,s=o.cursor==null?null:a(o.cursor.anchor),c=o.cursor==null?null:a(o.cursor.head);if(i!=null){let e=b(t,i.anchor),n=b(t,i.head);(o.cursor==null||!g(s,e)||!g(c,n))&&r.setLocalStateField(`cursor`,{anchor:e,head:n})}else o.cursor!=null&&n&&r.setLocalStateField(`cursor`,null)}r.getStates().forEach((a,o)=>{if(o===r.doc.clientID)return;let s=a.cursor;if(s==null||s.anchor==null||s.head==null)return;let c=x(s.anchor,n),d=x(s.head,n);if(c==null||d==null||c.type!==t||d.type!==t)return;let{color:f=`#30bced`,name:p=`Anonymous`}=a.user||{},m=a.user&&a.user.colorLight||f+`33`,h=u(c.index,d.index),g=l(c.index,d.index),_=e.view.state.doc.lineAt(h),v=e.view.state.doc.lineAt(g);if(_.number===v.number)i.push({from:h,to:g,value:D.mark({attributes:{style:`background-color: ${m}`},class:`cm-ySelection`})});else{i.push({from:h,to:_.from+_.length,value:D.mark({attributes:{style:`background-color: ${m}`},class:`cm-ySelection`})}),i.push({from:v.from,to:g,value:D.mark({attributes:{style:`background-color: ${m}`},class:`cm-ySelection`})});for(let t=_.number+1;t<v.number;t++){let n=e.view.state.doc.line(t).from;i.push({from:n,to:n,value:D.line({attributes:{style:`background-color: ${m}`,class:`cm-yLineSelection`}})})}}i.push({from:d.index,to:d.index,value:D.widget({side:d.index-c.index>0?-1:1,block:!1,widget:new ve(f,p)})})}),this.decorations=D.set(i,!0)}},be=A.fromClass(ye,{decorations:e=>e.decorations}),xe=class{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}},K=O.define({combine(e){return e[e.length-1]}});F.define();var Se=class{constructor(e){this.view=e,this.conf=e.state.facet(K),this._undoManager=this.conf.undoManager,this.syncConf=e.state.facet(U),this._beforeChangeSelection=null,this._mux=y(),this._onStackItemAdded=({stackItem:e,changedParentTypes:t})=>{t.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!e.meta.has(this)&&e.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:t})=>{let n=t.meta.get(this);if(n){let t=this.syncConf.fromYRange(n);e.dispatch(e.state.update({selection:t,effects:[M.scrollIntoView(t)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on(`stack-item-added`,this._onStackItemAdded),this._undoManager.on(`stack-item-popped`,this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(W)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off(`stack-item-added`,this._onStackItemAdded),this._undoManager.off(`stack-item-popped`,this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}},Ce=A.fromClass(Se),we=({state:e,dispatch:t})=>e.facet(K).undo()||!0,Te=({state:e,dispatch:t})=>e.facet(K).redo()||!0,Ee=(e,t,{undoManager:n=new o(e)}={})=>{let r=new H(e,t),i=[U.of(r),he];return t&&i.push(ge,be),n!==!1&&i.push(K.of(new xe(n)),Ce,M.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?we(t):e.inputType===`historyRedo`?Te(t):!1}})),i},De=D.mark({class:`cm-link-ref-broken`}),q=/^\s{0,3}\[([^\]]+)\]:\s/,J=/\[([^\]]*)\]\[([^\]]*)\]/g,Oe=new Set([`FencedCode`,`CodeBlock`,`InlineCode`]);function Y(e,t){let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>1,a=t[i];if(e<a.from)r=i-1;else if(e>=a.to)n=i+1;else return!0}return!1}function ke(e){let t=[];return k(e).iterate({enter(e){if(Oe.has(e.name))return t.push({from:e.from,to:e.to}),!1}}),t.sort((e,t)=>e.from-t.from),t}function X(e){let t=new Set,n=[],r=e.doc,i=ke(e);for(let e=1;e<=r.lines;e++){let n=r.line(e);if(Y(n.from,i))continue;let a=q.exec(n.text);a&&t.add(a[1].toLowerCase())}for(let e=1;e<=r.lines;e++){let t=r.line(e);if(!Y(t.from,i)&&!q.test(t.text))for(J.lastIndex=0;;){let e=J.exec(t.text);if(!e)break;let r=t.from+e.index;if(Y(r,i))continue;let a=e[2]||e[1];n.push({from:r,to:r+e[0].length,label:a.toLowerCase()})}}let a=[];for(let e of n)t.has(e.label)||a.push(De.range(e.from,e.to));return a.sort((e,t)=>e.from-t.from),D.set(a)}var Ae=E.define({create(e){return X(e)},update(e,t){return t.docChanged?X(t.state):e},provide:e=>M.decorations.from(e)}),je=/^(\s*(?:[-*+]|\d+[.)]) (?:\[[ x]\] )?)/,Me=D.mark({class:`cm-del`}),Ne=D.line({class:`cm-table-header`,attributes:{style:`--list-hang: 2ch`}}),Z=D.line({class:`cm-table-row`,attributes:{style:`--list-hang: 2ch`}});function Pe(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=4;else break;return t}function Fe(e){if(e.doc.lines<2)return null;let t=e.doc.line(1);if(!S.test(t.text))return null;for(let n=2;n<=e.doc.lines;n++){let r=e.doc.line(n);if(S.test(r.text))return{from:t.from,to:r.to}}return null}function Q(e,t){let n=[],r=k(e),i=Fe(e),a=e=>i!==null&&e>=i.from&&e<=i.to;for(let{from:i,to:o}of t)r.iterate({from:i,to:o,enter(t){if(!a(t.from)){if(t.name===`Strikethrough`){let e=t.from,r=t.to,i=t.node.cursor();if(i.firstChild())do i.name===`StrikethroughMark`&&(i.from===t.from?e=i.to:r=i.from);while(i.nextSibling());return e<r&&n.push(Me.range(e,r)),!1}if(t.name===`ListItem`){let r=e.doc.lineAt(t.from),i=je.exec(r.text),a=i?i[1].length:2,o=D.line({class:`cm-list-item`,attributes:{style:`--list-hang: ${a}ch`}});n.push(o.range(r.from));return}if(t.name===`FencedCode`){let r=e.doc.lineAt(t.from),i=e.doc.lineAt(t.to);for(let t=r.number+1;t<i.number;t++){let r=e.doc.line(t),i=Pe(r.text),a=D.line({class:`cm-fenced-code-line`,attributes:{style:`--line-indent: ${i}`}});n.push(a.range(r.from))}return!1}if(t.name===`TableHeader`){let r=e.doc.lineAt(t.from);return n.push(Ne.range(r.from)),!1}if(t.name===`TableRow`){let r=e.doc.lineAt(t.from);return n.push(Z.range(r.from)),!1}if(t.name===`TableDelimiter`&&t.node.parent?.name===`Table`){let r=e.doc.lineAt(t.from);return n.push(Z.range(r.from)),!1}}}});return n.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),D.set(n)}var Ie=class{decorations;constructor(e){this.decorations=Q(e.state,e.visibleRanges)}update(e){(e.docChanged||e.viewportChanged||k(e.startState)!==k(e.state))&&(this.decorations=Q(e.view.state,e.view.visibleRanges))}},Le=A.fromClass(Ie,{decorations:e=>e.decorations});function Re(){return[Le,Ae]}var ze=n(),Be=56;function $(e,t){let n=e.state.doc,r=1;if(n.lines>=1&&S.test(n.line(1).text)){for(let e=2;e<=n.lines;e++)if(S.test(n.line(e).text)){r=e+1;break}}let i=C(),a=0;for(let o=r;o<=n.lines;o++){let r=n.line(o);if(!i(r.text)&&/^#{1,6}\s/.test(r.text)){if(a===t.index){e.dispatch({selection:T.cursor(r.from),effects:M.scrollIntoView(r.from,{y:`start`})}),e.focus();return}a++}}}function Ve(e,t){requestAnimationFrame(()=>{let n=e.state.doc,r=Math.min(t.offset,n.length);e.dispatch({selection:T.cursor(r),effects:M.scrollIntoView(r,{y:`center`})}),e.focus()})}function He(e){let t=(0,me.c)(33),{docName:n,ytext:r,provider:a,placeholder:o,isSourceModeActive:s}=e,c=(0,B.useRef)(null),l=(0,B.useRef)(null),[u,f]=(0,B.useState)(null);if(u)throw u;let{resolvedTheme:h}=ne(),{merged:g}=ie(),v=(0,B.useRef)(s),y=g?.editor?.wordWrap??!0,b,x;t[0]===s?(b=t[1],x=t[2]):(b=()=>{v.current=s},x=[s],t[0]=s,t[1]=b,t[2]=x),(0,B.useEffect)(b,x);let S=(0,B.useRef)(null),C;t[3]!==o||t[4]!==a||t[5]!==h||t[6]!==y||t[7]!==r?(C=()=>{let e=c.current;if(!e)return;let t=a.configuration.name??``,n,s=Ge;try{n=te({docName:t,container:e,sizeStats:{viewCount:0,bytes:r.length},factory:e=>{let n=null,c=i({ydoc:a.document,ytext:r}),l=new j,u=new j,f=new j,p=new M({state:oe.create({doc:r.toString(),extensions:[pe,le({scrollToMatch:We}),se.of([ee]),Ee(r,a.awareness),...d({themeCompartment:l,resolvedTheme:h,ydoc:a.document,wordWrapCompartment:u,wordWrap:y,currentDocName:t}),Re(),c,M.updateListener.of(e=>{!e.selectionSet&&!e.docChanged||(n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null,L(t,`source`,ce(e.view)),z(t,`source`,R(e.view,t))},120))}),M.domEventHandlers({keydown:(e,t)=>!v.current||!re()||!ae(e,`edit-with-ai`)?!1:(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),fe(),!0)}),f.of(P(o??``)),M.theme({"&":{height:`100%`}}),M.scrollMargins.of(Ue)]}),parent:e});L(t,`source`,ce(p)),z(t,`source`,R(p,t));let m=p.contentDOM;return m.addEventListener(`keydown`,s),m.addEventListener(`paste`,s),m.addEventListener(`drop`,s),m.addEventListener(`cut`,s),{view:p,ydoc:a.document,ytext:r,provider:a,themeCompartment:l,wordWrapCompartment:u,placeholderCompartment:f}}}),S.current=n,l.current=n.view}catch(e){let t=e;console.error(`[SourceEditor] mountCmEditor failed`,t),S.current=null,l.current=null,f(t instanceof Error?t:Error(String(t)))}return()=>{let e=S.current;e&&p(e),S.current=null,l.current=null}},t[3]=o,t[4]=a,t[5]=h,t[6]=y,t[7]=r,t[8]=C):C=t[8];let w;t[9]!==a||t[10]!==r?(w=[r,a],t[9]=a,t[10]=r,t[11]=w):w=t[11],(0,B.useEffect)(C,w);let T,E;t[12]===n?(T=t[13],E=t[14]):(T=()=>{},E=[n],t[12]=n,t[13]=T,t[14]=E),(0,B.useEffect)(T,E);let D,O;t[15]===h?(D=t[16],O=t[17]):(D=()=>{let e=S.current;e&&e.view.dispatch({effects:e.themeCompartment.reconfigure(h===`dark`?m:_)})},O=[h],t[15]=h,t[16]=D,t[17]=O),(0,B.useEffect)(D,O);let k,A;t[18]===y?(k=t[19],A=t[20]):(A=()=>{let e=S.current;e&&e.view.dispatch({effects:e.wordWrapCompartment.reconfigure(y?M.lineWrapping:[])})},k=[y],t[18]=y,t[19]=k,t[20]=A),(0,B.useEffect)(A,k);let N,F;t[21]===o?(N=t[22],F=t[23]):(N=()=>{let e=S.current;e&&e.view.dispatch({effects:e.placeholderCompartment.reconfigure(P(o??``))})},F=[o],t[21]=o,t[22]=N,t[23]=F),(0,B.useEffect)(N,F);let V,H;t[24]!==n||t[25]!==s?(V=()=>{let e=function(e){let t=e.detail;if(!t||t.mode!==`source`||!s)return;let r=l.current;r&&($(r,t),de(n))};return window.addEventListener(I,e),()=>window.removeEventListener(I,e)},H=[n,s],t[24]=n,t[25]=s,t[26]=V,t[27]=H):(V=t[26],H=t[27]),(0,B.useEffect)(V,H);let U,W;t[28]!==n||t[29]!==s?(U=()=>{if(!s)return;let e=l.current;if(!e)return;let t=ue(n);if(t){if(t.kind===`outline`){$(e,t.detail);return}Ve(e,t.detail)}},W=[n,s],t[28]=n,t[29]=s,t[30]=U,t[31]=W):(U=t[30],W=t[31]),(0,B.useEffect)(U,W);let G;return t[32]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,ze.jsx)(`div`,{ref:c,className:`source-editor h-full pb-3`}),t[32]=G):G=t[32],G}function Ue(){return{top:Be}}function We(e){return M.scrollIntoView(e,{y:`start`})}function Ge(){return c()}export{He as SourceEditor};
@@ -1,4 +1,4 @@
1
- import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{r as i}from"./dist-CQw2y-s3.js";import{Ct as a,Gi as o,Rt as s,yr as c}from"./dist-B6LhaNhH.js";import{l,t as u}from"./button-DGf25ccp.js";import{n as d,r as f}from"./dist-KBKQayVB.js";import{T as p,f as m,m as h}from"./file-tree-adapter-CD7o_Lt8.js";var g=r(),_=2,v=1,y=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(_,Math.floor(u/e.css.cell.width)),rows:Math.max(v,Math.floor(l/e.css.cell.height))}}},b=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],x=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],S;function C(e,t){let n=0,r=t.length-1,i;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=n;)if(i=n+r>>1,e>t[i][1])n=i+1;else if(e<t[i][0])r=i-1;else return!0;return!1}var w=class{constructor(){if(this.version=`6`,!S){S=new Uint8Array(65536),S.fill(1),S[0]=0,S.fill(0,1,32),S.fill(0,127,160),S.fill(2,4352,4448),S[9001]=2,S[9002]=2,S.fill(2,11904,42192),S[12351]=1,S.fill(2,44032,55204),S.fill(2,63744,64256),S.fill(2,65040,65050),S.fill(2,65072,65136),S.fill(2,65280,65377),S.fill(2,65504,65511);for(let e=0;e<b.length;++e)S.fill(0,b[e][0],b[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?S[e]:C(e,x)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let n=this.wcwidth(e),r=n===0&&t!==0;if(r){let e=Ke.extractWidth(t);e===0?r=!1:e>n&&(n=e)}return Ke.createPropertyValue(0,n,r)}},T=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?ne.isErrorNoTelemetry(e)?new ne(e.message+`
1
+ import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{r as i}from"./dist-CQw2y-s3.js";import{Ct as a,Ki as o,Rt as s,yr as c}from"./dist-Di2l3Ssa.js";import{l,t as u}from"./button-DGf25ccp.js";import{n as d,r as f}from"./dist-KBKQayVB.js";import{T as p,f as m,m as h}from"./file-tree-adapter-D5GTz2ID.js";var g=r(),_=2,v=1,y=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(_,Math.floor(u/e.css.cell.width)),rows:Math.max(v,Math.floor(l/e.css.cell.height))}}},b=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],x=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],S;function C(e,t){let n=0,r=t.length-1,i;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=n;)if(i=n+r>>1,e>t[i][1])n=i+1;else if(e<t[i][0])r=i-1;else return!0;return!1}var w=class{constructor(){if(this.version=`6`,!S){S=new Uint8Array(65536),S.fill(1),S[0]=0,S.fill(0,1,32),S.fill(0,127,160),S.fill(2,4352,4448),S[9001]=2,S[9002]=2,S.fill(2,11904,42192),S[12351]=1,S.fill(2,44032,55204),S.fill(2,63744,64256),S.fill(2,65040,65050),S.fill(2,65072,65136),S.fill(2,65280,65377),S.fill(2,65504,65511);for(let e=0;e<b.length;++e)S.fill(0,b[e][0],b[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?S[e]:C(e,x)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let n=this.wcwidth(e),r=n===0&&t!==0;if(r){let e=Ke.extractWidth(t);e===0?r=!1:e>n&&(n=e)}return Ke.createPropertyValue(0,n,r)}},T=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?ne.isErrorNoTelemetry(e)?new ne(e.message+`
2
2
 
3
3
  `+e.stack):Error(e.message+`
4
4