@inkeep/open-knowledge 0.23.0-beta.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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-0K90zZ6-.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/dist/init-BJhSkdhJ.mjs +1 -0
- package/dist/{init-BAchXUWY.mjs → init-BzAK7uGG.mjs} +3 -3
- package/dist/loader-CqQXv5Mm.mjs +1 -0
- package/dist/{loader-D-N_5DSM.mjs → loader-DGXLaU2-.mjs} +2 -2
- package/dist/preview-CHZakZ3S.mjs +1 -0
- package/dist/{preview-Cb-Tve3b.mjs → preview-Dg9Tq8Xb.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-9XCQ9Z0n.js → ActivityModeContent-DuK6EIWn.js} +1 -1
- package/dist/public/assets/{DocumentContext-CxuCOL3F.js → DocumentContext-DTG-EM-W.js} +1 -1
- package/dist/public/assets/{GraphPanel-CcGTaMf4.js → GraphPanel-B7rLBrzx.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-K_ZzAVT_.js → ManagedArtifactProperties--nQDz9SF.js} +1 -1
- package/dist/public/assets/{PropertyPanel-BkabLXZi.js → PropertyPanel-BVXfm1H7.js} +1 -1
- package/dist/public/assets/{SettingsDialogBody-BMgCA2W4.js → SettingsDialogBody-DPkO8_8n.js} +2 -2
- package/dist/public/assets/{SkillEditorActions-C-7EFsSN.js → SkillEditorActions-CMgQx71p.js} +1 -1
- package/dist/public/assets/{SourceEditor-9yu3eX76.js → SourceEditor-Uu4c0f8m.js} +1 -1
- package/dist/public/assets/{TerminalPanel-CPVd0vvL.js → TerminalPanel-DBiCU03J.js} +1 -1
- package/dist/public/assets/{config-validation-events-CkhowzCr.js → config-validation-events-Bchl_sU_.js} +1 -1
- package/dist/public/assets/{dist-Cr5rBmsS.js → dist-Cmfs-Ydn.js} +1 -1
- package/dist/public/assets/{documents-events-ByHs7TM8.js → documents-events-BZ-NuT20.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-BDGjZF-e.js → file-tree-adapter-k_pkZ3zh.js} +1 -1
- package/dist/public/assets/index-DNsM6i00.js +2005 -0
- package/dist/public/assets/{keyboard-shortcuts-Cz6SaKiO.js → keyboard-shortcuts-DdtsPkF4.js} +1 -1
- package/dist/public/assets/{navigation-targets-BOxue0K8.js → navigation-targets-DosY_GDn.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-Cn09qWZu.js → open-managed-artifact-tab-HL4UJ8d1.js} +1 -1
- package/dist/public/assets/{prop-types-BmdzUa9L.js → prop-types-BpxMt5L_.js} +1 -1
- package/dist/public/assets/{selection-context-CdWYTF7J.js → selection-context-BiHZzt5n.js} +1 -1
- package/dist/public/assets/{skill-actions-NJAPgsEi.js → skill-actions-DMtg_juC.js} +1 -1
- package/dist/public/assets/{skills-api-ZxZlVX-t.js → skills-api-C9-REwRl.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-HF00SsJp.js → target-navigation-intent-CdbY7hfn.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-cW8VWJ23.js → typing-burst-detector-DA2tmuzu.js} +1 -1
- package/dist/public/index.html +16 -16
- package/dist/{repair-launch-json-COOiQwrp.mjs → repair-launch-json-ClD75fWF.mjs} +2 -2
- package/dist/{repair-mcp-configs-C23XZD6B.mjs → repair-mcp-configs-Cvf9Ovm9.mjs} +2 -2
- package/dist/{src-CCldBFqy.mjs → src-Dh5W5BmT.mjs} +2 -2
- package/dist/{start-CoR7tC3u.mjs → start-BIzgGXFb.mjs} +2 -2
- package/dist/start-D9MYAD1l.mjs +1 -0
- package/package.json +1 -1
- package/dist/constants-DyKviaQH.mjs +0 -2
- package/dist/init-DbWd2nIN.mjs +0 -1
- package/dist/loader-DbR-05ZL.mjs +0 -1
- package/dist/preview-CYh9Kdkk.mjs +0 -1
- package/dist/public/assets/index-CgdfNZbZ.js +0 -2005
- package/dist/start-Dj9zGn8k.mjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{r as i}from"./dist-CQw2y-s3.js";import{Ct as a,Gi as o,Rt as s,yr as c}from"./dist-
|
|
1
|
+
import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{r as i}from"./dist-CQw2y-s3.js";import{Ct as a,Gi as o,Rt as s,yr as c}from"./dist-Cmfs-Ydn.js";import{l,t as u}from"./button-DGf25ccp.js";import{n as d,r as f}from"./dist-BLu8fLv5.js";import{T as p,f as m,m as h}from"./file-tree-adapter-k_pkZ3zh.js";var g=r(),_=2,v=1,y=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(_,Math.floor(u/e.css.cell.width)),rows:Math.max(v,Math.floor(l/e.css.cell.height))}}},b=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],x=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],S;function C(e,t){let n=0,r=t.length-1,i;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=n;)if(i=n+r>>1,e>t[i][1])n=i+1;else if(e<t[i][0])r=i-1;else return!0;return!1}var w=class{constructor(){if(this.version=`6`,!S){S=new Uint8Array(65536),S.fill(1),S[0]=0,S.fill(0,1,32),S.fill(0,127,160),S.fill(2,4352,4448),S[9001]=2,S[9002]=2,S.fill(2,11904,42192),S[12351]=1,S.fill(2,44032,55204),S.fill(2,63744,64256),S.fill(2,65040,65050),S.fill(2,65072,65136),S.fill(2,65280,65377),S.fill(2,65504,65511);for(let e=0;e<b.length;++e)S.fill(0,b[e][0],b[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?S[e]:C(e,x)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let n=this.wcwidth(e),r=n===0&&t!==0;if(r){let e=Ke.extractWidth(t);e===0?r=!1:e>n&&(n=e)}return Ke.createPropertyValue(0,n,r)}},T=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?ne.isErrorNoTelemetry(e)?new ne(e.message+`
|
|
2
2
|
|
|
3
3
|
`+e.stack):Error(e.message+`
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{C as i,Cr as a,E as o,S as s,T as c,Xn as l,Yn as u,Zn as d,n as f,qn as p,w as m,x as h,xr as g,yr as _}from"./DocumentContext-
|
|
1
|
+
import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{C as i,Cr as a,E as o,S as s,T as c,Xn as l,Yn as u,Zn as d,n as f,qn as p,w as m,x as h,xr as g,yr as _}from"./DocumentContext-DTG-EM-W.js";import{n as v,r as y}from"./dist-CQw2y-s3.js";import{Et as b,Mi as x,Tr as S,_t as C,ft as w,gt as T,ht as E,rt as D,vt as O,xr as k}from"./dist-Cmfs-Ydn.js";import{c as A,l as j,t as M,u as N}from"./button-DGf25ccp.js";import{i as P}from"./toggle-group-Bwdb9pNj.js";import{_ as F,a as I,c as L,i as R,n as z,o as B,r as V,s as ee,t as H}from"./dialog-Bt8vN5IM.js";import{c as U,u as W}from"./prop-types-BpxMt5L_.js";import{A as G,D as K,f as q,i as te,o as ne,p as re}from"./skill-actions-DMtg_juC.js";import{a as ie,d as ae,l as oe,n as se,o as ce,p as le,r as ue,u as de}from"./config-context-DhhN0rlf.js";import{a as fe,n as pe,r as me}from"./open-managed-artifact-tab-HL4UJ8d1.js";import{n as he,r as ge}from"./dist-BLu8fLv5.js";import{c as _e,l as ve,o as ye,u as J}from"./documents-events-BZ-NuT20.js";import{t as be}from"./trace-api-D2bW5RZv.js";import{t as xe}from"./external-link-CJXR-UFu.js";import{f as Se}from"./dist-CPXhSDT0.js";import{i as Ce,n as we,t as Te}from"./tooltip-D-omjYEX.js";import{T as Ee,_ as De,h as Oe,l as ke,p as Ae}from"./skills-api-C9-REwRl.js";import{t as je}from"./label-Bg6tgeFh.js";import{n as Me,t as Ne}from"./radio-group-_aqBV1Ev.js";import{t as Pe}from"./input-CFm7DcvJ.js";import{C as Fe,c as Ie,x as Le}from"./navigation-targets-DosY_GDn.js";import{c as Re,l as ze}from"./keyboard-shortcuts-DdtsPkF4.js";import{t as Be}from"./textarea-D3MecMx5.js";var Ve=N(`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`}]]),He=N(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Ue=N(`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`}]]),We=N(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),Ge=N(`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`}]]),Ke=N(`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`}]]),qe=N(`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`}]]),Je=N(`git-commit-vertical`,[[`path`,{d:`M12 3v6`,key:`1holv5`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M12 15v6`,key:`a9ows0`}]]),Ye=N(`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`}]]),Xe=N(`move-up-right`,[[`path`,{d:`M13 5H19V11`,key:`1n1gyv`}],[`path`,{d:`M19 5L5 19`,key:`72u4yj`}]]),Ze=N(`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`}]]),Y=n(),X=e(t(),1),Z=r();async function Qe(e){try{let t=await e.json(),n=D.safeParse(t);if(n.success)return n.data.title}catch{}}async function $e(e,t){return fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t??{})})}function et(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 tt(){return{async status(e){let t=e?.host??`github.com`,n=await $e(`/api/local-op/auth/status`,e);if(!n.ok)return{authenticated:!1,host:t,error:await Qe(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 $e(`/api/local-op/auth/repos`,e);if(!n.ok)return{ok:!1,error:await Qe(n)??`Failed to fetch repositories`};let r=et(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 $e(`/api/local-op/auth/signout`,e);return t.ok?{ok:!0}:{ok:!1,error:await Qe(t)}}}}function nt(e){return{status:t=>e.localOp.authStatus(t),repos:t=>e.localOp.authRepos(t)}}async function rt(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 it(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 at(){return{start(){return it((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=D.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 rt(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 ot(e){return{start(){return e.localOp.auth.start()}}}var st=`Separator`,ct=`horizontal`,lt=[`horizontal`,`vertical`],ut=X.forwardRef((e,t)=>{let{decorative:n,orientation:r=ct,...i}=e,a=dt(r)?r:ct,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,Y.jsx)(Se.div,{"data-orientation":a,...o,...i,ref:t})});ut.displayName=st;function dt(e){return lt.includes(e)}var ft=ut;async function pt(e){try{await navigator.clipboard.writeText(e)}catch{}}var mt=120*1e3;function ht(e){let t=(0,Z.c)(25),{onSuccess:n,transport:r}=e,{_:i}=y(),[a,o]=(0,X.useState)(null),[s,c]=(0,X.useState)(`https://github.com/login/device`),[l,u]=(0,X.useState)(!1),[d,f]=(0,X.useState)(null),[p,m]=(0,X.useState)(mt),h=(0,X.useRef)(null),g=(0,X.useRef)(null),_;t[0]!==i||t[1]!==n||t[2]!==r?(_=async function(){f(null);try{let e=r.start();h.current=e.cancel;let t=e.events[Symbol.asyncIterator](),a=!1,s=await t.next();for(;!s.done;){let e=s.value;if(e.type===`verification`)o(e.user_code),c(e.verification_uri),m(e.expires_in*1e3),pt(e.user_code).then(()=>{u(!0),setTimeout(()=>u(!1),2e3)});else if(e.type===`complete`){a=!0,n({login:e.login,name:e.name,email:e.email,avatarUrl:e.avatarUrl});break}else if(e.type===`error`){a=!0,f(e.message);break}s=await t.next()}a||f(i({id:`DskIkK`}))}catch(e){let t=e;t instanceof Error&&t.name!==`AbortError`&&f(i({id:`Q5fqMz`}))}},t[0]=i,t[1]=n,t[2]=r,t[3]=_):_=t[3];let b=_,x;t[4]===b?x=t[5]:(x=()=>{let e=!1;return queueMicrotask(()=>{e||b()}),()=>{e=!0,h.current?.(),h.current=null,g.current&&clearInterval(g.current)}},t[4]=b,t[5]=x);let S;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(S=[],t[6]=S):S=t[6],(0,X.useEffect)(x,S);let C,w;t[7]!==i||t[8]!==a?(C=()=>{if(!a)return;let e=Date.now();return g.current=setInterval(()=>{let t=mt-(Date.now()-e);t<=0?(m(0),g.current&&clearInterval(g.current),f(i({id:`ve8vEM`}))):m(t)},1e3),()=>{g.current&&clearInterval(g.current)}},w=[a,i],t[7]=i,t[8]=a,t[9]=C,t[10]=w):(C=t[9],w=t[10]),(0,X.useEffect)(C,w);let T=Math.floor(p/6e4),E=Math.floor(p%6e4/1e3),D;t[11]===E?D=t[12]:(D=E.toString().padStart(2,`0`),t[11]=E,t[12]=D);let O=`${T}:${D}`,k;t[13]!==i||t[14]!==l||t[15]!==d||t[16]!==O||t[17]!==a||t[18]!==s?(k=a?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,Y.jsx)(v,{id:`eVPynQ`,values:{verificationUri:s},components:{0:(0,Y.jsx)(`a`,{href:s,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>xe(e,s),onAuxClick:e=>xe(e,s),className:`inline-flex items-center gap-0.5 text-foreground hover:text-primary hover:underline`}),1:(0,Y.jsx)(`span`,{}),2:(0,Y.jsx)(P,{className:`inline size-3.5`,"aria-hidden":!0})}})}),(0,Y.jsxs)(M,{type:`button`,variant:`outline`,"aria-label":i({id:`nCzR-G`,values:{userCode:a}}),onClick:()=>void pt(a).then(()=>{u(!0),setTimeout(()=>u(!1),2e3)}),className:`relative h-auto w-full justify-center rounded-md bg-muted px-12 py-3 hover:bg-muted/80`,children:[(0,Y.jsx)(`code`,{className:`font-mono text-2xl font-bold tracking-widest`,children:a}),(0,Y.jsx)(`span`,{className:`absolute right-3 text-muted-foreground`,"aria-hidden":`true`,children:l?(0,Y.jsx)(F,{className:`size-4`}):(0,Y.jsx)(le,{className:`size-4`})})]}),(0,Y.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,children:l?(0,Y.jsx)(v,{id:`80c4-P`}):null}),(0,Y.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,Y.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,Y.jsx)(`span`,{className:`size-1.5 rounded-full bg-amber-500 animate-pulse`}),(0,Y.jsx)(v,{id:`5y_9lO`})]}),(0,Y.jsx)(`span`,{children:(0,Y.jsx)(v,{id:`gYz2ep`,values:{timeLabel:O}})})]})]}):(0,Y.jsx)(`div`,{className:`flex items-center justify-center py-6 text-sm text-muted-foreground`,children:d?null:(0,Y.jsx)(v,{id:`aWlJai`})}),t[13]=i,t[14]=l,t[15]=d,t[16]=O,t[17]=a,t[18]=s,t[19]=k):k=t[19];let A;t[20]===d?A=t[21]:(A=d&&(0,Y.jsx)(`p`,{className:`text-1sm text-destructive`,children:d}),t[20]=d,t[21]=A);let j;return t[22]!==k||t[23]!==A?(j=(0,Y.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[k,A]}),t[22]=k,t[23]=A,t[24]=j):j=t[24],j}function gt(e){let t=(0,Z.c)(30),{login:n,name:r,onNameChange:i,email:a,onEmailChange:o}=e,{_:s}=y(),c;t[0]===n?c=t[1]:(c=(0,Y.jsx)(`p`,{className:`text-sm font-medium`,children:(0,Y.jsx)(v,{id:`E_tNGD`,values:{login:n}})}),t[0]=n,t[1]=c);let l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Y.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,Y.jsx)(v,{id:`gp3I7-`})}),t[2]=l):l=t[2];let u;t[3]===s?u=t[4]:(u=s({id:`6YtxFj`}),t[3]=s,t[4]=u);let d;t[5]!==s||t[6]!==n?(d=s({id:`J2Mv98`,values:{login:n}}),t[5]=s,t[6]=n,t[7]=d):d=t[7];let f;t[8]===i?f=t[9]:(f=e=>i(e.target.value),t[8]=i,t[9]=f);let p;t[10]!==r||t[11]!==u||t[12]!==d||t[13]!==f?(p=(0,Y.jsx)(Pe,{"aria-label":u,placeholder:d,value:r,onChange:f}),t[10]=r,t[11]=u,t[12]=d,t[13]=f,t[14]=p):p=t[14];let m;t[15]===s?m=t[16]:(m=s({id:`O3oNi5`}),t[15]=s,t[16]=m);let h;t[17]===s?h=t[18]:(h=s({id:`O3oNi5`}),t[17]=s,t[18]=h);let g;t[19]===o?g=t[20]:(g=e=>o(e.target.value),t[19]=o,t[20]=g);let _;t[21]!==a||t[22]!==m||t[23]!==h||t[24]!==g?(_=(0,Y.jsx)(Pe,{type:`email`,"aria-label":m,placeholder:h,value:a,onChange:g}),t[21]=a,t[22]=m,t[23]=h,t[24]=g,t[25]=_):_=t[25];let b;return t[26]!==c||t[27]!==_||t[28]!==p?(b=(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[c,l,p,_]}),t[26]=c,t[27]=_,t[28]=p,t[29]=b):b=t[29],b}var _t=1e4;function vt(e){let t=(0,Z.c)(59),{open:n,onOpenChange:r,onSuccess:i,identityPrompt:a,reauth:o,transport:s,queryTransport:c}=e,{_:l}=y(),u;t[0]===s?u=t[1]:(u=s??at(),t[0]=s,t[1]=u);let d=u,f;t[2]===c?f=t[3]:(f=c??tt(),t[2]=c,t[3]=f);let p=f,[m,h]=(0,X.useState)(`auth`),[g,_]=(0,X.useState)(null),[b,x]=(0,X.useState)(``),[S,C]=(0,X.useState)(``),w,T;t[4]!==a||t[5]!==n?(w=()=>{n&&(_(null),x(``),C(``),h(a?`checking`:`auth`))},T=[n,a],t[4]=a,t[5]=n,t[6]=w,t[7]=T):(w=t[6],T=t[7]),(0,X.useLayoutEffect)(w,T);let E;t[8]!==a||t[9]!==n||t[10]!==p?(E=()=>{if(!n||!a)return;let e=!1,t=t=>{e||(e=!0,h(t))},r=setTimeout(()=>t(`auth`),_t);return p.status().then(n=>{e||(n.authenticated?(_({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]=a,t[9]=n,t[10]=p,t[11]=E):E=t[11];let D;t[12]!==a||t[13]!==n?(D=[n,a],t[12]=a,t[13]=n,t[14]=D):D=t[14],(0,X.useEffect)(E,D);let O;t[15]!==l||t[16]!==a||t[17]!==r||t[18]!==i?(O=function(e){if(_(e),a)x(e.name??``),C(e.email??``),h(`identity`);else{h(`done`),i?.(e),r(!1);let t=e.login;he.success(l({id:`E_tNGD`,values:{login:t}}))}},t[15]=l,t[16]=a,t[17]=r,t[18]=i,t[19]=O):O=t[19];let k=O,A;t[20]!==l||t[21]!==g||t[22]!==r||t[23]!==i?(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(yt);let n={...g??{login:``},name:e,email:t};h(`done`),i?.(n),r(!1);let a=n.login;he.success(l({id:`E_tNGD`,values:{login:a}}))},t[20]=l,t[21]=g,t[22]=r,t[23]=i,t[24]=A):A=t[24];let j=A,N;t[25]!==l||t[26]!==g||t[27]!==r||t[28]!==i?(N=function(){if(!g)return;h(`done`),i?.(g),r(!1);let e=g.login;he.success(l({id:`E_tNGD`,values:{login:e}}))},t[25]=l,t[26]=g,t[27]=r,t[28]=i,t[29]=N):N=t[29];let P=N,F;t[30]===r?F=t[31]:(F=function(){r(!1)},t[30]=r,t[31]=F);let I=F,V;t[32]!==a||t[33]!==o||t[34]!==m?(V=(0,Y.jsx)(ee,{children:(0,Y.jsx)(L,{children:o?(0,Y.jsx)(v,{id:`X8kjQX`}):a&&m!==`auth`?(0,Y.jsx)(v,{id:`29XZXN`}):(0,Y.jsx)(v,{id:`3jod3l`})})}),t[32]=a,t[33]=o,t[34]=m,t[35]=V):V=t[35];let U;t[36]===m?U=t[37]:(U=m===`checking`&&(0,Y.jsx)(z,{children:(0,Y.jsx)(`div`,{className:`flex items-center justify-center py-6 text-sm text-muted-foreground`,children:(0,Y.jsx)(v,{id:`gBbxn_`})})}),t[36]=m,t[37]=U);let W;t[38]!==k||t[39]!==I||t[40]!==d||t[41]!==m?(W=m===`auth`&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(z,{children:(0,Y.jsx)(ht,{onSuccess:k,transport:d})}),(0,Y.jsx)(B,{children:(0,Y.jsx)(M,{variant:`outline`,className:`font-mono uppercase`,onClick:I,children:(0,Y.jsx)(v,{id:`dEgA5A`})})})]}),t[38]=k,t[39]=I,t[40]=d,t[41]=m,t[42]=W):W=t[42];let G;t[43]!==g||t[44]!==j||t[45]!==P||t[46]!==S||t[47]!==b||t[48]!==m?(G=m===`identity`&&g&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(z,{children:(0,Y.jsx)(gt,{login:g.login,name:b,onNameChange:x,email:S,onEmailChange:C})}),(0,Y.jsxs)(B,{children:[(0,Y.jsx)(M,{variant:`ghost`,onClick:P,children:(0,Y.jsx)(v,{id:`6Uau97`})}),(0,Y.jsx)(M,{onClick:()=>j(b.trim(),S.trim()),disabled:!b.trim()||!S.trim(),children:(0,Y.jsx)(v,{id:`tfDRzk`})})]})]}),t[43]=g,t[44]=j,t[45]=P,t[46]=S,t[47]=b,t[48]=m,t[49]=G):G=t[49];let K;t[50]!==V||t[51]!==U||t[52]!==W||t[53]!==G?(K=(0,Y.jsxs)(R,{className:`sm:max-w-md`,children:[V,U,W,G]}),t[50]=V,t[51]=U,t[52]=W,t[53]=G,t[54]=K):K=t[54];let q;return t[55]!==r||t[56]!==n||t[57]!==K?(q=(0,Y.jsx)(H,{open:n,onOpenChange:r,children:K}),t[55]=r,t[56]=n,t[57]=K,t[58]=q):q=t[58],q}function yt(){}var bt=null;function xt(){return bt}function St(e){bt=e}function Ct(e){let t=(0,Z.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=j(`animate-pulse rounded-md bg-muted`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Y.jsx)(`div`,{"data-slot":`skeleton`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function wt(e){let t=(0,Z.c)(12),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={status:`idle`},t[0]=n):n=t[0];let[r,i]=(0,X.useState)(n),[a,o]=(0,X.useState)(0),s,c;t[1]===e?(s=t[2],c=t[3]):(s=()=>{if(e!==null)return _e(()=>{o(Ot)})},c=[e],t[1]=e,t[2]=s,t[3]=c),(0,X.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(Et).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,X.useEffect)(l,u);let d;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>o(Tt),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 Tt(e){return e+1}async function Et(e){if(!e.ok){let t=await e.json().catch(Dt);throw Error(ve(t)??`HTTP ${e.status}`)}return e.json()}function Dt(){return null}function Ot(e){return e+1}function kt(){let e=(0,Z.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={status:`idle`},e[0]=t):t=e[0];let[n,r]=(0,X.useState)(t),[i,a]=(0,X.useState)(0),o,s;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>_e(()=>{a(Mt)}),s=[],e[1]=o,e[2]=s):(o=e[1],s=e[2]),(0,X.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(At).then(t=>{if(e)return;let n=b.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,X.useEffect)(c,l),n}async function At(e){if(!e.ok){let t=await e.json().catch(jt);throw Error(ve(t)??`HTTP ${e.status}`)}return e.json()}function jt(){return null}function Mt(e){return e+1}function Nt(e){let t=(0,Z.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=j(`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,Y.jsx)(ft,{"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 Pt(e){let t=(0,Z.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=j(`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,Y.jsx)(`div`,{"data-slot":`field-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Ft=A(`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 It(e){let t=(0,Z.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=j(Ft({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,Y.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 Lt(e){let t=(0,Z.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=j(`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,Y.jsx)(`div`,{"data-slot":`field-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Rt(e){let t=(0,Z.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=j(`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,Y.jsx)(je,{"data-slot":`field-label`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function zt(e){let t=(0,Z.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=j(`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,Y.jsx)(`div`,{"data-slot":`field-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Bt(e){let t=(0,Z.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=j(`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,Y.jsx)(`p`,{"data-slot":`field-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Vt(e){let t=(0,Z.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(Ut)).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,Y.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:r.map(Ht)}),t[7]=r,t[8]=a),o=a}let s=o;if(!s)return null;let c;t[9]===r?c=t[10]:(c=j(`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,Y.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 Ht(e){return e?.message&&(0,Y.jsx)(`li`,{children:e.message},e.message)}function Ut(e){return[e?.message,e]}async function Wt(){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 Gt(e){let t=(0,Z.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,X.useState)(null),o;t[2]===r?o=t[3]:(o=function(){r&&Wt().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,X.useEffect)(c,l);let u;t[8]!==r||t[9]!==s?(u=()=>{if(r)return ye(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,X.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}var Kt=`#settings`;function qt(e){return Re(e.target)?!1:ze(e,`settings`)}function Jt(e){return e.replace(/^#/,``)===`settings`}function Yt(){return typeof window>`u`?``:window.location.hash}function Xt(){let e=(0,Z.c)(4),[t,n]=(0,X.useState)(Qt),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=()=>{(0,X.startTransition)(()=>{n(Jt(Yt()))})};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,X.useEffect)(r,i);let a=Zt,o;return e[2]===t?o=e[3]:(o={open:t,close:a},e[2]=t,e[3]=o),o}function Zt(){typeof window>`u`||Jt(Yt())&&window.history.back()}function Qt(){return Jt(Yt())}async function $t(){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 en(){return tn().status}function tn(){let e=(0,Z.c)(8),[t,n]=(0,X.useState)(null),[r,i]=(0,X.useState)(null),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=function(){$t().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,X.useEffect)(s,c);let l,u;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>ye(e=>{e.includes(`sync-status`)&&o()}),u=[],e[3]=l,e[4]=u):(l=e[3],u=e[4]),(0,X.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 nn=`open-knowledge-app`;function rn(e){try{be.getTracer(nn).startSpan(e).end()}catch(e){console.warn(`[terminal-telemetry] span emit failed:`,e instanceof Error?e:String(e))}}function an(){rn(`ok.desktop.terminalOpened`)}function on(){rn(`ok.desktop.shellConsentGranted`)}function sn(){let e=(0,Z.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(L,{children:(0,Y.jsx)(v,{id:`q_9EcE`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Y.jsxs)(Y.Fragment,{children:[t,(0,Y.jsx)(I,{children:(0,Y.jsx)(v,{id:`n6hXUm`})})]}),e[1]=n):n=e[1],n}function cn(){let e=(0,Z.c)(10),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsxs)(`p`,{className:`flex items-center gap-1.5 text-xs font-semibold font-mono uppercase tracking-wider text-primary`,children:[(0,Y.jsx)(`span`,{"aria-hidden":`true`,className:`mb-[3px] flex items-center justify-center`,children:`◇`}),(0,Y.jsx)(v,{id:`6s7LXO`})]}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Y.jsx)(Ve,{"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,Y.jsx)(`p`,{className:`font-medium`,children:(0,Y.jsx)(v,{id:`cdmk8A`})}),e[2]=r):r=e[2];let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Y.jsxs)(`div`,{className:`flex items-start gap-3`,children:[n,(0,Y.jsxs)(`div`,{className:`space-y-0.5`,children:[r,(0,Y.jsx)(`p`,{className:`text-muted-foreground`,children:(0,Y.jsx)(v,{id:`YaeyFh`})})]})]}),e[3]=i):i=e[3];let a;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Y.jsx)(Je,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),e[4]=a):a=e[4];let o;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Y.jsx)(`p`,{className:`font-medium`,children:(0,Y.jsx)(v,{id:`9i21pa`})}),e[5]=o):o=e[5];let s;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Y.jsxs)(`div`,{className:`flex items-start gap-3`,children:[a,(0,Y.jsxs)(`div`,{className:`space-y-0.5`,children:[o,(0,Y.jsx)(`p`,{className:`text-muted-foreground`,children:(0,Y.jsx)(v,{id:`KIIamL`})})]})]}),e[6]=s):s=e[6];let c;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Y.jsx)(_,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),e[7]=c):c=e[7];let l;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Y.jsx)(`p`,{className:`font-medium`,children:(0,Y.jsx)(v,{id:`8cpeU3`})}),e[8]=l):l=e[8];let u;return e[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Y.jsxs)(`div`,{role:`note`,className:`text-sm space-y-5`,children:[t,(0,Y.jsxs)(`div`,{className:`space-y-5`,children:[i,s,(0,Y.jsxs)(`div`,{className:`flex items-start gap-3`,children:[c,(0,Y.jsxs)(`div`,{className:`space-y-0.5`,children:[l,(0,Y.jsx)(`p`,{className:`text-muted-foreground`,children:(0,Y.jsx)(v,{id:`DELNQk`})})]})]})]})]}),e[9]=u):u=e[9],u}function ln(){let e=(0,Z.c)(2),{projectLocalBinding:t}=se();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:x(n.error)}},e[0]=t,e[1]=n),n}function un(){let e=(0,Z.c)(2),{projectBinding:t}=se();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:x(n.error)}},e[0]=t,e[1]=n),n}function dn(e){let t=(0,Z.c)(11),{_:n}=y(),[r,i]=(0,X.useState)(!1),a;t[0]!==n||t[1]!==e?(a=function(t){if(e===null)return he.error(n({id:`fiMNLl`})),!1;let r=e(t);if(!r.ok){console.error(`[sync] toggle failed:`,r.error);let e=r.error;return he.error(n(t?{id:`04RA0-`,values:{detail:e}}:{id:`qjHMHf`,values:{detail:e}})),!1}return!0},t[0]=n,t[1]=e,t[2]=a):a=t[2];let o=a,s;t[3]===o?s=t[4]:(s=function(e){if(e){i(!0);return}o(!1)},t[3]=o,t[4]=s);let c=s,l;t[5]===o?l=t[6]:(l=function(){o(!0)&&i(!1)},t[5]=o,t[6]=l);let u=l,d;return t[7]!==r||t[8]!==u||t[9]!==c?(d={confirmOpen:r,setConfirmOpen:i,onToggleRequest:c,onConfirm:u},t[7]=r,t[8]=u,t[9]=c,t[10]=d):d=t[10],d}function fn(e){let t=(0,Z.c)(16),{value:n,onChange:r,disabled:i,placeholder:a,rows:o}=e,s=i===void 0?!1:i,c=o===void 0?12:o,l=(0,X.useId)(),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Y.jsx)(v,{id:`3o3tur`}),t[0]=u):u=t[0];let d;t[1]===l?d=t[2]:(d=(0,Y.jsx)(Rt,{htmlFor:l,children:u}),t[1]=l,t[2]=d);let f;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Y.jsx)(Bt,{children:(0,Y.jsx)(v,{id:`5gr_ev`,values:{dateToken:`{{date}}`,userToken:`{{user}}`},components:{0:(0,Y.jsx)(`code`,{className:`font-mono`}),1:(0,Y.jsx)(`code`,{className:`font-mono`})}})}),t[3]=f):f=t[3];let p;t[4]===r?p=t[5]:(p=e=>r(e.target.value),t[4]=r,t[5]=p);let m;t[6]!==s||t[7]!==l||t[8]!==a||t[9]!==c||t[10]!==p||t[11]!==n?(m=(0,Y.jsx)(Be,{id:l,value:n,onChange:p,disabled:s,rows:c,spellCheck:!1,placeholder:a,className:`font-mono text-xs leading-relaxed min-h-72`}),t[6]=s,t[7]=l,t[8]=a,t[9]=c,t[10]=p,t[11]=n,t[12]=m):m=t[12];let h;return t[13]!==d||t[14]!==m?(h=(0,Y.jsxs)(It,{children:[d,f,m]}),t[13]=d,t[14]=m,t[15]=h):h=t[15],h}var pn=/^[A-Za-z0-9_-]+$/;function mn(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)}function hn(e){let t={},n=e.title.trim();n&&(t.title=n);let r=e.description.trim();return r&&(t.description=r),t}var gn=0;function _n(){return gn+=1,`prop-${gn}`}function vn(e){let{frontmatter:t,body:n}=k(e);if(t===``)return{type:``,properties:[],markdown:e};let r=[];for(let e of S(t).split(`
|
|
4
4
|
`)){if(e.trim()===``)continue;let t=e.indexOf(`:`);if((/^\s/.test(e)||t===-1)&&r.length>0){let t=r[r.length-1];t&&(t.value+=`\n${e}`);continue}t!==-1&&r.push({key:e.slice(0,t).trim(),value:e.slice(t+1).replace(/^ /,``)})}let i=``,a=[];for(let e of r){if(e.key===`type`&&i===``){i=e.value.trim();continue}a.push({id:_n(),key:e.key,value:e.value})}return{type:i,properties:a,markdown:n}}function yn(e){let t=[],n=e.type.trim();n&&t.push(`type: ${n}`);for(let n of e.properties){let e=n.key.trim();e===``||e===`type`||t.push(n.value===``?`${e}:`:`${e}: ${n.value}`)}if(t.length===0)return e.markdown.replace(/^\n+/,``);let r=e.markdown.startsWith(`
|
|
@@ -465,7 +465,7 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
465
465
|
`)}function g4(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 _4(e){let t=e.map(e=>F2(e)).filter(e=>e!==``);return t.length===0?``:[`Also reference:`,``,...t.map(e=>`@${e}`)].join(`
|
|
466
466
|
`)}function v4(e){return e.scope===`doc`?`Let's work on @${F2(e.docRelativePath)} using OpenKnowledge.`:e.scope===`folder`?`Let's work on the @${F2(e.folderRelativePath)} folder using OpenKnowledge.`:`Let's work on this project using OpenKnowledge.`}function y4(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(p4(a)),n!==``&&o.push(n),r!==``&&o.push(r),i!==``&&o.push(i),o.join(`
|
|
467
467
|
|
|
468
|
-
`)}function b4(e,t,n,r,i,a){if(e.kind===`lines`)return g4(e.startLine,e.endLine,n);if(e.kind===`anchor`)return h4(e.markdown,n);let o=m4(e.markdown);return $2(y4(t,``,o,r,i),a)<=G2?o:h4(e.markdown,n)}function x4(e,t,n,r){let{target:i}=e,a=F2(e.docRelativePath),o=`Let's work on @${a} using OpenKnowledge.`,s=b4(t,o,a,n,r,i);return y4(o,c4(e.instruction,i,e=>y4(o,e,s,n,r)),s,n,r)}function S4(e){let{target:t}=e,n=e.autoOpen?f4:``,r=_4(e.mentions);if(e.scope===`doc`&&e.selection!==void 0)return x4(e,e.selection,r,n);let i=v4(e);return y4(i,c4(e.instruction,t,e=>y4(i,e,``,r,n)),``,r,n)}function C4(e){return`'${e.replace(/'/g,`'\\''`)}'`}var w4={claude:{bin:`claude`,displayName:`Claude`,docsUrl:`https://docs.claude.com/en/docs/claude-code`,handoffTarget:`claude-code`,mcpPreApproveArg:`--settings ${C4(JSON.stringify({enabledMcpjsonServers:[c0]}))}`},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`}},T4=[`claude`,`codex`,`cursor
|
|
468
|
+
`)}function b4(e,t,n,r,i,a){if(e.kind===`lines`)return g4(e.startLine,e.endLine,n);if(e.kind===`anchor`)return h4(e.markdown,n);let o=m4(e.markdown);return $2(y4(t,``,o,r,i),a)<=G2?o:h4(e.markdown,n)}function x4(e,t,n,r){let{target:i}=e,a=F2(e.docRelativePath),o=`Let's work on @${a} using OpenKnowledge.`,s=b4(t,o,a,n,r,i);return y4(o,c4(e.instruction,i,e=>y4(o,e,s,n,r)),s,n,r)}function S4(e){let{target:t}=e,n=e.autoOpen?f4:``,r=_4(e.mentions);if(e.scope===`doc`&&e.selection!==void 0)return x4(e,e.selection,r,n);let i=v4(e);return y4(i,c4(e.instruction,t,e=>y4(i,e,``,r,n)),``,r,n)}function C4(e){return`'${e.replace(/'/g,`'\\''`)}'`}var w4={claude:{bin:`claude`,displayName:`Claude`,docsUrl:`https://docs.claude.com/en/docs/claude-code`,handoffTarget:`claude-code`,mcpPreApproveArg:`--settings ${C4(JSON.stringify({enabledMcpjsonServers:[c0]}))}`},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`}},T4=[`claude`,`codex`,`opencode`,`cursor`];function E4(e,t,n={}){let r=w4[e],i=n.mcpPreApprove===!0&&r.mcpPreApproveArg?`${r.mcpPreApproveArg} `:``;if(t==null||t.length===0)return`${r.bin} ${i}`.trimEnd();let a=r.promptFlag?`${r.promptFlag} `:``;return`${r.bin} ${i}${a}${C4(t)}`}function D4(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}}var O4=new Set([`opencode.json`]);function k4(e){return e.split(`/`).some(e=>e.startsWith(`.`))?!0:O4.has(e.slice(e.lastIndexOf(`/`)+1))}function A4(e,t){let n=D4(e);n.ok||t.addIssue({code:`custom`,message:n.reason})}var j4=E().superRefine(A4).optional(),M4={agentId:E().optional(),agentName:E().optional(),colorSeed:E().optional(),clientName:E().optional(),clientVersion:E().optional(),label:E().optional()},N4=E().optional(),P4=/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;Ia(`kind`,[A({kind:M(`doc`),docPath:E().min(1)}).loose(),A({kind:M(`folder`),folderPath:E()}).loose()]);var F4=j([`no-remote`,`detached-head`,`branch-not-on-origin`,`non-github-remote`,`invalid-path`]),I4=Ia(`ok`,[A({ok:M(!0),shareUrl:E().min(1),sharedUrl:E().min(1),branch:E().min(1)}).loose(),A({ok:M(!1),error:F4,branch:E().min(1).optional()}).loose()]),L4=j([`user`,`org`]),R4=A({login:E().min(1),kind:L4,avatarUrl:E().optional()}).loose(),z4=j([`auth-required`,`network`]),B4=Ia(`ok`,[A({ok:M(!0),owners:k(R4)}).loose(),A({ok:M(!1),error:z4}).loose()]),V4=Ia(`ok`,[A({ok:M(!0),available:O()}).loose(),A({ok:M(!1),error:z4}).loose()]),H4=j([`public`,`private`]);A({owner:E().min(1),name:E().min(1),visibility:H4,description:E().optional()}).loose();var U4=j([`name-conflict`,`saml-sso`,`auth-required`,`push-failed`,`init-failed`,`network`,`no-project`]),W4=Ia(`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:U4}).loose()]);function G4(e){return!(typeof e!=`string`||e.length===0||e.startsWith(`-`)||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(`:`)||e.split(`/`).includes(`..`))}var K4=e=>e.refine(G4,`invalid branch name`),q4={shareTargetExists:O(),dirtyConflicts:A({conflicts:O(),files:k(E().min(1))}).loose(),branchIsLocal:O()};Ia(`detached`,[A({detached:M(!1),currentBranch:E().min(1).nullable(),currentHeadSha:Ta(),...q4}).loose(),A({detached:M(!0),currentBranch:Ta(),currentHeadSha:E().min(1),...q4}).loose()]),A({branch:K4(E().min(1)),principalId:E().optional()}).loose();var J4=j([`dirty-conflict`,`branch-not-found`,`fetch-failed`,`checkout-failed`,`branch-in-other-worktree`]);Ia(`ok`,[A({ok:M(!0)}).loose(),A({ok:M(!1),reason:J4,files:k(E().min(1)).optional(),otherWorktreePath:E().min(1).optional()}).loose()]);var Y4=A({serverInstanceId:E().min(1),currentBranch:E().min(1).optional(),currentDiskAckSVs:Ba(E().min(1),E().min(1)).optional()}).loose(),X4=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 Z4=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(P4,`instance must be urn:uuid:<uuid>`).optional(),detail:E().optional()}).loose();A({parentDocName:E().min(1),placement:j([`configured-attachments`,`parent-dir`]).default(`configured-attachments`),agentId:E().min(1).optional(),agentName:E().min(1).optional()}).loose();var Q4=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(G4,`invalid branch name`).optional()}).loose(),A({type:M(`error`),problem:Z4}).loose();var $4=j(R1),e3=Ma({hosts:k(E()),scope:$4,scripts:O(),installedAt:Oi()});Ma({schema:M(1),skills:Ba(E(),e3).default({})});var t3=8192,n3=32768,r3=`…[truncated]`;function i3(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 a3(e){return e.length<=8192?e:`${e.slice(0,t3-12)}${r3}`}var o3=/notionvc:/i,s3=()=>e=>{c3(e)&&(l3(e),u3(e))};function c3(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(o3.test(e))return!0}if(t.type===`element`&&c3(t))return!0}return!1}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=[];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 u3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){e.children=e.children.filter(e=>e.type===`comment`?!o3.test(String(e.value??``)):!0);for(let t of e.children)t.type===`element`&&u3(t)}}var d3=new Set([`Apple-tab-span`,`Apple-converted-space`,`Apple-style-span`]),f3=()=>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 m3(t)?[]:h3(t)?t.children:[t]})}}function m3(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 h3(e){if(e.tagName!==`span`)return!1;let t=e.properties?.className;return Array.isArray(t)?t.length>0&&t.every(e=>d3.has(String(e))):!1}var g3=`docs-internal-guid-`;function _3(e,t){let n=e.children[t];!n||n.type!==`element`||e.children.splice(t,1,...n.children)}var v3=()=>e=>{y3(e)};function y3(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&y3(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(b3(r)||x3(r)){_3(e,t);continue}t++}}function b3(e){if(e.tagName!==`b`)return!1;let t=e.properties?.id;return typeof t==`string`&&t.startsWith(g3)}function x3(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 S3=new Set([`commit-link`,`user-mention`,`team-mention`,`issue-link`]),C3=()=>e=>{w3(e)};function w3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&w3(t);for(let t of e.children)t.type===`element`&&T3(t)}}function T3(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=>!S3.has(String(e)));n.length===0?delete e.properties.className:e.properties.className=n}}var E3=/^gmail_/,D3=()=>e=>{O3(e)};function O3(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&O3(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`&&k3(r,`gmail_quote`)&&(r.tagName=`blockquote`),A3(r),j3(r)){e.children.splice(t,1,...r.children);continue}t++}}function k3(e,t){let n=e.properties?.className;return Array.isArray(n)?n.some(e=>String(e)===t):!1}function A3(e){let t=e.properties?.className;if(!Array.isArray(t))return;let n=t.filter(e=>!E3.test(String(e)));n.length===0?delete e.properties?.className:e.properties&&(e.properties.className=n)}function j3(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 M3=()=>e=>{N3(e)};function N3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&N3(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`?[]:(P3(t),[t])})}}function P3(e){if(e.properties)for(let t of Object.keys(e.properties))t.startsWith(`dataSheets`)&&delete e.properties[t]}var F3=[`o:`,`w:`,`m:`,`v:`,`u1:`],I3=/^Mso[A-Z]/,L3=/^\s*\[if\s+[^\]]*\]/,R3=()=>e=>{z3(e)};function z3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&z3(t);e.children=e.children.flatMap(e=>{if(e.type===`comment`){let t=String(e.value??``);return L3.test(t)?[]:[e]}if(e.type!==`element`)return[e];let t=e;return B3(t)?[]:(V3(t),[t])})}}function B3(e){return F3.some(t=>e.tagName.startsWith(t))}function V3(e){let t=e.properties;if(!t)return;let n=t.className;if(Array.isArray(n)){let e=n.filter(e=>typeof e==`string`&&!I3.test(e));e.length===0?delete t.className:t.className=e}else typeof n==`string`&&I3.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);F3.some(e=>e===`${n}:`)&&delete t[e]}}var H3=/^c-(message_kit__|message__|compose|timestamp)/,U3=()=>e=>{W3(e)};function W3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&W3(t);e.children=e.children.flatMap(e=>{if(e.type!==`element`)return[e];let t=e;return G3(t)?[]:(K3(t),[t])})}}function G3(e){let t=e.properties?.className;return Array.isArray(t)?t.some(e=>String(e)===`c-timestamp`||String(e).startsWith(`c-timestamp`)):!1}function K3(e){let t=e.properties?.className;if(!Array.isArray(t))return;let n=t.filter(e=>!H3.test(String(e)));n.length===0?delete e.properties?.className:e.properties&&(e.properties.className=n)}var q3=()=>e=>{J3(e)};function J3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&J3(t);for(let t=0;t<e.children.length;t++){let n=e.children[t];if(n.type!==`element`)continue;let r=n;Y3(r)&&(e.children[t]=Z3(r))}}}function Y3(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=>X3(e))}function X3(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)||X3(e))return!0}return!1}function Z3(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=>Q3(e)).join(`
|
|
471
471
|
`)}]}]}}function Q3(e){let t=``;for(let n of e.children)n.type===`text`?t+=n.value??``:n.type===`element`&&(t+=Q3(n));return t}var $3=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}},e6=[v3,R3,f3,D3,s3,q3,M3,U3,C3];function t6(e){ZF(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 n6(e,t){let n=t?.maxBytes??5242880;if(e.length>n)throw new $3(e.length,n);let r=HU().use(YP,{fragment:!0});for(let e of e6)r.use(e);for(let e of t?.additionalCleanupPlugins??[])r.use(e);r.use(XL);let i=r.parse(e),a=r.runSync(i);return t6(a),a}function r6(e){return String(HU().use(NU).use(PU).stringify(e))}function i6(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`&&a6(e.value.value,t))continue}let o=o6(e,t);r>=0?n[r]=o:n.push(o)}return n}function a6(e,t){try{return JSON.stringify(JSON.parse(e))===JSON.stringify(t)}catch{return!1}}function o6(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 s6(e,t,n,r){return{type:`mdxJsxFlowElement`,name:e,attributes:i6(t,r),children:n.all(t),data:{}}}var c6=/^[A-Za-z0-9]{20,}$/,l6=/^(?:\d+s?|(?:\d+h)?(?:\d+m)?(?:\d+s)?)$/;function u6(e){let t=e.toLowerCase();return t===`loom.com`||t===`www.loom.com`}function d6(e){let t=e.pathname.match(/^\/(?:share|embed)\/([A-Za-z0-9]+)\/?$/);if(!t)return null;let n=t[1]??``;return c6.test(n)?n:null}function f6(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:`||!u6(t.hostname))return null;let n=d6(t);if(!n)return null;let r=t.searchParams.get(`t`);return{id:n,startRaw:r&&r.length>0&&l6.test(r)?r:null}}function p6(e){return f6(e)!==null}function m6(e){let t=e.toLowerCase();return t===`vimeo.com`||t===`www.vimeo.com`||t===`player.vimeo.com`}function h6(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:m6(t.hostname)}var g6=/^[A-Za-z0-9_-]{11}$/;function _6(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 v6(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 y6(e){if(e.hostname.toLowerCase()===`youtu.be`){let t=e.pathname.replace(/^\//,``).split(`/`)[0]??``;return g6.test(t)?t:null}if(e.pathname===`/watch`){let t=e.searchParams.get(`v`)??``;return g6.test(t)?t:null}let t=e.pathname.match(/^\/(?:embed|shorts|v)\/([A-Za-z0-9_-]{11})\/?$/);return t?t[1]??null:null}function b6(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:`||!_6(t.hostname))return null;let n=y6(t);if(!n)return null;let r=t.searchParams.get(`t`)??t.searchParams.get(`start`)??``;return{id:n,startSeconds:r.length>0?v6(r):null,noCookie:t.hostname.toLowerCase().endsWith(`youtube-nocookie.com`)}}var x6=[{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`}],S6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Image source URL`,accept:eu,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}],C6=[{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}],w6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Video source URL`,accept:tu,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`&&(h6(e.src)||p6(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:eu,hideWhen:e=>typeof e.src==`string`&&(h6(e.src)||p6(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`&&p6(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`&&(h6(e.src)||p6(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`&&(b6(e.src)!==null||h6(e.src)||p6(e.src))},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],T6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Audio source URL`,accept:nu,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`}],E6=[{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`}],D6=[x6[0],x6[1],x6[4],x6[5],x6[6]],O6=[S6[0],S6[1],S6[7]],k6=[E6[0],E6[1],E6[4],E6[5]],A6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Alt text (Obsidian alias syntax: `![[file.png|alt text]]`)"}],j6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[clip.mp4|title]]`)"}],M6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[song.mp3|title]]`)"}],N6=[{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#install-tabs`)"}],P6=[{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`)"}],F6=[{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."}],I6=[F6[0]],L6=[F6[0]],R6=[{name:`chart`,type:`string`,required:!0,hidden:!0,description:`Mermaid chart source (graph / flowchart / sequenceDiagram / class / state / etc.)`}],z6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Display name override (Obsidian alias syntax: `![[file.zip|label]]`)"}],B6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`File URL`,accept:[`*/*`],autoFocus:!0}],V6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`PDF source URL`,accept:ru,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`)"}],H6=[{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."}],U6=[{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 W6(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`).replace(/>/g,`>`)}function G6(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function K6(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 q6=[{name:`Callout`,surface:`canonical`,hasChildren:!0,props:x6,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)=>s6(`Callout`,e,t,x6)},{name:`img`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:S6,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)=>s6(`img`,e,t,S6)},{name:`video`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:w6,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)=>s6(`video`,e,t,w6)},{name:`audio`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:T6,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)=>s6(`audio`,e,t,T6)},{name:`Pdf`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:V6,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)=>s6(`Pdf`,e,t,V6)},{name:`File`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:B6,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)=>s6(`File`,e,t,B6)},{name:`Embed`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:C6,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)=>s6(`Embed`,e,t,C6)},{name:`Accordion`,surface:`canonical`,hasChildren:!0,props:E6,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)=>s6(`Accordion`,e,t,E6)},{name:`Tabs`,surface:`canonical`,hasChildren:!0,emptyChildName:`Tab`,props:N6,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>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{T as e}from"./dist-
|
|
1
|
+
import{T as e}from"./dist-Cmfs-Ydn.js";var t=e=>typeof e==`string`,n=e=>typeof e==`function`,r=new Map,i=`en`;function a(e){return[...Array.isArray(e)?e:[e],i]}function o(e,n,r){let i=a(e);r||=`default`;let o;if(typeof r==`string`)switch(o={day:`numeric`,month:`short`,year:`numeric`},r){case`full`:o.weekday=`long`;case`long`:o.month=`long`;break;case`short`:o.month=`numeric`;break}else o=r;return u(()=>d(`date`,i,r),()=>new Intl.DateTimeFormat(i,o)).format(t(n)?new Date(n):n)}function s(e,t,n){let r;if(n||=`default`,typeof n==`string`)switch(r={second:`numeric`,minute:`numeric`,hour:`numeric`},n){case`full`:case`long`:r.timeZoneName=`short`;break;case`short`:delete r.second}else r=n;return o(e,t,r)}function c(e,t,n){let r=a(e);return u(()=>d(`number`,r,n),()=>new Intl.NumberFormat(r,n)).format(t)}function l(e,t,n,{offset:r=0,...i}){let o=a(e),s=t?u(()=>d(`plural-ordinal`,o),()=>new Intl.PluralRules(o,{type:`ordinal`})):u(()=>d(`plural-cardinal`,o),()=>new Intl.PluralRules(o,{type:`cardinal`}));return i[n]??i[s.select(n-r)]??i.other}function u(e,t){let n=e(),i=r.get(n);return i||(i=t(),r.set(n,i)),i}function d(e,t,n){return`${e}-${t.join(`-`)}-${JSON.stringify(n)}`}var f=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,p=e=>e.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(e,t,n)=>{if(t){let e=parseInt(t,16);return String.fromCharCode(e)}else{let e=parseInt(n,16);return String.fromCharCode(e)}}),m=`%__lingui_octothorpe__%`,h=(e,t,n={})=>{let r=t||e,i=e=>typeof e==`object`?e:n[e],a=(e,t)=>{let a=c(r,e,Object.keys(n).length?i(`number`):void 0);return t.replace(new RegExp(m,`g`),a)};return{plural:(e,t)=>{let{offset:n=0}=t,i=l(r,!1,e,t);return a(e-n,i)},selectordinal:(e,t)=>{let{offset:n=0}=t,i=l(r,!0,e,t);return a(e-n,i)},select:g,number:(e,t)=>c(r,e,i(t)||{style:t}),date:(e,t)=>o(r,e,i(t)||t),time:(e,t)=>s(r,e,i(t)||t)}},g=(e,t)=>t[e]??t.other;function _(e,n,r){return(i={},a)=>{let o=h(n,r,a),s=(e,n=!1)=>Array.isArray(e)?e.reduce((e,r)=>{if(r===`#`&&n)return e+m;if(t(r))return e+r;let[a,c,l]=r,u={};c===`plural`||c===`selectordinal`||c===`select`?Object.entries(l).forEach(([e,t])=>{u[e]=s(t,c===`plural`||c===`selectordinal`)}):u=l;let d;if(c){let e=o[c];d=e(i[a],u)}else d=i[a];return d==null?e:e+d},``):e,c=s(e);return t(c)&&f.test(c)?p(c):t(c)?c:c?String(c):``}}var v=class{_events={};on(e,t){return this._events[e]??=new Set,this._events[e].add(t),()=>this.removeListener(e,t)}removeListener(e,t){let n=this._events[e];n?.delete(t),n?.size===0&&delete this._events[e]}emit(e,...t){let n=this._events[e];if(n)for(let e of[...n])e.apply(this,t)}},y=class extends v{_locale=``;_locales;_messages={};_missing;_messageCompiler;constructor(e){super(),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),(typeof e.locale==`string`||e.locales)&&this.activate(e.locale??i,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}setMessagesCompiler(e){return this._messageCompiler=e,this}_load(e,t){let n=this._messages[e];n?Object.assign(n,t):this._messages[e]=t}load(e,t){typeof e==`string`&&typeof t==`object`?this._load(e,t):Object.entries(e).forEach(([e,t])=>this._load(e,t)),this.emit(`change`)}loadAndActivate({locale:e,locales:t,messages:n}){this._locale=e,this._locales=t||void 0,this._messages[this._locale]=n,this.emit(`change`)}activate(e,t){this._locale=e,this._locales=t,this.emit(`change`)}_(e,r,i){if(!this.locale)throw Error(`Lingui: Attempted to call a translation function without setting a locale.
|
|
2
2
|
Make sure to call \`i18n.activate(locale)\` before using Lingui functions.
|
|
3
3
|
This issue may also occur due to a race condition in your initialization logic.`);let a=i?.message;e||=``,t(e)||(r=e.values||r,a=e.message,e=e.id);let o=this.messages[e],s=o===void 0,c=this._missing;if(c&&s)return n(c)?c(this._locale,e):c;s&&this.emit(`missing`,{id:e,locale:this._locale});let l=o||a||e;return t(l)&&(this._messageCompiler?l=this._messageCompiler(l):console.warn(`Uncompiled message detected! Message:
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Pi as e}from"./dist-
|
|
1
|
+
import{Pi as e}from"./dist-Cmfs-Ydn.js";import{C as t,S as n,f as r,i,m as a,p as o,w as s}from"./navigation-targets-DosY_GDn.js";import{t as c}from"./file-tree-rename-validation-OmIq2tUW.js";var l=`application/x-open-knowledge-sidebar-item+json`,u={image:!0,video:!0,audio:!0,pdf:!0,text:!0};function d(e){return JSON.stringify(e)}function f(e){return e.kind===`folder`?{target:{kind:`folder`,target:e.folderPath,folderPath:e.folderPath},hash:s(e.folderPath)}:e.kind===`asset`?{target:{kind:`asset`,target:e.assetPath,assetPath:e.assetPath,mediaKind:e.mediaKind},hash:n(e.assetPath)}:{target:i(e.docName,e.size)??{kind:`doc`,target:e.docName,docName:e.docName},hash:t(e.docName)}}function p(e){if(!e||!Array.from(e.types).includes(`application/x-open-knowledge-sidebar-item+json`))return null;let t=e.getData(l);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!m(n)||n.v!==1||typeof n.kind!=`string`)return null;if(n.kind===`doc`){if(typeof n.docName!=`string`||n.docName.length===0)return null;let e=n.size;return e!==null&&typeof e!=`number`?null:{v:1,kind:`doc`,docName:n.docName,size:e}}if(n.kind===`folder`)return typeof n.folderPath==`string`?{v:1,kind:`folder`,folderPath:n.folderPath}:null;if(n.kind===`asset`){if(typeof n.assetPath!=`string`||n.assetPath.length===0)return null;let e=n.mediaKind;return e!==null&&!h(e)?null:{v:1,kind:`asset`,assetPath:n.assetPath,mediaKind:e}}return null}function m(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function h(e){return typeof e==`string`&&Object.hasOwn(u,e)}var g={background:`#171717`,foreground:`#e5e5e5`,cursor:`#e5e5e5`,cursorAccent:`#171717`,selectionBackground:`#3a3d41`,black:`#000000`,red:`#cd3131`,green:`#0dbc79`,yellow:`#e5e510`,blue:`#2472c8`,magenta:`#bc3fbc`,cyan:`#11a8cd`,white:`#e5e5e5`,brightBlack:`#666666`,brightRed:`#f14c4c`,brightGreen:`#23d18b`,brightYellow:`#f5f543`,brightBlue:`#3b8eea`,brightMagenta:`#d670d6`,brightCyan:`#29b8db`,brightWhite:`#ffffff`},_={background:`#ffffff`,foreground:`#262626`,cursor:`#262626`,cursorAccent:`#ffffff`,selectionBackground:`#add6ff`,black:`#000000`,red:`#cd3131`,green:`#00bc00`,yellow:`#949800`,blue:`#0451a5`,magenta:`#bc05bc`,cyan:`#0598bc`,white:`#555555`,brightBlack:`#666666`,brightRed:`#cd3131`,brightGreen:`#14ce14`,brightYellow:`#b5ba00`,brightBlue:`#0451a5`,brightMagenta:`#bc05bc`,brightCyan:`#0598bc`,brightWhite:`#a5a5a5`};function v(e){return e===`dark`?g:_}var y=`.md`,b=/\.(md|mdx)$/i;function x(e,t=y){return`${e}${t}`}function S(e){return X(e).replace(b,``)}function C(e){return a(e)?E(e.path):r(e)?e.path:x(e.docName,e.docExt)}function w(e){let t=X(e).match(b);return t?`.${t[1].toLowerCase()}`:void 0}function T(e){return X(e)}function E(e){let t=X(e.trim());return t?`${t}/`:``}function D(e){return e.endsWith(`/`)?T(e):S(e)}function O(e){return e.map(C)}function k(e){return[...e].sort().join(`\0`)}function A(e){return k(O(e))}function j(e){let t=new Set;for(let n of e){let e=(a(n)||r(n)?n.path:n.docName).split(`/`).filter(Boolean);if(e.includes(`.ok`))continue;if(a(n)){let e=E(n.path);e&&t.add(e)}let i=a(n)?e.length:e.length-1;for(let n=1;n<=i;n++)t.add(`${e.slice(0,n).join(`/`)}/`)}return[...t].sort()}function M(e){if(!e)return[];let t=X(e.replace(b,``)).split(`/`).filter(Boolean),n=[],r=e.endsWith(`/`)?t.length:t.length-1;for(let e=1;e<=r;e++)n.push(`${t.slice(0,e).join(`/`)}/`);return n}function N(e,t,n){let r=w(e);if(r)return r;let i=n.find(e=>o(e)&&e.docName===t);return i?i.docExt??y:Y(e).includes(`.`)?void 0:y}function P(e,t){let n=e.lastIndexOf(`/`),i=n===-1?``:e.slice(0,n+1),a=n===-1?e:e.slice(n+1),o=t.filter(e=>{if(!r(e)||!e.path.startsWith(i))return!1;let t=e.path.slice(i.length);return!t.includes(`/`)&&t.startsWith(`${a}.`)});return o.length===1?o[0].path:null}function F(e,t,n){if(w(e))return null;let i=n.find(e=>r(e)&&e.path===t);return i?i.path:Y(e).includes(`.`)?t:P(t,n)}function I(e,t){let n=e.kind===`directory`,r=n?T(e.path):S(e.path);if(n)return{kind:`folder`,name:X(Y(e.path)).replace(b,``),path:r,treePath:R(e.path,!0)};let i=F(e.path,r,t);if(i)return{kind:`asset`,name:X(Y(i)),path:i,treePath:i};let a=N(e.path,r,t);return{kind:`file`,name:X(Y(e.path)).replace(b,``),path:r,treePath:R(e.path,!1),docExt:a}}function L(e){return e.kind===`directory`?T(e.path):e.path}function R(e,t){return t?E(e):b.test(e)?e:`${e}${y}`}function z(e,t,n){let r=E(t),i=new Set(n);for(let t=0;t<100;t++){let n=t===0?``:` ${t+1}`;if(e===`file`){let e=`${r}Untitled${n}${y}`;if(!i.has(e))return{addPath:e,renamePath:e};continue}let a=`${r}New Folder${n}/`;if(!i.has(a))return{addPath:a,renamePath:a}}throw Error(`Could not allocate a unique tree placeholder`)}function B(e,t){return e===`file`?R(t,!1):`${T(t)}/index${y}`}function V(e,t){return t.kind===`root`||t.directoryPath==null?Y(e):`${t.directoryPath}${Y(e)}`}function H(e,t){if(t)return T(E(e));let n=S(e),r=n.lastIndexOf(`/`);return r===-1?``:n.slice(0,r)}function U(e,t){let n=T(E(e));return n?`${n}/${t}`:t}function W(e,t,n){e.append(`parentDocName`,U(t,n)),e.append(`placement`,`parent-dir`)}function G(e,t){return(t.path??U(e,t.src)).replace(/^\/+/,``)}function K(e){let t=e.dataTransfer?.types;if(!t)return!1;let n=Array.from(t);return n.includes(`Files`)&&!n.includes(`application/x-open-knowledge-sidebar-item+json`)}function q(e){return Array.from(e.dataTransfer?.files??[]).filter(e=>e.name.length>0||e.size>0)}function J(t,n){let r=c(t).toLowerCase();if(r===``)return null;let i=new Date().toISOString();if(r===`.md`||r===`.mdx`)return{kind:`document`,docName:S(t),docExt:r,modified:i,size:n.size};let a=r.startsWith(`.`)?r.slice(1):r;return{kind:`asset`,path:t,assetExt:a,mediaKind:e(a),modified:i,size:n.size}}function Y(e){let t=X(e),n=t.lastIndexOf(`/`),r=n===-1?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function X(e){return e.endsWith(`/`)?e.slice(0,-1):e}export{D as C,f as D,l as E,p as O,k as S,v as T,L as _,B as a,S as b,O as c,C as d,q as f,H as g,R as h,V as i,d as k,A as l,K as m,j as n,z as o,E as p,M as r,x as s,W as t,J as u,P as v,G as w,I as x,T as y};
|