@inkeep/open-knowledge 0.9.0-beta.30 → 0.9.0-beta.31

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 (43) hide show
  1. package/dist/assets/skills/discovery/SKILL.md +1 -1
  2. package/dist/assets/skills/project/SKILL.md +1 -1
  3. package/dist/cli.mjs +32 -32
  4. package/dist/constants-mptAAyp9.mjs +2 -0
  5. package/dist/{dist-DFlSVgXA.mjs → dist-C4I-b8-m.mjs} +1 -1
  6. package/dist/{dist-DpfmiCV4.mjs → dist-CA-yDHEq.mjs} +10 -10
  7. package/dist/{gh-detect-B32mymgh.mjs → gh-detect-BZ1nPNKy.mjs} +2 -2
  8. package/dist/index.mjs +1 -1
  9. package/dist/init-6FMYGQaY.mjs +1 -0
  10. package/dist/{init-BnZOMZQO.mjs → init-Dt8uSjge.mjs} +6 -6
  11. package/dist/loader-ClwCZw8O.mjs +1 -0
  12. package/dist/{loader-DDiDxthB.mjs → loader-DWCsV2Sz.mjs} +3 -3
  13. package/dist/preview-C59RI9mp.mjs +1 -0
  14. package/dist/{preview-CSNkLWHD.mjs → preview-Ddp3FH-6.mjs} +2 -2
  15. package/dist/public/assets/{ActivityModeContent-BDyf1132.js → ActivityModeContent-DjLptssw.js} +1 -1
  16. package/dist/public/assets/{DocumentContext-B8UGtk6l.js → DocumentContext-BzUdezp1.js} +1 -1
  17. package/dist/public/assets/{GraphPanel-C1O9mJAk.js → GraphPanel-D2ZWMZHw.js} +1 -1
  18. package/dist/public/assets/{SettingsDialogBody-DcBkN-yS.js → SettingsDialogBody-Y7msJVE9.js} +1 -1
  19. package/dist/public/assets/{SourceEditor-BgMXvzLz.js → SourceEditor-ztotrWnx.js} +1 -1
  20. package/dist/public/assets/{config-validation-events-EIXjKoxp.js → config-validation-events-lBcb_6bi.js} +1 -1
  21. package/dist/public/assets/{index-CCYpQTHa.js → index-BzVbhruC.js} +4 -4
  22. package/dist/public/assets/{prop-types-BwZmdnc0.js → prop-types-DhUmqQsM.js} +98 -98
  23. package/dist/public/assets/{target-navigation-intent-CPYp4bg0.js → target-navigation-intent-DZxquxsX.js} +1 -1
  24. package/dist/public/assets/{typing-burst-detector-B1s9ulvg.js → typing-burst-detector-DWPni1ys.js} +1 -1
  25. package/dist/public/index.html +6 -6
  26. package/dist/{repair-launch-json-D2yuZ2m2.mjs → repair-launch-json-CpHkwEQe.mjs} +2 -2
  27. package/dist/{repair-mcp-configs-BoZZdQfe.mjs → repair-mcp-configs-DTo4wxei.mjs} +2 -2
  28. package/dist/repair-skills-DthZy9gs.mjs +1 -0
  29. package/dist/{repair-skills-BSxYtEdR.mjs → repair-skills-dYAzCUrj.mjs} +2 -2
  30. package/dist/{server-lock-BpjJj3OD-dXtN3YgR.mjs → server-lock-BpjJj3OD-D8yiVjLU.mjs} +20 -20
  31. package/dist/server-lock-CyhBidkz-K4Rq177O.mjs +1 -0
  32. package/dist/{src-DlZY1w-G.mjs → src-DQzHDEzB.mjs} +2 -2
  33. package/dist/start-DntS9VW0.mjs +1 -0
  34. package/dist/{start-Gdo8a38H.mjs → start-k1rm0C8J.mjs} +2 -2
  35. package/dist/{write-project-skill-PXFMiJn0.mjs → write-project-skill-CD2-O-zT.mjs} +2 -2
  36. package/package.json +1 -1
  37. package/dist/constants-nygsGL1t.mjs +0 -2
  38. package/dist/init-D1mwIDbj.mjs +0 -1
  39. package/dist/loader-C_bcUreu.mjs +0 -1
  40. package/dist/preview-CirVU2JW.mjs +0 -1
  41. package/dist/repair-skills-BwSKUIVg.mjs +0 -1
  42. package/dist/server-lock-CyhBidkz-B9YGymFa.mjs +0 -1
  43. package/dist/start-Cenma9Sz.mjs +0 -1
@@ -1,4 +1,4 @@
1
- import{o as e,r as t}from"./chunk-CFjPhJqf.js";import{a as n,i as r,o as i,r as a,t as o}from"./compiler-runtime-Cs91PcD2.js";import{An as s,C as c,D as l,E as u,In as d,Kn as f,Ln as p,Mn as m,Nn as h,Pn as g,S as _,T as v,Wn as y,_ as b,_r as x,h as S,lr as C,m as w,n as T,nt as E,pr as D,qn as O,rr as k,ur as A,w as j,x as M}from"./DocumentContext-B8UGtk6l.js";import{B as N,C as P,I as F,Ki as I,L,M as R,Mt as z,N as B,Nt as V,P as H,Qt as U,R as W,Tr as ee,Ui as G,V as te,Wi as ne,_ as re,a as ie,cn as ae,gi as oe,ln as se,rr as ce,s as le,sn as ue,tt as de,un as fe,vn as pe,w as me,x as he,yr as ge,z as _e}from"./prop-types-BwZmdnc0.js";import{C as ve,S as K,_ as ye,a as be,b as xe,c as Se,d as Ce,h as we,i as Te,l as Ee,m as De,n as Oe,o as ke,p as Ae,s as je,t as q,w as Me,x as Ne,y as Pe}from"./button-DenIdY-r.js";import{i as Fe}from"./toggle-group-Cs-1L92l.js";import{_ as Ie,a as Le,b as Re,c as ze,g as Be,h as Ve,i as He,m as Ue,n as We,o as Ge,r as Ke,s as qe,t as Je,x as Ye,y as Xe}from"./dialog-B1es0EvU.js";import{a as Ze,i as Qe}from"./collapsible-BhpeB6tu.js";import{n as $e,t as et}from"./dist-DicqJavT.js";import{t as tt}from"./checkbox-Co7Tjlri.js";import{n as nt,r as rt,t as it}from"./dist-P7DYrfOB.js";import{t as at}from"./label-DwEePOBC.js";import{n as ot,r as st,t as ct}from"./textarea-luaT-nOK.js";var lt=ve(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),ut=ve(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),dt=ve(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),ft=ve(`cloud-off`,[[`path`,{d:`M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057`,key:`1uxyv8`}],[`path`,{d:`M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78`,key:`99tcn7`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),pt=ve(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),mt=ve(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),ht=ve(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),gt=ve(`file-plus`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]),_t=ve(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),vt=ve(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),yt=ve(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),bt=ve(`move-up-right`,[[`path`,{d:`M13 5H19V11`,key:`1n1gyv`}],[`path`,{d:`M19 5L5 19`,key:`72u4yj`}]]),xt=ve(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),St=ve(`smile`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`,key:`1y1vjs`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),Ct=ve(`square-check`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),wt=ve(`type`,[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]),Tt=ve(`user-cog`,[[`path`,{d:`M10 15H6a4 4 0 0 0-4 4v2`,key:`1nfge6`}],[`path`,{d:`m14.305 16.53.923-.382`,key:`1itpsq`}],[`path`,{d:`m15.228 13.852-.923-.383`,key:`eplpkm`}],[`path`,{d:`m16.852 12.228-.383-.923`,key:`13v3q0`}],[`path`,{d:`m16.852 17.772-.383.924`,key:`1i8mnm`}],[`path`,{d:`m19.148 12.228.383-.923`,key:`1q8j1v`}],[`path`,{d:`m19.53 18.696-.382-.924`,key:`vk1qj3`}],[`path`,{d:`m20.772 13.852.924-.383`,key:`n880s0`}],[`path`,{d:`m20.772 16.148.924.383`,key:`1g6xey`}],[`circle`,{cx:`18`,cy:`15`,r:`3`,key:`gjjjvw`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]);async function Et(e){try{let t=await e.json(),n=U.safeParse(t);if(n.success)return n.data.title}catch{}}async function Dt(e,t){return fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t??{})})}function Ot(e){let t=e.split(`
1
+ import{o as e,r as t}from"./chunk-CFjPhJqf.js";import{a as n,i as r,o as i,r as a,t as o}from"./compiler-runtime-Cs91PcD2.js";import{An as s,C as c,D as l,E as u,In as d,Kn as f,Ln as p,Mn as m,Nn as h,Pn as g,S as _,T as v,Wn as y,_ as b,_r as x,h as S,lr as C,m as w,n as T,nt as E,pr as D,qn as O,rr as k,ur as A,w as j,x as M}from"./DocumentContext-BzUdezp1.js";import{B as N,C as P,I as F,Ki as I,L,M as R,Mt as z,N as B,Nt as V,P as H,Qt as U,R as W,Tr as ee,Ui as G,V as te,Wi as ne,_ as re,a as ie,cn as ae,gi as oe,ln as se,rr as ce,s as le,sn as ue,tt as de,un as fe,vn as pe,w as me,x as he,yr as ge,z as _e}from"./prop-types-DhUmqQsM.js";import{C as ve,S as K,_ as ye,a as be,b as xe,c as Se,d as Ce,h as we,i as Te,l as Ee,m as De,n as Oe,o as ke,p as Ae,s as je,t as q,w as Me,x as Ne,y as Pe}from"./button-DenIdY-r.js";import{i as Fe}from"./toggle-group-Cs-1L92l.js";import{_ as Ie,a as Le,b as Re,c as ze,g as Be,h as Ve,i as He,m as Ue,n as We,o as Ge,r as Ke,s as qe,t as Je,x as Ye,y as Xe}from"./dialog-B1es0EvU.js";import{a as Ze,i as Qe}from"./collapsible-BhpeB6tu.js";import{n as $e,t as et}from"./dist-DicqJavT.js";import{t as tt}from"./checkbox-Co7Tjlri.js";import{n as nt,r as rt,t as it}from"./dist-P7DYrfOB.js";import{t as at}from"./label-DwEePOBC.js";import{n as ot,r as st,t as ct}from"./textarea-luaT-nOK.js";var lt=ve(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),ut=ve(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),dt=ve(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),ft=ve(`cloud-off`,[[`path`,{d:`M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057`,key:`1uxyv8`}],[`path`,{d:`M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78`,key:`99tcn7`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),pt=ve(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),mt=ve(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),ht=ve(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),gt=ve(`file-plus`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]),_t=ve(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),vt=ve(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),yt=ve(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),bt=ve(`move-up-right`,[[`path`,{d:`M13 5H19V11`,key:`1n1gyv`}],[`path`,{d:`M19 5L5 19`,key:`72u4yj`}]]),xt=ve(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),St=ve(`smile`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`,key:`1y1vjs`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),Ct=ve(`square-check`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),wt=ve(`type`,[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]),Tt=ve(`user-cog`,[[`path`,{d:`M10 15H6a4 4 0 0 0-4 4v2`,key:`1nfge6`}],[`path`,{d:`m14.305 16.53.923-.382`,key:`1itpsq`}],[`path`,{d:`m15.228 13.852-.923-.383`,key:`eplpkm`}],[`path`,{d:`m16.852 12.228-.383-.923`,key:`13v3q0`}],[`path`,{d:`m16.852 17.772-.383.924`,key:`1i8mnm`}],[`path`,{d:`m19.148 12.228.383-.923`,key:`1q8j1v`}],[`path`,{d:`m19.53 18.696-.382-.924`,key:`vk1qj3`}],[`path`,{d:`m20.772 13.852.924-.383`,key:`n880s0`}],[`path`,{d:`m20.772 16.148.924.383`,key:`1g6xey`}],[`circle`,{cx:`18`,cy:`15`,r:`3`,key:`gjjjvw`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]);async function Et(e){try{let t=await e.json(),n=U.safeParse(t);if(n.success)return n.data.title}catch{}}async function Dt(e,t){return fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t??{})})}function Ot(e){let t=e.split(`
2
2
  `);for(let e=t.length-1;e>=0;e--){let n=t[e]?.trim();if(n)try{let e=JSON.parse(n);if(e&&typeof e==`object`)return e}catch{}}return null}function kt(){return{async status(e){let t=e?.host??`github.com`,n=await Dt(`/api/local-op/auth/status`,e);if(!n.ok)return{authenticated:!1,host:t,error:await Et(n)};let r=await n.json(),i=typeof r.host==`string`?r.host:t;if(r.authenticated===!0&&typeof r.login==`string`){let e=r.tier===`A`||r.tier===`B`||r.tier===`C`?r.tier:void 0;return{authenticated:!0,host:i,login:r.login,tier:e,name:typeof r.name==`string`?r.name:void 0,email:typeof r.email==`string`?r.email:void 0}}return{authenticated:!1,host:i,error:typeof r.error==`string`?r.error:void 0}},async repos(e){let t=e?.host??`github.com`,n=await Dt(`/api/local-op/auth/repos`,e);if(!n.ok)return{ok:!1,error:await Et(n)??`Failed to fetch repositories`};let r=Ot(await n.text());if(r&&r.type===`error`&&r.problem&&typeof r.problem==`object`){let e=r.problem;return{ok:!1,error:e.detail||e.title||`Failed to fetch repositories`}}if(!r||!Array.isArray(r.repos))return{ok:!1,error:`Failed to fetch repositories`};let i=[];for(let e of r.repos){let t=e;typeof t?.full_name==`string`&&typeof t.clone_url==`string`&&i.push({full_name:t.full_name,clone_url:t.clone_url,private:t.private===!0})}return{ok:!0,host:typeof r.host==`string`?r.host:t,repos:i}},async signout(e){let t=await Dt(`/api/local-op/auth/signout`,e);return t.ok?{ok:!0}:{ok:!1,error:await Et(t)}}}}function At(e){return{status:t=>e.localOp.authStatus(t),repos:t=>e.localOp.authRepos(t)}}var J=i(),Y=e(n(),1),jt=e(Me()),X=o();async function Mt(e,t){let n=e.getReader(),r=new TextDecoder,i=``;for(;;){let{done:e,value:a}=await n.read();if(e)return i+=r.decode(),!!(i.trim()&&t(i)===`terminal`);i+=r.decode(a,{stream:!0});let o=i.split(`
3
3
  `);i=o.pop()??``;for(let e of o)if(e.trim()&&t(e)===`terminal`)return!0}}function Nt(e){let t=[],n=[],r=new AbortController,i=!1,a=()=>{for(let e of n.splice(0))e(null)};return e(e=>{i||(n.length>0?n.shift()?.(e):t.push(e),(e.type===`complete`||e.type===`error`)&&(i=!0,r.abort(),a()))},r.signal),{events:{[Symbol.asyncIterator](){return{async next(){if(t.length>0){let e=t.shift();return e===void 0?{value:void 0,done:!0}:{value:e,done:!1}}return i?{value:void 0,done:!0}:new Promise(e=>{n.push(t=>{e(t===null?{value:void 0,done:!0}:{value:t,done:!1})})})}}}},cancel:()=>{i||(i=!0,r.abort(),a())}}}function Pt(){return{start(){return Nt((e,t)=>{(async()=>{try{let n=await fetch(`/api/local-op/auth/login`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({json:!0}),signal:t});if(!n.ok){let t=`Failed to start sign-in — try again`;try{let e=await n.json(),r=U.safeParse(e);r.success&&(t=r.data.title)}catch{}e({type:`error`,message:t});return}if(!n.body){e({type:`error`,message:`Failed to start sign-in — try again`});return}!await Mt(n.body,t=>{let n;try{n=JSON.parse(t)}catch{return console.warn(`[auth-transport] Dropped unparseable NDJSON line:`,t.slice(0,100)),`continue`}if(n&&typeof n==`object`&&n.type===`error`&&`problem`in n){let t=n.problem;return e({type:`error`,message:t?.detail||t?.title||`Unknown error`}),`terminal`}let r=n;return e(r),r.type===`complete`||r.type===`error`?`terminal`:`continue`})&&!t.aborted&&e({type:`error`,message:`Sign-in stream ended without confirmation — please try again`})}catch(t){if(t instanceof Error&&t.name===`AbortError`)return;e({type:`error`,message:`Connection error — try again`})}})()})}}}function Ft(e){return{start(){return e.localOp.auth.start()}}}function It(e,t){let n=window.okDesktop?.shell?.openExternal;n&&(e.preventDefault(),n(t))}var Lt=[`Enter`,` `],Rt=[`ArrowDown`,`PageUp`,`Home`],zt=[`ArrowUp`,`PageDown`,`End`],Bt=[...Rt,...zt],Vt={ltr:[...Lt,`ArrowRight`],rtl:[...Lt,`ArrowLeft`]},Ht={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},Ut=`Menu`,[Wt,Gt,Kt]=$e(Ut),[qt,Jt]=Ae(Ut,[Kt,te,rt]),Yt=te(),Xt=rt(),[Zt,Qt]=qt(Ut),[$t,en]=qt(Ut),tn=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Yt(t),[c,l]=Y.useState(null),u=Y.useRef(!1),d=ke(a),f=et(i);return Y.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,J.jsx)(N,{...s,children:(0,J.jsx)(Zt,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,J.jsx)($t,{scope:t,onClose:Y.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};tn.displayName=Ut;var nn=`MenuAnchor`,rn=Y.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Yt(n);return(0,J.jsx)(L,{...i,...r,ref:t})});rn.displayName=nn;var an=`MenuPortal`,[on,sn]=qt(an,{forceMount:void 0}),cn=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Qt(an,t);return(0,J.jsx)(on,{scope:t,forceMount:n,children:(0,J.jsx)(Se,{present:n||a.open,children:(0,J.jsx)(Te,{asChild:!0,container:i,children:r})})})};cn.displayName=an;var ln=`MenuContent`,[un,dn]=qt(ln),fn=Y.forwardRef((e,t)=>{let n=sn(ln,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Qt(ln,e.__scopeMenu),o=en(ln,e.__scopeMenu);return(0,J.jsx)(Wt.Provider,{scope:e.__scopeMenu,children:(0,J.jsx)(Se,{present:r||a.open,children:(0,J.jsx)(Wt.Slot,{scope:e.__scopeMenu,children:o.modal?(0,J.jsx)(pn,{...i,ref:t}):(0,J.jsx)(mn,{...i,ref:t})})})})}),pn=Y.forwardRef((e,t)=>{let n=Qt(ln,e.__scopeMenu),r=Y.useRef(null),i=xe(t,r);return Y.useEffect(()=>{let e=r.current;if(e)return Ue(e)},[]),(0,J.jsx)(gn,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ce(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),mn=Y.forwardRef((e,t)=>{let n=Qt(ln,e.__scopeMenu);return(0,J.jsx)(gn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),hn=ye(`MenuContent.ScrollLock`),gn=Y.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=Qt(ln,n),_=en(ln,n),v=Yt(n),y=Xt(n),b=Gt(n),[x,S]=Y.useState(null),C=Y.useRef(null),w=xe(t,C,g.onContentChange),T=Y.useRef(0),E=Y.useRef(``),D=Y.useRef(0),O=Y.useRef(null),k=Y.useRef(`right`),A=Y.useRef(0),j=m?Ve:Y.Fragment,M=m?{as:hn,allowPinchZoom:!0}:void 0,N=e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=er(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};Y.useEffect(()=>()=>window.clearTimeout(T.current),[]),Be();let P=Y.useCallback(e=>k.current===O.current?.side&&nr(e,O.current?.area),[]);return(0,J.jsx)(un,{scope:n,searchRef:E,onItemEnter:Y.useCallback(e=>{P(e)&&e.preventDefault()},[P]),onItemLeave:Y.useCallback(e=>{P(e)||(C.current?.focus(),S(null))},[P]),onTriggerLeave:Y.useCallback(e=>{P(e)&&e.preventDefault()},[P]),pointerGraceTimerRef:D,onPointerGraceIntentChange:Y.useCallback(e=>{O.current=e},[]),children:(0,J.jsx)(j,{...M,children:(0,J.jsx)(Ie,{asChild:!0,trapped:i,onMountAutoFocus:Ce(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,J.jsx)(be,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,J.jsx)(nt,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:Ce(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,J.jsx)(_e,{role:`menu`,"aria-orientation":`vertical`,"data-state":Yn(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:Ce(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&N(e.key));let i=C.current;if(e.target!==i||!Bt.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);zt.includes(e.key)&&a.reverse(),Qn(a)}),onBlur:Ce(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:Ce(e.onPointerMove,rr(e=>{let t=e.target,n=A.current!==e.clientX;e.currentTarget.contains(t)&&n&&(k.current=e.clientX>A.current?`right`:`left`,A.current=e.clientX)}))})})})})})})});fn.displayName=ln;var _n=`MenuGroup`,vn=Y.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,J.jsx)(De.div,{role:`group`,...r,ref:t})});vn.displayName=_n;var yn=`MenuLabel`,bn=Y.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,J.jsx)(De.div,{...r,ref:t})});bn.displayName=yn;var xn=`MenuItem`,Sn=`menu.itemSelect`,Cn=Y.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=Y.useRef(null),o=en(xn,e.__scopeMenu),s=dn(xn,e.__scopeMenu),c=xe(t,a),l=Y.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Sn,{bubbles:!0,cancelable:!0});e.addEventListener(Sn,e=>r?.(e),{once:!0}),we(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,J.jsx)(wn,{...i,ref:c,disabled:n,onClick:Ce(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:Ce(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:Ce(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||Lt.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Cn.displayName=xn;var wn=Y.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=dn(xn,n),s=Xt(n),c=Y.useRef(null),l=xe(t,c),[u,d]=Y.useState(!1),[f,p]=Y.useState(``);return Y.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,J.jsx)(Wt.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,J.jsx)(it,{asChild:!0,...s,focusable:!r,children:(0,J.jsx)(De.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:Ce(e.onPointerMove,rr(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ce(e.onPointerLeave,rr(e=>o.onItemLeave(e))),onFocus:Ce(e.onFocus,()=>d(!0)),onBlur:Ce(e.onBlur,()=>d(!1))})})})}),Tn=`MenuCheckboxItem`,En=Y.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,J.jsx)(Pn,{scope:e.__scopeMenu,checked:n,children:(0,J.jsx)(Cn,{role:`menuitemcheckbox`,"aria-checked":Xn(n)?`mixed`:n,...i,ref:t,"data-state":Zn(n),onSelect:Ce(i.onSelect,()=>r?.(Xn(n)?!0:!n),{checkForDefaultPrevented:!1})})})});En.displayName=Tn;var Dn=`MenuRadioGroup`,[On,kn]=qt(Dn,{value:void 0,onValueChange:()=>{}}),An=Y.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=ke(r);return(0,J.jsx)(On,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,J.jsx)(vn,{...i,ref:t})})});An.displayName=Dn;var jn=`MenuRadioItem`,Mn=Y.forwardRef((e,t)=>{let{value:n,...r}=e,i=kn(jn,e.__scopeMenu),a=n===i.value;return(0,J.jsx)(Pn,{scope:e.__scopeMenu,checked:a,children:(0,J.jsx)(Cn,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Zn(a),onSelect:Ce(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Mn.displayName=jn;var Nn=`MenuItemIndicator`,[Pn,Fn]=qt(Nn,{checked:!1}),In=Y.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Fn(Nn,n);return(0,J.jsx)(Se,{present:r||Xn(a.checked)||a.checked===!0,children:(0,J.jsx)(De.span,{...i,ref:t,"data-state":Zn(a.checked)})})});In.displayName=Nn;var Ln=`MenuSeparator`,Rn=Y.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,J.jsx)(De.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Rn.displayName=Ln;var zn=`MenuArrow`,Bn=Y.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Yt(n);return(0,J.jsx)(W,{...i,...r,ref:t})});Bn.displayName=zn;var Vn=`MenuSub`,[Hn,Un]=qt(Vn),Wn=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=Qt(Vn,t),o=Yt(t),[s,c]=Y.useState(null),[l,u]=Y.useState(null),d=ke(i);return Y.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,J.jsx)(N,{...o,children:(0,J.jsx)(Zt,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,J.jsx)(Hn,{scope:t,contentId:je(),triggerId:je(),trigger:s,onTriggerChange:c,children:n})})})};Wn.displayName=Vn;var Gn=`MenuSubTrigger`,Kn=Y.forwardRef((e,t)=>{let n=Qt(Gn,e.__scopeMenu),r=en(Gn,e.__scopeMenu),i=Un(Gn,e.__scopeMenu),a=dn(Gn,e.__scopeMenu),o=Y.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=Y.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return Y.useEffect(()=>u,[u]),Y.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,J.jsx)(rn,{asChild:!0,...l,children:(0,J.jsx)(wn,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":Yn(n.open),...e,ref:Pe(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ce(e.onPointerMove,rr(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:Ce(e.onPointerLeave,rr(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Ce(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||Vt[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Kn.displayName=Gn;var qn=`MenuSubContent`,Jn=Y.forwardRef((e,t)=>{let n=sn(ln,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Qt(ln,e.__scopeMenu),o=en(ln,e.__scopeMenu),s=Un(qn,e.__scopeMenu),c=Y.useRef(null),l=xe(t,c);return(0,J.jsx)(Wt.Provider,{scope:e.__scopeMenu,children:(0,J.jsx)(Se,{present:r||a.open,children:(0,J.jsx)(Wt.Slot,{scope:e.__scopeMenu,children:(0,J.jsx)(gn,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:`start`,side:o.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Ce(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Ce(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:Ce(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Ht[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});Jn.displayName=qn;function Yn(e){return e?`open`:`closed`}function Xn(e){return e===`indeterminate`}function Zn(e){return Xn(e)?`indeterminate`:e?`checked`:`unchecked`}function Qn(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function $n(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function er(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=$n(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function tr(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function nr(e,t){return t?tr({x:e.clientX,y:e.clientY},t):!1}function rr(e){return t=>t.pointerType===`mouse`?e(t):void 0}var ir=tn,ar=rn,or=cn,sr=fn,cr=vn,lr=bn,ur=Cn,dr=En,fr=An,pr=Mn,mr=In,hr=Rn,gr=Bn,_r=Wn,vr=Kn,yr=Jn,br=`DropdownMenu`,[xr,Sr]=Ae(br,[Jt]),Cr=Jt(),[wr,Tr]=xr(br),Er=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Cr(t),l=Y.useRef(null),[u,d]=Ee({prop:i,defaultProp:a??!1,onChange:o,caller:br});return(0,J.jsx)(wr,{scope:t,triggerId:je(),triggerRef:l,contentId:je(),open:u,onOpenChange:d,onOpenToggle:Y.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,J.jsx)(ir,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};Er.displayName=br;var Dr=`DropdownMenuTrigger`,Or=Y.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Tr(Dr,n),o=Cr(n);return(0,J.jsx)(ar,{asChild:!0,...o,children:(0,J.jsx)(De.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:Pe(t,a.triggerRef),onPointerDown:Ce(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:Ce(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Or.displayName=Dr;var kr=`DropdownMenuPortal`,Ar=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Cr(t);return(0,J.jsx)(or,{...r,...n})};Ar.displayName=kr;var jr=`DropdownMenuContent`,Mr=Y.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Tr(jr,n),a=Cr(n),o=Y.useRef(!1);return(0,J.jsx)(sr,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Ce(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:Ce(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Mr.displayName=jr;var Nr=`DropdownMenuGroup`,Pr=Y.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cr(n);return(0,J.jsx)(cr,{...i,...r,ref:t})});Pr.displayName=Nr;var Fr=`DropdownMenuLabel`,Ir=Y.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cr(n);return(0,J.jsx)(lr,{...i,...r,ref:t})});Ir.displayName=Fr;var Lr=`DropdownMenuItem`,Rr=Y.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cr(n);return(0,J.jsx)(ur,{...i,...r,ref:t})});Rr.displayName=Lr;var zr=`DropdownMenuCheckboxItem`,Br=Y.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cr(n);return(0,J.jsx)(dr,{...i,...r,ref:t})});Br.displayName=zr;var Vr=`DropdownMenuRadioGroup`,Hr=Y.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cr(n);return(0,J.jsx)(fr,{...i,...r,ref:t})});Hr.displayName=Vr;var Ur=`DropdownMenuRadioItem`,Wr=Y.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cr(n);return(0,J.jsx)(pr,{...i,...r,ref:t})});Wr.displayName=Ur;var Gr=`DropdownMenuItemIndicator`,Kr=Y.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cr(n);return(0,J.jsx)(mr,{...i,...r,ref:t})});Kr.displayName=Gr;var qr=`DropdownMenuSeparator`,Jr=Y.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cr(n);return(0,J.jsx)(hr,{...i,...r,ref:t})});Jr.displayName=qr;var Yr=`DropdownMenuArrow`,Xr=Y.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cr(n);return(0,J.jsx)(gr,{...i,...r,ref:t})});Xr.displayName=Yr;var Zr=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=Cr(t),[s,c]=Ee({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return(0,J.jsx)(_r,{...o,open:s,onOpenChange:c,children:n})},Qr=`DropdownMenuSubTrigger`,$r=Y.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cr(n);return(0,J.jsx)(vr,{...i,...r,ref:t})});$r.displayName=Qr;var ei=`DropdownMenuSubContent`,ti=Y.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cr(n);return(0,J.jsx)(yr,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});ti.displayName=ei;var ni=Er,ri=Or,ii=Ar,ai=Mr,oi=Ir,si=Rr,ci=Br,li=Hr,ui=Wr,di=Kr,fi=Jr,pi=Zr,mi=$r,hi=ti,gi=`Separator`,_i=`horizontal`,vi=[`horizontal`,`vertical`],yi=Y.forwardRef((e,t)=>{let{decorative:n,orientation:r=_i,...i}=e,a=bi(r)?r:_i,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,J.jsx)(De.div,{"data-orientation":a,...o,...i,ref:t})});yi.displayName=gi;function bi(e){return vi.includes(e)}var xi=yi;async function Si(e){try{await navigator.clipboard.writeText(e)}catch{}}var Ci=120*1e3;function wi(e){let t=(0,X.c)(25),{onSuccess:n,transport:i}=e,{_:o}=r(),[s,c]=(0,Y.useState)(null),[l,u]=(0,Y.useState)(`https://github.com/login/device`),[d,f]=(0,Y.useState)(!1),[p,m]=(0,Y.useState)(null),[h,g]=(0,Y.useState)(Ci),_=(0,Y.useRef)(null),v=(0,Y.useRef)(null),y;t[0]!==o||t[1]!==n||t[2]!==i?(y=async function(){m(null);try{let e=i.start();_.current=e.cancel;let t=e.events[Symbol.asyncIterator](),r=!1,a=await t.next();for(;!a.done;){let e=a.value;if(e.type===`verification`)c(e.user_code),u(e.verification_uri),g(e.expires_in*1e3),Si(e.user_code).then(()=>{f(!0),setTimeout(()=>f(!1),2e3)});else if(e.type===`complete`){r=!0,n({login:e.login,name:e.name,email:e.email,avatarUrl:e.avatarUrl});break}else if(e.type===`error`){r=!0,m(e.message);break}a=await t.next()}r||m(o({id:`DskIkK`}))}catch(e){let t=e;t instanceof Error&&t.name!==`AbortError`&&m(o({id:`Q5fqMz`}))}},t[0]=o,t[1]=n,t[2]=i,t[3]=y):y=t[3];let b=y,x;t[4]===b?x=t[5]:(x=()=>{let e=!1;return queueMicrotask(()=>{e||b()}),()=>{e=!0,_.current?.(),_.current=null,v.current&&clearInterval(v.current)}},t[4]=b,t[5]=x);let S;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(S=[],t[6]=S):S=t[6],(0,Y.useEffect)(x,S);let C,w;t[7]!==o||t[8]!==s?(C=()=>{if(!s)return;let e=Date.now();return v.current=setInterval(()=>{let t=Ci-(Date.now()-e);t<=0?(g(0),v.current&&clearInterval(v.current),m(o({id:`ve8vEM`}))):g(t)},1e3),()=>{v.current&&clearInterval(v.current)}},w=[s,o],t[7]=o,t[8]=s,t[9]=C,t[10]=w):(C=t[9],w=t[10]),(0,Y.useEffect)(C,w);let T=Math.floor(h/6e4),E=Math.floor(h%6e4/1e3),D;t[11]===E?D=t[12]:(D=E.toString().padStart(2,`0`),t[11]=E,t[12]=D);let O=`${T}:${D}`,k;t[13]!==o||t[14]!==d||t[15]!==p||t[16]!==O||t[17]!==s||t[18]!==l?(k=s?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,J.jsx)(a,{id:`eVPynQ`,values:{verificationUri:l},components:{0:(0,J.jsx)(`a`,{href:l,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>It(e,l),onAuxClick:e=>It(e,l),className:`inline-flex items-center gap-0.5 text-foreground hover:text-primary hover:underline`}),1:(0,J.jsx)(`span`,{}),2:(0,J.jsx)(Fe,{className:`inline size-3.5`,"aria-hidden":!0})}})}),(0,J.jsxs)(q,{type:`button`,variant:`outline`,"aria-label":o({id:`nCzR-G`,values:{userCode:s}}),onClick:()=>void Si(s).then(()=>{f(!0),setTimeout(()=>f(!1),2e3)}),className:`relative h-auto w-full justify-center rounded-md bg-muted px-12 py-3 hover:bg-muted/80`,children:[(0,J.jsx)(`code`,{className:`font-mono text-2xl font-bold tracking-widest`,children:s}),(0,J.jsx)(`span`,{className:`absolute right-3 text-muted-foreground`,"aria-hidden":`true`,children:d?(0,J.jsx)(Ye,{className:`size-4`}):(0,J.jsx)(A,{className:`size-4`})})]}),(0,J.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,children:d?(0,J.jsx)(a,{id:`80c4-P`}):null}),(0,J.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,J.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,J.jsx)(`span`,{className:`size-1.5 rounded-full bg-amber-500 animate-pulse`}),(0,J.jsx)(a,{id:`5y_9lO`})]}),(0,J.jsx)(`span`,{children:(0,J.jsx)(a,{id:`gYz2ep`,values:{timeLabel:O}})})]})]}):(0,J.jsx)(`div`,{className:`flex items-center justify-center py-6 text-sm text-muted-foreground`,children:p?null:(0,J.jsx)(a,{id:`aWlJai`})}),t[13]=o,t[14]=d,t[15]=p,t[16]=O,t[17]=s,t[18]=l,t[19]=k):k=t[19];let j;t[20]===p?j=t[21]:(j=p&&(0,J.jsx)(`p`,{className:`text-1sm text-destructive`,children:p}),t[20]=p,t[21]=j);let M;return t[22]!==k||t[23]!==j?(M=(0,J.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[k,j]}),t[22]=k,t[23]=j,t[24]=M):M=t[24],M}function Ti(e){let t=(0,X.c)(30),{login:n,name:i,onNameChange:o,email:s,onEmailChange:c}=e,{_:l}=r(),u;t[0]===n?u=t[1]:(u=(0,J.jsx)(`p`,{className:`text-sm font-medium`,children:(0,J.jsx)(a,{id:`E_tNGD`,values:{login:n}})}),t[0]=n,t[1]=u);let d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,J.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,J.jsx)(a,{id:`gp3I7-`})}),t[2]=d):d=t[2];let f;t[3]===l?f=t[4]:(f=l({id:`6YtxFj`}),t[3]=l,t[4]=f);let p;t[5]!==l||t[6]!==n?(p=l({id:`J2Mv98`,values:{login:n}}),t[5]=l,t[6]=n,t[7]=p):p=t[7];let m;t[8]===o?m=t[9]:(m=e=>o(e.target.value),t[8]=o,t[9]=m);let h;t[10]!==i||t[11]!==f||t[12]!==p||t[13]!==m?(h=(0,J.jsx)(Qe,{"aria-label":f,placeholder:p,value:i,onChange:m}),t[10]=i,t[11]=f,t[12]=p,t[13]=m,t[14]=h):h=t[14];let g;t[15]===l?g=t[16]:(g=l({id:`O3oNi5`}),t[15]=l,t[16]=g);let _;t[17]===l?_=t[18]:(_=l({id:`O3oNi5`}),t[17]=l,t[18]=_);let v;t[19]===c?v=t[20]:(v=e=>c(e.target.value),t[19]=c,t[20]=v);let y;t[21]!==s||t[22]!==g||t[23]!==_||t[24]!==v?(y=(0,J.jsx)(Qe,{type:`email`,"aria-label":g,placeholder:_,value:s,onChange:v}),t[21]=s,t[22]=g,t[23]=_,t[24]=v,t[25]=y):y=t[25];let b;return t[26]!==u||t[27]!==y||t[28]!==h?(b=(0,J.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[u,d,h,y]}),t[26]=u,t[27]=y,t[28]=h,t[29]=b):b=t[29],b}function Ei(e){let t=(0,X.c)(44),{open:n,onOpenChange:i,onSuccess:o,identityPrompt:s,reauth:c,transport:l}=e,{_:u}=r(),d;t[0]===l?d=t[1]:(d=l??Pt(),t[0]=l,t[1]=d);let f=d,[p,m]=(0,Y.useState)(`auth`),[h,g]=(0,Y.useState)(null),[_,v]=(0,Y.useState)(``),[y,b]=(0,Y.useState)(``),x,S;t[2]===n?(x=t[3],S=t[4]):(x=()=>{n&&(m(`auth`),g(null),v(``),b(``))},S=[n],t[2]=n,t[3]=x,t[4]=S),(0,Y.useEffect)(x,S);let C;t[5]!==u||t[6]!==s||t[7]!==i||t[8]!==o?(C=function(e){if(g(e),s&&(!e.name||!e.email))m(`identity`);else{m(`done`),o?.(e),i(!1);let t=e.login;Xe.success(u({id:`E_tNGD`,values:{login:t}}))}},t[5]=u,t[6]=s,t[7]=i,t[8]=o,t[9]=C):C=t[9];let w=C,T;t[10]!==u||t[11]!==h||t[12]!==i||t[13]!==o?(T=function(e,t){fetch(`/api/local-op/auth/set-identity`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:e,email:t})}).catch(Di);let n={...h??{login:``},name:e,email:t};m(`done`),o?.(n),i(!1);let r=n.login;Xe.success(u({id:`E_tNGD`,values:{login:r}}))},t[10]=u,t[11]=h,t[12]=i,t[13]=o,t[14]=T):T=t[14];let E=T,D;t[15]!==u||t[16]!==h||t[17]!==i||t[18]!==o?(D=function(){if(!h)return;m(`done`),o?.(h),i(!1);let e=h.login;Xe.success(u({id:`E_tNGD`,values:{login:e}}))},t[15]=u,t[16]=h,t[17]=i,t[18]=o,t[19]=D):D=t[19];let O=D,k;t[20]===i?k=t[21]:(k=function(){i(!1)},t[20]=i,t[21]=k);let A=k,j;t[22]===c?j=t[23]:(j=(0,J.jsx)(qe,{children:(0,J.jsx)(ze,{children:c?(0,J.jsx)(a,{id:`X8kjQX`}):(0,J.jsx)(a,{id:`3jod3l`})})}),t[22]=c,t[23]=j);let M;t[24]!==w||t[25]!==A||t[26]!==f||t[27]!==p?(M=p===`auth`&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(We,{children:(0,J.jsx)(wi,{onSuccess:w,transport:f})}),(0,J.jsx)(Ge,{children:(0,J.jsx)(q,{variant:`outline`,className:`font-mono uppercase`,onClick:A,children:(0,J.jsx)(a,{id:`dEgA5A`})})})]}),t[24]=w,t[25]=A,t[26]=f,t[27]=p,t[28]=M):M=t[28];let N;t[29]!==h||t[30]!==E||t[31]!==O||t[32]!==y||t[33]!==_||t[34]!==p?(N=p===`identity`&&h&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(We,{children:(0,J.jsx)(Ti,{login:h.login,name:_,onNameChange:v,email:y,onEmailChange:b})}),(0,J.jsxs)(Ge,{children:[(0,J.jsx)(q,{variant:`ghost`,onClick:O,children:(0,J.jsx)(a,{id:`6Uau97`})}),(0,J.jsx)(q,{onClick:()=>E(_.trim(),y.trim()),disabled:!_.trim()||!y.trim(),children:(0,J.jsx)(a,{id:`tfDRzk`})})]})]}),t[29]=h,t[30]=E,t[31]=O,t[32]=y,t[33]=_,t[34]=p,t[35]=N):N=t[35];let P;t[36]!==N||t[37]!==j||t[38]!==M?(P=(0,J.jsxs)(He,{className:`sm:max-w-md`,children:[j,M,N]}),t[36]=N,t[37]=j,t[38]=M,t[39]=P):P=t[39];let F;return t[40]!==i||t[41]!==n||t[42]!==P?(F=(0,J.jsx)(Je,{open:n,onOpenChange:i,children:P}),t[40]=i,t[41]=n,t[42]=P,t[43]=F):F=t[43],F}function Di(){}var Oi=null;function ki(){return Oi}function Ai(e){Oi=e}function ji(e){let t=(0,X.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=K(`animate-pulse rounded-md bg-muted`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(`div`,{"data-slot":`skeleton`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Mi(e){let t=(0,X.c)(12),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={status:`idle`},t[0]=n):n=t[0];let[r,i]=(0,Y.useState)(n),[a,o]=(0,Y.useState)(0),s,c;t[1]===e?(s=t[2],c=t[3]):(s=()=>{if(e!==null)return me(()=>{o(Ii)})},c=[e],t[1]=e,t[2]=s,t[3]=c),(0,Y.useEffect)(s,c);let l;t[4]===e?l=t[5]:(l=()=>{if(e===null){i({status:`idle`});return}let t=!1;i({status:`loading`});let n=e?`?path=${encodeURIComponent(e)}`:``;return fetch(`/api/folder-config${n}`).then(Pi).then(e=>{if(!t){if(!e||typeof e!=`object`||!e.folder){i({status:`error`,message:`Server returned an incomplete folder response.`});return}i({status:`ready`,data:{folder:e.folder,frontmatterLocal:e.frontmatter_local??null,frontmatterSources:e.frontmatter_sources??{},schemaDeclarations:e.schema_declarations??{},schemaSources:e.schema_sources??{},schemaLocal:e.schema_local??null}})}}).catch(e=>{t||i({status:`error`,message:e instanceof Error?e.message:String(e)})}),()=>{t=!0}},t[4]=e,t[5]=l);let u;t[6]!==e||t[7]!==a?(u=[e,a],t[6]=e,t[7]=a,t[8]=u):u=t[8],(0,Y.useEffect)(l,u);let d;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>o(Ni),t[9]=d):d=t[9];let f;return t[10]===r?f=t[11]:(f={state:r,refresh:d},t[10]=r,t[11]=f),f}function Ni(e){return e+1}async function Pi(e){if(!e.ok){let t=await e.json().catch(Fi);throw Error(R(t)??`HTTP ${e.status}`)}return e.json()}function Fi(){return null}function Ii(e){return e+1}function Li(e,t){let n=(0,X.c)(5),r;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={status:`idle`},n[0]=r):r=n[0];let[i,a]=(0,Y.useState)(r),o,s;return n[1]!==e||n[2]!==t?(o=()=>{if(!t||e===null){a({status:`idle`});return}let n=!1;a({status:`loading`});let r=`?folder=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`;return fetch(`/api/template${r}`).then(Ri).then(e=>{if(!n){if(!e||typeof e!=`object`||!e.template){a({status:`error`,message:`Server returned an incomplete template response.`});return}a({status:`ready`,data:e.template})}}).catch(e=>{n||a({status:`error`,message:e instanceof Error?e.message:String(e)})}),()=>{n=!0}},s=[e,t],n[1]=e,n[2]=t,n[3]=o,n[4]=s):(o=n[3],s=n[4]),(0,Y.useEffect)(o,s),i}async function Ri(e){if(!e.ok){let t=await e.json().catch(zi);throw Error(R(t)??`HTTP ${e.status}`)}return e.json()}function zi(){return null}var Bi={general:{id:`Weq9zb`},workspace:{id:`pmUArF`},search:{id:`A1taO8`},wysiwyg:{id:`ur2XSb`},source:{id:`tiWX6q`},navigation:{id:`LXfNU-`}},Vi=Object.keys(Bi),Hi=[{id:`command-palette`,category:`general`,title:{id:`ZjtgI-`},description:{id:`PZt1uN`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0,allowExtraModifiers:!0}}],conflicts:[{source:`Chrome`,note:{id:`Xmbh7Q`}}]},{id:`settings`,category:`general`,title:{id:`Tz0i8g`},description:{id:`6m_7We`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ ,`,windowsLinux:`Ctrl ,`,match:{key:`,`,anyMod:!0}}],conflicts:[{source:`Chrome`,note:{id:`GqkSSi`}}]},{id:`new-item`,category:`general`,title:{id:`HdkSiO`},description:{id:`KkEAud`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ N`,windowsLinux:`Ctrl N`,match:{key:`n`,mod:!0}},{mac:`⌥⌘ N`,windowsLinux:`Ctrl Alt N`,match:{key:`n`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}],conflicts:[{source:`Chrome`,note:{id:`QFgeUB`}}]},{id:`toggle-files-sidebar`,category:`general`,title:{id:`rtdR4v`},description:{id:`EbZT7P`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ S`,windowsLinux:`Ctrl Alt S`,match:{code:`KeyS`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-document-panel`,category:`general`,title:{id:`lkYioO`},description:{id:`It9ARY`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ B`,windowsLinux:`Ctrl Alt B`,match:{code:`KeyB`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}],conflicts:[{source:`Chrome`,note:{id:`pFb1SE`}}]},{id:`open-folder`,category:`workspace`,title:{id:`PVUn_c`},description:{id:`VYd_YA`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ O`,windowsLinux:`Ctrl O`}],conflicts:[{source:`Chrome`,note:{id:`ph-JfW`}}]},{id:`switch-project`,category:`workspace`,title:{id:`xaDWAI`},description:{id:`oS1YpJ`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ P`,windowsLinux:`Ctrl Shift P`}]},{id:`file-tree-duplicate`,category:`workspace`,title:{id:`ot5BRK`},description:{id:`mxY24F`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}],conflicts:[{source:`Chrome`,note:{id:`jol4Ow`}}]},{id:`file-tree-select-all`,category:`workspace`,title:{id:`1d1F11`},description:{id:`4v2Yyz`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}],conflicts:[{source:`Chrome`,note:{id:`u0iUdo`}}]},{id:`find`,category:`search`,title:{id:`KujtjC`},description:{id:`8OGgNM`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`,match:{key:`f`,mod:!0,allowShiftKey:!0}}],conflicts:[{source:`Chrome`,note:{id:`ytlX5Z`}}]},{id:`replace`,category:`search`,title:{id:`fqSfXY`},description:{id:`wT4iQr`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ F`,windowsLinux:`Ctrl H`,match:{mac:{key:`f`,mod:!0,altKey:!0},windowsLinux:{key:`h`,mod:!0}}}],conflicts:[{source:`Chrome`,note:{id:`GrJ37h`}}]},{id:`find-next`,category:`search`,title:{id:`v7lbnC`},description:{id:`PR9FSv`},scope:{id:`EqtBXb`},bindings:[{mac:`⌘ G`,windowsLinux:`Ctrl G`,match:{key:`g`,mod:!0}},{mac:`F3`,windowsLinux:`F3`,match:{key:`F3`}}],conflicts:[{source:`Chrome`,note:{id:`RIJLBf`}}]},{id:`find-previous`,category:`search`,title:{id:`PB4upl`},description:{id:`PgzIpb`},scope:{id:`EqtBXb`},bindings:[{mac:`⇧⌘ G`,windowsLinux:`Ctrl Shift G`,match:{key:`g`,mod:!0,shiftKey:!0}},{mac:`Shift F3`,windowsLinux:`Shift F3`,match:{key:`F3`,shiftKey:!0}}],conflicts:[{source:`Chrome`,note:{id:`RIJLBf`}}]},{id:`find-field-navigation`,category:`search`,title:{id:`yMgL_E`},description:{id:`5ALjdr`},scope:{id:`BgV29F`},bindings:[{mac:`Enter / Shift Enter`,windowsLinux:`Enter / Shift Enter`}]},{id:`replace-current-from-field`,category:`search`,title:{id:`LDuM35`},description:{id:`EZVxVz`},scope:{id:`rZVMkf`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`format-bold`,category:`wysiwyg`,title:{id:`KmydK6`},description:{id:`fbdLmk`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ B`,windowsLinux:`Ctrl B`}]},{id:`format-italic`,category:`wysiwyg`,title:{id:`pzutoc`},description:{id:`TLIO3j`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ I`,windowsLinux:`Ctrl I`}]},{id:`format-underline`,category:`wysiwyg`,title:{id:`YyXtnN`},description:{id:`Okd2Xv`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ U`,windowsLinux:`Ctrl U`}]},{id:`format-strike`,category:`wysiwyg`,title:{id:`WhOsNE`},description:{id:`HCn0Ay`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ X`,windowsLinux:`Ctrl Shift X`}]},{id:`format-inline-code`,category:`wysiwyg`,title:{id:`OX2Neh`},description:{id:`mo22UP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ E`,windowsLinux:`Ctrl E`}],conflicts:[{source:`Chrome`,note:{id:`N9hwhU`}}]},{id:`format-highlight`,category:`wysiwyg`,title:{id:`gtEbeW`},description:{id:`Eji13z`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ H`,windowsLinux:`Ctrl Shift H`}],conflicts:[{source:`Chrome`,note:{id:`Qffit1`}}]},{id:`history-undo-redo`,category:`wysiwyg`,title:{id:`i9OyGp`},description:{id:`lbkOif`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z / ⌘ Y`,windowsLinux:`Ctrl Shift Z / Ctrl Y`}],conflicts:[{source:`TipTap`,note:{id:`zH-69K`}}]},{id:`heading-paragraph`,category:`wysiwyg`,title:{id:`bkQRMh`},description:{id:`rgPqOw`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 0`,windowsLinux:`Ctrl Alt 0`}]},{id:`heading-levels`,category:`wysiwyg`,title:{id:`q_z77Z`},description:{id:`8Jm2EP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 1-6`,windowsLinux:`Ctrl Alt 1-6`}]},{id:`list-bullet`,category:`wysiwyg`,title:{id:`ijLc3m`},description:{id:`By-7Pn`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 8`,windowsLinux:`Ctrl Shift 8`}]},{id:`list-ordered`,category:`wysiwyg`,title:{id:`iSQTsg`},description:{id:`ou1hFW`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 7`,windowsLinux:`Ctrl Shift 7`}]},{id:`list-task`,category:`wysiwyg`,title:{id:`E1_c72`},description:{id:`-slrNR`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 9`,windowsLinux:`Ctrl Shift 9`}]},{id:`code-block`,category:`wysiwyg`,title:{id:`4A3Yzu`},description:{id:`pTPqMK`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ C`,windowsLinux:`Ctrl Alt C`}]},{id:`hard-break`,category:`wysiwyg`,title:{id:`-3ois8`},description:{id:`vDXqVv`},scope:{id:`ur2XSb`},bindings:[{mac:`Shift Enter`,windowsLinux:`Shift Enter`},{mac:`⌘ Enter`,windowsLinux:`Ctrl Enter`}],conflicts:[{source:`TipTap`,note:{id:`IfH0sD`}}]},{id:`move-block`,category:`wysiwyg`,title:{id:`f1XQyZ`},description:{id:`zQBg2C`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ ↑`,windowsLinux:`Ctrl Shift ↑`},{mac:`⇧⌘ ↓`,windowsLinux:`Ctrl Shift ↓`}]},{id:`list-indent`,category:`wysiwyg`,title:{id:`G0YZ-I`},description:{id:`5GKMSz`},scope:{id:`ynIa4S`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}],conflicts:[{source:`TipTap`,note:{id:`nAtGcg`}}]},{id:`list-split-item`,category:`wysiwyg`,title:{id:`neRy3o`},description:{id:`NpC29w`},scope:{id:`ynIa4S`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}],conflicts:[{source:`TipTap`,note:{id:`D2Nu_J`}}]},{id:`table-cell-navigation`,category:`wysiwyg`,title:{id:`K8-WWn`},description:{id:`4NC2Ym`},scope:{id:`l1aQKz`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`table-delete-selection`,category:`wysiwyg`,title:{id:`881Uwh`},description:{id:`YEP3X2`},scope:{id:`99eR72`},bindings:[{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌘ Backspace / ⌘ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`}],conflicts:[{source:`TipTap`,note:{id:`EYiWQv`}}]},{id:`delete-atom`,category:`wysiwyg`,title:{id:`636K3K`},description:{id:`oXKEsy`},scope:{id:`ur2XSb`},bindings:[{mac:`Backspace`,windowsLinux:`Backspace`},{mac:`Delete`,windowsLinux:`Delete`}]},{id:`slash-menu`,category:`navigation`,title:{id:`shNd9t`},description:{id:`8PmoQF`},scope:{id:`ur2XSb`},bindings:[{mac:`/`,windowsLinux:`/`}]},{id:`suggestion-navigation`,category:`navigation`,title:{id:`riqekz`},description:{id:`OiHJdA`},scope:{id:`y5FUYi`},bindings:[{mac:`↑ / ↓`,windowsLinux:`↑ / ↓`},{mac:`Enter / Tab`,windowsLinux:`Enter / Tab`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`component-navigation`,category:`navigation`,title:{id:`rwrPbS`},description:{id:`0s8-e8`},scope:{id:`ur2XSb`},bindings:[{mac:`↑ / ↓ / ← / →`,windowsLinux:`↑ / ↓ / ← / →`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-indent`,category:`source`,title:{id:`fwhX-N`},description:{id:`skf5Ix`},scope:{id:`tiWX6q`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`source-navigation`,category:`source`,title:{id:`qSKu2v`},description:{id:`gITz7o`},scope:{id:`tiWX6q`},bindings:[{mac:`Arrow keys / Option Arrow / Command Arrow`,windowsLinux:`Arrow keys / Ctrl Arrow / Home / End`},{mac:`Page Up / Page Down`,windowsLinux:`Page Up / Page Down`},{mac:`Shift with movement keys`,windowsLinux:`Shift with movement keys`}]},{id:`source-editing`,category:`source`,title:{id:`pFagOn`},description:{id:`MGb89P`},scope:{id:`tiWX6q`},bindings:[{mac:`Enter / Shift Enter / ⌘ Enter`,windowsLinux:`Enter / Shift Enter / Ctrl Enter`},{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌥ Backspace / ⌥ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`},{mac:`⌥ ↑ / ⌥ ↓`,windowsLinux:`Alt ↑ / Alt ↓`},{mac:`⇧⌥ ↑ / ⇧⌥ ↓`,windowsLinux:`Shift Alt ↑ / Shift Alt ↓`},{mac:`⇧⌘ K`,windowsLinux:`Ctrl Shift K`}]},{id:`source-history`,category:`source`,title:{id:`4Sxexw`},description:{id:`r2huLx`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z`,windowsLinux:`Ctrl Y / Ctrl Shift Z`},{mac:`⌘ U / ⇧⌘ U`,windowsLinux:`Ctrl U / Alt U`}]},{id:`source-select-all`,category:`source`,title:{id:`a-cKXz`},description:{id:`UTNVyS`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}],conflicts:[{source:`Chrome`,note:{id:`6NTJqD`}}]},{id:`source-multi-cursor`,category:`source`,title:{id:`mg0YGL`},description:{id:`lWNpNB`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ ↑ / ⌥⌘ ↓`,windowsLinux:`Ctrl Alt ↑ / Ctrl Alt ↓`},{mac:`⇧⌘ L`,windowsLinux:`Ctrl Shift L`}]},{id:`source-search`,category:`source`,title:{id:`7OhaRy`},description:{id:`mwMF9u`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`}],conflicts:[{source:`Chrome`,note:{id:`jLz9i6`}}]},{id:`source-toggle-comment`,category:`source`,title:{id:`RfaEio`},description:{id:`MrwYIK`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ /`,windowsLinux:`Ctrl /`},{mac:`Shift Alt A`,windowsLinux:`Shift Alt A`}]},{id:`source-select-next-occurrence`,category:`source`,title:{id:`hY8pka`},description:{id:`XnlF3W`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}],conflicts:[{source:`Chrome`,note:{id:`W3AYIT`}}]},{id:`source-goto-line`,category:`source`,title:{id:`7FamGZ`},description:{id:`yHikCO`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ G`,windowsLinux:`Ctrl Alt G`}]},{id:`source-find-results`,category:`source`,title:{id:`rJVoVX`},description:{id:`TwYboS`},scope:{id:`qyLmWw`},bindings:[{mac:`⌘ G / ⇧⌘ G`,windowsLinux:`Ctrl G / Ctrl Shift G`},{mac:`F3 / Shift F3`,windowsLinux:`F3 / Shift F3`},{mac:`Esc`,windowsLinux:`Esc`}],conflicts:[{source:`Chrome`,note:{id:`AGXyLT`}}]},{id:`source-folding`,category:`source`,title:{id:`bcjYUA`},description:{id:`VZGh8G`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ [ / ⌥⌘ ]`,windowsLinux:`Ctrl Shift [ / Ctrl Shift ]`},{mac:`Ctrl Alt [ / Ctrl Alt ]`,windowsLinux:`Ctrl Alt [ / Ctrl Alt ]`}]},{id:`source-completion`,category:`source`,title:{id:`VuxVSP`},description:{id:`Ehkru0`},scope:{id:`tiWX6q`},bindings:[{mac:`Ctrl Space`,windowsLinux:`Ctrl Space`},{mac:"⌥ ` / ⌥ I",windowsLinux:`Ctrl Space`},{mac:`↑ / ↓ / Page Up / Page Down`,windowsLinux:`↑ / ↓ / Page Up / Page Down`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-tab-focus-mode`,category:`source`,title:{id:`eG8Jsg`},description:{id:`qRZh7J`},scope:{id:`tiWX6q`},bindings:[{mac:`Shift Alt M`,windowsLinux:`Ctrl M`}]},{id:`source-lint-panel`,category:`source`,title:{id:`yvG-l1`},description:{id:`kCqCyf`},scope:{id:`tiWX6q`},bindings:[{mac:`⇧⌘ M`,windowsLinux:`Ctrl Shift M`}],conflicts:[{source:`Chrome`,note:{id:`RFNftC`}}]},{id:`source-next-diagnostic`,category:`source`,title:{id:`M1OfV9`},description:{id:`ExPiRQ`},scope:{id:`tiWX6q`},bindings:[{mac:`F8`,windowsLinux:`F8`}]}];function Ui(e){let t=Hi.find(t=>t.id===e);if(!t)throw Error(`Unknown keyboard shortcut: ${e}`);return t}function Wi(){return oe()?`mac`:`windowsLinux`}var Gi=[[/⌘/g,` Command `],[/⌥/g,` Option `],[/⇧/g,` Shift `],[/⌃/g,` Control `],[/↑/g,` Up Arrow `],[/↓/g,` Down Arrow `],[/←/g,` Left Arrow `],[/→/g,` Right Arrow `],[/\[/g,` Left Bracket `],[/\]/g,` Right Bracket `],[/,/g,` Comma `],[/\bCtrl\b/g,` Control `]];function Ki(e){return e.split(` / `).map(e=>Gi.reduce((e,[t,n])=>e.replace(t,n),e).replaceAll(/\s+/g,` `).trim()).join(` or `)}function qi(e,t=Wi()){return t===`mac`?e.mac:e.windowsLinux}function Ji(e,t=Wi()){return Ki(qi(e,t))}function Yi(e,t=Wi()){return qi(Ui(e).bindings[0],t)}function Xi(e,t=Wi()){return Ji(Ui(e).bindings[0],t)}function Zi(e){if(!e||typeof e!=`object`)return!1;if(`isContentEditable`in e&&e.isContentEditable===!0)return!0;if(!(`tagName`in e))return!1;let t=String(e.tagName).toUpperCase();return t===`INPUT`||t===`TEXTAREA`}function Qi(e,t,n=Wi()){return Ui(t).bindings.some(t=>{let r=$i(t.match,n);return r?ta(e,r,n):!1})}function $i(e,t){return e?ea(e)?e:e[t]??null:null}function ea(e){return`key`in e||`code`in e}function ta(e,t,n){if(t.key&&e.key.toLowerCase()!==t.key.toLowerCase()||t.code&&e.code!==t.code)return!1;let r=t.mod?n===`mac`:!1,i=t.mod?n===`windowsLinux`:!1,a=t.altKey??!1,o=t.shiftKey??!1;return t.allowExtraModifiers?!(t.anyMod&&!e.metaKey&&!e.ctrlKey||r&&!e.metaKey||i&&!e.ctrlKey||a&&!e.altKey||o&&!e.shiftKey):(t.anyMod?e.metaKey||e.ctrlKey:e.metaKey===r&&e.ctrlKey===i)&&e.altKey===a&&(t.allowShiftKey||!!e.shiftKey===o)}function na(e){let t=(0,X.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,orientation:i,decorative:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`horizontal`:i,s=a===void 0?!0:a,c;t[5]===n?c=t[6]:(c=K(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,n),t[5]=n,t[6]=c);let l;return t[7]!==s||t[8]!==o||t[9]!==r||t[10]!==c?(l=(0,J.jsx)(xi,{"data-slot":`separator`,decorative:s,orientation:o,className:c,...r}),t[7]=s,t[8]=o,t[9]=r,t[10]=c,t[11]=l):l=t[11],l}function ra(e){let t=(0,X.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=K(`group/field-group @container/field-group flex w-full flex-col gap-6 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(`div`,{"data-slot":`field-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var ia=Ne(`group/field flex w-full gap-2 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function aa(e){let t=(0,X.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,orientation:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`vertical`:i,o;t[4]!==n||t[5]!==a?(o=K(ia({orientation:a}),n),t[4]=n,t[5]=a,t[6]=o):o=t[6];let s;return t[7]!==a||t[8]!==r||t[9]!==o?(s=(0,J.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":a,className:o,...r}),t[7]=a,t[8]=r,t[9]=o,t[10]=s):s=t[10],s}function oa(e){let t=(0,X.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=K(`group/field-content flex flex-1 flex-col gap-0.5 leading-snug`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(`div`,{"data-slot":`field-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function sa(e){let t=(0,X.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=K(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(at,{"data-slot":`field-label`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ca(e){let t=(0,X.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=K(`flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(`div`,{"data-slot":`field-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function la(e){let t=(0,X.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=K(`text-left text-1sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(`p`,{"data-slot":`field-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ua(e){let t=(0,X.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,errors:i,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;bb0:{if(n){o=n;break bb0}if(!i?.length){o=null;break bb0}let e;t[5]===i?e=t[6]:(e=[...new Map(i.map(fa)).values()],t[5]=i,t[6]=e);let r=e;if(r?.length===1){o=r[0]?.message;break bb0}let a;t[7]===r?a=t[8]:(a=(0,J.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:r.map(da)}),t[7]=r,t[8]=a),o=a}let s=o;if(!s)return null;let c;t[9]===r?c=t[10]:(c=K(`text-sm font-normal text-destructive`,r),t[9]=r,t[10]=c);let l;return t[11]!==s||t[12]!==a||t[13]!==c?(l=(0,J.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:c,...a,children:s}),t[11]=s,t[12]=a,t[13]=c,t[14]=l):l=t[14],l}function da(e){return e?.message&&(0,J.jsx)(`li`,{children:e.message},e.message)}function fa(e){return[e?.message,e]}function pa(){let e=(0,X.c)(3),[t,n]=(0,Y.useState)(ga),r,i;return e[0]===t?(r=e[1],i=e[2]):(r=()=>{if(t!==null||window.okDesktop)return;let e=!0;return fetch(`/api/workspace`).then(async t=>{let r=await t.json().catch(ha);if(!e||!t.ok)return;let i=pe.safeParse(r);i.success&&n({contentDir:i.data.contentDir,pathSeparator:i.data.pathSeparator})}).catch(ma),()=>{e=!1}},i=[t],e[0]=t,e[1]=r,e[2]=i),(0,Y.useEffect)(r,i),t}function ma(e){console.warn(`[useWorkspace] /api/workspace fetch failed:`,e)}function ha(){return null}function ga(){return _a()}function _a(e=typeof window>`u`?void 0:window){if(!e)return null;let t=e.okDesktop;return t?{contentDir:t.config.projectPath,pathSeparator:t.platform===`win32`?`\\`:`/`}:null}async function va(){try{let e=await fetch(`/api/sync/status`);return e.ok?{status:await e.json()}:{status:null,error:`server`}}catch{return{status:null,error:`network`}}}function ya(){return ba().status}function ba(){let e=(0,X.c)(8),[t,n]=(0,Y.useState)(null),[r,i]=(0,Y.useState)(null),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=function(){va().then(e=>{let{status:t,error:r}=e;i(r??null),t&&n(t)})},e[0]=a):a=e[0];let o=a,s,c;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{o()},c=[],e[1]=s,e[2]=c):(s=e[1],c=e[2]),(0,Y.useEffect)(s,c);let l,u;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>P(e=>{e.includes(`sync-status`)&&o()}),u=[],e[3]=l,e[4]=u):(l=e[3],u=e[4]),(0,Y.useEffect)(l,u);let d;return e[5]!==r||e[6]!==t?(d={status:t,fetchError:r},e[5]=r,e[6]=t,e[7]=d):d=e[7],d}function xa(){let e=(0,X.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(ze,{children:(0,J.jsx)(a,{id:`q_9EcE`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsxs)(J.Fragment,{children:[t,(0,J.jsx)(Le,{children:(0,J.jsx)(a,{id:`n6hXUm`})})]}),e[1]=n):n=e[1],n}function Sa(){let e=(0,X.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(`p`,{className:`mb-2 font-medium`,children:(0,J.jsx)(a,{id:`4DLo0T`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-amber-300 bg-amber-50 px-3 py-2.5 text-sm text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,children:[t,(0,J.jsxs)(`ul`,{className:`list-disc space-y-1.5 pl-5`,children:[(0,J.jsx)(`li`,{children:(0,J.jsx)(a,{id:`7rQXBC`})}),(0,J.jsx)(`li`,{children:(0,J.jsx)(a,{id:`qvcK7S`})}),(0,J.jsx)(`li`,{children:(0,J.jsx)(a,{id:`R4RGjs`})})]})]}),e[1]=n):n=e[1],n}function Ca(){let e=(0,X.c)(2),{projectLocalBinding:t}=E();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=t.patch({autoSync:{enabled:e}});return n.ok?{ok:!0}:{ok:!1,error:ce(n.error)}},e[0]=t,e[1]=n),n}function wa(e){let t=(0,X.c)(11),{_:n}=r(),[i,a]=(0,Y.useState)(!1),o;t[0]!==n||t[1]!==e?(o=function(t){if(e===null)return Xe.error(n({id:`fiMNLl`})),!1;let r=e(t);if(!r.ok){console.error(`[sync] toggle failed:`,r.error);let e=r.error;return Xe.error(n(t?{id:`04RA0-`,values:{detail:e}}:{id:`qjHMHf`,values:{detail:e}})),!1}return!0},t[0]=n,t[1]=e,t[2]=o):o=t[2];let s=o,c;t[3]===s?c=t[4]:(c=function(e){if(e){a(!0);return}s(!1)},t[3]=s,t[4]=c);let l=c,u;t[5]===s?u=t[6]:(u=function(){s(!0)&&a(!1)},t[5]=s,t[6]=u);let d=u,f;return t[7]!==i||t[8]!==d||t[9]!==l?(f={confirmOpen:i,setConfirmOpen:a,onToggleRequest:l,onConfirm:d},t[7]=i,t[8]=d,t[9]=l,t[10]=f):f=t[10],f}function Ta(e){let t=(0,X.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,J.jsx)(ni,{"data-slot":`dropdown-menu`,...n}),t[2]=n,t[3]=r),r}function Ea(e){let t=(0,X.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,J.jsx)(ri,{"data-slot":`dropdown-menu-trigger`,...n}),t[2]=n,t[3]=r),r}function Da(e){let t=(0,X.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,align:i,sideOffset:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`start`:i,s=a===void 0?4:a,c;t[5]===n?c=t[6]:(c=K(`z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 data-[state=closed]:overflow-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0 subtle-scrollbar`,n),t[5]=n,t[6]=c);let l;return t[7]!==o||t[8]!==r||t[9]!==s||t[10]!==c?(l=(0,J.jsx)(ii,{children:(0,J.jsx)(ai,{"data-slot":`dropdown-menu-content`,sideOffset:s,align:o,className:c,...r})}),t[7]=o,t[8]=r,t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function Oa(e){let t=(0,X.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=K(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,J.jsx)(si,{"data-slot":`dropdown-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function ka(e){let t=(0,X.c)(15),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:i,children:r,checked:n,inset:a,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s;t[6]===i?s=t[7]:(s=K(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,i),t[6]=i,t[7]=s);let c;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,J.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-checkbox-item-indicator`,children:(0,J.jsx)(di,{children:(0,J.jsx)(Ye,{})})}),t[8]=c):c=t[8];let l;return t[9]!==n||t[10]!==r||t[11]!==a||t[12]!==o||t[13]!==s?(l=(0,J.jsxs)(ci,{"data-slot":`dropdown-menu-checkbox-item`,"data-inset":a,className:s,checked:n,...o,children:[c,r]}),t[9]=n,t[10]=r,t[11]=a,t[12]=o,t[13]=s,t[14]=l):l=t[14],l}function Aa(e){let t=(0,X.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,J.jsx)(li,{"data-slot":`dropdown-menu-radio-group`,...n}),t[2]=n,t[3]=r),r}function ja(e){let t=(0,X.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,inset:i,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=K(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r),t[5]=r,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,J.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-radio-item-indicator`,children:(0,J.jsx)(di,{children:(0,J.jsx)(Ye,{})})}),t[7]=s):s=t[7];let c;return t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,J.jsxs)(ui,{"data-slot":`dropdown-menu-radio-item`,"data-inset":i,className:o,...a,children:[s,n]}),t[8]=n,t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],c}function Ma(e){let t=(0,X.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,inset:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=K(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,J.jsx)(oi,{"data-slot":`dropdown-menu-label`,"data-inset":r,className:a,...i}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function Na(e){let t=(0,X.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=K(`-mx-1 my-1 h-px bg-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(fi,{"data-slot":`dropdown-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Pa(e){let t=(0,X.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,J.jsx)(pi,{"data-slot":`dropdown-menu-sub`,...n}),t[2]=n,t[3]=r),r}function Fa(e){let t=(0,X.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,inset:i,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=K(`flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r),t[5]=r,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,J.jsx)(Ze,{className:`ml-auto`}),t[7]=s):s=t[7];let c;return t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,J.jsxs)(mi,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":i,className:o,...a,children:[n,s]}),t[8]=n,t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],c}function Ia(e){let t=(0,X.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=K(`z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 data-[state=closed]:overflow-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0 subtle-scrollbar`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(hi,{"data-slot":`dropdown-menu-sub-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function La(){var e=[...arguments];return(0,Y.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var Ra=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function za(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Ba(e){return`nodeType`in e}function Va(e){return e?za(e)?e:Ba(e)?e.ownerDocument?.defaultView??window:window:window}function Ha(e){let{Document:t}=Va(e);return e instanceof t}function Ua(e){return za(e)?!1:e instanceof Va(e).HTMLElement}function Wa(e){return e instanceof Va(e).SVGElement}function Ga(e){return e?za(e)?e.document:Ba(e)?Ha(e)?e:Ua(e)||Wa(e)?e.ownerDocument:document:document:document}var Ka=Ra?Y.useLayoutEffect:Y.useEffect;function qa(e){let t=(0,Y.useRef)(e);return Ka(()=>{t.current=e}),(0,Y.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Ja(){let e=(0,Y.useRef)(null);return[(0,Y.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,Y.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function Ya(e,t){t===void 0&&(t=[e]);let n=(0,Y.useRef)(e);return Ka(()=>{n.current!==e&&(n.current=e)},t),n}function Xa(e,t){let n=(0,Y.useRef)();return(0,Y.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function Za(e){let t=qa(e),n=(0,Y.useRef)(null);return[n,(0,Y.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function Qa(e){let t=(0,Y.useRef)();return(0,Y.useEffect)(()=>{t.current=e},[e]),t.current}var $a={};function eo(e,t){return(0,Y.useMemo)(()=>{if(t)return t;let n=$a[e]==null?0:$a[e]+1;return $a[e]=n,e+`-`+n},[e,t])}function to(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var no=to(1),ro=to(-1);function io(e){return`clientX`in e&&`clientY`in e}function ao(e){if(!e)return!1;let{KeyboardEvent:t}=Va(e.target);return t&&e instanceof t}function oo(e){if(!e)return!1;let{TouchEvent:t}=Va(e.target);return t&&e instanceof t}function so(e){if(oo(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return io(e)?{x:e.clientX,y:e.clientY}:null}var co=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[co.Translate.toString(e),co.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),lo=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function uo(e){return e.matches(lo)?e:e.querySelector(lo)}var fo={display:`none`};function po(e){let{id:t,value:n}=e;return Y.createElement(`div`,{id:t,style:fo},n)}function mo(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return Y.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function ho(){let[e,t]=(0,Y.useState)(``);return{announce:(0,Y.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var go=(0,Y.createContext)(null);function _o(e){let t=(0,Y.useContext)(go);(0,Y.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function vo(){let[e]=(0,Y.useState)(()=>new Set),t=(0,Y.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,Y.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var yo={draggable:`
4
4
  To pick up a draggable item, press the space bar.