@inkeep/open-knowledge 0.79.1 → 0.79.2
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/cli.mjs +6 -6
- package/dist/constants-jpNm5-5s.mjs +1 -0
- package/dist/index.mjs +1 -1
- package/dist/init-BGM70oJ3.mjs +1 -0
- package/dist/{init-CYog4yx7.mjs → init-CjbAcLHr.mjs} +2 -2
- package/dist/{launch-json-removal-DAkKSxPi.mjs → launch-json-removal-1V6_UV5_.mjs} +1 -1
- package/dist/loader-BVs3fR6_.mjs +1 -0
- package/dist/{loader-MeYE4GLE.mjs → loader-Cmpu_239.mjs} +1 -1
- package/dist/{preview-Dqcho6J9.mjs → preview-CUsQsBjV.mjs} +1 -1
- package/dist/preview-DejneDxR.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-CMQ3yKq7.js → ActivityModeContent-CwiUBgGI.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-CAVgdUw9.js → AddPropertiesButton-B5wgFBcs.js} +2 -2
- package/dist/public/assets/{AgentDiffPane-CNxxM1cw.js → AgentDiffPane-DCr3QWvF.js} +1 -1
- package/dist/public/assets/{AgentIconCluster-CcWJGxIl.js → AgentIconCluster-CqUXZZMo.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-CvxQuIBX.js → AgentThreadClientBinder-CGvXydlP.js} +1 -1
- package/dist/public/assets/{BugReportHistory-DZkrVFAB.js → BugReportHistory-BQMbH-qH.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-CAaSH8Z8.js → BugReportHistoryDialog-BRdfOcWv.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-Bs5Zz6zc.js → CodeMirrorPropInput-CjC1gT00.js} +1 -1
- package/dist/public/assets/{ConsentDialogBody-Dw2RsiPu.js → ConsentDialogBody-DWjU5hm4.js} +1 -1
- package/dist/public/assets/{DeleteConfirmationDialog-C7TRpBFu.js → DeleteConfirmationDialog-CJJ8Xo5u.js} +1 -1
- package/dist/public/assets/{DiffViewBoundary-B8ygEYRx.js → DiffViewBoundary-BGdnGPRv.js} +1 -1
- package/dist/public/assets/{DocumentContext-DFZKvfvg.js → DocumentContext-Dlldf3A6.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-D1sH5zyp.js → EditorModeToggle-CUFvhR2v.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-D7XgtzZ6.js → EnableSyncConfirmDialog-DfwumFEb.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-LkoeP6TS.js → ExcalidrawDocEditor-CylNX2Db.js} +1 -1
- package/dist/public/assets/FeedbackForm-B2kRhtsR.js +1 -0
- package/dist/public/assets/{GraphPanel-DFPyCL13.js → GraphPanel-BQaGu4a5.js} +1 -1
- package/dist/public/assets/{ImageAttachments-B3P_uoX-.js → ImageAttachments-mkcDupGd.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-C5wB1ZPM.js → ImportSkillDialog-DSya0fK3.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-C2Zhcya0.js → LintConfigEditor-BsTgh8nL.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-BzV-ytKX.js → ManagedArtifactProperties-CVIYFnTZ.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-DCWlX1Qg.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-BYLl76k-.js → MermaidDocEditor-634q13Qg.js} +1 -1
- package/dist/public/assets/{OpenInAgentMenuItem-WDk8OSU_.js → OpenInAgentMenuItem-D8HsZbz2.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-Di40R_uZ.js → PropertyDisplayRow-B_AEbfI7.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-D1mT8XgE.js → RegisteredAgentIcon-Cg6tPVU5.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-Dh3WD2VN.js → ReportBugDialogBody-ABNMdMUU.js} +1 -1
- package/dist/public/assets/{ReportBugMenuTrigger-B54YjZe2.js → ReportBugMenuTrigger-DRki3qOn.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-BXUj0uFL.js → SchemaConfigEditor-D6Ve-pbq.js} +1 -1
- package/dist/public/assets/{SessionsHost-DOi4zI61.js → SessionsHost-BqU3aWOR.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-CTcChDnS.js → SettingsDialogBody-UKT3bDul.js} +1 -1
- package/dist/public/assets/{ShareBranchSwitchDialog-BYpslO0e.js → ShareBranchSwitchDialog-DE7uyxww.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-QU9uVVie.js → ShareReceiveDialog-D8d3_-15.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-Cr-9ZD4P.js → ShareReceiveMissDialog-Bx29cMNb.js} +1 -1
- package/dist/public/assets/{SkillCostValue-BdBcXHlx.js → SkillCostValue-gdZ-CbVJ.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-ClPPeqZ0.js → SkillEditBanner-Bd94eiPC.js} +1 -1
- package/dist/public/assets/{SkillForkDialog-D034m56I.js → SkillForkDialog-ho4FUABV.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-Bnk1xL2_.js → SkillInstallMenu-DpmMcdPv.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-DqGGomSX.js → SkillOriginInline-DmEjQplu.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-C2tntbUk.js → SkillToolbarControls-miZURo1o.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-DX59frog.js → SlidesToolbarControls-CUfeiKej.js} +1 -1
- package/dist/public/assets/{SourceEditor-BK2MItYu.js → SourceEditor-DCGr3Oun.js} +1 -1
- package/dist/public/assets/{TerminalPanel-BA8pLHQU.js → TerminalPanel-DDye0ppp.js} +3 -3
- package/dist/public/assets/{TerminalWindowApp-raSirwID.js → TerminalWindowApp-QDFQJvJI.js} +1 -1
- package/dist/public/assets/{TextDocEditor-Q46PlwHW.js → TextDocEditor-Dy2g4z9H.js} +1 -1
- package/dist/public/assets/{ThreadView-De4fAzYv.js → ThreadView-e6Emlmew.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-Czlzxejs.js → TimelineDiffPane-9-8JYbua.js} +1 -1
- package/dist/public/assets/{agent-connection-status-6xEDgtVY.js → agent-connection-status-BTfitB3U.js} +1 -1
- package/dist/public/assets/{auth-state-cache-BbXZVcrL.js → auth-state-cache-CIg70qGh.js} +1 -1
- package/dist/public/assets/{bug-report-send-manager-CFQeWhI7.js → bug-report-send-manager-BCkcP5rY.js} +1 -1
- package/dist/public/assets/client-version-DA4kJKPj.js +1 -0
- package/dist/public/assets/{comment-chips-DQwYObOB.js → comment-chips-Cnc9lZ6c.js} +1 -1
- package/dist/public/assets/{config-provider-CJtciSEp.js → config-provider-owr5M3NH.js} +1 -1
- package/dist/public/assets/{css-color-to-hex-a2B-BvaC.js → css-color-to-hex-B54xiLpY.js} +1 -1
- package/dist/public/assets/{diagnostic-breadcrumb-C5JgIaag.js → diagnostic-breadcrumb-BUuIuodI.js} +1 -1
- package/dist/public/assets/{dist-DJGeR4t4.js → dist-bQ5kvrpa.js} +1 -1
- package/dist/public/assets/{doc-paths-BX7XJ9w6.js → doc-paths-BKrv1Wyo.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-D7L8yaA-.js → doc-undo-manager-CaLoly49.js} +1 -1
- package/dist/public/assets/{documents-events-CnCkgB3l.js → documents-events-j9AAd1Uc.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-BNla68il.js → file-tree-adapter-BqzkXC53.js} +1 -1
- package/dist/public/assets/{file-tree-utils-Zq3ePIrS.js → file-tree-utils-B3QHZLn9.js} +1 -1
- package/dist/public/assets/{folder-config-api-CzDFKSHb.js → folder-config-api-DBYtfk4T.js} +1 -1
- package/dist/public/assets/{index-Cdw88IDb.js → index-B4DpftwC.js} +8 -8
- package/dist/public/assets/{lint-config-client-D4exB0U2.js → lint-config-client-C26s8yTI.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-62Ha9Ett.js → markdownlint-rule-browser-DYxq-YWd.js} +1 -1
- package/dist/public/assets/{navigation-targets-DRmErmHI.js → navigation-targets-35tMAsBB.js} +1 -1
- package/dist/public/assets/{page-list-cache-B-RIMSul.js → page-list-cache-DP24ij3W.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-rpT2htd7.js → pending-receive-nav-store-ru8vEtq1.js} +1 -1
- package/dist/public/assets/{preferred-session-events-D67LV6Ro.js → preferred-session-events-Dhjm0Z1H.js} +1 -1
- package/dist/public/assets/{progress-BQTeRDUZ.js → progress-ChqYJ_wo.js} +1 -1
- package/dist/public/assets/{project-paths-WrSwjFrW.js → project-paths-CDhA3hJy.js} +1 -1
- package/dist/public/assets/{prop-types-B89-ahXp.js → prop-types-BWPMh-sI.js} +1 -1
- package/dist/public/assets/{receive-store-c_psik1Z.js → receive-store-CU33mRR1.js} +1 -1
- package/dist/public/assets/{selection-context-BNQQRGrZ.js → selection-context-4lSNiVN-.js} +1 -1
- package/dist/public/assets/{sign-in-terminal-events-DWlbwYa8.js → sign-in-terminal-events-MVTdgKtV.js} +1 -1
- package/dist/public/assets/{skill-scope-Dv1qfrIr.js → skill-scope-B73Ci61z.js} +1 -1
- package/dist/public/assets/{skills-api-tBdkCsaK.js → skills-api-BazLRy2N.js} +1 -1
- package/dist/public/assets/{src-BajtZ0QZ.js → src-C5n8TKJq.js} +1 -1
- package/dist/public/assets/{startup-marks-BYZ0ulrV.js → startup-marks-c2tjYHWa.js} +1 -1
- package/dist/public/assets/{tag-pill-input-D0eqNxOI.js → tag-pill-input-BQX-_Adc.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-B-2as9vj.js → target-navigation-intent-BJZ9PSpW.js} +1 -1
- package/dist/public/assets/{telemetry-impl-CnH5E_IE.js → telemetry-impl-BjW04TM-.js} +1 -1
- package/dist/public/assets/{telemetry-startup-poUQk5mt.js → telemetry-startup-BS9CaXrj.js} +1 -1
- package/dist/public/assets/{terminal-command-events-C5J8kk91.js → terminal-command-events-BQFgUjko.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-ChcAyhpW.js → terminal-launch-events-Dmdb2rMF.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-8FjHW7qz.js → terminal-telemetry-BA6DIKLO.js} +1 -1
- package/dist/public/assets/{thread-client-BLcdIOaO.js → thread-client-BS8GJcoK.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-DvZ3MhGG.js → typing-burst-detector-BEdXQddD.js} +1 -1
- package/dist/public/assets/{uninstall-A3a4moPV.js → uninstall-DXJMPkVq.js} +1 -1
- package/dist/public/assets/{use-activity-panel-Btpqtgnc.js → use-activity-panel-CngLVlKx.js} +1 -1
- package/dist/public/assets/{use-apply-config-language-DMh-mO10.js → use-apply-config-language-DgBG2Y3l.js} +1 -1
- package/dist/public/assets/{use-collab-url-0YmMiCnb.js → use-collab-url-4KL8XQXU.js} +1 -1
- package/dist/public/assets/{use-conflicts-Bv5qpMjG.js → use-conflicts-BNUZnjy-.js} +1 -1
- package/dist/public/assets/{use-git-sync-status-CAwAUWxe.js → use-git-sync-status-BnU8yWA0.js} +1 -1
- package/dist/public/assets/{use-installed-clis-pLpwg3EF.js → use-installed-clis-SziirqY4.js} +2 -2
- package/dist/public/assets/{use-live-xterm-theme-CoIE-sU_.js → use-live-xterm-theme-CFX30um3.js} +1 -1
- package/dist/public/assets/{use-open-skill-DS_Opn4I.js → use-open-skill-B-WzAe13.js} +1 -1
- package/dist/public/assets/{use-settings-route-hjVzW5Tp.js → use-settings-route-C4w2E5xi.js} +1 -1
- package/dist/public/assets/{use-skill-origin-CM-tUzQ6.js → use-skill-origin-C2zSJntJ.js} +1 -1
- package/dist/public/assets/{use-skills-CgeMgxi9.js → use-skills-BZixx2iF.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-C5ZRMFdk.js → use-terminal-enabled-Dd55GJPP.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-CrahfCFR.js → use-timeline-entry-diff-D9Fyk7np.js} +1 -1
- package/dist/public/assets/{use-workspace-qpv3ZWQV.js → use-workspace-CchUoI6W.js} +1 -1
- package/dist/public/index.html +59 -59
- package/dist/public/uninstall.html +3 -3
- package/dist/{registry-probes-Cb6RgWzJ.mjs → registry-probes-ftrzXHET.mjs} +1 -1
- package/dist/{removal-file-path-CxkbKs4t.mjs → removal-file-path-4H4PUJxJ.mjs} +1 -1
- package/dist/{repair-launch-json-D-3r90PE.mjs → repair-launch-json-DAIGiTv8.mjs} +1 -1
- package/dist/{repair-mcp-configs-rSVqz9R7.mjs → repair-mcp-configs-CO4UASHL.mjs} +1 -1
- package/dist/src--m06lQMP.mjs +1 -0
- package/dist/{src-Blp94GGT.mjs → src-CcEkY68s.mjs} +1 -1
- package/dist/{start-sKaltbeX.mjs → start-BuIYuZ-E.mjs} +2 -2
- package/dist/start-DqUv0wIj.mjs +1 -0
- package/package.json +4 -4
- package/dist/constants-wr1REWlx.mjs +0 -1
- package/dist/init-BtWrs4kQ.mjs +0 -1
- package/dist/loader-BNnMx8o_.mjs +0 -1
- package/dist/preview-BJpZXC--.mjs +0 -1
- package/dist/public/assets/FeedbackForm-Vd7E-3c5.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-BGGM89Iv.js +0 -1
- package/dist/public/assets/client-version-BZrDNG1U.js +0 -1
- package/dist/src-ndD0Lcgl.mjs +0 -1
- package/dist/start-DPtTGPh6.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{Ct as r,Ds as i,Es as a,Fo as o,Ns as s,_ as c,bs as l,ds as u,is as d,ts as f,v as p}from"./dist-DJGeR4t4.js";import{t as m}from"./use-apply-config-theme-B5w38X1P.js";var h=e(t(),1);function g(e,t=f){return t.find(t=>t.id===e)??s(e)}function _(e,t=f){let n=g(e,t).kind;return n===`system`?void 0:n}function ee(e){return{colorThemeLight:e.light,colorThemeDark:e.dark,colorTheme:null}}function v(){return{colorThemeLight:null,colorThemeDark:null,colorTheme:null}}var te=new Map(r.map(e=>[e.name,e]));function y(e,t){let n=te.get(e);if(!n)throw Error(`color-themes: ${e} is not a generated base-theme token`);return n[t]}function b(e){return{sidebar:e===`dark`?c:p,background:y(`--background`,e),primary:y(`--primary`,e),border:y(`--border`,e),"syntax-string":y(`--chart-2`,e),"syntax-keyword":y(`--chart-4`,e),"syntax-atom":y(`--chart-3`,e)}}var x={name:`Custom`,variant:`dark`,palette:{base00:`#0f172a`,base01:`#1e293b`,base02:`#334155`,base03:`#64748b`,base04:`#94a3b8`,base05:`#e2e8f0`,base06:`#f1f5f9`,base07:`#f8fafc`,base08:`#e5534b`,base09:`#db8d3f`,base0A:`#d29922`,base0B:`#3fb950`,base0C:`#22d3ee`,base0D:`#6366f1`,base0E:`#a78bfa`,base0F:`#c2703f`}},S=[`background`,`surface`,`foreground`,`primary`,`accent`,`border`];function ne(e){let{background:t,foreground:n}=e;return{name:`Custom`,variant:a(t)<a(n)?`dark`:`light`,palette:{base00:t,base01:e.surface,base02:e.border,base03:l(t,n,.4),base04:l(t,n,.55),base05:n,base06:l(n,`#ffffff`,.3),base07:l(n,`#ffffff`,.6),base08:`#e5534b`,base09:`#db8d3f`,base0A:`#d29922`,base0B:`#3fb950`,base0C:e.accent,base0D:e.primary,base0E:e.accent,base0F:l(`#e5534b`,t,.35)}}}function re(e){return u(e)}function ie(){let e=x.palette;return{background:e.base00,surface:e.base01,foreground:e.base05,primary:e.base0D,accent:e.base0C,border:e.base02}}function ae(e){let t=ie(),n=!1;for(let r of S){let i=e[r];u(i)&&(t[r]=i,n=!0)}return n?t:null}function oe(e){return e?S.some(t=>u(e[t])):!1}function C(e){if(!e)return x;let t=ae(e),n={...(t?ne(t):x).palette};for(let t of o){let r=e[t];u(r)&&(n[t]=r)}let r=e.variant===`light`||e.variant===`dark`?e.variant:a(n.base00)<a(n.base05)?`dark`:`light`;return{name:typeof e.name==`string`&&e.name.trim()?e.name.trim():`Custom`,author:typeof e.author==`string`?e.author:void 0,variant:r,palette:n}}function se(e){let t={name:e.name,author:e.author??null,variant:e.variant};for(let n of o)t[n]=e.palette[n];for(let e of S)t[e]=null;return t}function w(e){return e.variant}function T(e){return i(`html[data-color-theme="custom"]`,e.variant,d(e))}var ce=Object.keys(d(x)).map(e=>`--${e}`),E=[...new Set([...r.filter(e=>e.name!==`--radius`).map(e=>e.name),...ce,`--ok-comment-hue`])],le=new Set(E);function D(e){return le.has(e)}var O=n(),k=`data-theme-color-transitions`,ue=`ok-theme-color-transitions`,A=`data-theme-color-fading`,j=200,de=E.map(e=>`${e} ${j}ms ease-out`).join(`,`),M=new WeakSet;function fe(e){return e.defaultView?.CSS}function pe(e){let t=fe(e);if(typeof t?.registerProperty!=`function`)return!1;let n=e.defaultView?.DOMException;for(let e of E)try{t.registerProperty({name:e,syntax:`<color>`,inherits:!0,initialValue:`transparent`})}catch(e){if(typeof n==`function`&&e instanceof n&&e.name===`InvalidModificationError`)continue;throw e}return!0}function me(e){if(e.getElementById(`ok-theme-color-transitions`))return;let t=e.createElement(`style`);t.id=ue,t.textContent=`@media (prefers-reduced-motion: no-preference){:root[${k}]{transition:${de}}}`,e.head.appendChild(t)}function N(e){return e===`color`||e===`fill`||e===`stroke`||e.endsWith(`-color`)||e===`--tw-gradient-from`||e===`--tw-gradient-via`||e===`--tw-gradient-to`}function he(e){let t=e.defaultView;if(!t||typeof t.requestAnimationFrame!=`function`)return;let n=e.documentElement,r=0,i=0,a=0,o=0,s=n.getAttribute(`class`),c=n.getAttribute(`data-color-theme`),l=new Set,u=e=>{for(let t of e.getAnimations({subtree:!1}))N(t.transitionProperty??``)&&t.cancel()},d=()=>{if(typeof e.getAnimations==`function`)for(let r of e.getAnimations()){let e=r.effect,i=e&&`target`in e?e.target:null;i===n||!(i instanceof t.Element)||N(r.transitionProperty??``)&&r.cancel()}},f=()=>{a||=t.requestAnimationFrame(()=>{a=0;for(let e of l)u(e);n.hasAttribute(`data-theme-color-fading`)&&f()})},p=t=>{if(r=0,t===o){if(e.hidden||!P(e)){n.removeAttribute(A),l.clear();return}m(t)}},m=e=>{r=t.requestAnimationFrame(()=>p(e))};new t.MutationObserver(()=>{let r=n.getAttribute(`class`),a=n.getAttribute(`data-color-theme`);if(r===s&&a===c)return;s=r,c=a,o+=1;let u=o;if(i&&=(t.clearTimeout(i),0),n.setAttribute(A,``),d(),!P(e)){n.removeAttribute(A),l.clear();return}i=t.setTimeout(()=>{i=0,p(u)},j),f()}).observe(n,{attributes:!0,attributeFilter:[`class`,`data-color-theme`]}),e.addEventListener(`visibilitychange`,()=>{e.hidden&&(o+=1,i&&t.clearTimeout(i),r&&t.cancelAnimationFrame(r),n.removeAttribute(A),l.clear())}),e.addEventListener(`transitionrun`,e=>{if(e.target===n||!n.hasAttribute(`data-theme-color-fading`)||!N(e.propertyName))return;let r=e.target;r instanceof t.Element&&(l.add(r),u(r),f())},!0)}function ge(e=window.document){return M.has(e)||e.documentElement.hasAttribute(`data-theme-color-transitions`)?(M.add(e),!0):pe(e)?(me(e),he(e),e.documentElement.setAttribute(k,``),M.add(e),!0):!1}function _e(e){let t=(0,O.c)(3),n,r;t[0]===e?(n=t[1],r=t[2]):(n=()=>{if(!e)return;let t=ve;if(typeof requestAnimationFrame!=`function`){t();return}let n=requestAnimationFrame(t);return()=>cancelAnimationFrame(n)},r=[e],t[0]=e,t[1]=n,t[2]=r),(0,h.useEffect)(n,r)}function ve(){try{ge()}catch(e){let t=e;console.warn(JSON.stringify({event:`theme-color-transitions-arm-failed`,error:t instanceof Error?t.message:String(t)}))}}function P(e=window.document){let t=e.documentElement;return typeof t.getAnimations==`function`?t.getAnimations({subtree:!1}).some(e=>D(e.transitionProperty??``)):!1}var F=`ok-color-theme-pair-v1`,I=`ok-color-theme-v1`,ye=`ok-custom-theme-v1`,L=`data-color-theme`,R=`ok-custom-theme`,z=`ok-saved-theme`;function be(e){let t=document.getElementById(R);t||(t=document.createElement(`style`),t.id=R,document.head.appendChild(t)),t.textContent!==e&&(t.textContent=e)}function xe(){document.getElementById(R)?.remove()}function B(e){if(e.scheme)return i(`html[${L}]`,e.scheme.variant,d(e.scheme))}function Se(e){let t=document.getElementById(z);t||(t=document.createElement(`style`),t.id=z,document.head.appendChild(t)),t.textContent!==e&&(t.textContent=e)}function Ce(){document.getElementById(z)?.remove()}function V(e,t,n,r){return e===`custom`?w(C(n))===`dark`:(_(e,r)??t)===`dark`}function we(e,t,n){if(e===`custom`)return T(C(t));if(f.some(t=>t.id===e))return;let r=n.find(t=>t.id===e);return r?B(r):void 0}function H(e,t,n,r){let i=V(e,t,n,r),a=we(e,n,r);return a?{id:e,dark:i,css:a}:{id:e,dark:i}}function Te(e){let{selection:t,slotMode:n,customSeed:r,themes:i=f,enabled:a=!0}=e,o=g(a?t[n]:`default`,i).id;return{id:o,dark:V(o,n,r,i)}}function U(e){if(typeof document>`u`)return;let{selection:t,modePreference:n,customSeed:r,themes:i=f,enabled:a=!0}=e,o=Te(e),s=g(o.id,i),c=document.documentElement;o.id===`default`?c.removeAttribute(L):c.setAttribute(L,o.id);let l=!f.some(e=>e.id===o.id)&&s.id===o.id?B(s):void 0;l?Se(l):Ce(),o.id===`custom`?be(T(C(r))):xe();let u=t.light===`default`&&t.dark===`default`;try{!a||u?localStorage.removeItem(F):localStorage.setItem(F,JSON.stringify({pref:m(n),light:H(t.light,`light`,r,i),dark:H(t.dark,`dark`,r,i)})),localStorage.removeItem(I),localStorage.removeItem(ye)}catch{}}function Ee(e){let t=(0,O.c)(22),{selection:n,modePreference:r,slotMode:i,customSeed:a,themes:o,enabled:s,ready:c}=e,l=s===void 0?!0:s,u=c===void 0?!0:c,d;t[0]!==a||t[1]!==l||t[2]!==n.dark||t[3]!==n.light?(d=l&&(n.light===`custom`||n.dark===`custom`)?JSON.stringify(a??null):``,t[0]=a,t[1]=l,t[2]=n.dark,t[3]=n.light,t[4]=d):d=t[4];let f=d,p;t[5]!==a||t[6]!==l||t[7]!==r||t[8]!==u||t[9]!==n||t[10]!==i||t[11]!==o?(p=()=>{u&&U({selection:n,modePreference:r,slotMode:i,customSeed:a,themes:o,enabled:l})},t[5]=a,t[6]=l,t[7]=r,t[8]=u,t[9]=n,t[10]=i,t[11]=o,t[12]=p):p=t[12];let m;t[13]!==l||t[14]!==r||t[15]!==u||t[16]!==f||t[17]!==n.dark||t[18]!==n.light||t[19]!==i||t[20]!==o?(m=[n.light,n.dark,r,i,f,o,l,u],t[13]=l,t[14]=r,t[15]=u,t[16]=f,t[17]=n.dark,t[18]=n.light,t[19]=i,t[20]=o,t[21]=m):m=t[21],(0,h.useEffect)(p,m)}var W=0,G=new Set,K=null,q=0;function J(){W+=1;for(let e of G)e()}function Y(){if(q||typeof requestAnimationFrame!=`function`){typeof requestAnimationFrame!=`function`&&J();return}q=requestAnimationFrame(()=>{q=0,J(),P()&&Y()})}function X(e){e.target===document.documentElement&&D(e.propertyName)&&Y()}function Z(e){return G.add(e),!K&&typeof document<`u`&&(K=new MutationObserver(Y),K.observe(document.documentElement,{attributes:!0,attributeFilter:[L,`class`]}),K.observe(document.head,{childList:!0,subtree:!0,characterData:!0}),document.documentElement.addEventListener(`transitionrun`,X),document.documentElement.addEventListener(`transitionend`,X),document.documentElement.addEventListener(`transitioncancel`,X),P()&&Y()),()=>{G.delete(e),G.size===0&&(K?.disconnect(),K=null,document.documentElement.removeEventListener(`transitionrun`,X),document.documentElement.removeEventListener(`transitionend`,X),document.documentElement.removeEventListener(`transitioncancel`,X),q&&cancelAnimationFrame(q),q=0)}}function De(){return W}function Oe(){return 0}function ke(){return(0,h.useSyncExternalStore)(Z,De,Oe)}function Ae(e,t){let n=/^rgba?\(([^)]*)\)$/i.exec(e.trim())?.[1];if(n===void 0)return null;let r=n.split(/[\s,/]+/).filter(Boolean);if(r.length<3)return null;let i=`#`;for(let e=0;e<3;e++){let t=Math.round(Number(r[e]));if(!Number.isFinite(t)||t<0||t>255)return null;i+=t.toString(16).padStart(2,`0`)}if(t){let e=r[3]===void 0?1:Number(r[3]);if(!Number.isFinite(e)||e<0||e>1)return null;i+=Math.round(e*255).toString(16).padStart(2,`0`)}return i}var Q=null,$=null;function je(e,t){if(typeof document>`u`)return null;try{if(!Q){let e=document.createElement(`canvas`);e.width=1,e.height=1,Q=e.getContext(`2d`,{willReadFrequently:!0})}let n=Q;if(!n)return null;n.fillStyle=`#010203`,n.fillStyle=e;let r=n.fillStyle!==`#010203`;if(n.fillStyle=`#fefdfc`,n.fillStyle=e,!r&&n.fillStyle===`#fefdfc`)return null;n.clearRect(0,0,1,1),n.fillStyle=e,n.fillRect(0,0,1,1);let i=n.getImageData(0,0,1,1).data.slice(0,t?4:3);return $=null,`#${Array.from(i,e=>e.toString(16).padStart(2,`0`)).join(``)}`}catch(t){Q=null;let n=t instanceof Error?t.message:String(t);return $!==n&&($=n,console.warn(JSON.stringify({event:`css-color-to-hex-canvas-failed`,error:n,value:e}))),null}}function Me(e,t={}){let n=t.alpha??!1;return Ae(e,n)??je(e,n)}export{oe as _,U as a,_e as c,_ as d,v as f,b as g,se as h,L as i,E as l,w as m,Z as n,Ee as o,ee as p,ke as r,P as s,Me as t,x as u,re as v,C as y};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{Ct as r,Ds as i,Es as a,Fo as o,Ns as s,_ as c,bs as l,ds as u,is as d,ts as f,v as p}from"./dist-bQ5kvrpa.js";import{t as m}from"./use-apply-config-theme-B5w38X1P.js";var h=e(t(),1);function g(e,t=f){return t.find(t=>t.id===e)??s(e)}function _(e,t=f){let n=g(e,t).kind;return n===`system`?void 0:n}function ee(e){return{colorThemeLight:e.light,colorThemeDark:e.dark,colorTheme:null}}function v(){return{colorThemeLight:null,colorThemeDark:null,colorTheme:null}}var te=new Map(r.map(e=>[e.name,e]));function y(e,t){let n=te.get(e);if(!n)throw Error(`color-themes: ${e} is not a generated base-theme token`);return n[t]}function b(e){return{sidebar:e===`dark`?c:p,background:y(`--background`,e),primary:y(`--primary`,e),border:y(`--border`,e),"syntax-string":y(`--chart-2`,e),"syntax-keyword":y(`--chart-4`,e),"syntax-atom":y(`--chart-3`,e)}}var x={name:`Custom`,variant:`dark`,palette:{base00:`#0f172a`,base01:`#1e293b`,base02:`#334155`,base03:`#64748b`,base04:`#94a3b8`,base05:`#e2e8f0`,base06:`#f1f5f9`,base07:`#f8fafc`,base08:`#e5534b`,base09:`#db8d3f`,base0A:`#d29922`,base0B:`#3fb950`,base0C:`#22d3ee`,base0D:`#6366f1`,base0E:`#a78bfa`,base0F:`#c2703f`}},S=[`background`,`surface`,`foreground`,`primary`,`accent`,`border`];function ne(e){let{background:t,foreground:n}=e;return{name:`Custom`,variant:a(t)<a(n)?`dark`:`light`,palette:{base00:t,base01:e.surface,base02:e.border,base03:l(t,n,.4),base04:l(t,n,.55),base05:n,base06:l(n,`#ffffff`,.3),base07:l(n,`#ffffff`,.6),base08:`#e5534b`,base09:`#db8d3f`,base0A:`#d29922`,base0B:`#3fb950`,base0C:e.accent,base0D:e.primary,base0E:e.accent,base0F:l(`#e5534b`,t,.35)}}}function re(e){return u(e)}function ie(){let e=x.palette;return{background:e.base00,surface:e.base01,foreground:e.base05,primary:e.base0D,accent:e.base0C,border:e.base02}}function ae(e){let t=ie(),n=!1;for(let r of S){let i=e[r];u(i)&&(t[r]=i,n=!0)}return n?t:null}function oe(e){return e?S.some(t=>u(e[t])):!1}function C(e){if(!e)return x;let t=ae(e),n={...(t?ne(t):x).palette};for(let t of o){let r=e[t];u(r)&&(n[t]=r)}let r=e.variant===`light`||e.variant===`dark`?e.variant:a(n.base00)<a(n.base05)?`dark`:`light`;return{name:typeof e.name==`string`&&e.name.trim()?e.name.trim():`Custom`,author:typeof e.author==`string`?e.author:void 0,variant:r,palette:n}}function se(e){let t={name:e.name,author:e.author??null,variant:e.variant};for(let n of o)t[n]=e.palette[n];for(let e of S)t[e]=null;return t}function w(e){return e.variant}function T(e){return i(`html[data-color-theme="custom"]`,e.variant,d(e))}var ce=Object.keys(d(x)).map(e=>`--${e}`),E=[...new Set([...r.filter(e=>e.name!==`--radius`).map(e=>e.name),...ce,`--ok-comment-hue`])],le=new Set(E);function D(e){return le.has(e)}var O=n(),k=`data-theme-color-transitions`,ue=`ok-theme-color-transitions`,A=`data-theme-color-fading`,j=200,de=E.map(e=>`${e} ${j}ms ease-out`).join(`,`),M=new WeakSet;function fe(e){return e.defaultView?.CSS}function pe(e){let t=fe(e);if(typeof t?.registerProperty!=`function`)return!1;let n=e.defaultView?.DOMException;for(let e of E)try{t.registerProperty({name:e,syntax:`<color>`,inherits:!0,initialValue:`transparent`})}catch(e){if(typeof n==`function`&&e instanceof n&&e.name===`InvalidModificationError`)continue;throw e}return!0}function me(e){if(e.getElementById(`ok-theme-color-transitions`))return;let t=e.createElement(`style`);t.id=ue,t.textContent=`@media (prefers-reduced-motion: no-preference){:root[${k}]{transition:${de}}}`,e.head.appendChild(t)}function N(e){return e===`color`||e===`fill`||e===`stroke`||e.endsWith(`-color`)||e===`--tw-gradient-from`||e===`--tw-gradient-via`||e===`--tw-gradient-to`}function he(e){let t=e.defaultView;if(!t||typeof t.requestAnimationFrame!=`function`)return;let n=e.documentElement,r=0,i=0,a=0,o=0,s=n.getAttribute(`class`),c=n.getAttribute(`data-color-theme`),l=new Set,u=e=>{for(let t of e.getAnimations({subtree:!1}))N(t.transitionProperty??``)&&t.cancel()},d=()=>{if(typeof e.getAnimations==`function`)for(let r of e.getAnimations()){let e=r.effect,i=e&&`target`in e?e.target:null;i===n||!(i instanceof t.Element)||N(r.transitionProperty??``)&&r.cancel()}},f=()=>{a||=t.requestAnimationFrame(()=>{a=0;for(let e of l)u(e);n.hasAttribute(`data-theme-color-fading`)&&f()})},p=t=>{if(r=0,t===o){if(e.hidden||!P(e)){n.removeAttribute(A),l.clear();return}m(t)}},m=e=>{r=t.requestAnimationFrame(()=>p(e))};new t.MutationObserver(()=>{let r=n.getAttribute(`class`),a=n.getAttribute(`data-color-theme`);if(r===s&&a===c)return;s=r,c=a,o+=1;let u=o;if(i&&=(t.clearTimeout(i),0),n.setAttribute(A,``),d(),!P(e)){n.removeAttribute(A),l.clear();return}i=t.setTimeout(()=>{i=0,p(u)},j),f()}).observe(n,{attributes:!0,attributeFilter:[`class`,`data-color-theme`]}),e.addEventListener(`visibilitychange`,()=>{e.hidden&&(o+=1,i&&t.clearTimeout(i),r&&t.cancelAnimationFrame(r),n.removeAttribute(A),l.clear())}),e.addEventListener(`transitionrun`,e=>{if(e.target===n||!n.hasAttribute(`data-theme-color-fading`)||!N(e.propertyName))return;let r=e.target;r instanceof t.Element&&(l.add(r),u(r),f())},!0)}function ge(e=window.document){return M.has(e)||e.documentElement.hasAttribute(`data-theme-color-transitions`)?(M.add(e),!0):pe(e)?(me(e),he(e),e.documentElement.setAttribute(k,``),M.add(e),!0):!1}function _e(e){let t=(0,O.c)(3),n,r;t[0]===e?(n=t[1],r=t[2]):(n=()=>{if(!e)return;let t=ve;if(typeof requestAnimationFrame!=`function`){t();return}let n=requestAnimationFrame(t);return()=>cancelAnimationFrame(n)},r=[e],t[0]=e,t[1]=n,t[2]=r),(0,h.useEffect)(n,r)}function ve(){try{ge()}catch(e){let t=e;console.warn(JSON.stringify({event:`theme-color-transitions-arm-failed`,error:t instanceof Error?t.message:String(t)}))}}function P(e=window.document){let t=e.documentElement;return typeof t.getAnimations==`function`?t.getAnimations({subtree:!1}).some(e=>D(e.transitionProperty??``)):!1}var F=`ok-color-theme-pair-v1`,I=`ok-color-theme-v1`,ye=`ok-custom-theme-v1`,L=`data-color-theme`,R=`ok-custom-theme`,z=`ok-saved-theme`;function be(e){let t=document.getElementById(R);t||(t=document.createElement(`style`),t.id=R,document.head.appendChild(t)),t.textContent!==e&&(t.textContent=e)}function xe(){document.getElementById(R)?.remove()}function B(e){if(e.scheme)return i(`html[${L}]`,e.scheme.variant,d(e.scheme))}function Se(e){let t=document.getElementById(z);t||(t=document.createElement(`style`),t.id=z,document.head.appendChild(t)),t.textContent!==e&&(t.textContent=e)}function Ce(){document.getElementById(z)?.remove()}function V(e,t,n,r){return e===`custom`?w(C(n))===`dark`:(_(e,r)??t)===`dark`}function we(e,t,n){if(e===`custom`)return T(C(t));if(f.some(t=>t.id===e))return;let r=n.find(t=>t.id===e);return r?B(r):void 0}function H(e,t,n,r){let i=V(e,t,n,r),a=we(e,n,r);return a?{id:e,dark:i,css:a}:{id:e,dark:i}}function Te(e){let{selection:t,slotMode:n,customSeed:r,themes:i=f,enabled:a=!0}=e,o=g(a?t[n]:`default`,i).id;return{id:o,dark:V(o,n,r,i)}}function U(e){if(typeof document>`u`)return;let{selection:t,modePreference:n,customSeed:r,themes:i=f,enabled:a=!0}=e,o=Te(e),s=g(o.id,i),c=document.documentElement;o.id===`default`?c.removeAttribute(L):c.setAttribute(L,o.id);let l=!f.some(e=>e.id===o.id)&&s.id===o.id?B(s):void 0;l?Se(l):Ce(),o.id===`custom`?be(T(C(r))):xe();let u=t.light===`default`&&t.dark===`default`;try{!a||u?localStorage.removeItem(F):localStorage.setItem(F,JSON.stringify({pref:m(n),light:H(t.light,`light`,r,i),dark:H(t.dark,`dark`,r,i)})),localStorage.removeItem(I),localStorage.removeItem(ye)}catch{}}function Ee(e){let t=(0,O.c)(22),{selection:n,modePreference:r,slotMode:i,customSeed:a,themes:o,enabled:s,ready:c}=e,l=s===void 0?!0:s,u=c===void 0?!0:c,d;t[0]!==a||t[1]!==l||t[2]!==n.dark||t[3]!==n.light?(d=l&&(n.light===`custom`||n.dark===`custom`)?JSON.stringify(a??null):``,t[0]=a,t[1]=l,t[2]=n.dark,t[3]=n.light,t[4]=d):d=t[4];let f=d,p;t[5]!==a||t[6]!==l||t[7]!==r||t[8]!==u||t[9]!==n||t[10]!==i||t[11]!==o?(p=()=>{u&&U({selection:n,modePreference:r,slotMode:i,customSeed:a,themes:o,enabled:l})},t[5]=a,t[6]=l,t[7]=r,t[8]=u,t[9]=n,t[10]=i,t[11]=o,t[12]=p):p=t[12];let m;t[13]!==l||t[14]!==r||t[15]!==u||t[16]!==f||t[17]!==n.dark||t[18]!==n.light||t[19]!==i||t[20]!==o?(m=[n.light,n.dark,r,i,f,o,l,u],t[13]=l,t[14]=r,t[15]=u,t[16]=f,t[17]=n.dark,t[18]=n.light,t[19]=i,t[20]=o,t[21]=m):m=t[21],(0,h.useEffect)(p,m)}var W=0,G=new Set,K=null,q=0;function J(){W+=1;for(let e of G)e()}function Y(){if(q||typeof requestAnimationFrame!=`function`){typeof requestAnimationFrame!=`function`&&J();return}q=requestAnimationFrame(()=>{q=0,J(),P()&&Y()})}function X(e){e.target===document.documentElement&&D(e.propertyName)&&Y()}function Z(e){return G.add(e),!K&&typeof document<`u`&&(K=new MutationObserver(Y),K.observe(document.documentElement,{attributes:!0,attributeFilter:[L,`class`]}),K.observe(document.head,{childList:!0,subtree:!0,characterData:!0}),document.documentElement.addEventListener(`transitionrun`,X),document.documentElement.addEventListener(`transitionend`,X),document.documentElement.addEventListener(`transitioncancel`,X),P()&&Y()),()=>{G.delete(e),G.size===0&&(K?.disconnect(),K=null,document.documentElement.removeEventListener(`transitionrun`,X),document.documentElement.removeEventListener(`transitionend`,X),document.documentElement.removeEventListener(`transitioncancel`,X),q&&cancelAnimationFrame(q),q=0)}}function De(){return W}function Oe(){return 0}function ke(){return(0,h.useSyncExternalStore)(Z,De,Oe)}function Ae(e,t){let n=/^rgba?\(([^)]*)\)$/i.exec(e.trim())?.[1];if(n===void 0)return null;let r=n.split(/[\s,/]+/).filter(Boolean);if(r.length<3)return null;let i=`#`;for(let e=0;e<3;e++){let t=Math.round(Number(r[e]));if(!Number.isFinite(t)||t<0||t>255)return null;i+=t.toString(16).padStart(2,`0`)}if(t){let e=r[3]===void 0?1:Number(r[3]);if(!Number.isFinite(e)||e<0||e>1)return null;i+=Math.round(e*255).toString(16).padStart(2,`0`)}return i}var Q=null,$=null;function je(e,t){if(typeof document>`u`)return null;try{if(!Q){let e=document.createElement(`canvas`);e.width=1,e.height=1,Q=e.getContext(`2d`,{willReadFrequently:!0})}let n=Q;if(!n)return null;n.fillStyle=`#010203`,n.fillStyle=e;let r=n.fillStyle!==`#010203`;if(n.fillStyle=`#fefdfc`,n.fillStyle=e,!r&&n.fillStyle===`#fefdfc`)return null;n.clearRect(0,0,1,1),n.fillStyle=e,n.fillRect(0,0,1,1);let i=n.getImageData(0,0,1,1).data.slice(0,t?4:3);return $=null,`#${Array.from(i,e=>e.toString(16).padStart(2,`0`)).join(``)}`}catch(t){Q=null;let n=t instanceof Error?t.message:String(t);return $!==n&&($=n,console.warn(JSON.stringify({event:`css-color-to-hex-canvas-failed`,error:n,value:e}))),null}}function Me(e,t={}){let n=t.alpha??!1;return Ae(e,n)??je(e,n)}export{oe as _,U as a,_e as c,_ as d,v as f,b as g,se as h,L as i,E as l,w as m,Z as n,Ee as o,ee as p,ke as r,P as s,Me as t,x as u,re as v,C as y};
|
package/dist/public/assets/{diagnostic-breadcrumb-C5JgIaag.js → diagnostic-breadcrumb-BUuIuodI.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{et as e}from"./dist-
|
|
1
|
+
import{et as e}from"./dist-bQ5kvrpa.js";var t=new Set(e);function n(e){return e===null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`}function r(e,r){try{let i={event:e},a=0,o=0;if(r){for(let[e,s]of Object.entries(r))if(!(e===`event`||s===void 0)){if(t.has(e)){o+=1;continue}if(!n(s)){a+=1;continue}i[e]=s}}a>0&&(i.droppedNonScalarFields=a),o>0&&(i.droppedReservedFields=o);let s=JSON.stringify(i);console.info(s.length<=4096?s:JSON.stringify({event:e,oversized:!0,fieldCount:Object.keys(i).length-1}))}catch{}}export{r as t};
|
|
@@ -62,7 +62,7 @@ import{a as e,i as t,n,o as r,r as i,t as a}from"./chunk-CYidjpOJ.js";import{t a
|
|
|
62
62
|
|
|
63
63
|
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=ht,s=!et.jitless,c=s&>.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Qn([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function $n(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Dt(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>jt(e,r,tt())))}),t)}var er=A(`$ZodUnion`,(e,t)=>{In.init(e,t),lt(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),lt(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),lt(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),lt(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>ot(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>$n(t,r,e,i)):$n(o,r,e,i)}}),Yee=A(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,er.init(e,t);let n=e._zod.parse;lt(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=it(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!ht(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),Xee=A(`$ZodIntersection`,(e,t)=>{In.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>nr(e,t,n)):nr(e,i,a)}});function tr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(_t(e)&&_t(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=tr(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=tr(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function nr(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),Dt(e))return e;let o=tr(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Zee=A(`$ZodRecord`,(e,t)=>{In.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!_t(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>jt(e,r,tt())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...kt(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...kt(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&fn.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>jt(e,r,tt())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...kt(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...kt(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Qee=A(`$ZodEnum`,(e,t)=>{In.init(e,t);let n=nt(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>ree.has(typeof e)).map(e=>typeof e==`string`?yt(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),$ee=A(`$ZodLiteral`,(e,t)=>{if(In.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?yt(e):e?yt(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),ete=A(`$ZodTransform`,(e,t)=>{In.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new $e(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new Qe;return n.value=i,n.fallback=!0,n}});function rr(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var ir=A(`$ZodOptional`,(e,t)=>{In.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,lt(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),lt(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ot(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>rr(e,r)):rr(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),tte=A(`$ZodExactOptional`,(e,t)=>{ir.init(e,t),lt(e._zod,`values`,()=>t.innerType._zod.values),lt(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),nte=A(`$ZodNullable`,(e,t)=>{In.init(e,t),lt(e._zod,`optin`,()=>t.innerType._zod.optin),lt(e._zod,`optout`,()=>t.innerType._zod.optout),lt(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ot(e.source)}|null)$`):void 0}),lt(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),rte=A(`$ZodDefault`,(e,t)=>{In.init(e,t),e._zod.optin=`optional`,lt(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ar(e,t)):ar(r,t)}});function ar(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ite=A(`$ZodPrefault`,(e,t)=>{In.init(e,t),e._zod.optin=`optional`,lt(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),ate=A(`$ZodNonOptional`,(e,t)=>{In.init(e,t),lt(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>or(t,e)):or(i,e)}});function or(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var ote=A(`$ZodCatch`,(e,t)=>{In.init(e,t),e._zod.optin=`optional`,lt(e._zod,`optout`,()=>t.innerType._zod.optout),lt(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>jt(e,n,tt()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>jt(e,n,tt()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),sr=A(`$ZodPipe`,(e,t)=>{In.init(e,t),lt(e._zod,`values`,()=>t.in._zod.values),lt(e._zod,`optin`,()=>t.in._zod.optin),lt(e._zod,`optout`,()=>t.out._zod.optout),lt(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>cr(e,t.in,n)):cr(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>cr(e,t.out,n)):cr(r,t.out,n)}});function cr(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var ste=A(`$ZodPreprocess`,(e,t)=>{sr.init(e,t)}),cte=A(`$ZodReadonly`,(e,t)=>{In.init(e,t),lt(e._zod,`propValues`,()=>t.innerType._zod.propValues),lt(e._zod,`values`,()=>t.innerType._zod.values),lt(e._zod,`optin`,()=>t.innerType?._zod?.optin),lt(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(lr):lr(r)}});function lr(e){return e.value=Object.freeze(e.value),e}var lte=A(`$ZodLazy`,(e,t)=>{In.init(e,t),lt(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),lt(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),lt(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),lt(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),lt(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),ute=A(`$ZodCustom`,(e,t)=>{_n.init(e,t),In.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>ur(t,n,r,e));ur(i,n,r,e)}});function ur(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Nt(e))}}var dr,dte=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function fr(){return new dte}(dr=globalThis).__zod_globalRegistry??(dr.__zod_globalRegistry=fr());var pr=globalThis.__zod_globalRegistry;function fte(e,t){return new e({type:`string`,...j(t)})}function mr(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...j(t)})}function hr(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...j(t)})}function pte(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...j(t)})}function mte(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...j(t)})}function hte(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...j(t)})}function gte(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...j(t)})}function gr(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...j(t)})}function _r(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...j(t)})}function vr(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...j(t)})}function yr(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...j(t)})}function br(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...j(t)})}function xr(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...j(t)})}function Sr(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...j(t)})}function Cr(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...j(t)})}function wr(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...j(t)})}function Tr(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...j(t)})}function Er(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...j(t)})}function Dr(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...j(t)})}function Or(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...j(t)})}function kr(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...j(t)})}function Ar(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...j(t)})}function jr(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...j(t)})}function Mr(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...j(t)})}function Nr(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...j(t)})}function Pr(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...j(t)})}function Fr(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...j(t)})}function Ir(e,t){return new e({type:`number`,checks:[],...j(t)})}function Lr(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...j(t)})}function Rr(e,t){return new e({type:`boolean`,...j(t)})}function zr(e,t){return new e({type:`null`,...j(t)})}function Br(e){return new e({type:`unknown`})}function Vr(e,t){return new e({type:`never`,...j(t)})}function Hr(e,t){return new yn({check:`less_than`,...j(t),value:e,inclusive:!1})}function Ur(e,t){return new yn({check:`less_than`,...j(t),value:e,inclusive:!0})}function Wr(e,t){return new bn({check:`greater_than`,...j(t),value:e,inclusive:!1})}function Gr(e,t){return new bn({check:`greater_than`,...j(t),value:e,inclusive:!0})}function Kr(e,t){return new xn({check:`multiple_of`,...j(t),value:e})}function qr(e,t){return new Cn({check:`max_length`,...j(t),maximum:e})}function Jr(e,t){return new wn({check:`min_length`,...j(t),minimum:e})}function Yr(e,t){return new Tn({check:`length_equals`,...j(t),length:e})}function Xr(e,t){return new Dn({check:`string_format`,format:`regex`,...j(t),pattern:e})}function Zr(e){return new On({check:`string_format`,format:`lowercase`,...j(e)})}function Qr(e){return new kn({check:`string_format`,format:`uppercase`,...j(e)})}function $r(e,t){return new An({check:`string_format`,format:`includes`,...j(t),includes:e})}function ei(e,t){return new jn({check:`string_format`,format:`starts_with`,...j(t),prefix:e})}function ti(e,t){return new Mn({check:`string_format`,format:`ends_with`,...j(t),suffix:e})}function ni(e){return new Nn({check:`overwrite`,tx:e})}function ri(e){return ni(t=>t.normalize(e))}function ii(){return ni(e=>e.trim())}function ai(){return ni(e=>e.toLowerCase())}function oi(){return ni(e=>e.toUpperCase())}function si(){return ni(e=>pt(e))}function ci(e,t,n){return new e({type:`array`,element:t,...j(n)})}function li(e,t,n){let r=j(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function ui(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...j(n)})}function di(e,t){let n=fi(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Nt(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Nt(r))}},e(t.value,t)),t);return n}function fi(e,t){let n=new _n({check:`custom`,...j(t)});return n._zod.check=e,n}function pi(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??pr,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function mi(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,mi(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&_i(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function hi(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
64
64
|
|
|
65
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function gi(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:yi(t,`input`,e.processors),output:yi(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function _i(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return _i(r.element,n);if(r.type===`set`)return _i(r.valueType,n);if(r.type===`lazy`)return _i(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return _i(r.innerType,n);if(r.type===`intersection`)return _i(r.left,n)||_i(r.right,n);if(r.type===`record`||r.type===`map`)return _i(r.keyType,n)||_i(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:_i(r.in,n)||_i(r.out,n);if(r.type===`object`){for(let e in r.shape)if(_i(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(_i(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(_i(e,n))return!0;return!!(r.rest&&_i(r.rest,n))}return!1}var vi=(e,t={})=>n=>{let r=pi({...n,processors:t});return mi(e,r),hi(r,e),gi(r,e)},yi=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=pi({...i??{},target:a,io:t,processors:n});return mi(e,o),hi(o,e),gi(o,e)},bi={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},xi=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=bi[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Si=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},Ci=(e,t,n,r)=>{n.type=`boolean`},wi=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Ti=(e,t,n,r)=>{n.not={}},Ei=(e,t,n,r)=>{let i=e._zod.def,a=nt(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Di=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},Oi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},ki=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Ai=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=mi(a.element,t,{...r,path:[...r.path,`items`]})},ji=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=mi(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=mi(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Mi=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>mi(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ni=(e,t,n,r)=>{let i=e._zod.def,a=mi(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=mi(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Pi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=mi(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=mi(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=mi(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Fi=(e,t,n,r)=>{let i=e._zod.def,a=mi(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ii=(e,t,n,r)=>{let i=e._zod.def;mi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Li=(e,t,n,r)=>{let i=e._zod.def;mi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Ri=(e,t,n,r)=>{let i=e._zod.def;mi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},zi=(e,t,n,r)=>{let i=e._zod.def;mi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Bi=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;mi(o,t,r);let s=t.seen.get(e);s.ref=o},Vi=(e,t,n,r)=>{let i=e._zod.def;mi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Hi=(e,t,n,r)=>{let i=e._zod.def;mi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ui=(e,t,n,r)=>{let i=e._zod.innerType;mi(i,t,r);let a=t.seen.get(e);a.ref=i},Wi=A(`ZodISODateTime`,(e,t)=>{Dee.init(e,t),ga.init(e,t)});function Gi(e){return Mr(Wi,e)}var Ki=A(`ZodISODate`,(e,t)=>{Oee.init(e,t),ga.init(e,t)});function qi(e){return Nr(Ki,e)}var Ji=A(`ZodISOTime`,(e,t)=>{kee.init(e,t),ga.init(e,t)});function Yi(e){return Pr(Ji,e)}var Xi=A(`ZodISODuration`,(e,t)=>{Aee.init(e,t),ga.init(e,t)});function Zi(e){return Fr(Xi,e)}var Qi=A(`ZodError`,(e,t)=>{Ft.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>cee(e,t)},flatten:{value:t=>see(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,rt,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,rt,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),$i=Lt(Qi),ea=Rt(Qi),ta=zt(Qi),na=Bt(Qi),ra=pee(Qi),ia=mee(Qi),aa=hee(Qi),oa=gee(Qi),sa=_ee(Qi),ca=vee(Qi),la=yee(Qi),ua=bee(Qi),da=new WeakMap;function fa(e,t,n){let r=Object.getPrototypeOf(e),i=da.get(r);if(i||(i=new Set,da.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var pa=A(`ZodType`,(e,t)=>(In.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:yi(e,`input`),output:yi(e,`output`)}}),e.toJSONSchema=vi(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.parse=(t,n)=>$i(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>ta(e,t,n),e.parseAsync=async(t,n)=>ea(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>na(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>ra(e,t,n),e.decode=(t,n)=>ia(e,t,n),e.encodeAsync=async(t,n)=>aa(e,t,n),e.decodeAsync=async(t,n)=>oa(e,t,n),e.safeEncode=(t,n)=>sa(e,t,n),e.safeDecode=(t,n)=>ca(e,t,n),e.safeEncodeAsync=async(t,n)=>la(e,t,n),e.safeDecodeAsync=async(t,n)=>ua(e,t,n),fa(e,`ZodType`,{check(...e){let t=this.def;return this.clone(dt(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return bt(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Po(e,t))},superRefine(e,t){return this.check(Fo(e,t))},overwrite(e){return this.check(ni(e))},optional(){return fo(this)},exactOptional(){return mo(this)},nullable(){return go(this)},nullish(){return fo(go(this))},nonoptional(e){return So(this,e)},array(){return F(this)},or(e){return Qa([this,e])},and(e){return no(this,e)},transform(e){return Eo(this,lo(e))},default(e){return vo(this,e)},prefault(e){return bo(this,e)},catch(e){return wo(this,e)},pipe(e){return Eo(this,e)},readonly(){return ko(this)},describe(e){let t=this.clone();return pr.add(t,{description:e}),t},meta(...e){if(e.length===0)return pr.get(this);let t=this.clone();return pr.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,`description`,{get(){return pr.get(e)?.description},configurable:!0}),e)),ma=A(`_ZodString`,(e,t)=>{Ln.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xi(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,fa(e,`_ZodString`,{regex(...e){return this.check(Xr(...e))},includes(...e){return this.check($r(...e))},startsWith(...e){return this.check(ei(...e))},endsWith(...e){return this.check(ti(...e))},min(...e){return this.check(Jr(...e))},max(...e){return this.check(qr(...e))},length(...e){return this.check(Yr(...e))},nonempty(...e){return this.check(Jr(1,...e))},lowercase(e){return this.check(Zr(e))},uppercase(e){return this.check(Qr(e))},trim(){return this.check(ii())},normalize(...e){return this.check(ri(...e))},toLowerCase(){return this.check(ai())},toUpperCase(){return this.check(oi())},slugify(){return this.check(si())}})}),ha=A(`ZodString`,(e,t)=>{Ln.init(e,t),ma.init(e,t),e.email=t=>e.check(mr(_a,t)),e.url=t=>e.check(gr(xa,t)),e.jwt=t=>e.check(jr(La,t)),e.emoji=t=>e.check(_r(Ca,t)),e.guid=t=>e.check(hr(ya,t)),e.uuid=t=>e.check(pte(ba,t)),e.uuidv4=t=>e.check(mte(ba,t)),e.uuidv6=t=>e.check(hte(ba,t)),e.uuidv7=t=>e.check(gte(ba,t)),e.nanoid=t=>e.check(vr(wa,t)),e.guid=t=>e.check(hr(ya,t)),e.cuid=t=>e.check(yr(Ta,t)),e.cuid2=t=>e.check(br(Ea,t)),e.ulid=t=>e.check(xr(Da,t)),e.base64=t=>e.check(Or(Pa,t)),e.base64url=t=>e.check(kr(Fa,t)),e.xid=t=>e.check(Sr(Oa,t)),e.ksuid=t=>e.check(Cr(ka,t)),e.ipv4=t=>e.check(wr(Aa,t)),e.ipv6=t=>e.check(Tr(ja,t)),e.cidrv4=t=>e.check(Er(Ma,t)),e.cidrv6=t=>e.check(Dr(Na,t)),e.e164=t=>e.check(Ar(Ia,t)),e.datetime=t=>e.check(Gi(t)),e.date=t=>e.check(qi(t)),e.time=t=>e.check(Yi(t)),e.duration=t=>e.check(Zi(t))});function M(e){return fte(ha,e)}var ga=A(`ZodStringFormat`,(e,t)=>{Rn.init(e,t),ma.init(e,t)}),_a=A(`ZodEmail`,(e,t)=>{Vn.init(e,t),ga.init(e,t)});function va(e){return mr(_a,e)}var ya=A(`ZodGUID`,(e,t)=>{zn.init(e,t),ga.init(e,t)}),ba=A(`ZodUUID`,(e,t)=>{Bn.init(e,t),ga.init(e,t)}),xa=A(`ZodURL`,(e,t)=>{Hn.init(e,t),ga.init(e,t)});function Sa(e){return gr(xa,e)}var Ca=A(`ZodEmoji`,(e,t)=>{Un.init(e,t),ga.init(e,t)}),wa=A(`ZodNanoID`,(e,t)=>{Wn.init(e,t),ga.init(e,t)}),Ta=A(`ZodCUID`,(e,t)=>{Gn.init(e,t),ga.init(e,t)}),Ea=A(`ZodCUID2`,(e,t)=>{Kn.init(e,t),ga.init(e,t)}),Da=A(`ZodULID`,(e,t)=>{wee.init(e,t),ga.init(e,t)}),Oa=A(`ZodXID`,(e,t)=>{Tee.init(e,t),ga.init(e,t)}),ka=A(`ZodKSUID`,(e,t)=>{Eee.init(e,t),ga.init(e,t)}),Aa=A(`ZodIPv4`,(e,t)=>{jee.init(e,t),ga.init(e,t)}),ja=A(`ZodIPv6`,(e,t)=>{Mee.init(e,t),ga.init(e,t)}),Ma=A(`ZodCIDRv4`,(e,t)=>{Nee.init(e,t),ga.init(e,t)}),Na=A(`ZodCIDRv6`,(e,t)=>{Pee.init(e,t),ga.init(e,t)}),Pa=A(`ZodBase64`,(e,t)=>{Fee.init(e,t),ga.init(e,t)}),Fa=A(`ZodBase64URL`,(e,t)=>{Lee.init(e,t),ga.init(e,t)}),Ia=A(`ZodE164`,(e,t)=>{Ree.init(e,t),ga.init(e,t)}),La=A(`ZodJWT`,(e,t)=>{Bee.init(e,t),ga.init(e,t)}),Ra=A(`ZodNumber`,(e,t)=>{Jn.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Si(e,t,n,r),fa(e,`ZodNumber`,{gt(e,t){return this.check(Wr(e,t))},gte(e,t){return this.check(Gr(e,t))},min(e,t){return this.check(Gr(e,t))},lt(e,t){return this.check(Hr(e,t))},lte(e,t){return this.check(Ur(e,t))},max(e,t){return this.check(Ur(e,t))},int(e){return this.check(Ba(e))},safe(e){return this.check(Ba(e))},positive(e){return this.check(Wr(0,e))},nonnegative(e){return this.check(Gr(0,e))},negative(e){return this.check(Hr(0,e))},nonpositive(e){return this.check(Ur(0,e))},multipleOf(e,t){return this.check(Kr(e,t))},step(e,t){return this.check(Kr(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function N(e){return Ir(Ra,e)}var za=A(`ZodNumberFormat`,(e,t)=>{Vee.init(e,t),Ra.init(e,t)});function Ba(e){return Lr(za,e)}var Va=A(`ZodBoolean`,(e,t)=>{Hee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ci(e,t,n,r)});function P(e){return Rr(Va,e)}var Ha=A(`ZodNull`,(e,t)=>{Uee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wi(e,t,n,r)});function Ua(e){return zr(Ha,e)}var Wa=A(`ZodUnknown`,(e,t)=>{Wee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ga(){return Br(Wa)}var Ka=A(`ZodNever`,(e,t)=>{Gee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ti(e,t,n,r)});function qa(e){return Vr(Ka,e)}var Ja=A(`ZodArray`,(e,t)=>{Kee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ai(e,t,n,r),e.element=t.element,fa(e,`ZodArray`,{min(e,t){return this.check(Jr(e,t))},nonempty(e){return this.check(Jr(1,e))},max(e,t){return this.check(qr(e,t))},length(e,t){return this.check(Yr(e,t))},unwrap(){return this.element}})});function F(e,t){return ci(Ja,e,t)}var Ya=A(`ZodObject`,(e,t)=>{Jee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ji(e,t,n,r),lt(e,`shape`,()=>t.shape),fa(e,`ZodObject`,{keyof(){return R(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Ga()})},loose(){return this.clone({...this._zod.def,catchall:Ga()})},strict(){return this.clone({...this._zod.def,catchall:qa()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return St(this,e)},safeExtend(e){return Ct(this,e)},merge(e){return wt(this,e)},pick(e){return oee(this,e)},omit(e){return xt(this,e)},partial(...e){return Tt(uo,this,e[0])},required(...e){return Et(xo,this,e[0])}})});function I(e,t){return new Ya({type:`object`,shape:e??{},...j(t)})}function Xa(e,t){return new Ya({type:`object`,shape:e,catchall:qa(),...j(t)})}function L(e,t){return new Ya({type:`object`,shape:e,catchall:Ga(),...j(t)})}var Za=A(`ZodUnion`,(e,t)=>{er.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mi(e,t,n,r),e.options=t.options});function Qa(e,t){return new Za({type:`union`,options:e,...j(t)})}var $a=A(`ZodDiscriminatedUnion`,(e,t)=>{Za.init(e,t),Yee.init(e,t)});function eo(e,t,n){return new $a({type:`union`,options:t,discriminator:e,...j(n)})}var to=A(`ZodIntersection`,(e,t)=>{Xee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ni(e,t,n,r)});function no(e,t){return new to({type:`intersection`,left:e,right:t})}var ro=A(`ZodRecord`,(e,t)=>{Zee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pi(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function io(e,t,n){return!t||!t._zod?new ro({type:`record`,keyType:M(),valueType:e,...j(t)}):new ro({type:`record`,keyType:e,valueType:t,...j(n)})}function ao(e,t,n){let r=bt(e);return r._zod.values=void 0,new ro({type:`record`,keyType:r,valueType:t,...j(n)})}var oo=A(`ZodEnum`,(e,t)=>{Qee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ei(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new oo({...t,checks:[],...j(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new oo({...t,checks:[],...j(r),entries:i})}});function R(e,t){return new oo({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...j(t)})}var so=A(`ZodLiteral`,(e,t)=>{$ee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Di(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function z(e,t){return new so({type:`literal`,values:Array.isArray(e)?e:[e],...j(t)})}var co=A(`ZodTransform`,(e,t)=>{ete.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ki(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new $e(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Nt(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Nt(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function lo(e){return new co({type:`transform`,transform:e})}var uo=A(`ZodOptional`,(e,t)=>{ir.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fo(e){return new uo({type:`optional`,innerType:e})}var po=A(`ZodExactOptional`,(e,t)=>{tte.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function mo(e){return new po({type:`optional`,innerType:e})}var ho=A(`ZodNullable`,(e,t)=>{nte.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function go(e){return new ho({type:`nullable`,innerType:e})}var _o=A(`ZodDefault`,(e,t)=>{rte.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Li(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function vo(e,t){return new _o({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():vt(t)}})}var yo=A(`ZodPrefault`,(e,t)=>{ite.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ri(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bo(e,t){return new yo({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():vt(t)}})}var xo=A(`ZodNonOptional`,(e,t)=>{ate.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ii(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function So(e,t){return new xo({type:`nonoptional`,innerType:e,...j(t)})}var Co=A(`ZodCatch`,(e,t)=>{ote.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function wo(e,t){return new Co({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var To=A(`ZodPipe`,(e,t)=>{sr.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bi(e,t,n,r),e.in=t.in,e.out=t.out});function Eo(e,t){return new To({type:`pipe`,in:e,out:t})}var Do=A(`ZodPreprocess`,(e,t)=>{To.init(e,t),ste.init(e,t)}),Oo=A(`ZodReadonly`,(e,t)=>{cte.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ko(e){return new Oo({type:`readonly`,innerType:e})}var Ao=A(`ZodLazy`,(e,t)=>{lte.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ui(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function jo(e){return new Ao({type:`lazy`,getter:e})}var Mo=A(`ZodCustom`,(e,t)=>{ute.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oi(e,t,n,r)});function No(e,t){return li(Mo,e??(()=>!0),t)}function Po(e,t={}){return ui(Mo,e,t)}function Fo(e,t){return di(e,t)}function _te(e,t={}){let n=new Mo({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...j(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function vte(e,t){return new Do({type:`pipe`,in:lo(e),out:t})}function Io(e){return`'${e.replace(/'/g,`'\\''`)}'`}function yte(e){return[`--settings`,e]}var bte=/['\u2018\u2019\u201A\u201B]/g;function xte(e){return`'${e.replace(bte,`$&$&`)}'`}function Ste(e,t){return t.length===0||Array.from(t).some(e=>e.charCodeAt(0)<32)?null:e===`powershell`?xte(t):e===`bash`?Io(t):/["%!]/u.test(t)?null:`"${t}"`}var Cte=[`mcp__${Je}`,`Bash(ok open:*)`],wte=[`delete`,`move`,`share_link`,`install`,`import`].map(e=>`mcp__${Je}__${e}`),Tte=`-c ${Io(`mcp_servers.${Je}.default_tools_approval_mode="approve"`)}`;function Lo(e){let t={};return e.mcpPreApprove===!0&&(t.enabledMcpjsonServers=[Je]),e.autoApproveOkTools===!0&&(t.permissions={allow:[...Cte],ask:[...wte]}),t.enabledMcpjsonServers===void 0&&t.permissions===void 0?null:JSON.stringify(t)}function Ete(e){let t=Lo(e);return t===null?``:`--settings ${Io(t)}`}var Ro=`\x1B`,Dte=`${Ro}[200~`,Ote=`${Ro}[201~`,zo=`\x1B[?2004h`,kte=300,Ate=4e3,jte={submit:`\r`,readyMarker:zo,settleMs:800,capMs:4e3},Bo={claude:{bin:`claude`,displayName:`Claude`,docsUrl:`https://docs.claude.com/en/docs/claude-code`,handoffTarget:`claude-code`},codex:{bin:`codex`,displayName:`Codex`,docsUrl:`https://developers.openai.com/codex/cli`,handoffTarget:`codex`,autoApproveArg:Tte},copilot:{bin:`copilot`,displayName:`GitHub Copilot`,docsUrl:`https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-getting-started`,handoffTarget:`copilot`,promptFlag:`--interactive`},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`},pi:{bin:`pi`,displayName:`Pi`,docsUrl:`https://pi.dev`,handoffTarget:`pi`},antigravity:{bin:`agy`,displayName:`Antigravity`,docsUrl:`https://antigravity.google/docs/cli-getting-started`,handoffTarget:`antigravity`,promptFlag:`--prompt-interactive`},openclaw:{bin:`openclaw`,subcommand:`chat`,displayName:`OpenClaw`,docsUrl:`https://docs.openclaw.ai/cli/tui`,handoffTarget:`openclaw`,promptFlag:`--message`},hermes:{bin:`hermes`,subcommand:`chat`,displayName:`Hermes`,docsUrl:`https://hermes-agent.nousresearch.com/docs/user-guide/cli`,handoffTarget:`hermes`,startupInjection:{submit:`\r`,readyMarker:zo,settleMs:kte,capMs:Ate}}},Vo=[`claude`,`codex`,`opencode`,`cursor`,`copilot`,`pi`,`antigravity`,`openclaw`,`hermes`];function Mte(e,t,n={}){let r=Bo[e];if(e===`claude`){let e=Lo(n);if(e!==null){let t=`.ok/local/terminal/claude-settings-${[n.mcpPreApprove===!0?`mcp`:null,n.autoApproveOkTools===!0?`tools`:null].filter(e=>e!==null).join(`-`)}.json`;return{executable:r.bin,args:[...yte(t)],supportFile:{kind:`claude-settings`,relativePath:t,contents:e}}}}return e===`codex`&&n.autoApproveOkTools===!0?{executable:r.bin,args:[`-c`,`mcp_servers.${Je}.default_tools_approval_mode=approve`]}:{executable:r.bin,args:r.subcommand?[r.subcommand]:[]}}function Nte(e,t,n={}){let r=Bo[e],i=e===`claude`?Ete(n):n.autoApproveOkTools===!0&&r.autoApproveArg?r.autoApproveArg:``,a=i?`${i} `:``,o=r.subcommand?`${r.subcommand} `:``;if(r.startupInjection!=null||t==null||t.length===0)return`${r.bin} ${o}${a}`.trimEnd();let s=r.promptFlag?`${r.promptFlag} `:``;return`${r.bin} ${o}${a}${s}${Io(t)}`}function Ho(e,t){return Bo[e].startupInjection??(t===`win32`?jte:void 0)}function Pte(e,t,n){let r=Ho(e,n);return r==null||t==null||t.length===0?null:`${Dte}${t.replaceAll(Ro,``)}${Ote}${r.submit}`}var Uo=[`config-entry`,`managed-file`,`skill-bundle-copy`,`central-store-copy`,`session-injection`],Fte=R(Uo),Ite=Uo.filter(e=>e!==`session-injection`),Wo=[`satisfied`,`present-consent-unknown`,`absent`,`foreign`,`foreign-replaceable`,`drifted`,`excluded`,`structural-na`,`undetected`,`unprobeable`,`unprobed`];Qa([R(Wo),M()]);function Go(e){return Wo.includes(e)}var Ko=[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],qo=R(Ko),Lte=R([`none`,`approve-once`,`enable-manually`,`trust-gated`]),Rte=[`enable-manually`],Jo=[`written`,`overwritten`,`skipped-unsupported`,`skipped-prerequisite`,`declined`,`failed`,`removed`,`excluded`,`unchanged`,`handed-off`,`skipped-foreign`,`skipped-missing`,`no-op`];R(Jo),R([`info`,`warning`,`error`]);var zte=R([`required`,`recommended`]),Yo=[...Re,`gemini`],Xo=R(Yo);function Zo(e){return Yo.includes(e)}var Bte=R([`acp`,`terminal`,`external`]),Vte=R([...Vo,`gemini`]),Hte=R([`claude-cowork`,`claude-code`,`codex`,`cursor`,`copilot`,`opencode`,`pi`,`antigravity`,`openclaw`,`hermes`]),Qo=R([`mcp`,`skill`]),$o=[`project`,`user`,`session`],es=R($o),ts=M().regex(/^[a-z0-9-]+\/[a-z0-9-]+\/[a-z0-9-]+\/[a-z0-9-]+$/).transform(e=>e),Ute=M().min(1).transform(e=>e),Wte=M().min(1).transform(e=>e);function ns(e){return`${e.agent}/${e.piece}/${e.scope}/${e.kind}`}function rs(e){return e}function Gte(e){return e}var Kte=[`editor-user-config`,`editor-project-config`,`editor-project-skill-root`,`editor-user-skill-root`],is=rs(`central-skill-store`);function as(e,t){return rs(`${e}:${t}`)}function qte(e){if(e===is)return{kind:`central-skill-store`};let t=e.indexOf(`:`);if(t===-1)return null;let n=e.slice(0,t),r=e.slice(t+1);return!Kte.includes(n)||!Re.includes(r)?null:{kind:n,editor:r}}var Jte=e=>e===void 0?[]:Array.isArray(e)?[...e]:[e];function ss(e){let{sharedWith:t,prerequisites:n,consentClass:r,installability:i,preferred:a,troubleshooting:o,...s}=e;return{...s,troubleshooting:Jte(o),id:ns({agent:e.agent,piece:e.piece,scope:e.scope,kind:e.kind}),sharedWith:t??[],prerequisites:n??[],consentClass:r??`none`,installability:i??`installable`,preferred:a??!1}}function cs(e){let{offerOnlyWhenDetected:t,offersConnectionRow:n,detectionSources:r,modes:i,...a}=e,o={};for(let[e,t]of Object.entries(i))o[e]={requirements:t.requirements,caveats:t.caveats??[]};return{...a,offerOnlyWhenDetected:t??!1,offersConnectionRow:n??!1,detectionSources:r??[],modes:o}}var B=(e,t,n,r)=>ns({agent:e,piece:t,scope:n,kind:r}),ls=e=>({piece:`mcp`,level:`required`,satisfiedByAny:e}),us=e=>({piece:`skill`,level:`recommended`,satisfiedByAny:e}),ds=(...e)=>({mode:`probeable`,strictness:e}),Yte=(e,t)=>({mode:`unprobeable`,reason:e,...t===void 0?{}:{note:t}}),fs=(e,t)=>({id:Gte(e),...t===void 0?{}:{params:t}}),Xte=(e,t)=>{let n=Rte.find(t=>t===e);return n===void 0?void 0:fs(`followup.${n}`,{agent:t})},V=(e,t)=>({kind:`source-read`,ref:e,...t===void 0?{}:{note:t}}),ps=(e,t)=>t===void 0?{confidence:`verified`,evidence:e}:{confidence:`verified`,evidence:e,verifiedAgainst:t},Zte=(e,t)=>({confidence:`contested`,evidence:e,verifiedAgainst:t});function ms(e){return{acpAgentId:e.acpAgentId,featuredOrder:e.featuredOrder,harnessCli:e.harnessCli,harnessReadsEditorConfig:e.readsEditorConfig,harnessReadsEditorConfigAttestation:e.readsEditorConfigAttestation,verifiedPosture:e.verifiedPosture}}function hs(e){let{appBrandName:t,tagline:n,...r}=e;return{...r,...t===void 0?{}:{appBrandName:t},...n===void 0?{}:{tagline:n}}}var gs=(e,t)=>({kind:`observation`,ref:e,note:t}),_s={observedAt:`2026-07-02`},H={cliEditors:`packages/cli/src/commands/editors.ts`,coreEditors:`packages/core/src/constants/editors.ts`,acpRegistry:`packages/server/src/acp/registry.ts`,threadManager:`packages/server/src/acp/thread-manager.ts`,writeProjectSkill:`packages/cli/src/integrations/write-project-skill.ts`,repairSkills:`packages/cli/src/commands/repair-skills.ts`,skillInstall:`packages/server/src/skill-install.ts`,presenceProbes:`packages/desktop/src/main/integrations-settings.ts`};function vs(e){return ss({agent:e.agent,piece:`mcp`,scope:`user`,kind:`config-entry`,pathId:as(`editor-user-config`,e.agent),probe:ds(...e.strictness),attestation:e.attestation,audience:`this-user`,installability:e.installability,notInstallableReason:e.notInstallableReason,guidance:fs(`guidance.mcp.user-config`,{agent:e.agent}),troubleshooting:e.troubleshooting})}function ys(e){return ss({agent:e.agent,piece:`mcp`,scope:`project`,kind:`config-entry`,pathId:as(`editor-project-config`,e.fileOwner??e.agent),sharedWith:e.sharedWith,consentClass:e.consentClass,probe:ds(...e.strictness),attestation:e.attestation,audience:`this-project`,guidance:fs(`guidance.mcp.project-config`,{agent:e.agent}),followup:Xte(e.consentClass,e.agent),troubleshooting:e.troubleshooting})}function bs(e){return ss({agent:e.agent,piece:`skill`,scope:`project`,kind:`skill-bundle-copy`,pathId:as(`editor-project-skill-root`,e.agent),prerequisites:e.prerequisites,probe:ds(`reclaim-permissive`),attestation:e.attestation,audience:`this-project`,guidance:fs(`guidance.skill.project`,{agent:e.agent}),troubleshooting:e.troubleshooting})}function xs(e){return ss({agent:e.agent,piece:`skill`,scope:`user`,kind:`skill-bundle-copy`,pathId:as(`editor-user-skill-root`,e.agent),probe:ds(`reclaim-permissive`),attestation:e.attestation,audience:`this-user`,guidance:fs(`guidance.skill.user`,{agent:e.agent})})}function Ss(e){return ss({agent:e,piece:`mcp`,scope:`session`,kind:`session-injection`,probe:Yte(`session-scoped`),attestation:ps([V(H.threadManager,`the session MCP config the thread manager builds per thread`)]),audience:`this-project`,installability:`not-installable`,notInstallableReason:`session-scoped`,guidance:fs(`guidance.mcp.session-injection`,{agent:e})})}var Cs={claude:cs({id:`claude`,setupDocSlug:Ge.claude,offersConnectionRow:!0,detectionSources:[`cli-on-path:claude`,`scheme-handler:claude-code`],satisfiers:[vs({agent:`claude`,strictness:[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],attestation:ps([V(H.cliEditors,`user-global MCP config target`)])}),ys({agent:`claude`,sharedWith:[`copilot`],consentClass:`approve-once`,strictness:[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],attestation:ps([V(H.cliEditors),V(H.coreEditors)]),troubleshooting:fs(`troubleshooting.claude.project-entry-not-approved`,{agent:`claude`})}),bs({agent:`claude`,prerequisites:[B(`claude`,`mcp`,`project`,`config-entry`)],attestation:ps([V(H.coreEditors),V(H.repairSkills)])}),xs({agent:`claude`,attestation:ps([V(H.coreEditors),V(H.skillInstall)])}),Ss(`claude`)],modes:{external:{requirements:[ls([B(`claude`,`mcp`,`user`,`config-entry`),B(`claude`,`mcp`,`project`,`config-entry`)]),us([B(`claude`,`skill`,`project`,`skill-bundle-copy`),B(`claude`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[ls([B(`claude`,`mcp`,`user`,`config-entry`),B(`claude`,`mcp`,`project`,`config-entry`)]),us([B(`claude`,`skill`,`project`,`skill-bundle-copy`),B(`claude`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[ls([B(`claude`,`mcp`,`session`,`session-injection`),B(`claude`,`mcp`,`user`,`config-entry`),B(`claude`,`mcp`,`project`,`config-entry`)]),us([B(`claude`,`skill`,`project`,`skill-bundle-copy`),B(`claude`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:ms({acpAgentId:`claude-acp`,featuredOrder:0,harnessCli:`claude`,readsEditorConfig:`claude`,readsEditorConfigAttestation:ps([V(H.threadManager,`the injection-skip probe reads the managed entry for this editor`),gs(`claude-acp adapter`,`The adapter runs Claude Code, which loads the MCP entry OK writes for the Claude editor on its own, so injecting a same-name duplicate would be redundant.`)],_s),verifiedPosture:`asks`}),external:hs({targetId:`claude-code`,knownOrder:1,visible:!0,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Agentic coding in Claude Desktop's Code tab.`})}),"claude-desktop":cs({id:`claude-desktop`,setupDocSlug:Ge[`claude-desktop`],offersConnectionRow:!1,detectionSources:[`scheme-handler:claude-code`],satisfiers:[vs({agent:`claude-desktop`,strictness:[`reclaim-permissive`],attestation:ps([V(H.cliEditors,`user-global config target; its path resolution throws on Linux`)]),troubleshooting:fs(`troubleshooting.claude-desktop.per-tool-approval`,{agent:`claude-desktop`})})],modes:{external:{requirements:[ls([B(`claude-desktop`,`mcp`,`user`,`config-entry`)]),us([])]}},external:hs({targetId:`claude-cowork`,knownOrder:0,visible:!1,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`})}),cursor:cs({id:`cursor`,setupDocSlug:Ge.cursor,offersConnectionRow:!0,detectionSources:[`cli-on-path:cursor`,`scheme-handler:cursor`],satisfiers:[vs({agent:`cursor`,strictness:[`reclaim-permissive`],attestation:ps([V(H.cliEditors)])}),ys({agent:`cursor`,consentClass:`enable-manually`,strictness:[`reclaim-permissive`],attestation:ps([V(H.cliEditors),V(H.coreEditors),{kind:`observation`,ref:`cursor-3.19.19-project-server-default-off`,note:`project .cursor/mcp.json server listed Disabled under Customize → MCPs with no prompt; enabled via the per-source toggle in its Configure dialog; with a same-named user-level entry present, the user entry connected and the disabled project entry did not shadow it`}],{version:`3.19.19`,observedAt:`2026-09-09`}),troubleshooting:fs(`troubleshooting.cursor.project-entry-not-loaded`,{agent:`cursor`})}),bs({agent:`cursor`,prerequisites:[B(`cursor`,`mcp`,`project`,`config-entry`)],attestation:ps([V(H.coreEditors),V(H.repairSkills)])}),xs({agent:`cursor`,attestation:ps([V(H.coreEditors),V(H.skillInstall)])}),Ss(`cursor`)],modes:{external:{requirements:[ls([B(`cursor`,`mcp`,`user`,`config-entry`),B(`cursor`,`mcp`,`project`,`config-entry`)]),us([B(`cursor`,`skill`,`project`,`skill-bundle-copy`),B(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[ls([B(`cursor`,`mcp`,`user`,`config-entry`),B(`cursor`,`mcp`,`project`,`config-entry`)]),us([B(`cursor`,`skill`,`project`,`skill-bundle-copy`),B(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[ls([B(`cursor`,`mcp`,`session`,`session-injection`)]),us([B(`cursor`,`skill`,`project`,`skill-bundle-copy`),B(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:ms({acpAgentId:`cursor`,featuredOrder:3,harnessCli:`cursor`,readsEditorConfig:null,readsEditorConfigAttestation:ps([gs(`cursor-agent mcp list`,`Reports a config-declared entry that has not been approved as "not loaded (needs approval)", so a present entry says nothing about whether the agent will have the tools.`),V(H.threadManager,`the one agent the skip probe never stands down for`)],{observedAt:`2026-08-20`}),verifiedPosture:`self-managed`}),external:hs({targetId:`cursor`,knownOrder:3,visible:!0,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`})}),codex:cs({id:`codex`,setupDocSlug:Ge.codex,offersConnectionRow:!0,detectionSources:[`cli-on-path:codex`,`scheme-handler:codex`],satisfiers:[vs({agent:`codex`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:ps([V(H.cliEditors,`TOML user-global config target`)])}),ys({agent:`codex`,consentClass:`trust-gated`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:Zte([V(H.cliEditors,`project config path added by analogy with the other editors`),{kind:`upstream-issue`,ref:`openai/codex#13025`,note:`open, reproduced on builds newer than the one OK checked`},{kind:`upstream-issue`,ref:`openai/codex#36960`,note:`requires an explicit trust decision in rust-v0.147.0, reverting #36935's automatic trust from the same release; builds from 0.113 asked but did not reliably persist the answer (#14547); codex exec never asks`},{kind:`vendor-doc`,ref:`OpenAI Codex: Advanced configuration`,note:`project-scoped config loads only for a trusted project`},{kind:`observation`,ref:`codex-desktop-project-config-load`,note:`single non-repro on 26.623.81905; the CLI honors it only for a trusted project`}],{version:`26.707.72221`,observedAt:`2026-07-15`}),troubleshooting:[fs(`troubleshooting.codex.desktop-project-config`,{agent:`codex`,honoredByDesktop:!1}),fs(`troubleshooting.codex.folder-trust`,{agent:`codex`})]}),bs({agent:`codex`,prerequisites:[B(`codex`,`mcp`,`project`,`config-entry`)],attestation:ps([V(H.coreEditors),V(H.repairSkills)]),troubleshooting:fs(`troubleshooting.codex.folder-trust`,{agent:`codex`})}),xs({agent:`codex`,attestation:ps([V(H.coreEditors),V(H.skillInstall)])}),Ss(`codex`)],modes:{external:{requirements:[ls([B(`codex`,`mcp`,`user`,`config-entry`),B(`codex`,`mcp`,`project`,`config-entry`)]),us([B(`codex`,`skill`,`project`,`skill-bundle-copy`),B(`codex`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[ls([B(`codex`,`mcp`,`user`,`config-entry`),B(`codex`,`mcp`,`project`,`config-entry`)]),us([B(`codex`,`skill`,`project`,`skill-bundle-copy`),B(`codex`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[ls([B(`codex`,`mcp`,`session`,`session-injection`),B(`codex`,`mcp`,`user`,`config-entry`),B(`codex`,`mcp`,`project`,`config-entry`)]),us([B(`codex`,`skill`,`project`,`skill-bundle-copy`),B(`codex`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:ms({acpAgentId:`codex-acp`,featuredOrder:1,harnessCli:`codex`,readsEditorConfig:`codex`,readsEditorConfigAttestation:ps([V(H.cliEditors,`the managed MCP entry OK writes into the Codex TOML config`),gs(`codex-acp adapter`,`The adapter runs the Codex CLI, which loads the MCP servers declared in its own config, so the managed entry is already in the session.`)],_s),verifiedPosture:`self-managed`}),external:hs({targetId:`codex`,knownOrder:2,visible:!0,displayName:`ChatGPT`,appBrandName:`ChatGPT Desktop`,schemes:[`codex:`],installUrl:`https://developers.openai.com/codex/app`,tagline:`OpenAI's ChatGPT desktop app, home of the Codex agent.`})}),copilot:cs({id:`copilot`,setupDocSlug:Ge.copilot,offersConnectionRow:!0,detectionSources:[`cli-on-path:copilot`],satisfiers:[vs({agent:`copilot`,strictness:[`reclaim-permissive`],attestation:ps([V(H.cliEditors)])}),ys({agent:`copilot`,fileOwner:`claude`,sharedWith:[`claude`],consentClass:`trust-gated`,strictness:[`reclaim-permissive`],attestation:ps([{kind:`vendor-doc`,ref:`GitHub Copilot CLI — MCP configuration`,note:"reads workspace `.mcp.json` or `.github/mcp.json`"},{kind:`vendor-doc`,ref:`GitHub Docs: Adding MCP servers for Copilot CLI`,note:`project-level servers load only after folder-trust confirmation; skipped silently in untrusted folders; under copilot -p they load only in an already-trusted folder unless GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP=true`},V(H.coreEditors,`OK deliberately writes no second copy for copilot`)],{version:`copilot CLI 1.0.80`,observedAt:`2026-08-20`}),troubleshooting:fs(`troubleshooting.copilot.shared-workspace-config`,{agent:`copilot`,sourceAgent:`claude`})}),bs({agent:`copilot`,prerequisites:[B(`copilot`,`mcp`,`project`,`config-entry`),B(`copilot`,`mcp`,`user`,`config-entry`)],attestation:ps([V(H.coreEditors),V(H.writeProjectSkill)])}),xs({agent:`copilot`,attestation:ps([V(H.coreEditors),V(H.skillInstall)])}),Ss(`copilot`)],modes:{external:{requirements:[ls([B(`copilot`,`mcp`,`user`,`config-entry`),B(`copilot`,`mcp`,`project`,`config-entry`)]),us([B(`copilot`,`skill`,`project`,`skill-bundle-copy`),B(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[ls([B(`copilot`,`mcp`,`user`,`config-entry`),B(`copilot`,`mcp`,`project`,`config-entry`)]),us([B(`copilot`,`skill`,`project`,`skill-bundle-copy`),B(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[ls([B(`copilot`,`mcp`,`session`,`session-injection`)]),us([B(`copilot`,`skill`,`project`,`skill-bundle-copy`),B(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:ms({acpAgentId:`github-copilot-cli`,featuredOrder:4,harnessCli:null,readsEditorConfig:null,readsEditorConfigAttestation:{confidence:`assumed`,evidence:[gs(`copilot CLI 1.0.80`,"The CLI does read a workspace `.mcp.json`, but nobody has observed the ACP adapter loading the managed entry inside a session. Claiming it would stand our injection down on an unverified read and risk a thread with no OK tools, so the claim stays unmade and OK keeps injecting.")],verifiedAgainst:{version:`1.0.80`,observedAt:`2026-08-20`}},verifiedPosture:null}),external:hs({targetId:`copilot`,knownOrder:4,visible:!1,displayName:`GitHub Copilot`,schemes:[],installUrl:`https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-getting-started`,tagline:`GitHub's terminal-native coding agent.`})}),opencode:cs({id:`opencode`,setupDocSlug:Ge.opencode,offersConnectionRow:!0,detectionSources:[`cli-on-path:opencode`],satisfiers:[vs({agent:`opencode`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:ps([V(H.cliEditors,`XDG config dir; the win32 location is by analogy and unverified`)])}),ys({agent:`opencode`,consentClass:`none`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:ps([V(H.cliEditors,`the one project config that is not under a dotdir`)])}),bs({agent:`opencode`,prerequisites:[B(`opencode`,`mcp`,`project`,`config-entry`)],attestation:ps([V(H.coreEditors),V(H.repairSkills)])}),xs({agent:`opencode`,attestation:ps([V(H.coreEditors),V(H.skillInstall)])}),Ss(`opencode`)],modes:{external:{requirements:[ls([B(`opencode`,`mcp`,`user`,`config-entry`),B(`opencode`,`mcp`,`project`,`config-entry`)]),us([B(`opencode`,`skill`,`project`,`skill-bundle-copy`),B(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[ls([B(`opencode`,`mcp`,`user`,`config-entry`),B(`opencode`,`mcp`,`project`,`config-entry`)]),us([B(`opencode`,`skill`,`project`,`skill-bundle-copy`),B(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[ls([B(`opencode`,`mcp`,`session`,`session-injection`),B(`opencode`,`mcp`,`user`,`config-entry`),B(`opencode`,`mcp`,`project`,`config-entry`)]),us([B(`opencode`,`skill`,`project`,`skill-bundle-copy`),B(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:ms({acpAgentId:`opencode`,featuredOrder:5,harnessCli:`opencode`,readsEditorConfig:`opencode`,readsEditorConfigAttestation:ps([V(H.cliEditors,`the managed MCP entry OK writes into the opencode config`),gs(`opencode-acp adapter`,`The adapter runs opencode, which loads its own configured MCP servers, so the managed entry is already in the session.`)],_s),verifiedPosture:null}),external:hs({targetId:`opencode`,knownOrder:5,visible:!1,displayName:`OpenCode`,schemes:[],installUrl:`https://opencode.ai`,tagline:`Open-source terminal coding agent; bring any local model.`})}),openclaw:cs({id:`openclaw`,setupDocSlug:Ge.openclaw,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:openclaw`],satisfiers:[vs({agent:`openclaw`,strictness:[`reclaim-permissive`],attestation:ps([V(H.cliEditors,"the one two-level server map, nested under `mcp.servers`")])}),ss({agent:`openclaw`,piece:`skill`,scope:`user`,kind:`central-store-copy`,pathId:is,probe:ds(`reclaim-permissive`),attestation:ps([V(H.coreEditors),V(H.skillInstall,`the hub is written only when it already exists`)]),audience:`this-user`,guidance:fs(`guidance.skill.central-store`,{agent:`openclaw`}),troubleshooting:fs(`troubleshooting.openclaw.central-store-missing`,{agent:`openclaw`})})],modes:{external:{requirements:[ls([B(`openclaw`,`mcp`,`user`,`config-entry`)]),us([B(`openclaw`,`skill`,`user`,`central-store-copy`)])]},terminal:{requirements:[ls([B(`openclaw`,`mcp`,`user`,`config-entry`)]),us([B(`openclaw`,`skill`,`user`,`central-store-copy`)])]}},external:hs({targetId:`openclaw`,knownOrder:8,visible:!1,displayName:`OpenClaw`,schemes:[],installUrl:`https://openclaw.ai`,tagline:`Open-source agent gateway; runs agents against your MCP servers.`})}),pi:cs({id:`pi`,setupDocSlug:Ge.pi,offersConnectionRow:!0,detectionSources:[`cli-on-path:pi`],satisfiers:[ss({agent:`pi`,piece:`mcp`,scope:`project`,kind:`managed-file`,pathId:as(`editor-project-config`,`pi`),probe:ds(`reclaim-permissive`,`injection-functional`),attestation:ps([V(H.cliEditors,`OK owns the whole file; currency is a first-line sentinel`),V(H.acpRegistry,`the thread provisions this file instead of injecting`)]),audience:`this-project`,guidance:fs(`guidance.mcp.managed-file`,{agent:`pi`}),troubleshooting:fs(`troubleshooting.pi.folder-trust`,{agent:`pi`})}),bs({agent:`pi`,prerequisites:[B(`pi`,`mcp`,`project`,`managed-file`)],attestation:ps([V(H.coreEditors),V(H.writeProjectSkill)]),troubleshooting:fs(`troubleshooting.pi.folder-trust`,{agent:`pi`})}),xs({agent:`pi`,attestation:ps([V(H.coreEditors,`the agent home nests one level below the dotdir`),V(H.skillInstall)])})],modes:{external:{requirements:[ls([B(`pi`,`mcp`,`project`,`managed-file`)]),us([B(`pi`,`skill`,`project`,`skill-bundle-copy`),B(`pi`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[ls([B(`pi`,`mcp`,`project`,`managed-file`)]),us([B(`pi`,`skill`,`project`,`skill-bundle-copy`),B(`pi`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[ls([B(`pi`,`mcp`,`project`,`managed-file`)]),us([B(`pi`,`skill`,`project`,`skill-bundle-copy`),B(`pi`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:ms({acpAgentId:`pi-acp`,featuredOrder:null,harnessCli:`pi`,readsEditorConfig:`pi`,readsEditorConfigAttestation:ps([gs(`pi-acp@0.0.33`,"Pi has no MCP client at all: it accepts `mcpServers` at session/new, stores them write-only and never connects. Its wiring is a managed extension FILE in the project, which OK provisions instead of injecting — the same mapping, a different shape."),V(H.threadManager,`the bridge route that provisions the extension instead of injecting`)],{version:`0.0.33`,observedAt:`2026-08-20`}),verifiedPosture:`autonomous`}),external:hs({targetId:`pi`,knownOrder:6,visible:!1,displayName:`Pi`,schemes:[],installUrl:`https://pi.dev`,tagline:`Minimal open-source terminal coding agent, extensible in TypeScript.`})}),antigravity:cs({id:`antigravity`,setupDocSlug:Ge.antigravity,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:antigravity`],satisfiers:[vs({agent:`antigravity`,strictness:[`reclaim-permissive`],attestation:ps([V(H.cliEditors,`one user-global file shared by the IDE, the app and the CLI; per project you can only filter it`)])}),xs({agent:`antigravity`,attestation:ps([V(H.coreEditors),V(H.skillInstall)])})],modes:{external:{requirements:[ls([B(`antigravity`,`mcp`,`user`,`config-entry`)]),us([B(`antigravity`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[ls([B(`antigravity`,`mcp`,`user`,`config-entry`)]),us([B(`antigravity`,`skill`,`user`,`skill-bundle-copy`)])]}},external:hs({targetId:`antigravity`,knownOrder:7,visible:!1,displayName:`Antigravity`,schemes:[],installUrl:`https://antigravity.google`,tagline:"Google's agentic IDE + `agy` terminal agent."})}),"lm-studio":cs({id:`lm-studio`,setupDocSlug:Ge[`lm-studio`],offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[],satisfiers:[vs({agent:`lm-studio`,strictness:[`reclaim-permissive`],installability:`not-installable`,notInstallableReason:`no-non-interactive-verb`,attestation:ps([V(H.cliEditors,`two candidate locations, resolved against what already exists`),{kind:`upstream-issue`,ref:`lmstudio-ai/lmstudio-bug-tracker#1371`,note:`documented config path differs from the one the app reads on macOS`},V(H.presenceProbes,`deliberately absent from the presence probes`)]),troubleshooting:fs(`troubleshooting.lm-studio.config-path-mismatch`,{agent:`lm-studio`})})],modes:{external:{requirements:[ls([B(`lm-studio`,`mcp`,`user`,`config-entry`)]),us([])]}}}),hermes:cs({id:`hermes`,setupDocSlug:Ge.hermes,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:hermes`],satisfiers:[vs({agent:`hermes`,strictness:[`reclaim-permissive`],attestation:ps([V(H.cliEditors,`the one YAML target; the whole config is a single user-global file`)])})],modes:{external:{requirements:[ls([B(`hermes`,`mcp`,`user`,`config-entry`)]),us([])]},terminal:{requirements:[ls([B(`hermes`,`mcp`,`user`,`config-entry`)]),us([])]}},external:hs({targetId:`hermes`,knownOrder:9,visible:!1,displayName:`Hermes`,schemes:[],installUrl:`https://hermes-agent.nousresearch.com`,tagline:`Nous Research's terminal coding agent.`})}),gemini:cs({id:`gemini`,setupDocSlug:null,detectionSources:[`harness-bin:gemini`],satisfiers:[Ss(`gemini`)],modes:{acp:{requirements:[ls([B(`gemini`,`mcp`,`session`,`session-injection`)]),us([])]}},acp:ms({acpAgentId:`gemini`,featuredOrder:2,harnessCli:`gemini`,readsEditorConfig:null,readsEditorConfigAttestation:ps([V(H.coreEditors,`gemini reaches OK as an ACP agent only; it has no editor config target`)],_s),verifiedPosture:null})})};function ws(e){return Cs[e]}var Ts=Object.values(Cs).flatMap(e=>e.satisfiers),Qte=new Map(Ts.map(e=>[e.id,e]));function Es(e){return Qte.get(e)}var Ds=Object.values(Cs).flatMap(e=>e.acp===void 0?[]:[{record:e,acp:e.acp}]).sort((e,t)=>e.acp.acpAgentId.localeCompare(t.acp.acpAgentId));Ds.filter(({acp:e})=>e.featuredOrder!==null).sort((e,t)=>(e.acp.featuredOrder??0)-(t.acp.featuredOrder??0)).map(({acp:e})=>e.acpAgentId);var $te=Object.fromEntries(Ds.flatMap(({acp:e})=>e.harnessCli===null?[]:[[e.acpAgentId,e.harnessCli]]));Object.fromEntries(Ds.flatMap(({acp:e})=>e.harnessReadsEditorConfig===null?[]:[[e.acpAgentId,e.harnessReadsEditorConfig]]));var ene=Object.fromEntries(Ds.flatMap(({acp:e})=>e.verifiedPosture===null?[]:[[e.acpAgentId,e.verifiedPosture]])),Os=Object.values(Cs).flatMap(e=>e.external===void 0?[]:[e.external]).sort((e,t)=>e.knownOrder-t.knownOrder),ks=Os.map(({targetId:e,displayName:t,appBrandName:n,schemes:r,installUrl:i,tagline:a})=>({id:e,displayName:t,...n===void 0?{}:{appBrandName:n},schemes:r,installUrl:i,...a===void 0?{}:{tagline:a}})),tne=new Set(Os.filter(e=>e.visible).map(e=>e.targetId)),nne=ks.filter(e=>tne.has(e.id)),rne=Re.filter(e=>Cs[e].offersConnectionRow),ine=new Map(Object.values(Cs).flatMap(e=>e.external===void 0?[]:[[e.external.targetId,e.id]]));function ane(e){return ine.get(e)}var one=new Map(Object.values(Cs).flatMap(e=>e.modes.terminal===void 0?[]:[[e.id,e.id]]));function sne(e){return one.get(e)}Object.fromEntries(Object.values(Cs).flatMap(e=>{let t=e.satisfiers.find(e=>e.piece===`mcp`&&e.scope===`project`&&e.consentClass!==`none`)?.consentClass;return t===void 0?[]:[[e.id,t]]}));var As=Symbol.for(`yaml.alias`),js=Symbol.for(`yaml.document`),Ms=Symbol.for(`yaml.map`),Ns=Symbol.for(`yaml.pair`),Ps=Symbol.for(`yaml.scalar`),Fs=Symbol.for(`yaml.seq`),Is=Symbol.for(`yaml.node.type`),Ls=e=>!!e&&typeof e==`object`&&e[Is]===As,Rs=e=>!!e&&typeof e==`object`&&e[Is]===js,zs=e=>!!e&&typeof e==`object`&&e[Is]===Ms,Bs=e=>!!e&&typeof e==`object`&&e[Is]===Ns,Vs=e=>!!e&&typeof e==`object`&&e[Is]===Ps,Hs=e=>!!e&&typeof e==`object`&&e[Is]===Fs;function Us(e){if(e&&typeof e==`object`)switch(e[Is]){case Ms:case Fs:return!0}return!1}function Ws(e){if(e&&typeof e==`object`)switch(e[Is]){case As:case Ms:case Ps:case Fs:return!0}return!1}var Gs=e=>(Vs(e)||Us(e))&&!!e.anchor,Ks=Symbol(`break visit`),qs=Symbol(`skip children`),Js=Symbol(`remove node`);function Ys(e,t){let n=$s(t);Rs(e)?Xs(null,e.contents,n,Object.freeze([e]))===Js&&(e.contents=null):Xs(null,e,n,Object.freeze([]))}Ys.BREAK=Ks,Ys.SKIP=qs,Ys.REMOVE=Js;function Xs(e,t,n,r){let i=ec(e,t,n,r);if(Ws(i)||Bs(i))return tc(e,r,i),Xs(e,i,n,r);if(typeof i!=`symbol`){if(Us(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=Xs(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Ks)return Ks;else i===Js&&(t.items.splice(e,1),--e)}}else if(Bs(t)){r=Object.freeze(r.concat(t));let e=Xs(`key`,t.key,n,r);if(e===Ks)return Ks;e===Js&&(t.key=null);let i=Xs(`value`,t.value,n,r);if(i===Ks)return Ks;i===Js&&(t.value=null)}}return i}async function Zs(e,t){let n=$s(t);Rs(e)?await Qs(null,e.contents,n,Object.freeze([e]))===Js&&(e.contents=null):await Qs(null,e,n,Object.freeze([]))}Zs.BREAK=Ks,Zs.SKIP=qs,Zs.REMOVE=Js;async function Qs(e,t,n,r){let i=await ec(e,t,n,r);if(Ws(i)||Bs(i))return tc(e,r,i),Qs(e,i,n,r);if(typeof i!=`symbol`){if(Us(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await Qs(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Ks)return Ks;else i===Js&&(t.items.splice(e,1),--e)}}else if(Bs(t)){r=Object.freeze(r.concat(t));let e=await Qs(`key`,t.key,n,r);if(e===Ks)return Ks;e===Js&&(t.key=null);let i=await Qs(`value`,t.value,n,r);if(i===Ks)return Ks;i===Js&&(t.value=null)}}return i}function $s(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function ec(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(zs(t))return n.Map?.(e,t,r);if(Hs(t))return n.Seq?.(e,t,r);if(Bs(t))return n.Pair?.(e,t,r);if(Vs(t))return n.Scalar?.(e,t,r);if(Ls(t))return n.Alias?.(e,t,r)}function tc(e,t,n){let r=t[t.length-1];if(Us(r))r.items[e]=n;else if(Bs(r))e===`key`?r.key=n:r.value=n;else if(Rs(r))r.contents=n;else{let e=Ls(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var nc={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},rc=e=>e.replace(/[!,[\]{}]/g,e=>nc[e]),ic=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+rc(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&Ws(e.contents)){let t={};Ys(e.contents,(e,n)=>{Ws(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)i===`!!`&&a===`tag:yaml.org,2002:`||(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
|
|
65
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function gi(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:yi(t,`input`,e.processors),output:yi(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function _i(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return _i(r.element,n);if(r.type===`set`)return _i(r.valueType,n);if(r.type===`lazy`)return _i(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return _i(r.innerType,n);if(r.type===`intersection`)return _i(r.left,n)||_i(r.right,n);if(r.type===`record`||r.type===`map`)return _i(r.keyType,n)||_i(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:_i(r.in,n)||_i(r.out,n);if(r.type===`object`){for(let e in r.shape)if(_i(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(_i(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(_i(e,n))return!0;return!!(r.rest&&_i(r.rest,n))}return!1}var vi=(e,t={})=>n=>{let r=pi({...n,processors:t});return mi(e,r),hi(r,e),gi(r,e)},yi=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=pi({...i??{},target:a,io:t,processors:n});return mi(e,o),hi(o,e),gi(o,e)},bi={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},xi=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=bi[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Si=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},Ci=(e,t,n,r)=>{n.type=`boolean`},wi=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Ti=(e,t,n,r)=>{n.not={}},Ei=(e,t,n,r)=>{let i=e._zod.def,a=nt(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Di=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},Oi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},ki=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Ai=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=mi(a.element,t,{...r,path:[...r.path,`items`]})},ji=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=mi(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=mi(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Mi=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>mi(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ni=(e,t,n,r)=>{let i=e._zod.def,a=mi(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=mi(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Pi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=mi(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=mi(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=mi(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Fi=(e,t,n,r)=>{let i=e._zod.def,a=mi(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ii=(e,t,n,r)=>{let i=e._zod.def;mi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Li=(e,t,n,r)=>{let i=e._zod.def;mi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Ri=(e,t,n,r)=>{let i=e._zod.def;mi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},zi=(e,t,n,r)=>{let i=e._zod.def;mi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Bi=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;mi(o,t,r);let s=t.seen.get(e);s.ref=o},Vi=(e,t,n,r)=>{let i=e._zod.def;mi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Hi=(e,t,n,r)=>{let i=e._zod.def;mi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ui=(e,t,n,r)=>{let i=e._zod.innerType;mi(i,t,r);let a=t.seen.get(e);a.ref=i},Wi=A(`ZodISODateTime`,(e,t)=>{Dee.init(e,t),ga.init(e,t)});function Gi(e){return Mr(Wi,e)}var Ki=A(`ZodISODate`,(e,t)=>{Oee.init(e,t),ga.init(e,t)});function qi(e){return Nr(Ki,e)}var Ji=A(`ZodISOTime`,(e,t)=>{kee.init(e,t),ga.init(e,t)});function Yi(e){return Pr(Ji,e)}var Xi=A(`ZodISODuration`,(e,t)=>{Aee.init(e,t),ga.init(e,t)});function Zi(e){return Fr(Xi,e)}var Qi=A(`ZodError`,(e,t)=>{Ft.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>cee(e,t)},flatten:{value:t=>see(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,rt,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,rt,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),$i=Lt(Qi),ea=Rt(Qi),ta=zt(Qi),na=Bt(Qi),ra=pee(Qi),ia=mee(Qi),aa=hee(Qi),oa=gee(Qi),sa=_ee(Qi),ca=vee(Qi),la=yee(Qi),ua=bee(Qi),da=new WeakMap;function fa(e,t,n){let r=Object.getPrototypeOf(e),i=da.get(r);if(i||(i=new Set,da.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var pa=A(`ZodType`,(e,t)=>(In.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:yi(e,`input`),output:yi(e,`output`)}}),e.toJSONSchema=vi(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.parse=(t,n)=>$i(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>ta(e,t,n),e.parseAsync=async(t,n)=>ea(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>na(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>ra(e,t,n),e.decode=(t,n)=>ia(e,t,n),e.encodeAsync=async(t,n)=>aa(e,t,n),e.decodeAsync=async(t,n)=>oa(e,t,n),e.safeEncode=(t,n)=>sa(e,t,n),e.safeDecode=(t,n)=>ca(e,t,n),e.safeEncodeAsync=async(t,n)=>la(e,t,n),e.safeDecodeAsync=async(t,n)=>ua(e,t,n),fa(e,`ZodType`,{check(...e){let t=this.def;return this.clone(dt(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return bt(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Po(e,t))},superRefine(e,t){return this.check(Fo(e,t))},overwrite(e){return this.check(ni(e))},optional(){return fo(this)},exactOptional(){return mo(this)},nullable(){return go(this)},nullish(){return fo(go(this))},nonoptional(e){return So(this,e)},array(){return F(this)},or(e){return Qa([this,e])},and(e){return no(this,e)},transform(e){return Eo(this,lo(e))},default(e){return vo(this,e)},prefault(e){return bo(this,e)},catch(e){return wo(this,e)},pipe(e){return Eo(this,e)},readonly(){return ko(this)},describe(e){let t=this.clone();return pr.add(t,{description:e}),t},meta(...e){if(e.length===0)return pr.get(this);let t=this.clone();return pr.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,`description`,{get(){return pr.get(e)?.description},configurable:!0}),e)),ma=A(`_ZodString`,(e,t)=>{Ln.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xi(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,fa(e,`_ZodString`,{regex(...e){return this.check(Xr(...e))},includes(...e){return this.check($r(...e))},startsWith(...e){return this.check(ei(...e))},endsWith(...e){return this.check(ti(...e))},min(...e){return this.check(Jr(...e))},max(...e){return this.check(qr(...e))},length(...e){return this.check(Yr(...e))},nonempty(...e){return this.check(Jr(1,...e))},lowercase(e){return this.check(Zr(e))},uppercase(e){return this.check(Qr(e))},trim(){return this.check(ii())},normalize(...e){return this.check(ri(...e))},toLowerCase(){return this.check(ai())},toUpperCase(){return this.check(oi())},slugify(){return this.check(si())}})}),ha=A(`ZodString`,(e,t)=>{Ln.init(e,t),ma.init(e,t),e.email=t=>e.check(mr(_a,t)),e.url=t=>e.check(gr(xa,t)),e.jwt=t=>e.check(jr(La,t)),e.emoji=t=>e.check(_r(Ca,t)),e.guid=t=>e.check(hr(ya,t)),e.uuid=t=>e.check(pte(ba,t)),e.uuidv4=t=>e.check(mte(ba,t)),e.uuidv6=t=>e.check(hte(ba,t)),e.uuidv7=t=>e.check(gte(ba,t)),e.nanoid=t=>e.check(vr(wa,t)),e.guid=t=>e.check(hr(ya,t)),e.cuid=t=>e.check(yr(Ta,t)),e.cuid2=t=>e.check(br(Ea,t)),e.ulid=t=>e.check(xr(Da,t)),e.base64=t=>e.check(Or(Pa,t)),e.base64url=t=>e.check(kr(Fa,t)),e.xid=t=>e.check(Sr(Oa,t)),e.ksuid=t=>e.check(Cr(ka,t)),e.ipv4=t=>e.check(wr(Aa,t)),e.ipv6=t=>e.check(Tr(ja,t)),e.cidrv4=t=>e.check(Er(Ma,t)),e.cidrv6=t=>e.check(Dr(Na,t)),e.e164=t=>e.check(Ar(Ia,t)),e.datetime=t=>e.check(Gi(t)),e.date=t=>e.check(qi(t)),e.time=t=>e.check(Yi(t)),e.duration=t=>e.check(Zi(t))});function M(e){return fte(ha,e)}var ga=A(`ZodStringFormat`,(e,t)=>{Rn.init(e,t),ma.init(e,t)}),_a=A(`ZodEmail`,(e,t)=>{Vn.init(e,t),ga.init(e,t)});function va(e){return mr(_a,e)}var ya=A(`ZodGUID`,(e,t)=>{zn.init(e,t),ga.init(e,t)}),ba=A(`ZodUUID`,(e,t)=>{Bn.init(e,t),ga.init(e,t)}),xa=A(`ZodURL`,(e,t)=>{Hn.init(e,t),ga.init(e,t)});function Sa(e){return gr(xa,e)}var Ca=A(`ZodEmoji`,(e,t)=>{Un.init(e,t),ga.init(e,t)}),wa=A(`ZodNanoID`,(e,t)=>{Wn.init(e,t),ga.init(e,t)}),Ta=A(`ZodCUID`,(e,t)=>{Gn.init(e,t),ga.init(e,t)}),Ea=A(`ZodCUID2`,(e,t)=>{Kn.init(e,t),ga.init(e,t)}),Da=A(`ZodULID`,(e,t)=>{wee.init(e,t),ga.init(e,t)}),Oa=A(`ZodXID`,(e,t)=>{Tee.init(e,t),ga.init(e,t)}),ka=A(`ZodKSUID`,(e,t)=>{Eee.init(e,t),ga.init(e,t)}),Aa=A(`ZodIPv4`,(e,t)=>{jee.init(e,t),ga.init(e,t)}),ja=A(`ZodIPv6`,(e,t)=>{Mee.init(e,t),ga.init(e,t)}),Ma=A(`ZodCIDRv4`,(e,t)=>{Nee.init(e,t),ga.init(e,t)}),Na=A(`ZodCIDRv6`,(e,t)=>{Pee.init(e,t),ga.init(e,t)}),Pa=A(`ZodBase64`,(e,t)=>{Fee.init(e,t),ga.init(e,t)}),Fa=A(`ZodBase64URL`,(e,t)=>{Lee.init(e,t),ga.init(e,t)}),Ia=A(`ZodE164`,(e,t)=>{Ree.init(e,t),ga.init(e,t)}),La=A(`ZodJWT`,(e,t)=>{Bee.init(e,t),ga.init(e,t)}),Ra=A(`ZodNumber`,(e,t)=>{Jn.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Si(e,t,n,r),fa(e,`ZodNumber`,{gt(e,t){return this.check(Wr(e,t))},gte(e,t){return this.check(Gr(e,t))},min(e,t){return this.check(Gr(e,t))},lt(e,t){return this.check(Hr(e,t))},lte(e,t){return this.check(Ur(e,t))},max(e,t){return this.check(Ur(e,t))},int(e){return this.check(Ba(e))},safe(e){return this.check(Ba(e))},positive(e){return this.check(Wr(0,e))},nonnegative(e){return this.check(Gr(0,e))},negative(e){return this.check(Hr(0,e))},nonpositive(e){return this.check(Ur(0,e))},multipleOf(e,t){return this.check(Kr(e,t))},step(e,t){return this.check(Kr(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function N(e){return Ir(Ra,e)}var za=A(`ZodNumberFormat`,(e,t)=>{Vee.init(e,t),Ra.init(e,t)});function Ba(e){return Lr(za,e)}var Va=A(`ZodBoolean`,(e,t)=>{Hee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ci(e,t,n,r)});function P(e){return Rr(Va,e)}var Ha=A(`ZodNull`,(e,t)=>{Uee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wi(e,t,n,r)});function Ua(e){return zr(Ha,e)}var Wa=A(`ZodUnknown`,(e,t)=>{Wee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ga(){return Br(Wa)}var Ka=A(`ZodNever`,(e,t)=>{Gee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ti(e,t,n,r)});function qa(e){return Vr(Ka,e)}var Ja=A(`ZodArray`,(e,t)=>{Kee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ai(e,t,n,r),e.element=t.element,fa(e,`ZodArray`,{min(e,t){return this.check(Jr(e,t))},nonempty(e){return this.check(Jr(1,e))},max(e,t){return this.check(qr(e,t))},length(e,t){return this.check(Yr(e,t))},unwrap(){return this.element}})});function F(e,t){return ci(Ja,e,t)}var Ya=A(`ZodObject`,(e,t)=>{Jee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ji(e,t,n,r),lt(e,`shape`,()=>t.shape),fa(e,`ZodObject`,{keyof(){return R(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Ga()})},loose(){return this.clone({...this._zod.def,catchall:Ga()})},strict(){return this.clone({...this._zod.def,catchall:qa()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return St(this,e)},safeExtend(e){return Ct(this,e)},merge(e){return wt(this,e)},pick(e){return oee(this,e)},omit(e){return xt(this,e)},partial(...e){return Tt(uo,this,e[0])},required(...e){return Et(xo,this,e[0])}})});function I(e,t){return new Ya({type:`object`,shape:e??{},...j(t)})}function Xa(e,t){return new Ya({type:`object`,shape:e,catchall:qa(),...j(t)})}function L(e,t){return new Ya({type:`object`,shape:e,catchall:Ga(),...j(t)})}var Za=A(`ZodUnion`,(e,t)=>{er.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mi(e,t,n,r),e.options=t.options});function Qa(e,t){return new Za({type:`union`,options:e,...j(t)})}var $a=A(`ZodDiscriminatedUnion`,(e,t)=>{Za.init(e,t),Yee.init(e,t)});function eo(e,t,n){return new $a({type:`union`,options:t,discriminator:e,...j(n)})}var to=A(`ZodIntersection`,(e,t)=>{Xee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ni(e,t,n,r)});function no(e,t){return new to({type:`intersection`,left:e,right:t})}var ro=A(`ZodRecord`,(e,t)=>{Zee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pi(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function io(e,t,n){return!t||!t._zod?new ro({type:`record`,keyType:M(),valueType:e,...j(t)}):new ro({type:`record`,keyType:e,valueType:t,...j(n)})}function ao(e,t,n){let r=bt(e);return r._zod.values=void 0,new ro({type:`record`,keyType:r,valueType:t,...j(n)})}var oo=A(`ZodEnum`,(e,t)=>{Qee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ei(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new oo({...t,checks:[],...j(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new oo({...t,checks:[],...j(r),entries:i})}});function R(e,t){return new oo({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...j(t)})}var so=A(`ZodLiteral`,(e,t)=>{$ee.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Di(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function z(e,t){return new so({type:`literal`,values:Array.isArray(e)?e:[e],...j(t)})}var co=A(`ZodTransform`,(e,t)=>{ete.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ki(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new $e(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Nt(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Nt(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function lo(e){return new co({type:`transform`,transform:e})}var uo=A(`ZodOptional`,(e,t)=>{ir.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fo(e){return new uo({type:`optional`,innerType:e})}var po=A(`ZodExactOptional`,(e,t)=>{tte.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function mo(e){return new po({type:`optional`,innerType:e})}var ho=A(`ZodNullable`,(e,t)=>{nte.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function go(e){return new ho({type:`nullable`,innerType:e})}var _o=A(`ZodDefault`,(e,t)=>{rte.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Li(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function vo(e,t){return new _o({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():vt(t)}})}var yo=A(`ZodPrefault`,(e,t)=>{ite.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ri(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bo(e,t){return new yo({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():vt(t)}})}var xo=A(`ZodNonOptional`,(e,t)=>{ate.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ii(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function So(e,t){return new xo({type:`nonoptional`,innerType:e,...j(t)})}var Co=A(`ZodCatch`,(e,t)=>{ote.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function wo(e,t){return new Co({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var To=A(`ZodPipe`,(e,t)=>{sr.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bi(e,t,n,r),e.in=t.in,e.out=t.out});function Eo(e,t){return new To({type:`pipe`,in:e,out:t})}var Do=A(`ZodPreprocess`,(e,t)=>{To.init(e,t),ste.init(e,t)}),Oo=A(`ZodReadonly`,(e,t)=>{cte.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ko(e){return new Oo({type:`readonly`,innerType:e})}var Ao=A(`ZodLazy`,(e,t)=>{lte.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ui(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function jo(e){return new Ao({type:`lazy`,getter:e})}var Mo=A(`ZodCustom`,(e,t)=>{ute.init(e,t),pa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oi(e,t,n,r)});function No(e,t){return li(Mo,e??(()=>!0),t)}function Po(e,t={}){return ui(Mo,e,t)}function Fo(e,t){return di(e,t)}function _te(e,t={}){let n=new Mo({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...j(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function vte(e,t){return new Do({type:`pipe`,in:lo(e),out:t})}function Io(e){return`'${e.replace(/'/g,`'\\''`)}'`}function yte(e){return[`--settings`,e]}var bte=/['\u2018\u2019\u201A\u201B]/g;function xte(e){return`'${e.replace(bte,`$&$&`)}'`}function Ste(e,t){return t.length===0||/\p{Cc}/u.test(t)?null:e===`powershell`?xte(t):e===`bash`?Io(t):/["%!]/u.test(t)?null:`"${t}"`}var Cte=[`mcp__${Je}`,`Bash(ok open:*)`],wte=[`delete`,`move`,`share_link`,`install`,`import`].map(e=>`mcp__${Je}__${e}`),Tte=`-c ${Io(`mcp_servers.${Je}.default_tools_approval_mode="approve"`)}`;function Lo(e){let t={};return e.mcpPreApprove===!0&&(t.enabledMcpjsonServers=[Je]),e.autoApproveOkTools===!0&&(t.permissions={allow:[...Cte],ask:[...wte]}),t.enabledMcpjsonServers===void 0&&t.permissions===void 0?null:JSON.stringify(t)}function Ete(e){let t=Lo(e);return t===null?``:`--settings ${Io(t)}`}var Ro=`\x1B`,Dte=`${Ro}[200~`,Ote=`${Ro}[201~`,zo=`\x1B[?2004h`,kte=300,Ate=4e3,jte={submit:`\r`,readyMarker:zo,settleMs:800,capMs:4e3},Bo={claude:{bin:`claude`,displayName:`Claude`,docsUrl:`https://docs.claude.com/en/docs/claude-code`,handoffTarget:`claude-code`},codex:{bin:`codex`,displayName:`Codex`,docsUrl:`https://developers.openai.com/codex/cli`,handoffTarget:`codex`,autoApproveArg:Tte},copilot:{bin:`copilot`,displayName:`GitHub Copilot`,docsUrl:`https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-getting-started`,handoffTarget:`copilot`,promptFlag:`--interactive`},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`},pi:{bin:`pi`,displayName:`Pi`,docsUrl:`https://pi.dev`,handoffTarget:`pi`},antigravity:{bin:`agy`,displayName:`Antigravity`,docsUrl:`https://antigravity.google/docs/cli-getting-started`,handoffTarget:`antigravity`,promptFlag:`--prompt-interactive`},openclaw:{bin:`openclaw`,subcommand:`chat`,displayName:`OpenClaw`,docsUrl:`https://docs.openclaw.ai/cli/tui`,handoffTarget:`openclaw`,promptFlag:`--message`},hermes:{bin:`hermes`,subcommand:`chat`,displayName:`Hermes`,docsUrl:`https://hermes-agent.nousresearch.com/docs/user-guide/cli`,handoffTarget:`hermes`,startupInjection:{submit:`\r`,readyMarker:zo,settleMs:kte,capMs:Ate}}},Vo=[`claude`,`codex`,`opencode`,`cursor`,`copilot`,`pi`,`antigravity`,`openclaw`,`hermes`];function Mte(e,t,n={}){let r=Bo[e];if(e===`claude`){let e=Lo(n);if(e!==null){let t=`.ok/local/terminal/claude-settings-${[n.mcpPreApprove===!0?`mcp`:null,n.autoApproveOkTools===!0?`tools`:null].filter(e=>e!==null).join(`-`)}.json`;return{executable:r.bin,args:[...yte(t)],supportFile:{kind:`claude-settings`,relativePath:t,contents:e}}}}return e===`codex`&&n.autoApproveOkTools===!0?{executable:r.bin,args:[`-c`,`mcp_servers.${Je}.default_tools_approval_mode=approve`]}:{executable:r.bin,args:r.subcommand?[r.subcommand]:[]}}function Nte(e,t,n={}){let r=Bo[e],i=e===`claude`?Ete(n):n.autoApproveOkTools===!0&&r.autoApproveArg?r.autoApproveArg:``,a=i?`${i} `:``,o=r.subcommand?`${r.subcommand} `:``;if(r.startupInjection!=null||t==null||t.length===0)return`${r.bin} ${o}${a}`.trimEnd();let s=r.promptFlag?`${r.promptFlag} `:``;return`${r.bin} ${o}${a}${s}${Io(t)}`}function Ho(e,t){return Bo[e].startupInjection??(t===`win32`?jte:void 0)}function Pte(e,t,n){let r=Ho(e,n);return r==null||t==null||t.length===0?null:`${Dte}${t.replaceAll(Ro,``)}${Ote}${r.submit}`}var Uo=[`config-entry`,`managed-file`,`skill-bundle-copy`,`central-store-copy`,`session-injection`],Fte=R(Uo),Ite=Uo.filter(e=>e!==`session-injection`),Wo=[`satisfied`,`present-consent-unknown`,`absent`,`foreign`,`foreign-replaceable`,`drifted`,`excluded`,`structural-na`,`undetected`,`unprobeable`,`unprobed`];Qa([R(Wo),M()]);function Go(e){return Wo.includes(e)}var Ko=[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],qo=R(Ko),Lte=R([`none`,`approve-once`,`enable-manually`,`trust-gated`]),Rte=[`enable-manually`],Jo=[`written`,`overwritten`,`skipped-unsupported`,`skipped-prerequisite`,`declined`,`failed`,`removed`,`excluded`,`unchanged`,`handed-off`,`skipped-foreign`,`skipped-missing`,`no-op`];R(Jo),R([`info`,`warning`,`error`]);var zte=R([`required`,`recommended`]),Yo=[...Re,`gemini`],Xo=R(Yo);function Zo(e){return Yo.includes(e)}var Bte=R([`acp`,`terminal`,`external`]),Vte=R([...Vo,`gemini`]),Hte=R([`claude-cowork`,`claude-code`,`codex`,`cursor`,`copilot`,`opencode`,`pi`,`antigravity`,`openclaw`,`hermes`]),Qo=R([`mcp`,`skill`]),$o=[`project`,`user`,`session`],es=R($o),ts=M().regex(/^[a-z0-9-]+\/[a-z0-9-]+\/[a-z0-9-]+\/[a-z0-9-]+$/).transform(e=>e),Ute=M().min(1).transform(e=>e),Wte=M().min(1).transform(e=>e);function ns(e){return`${e.agent}/${e.piece}/${e.scope}/${e.kind}`}function rs(e){return e}function Gte(e){return e}var Kte=[`editor-user-config`,`editor-project-config`,`editor-project-skill-root`,`editor-user-skill-root`],is=rs(`central-skill-store`);function as(e,t){return rs(`${e}:${t}`)}function qte(e){if(e===is)return{kind:`central-skill-store`};let t=e.indexOf(`:`);if(t===-1)return null;let n=e.slice(0,t),r=e.slice(t+1);return!Kte.includes(n)||!Re.includes(r)?null:{kind:n,editor:r}}var Jte=e=>e===void 0?[]:Array.isArray(e)?[...e]:[e];function ss(e){let{sharedWith:t,prerequisites:n,consentClass:r,installability:i,preferred:a,troubleshooting:o,...s}=e;return{...s,troubleshooting:Jte(o),id:ns({agent:e.agent,piece:e.piece,scope:e.scope,kind:e.kind}),sharedWith:t??[],prerequisites:n??[],consentClass:r??`none`,installability:i??`installable`,preferred:a??!1}}function cs(e){let{offerOnlyWhenDetected:t,offersConnectionRow:n,detectionSources:r,modes:i,...a}=e,o={};for(let[e,t]of Object.entries(i))o[e]={requirements:t.requirements,caveats:t.caveats??[]};return{...a,offerOnlyWhenDetected:t??!1,offersConnectionRow:n??!1,detectionSources:r??[],modes:o}}var B=(e,t,n,r)=>ns({agent:e,piece:t,scope:n,kind:r}),ls=e=>({piece:`mcp`,level:`required`,satisfiedByAny:e}),us=e=>({piece:`skill`,level:`recommended`,satisfiedByAny:e}),ds=(...e)=>({mode:`probeable`,strictness:e}),Yte=(e,t)=>({mode:`unprobeable`,reason:e,...t===void 0?{}:{note:t}}),fs=(e,t)=>({id:Gte(e),...t===void 0?{}:{params:t}}),Xte=(e,t)=>{let n=Rte.find(t=>t===e);return n===void 0?void 0:fs(`followup.${n}`,{agent:t})},V=(e,t)=>({kind:`source-read`,ref:e,...t===void 0?{}:{note:t}}),ps=(e,t)=>t===void 0?{confidence:`verified`,evidence:e}:{confidence:`verified`,evidence:e,verifiedAgainst:t},Zte=(e,t)=>({confidence:`contested`,evidence:e,verifiedAgainst:t});function ms(e){return{acpAgentId:e.acpAgentId,featuredOrder:e.featuredOrder,harnessCli:e.harnessCli,harnessReadsEditorConfig:e.readsEditorConfig,harnessReadsEditorConfigAttestation:e.readsEditorConfigAttestation,verifiedPosture:e.verifiedPosture}}function hs(e){let{appBrandName:t,tagline:n,...r}=e;return{...r,...t===void 0?{}:{appBrandName:t},...n===void 0?{}:{tagline:n}}}var gs=(e,t)=>({kind:`observation`,ref:e,note:t}),_s={observedAt:`2026-07-02`},H={cliEditors:`packages/cli/src/commands/editors.ts`,coreEditors:`packages/core/src/constants/editors.ts`,acpRegistry:`packages/server/src/acp/registry.ts`,threadManager:`packages/server/src/acp/thread-manager.ts`,writeProjectSkill:`packages/cli/src/integrations/write-project-skill.ts`,repairSkills:`packages/cli/src/commands/repair-skills.ts`,skillInstall:`packages/server/src/skill-install.ts`,presenceProbes:`packages/desktop/src/main/integrations-settings.ts`};function vs(e){return ss({agent:e.agent,piece:`mcp`,scope:`user`,kind:`config-entry`,pathId:as(`editor-user-config`,e.agent),probe:ds(...e.strictness),attestation:e.attestation,audience:`this-user`,installability:e.installability,notInstallableReason:e.notInstallableReason,guidance:fs(`guidance.mcp.user-config`,{agent:e.agent}),troubleshooting:e.troubleshooting})}function ys(e){return ss({agent:e.agent,piece:`mcp`,scope:`project`,kind:`config-entry`,pathId:as(`editor-project-config`,e.fileOwner??e.agent),sharedWith:e.sharedWith,consentClass:e.consentClass,probe:ds(...e.strictness),attestation:e.attestation,audience:`this-project`,guidance:fs(`guidance.mcp.project-config`,{agent:e.agent}),followup:Xte(e.consentClass,e.agent),troubleshooting:e.troubleshooting})}function bs(e){return ss({agent:e.agent,piece:`skill`,scope:`project`,kind:`skill-bundle-copy`,pathId:as(`editor-project-skill-root`,e.agent),prerequisites:e.prerequisites,probe:ds(`reclaim-permissive`),attestation:e.attestation,audience:`this-project`,guidance:fs(`guidance.skill.project`,{agent:e.agent}),troubleshooting:e.troubleshooting})}function xs(e){return ss({agent:e.agent,piece:`skill`,scope:`user`,kind:`skill-bundle-copy`,pathId:as(`editor-user-skill-root`,e.agent),probe:ds(`reclaim-permissive`),attestation:e.attestation,audience:`this-user`,guidance:fs(`guidance.skill.user`,{agent:e.agent})})}function Ss(e){return ss({agent:e,piece:`mcp`,scope:`session`,kind:`session-injection`,probe:Yte(`session-scoped`),attestation:ps([V(H.threadManager,`the session MCP config the thread manager builds per thread`)]),audience:`this-project`,installability:`not-installable`,notInstallableReason:`session-scoped`,guidance:fs(`guidance.mcp.session-injection`,{agent:e})})}var Cs={claude:cs({id:`claude`,setupDocSlug:Ge.claude,offersConnectionRow:!0,detectionSources:[`cli-on-path:claude`,`scheme-handler:claude-code`],satisfiers:[vs({agent:`claude`,strictness:[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],attestation:ps([V(H.cliEditors,`user-global MCP config target`)])}),ys({agent:`claude`,sharedWith:[`copilot`],consentClass:`approve-once`,strictness:[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],attestation:ps([V(H.cliEditors),V(H.coreEditors)]),troubleshooting:fs(`troubleshooting.claude.project-entry-not-approved`,{agent:`claude`})}),bs({agent:`claude`,prerequisites:[B(`claude`,`mcp`,`project`,`config-entry`)],attestation:ps([V(H.coreEditors),V(H.repairSkills)])}),xs({agent:`claude`,attestation:ps([V(H.coreEditors),V(H.skillInstall)])}),Ss(`claude`)],modes:{external:{requirements:[ls([B(`claude`,`mcp`,`user`,`config-entry`),B(`claude`,`mcp`,`project`,`config-entry`)]),us([B(`claude`,`skill`,`project`,`skill-bundle-copy`),B(`claude`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[ls([B(`claude`,`mcp`,`user`,`config-entry`),B(`claude`,`mcp`,`project`,`config-entry`)]),us([B(`claude`,`skill`,`project`,`skill-bundle-copy`),B(`claude`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[ls([B(`claude`,`mcp`,`session`,`session-injection`),B(`claude`,`mcp`,`user`,`config-entry`),B(`claude`,`mcp`,`project`,`config-entry`)]),us([B(`claude`,`skill`,`project`,`skill-bundle-copy`),B(`claude`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:ms({acpAgentId:`claude-acp`,featuredOrder:0,harnessCli:`claude`,readsEditorConfig:`claude`,readsEditorConfigAttestation:ps([V(H.threadManager,`the injection-skip probe reads the managed entry for this editor`),gs(`claude-acp adapter`,`The adapter runs Claude Code, which loads the MCP entry OK writes for the Claude editor on its own, so injecting a same-name duplicate would be redundant.`)],_s),verifiedPosture:`asks`}),external:hs({targetId:`claude-code`,knownOrder:1,visible:!0,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Agentic coding in Claude Desktop's Code tab.`})}),"claude-desktop":cs({id:`claude-desktop`,setupDocSlug:Ge[`claude-desktop`],offersConnectionRow:!1,detectionSources:[`scheme-handler:claude-code`],satisfiers:[vs({agent:`claude-desktop`,strictness:[`reclaim-permissive`],attestation:ps([V(H.cliEditors,`user-global config target; its path resolution throws on Linux`)]),troubleshooting:fs(`troubleshooting.claude-desktop.per-tool-approval`,{agent:`claude-desktop`})})],modes:{external:{requirements:[ls([B(`claude-desktop`,`mcp`,`user`,`config-entry`)]),us([])]}},external:hs({targetId:`claude-cowork`,knownOrder:0,visible:!1,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`})}),cursor:cs({id:`cursor`,setupDocSlug:Ge.cursor,offersConnectionRow:!0,detectionSources:[`cli-on-path:cursor`,`scheme-handler:cursor`],satisfiers:[vs({agent:`cursor`,strictness:[`reclaim-permissive`],attestation:ps([V(H.cliEditors)])}),ys({agent:`cursor`,consentClass:`enable-manually`,strictness:[`reclaim-permissive`],attestation:ps([V(H.cliEditors),V(H.coreEditors),{kind:`observation`,ref:`cursor-3.19.19-project-server-default-off`,note:`project .cursor/mcp.json server listed Disabled under Customize → MCPs with no prompt; enabled via the per-source toggle in its Configure dialog; with a same-named user-level entry present, the user entry connected and the disabled project entry did not shadow it`}],{version:`3.19.19`,observedAt:`2026-09-09`}),troubleshooting:fs(`troubleshooting.cursor.project-entry-not-loaded`,{agent:`cursor`})}),bs({agent:`cursor`,prerequisites:[B(`cursor`,`mcp`,`project`,`config-entry`)],attestation:ps([V(H.coreEditors),V(H.repairSkills)])}),xs({agent:`cursor`,attestation:ps([V(H.coreEditors),V(H.skillInstall)])}),Ss(`cursor`)],modes:{external:{requirements:[ls([B(`cursor`,`mcp`,`user`,`config-entry`),B(`cursor`,`mcp`,`project`,`config-entry`)]),us([B(`cursor`,`skill`,`project`,`skill-bundle-copy`),B(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[ls([B(`cursor`,`mcp`,`user`,`config-entry`),B(`cursor`,`mcp`,`project`,`config-entry`)]),us([B(`cursor`,`skill`,`project`,`skill-bundle-copy`),B(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[ls([B(`cursor`,`mcp`,`session`,`session-injection`)]),us([B(`cursor`,`skill`,`project`,`skill-bundle-copy`),B(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:ms({acpAgentId:`cursor`,featuredOrder:3,harnessCli:`cursor`,readsEditorConfig:null,readsEditorConfigAttestation:ps([gs(`cursor-agent mcp list`,`Reports a config-declared entry that has not been approved as "not loaded (needs approval)", so a present entry says nothing about whether the agent will have the tools.`),V(H.threadManager,`the one agent the skip probe never stands down for`)],{observedAt:`2026-08-20`}),verifiedPosture:`self-managed`}),external:hs({targetId:`cursor`,knownOrder:3,visible:!0,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`})}),codex:cs({id:`codex`,setupDocSlug:Ge.codex,offersConnectionRow:!0,detectionSources:[`cli-on-path:codex`,`scheme-handler:codex`],satisfiers:[vs({agent:`codex`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:ps([V(H.cliEditors,`TOML user-global config target`)])}),ys({agent:`codex`,consentClass:`trust-gated`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:Zte([V(H.cliEditors,`project config path added by analogy with the other editors`),{kind:`upstream-issue`,ref:`openai/codex#13025`,note:`open, reproduced on builds newer than the one OK checked`},{kind:`upstream-issue`,ref:`openai/codex#36960`,note:`requires an explicit trust decision in rust-v0.147.0, reverting #36935's automatic trust from the same release; builds from 0.113 asked but did not reliably persist the answer (#14547); codex exec never asks`},{kind:`vendor-doc`,ref:`OpenAI Codex: Advanced configuration`,note:`project-scoped config loads only for a trusted project`},{kind:`observation`,ref:`codex-desktop-project-config-load`,note:`single non-repro on 26.623.81905; the CLI honors it only for a trusted project`}],{version:`26.707.72221`,observedAt:`2026-07-15`}),troubleshooting:[fs(`troubleshooting.codex.desktop-project-config`,{agent:`codex`,honoredByDesktop:!1}),fs(`troubleshooting.codex.folder-trust`,{agent:`codex`})]}),bs({agent:`codex`,prerequisites:[B(`codex`,`mcp`,`project`,`config-entry`)],attestation:ps([V(H.coreEditors),V(H.repairSkills)]),troubleshooting:fs(`troubleshooting.codex.folder-trust`,{agent:`codex`})}),xs({agent:`codex`,attestation:ps([V(H.coreEditors),V(H.skillInstall)])}),Ss(`codex`)],modes:{external:{requirements:[ls([B(`codex`,`mcp`,`user`,`config-entry`),B(`codex`,`mcp`,`project`,`config-entry`)]),us([B(`codex`,`skill`,`project`,`skill-bundle-copy`),B(`codex`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[ls([B(`codex`,`mcp`,`user`,`config-entry`),B(`codex`,`mcp`,`project`,`config-entry`)]),us([B(`codex`,`skill`,`project`,`skill-bundle-copy`),B(`codex`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[ls([B(`codex`,`mcp`,`session`,`session-injection`),B(`codex`,`mcp`,`user`,`config-entry`),B(`codex`,`mcp`,`project`,`config-entry`)]),us([B(`codex`,`skill`,`project`,`skill-bundle-copy`),B(`codex`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:ms({acpAgentId:`codex-acp`,featuredOrder:1,harnessCli:`codex`,readsEditorConfig:`codex`,readsEditorConfigAttestation:ps([V(H.cliEditors,`the managed MCP entry OK writes into the Codex TOML config`),gs(`codex-acp adapter`,`The adapter runs the Codex CLI, which loads the MCP servers declared in its own config, so the managed entry is already in the session.`)],_s),verifiedPosture:`self-managed`}),external:hs({targetId:`codex`,knownOrder:2,visible:!0,displayName:`ChatGPT`,appBrandName:`ChatGPT Desktop`,schemes:[`codex:`],installUrl:`https://developers.openai.com/codex/app`,tagline:`OpenAI's ChatGPT desktop app, home of the Codex agent.`})}),copilot:cs({id:`copilot`,setupDocSlug:Ge.copilot,offersConnectionRow:!0,detectionSources:[`cli-on-path:copilot`],satisfiers:[vs({agent:`copilot`,strictness:[`reclaim-permissive`],attestation:ps([V(H.cliEditors)])}),ys({agent:`copilot`,fileOwner:`claude`,sharedWith:[`claude`],consentClass:`trust-gated`,strictness:[`reclaim-permissive`],attestation:ps([{kind:`vendor-doc`,ref:`GitHub Copilot CLI — MCP configuration`,note:"reads workspace `.mcp.json` or `.github/mcp.json`"},{kind:`vendor-doc`,ref:`GitHub Docs: Adding MCP servers for Copilot CLI`,note:`project-level servers load only after folder-trust confirmation; skipped silently in untrusted folders; under copilot -p they load only in an already-trusted folder unless GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP=true`},V(H.coreEditors,`OK deliberately writes no second copy for copilot`)],{version:`copilot CLI 1.0.80`,observedAt:`2026-08-20`}),troubleshooting:fs(`troubleshooting.copilot.shared-workspace-config`,{agent:`copilot`,sourceAgent:`claude`})}),bs({agent:`copilot`,prerequisites:[B(`copilot`,`mcp`,`project`,`config-entry`),B(`copilot`,`mcp`,`user`,`config-entry`)],attestation:ps([V(H.coreEditors),V(H.writeProjectSkill)])}),xs({agent:`copilot`,attestation:ps([V(H.coreEditors),V(H.skillInstall)])}),Ss(`copilot`)],modes:{external:{requirements:[ls([B(`copilot`,`mcp`,`user`,`config-entry`),B(`copilot`,`mcp`,`project`,`config-entry`)]),us([B(`copilot`,`skill`,`project`,`skill-bundle-copy`),B(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[ls([B(`copilot`,`mcp`,`user`,`config-entry`),B(`copilot`,`mcp`,`project`,`config-entry`)]),us([B(`copilot`,`skill`,`project`,`skill-bundle-copy`),B(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[ls([B(`copilot`,`mcp`,`session`,`session-injection`)]),us([B(`copilot`,`skill`,`project`,`skill-bundle-copy`),B(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:ms({acpAgentId:`github-copilot-cli`,featuredOrder:4,harnessCli:null,readsEditorConfig:null,readsEditorConfigAttestation:{confidence:`assumed`,evidence:[gs(`copilot CLI 1.0.80`,"The CLI does read a workspace `.mcp.json`, but nobody has observed the ACP adapter loading the managed entry inside a session. Claiming it would stand our injection down on an unverified read and risk a thread with no OK tools, so the claim stays unmade and OK keeps injecting.")],verifiedAgainst:{version:`1.0.80`,observedAt:`2026-08-20`}},verifiedPosture:null}),external:hs({targetId:`copilot`,knownOrder:4,visible:!1,displayName:`GitHub Copilot`,schemes:[],installUrl:`https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-getting-started`,tagline:`GitHub's terminal-native coding agent.`})}),opencode:cs({id:`opencode`,setupDocSlug:Ge.opencode,offersConnectionRow:!0,detectionSources:[`cli-on-path:opencode`],satisfiers:[vs({agent:`opencode`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:ps([V(H.cliEditors,`XDG config dir; the win32 location is by analogy and unverified`)])}),ys({agent:`opencode`,consentClass:`none`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:ps([V(H.cliEditors,`the one project config that is not under a dotdir`)])}),bs({agent:`opencode`,prerequisites:[B(`opencode`,`mcp`,`project`,`config-entry`)],attestation:ps([V(H.coreEditors),V(H.repairSkills)])}),xs({agent:`opencode`,attestation:ps([V(H.coreEditors),V(H.skillInstall)])}),Ss(`opencode`)],modes:{external:{requirements:[ls([B(`opencode`,`mcp`,`user`,`config-entry`),B(`opencode`,`mcp`,`project`,`config-entry`)]),us([B(`opencode`,`skill`,`project`,`skill-bundle-copy`),B(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[ls([B(`opencode`,`mcp`,`user`,`config-entry`),B(`opencode`,`mcp`,`project`,`config-entry`)]),us([B(`opencode`,`skill`,`project`,`skill-bundle-copy`),B(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[ls([B(`opencode`,`mcp`,`session`,`session-injection`),B(`opencode`,`mcp`,`user`,`config-entry`),B(`opencode`,`mcp`,`project`,`config-entry`)]),us([B(`opencode`,`skill`,`project`,`skill-bundle-copy`),B(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:ms({acpAgentId:`opencode`,featuredOrder:5,harnessCli:`opencode`,readsEditorConfig:`opencode`,readsEditorConfigAttestation:ps([V(H.cliEditors,`the managed MCP entry OK writes into the opencode config`),gs(`opencode-acp adapter`,`The adapter runs opencode, which loads its own configured MCP servers, so the managed entry is already in the session.`)],_s),verifiedPosture:null}),external:hs({targetId:`opencode`,knownOrder:5,visible:!1,displayName:`OpenCode`,schemes:[],installUrl:`https://opencode.ai`,tagline:`Open-source terminal coding agent; bring any local model.`})}),openclaw:cs({id:`openclaw`,setupDocSlug:Ge.openclaw,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:openclaw`],satisfiers:[vs({agent:`openclaw`,strictness:[`reclaim-permissive`],attestation:ps([V(H.cliEditors,"the one two-level server map, nested under `mcp.servers`")])}),ss({agent:`openclaw`,piece:`skill`,scope:`user`,kind:`central-store-copy`,pathId:is,probe:ds(`reclaim-permissive`),attestation:ps([V(H.coreEditors),V(H.skillInstall,`the hub is written only when it already exists`)]),audience:`this-user`,guidance:fs(`guidance.skill.central-store`,{agent:`openclaw`}),troubleshooting:fs(`troubleshooting.openclaw.central-store-missing`,{agent:`openclaw`})})],modes:{external:{requirements:[ls([B(`openclaw`,`mcp`,`user`,`config-entry`)]),us([B(`openclaw`,`skill`,`user`,`central-store-copy`)])]},terminal:{requirements:[ls([B(`openclaw`,`mcp`,`user`,`config-entry`)]),us([B(`openclaw`,`skill`,`user`,`central-store-copy`)])]}},external:hs({targetId:`openclaw`,knownOrder:8,visible:!1,displayName:`OpenClaw`,schemes:[],installUrl:`https://openclaw.ai`,tagline:`Open-source agent gateway; runs agents against your MCP servers.`})}),pi:cs({id:`pi`,setupDocSlug:Ge.pi,offersConnectionRow:!0,detectionSources:[`cli-on-path:pi`],satisfiers:[ss({agent:`pi`,piece:`mcp`,scope:`project`,kind:`managed-file`,pathId:as(`editor-project-config`,`pi`),probe:ds(`reclaim-permissive`,`injection-functional`),attestation:ps([V(H.cliEditors,`OK owns the whole file; currency is a first-line sentinel`),V(H.acpRegistry,`the thread provisions this file instead of injecting`)]),audience:`this-project`,guidance:fs(`guidance.mcp.managed-file`,{agent:`pi`}),troubleshooting:fs(`troubleshooting.pi.folder-trust`,{agent:`pi`})}),bs({agent:`pi`,prerequisites:[B(`pi`,`mcp`,`project`,`managed-file`)],attestation:ps([V(H.coreEditors),V(H.writeProjectSkill)]),troubleshooting:fs(`troubleshooting.pi.folder-trust`,{agent:`pi`})}),xs({agent:`pi`,attestation:ps([V(H.coreEditors,`the agent home nests one level below the dotdir`),V(H.skillInstall)])})],modes:{external:{requirements:[ls([B(`pi`,`mcp`,`project`,`managed-file`)]),us([B(`pi`,`skill`,`project`,`skill-bundle-copy`),B(`pi`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[ls([B(`pi`,`mcp`,`project`,`managed-file`)]),us([B(`pi`,`skill`,`project`,`skill-bundle-copy`),B(`pi`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[ls([B(`pi`,`mcp`,`project`,`managed-file`)]),us([B(`pi`,`skill`,`project`,`skill-bundle-copy`),B(`pi`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:ms({acpAgentId:`pi-acp`,featuredOrder:null,harnessCli:`pi`,readsEditorConfig:`pi`,readsEditorConfigAttestation:ps([gs(`pi-acp@0.0.33`,"Pi has no MCP client at all: it accepts `mcpServers` at session/new, stores them write-only and never connects. Its wiring is a managed extension FILE in the project, which OK provisions instead of injecting — the same mapping, a different shape."),V(H.threadManager,`the bridge route that provisions the extension instead of injecting`)],{version:`0.0.33`,observedAt:`2026-08-20`}),verifiedPosture:`autonomous`}),external:hs({targetId:`pi`,knownOrder:6,visible:!1,displayName:`Pi`,schemes:[],installUrl:`https://pi.dev`,tagline:`Minimal open-source terminal coding agent, extensible in TypeScript.`})}),antigravity:cs({id:`antigravity`,setupDocSlug:Ge.antigravity,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:antigravity`],satisfiers:[vs({agent:`antigravity`,strictness:[`reclaim-permissive`],attestation:ps([V(H.cliEditors,`one user-global file shared by the IDE, the app and the CLI; per project you can only filter it`)])}),xs({agent:`antigravity`,attestation:ps([V(H.coreEditors),V(H.skillInstall)])})],modes:{external:{requirements:[ls([B(`antigravity`,`mcp`,`user`,`config-entry`)]),us([B(`antigravity`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[ls([B(`antigravity`,`mcp`,`user`,`config-entry`)]),us([B(`antigravity`,`skill`,`user`,`skill-bundle-copy`)])]}},external:hs({targetId:`antigravity`,knownOrder:7,visible:!1,displayName:`Antigravity`,schemes:[],installUrl:`https://antigravity.google`,tagline:"Google's agentic IDE + `agy` terminal agent."})}),"lm-studio":cs({id:`lm-studio`,setupDocSlug:Ge[`lm-studio`],offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[],satisfiers:[vs({agent:`lm-studio`,strictness:[`reclaim-permissive`],installability:`not-installable`,notInstallableReason:`no-non-interactive-verb`,attestation:ps([V(H.cliEditors,`two candidate locations, resolved against what already exists`),{kind:`upstream-issue`,ref:`lmstudio-ai/lmstudio-bug-tracker#1371`,note:`documented config path differs from the one the app reads on macOS`},V(H.presenceProbes,`deliberately absent from the presence probes`)]),troubleshooting:fs(`troubleshooting.lm-studio.config-path-mismatch`,{agent:`lm-studio`})})],modes:{external:{requirements:[ls([B(`lm-studio`,`mcp`,`user`,`config-entry`)]),us([])]}}}),hermes:cs({id:`hermes`,setupDocSlug:Ge.hermes,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:hermes`],satisfiers:[vs({agent:`hermes`,strictness:[`reclaim-permissive`],attestation:ps([V(H.cliEditors,`the one YAML target; the whole config is a single user-global file`)])})],modes:{external:{requirements:[ls([B(`hermes`,`mcp`,`user`,`config-entry`)]),us([])]},terminal:{requirements:[ls([B(`hermes`,`mcp`,`user`,`config-entry`)]),us([])]}},external:hs({targetId:`hermes`,knownOrder:9,visible:!1,displayName:`Hermes`,schemes:[],installUrl:`https://hermes-agent.nousresearch.com`,tagline:`Nous Research's terminal coding agent.`})}),gemini:cs({id:`gemini`,setupDocSlug:null,detectionSources:[`harness-bin:gemini`],satisfiers:[Ss(`gemini`)],modes:{acp:{requirements:[ls([B(`gemini`,`mcp`,`session`,`session-injection`)]),us([])]}},acp:ms({acpAgentId:`gemini`,featuredOrder:2,harnessCli:`gemini`,readsEditorConfig:null,readsEditorConfigAttestation:ps([V(H.coreEditors,`gemini reaches OK as an ACP agent only; it has no editor config target`)],_s),verifiedPosture:null})})};function ws(e){return Cs[e]}var Ts=Object.values(Cs).flatMap(e=>e.satisfiers),Qte=new Map(Ts.map(e=>[e.id,e]));function Es(e){return Qte.get(e)}var Ds=Object.values(Cs).flatMap(e=>e.acp===void 0?[]:[{record:e,acp:e.acp}]).sort((e,t)=>e.acp.acpAgentId.localeCompare(t.acp.acpAgentId));Ds.filter(({acp:e})=>e.featuredOrder!==null).sort((e,t)=>(e.acp.featuredOrder??0)-(t.acp.featuredOrder??0)).map(({acp:e})=>e.acpAgentId);var $te=Object.fromEntries(Ds.flatMap(({acp:e})=>e.harnessCli===null?[]:[[e.acpAgentId,e.harnessCli]]));Object.fromEntries(Ds.flatMap(({acp:e})=>e.harnessReadsEditorConfig===null?[]:[[e.acpAgentId,e.harnessReadsEditorConfig]]));var ene=Object.fromEntries(Ds.flatMap(({acp:e})=>e.verifiedPosture===null?[]:[[e.acpAgentId,e.verifiedPosture]])),Os=Object.values(Cs).flatMap(e=>e.external===void 0?[]:[e.external]).sort((e,t)=>e.knownOrder-t.knownOrder),ks=Os.map(({targetId:e,displayName:t,appBrandName:n,schemes:r,installUrl:i,tagline:a})=>({id:e,displayName:t,...n===void 0?{}:{appBrandName:n},schemes:r,installUrl:i,...a===void 0?{}:{tagline:a}})),tne=new Set(Os.filter(e=>e.visible).map(e=>e.targetId)),nne=ks.filter(e=>tne.has(e.id)),rne=Re.filter(e=>Cs[e].offersConnectionRow),ine=new Map(Object.values(Cs).flatMap(e=>e.external===void 0?[]:[[e.external.targetId,e.id]]));function ane(e){return ine.get(e)}var one=new Map(Object.values(Cs).flatMap(e=>e.modes.terminal===void 0?[]:[[e.id,e.id]]));function sne(e){return one.get(e)}Object.fromEntries(Object.values(Cs).flatMap(e=>{let t=e.satisfiers.find(e=>e.piece===`mcp`&&e.scope===`project`&&e.consentClass!==`none`)?.consentClass;return t===void 0?[]:[[e.id,t]]}));var As=Symbol.for(`yaml.alias`),js=Symbol.for(`yaml.document`),Ms=Symbol.for(`yaml.map`),Ns=Symbol.for(`yaml.pair`),Ps=Symbol.for(`yaml.scalar`),Fs=Symbol.for(`yaml.seq`),Is=Symbol.for(`yaml.node.type`),Ls=e=>!!e&&typeof e==`object`&&e[Is]===As,Rs=e=>!!e&&typeof e==`object`&&e[Is]===js,zs=e=>!!e&&typeof e==`object`&&e[Is]===Ms,Bs=e=>!!e&&typeof e==`object`&&e[Is]===Ns,Vs=e=>!!e&&typeof e==`object`&&e[Is]===Ps,Hs=e=>!!e&&typeof e==`object`&&e[Is]===Fs;function Us(e){if(e&&typeof e==`object`)switch(e[Is]){case Ms:case Fs:return!0}return!1}function Ws(e){if(e&&typeof e==`object`)switch(e[Is]){case As:case Ms:case Ps:case Fs:return!0}return!1}var Gs=e=>(Vs(e)||Us(e))&&!!e.anchor,Ks=Symbol(`break visit`),qs=Symbol(`skip children`),Js=Symbol(`remove node`);function Ys(e,t){let n=$s(t);Rs(e)?Xs(null,e.contents,n,Object.freeze([e]))===Js&&(e.contents=null):Xs(null,e,n,Object.freeze([]))}Ys.BREAK=Ks,Ys.SKIP=qs,Ys.REMOVE=Js;function Xs(e,t,n,r){let i=ec(e,t,n,r);if(Ws(i)||Bs(i))return tc(e,r,i),Xs(e,i,n,r);if(typeof i!=`symbol`){if(Us(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=Xs(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Ks)return Ks;else i===Js&&(t.items.splice(e,1),--e)}}else if(Bs(t)){r=Object.freeze(r.concat(t));let e=Xs(`key`,t.key,n,r);if(e===Ks)return Ks;e===Js&&(t.key=null);let i=Xs(`value`,t.value,n,r);if(i===Ks)return Ks;i===Js&&(t.value=null)}}return i}async function Zs(e,t){let n=$s(t);Rs(e)?await Qs(null,e.contents,n,Object.freeze([e]))===Js&&(e.contents=null):await Qs(null,e,n,Object.freeze([]))}Zs.BREAK=Ks,Zs.SKIP=qs,Zs.REMOVE=Js;async function Qs(e,t,n,r){let i=await ec(e,t,n,r);if(Ws(i)||Bs(i))return tc(e,r,i),Qs(e,i,n,r);if(typeof i!=`symbol`){if(Us(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await Qs(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Ks)return Ks;else i===Js&&(t.items.splice(e,1),--e)}}else if(Bs(t)){r=Object.freeze(r.concat(t));let e=await Qs(`key`,t.key,n,r);if(e===Ks)return Ks;e===Js&&(t.key=null);let i=await Qs(`value`,t.value,n,r);if(i===Ks)return Ks;i===Js&&(t.value=null)}}return i}function $s(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function ec(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(zs(t))return n.Map?.(e,t,r);if(Hs(t))return n.Seq?.(e,t,r);if(Bs(t))return n.Pair?.(e,t,r);if(Vs(t))return n.Scalar?.(e,t,r);if(Ls(t))return n.Alias?.(e,t,r)}function tc(e,t,n){let r=t[t.length-1];if(Us(r))r.items[e]=n;else if(Bs(r))e===`key`?r.key=n:r.value=n;else if(Rs(r))r.contents=n;else{let e=Ls(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var nc={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},rc=e=>e.replace(/[!,[\]{}]/g,e=>nc[e]),ic=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+rc(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&Ws(e.contents)){let t={};Ys(e.contents,(e,n)=>{Ws(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)i===`!!`&&a===`tag:yaml.org,2002:`||(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
|
|
66
66
|
`)}};ic.defaultYaml={explicit:!1,version:`1.2`},ic.defaultTags={"!!":`tag:yaml.org,2002:`};function ac(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function oc(e){let t=new Set;return Ys(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function sc(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function cc(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=oc(e);let a=sc(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(Vs(t.node)||Us(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function lc(e,t,n,r){if(r&&typeof r==`object`)if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=lc(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=lc(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=lc(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=lc(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}function uc(e,t,n){if(Array.isArray(e))return e.map((e,t)=>uc(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!Gs(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var dc=class{constructor(e){Object.defineProperty(this,Is,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!Rs(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=uc(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?lc(i,{"":o},``,o):o}},fc=class extends dc{constructor(e){super(As),this.source=e,Object.defineProperty(this,`tag`,{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],Ys(e,{Node:(e,t)=>{(Ls(t)||Gs(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(uc(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=pc(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(ac(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function pc(e,t,n){if(Ls(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Us(t)){let r=0;for(let i of t.items){let t=pc(e,i,n);t>r&&(r=t)}return r}else if(Bs(t)){let r=pc(e,t.key,n),i=pc(e,t.value,n);return Math.max(r,i)}return 1}var mc=e=>!e||typeof e!=`function`&&typeof e!=`object`,hc=class extends dc{constructor(e){super(Ps),this.value=e}toJSON(e,t){return t?.keep?this.value:uc(this.value,e,t)}toString(){return String(this.value)}};hc.BLOCK_FOLDED=`BLOCK_FOLDED`,hc.BLOCK_LITERAL=`BLOCK_LITERAL`,hc.PLAIN=`PLAIN`,hc.QUOTE_DOUBLE=`QUOTE_DOUBLE`,hc.QUOTE_SINGLE=`QUOTE_SINGLE`;var gc=`tag:yaml.org,2002:`;function _c(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function vc(e,t,n){if(Rs(e)&&(e=e.contents),Ws(e))return e;if(Bs(e)){let t=n.schema[Ms].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??=i(e),new fc(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=gc+t.slice(2));let l=_c(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new hc(e);return c&&(c.node=t),t}l=e instanceof Map?o[Ms]:Symbol.iterator in Object(e)?o[Fs]:o[Ms]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new hc(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function yc(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return vc(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var bc=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,xc=class extends dc{constructor(e,t){super(e),Object.defineProperty(this,`schema`,{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>Ws(t)||Bs(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(bc(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(Us(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,yc(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(Us(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&Vs(i)?i.value:i:Us(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Bs(t))return!1;let n=t.value;return n==null||e&&Vs(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return Us(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(Us(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,yc(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},Sc=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function Cc(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var wc=(e,t,n)=>e.endsWith(`
|
|
67
67
|
`)?Cc(n,t):n.includes(`
|
|
68
68
|
`)?`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Us as e}from"./dist-
|
|
1
|
+
import{Us as e}from"./dist-bQ5kvrpa.js";function t(t){return e.includes(t)}function n(e){if(e.startsWith(b)||e.startsWith(w)||e.startsWith(T)||e.startsWith(D)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=x(t),r=n>=0?t.slice(0,n):t;if(!r)return null;try{return r.split(`/`).map(decodeURIComponent).join(`/`)}catch{return r}}function r(e){if(e.startsWith(b)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=t.indexOf(`#`);if(n<0)return null;let r=t.slice(n+1);if(!r)return null;try{return decodeURIComponent(r)}catch{return r}}var i=/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g;function a(e){return encodeURIComponent(e.replace(i,`�`))}function o(e){return e.split(`/`).map(a).join(`/`)}function s(e,t){let n=`#/${o(e)}`;return t?`${n}#${a(t)}`:n}function c(e,t){return e===t||l(e)===l(t)}function l(e){try{return decodeURIComponent(e)}catch{return e}}var u=`__okHashHistoryEntry`;function d(e){return{...typeof e==`object`&&e?e:{},[u]:!0}}function f(e){return typeof e==`object`&&!!e&&e[u]===!0}function p(){f(window.history.state)||window.history.replaceState(d(window.history.state),``)}function m(e){let{pathname:t,search:n}=window.location;window.history.replaceState(d(window.history.state),``,`${t}${n}${e}`)}function h(e){if(c(window.location.hash,e))return;let{pathname:t,search:n}=window.location;window.history.pushState(d(window.history.state),``,`${t}${n}${e}`)}function g(e){let t=e.toLowerCase();return t.endsWith(`.mdx`)?e.slice(0,-4):t.endsWith(`.md`)?e.slice(0,-3):e}function _(e,t){let n=e.replace(/^\/+|\/+$/g,``),r=n?`#/${o(n)}/`:`#/`;return t?`${r}#${a(t)}`:r}function v(e,t,n){if(e===`folder`)return _(t);let r=`#/${a(t)}`;return n==null||n===``?r:`${r}?branch=${a(n)}`}function y(e){if(e===`#/`)return!0;if(!e.startsWith(`#/`))return!1;let t=e.slice(2);return t.length>0&&t[0]===`?`}var b=`#/__asset__/`;function x(e){let t=e.indexOf(`?`),n=e.indexOf(`#`);return t<0?n:n<0?t:Math.min(t,n)}function S(e){if(!e.startsWith(b))return null;let t=e.slice(12);if(!t)return null;try{return t.split(`/`).map(decodeURIComponent).join(`/`)}catch{return t}}function C(e){return`${b}${o(e)}`}var w=`#/__skill-file__/`,T=`#/__skills__`;function E(e){return e===T||e.startsWith(`${T}/`)}var D=`#/__skill-preview__/`,O=[`explore`,`detected`,`builtin`,`foreign`,`linked`];function k(e){return e!==void 0&&O.includes(e)}var A=`project`;function j(e){return[e.flavor,e.source,e.name,e.subtitle,e.level??A].map(a).join(`/`)}function M(e){if(!e)return null;let n;try{n=e.split(`/`).map(decodeURIComponent)}catch{return null}if(n.length<4||n.length>6)return null;let[r,i,a,o,s,c]=n;return!k(r)||!i||!a?null:{flavor:r,source:i,name:a,subtitle:o??``,...s&&t(s)?{level:s}:{},...c?{path:c}:{}}}function N(e){let t=j(e);return e.path&&(t+=`/${a(e.path)}`),`${D}${t}`}function P(e){return e.startsWith(D)?M(e.slice(20)):null}var F=`:`;function I(e){let t=e.host===void 0?e.name:`${e.name}${F}${e.host}`;return`${w}${[e.scope,t].map(a).join(`/`)}/${o(e.path)}`}function L(e){if(!e.startsWith(w))return null;let n=e.slice(17);if(!n)return null;let r;try{r=n.split(`/`).map(decodeURIComponent)}catch{return null}if(r.length<3)return null;let[i,a,...o]=r,s=o.join(`/`);if(!i||!a||!s||!t(i))return null;let c=a.indexOf(F),l=c===-1?a:a.slice(0,c),u=c===-1?void 0:a.slice(c+1);return l?{scope:i,name:l,path:s,...u?{host:u}:{}}:null}var R=/\.(md|mdx)$/i;function z(e){return e.trim().replace(/^\.\/+/,``).replace(/^\/+/,``)}function B(e){return z(e).replace(R,``)}function V(e){let t=z(e);return t?R.test(t)?t:`${t}.md`:`untitled.md`}function H(e){let t=B(e),n=t.lastIndexOf(`/`);return{initialDir:n>0?t.slice(0,n):``,suggestedName:`${n>=0?t.slice(n+1):t||`untitled`}.md`}}export{P as C,L as S,f as _,S as a,h as b,v as c,C as d,s as f,y as g,N as h,r as i,j as l,I as m,V as n,M as o,_ as p,B as r,n as s,H as t,g as u,c as v,E as w,m as x,p as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e}from"./config-provider-
|
|
1
|
+
import{p as e}from"./config-provider-owr5M3NH.js";var t=new WeakMap;function n(n,r){let i=t.get(r);if(i)return i;let a=new e(r);t.set(r,a);let o=r.doc,s=!1,c=()=>{s||(s=!0,n.off(`destroy`,c),o?.off(`destroy`,c),t.get(r)===a&&t.delete(r),a.clear(),a.destroy())};return n.on(`destroy`,c),o?.on(`destroy`,c),a}export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as e}from"./dist-
|
|
1
|
+
import{N as e}from"./dist-bQ5kvrpa.js";var t=`open-knowledge:documents-changed`,n=new Set(e.options);function r(e){return e===void 0||!Array.isArray(e)?[`files`]:[...new Set(e.filter(e=>n.has(e)))]}function i(e=[`files`]){window.dispatchEvent(new CustomEvent(t,{detail:{channels:r(e)}}))}function a(e){let n=t=>{e(r(t instanceof CustomEvent?t.detail?.channels:void 0))};return window.addEventListener(t,n),()=>window.removeEventListener(t,n)}function o(e){return e.includes(`local-targets`)||e.includes(`files`)}var s=`open-knowledge:doc-persisted`;function c(e){window.dispatchEvent(new CustomEvent(s,{detail:{docName:e}}))}function l(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail?.docName;typeof n==`string`&&n.length>0&&e(n)};return window.addEventListener(s,t),()=>window.removeEventListener(s,t)}var u=`open-knowledge:branch-changed`;function d(e){window.dispatchEvent(new CustomEvent(u,{detail:{branch:e}}))}function f(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail;e(n?.branch??null)};return window.addEventListener(u,t),()=>window.removeEventListener(u,t)}var p=`open-knowledge:templates-changed`;function m(){window.dispatchEvent(new CustomEvent(p))}function h(e){let t=()=>e();return window.addEventListener(p,t),()=>window.removeEventListener(p,t)}var g=`open-knowledge:skills-changed`;function _(){window.dispatchEvent(new CustomEvent(g))}function v(e){let t=()=>e();return window.addEventListener(g,t),()=>window.removeEventListener(g,t)}var y=`open-knowledge:skill-scope-moved`;function b(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}function x(e){let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}var S=new Set,C=(e,t)=>`${e}\u0000${t}`;function w(e,t){S.add(C(e,t)),_()}function T(e,t){S.delete(C(e,t))&&_()}var E=new Map;function D(e,t){let n=C(e,t);E.set(n,(E.get(n)??0)+1),_()}function O(e,t){let n=C(e,t),r=E.get(n);r!==void 0&&(r<=1?E.delete(n):E.set(n,r-1),_())}function k(e,t){return E.has(C(e,t))}function A(){return[...E.keys()].sort().join(``)}function j(e,t){return S.has(C(e,t))}function M(e){return S.size===0?e:e.filter(e=>!S.has(C(e.scope,e.name)))}export{l as _,c as a,v as b,_ as c,O as d,o as f,f as g,A as h,d as i,m as l,k as m,w as n,i as o,j as p,D as r,b as s,M as t,T as u,a as v,h as x,x as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_s as e,fs as t,ps as n,ys as r}from"./dist-
|
|
1
|
+
import{_s as e,fs as t,ps as n,ys as r}from"./dist-bQ5kvrpa.js";import{d as i,f as a,p as o}from"./doc-paths-BKrv1Wyo.js";import{i as s}from"./navigation-targets-35tMAsBB.js";import{c,l,s as u}from"./file-tree-utils-B3QHZLn9.js";import{t as d}from"./file-tree-rename-validation-C11Qcf3I.js";var f=`application/x-open-knowledge-sidebar-item+json`,p={image:!0,video:!0,audio:!0,pdf:!0,text:!0,mermaid:!0,excalidraw:!0};function m(e){return JSON.stringify(e)}function h(e){return e?Array.from(e.types).includes(f):!1}function ee(e){return e.kind===`folder`?{target:{kind:`folder`,target:e.folderPath,folderPath:e.folderPath},hash:o(e.folderPath)}:e.kind===`asset`?{target:{kind:`asset`,target:e.assetPath,assetPath:e.assetPath,mediaKind:e.mediaKind},hash:i(e.assetPath)}:{target:s(e.docName,e.size)??{kind:`doc`,target:e.docName,docName:e.docName},hash:a(e.docName)}}function g(e){if(!e||!h(e))return null;let t=e.getData(f);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!_(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&&!v(e)?null:{v:1,kind:`asset`,assetPath:n.assetPath,mediaKind:e}}return null}function _(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function v(e){return typeof e==`string`&&Object.hasOwn(p,e)}var y=`.md`,b=/\.(md|mdx)$/i;function x(r,i=y){return b.test(r)||e(r)||n(r)||t(r)?r:`${r}${i}`}function S(e){return $(e).replace(b,``)}function C(e,t){let n=$(e),r=k(t),i=t.find(e=>c(e)&&A(e,r)===n)??t.find(e=>c(e)&&T(e)===n);if(i)return i.docName;let a=S(n);return t.find(e=>{let t=T(e);return t!==n&&b.test(t)&&S(t)===a})&&b.test(n)?n:a}function w(e,t){let n=k(t);return t.find(t=>A(t,n)===e)??t.find(t=>T(t)===e)}function T(e){return l(e)?O(e.path):u(e)?e.path:x(e.docName,e.docExt)}function E(e){let t=$(e).match(b);return t?`.${t[1].toLowerCase()}`:void 0}function D(e){return $(e)}function O(e){let t=$(e.trim());return t?`${t}/`:``}function te(e){return e.endsWith(`/`)?D(e):S(e)}function k(e){let t=new Map;for(let n of e){if(!c(n))continue;let e=n.docName.match(b);if(!e)continue;let r=n.docName.slice(0,-e[0].length),i=t.get(r);i?i.add(e[0]):t.set(r,new Set([e[0]]))}return t}function A(e,t){let n=T(e);if(!c(e))return n;let r=e.docName.match(b);if(!r)return n;let i=e.docName.slice(0,-r[0].length);return(t.get(i)?.size??0)>1?n:`${e.docName}${e.docExt??y}`}function j(e){let t=k(e),n=new Set,r=[];for(let i of e){let e=A(i,t);n.has(e)||(n.add(e),r.push(e))}return r}function M(e){return[...e].sort().join(`\0`)}function N(e){return M(j(e))}function P(e,t={}){let n=new Set;for(let r of e){let e=(l(r)||u(r)?r.path:r.docName).split(`/`).filter(Boolean);if(!t.includeOkFolders&&e.includes(`.ok`))continue;if(l(r)){let e=O(r.path);e&&n.add(e)}let i=l(r)?e.length:e.length-1;for(let t=1;t<=i;t++)n.add(`${e.slice(0,t).join(`/`)}/`)}return[...n].sort()}function F(e){if(!e)return[];let t=$(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 I(e,t,n){let r=E(e);if(r)return r;let i=n.find(e=>c(e)&&e.docName===t);return i?i.docExt??y:Q(e).includes(`.`)?void 0:y}function L(e,t){let n=e.lastIndexOf(`/`),r=n===-1?``:e.slice(0,n+1),i=n===-1?e:e.slice(n+1),a=t.filter(e=>{if(!u(e)||!e.path.startsWith(r))return!1;let t=e.path.slice(r.length);return!t.includes(`/`)&&t.startsWith(`${i}.`)});return a.length===1?a[0].path:null}function R(e,t,n){if(E(e))return null;let r=n.find(e=>u(e)&&e.path===t);return r?r.path:Q(e).includes(`.`)?t:L(t,n)}function z(e,t){let n=e.kind===`directory`,r=n?D(e.path):C(e.path,t);if(n)return{kind:`folder`,name:$(Q(e.path)).replace(b,``),path:r,treePath:V(e.path,!0)};let i=R(e.path,r,t);if(i)return{kind:`asset`,name:$(Q(i)),path:i,treePath:i};let a=I(e.path,r,t);return{kind:`file`,name:$(Q(e.path)).replace(b,``),path:r,treePath:V(e.path,!1),docExt:a}}function B(e){return e.kind===`directory`?D(e.path):e.path}function V(e,t){return t?O(e):b.test(e)?e:`${e}${y}`}function H(e,t,n){let r=O(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 U(e,t){return e===`file`?V(t,!1):`${D(t)}/index${y}`}function W(e,t){return t.kind===`root`||t.directoryPath==null?Q(e):`${t.directoryPath}${Q(e)}`}function G(e,t){if(t)return D(O(e));let n=S(e),r=n.lastIndexOf(`/`);return r===-1?``:n.slice(0,r)}function K(e,t){let n=D(O(e));return n?`${n}/${t}`:t}function q(e,t,n){e.append(`parentDocName`,K(t,n)),e.append(`placement`,`parent-dir`)}function J(e,t){return(t.path??K(e,t.src)).replace(/^\/+/,``)}function Y(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 X(e){return Array.from(e.dataTransfer?.files??[]).filter(e=>e.name.length>0||e.size>0)}function Z(e,t){let n=d(e).toLowerCase();if(n===``)return null;let i=new Date().toISOString();if(n===`.md`||n===`.mdx`)return{kind:`document`,docName:S(e),docExt:n,modified:i,size:t.size};let a=n.startsWith(`.`)?n.slice(1):n;return{kind:`asset`,path:e,assetExt:a,mediaKind:r(a),modified:i,size:t.size}}function Q(e){let t=$(e),n=t.lastIndexOf(`/`),r=n===-1?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function $(e){return e.endsWith(`/`)?e.slice(0,-1):e}export{g as A,z as C,f as D,J as E,h as O,C as S,te as T,G as _,U as a,D as b,j as c,T as d,X as f,V as g,Y as h,W as i,m as j,ee as k,N as l,O as m,P as n,H as o,w as p,F as r,x as s,q as t,Z as u,B as v,M as w,S as x,L as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_i as e,di as t,nc as n}from"./dist-
|
|
1
|
+
import{_i as e,di as t,nc as n}from"./dist-bQ5kvrpa.js";function r(e){return e.kind===`asset`}function i(e){return e.kind===`document`}function a(e){return e.kind===`folder`}function o(e){let t=[],n=0;for(let r of e)switch(r.kind){case`document`:if(r.docName===void 0){n+=1;break}t.push({kind:`document`,docName:r.docName,docExt:r.docExt,size:r.size,modified:r.modified,isSymlink:r.isSymlink,canonicalDocName:r.canonicalDocName,targetPath:r.targetPath});break;case`asset`:if(r.path===void 0||r.assetExt===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt,mediaKind:r.mediaKind??null,size:r.size,modified:r.modified,referencedBy:r.referencedBy});break;case`file`:if(r.path===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt??s(r.path),mediaKind:null,size:r.size,modified:r.modified,referencedBy:[]});break;case`folder`:if(r.path===void 0){n+=1;break}t.push({kind:`folder`,path:r.path,size:r.size,modified:r.modified,hasChildren:r.hasChildren,isSymlink:r.isSymlink,targetPath:r.targetPath});break;default:r.kind;break}return n>0&&console.warn(`[file-tree-utils] dropped ${n} listing entries missing variant identity fields`),t}function s(e){let t=e.includes(`/`)?e.split(`/`).pop()??e:e,n=t.lastIndexOf(`.`);return n>0&&n<t.length-1?t.slice(n+1).toLowerCase():t.startsWith(`.`)&&t.length>1?t.slice(1).toLowerCase():`file`}function c(e){if(!e)return[];let t=e.split(`/`).filter(Boolean),n=[];for(let e=1;e<t.length;e++)n.push(t.slice(0,e).join(`/`));return n}function l(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function u(e){return e.split(`/`).some(e=>e.toLowerCase()===`.ok`)}function d(e,t){return t&&e!==`document`&&e!==`folder`}function f(e,n){return!n&&t(e)}function p(n,r={}){let{showHiddenFiles:i=!1,showOnlyMarkdownFiles:a=!1,showOkFolders:o=!1}=r;return n.filter(n=>{let r=n.docName??n.path??``;if(r===``||d(n.kind,a))return!1;let s=r.split(`/`),c=s.indexOf(`.ok`);if(c!==-1){if(!o)return!1;let e=s.slice(0,c).join(`/`);return i||e===``||!t(e)}return e(r)?!1:!f(r,i)})}function m(t,r={}){let{showHiddenFiles:i=!1,showOnlyMarkdownFiles:a=!1}=r,o=t.docName??t.path??``;return o===``||n(o)||e(o)||u(o)?{hiddenFiles:!1,onlyMarkdownFiles:!1}:{hiddenFiles:f(o,i),onlyMarkdownFiles:d(t.kind,a)}}function h(e){let{visibility:t={},unfilteredRootEntryCount:n,knownPageCount:r}=e;return(n>0||r>0)&&(t.showOnlyMarkdownFiles??!1)?`filtered-to-zero`:`true-empty`}export{p as a,i as c,o as d,l as i,a as l,h as n,u as o,c as r,r as s,m as t,s as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./documents-events-
|
|
1
|
+
import{l as e}from"./documents-events-j9AAd1Uc.js";import{t}from"./parse-api-error-BtEdpaFC.js";import{t as n}from"./createLucideIcon-B6ULg5PN.js";var r=n(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]);async function i(e){return t(await e.json().catch(()=>null))??`HTTP ${e.status}`}async function a(e,t){try{let n=await fetch(`/api/folder-config`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:e,frontmatter:t})});return n.ok?{ok:!0}:{ok:!1,error:await i(n)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function o(t){try{let n=await fetch(`/api/template`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,created:r?.created??!1,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function s(t,n){try{let r=`?folder=${encodeURIComponent(t)}&name=${encodeURIComponent(n)}`,a=await fetch(`/api/template${r}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return e(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function c(t){try{let n=await fetch(`/api/template`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,committed:r?.committed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function l(t){try{let n=await fetch(`/api/template/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,path:r?.path??``,created:r?.created??!1,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{o as a,a as i,l as n,r as o,c as r,s as t};
|