@inkeep/open-knowledge 0.0.0-dev-20260427163338 → 0.0.0-dev-20260427194153

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 (44) hide show
  1. package/dist/assets/skills/open-knowledge/SKILL.md +25 -15
  2. package/dist/cli.mjs +6 -6
  3. package/dist/constants-CXtb6S9e.mjs +2 -0
  4. package/dist/{dist-C410Bipn.mjs → dist-B8mg-f6q.mjs} +1 -1
  5. package/dist/{dist-e1ryjJJb.mjs → dist-mmLEboji.mjs} +16 -4
  6. package/dist/index.mjs +1 -1
  7. package/dist/init-BCnlpWMq.mjs +1 -0
  8. package/dist/{init-BH4lmTY2.mjs → init-Bc8AaeuH.mjs} +3 -3
  9. package/dist/{init-C-DJ6Bcb.mjs → init-Dn8zvSe9.mjs} +1 -1
  10. package/dist/{init-CV-fiK86.mjs → init-aygOL5mI.mjs} +2 -2
  11. package/dist/{loader-BM3mbEZf.mjs → loader-CkLCJZ_a.mjs} +2 -2
  12. package/dist/loader-VgnU35KK.mjs +1 -0
  13. package/dist/paths-L4UjjxH7.mjs +1 -0
  14. package/dist/{paths-pxE-5qU3.mjs → paths-uWxFvwPB.mjs} +2 -2
  15. package/dist/preview-BRKICSmX.mjs +1 -0
  16. package/dist/{preview-DRhAyj_V.mjs → preview-DMPV6CsE.mjs} +2 -2
  17. package/dist/public/assets/ActivityModeContent-7CjHJQA-.js +2 -0
  18. package/dist/public/assets/{ActivityPanelDiffView-DVyTW-J7.js → ActivityPanelDiffView-D-EUyEh6.js} +1 -1
  19. package/dist/public/assets/{DocumentContext-D125gYAt.js → DocumentContext-yJTVxTi8.js} +2 -2
  20. package/dist/public/assets/McpConsentDialogBody-rv8E7452.js +1 -0
  21. package/dist/public/assets/{SourceEditor-M-p0lLYp.js → SourceEditor-g0En9fI8.js} +1 -1
  22. package/dist/public/assets/agent-presence-DBKMYj1x.js +1 -0
  23. package/dist/public/assets/{clipboard-BmiNdq3p.js → clipboard-tp9ju8rD.js} +1 -1
  24. package/dist/public/assets/dialog-DeibR6sn.js +45 -0
  25. package/dist/public/assets/index-DsWkmB5S.css +1 -0
  26. package/dist/public/assets/index-e-6eeSOy.js +1843 -0
  27. package/dist/public/index.html +6 -6
  28. package/dist/src-B0_BgXoG.mjs +1 -0
  29. package/dist/{start-BBTXc3GL.mjs → start-BrAnBRSa.mjs} +2 -2
  30. package/dist/start-CZ3afhmt.mjs +1 -0
  31. package/package.json +1 -1
  32. package/dist/constants-BXmH5dNC.mjs +0 -2
  33. package/dist/init-BX_jwB_V.mjs +0 -1
  34. package/dist/loader-v0m1NTka.mjs +0 -1
  35. package/dist/paths-CYEVSOoI.mjs +0 -1
  36. package/dist/preview-qf6rsBxN.mjs +0 -1
  37. package/dist/public/assets/ActivityModeContent-Bh4C07uL.js +0 -2
  38. package/dist/public/assets/McpConsentDialogBody-QKrs5-z6.js +0 -1
  39. package/dist/public/assets/agent-presence-BQu9C0ej.js +0 -1
  40. package/dist/public/assets/dialog-xzAlDsHy.js +0 -45
  41. package/dist/public/assets/index-DLXD_AE1.js +0 -1838
  42. package/dist/public/assets/index-DPJk5E6v.css +0 -1
  43. package/dist/src-CIwfojI2.mjs +0 -1
  44. package/dist/start-CosrPkb0.mjs +0 -1
@@ -0,0 +1 @@
1
+ import{i as e,n as t,r as n,t as r}from"./index-e-6eeSOy.js";export{r as McpConsentDialogBody,r as default,t as computeInitialSelection,n as selectedIdsOrdered,e as toggleSelectedId};
@@ -1,3 +1,3 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dist-DlS42TIP.js","./dist-CgLbXgrr.js","./chunk-DECur_0Z.js","./w3c-keyname-CSlwavrd.js","./dist-GlH2KPqY.js","./dist-DeDgmJv2.js","./dist-DR1MrLJC.js","./dist-D2wwoXzm.js","./dist-BqO6NfD-.js"])))=>i.map(i=>d[i]);
2
- import{r as e}from"./chunk-DECur_0Z.js";import{d as t}from"./propagation-api-Bugyj7xy.js";import{n,r,t as i}from"./compiler-runtime-Y11fyRVL.js";import{l as a}from"./panel-rtdrPcLu.js";import{$ as o,D as s,E as c,F as l,G as u,J as d,K as f,N as p,O as m,Q as h,T as g,U as _,V as v,W as y,X as b,Y as x,Z as S,_ as C,g as w,h as T,m as E,q as D,u as O}from"./DocumentContext-D125gYAt.js";import{L as ee,P as te,U as k,_ as ne,z as re}from"./PageListContext-BeAv6YTY.js";import{_ as ie,a as ae,c as oe,d as se,f as ce,g as le,h as ue,l as de,m as fe,p as pe,s as me,t as he,u as ge,v as _e}from"./clipboard-BmiNdq3p.js";import{At as ve,Dt as A,Et as ye,N as j,Nt as M,Pt as N,Q as be,Tt as P,Y as F,Z as I,a as L,bt as R,ft as z,jt as B,lt as xe,q as V,wt as Se}from"./dist-CgLbXgrr.js";var H=e(n(),1),Ce=i(),we=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:d(this.yanchor),yhead:d(this.yhead)}}static fromJSON(t){return new e(f(t.yanchor),f(t.yhead))}},Te=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new _(e)}toYPos(e,t=0){return D(this.ytext,e,t)}fromYPos(e){let t=u(f(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 we(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?P.cursor(n.pos,n.assoc):P.range(t.pos,n.pos)}},U=A.define({combine(e){return e[e.length-1]}}),W=R.define(),Ee=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
+ import{r as e}from"./chunk-DECur_0Z.js";import{d as t}from"./propagation-api-Bugyj7xy.js";import{n,r,t as i}from"./compiler-runtime-Y11fyRVL.js";import{l as a}from"./panel-rtdrPcLu.js";import{$ as o,D as s,E as c,F as l,G as u,J as d,K as f,N as p,O as m,Q as h,T as g,U as _,V as v,W as y,X as b,Y as x,Z as S,_ as C,g as w,h as T,m as E,q as D,u as O}from"./DocumentContext-yJTVxTi8.js";import{L as ee,P as te,U as k,_ as ne,z as re}from"./PageListContext-BeAv6YTY.js";import{_ as ie,a as ae,c as oe,d as se,f as ce,g as le,h as ue,l as de,m as fe,p as pe,s as me,t as he,u as ge,v as _e}from"./clipboard-tp9ju8rD.js";import{At as ve,Dt as A,Et as ye,N as j,Nt as M,Pt as N,Q as be,Tt as P,Y as F,Z as I,a as L,bt as R,ft as z,jt as B,lt as xe,q as V,wt as Se}from"./dist-CgLbXgrr.js";var H=e(n(),1),Ce=i(),we=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:d(this.yanchor),yhead:d(this.yhead)}}static fromJSON(t){return new e(f(t.yanchor),f(t.yhead))}},Te=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new _(e)}toYPos(e,t=0){return D(this.ytext,e,t)}fromYPos(e){let t=u(f(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 we(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?P.cursor(n.pos,n.assoc):P.range(t.pos,n.pos)}},U=A.define({combine(e){return e[e.length-1]}}),W=R.define(),Ee=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,`
3
3
  `);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)}},De=I.fromClass(Ee),Oe=F.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`}}),ke=R.define(),Ae=class extends be{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return x(`span`,[S(`class`,`cm-ySelectionCaret`),S(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[b(`⁠`),x(`div`,[S(`class`,`cm-ySelectionCaretDot`)]),b(`⁠`),x(`div`,[S(`class`,`cm-ySelectionInfo`)],[b(this.name)]),b(`⁠`)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},je=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:[ke.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=ve.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let t=this.conf.ytext,n=t.doc,r=this.conf.awareness,i=[],a=this.conf.awareness.getLocalState();if(a!=null){let n=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),i=n?e.state.selection.main:null,o=a.cursor==null?null:f(a.cursor.anchor),s=a.cursor==null?null:f(a.cursor.head);if(i!=null){let e=D(t,i.anchor),n=D(t,i.head);(a.cursor==null||!y(o,e)||!y(s,n))&&r.setLocalStateField(`cursor`,{anchor:e,head:n})}else a.cursor!=null&&n&&r.setLocalStateField(`cursor`,null)}r.getStates().forEach((a,s)=>{if(s===r.doc.clientID)return;let c=a.cursor;if(c==null||c.anchor==null||c.head==null)return;let l=u(c.anchor,n),d=u(c.head,n);if(l==null||d==null||l.type!==t||d.type!==t)return;let{color:f=`#30bced`,name:p=`Anonymous`}=a.user||{},m=a.user&&a.user.colorLight||f+`33`,g=o(l.index,d.index),_=h(l.index,d.index),v=e.view.state.doc.lineAt(g),y=e.view.state.doc.lineAt(_);if(v.number===y.number)i.push({from:g,to:_,value:V.mark({attributes:{style:`background-color: ${m}`},class:`cm-ySelection`})});else{i.push({from:g,to:v.from+v.length,value:V.mark({attributes:{style:`background-color: ${m}`},class:`cm-ySelection`})}),i.push({from:y.from,to:_,value:V.mark({attributes:{style:`background-color: ${m}`},class:`cm-ySelection`})});for(let t=v.number+1;t<y.number;t++){let n=e.view.state.doc.line(t).from;i.push({from:n,to:n,value:V.line({attributes:{style:`background-color: ${m}`,class:`cm-yLineSelection`}})})}}i.push({from:d.index,to:d.index,value:V.widget({side:d.index-l.index>0?-1:1,block:!1,widget:new Ae(f,p)})})}),this.decorations=V.set(i,!0)}},Me=I.fromClass(je,{decorations:e=>e.decorations}),Ne=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}},G=A.define({combine(e){return e[e.length-1]}});R.define();var Pe=class{constructor(e){this.view=e,this.conf=e.state.facet(G),this._undoManager=this.conf.undoManager,this.syncConf=e.state.facet(U),this._beforeChangeSelection=null,this._mux=v(),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:[F.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)}},Fe=I.fromClass(Pe),Ie=({state:e,dispatch:t})=>e.facet(G).undo()||!0,Le=({state:e,dispatch:t})=>e.facet(G).redo()||!0,Re=(e,t,{undoManager:n=new _(e)}={})=>{let r=new Te(e,t),i=[U.of(r),De];return t&&i.push(Oe,Me),n!==!1&&i.push(G.of(new Ne(n)),Fe,F.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?Ie(t):e.inputType===`historyRedo`?Le(t):!1}})),i},ze=[L.of({name:`javascript`,alias:[`js`,`jsx`],extensions:[`js`,`mjs`,`cjs`,`jsx`],load:async()=>fe({jsx:!0})}),L.of({name:`typescript`,alias:[`ts`,`tsx`],extensions:[`ts`,`mts`,`cts`,`tsx`],load:async()=>fe({typescript:!0,jsx:!0})}),L.of({name:`json`,alias:[`jsonc`],extensions:[`json`,`jsonc`],load:()=>t(()=>import(`./dist-DlS42TIP.js`).then(e=>e.json()),__vite__mapDeps([0,1,2,3,4]),import.meta.url)}),L.of({name:`yaml`,alias:[`yml`],extensions:[`yaml`,`yml`],load:()=>t(()=>import(`./dist-DeDgmJv2.js`).then(e=>e.yaml()),__vite__mapDeps([5,1,2,3,4]),import.meta.url)}),L.of({name:`css`,alias:[`scss`,`less`],extensions:[`css`,`scss`,`less`],load:async()=>ue()}),L.of({name:`html`,alias:[`htm`],extensions:[`html`,`htm`],load:async()=>pe()}),L.of({name:`python`,alias:[`py`],extensions:[`py`,`pyw`],load:()=>t(()=>import(`./dist-DR1MrLJC.js`).then(e=>e.python()),__vite__mapDeps([6,7,1,2,3,4]),import.meta.url)}),L.of({name:`rust`,alias:[`rs`],extensions:[`rs`],load:()=>t(()=>import(`./dist-BqO6NfD-.js`).then(e=>e.rust()),__vite__mapDeps([8,1,2,3,4]),import.meta.url)}),L.of({name:`markdown`,alias:[`md`,`mdx`],extensions:[`md`,`mdx`,`markdown`],load:async()=>se()}),L.of({name:`bash`,alias:[`sh`,`shell`,`zsh`],extensions:[`sh`,`bash`,`zsh`],load:async()=>{let[{StreamLanguage:e,LanguageSupport:n},{shell:r}]=await Promise.all([t(()=>import(`./dist-CgLbXgrr.js`).then(e=>e.m),__vite__mapDeps([1,2,3]),import.meta.url),t(()=>import(`./shell-7yok6dsz.js`),[],import.meta.url)]);return new n(e.define(r))}}),L.of({name:`go`,alias:[`golang`],extensions:[`go`],load:async()=>{let[{StreamLanguage:e,LanguageSupport:n},{go:r}]=await Promise.all([t(()=>import(`./dist-CgLbXgrr.js`).then(e=>e.m),__vite__mapDeps([1,2,3]),import.meta.url),t(()=>import(`./go-DatQmDtN.js`),[],import.meta.url)]);return new n(e.define(r))}})],Be=M.define(),Ve=M.define(),He=V.line({class:`agent-flash`}),Ue=N.define({create(){return V.none},update(e,t){e=e.map(t.changes);for(let n of t.effects)if(n.is(Be)){let{from:r,to:i}=n.value,a=[];for(let e=r;e<=i;){let n=t.state.doc.lineAt(e);a.push(He.range(n.from)),e=n.to+1}e=e.update({add:a,sort:!0})}else n.is(Ve)&&(e=V.none);return e},provide:e=>F.decorations.from(e)});function We(e){let t=e.getMap(`agent-flash`);return[Ue,I.define(e=>{let n=0,r=Date.now(),i=null,a=null,o=!1;function s(){let t=e.state.doc.length;t!==0&&(o||(e.dispatch({effects:Be.of({from:0,to:t})}),a&&clearTimeout(a),a=setTimeout(()=>{a=null,!o&&e.dispatch({effects:Ve.of(null)})},ne)))}let c=e=>{if(re(t),!k(t,r))return;r=Date.now();let a=Date.now();if(a-n<500){if(!i){let e=500-(a-n);i=setTimeout(()=>{i=null,n=Date.now(),s()},e)}return}n=a,s()};t.observe(c);let l=()=>{document.visibilityState===`visible`?k(t,r)&&(r=Date.now(),n=Date.now(),s()):r=Date.now()};return document.addEventListener(`visibilitychange`,l),{update(e){},destroy(){o=!0,t.unobserve(c),document.removeEventListener(`visibilitychange`,l),i&&=(clearTimeout(i),null),a&&=(clearTimeout(a),null)}}})]}var K=/\[([^\]\n]*)\]\((<[^>\n]+>|[^)\s\n]+)(?:\s+(?:"[^"\n]*"|'[^'\n]*'|\([^)\n]*\)))?\)/g,Ge=V.mark({class:`cm-md-internal-link`});function Ke(e,t){return t>0&&e[t-1]===`!`}function qe(e){let t=e[2]??``;return t.startsWith(`<`)&&t.endsWith(`>`)?t.slice(1,-1):t}function Je(e){let t=new B;for(let{from:n,to:r}of e.visibleRanges){let i=e.state.doc.sliceString(n,r);K.lastIndex=0;let a=K.exec(i);for(;a!==null;){let e=Ke(i,a.index)?null:g(qe(a));e&&e.kind!==`external`&&t.add(n+a.index,n+a.index+a[0].length,Ge),a=K.exec(i)}}return t.finish()}var Ye=I.fromClass(class{decorations;constructor(e){this.decorations=Je(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=Je(e.view))}},{decorations:e=>e.decorations}),Xe=F.domEventHandlers({mousedown(e,t){if(!e.ctrlKey&&!e.metaKey)return!1;let n=t.posAtCoords({x:e.clientX,y:e.clientY});if(n===null)return!1;let r=t.state.doc.lineAt(n);K.lastIndex=0;let i=K.exec(r.text);for(;i!==null;){let t=r.from+i.index,a=t+i[0].length;if(n>=t&&n<=a){let t=Ke(r.text,i.index)?null:g(qe(i));if(t&&t.kind!==`external`)return e.preventDefault(),t.kind===`doc`&&m(e)?(s(t),!0):(c(t),!0)}i=K.exec(r.text)}return!1}}),Ze=F.theme({".cm-md-internal-link":{color:`oklch(52.7% 0.154 228.4)`,fontWeight:`500`},".cm-md-internal-link:hover":{textDecoration:`underline`,cursor:`pointer`}});function Qe(){return[Ye,Xe,Ze]}var $e=5e3,q=null,et=0,tt=null,J=new Map;async function nt(){let e=Date.now();return q&&e-et<$e?q:(q=await T(),et=e,tt=st(q),q)}async function rt(e){let t=Date.now(),n=J.get(e);if(n!==void 0&&t-n.time<$e)return n.headings;try{let n=await E(e);return J.set(e,{headings:n,time:t}),n}catch(n){return console.warn(`[wiki-link-source] /api/page-headings fetch failed:`,n),J.set(e,{headings:[],time:t}),[]}}var Y=/\[\[[^\]]*?\]\]/g,it=V.mark({class:`cm-wiki-link`}),at=V.mark({class:`cm-wiki-link cm-wiki-link-broken`});function ot(e){let t=new Set;for(let n of e)t.add(n.docName.toLowerCase()),n.title&&t.add(n.title.toLowerCase());return t}function st(e){let t=ot(e);for(let n of e){let e=n.docName.split(`/`);e.pop();let r=``;for(let n of e)r=r?`${r}/${n}`:n,t.add(r.toLowerCase())}return t}function ct(e){return e.split(/[#|]/)[0].trim().toLowerCase()}function lt(e){let t=new B,n=q?tt:null;for(let{from:r,to:i}of e.visibleRanges){let a=e.state.doc.sliceString(r,i);Y.lastIndex=0;let o=Y.exec(a);for(;o!==null;){let e=it;if(n){let t=ct(o[0].slice(2,-2));t&&!n.has(t)&&(e=at)}t.add(r+o.index,r+o.index+o[0].length,e),o=Y.exec(a)}}return t.finish()}var ut=I.fromClass(class{decorations;cacheWarmAtBuild;constructor(e){this.cacheWarmAtBuild=q!==null,this.decorations=lt(e),this.cacheWarmAtBuild||this.warmCache(e)}update(e){let t=q!==null;(e.docChanged||e.viewportChanged||!this.cacheWarmAtBuild&&t)&&(this.cacheWarmAtBuild=t,this.decorations=lt(e.view))}warmCache(e){nt().then(()=>{try{e.dispatch({})}catch{}}).catch(e=>{console.warn(`[wiki-link-source] warmCache fetch failed:`,e)})}},{decorations:e=>e.decorations}),X=/\[\[([^[\]|#]+?)(?:#([^\]|]+?))?(?:\|([^\]]+?))?\]\]/g,dt=F.domEventHandlers({mousedown(e,t){if(!e.ctrlKey&&!e.metaKey)return!1;let n=t.posAtCoords({x:e.clientX,y:e.clientY});if(n===null)return!1;let r=t.state.doc.lineAt(n);X.lastIndex=0;let i=X.exec(r.text);for(;i!==null;){let t=r.from+i.index,a=t+i[0].length;if(n>=t&&n<=a){let t=i[1]?.trim(),n=i[2]?.trim()||null;if(t){let r=te(t,n);if(!r)return!1;e.preventDefault(),r.kind===`external`?window.open(r.url,`_blank`,`noopener,noreferrer`):m(e)?s(r):window.location.hash=r.anchor?`#/${r.docName}?anchor=${encodeURIComponent(r.anchor)}`:`#/${r.docName}`}return!0}i=X.exec(r.text)}return!1}});async function ft(e){let t=e.state.doc.sliceString(0,e.pos).match(/\[\[([^\]]*)$/);if(!t)return null;let n=t[1],r=e.pos-n.length,i=n.indexOf(`#`);if(i>0){let e=n.slice(0,i),t=n.slice(i+1),a=r+i+1,o=await rt(e);if(!o.length)return null;let s=w(o,t);return s.length?{from:a,filter:!1,options:s.map(e=>({label:e.text,detail:`H${e.level}`,apply(t,n,r,i){let a=t.state.doc.sliceString(i,i+2)===`]]`?``:`]]`;t.dispatch({changes:{from:r,to:i,insert:e.slug+a},selection:{anchor:r+e.slug.length+a.length}})}}))}:null}return{from:r,filter:!1,options:C(await nt().catch(e=>(console.warn(`[wiki-link-source] Failed to fetch pages:`,e),[])),n).map(e=>({label:e.title,detail:e.title===e.docName?void 0:e.docName,apply(t,n,r,i){let a=t.state.doc.sliceString(i,i+2)===`]]`?``:`]]`;t.dispatch({changes:{from:r,to:i,insert:e.docName+a},selection:{anchor:r+e.docName.length+a.length}})}}))}}var pt=F.theme({".cm-wiki-link":{color:`oklch(52.7% 0.154 228.4)`,fontWeight:`500`},".cm-wiki-link:hover":{textDecoration:`underline`,cursor:`pointer`}});function mt(){return[ut,dt,pt,ce.data.of({autocomplete:ft})]}var ht=V.mark({class:`cm-link-ref-broken`}),gt=/^\s{0,3}\[([^\]]+)\]:\s/,_t=/\[([^\]]*)\]\[([^\]]*)\]/g,vt=new Set([`FencedCode`,`CodeBlock`,`InlineCode`]);function Z(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 yt(e){let t=[];return j(e).iterate({enter(e){if(vt.has(e.name))return t.push({from:e.from,to:e.to}),!1}}),t.sort((e,t)=>e.from-t.from),t}function Q(e){let t=new Set,n=[],r=e.doc,i=yt(e);for(let e=1;e<=r.lines;e++){let n=r.line(e);if(Z(n.from,i))continue;let a=gt.exec(n.text);a&&t.add(a[1].toLowerCase())}for(let e=1;e<=r.lines;e++){let t=r.line(e);if(!Z(t.from,i)&&!gt.test(t.text))for(_t.lastIndex=0;;){let e=_t.exec(t.text);if(!e)break;let r=t.from+e.index;if(Z(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(ht.range(e.from,e.to));return a.sort((e,t)=>e.from-t.from),V.set(a)}var bt=N.define({create(e){return Q(e)},update(e,t){return t.docChanged?Q(t.state):e},provide:e=>F.decorations.from(e)}),xt=/^(\s*(?:[-*+]|\d+[.)]) (?:\[[ x]\] )?)/,St=V.mark({class:`cm-del`}),Ct=V.line({class:`cm-table-header`}),wt=V.line({class:`cm-table-row`});function Tt(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=4;else break;return t}function Et(e,t){let n=[],r=j(e);for(let{from:i,to:a}of t)r.iterate({from:i,to:a,enter(t){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(St.range(e,r)),!1}if(t.name===`ListItem`){let r=e.doc.lineAt(t.from),i=xt.exec(r.text),a=i?i[1].length:2,o=V.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=Tt(r.text),a=V.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(Ct.range(r.from)),!1}if(t.name===`TableRow`){let r=e.doc.lineAt(t.from);return n.push(wt.range(r.from)),!1}if(t.name===`TableDelimiter`&&t.node.parent?.name===`Table`){let r=e.doc.lineAt(t.from);return n.push(wt.range(r.from)),!1}}});return n.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),V.set(n)}var Dt=class{decorations;constructor(e){this.decorations=Et(e.state,e.visibleRanges)}update(e){(e.docChanged||e.viewportChanged||j(e.startState)!==j(e.state))&&(this.decorations=Et(e.view.state,e.view.visibleRanges))}},Ot=I.fromClass(Dt,{decorations:e=>e.decorations});function kt(){return[Ot,bt]}var At=r(),jt=ge({settings:{background:`var(--background)`,gutterBackground:`var(--background)`}}),Mt=de({settings:{background:`var(--background)`,gutterBackground:`var(--background)`}}),Nt=new Se,Pt=new Se;function $(e,t){let n=e.state.doc,r=1;if(n.lines>=1&&n.line(1).text===`---`){for(let e=2;e<=n.lines;e++)if(n.line(e).text===`---`){r=e+1;break}}let i=ee(),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:P.cursor(r.from),effects:F.scrollIntoView(r.from,{y:`start`})}),e.focus();return}a++}}}function Ft(e,t){requestAnimationFrame(()=>{let n=e.state.doc,r=Math.min(t.offset,n.length);e.dispatch({selection:P.cursor(r),effects:F.scrollIntoView(r,{y:`center`})}),e.focus()})}function It(e){let t=(0,Ce.c)(29),{docName:n,ytext:r,provider:i,placeholder:o,isSourceModeActive:s}=e,c=(0,H.useRef)(null),u=(0,H.useRef)(null),[d,f]=(0,H.useState)(null);if(d)throw d;let{resolvedTheme:m}=a(),h;t[0]!==s||t[1]!==i.awareness?(h=()=>{let e=i.awareness;if(e)return e.setLocalStateField(`mode`,s?`source`:`wysiwyg`),()=>{e.setLocalStateField(`mode`,`wysiwyg`)}},t[0]=s,t[1]=i.awareness,t[2]=h):h=t[2];let g;t[3]!==s||t[4]!==i?(g=[i,s],t[3]=s,t[4]=i,t[5]=g):g=t[5],(0,H.useEffect)(h,g);let _=(0,H.useRef)(null),v;t[6]!==o||t[7]!==i||t[8]!==m||t[9]!==r?(v=()=>{let e=c.current;if(!e)return;let t=i.configuration.name??``,n,a=Lt;try{n=p({docName:t,container:e,sizeStats:{viewCount:0,bytes:r.length},factory:e=>{let t=he({ydoc:i.document,ytext:r}),n=new F({state:ye.create({doc:r.toString(),extensions:[me,xe.of([oe]),se({base:ce,extensions:[le],codeLanguages:ze}),Re(r,i.awareness),We(i.document),mt(),Qe(),kt(),t,Nt.of(m===`dark`?jt:Mt),Pt.of(z(o??``)),F.lineWrapping,F.theme({"&":{height:`100%`}})]}),parent:e}),s=n.contentDOM;return s.addEventListener(`keydown`,a),s.addEventListener(`paste`,a),s.addEventListener(`drop`,a),s.addEventListener(`cut`,a),{view:n,ydoc:i.document,ytext:r,provider:i}}}),_.current=n,u.current=n.view}catch(e){let t=e;console.error(`[SourceEditor] mountCmEditor failed`,t),_.current=null,u.current=null,f(t instanceof Error?t:Error(String(t)))}return()=>{let e=_.current;e&&l(e),_.current=null,u.current=null}},t[6]=o,t[7]=i,t[8]=m,t[9]=r,t[10]=v):v=t[10];let y;t[11]!==i||t[12]!==r?(y=[r,i],t[11]=i,t[12]=r,t[13]=y):y=t[13],(0,H.useEffect)(v,y);let b,x;t[14]===m?(b=t[15],x=t[16]):(b=()=>{u.current&&u.current.dispatch({effects:Nt.reconfigure(m===`dark`?jt:Mt)})},x=[m],t[14]=m,t[15]=b,t[16]=x),(0,H.useEffect)(b,x);let S,C;t[17]===o?(S=t[18],C=t[19]):(S=()=>{u.current&&u.current.dispatch({effects:Pt.reconfigure(z(o??``))})},C=[o],t[17]=o,t[18]=S,t[19]=C),(0,H.useEffect)(S,C);let w,T;t[20]!==n||t[21]!==s?(T=()=>{let e=function(e){let t=e.detail;if(!t||t.mode!==`source`||!s)return;let r=u.current;r&&($(r,t),ie(n))};return window.addEventListener(ae,e),()=>window.removeEventListener(ae,e)},w=[n,s],t[20]=n,t[21]=s,t[22]=w,t[23]=T):(w=t[22],T=t[23]),(0,H.useEffect)(T,w);let E,D;t[24]!==n||t[25]!==s?(E=()=>{if(!s)return;let e=u.current;if(!e)return;let t=_e(n);if(t){if(t.kind===`outline`){$(e,t.detail);return}Ft(e,t.detail)}},D=[n,s],t[24]=n,t[25]=s,t[26]=E,t[27]=D):(E=t[26],D=t[27]),(0,H.useEffect)(E,D);let O;return t[28]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,At.jsx)(`div`,{ref:c,className:`source-editor h-full py-3`}),t[28]=O):O=t[28],O}function Lt(){return O()}export{It as SourceEditor};
@@ -0,0 +1 @@
1
+ import{r as e,t}from"./compiler-runtime-Y11fyRVL.js";import{x as n}from"./button-B1XQHQcX.js";var r=n(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),i=n(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),a=n(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),o=n(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),s=n(`undo-2`,[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]),c=t(),l=e();function u(e){let t=(0,c.c)(5),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(`title`,{children:`Claude icon`}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,l.jsx)(`g`,{clipPath:`url(#clip0_claude)`,children:(0,l.jsx)(`path`,{d:`M4.704 15.96L9.432 13.32L9.504 13.08L9.432 12.96H9.192L8.4 12.912L5.712 12.84L3.36 12.72L1.08 12.6L0.504 12.48L0 11.76L0.048 11.4L0.528 11.088L1.224 11.136L2.736 11.256L5.016 11.4L6.672 11.496L9.12 11.784H9.504L9.552 11.616L9.432 11.52L9.336 11.424L6.96 9.84L4.416 8.16L3.072 7.176L2.352 6.696L1.992 6.216L1.848 5.208L2.496 4.488L3.384 4.56L3.6 4.608L4.488 5.304L6.408 6.768L8.88 8.64L9.24 8.928L9.384 8.832L9.408 8.76L9.24 8.496L7.92 6L6.48 3.504L5.832 2.472L5.664 1.848C5.592 1.608 5.568 1.368 5.568 1.128L6.288 0.12L6.72 0L7.728 0.144L8.112 0.48L8.736 1.92L9.72 4.152L11.28 7.176L11.76 8.088L12 8.904L12.072 9.144H12.24V9.024L12.36 7.296L12.6 5.208L12.84 2.52L12.912 1.752L13.296 0.84L14.016 0.36L14.64 0.624L15.12 1.32L15.048 1.752L14.784 3.6L14.16 6.504L13.8 8.472H14.016L14.256 8.208L15.24 6.912L16.896 4.848L17.616 4.008L18.48 3.12L19.032 2.688H20.064L20.808 3.816L20.472 4.992L19.416 6.336L18.528 7.464L17.256 9.168L16.488 10.536L16.56 10.632H16.728L19.608 10.008L21.144 9.744L22.968 9.432L23.808 9.816L23.904 10.2L23.568 11.016L21.6 11.496L19.296 11.976L15.864 12.768L15.816 12.792L15.864 12.864L17.4 13.008L18.072 13.056H19.704L22.728 13.296L23.52 13.776L23.976 14.424L23.904 14.904L22.68 15.528L21.048 15.144L17.208 14.232L15.912 13.92H15.72V14.016L16.824 15.096L18.816 16.896L21.36 19.224L21.48 19.8L21.168 20.28L20.832 20.232L18.624 18.552L17.76 17.832L15.84 16.2H15.72V16.368L16.152 17.016L18.504 20.544L18.624 21.624L18.456 21.96L17.832 22.2L17.184 22.056L15.792 20.136L14.352 17.976L13.224 16.008L13.104 16.104L12.408 23.352L12.096 23.712L11.376 24L10.776 23.52L10.44 22.8L10.776 21.312L11.16 19.392L11.472 17.856L11.76 15.96L11.928 15.336V15.288H11.76L10.32 17.28L8.16 20.232L6.432 22.056L6.024 22.224L5.304 21.864L5.376 21.192L5.76 20.64L8.16 17.568L9.6 15.672L10.56 14.568L10.536 14.448H10.464L4.128 18.576L3 18.72L2.52 18.24L2.568 17.52L2.808 17.28L4.728 15.96H4.704Z`,fill:`currentColor`})}),t[1]=r):r=t[1];let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,l.jsx)(`defs`,{children:(0,l.jsx)(`clipPath`,{id:`clip0_claude`,children:(0,l.jsx)(`rect`,{width:`24`,height:`24`,fill:`white`})})}),t[2]=i):i=t[2];let a;return t[3]===e?a=t[4]:(a=(0,l.jsxs)(`svg`,{role:`img`,"aria-label":`Claude icon`,fill:`none`,height:24,width:24,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}function d(e){let t=(0,c.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(`title`,{children:`Cline icon`}),r=(0,l.jsx)(`path`,{fill:`currentColor`,d:`M463.6,275.08l-29.26-58.75v-33.83c0-56.08-45.01-101.5-100.53-101.5h-50.01c3.62-7.43,5.61-15.79,5.61-24.61,0-31.17-25.08-56.39-56.07-56.39s-56.07,25.22-56.07,56.39c0,8.82,1.99,17.17,5.61,24.61h-50.01c-55.51,0-100.52,45.42-100.52,101.5v33.83l-29.87,58.59c-3.01,5.9-3.01,12.92,0,18.81l29.87,57.93v33.83c0,56.08,45.01,101.5,100.52,101.5h200.95c55.51,0,100.53-45.42,100.53-101.5v-33.83l29.21-58.13c2.9-5.79,2.9-12.61.05-18.46ZM202.75,322.96c0,25.48-20.54,46.14-45.88,46.14s-45.88-20.66-45.88-46.14v-82.02c0-25.48,20.54-46.14,45.88-46.14s45.88,20.66,45.88,46.14v82.02ZM350.58,322.96c0,25.48-20.54,46.14-45.88,46.14s-45.88-20.66-45.88-46.14v-82.02c0-25.48,20.54-46.14,45.88-46.14s45.88,20.66,45.88,46.14v82.02Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,l.jsxs)(`svg`,{role:`img`,"aria-label":`Cline icon`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 466.73 487.04`,fill:`none`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}function f(e){let t=(0,c.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(`title`,{children:`Codex icon`}),r=(0,l.jsx)(`path`,{stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`2.484`,d:`M22.356 19.797H17.17M9.662 12.29l1.979 3.576a.511.511 0 0 1-.005.504l-1.974 3.409M30.758 16c0 8.15-6.607 14.758-14.758 14.758-8.15 0-14.758-6.607-14.758-14.758C1.242 7.85 7.85 1.242 16 1.242c8.15 0 14.758 6.608 14.758 14.758Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,l.jsxs)(`svg`,{role:`img`,"aria-label":`Codex icon`,xmlns:`http://www.w3.org/2000/svg`,width:32,height:32,fill:`none`,viewBox:`0 0 32 32`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}function p(e){let t=(0,c.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(`title`,{children:`GitHub Copilot icon`}),r=(0,l.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,fill:`currentColor`,d:`M9.6225 2.682C10.2835 3.362 10.561 4.29 10.6775 5.5905C10.9885 5.5905 11.2775 5.658 11.4735 5.9175L11.8385 6.3995C11.9435 6.5385 12 6.7045 12 6.877V8.187C12 8.3565 11.9135 8.5215 11.7735 8.621C10.1195 9.801 8.0785 10.75 6 10.75C3.7 10.75 1.3975 9.4585 0.2265 8.621C0.0865 8.521 0.0005 8.356 0 8.187V6.877C0 6.7045 0.0565 6.5375 0.1605 6.399L0.5255 5.9175C0.7215 5.659 1.0125 5.5905 1.322 5.5905L1.3365 5.442C1.4615 4.219 1.7415 3.3355 2.3775 2.682C3.608 1.412 5.2325 1.2565 5.9505 1.25H6.0495C6.7675 1.2565 8.392 1.4115 9.6225 2.682ZM6.0005 4.846C5.8585 4.846 5.694 4.854 5.5195 4.871C5.458 5.0945 5.367 5.296 5.2345 5.425C4.7095 5.9365 4.0765 6.015 3.7375 6.015C3.4185 6.015 3.0845 5.95 2.812 5.783C2.554 5.8655 2.306 5.9845 2.29 6.281C2.26898 6.76138 2.25847 7.24216 2.2585 7.723L2.2575 7.963C2.2565 8.2445 2.255 8.526 2.251 8.808C2.252 8.971 2.353 9.123 2.506 9.1905C3.747 9.7415 4.921 10.019 6.001 10.019C7.079 10.019 8.253 9.7415 9.4935 9.1905C9.56814 9.15767 9.63181 9.10416 9.677 9.03628C9.72219 8.96841 9.747 8.88902 9.7485 8.8075C9.7635 7.9665 9.7515 7.1215 9.7105 6.281C9.695 5.983 9.4465 5.866 9.1875 5.783C8.9145 5.9495 8.5815 6.015 8.2625 6.015C7.924 6.015 7.2915 5.9365 6.766 5.425C6.633 5.296 6.5425 5.0945 6.481 4.871C6.321 4.855 6.1605 4.8465 6.0005 4.846ZM4.738 6.8525C5.0075 6.8525 5.226 7.0655 5.226 7.3275V8.204C5.226 8.4665 5.0075 8.679 4.738 8.679C4.61033 8.6806 4.48725 8.63149 4.39576 8.54243C4.30426 8.45338 4.25184 8.33166 4.25 8.204V7.328C4.25 7.0655 4.4685 6.8525 4.738 6.8525ZM7.238 6.8525C7.5075 6.8525 7.726 7.0655 7.726 7.3275V8.204C7.726 8.4665 7.5075 8.679 7.238 8.679C7.11033 8.6806 6.98725 8.63149 6.89576 8.54243C6.80426 8.45338 6.75184 8.33166 6.75 8.204V7.328C6.75 7.0655 6.9685 6.8525 7.238 6.8525ZM3.8175 2.5435C3.2925 2.5945 2.85 2.7625 2.625 2.9965C2.1375 3.515 2.2425 4.8305 2.52 5.1085C2.7225 5.3055 3.105 5.437 3.5175 5.437H3.5625C3.887 5.4305 4.455 5.349 4.9275 4.882C5.145 4.677 5.28 4.1655 5.265 3.647C5.25 3.23 5.13 2.887 4.95 2.7405C4.755 2.5725 4.3125 2.4995 3.8175 2.5435ZM7.05 2.7405C6.87 2.8865 6.75 3.2305 6.735 3.647C6.72 4.1655 6.855 4.677 7.0725 4.882C7.5565 5.3605 8.1405 5.434 8.4605 5.437H8.4825C8.895 5.437 9.2775 5.3055 9.48 5.1085C9.7575 4.8305 9.8625 3.515 9.375 2.9965C9.15 2.7625 8.7075 2.5945 8.1825 2.5435C7.6875 2.4995 7.245 2.5725 7.05 2.7405ZM6 3.8075C5.88 3.8075 5.7375 3.815 5.58 3.8295C5.595 3.9095 5.6025 3.9975 5.61 4.0925L5.6095 4.172C5.60894 4.21375 5.60661 4.25545 5.6025 4.297C5.715 4.286 5.815 4.2835 5.9085 4.283H6.0915C6.185 4.283 6.285 4.286 6.3975 4.297C6.39 4.224 6.39 4.1585 6.39 4.0925C6.3975 3.9975 6.405 3.91 6.42 3.8295C6.2804 3.81583 6.14026 3.80849 6 3.8075Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,l.jsxs)(`svg`,{role:`img`,"aria-label":`GitHub Copilot icon`,xmlns:`http://www.w3.org/2000/svg`,width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}function m(e){let t=(0,c.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(`title`,{children:`Cursor icon`}),r=(0,l.jsx)(`path`,{fill:`currentColor`,d:`M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,l.jsxs)(`svg`,{role:`img`,"aria-label":`Cursor icon`,fill:`none`,height:24,width:24,viewBox:`0 0 466.73 532.09`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}function h(e){let t=(0,c.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(`title`,{children:`Windsurf icon`}),r=(0,l.jsx)(`path`,{fill:`currentColor`,d:`M21.3192 4.9697H21.1203C20.0734 4.96806 19.2238 5.81589 19.2238 6.86264V11.0961C19.2238 11.9415 18.525 12.6263 17.6934 12.6263C17.1993 12.6263 16.706 12.3777 16.4133 11.9603L12.0896 5.78492C11.7308 5.27214 11.1471 4.96643 10.5152 4.96643C9.52943 4.96643 8.64234 5.80448 8.64234 6.83902V11.0969C8.64234 11.9423 7.94932 12.6271 7.11197 12.6271C6.61625 12.6271 6.12376 12.3785 5.83105 11.9611L0.992853 5.0504C0.883594 4.89387 0.638184 4.97133 0.638184 5.1621V8.85424C0.638184 9.04094 0.695264 9.22193 0.802059 9.37517L5.56362 16.175C5.84492 16.5769 6.25994 16.8753 6.73852 16.9837C7.93627 17.256 9.03861 16.334 9.03861 15.1592V10.9037C9.03861 10.0583 9.7235 9.37354 10.569 9.37354H10.5714C11.081 9.37354 11.5588 9.62219 11.8515 10.0396L16.1761 16.2141C16.5356 16.7277 17.0892 17.0326 17.7497 17.0326C18.7574 17.0326 19.6209 16.1937 19.6209 15.16V10.9029C19.6209 10.0575 20.3058 9.37273 21.1512 9.37273H21.32C21.426 9.37273 21.5116 9.28713 21.5116 9.18116V5.16127C21.5116 5.05531 21.426 4.9697 21.32 4.9697H21.3192Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,l.jsxs)(`svg`,{role:`img`,"aria-label":`Windsurf icon`,xmlns:`http://www.w3.org/2000/svg`,width:22,height:22,viewBox:`0 0 22 22`,fill:`none`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}var g=class{map=new Map;constructor(e){if(this.limit=e,e<=0)throw Error(`LruStringCache: limit must be > 0 (got ${e})`)}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}set(e,t){for(this.map.has(e)&&this.map.delete(e),this.map.set(e,t);this.map.size>this.limit;){let e=this.map.keys().next().value;if(e===void 0)break;this.map.delete(e)}}clear(){this.map.clear()}get size(){return this.map.size}};function _(e){let t=(0,c.c)(17),n,r;if(t[0]===e?(n=t[1],r=t[2]):({icon:n,...r}=e,t[0]=e,t[1]=n,t[2]=r),n===`claude`){let e;return t[3]===r?e=t[4]:(e=(0,l.jsx)(u,{...r}),t[3]=r,t[4]=e),e}if(n===`cursor`){let e;return t[5]===r?e=t[6]:(e=(0,l.jsx)(m,{...r}),t[5]=r,t[6]=e),e}if(n===`windsurf`){let e;return t[7]===r?e=t[8]:(e=(0,l.jsx)(h,{...r}),t[7]=r,t[8]=e),e}if(n===`openai`){let e;return t[9]===r?e=t[10]:(e=(0,l.jsx)(f,{...r}),t[9]=r,t[10]=e),e}if(n===`cline`){let e;return t[11]===r?e=t[12]:(e=(0,l.jsx)(d,{...r}),t[11]=r,t[12]=e),e}if(n===`github`){let e;return t[13]===r?e=t[14]:(e=(0,l.jsx)(p,{...r}),t[13]=r,t[14]=e),e}let i=r,a;return t[15]===i?a=t[16]:(a=(0,l.jsx)(o,{strokeWidth:1.5,...i}),t[15]=i,t[16]=a),a}function v(e){return typeof e==`object`&&!!e&&typeof e.getStates==`function`}function y(e,t,n){let r=[],i=[];for(let a of e.getStates().values()){let e=a.agentPresence;if(e)for(let[a,o]of Object.entries(e))o.currentDoc&&(n-o.ts>=5e3||(o.currentDoc===t?r.push({agentId:a,entry:o}):i.push({agentId:a,entry:o})))}return{current:r,crossDoc:i}}export{h as a,f as c,s as d,o as f,r as h,g as i,d as l,i as m,y as n,m as o,a as p,_ as r,p as s,v as t,u};
@@ -1,4 +1,4 @@
1
- import{r as e}from"./chunk-DECur_0Z.js";import{n as t,r as n,t as r}from"./compiler-runtime-Y11fyRVL.js";import{a as i,f as a,i as o,n as s,o as c,r as l,s as u,t as d,u as f}from"./panel-rtdrPcLu.js";import{n as p}from"./button-B1XQHQcX.js";import{G as m,n as ee,q as te,rt as ne}from"./DocumentContext-D125gYAt.js";import{C as re}from"./dialog-xzAlDsHy.js";import{Ft as ie,J as ae,M as oe,Rt as se,W as ce,Y as le,g as ue,n as de,v as fe}from"./PageListContext-BeAv6YTY.js";import{$ as h,A as g,B as _,Bt as v,Ct as y,D as pe,Dt as b,E as x,Et as me,Ft as he,G as S,H as ge,Ht as _e,I as C,It as ve,J as ye,K as be,L as w,Lt as xe,M as Se,N as T,Nt as E,P as Ce,Pt as D,Q as we,Rt as Te,S as Ee,St as De,T as Oe,Tt as O,U as ke,V as Ae,Vt as je,W as Me,Y as k,Z as Ne,_ as Pe,a as Fe,at as Ie,b as Le,bt as Re,c as ze,ct as Be,d as Ve,et as He,f as Ue,g as We,gt as Ge,h as Ke,ht as qe,i as Je,j as Ye,jt as Xe,k as Ze,kt as Qe,l as $e,lt as et,mt as tt,n as nt,nt as rt,o as it,ot as at,p as ot,pt as st,q as A,r as ct,s as lt,st as ut,t as dt,tt as ft,u as pt,ut as mt,v as ht,vt as j,w as gt,x as _t,xt as vt,y as yt,z as bt,zt as xt}from"./dist-CgLbXgrr.js";import{a as St,c as M,i as Ct,n as wt,o as Tt,r as Et,s as Dt,t as Ot}from"./dist-D2wwoXzm.js";import{i as kt,n as N,r as At,t as jt}from"./dist-GlH2KPqY.js";var Mt=e(t(),1),Nt=r(),Pt=new Map;function Ft(e,t){Pt.set(e,t)}function It(e){let t=Pt.get(e)??null;return Pt.delete(e),t}function Lt(e){Pt.delete(e)}var Rt=class e{static create(t,n,r,i,a){return new e(t,n,r,i+(i<<8)+t+(n<<4)|0,a,[],[])}constructor(e,t,n,r,i,a,o){this.type=e,this.value=t,this.from=n,this.hash=r,this.end=i,this.children=a,this.positions=o,this.hashProp=[[_.contextHash,r]]}addChild(e,t){e.prop(_.contextHash)!=this.hash&&(e=new S(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;return n>=0&&(t=Math.max(t,this.positions[n]+this.children[n].length+this.from)),new S(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,n)=>new S(ge.none,e,t,n,this.hashProp)})}},P;(function(e){e[e.Document=1]=`Document`,e[e.CodeBlock=2]=`CodeBlock`,e[e.FencedCode=3]=`FencedCode`,e[e.Blockquote=4]=`Blockquote`,e[e.HorizontalRule=5]=`HorizontalRule`,e[e.BulletList=6]=`BulletList`,e[e.OrderedList=7]=`OrderedList`,e[e.ListItem=8]=`ListItem`,e[e.ATXHeading1=9]=`ATXHeading1`,e[e.ATXHeading2=10]=`ATXHeading2`,e[e.ATXHeading3=11]=`ATXHeading3`,e[e.ATXHeading4=12]=`ATXHeading4`,e[e.ATXHeading5=13]=`ATXHeading5`,e[e.ATXHeading6=14]=`ATXHeading6`,e[e.SetextHeading1=15]=`SetextHeading1`,e[e.SetextHeading2=16]=`SetextHeading2`,e[e.HTMLBlock=17]=`HTMLBlock`,e[e.LinkReference=18]=`LinkReference`,e[e.Paragraph=19]=`Paragraph`,e[e.CommentBlock=20]=`CommentBlock`,e[e.ProcessingInstructionBlock=21]=`ProcessingInstructionBlock`,e[e.Escape=22]=`Escape`,e[e.Entity=23]=`Entity`,e[e.HardBreak=24]=`HardBreak`,e[e.Emphasis=25]=`Emphasis`,e[e.StrongEmphasis=26]=`StrongEmphasis`,e[e.Link=27]=`Link`,e[e.Image=28]=`Image`,e[e.InlineCode=29]=`InlineCode`,e[e.HTMLTag=30]=`HTMLTag`,e[e.Comment=31]=`Comment`,e[e.ProcessingInstruction=32]=`ProcessingInstruction`,e[e.Autolink=33]=`Autolink`,e[e.HeaderMark=34]=`HeaderMark`,e[e.QuoteMark=35]=`QuoteMark`,e[e.ListMark=36]=`ListMark`,e[e.LinkMark=37]=`LinkMark`,e[e.EmphasisMark=38]=`EmphasisMark`,e[e.CodeMark=39]=`CodeMark`,e[e.CodeText=40]=`CodeText`,e[e.CodeInfo=41]=`CodeInfo`,e[e.LinkTitle=42]=`LinkTitle`,e[e.LinkLabel=43]=`LinkLabel`,e[e.URL=44]=`URL`})(P||={});var zt=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},Bt=class{constructor(){this.text=``,this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return Ut(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let r=t;r<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e=``;for(let t=0;t<this.basePos;t++)e+=` `;return e+this.text.slice(this.basePos)}};function Vt(e,t,n){if(n.pos==n.text.length||e!=t.block&&n.indent>=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(e.type==P.OrderedList?Xt:Yt)(n,t,!1);return r>0&&(e.type!=P.BulletList||qt(n,t,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}var Ht={[P.Blockquote](e,t,n){return n.next==62?(n.markers.push(I(P.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(F(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0):!1},[P.ListItem](e,t,n){return n.indent<n.baseIndent+e.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+e.value),!0)},[P.OrderedList]:Vt,[P.BulletList]:Vt,[P.Document](){return!0}};function F(e){return e==32||e==9||e==10||e==13}function Ut(e,t=0){for(;t<e.length&&F(e.charCodeAt(t));)t++;return t}function Wt(e,t,n){for(;t>n&&F(e.charCodeAt(t-1));)t--;return t}function Gt(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(e.next==96){for(let n=t;n<e.text.length;n++)if(e.text.charCodeAt(n)==96)return-1}return t}function Kt(e){return e.next==62?e.text.charCodeAt(e.pos+1)==32?2:1:-1}function qt(e,t,n){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let t=e.pos+1;t<e.text.length;t++){let n=e.text.charCodeAt(t);if(n==e.next)r++;else if(!F(n))return-1}return n&&e.next==45&&Qt(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(dn.SetextHeading)>-1||r<3?-1:1}function Jt(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function Yt(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||F(e.text.charCodeAt(e.pos+1)))&&(!n||Jt(t,P.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function Xt(e,t,n){let r=e.pos,i=e.next;for(;i>=48&&i<=57;){if(r++,r==e.text.length)return-1;i=e.text.charCodeAt(r)}return r==e.pos||r>e.pos+9||i!=46&&i!=41||r<e.text.length-1&&!F(e.text.charCodeAt(r+1))||n&&!Jt(t,P.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49)?-1:r+1-e.pos}function Zt(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==35;)t++;if(t<e.text.length&&e.text.charCodeAt(t)!=32)return-1;let n=t-e.pos;return n>6?-1:n}function Qt(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let n=t;for(;t<e.text.length&&F(e.text.charCodeAt(t));)t++;return t==e.text.length?n:-1}var $t=/^[ \t]*$/,en=/-->/,tn=/\?>/,nn=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,en],[/^\s*<\?/,tn],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,$t],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,$t]];function rn(e,t,n){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let e=0,t=nn.length-+!!n;e<t;e++)if(nn[e][0].test(r))return e;return-1}function an(e,t){let n=e.countIndent(t,e.pos,e.indent),r=e.countIndent(e.skipSpace(t),t,n);return r>=n+5?n+1:r}function on(e,t,n){let r=e.length-1;r>=0&&e[r].to==t&&e[r].type==P.CodeText?e[r].to=n:e.push(I(P.CodeText,t,n))}var sn={LinkReference:void 0,IndentedCode(e,t){let n=t.baseIndent+4;if(t.indent<n)return!1;let r=t.findColumn(n),i=e.lineStart+r,a=e.lineStart+t.text.length,o=[],s=[];for(on(o,i,a);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){on(s,e.lineStart-1,e.lineStart);for(let e of t.markers)s.push(e)}else if(t.indent<n)break;else{if(s.length){for(let e of s)e.type==P.CodeText?on(o,e.from,e.to):o.push(e);s=[]}on(o,e.lineStart-1,e.lineStart);for(let e of t.markers)o.push(e);a=e.lineStart+t.text.length;let n=e.lineStart+t.findColumn(t.baseIndent+4);n<a&&on(o,n,a)}return s.length&&(s=s.filter(e=>e.type!=P.CodeText),s.length&&(t.markers=s.concat(t.markers))),e.addNode(e.buffer.writeElements(o,-i).finish(P.CodeBlock,a-i),i),!0},FencedCode(e,t){let n=Gt(t);if(n<0)return!1;let r=e.lineStart+t.pos,i=t.next,a=n-t.pos,o=t.skipSpace(n),s=Wt(t.text,t.text.length,o),c=[I(P.CodeMark,r,r+a)];o<s&&c.push(I(P.CodeInfo,e.lineStart+o,e.lineStart+s));for(let n=!0,r=!0,o=!1;e.nextLine()&&t.depth>=e.stack.length;n=!1){let s=t.pos;if(t.indent-t.baseIndent<4)for(;s<t.text.length&&t.text.charCodeAt(s)==i;)s++;if(s-t.pos>=a&&t.skipSpace(s)==t.text.length){for(let e of t.markers)c.push(e);r&&o&&on(c,e.lineStart-1,e.lineStart),c.push(I(P.CodeMark,e.lineStart+t.pos,e.lineStart+s)),e.nextLine();break}else{o=!0,n||(on(c,e.lineStart-1,e.lineStart),r=!1);for(let e of t.markers)c.push(e);let i=e.lineStart+t.basePos,a=e.lineStart+t.text.length;i<a&&(on(c,i,a),r=!1)}}return e.addNode(e.buffer.writeElements(c,-r).finish(P.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,t){let n=Kt(t);return n<0?!1:(e.startContext(P.Blockquote,t.pos),e.addNode(P.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null)},HorizontalRule(e,t){if(qt(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode(P.HorizontalRule,n),!0},BulletList(e,t){let n=Yt(t,e,!1);if(n<0)return!1;e.block.type!=P.BulletList&&e.startContext(P.BulletList,t.basePos,t.next);let r=an(t,t.pos+1);return e.startContext(P.ListItem,t.basePos,r-t.baseIndent),e.addNode(P.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},OrderedList(e,t){let n=Xt(t,e,!1);if(n<0)return!1;e.block.type!=P.OrderedList&&e.startContext(P.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let r=an(t,t.pos+n);return e.startContext(P.ListItem,t.basePos,r-t.baseIndent),e.addNode(P.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},ATXHeading(e,t){let n=Zt(t);if(n<0)return!1;let r=t.pos,i=e.lineStart+r,a=Wt(t.text,t.text.length,r),o=a;for(;o>r&&t.text.charCodeAt(o-1)==t.next;)o--;(o==a||o==r||!F(t.text.charCodeAt(o-1)))&&(o=t.text.length);let s=e.buffer.write(P.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(r+n+1,o),i+n+1),-i);o<t.text.length&&s.write(P.HeaderMark,o-r,a-r);let c=s.finish(P.ATXHeading1-1+n,t.text.length-r);return e.nextLine(),e.addNode(c,i),!0},HTMLBlock(e,t){let n=rn(t,e,!1);if(n<0)return!1;let r=e.lineStart+t.pos,i=nn[n][1],a=[],o=i!=$t;for(;!i.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){o=!1;break}for(let e of t.markers)a.push(e)}o&&e.nextLine();let s=i==en?P.CommentBlock:i==tn?P.ProcessingInstructionBlock:P.HTMLBlock,c=e.prevLineEnd();return e.addNode(e.buffer.writeElements(a,-r).finish(s,c-r),r),!0},SetextHeading:void 0},cn=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let r=n.content+`
1
+ import{r as e}from"./chunk-DECur_0Z.js";import{n as t,r as n,t as r}from"./compiler-runtime-Y11fyRVL.js";import{a as i,f as a,i as o,n as s,o as c,r as l,s as u,t as d,u as f}from"./panel-rtdrPcLu.js";import{n as p}from"./button-B1XQHQcX.js";import{G as m,n as ee,q as te,rt as ne}from"./DocumentContext-yJTVxTi8.js";import{b as re}from"./dialog-DeibR6sn.js";import{Ft as ie,J as ae,M as oe,Rt as se,W as ce,Y as le,g as ue,n as de,v as fe}from"./PageListContext-BeAv6YTY.js";import{$ as h,A as g,B as _,Bt as v,Ct as y,D as pe,Dt as b,E as x,Et as me,Ft as he,G as S,H as ge,Ht as _e,I as C,It as ve,J as ye,K as be,L as w,Lt as xe,M as Se,N as T,Nt as E,P as Ce,Pt as D,Q as we,Rt as Te,S as Ee,St as De,T as Oe,Tt as O,U as ke,V as Ae,Vt as je,W as Me,Y as k,Z as Ne,_ as Pe,a as Fe,at as Ie,b as Le,bt as Re,c as ze,ct as Be,d as Ve,et as He,f as Ue,g as We,gt as Ge,h as Ke,ht as qe,i as Je,j as Ye,jt as Xe,k as Ze,kt as Qe,l as $e,lt as et,mt as tt,n as nt,nt as rt,o as it,ot as at,p as ot,pt as st,q as A,r as ct,s as lt,st as ut,t as dt,tt as ft,u as pt,ut as mt,v as ht,vt as j,w as gt,x as _t,xt as vt,y as yt,z as bt,zt as xt}from"./dist-CgLbXgrr.js";import{a as St,c as M,i as Ct,n as wt,o as Tt,r as Et,s as Dt,t as Ot}from"./dist-D2wwoXzm.js";import{i as kt,n as N,r as At,t as jt}from"./dist-GlH2KPqY.js";var Mt=e(t(),1),Nt=r(),Pt=new Map;function Ft(e,t){Pt.set(e,t)}function It(e){let t=Pt.get(e)??null;return Pt.delete(e),t}function Lt(e){Pt.delete(e)}var Rt=class e{static create(t,n,r,i,a){return new e(t,n,r,i+(i<<8)+t+(n<<4)|0,a,[],[])}constructor(e,t,n,r,i,a,o){this.type=e,this.value=t,this.from=n,this.hash=r,this.end=i,this.children=a,this.positions=o,this.hashProp=[[_.contextHash,r]]}addChild(e,t){e.prop(_.contextHash)!=this.hash&&(e=new S(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;return n>=0&&(t=Math.max(t,this.positions[n]+this.children[n].length+this.from)),new S(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,n)=>new S(ge.none,e,t,n,this.hashProp)})}},P;(function(e){e[e.Document=1]=`Document`,e[e.CodeBlock=2]=`CodeBlock`,e[e.FencedCode=3]=`FencedCode`,e[e.Blockquote=4]=`Blockquote`,e[e.HorizontalRule=5]=`HorizontalRule`,e[e.BulletList=6]=`BulletList`,e[e.OrderedList=7]=`OrderedList`,e[e.ListItem=8]=`ListItem`,e[e.ATXHeading1=9]=`ATXHeading1`,e[e.ATXHeading2=10]=`ATXHeading2`,e[e.ATXHeading3=11]=`ATXHeading3`,e[e.ATXHeading4=12]=`ATXHeading4`,e[e.ATXHeading5=13]=`ATXHeading5`,e[e.ATXHeading6=14]=`ATXHeading6`,e[e.SetextHeading1=15]=`SetextHeading1`,e[e.SetextHeading2=16]=`SetextHeading2`,e[e.HTMLBlock=17]=`HTMLBlock`,e[e.LinkReference=18]=`LinkReference`,e[e.Paragraph=19]=`Paragraph`,e[e.CommentBlock=20]=`CommentBlock`,e[e.ProcessingInstructionBlock=21]=`ProcessingInstructionBlock`,e[e.Escape=22]=`Escape`,e[e.Entity=23]=`Entity`,e[e.HardBreak=24]=`HardBreak`,e[e.Emphasis=25]=`Emphasis`,e[e.StrongEmphasis=26]=`StrongEmphasis`,e[e.Link=27]=`Link`,e[e.Image=28]=`Image`,e[e.InlineCode=29]=`InlineCode`,e[e.HTMLTag=30]=`HTMLTag`,e[e.Comment=31]=`Comment`,e[e.ProcessingInstruction=32]=`ProcessingInstruction`,e[e.Autolink=33]=`Autolink`,e[e.HeaderMark=34]=`HeaderMark`,e[e.QuoteMark=35]=`QuoteMark`,e[e.ListMark=36]=`ListMark`,e[e.LinkMark=37]=`LinkMark`,e[e.EmphasisMark=38]=`EmphasisMark`,e[e.CodeMark=39]=`CodeMark`,e[e.CodeText=40]=`CodeText`,e[e.CodeInfo=41]=`CodeInfo`,e[e.LinkTitle=42]=`LinkTitle`,e[e.LinkLabel=43]=`LinkLabel`,e[e.URL=44]=`URL`})(P||={});var zt=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},Bt=class{constructor(){this.text=``,this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return Ut(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let r=t;r<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e=``;for(let t=0;t<this.basePos;t++)e+=` `;return e+this.text.slice(this.basePos)}};function Vt(e,t,n){if(n.pos==n.text.length||e!=t.block&&n.indent>=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(e.type==P.OrderedList?Xt:Yt)(n,t,!1);return r>0&&(e.type!=P.BulletList||qt(n,t,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}var Ht={[P.Blockquote](e,t,n){return n.next==62?(n.markers.push(I(P.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(F(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0):!1},[P.ListItem](e,t,n){return n.indent<n.baseIndent+e.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+e.value),!0)},[P.OrderedList]:Vt,[P.BulletList]:Vt,[P.Document](){return!0}};function F(e){return e==32||e==9||e==10||e==13}function Ut(e,t=0){for(;t<e.length&&F(e.charCodeAt(t));)t++;return t}function Wt(e,t,n){for(;t>n&&F(e.charCodeAt(t-1));)t--;return t}function Gt(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(e.next==96){for(let n=t;n<e.text.length;n++)if(e.text.charCodeAt(n)==96)return-1}return t}function Kt(e){return e.next==62?e.text.charCodeAt(e.pos+1)==32?2:1:-1}function qt(e,t,n){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let t=e.pos+1;t<e.text.length;t++){let n=e.text.charCodeAt(t);if(n==e.next)r++;else if(!F(n))return-1}return n&&e.next==45&&Qt(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(dn.SetextHeading)>-1||r<3?-1:1}function Jt(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function Yt(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||F(e.text.charCodeAt(e.pos+1)))&&(!n||Jt(t,P.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function Xt(e,t,n){let r=e.pos,i=e.next;for(;i>=48&&i<=57;){if(r++,r==e.text.length)return-1;i=e.text.charCodeAt(r)}return r==e.pos||r>e.pos+9||i!=46&&i!=41||r<e.text.length-1&&!F(e.text.charCodeAt(r+1))||n&&!Jt(t,P.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49)?-1:r+1-e.pos}function Zt(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==35;)t++;if(t<e.text.length&&e.text.charCodeAt(t)!=32)return-1;let n=t-e.pos;return n>6?-1:n}function Qt(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let n=t;for(;t<e.text.length&&F(e.text.charCodeAt(t));)t++;return t==e.text.length?n:-1}var $t=/^[ \t]*$/,en=/-->/,tn=/\?>/,nn=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,en],[/^\s*<\?/,tn],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,$t],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,$t]];function rn(e,t,n){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let e=0,t=nn.length-+!!n;e<t;e++)if(nn[e][0].test(r))return e;return-1}function an(e,t){let n=e.countIndent(t,e.pos,e.indent),r=e.countIndent(e.skipSpace(t),t,n);return r>=n+5?n+1:r}function on(e,t,n){let r=e.length-1;r>=0&&e[r].to==t&&e[r].type==P.CodeText?e[r].to=n:e.push(I(P.CodeText,t,n))}var sn={LinkReference:void 0,IndentedCode(e,t){let n=t.baseIndent+4;if(t.indent<n)return!1;let r=t.findColumn(n),i=e.lineStart+r,a=e.lineStart+t.text.length,o=[],s=[];for(on(o,i,a);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){on(s,e.lineStart-1,e.lineStart);for(let e of t.markers)s.push(e)}else if(t.indent<n)break;else{if(s.length){for(let e of s)e.type==P.CodeText?on(o,e.from,e.to):o.push(e);s=[]}on(o,e.lineStart-1,e.lineStart);for(let e of t.markers)o.push(e);a=e.lineStart+t.text.length;let n=e.lineStart+t.findColumn(t.baseIndent+4);n<a&&on(o,n,a)}return s.length&&(s=s.filter(e=>e.type!=P.CodeText),s.length&&(t.markers=s.concat(t.markers))),e.addNode(e.buffer.writeElements(o,-i).finish(P.CodeBlock,a-i),i),!0},FencedCode(e,t){let n=Gt(t);if(n<0)return!1;let r=e.lineStart+t.pos,i=t.next,a=n-t.pos,o=t.skipSpace(n),s=Wt(t.text,t.text.length,o),c=[I(P.CodeMark,r,r+a)];o<s&&c.push(I(P.CodeInfo,e.lineStart+o,e.lineStart+s));for(let n=!0,r=!0,o=!1;e.nextLine()&&t.depth>=e.stack.length;n=!1){let s=t.pos;if(t.indent-t.baseIndent<4)for(;s<t.text.length&&t.text.charCodeAt(s)==i;)s++;if(s-t.pos>=a&&t.skipSpace(s)==t.text.length){for(let e of t.markers)c.push(e);r&&o&&on(c,e.lineStart-1,e.lineStart),c.push(I(P.CodeMark,e.lineStart+t.pos,e.lineStart+s)),e.nextLine();break}else{o=!0,n||(on(c,e.lineStart-1,e.lineStart),r=!1);for(let e of t.markers)c.push(e);let i=e.lineStart+t.basePos,a=e.lineStart+t.text.length;i<a&&(on(c,i,a),r=!1)}}return e.addNode(e.buffer.writeElements(c,-r).finish(P.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,t){let n=Kt(t);return n<0?!1:(e.startContext(P.Blockquote,t.pos),e.addNode(P.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null)},HorizontalRule(e,t){if(qt(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode(P.HorizontalRule,n),!0},BulletList(e,t){let n=Yt(t,e,!1);if(n<0)return!1;e.block.type!=P.BulletList&&e.startContext(P.BulletList,t.basePos,t.next);let r=an(t,t.pos+1);return e.startContext(P.ListItem,t.basePos,r-t.baseIndent),e.addNode(P.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},OrderedList(e,t){let n=Xt(t,e,!1);if(n<0)return!1;e.block.type!=P.OrderedList&&e.startContext(P.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let r=an(t,t.pos+n);return e.startContext(P.ListItem,t.basePos,r-t.baseIndent),e.addNode(P.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},ATXHeading(e,t){let n=Zt(t);if(n<0)return!1;let r=t.pos,i=e.lineStart+r,a=Wt(t.text,t.text.length,r),o=a;for(;o>r&&t.text.charCodeAt(o-1)==t.next;)o--;(o==a||o==r||!F(t.text.charCodeAt(o-1)))&&(o=t.text.length);let s=e.buffer.write(P.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(r+n+1,o),i+n+1),-i);o<t.text.length&&s.write(P.HeaderMark,o-r,a-r);let c=s.finish(P.ATXHeading1-1+n,t.text.length-r);return e.nextLine(),e.addNode(c,i),!0},HTMLBlock(e,t){let n=rn(t,e,!1);if(n<0)return!1;let r=e.lineStart+t.pos,i=nn[n][1],a=[],o=i!=$t;for(;!i.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){o=!1;break}for(let e of t.markers)a.push(e)}o&&e.nextLine();let s=i==en?P.CommentBlock:i==tn?P.ProcessingInstructionBlock:P.HTMLBlock,c=e.prevLineEnd();return e.addNode(e.buffer.writeElements(a,-r).finish(s,c-r),r),!0},SetextHeading:void 0},cn=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let r=n.content+`
2
2
  `+t.scrub(),i=this.advance(r);return i>-1&&i<r.length?this.complete(e,n,i):!1}finish(e,t){return(this.stage==2||this.stage==3)&&Ut(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,n){return e.addLeafElement(t,I(P.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;)if(this.stage==-1)return-1;else if(this.stage==0){if(!this.nextStage(Fn(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(I(P.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(Nn(e,Ut(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=Ut(e,this.pos),n=0;if(t>this.pos){let r=Pn(e,t,this.start);if(r){let t=ln(e,r.to-this.start);t>0&&(this.nextStage(r),n=t)}}return n||=ln(e,this.pos),n>0&&n<e.length?n:-1}else return ln(e,this.pos)}};function ln(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n==10)break;if(!F(n))return-1}return t}var un=class{nextLine(e,t,n){let r=t.depth<e.stack.length?-1:Qt(t),i=t.next;if(r<0)return!1;let a=I(P.HeaderMark,e.lineStart+t.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(n,I(i==61?P.SetextHeading1:P.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),a])),!0}finish(){return!1}},dn={LinkReference(e,t){return t.content.charCodeAt(0)==91?new cn(t):null},SetextHeading(){return new un}},fn=[(e,t)=>Zt(t)>=0,(e,t)=>Gt(t)>=0,(e,t)=>Kt(t)>=0,(e,t)=>Yt(t,e,!0)>=0,(e,t)=>Xt(t,e,!0)>=0,(e,t)=>qt(t,e,!0)>=0,(e,t)=>rn(t,e,!0)>=0],pn={text:``,end:0},mn=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.line=new Bt,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=Rt.create(P.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new zn(n,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let t=0;;){let n=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;t<e.markers.length&&(!n||e.markers[t].from<n.end);){let n=e.markers[t++];this.addNode(n.type,n.from,n.to)}if(!n)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;start:for(;;){for(let t of this.parser.blockParsers)if(t){let n=t(this,e);if(n!=0){if(n==1)return null;e.forward();continue start}}break}let t=new zt(this.lineStart+e.pos,e.text.slice(e.pos));for(let e of this.parser.leafBlockParsers)if(e){let n=e(this,t);n&&t.parsers.push(n)}lines:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,t))break lines}for(let n of t.parsers)if(n.nextLine(this,e,t))return null;t.content+=`
3
3
  `+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=Bn(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=pn;if(t.end=e,e>=this.to)t.text=``;else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let e=this.absoluteLineStart,n=this.rangeI;for(;this.ranges[n].to<t.end;){n++;let r=this.ranges[n].from,i=this.lineChunkAt(r);t.end=r+i.length,t.text=t.text.slice(0,this.ranges[n-1].to-e)+i,e=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(t);e.depth<this.stack.length;e.depth++){let t=this.stack[e.depth],n=this.parser.skipContextMarkup[t.type];if(!n)throw Error(`Unhandled block context `+P[t.type]);let r=this.line.markers.length;if(!n(t,this,e)){this.line.markers.length>r&&(t.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),n;if(this.input.lineChunks)n=t==`
4
4
  `?``:t;else{let e=t.indexOf(`
@@ -0,0 +1,45 @@
1
+ import{r as e}from"./chunk-DECur_0Z.js";import{n as t,r as n,t as r}from"./compiler-runtime-Y11fyRVL.js";import{S as i,a,c as o,d as s,f as c,g as l,i as u,n as d,o as f,p,r as m,s as h,t as g,u as _,x as v,y}from"./button-B1XQHQcX.js";var b=v(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),x=e(t(),1),ee=e(i(),1);function S(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var C=e=>{switch(e){case`success`:return T;case`info`:return E;case`warning`:return ne;case`error`:return D;default:return null}},w=Array(12).fill(0),te=({visible:e,className:t})=>x.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},x.createElement(`div`,{className:`sonner-spinner`},w.map((e,t)=>x.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),T=x.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},x.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),ne=x.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},x.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),E=x.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},x.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),D=x.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},x.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),re=x.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},x.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),x.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),ie=()=>{let[e,t]=x.useState(document.hidden);return x.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},O=1,k=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:O++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],x.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(j(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!x.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!x.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!x.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!x.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||O++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},A=(e,t)=>{let n=t?.id||O++;return k.addToast({title:e,...t,id:n}),n},j=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,ae=Object.assign(A,{success:k.success,info:k.info,warning:k.warning,error:k.error,custom:k.custom,message:k.message,promise:k.promise,dismiss:k.dismiss,loading:k.loading},{getHistory:()=>k.toasts,getToasts:()=>k.getActiveToasts()});S(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function M(e){return e.label!==void 0}var oe=3,N=`24px`,se=`16px`,ce=4e3,le=356,ue=14,de=45,fe=200;function P(...e){return e.filter(Boolean).join(` `)}function pe(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var me=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:ee,expandByDefault:S,classNames:w,icons:T,closeButtonAriaLabel:ne=`Close toast`}=e,[E,D]=x.useState(null),[O,k]=x.useState(null),[A,j]=x.useState(!1),[ae,oe]=x.useState(!1),[N,se]=x.useState(!1),[le,ue]=x.useState(!1),[me,he]=x.useState(!1),[ge,_e]=x.useState(0),[F,I]=x.useState(0),L=x.useRef(n.duration||y||ce),ve=x.useRef(null),R=x.useRef(null),ye=c===0,be=c+1<=o,z=n.type,B=n.dismissible!==!1,xe=n.className||``,Se=n.descriptionClassName||``,V=x.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),H=x.useMemo(()=>n.closeButton??p,[n.closeButton,p]),Ce=x.useMemo(()=>n.duration||y||ce,[n.duration,y]),we=x.useRef(0),U=x.useRef(0),Te=x.useRef(0),W=x.useRef(null),[Ee,De]=b.split(`-`),G=x.useMemo(()=>s.reduce((e,t,n)=>n>=V?e:e+t.height,0),[s,V]),Oe=ie(),ke=n.invert||t,K=z===`loading`;U.current=x.useMemo(()=>V*ee+G,[V,G]),x.useEffect(()=>{L.current=Ce},[Ce]),x.useEffect(()=>{j(!0)},[]),x.useEffect(()=>{let e=R.current;if(e){let t=e.getBoundingClientRect().height;return I(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),x.useLayoutEffect(()=>{if(!A)return;let e=R.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,I(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[A,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let q=x.useCallback(()=>{oe(!0),_e(U.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},fe)},[n,d,a,U]);x.useEffect(()=>{if(n.promise&&z===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Oe?(()=>{if(Te.current<we.current){let e=new Date().getTime()-we.current;L.current-=e}Te.current=new Date().getTime()})():L.current!==1/0&&(we.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),q()},L.current)),()=>clearTimeout(e)},[u,i,n,z,Oe,q]),x.useEffect(()=>{n.delete&&(q(),n.onDismiss==null||n.onDismiss.call(n,n))},[q,n.delete]);function Ae(){return T?.loading?x.createElement(`div`,{className:P(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":z===`loading`},T.loading):x.createElement(te,{className:P(w?.loader,n?.classNames?.loader),visible:z===`loading`})}let je=n.icon||T?.[z]||C(z);return x.createElement(`li`,{tabIndex:0,ref:R,className:P(_,xe,w?.toast,n?.classNames?.toast,w?.default,w?.[z],n?.classNames?.[z]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":A,"data-promise":!!n.promise,"data-swiped":me,"data-removed":ae,"data-visible":be,"data-y-position":Ee,"data-x-position":De,"data-index":c,"data-front":ye,"data-swiping":N,"data-dismissible":B,"data-type":z,"data-invert":ke,"data-swipe-out":le,"data-swipe-direction":O,"data-expanded":!!(u||S&&A),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${ae?ge:U.current}px`,"--initial-height":S?`auto`:`${F}px`,...m,...n.style},onDragEnd:()=>{se(!1),D(null),W.current=null},onPointerDown:e=>{e.button!==2&&(K||!B||(ve.current=new Date,_e(U.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(se(!0),W.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(le||!B)return;W.current=null;let e=Number(R.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(R.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ve.current?.getTime(),i=E===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=de||a>.11){_e(U.current),n.onDismiss==null||n.onDismiss.call(n,n),k(E===`x`?e>0?`right`:`left`:t>0?`down`:`up`),q(),ue(!0);return}else{var o,s;(o=R.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=R.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}he(!1),se(!1),D(null)},onPointerMove:t=>{var n,r;if(!W.current||!B||window.getSelection()?.toString().length>0)return;let i=t.clientY-W.current.y,a=t.clientX-W.current.x,o=e.swipeDirections??pe(b);!E&&(Math.abs(a)>1||Math.abs(i)>1)&&D(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(E===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(E===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&he(!0),(n=R.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=R.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},H&&!n.jsx&&z!==`loading`?x.createElement(`button`,{"aria-label":ne,"data-disabled":K,"data-close-button":!0,onClick:K||!B?()=>{}:()=>{q(),n.onDismiss==null||n.onDismiss.call(n,n)},className:P(w?.closeButton,n?.classNames?.closeButton)},T?.close??re):null,(z||n.icon||n.promise)&&n.icon!==null&&(T?.[z]!==null||n.icon)?x.createElement(`div`,{"data-icon":``,className:P(w?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Ae():null,n.type===`loading`?null:je):null,x.createElement(`div`,{"data-content":``,className:P(w?.content,n?.classNames?.content)},x.createElement(`div`,{"data-title":``,className:P(w?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?x.createElement(`div`,{"data-description":``,className:P(v,Se,w?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),x.isValidElement(n.cancel)?n.cancel:n.cancel&&M(n.cancel)?x.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{M(n.cancel)&&B&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),q())},className:P(w?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,x.isValidElement(n.action)?n.action:n.action&&M(n.action)?x.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{M(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&q())},className:P(w?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function he(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function ge(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?se:N;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var _e=x.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=oe,toastOptions:g,dir:_=he(),gap:v=ue,icons:y,containerAriaLabel:b=`Notifications`}=e,[S,C]=x.useState([]),w=x.useMemo(()=>n?S.filter(e=>e.toasterId===n):S.filter(e=>!e.toasterId),[S,n]),te=x.useMemo(()=>Array.from(new Set([i].concat(w.filter(e=>e.position).map(e=>e.position)))),[w,i]),[T,ne]=x.useState([]),[E,D]=x.useState(!1),[re,ie]=x.useState(!1),[O,A]=x.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),j=x.useRef(null),ae=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),M=x.useRef(null),N=x.useRef(!1),se=x.useCallback(e=>{C(t=>(t.find(t=>t.id===e.id)?.delete||k.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return x.useEffect(()=>k.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{C(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{ee.flushSync(()=>{C(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[S]),x.useEffect(()=>{if(d!==`system`){A(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?A(`dark`):A(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{A(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{A(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),x.useEffect(()=>{S.length<=1&&D(!1)},[S]),x.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;D(!0),(t=j.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===j.current||j.current?.contains(document.activeElement))&&D(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),x.useEffect(()=>{if(j.current)return()=>{M.current&&(M.current.focus({preventScroll:!0}),M.current=null,N.current=!1)}},[j.current]),x.createElement(`section`,{ref:t,"aria-label":`${b} ${ae}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},te.map((t,n)=>{let[i,a]=t.split(`-`);return w.length?x.createElement(`ol`,{key:t,dir:_===`auto`?he():_,tabIndex:-1,ref:j,className:c,"data-sonner-toaster":!0,"data-sonner-theme":O,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${T[0]?.height||0}px`,"--width":`${le}px`,"--gap":`${v}px`,...m,...ge(l,u)},onBlur:e=>{N.current&&!e.currentTarget.contains(e.relatedTarget)&&(N.current=!1,M.current&&=(M.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||N.current||(N.current=!0,M.current=e.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{re||D(!1)},onDragEnd:()=>D(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ie(!0)},onPointerUp:()=>ie(!1)},w.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>x.createElement(me,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:re,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:se,toasts:w.filter(e=>e.position==n.position),heights:T.filter(e=>e.position==n.position),setHeights:ne,expandByDefault:o,gap:v,expanded:E,swipeDirections:e.swipeDirections}))):null}))}),F=n(),I=`focusScope.autoFocusOnMount`,L=`focusScope.autoFocusOnUnmount`,ve={bubbles:!1,cancelable:!0},R=`FocusScope`,ye=x.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[c,l]=x.useState(null),u=a(i),d=a(o),f=x.useRef(null),m=y(t,e=>l(e)),h=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let e=function(e){if(h.paused||!c)return;let t=e.target;c.contains(t)?f.current=t:H(f.current,{select:!0})},t=function(e){if(h.paused||!c)return;let t=e.relatedTarget;t!==null&&(c.contains(t)||H(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&H(c)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,h.paused]),x.useEffect(()=>{if(c){Ce.add(h);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(I,ve);c.addEventListener(I,u),c.dispatchEvent(t),t.defaultPrevented||(be(Te(B(c)),{select:!0}),document.activeElement===e&&H(c))}return()=>{c.removeEventListener(I,u),setTimeout(()=>{let t=new CustomEvent(L,ve);c.addEventListener(L,d),c.dispatchEvent(t),t.defaultPrevented||H(e??document.body,{select:!0}),c.removeEventListener(L,d),Ce.remove(h)},0)}}},[c,u,d,h]);let g=x.useCallback(e=>{if(!n&&!r||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=z(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&H(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&H(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,h.paused]);return(0,F.jsx)(p.div,{tabIndex:-1,...s,ref:m,onKeyDown:g})});ye.displayName=R;function be(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(H(r,{select:t}),document.activeElement!==n)return}function z(e){let t=B(e);return[xe(t,e),xe(t.reverse(),e)]}function B(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xe(e,t){for(let n of e)if(!Se(n,{upTo:t}))return n}function Se(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function V(e){return e instanceof HTMLInputElement&&`select`in e}function H(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&V(e)&&t&&e.select()}}var Ce=we();function we(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=U(e,t),e.unshift(t)},remove(t){e=U(e,t),e[0]?.resume()}}}function U(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Te(e){return e.filter(e=>e.tagName!==`A`)}var W=0;function Ee(){x.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??De()),document.body.insertAdjacentElement(`beforeend`,e[1]??De()),W++,()=>{W===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),W--}},[])}function De(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var G=function(){return G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},G.apply(this,arguments)};function Oe(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ke(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var K=`right-scroll-bar-position`,q=`width-before-scroll-bar`,Ae=`with-scroll-bars-hidden`,je=`--removed-body-scroll-bar-size`;function Me(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ne(e,t){var n=(0,x.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Pe=typeof window<`u`?x.useLayoutEffect:x.useEffect,Fe=new WeakMap;function Ie(e,t){var n=Ne(t||null,function(t){return e.forEach(function(e){return Me(e,t)})});return Pe(function(){var t=Fe.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Me(e,null)}),i.forEach(function(e){r.has(e)||Me(e,a)})}Fe.set(n,e)},[e]),n}function Le(e){return e}function Re(e,t){t===void 0&&(t=Le);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function ze(e){e===void 0&&(e={});var t=Re(null);return t.options=G({async:!0,ssr:!1},e),t}var Be=function(e){var t=e.sideCar,n=Oe(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return x.createElement(r,G({},n))};Be.isSideCarExport=!0;function Ve(e,t){return e.useMedium(t),Be}var He=ze(),Ue=function(){},We=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:Ue,onWheelCapture:Ue,onTouchMoveCapture:Ue}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=Oe(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),ee=f,S=Ie([n,t]),C=G(G({},b),i);return x.createElement(x.Fragment,null,u&&x.createElement(ee,{sideCar:He,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?x.cloneElement(x.Children.only(s),G(G({},C),{ref:S})):x.createElement(v,G({},C,{className:c,ref:S}),s))});We.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},We.classNames={fullWidth:q,zeroRight:K};var Ge,Ke=function(){if(Ge)return Ge;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function qe(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Ke();return t&&e.setAttribute(`nonce`,t),e}function Je(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ye(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Xe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=qe())&&(Je(t,n),Ye(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ze=function(){var e=Xe();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Qe=function(){var e=Ze();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},$e={left:0,top:0,right:0,gap:0},et=function(e){return parseInt(e||``,10)||0},tt=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[et(n),et(r),et(i)]},nt=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return $e;var t=tt(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},rt=Qe(),it=`data-scroll-locked`,at=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2
+ .${Ae} {
3
+ overflow: hidden ${r};
4
+ padding-right: ${s}px ${r};
5
+ }
6
+ body[${it}] {
7
+ overflow: hidden ${r};
8
+ overscroll-behavior: contain;
9
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
10
+ padding-left: ${i}px;
11
+ padding-top: ${a}px;
12
+ padding-right: ${o}px;
13
+ margin-left:0;
14
+ margin-top:0;
15
+ margin-right: ${s}px ${r};
16
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
17
+ }
18
+
19
+ .${K} {
20
+ right: ${s}px ${r};
21
+ }
22
+
23
+ .${q} {
24
+ margin-right: ${s}px ${r};
25
+ }
26
+
27
+ .${K} .${K} {
28
+ right: 0 ${r};
29
+ }
30
+
31
+ .${q} .${q} {
32
+ margin-right: 0 ${r};
33
+ }
34
+
35
+ body[${it}] {
36
+ ${je}: ${s}px;
37
+ }
38
+ `},ot=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},st=function(){x.useEffect(function(){return document.body.setAttribute(it,(ot()+1).toString()),function(){var e=ot()-1;e<=0?document.body.removeAttribute(it):document.body.setAttribute(it,e.toString())}},[])},ct=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;st();var a=x.useMemo(function(){return nt(i)},[i]);return x.createElement(rt,{styles:at(a,!t,i,n?``:`!important`)})},lt=!1;if(typeof window<`u`)try{var ut=Object.defineProperty({},`passive`,{get:function(){return lt=!0,!0}});window.addEventListener(`test`,ut,ut),window.removeEventListener(`test`,ut,ut)}catch{lt=!1}var J=lt?{passive:!1}:!1,dt=function(e){return e.tagName===`TEXTAREA`},ft=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!dt(e)&&n[t]===`visible`)},pt=function(e){return ft(e,`overflowY`)},mt=function(e){return ft(e,`overflowX`)},ht=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),vt(e,r)){var i=yt(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},gt=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},_t=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},vt=function(e,t){return e===`v`?pt(t):mt(t)},yt=function(e,t){return e===`v`?gt(t):_t(t)},bt=function(e,t){return e===`h`&&t===`rtl`?-1:1},xt=function(e,t,n,r,i){var a=bt(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=yt(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&vt(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},St=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ct=function(e){return[e.deltaX,e.deltaY]},wt=function(e){return e&&`current`in e?e.current:e},Tt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Et=function(e){return`
39
+ .block-interactivity-${e} {pointer-events: none;}
40
+ .allow-interactivity-${e} {pointer-events: all;}
41
+ `},Dt=0,Y=[];function Ot(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(Dt++)[0],a=x.useState(Qe)[0],o=x.useRef(e);x.useEffect(function(){o.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=ke([e.lockRef.current],(e.shards||[]).map(wt),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=x.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=St(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=ht(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=ht(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return xt(h,t,e,h===`h`?s:c,!0)},[]),c=x.useCallback(function(e){var n=e;if(!(!Y.length||Y[Y.length-1]!==a)){var r=`deltaY`in n?Ct(n):St(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Tt(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(wt).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=x.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:kt(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=x.useCallback(function(e){n.current=St(e),r.current=void 0},[]),d=x.useCallback(function(t){l(t.type,Ct(t),t.target,s(t,e.lockRef.current))},[]),f=x.useCallback(function(t){l(t.type,St(t),t.target,s(t,e.lockRef.current))},[]);x.useEffect(function(){return Y.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,J),document.addEventListener(`touchmove`,c,J),document.addEventListener(`touchstart`,u,J),function(){Y=Y.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,J),document.removeEventListener(`touchmove`,c,J),document.removeEventListener(`touchstart`,u,J)}},[]);var p=e.removeScrollBar,m=e.inert;return x.createElement(x.Fragment,null,m?x.createElement(a,{styles:Et(i)}):null,p?x.createElement(ct,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function kt(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var At=Ve(He,Ot),jt=x.forwardRef(function(e,t){return x.createElement(We,G({},e,{ref:t,sideCar:At}))});jt.classNames=We.classNames;var Mt=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},X=new WeakMap,Nt=new WeakMap,Pt={},Ft=0,It=function(e){return e&&(e.host||It(e.parentNode))},Lt=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=It(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Rt=function(e,t,n,r){var i=Lt(t,Array.isArray(e)?e:[e]);Pt[n]||(Pt[n]=new WeakMap);var a=Pt[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(X.get(e)||0)+1,l=(a.get(e)||0)+1;X.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Nt.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ft++,function(){o.forEach(function(e){var t=X.get(e)-1,i=a.get(e)-1;X.set(e,t),a.set(e,i),t||(Nt.has(e)||e.removeAttribute(r),Nt.delete(e)),i||e.removeAttribute(n)}),Ft--,Ft||(X=new WeakMap,X=new WeakMap,Nt=new WeakMap,Pt={})}},zt=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Mt(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Rt(r,i,n,`aria-hidden`)):function(){return null}},Bt=`Dialog`,[Vt,Ht]=c(Bt),[Ut,Z]=Vt(Bt),Wt=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,c=x.useRef(null),l=x.useRef(null),[u,d]=o({prop:r,defaultProp:i??!1,onChange:a,caller:Bt});return(0,F.jsx)(Ut,{scope:t,triggerRef:c,contentRef:l,contentId:f(),titleId:f(),descriptionId:f(),open:u,onOpenChange:d,onOpenToggle:x.useCallback(()=>d(e=>!e),[d]),modal:s,children:n})};Wt.displayName=Bt;var Gt=`DialogTrigger`,Kt=x.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Z(Gt,n),a=y(t,i.triggerRef);return(0,F.jsx)(p.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":fn(i.open),...r,ref:a,onClick:_(e.onClick,i.onOpenToggle)})});Kt.displayName=Gt;var qt=`DialogPortal`,[Jt,Yt]=Vt(qt,{forceMount:void 0}),Xt=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Z(qt,t);return(0,F.jsx)(Jt,{scope:t,forceMount:n,children:x.Children.map(r,e=>(0,F.jsx)(h,{present:n||a.open,children:(0,F.jsx)(m,{asChild:!0,container:i,children:e})}))})};Xt.displayName=qt;var Zt=`DialogOverlay`,Qt=x.forwardRef((e,t)=>{let n=Yt(Zt,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Z(Zt,e.__scopeDialog);return a.modal?(0,F.jsx)(h,{present:r||a.open,children:(0,F.jsx)(en,{...i,ref:t})}):null});Qt.displayName=Zt;var $t=l(`DialogOverlay.RemoveScroll`),en=x.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Z(Zt,n);return(0,F.jsx)(jt,{as:$t,allowPinchZoom:!0,shards:[i.contentRef],children:(0,F.jsx)(p.div,{"data-state":fn(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),Q=`DialogContent`,tn=x.forwardRef((e,t)=>{let n=Yt(Q,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Z(Q,e.__scopeDialog);return(0,F.jsx)(h,{present:r||a.open,children:a.modal?(0,F.jsx)(nn,{...i,ref:t}):(0,F.jsx)(rn,{...i,ref:t})})});tn.displayName=Q;var nn=x.forwardRef((e,t)=>{let n=Z(Q,e.__scopeDialog),r=x.useRef(null),i=y(t,n.contentRef,r);return x.useEffect(()=>{let e=r.current;if(e)return zt(e)},[]),(0,F.jsx)(an,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:_(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:_(e.onFocusOutside,e=>e.preventDefault())})}),rn=x.forwardRef((e,t)=>{let n=Z(Q,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return(0,F.jsx)(an,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),an=x.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Z(Q,n),c=x.useRef(null),l=y(t,c);return Ee(),(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(ye,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,F.jsx)(u,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":fn(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(gn,{titleId:s.titleId}),(0,F.jsx)(vn,{contentRef:c,descriptionId:s.descriptionId})]})]})}),on=`DialogTitle`,sn=x.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Z(on,n);return(0,F.jsx)(p.h2,{id:i.titleId,...r,ref:t})});sn.displayName=on;var cn=`DialogDescription`,ln=x.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Z(cn,n);return(0,F.jsx)(p.p,{id:i.descriptionId,...r,ref:t})});ln.displayName=cn;var un=`DialogClose`,dn=x.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Z(un,n);return(0,F.jsx)(p.button,{type:`button`,...r,ref:t,onClick:_(e.onClick,()=>i.onOpenChange(!1))})});dn.displayName=un;function fn(e){return e?`open`:`closed`}var pn=`DialogTitleWarning`,[mn,hn]=s(pn,{contentName:Q,titleName:on,docsSlug:`dialog`}),gn=({titleId:e})=>{let t=hn(pn),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
+
43
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
+
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},_n=`DialogDescriptionWarning`,vn=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${hn(_n).contentName}}.`;return x.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},yn=Wt,bn=Xt,xn=Qt,Sn=tn,Cn=sn,wn=ln,Tn=dn,$=r();function En(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,F.jsx)(yn,{"data-slot":`dialog`,...n}),t[2]=n,t[3]=r),r}function Dn(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,F.jsx)(bn,{"data-slot":`dialog-portal`,...n}),t[2]=n,t[3]=r),r}function On(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,F.jsx)(Tn,{"data-slot":`dialog-close`,className:`font-mono uppercase`,...n}),t[2]=n,t[3]=r),r}function kn(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,F.jsx)(xn,{"data-slot":`dialog-overlay`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function An(e){let t=(0,$.c)(15),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,showCloseButton:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?!0:a,s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,F.jsx)(kn,{}),t[5]=s):s=t[5];let c;t[6]===r?c=t[7]:(c=d(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,r),t[6]=r,t[7]=c);let l;t[8]===o?l=t[9]:(l=o&&(0,F.jsx)(Tn,{"data-slot":`dialog-close`,asChild:!0,children:(0,F.jsxs)(g,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`,children:[(0,F.jsx)(b,{}),(0,F.jsx)(`span`,{className:`sr-only`,children:`Close`})]})}),t[8]=o,t[9]=l);let u;return t[10]!==n||t[11]!==i||t[12]!==c||t[13]!==l?(u=(0,F.jsxs)(Dn,{children:[s,(0,F.jsxs)(Sn,{"data-slot":`dialog-content`,className:c,...i,children:[n,l]})]}),t[10]=n,t[11]=i,t[12]=c,t[13]=l,t[14]=u):u=t[14],u}function jn(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`flex flex-col gap-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,F.jsx)(`div`,{"data-slot":`dialog-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Mn(e){let t=(0,$.c)(14),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,showCloseButton:a,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?!1:a,s;t[5]===r?s=t[6]:(s=d(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,r),t[5]=r,t[6]=s);let c;t[7]===o?c=t[8]:(c=o&&(0,F.jsx)(Tn,{asChild:!0,children:(0,F.jsx)(g,{variant:`outline`,children:`Close`})}),t[7]=o,t[8]=c);let l;return t[9]!==n||t[10]!==i||t[11]!==s||t[12]!==c?(l=(0,F.jsxs)(`div`,{"data-slot":`dialog-footer`,className:s,...i,children:[n,c]}),t[9]=n,t[10]=i,t[11]=s,t[12]=c,t[13]=l):l=t[13],l}function Nn(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`font-heading text-base leading-none font-medium`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,F.jsx)(Cn,{"data-slot":`dialog-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Pn(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,F.jsx)(wn,{"data-slot":`dialog-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{Ee as _,Mn as a,ae as b,Tn as c,xn as d,bn as f,jt as g,zt as h,Pn as i,Sn as l,Cn as m,On as n,jn as o,yn as p,An as r,Nn as s,En as t,wn as u,ye as v,b as x,_e as y};