@inkeep/open-knowledge 0.19.1-beta.6 → 0.19.1-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/cli.mjs +6 -6
- package/dist/constants-CAL1YQvI.mjs +2 -0
- package/dist/{dist-CCXWuof9.mjs → dist-BEge6rC6.mjs} +1 -1
- package/dist/{dist-eQ8wfIra.mjs → dist-PW0S-_T1.mjs} +4 -4
- package/dist/index.mjs +1 -1
- package/dist/init-B7-UqUtW.mjs +1 -0
- package/dist/{init-BDf6XvU3.mjs → init-gHFRIFsd.mjs} +4 -4
- package/dist/loader-BEZo5DlS.mjs +1 -0
- package/dist/{loader-DSjUvmtz.mjs → loader-NZXxRdkW.mjs} +2 -2
- package/dist/{preview-FQzs1rk9.mjs → preview-BbdqO9Q5.mjs} +2 -2
- package/dist/preview-Mv9gJ6EP.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-CamLYZfR.js → ActivityModeContent-DCh7rjTk.js} +1 -1
- package/dist/public/assets/{DocumentContext-BZ9dn_pK.js → DocumentContext-B8SOywTx.js} +1 -1
- package/dist/public/assets/{GraphPanel-BKDlgX7j.js → GraphPanel-BckhlB-T.js} +1 -1
- package/dist/public/assets/{SettingsDialogBody-D3XmIN39.js → SettingsDialogBody-DOt4yObq.js} +1 -1
- package/dist/public/assets/{SourceEditor-9mWpX8ZT.js → SourceEditor-C861a7KF.js} +1 -1
- package/dist/public/assets/{TerminalPanel-CL-zFSM5.js → TerminalPanel-DxgXTvBv.js} +3 -3
- package/dist/public/assets/{config-validation-events-O2Vmw1iA.js → config-validation-events-6MEIT5an.js} +1 -1
- package/dist/public/assets/{dist-LGTMYX2W.js → dist-B-konnXB.js} +1 -1
- package/dist/public/assets/{index-Dpt9cueq.js → index-C_tj9qIL.js} +5 -5
- package/dist/public/assets/{keyboard-shortcuts-DF88YFtY.js → keyboard-shortcuts-CyaCkt2j.js} +1 -1
- package/dist/public/assets/{prop-types-BZ-uVueI.js → prop-types-C7sW_yPf.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-BAb1xG7U.js → target-navigation-intent-DaaRJcIP.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-B2DuS_om.js → typing-burst-detector-Cn3JI-Ka.js} +1 -1
- package/dist/public/index.html +8 -8
- package/dist/{repair-launch-json-aNxJGj_P.mjs → repair-launch-json-C55y7Bqn.mjs} +2 -2
- package/dist/{repair-mcp-configs-DIQwqE0C.mjs → repair-mcp-configs-ATr9r-BC.mjs} +2 -2
- package/dist/{repair-skills-DI19inzU.mjs → repair-skills-BkkdYq84.mjs} +2 -2
- package/dist/repair-skills-D9lJ3EcR.mjs +1 -0
- package/dist/{src-B58dVudl.mjs → src-C5-la6sf.mjs} +2 -2
- package/dist/{start-DU_AlluN.mjs → start-B7KbXyKV.mjs} +2 -2
- package/dist/start-Da5d691r.mjs +1 -0
- package/dist/{write-project-skill-DWhCjPIN.mjs → write-project-skill-TPI57MrZ.mjs} +2 -2
- package/package.json +1 -1
- package/dist/constants-Ct4YZ34N.mjs +0 -2
- package/dist/init-wU7Yx3ix.mjs +0 -1
- package/dist/loader-DcQKrZku.mjs +0 -1
- package/dist/preview-CufezgQq.mjs +0 -1
- package/dist/repair-skills-Cg3xoCNI.mjs +0 -1
- package/dist/start-CuF_FvoY.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{Hn as s,In as c,Jn as l,Ln as u,Pn as d,Rn as f,U as p,Un as m,Xn as h,Zn as g,_,_r as v,b as y,br as b,gr as x,h as S,m as C,mr as w,n as T,qn as E,sr as D,wr as O,x as k}from"./DocumentContext-
|
|
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{Hn as s,In as c,Jn as l,Ln as u,Pn as d,Rn as f,U as p,Un as m,Xn as h,Zn as g,_,_r as v,b as y,br as b,gr as x,h as S,m as C,mr as w,n as T,qn as E,sr as D,wr as O,x as k}from"./DocumentContext-B8SOywTx.js";import{Fn as A,L as j,R as M,Rn as N,St as P,Un as F,_n as I,_t as L,at as R,dr as z,gt as B,hr as V,ht as H,kt as U,nr as W,pi as G,pn as K,r as ee,vt as te}from"./dist-B-konnXB.js";import{c as ne,d as re,i as ie,l as q,n as ae,o as oe,s as se,t as J,u as ce}from"./button-CmLxDlCv.js";import{i as le,o as ue}from"./toggle-group-DsgJIlng.js";import{_ as de,a as fe,c as pe,g as me,h as he,i as ge,m as _e,n as ve,o as ye,r as be,s as xe,t as Se,v as Ce}from"./dialog-uOgi9SAD.js";import{i as we,n as Te,o as Ee,r as De,t as Oe}from"./collapsible-BzkAcCLq.js";import{B as ke,F as Ae,H as je,N as Me,O as Ne,_ as Pe,d as Fe,h as Ie,v as Le,z as Y}from"./prop-types-C7sW_yPf.js";import{n as Re,r as ze}from"./dist-DuNRfJxD.js";import{t as Be}from"./trace-api-DPMyR1_m.js";import{a as Ve,d as He,f as Ue,i as We,l as Ge,n as Ke,o as qe,p as Je,r as Ye,s as Xe}from"./dist-CSynDsuh.js";import{a as Ze,b as Qe,c as $e,i as et,l as tt,n as nt,o as rt,s as it,t as at,x as ot}from"./tooltip-DjrmDp0P.js";import{n as st,t as ct}from"./checkbox-BlEgF5ZV.js";import{n as lt,r as ut,t as dt}from"./dist-C_giuVsx.js";import{n as ft,r as pt,t as mt}from"./textarea-DV1qaluU.js";var ht=ce(`arrow-right-left`,[[`path`,{d:`m16 3 4 4-4 4`,key:`1x1c3m`}],[`path`,{d:`M20 7H4`,key:`zbl0bi`}],[`path`,{d:`m8 21-4-4 4-4`,key:`h9nckh`}],[`path`,{d:`M4 17h16`,key:`g4d7ey`}]]),gt=ce(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),_t=ce(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),vt=ce(`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`}]]),yt=ce(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),bt=ce(`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`}]]),xt=ce(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),St=ce(`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`}]]),Ct=ce(`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`}]]),wt=ce(`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`}]]),Tt=ce(`git-commit-vertical`,[[`path`,{d:`M12 3v6`,key:`1holv5`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M12 15v6`,key:`a9ows0`}]]),Et=ce(`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`}]]),Dt=ce(`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`}]]),Ot=ce(`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`}]]),kt=ce(`move-up-right`,[[`path`,{d:`M13 5H19V11`,key:`1n1gyv`}],[`path`,{d:`M19 5L5 19`,key:`72u4yj`}]]),At=ce(`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`}]]),jt=ce(`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`}]]),Mt=ce(`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`}]]),Nt=ce(`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`}]]),Pt=ce(`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`}]]),X=i(),Z=e(n(),1),Ft=e(re()),Q=o();async function It(e){try{let t=await e.json(),n=R.safeParse(t);if(n.success)return n.data.title}catch{}}async function Lt(e,t){return fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t??{})})}function Rt(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 zt(){return{async status(e){let t=e?.host??`github.com`,n=await Lt(`/api/local-op/auth/status`,e);if(!n.ok)return{authenticated:!1,host:t,error:await It(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 Lt(`/api/local-op/auth/repos`,e);if(!n.ok)return{ok:!1,error:await It(n)??`Failed to fetch repositories`};let r=Rt(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 Lt(`/api/local-op/auth/signout`,e);return t.ok?{ok:!0}:{ok:!1,error:await It(t)}}}}function Bt(e){return{status:t=>e.localOp.authStatus(t),repos:t=>e.localOp.authRepos(t)}}async function Vt(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 Ht(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 Ut(){return{start(){return Ht((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=R.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 Vt(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 Wt(e){return{start(){return e.localOp.auth.start()}}}var Gt=[`Enter`,` `],Kt=[`ArrowDown`,`PageUp`,`Home`],qt=[`ArrowUp`,`PageDown`,`End`],Jt=[...Kt,...qt],Yt={ltr:[...Gt,`ArrowRight`],rtl:[...Gt,`ArrowLeft`]},Xt={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},Zt=`Menu`,[Qt,$t,en]=ot(Zt),[tn,nn]=He(Zt,[en,tt,ut]),rn=tt(),an=ut(),[on,sn]=tn(Zt),[cn,ln]=tn(Zt),un=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=rn(t),[c,l]=Z.useState(null),u=Z.useRef(!1),d=We(a),f=Qe(i);return Z.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,X.jsx)($e,{...s,children:(0,X.jsx)(on,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,X.jsx)(cn,{scope:t,onClose:Z.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};un.displayName=Zt;var dn=`MenuAnchor`,fn=Z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=rn(n);return(0,X.jsx)(Ze,{...i,...r,ref:t})});fn.displayName=dn;var pn=`MenuPortal`,[mn,hn]=tn(pn,{forceMount:void 0}),gn=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=sn(pn,t);return(0,X.jsx)(mn,{scope:t,forceMount:n,children:(0,X.jsx)(qe,{present:n||a.open,children:(0,X.jsx)(Ke,{asChild:!0,container:i,children:r})})})};gn.displayName=pn;var _n=`MenuContent`,[vn,yn]=tn(_n),bn=Z.forwardRef((e,t)=>{let n=hn(_n,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=sn(_n,e.__scopeMenu),o=ln(_n,e.__scopeMenu);return(0,X.jsx)(Qt.Provider,{scope:e.__scopeMenu,children:(0,X.jsx)(qe,{present:r||a.open,children:(0,X.jsx)(Qt.Slot,{scope:e.__scopeMenu,children:o.modal?(0,X.jsx)(xn,{...i,ref:t}):(0,X.jsx)(Sn,{...i,ref:t})})})})}),xn=Z.forwardRef((e,t)=>{let n=sn(_n,e.__scopeMenu),r=Z.useRef(null),i=se(t,r);return Z.useEffect(()=>{let e=r.current;if(e)return _e(e)},[]),(0,X.jsx)(wn,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ge(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Sn=Z.forwardRef((e,t)=>{let n=sn(_n,e.__scopeMenu);return(0,X.jsx)(wn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Cn=ie(`MenuContent.ScrollLock`),wn=Z.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=sn(_n,n),_=ln(_n,n),v=rn(n),y=an(n),b=$t(n),[x,S]=Z.useState(null),C=Z.useRef(null),w=se(t,C,g.onContentChange),T=Z.useRef(0),E=Z.useRef(``),D=Z.useRef(0),O=Z.useRef(null),k=Z.useRef(`right`),A=Z.useRef(0),j=m?he:Z.Fragment,M=m?{as:Cn,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=cr(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())};Z.useEffect(()=>()=>window.clearTimeout(T.current),[]),me();let P=Z.useCallback(e=>k.current===O.current?.side&&ur(e,O.current?.area),[]);return(0,X.jsx)(vn,{scope:n,searchRef:E,onItemEnter:Z.useCallback(e=>{P(e)&&e.preventDefault()},[P]),onItemLeave:Z.useCallback(e=>{P(e)||(C.current?.focus(),S(null))},[P]),onTriggerLeave:Z.useCallback(e=>{P(e)&&e.preventDefault()},[P]),pointerGraceTimerRef:D,onPointerGraceIntentChange:Z.useCallback(e=>{O.current=e},[]),children:(0,X.jsx)(j,{...M,children:(0,X.jsx)(de,{asChild:!0,trapped:i,onMountAutoFocus:Ge(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,X.jsx)(Ye,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,X.jsx)(lt,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:Ge(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,X.jsx)(it,{role:`menu`,"aria-orientation":`vertical`,"data-state":rr(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:Ge(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||!Jt.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);qt.includes(e.key)&&a.reverse(),or(a)}),onBlur:Ge(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:Ge(e.onPointerMove,dr(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)}))})})})})})})});bn.displayName=_n;var Tn=`MenuGroup`,En=Z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,X.jsx)(Ue.div,{role:`group`,...r,ref:t})});En.displayName=Tn;var Dn=`MenuLabel`,On=Z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,X.jsx)(Ue.div,{...r,ref:t})});On.displayName=Dn;var kn=`MenuItem`,An=`menu.itemSelect`,jn=Z.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=Z.useRef(null),o=ln(kn,e.__scopeMenu),s=yn(kn,e.__scopeMenu),c=se(t,a),l=Z.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(An,{bubbles:!0,cancelable:!0});e.addEventListener(An,e=>r?.(e),{once:!0}),Je(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,X.jsx)(Mn,{...i,ref:c,disabled:n,onClick:Ge(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:Ge(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:Ge(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||Gt.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});jn.displayName=kn;var Mn=Z.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=yn(kn,n),s=an(n),c=Z.useRef(null),l=se(t,c),[u,d]=Z.useState(!1),[f,p]=Z.useState(``);return Z.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,X.jsx)(Qt.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,X.jsx)(dt,{asChild:!0,...s,focusable:!r,children:(0,X.jsx)(Ue.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:Ge(e.onPointerMove,dr(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ge(e.onPointerLeave,dr(e=>o.onItemLeave(e))),onFocus:Ge(e.onFocus,()=>d(!0)),onBlur:Ge(e.onBlur,()=>d(!1))})})})}),Nn=`MenuCheckboxItem`,Pn=Z.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,X.jsx)(Hn,{scope:e.__scopeMenu,checked:n,children:(0,X.jsx)(jn,{role:`menuitemcheckbox`,"aria-checked":ir(n)?`mixed`:n,...i,ref:t,"data-state":ar(n),onSelect:Ge(i.onSelect,()=>r?.(ir(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Pn.displayName=Nn;var Fn=`MenuRadioGroup`,[In,Ln]=tn(Fn,{value:void 0,onValueChange:()=>{}}),Rn=Z.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=We(r);return(0,X.jsx)(In,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,X.jsx)(En,{...i,ref:t})})});Rn.displayName=Fn;var zn=`MenuRadioItem`,Bn=Z.forwardRef((e,t)=>{let{value:n,...r}=e,i=Ln(zn,e.__scopeMenu),a=n===i.value;return(0,X.jsx)(Hn,{scope:e.__scopeMenu,checked:a,children:(0,X.jsx)(jn,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":ar(a),onSelect:Ge(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Bn.displayName=zn;var Vn=`MenuItemIndicator`,[Hn,Un]=tn(Vn,{checked:!1}),Wn=Z.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Un(Vn,n);return(0,X.jsx)(qe,{present:r||ir(a.checked)||a.checked===!0,children:(0,X.jsx)(Ue.span,{...i,ref:t,"data-state":ar(a.checked)})})});Wn.displayName=Vn;var Gn=`MenuSeparator`,Kn=Z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,X.jsx)(Ue.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Kn.displayName=Gn;var qn=`MenuArrow`,Jn=Z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=rn(n);return(0,X.jsx)(rt,{...i,...r,ref:t})});Jn.displayName=qn;var Yn=`MenuSub`,[Xn,Zn]=tn(Yn),Qn=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=sn(Yn,t),o=rn(t),[s,c]=Z.useState(null),[l,u]=Z.useState(null),d=We(i);return Z.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,X.jsx)($e,{...o,children:(0,X.jsx)(on,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,X.jsx)(Xn,{scope:t,contentId:Ve(),triggerId:Ve(),trigger:s,onTriggerChange:c,children:n})})})};Qn.displayName=Yn;var $n=`MenuSubTrigger`,er=Z.forwardRef((e,t)=>{let n=sn($n,e.__scopeMenu),r=ln($n,e.__scopeMenu),i=Zn($n,e.__scopeMenu),a=yn($n,e.__scopeMenu),o=Z.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=Z.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return Z.useEffect(()=>u,[u]),Z.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,X.jsx)(fn,{asChild:!0,...l,children:(0,X.jsx)(Mn,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":rr(n.open),...e,ref:oe(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ge(e.onPointerMove,dr(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:Ge(e.onPointerLeave,dr(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:Ge(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||Yt[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});er.displayName=$n;var tr=`MenuSubContent`,nr=Z.forwardRef((e,t)=>{let n=hn(_n,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=sn(_n,e.__scopeMenu),o=ln(_n,e.__scopeMenu),s=Zn(tr,e.__scopeMenu),c=Z.useRef(null),l=se(t,c);return(0,X.jsx)(Qt.Provider,{scope:e.__scopeMenu,children:(0,X.jsx)(qe,{present:r||a.open,children:(0,X.jsx)(Qt.Slot,{scope:e.__scopeMenu,children:(0,X.jsx)(wn,{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:Ge(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Ge(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:Ge(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Xt[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});nr.displayName=tr;function rr(e){return e?`open`:`closed`}function ir(e){return e===`indeterminate`}function ar(e){return ir(e)?`indeterminate`:e?`checked`:`unchecked`}function or(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function sr(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function cr(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=sr(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 lr(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 ur(e,t){return t?lr({x:e.clientX,y:e.clientY},t):!1}function dr(e){return t=>t.pointerType===`mouse`?e(t):void 0}var fr=un,pr=fn,mr=gn,hr=bn,gr=En,_r=On,vr=jn,yr=Pn,br=Rn,xr=Bn,Sr=Wn,Cr=Kn,wr=Jn,Tr=Qn,Er=er,Dr=nr,Or=`DropdownMenu`,[kr,Ar]=He(Or,[nn]),jr=nn(),[Mr,Nr]=kr(Or),Pr=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=jr(t),l=Z.useRef(null),[u,d]=Xe({prop:i,defaultProp:a??!1,onChange:o,caller:Or});return(0,X.jsx)(Mr,{scope:t,triggerId:Ve(),triggerRef:l,contentId:Ve(),open:u,onOpenChange:d,onOpenToggle:Z.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,X.jsx)(fr,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};Pr.displayName=Or;var Fr=`DropdownMenuTrigger`,Ir=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Nr(Fr,n),o=jr(n);return(0,X.jsx)(pr,{asChild:!0,...o,children:(0,X.jsx)(Ue.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:oe(t,a.triggerRef),onPointerDown:Ge(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:Ge(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Ir.displayName=Fr;var Lr=`DropdownMenuPortal`,Rr=e=>{let{__scopeDropdownMenu:t,...n}=e,r=jr(t);return(0,X.jsx)(mr,{...r,...n})};Rr.displayName=Lr;var zr=`DropdownMenuContent`,Br=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Nr(zr,n),a=jr(n),o=Z.useRef(!1);return(0,X.jsx)(hr,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Ge(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:Ge(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)`}})});Br.displayName=zr;var Vr=`DropdownMenuGroup`,Hr=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=jr(n);return(0,X.jsx)(gr,{...i,...r,ref:t})});Hr.displayName=Vr;var Ur=`DropdownMenuLabel`,Wr=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=jr(n);return(0,X.jsx)(_r,{...i,...r,ref:t})});Wr.displayName=Ur;var Gr=`DropdownMenuItem`,Kr=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=jr(n);return(0,X.jsx)(vr,{...i,...r,ref:t})});Kr.displayName=Gr;var qr=`DropdownMenuCheckboxItem`,Jr=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=jr(n);return(0,X.jsx)(yr,{...i,...r,ref:t})});Jr.displayName=qr;var Yr=`DropdownMenuRadioGroup`,Xr=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=jr(n);return(0,X.jsx)(br,{...i,...r,ref:t})});Xr.displayName=Yr;var Zr=`DropdownMenuRadioItem`,Qr=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=jr(n);return(0,X.jsx)(xr,{...i,...r,ref:t})});Qr.displayName=Zr;var $r=`DropdownMenuItemIndicator`,ei=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=jr(n);return(0,X.jsx)(Sr,{...i,...r,ref:t})});ei.displayName=$r;var ti=`DropdownMenuSeparator`,ni=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=jr(n);return(0,X.jsx)(Cr,{...i,...r,ref:t})});ni.displayName=ti;var ri=`DropdownMenuArrow`,ii=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=jr(n);return(0,X.jsx)(wr,{...i,...r,ref:t})});ii.displayName=ri;var ai=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=jr(t),[s,c]=Xe({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return(0,X.jsx)(Tr,{...o,open:s,onOpenChange:c,children:n})},oi=`DropdownMenuSubTrigger`,si=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=jr(n);return(0,X.jsx)(Er,{...i,...r,ref:t})});si.displayName=oi;var ci=`DropdownMenuSubContent`,li=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=jr(n);return(0,X.jsx)(Dr,{...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)`}})});li.displayName=ci;var ui=Pr,di=Ir,fi=Rr,pi=Br,mi=Hr,hi=Wr,gi=Kr,_i=Jr,vi=Xr,yi=Qr,bi=ei,xi=ni,Si=ai,Ci=si,wi=li,Ti=`Separator`,Ei=`horizontal`,Di=[`horizontal`,`vertical`],Oi=Z.forwardRef((e,t)=>{let{decorative:n,orientation:r=Ei,...i}=e,a=ki(r)?r:Ei,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,X.jsx)(Ue.div,{"data-orientation":a,...o,...i,ref:t})});Oi.displayName=Ti;function ki(e){return Di.includes(e)}var Ai=Oi;async function ji(e){try{await navigator.clipboard.writeText(e)}catch{}}var Mi=120*1e3;function Ni(e){let t=(0,Q.c)(25),{onSuccess:n,transport:i}=e,{_:o}=r(),[s,c]=(0,Z.useState)(null),[l,u]=(0,Z.useState)(`https://github.com/login/device`),[d,f]=(0,Z.useState)(!1),[p,m]=(0,Z.useState)(null),[h,g]=(0,Z.useState)(Mi),_=(0,Z.useRef)(null),y=(0,Z.useRef)(null),b;t[0]!==o||t[1]!==n||t[2]!==i?(b=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),ji(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]=b):b=t[3];let x=b,S;t[4]===x?S=t[5]:(S=()=>{let e=!1;return queueMicrotask(()=>{e||x()}),()=>{e=!0,_.current?.(),_.current=null,y.current&&clearInterval(y.current)}},t[4]=x,t[5]=S);let C;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(C=[],t[6]=C):C=t[6],(0,Z.useEffect)(S,C);let w,T;t[7]!==o||t[8]!==s?(w=()=>{if(!s)return;let e=Date.now();return y.current=setInterval(()=>{let t=Mi-(Date.now()-e);t<=0?(g(0),y.current&&clearInterval(y.current),m(o({id:`ve8vEM`}))):g(t)},1e3),()=>{y.current&&clearInterval(y.current)}},T=[s,o],t[7]=o,t[8]=s,t[9]=w,t[10]=T):(w=t[9],T=t[10]),(0,Z.useEffect)(w,T);let E=Math.floor(h/6e4),D=Math.floor(h%6e4/1e3),O;t[11]===D?O=t[12]:(O=D.toString().padStart(2,`0`),t[11]=D,t[12]=O);let k=`${E}:${O}`,A;t[13]!==o||t[14]!==d||t[15]!==p||t[16]!==k||t[17]!==s||t[18]!==l?(A=s?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,X.jsx)(a,{id:`eVPynQ`,values:{verificationUri:l},components:{0:(0,X.jsx)(`a`,{href:l,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>le(e,l),onAuxClick:e=>le(e,l),className:`inline-flex items-center gap-0.5 text-foreground hover:text-primary hover:underline`}),1:(0,X.jsx)(`span`,{}),2:(0,X.jsx)(ue,{className:`inline size-3.5`,"aria-hidden":!0})}})}),(0,X.jsxs)(J,{type:`button`,variant:`outline`,"aria-label":o({id:`nCzR-G`,values:{userCode:s}}),onClick:()=>void ji(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,X.jsx)(`code`,{className:`font-mono text-2xl font-bold tracking-widest`,children:s}),(0,X.jsx)(`span`,{className:`absolute right-3 text-muted-foreground`,"aria-hidden":`true`,children:d?(0,X.jsx)(Ce,{className:`size-4`}):(0,X.jsx)(v,{className:`size-4`})})]}),(0,X.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,children:d?(0,X.jsx)(a,{id:`80c4-P`}):null}),(0,X.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,X.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,X.jsx)(`span`,{className:`size-1.5 rounded-full bg-amber-500 animate-pulse`}),(0,X.jsx)(a,{id:`5y_9lO`})]}),(0,X.jsx)(`span`,{children:(0,X.jsx)(a,{id:`gYz2ep`,values:{timeLabel:k}})})]})]}):(0,X.jsx)(`div`,{className:`flex items-center justify-center py-6 text-sm text-muted-foreground`,children:p?null:(0,X.jsx)(a,{id:`aWlJai`})}),t[13]=o,t[14]=d,t[15]=p,t[16]=k,t[17]=s,t[18]=l,t[19]=A):A=t[19];let j;t[20]===p?j=t[21]:(j=p&&(0,X.jsx)(`p`,{className:`text-1sm text-destructive`,children:p}),t[20]=p,t[21]=j);let M;return t[22]!==A||t[23]!==j?(M=(0,X.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[A,j]}),t[22]=A,t[23]=j,t[24]=M):M=t[24],M}function Pi(e){let t=(0,Q.c)(30),{login:n,name:i,onNameChange:o,email:s,onEmailChange:c}=e,{_:l}=r(),u;t[0]===n?u=t[1]:(u=(0,X.jsx)(`p`,{className:`text-sm font-medium`,children:(0,X.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,X.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,X.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,X.jsx)(we,{"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,X.jsx)(we,{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,X.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}var Fi=1e4;function Ii(e){let t=(0,Q.c)(59),{open:n,onOpenChange:i,onSuccess:o,identityPrompt:s,reauth:c,transport:l,queryTransport:u}=e,{_:d}=r(),f;t[0]===l?f=t[1]:(f=l??Ut(),t[0]=l,t[1]=f);let p=f,m;t[2]===u?m=t[3]:(m=u??zt(),t[2]=u,t[3]=m);let h=m,[g,_]=(0,Z.useState)(`auth`),[v,y]=(0,Z.useState)(null),[b,x]=(0,Z.useState)(``),[S,C]=(0,Z.useState)(``),w,T;t[4]!==s||t[5]!==n?(w=()=>{n&&(y(null),x(``),C(``),_(s?`checking`:`auth`))},T=[n,s],t[4]=s,t[5]=n,t[6]=w,t[7]=T):(w=t[6],T=t[7]),(0,Z.useLayoutEffect)(w,T);let E;t[8]!==s||t[9]!==n||t[10]!==h?(E=()=>{if(!n||!s)return;let e=!1,t=t=>{e||(e=!0,_(t))},r=setTimeout(()=>t(`auth`),Fi);return h.status().then(n=>{e||(n.authenticated?(y({login:n.login,name:n.name,email:n.email}),x(n.name??``),C(n.email??``),t(`identity`)):t(`auth`))}).catch(()=>{t(`auth`)}),()=>{e=!0,clearTimeout(r)}},t[8]=s,t[9]=n,t[10]=h,t[11]=E):E=t[11];let D;t[12]!==s||t[13]!==n?(D=[n,s],t[12]=s,t[13]=n,t[14]=D):D=t[14],(0,Z.useEffect)(E,D);let O;t[15]!==d||t[16]!==s||t[17]!==i||t[18]!==o?(O=function(e){if(y(e),s)x(e.name??``),C(e.email??``),_(`identity`);else{_(`done`),o?.(e),i(!1);let t=e.login;Re.success(d({id:`E_tNGD`,values:{login:t}}))}},t[15]=d,t[16]=s,t[17]=i,t[18]=o,t[19]=O):O=t[19];let k=O,A;t[20]!==d||t[21]!==v||t[22]!==i||t[23]!==o?(A=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(Li);let n={...v??{login:``},name:e,email:t};_(`done`),o?.(n),i(!1);let r=n.login;Re.success(d({id:`E_tNGD`,values:{login:r}}))},t[20]=d,t[21]=v,t[22]=i,t[23]=o,t[24]=A):A=t[24];let j=A,M;t[25]!==d||t[26]!==v||t[27]!==i||t[28]!==o?(M=function(){if(!v)return;_(`done`),o?.(v),i(!1);let e=v.login;Re.success(d({id:`E_tNGD`,values:{login:e}}))},t[25]=d,t[26]=v,t[27]=i,t[28]=o,t[29]=M):M=t[29];let N=M,P;t[30]===i?P=t[31]:(P=function(){i(!1)},t[30]=i,t[31]=P);let F=P,I;t[32]!==s||t[33]!==c||t[34]!==g?(I=(0,X.jsx)(xe,{children:(0,X.jsx)(pe,{children:c?(0,X.jsx)(a,{id:`X8kjQX`}):s&&g!==`auth`?(0,X.jsx)(a,{id:`29XZXN`}):(0,X.jsx)(a,{id:`3jod3l`})})}),t[32]=s,t[33]=c,t[34]=g,t[35]=I):I=t[35];let L;t[36]===g?L=t[37]:(L=g===`checking`&&(0,X.jsx)(ve,{children:(0,X.jsx)(`div`,{className:`flex items-center justify-center py-6 text-sm text-muted-foreground`,children:(0,X.jsx)(a,{id:`gBbxn_`})})}),t[36]=g,t[37]=L);let R;t[38]!==k||t[39]!==F||t[40]!==p||t[41]!==g?(R=g===`auth`&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ve,{children:(0,X.jsx)(Ni,{onSuccess:k,transport:p})}),(0,X.jsx)(ye,{children:(0,X.jsx)(J,{variant:`outline`,className:`font-mono uppercase`,onClick:F,children:(0,X.jsx)(a,{id:`dEgA5A`})})})]}),t[38]=k,t[39]=F,t[40]=p,t[41]=g,t[42]=R):R=t[42];let z;t[43]!==v||t[44]!==j||t[45]!==N||t[46]!==S||t[47]!==b||t[48]!==g?(z=g===`identity`&&v&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ve,{children:(0,X.jsx)(Pi,{login:v.login,name:b,onNameChange:x,email:S,onEmailChange:C})}),(0,X.jsxs)(ye,{children:[(0,X.jsx)(J,{variant:`ghost`,onClick:N,children:(0,X.jsx)(a,{id:`6Uau97`})}),(0,X.jsx)(J,{onClick:()=>j(b.trim(),S.trim()),disabled:!b.trim()||!S.trim(),children:(0,X.jsx)(a,{id:`tfDRzk`})})]})]}),t[43]=v,t[44]=j,t[45]=N,t[46]=S,t[47]=b,t[48]=g,t[49]=z):z=t[49];let B;t[50]!==I||t[51]!==L||t[52]!==R||t[53]!==z?(B=(0,X.jsxs)(ge,{className:`sm:max-w-md`,children:[I,L,R,z]}),t[50]=I,t[51]=L,t[52]=R,t[53]=z,t[54]=B):B=t[54];let V;return t[55]!==i||t[56]!==n||t[57]!==B?(V=(0,X.jsx)(Se,{open:n,onOpenChange:i,children:B}),t[55]=i,t[56]=n,t[57]=B,t[58]=V):V=t[58],V}function Li(){}var Ri=null;function zi(){return Ri}function Bi(e){Ri=e}function Vi(e){let t=(0,Q.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=q(`animate-pulse rounded-md bg-muted`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`div`,{"data-slot":`skeleton`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Hi(e){let t=(0,Q.c)(12),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={status:`idle`},t[0]=n):n=t[0];let[r,i]=(0,Z.useState)(n),[a,o]=(0,Z.useState)(0),s,c;t[1]===e?(s=t[2],c=t[3]):(s=()=>{if(e!==null)return Le(()=>{o(Ki)})},c=[e],t[1]=e,t[2]=s,t[3]=c),(0,Z.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(Wi).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}})}}).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,Z.useEffect)(l,u);let d;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>o(Ui),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 Ui(e){return e+1}async function Wi(e){if(!e.ok){let t=await e.json().catch(Gi);throw Error(Ne(t)??`HTTP ${e.status}`)}return e.json()}function Gi(){return null}function Ki(e){return e+1}function qi(e,t){let n=(0,Q.c)(5),r;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={status:`idle`},n[0]=r):r=n[0];let[i,a]=(0,Z.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(Ji).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,Z.useEffect)(o,s),i}async function Ji(e){if(!e.ok){let t=await e.json().catch(Yi);throw Error(Ne(t)??`HTTP ${e.status}`)}return e.json()}function Yi(){return null}function Xi(){let e=(0,Q.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={status:`idle`},e[0]=t):t=e[0];let[n,r]=(0,Z.useState)(t),[i,a]=(0,Z.useState)(0),o,s;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>Le(()=>{a($i)}),s=[],e[1]=o,e[2]=s):(o=e[1],s=e[2]),(0,Z.useEffect)(o,s);let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=!1;return r({status:`loading`}),fetch(`/api/templates`).then(Zi).then(t=>{if(e)return;let n=P.safeParse(t);if(!n.success){console.error(`[ok-templates] /api/templates response failed schema validation:`,n.error.issues),r({status:`error`,message:`Server returned an incomplete templates response.`});return}r({status:`ready`,data:n.data.templates})}).catch(t=>{e||r({status:`error`,message:t instanceof Error?t.message:String(t)})}),()=>{e=!0}},e[3]=c):c=e[3];let l;return e[4]===i?l=e[5]:(l=[i],e[4]=i,e[5]=l),(0,Z.useEffect)(c,l),n}async function Zi(e){if(!e.ok){let t=await e.json().catch(Qi);throw Error(Ne(t)??`HTTP ${e.status}`)}return e.json()}function Qi(){return null}function $i(e){return e+1}function ea(e){let t=(0,Q.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=q(`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,X.jsx)(Ai,{"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 ta(e){let t=(0,Q.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=q(`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,X.jsx)(`div`,{"data-slot":`field-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var na=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 ra(e){let t=(0,Q.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=q(na({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,X.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 ia(e){let t=(0,Q.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=q(`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,X.jsx)(`div`,{"data-slot":`field-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function aa(e){let t=(0,Q.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=q(`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,X.jsx)(st,{"data-slot":`field-label`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function oa(e){let t=(0,Q.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=q(`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,X.jsx)(`div`,{"data-slot":`field-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function sa(e){let t=(0,Q.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=q(`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,X.jsx)(`p`,{"data-slot":`field-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ca(e){let t=(0,Q.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(ua)).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,X.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:r.map(la)}),t[7]=r,t[8]=a),o=a}let s=o;if(!s)return null;let c;t[9]===r?c=t[10]:(c=q(`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,X.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 la(e){return e?.message&&(0,X.jsx)(`li`,{children:e.message},e.message)}function ua(e){return[e?.message,e]}async function da(){try{let e=await fetch(`/api/semantic-status`);return e.ok?await e.json():(console.debug(`[semantic-status] probe returned`,e.status),null)}catch(e){return console.debug(`[semantic-status] probe failed`,e),null}}function fa(e){let t=(0,Q.c)(16),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let r=n.enabled??!0,[i,a]=(0,Z.useState)(null),o;t[2]===r?o=t[3]:(o=function(){r&&da().then(e=>{e&&a(e)})},t[2]=r,t[3]=o);let s=o,c;t[4]===s?c=t[5]:(c=()=>{s()},t[4]=s,t[5]=c);let l;t[6]===r?l=t[7]:(l=[r],t[6]=r,t[7]=l),(0,Z.useEffect)(c,l);let u;t[8]!==r||t[9]!==s?(u=()=>{if(r)return Pe(e=>{e.includes(`files`)&&s()})},t[8]=r,t[9]=s,t[10]=u):u=t[10];let d;t[11]===r?d=t[12]:(d=[r],t[11]=r,t[12]=d),(0,Z.useEffect)(u,d);let f;return t[13]!==s||t[14]!==i?(f={status:i,refresh:s},t[13]=s,t[14]=i,t[15]=f):f=t[15],f}function pa(){let e=(0,Q.c)(3),[t,n]=(0,Z.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=U.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,Z.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,Q.c)(8),[t,n]=(0,Z.useState)(null),[r,i]=(0,Z.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,Z.useEffect)(s,c);let l,u;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>Pe(e=>{e.includes(`sync-status`)&&o()}),u=[],e[3]=l,e[4]=u):(l=e[3],u=e[4]),(0,Z.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}var xa=`open-knowledge-app`;function Sa(e){try{Be.getTracer(xa).startSpan(e).end()}catch(e){console.warn(`[terminal-telemetry] span emit failed:`,e instanceof Error?e:String(e))}}function Ca(){Sa(`ok.desktop.terminalOpened`)}function wa(){Sa(`ok.desktop.shellConsentGranted`)}function Ta(){let e=(0,Q.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsx)(pe,{children:(0,X.jsx)(a,{id:`q_9EcE`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsxs)(X.Fragment,{children:[t,(0,X.jsx)(fe,{children:(0,X.jsx)(a,{id:`n6hXUm`})})]}),e[1]=n):n=e[1],n}function Ea(){let e=(0,Q.c)(10),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsxs)(`p`,{className:`flex items-center gap-1.5 text-xs font-semibold font-mono uppercase tracking-wider text-primary`,children:[(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`mb-[3px] flex items-center justify-center`,children:`◇`}),(0,X.jsx)(a,{id:`6s7LXO`})]}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(ht,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,X.jsx)(`p`,{className:`font-medium`,children:(0,X.jsx)(a,{id:`cdmk8A`})}),e[2]=r):r=e[2];let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsxs)(`div`,{className:`flex items-start gap-3`,children:[n,(0,X.jsxs)(`div`,{className:`space-y-0.5`,children:[r,(0,X.jsx)(`p`,{className:`text-muted-foreground`,children:(0,X.jsx)(a,{id:`YaeyFh`})})]})]}),e[3]=i):i=e[3];let o;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsx)(Tt,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),e[4]=o):o=e[4];let s;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,X.jsx)(`p`,{className:`font-medium`,children:(0,X.jsx)(a,{id:`9i21pa`})}),e[5]=s):s=e[5];let c;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,X.jsxs)(`div`,{className:`flex items-start gap-3`,children:[o,(0,X.jsxs)(`div`,{className:`space-y-0.5`,children:[s,(0,X.jsx)(`p`,{className:`text-muted-foreground`,children:(0,X.jsx)(a,{id:`KIIamL`})})]})]}),e[6]=c):c=e[6];let l;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(w,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),e[7]=l):l=e[7];let u;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,X.jsx)(`p`,{className:`font-medium`,children:(0,X.jsx)(a,{id:`8cpeU3`})}),e[8]=u):u=e[8];let d;return e[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,X.jsxs)(`div`,{role:`note`,className:`text-sm space-y-5`,children:[t,(0,X.jsxs)(`div`,{className:`space-y-5`,children:[i,c,(0,X.jsxs)(`div`,{className:`flex items-start gap-3`,children:[l,(0,X.jsxs)(`div`,{className:`space-y-0.5`,children:[u,(0,X.jsx)(`p`,{className:`text-muted-foreground`,children:(0,X.jsx)(a,{id:`DELNQk`})})]})]})]})]}),e[9]=d):d=e[9],d}function Da(){let e=(0,Q.c)(2),{projectLocalBinding:t}=p();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:G(n.error)}},e[0]=t,e[1]=n),n}function Oa(){let e=(0,Q.c)(2),{projectBinding:t}=p();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=t.patch({autoSync:{default:e}});return n.ok?{ok:!0}:{ok:!1,error:G(n.error)}},e[0]=t,e[1]=n),n}function ka(e){let t=(0,Q.c)(11),{_:n}=r(),[i,a]=(0,Z.useState)(!1),o;t[0]!==n||t[1]!==e?(o=function(t){if(e===null)return Re.error(n({id:`fiMNLl`})),!1;let r=e(t);if(!r.ok){console.error(`[sync] toggle failed:`,r.error);let e=r.error;return Re.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 Aa(e){return!(e instanceof Error)||e.name!==`NotAllowedError`?!1:/permission denied|permissions policy/i.test(e.message)}function ja(e){let t=globalThis.document;if(!t?.body||typeof t.createElement!=`function`||typeof t.execCommand!=`function`)return!1;let n=t.createElement(`textarea`);n.value=e,n.style.position=`fixed`,n.style.opacity=`0`,n.style.pointerEvents=`none`,n.setAttribute(`readonly`,``),t.body.appendChild(n);try{return n.focus(),n.select(),t.execCommand(`copy`)}catch{return!1}finally{n.remove()}}async function Ma(e){let t=globalThis.okDesktop?.clipboard;if(t&&typeof t.writeText==`function`){await t.writeText(e);return}let n=globalThis.navigator?.clipboard;if(n&&typeof n.writeText==`function`)try{await n.writeText(e);return}catch(t){if(ja(e))return;throw t}if(!ja(e))throw Error(`clipboard API unavailable`)}function Na(e){let t=(0,Q.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,X.jsx)(ui,{"data-slot":`dropdown-menu`,...n}),t[2]=n,t[3]=r),r}function Pa(e){let t=(0,Q.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,X.jsx)(di,{"data-slot":`dropdown-menu-trigger`,...n}),t[2]=n,t[3]=r),r}function Fa(e){let t=(0,Q.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=q(`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,X.jsx)(fi,{children:(0,X.jsx)(pi,{"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 Ia(e){let t=(0,Q.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,X.jsx)(mi,{"data-slot":`dropdown-menu-group`,...n}),t[2]=n,t[3]=r),r}function La(e){let t=(0,Q.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=q(`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,X.jsx)(gi,{"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 Ra(e){let t=(0,Q.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=q(`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,X.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-checkbox-item-indicator`,children:(0,X.jsx)(bi,{children:(0,X.jsx)(Ce,{})})}),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,X.jsxs)(_i,{"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 za(e){let t=(0,Q.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,X.jsx)(vi,{"data-slot":`dropdown-menu-radio-group`,...n}),t[2]=n,t[3]=r),r}function Ba(e){let t=(0,Q.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=q(`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,X.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-radio-item-indicator`,children:(0,X.jsx)(bi,{children:(0,X.jsx)(Ce,{})})}),t[7]=s):s=t[7];let c;return t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,X.jsxs)(yi,{"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 Va(e){let t=(0,Q.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=q(`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,X.jsx)(hi,{"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 Ha(e){let t=(0,Q.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=q(`-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,X.jsx)(xi,{"data-slot":`dropdown-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ua(e){let t=(0,Q.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,X.jsx)(Si,{"data-slot":`dropdown-menu-sub`,...n}),t[2]=n,t[3]=r),r}function Wa(e){let t=(0,Q.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=q(`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,X.jsx)(Ee,{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,X.jsxs)(Ci,{"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 Ga(e){let t=(0,Q.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=q(`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,X.jsx)(wi,{"data-slot":`dropdown-menu-sub-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ka(){var e=[...arguments];return(0,Z.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var qa=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ja(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Ya(e){return`nodeType`in e}function Xa(e){return e?Ja(e)?e:Ya(e)?e.ownerDocument?.defaultView??window:window:window}function Za(e){let{Document:t}=Xa(e);return e instanceof t}function Qa(e){return Ja(e)?!1:e instanceof Xa(e).HTMLElement}function $a(e){return e instanceof Xa(e).SVGElement}function eo(e){return e?Ja(e)?e.document:Ya(e)?Za(e)?e:Qa(e)||$a(e)?e.ownerDocument:document:document:document}var to=qa?Z.useLayoutEffect:Z.useEffect;function no(e){let t=(0,Z.useRef)(e);return to(()=>{t.current=e}),(0,Z.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function ro(){let e=(0,Z.useRef)(null);return[(0,Z.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,Z.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function io(e,t){t===void 0&&(t=[e]);let n=(0,Z.useRef)(e);return to(()=>{n.current!==e&&(n.current=e)},t),n}function ao(e,t){let n=(0,Z.useRef)();return(0,Z.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function oo(e){let t=no(e),n=(0,Z.useRef)(null);return[n,(0,Z.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function so(e){let t=(0,Z.useRef)();return(0,Z.useEffect)(()=>{t.current=e},[e]),t.current}var co={};function lo(e,t){return(0,Z.useMemo)(()=>{if(t)return t;let n=co[e]==null?0:co[e]+1;return co[e]=n,e+`-`+n},[e,t])}function uo(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 fo=uo(1),po=uo(-1);function mo(e){return`clientX`in e&&`clientY`in e}function ho(e){if(!e)return!1;let{KeyboardEvent:t}=Xa(e.target);return t&&e instanceof t}function go(e){if(!e)return!1;let{TouchEvent:t}=Xa(e.target);return t&&e instanceof t}function _o(e){if(go(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 mo(e)?{x:e.clientX,y:e.clientY}:null}var vo=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[vo.Translate.toString(e),vo.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),yo=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function bo(e){return e.matches(yo)?e:e.querySelector(yo)}var xo={display:`none`};function So(e){let{id:t,value:n}=e;return Z.createElement(`div`,{id:t,style:xo},n)}function Co(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return Z.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 wo(){let[e,t]=(0,Z.useState)(``);return{announce:(0,Z.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var To=(0,Z.createContext)(null);function Eo(e){let t=(0,Z.useContext)(To);(0,Z.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function Do(){let[e]=(0,Z.useState)(()=>new Set),t=(0,Z.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,Z.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var Oo={draggable:`
|
|
4
4
|
To pick up a draggable item, press the space bar.
|
|
@@ -465,7 +465,7 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
465
465
|
`)}function l4(e,t,n){return`The selected passage is ${e===t?`line ${e}`:`lines ${e}-${t}`} of @${n}. Read it from @${n} via the OpenKnowledge MCP server before editing.`}function u4(e){let t=e.map(e=>k2(e)).filter(e=>e!==``);return t.length===0?``:[`Also reference:`,``,...t.map(e=>`@${e}`)].join(`
|
|
466
466
|
`)}function d4(e){return e.scope===`doc`?`Let's work on @${k2(e.docRelativePath)} using OpenKnowledge.`:e.scope===`folder`?`Let's work on the @${k2(e.folderRelativePath)} folder using OpenKnowledge.`:`Let's work on this project using OpenKnowledge.`}function f4(e,t,n,r,i){let a=t.trim();if(!(a!==``||n!==``||r!==``))return i===``?e:`${e} ${i}`;let o=[e];return a!==``&&o.push(o4(a)),n!==``&&o.push(n),r!==``&&o.push(r),i!==``&&o.push(i),o.join(`
|
|
467
467
|
|
|
468
|
-
`)}function p4(e,t,n,r,i,a){if(e.kind===`lines`)return l4(e.startLine,e.endLine,n);if(e.kind===`anchor`)return c4(e.markdown,n);let o=s4(e.markdown);return K2(f4(t,``,o,r,i),a)<=R2?o:c4(e.markdown,n)}function m4(e,t,n,r){let{target:i}=e,a=k2(e.docRelativePath),o=`Let's work on @${a} using OpenKnowledge.`,s=p4(t,o,a,n,r,i);return f4(o,t4(e.instruction,i,e=>f4(o,e,s,n,r)),s,n,r)}function h4(e){let{target:t}=e,n=e.autoOpen?a4:``,r=u4(e.mentions);if(e.scope===`doc`&&e.selection!==void 0)return m4(e,e.selection,r,n);let i=d4(e);return f4(i,t4(e.instruction,t,e=>f4(i,e,``,r,n)),``,r,n)}function g4(e){return`'${e.replace(/'/g,`'\\''`)}'`}var _4={claude:{bin:`claude`,displayName:`Claude`,docsUrl:`https://docs.claude.com/en/docs/claude-code`,handoffTarget:`claude-code`,mcpPreApproveArg:`--settings ${g4(JSON.stringify({enabledMcpjsonServers:[k1]}))}`},codex:{bin:`codex`,displayName:`Codex`,docsUrl:`https://developers.openai.com/codex/cli`,handoffTarget:`codex`},cursor:{bin:`cursor-agent`,displayName:`Cursor`,docsUrl:`https://cursor.com/docs/cli/overview`,handoffTarget:`cursor`},opencode:{bin:`opencode`,displayName:`OpenCode`,docsUrl:`https://opencode.ai/docs`,handoffTarget:`opencode`}},v4=[`claude`,`codex`,`cursor`,`opencode`];function y4(e,t,n={}){let r=_4[e],i=n.mcpPreApprove===!0&&r.mcpPreApproveArg?`${r.mcpPreApproveArg} `:``;return`${r.bin} ${i}${g4(t)}\r`}function b4(e){if(e.length===0)return{ok:!1,reason:`docName must not be empty`};if(e.trim().length===0)return{ok:!1,reason:`docName must not be blank (whitespace only)`};if(e!==e.trim())return{ok:!1,reason:`docName must not have leading or trailing whitespace`};for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<32||n===127)return{ok:!1,reason:`docName must not contain control characters`}}if(e.includes(`..`)||e.startsWith(`/`)||e.includes(`\\`))return{ok:!1,reason:`docName must not contain "..", a leading "/", or a backslash`};for(let t of e.split(`/`)){if(t.length===0)return{ok:!1,reason:`docName must not contain empty path segments (no leading, trailing, or doubled "/")`};if(t.startsWith(`.`))return{ok:!1,reason:`docName path segments must not start with "." (hidden files are not addressable)`}}return{ok:!0}}function x4(e){return e.split(`/`).some(e=>e.startsWith(`.`))}function S4(e,t){let n=b4(e);n.ok||t.addIssue({code:`custom`,message:n.reason})}var C4=E().superRefine(S4).optional(),w4={agentId:E().optional(),agentName:E().optional(),colorSeed:E().optional(),clientName:E().optional(),clientVersion:E().optional(),label:E().optional()},T4=E().optional(),E4=/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;Ra(`kind`,[A({kind:M(`doc`),docPath:E().min(1)}).loose(),A({kind:M(`folder`),folderPath:E()}).loose()]);var D4=j([`no-remote`,`detached-head`,`branch-not-on-origin`,`non-github-remote`,`invalid-path`]),O4=Ra(`ok`,[A({ok:M(!0),shareUrl:E().min(1),sharedUrl:E().min(1),branch:E().min(1)}).loose(),A({ok:M(!1),error:D4,branch:E().min(1).optional()}).loose()]),k4=j([`user`,`org`]),A4=A({login:E().min(1),kind:k4,avatarUrl:E().optional()}).loose(),j4=j([`auth-required`,`network`]),M4=Ra(`ok`,[A({ok:M(!0),owners:k(A4)}).loose(),A({ok:M(!1),error:j4}).loose()]),N4=Ra(`ok`,[A({ok:M(!0),available:O()}).loose(),A({ok:M(!1),error:j4}).loose()]),P4=j([`public`,`private`]);A({owner:E().min(1),name:E().min(1),visibility:P4,description:E().optional()}).loose();var F4=j([`name-conflict`,`saml-sso`,`auth-required`,`push-failed`,`init-failed`,`network`,`no-project`]),I4=Ra(`ok`,[A({ok:M(!0),ownerLogin:E().min(1),repoName:E().min(1),cloneUrl:E().min(1),defaultBranch:E().min(1)}).loose(),A({ok:M(!1),error:F4}).loose()]);function L4(e){return!(typeof e!=`string`||e.length===0||e.startsWith(`-`)||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(`:`)||e.split(`/`).includes(`..`))}var R4=e=>e.refine(L4,`invalid branch name`),z4={shareTargetExists:O(),dirtyConflicts:A({conflicts:O(),files:k(E().min(1))}).loose(),branchIsLocal:O()};Ra(`detached`,[A({detached:M(!1),currentBranch:E().min(1).nullable(),currentHeadSha:Da(),...z4}).loose(),A({detached:M(!0),currentBranch:Da(),currentHeadSha:E().min(1),...z4}).loose()]),A({branch:R4(E().min(1)),principalId:E().optional()}).loose();var B4=j([`dirty-conflict`,`branch-not-found`,`fetch-failed`,`checkout-failed`,`branch-in-other-worktree`]);Ra(`ok`,[A({ok:M(!0)}).loose(),A({ok:M(!1),reason:B4,files:k(E().min(1)).optional(),otherWorktreePath:E().min(1).optional()}).loose()]);var V4=A({serverInstanceId:E().min(1),currentBranch:E().min(1).optional(),currentDiskAckSVs:Ha(E().min(1),E().min(1)).optional()}).loose(),H4=A({id:E().min(1),display_name:E().min(1),display_email:E(),source:j([`git-config`,`synthesized`]),created_at:E().min(1)}).loose();A({collabUrl:E().nullable(),previewUrl:E().nullable(),port:D(),paneTarget:E().nullable(),singleFile:O().default(!1)}).loose();var U4=A({type:j(`urn:ok:error:malformed-upload.urn:ok:error:collision-exhaustion.urn:ok:error:storage-full.urn:ok:error:storage-readonly.urn:ok:error:storage-error.urn:ok:error:no-file-received.urn:ok:error:path-escape.urn:ok:error:method-not-allowed.urn:ok:error:invalid-request.urn:ok:error:payload-too-large.urn:ok:error:request-timeout.urn:ok:error:internal-server-error.urn:ok:error:loopback-required.urn:ok:error:invalid-origin.urn:ok:error:url-not-allowed.urn:ok:error:dir-outside-home.urn:ok:error:concurrent-operation.urn:ok:error:clone-failed.urn:ok:error:clone-timeout.urn:ok:error:server-start-failed.urn:ok:error:reserved-doc-name.urn:ok:error:target-not-found.urn:ok:error:stale-target.urn:ok:error:frontmatter-edit-not-supported.urn:ok:error:invalid-frontmatter-patch.urn:ok:error:frontmatter-malformed.urn:ok:error:no-active-session.urn:ok:error:too-many-agent-sessions.urn:ok:error:disk-divergence.urn:ok:error:doc-not-found.urn:ok:error:doc-already-exists.urn:ok:error:doc-not-open.urn:ok:error:rollback-not-configured.urn:ok:error:doc-not-available.urn:ok:error:backlink-index-not-configured.urn:ok:error:file-rescan-not-configured.urn:ok:error:shadow-not-configured.urn:ok:error:host-not-allowed.urn:ok:error:principal-not-available.urn:ok:error:not-found.urn:ok:error:auth-failed.urn:ok:error:no-project-dir.urn:ok:error:server-open-failed.urn:ok:error:doc-in-conflict.urn:ok:error:no-conflict-tracked.urn:ok:error:sync-not-active.urn:ok:error:project-repo-not-configured.urn:ok:error:seed-prerequisite-missing.urn:ok:error:seed-invalid-root.urn:ok:error:tag-index-not-configured.urn:ok:error:template-not-found.urn:ok:error:unsupported-asset-type.urn:ok:error:asset-not-found.urn:ok:error:single-file-mode.urn:ok:error:collab-server-not-running.urn:ok:error:gateway-timeout.urn:ok:error:cursor-not-installed.urn:ok:error:cursor-spawn-timeout.urn:ok:error:cursor-spawn-failed.urn:ok:error:handoff-target-not-installed.urn:ok:error:handoff-spawn-timeout.urn:ok:error:handoff-spawn-failed`.split(`.`)),title:E().min(1),status:D().int().min(400).max(599),instance:E().regex(E4,`instance must be urn:uuid:<uuid>`).optional(),detail:E().optional()}).loose();A({parentDocName:E().min(1),agentId:E().min(1).optional(),agentName:E().min(1).optional()}).loose();var W4=A({src:E().min(1),path:E().min(1).optional(),deduped:O().optional()}).loose();A({url:E().min(1),dir:E().min(1),branch:E().min(1).refine(L4,`invalid branch name`).optional()}).loose(),A({type:M(`error`),problem:U4}).loose();var G4=8192,K4=32768,q4=`…[truncated]`;function J4(e){let t=e.trim();if(t.length===0||t[0]!==`{`)return null;let n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n||Array.isArray(n))return null;let r=n;return{event:typeof r.event==`string`?r.event:void 0,fields:r}}function Y4(e){return e.length<=8192?e:`${e.slice(0,G4-12)}${q4}`}var X4=/notionvc:/i,Z4=()=>e=>{Q4(e)&&($4(e),e3(e))};function Q4(e){if(!(`children`in e)||!Array.isArray(e.children))return!1;for(let t of e.children){if(t.type===`comment`){let e=String(t.value??``);if(X4.test(e))return!0}if(t.type===`element`&&Q4(t))return!0}return!1}function $4(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&$4(t);let t=[];for(let n of e.children){if(n.type!==`text`){t.push(n);continue}let e=String(n.value??``);if(!e.includes(`
|
|
468
|
+
`)}function p4(e,t,n,r,i,a){if(e.kind===`lines`)return l4(e.startLine,e.endLine,n);if(e.kind===`anchor`)return c4(e.markdown,n);let o=s4(e.markdown);return K2(f4(t,``,o,r,i),a)<=R2?o:c4(e.markdown,n)}function m4(e,t,n,r){let{target:i}=e,a=k2(e.docRelativePath),o=`Let's work on @${a} using OpenKnowledge.`,s=p4(t,o,a,n,r,i);return f4(o,t4(e.instruction,i,e=>f4(o,e,s,n,r)),s,n,r)}function h4(e){let{target:t}=e,n=e.autoOpen?a4:``,r=u4(e.mentions);if(e.scope===`doc`&&e.selection!==void 0)return m4(e,e.selection,r,n);let i=d4(e);return f4(i,t4(e.instruction,t,e=>f4(i,e,``,r,n)),``,r,n)}function g4(e){return`'${e.replace(/'/g,`'\\''`)}'`}var _4={claude:{bin:`claude`,displayName:`Claude`,docsUrl:`https://docs.claude.com/en/docs/claude-code`,handoffTarget:`claude-code`,mcpPreApproveArg:`--settings ${g4(JSON.stringify({enabledMcpjsonServers:[k1]}))}`},codex:{bin:`codex`,displayName:`Codex`,docsUrl:`https://developers.openai.com/codex/cli`,handoffTarget:`codex`},cursor:{bin:`cursor-agent`,displayName:`Cursor`,docsUrl:`https://cursor.com/docs/cli/overview`,handoffTarget:`cursor`},opencode:{bin:`opencode`,displayName:`OpenCode`,docsUrl:`https://opencode.ai/docs`,handoffTarget:`opencode`,promptFlag:`--prompt`}},v4=[`claude`,`codex`,`cursor`,`opencode`];function y4(e,t,n={}){let r=_4[e],i=n.mcpPreApprove===!0&&r.mcpPreApproveArg?`${r.mcpPreApproveArg} `:``,a=r.promptFlag?`${r.promptFlag} `:``;return`${r.bin} ${i}${a}${g4(t)}\r`}function b4(e){if(e.length===0)return{ok:!1,reason:`docName must not be empty`};if(e.trim().length===0)return{ok:!1,reason:`docName must not be blank (whitespace only)`};if(e!==e.trim())return{ok:!1,reason:`docName must not have leading or trailing whitespace`};for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<32||n===127)return{ok:!1,reason:`docName must not contain control characters`}}if(e.includes(`..`)||e.startsWith(`/`)||e.includes(`\\`))return{ok:!1,reason:`docName must not contain "..", a leading "/", or a backslash`};for(let t of e.split(`/`)){if(t.length===0)return{ok:!1,reason:`docName must not contain empty path segments (no leading, trailing, or doubled "/")`};if(t.startsWith(`.`))return{ok:!1,reason:`docName path segments must not start with "." (hidden files are not addressable)`}}return{ok:!0}}function x4(e){return e.split(`/`).some(e=>e.startsWith(`.`))}function S4(e,t){let n=b4(e);n.ok||t.addIssue({code:`custom`,message:n.reason})}var C4=E().superRefine(S4).optional(),w4={agentId:E().optional(),agentName:E().optional(),colorSeed:E().optional(),clientName:E().optional(),clientVersion:E().optional(),label:E().optional()},T4=E().optional(),E4=/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;Ra(`kind`,[A({kind:M(`doc`),docPath:E().min(1)}).loose(),A({kind:M(`folder`),folderPath:E()}).loose()]);var D4=j([`no-remote`,`detached-head`,`branch-not-on-origin`,`non-github-remote`,`invalid-path`]),O4=Ra(`ok`,[A({ok:M(!0),shareUrl:E().min(1),sharedUrl:E().min(1),branch:E().min(1)}).loose(),A({ok:M(!1),error:D4,branch:E().min(1).optional()}).loose()]),k4=j([`user`,`org`]),A4=A({login:E().min(1),kind:k4,avatarUrl:E().optional()}).loose(),j4=j([`auth-required`,`network`]),M4=Ra(`ok`,[A({ok:M(!0),owners:k(A4)}).loose(),A({ok:M(!1),error:j4}).loose()]),N4=Ra(`ok`,[A({ok:M(!0),available:O()}).loose(),A({ok:M(!1),error:j4}).loose()]),P4=j([`public`,`private`]);A({owner:E().min(1),name:E().min(1),visibility:P4,description:E().optional()}).loose();var F4=j([`name-conflict`,`saml-sso`,`auth-required`,`push-failed`,`init-failed`,`network`,`no-project`]),I4=Ra(`ok`,[A({ok:M(!0),ownerLogin:E().min(1),repoName:E().min(1),cloneUrl:E().min(1),defaultBranch:E().min(1)}).loose(),A({ok:M(!1),error:F4}).loose()]);function L4(e){return!(typeof e!=`string`||e.length===0||e.startsWith(`-`)||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(`:`)||e.split(`/`).includes(`..`))}var R4=e=>e.refine(L4,`invalid branch name`),z4={shareTargetExists:O(),dirtyConflicts:A({conflicts:O(),files:k(E().min(1))}).loose(),branchIsLocal:O()};Ra(`detached`,[A({detached:M(!1),currentBranch:E().min(1).nullable(),currentHeadSha:Da(),...z4}).loose(),A({detached:M(!0),currentBranch:Da(),currentHeadSha:E().min(1),...z4}).loose()]),A({branch:R4(E().min(1)),principalId:E().optional()}).loose();var B4=j([`dirty-conflict`,`branch-not-found`,`fetch-failed`,`checkout-failed`,`branch-in-other-worktree`]);Ra(`ok`,[A({ok:M(!0)}).loose(),A({ok:M(!1),reason:B4,files:k(E().min(1)).optional(),otherWorktreePath:E().min(1).optional()}).loose()]);var V4=A({serverInstanceId:E().min(1),currentBranch:E().min(1).optional(),currentDiskAckSVs:Ha(E().min(1),E().min(1)).optional()}).loose(),H4=A({id:E().min(1),display_name:E().min(1),display_email:E(),source:j([`git-config`,`synthesized`]),created_at:E().min(1)}).loose();A({collabUrl:E().nullable(),previewUrl:E().nullable(),port:D(),paneTarget:E().nullable(),singleFile:O().default(!1)}).loose();var U4=A({type:j(`urn:ok:error:malformed-upload.urn:ok:error:collision-exhaustion.urn:ok:error:storage-full.urn:ok:error:storage-readonly.urn:ok:error:storage-error.urn:ok:error:no-file-received.urn:ok:error:path-escape.urn:ok:error:method-not-allowed.urn:ok:error:invalid-request.urn:ok:error:payload-too-large.urn:ok:error:request-timeout.urn:ok:error:internal-server-error.urn:ok:error:loopback-required.urn:ok:error:invalid-origin.urn:ok:error:url-not-allowed.urn:ok:error:dir-outside-home.urn:ok:error:concurrent-operation.urn:ok:error:clone-failed.urn:ok:error:clone-timeout.urn:ok:error:server-start-failed.urn:ok:error:reserved-doc-name.urn:ok:error:target-not-found.urn:ok:error:stale-target.urn:ok:error:frontmatter-edit-not-supported.urn:ok:error:invalid-frontmatter-patch.urn:ok:error:frontmatter-malformed.urn:ok:error:no-active-session.urn:ok:error:too-many-agent-sessions.urn:ok:error:disk-divergence.urn:ok:error:doc-not-found.urn:ok:error:doc-already-exists.urn:ok:error:doc-not-open.urn:ok:error:rollback-not-configured.urn:ok:error:doc-not-available.urn:ok:error:backlink-index-not-configured.urn:ok:error:file-rescan-not-configured.urn:ok:error:shadow-not-configured.urn:ok:error:host-not-allowed.urn:ok:error:principal-not-available.urn:ok:error:not-found.urn:ok:error:auth-failed.urn:ok:error:no-project-dir.urn:ok:error:server-open-failed.urn:ok:error:doc-in-conflict.urn:ok:error:no-conflict-tracked.urn:ok:error:sync-not-active.urn:ok:error:project-repo-not-configured.urn:ok:error:seed-prerequisite-missing.urn:ok:error:seed-invalid-root.urn:ok:error:tag-index-not-configured.urn:ok:error:template-not-found.urn:ok:error:unsupported-asset-type.urn:ok:error:asset-not-found.urn:ok:error:single-file-mode.urn:ok:error:collab-server-not-running.urn:ok:error:gateway-timeout.urn:ok:error:cursor-not-installed.urn:ok:error:cursor-spawn-timeout.urn:ok:error:cursor-spawn-failed.urn:ok:error:handoff-target-not-installed.urn:ok:error:handoff-spawn-timeout.urn:ok:error:handoff-spawn-failed`.split(`.`)),title:E().min(1),status:D().int().min(400).max(599),instance:E().regex(E4,`instance must be urn:uuid:<uuid>`).optional(),detail:E().optional()}).loose();A({parentDocName:E().min(1),agentId:E().min(1).optional(),agentName:E().min(1).optional()}).loose();var W4=A({src:E().min(1),path:E().min(1).optional(),deduped:O().optional()}).loose();A({url:E().min(1),dir:E().min(1),branch:E().min(1).refine(L4,`invalid branch name`).optional()}).loose(),A({type:M(`error`),problem:U4}).loose();var G4=8192,K4=32768,q4=`…[truncated]`;function J4(e){let t=e.trim();if(t.length===0||t[0]!==`{`)return null;let n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n||Array.isArray(n))return null;let r=n;return{event:typeof r.event==`string`?r.event:void 0,fields:r}}function Y4(e){return e.length<=8192?e:`${e.slice(0,G4-12)}${q4}`}var X4=/notionvc:/i,Z4=()=>e=>{Q4(e)&&($4(e),e3(e))};function Q4(e){if(!(`children`in e)||!Array.isArray(e.children))return!1;for(let t of e.children){if(t.type===`comment`){let e=String(t.value??``);if(X4.test(e))return!0}if(t.type===`element`&&Q4(t))return!0}return!1}function $4(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&$4(t);let t=[];for(let n of e.children){if(n.type!==`text`){t.push(n);continue}let e=String(n.value??``);if(!e.includes(`
|
|
469
469
|
`)){t.push(n);continue}let r=e.split(`
|
|
470
470
|
`);for(let e=0;e<r.length;e++)r[e]&&t.push({type:`text`,value:r[e]??``}),e<r.length-1&&t.push({type:`element`,tagName:`br`,properties:{},children:[]})}e.children=t}function e3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){e.children=e.children.filter(e=>e.type===`comment`?!X4.test(String(e.value??``)):!0);for(let t of e.children)t.type===`element`&&e3(t)}}var t3=new Set([`Apple-tab-span`,`Apple-converted-space`,`Apple-style-span`]),n3=()=>e=>{r3(e)};function r3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&r3(t);e.children=e.children.flatMap(e=>{if(e.type!==`element`)return[e];let t=e;return i3(t)?[]:a3(t)?t.children:[t]})}}function i3(e){if(e.tagName!==`meta`)return!1;let t=e.properties?.name,n=e.properties?.content;return t===`Generator`&&typeof n==`string`&&/Cocoa/i.test(n)}function a3(e){if(e.tagName!==`span`)return!1;let t=e.properties?.className;return Array.isArray(t)?t.length>0&&t.every(e=>t3.has(String(e))):!1}var o3=`docs-internal-guid-`;function s3(e,t){let n=e.children[t];!n||n.type!==`element`||e.children.splice(t,1,...n.children)}var c3=()=>e=>{l3(e)};function l3(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&l3(t);let t=0;for(;t<e.children.length;){let n=e.children[t];if(!n||n.type!==`element`){t++;continue}let r=n;if(u3(r)||d3(r)){s3(e,t);continue}t++}}function u3(e){if(e.tagName!==`b`)return!1;let t=e.properties?.id;return typeof t==`string`&&t.startsWith(o3)}function d3(e){if(e.tagName!==`div`||e.properties?.dir!==`ltr`)return!1;let t=e.children.filter(e=>e.type===`element`);return t.length===1?t[0]?.tagName===`table`:!1}var f3=new Set([`commit-link`,`user-mention`,`team-mention`,`issue-link`]),p3=()=>e=>{m3(e)};function m3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&m3(t);for(let t of e.children)t.type===`element`&&h3(t)}}function h3(e){if(!e.properties)return;for(let t of Object.keys(e.properties))t.startsWith(`dataHovercard`)&&delete e.properties[t];let t=e.properties.className;if(Array.isArray(t)){let n=t.filter(e=>!f3.has(String(e)));n.length===0?delete e.properties.className:e.properties.className=n}}var g3=/^gmail_/,_3=()=>e=>{v3(e)};function v3(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&v3(t);let t=0;for(;t<e.children.length;){let n=e.children[t];if(n.type!==`element`){t++;continue}let r=n;if(r.tagName===`div`&&y3(r,`gmail_quote`)&&(r.tagName=`blockquote`),b3(r),x3(r)){e.children.splice(t,1,...r.children);continue}t++}}function y3(e,t){let n=e.properties?.className;return Array.isArray(n)?n.some(e=>String(e)===t):!1}function b3(e){let t=e.properties?.className;if(!Array.isArray(t))return;let n=t.filter(e=>!g3.test(String(e)));n.length===0?delete e.properties?.className:e.properties&&(e.properties.className=n)}function x3(e){if(e.tagName!==`div`||e.properties?.dir!==`ltr`)return!1;let t=e.properties?.className;return t!=null&&!(Array.isArray(t)&&t.length===0)?!1:e.children.filter(e=>e.type===`element`).length<=1}var S3=()=>e=>{C3(e)};function C3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&C3(t);e.children=e.children.flatMap(e=>{if(e.type!==`element`)return[e];let t=e;return t.tagName===`google-sheets-html-origin`?t.children:t.tagName===`style`?[]:(w3(t),[t])})}}function w3(e){if(e.properties)for(let t of Object.keys(e.properties))t.startsWith(`dataSheets`)&&delete e.properties[t]}var T3=[`o:`,`w:`,`m:`,`v:`,`u1:`],E3=/^Mso[A-Z]/,D3=/^\s*\[if\s+[^\]]*\]/,O3=()=>e=>{k3(e)};function k3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&k3(t);e.children=e.children.flatMap(e=>{if(e.type===`comment`){let t=String(e.value??``);return D3.test(t)?[]:[e]}if(e.type!==`element`)return[e];let t=e;return A3(t)?[]:(j3(t),[t])})}}function A3(e){return T3.some(t=>e.tagName.startsWith(t))}function j3(e){let t=e.properties;if(!t)return;let n=t.className;if(Array.isArray(n)){let e=n.filter(e=>typeof e==`string`&&!E3.test(e));e.length===0?delete t.className:t.className=e}else typeof n==`string`&&E3.test(n)&&delete t.className;let r=t.style;typeof r==`string`&&/mso-/i.test(r)&&delete t.style;for(let e of Object.keys(t))if(e.startsWith(`xmlns:`)){let n=e.slice(6);T3.some(e=>e===`${n}:`)&&delete t[e]}}var M3=/^c-(message_kit__|message__|compose|timestamp)/,N3=()=>e=>{P3(e)};function P3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&P3(t);e.children=e.children.flatMap(e=>{if(e.type!==`element`)return[e];let t=e;return F3(t)?[]:(I3(t),[t])})}}function F3(e){let t=e.properties?.className;return Array.isArray(t)?t.some(e=>String(e)===`c-timestamp`||String(e).startsWith(`c-timestamp`)):!1}function I3(e){let t=e.properties?.className;if(!Array.isArray(t))return;let n=t.filter(e=>!M3.test(String(e)));n.length===0?delete e.properties?.className:e.properties&&(e.properties.className=n)}var L3=()=>e=>{R3(e)};function R3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&R3(t);for(let t=0;t<e.children.length;t++){let n=e.children[t];if(n.type!==`element`)continue;let r=n;z3(r)&&(e.children[t]=V3(r))}}}function z3(e){if(e.tagName!==`div`)return!1;let t=e.children.filter(e=>e.type===`element`&&e.tagName===`div`);return t.length<2?!1:t.some(e=>B3(e))}function B3(e){for(let t of e.children){if(t.type!==`element`)continue;let e=t,n=e.properties?.style;if(typeof n==`string`&&/color\s*:/i.test(n)||B3(e))return!0}return!1}function V3(e){return{type:`element`,tagName:`pre`,properties:{},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:e.children.filter(e=>e.type===`element`&&e.tagName===`div`).map(e=>H3(e)).join(`
|
|
471
471
|
`)}]}]}}function H3(e){let t=``;for(let n of e.children)n.type===`text`?t+=n.value??``:n.type===`element`&&(t+=H3(n));return t}var U3=class extends Error{htmlBytes;maxBytes;constructor(e,t){super(`HTML payload (${e} bytes) exceeds htmlToMdast ceiling (${t} bytes); falling through to plain text`),this.name=`HtmlPayloadTooLargeError`,this.htmlBytes=e,this.maxBytes=t}},W3=[c3,O3,n3,_3,Z4,L3,S3,N3,p3];function G3(e){jF(e,e=>{e.type===`strong`?(e.data??={},e.data.sourceDelimiter=`**`):e.type===`emphasis`?(e.data??={},e.data.sourceDelimiter=`*`):e.type===`inlineCode`?(e.data??={},e.data.sourceFenceChar="`",e.data.sourceFenceLength=1):e.type===`code`&&(e.data??={},e.data.sourceFenceChar="`",e.data.sourceFenceLength=3)})}function K3(e,t){let n=t?.maxBytes??5242880;if(e.length>n)throw new U3(e.length,n);let r=SU().use(kP,{fragment:!0});for(let e of W3)r.use(e);for(let e of t?.additionalCleanupPlugins??[])r.use(e);r.use(AL);let i=r.parse(e),a=r.runSync(i);return G3(a),a}function q3(e){return String(SU().use(pU).use(mU).stringify(e))}function J3(e,t){let n=Array.isArray(e.attrs.attributes)?e.attrs.attributes.filter(e=>typeof e==`object`&&!!e&&`type`in e):[],r=e.attrs.props??{},i=new Map,a=new Set;if(t)for(let e of t)e.omitOnDefault===!0&&`defaultValue`in e&&e.defaultValue!==void 0&&i.set(e.name,e.defaultValue),e.type===`string`&&e.required===!1&&e.defaultValue===void 0&&a.add(e.name);for(let[e,t]of Object.entries(r)){let r=n.findIndex(t=>t.type===`mdxJsxAttribute`&&t.name===e);if(i.has(e)&&Object.is(i.get(e),t)){r>=0&&n.splice(r,1);continue}if(a.has(e)&&t===``){r>=0&&n.splice(r,1);continue}if(r>=0){let e=n[r];if(e.type===`mdxJsxAttribute`&&e.value!=null&&typeof e.value==`object`&&e.value.type===`mdxJsxAttributeValueExpression`&&Y3(e.value.value,t))continue}let o=X3(e,t);r>=0?n[r]=o:n.push(o)}return n}function Y3(e,t){try{return JSON.stringify(JSON.parse(e))===JSON.stringify(t)}catch{return!1}}function X3(e,t){if(t===!0)return{type:`mdxJsxAttribute`,name:e,value:null};if(t===!1)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:`false`}};if(t==null)return{type:`mdxJsxAttribute`,name:e,value:null};if(typeof t==`string`)return{type:`mdxJsxAttribute`,name:e,value:t};if(typeof t==`number`)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:JSON.stringify(t)}};if(typeof t==`object`){let n;try{n=JSON.stringify(t)}catch{n=String(t)}return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:n}}}return{type:`mdxJsxAttribute`,name:e,value:String(t)}}function Z3(e,t,n,r){return{type:`mdxJsxFlowElement`,name:e,attributes:J3(t,r),children:n.all(t),data:{}}}var Q3=/^[A-Za-z0-9]{20,}$/,$3=/^(?:\d+s?|(?:\d+h)?(?:\d+m)?(?:\d+s)?)$/;function e6(e){let t=e.toLowerCase();return t===`loom.com`||t===`www.loom.com`}function t6(e){let t=e.pathname.match(/^\/(?:share|embed)\/([A-Za-z0-9]+)\/?$/);if(!t)return null;let n=t[1]??``;return Q3.test(n)?n:null}function n6(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!e6(t.hostname))return null;let n=t6(t);if(!n)return null;let r=t.searchParams.get(`t`);return{id:n,startRaw:r&&r.length>0&&$3.test(r)?r:null}}function r6(e){return n6(e)!==null}function i6(e){let t=e.toLowerCase();return t===`vimeo.com`||t===`www.vimeo.com`||t===`player.vimeo.com`}function a6(e){if(typeof e!=`string`||e.length===0)return!1;let t;try{t=new URL(e)}catch{return!1}return t.protocol!==`http:`&&t.protocol!==`https:`?!1:i6(t.hostname)}var o6=/^[A-Za-z0-9_-]{11}$/;function s6(e){let t=e.toLowerCase();return t===`youtube.com`||t===`www.youtube.com`||t===`m.youtube.com`||t===`music.youtube.com`||t===`youtu.be`||t===`youtube-nocookie.com`||t===`www.youtube-nocookie.com`}function c6(e){if(e.length===0)return null;if(/^[0-9]+$/.test(e)){let t=Number.parseInt(e,10);return t>0?t:null}let t=e.match(/^(?:([0-9]+)h)?(?:([0-9]+)m)?(?:([0-9]+)s?)?$/);if(!t)return null;let n=t[1]?Number.parseInt(t[1],10):0,r=t[2]?Number.parseInt(t[2],10):0,i=t[3]?Number.parseInt(t[3],10):0,a=n*3600+r*60+i;return a>0?a:null}function l6(e){if(e.hostname.toLowerCase()===`youtu.be`){let t=e.pathname.replace(/^\//,``).split(`/`)[0]??``;return o6.test(t)?t:null}if(e.pathname===`/watch`){let t=e.searchParams.get(`v`)??``;return o6.test(t)?t:null}let t=e.pathname.match(/^\/(?:embed|shorts|v)\/([A-Za-z0-9_-]{11})\/?$/);return t?t[1]??null:null}function u6(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!s6(t.hostname))return null;let n=l6(t);if(!n)return null;let r=t.searchParams.get(`t`)??t.searchParams.get(`start`)??``;return{id:n,startSeconds:r.length>0?c6(r):null,noCookie:t.hostname.toLowerCase().endsWith(`youtube-nocookie.com`)}}var d6=[{name:`type`,type:`enum`,enumValues:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`],defaultValue:`note`,required:!1,description:`Callout variant`},{name:`title`,type:`string`,required:!1,description:`Optional heading shown above the body`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Lightbulb`)",iconPicker:!0},{name:`color`,type:`string`,required:!1,advanced:!0,description:"Optional accent color override (hex — e.g. `#F05032`)",colorPicker:!0},{name:`collapsible`,type:`boolean`,required:!1,defaultValue:!1,advanced:!0,description:"Render as a foldable `<details>` (Obsidian `[!TYPE]+/-`)"},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,description:`When collapsible, start in the open state`,hideWhen:e=>e.collapsible!==!0},{name:`children`,type:`reactnode`,required:!0,description:`Callout content`}],f6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Image source URL`,accept:M1,autoFocus:!0},{name:`alt`,type:`string`,required:!0,description:`Alt text`},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Image width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Image height`},{name:`srcset`,type:`string`,required:!1,advanced:!0,description:`Responsive image candidate set (e.g. "x.png 1x, y.png 2x")`},{name:`sizes`,type:`string`,required:!1,advanced:!0,description:`Responsive image sizes hint paired with srcset`},{name:`loading`,type:`enum`,enumValues:[`eager`,`lazy`],defaultValue:`lazy`,required:!1,advanced:!0,omitOnDefault:!0,description:`Native img loading strategy (defaults to lazy)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`decoding`,type:`enum`,enumValues:[`sync`,`async`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Hint for how the browser should decode the image`},{name:`fetchpriority`,type:`enum`,enumValues:[`high`,`low`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Resource fetch priority hint`},{name:`crossorigin`,type:`enum`,enumValues:[`anonymous`,`use-credentials`],required:!1,advanced:!0,description:`CORS mode for the image fetch`},{name:`referrerpolicy`,type:`string`,required:!1,advanced:!0,description:`Referrer policy for the image fetch (HTML referrerpolicy values)`},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],p6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Embedded page URL (must start with http:// or https://)`,autoFocus:!0},{name:`title`,type:`string`,required:!1,description:`Iframe title (accessible label for screen readers)`},{name:`width`,type:`string`,required:!1,advanced:!0,description:`Embed width as a CSS length (e.g. "100%", "640px")`,cssLengthInput:!0},{name:`height`,type:`string`,required:!1,advanced:!0,description:`Embed height as a CSS length (e.g. "26rem", "480px")`,cssLengthInput:!0},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],m6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Video source URL`,accept:N1,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 video controls (defaults to true)`,hideWhen:e=>typeof e.src==`string`&&(a6(e.src)||r6(e.src))},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`poster`,type:`string`,required:!1,advanced:!0,description:`Poster image URL shown before playback`,accept:M1,hideWhen:e=>typeof e.src==`string`&&(a6(e.src)||r6(e.src))},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Video width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Video height`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`,hideWhen:e=>typeof e.src==`string`&&r6(e.src)},{name:`playsinline`,type:`boolean`,required:!1,advanced:!0,description:`Play inline on iOS rather than entering fullscreen`,hideWhen:e=>typeof e.src==`string`&&(a6(e.src)||r6(e.src))},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the video to preload`,hideWhen:e=>typeof e.src==`string`&&(u6(e.src)!==null||a6(e.src)||r6(e.src))},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],h6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Audio source URL`,accept:P1,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 audio controls (defaults to true)`},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the audio to preload`}],g6=[{name:`title`,type:`string`,required:!0,description:`Accordion heading shown inside the <summary>`},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!1,description:`When true, the accordion renders expanded on initial load`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Rocket`)",iconPicker:!0},{name:`description`,type:`string`,required:!1,advanced:!0,description:`Optional subtitle rendered below the title inside <summary>`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#advanced-options`)"},{name:`name`,type:`string`,required:!1,advanced:!0,description:`HTML5 <details name=> group — siblings with the same name are mutually exclusive`}],_6=[d6[0],d6[1],d6[4],d6[5],d6[6]],v6=[f6[0],f6[1],f6[7]],y6=[g6[0],g6[1],g6[4],g6[5]],b6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Alt text (Obsidian alias syntax: `![[file.png|alt text]]`)"}],x6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[clip.mp4|title]]`)"}],S6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[song.mp3|title]]`)"}],C6=[{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#install-tabs`)"}],w6=[{name:`label`,type:`string`,required:!0,autoFocus:!0,defaultValue:`Tab`,description:`Tab strip label — shown in the clickable pill at the top`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#tab-npm`)"}],T6=[{name:`formula`,type:`string`,required:!0,autoFocus:!0,language:`latex`,description:`LaTeX math source (rendered with KaTeX in the browser)`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#eq-pythagoras`)"},{name:`language`,type:`string`,required:!1,advanced:!0,description:"Forward-compat hint for the math source language (default `latex`). Reserved for future MathJax / Typst / AsciiMath substrates."}],E6=[T6[0]],D6=[T6[0]],O6=[{name:`chart`,type:`string`,required:!0,hidden:!0,description:`Mermaid chart source (graph / flowchart / sequenceDiagram / class / state / etc.)`}],k6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Display name override (Obsidian alias syntax: `![[file.zip|label]]`)"}],A6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`File URL`,accept:[`*/*`],autoFocus:!0}],j6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`PDF source URL`,accept:F1,autoFocus:!0},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Accessible label for the embedded PDF viewer`},{name:`anchor`,type:`string`,required:!1,advanced:!0,description:"PDF viewer parameters as a single URL-fragment string (e.g. `page=3&height=600`)"}],M6=[{name:`src`,type:`string`,required:!0,description:"Path of the source doc, extension-less (e.g. `api-spec`).",autoFocus:!0},{name:`anchor`,type:`string`,required:!0,description:"Id of the `<MirrorSource>` block within the source doc."}],N6=[{name:`id`,type:`string`,required:!0,description:"Stable id agents and authors use to reference this block from `<Mirror>` elsewhere.",autoFocus:!0},{name:`children`,type:`reactnode`,required:!0,description:`Block content this MirrorSource owns — paragraphs, callouts, code, nested JSX, anything.`}];function P6(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`).replace(/>/g,`>`)}function F6(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function I6(e){let t=e.attrs.props,n=t?.target??``,r=typeof t?.alias==`string`&&t.alias.length>0?t.alias:null,i=typeof t?.anchor==`string`&&t.anchor.length>0?t.anchor:null,a=r??(i?`${n}#${i}`:n);return{type:`wikiLinkEmbed`,value:a,data:{target:n,anchor:i,alias:r},children:[{type:`text`,value:a}]}}var L6=[{name:`Callout`,surface:`canonical`,hasChildren:!0,props:d6,icon:`MessageSquareWarning`,category:`content`,displayName:`Callout`,description:`Alert / admonition with 15 type variants — 5 GFM (note, tip, important, warning, caution) plus 10 Obsidian-parity (abstract, info, todo, success, question, failure, danger, bug, example, quote)`,searchTerms:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`,`alert`,`admonition`,`callout`],serialize:(e,t)=>Z3(`Callout`,e,t,d6)},{name:`img`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:f6,icon:`Image`,category:`media`,displayName:`Image`,description:`Image with click-to-zoom and HTML-native attributes`,searchTerms:[`image`,`zoom`,`picture`,`photo`],placeholder:{label:`Add an image`},serialize:(e,t)=>Z3(`img`,e,t,f6)},{name:`video`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:m6,icon:`SquarePlay`,category:`media`,displayName:`Video`,description:`HTML5 video player with native controls`,searchTerms:[`video`,`media`,`player`,`mp4`,`webm`,`movie`],placeholder:{label:`Add a video`},serialize:(e,t)=>Z3(`video`,e,t,m6)},{name:`audio`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:h6,icon:`Volume2`,category:`media`,displayName:`Audio`,description:`HTML5 audio player with native controls`,searchTerms:[`audio`,`sound`,`music`,`mp3`,`podcast`,`player`],placeholder:{label:`Add audio`},serialize:(e,t)=>Z3(`audio`,e,t,h6)},{name:`Pdf`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:j6,icon:`FileText`,category:`media`,displayName:`PDF`,description:"Embedded PDF viewer (`#page=N` to open at page N, `#height=N` for viewer height)",searchTerms:[`pdf`,`document`,`embed`,`pdfjs`],placeholder:{label:`Add a PDF`},serialize:(e,t)=>Z3(`Pdf`,e,t,j6)},{name:`File`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:A6,icon:`Paperclip`,category:`media`,displayName:`File`,description:`Downloadable file attachment — inline row with name + size + download link`,searchTerms:[`file`,`attachment`,`download`,`document`,`zip`,`docx`,`doc`],placeholder:{label:`Add a file`},serialize:(e,t)=>Z3(`File`,e,t,A6)},{name:`Embed`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:p6,icon:`AppWindow`,category:`media`,displayName:`Embed`,description:'Inline web embed (iframe) — drop a URL, get a resizable preview pane. For YouTube / Vimeo / Loom prefer `<video src="…">` (player props, click-facade); `<Embed>` auto-rewrites watch URLs as a fallback.',searchTerms:[`embed`,`iframe`,`website`,`page`,`inline`,`frame`,`preview`],placeholder:{label:`Embed a URL`},serialize:(e,t)=>Z3(`Embed`,e,t,p6)},{name:`Accordion`,surface:`canonical`,hasChildren:!0,props:g6,icon:`ChevronRight`,category:`content`,displayName:`Accordion`,description:"Standalone expand/collapse via native HTML5 <details>/<summary>. Group siblings with the `name` prop for exclusive-accordion UX.",searchTerms:[`toggle`,`accordion`,`expandable`,`details`,`disclosure`,`collapse`,`fold`],exampleBody:`Body content revealed when the accordion is expanded.`,serialize:(e,t)=>Z3(`Accordion`,e,t,g6)},{name:`Tabs`,surface:`canonical`,hasChildren:!0,emptyChildName:`Tab`,props:C6,icon:`LayoutPanelTop`,category:`content`,displayName:`Tabs`,description:"Horizontal tab strip + active panel below. Each `<Tab>` child is one panel; clickable pills at the top switch the active one. Active selection is ephemeral (resets on reload).",searchTerms:[`tabs`,`tabbed`,`panels`,`tabgroup`,`switcher`],exampleBody:`<Tab label="One">Body of the first tab panel.</Tab>
|