@inkeep/open-knowledge 0.71.5 → 0.71.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.
Files changed (31) hide show
  1. package/dist/cli.mjs +6 -6
  2. package/dist/constants-BQ-TCrpS.mjs +1 -0
  3. package/dist/index.mjs +1 -1
  4. package/dist/{init-8pZAEbdA.mjs → init-BjzAy9ci.mjs} +2 -2
  5. package/dist/init-CYDXbzN5.mjs +1 -0
  6. package/dist/{launch-json-removal-DuWMdfjo.mjs → launch-json-removal-DMD-44kV.mjs} +1 -1
  7. package/dist/{loader-t71RC9Hp.mjs → loader-BWovV0v-.mjs} +1 -1
  8. package/dist/loader-DzTfiUgx.mjs +1 -0
  9. package/dist/preview-C48WV1Iy.mjs +1 -0
  10. package/dist/{preview-DSAOKhU2.mjs → preview-p0u3B2o7.mjs} +1 -1
  11. package/dist/public/assets/ConsentDialogBody-7wMM91sQ.js +2 -0
  12. package/dist/public/assets/FeedbackForm-cj3i2d-x.js +1 -0
  13. package/dist/public/assets/{index-CKfgBhSA.js → index-CobxLX9l.js} +3 -3
  14. package/dist/public/index.html +1 -1
  15. package/dist/{registry-probes-BahaqwRT.mjs → registry-probes-CyYWP5PX.mjs} +1 -1
  16. package/dist/{removal-file-path-BLyb4lO_.mjs → removal-file-path-CSbwRHIY.mjs} +1 -1
  17. package/dist/{repair-launch-json-COAvDHm6.mjs → repair-launch-json-DHvM8qP-.mjs} +1 -1
  18. package/dist/{repair-mcp-configs-9ED5tvFh.mjs → repair-mcp-configs-B3XsJHOt.mjs} +1 -1
  19. package/dist/src-BIA89bBb.mjs +1 -0
  20. package/dist/{src-EMINvsx2.mjs → src-Bc3P8FGr.mjs} +1 -1
  21. package/dist/{start-Dif_gKD0.mjs → start-DNA-HoqI.mjs} +2 -2
  22. package/dist/start-DnhcnDi1.mjs +1 -0
  23. package/package.json +4 -4
  24. package/dist/constants-CxY-Mx_6.mjs +0 -1
  25. package/dist/init-BvahqqaP.mjs +0 -1
  26. package/dist/loader-ByQq8HAI.mjs +0 -1
  27. package/dist/preview-jPwqUBlw.mjs +0 -1
  28. package/dist/public/assets/ConsentDialogBody-D2TvUH9V.js +0 -2
  29. package/dist/public/assets/FeedbackForm-JP-dWZ0G.js +0 -1
  30. package/dist/src-CGZuDvzy.mjs +0 -1
  31. package/dist/start-D1lSL0Ee.mjs +0 -1
@@ -1 +1 @@
1
- import{$c as e,Fc as t,Hc as n,Nc as r,Xo as i,lu as a,qa as o}from"./md-manager-BGnqyqi1-I1w3knRG.mjs";import{Co as s,To as c,b as l}from"./dist-DsaTRpAv.mjs";import{t as u}from"./is-object-BGze3w87.mjs";import{t as d}from"./constants-CxY-Mx_6.mjs";import{resolve as f}from"node:path";import{existsSync as p,readFileSync as m}from"node:fs";import{realpath as h}from"node:fs/promises";var g=a();async function _(e){let t=f(e);try{return await h(t)}catch(e){if(e.code!==`ENOENT`){let n=e instanceof Error?e.message:String(e);console.warn(`[normalize-cwd] realpath failed for ${t}: ${n}`)}return t}}function v(e){if(!p(e))return{value:null,path:e,source:null,doc:null};let t;try{t=m(e,`utf-8`)}catch(t){let n=t instanceof Error?t.message:String(t);return console.warn(`[config] Failed to read ${e}: ${n}`),{value:null,path:e,source:null,doc:null,diagnostic:{code:`UNREADABLE`,detail:`${e}: ${n}`}}}let n=(0,g.parseDocument)(t);if(n.errors.length>0){let r=n.errors.map(e=>e.message).join(`; `);return console.warn(`[config] Failed to parse ${e}: ${r}`),{value:null,path:e,source:t,doc:null,diagnostic:{code:`YAML_PARSE`,detail:`${e}: ${r}`}}}let r=n.toJSON();return u(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}function y(e,t){return e.map(e=>{let r=e.path.map(e=>typeof e==`symbol`?String(e):e),i={path:r,message:e.message,issueCode:e.code};if(t.doc!==null&&t.source!==null){let e=n({file:t.path,source:t.source,doc:t.doc,path:r});if(e!==void 0)return{...i,source:e}}return i})}function b(n){let a=n??process.cwd(),u=[],p=[],m=[],h=[],g=c(`user`,a),_=s({absPath:g});p.push(..._.diagnostics),!_.valid&&_.sidelinedTo!==void 0&&m.push({from:g,to:_.sidelinedTo}),_.valid&&_.source!==void 0&&u.push(g);let b=(t,n=!1)=>{let i=v(t);if(i.diagnostic!==void 0&&p.push(i.diagnostic),i.value===null)return{};let a=r({value:i.value,file:i.path,source:i.source,doc:i.doc});p.push(...a),u.push(t);let s=a.length>0?e(i.value):i.value;return n&&h.push(...o({value:s,file:i.path,source:i.source,doc:i.doc})),s},x=f(a,`.ok`,d),S=b(x,!0),C=b(c(`project-local`,a)),w=i(_.value,S,C),T=l.safeParse(w);if(!T.success){let e=v(x),n={code:`SCHEMA_INVALID`,issues:y(T.error.issues,e)};throw Error(t(n))}return{config:T.data,sources:u,diagnostics:p,sidelined:m,ignoredCommittedKeys:h}}function x(e){let t=e.cacheMs??1e3,n=e.loadConfigFn??b,r=new Map,i=new Map,a=_(e.startupCwd);return async o=>{let s=await _(o??e.startupCwd),c=Date.now(),l=r.get(s);if(l&&l.expiresAt>c)return l.config;let u=i.get(s);if(u)return await u;let d=(async()=>{if(s===await a)return r.set(s,{config:e.startupConfig,expiresAt:Date.now()+t}),e.startupConfig;let i=n(s).config;return r.set(s,{config:i,expiresAt:Date.now()+t}),i})();i.set(s,d);try{return await d}finally{i.delete(s)}}}export{b as n,x as t};
1
+ import{$c as e,Fc as t,Hc as n,Nc as r,Xo as i,lu as a,qa as o}from"./md-manager-BGnqyqi1-I1w3knRG.mjs";import{Co as s,To as c,b as l}from"./dist-DsaTRpAv.mjs";import{t as u}from"./is-object-BGze3w87.mjs";import{t as d}from"./constants-BQ-TCrpS.mjs";import{resolve as f}from"node:path";import{existsSync as p,readFileSync as m}from"node:fs";import{realpath as h}from"node:fs/promises";var g=a();async function _(e){let t=f(e);try{return await h(t)}catch(e){if(e.code!==`ENOENT`){let n=e instanceof Error?e.message:String(e);console.warn(`[normalize-cwd] realpath failed for ${t}: ${n}`)}return t}}function v(e){if(!p(e))return{value:null,path:e,source:null,doc:null};let t;try{t=m(e,`utf-8`)}catch(t){let n=t instanceof Error?t.message:String(t);return console.warn(`[config] Failed to read ${e}: ${n}`),{value:null,path:e,source:null,doc:null,diagnostic:{code:`UNREADABLE`,detail:`${e}: ${n}`}}}let n=(0,g.parseDocument)(t);if(n.errors.length>0){let r=n.errors.map(e=>e.message).join(`; `);return console.warn(`[config] Failed to parse ${e}: ${r}`),{value:null,path:e,source:t,doc:null,diagnostic:{code:`YAML_PARSE`,detail:`${e}: ${r}`}}}let r=n.toJSON();return u(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}function y(e,t){return e.map(e=>{let r=e.path.map(e=>typeof e==`symbol`?String(e):e),i={path:r,message:e.message,issueCode:e.code};if(t.doc!==null&&t.source!==null){let e=n({file:t.path,source:t.source,doc:t.doc,path:r});if(e!==void 0)return{...i,source:e}}return i})}function b(n){let a=n??process.cwd(),u=[],p=[],m=[],h=[],g=c(`user`,a),_=s({absPath:g});p.push(..._.diagnostics),!_.valid&&_.sidelinedTo!==void 0&&m.push({from:g,to:_.sidelinedTo}),_.valid&&_.source!==void 0&&u.push(g);let b=(t,n=!1)=>{let i=v(t);if(i.diagnostic!==void 0&&p.push(i.diagnostic),i.value===null)return{};let a=r({value:i.value,file:i.path,source:i.source,doc:i.doc});p.push(...a),u.push(t);let s=a.length>0?e(i.value):i.value;return n&&h.push(...o({value:s,file:i.path,source:i.source,doc:i.doc})),s},x=f(a,`.ok`,d),S=b(x,!0),C=b(c(`project-local`,a)),w=i(_.value,S,C),T=l.safeParse(w);if(!T.success){let e=v(x),n={code:`SCHEMA_INVALID`,issues:y(T.error.issues,e)};throw Error(t(n))}return{config:T.data,sources:u,diagnostics:p,sidelined:m,ignoredCommittedKeys:h}}function x(e){let t=e.cacheMs??1e3,n=e.loadConfigFn??b,r=new Map,i=new Map,a=_(e.startupCwd);return async o=>{let s=await _(o??e.startupCwd),c=Date.now(),l=r.get(s);if(l&&l.expiresAt>c)return l.config;let u=i.get(s);if(u)return await u;let d=(async()=>{if(s===await a)return r.set(s,{config:e.startupConfig,expiresAt:Date.now()+t}),e.startupConfig;let i=n(s).config;return r.set(s,{config:i,expiresAt:Date.now()+t}),i})();i.set(s,d);try{return await d}finally{i.delete(s)}}}export{b as n,x as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./loader-BWovV0v-.mjs";export{e as loadConfig};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./preview-p0u3B2o7.mjs";export{t as formatPreviewBlock,e as previewContent};
@@ -1,2 +1,2 @@
1
- import{gn as e}from"./dist-DsaTRpAv.mjs";import"./constants-CxY-Mx_6.mjs";import{join as t,relative as n}from"node:path";import{existsSync as r,lstatSync as i,readdirSync as a,realpathSync as o,statSync as s}from"node:fs";function c(r){let{projectDir:c,contentDir:l,sampleCap:u=5}=r,d=[],f=[];try{i(l)}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[`cannot access content directory ${l}: ${e instanceof Error?e.message:String(e)}`]}}let p;try{p=e({projectDir:c,contentDir:l})}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[e instanceof Error?e.message:String(e)]}}function m(e){let r;try{r=a(e,{withFileTypes:!0})}catch(t){let r=t instanceof Error?t.message:String(t);d.push(`could not read directory ${n(l,e)||`.`}: ${r}`);return}for(let i of r){let r=t(e,i.name);if(i.isSymbolicLink()){let e;try{e=o(r)}catch(e){let t=e.code;t===`ENOENT`||t===`ELOOP`?d.push(`broken or cyclic symlink: ${n(l,r)}`):d.push(`cannot resolve symlink ${n(l,r)}: ${t??`unknown error`}`);continue}let t;try{t=s(e)}catch{continue}if(t.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(t.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}else if(i.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(i.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}}return m(l),{totalCount:f.length,sample:f.slice(0,u),contentDir:l,warnings:d}}function l(e,i){let a=[],o=n(i,e.contentDir),s=o===``?`./`:`./${o}`;if(a.push(`Content:`),a.push(` Found ${e.totalCount} markdown files in ${s}`),e.sample.length>0){let t=e.sample.join(`, `),n=e.totalCount>e.sample.length?`, …`:``;a.push(` Sample: ${t}${n}`)}if(e.warnings.length>0)for(let t of e.warnings)a.push(` Warning: ${t}`);a.push(``);let c=t(i,`.ok`,`config.yml`);return r(c)?(a.push(` To adjust scope, add patterns to .okignore at the project root.`),a.push(` To change the content root, edit .ok/config.yml → content.dir.`)):a.push(" Run `open-knowledge init` to scaffold config + .okignore."),a.push(``),a.push(` Re-check anytime: open-knowledge preview`),a.join(`
1
+ import{gn as e}from"./dist-DsaTRpAv.mjs";import"./constants-BQ-TCrpS.mjs";import{join as t,relative as n}from"node:path";import{existsSync as r,lstatSync as i,readdirSync as a,realpathSync as o,statSync as s}from"node:fs";function c(r){let{projectDir:c,contentDir:l,sampleCap:u=5}=r,d=[],f=[];try{i(l)}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[`cannot access content directory ${l}: ${e instanceof Error?e.message:String(e)}`]}}let p;try{p=e({projectDir:c,contentDir:l})}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[e instanceof Error?e.message:String(e)]}}function m(e){let r;try{r=a(e,{withFileTypes:!0})}catch(t){let r=t instanceof Error?t.message:String(t);d.push(`could not read directory ${n(l,e)||`.`}: ${r}`);return}for(let i of r){let r=t(e,i.name);if(i.isSymbolicLink()){let e;try{e=o(r)}catch(e){let t=e.code;t===`ENOENT`||t===`ELOOP`?d.push(`broken or cyclic symlink: ${n(l,r)}`):d.push(`cannot resolve symlink ${n(l,r)}: ${t??`unknown error`}`);continue}let t;try{t=s(e)}catch{continue}if(t.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(t.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}else if(i.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(i.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}}return m(l),{totalCount:f.length,sample:f.slice(0,u),contentDir:l,warnings:d}}function l(e,i){let a=[],o=n(i,e.contentDir),s=o===``?`./`:`./${o}`;if(a.push(`Content:`),a.push(` Found ${e.totalCount} markdown files in ${s}`),e.sample.length>0){let t=e.sample.join(`, `),n=e.totalCount>e.sample.length?`, …`:``;a.push(` Sample: ${t}${n}`)}if(e.warnings.length>0)for(let t of e.warnings)a.push(` Warning: ${t}`);a.push(``);let c=t(i,`.ok`,`config.yml`);return r(c)?(a.push(` To adjust scope, add patterns to .okignore at the project root.`),a.push(` To change the content root, edit .ok/config.yml → content.dir.`)):a.push(" Run `open-knowledge init` to scaffold config + .okignore."),a.push(``),a.push(` Re-check anytime: open-knowledge preview`),a.join(`
2
2
  `)}export{c as n,l as t};
@@ -0,0 +1,2 @@
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./button-Cym3gapE.js";import{n as s,r as ee,t as te}from"./collapsible-DYySK8La.js";import{a as c,c as l,i as u,n as d,o as ne,s as re,t as f}from"./dialog-BEFohk_D.js";import{Ic as p}from"./dist-BtM-eRCP.js";import{n as m}from"./dist-CJhtNlOm2.js";import{t as ie}from"./chevron-right-C-g4JuT4.js";import{t as h}from"./spinner-Bp2_BYkl.js";import{t as g}from"./input-DaMAkTYk.js";import{a as ae,n as oe,o as se,r as _,s as ce,t as le}from"./project-paths-960ETy7U.js";import{t as ue}from"./textarea-BF-s7jTP.js";var de=a(),v=e(n(),1),y=t(),fe=750,b=8e3,pe={root:{id:`ZWolSV`},home:{id:`_RcqUM`},"home-documents":{id:`of3tF-`},"home-desktop":{id:`vfWA_g`},"home-downloads":{id:`wlwXUk`},"volumes-mount":{id:`nMSYz5`},"drive-root":{id:`M3ytY_`}},x={error:e=>m.error(e)};function me(e){let t=(0,de.c)(10),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{store:r,toast:i,payload:a,detectionGraceMs:o}=n,s=r===void 0?_:r,ee=i===void 0?x:i,te=o===void 0?b:o,c;t[2]!==a||t[3]!==s?(c=a??s.getSnapshot(),t[2]=a,t[3]=s,t[4]=c):c=t[4];let l=c;if(!l)return null;let u;return t[5]!==te||t[6]!==l||t[7]!==s||t[8]!==ee?(u=(0,y.jsx)(S,{payload:l,store:s,toast:ee,detectionGraceMs:te}),t[5]=te,t[6]=l,t[7]=s,t[8]=ee,t[9]=u):u=t[9],u}function S(e){let t=(0,de.c)(126),{payload:n,store:a,toast:p,detectionGraceMs:m}=e,{_}=i(),b=(0,v.useId)(),[x,me]=(0,v.useState)(n.defaultContentDir),[S,ve]=(0,v.useState)(``),[C,be]=(0,v.useState)(null),[w,xe]=(0,v.useState)(!0),[T,Se]=(0,v.useState)(ae),[Ce,we]=(0,v.useState)(null),[E,Te]=(0,v.useState)(!1),[Ee,De]=(0,v.useState)(null),[Oe,ke]=(0,v.useState)(!1),[D,Ae]=(0,v.useState)(!1),je=(0,v.useRef)(null),Me=(0,v.useRef)(!1),Ne=(0,v.useRef)(0),Pe,Fe;t[0]!==_||t[1]!==x?(Pe=()=>{if(!le(x)){we(null);return}let e=!1,t=setTimeout(()=>{let t=window.okDesktop;t&&t.onboarding.probeContent({contentDir:x}).then(t=>{e||we(t)}).catch(t=>{e||we({ok:!1,error:t instanceof Error?t.message:_({id:`snrVQ7`})})})},fe);return()=>{e=!0,clearTimeout(t)}},Fe=[x,_],t[0]=_,t[1]=x,t[2]=Pe,t[3]=Fe):(Pe=t[2],Fe=t[3]),(0,v.useEffect)(Pe,Fe);let Ie,Le;t[4]===m?(Ie=t[5],Le=t[6]):(Ie=()=>{let e=window.okDesktop;if(!e){be([]);return}let t=!1,n=e.integrations.status().then(_e).catch(ge),r;return je.current=Promise.race([n,new Promise(e=>{r=setTimeout(()=>{console.warn(`[ConsentDialog] editor detection did not settle within ${m}ms`),t||be([]),e([])},m)})]),n.then(e=>{clearTimeout(r),t||be(e)}),()=>{t=!0,clearTimeout(r)}},Le=[m],t[4]=m,t[5]=Ie,t[6]=Le),(0,v.useEffect)(Ie,Le);let Re;t[7]===x?Re=t[8]:(Re=le(x),t[7]=x,t[8]=Re);let O=Re,k=E||!O,ze=!E||D,Be=Oe||!O,Ve=n.projectDir,He;t[9]!==n.pickedPath||t[10]!==n.projectDir?(He=oe(n.projectDir,n.pickedPath)??n.pickedPath,t[9]=n.pickedPath,t[10]=n.projectDir,t[11]=He):He=t[11];let Ue=He,We;t[12]!==_||t[13]!==n.projectDir?(We=async function(){let e=window.okDesktop;if(!e)return;let t;try{t=await e.dialog.openFolder({defaultPath:n.projectDir})}catch(e){let t=e;De(t instanceof Error?t.message:_({id:`P-ye9o`}));return}if(t===null)return;let r=oe(n.projectDir,t);if(r===null){De(_({id:`UTZ97u`}));return}De(null),me(r)},t[12]=_,t[13]=n.projectDir,t[14]=We):We=t[14];let Ge=We,Ke;t[15]!==w||t[16]!==C?(Ke=async function(){if(!w)return[];if(C!==null)return C;let e=je.current;if(e===null)return[];Ae(!0);let t=await e;return Ae(!1),t},t[15]=w,t[16]=C,t[17]=Ke):Ke=t[17];let qe=Ke,Je;t[18]!==S||t[19]!==w||t[20]!==x||t[21]!==qe||t[22]!==T||t[23]!==a||t[24]!==p?(Je=async function(){let e=Ne.current+1;Ne.current=e,Te(!0);let t=await qe();if(Ne.current!==e)return;let n=await a.confirm({initGit:!0,contentDir:x,additionalIgnores:S,editorIds:[...t],connectEditors:w,sharing:T});n.ok||(p.error(n.error),Te(!1))},t[18]=S,t[19]=w,t[20]=x,t[21]=qe,t[22]=T,t[23]=a,t[24]=p,t[25]=Je):Je=t[25];let Ye=Je,Xe;t[26]!==Ye||t[27]!==k?(Xe=function(e){e.preventDefault(),!k&&Ye()},t[26]=Ye,t[27]=k,t[28]=Xe):Xe=t[28];let Ze=Xe,Qe;t[29]!==a||t[30]!==p?(Qe=async function(){if(Me.current)return;Me.current=!0,Ne.current+=1,Te(!0);let e=await a.cancel();e.ok||(Me.current=!1,Ae(!1),p.error(e.error),Te(!1))},t[29]=a,t[30]=p,t[31]=Qe):Qe=t[31];let A=Qe,$e;t[32]!==ze||t[33]!==A?($e=function(e){!e&&ze&&A()},t[32]=ze,t[33]=A,t[34]=$e):$e=t[34];let et=$e,tt;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(tt=(0,y.jsx)(l,{children:(0,y.jsx)(r,{id:`seeS6l`})}),t[35]=tt):tt=t[35];let nt;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(nt=(0,y.jsxs)(re,{children:[tt,(0,y.jsx)(c,{children:(0,y.jsx)(r,{id:`HqiZvw`,components:{0:(0,y.jsx)(`code`,{})}})})]}),t[36]=nt):nt=t[36];let j;t[37]!==n.gitRootPromoted||t[38]!==Ue||t[39]!==Ve?(j=n.gitRootPromoted?(0,y.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,y.jsx)(r,{id:`Y1kX2z`,values:{projectDir:Ve,pickedRelative:Ue},components:{0:(0,y.jsx)(`code`,{}),1:(0,y.jsx)(`code`,{}),2:(0,y.jsx)(`code`,{}),3:(0,y.jsx)(`code`,{}),4:(0,y.jsx)(`code`,{})}})}):null,t[37]=n.gitRootPromoted,t[38]=Ue,t[39]=Ve,t[40]=j):j=t[40];let M;t[41]!==_||t[42]!==n.warnings?(M=n.warnings.length>0?(0,y.jsx)(`div`,{role:`alert`,className:`rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-sm text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,children:n.warnings.map(e=>(0,y.jsx)(`p`,{className:`mb-1 last:mb-0`,children:_(pe[e.kind])},e.kind))}):null,t[41]=_,t[42]=n.warnings,t[43]=M):M=t[43];let N;t[44]!==O||t[45]!==Ce?(N=O?(0,y.jsx)(ye,{probe:Ce}):null,t[44]=O,t[45]=Ce,t[46]=N):N=t[46];let P;t[47]!==E||t[48]!==w||t[49]!==C?(P=(0,y.jsx)(ce,{detectedEditors:C,checked:w,onCheckedChange:xe,disabled:E,testIdPrefix:`consent-editors`,itemTestIdPrefix:`consent-editor`}),t[47]=E,t[48]=w,t[49]=C,t[50]=P):P=t[50];let F;t[51]!==E||t[52]!==b||t[53]!==T?(F=(0,y.jsx)(se,{idPrefix:b,testIdPrefix:`consent-sharing`,value:T,onValueChange:Se,disabled:E}),t[51]=E,t[52]=b,t[53]=T,t[54]=F):F=t[54];let rt;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(rt=(0,y.jsxs)(ee,{className:`group flex w-full items-center justify-between gap-2 px-3 py-2 text-sm font-medium hover:bg-muted/50`,"data-testid":`consent-advanced-trigger`,children:[(0,y.jsx)(r,{id:`VNgKZz`}),(0,y.jsx)(ie,{className:`size-4 transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`,"aria-hidden":!0})]}),t[55]=rt):rt=t[55];let it;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(it=(0,y.jsx)(`label`,{htmlFor:`consent-content-dir`,className:`text-sm font-medium`,children:(0,y.jsx)(r,{id:`ll2yNl`})}),t[56]=it):it=t[56];let at;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(at=e=>{me(e.target.value),De(null)},t[57]=at):at=t[57];let ot=!O,st=Ee===null?O?void 0:`consent-content-dir-error`:`consent-content-dir-browse-error`,I;t[58]!==E||t[59]!==x||t[60]!==ot||t[61]!==st?(I=(0,y.jsx)(g,{id:`consent-content-dir`,value:x,onChange:at,disabled:E,"aria-invalid":ot,"aria-describedby":st,"data-testid":`consent-content-dir`,className:`flex-1`}),t[58]=E,t[59]=x,t[60]=ot,t[61]=st,t[62]=I):I=t[62];let L;t[63]===Ge?L=t[64]:(L=()=>void Ge(),t[63]=Ge,t[64]=L);let ct;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(ct=(0,y.jsx)(r,{id:`O2UpM1`}),t[65]=ct):ct=t[65];let R;t[66]!==E||t[67]!==L?(R=(0,y.jsx)(o,{type:`button`,variant:`outline`,disabled:E,onClick:L,"data-testid":`consent-content-dir-browse`,children:ct}),t[66]=E,t[67]=L,t[68]=R):R=t[68];let z;t[69]!==I||t[70]!==R?(z=(0,y.jsxs)(`div`,{className:`flex items-stretch gap-2`,children:[I,R]}),t[69]=I,t[70]=R,t[71]=z):z=t[71];let B;t[72]!==Ee||t[73]!==O?(B=Ee===null?O?null:(0,y.jsx)(`p`,{id:`consent-content-dir-error`,className:`text-1sm text-destructive`,"data-testid":`consent-content-dir-error`,children:(0,y.jsx)(r,{id:`U5Spo9`})}):(0,y.jsx)(`p`,{id:`consent-content-dir-browse-error`,className:`text-1sm text-destructive`,"data-testid":`consent-content-dir-browse-error`,children:Ee}),t[72]=Ee,t[73]=O,t[74]=B):B=t[74];let V;t[75]!==z||t[76]!==B?(V=(0,y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[it,z,B]}),t[75]=z,t[76]=B,t[77]=V):V=t[77];let lt;t[78]===Symbol.for(`react.memo_cache_sentinel`)?(lt=(0,y.jsx)(`label`,{htmlFor:`consent-additional-ignores`,className:`text-sm font-medium`,children:(0,y.jsx)(r,{id:`3zyg_A`})}),t[78]=lt):lt=t[78];let ut;t[79]===Symbol.for(`react.memo_cache_sentinel`)?(ut=e=>ve(e.target.value),t[79]=ut):ut=t[79];let H;t[80]!==S||t[81]!==E?(H=(0,y.jsx)(ue,{id:`consent-additional-ignores`,value:S,onChange:ut,disabled:E,placeholder:`tmp/
2
+ *.draft.md`,rows:3,"data-testid":`consent-additional-ignores`}),t[80]=S,t[81]=E,t[82]=H):H=t[82];let dt;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(dt=(0,y.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,y.jsx)(r,{id:`aE2_XM`,components:{0:(0,y.jsx)(`code`,{})}})}),t[83]=dt):dt=t[83];let U;t[84]===H?U=t[85]:(U=(0,y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[lt,H,dt]}),t[84]=H,t[85]=U);let W;t[86]!==V||t[87]!==U?(W=(0,y.jsxs)(s,{className:`space-y-6 border-t border-border px-3 py-4`,children:[V,U]}),t[86]=V,t[87]=U,t[88]=W):W=t[88];let G;t[89]!==Be||t[90]!==W?(G=(0,y.jsxs)(te,{open:Be,onOpenChange:ke,className:`rounded-md border border-border`,"data-testid":`consent-advanced`,children:[rt,W]}),t[89]=Be,t[90]=W,t[91]=G):G=t[91];let K;t[92]!==b||t[93]!==Ze||t[94]!==N||t[95]!==P||t[96]!==F||t[97]!==G?(K=(0,y.jsxs)(`form`,{id:b,onSubmit:Ze,"data-testid":`consent-form`,className:`space-y-6`,children:[N,P,F,G]}),t[92]=b,t[93]=Ze,t[94]=N,t[95]=P,t[96]=F,t[97]=G,t[98]=K):K=t[98];let q;t[99]!==j||t[100]!==M||t[101]!==K?(q=(0,y.jsxs)(d,{className:`space-y-6`,children:[j,M,K]}),t[99]=j,t[100]=M,t[101]=K,t[102]=q):q=t[102];let J;t[103]===A?J=t[104]:(J=()=>void A(),t[103]=A,t[104]=J);let ft=!ze,pt;t[105]===Symbol.for(`react.memo_cache_sentinel`)?(pt=(0,y.jsx)(r,{id:`dEgA5A`}),t[105]=pt):pt=t[105];let Y;t[106]!==J||t[107]!==ft?(Y=(0,y.jsx)(o,{type:`button`,variant:`outline`,onClick:J,disabled:ft,"data-testid":`consent-cancel`,children:pt}),t[106]=J,t[107]=ft,t[108]=Y):Y=t[108];let X;t[109]===D?X=t[110]:(X=D?(0,y.jsx)(h,{"aria-hidden":`true`}):null,t[109]=D,t[110]=X);let mt;t[111]===Symbol.for(`react.memo_cache_sentinel`)?(mt=(0,y.jsx)(r,{id:`RDjuBN`}),t[111]=mt):mt=t[111];let Z;t[112]!==D||t[113]!==b||t[114]!==k||t[115]!==X?(Z=(0,y.jsxs)(o,{type:`submit`,form:b,disabled:k,"aria-busy":D,"data-testid":`consent-start`,children:[X,mt]}),t[112]=D,t[113]=b,t[114]=k,t[115]=X,t[116]=Z):Z=t[116];let Q;t[117]!==Y||t[118]!==Z?(Q=(0,y.jsxs)(ne,{children:[Y,Z]}),t[117]=Y,t[118]=Z,t[119]=Q):Q=t[119];let $;t[120]!==q||t[121]!==Q?($=(0,y.jsxs)(u,{className:`sm:max-w-lg`,onOpenAutoFocus:he,children:[nt,q,Q]}),t[120]=q,t[121]=Q,t[122]=$):$=t[122];let ht;return t[123]!==et||t[124]!==$?(ht=(0,y.jsx)(f,{open:!0,onOpenChange:et,children:$}),t[123]=et,t[124]=$,t[125]=ht):ht=t[125],ht}function he(e){e.preventDefault(),e.currentTarget.querySelector(`[role="radio"]`)?.focus()}function ge(e){return console.warn(`[ConsentDialog] editor-detection probe failed:`,e),[]}function _e(e){let t=new Set(e.editors.filter(C).map(ve));return e.detectedEditorIds.filter(e=>p(e,{userMcpEntryInstalled:t.has(e)}))}function ve(e){return e.id}function C(e){return e.state===`installed`}function ye(e){let t=(0,de.c)(29),{probe:n}=e,{_:a,i18n:o}=i();if(n===null){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,y.jsx)(`p`,{className:`text-1sm text-muted-foreground`,"data-testid":`consent-preview`,children:(0,y.jsx)(r,{id:`DiFKSL`})}),t[0]=e):e=t[0],e}if(!n.ok){let e=n.error,i;return t[1]===e?i=t[2]:(i=(0,y.jsx)(`p`,{className:`text-1sm text-muted-foreground`,"data-testid":`consent-preview`,children:(0,y.jsx)(r,{id:`9fvog2`,values:{errorDetail:e}})}),t[1]=e,t[2]=i),i}let c,l,u,d;if(t[3]!==a||t[4]!==o.locale||t[5]!==n.count||t[6]!==n.sample.length||t[7]!==n.truncated){d=Symbol.for(`react.early_return_sentinel`);bb0:{let e=new Intl.NumberFormat(o.locale),t=e.format(n.count);if(c=a({id:`MV-Dkb`,values:{countDisplay:n.truncated?`≥ ${t}`:t}}),n.sample.length===0){d=(0,y.jsx)(`p`,{className:`text-1sm text-muted-foreground`,"data-testid":`consent-preview`,children:c});break bb0}l=n.truncated?null:n.count-n.sample.length,u=l===null?null:e.format(l)}t[3]=a,t[4]=o.locale,t[5]=n.count,t[6]=n.sample.length,t[7]=n.truncated,t[8]=c,t[9]=l,t[10]=u,t[11]=d}else c=t[8],l=t[9],u=t[10],d=t[11];if(d!==Symbol.for(`react.early_return_sentinel`))return d;let ne=u,re;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,y.jsx)(ie,{className:`size-3 transition-transform motion-reduce:transition-none`,"aria-hidden":!0}),t[12]=re):re=t[12];let f;t[13]===c?f=t[14]:(f=(0,y.jsxs)(ee,{className:`flex items-center gap-1 text-1sm text-muted-foreground hover:text-foreground [&[data-state=open]>svg]:rotate-90`,children:[re,(0,y.jsx)(`span`,{children:c})]}),t[13]=c,t[14]=f);let p;t[15]===n.sample?p=t[16]:(p=n.sample.map(be),t[15]=n.sample,t[16]=p);let m;t[17]===p?m=t[18]:(m=(0,y.jsx)(`ul`,{className:`space-y-1.5 font-mono`,children:p}),t[17]=p,t[18]=m);let h;t[19]!==n.truncated||t[20]!==ne||t[21]!==l?(h=n.truncated||l!==null&&l>0?(0,y.jsx)(`p`,{className:`mt-1 italic`,children:n.truncated?(0,y.jsx)(r,{id:`5wV2qQ`}):(0,y.jsx)(r,{id:`nNYV3Y`,values:{remaining:ne}})}):null,t[19]=n.truncated,t[20]=ne,t[21]=l,t[22]=h):h=t[22];let g;t[23]!==m||t[24]!==h?(g=(0,y.jsxs)(s,{className:`pt-1 pl-4 text-1sm text-muted-foreground`,children:[m,h]}),t[23]=m,t[24]=h,t[25]=g):g=t[25];let ae;return t[26]!==f||t[27]!==g?(ae=(0,y.jsxs)(te,{"data-testid":`consent-preview`,children:[f,g]}),t[26]=f,t[27]=g,t[28]=ae):ae=t[28],ae}function be(e){return(0,y.jsx)(`li`,{children:e},e)}export{me as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./index-CobxLX9l.js";export{e as FeedbackForm};